Skip to content

Instantly share code, notes, and snippets.

@disarticulate
Created May 30, 2021 19:44
Show Gist options
  • Save disarticulate/8ca96e37b45fdbca367a2e7079e5e211 to your computer and use it in GitHub Desktop.
Save disarticulate/8ca96e37b45fdbca367a2e7079e5e211 to your computer and use it in GitHub Desktop.
minified Jimp v0.16.1 using terser
/*
Jimp v0.16.1
https://github.com/oliver-moran/jimp
Ported for the Web by Phil Seaton
MIT License
Copyright (c) 2018 Oliver Moran
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
if((void 0===window||!window)&&"undefined"!=typeof self)var window=self;!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{(void 0!==window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jimp=t()}}((function(){return function t(e,r,i){function n(o,s){if(!r[o]){if(!e[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var l=r[o]={exports:{}};e[o][0].call(l.exports,(function(t){return n(e[o][1][t]||t)}),l,l.exports,t,e,r,i)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)n(i[o]);return n}({1:[function(t,e,r){e.exports=function(t){if(Array.isArray(t))return t}},{}],2:[function(t,e,r){e.exports=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}},{}],3:[function(t,e,r){e.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},{}],4:[function(t,e,r){e.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},{}],5:[function(t,e,r){var i=t("./setPrototypeOf");function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function a(t,r,o){return n()?e.exports=a=Reflect.construct:e.exports=a=function(t,e,r){var n=[null];n.push.apply(n,e);var a=new(Function.bind.apply(t,n));return r&&i(a,r.prototype),a},a.apply(null,arguments)}e.exports=a},{"./setPrototypeOf":18}],6:[function(t,e,r){function i(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}e.exports=function(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t}},{}],7:[function(t,e,r){e.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},{}],8:[function(t,e,r){function i(){return e.exports=i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},i.apply(this,arguments)}e.exports=i},{}],9:[function(t,e,r){function i(t){return e.exports=i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}e.exports=i},{}],10:[function(t,e,r){var i=t("./setPrototypeOf");e.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}},{"./setPrototypeOf":18}],11:[function(t,e,r){e.exports=function(t){return t&&t.__esModule?t:{default:t}}},{}],12:[function(t,e,r){var i=t("../helpers/typeof");function n(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return n=function(){return t},t}e.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var e=n();if(e&&e.has(t))return e.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=a?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,e&&e.set(t,r),r}},{"../helpers/typeof":21}],13:[function(t,e,r){e.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},{}],14:[function(t,e,r){e.exports=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var r=[],i=!0,n=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);i=!0);}catch(t){n=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(n)throw a}}return r}}},{}],15:[function(t,e,r){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},{}],16:[function(t,e,r){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},{}],17:[function(t,e,r){var i=t("../helpers/typeof"),n=t("./assertThisInitialized");e.exports=function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?n(t):e}},{"../helpers/typeof":21,"./assertThisInitialized":3}],18:[function(t,e,r){function i(t,r){return e.exports=i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,r)}e.exports=i},{}],19:[function(t,e,r){var i=t("./arrayWithHoles"),n=t("./iterableToArrayLimit"),a=t("./nonIterableRest");e.exports=function(t,e){return i(t)||n(t,e)||a()}},{"./arrayWithHoles":1,"./iterableToArrayLimit":14,"./nonIterableRest":15}],20:[function(t,e,r){var i=t("./arrayWithoutHoles"),n=t("./iterableToArray"),a=t("./nonIterableSpread");e.exports=function(t){return i(t)||n(t)||a()}},{"./arrayWithoutHoles":2,"./iterableToArray":13,"./nonIterableSpread":16}],21:[function(t,e,r){function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t){return"function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?e.exports=n=function(t){return i(t)}:e.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":i(t)},n(t)}e.exports=n},{}],22:[function(t,e,r){e.exports=t("regenerator-runtime")},{"regenerator-runtime":153}],23:[function(t,e,r){var i=t("./src/converter");function n(t,e){var r=new i(t,e);return function(t){return r.convert(t)}}n.BIN="01",n.OCT="01234567",n.DEC="0123456789",n.HEX="0123456789abcdef",e.exports=n},{"./src/converter":24}],24:[function(t,e,r){"use strict";function i(t,e){if(!(t&&e&&t.length&&e.length))throw new Error("Bad alphabet");this.srcAlphabet=t,this.dstAlphabet=e}i.prototype.convert=function(t){var e,r,i,n={},a=this.srcAlphabet.length,o=this.dstAlphabet.length,s=t.length,u="string"==typeof t?"":[];if(!this.isValid(t))throw new Error('Number "'+t+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return t;for(e=0;e<s;e++)n[e]=this.srcAlphabet.indexOf(t[e]);do{for(r=0,i=0,e=0;e<s;e++)(r=r*a+n[e])>=o?(n[i++]=parseInt(r/o,10),r%=o):i>0&&(n[i++]=0);s=i,u=this.dstAlphabet.slice(r,r+1).concat(u)}while(0!==i);return u},i.prototype.isValid=function(t){for(var e=0;e<t.length;++e)if(-1===this.srcAlphabet.indexOf(t[e]))return!1;return!0},e.exports=i},{}],25:[function(t,e,r){(function(r){"use strict";var i=t("object-assign");
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/function n(t,e){if(t===e)return 0;for(var r=t.length,i=e.length,n=0,a=Math.min(r,i);n<a;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0}function a(t){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=t("util/"),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,h="foo"===function(){}.name;function l(t){return Object.prototype.toString.call(t)}function f(t){return!a(t)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var c=e.exports=_,d=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(o.isFunction(t)){if(h)return t.name;var e=t.toString().match(d);return e&&e[1]}}function m(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function b(t){if(h||!o.isFunction(t))return o.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function g(t,e,r,i,n){throw new c.AssertionError({message:r,actual:t,expected:e,operator:i,stackStartFunction:n})}function _(t,e){t||g(t,!0,e,"==",c.ok)}function v(t,e,r,i){if(t===e)return!0;if(a(t)&&a(e))return 0===n(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(f(t)&&f(e)&&l(t)===l(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(a(t)!==a(e))return!1;var s=(i=i||{actual:[],expected:[]}).actual.indexOf(t);return-1!==s&&s===i.expected.indexOf(e)||(i.actual.push(t),i.expected.push(e),function(t,e,r,i){if(null==t||null==e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var n=y(t),a=y(e);if(n&&!a||!n&&a)return!1;if(n)return v(t=u.call(t),e=u.call(e),r);var s,h,l=E(t),f=E(e);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),h=l.length-1;h>=0;h--)if(l[h]!==f[h])return!1;for(h=l.length-1;h>=0;h--)if(!v(t[s=l[h]],e[s],r,i))return!1;return!0}(t,e,r,i))}return r?t===e:t==e}function y(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function x(t,e,r,i){var n;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(i=r,r=null),n=function(t){var e;try{t()}catch(t){e=t}return e}(e),i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),t&&!n&&g(n,r,"Missing expected exception"+i);var a="string"==typeof i,s=!t&&n&&!r;if((!t&&o.isError(n)&&a&&w(n,r)||s)&&g(n,r,"Got unwanted exception"+i),t&&n&&r&&!w(n,r)||!t&&n)throw n}c.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return m(b(t.actual),128)+" "+t.operator+" "+m(b(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var i=r.stack,n=p(e),a=i.indexOf("\n"+n);if(a>=0){var o=i.indexOf("\n",a+1);i=i.substring(o+1)}this.stack=i}}},o.inherits(c.AssertionError,Error),c.fail=g,c.ok=_,c.equal=function(t,e,r){t!=e&&g(t,e,r,"==",c.equal)},c.notEqual=function(t,e,r){t==e&&g(t,e,r,"!=",c.notEqual)},c.deepEqual=function(t,e,r){v(t,e,!1)||g(t,e,r,"deepEqual",c.deepEqual)},c.deepStrictEqual=function(t,e,r){v(t,e,!0)||g(t,e,r,"deepStrictEqual",c.deepStrictEqual)},c.notDeepEqual=function(t,e,r){v(t,e,!1)&&g(t,e,r,"notDeepEqual",c.notDeepEqual)},c.notDeepStrictEqual=function t(e,r,i){v(e,r,!0)&&g(e,r,i,"notDeepStrictEqual",t)},c.strictEqual=function(t,e,r){t!==e&&g(t,e,r,"===",c.strictEqual)},c.notStrictEqual=function(t,e,r){t===e&&g(t,e,r,"!==",c.notStrictEqual)},c.throws=function(t,e,r){x(!0,t,e,r)},c.doesNotThrow=function(t,e,r){x(!1,t,e,r)},c.ifError=function(t){if(t)throw t},c.strict=i((function t(e,r){e||g(e,!0,r,"==",t)}),c,{equal:c.strictEqual,deepEqual:c.deepStrictEqual,notEqual:c.notStrictEqual,notDeepEqual:c.notDeepStrictEqual}),c.strict.strict=c.strict;var E=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{})},{"object-assign":84,"util/":28}],26:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],27:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],28:[function(t,e,r){(function(e,i){var n=/%[sdj%]/g;r.format=function(t){if(!g(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(s(arguments[r]));return e.join(" ")}r=1;for(var i=arguments,a=i.length,o=String(t).replace(n,(function(t){if("%%"===t)return"%";if(r>=a)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(t){return"[Circular]"}default:return t}})),u=i[r];r<a;u=i[++r])m(u)||!y(u)?o+=" "+u:o+=" "+s(u);return o},r.deprecate=function(t,n){if(_(i.process))return function(){return r.deprecate(t,n).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return function(){if(!a){if(e.throwDeprecation)throw new Error(n);e.traceDeprecation?console.trace(n):console.error(n),a=!0}return t.apply(this,arguments)}};var a,o={};function s(t,e){var i={seen:[],stylize:h};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),p(e)?i.showHidden=e:e&&r._extend(i,e),_(i.showHidden)&&(i.showHidden=!1),_(i.depth)&&(i.depth=2),_(i.colors)&&(i.colors=!1),_(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=u),l(i,t,i.depth)}function u(t,e){var r=s.styles[e];return r?"["+s.colors[r][0]+"m"+t+"["+s.colors[r][1]+"m":t}function h(t,e){return t}function l(t,e,i){if(t.customInspect&&e&&E(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(i,t);return g(n)||(n=l(t,n,i)),n}var a=function(t,e){if(_(e))return t.stylize("undefined","undefined");if(g(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(b(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,e);if(a)return a;var o=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),x(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(e);if(0===o.length){if(E(e)){var u=e.name?": "+e.name:"";return t.stylize("[Function"+u+"]","special")}if(v(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(w(e))return t.stylize(Date.prototype.toString.call(e),"date");if(x(e))return f(e)}var h,y="",S=!1,k=["{","}"];(d(e)&&(S=!0,k=["[","]"]),E(e))&&(y=" [Function"+(e.name?": "+e.name:"")+"]");return v(e)&&(y=" "+RegExp.prototype.toString.call(e)),w(e)&&(y=" "+Date.prototype.toUTCString.call(e)),x(e)&&(y=" "+f(e)),0!==o.length||S&&0!=e.length?i<0?v(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),h=S?function(t,e,r,i,n){for(var a=[],o=0,s=e.length;o<s;++o)I(e,String(o))?a.push(c(t,e,r,i,String(o),!0)):a.push("");return n.forEach((function(n){n.match(/^\d+$/)||a.push(c(t,e,r,i,n,!0))})),a}(t,e,i,s,o):o.map((function(r){return c(t,e,i,s,r,S)})),t.seen.pop(),function(t,e,r){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(h,y,k)):k[0]+y+k[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function c(t,e,r,i,n,a){var o,s,u;if((u=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),I(i,n)||(o="["+n+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),_(o)){if(a&&n.match(/^\d+$/))return s;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function d(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function m(t){return null===t}function b(t){return"number"==typeof t}function g(t){return"string"==typeof t}function _(t){return void 0===t}function v(t){return y(t)&&"[object RegExp]"===S(t)}function y(t){return"object"==typeof t&&null!==t}function w(t){return y(t)&&"[object Date]"===S(t)}function x(t){return y(t)&&("[object Error]"===S(t)||t instanceof Error)}function E(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(_(a)&&(a=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(a)){var i=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,i,e)}}else o[t]=function(){};return o[t]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=p,r.isNull=m,r.isNullOrUndefined=function(t){return null==t},r.isNumber=b,r.isString=g,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=_,r.isRegExp=v,r.isObject=y,r.isDate=w,r.isError=x,r.isFunction=E,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t("./support/isBuffer");var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var t=new Date,e=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":");return[t.getDate(),M[t.getMonth()],e].join(" ")}function I(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){console.log("%s - %s",A(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!y(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{})},{"./support/isBuffer":27,_process:133,inherits:26}],29:[function(t,e,r){"use strict";r.byteLength=function(t){var e=h(t),r=e[0],i=e[1];return 3*(r+i)/4-i},r.toByteArray=function(t){var e,r,i=h(t),o=i[0],s=i[1],u=new a(function(t,e,r){return 3*(e+r)/4-r}(0,o,s)),l=0,f=s>0?o-4:o;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,a=[],o=16383,s=0,u=r-n;s<u;s+=o)a.push(l(t,s,s+o>u?u:s+o));1===n?(e=t[r-1],a.push(i[e>>2]+i[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],a.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return a.join("")};for(var i=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)i[s]=o[s],n[o.charCodeAt(s)]=s;function h(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var n,a,o=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(i[(a=n)>>18&63]+i[a>>12&63]+i[a>>6&63]+i[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],30:[function(t,e,r){var i=t("./lib/encoder"),n=t("./lib/decoder");e.exports={encode:i,decode:n}},{"./lib/decoder":31,"./lib/encoder":32}],31:[function(t,e,r){(function(t){function r(t,e){if(this.pos=0,this.buffer=t,this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=this.buffer.toString("utf-8",0,this.pos+=2),"BM"!=this.flag)throw new Error("Invalid BMP File");this.parseHeader(),this.parseRGBA()}r.prototype.parseHeader=function(){if(this.fileSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.reserved=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.offset=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.headerSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.width=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.height=this.buffer.readInt32LE(this.pos),this.pos+=4,this.planes=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.bitPP=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.compress=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.rawSize=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.hr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.vr=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.colors=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.importantColors=this.buffer.readUInt32LE(this.pos),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var r=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++);this.palette[e]={red:n,green:i,blue:r,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},r.prototype.parseRGBA=function(){var e="bit"+this.bitPP,r=this.width*this.height*4;this.data=new t(r),this[e]()},r.prototype.bit1=function(){var t=Math.ceil(this.width/8),e=t%4,r=this.height>=0?this.height-1:-this.height;for(r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,n=0;n<t;n++)for(var a=this.buffer.readUInt8(this.pos++),o=i*this.width*4+8*n*4,s=0;s<8&&8*n+s<this.width;s++){var u=this.palette[a>>7-s&1];this.data[o+4*s]=0,this.data[o+4*s+1]=u.blue,this.data[o+4*s+2]=u.green,this.data[o+4*s+3]=u.red}0!=e&&(this.pos+=4-e)}},r.prototype.bit4=function(){if(2==this.compress){this.data.fill(255);for(var t=0,e=this.bottom_up?this.height-1:0,r=!1;t<this.data.length;){var i=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++);if(0==i){if(0==n){this.bottom_up?e--:e++,t=e*this.width*4,r=!1;continue}if(1==n)break;if(2==n){var a=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++);this.bottom_up?e-=o:e+=o,t+=o*this.width*4+4*a}else{for(var s=this.buffer.readUInt8(this.pos++),u=0;u<n;u++)r?h.call(this,15&s):h.call(this,(240&s)>>4),1&u&&u+1<n&&(s=this.buffer.readUInt8(this.pos++)),r=!r;1==(n+1>>1&1)&&this.pos++}}else for(u=0;u<i;u++)r?h.call(this,15&n):h.call(this,(240&n)>>4),r=!r}function h(e){var r=this.palette[e];this.data[t]=0,this.data[t+1]=r.blue,this.data[t+2]=r.green,this.data[t+3]=r.red,t+=4}}else{var l=Math.ceil(this.width/2),f=l%4;for(o=this.height-1;o>=0;o--){var c=this.bottom_up?o:this.height-1-o;for(a=0;a<l;a++){n=this.buffer.readUInt8(this.pos++),t=c*this.width*4+2*a*4;var d=n>>4,p=15&n,m=this.palette[d];if(this.data[t]=0,this.data[t+1]=m.blue,this.data[t+2]=m.green,this.data[t+3]=m.red,2*a+1>=this.width)break;m=this.palette[p],this.data[t+4]=0,this.data[t+4+1]=m.blue,this.data[t+4+2]=m.green,this.data[t+4+3]=m.red}0!=f&&(this.pos+=4-f)}}},r.prototype.bit8=function(){if(1==this.compress){this.data.fill(255);for(var t=0,e=this.bottom_up?this.height-1:0;t<this.data.length;){var r=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++);if(0==r){if(0==i){this.bottom_up?e--:e++,t=e*this.width*4;continue}if(1==i)break;if(2==i){var n=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++);this.bottom_up?e-=a:e+=a,t+=a*this.width*4+4*n}else{for(var o=0;o<i;o++){var s=this.buffer.readUInt8(this.pos++);u.call(this,s)}!0&i&&this.pos++}}else for(o=0;o<r;o++)u.call(this,i)}function u(e){var r=this.palette[e];this.data[t]=0,this.data[t+1]=r.blue,this.data[t+2]=r.green,this.data[t+3]=r.red,t+=4}}else{var h=this.width%4;for(a=this.height-1;a>=0;a--){var l=this.bottom_up?a:this.height-1-a;for(n=0;n<this.width;n++){i=this.buffer.readUInt8(this.pos++),t=l*this.width*4+4*n;if(i<this.palette.length){var f=this.palette[i];this.data[t]=0,this.data[t+1]=f.blue,this.data[t+2]=f.green,this.data[t+3]=f.red}else this.data[t]=0,this.data[t+1]=255,this.data[t+2]=255,this.data[t+3]=255}0!=h&&(this.pos+=4-h)}}},r.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,n=0;n<this.width;n++){var a=this.buffer.readUInt16LE(this.pos);this.pos+=2;var o=(a&e)/e*255|0,s=(a>>5&e)/e*255|0,u=(a>>10&e)/e*255|0,h=a>>15?255:0,l=i*this.width*4+4*n;this.data[l]=h,this.data[l+1]=o,this.data[l+2]=s,this.data[l+3]=u}this.pos+=t}},r.prototype.bit16=function(){var t=this.width%2*2;this.maskRed=31744,this.maskGreen=992,this.maskBlue=31,this.mask0=0,3==this.compress&&(this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4);for(var e=[0,0,0],r=0;r<16;r++)this.maskRed>>r&1&&e[0]++,this.maskGreen>>r&1&&e[1]++,this.maskBlue>>r&1&&e[2]++;e[1]+=e[0],e[2]+=e[1],e[0]=8-e[0],e[1]-=8,e[2]-=8;for(var i=this.height-1;i>=0;i--){for(var n=this.bottom_up?i:this.height-1-i,a=0;a<this.width;a++){var o=this.buffer.readUInt16LE(this.pos);this.pos+=2;var s=(o&this.maskBlue)<<e[0],u=(o&this.maskGreen)>>e[1],h=(o&this.maskRed)>>e[2],l=n*this.width*4+4*a;this.data[l]=0,this.data[l+1]=s,this.data[l+2]=u,this.data[l+3]=h}this.pos+=t}},r.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++),o=e*this.width*4+4*r;this.data[o]=0,this.data[o+1]=i,this.data[o+2]=n,this.data[o+3]=a}this.pos+=this.width%4}},r.prototype.bit32=function(){if(3==this.compress){this.maskRed=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskGreen=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.maskBlue=this.buffer.readUInt32LE(this.pos),this.pos+=4,this.mask0=this.buffer.readUInt32LE(this.pos),this.pos+=4;for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),s=e*this.width*4+4*r;this.data[s]=i,this.data[s+1]=n,this.data[s+2]=a,this.data[s+3]=o}}else for(t=this.height-1;t>=0;t--)for(e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){n=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++),o=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),s=e*this.width*4+4*r;this.data[s]=i,this.data[s+1]=n,this.data[s+2]=a,this.data[s+3]=o}},r.prototype.getData=function(){return this.data},e.exports=function(t){return new r(t)}}).call(this,t("buffer").Buffer)},{buffer:48}],32:[function(t,e,r){(function(t){function r(t){this.buffer=t.data,this.width=t.width,this.height=t.height,this.extraBytes=this.width%4,this.rgbSize=this.height*(3*this.width+this.extraBytes),this.headerInfoSize=40,this.data=[],this.flag="BM",this.reserved=0,this.offset=54,this.fileSize=this.rgbSize+this.offset,this.planes=1,this.bitPP=24,this.compress=0,this.hr=0,this.vr=0,this.colors=0,this.importantColors=0}r.prototype.encode=function(){var e=new t(this.offset+this.rgbSize);this.pos=0,e.write(this.flag,this.pos,2),this.pos+=2,e.writeUInt32LE(this.fileSize,this.pos),this.pos+=4,e.writeUInt32LE(this.reserved,this.pos),this.pos+=4,e.writeUInt32LE(this.offset,this.pos),this.pos+=4,e.writeUInt32LE(this.headerInfoSize,this.pos),this.pos+=4,e.writeUInt32LE(this.width,this.pos),this.pos+=4,e.writeInt32LE(-this.height,this.pos),this.pos+=4,e.writeUInt16LE(this.planes,this.pos),this.pos+=2,e.writeUInt16LE(this.bitPP,this.pos),this.pos+=2,e.writeUInt32LE(this.compress,this.pos),this.pos+=4,e.writeUInt32LE(this.rgbSize,this.pos),this.pos+=4,e.writeUInt32LE(this.hr,this.pos),this.pos+=4,e.writeUInt32LE(this.vr,this.pos),this.pos+=4,e.writeUInt32LE(this.colors,this.pos),this.pos+=4,e.writeUInt32LE(this.importantColors,this.pos),this.pos+=4;for(var r=0,i=3*this.width+this.extraBytes,n=0;n<this.height;n++){for(var a=0;a<this.width;a++){var o=this.pos+n*i+3*a;r++,e[o]=this.buffer[r++],e[o+1]=this.buffer[r++],e[o+2]=this.buffer[r++]}if(this.extraBytes>0){var s=this.pos+n*i+3*this.width;e.fill(0,s,s+this.extraBytes)}}return e},e.exports=function(t,e){return void 0===e&&(e=100),{data:new r(t).encode(),width:t.width,height:t.height}}}).call(this,t("buffer").Buffer)},{buffer:48}],33:[function(t,e,r){},{}],34:[function(t,e,r){(function(e,i){"use strict";var n=t("assert"),a=t("pako/lib/zlib/zstream"),o=t("pako/lib/zlib/deflate.js"),s=t("pako/lib/zlib/inflate.js"),u=t("pako/lib/zlib/constants");for(var h in u)r[h]=u[h];r.NONE=0,r.DEFLATE=1,r.INFLATE=2,r.GZIP=3,r.GUNZIP=4,r.DEFLATERAW=5,r.INFLATERAW=6,r.UNZIP=7;function l(t){if("number"!=typeof t||t<r.DEFLATE||t>r.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}l.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,n(this.init_done,"close before init"),n(this.mode<=r.UNZIP),this.mode===r.DEFLATE||this.mode===r.GZIP||this.mode===r.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==r.INFLATE&&this.mode!==r.GUNZIP&&this.mode!==r.INFLATERAW&&this.mode!==r.UNZIP||s.inflateEnd(this.strm),this.mode=r.NONE,this.dictionary=null)},l.prototype.write=function(t,e,r,i,n,a,o){return this._write(!0,t,e,r,i,n,a,o)},l.prototype.writeSync=function(t,e,r,i,n,a,o){return this._write(!1,t,e,r,i,n,a,o)},l.prototype._write=function(t,a,o,s,u,h,l,f){if(n.equal(arguments.length,8),n(this.init_done,"write before init"),n(this.mode!==r.NONE,"already finalized"),n.equal(!1,this.write_in_progress,"write already in progress"),n.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,n.equal(!1,void 0===a,"must provide flush value"),this.write_in_progress=!0,a!==r.Z_NO_FLUSH&&a!==r.Z_PARTIAL_FLUSH&&a!==r.Z_SYNC_FLUSH&&a!==r.Z_FULL_FLUSH&&a!==r.Z_FINISH&&a!==r.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=i.alloc(0),u=0,s=0),this.strm.avail_in=u,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=f,this.strm.output=h,this.strm.next_out=l,this.flush=a,!t)return this._process(),this._checkError()?this._afterSync():void 0;var c=this;return e.nextTick((function(){c._process(),c._after()})),this},l.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},l.prototype._process=function(){var t=null;switch(this.mode){case r.DEFLATE:case r.GZIP:case r.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case r.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(31!==this.strm.input[t]){this.mode=r.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=r.GUNZIP):this.mode=r.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case r.INFLATE:case r.GUNZIP:case r.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===r.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===r.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===r.Z_DATA_ERROR&&(this.err=r.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===r.GUNZIP&&this.err===r.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},l.prototype._checkError=function(){switch(this.err){case r.Z_OK:case r.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===r.Z_FINISH)return this._error("unexpected end of file"),!1;break;case r.Z_STREAM_END:break;case r.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},l.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},l.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},l.prototype.init=function(t,e,i,a,o){n(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),n(t>=8&&t<=15,"invalid windowBits"),n(e>=-1&&e<=9,"invalid compression level"),n(i>=1&&i<=9,"invalid memlevel"),n(a===r.Z_FILTERED||a===r.Z_HUFFMAN_ONLY||a===r.Z_RLE||a===r.Z_FIXED||a===r.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(e,t,i,a,o),this._setDictionary()},l.prototype.params=function(){throw new Error("deflateParams Not supported")},l.prototype.reset=function(){this._reset(),this._setDictionary()},l.prototype._init=function(t,e,i,n,u){switch(this.level=t,this.windowBits=e,this.memLevel=i,this.strategy=n,this.flush=r.Z_NO_FLUSH,this.err=r.Z_OK,this.mode!==r.GZIP&&this.mode!==r.GUNZIP||(this.windowBits+=16),this.mode===r.UNZIP&&(this.windowBits+=32),this.mode!==r.DEFLATERAW&&this.mode!==r.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case r.DEFLATE:case r.GZIP:case r.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,r.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case r.INFLATE:case r.GUNZIP:case r.INFLATERAW:case r.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==r.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},l.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=r.Z_OK,this.mode){case r.DEFLATE:case r.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==r.Z_OK&&this._error("Failed to set dictionary")}},l.prototype._reset=function(){switch(this.err=r.Z_OK,this.mode){case r.DEFLATE:case r.DEFLATERAW:case r.GZIP:this.err=o.deflateReset(this.strm);break;case r.INFLATE:case r.INFLATERAW:case r.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==r.Z_OK&&this._error("Failed to reset stream")},r.Zlib=l}).call(this,t("_process"),t("buffer").Buffer)},{_process:133,assert:25,buffer:48,"pako/lib/zlib/constants":38,"pako/lib/zlib/deflate.js":40,"pako/lib/zlib/inflate.js":42,"pako/lib/zlib/zstream":46}],35:[function(t,e,r){(function(e){"use strict";var i=t("buffer").Buffer,n=t("stream").Transform,a=t("./binding"),o=t("util"),s=t("assert").ok,u=t("buffer").kMaxLength,h="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var l=Object.keys(a),f=0;f<l.length;f++){var c=l[f];c.match(/^Z/)&&Object.defineProperty(r,c,{enumerable:!0,value:a[c],writable:!1})}for(var d={Z_OK:a.Z_OK,Z_STREAM_END:a.Z_STREAM_END,Z_NEED_DICT:a.Z_NEED_DICT,Z_ERRNO:a.Z_ERRNO,Z_STREAM_ERROR:a.Z_STREAM_ERROR,Z_DATA_ERROR:a.Z_DATA_ERROR,Z_MEM_ERROR:a.Z_MEM_ERROR,Z_BUF_ERROR:a.Z_BUF_ERROR,Z_VERSION_ERROR:a.Z_VERSION_ERROR},p=Object.keys(d),m=0;m<p.length;m++){var b=p[m];d[d[b]]=b}function g(t,e,r){var n=[],a=0;function o(){for(var e;null!==(e=t.read());)n.push(e),a+=e.length;t.once("readable",o)}function s(){var e,o=null;a>=u?o=new RangeError(h):e=i.concat(n,a),n=[],t.close(),r(o,e)}t.on("error",(function(e){t.removeListener("end",s),t.removeListener("readable",o),r(e)})),t.on("end",s),t.end(e),o()}function _(t,e){if("string"==typeof e&&(e=i.from(e)),!i.isBuffer(e))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return t._processChunk(e,r)}function v(t){if(!(this instanceof v))return new v(t);A.call(this,t,a.DEFLATE)}function y(t){if(!(this instanceof y))return new y(t);A.call(this,t,a.INFLATE)}function w(t){if(!(this instanceof w))return new w(t);A.call(this,t,a.GZIP)}function x(t){if(!(this instanceof x))return new x(t);A.call(this,t,a.GUNZIP)}function E(t){if(!(this instanceof E))return new E(t);A.call(this,t,a.DEFLATERAW)}function S(t){if(!(this instanceof S))return new S(t);A.call(this,t,a.INFLATERAW)}function k(t){if(!(this instanceof k))return new k(t);A.call(this,t,a.UNZIP)}function M(t){return t===a.Z_NO_FLUSH||t===a.Z_PARTIAL_FLUSH||t===a.Z_SYNC_FLUSH||t===a.Z_FULL_FLUSH||t===a.Z_FINISH||t===a.Z_BLOCK}function A(t,e){var o=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||r.Z_DEFAULT_CHUNK,n.call(this,t),t.flush&&!M(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!M(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==t.finishFlush?t.finishFlush:a.Z_FINISH,t.chunkSize&&(t.chunkSize<r.Z_MIN_CHUNK||t.chunkSize>r.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<r.Z_MIN_WINDOWBITS||t.windowBits>r.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<r.Z_MIN_LEVEL||t.level>r.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<r.Z_MIN_MEMLEVEL||t.memLevel>r.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=r.Z_FILTERED&&t.strategy!=r.Z_HUFFMAN_ONLY&&t.strategy!=r.Z_RLE&&t.strategy!=r.Z_FIXED&&t.strategy!=r.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!i.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(e);var s=this;this._hadError=!1,this._handle.onerror=function(t,e){I(s),s._hadError=!0;var i=new Error(t);i.errno=e,i.code=r.codes[e],s.emit("error",i)};var u=r.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(u=t.level);var h=r.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(h=t.strategy),this._handle.init(t.windowBits||r.Z_DEFAULT_WINDOWBITS,u,t.memLevel||r.Z_DEFAULT_MEMLEVEL,h,t.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=h,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!o._handle},configurable:!0,enumerable:!0})}function I(t,r){r&&e.nextTick(r),t._handle&&(t._handle.close(),t._handle=null)}function T(t){t.emit("close")}Object.defineProperty(r,"codes",{enumerable:!0,value:Object.freeze(d),writable:!1}),r.Deflate=v,r.Inflate=y,r.Gzip=w,r.Gunzip=x,r.DeflateRaw=E,r.InflateRaw=S,r.Unzip=k,r.createDeflate=function(t){return new v(t)},r.createInflate=function(t){return new y(t)},r.createDeflateRaw=function(t){return new E(t)},r.createInflateRaw=function(t){return new S(t)},r.createGzip=function(t){return new w(t)},r.createGunzip=function(t){return new x(t)},r.createUnzip=function(t){return new k(t)},r.deflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new v(e),t,r)},r.deflateSync=function(t,e){return _(new v(e),t)},r.gzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new w(e),t,r)},r.gzipSync=function(t,e){return _(new w(e),t)},r.deflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new E(e),t,r)},r.deflateRawSync=function(t,e){return _(new E(e),t)},r.unzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new k(e),t,r)},r.unzipSync=function(t,e){return _(new k(e),t)},r.inflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new y(e),t,r)},r.inflateSync=function(t,e){return _(new y(e),t)},r.gunzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new x(e),t,r)},r.gunzipSync=function(t,e){return _(new x(e),t)},r.inflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new S(e),t,r)},r.inflateRawSync=function(t,e){return _(new S(e),t)},o.inherits(A,n),A.prototype.params=function(t,i,n){if(t<r.Z_MIN_LEVEL||t>r.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+t);if(i!=r.Z_FILTERED&&i!=r.Z_HUFFMAN_ONLY&&i!=r.Z_RLE&&i!=r.Z_FIXED&&i!=r.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+i);if(this._level!==t||this._strategy!==i){var o=this;this.flush(a.Z_SYNC_FLUSH,(function(){s(o._handle,"zlib binding closed"),o._handle.params(t,i),o._hadError||(o._level=t,o._strategy=i,n&&n())}))}else e.nextTick(n)},A.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},A.prototype._flush=function(t){this._transform(i.alloc(0),"",t)},A.prototype.flush=function(t,r){var n=this,o=this._writableState;("function"==typeof t||void 0===t&&!r)&&(r=t,t=a.Z_FULL_FLUSH),o.ended?r&&e.nextTick(r):o.ending?r&&this.once("end",r):o.needDrain?r&&this.once("drain",(function(){return n.flush(t,r)})):(this._flushFlag=t,this.write(i.alloc(0),"",r))},A.prototype.close=function(t){I(this,t),e.nextTick(T,this)},A.prototype._transform=function(t,e,r){var n,o=this._writableState,s=(o.ending||o.ended)&&(!t||o.length===t.length);return null===t||i.isBuffer(t)?this._handle?(s?n=this._finishFlushFlag:(n=this._flushFlag,t.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(t,n,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},A.prototype._processChunk=function(t,e,r){var n=t&&t.length,a=this._chunkSize-this._offset,o=0,l=this,f="function"==typeof r;if(!f){var c,d=[],p=0;this.on("error",(function(t){c=t})),s(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(e,t,o,n,this._buffer,this._offset,a)}while(!this._hadError&&_(m[0],m[1]));if(this._hadError)throw c;if(p>=u)throw I(this),new RangeError(h);var b=i.concat(d,p);return I(this),b}s(this._handle,"zlib binding closed");var g=this._handle.write(e,t,o,n,this._buffer,this._offset,a);function _(u,h){if(this&&(this.buffer=null,this.callback=null),!l._hadError){var c=a-h;if(s(c>=0,"have should not go down"),c>0){var m=l._buffer.slice(l._offset,l._offset+c);l._offset+=c,f?l.push(m):(d.push(m),p+=m.length)}if((0===h||l._offset>=l._chunkSize)&&(a=l._chunkSize,l._offset=0,l._buffer=i.allocUnsafe(l._chunkSize)),0===h){if(o+=n-u,n=u,!f)return!0;var b=l._handle.write(e,t,o,n,l._buffer,l._offset,l._chunkSize);return b.callback=_,void(b.buffer=t)}if(!f)return!1;r()}}g.buffer=t,g.callback=_},o.inherits(v,A),o.inherits(y,A),o.inherits(w,A),o.inherits(x,A),o.inherits(E,A),o.inherits(S,A),o.inherits(k,A)}).call(this,t("_process"))},{"./binding":34,_process:133,assert:25,buffer:48,stream:155,util:186}],36:[function(t,e,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}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 i in r)n(r,i)&&(t[i]=r[i])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var a={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+i),n);else for(var a=0;a<i;a++)t[n+a]=e[r+a]},flattenChunks:function(t){var e,r,i,n,a,o;for(i=0,e=0,r=t.length;e<r;e++)i+=t[e].length;for(o=new Uint8Array(i),n=0,e=0,r=t.length;e<r;e++)a=t[e],o.set(a,n),n+=a.length;return o}},o={arraySet:function(t,e,r,i,n){for(var a=0;a<i;a++)t[n+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,a)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(i)},{}],37:[function(t,e,r){"use strict";e.exports=function(t,e,r,i){for(var n=65535&t|0,a=t>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(n=n+e[i++]|0)|0}while(--o);n%=65521,a%=65521}return n|a<<16|0}},{}],38:[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}},{}],39:[function(t,e,r){"use strict";var i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,n){var a=i,o=n+r;t^=-1;for(var s=n;s<o;s++)t=t>>>8^a[255&(t^e[s])];return-1^t}},{}],40:[function(t,e,r){"use strict";var i,n=t("../utils/common"),a=t("./trees"),o=t("./adler32"),s=t("./crc32"),u=t("./messages"),h=-2,l=258,f=262,c=103,d=113,p=666;function m(t,e){return t.msg=u[e],e}function b(t){return(t<<1)-(t>4?9:0)}function g(t){for(var e=t.length;--e>=0;)t[e]=0}function _(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(n.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 v(t,e){a._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,_(t.strm)}function y(t,e){t.pending_buf[t.pending++]=e}function w(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function x(t,e){var r,i,n=t.max_chain_length,a=t.strstart,o=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-f?t.strstart-(t.w_size-f):0,h=t.window,c=t.w_mask,d=t.prev,p=t.strstart+l,m=h[a+o-1],b=h[a+o];t.prev_length>=t.good_match&&(n>>=2),s>t.lookahead&&(s=t.lookahead);do{if(h[(r=e)+o]===b&&h[r+o-1]===m&&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]&&a<p);if(i=l-(p-a),a=p-l,i>o){if(t.match_start=e,o=i,i>=s)break;m=h[a+o-1],b=h[a+o]}}}while((e=d[e&c])>u&&0!=--n);return o<=t.lookahead?o:t.lookahead}function E(t){var e,r,i,a,u,h,l,c,d,p,m=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-f)){n.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=r=t.hash_size;do{i=t.head[--e],t.head[e]=i>=m?i-m:0}while(--r);e=r=m;do{i=t.prev[--e],t.prev[e]=i>=m?i-m:0}while(--r);a+=m}if(0===t.strm.avail_in)break;if(h=t.strm,l=t.window,c=t.strstart+t.lookahead,d=a,p=void 0,(p=h.avail_in)>d&&(p=d),r=0===p?0:(h.avail_in-=p,n.arraySet(l,h.input,h.next_in,p,c),1===h.state.wrap?h.adler=o(h.adler,l,p,c):2===h.state.wrap&&(h.adler=s(h.adler,l,p,c)),h.next_in+=p,h.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+3-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<f&&0!==t.strm.avail_in)}function S(t,e){for(var r,i;;){if(t.lookahead<f){if(E(t),t.lookahead<f&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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-f&&(t.match_length=x(t,r)),t.match_length>=3)if(i=a._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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 i=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}function k(t,e){for(var r,i,n;;){if(t.lookahead<f){if(E(t),t.lookahead<f&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-f&&(t.match_length=x(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=a._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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=2,t.strstart++,i&&(v(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((i=a._tr_tally(t,0,t.window[t.strstart-1]))&&v(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=a._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}function M(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}function A(){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=8,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 n.Buf16(1146),this.dyn_dtree=new n.Buf16(122),this.bl_tree=new n.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(16),this.heap=new n.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(573),g(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 I(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:d,t.adler=2===e.wrap?0:1,e.last_flush=0,a._tr_init(e),0):m(t,h)}function T(t){var e,r=I(t);return 0===r&&((e=t.state).window_size=2*e.w_size,g(e.head),e.max_lazy_match=i[e.level].max_lazy,e.good_match=i[e.level].good_length,e.nice_match=i[e.level].nice_length,e.max_chain_length=i[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),r}function R(t,e,r,i,a,o){if(!t)return h;var s=1;if(-1===e&&(e=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),a<1||a>9||8!==r||i<8||i>15||e<0||e>9||o<0||o>4)return m(t,h);8===i&&(i=9);var u=new A;return t.state=u,u.strm=t,u.wrap=s,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+3-1)/3),u.window=new n.Buf8(2*u.w_size),u.head=new n.Buf16(u.hash_size),u.prev=new n.Buf16(u.w_size),u.lit_bufsize=1<<a+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new n.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=o,u.method=r,T(t)}i=[new M(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(E(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,v(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-f&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(v(t,!1),t.strm.avail_out),1)})),new M(4,4,8,4,S),new M(4,5,16,8,S),new M(4,6,32,32,S),new M(4,4,16,16,k),new M(8,16,32,32,k),new M(8,16,128,128,k),new M(8,32,128,256,k),new M(32,128,258,1024,k),new M(32,258,258,4096,k)],r.deflateInit=function(t,e){return R(t,e,8,15,8,0)},r.deflateInit2=R,r.deflateReset=T,r.deflateResetKeep=I,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?h:(t.state.gzhead=e,0):h},r.deflate=function(t,e){var r,n,o,u;if(!t||!t.state||e>5||e<0)return t?m(t,h):h;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||n.status===p&&4!==e)return m(t,0===t.avail_out?-5:h);if(n.strm=t,r=n.last_flush,n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,y(n,31),y(n,139),y(n,8),n.gzhead?(y(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),y(n,255&n.gzhead.time),y(n,n.gzhead.time>>8&255),y(n,n.gzhead.time>>16&255),y(n,n.gzhead.time>>24&255),y(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),y(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(y(n,255&n.gzhead.extra.length),y(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=s(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(y(n,0),y(n,0),y(n,0),y(n,0),y(n,0),y(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),y(n,3),n.status=d);else{var f=8+(n.w_bits-8<<4)<<8;f|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(f|=32),f+=31-f%31,n.status=d,w(n,f),0!==n.strstart&&(w(n,t.adler>>>16),w(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),_(t),o=n.pending,n.pending!==n.pending_buf_size));)y(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),_(t),o=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,y(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),0===u&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),_(t),o=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,y(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),0===u&&(n.status=c)}else n.status=c;if(n.status===c&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&_(t),n.pending+2<=n.pending_buf_size&&(y(n,255&t.adler),y(n,t.adler>>8&255),t.adler=0,n.status=d)):n.status=d),0!==n.pending){if(_(t),0===t.avail_out)return n.last_flush=-1,0}else if(0===t.avail_in&&b(e)<=b(r)&&4!==e)return m(t,-5);if(n.status===p&&0!==t.avail_in)return m(t,-5);if(0!==t.avail_in||0!==n.lookahead||0!==e&&n.status!==p){var x=2===n.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(E(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(n,e):3===n.strategy?function(t,e){for(var r,i,n,o,s=t.window;;){if(t.lookahead<=l){if(E(t),t.lookahead<=l&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=s[n=t.strstart-1])===s[++n]&&i===s[++n]&&i===s[++n]){o=t.strstart+l;do{}while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&n<o);t.match_length=l-(o-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=a._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(n,e):i[n.level].func(n,e);if(3!==x&&4!==x||(n.status=p),1===x||3===x)return 0===t.avail_out&&(n.last_flush=-1),0;if(2===x&&(1===e?a._tr_align(n):5!==e&&(a._tr_stored_block(n,0,0,!1),3===e&&(g(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),_(t),0===t.avail_out))return n.last_flush=-1,0}return 4!==e?0:n.wrap<=0?1:(2===n.wrap?(y(n,255&t.adler),y(n,t.adler>>8&255),y(n,t.adler>>16&255),y(n,t.adler>>24&255),y(n,255&t.total_in),y(n,t.total_in>>8&255),y(n,t.total_in>>16&255),y(n,t.total_in>>24&255)):(w(n,t.adler>>>16),w(n,65535&t.adler)),_(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?0:1)},r.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==c&&e!==d&&e!==p?m(t,h):(t.state=null,e===d?m(t,-3):0):h},r.deflateSetDictionary=function(t,e){var r,i,a,s,u,l,f,c,d=e.length;if(!t||!t.state)return h;if(2===(s=(r=t.state).wrap)||1===s&&42!==r.status||r.lookahead)return h;for(1===s&&(t.adler=o(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(g(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new n.Buf8(r.w_size),n.arraySet(c,e,d-r.w_size,r.w_size,0),e=c,d=r.w_size),u=t.avail_in,l=t.next_in,f=t.input,t.avail_in=d,t.next_in=0,t.input=e,E(r);r.lookahead>=3;){i=r.strstart,a=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+3-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++}while(--a);r.strstart=i,r.lookahead=2,E(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=l,t.input=f,t.avail_in=u,r.wrap=s,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":36,"./adler32":37,"./crc32":39,"./messages":44,"./trees":45}],41:[function(t,e,r){"use strict";e.exports=function(t,e){var r,i,n,a,o,s,u,h,l,f,c,d,p,m,b,g,_,v,y,w,x,E,S,k,M;r=t.state,i=t.next_in,k=t.input,n=i+(t.avail_in-5),a=t.next_out,M=t.output,o=a-(e-t.avail_out),s=a+(t.avail_out-257),u=r.dmax,h=r.wsize,l=r.whave,f=r.wnext,c=r.window,d=r.hold,p=r.bits,m=r.lencode,b=r.distcode,g=(1<<r.lenbits)-1,_=(1<<r.distbits)-1;t:do{p<15&&(d+=k[i++]<<p,p+=8,d+=k[i++]<<p,p+=8),v=m[d&g];e:for(;;){if(d>>>=y=v>>>24,p-=y,0===(y=v>>>16&255))M[a++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<<y)-1)];continue e}if(32&y){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}w=65535&v,(y&=15)&&(p<y&&(d+=k[i++]<<p,p+=8),w+=d&(1<<y)-1,d>>>=y,p-=y),p<15&&(d+=k[i++]<<p,p+=8,d+=k[i++]<<p,p+=8),v=b[d&_];r:for(;;){if(d>>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=b[(65535&v)+(d&(1<<y)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(x=65535&v,p<(y&=15)&&(d+=k[i++]<<p,(p+=8)<y&&(d+=k[i++]<<p,p+=8)),(x+=d&(1<<y)-1)>u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=y,p-=y,x>(y=a-o)){if((y=x-y)>l&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(E=0,S=c,0===f){if(E+=h-y,y<w){w-=y;do{M[a++]=c[E++]}while(--y);E=a-x,S=M}}else if(f<y){if(E+=h+f-y,(y-=f)<w){w-=y;do{M[a++]=c[E++]}while(--y);if(E=0,f<w){w-=y=f;do{M[a++]=c[E++]}while(--y);E=a-x,S=M}}}else if(E+=f-y,y<w){w-=y;do{M[a++]=c[E++]}while(--y);E=a-x,S=M}for(;w>2;)M[a++]=S[E++],M[a++]=S[E++],M[a++]=S[E++],w-=3;w&&(M[a++]=S[E++],w>1&&(M[a++]=S[E++]))}else{E=a-x;do{M[a++]=M[E++],M[a++]=M[E++],M[a++]=M[E++],w-=3}while(w>2);w&&(M[a++]=M[E++],w>1&&(M[a++]=M[E++]))}break}}break}}while(i<n&&a<s);i-=w=p>>3,d&=(1<<(p-=w<<3))-1,t.next_in=i,t.next_out=a,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=a<s?s-a+257:257-(a-s),r.hold=d,r.bits=p}},{}],42:[function(t,e,r){"use strict";var i=t("../utils/common"),n=t("./adler32"),a=t("./crc32"),o=t("./inffast"),s=t("./inftrees"),u=-2,h=12,l=30;function f(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function c(){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 i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(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=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):u}function p(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,d(t)):u}function m(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?u:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,p(t))):u}function b(t,e){var r,i;return t?(i=new c,t.state=i,i.window=null,0!==(r=m(t,e))&&(t.state=null),r):u}var g,_,v=!0;function y(t){if(v){var e;for(g=new i.Buf32(512),_=new i.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(1,t.lens,0,288,g,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(2,t.lens,0,32,_,0,t.work,{bits:5}),v=!1}t.lencode=g,t.lenbits=9,t.distcode=_,t.distbits=5}function w(t,e,r,n){var a,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new i.Buf8(o.wsize)),n>=o.wsize?(i.arraySet(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>n&&(a=n),i.arraySet(o.window,e,r-n,a,o.wnext),(n-=a)?(i.arraySet(o.window,e,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}r.inflateReset=p,r.inflateReset2=m,r.inflateResetKeep=d,r.inflateInit=function(t){return b(t,15)},r.inflateInit2=b,r.inflate=function(t,e){var r,c,d,p,m,b,g,_,v,x,E,S,k,M,A,I,T,R,P,C,O,L,B,D,N=0,z=new i.Buf8(4),j=[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 u;(r=t.state).mode===h&&(r.mode=13),m=t.next_out,d=t.output,g=t.avail_out,p=t.next_in,c=t.input,b=t.avail_in,_=r.hold,v=r.bits,x=b,E=g,L=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;v<16;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}if(2&r.wrap&&35615===_){r.check=0,z[0]=255&_,z[1]=_>>>8&255,r.check=a(r.check,z,2,0),_=0,v=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&_)<<8)+(_>>8))%31){t.msg="incorrect header check",r.mode=l;break}if(8!=(15&_)){t.msg="unknown compression method",r.mode=l;break}if(v-=4,O=8+(15&(_>>>=4)),0===r.wbits)r.wbits=O;else if(O>r.wbits){t.msg="invalid window size",r.mode=l;break}r.dmax=1<<O,t.adler=r.check=1,r.mode=512&_?10:h,_=0,v=0;break;case 2:for(;v<16;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}if(r.flags=_,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=l;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=l;break}r.head&&(r.head.text=_>>8&1),512&r.flags&&(z[0]=255&_,z[1]=_>>>8&255,r.check=a(r.check,z,2,0)),_=0,v=0,r.mode=3;case 3:for(;v<32;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}r.head&&(r.head.time=_),512&r.flags&&(z[0]=255&_,z[1]=_>>>8&255,z[2]=_>>>16&255,z[3]=_>>>24&255,r.check=a(r.check,z,4,0)),_=0,v=0,r.mode=4;case 4:for(;v<16;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}r.head&&(r.head.xflags=255&_,r.head.os=_>>8),512&r.flags&&(z[0]=255&_,z[1]=_>>>8&255,r.check=a(r.check,z,2,0)),_=0,v=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}r.length=_,r.head&&(r.head.extra_len=_),512&r.flags&&(z[0]=255&_,z[1]=_>>>8&255,r.check=a(r.check,z,2,0)),_=0,v=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((S=r.length)>b&&(S=b),S&&(r.head&&(O=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),i.arraySet(r.head.extra,c,p,S,O)),512&r.flags&&(r.check=a(r.check,c,S,p)),b-=S,p+=S,r.length-=S),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===b)break t;S=0;do{O=c[p+S++],r.head&&O&&r.length<65536&&(r.head.name+=String.fromCharCode(O))}while(O&&S<b);if(512&r.flags&&(r.check=a(r.check,c,S,p)),b-=S,p+=S,O)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===b)break t;S=0;do{O=c[p+S++],r.head&&O&&r.length<65536&&(r.head.comment+=String.fromCharCode(O))}while(O&&S<b);if(512&r.flags&&(r.check=a(r.check,c,S,p)),b-=S,p+=S,O)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;v<16;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}if(_!==(65535&r.check)){t.msg="header crc mismatch",r.mode=l;break}_=0,v=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=h;break;case 10:for(;v<32;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}t.adler=r.check=f(_),_=0,v=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=m,t.avail_out=g,t.next_in=p,t.avail_in=b,r.hold=_,r.bits=v,2;t.adler=r.check=1,r.mode=h;case h:if(5===e||6===e)break t;case 13:if(r.last){_>>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}switch(r.last=1&_,v-=1,3&(_>>>=1)){case 0:r.mode=14;break;case 1:if(y(r),r.mode=20,6===e){_>>>=2,v-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=l}_>>>=2,v-=2;break;case 14:for(_>>>=7&v,v-=7&v;v<32;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}if((65535&_)!=(_>>>16^65535)){t.msg="invalid stored block lengths",r.mode=l;break}if(r.length=65535&_,_=0,v=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(S=r.length){if(S>b&&(S=b),S>g&&(S=g),0===S)break t;i.arraySet(d,c,p,S,m),b-=S,p+=S,g-=S,m+=S,r.length-=S;break}r.mode=h;break;case 17:for(;v<14;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}if(r.nlen=257+(31&_),_>>>=5,v-=5,r.ndist=1+(31&_),_>>>=5,v-=5,r.ncode=4+(15&_),_>>>=4,v-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=l;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;v<3;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}r.lens[j[r.have++]]=7&_,_>>>=3,v-=3}for(;r.have<19;)r.lens[j[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,B={bits:r.lenbits},L=s(0,r.lens,0,19,r.lencode,0,r.work,B),r.lenbits=B.bits,L){t.msg="invalid code lengths set",r.mode=l;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;I=(N=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,T=65535&N,!((A=N>>>24)<=v);){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}if(T<16)_>>>=A,v-=A,r.lens[r.have++]=T;else{if(16===T){for(D=A+2;v<D;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}if(_>>>=A,v-=A,0===r.have){t.msg="invalid bit length repeat",r.mode=l;break}O=r.lens[r.have-1],S=3+(3&_),_>>>=2,v-=2}else if(17===T){for(D=A+3;v<D;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}v-=A,O=0,S=3+(7&(_>>>=A)),_>>>=3,v-=3}else{for(D=A+7;v<D;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}v-=A,O=0,S=11+(127&(_>>>=A)),_>>>=7,v-=7}if(r.have+S>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=l;break}for(;S--;)r.lens[r.have++]=O}}if(r.mode===l)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=l;break}if(r.lenbits=9,B={bits:r.lenbits},L=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,B),r.lenbits=B.bits,L){t.msg="invalid literal/lengths set",r.mode=l;break}if(r.distbits=6,r.distcode=r.distdyn,B={bits:r.distbits},L=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,B),r.distbits=B.bits,L){t.msg="invalid distances set",r.mode=l;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(b>=6&&g>=258){t.next_out=m,t.avail_out=g,t.next_in=p,t.avail_in=b,r.hold=_,r.bits=v,o(t,E),m=t.next_out,d=t.output,g=t.avail_out,p=t.next_in,c=t.input,b=t.avail_in,_=r.hold,v=r.bits,r.mode===h&&(r.back=-1);break}for(r.back=0;I=(N=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,T=65535&N,!((A=N>>>24)<=v);){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}if(I&&0==(240&I)){for(R=A,P=I,C=T;I=(N=r.lencode[C+((_&(1<<R+P)-1)>>R)])>>>16&255,T=65535&N,!(R+(A=N>>>24)<=v);){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}_>>>=R,v-=R,r.back+=R}if(_>>>=A,v-=A,r.back+=A,r.length=T,0===I){r.mode=26;break}if(32&I){r.back=-1,r.mode=h;break}if(64&I){t.msg="invalid literal/length code",r.mode=l;break}r.extra=15&I,r.mode=22;case 22:if(r.extra){for(D=r.extra;v<D;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}r.length+=_&(1<<r.extra)-1,_>>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;I=(N=r.distcode[_&(1<<r.distbits)-1])>>>16&255,T=65535&N,!((A=N>>>24)<=v);){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}if(0==(240&I)){for(R=A,P=I,C=T;I=(N=r.distcode[C+((_&(1<<R+P)-1)>>R)])>>>16&255,T=65535&N,!(R+(A=N>>>24)<=v);){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}_>>>=R,v-=R,r.back+=R}if(_>>>=A,v-=A,r.back+=A,64&I){t.msg="invalid distance code",r.mode=l;break}r.offset=T,r.extra=15&I,r.mode=24;case 24:if(r.extra){for(D=r.extra;v<D;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}r.offset+=_&(1<<r.extra)-1,_>>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=l;break}r.mode=25;case 25:if(0===g)break t;if(S=E-g,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=l;break}S>r.wnext?(S-=r.wnext,k=r.wsize-S):k=r.wnext-S,S>r.length&&(S=r.length),M=r.window}else M=d,k=m-r.offset,S=r.length;S>g&&(S=g),g-=S,r.length-=S;do{d[m++]=M[k++]}while(--S);0===r.length&&(r.mode=21);break;case 26:if(0===g)break t;d[m++]=r.length,g--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===b)break t;b--,_|=c[p++]<<v,v+=8}if(E-=g,t.total_out+=E,r.total+=E,E&&(t.adler=r.check=r.flags?a(r.check,d,E,m-E):n(r.check,d,E,m-E)),E=g,(r.flags?_:f(_))!==r.check){t.msg="incorrect data check",r.mode=l;break}_=0,v=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;v<32;){if(0===b)break t;b--,_+=c[p++]<<v,v+=8}if(_!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=l;break}_=0,v=0}r.mode=29;case 29:L=1;break t;case l:L=-3;break t;case 31:return-4;case 32:default:return u}return t.next_out=m,t.avail_out=g,t.next_in=p,t.avail_in=b,r.hold=_,r.bits=v,(r.wsize||E!==t.avail_out&&r.mode<l&&(r.mode<27||4!==e))&&w(t,t.output,t.next_out,E-t.avail_out)?(r.mode=31,-4):(x-=t.avail_in,E-=t.avail_out,t.total_in+=x,t.total_out+=E,r.total+=E,r.wrap&&E&&(t.adler=r.check=r.flags?a(r.check,d,E,t.next_out-E):n(r.check,d,E,t.next_out-E)),t.data_type=r.bits+(r.last?64:0)+(r.mode===h?128:0)+(20===r.mode||15===r.mode?256:0),(0===x&&0===E||4===e)&&0===L&&(L=-5),L)},r.inflateEnd=function(t){if(!t||!t.state)return u;var e=t.state;return e.window&&(e.window=null),t.state=null,0},r.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?u:(r.head=e,e.done=!1,0):u},r.inflateSetDictionary=function(t,e){var r,i=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?u:11===r.mode&&n(1,e,i,0)!==r.check?-3:w(t,e,i,i)?(r.mode=31,-4):(r.havedict=1,0):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":36,"./adler32":37,"./crc32":39,"./inffast":41,"./inftrees":43}],43:[function(t,e,r){"use strict";var i=t("../utils/common"),n=15,a=[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],o=[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],s=[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],u=[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,h,l,f,c,d){var p,m,b,g,_,v,y,w,x,E=d.bits,S=0,k=0,M=0,A=0,I=0,T=0,R=0,P=0,C=0,O=0,L=null,B=0,D=new i.Buf16(16),N=new i.Buf16(16),z=null,j=0;for(S=0;S<=n;S++)D[S]=0;for(k=0;k<h;k++)D[e[r+k]]++;for(I=E,A=n;A>=1&&0===D[A];A--);if(I>A&&(I=A),0===A)return l[f++]=20971520,l[f++]=20971520,d.bits=1,0;for(M=1;M<A&&0===D[M];M++);for(I<M&&(I=M),P=1,S=1;S<=n;S++)if(P<<=1,(P-=D[S])<0)return-1;if(P>0&&(0===t||1!==A))return-1;for(N[1]=0,S=1;S<n;S++)N[S+1]=N[S]+D[S];for(k=0;k<h;k++)0!==e[r+k]&&(c[N[e[r+k]]++]=k);if(0===t?(L=z=c,v=19):1===t?(L=a,B-=257,z=o,j-=257,v=256):(L=s,z=u,v=-1),O=0,k=0,S=M,_=f,T=I,R=0,b=-1,g=(C=1<<I)-1,1===t&&C>852||2===t&&C>592)return 1;for(;;){y=S-R,c[k]<v?(w=0,x=c[k]):c[k]>v?(w=z[j+c[k]],x=L[B+c[k]]):(w=96,x=0),p=1<<S-R,M=m=1<<T;do{l[_+(O>>R)+(m-=p)]=y<<24|w<<16|x|0}while(0!==m);for(p=1<<S-1;O&p;)p>>=1;if(0!==p?(O&=p-1,O+=p):O=0,k++,0==--D[S]){if(S===A)break;S=e[r+c[k]]}if(S>I&&(O&g)!==b){for(0===R&&(R=I),_+=M,P=1<<(T=S-R);T+R<A&&!((P-=D[T+R])<=0);)T++,P<<=1;if(C+=1<<T,1===t&&C>852||2===t&&C>592)return 1;l[b=O&g]=I<<24|T<<16|_-f|0}}return 0!==O&&(l[_+O]=S-R<<24|64<<16|0),d.bits=I,0}},{"../utils/common":36}],44:[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"}},{}],45:[function(t,e,r){"use strict";var i=t("../utils/common");function n(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,o=286,s=30,u=15,h=[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],l=[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],f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);n(d);var p=new Array(60);n(p);var m=new Array(512);n(m);var b=new Array(256);n(b);var g=new Array(29);n(g);var _,v,y,w=new Array(s);function x(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function E(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function S(t){return t<256?m[t]:m[256+(t>>>7)]}function k(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function M(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,k(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function A(t,e,r){M(t,r[2*e],r[2*e+1])}function I(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function T(t,e,r){var i,n,a=new Array(16),o=0;for(i=1;i<=u;i++)a[i]=o=o+r[i-1]<<1;for(n=0;n<=e;n++){var s=t[2*n+1];0!==s&&(t[2*n]=I(a[s]++,s))}}function R(t){var e;for(e=0;e<o;e++)t.dyn_ltree[2*e]=0;for(e=0;e<s;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function P(t){t.bi_valid>8?k(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 C(t,e,r,i){var n=2*e,a=2*r;return t[n]<t[a]||t[n]===t[a]&&i[e]<=i[r]}function O(t,e,r){for(var i=t.heap[r],n=r<<1;n<=t.heap_len&&(n<t.heap_len&&C(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!C(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i}function L(t,e,r){var i,n,o,s,u=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*u]<<8|t.pending_buf[t.d_buf+2*u+1],n=t.pending_buf[t.l_buf+u],u++,0===i?A(t,n,e):(A(t,(o=b[n])+a+1,e),0!==(s=h[o])&&M(t,n-=g[o],s),A(t,o=S(--i),r),0!==(s=l[o])&&M(t,i-=w[o],s))}while(u<t.last_lit);A(t,256,e)}function B(t,e){var r,i,n,a=e.dyn_tree,o=e.stat_desc.static_tree,s=e.stat_desc.has_stree,h=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<h;r++)0!==a[2*r]?(t.heap[++t.heap_len]=l=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)a[2*(n=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[n]=0,t.opt_len--,s&&(t.static_len-=o[2*n+1]);for(e.max_code=l,r=t.heap_len>>1;r>=1;r--)O(t,a,r);n=h;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],O(t,a,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,a[2*n]=a[2*r]+a[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,a[2*r+1]=a[2*i+1]=n,t.heap[1]=n++,O(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,a,o,s,h=e.dyn_tree,l=e.max_code,f=e.stat_desc.static_tree,c=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,b=0;for(a=0;a<=u;a++)t.bl_count[a]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(a=h[2*h[2*(i=t.heap[r])+1]+1]+1)>m&&(a=m,b++),h[2*i+1]=a,i>l||(t.bl_count[a]++,o=0,i>=p&&(o=d[i-p]),s=h[2*i],t.opt_len+=s*(a+o),c&&(t.static_len+=s*(f[2*i+1]+o)));if(0!==b){do{for(a=m-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[m]--,b-=2}while(b>0);for(a=m;0!==a;a--)for(i=t.bl_count[a];0!==i;)(n=t.heap[--r])>l||(h[2*n+1]!==a&&(t.opt_len+=(a-h[2*n+1])*h[2*n],h[2*n+1]=a),i--)}}(t,e),T(a,l,t.bl_count)}function D(t,e,r){var i,n,a=-1,o=e[1],s=0,u=7,h=4;for(0===o&&(u=138,h=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=o,o=e[2*(i+1)+1],++s<u&&n===o||(s<h?t.bl_tree[2*n]+=s:0!==n?(n!==a&&t.bl_tree[2*n]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,a=n,0===o?(u=138,h=3):n===o?(u=6,h=3):(u=7,h=4))}function N(t,e,r){var i,n,a=-1,o=e[1],s=0,u=7,h=4;for(0===o&&(u=138,h=3),i=0;i<=r;i++)if(n=o,o=e[2*(i+1)+1],!(++s<u&&n===o)){if(s<h)do{A(t,n,t.bl_tree)}while(0!=--s);else 0!==n?(n!==a&&(A(t,n,t.bl_tree),s--),A(t,16,t.bl_tree),M(t,s-3,2)):s<=10?(A(t,17,t.bl_tree),M(t,s-3,3)):(A(t,18,t.bl_tree),M(t,s-11,7));s=0,a=n,0===o?(u=138,h=3):n===o?(u=6,h=3):(u=7,h=4)}}n(w);var z=!1;function j(t,e,r,n){M(t,0+(n?1:0),3),function(t,e,r,n){P(t),n&&(k(t,r),k(t,~r)),i.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r,!0)}r._tr_init=function(t){z||(!function(){var t,e,r,i,n,a=new Array(16);for(r=0,i=0;i<28;i++)for(g[i]=r,t=0;t<1<<h[i];t++)b[r++]=i;for(b[r-1]=i,n=0,i=0;i<16;i++)for(w[i]=n,t=0;t<1<<l[i];t++)m[n++]=i;for(n>>=7;i<s;i++)for(w[i]=n<<7,t=0;t<1<<l[i]-7;t++)m[256+n++]=i;for(e=0;e<=u;e++)a[e]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,a[8]++;for(;t<=255;)d[2*t+1]=9,t++,a[9]++;for(;t<=279;)d[2*t+1]=7,t++,a[7]++;for(;t<=287;)d[2*t+1]=8,t++,a[8]++;for(T(d,287,a),t=0;t<s;t++)p[2*t+1]=5,p[2*t]=I(t,5);_=new x(d,h,257,o,u),v=new x(p,l,0,s,u),y=new x(new Array(0),f,0,19,7)}(),z=!0),t.l_desc=new E(t.dyn_ltree,_),t.d_desc=new E(t.dyn_dtree,v),t.bl_desc=new E(t.bl_tree,y),t.bi_buf=0,t.bi_valid=0,R(t)},r._tr_stored_block=j,r._tr_flush_block=function(t,e,r,i){var n,o,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),B(t,t.l_desc),B(t,t.d_desc),s=function(t){var e;for(D(t,t.dyn_ltree,t.l_desc.max_code),D(t,t.dyn_dtree,t.d_desc.max_code),B(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=n&&(n=o)):n=o=r+5,r+4<=n&&-1!==e?j(t,e,r,i):4===t.strategy||o===n?(M(t,2+(i?1:0),3),L(t,d,p)):(M(t,4+(i?1:0),3),function(t,e,r,i){var n;for(M(t,e-257,5),M(t,r-1,5),M(t,i-4,4),n=0;n<i;n++)M(t,t.bl_tree[2*c[n]+1],3);N(t,t.dyn_ltree,e-1),N(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),L(t,t.dyn_ltree,t.dyn_dtree)),R(t),i&&P(t)},r._tr_tally=function(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*(b[r]+a+1)]++,t.dyn_dtree[2*S(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){M(t,2,3),A(t,256,d),function(t){16===t.bi_valid?(k(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)}(t)}},{"../utils/common":36}],46:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],47:[function(t,e,r){arguments[4][33][0].apply(r,arguments)},{dup:33}],48:[function(t,e,r){(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
"use strict";var i=t("base64-js"),n=t("ieee754"),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,e.prototype),r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,r,i){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var i=0|d(t,r),n=s(i),a=n.write(t,r);a!==i&&(n=n.slice(0,a));return n}(t,r);if(ArrayBuffer.isView(t))return f(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(U(t,ArrayBuffer)||t&&U(t.buffer,ArrayBuffer))return function(t,r,i){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(i||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===r&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,r):new Uint8Array(t,r,i);return Object.setPrototypeOf(n,e.prototype),n}(t,r,i);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return e.from(n,r,i);var a=function(t){if(e.isBuffer(t)){var r=0|c(t.length),i=s(r);return 0===i.length||t.copy(i,0,0,r),i}if(void 0!==t.length)return"number"!=typeof t.length||F(t.length)?s(0):f(t);if("Buffer"===t.type&&Array.isArray(t.data))return f(t.data)}(t);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return e.from(t[Symbol.toPrimitive]("string"),r,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return h(t),s(t<0?0:0|c(t))}function f(t){for(var e=t.length<0?0:0|c(t.length),r=s(e),i=0;i<e;i+=1)r[i]=255&t[i];return r}function c(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function d(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||U(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var i=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;for(var a=!1;;)switch(r){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return z(t).length;default:if(a)return n?-1:N(t).length;r=(""+r).toLowerCase(),a=!0}}function p(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function m(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function b(t,r,i,n,a){if(0===t.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),F(i=+i)&&(i=a?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(a)return-1;i=t.length-1}else if(i<0){if(!a)return-1;i=0}if("string"==typeof r&&(r=e.from(r,n)),e.isBuffer(r))return 0===r.length?-1:g(t,r,i,n,a);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(t,r,i):Uint8Array.prototype.lastIndexOf.call(t,r,i):g(t,[r],i,n,a);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,i,n){var a,o=1,s=t.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,s/=2,u/=2,r/=2}function h(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(n){var l=-1;for(a=r;a<s;a++)if(h(t,a)===h(e,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===u)return l*o}else-1!==l&&(a-=a-l),l=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var f=!0,c=0;c<u;c++)if(h(t,a+c)!==h(e,c)){f=!1;break}if(f)return a}return-1}function _(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?(i=Number(i))>n&&(i=n):i=n;var a=e.length;i>a/2&&(i=a/2);for(var o=0;o<i;++o){var s=parseInt(e.substr(2*o,2),16);if(F(s))return o;t[r+o]=s}return o}function v(t,e,r,i){return j(N(e,t.length-r),t,r,i)}function y(t,e,r,i){return j(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,i)}function w(t,e,r,i){return y(t,e,r,i)}function x(t,e,r,i){return j(z(e),t,r,i)}function E(t,e,r,i){return j(function(t,e){for(var r,i,n,a=[],o=0;o<t.length&&!((e-=2)<0);++o)i=(r=t.charCodeAt(o))>>8,n=r%256,a.push(n),a.push(i);return a}(e,t.length-r),t,r,i)}function S(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var a,o,s,u,h=t[n],l=null,f=h>239?4:h>223?3:h>191?2:1;if(n+f<=r)switch(f){case 1:h<128&&(l=h);break;case 2:128==(192&(a=t[n+1]))&&(u=(31&h)<<6|63&a)>127&&(l=u);break;case 3:a=t[n+1],o=t[n+2],128==(192&a)&&128==(192&o)&&(u=(15&h)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=t[n+1],o=t[n+2],s=t[n+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&h)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,i.push(l>>>10&1023|55296),l=56320|1023&l),i.push(l),n+=f}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);var r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=M));return r}(i)}r.kMaxLength=o,e.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),e.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192,e.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array),e.alloc=function(t,e,r){return function(t,e,r){return h(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},e.allocUnsafe=function(t){return l(t)},e.allocUnsafeSlow=function(t){return l(t)},e.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==e.prototype},e.compare=function(t,r){if(U(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),U(r,Uint8Array)&&(r=e.from(r,r.offset,r.byteLength)),!e.isBuffer(t)||!e.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var i=t.length,n=r.length,a=0,o=Math.min(i,n);a<o;++a)if(t[a]!==r[a]){i=t[a],n=r[a];break}return i<n?-1:n<i?1:0},e.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return e.alloc(0);var i;if(void 0===r)for(r=0,i=0;i<t.length;++i)r+=t[i].length;var n=e.allocUnsafe(r),a=0;for(i=0;i<t.length;++i){var o=t[i];if(U(o,Uint8Array)&&(o=e.from(o)),!e.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,a),a+=o.length}return n},e.byteLength=d,e.prototype._isBuffer=!0,e.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},e.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},e.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},e.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?k(this,0,t):p.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},a&&(e.prototype[a]=e.prototype.inspect),e.prototype.compare=function(t,r,i,n,a){if(U(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===i&&(i=t?t.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),r<0||i>t.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&r>=i)return 0;if(n>=a)return-1;if(r>=i)return 1;if(this===t)return 0;for(var o=(a>>>=0)-(n>>>=0),s=(i>>>=0)-(r>>>=0),u=Math.min(o,s),h=this.slice(n,a),l=t.slice(r,i),f=0;f<u;++f)if(h[f]!==l[f]){o=h[f],s=l[f];break}return o<s?-1:s<o?1:0},e.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},e.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},e.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},e.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":return y(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function A(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function I(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function T(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var n="",a=e;a<r;++a)n+=G[t[a]];return n}function R(t,e,r){for(var i=t.slice(e,r),n="",a=0;a<i.length;a+=2)n+=String.fromCharCode(i[a]+256*i[a+1]);return n}function P(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function C(t,r,i,n,a,o){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>a||r<o)throw new RangeError('"value" argument is out of bounds');if(i+n>t.length)throw new RangeError("Index out of range")}function O(t,e,r,i,n,a){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,i,a){return e=+e,r>>>=0,a||O(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function B(t,e,r,i,a){return e=+e,r>>>=0,a||O(t,0,r,8),n.write(t,e,r,i,52,8),r+8}e.prototype.slice=function(t,r){var i=this.length;(t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(r=void 0===r?i:~~r)<0?(r+=i)<0&&(r=0):r>i&&(r=i),r<t&&(r=t);var n=this.subarray(t,r);return Object.setPrototypeOf(n,e.prototype),n},e.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var i=this[t],n=1,a=0;++a<e&&(n*=256);)i+=this[t+a]*n;return i},e.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},e.prototype.readUInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var i=this[t],n=1,a=0;++a<e&&(n*=256);)i+=this[t+a]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*e)),i},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var i=e,n=1,a=this[t+--i];i>0&&(n*=256);)a+=this[t+--i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*e)),a},e.prototype.readInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||P(t,4,this.length),n.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||P(t,4,this.length),n.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||P(t,8,this.length),n.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||P(t,8,this.length),n.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,i){(t=+t,e>>>=0,r>>>=0,i)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,a=0;for(this[e]=255&t;++a<r&&(n*=256);)this[e+a]=t/n&255;return e+r},e.prototype.writeUIntBE=function(t,e,r,i){(t=+t,e>>>=0,r>>>=0,i)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,a=1;for(this[e+n]=255&t;--n>=0&&(a*=256);)this[e+n]=t/a&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);C(this,t,e,r,n-1,-n)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},e.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);C(this,t,e,r,n-1,-n)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},e.prototype.copy=function(t,r,i,n){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-i&&(n=t.length-r+i);var a=n-i;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,i,n);else if(this===t&&i<r&&r<n)for(var o=a-1;o>=0;--o)t[o+r]=this[o+i];else Uint8Array.prototype.set.call(t,this.subarray(i,n),r);return a},e.prototype.fill=function(t,r,i,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!e.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var a=t.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(t=a)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;var o;if(r>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(o=r;o<i;++o)this[o]=t;else{var s=e.isBuffer(t)?t:e.from(t,n),u=s.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<i-r;++o)this[o+r]=s[o%u]}return this};var D=/[^+/0-9A-Za-z-_]/g;function N(t,e){var r;e=e||1/0;for(var i=t.length,n=null,a=[],o=0;o<i;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function z(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function U(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function F(t){return t!=t}var G=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)e[i+n]=t[r]+t[n];return e}()}).call(this,t("buffer").Buffer)},{"base64-js":29,buffer:48,ieee754:73}],49:[function(t,e,r){var i=t("buffer").Buffer;e.exports=function(t,e){if(i.isBuffer(t)&&i.isBuffer(e)){if("function"==typeof t.equals)return t.equals(e);if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}}},{buffer:48}],50:[function(t,e,r){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],51:[function(t,e,r){(function(t){function e(t){return Object.prototype.toString.call(t)}r.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},r.isBoolean=function(t){return"boolean"==typeof t},r.isNull=function(t){return null===t},r.isNullOrUndefined=function(t){return null==t},r.isNumber=function(t){return"number"==typeof t},r.isString=function(t){return"string"==typeof t},r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=function(t){return void 0===t},r.isRegExp=function(t){return"[object RegExp]"===e(t)},r.isObject=function(t){return"object"==typeof t&&null!==t},r.isDate=function(t){return"[object Date]"===e(t)},r.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},r.isFunction=function(t){return"function"==typeof t},r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":76}],52:[function(t,e,r){var i=Object.create||function(t){var e=function(){};return e.prototype=t,new e},n=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return r},a=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function o(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var s,u=10;try{var h={};Object.defineProperty&&Object.defineProperty(h,"x",{value:0}),s=0===h.x}catch(t){s=!1}function l(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function f(t,e,r){if(e)t.call(r);else for(var i=t.length,n=w(t,i),a=0;a<i;++a)n[a].call(r)}function c(t,e,r,i){if(e)t.call(r,i);else for(var n=t.length,a=w(t,n),o=0;o<n;++o)a[o].call(r,i)}function d(t,e,r,i,n){if(e)t.call(r,i,n);else for(var a=t.length,o=w(t,a),s=0;s<a;++s)o[s].call(r,i,n)}function p(t,e,r,i,n,a){if(e)t.call(r,i,n,a);else for(var o=t.length,s=w(t,o),u=0;u<o;++u)s[u].call(r,i,n,a)}function m(t,e,r,i){if(e)t.apply(r,i);else for(var n=t.length,a=w(t,n),o=0;o<n;++o)a[o].apply(r,i)}function b(t,e,r,n){var a,o,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((o=t._events)?(o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]):(o=t._events=i(null),t._eventsCount=0),s){if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),!s.warned&&(a=l(t))&&a>0&&s.length>a){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else s=o[e]=r,++t._eventsCount;return t}function g(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function _(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=a.call(g,i);return n.listener=r,i.wrapFn=n,n}function v(t,e,r){var i=t._events;if(!i)return[];var n=i[e];return n?"function"==typeof n?r?[n.listener||n]:[n]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(n):w(n,n.length):[]}function y(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function w(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}s?Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||t!=t)throw new TypeError('"defaultMaxListeners" must be a positive number');u=t}}):o.defaultMaxListeners=u,o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(t){var e,r,i,n,a,o,s="error"===t;if(o=this._events)s=s&&null==o.error;else if(!s)return!1;if(s){if(arguments.length>1&&(e=arguments[1]),e instanceof Error)throw e;var u=new Error('Unhandled "error" event. ('+e+")");throw u.context=e,u}if(!(r=o[t]))return!1;var h="function"==typeof r;switch(i=arguments.length){case 1:f(r,h,this);break;case 2:c(r,h,this,arguments[1]);break;case 3:d(r,h,this,arguments[1],arguments[2]);break;case 4:p(r,h,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(i-1),a=1;a<i;a++)n[a-1]=arguments[a];m(r,h,this,n)}return!0},o.prototype.addListener=function(t,e){return b(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return b(this,t,e,!0)},o.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,_(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,_(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,a,o,s;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=i(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(a=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,a=o;break}if(a<0)return this;0===a?r.shift():function(t,e){for(var r=e,i=r+1,n=t.length;i<n;r+=1,i+=1)t[r]=t[i];t.pop()}(r,a),1===r.length&&(n[t]=r[0]),n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.removeAllListeners=function(t){var e,r,a;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=i(null),this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=i(null):delete r[t]),this;if(0===arguments.length){var o,s=n(r);for(a=0;a<s.length;++a)"removeListener"!==(o=s[a])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=i(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)for(a=e.length-1;a>=0;a--)this.removeListener(t,e[a]);return this},o.prototype.listeners=function(t){return v(this,t,!0)},o.prototype.rawListeners=function(t){return v(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):y.call(t,e)},o.prototype.listenerCount=y,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],53:[function(t,e,r){var i=t("./lib/parser");e.exports={create:function(e,r){if(e instanceof(r=r||(0,eval)("this")).ArrayBuffer){var n=t("./lib/dom-bufferstream");return new i(new n(e,0,e.byteLength,!0,r))}var a=t("./lib/bufferstream");return new i(new a(e,0,e.length,!0))}}},{"./lib/bufferstream":54,"./lib/dom-bufferstream":56,"./lib/parser":60}],54:[function(t,e,r){function i(t,e,r,i){this.buffer=t,this.offset=e||0,r="number"==typeof r?r:t.length,this.endPosition=this.offset+r,this.setBigEndian(i)}i.prototype={setBigEndian:function(t){this.bigEndian=!!t},nextUInt8:function(){var t=this.buffer.readUInt8(this.offset);return this.offset+=1,t},nextInt8:function(){var t=this.buffer.readInt8(this.offset);return this.offset+=1,t},nextUInt16:function(){var t=this.bigEndian?this.buffer.readUInt16BE(this.offset):this.buffer.readUInt16LE(this.offset);return this.offset+=2,t},nextUInt32:function(){var t=this.bigEndian?this.buffer.readUInt32BE(this.offset):this.buffer.readUInt32LE(this.offset);return this.offset+=4,t},nextInt16:function(){var t=this.bigEndian?this.buffer.readInt16BE(this.offset):this.buffer.readInt16LE(this.offset);return this.offset+=2,t},nextInt32:function(){var t=this.bigEndian?this.buffer.readInt32BE(this.offset):this.buffer.readInt32LE(this.offset);return this.offset+=4,t},nextFloat:function(){var t=this.bigEndian?this.buffer.readFloatBE(this.offset):this.buffer.readFloatLE(this.offset);return this.offset+=4,t},nextDouble:function(){var t=this.bigEndian?this.buffer.readDoubleBE(this.offset):this.buffer.readDoubleLE(this.offset);return this.offset+=8,t},nextBuffer:function(t){var e=this.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},remainingLength:function(){return this.endPosition-this.offset},nextString:function(t){var e=this.buffer.toString("utf8",this.offset,this.offset+t);return this.offset+=t,e},mark:function(){var t=this;return{openWithOffset:function(e){return e=(e||0)+this.offset,new i(t.buffer,e,t.endPosition-e,t.bigEndian)},offset:this.offset}},offsetFrom:function(t){return this.offset-t.offset},skip:function(t){this.offset+=t},branch:function(t,e){return e="number"==typeof e?e:this.endPosition-(this.offset+t),new i(this.buffer,this.offset+t,e,this.bigEndian)}},e.exports=i},{}],55:[function(t,e,r){function i(t){return parseInt(t,10)}function n(t,e){t=t.map(i),e=e.map(i);var r=t[0],n=t[1]-1,a=t[2],o=e[0],s=e[1],u=e[2];return Date.UTC(r,n,a,o,s,u,0)/1e3}function a(t){var e=t.substr(0,10).split("-"),r=t.substr(11,8).split(":"),a=t.substr(19,6).split(":").map(i),o=3600*a[0]+60*a[1],s=n(e,r);if("number"==typeof(s-=o)&&!isNaN(s))return s}function o(t){var e=t.split(" "),r=n(e[0].split(":"),e[1].split(":"));if("number"==typeof r&&!isNaN(r))return r}e.exports={parseDateWithSpecFormat:o,parseDateWithTimezoneFormat:a,parseExifDate:function(t){var e=19===t.length&&":"===t.charAt(4);return 25===t.length&&"T"===t.charAt(10)?a(t):e?o(t):void 0}}},{}],56:[function(t,e,r){function i(t,e,r,i,n,a){this.global=n,e=e||0,r=r||t.byteLength-e,this.arrayBuffer=t.slice(e,e+r),this.view=new n.DataView(this.arrayBuffer,0,this.arrayBuffer.byteLength),this.setBigEndian(i),this.offset=0,this.parentOffset=(a||0)+e}i.prototype={setBigEndian:function(t){this.littleEndian=!t},nextUInt8:function(){var t=this.view.getUint8(this.offset);return this.offset+=1,t},nextInt8:function(){var t=this.view.getInt8(this.offset);return this.offset+=1,t},nextUInt16:function(){var t=this.view.getUint16(this.offset,this.littleEndian);return this.offset+=2,t},nextUInt32:function(){var t=this.view.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},nextInt16:function(){var t=this.view.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},nextInt32:function(){var t=this.view.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},nextFloat:function(){var t=this.view.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},nextDouble:function(){var t=this.view.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},nextBuffer:function(t){var e=this.arrayBuffer.slice(this.offset,this.offset+t);return this.offset+=t,e},remainingLength:function(){return this.arrayBuffer.byteLength-this.offset},nextString:function(t){var e=this.arrayBuffer.slice(this.offset,this.offset+t);return e=String.fromCharCode.apply(null,new this.global.Uint8Array(e)),this.offset+=t,e},mark:function(){var t=this;return{openWithOffset:function(e){return e=(e||0)+this.offset,new i(t.arrayBuffer,e,t.arrayBuffer.byteLength-e,!t.littleEndian,t.global,t.parentOffset)},offset:this.offset,getParentOffset:function(){return t.parentOffset}}},offsetFrom:function(t){return this.parentOffset+this.offset-(t.offset+t.getParentOffset())},skip:function(t){this.offset+=t},branch:function(t,e){return e="number"==typeof e?e:this.arrayBuffer.byteLength-(this.offset+t),new i(this.arrayBuffer,this.offset+t,e,!this.littleEndian,this.global,this.parentOffset)}},e.exports=i},{}],57:[function(t,e,r){e.exports={exif:{1:"InteropIndex",2:"InteropVersion",11:"ProcessingSoftware",254:"SubfileType",255:"OldSubfileType",256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:"Thresholding",264:"CellWidth",265:"CellLength",266:"FillOrder",269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",285:"PageName",286:"XPosition",287:"YPosition",288:"FreeOffsets",289:"FreeByteCounts",290:"GrayResponseUnit",291:"GrayResponseCurve",292:"T4Options",293:"T6Options",296:"ResolutionUnit",297:"PageNumber",300:"ColorResponseUnit",301:"TransferFunction",305:"Software",306:"ModifyDate",315:"Artist",316:"HostComputer",317:"Predictor",318:"WhitePoint",319:"PrimaryChromaticities",320:"ColorMap",321:"HalftoneHints",322:"TileWidth",323:"TileLength",324:"TileOffsets",325:"TileByteCounts",326:"BadFaxLines",327:"CleanFaxData",328:"ConsecutiveBadFaxLines",330:"SubIFD",332:"InkSet",333:"InkNames",334:"NumberofInks",336:"DotRange",337:"TargetPrinter",338:"ExtraSamples",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",342:"TransferRange",343:"ClipPath",344:"XClipPathUnits",345:"YClipPathUnits",346:"Indexed",347:"JPEGTables",351:"OPIProxy",400:"GlobalParametersIFD",401:"ProfileType",402:"FaxProfile",403:"CodingMethods",404:"VersionYear",405:"ModeNumber",433:"Decode",434:"DefaultImageColor",435:"T82Options",437:"JPEGTables",512:"JPEGProc",513:"ThumbnailOffset",514:"ThumbnailLength",515:"JPEGRestartInterval",517:"JPEGLosslessPredictors",518:"JPEGPointTransforms",519:"JPEGQTables",520:"JPEGDCTables",521:"JPEGACTables",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite",559:"StripRowCounts",700:"ApplicationNotes",999:"USPTOMiscellaneous",4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight",18246:"Rating",18247:"XP_DIP_XML",18248:"StitchInfo",18249:"RatingPercent",32781:"ImageID",32931:"WangTag1",32932:"WangAnnotation",32933:"WangTag3",32934:"WangTag4",32995:"Matteing",32996:"DataType",32997:"ImageDepth",32998:"TileDepth",33405:"Model2",33421:"CFARepeatPatternDim",33422:"CFAPattern2",33423:"BatteryLevel",33424:"KodakIFD",33432:"Copyright",33434:"ExposureTime",33437:"FNumber",33445:"MDFileTag",33446:"MDScalePixel",33447:"MDColorTable",33448:"MDLabName",33449:"MDSampleInfo",33450:"MDPrepDate",33451:"MDPrepTime",33452:"MDFileUnits",33550:"PixelScale",33589:"AdventScale",33590:"AdventRevision",33628:"UIC1Tag",33629:"UIC2Tag",33630:"UIC3Tag",33631:"UIC4Tag",33723:"IPTC-NAA",33918:"IntergraphPacketData",33919:"IntergraphFlagRegisters",33920:"IntergraphMatrix",33921:"INGRReserved",33922:"ModelTiePoint",34016:"Site",34017:"ColorSequence",34018:"IT8Header",34019:"RasterPadding",34020:"BitsPerRunLength",34021:"BitsPerExtendedRunLength",34022:"ColorTable",34023:"ImageColorIndicator",34024:"BackgroundColorIndicator",34025:"ImageColorValue",34026:"BackgroundColorValue",34027:"PixelIntensityRange",34028:"TransparencyIndicator",34029:"ColorCharacterization",34030:"HCUsage",34031:"TrapIndicator",34032:"CMYKEquivalent",34118:"SEMInfo",34152:"AFCP_IPTC",34232:"PixelMagicJBIGOptions",34264:"ModelTransform",34306:"WB_GRGBLevels",34310:"LeafData",34377:"PhotoshopSettings",34665:"ExifOffset",34675:"ICC_Profile",34687:"TIFF_FXExtensions",34688:"MultiProfiles",34689:"SharedData",34690:"T88Options",34732:"ImageLayer",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34850:"ExposureProgram",34852:"SpectralSensitivity",34853:"GPSInfo",34855:"ISO",34856:"Opto-ElectricConvFactor",34857:"Interlace",34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",34908:"FaxRecvParams",34909:"FaxSubAddress",34910:"FaxRecvTime",34954:"LeafSubIFD",36864:"ExifVersion",36867:"DateTimeOriginal",36868:"CreateDate",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureCompensation",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",37387:"FlashEnergy",37388:"SpatialFrequencyResponse",37389:"Noise",37390:"FocalPlaneXResolution",37391:"FocalPlaneYResolution",37392:"FocalPlaneResolutionUnit",37393:"ImageNumber",37394:"SecurityClassification",37395:"ImageHistory",37396:"SubjectArea",37397:"ExposureIndex",37398:"TIFF-EPStandardID",37399:"SensingMethod",37434:"CIP3DataFile",37435:"CIP3Sheet",37436:"CIP3Side",37439:"StoNits",37500:"MakerNote",37510:"UserComment",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37679:"MSDocumentText",37680:"MSPropertySetStorage",37681:"MSDocumentTextPosition",37724:"ImageSourceData",40091:"XPTitle",40092:"XPComment",40093:"XPAuthor",40094:"XPKeywords",40095:"XPSubject",40960:"FlashpixVersion",40961:"ColorSpace",40962:"ExifImageWidth",40963:"ExifImageHeight",40964:"RelatedSoundFile",40965:"InteropOffset",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41485:"Noise",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41489:"ImageNumber",41490:"SecurityClassification",41491:"ImageHistory",41492:"SubjectLocation",41493:"ExposureIndex",41494:"TIFF-EPStandardID",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFormat",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"OwnerName",42033:"SerialNumber",42034:"LensInfo",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42112:"GDALMetadata",42113:"GDALNoData",42240:"Gamma",44992:"ExpandSoftware",44993:"ExpandLens",44994:"ExpandFilm",44995:"ExpandFilterLens",44996:"ExpandScanner",44997:"ExpandFlashLamp",48129:"PixelFormat",48130:"Transformation",48131:"Uncompressed",48132:"ImageType",48256:"ImageWidth",48257:"ImageHeight",48258:"WidthResolution",48259:"HeightResolution",48320:"ImageOffset",48321:"ImageByteCount",48322:"AlphaOffset",48323:"AlphaByteCount",48324:"ImageDataDiscard",48325:"AlphaDataDiscard",50215:"OceScanjobDesc",50216:"OceApplicationSelector",50217:"OceIDNumber",50218:"OceImageLogic",50255:"Annotations",50341:"PrintIM",50560:"USPTOOriginalContentType",50706:"DNGVersion",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50710:"CFAPlaneColor",50711:"CFALayout",50712:"LinearizationTable",50713:"BlackLevelRepeatDim",50714:"BlackLevel",50715:"BlackLevelDeltaH",50716:"BlackLevelDeltaV",50717:"WhiteLevel",50718:"DefaultScale",50719:"DefaultCropOrigin",50720:"DefaultCropSize",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50733:"BayerGreenSplit",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50737:"ChromaBlurRadius",50738:"AntiAliasStrength",50739:"ShadowScale",50740:"DNGPrivateData",50741:"MakerNoteSafety",50752:"RawImageSegmentation",50778:"CalibrationIlluminant1",50779:"CalibrationIlluminant2",50780:"BestQualityScale",50781:"RawDataUniqueID",50784:"AliasLayerMetadata",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50829:"ActiveArea",50830:"MaskedAreas",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50935:"NoiseReductionApplied",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:"ProfileEmbedPolicy",50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:"PreviewColorSpace",50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50974:"SubTileBlockSize",50975:"RowInterleaveFactor",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51008:"OpcodeList1",51009:"OpcodeList2",51022:"OpcodeList3",51041:"NoiseProfile",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:"ProfileHueSatMapEncoding",51108:"ProfileLookTableEncoding",51109:"BaselineExposureOffset",51110:"DefaultBlackRender",51111:"NewRawImageDigest",51112:"RawToPreviewGain",51125:"DefaultUserCrop",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65024:"KDC_IFD",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"}}},{}],58:[function(t,e,r){function i(t,e){switch(t){case 1:return e.nextUInt8();case 3:return e.nextUInt16();case 4:return e.nextUInt32();case 5:return[e.nextUInt32(),e.nextUInt32()];case 6:return e.nextInt8();case 8:return e.nextUInt16();case 9:return e.nextUInt32();case 10:return[e.nextInt32(),e.nextInt32()];case 11:return e.nextFloat();case 12:return e.nextDouble();default:throw new Error("Invalid format while decoding: "+t)}}function n(t,e){var r,n,a=e.nextUInt16(),o=e.nextUInt16(),s=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}}(o),u=e.nextUInt32(),h=s*u;if(h>4&&(e=t.openWithOffset(e.nextUInt32())),2===o){var l=(r=e.nextString(u)).indexOf("\0");-1!==l&&(r=r.substr(0,l))}else if(7===o)r=e.nextBuffer(u);else if(0!==o)for(r=[],n=0;n<u;++n)r.push(i(o,e));return h<4&&e.skip(4-h),[a,r,o]}function a(t,e,r){var i,a,o=e.nextUInt16();for(a=0;a<o;++a)r((i=n(t,e))[0],i[1],i[2])}e.exports={IFD0:1,IFD1:2,GPSIFD:3,SubIFD:4,InteropIFD:5,parseTags:function(t,e){var r,i,n,o;try{r=function(t){if("Exif\0\0"!==t.nextString(6))throw new Error("Invalid EXIF header");var e=t.mark(),r=t.nextUInt16();if(18761===r)t.setBigEndian(!1);else{if(19789!==r)throw new Error("Invalid TIFF header");t.setBigEndian(!0)}if(42!==t.nextUInt16())throw new Error("Invalid TIFF data");return e}(t)}catch(t){return!1}var s=r.openWithOffset(t.nextUInt32()),u=this.IFD0;a(r,s,(function(t,r,a){switch(t){case 34853:n=r[0];break;case 34665:i=r[0];break;default:e(u,t,r,a)}}));var h=s.nextUInt32();if(0!==h){var l=r.openWithOffset(h);a(r,l,e.bind(null,this.IFD1))}if(n){var f=r.openWithOffset(n);a(r,f,e.bind(null,this.GPSIFD))}if(i){var c=r.openWithOffset(i),d=this.InteropIFD;a(r,c,(function(t,r,i){40965===t?o=r[0]:e(d,t,r,i)}))}if(o){var p=r.openWithOffset(o);a(r,p,e.bind(null,this.InteropIFD))}return!0}}},{}],59:[function(t,e,r){e.exports={parseSections:function(t,e){var r,i;for(t.setBigEndian(!0);t.remainingLength()>0&&218!==i;){if(255!==t.nextUInt8())throw new Error("Invalid JPEG section offset");r=(i=t.nextUInt8())>=208&&i<=217||218===i?0:t.nextUInt16()-2,e(i,t.branch(0,r)),t.skip(r)}},getSizeFromSOFSection:function(t){return t.skip(1),{height:t.nextUInt16(),width:t.nextUInt16()}},getSectionName:function(t){var e,r;switch(t){case 216:e="SOI";break;case 196:e="DHT";break;case 219:e="DQT";break;case 221:e="DRI";break;case 218:e="SOS";break;case 254:e="COM";break;case 217:e="EOI";break;default:t>=224&&t<=239?(e="APP",r=t-224):t>=192&&t<=207&&196!==t&&200!==t&&204!==t?(e="SOF",r=t-192):t>=208&&t<=215&&(e="RST",r=t-208)}var i={name:e};return"number"==typeof r&&(i.index=r),i}}},{}],60:[function(t,e,r){var i=t("./jpeg"),n=t("./exif"),a=t("./simplify");function o(t,e,r,i,n,a,o){this.startMarker=t,this.tags=e,this.imageSize=r,this.thumbnailOffset=i,this.thumbnailLength=n,this.thumbnailType=a,this.app1Offset=o}function s(t){this.stream=t,this.flags={readBinaryTags:!1,resolveTagNames:!0,simplifyValues:!0,imageSize:!0,hidePointers:!0,returnTags:!0}}o.prototype={hasThumbnail:function(t){return!(!this.thumbnailOffset||!this.thumbnailLength)&&("string"!=typeof t||("image/jpeg"===t.toLowerCase().trim()?6===this.thumbnailType:"image/tiff"===t.toLowerCase().trim()&&1===this.thumbnailType))},getThumbnailOffset:function(){return this.app1Offset+6+this.thumbnailOffset},getThumbnailLength:function(){return this.thumbnailLength},getThumbnailBuffer:function(){return this._getThumbnailStream().nextBuffer(this.thumbnailLength)},_getThumbnailStream:function(){return this.startMarker.openWithOffset(this.getThumbnailOffset())},getImageSize:function(){return this.imageSize},getThumbnailSize:function(){var t,e=this._getThumbnailStream();return i.parseSections(e,(function(e,r){"SOF"===i.getSectionName(e).name&&(t=i.getSizeFromSOFSection(r))})),t}},s.prototype={enableBinaryFields:function(t){return this.flags.readBinaryTags=!!t,this},enablePointers:function(t){return this.flags.hidePointers=!t,this},enableTagNames:function(t){return this.flags.resolveTagNames=!!t,this},enableImageSize:function(t){return this.flags.imageSize=!!t,this},enableReturnTags:function(t){return this.flags.returnTags=!!t,this},enableSimpleValues:function(t){return this.flags.simplifyValues=!!t,this},parse:function(){var e,r,s,u,h,l,f,c,d,p=this.stream.mark(),m=p.openWithOffset(0),b=this.flags;return b.resolveTagNames&&(f=t("./exif-tags")),b.resolveTagNames?(e={},c=function(t){return e[t.name]},d=function(t,r){e[t.name]=r}):(e=[],c=function(t){var r;for(r=0;r<e.length;++r)if(e[r].type===t.type&&e[r].section===t.section)return e.value},d=function(t,r){var i;for(i=0;i<e.length;++i)if(e[i].type===t.type&&e[i].section===t.section)return void(e.value=r)}),i.parseSections(m,(function(t,o){var c=o.offsetFrom(p);225===t?n.parseTags(o,(function(t,r,i,o){if(b.readBinaryTags||7!==o){if(513===r){if(s=i[0],b.hidePointers)return}else if(514===r){if(u=i[0],b.hidePointers)return}else if(259===r&&(h=i[0],b.hidePointers))return;if(b.returnTags)if(b.simplifyValues&&(i=a.simplifyValue(i,o)),b.resolveTagNames){var l=(t===n.GPSIFD?f.gps:f.exif)[r];l||(l=f.exif[r]),e.hasOwnProperty(l)||(e[l]=i)}else e.push({section:t,type:r,value:i})}}))&&(l=c):b.imageSize&&"SOF"===i.getSectionName(t).name&&(r=i.getSizeFromSOFSection(o))})),b.simplifyValues&&(a.castDegreeValues(c,d),a.castDateValues(c,d)),new o(p,e,r,s,u,h,l)}},e.exports=s},{"./exif":58,"./exif-tags":57,"./jpeg":59,"./simplify":61}],61:[function(t,e,r){var i=t("./exif"),n=t("./date"),a=[{section:i.GPSIFD,type:2,name:"GPSLatitude",refType:1,refName:"GPSLatitudeRef",posVal:"N"},{section:i.GPSIFD,type:4,name:"GPSLongitude",refType:3,refName:"GPSLongitudeRef",posVal:"E"}],o=[{section:i.SubIFD,type:306,name:"ModifyDate"},{section:i.SubIFD,type:36867,name:"DateTimeOriginal"},{section:i.SubIFD,type:36868,name:"CreateDate"},{section:i.SubIFD,type:306,name:"ModifyDate"}];e.exports={castDegreeValues:function(t,e){a.forEach((function(r){var i=t(r);if(i){var n=t({section:r.section,type:r.refType,name:r.refName})===r.posVal?1:-1,a=(i[0]+i[1]/60+i[2]/3600)*n;e(r,a)}}))},castDateValues:function(t,e){o.forEach((function(r){var i=t(r);if(i){var a=n.parseExifDate(i);void 0!==a&&e(r,a)}}))},simplifyValue:function(t,e){return Array.isArray(t)&&1===(t=t.map((function(t){return 10===e||5===e?t[0]/t[1]:t}))).length&&(t=t[0]),t}}},{"./date":55,"./exif":58}],62:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireDefault")(t("@babel/runtime/helpers/toConsumableArray")),n=function(t){return(0,i.default)(t).map((function(t){return t.charCodeAt(0)}))},a=n("META-INF/mozilla.rsa"),o=n("[Content_Types].xml"),s=n("_rels/.rels");e.exports=function(t){var e=t instanceof Uint8Array?t:new Uint8Array(t);if(!(e&&e.length>1))return null;var r=function(t,r){r=Object.assign({offset:0},r);for(var i=0;i<t.length;i++)if(r.mask){if(t[i]!==(r.mask[i]&e[i+r.offset]))return!1}else if(t[i]!==e[i+r.offset])return!1;return!0},u=function(t,e){return r(n(t),e)};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(a,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(u("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(u("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(u("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};var h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.findIndex((function(t,r,i){return r>=e&&80===i[r]&&75===i[r+1]&&3===i[r+2]&&4===i[r+3]}))},l=0,f=!1,c=null;do{var d=l+30;if(f||(f=r(o,{offset:d})||r(s,{offset:d})),c||(u("word/",{offset:d})?c={ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}:u("ppt/",{offset:d})?c={ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}:u("xl/",{offset:d})&&(c={ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),f&&c)return c;l=h(e,d)}while(l>=0);if(c)return c}if(r([80,75])&&(3===e[2]||5===e[2]||7===e[2])&&(4===e[3]||6===e[3]||8===e[3]))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(0===e[6]||1===e[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([51,103,112,53])||r([0,0,0])&&r([102,116,121,112],{offset:4})&&(r([109,112,52,49],{offset:8})||r([109,112,52,50],{offset:8})||r([105,115,111,109],{offset:8})||r([105,115,111,50],{offset:8})||r([109,109,112,52],{offset:8})||r([77,52,86],{offset:8})||r([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){var p=e.subarray(4,4100),m=p.findIndex((function(t,e,r){return 66===r[e]&&130===r[e+1]}));if(-1!==m){var b=m+3,g=function(t){return(0,i.default)(t).every((function(t,e){return p[b+e]===t.charCodeAt(0)}))};if(g("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(g("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(r([48,38,178,117,142,102,207,17,166,217]))return{ext:"wmv",mime:"video/x-ms-wmv"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([102,116,121,112,51,103],{offset:4}))return{ext:"3gp",mime:"video/3gpp"};for(var _=0;_<2&&_<e.length-16;_++){if(r([73,68,51],{offset:_})||r([255,226],{offset:_,mask:[255,226]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([255,228],{offset:_,mask:[255,228]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,248],{offset:_,mask:[255,252]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,240],{offset:_,mask:[255,252]}))return{ext:"mp4",mime:"audio/mpeg"}}if(r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32]))return{ext:"m4a",mime:"audio/mp4"};if(r([79,112,117,115,72,101,97,100],{offset:28}))return{ext:"opus",mime:"audio/opus"};if(r([79,103,103,83]))return r([128,116,104,101,111,114,97],{offset:28})?{ext:"ogv",mime:"video/ogg"}:r([1,118,105,100,101,111,0],{offset:28})?{ext:"ogm",mime:"video/ogg"}:r([127,70,76,65,67],{offset:28})?{ext:"oga",mime:"audio/ogg"}:r([83,112,101,101,120,32,32],{offset:28})?{ext:"spx",mime:"audio/ogg"}:r([1,118,111,114,98,105,115],{offset:28})?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"};if(r([102,76,97,67]))return{ext:"flac",mime:"audio/x-flac"};if(r([77,65,67,32]))return{ext:"ape",mime:"audio/ape"};if(r([119,118,112,107]))return{ext:"wv",mime:"audio/wavpack"};if(r([35,33,65,77,82,10]))return{ext:"amr",mime:"audio/amr"};if(r([37,80,68,70]))return{ext:"pdf",mime:"application/pdf"};if(r([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if((67===e[0]||70===e[0])&&r([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(r([123,92,114,116,102]))return{ext:"rtf",mime:"application/rtf"};if(r([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff",mime:"font/woff"};if(r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(r([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(r([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(r([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(r([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(r([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(r([37,33]))return{ext:"ps",mime:"application/postscript"};if(r([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(r([83,81,76,105]))return{ext:"sqlite",mime:"application/x-sqlite3"};if(r([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(r([67,114,50,52]))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(r([77,83,67,70])||r([73,83,99,40]))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121]))return{ext:"deb",mime:"application/x-deb"};if(r([33,60,97,114,99,104,62]))return{ext:"ar",mime:"application/x-unix-archive"};if(r([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(r([31,160])||r([31,157]))return{ext:"Z",mime:"application/x-compress"};if(r([76,90,73,80]))return{ext:"lz",mime:"application/x-lzip"};if(r([208,207,17,224,161,177,26,225]))return{ext:"msi",mime:"application/x-msi"};if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(r([66,76,69,78,68,69,82]))return{ext:"blend",mime:"application/x-blender"};if(r([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(r([0,0,0,12,106,80,32,32,13,10,135,10])){if(r([106,112,50,32],{offset:20}))return{ext:"jp2",mime:"image/jp2"};if(r([106,112,120,32],{offset:20}))return{ext:"jpx",mime:"image/jpx"};if(r([106,112,109,32],{offset:20}))return{ext:"jpm",mime:"image/jpm"};if(r([109,106,112,50],{offset:20}))return{ext:"mj2",mime:"image/mj2"}}if(r([70,79,82,77,0]))return{ext:"aif",mime:"audio/aiff"};if(u("<?xml "))return{ext:"xml",mime:"application/xml"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(r([102,116,121,112],{offset:4})){if(r([109,105,102,49],{offset:8}))return{ext:"heic",mime:"image/heif"};if(r([109,115,102,49],{offset:8}))return{ext:"heic",mime:"image/heif-sequence"};if(r([104,101,105,99],{offset:8})||r([104,101,105,120],{offset:8}))return{ext:"heic",mime:"image/heic"};if(r([104,101,118,99],{offset:8})||r([104,101,118,120],{offset:8}))return{ext:"heic",mime:"image/heic-sequence"}}return r([171,75,84,88,32,49,49,187,13,10,26,10])?{ext:"ktx",mime:"image/ktx"}:null}},{"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/toConsumableArray":20}],63:[function(t,e,r){"use strict";var i=t("is-callable"),n=Object.prototype.toString,a=Object.prototype.hasOwnProperty,o=function(t,e,r){for(var i=0,n=t.length;i<n;i++)a.call(t,i)&&(null==r?e(t[i],i,t):e.call(r,t[i],i,t))},s=function(t,e,r){for(var i=0,n=t.length;i<n;i++)null==r?e(t.charAt(i),i,t):e.call(r,t.charAt(i),i,t)},u=function(t,e,r){for(var i in t)a.call(t,i)&&(null==r?e(t[i],i,t):e.call(r,t[i],i,t))};e.exports=function(t,e,r){if(!i(e))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===n.call(t)?o(t,e,a):"string"==typeof t?s(t,e,a):u(t,e,a)}},{"is-callable":77}],64:[function(t,e,r){"use strict";function i(t,e,r,i){for(var n=t[e++],a=1<<n,o=a+1,s=o+1,u=n+1,h=(1<<u)-1,l=0,f=0,c=0,d=t[e++],p=new Int32Array(4096),m=null;;){for(;l<16&&0!==d;)f|=t[e++]<<l,l+=8,1===d?d=t[e++]:--d;if(l<u)break;var b=f&h;if(f>>=u,l-=u,b!==a){if(b===o)break;for(var g=b<s?b:m,_=0,v=g;v>a;)v=p[v]>>8,++_;var y=v;if(c+_+(g!==b?1:0)>i)return void console.log("Warning, gif stream longer than expected.");r[c++]=y;var w=c+=_;for(g!==b&&(r[c++]=y),v=g;_--;)v=p[v],r[--w]=255&v,v>>=8;null!==m&&s<4096&&(p[s++]=m<<8|y,s>=h+1&&u<12&&(++u,h=h<<1|1)),m=b}else s=o+1,h=(1<<(u=n+1))-1,m=null}return c!==i&&console.log("Warning, gif stream shorter than expected."),r}try{r.GifWriter=function(t,e,r,i){var n=0,a=void 0===(i=void 0===i?{}:i).loop?null:i.loop,o=void 0===i.palette?null:i.palette;if(e<=0||r<=0||e>65535||r>65535)throw new Error("Width/Height invalid.");function s(t){var e=t.length;if(e<2||e>256||e&e-1)throw new Error("Invalid code/color length, must be power of 2 and 2 .. 256.");return e}t[n++]=71,t[n++]=73,t[n++]=70,t[n++]=56,t[n++]=57,t[n++]=97;var u=0,h=0;if(null!==o){for(var l=s(o);l>>=1;)++u;if(l=1<<u,--u,void 0!==i.background){if((h=i.background)>=l)throw new Error("Background index out of range.");if(0===h)throw new Error("Background index explicitly passed as 0.")}}if(t[n++]=255&e,t[n++]=e>>8&255,t[n++]=255&r,t[n++]=r>>8&255,t[n++]=(null!==o?128:0)|u,t[n++]=h,t[n++]=0,null!==o)for(var f=0,c=o.length;f<c;++f){var d=o[f];t[n++]=d>>16&255,t[n++]=d>>8&255,t[n++]=255&d}if(null!==a){if(a<0||a>65535)throw new Error("Loop count invalid.");t[n++]=33,t[n++]=255,t[n++]=11,t[n++]=78,t[n++]=69,t[n++]=84,t[n++]=83,t[n++]=67,t[n++]=65,t[n++]=80,t[n++]=69,t[n++]=50,t[n++]=46,t[n++]=48,t[n++]=3,t[n++]=1,t[n++]=255&a,t[n++]=a>>8&255,t[n++]=0}var p=!1;this.addFrame=function(e,r,i,a,u,h){if(!0===p&&(--n,p=!1),h=void 0===h?{}:h,e<0||r<0||e>65535||r>65535)throw new Error("x/y invalid.");if(i<=0||a<=0||i>65535||a>65535)throw new Error("Width/Height invalid.");if(u.length<i*a)throw new Error("Not enough pixels for the frame size.");var l=!0,f=h.palette;if(null==f&&(l=!1,f=o),null==f)throw new Error("Must supply either a local or global palette.");for(var c=s(f),d=0;c>>=1;)++d;c=1<<d;var m=void 0===h.delay?0:h.delay,b=void 0===h.disposal?0:h.disposal;if(b<0||b>3)throw new Error("Disposal out of range.");var g=!1,_=0;if(void 0!==h.transparent&&null!==h.transparent&&(g=!0,(_=h.transparent)<0||_>=c))throw new Error("Transparent color index.");if((0!==b||g||0!==m)&&(t[n++]=33,t[n++]=249,t[n++]=4,t[n++]=b<<2|(!0===g?1:0),t[n++]=255&m,t[n++]=m>>8&255,t[n++]=_,t[n++]=0),t[n++]=44,t[n++]=255&e,t[n++]=e>>8&255,t[n++]=255&r,t[n++]=r>>8&255,t[n++]=255&i,t[n++]=i>>8&255,t[n++]=255&a,t[n++]=a>>8&255,t[n++]=!0===l?128|d-1:0,!0===l)for(var v=0,y=f.length;v<y;++v){var w=f[v];t[n++]=w>>16&255,t[n++]=w>>8&255,t[n++]=255&w}return n=function(t,e,r,i){t[e++]=r;var n=e++,a=1<<r,o=a-1,s=a+1,u=s+1,h=r+1,l=0,f=0;function c(r){for(;l>=r;)t[e++]=255&f,f>>=8,l-=8,e===n+256&&(t[n]=255,n=e++)}function d(t){f|=t<<l,l+=h,c(8)}var p=i[0]&o,m={};d(a);for(var b=1,g=i.length;b<g;++b){var _=i[b]&o,v=p<<8|_,y=m[v];if(void 0===y){for(f|=p<<l,l+=h;l>=8;)t[e++]=255&f,f>>=8,l-=8,e===n+256&&(t[n]=255,n=e++);4096===u?(d(a),u=s+1,h=r+1,m={}):(u>=1<<h&&++h,m[v]=u++),p=_}else p=y}return d(p),d(s),c(1),n+1===e?t[n]=0:(t[n]=e-n-1,t[e++]=0),e}(t,n,d<2?2:d,u)},this.end=function(){return!1===p&&(t[n++]=59,p=!0),n},this.getOutputBuffer=function(){return t},this.setOutputBuffer=function(e){t=e},this.getOutputBufferPosition=function(){return n},this.setOutputBufferPosition=function(t){n=t}},r.GifReader=function(t){var e=0;if(71!==t[e++]||73!==t[e++]||70!==t[e++]||56!==t[e++]||56!=(t[e++]+1&253)||97!==t[e++])throw new Error("Invalid GIF 87a/89a header.");var r=t[e++]|t[e++]<<8,n=t[e++]|t[e++]<<8,a=t[e++],o=a>>7,s=1<<1+(7&a);t[e++],t[e++];var u=null,h=null;o&&(u=e,h=s,e+=3*s);var l=!0,f=[],c=0,d=null,p=0,m=null;for(this.width=r,this.height=n;l&&e<t.length;)switch(t[e++]){case 33:switch(t[e++]){case 255:if(11!==t[e]||78==t[e+1]&&69==t[e+2]&&84==t[e+3]&&83==t[e+4]&&67==t[e+5]&&65==t[e+6]&&80==t[e+7]&&69==t[e+8]&&50==t[e+9]&&46==t[e+10]&&48==t[e+11]&&3==t[e+12]&&1==t[e+13]&&0==t[e+16])e+=14,m=t[e++]|t[e++]<<8,e++;else for(e+=12;;){if(!((I=t[e++])>=0))throw Error("Invalid block size");if(0===I)break;e+=I}break;case 249:if(4!==t[e++]||0!==t[e+4])throw new Error("Invalid graphics extension block.");var b=t[e++];c=t[e++]|t[e++]<<8,d=t[e++],0==(1&b)&&(d=null),p=b>>2&7,e++;break;case 254:for(;;){if(!((I=t[e++])>=0))throw Error("Invalid block size");if(0===I)break;e+=I}break;default:throw new Error("Unknown graphic control label: 0x"+t[e-1].toString(16))}break;case 44:var g=t[e++]|t[e++]<<8,_=t[e++]|t[e++]<<8,v=t[e++]|t[e++]<<8,y=t[e++]|t[e++]<<8,w=t[e++],x=w>>6&1,E=1<<1+(7&w),S=u,k=h,M=!1;w>>7&&(M=!0,S=e,k=E,e+=3*E);var A=e;for(e++;;){var I;if(!((I=t[e++])>=0))throw Error("Invalid block size");if(0===I)break;e+=I}f.push({x:g,y:_,width:v,height:y,has_local_palette:M,palette_offset:S,palette_size:k,data_offset:A,data_length:e-A,transparent_index:d,interlaced:!!x,delay:c,disposal:p});break;case 59:l=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return f.length},this.loopCount=function(){return m},this.frameInfo=function(t){if(t<0||t>=f.length)throw new Error("Frame index out of range.");return f[t]},this.decodeAndBlitFrameBGRA=function(e,n){var a=this.frameInfo(e),o=a.width*a.height,s=new Uint8Array(o);i(t,a.data_offset,s,o);var u=a.palette_offset,h=a.transparent_index;null===h&&(h=256);var l=a.width,f=r-l,c=l,d=4*(a.y*r+a.x),p=4*((a.y+a.height)*r+a.x),m=d,b=4*f;!0===a.interlaced&&(b+=4*r*7);for(var g=8,_=0,v=s.length;_<v;++_){var y=s[_];if(0===c&&(c=l,(m+=b)>=p&&(b=4*f+4*r*(g-1),m=d+(l+f)*(g<<1),g>>=1)),y===h)m+=4;else{var w=t[u+3*y],x=t[u+3*y+1],E=t[u+3*y+2];n[m++]=E,n[m++]=x,n[m++]=w,n[m++]=255}--c}},this.decodeAndBlitFrameRGBA=function(e,n){var a=this.frameInfo(e),o=a.width*a.height,s=new Uint8Array(o);i(t,a.data_offset,s,o);var u=a.palette_offset,h=a.transparent_index;null===h&&(h=256);var l=a.width,f=r-l,c=l,d=4*(a.y*r+a.x),p=4*((a.y+a.height)*r+a.x),m=d,b=4*f;!0===a.interlaced&&(b+=4*r*7);for(var g=8,_=0,v=s.length;_<v;++_){var y=s[_];if(0===c&&(c=l,(m+=b)>=p&&(b=4*f+4*r*(g-1),m=d+(l+f)*(g<<1),g>>=1)),y===h)m+=4;else{var w=t[u+3*y],x=t[u+3*y+1],E=t[u+3*y+2];n[m++]=w,n[m++]=x,n[m++]=E,n[m++]=255}--c}}}}catch(t){}},{}],65:[function(t,e,r){(function(t){"use strict";class r{constructor(...e){if(0===e.length)throw new Error("constructor requires parameters");const i=e[0];if(null!==i&&"object"==typeof i)if(i instanceof r){const e=i.bitmap;this.bitmap={width:e.width,height:e.height,data:new t(e.width*e.height*4)},e.data.copy(this.bitmap.data)}else{if(!(i.width&&i.height&&i.data))throw new Error("unrecognized constructor parameters");this.bitmap=i}else{if("number"!=typeof i||"number"!=typeof e[1])throw new Error("unrecognized constructor parameters");{const r=i,n=e[1],a=e[2];this.bitmap={width:r,height:n},t.isBuffer(a)?this.bitmap.data=a:(this.bitmap.data=new t(r*n*4),"number"==typeof a&&this.fillRGBA(a))}}}blit(t,e,r,i,n,a,o){if(i+a>this.bitmap.width)throw new Error("copy exceeds width of source bitmap");if(e+a>t.bitmap.width)throw new Error("copy exceeds width of target bitmap");if(n+o>this.bitmap.height)throw new Error("copy exceeds height of source bitmap");if(r+o>t.bitmap.height)throw new Erro("copy exceeds height of target bitmap");const s=this.bitmap.data,u=t.bitmap.data,h=4*this.bitmap.width,l=4*t.bitmap.width,f=4*a;let c=n*h+4*i,d=r*l+4*e;for(;--o>=0;)s.copy(u,d,c,c+f),c+=h,d+=l;return this}fillRGBA(t){const e=this.bitmap.data,r=4*this.bitmap.height;let i=0;for(;i<r;)e.writeUInt32BE(t,i),i+=4;for(;i<e.length;)e.copy(e,i,0,r),i+=r;return this}getRGBA(t,e){const r=4*(e*this.bitmap.width+t);return this.bitmap.data.readUInt32BE(r)}getRGBASet(){const t=new Set,e=this.bitmap.data;for(let r=0;r<e.length;r+=4)t.add(e.readUInt32BE(r,!0));return t}greyscale(){const t=this.bitmap.data;return this.scan(0,0,this.bitmap.width,this.bitmap.height,((e,r,i)=>{const n=Math.round(.299*t[i]+.587*t[i+1]+.114*t[i+2]);t[i]=n,t[i+1]=n,t[i+2]=n})),this}reframe(t,e,i,n,a){const o=t<0?0:t,s=e<0?0:e,u=i+o>this.bitmap.width?this.bitmap.width-o:i,h=n+s>this.bitmap.height?this.bitmap.height-s:n,l=t<0?-t:0,f=e<0?-e:0;let c;if(void 0===a){if(o!==t||s!=e||u!==i||h!==n)throw new GifError("fillRGBA required for this reframing");c=new r(i,n)}else c=new r(i,n,a);return this.blit(c,l,f,o,s,u,h),this.bitmap=c.bitmap,this}scale(e){if(1===e)return;if(!Number.isInteger(e)||e<1)throw new Error("the scale must be an integer >= 1");const r=this.bitmap.width,i=this.bitmap.height,n=r*e*4,a=this.bitmap.data,o=new t(i*n*e);let s,u=0,h=0;for(let t=0;t<i;++t){s=h;for(let t=0;t<r;++t){const t=a.readUInt32BE(u,!0);for(let r=0;r<e;++r)o.writeUInt32BE(t,h),h+=4;u+=4}for(let t=1;t<e;++t)o.copy(o,h,s,h),h+=n,s+=n}return this.bitmap={width:r*e,height:i*e,data:o},this}scanAllCoords(t){const e=this.bitmap.width,r=this.bitmap.data.length;let i=0,n=0;for(let a=0;a<r;a+=4)t(i,n,a),++i===e&&(i=0,++n)}scanAllIndexes(t){const e=this.bitmap.data.length;for(let r=0;r<e;r+=4)t(r)}}e.exports=r}).call(this,t("buffer").Buffer)},{buffer:48}],66:[function(t,e,r){"use strict";class i{constructor(t,e,r){this.width=r.width,this.height=r.height,this.loops=r.loops,this.usesTransparency=r.usesTransparency,this.colorScope=r.colorScope,this.frames=e,this.buffer=t}}i.GlobalColorsPreferred=0,i.GlobalColorsOnly=1,i.LocalColorsOnly=2;class n extends Error{constructor(t){super(t),t instanceof Error&&(this.stack="Gif"+t.stack)}}r.Gif=i,r.GifError=n},{}],67:[function(t,e,r){(function(e,i){"use strict";const n=t("omggif"),{Gif:a,GifError:o}=t("./gif");let s;e.nextTick((()=>{s=t("./gifutil")}));const{GifFrame:u}=t("./gifframe");function h(t,e){const r=t.indexOf(e);return-1===r?null:r}function l(t,e){for(var r,i=0,n=t.length-1;i<=n;)if(t[r=Math.floor((i+n)/2)]>e)n=r-1;else{if(!(t[r]<e))return r;i=r+1}return null}function f(t){const e=t.colors;t.usesTransparency&&e.push(0);const r=e.length;let i=2;for(;r>i;)i<<=1;e.length=i,e.fill(0,r)}function c(t,e){let r=t.bitmap.width*t.bitmap.height;return r=Math.ceil(r*e/8),r+=Math.ceil(r/255),100+r+768}function d(t){let e=t.indexCount,r=0;for(--e;e;)++r,e>>=1;return r>0?r:1}function p(t,e,r,n,a){if(r.interlaced)throw new o("writing interlaced GIFs is not supported");const s=function(t,e,r){const n=r.colors,a=n.length<=8?h:l,s=e.bitmap.data,u=new i(s.length/4);let f=n.length,c=0,d=0;for(;c<s.length;){if(0!==s[c+3]){const t=s.readUInt32BE(c,!0)>>8&16777215;u[d]=a(n,t)}else u[d]=f;c+=4,++d}if(r.usesTransparency){if(256===f)throw new o(`Frame ${t} already has 256 colorsand so can't use transparency`)}else f=null;return{buffer:u,transparentIndex:f}}(e,r,n),u={delay:r.delayCentisecs,disposal:r.disposalMethod,transparent:s.transparentIndex};a&&(f(n),u.palette=n.colors);try{let e,n=t.getOutputBuffer(),a=t.getOutputBufferPosition(),o=!0;for(;o;)if(e=t.addFrame(r.xOffset,r.yOffset,r.bitmap.width,r.bitmap.height,s.buffer,u),o=!1,e>=n.length-1){const e=new i(1.5*n.length);n.copy(e),t.setOutputBuffer(e),t.setOutputBufferPosition(a),n=e,o=!0}return n}catch(t){throw new o(t)}}r.GifCodec=class{constructor(t={}){this._transparentRGB=null,"number"==typeof t.transparentRGB&&0!==t.transparentRGB&&(this._transparentRGBA=256*t.transparentRGB),this._testInitialBufferSize=0}decodeGif(t){try{let e;try{e=new n.GifReader(t)}catch(t){throw new o(t)}const r=e.numFrames(),i=[],s={width:e.width,height:e.height,loops:e.loopCount(),usesTransparency:!1};for(let t=0;t<r;++t){const r=this._decodeFrame(e,t,s.usesTransparency);i.push(r.frame),r.usesTransparency&&(s.usesTransparency=!0)}return Promise.resolve(new a(t,i,s))}catch(t){return Promise.reject(t)}}encodeGif(t,e={}){try{if(null===t||0===t.length)throw new o("there are no frames");const r=s.getMaxDimensions(t);return(e=Object.assign({},e)).width=r.maxWidth,e.height=r.maxHeight,e.loops=e.loops||0,e.colorScope=e.colorScope||a.GlobalColorsPreferred,Promise.resolve(this._encodeGif(t,e))}catch(t){return Promise.reject(t)}}_decodeFrame(t,e,r){let n,a;try{if(n=t.frameInfo(e),a=new i(t.width*t.height*4),t.decodeAndBlitFrameRGBA(e,a),n.width!==t.width||n.height!==t.height){if(n.y&&(a=a.slice(n.y*t.width*4)),t.width>n.width)for(let e=0;e<n.height;++e)a.copy(a,e*n.width*4,4*(n.x+e*t.width),4*(n.x+e*t.width)+4*n.width);a=a.slice(0,n.width*n.height*4)}}catch(t){throw new o(t)}let s=!1;if(null===this._transparentRGBA){if(!r)for(let t=3;t<a.length;t+=4)0===a[t]&&(s=!0,t=a.length)}else for(let t=3;t<a.length;t+=4)0===a[t]&&(a.writeUInt32BE(this._transparentRGBA,t-3),s=!0);return{frame:new u(n.width,n.height,a,{xOffset:n.x,yOffset:n.y,disposalMethod:n.disposal,interlaced:n.interlaced,delayCentisecs:n.delay}),usesTransparency:s}}_encodeGif(t,e){let r;if(e.colorScope===a.LocalColorsOnly)r=s.getColorInfo(t,0);else if(r=s.getColorInfo(t,256),!r.colors){if(e.colorScope===a.GlobalColorsOnly)throw new o("Too many color indexes for global color table");e.colorScope=a.LocalColorsOnly}e.usesTransparency=r.usesTransparency;const u=r.palettes;if(e.colorScope===a.LocalColorsOnly){return function(t,e,r,s){const u={loop:e.loops};let h,l=new i(r);try{h=new n.GifWriter(l,e.width,e.height,u)}catch(t){throw new o(t)}for(let e=0;e<t.length;++e)l=p(h,e,t[e],s[e],!0);return new a(l.slice(0,h.end()),t,e)}(t,e,2e3,u)}return function(t,e,r,s){const u={colors:s.colors.slice(),usesTransparency:s.usesTransparency};f(u);const h={palette:u.colors,loop:e.loops};let l,c=new i(r);try{l=new n.GifWriter(c,e.width,e.height,h)}catch(t){throw new o(t)}for(let e=0;e<t.length;++e)c=p(l,e,t[e],s,!1);return new a(c.slice(0,l.end()),t,e)}(t,e,2e3,r)}_getSizeEstimateGlobal(t,e){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let r=968;const i=d(t);return e.forEach((t=>{r+=c(t,i)})),r}_getSizeEstimateLocal(t,e){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let r=200;for(let i=0;i<e.length;++i){const n=d(t[i]);r+=c(e[i],n)}return r}}}).call(this,t("_process"),t("buffer").Buffer)},{"./gif":66,"./gifframe":68,"./gifutil":69,_process:133,buffer:48,omggif:64}],68:[function(t,e,r){"use strict";const i=t("./bitmapimage"),{GifError:n}=t("./gif");class a extends i{constructor(...t){if(super(...t),t[0]instanceof a){const e=t[0];this.xOffset=e.xOffset,this.yOffset=e.yOffset,this.disposalMethod=e.disposalMethod,this.delayCentisecs=e.delayCentisecs,this.interlaced=e.interlaced}else{const e=t[t.length-1];let r={};"object"!=typeof e||e instanceof i||(r=e),this.xOffset=r.xOffset||0,this.yOffset=r.yOffset||0,this.disposalMethod=void 0!==r.disposalMethod?r.disposalMethod:a.DisposeToBackgroundColor,this.delayCentisecs=r.delayCentisecs||8,this.interlaced=r.interlaced||!1}}getPalette(){const t=new Set,e=this.bitmap.data;let r=0,i=!1;for(;r<e.length;){if(0===e[r+3])i=!0;else{const i=e.readUInt32BE(r,!0)>>8&16777215;t.add(i)}r+=4}const n=new Array(t.size),a=t.values();for(r=0;r<n.length;++r)n[r]=a.next().value;n.sort(((t,e)=>t-e));let o=n.length;return i&&++o,{colors:n,usesTransparency:i,indexCount:o}}}a.DisposeToAnything=0,a.DisposeNothing=1,a.DisposeToBackgroundColor=2,a.DisposeToPrevious=3,r.GifFrame=a},{"./bitmapimage":65,"./gif":66}],69:[function(t,e,r){(function(e){"use strict";const i=t("fs"),n=t("image-q"),a=t("./bitmapimage"),{GifFrame:o}=t("./gifframe"),{GifError:s}=t("./gif"),{GifCodec:u}=t("./gifcodec"),h=[".jpg",".jpeg",".png",".bmp"],l=new u;function f(t,e,r,i,a){const o=Array.isArray(t)?t:[t];if(a){if(["FloydSteinberg","FalseFloydSteinberg","Stucki","Atkinson","Jarvis","Burkes","Sierra","TwoSierra","SierraLite"].indexOf(a.ditherAlgorithm)<0)throw new Error(`Invalid ditherAlgorithm '${a.ditherAlgorithm}'`);void 0===a.serpentine&&(a.serpentine=!0),void 0===a.minimumColorDistanceToDither&&(a.minimumColorDistanceToDither=0),void 0===a.calculateErrorLikeGIMP&&(a.calculateErrorLikeGIMP=!1)}const s=new n.distance.Euclidean,u=new n.palette[e](s,r,i);let h;h=a?new n.image.ErrorDiffusionArray(s,n.image.ErrorDiffusionArrayKernel[a.ditherAlgorithm],a.serpentine,a.minimumColorDistanceToDither,a.calculateErrorLikeGIMP):new n.image.NearestColor(s);const l=[];o.forEach((t=>{const e=t.bitmap.data,r=new ArrayBuffer(e.length),i=new Uint32Array(r);for(let t=0,r=0;t<e.length;t+=4,++r)i[r]=e.readUInt32LE(t,!0);const a=n.utils.PointContainer.fromUint32Array(i,t.bitmap.width,t.bitmap.height);u.sample(a),l.push(a)}));const f=u.quantize();for(let t=0;t<o.length;++t){const e=o[t].bitmap.data,r=h.quantize(l[t],f).toUint32Array();for(let t=0,i=0;t<e.length;t+=4,++i)e.writeUInt32LE(r[i],t)}}r.cloneFrames=function(t){let e=[];return t.forEach((t=>{e.push(new o(t))})),e},r.getColorInfo=function(t,e){let r=!1;const i=[];for(let e=0;e<t.length;++e){let n=t[e].getPalette();if(n.usesTransparency&&(r=!0),n.indexCount>256)throw new s(`Frame ${e} uses more than 256 color indexes`);i.push(n)}if(0===e)return{usesTransparency:r,palettes:i};const n=new Set;i.forEach((t=>{t.colors.forEach((t=>{n.add(t)}))}));let a=n.size;if(r&&++a,e&&a>e)return{usesTransparency:r,palettes:i};const o=new Array(n.size),u=n.values();for(let t=0;t<o.length;++t)o[t]=u.next().value;return o.sort(((t,e)=>t-e)),{colors:o,indexCount:a,usesTransparency:r,palettes:i}},r.copyAsJimp=function(t,e){return r.shareAsJimp(t,new a(e))},r.getMaxDimensions=function(t){let e=0,r=0;return t.forEach((t=>{const i=t.xOffset+t.bitmap.width;i>e&&(e=i);const n=t.yOffset+t.bitmap.height;n>r&&(r=n)})),{maxWidth:e,maxHeight:r}},r.quantizeDekker=function(t,e,r){f(t,"NeuQuantFloat",e=e||256,0,r)},r.quantizeSorokin=function(t,e,r,i){let n;switch(e=e||256,r=r||"min-pop"){case"min-pop":n=2;break;case"top-pop":n=1;break;default:throw new Error(`Invalid quantizeSorokin histogram '${r}'`)}f(t,"RGBQuant",e,n,i)},r.quantizeWu=function(t,e,r,i){if(e=e||256,(r=r||5)<1||r>8)throw new Error("Invalid quantization quality");f(t,"WuQuant",e,r,i)},r.read=function(t,r){return r=r||l,e.isBuffer(t)?r.decodeGif(t):(n=t,new Promise(((t,e)=>{i.readFile(n,((r,i)=>r?e(r):t(i)))}))).then((t=>r.decodeGif(t)));var n},r.shareAsJimp=function(t,e){const r=new t(e.bitmap.width,e.bitmap.height,0);return r.bitmap.data=e.bitmap.data,r},r.write=function(t,e,r,n){n=n||l;const a=t.match(/\.[a-zA-Z]+$/);if(null!==a&&h.includes(a[0].toLowerCase()))throw new Error(`GIF '${t}' has an unexpected suffix`);return n.encodeGif(e,r).then((e=>function(t,e){return new Promise(((r,n)=>{i.writeFile(t,e,(t=>t?n(t):r()))}))}(t,e.buffer).then((()=>e))))}}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":76,"./bitmapimage":65,"./gif":66,"./gifcodec":67,"./gifframe":68,fs:47,"image-q":74}],70:[function(t,e,r){"use strict";const i=t("./bitmapimage"),{Gif:n,GifError:a}=t("./gif"),{GifCodec:o}=t("./gifcodec"),{GifFrame:s}=t("./gifframe"),u=t("./gifutil");e.exports={BitmapImage:i,Gif:n,GifCodec:o,GifFrame:s,GifUtil:u,GifError:a}},{"./bitmapimage":65,"./gif":66,"./gifcodec":67,"./gifframe":68,"./gifutil":69}],71:[function(t,e,r){(function(t){var r;r=void 0!==window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{})},{}],72:[function(t,e,r){var i=t("http"),n=t("url"),a=e.exports;for(var o in i)i.hasOwnProperty(o)&&(a[o]=i[o]);function s(t){if("string"==typeof t&&(t=n.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}a.request=function(t,e){return t=s(t),i.request.call(this,t,e)},a.get=function(t,e){return t=s(t),i.get.call(this,t,e)}},{http:156,url:180}],73:[function(t,e,r){r.read=function(t,e,r,i,n){var a,o,s=8*n-i-1,u=(1<<s)-1,h=u>>1,l=-7,f=r?n-1:0,c=r?-1:1,d=t[e+f];for(f+=c,a=d&(1<<-l)-1,d>>=-l,l+=s;l>0;a=256*a+t[e+f],f+=c,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=i;l>0;o=256*o+t[e+f],f+=c,l-=8);if(0===a)a=1-h;else{if(a===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,i),a-=h}return(d?-1:1)*o*Math.pow(2,a-i)},r.write=function(t,e,r,i,n,a){var o,s,u,h=8*a-n-1,l=(1<<h)-1,f=l>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:a-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+f>=1?c/u:c*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=l?(s=0,o=l):o+f>=1?(s=(e*u-1)*Math.pow(2,n),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,n),o=0));n>=8;t[r+d]=255&s,d+=p,s/=256,n-=8);for(o=o<<n|s,h+=n;h>0;t[r+d]=255&o,d+=p,o/=256,h-=8);t[r+d-p]|=128*m}},{}],74:[function(t,e,r){var i,n;i=this,n=function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=t,r.c=e,r.p="",r(0)}([function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* iq.ts - Image Quantization Library
*/var i=r(1);e.constants=i;var n=r(3);e.conversion=n;var a=r(12);e.distance=a;var o=r(20);e.palette=o;var s=r(30);e.image=s;var u=r(35);e.quality=u;var h=r(37);e.utils=h},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* constants.ts - part of Image Quantization Library
*/var i=r(2);e.bt709=i},function(t,e){
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* constants.ts - part of Image Quantization Library
*/
"use strict";var r,i,n;!function(t){t[t.RED=.2126]="RED",t[t.GREEN=.7152]="GREEN",t[t.BLUE=.0722]="BLUE",t[t.WHITE=1]="WHITE"}(r||(r={})),e.Y=r,function(t){t[t.RED=.64]="RED",t[t.GREEN=.3]="GREEN",t[t.BLUE=.15]="BLUE",t[t.WHITE=.3127]="WHITE"}(i||(i={})),e.x=i,function(t){t[t.RED=.33]="RED",t[t.GREEN=.6]="GREEN",t[t.BLUE=.06]="BLUE",t[t.WHITE=.329]="WHITE"}(n||(n={})),e.y=n},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* iq.ts - Image Quantization Library
*/var i=r(4);e.rgb2xyz=i.rgb2xyz;var n=r(5);e.rgb2hsl=n.rgb2hsl;var a=r(7);e.rgb2lab=a.rgb2lab;var o=r(9);e.lab2xyz=o.lab2xyz;var s=r(10);e.lab2rgb=s.lab2rgb;var u=r(8);e.xyz2lab=u.xyz2lab;var h=r(11);e.xyz2rgb=h.xyz2rgb},function(t,e){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* rgb2xyz.ts - part of Image Quantization Library
*/function r(t){return t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92}e.rgb2xyz=function(t,e,i){return{x:.4124*(t=r(t/255))+.3576*(e=r(e/255))+.1805*(i=r(i/255)),y:.2126*t+.7152*e+.0722*i,z:.0193*t+.1192*e+.9505*i}}},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* rgb2hsl.ts - part of Image Quantization Library
*/var i=r(6);e.rgb2hsl=function(t,e,r){var n=i.min3(t,e,r),a=i.max3(t,e,r),o=a-n,s=(n+a)/510,u=0;s>0&&s<1&&(u=o/(s<.5?a+n:510-a-n));var h=0;return o>0&&(h=a===t?(e-r)/o:a===e?2+(r-t)/o:4+(t-e)/o,(h*=60)<0&&(h+=360)),{h:h,s:u,l:s}}},function(t,e){"use strict";e.degrees2radians=function(t){return t*(Math.PI/180)},e.max3=function(t,e,r){var i=t;return i<e&&(i=e),i<r&&(i=r),i},e.min3=function(t,e,r){var i=t;return i>e&&(i=e),i>r&&(i=r),i},e.intInRange=function(t,e,r){return t>r&&(t=r),t<e&&(t=e),0|t},e.inRange0to255Rounded=function(t){return(t=Math.round(t))>255?t=255:t<0&&(t=0),t},e.inRange0to255=function(t){return t>255?t=255:t<0&&(t=0),t},e.stableSort=function(t,e){var r,i=typeof t[0];if("number"===i||"string"===i){for(var n=Object.create(null),a=0,o=t.length;a<o;a++){var s=t[a];n[s]||0===n[s]||(n[s]=a)}r=t.sort((function(t,r){return e(t,r)||n[t]-n[r]}))}else{var u=t.slice(0);r=t.sort((function(t,r){return e(t,r)||u.indexOf(t)-u.indexOf(r)}))}return r}},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* rgb2lab.ts - part of Image Quantization Library
*/var i=r(4),n=r(8);e.rgb2lab=function(t,e,r){var a=i.rgb2xyz(t,e,r);return n.xyz2lab(a.x,a.y,a.z)}},function(t,e){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* xyz2lab.ts - part of Image Quantization Library
*/function r(t){return t>.008856?Math.pow(t,1/3):7.787*t+16/116}e.xyz2lab=function(t,e,i){if(t=r(t/.95047),e=r(e/1),i=r(i/1.08883),116*e-16<0)throw new Error("xxx");return{L:Math.max(0,116*e-16),a:500*(t-e),b:200*(e-i)}}},function(t,e){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* lab2xyz.ts - part of Image Quantization Library
*/function r(t){return t>.206893034?Math.pow(t,3):(t-16/116)/7.787}e.lab2xyz=function(t,e,i){var n=(t+16)/116,a=n-i/200;return{x:.95047*r(e/500+n),y:1*r(n),z:1.08883*r(a)}}},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* lab2rgb.ts - part of Image Quantization Library
*/var i=r(9),n=r(11);e.lab2rgb=function(t,e,r){var a=i.lab2xyz(t,e,r);return n.xyz2rgb(a.x,a.y,a.z)}},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* xyz2rgb.ts - part of Image Quantization Library
*/var i=r(6);function n(t){return t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t}e.xyz2rgb=function(t,e,r){var a=n(3.2406*t+-1.5372*e+-.4986*r),o=n(-.9689*t+1.8758*e+.0415*r),s=n(.0557*t+-.204*e+1.057*r);return{r:i.inRange0to255Rounded(255*a),g:i.inRange0to255Rounded(255*o),b:i.inRange0to255Rounded(255*s)}}},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* iq.ts - Image Quantization Library
*/var i=r(13);e.AbstractDistanceCalculator=i.AbstractDistanceCalculator;var n=r(14);e.CIE94Textiles=n.CIE94Textiles,e.CIE94GraphicArts=n.CIE94GraphicArts;var a=r(15);e.CIEDE2000=a.CIEDE2000;var o=r(16);e.CMETRIC=o.CMETRIC;var s=r(17);e.AbstractEuclidean=s.AbstractEuclidean,e.Euclidean=s.Euclidean,e.EuclideanRgbQuantWOAlpha=s.EuclideanRgbQuantWOAlpha,e.EuclideanRgbQuantWithAlpha=s.EuclideanRgbQuantWithAlpha;var u=r(18);e.AbstractManhattan=u.AbstractManhattan,e.Manhattan=u.Manhattan,e.ManhattanSRGB=u.ManhattanSRGB,e.ManhattanNommyde=u.ManhattanNommyde;var h=r(19);e.PNGQUANT=h.PNGQUANT},function(t,e){"use strict";var r=function(){function t(){this._setDefaults(),this.setWhitePoint(255,255,255,255)}return t.prototype.setWhitePoint=function(t,e,r,i){this._whitePoint={r:t>0?255/t:0,g:e>0?255/e:0,b:r>0?255/r:0,a:i>0?255/i:0},this._maxDistance=this.calculateRaw(t,e,r,i,0,0,0,0)},t.prototype.calculateNormalized=function(t,e){return this.calculateRaw(t.r,t.g,t.b,t.a,e.r,e.g,e.b,e.a)/this._maxDistance},t.prototype._setDefaults=function(){},t}();e.AbstractDistanceCalculator=r},function(t,e,r){"use strict";var i=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},n=r(13),a=r(7),o=r(6),s=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype.calculateRaw=function(t,e,r,i,n,s,u,h){var l=a.rgb2lab(o.inRange0to255(t*this._whitePoint.r),o.inRange0to255(e*this._whitePoint.g),o.inRange0to255(r*this._whitePoint.b)),f=a.rgb2lab(o.inRange0to255(n*this._whitePoint.r),o.inRange0to255(s*this._whitePoint.g),o.inRange0to255(u*this._whitePoint.b)),c=l.L-f.L,d=l.a-f.a,p=l.b-f.b,m=Math.sqrt(l.a*l.a+l.b*l.b),b=m-Math.sqrt(f.a*f.a+f.b*f.b),g=d*d+p*p-b*b;g=g<0?0:Math.sqrt(g);var _=(h-i)*this._whitePoint.a*this._kA;return Math.sqrt(Math.pow(c/this._Kl,2)+Math.pow(b/(1+this._K1*m),2)+Math.pow(g/(1+this._K2*m),2)+Math.pow(_,2))},e}(n.AbstractDistanceCalculator);
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* cie94.ts - part of Image Quantization Library
*/e.AbstractCIE94=s;var u=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype._setDefaults=function(){this._Kl=2,this._K1=.048,this._K2=.014,this._kA=12.5/255},e}(s);e.CIE94Textiles=u;var h=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype._setDefaults=function(){this._Kl=1,this._K1=.045,this._K2=.015,this._kA=25/255},e}(s);e.CIE94GraphicArts=h},function(t,e,r){"use strict";var i=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},n=r(13),a=r(7),o=r(6),s=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype.calculateRaw=function(t,r,i,n,s,u,h,l){var f=a.rgb2lab(o.inRange0to255(t*this._whitePoint.r),o.inRange0to255(r*this._whitePoint.g),o.inRange0to255(i*this._whitePoint.b)),c=a.rgb2lab(o.inRange0to255(s*this._whitePoint.r),o.inRange0to255(u*this._whitePoint.g),o.inRange0to255(h*this._whitePoint.b)),d=(l-n)*this._whitePoint.a*e._kA,p=this.calculateRawInLab(f,c);return Math.sqrt(p+d*d)},e.prototype.calculateRawInLab=function(t,r){var i=t.L,n=t.a,a=t.b,o=r.L,s=r.a,u=r.b,h=Math.sqrt(n*n+a*a),l=Math.sqrt(s*s+u*u),f=Math.pow((h+l)/2,7),c=.5*(1-Math.sqrt(f/(f+e._pow25to7))),d=(1+c)*n,p=(1+c)*s,m=Math.sqrt(d*d+a*a),b=Math.sqrt(p*p+u*u),g=m*b,_=e._calculatehp(a,d),v=e._calculatehp(u,p),y=Math.abs(_-v),w=o-i,x=b-m,E=e._calculate_dHp(g,y,v,_),S=e._calculate_ahp(g,y,_,v),k=e._calculateT(S),M=(m+b)/2,A=Math.pow((i+o)/2-50,2),I=1+.015*A/Math.sqrt(20+A),T=1+.045*M,R=1+.015*k*M,P=e._calculateRT(S,M),C=w/I,O=x/T,L=E/R;return Math.pow(C,2)+Math.pow(O,2)+Math.pow(L,2)+P*O*L},e._calculatehp=function(t,r){var i=Math.atan2(t,r);return i>=0?i:i+e._deg360InRad},e._calculateRT=function(t,r){var i=Math.pow(r,7),n=2*Math.sqrt(i/(i+e._pow25to7)),a=e._deg30InRad*Math.exp(-Math.pow((t-e._deg275InRad)/e._deg25InRad,2));return-Math.sin(2*a)*n},e._calculateT=function(t){return 1-.17*Math.cos(t-e._deg30InRad)+.24*Math.cos(2*t)+.32*Math.cos(3*t+e._deg6InRad)-.2*Math.cos(4*t-e._deg63InRad)},e._calculate_ahp=function(t,r,i,n){var a=i+n;return 0==t?a:r<=e._deg180InRad?a/2:a<e._deg360InRad?(a+e._deg360InRad)/2:(a-e._deg360InRad)/2},e._calculate_dHp=function(t,r,i,n){var a;return a=0==t?0:r<=e._deg180InRad?i-n:i<=n?i-n+e._deg360InRad:i-n-e._deg360InRad,2*Math.sqrt(t)*Math.sin(a/2)},e._kA=25/255,e._pow25to7=Math.pow(25,7),e._deg360InRad=o.degrees2radians(360),e._deg180InRad=o.degrees2radians(180),e._deg30InRad=o.degrees2radians(30),e._deg6InRad=o.degrees2radians(6),e._deg63InRad=o.degrees2radians(63),e._deg275InRad=o.degrees2radians(275),e._deg25InRad=o.degrees2radians(25),e}(n.AbstractDistanceCalculator);
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* ciede2000.ts - part of Image Quantization Library
*/e.CIEDE2000=s},function(t,e,r){"use strict";var i=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},n=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype.calculateRaw=function(t,e,r,i,n,a,o,s){var u=(t+n)/2*this._whitePoint.r,h=(t-n)*this._whitePoint.r,l=(e-a)*this._whitePoint.g,f=(r-o)*this._whitePoint.b,c=((512+u)*h*h>>8)+4*l*l+((767-u)*f*f>>8),d=(s-i)*this._whitePoint.a;return Math.sqrt(c+d*d)},e}(r(13).AbstractDistanceCalculator);
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* cmetric.ts - part of Image Quantization Library
*/e.CMETRIC=n},function(t,e,r){"use strict";var i=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},n=r(13),a=r(2),o=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype.calculateRaw=function(t,e,r,i,n,a,o,s){var u=n-t,h=a-e,l=o-r,f=s-i;return Math.sqrt(this._kR*u*u+this._kG*h*h+this._kB*l*l+this._kA*f*f)},e}(n.AbstractDistanceCalculator);
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* euclidean.ts - part of Image Quantization Library
*/e.AbstractEuclidean=o;var s=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype._setDefaults=function(){this._kR=1,this._kG=1,this._kB=1,this._kA=1},e}(o);e.Euclidean=s;var u=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype._setDefaults=function(){this._kR=a.Y.RED,this._kG=a.Y.GREEN,this._kB=a.Y.BLUE,this._kA=1},e}(o);e.EuclideanRgbQuantWithAlpha=u;var h=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype._setDefaults=function(){this._kR=a.Y.RED,this._kG=a.Y.GREEN,this._kB=a.Y.BLUE,this._kA=0},e}(o);e.EuclideanRgbQuantWOAlpha=h},function(t,e,r){"use strict";var i=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},n=r(13),a=r(2),o=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype.calculateRaw=function(t,e,r,i,n,a,o,s){var u=n-t,h=a-e,l=o-r,f=s-i;return u<0&&(u=0-u),h<0&&(h=0-h),l<0&&(l=0-l),f<0&&(f=0-f),this._kR*u+this._kG*h+this._kB*l+this._kA*f},e}(n.AbstractDistanceCalculator);
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* manhattanNeuQuant.ts - part of Image Quantization Library
*/e.AbstractManhattan=o;var s=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype._setDefaults=function(){this._kR=1,this._kG=1,this._kB=1,this._kA=1},e}(o);e.Manhattan=s;var u=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype._setDefaults=function(){this._kR=.4984,this._kG=.8625,this._kB=.2979,this._kA=1},e}(o);e.ManhattanNommyde=u;var h=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype._setDefaults=function(){this._kR=a.Y.RED,this._kG=a.Y.GREEN,this._kB=a.Y.BLUE,this._kA=1},e}(o);e.ManhattanSRGB=h},function(t,e,r){"use strict";var i=this&&this.__extends||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},n=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype.calculateRaw=function(t,e,r,i,n,a,o,s){var u=(s-i)*this._whitePoint.a;return this._colordifference_ch(t*this._whitePoint.r,n*this._whitePoint.r,u)+this._colordifference_ch(e*this._whitePoint.g,a*this._whitePoint.g,u)+this._colordifference_ch(r*this._whitePoint.b,o*this._whitePoint.b,u)},e.prototype._colordifference_ch=function(t,e,r){var i=t-e,n=i+r;return i*i+n*n},e}(r(13).AbstractDistanceCalculator);
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* pngQuant.ts - part of Image Quantization Library
*/e.PNGQUANT=n},function(t,e,r){"use strict";var i=r(21);e.NeuQuant=i.NeuQuant;var n=r(25);e.NeuQuantFloat=n.NeuQuantFloat;var a=r(26);e.RGBQuant=a.RGBQuant;var o=r(27);e.ColorHistogram=o.ColorHistogram;var s=r(29);e.WuQuant=s.WuQuant,e.WuColorCube=s.WuColorCube},function(t,e,r){"use strict";
/**
* @preserve TypeScript port:
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* neuquant.ts - part of Image Quantization Library
*/var i=r(22),n=r(24),a=function(){function t(t){this.r=this.g=this.b=this.a=t}return t.prototype.toPoint=function(){return n.Point.createByRGBA(this.r>>3,this.g>>3,this.b>>3,this.a>>3)},t.prototype.subtract=function(t,e,r,i){this.r-=0|t,this.g-=0|e,this.b-=0|r,this.a-=0|i},t}(),o=function(){function t(t,e){void 0===e&&(e=256),this._distance=t,this._pointArray=[],this._sampleFactor=1,this._networkSize=e,this._distance.setWhitePoint(2040,2040,2040,2040)}return t.prototype.sample=function(t){this._pointArray=this._pointArray.concat(t.getPointArray())},t.prototype.quantize=function(){return this._init(),this._learn(),this._buildPalette()},t.prototype._init=function(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(var e=0;e<this._networkSize;e++)this._network[e]=new a((e<<11)/this._networkSize|0),this._freq[e]=t._initialBias/this._networkSize|0,this._bias[e]=0},t.prototype._learn=function(){var e=this._sampleFactor,r=this._pointArray.length;r<t._minpicturebytes&&(e=1);var i,n=30+(e-1)/3|0,a=r/e|0,o=a/t._nCycles|0,s=t._initAlpha,u=(this._networkSize>>3)*t._radiusBias,h=u>>t._radiusBiasShift;h<=1&&(h=0);for(var l=0;l<h;l++)this._radPower[l]=s*((h*h-l*l)*t._radBias/(h*h))>>>0;i=r<t._minpicturebytes?1:r%t._prime1!=0?t._prime1:r%t._prime2!=0?t._prime2:r%t._prime3!=0?t._prime3:t._prime4,l=0;for(var f=0;l<a;){var c=this._pointArray[f],d=c.b<<3,p=c.g<<3,m=c.r<<3,b=c.a<<3,g=this._contest(d,p,m,b);if(this._alterSingle(s,g,d,p,m,b),0!==h&&this._alterNeighbour(h,g,d,p,m,b),(f+=i)>=r&&(f-=r),0===o&&(o=1),++l%o==0){s-=s/n|0,(h=(u-=u/t._radiusDecrease|0)>>t._radiusBiasShift)<=1&&(h=0);for(var _=0;_<h;_++)this._radPower[_]=s*((h*h-_*_)*t._radBias/(h*h))>>>0}}},t.prototype._buildPalette=function(){var t=new i.Palette;return this._network.forEach((function(e){t.add(e.toPoint())})),t.sort(),t},t.prototype._alterNeighbour=function(e,r,i,n,a,o){var s=r-e;s<-1&&(s=-1);var u=r+e;u>this._networkSize&&(u=this._networkSize);for(var h=r+1,l=r-1,f=1;h<u||l>s;){var c,d=this._radPower[f++]/t._alphaRadBias;h<u&&(c=this._network[h++]).subtract(d*(c.r-a),d*(c.g-n),d*(c.b-i),d*(c.a-o)),l>s&&(c=this._network[l--]).subtract(d*(c.r-a),d*(c.g-n),d*(c.b-i),d*(c.a-o))}},t.prototype._alterSingle=function(e,r,i,n,a,o){e/=t._initAlpha;var s=this._network[r];s.subtract(e*(s.r-a),e*(s.g-n),e*(s.b-i),e*(s.a-o))},t.prototype._contest=function(e,r,i,n){for(var a=~(1<<31),o=a,s=-1,u=s,h=0;h<this._networkSize;h++){var l=this._network[h],f=8160*this._distance.calculateNormalized(l,{r:i,g:r,b:e,a:n})|0;f<a&&(a=f,s=h);var c=f-(this._bias[h]>>t._initialBiasShift-3);c<o&&(o=c,u=h);var d=this._freq[h]>>t._betaShift;this._freq[h]-=d,this._bias[h]+=d<<t._gammaShift}return this._freq[s]+=t._beta,this._bias[s]-=t._betaGamma,u},t._prime1=499,t._prime2=491,t._prime3=487,t._prime4=503,t._minpicturebytes=t._prime4,t._nCycles=100,t._initialBiasShift=16,t._initialBias=1<<t._initialBiasShift,t._gammaShift=10,t._betaShift=10,t._beta=t._initialBias>>t._betaShift,t._betaGamma=t._initialBias<<t._gammaShift-t._betaShift,t._radiusBiasShift=6,t._radiusBias=1<<t._radiusBiasShift,t._radiusDecrease=30,t._alphaBiasShift=10,t._initAlpha=1<<t._alphaBiasShift,t._radBiasShift=8,t._radBias=1<<t._radBiasShift,t._alphaRadBiasShift=t._alphaBiasShift+t._radBiasShift,t._alphaRadBias=1<<t._alphaRadBiasShift,t}();e.NeuQuant=o},function(t,e,r){
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* palette.ts - part of Image Quantization Library
*/
"use strict";var i=r(23),n=r(5);function a(t,e){for(var r=360/e,i=1,n=r-r/2;i<e;i++,n+=r)if(t>=n&&t<n+r)return i;return 0}e.hueGroup=a;var o=function(){function t(){this._pointArray=[],this._i32idx={},this._pointContainer=new i.PointContainer,this._pointContainer.setHeight(1),this._pointArray=this._pointContainer.getPointArray()}return t.prototype.add=function(t){this._pointArray.push(t),this._pointContainer.setWidth(this._pointArray.length)},t.prototype.has=function(t){for(var e=this._pointArray.length-1;e>=0;e--)if(t.uint32===this._pointArray[e].uint32)return!0;return!1},t.prototype.getNearestColor=function(t,e){return this._pointArray[0|this.getNearestIndex(t,e)]},t.prototype.getPointContainer=function(){return this._pointContainer},t.prototype._nearestPointFromCache=function(t){return"number"==typeof this._i32idx[t]?this._i32idx[t]:-1},t.prototype.getNearestIndex=function(t,e){var r=this._nearestPointFromCache(""+e.uint32);if(r>=0)return r;var i=Number.MAX_VALUE;r=0;for(var n=0,a=this._pointArray.length;n<a;n++){var o=this._pointArray[n],s=t.calculateRaw(e.r,e.g,e.b,e.a,o.r,o.g,o.b,o.a);s<i&&(i=s,r=n)}return this._i32idx[e.uint32]=r,r},t.prototype.sort=function(){this._i32idx={},this._pointArray.sort((function(t,e){var r=n.rgb2hsl(t.r,t.g,t.b),i=n.rgb2hsl(e.r,e.g,e.b),o=t.r===t.g&&t.g===t.b?0:1+a(r.h,10),s=(e.r===e.g&&e.g===e.b?0:1+a(i.h,10))-o;if(s)return-s;var u=t.getLuminosity(!0),h=e.getLuminosity(!0);if(h-u!=0)return h-u;var l=(100*i.s|0)-(100*r.s|0);return l?-l:0}))},t}();e.Palette=o},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* pointContainer.ts - part of Image Quantization Library
*/var i=r(24),n=function(){function t(){this._width=0,this._height=0,this._pointArray=[]}return t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype.setWidth=function(t){this._width=t},t.prototype.setHeight=function(t){this._height=t},t.prototype.getPointArray=function(){return this._pointArray},t.prototype.clone=function(){var e=new t;e._width=this._width,e._height=this._height;for(var r=0,n=this._pointArray.length;r<n;r++)e._pointArray[r]=i.Point.createByUint32(0|this._pointArray[r].uint32);return e},t.prototype.toUint32Array=function(){for(var t=this._pointArray.length,e=new Uint32Array(t),r=0;r<t;r++)e[r]=this._pointArray[r].uint32;return e},t.prototype.toUint8Array=function(){return new Uint8Array(this.toUint32Array().buffer)},t.fromHTMLImageElement=function(e){var r=e.naturalWidth,i=e.naturalHeight,n=document.createElement("canvas");return n.width=r,n.height=i,n.getContext("2d").drawImage(e,0,0,r,i,0,0,r,i),t.fromHTMLCanvasElement(n)},t.fromHTMLCanvasElement=function(e){var r=e.width,i=e.height,n=e.getContext("2d").getImageData(0,0,r,i);return t.fromImageData(n)},t.fromNodeCanvas=function(e){return t.fromHTMLCanvasElement(e)},t.fromImageData=function(e){var r=e.width,i=e.height;return t.fromCanvasPixelArray(e.data,r,i)},t.fromArray=function(e,r,i){var n=new Uint8Array(e);return t.fromUint8Array(n,r,i)},t.fromCanvasPixelArray=function(e,r,i){return t.fromArray(e,r,i)},t.fromUint8Array=function(e,r,i){return t.fromUint32Array(new Uint32Array(e.buffer),r,i)},t.fromUint32Array=function(e,r,n){var a=new t;a._width=r,a._height=n;for(var o=0,s=e.length;o<s;o++)a._pointArray[o]=i.Point.createByUint32(0|e[o]);return a},t}();e.PointContainer=n},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* point.ts - part of Image Quantization Library
*/var i=r(2),n=function(){function t(){this.uint32=-1>>>0,this.r=this.g=this.b=this.a=0,this.rgba=new Array(4),this.rgba[0]=0,this.rgba[1]=0,this.rgba[2]=0,this.rgba[3]=0}return t.createByQuadruplet=function(e){var r=new t;return r.r=0|e[0],r.g=0|e[1],r.b=0|e[2],r.a=0|e[3],r._loadUINT32(),r._loadQuadruplet(),r},t.createByRGBA=function(e,r,i,n){var a=new t;return a.r=0|e,a.g=0|r,a.b=0|i,a.a=0|n,a._loadUINT32(),a._loadQuadruplet(),a},t.createByUint32=function(e){var r=new t;return r.uint32=e>>>0,r._loadRGBA(),r._loadQuadruplet(),r},t.prototype.from=function(t){this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this.uint32=t.uint32,this.rgba[0]=t.r,this.rgba[1]=t.g,this.rgba[2]=t.b,this.rgba[3]=t.a},t.prototype.getLuminosity=function(t){var e=this.r,r=this.g,n=this.b;return t&&(e=Math.min(255,255-this.a+this.a*e/255),r=Math.min(255,255-this.a+this.a*r/255),n=Math.min(255,255-this.a+this.a*n/255)),e*i.Y.RED+r*i.Y.GREEN+n*i.Y.BLUE},t.prototype._loadUINT32=function(){this.uint32=(this.a<<24|this.b<<16|this.g<<8|this.r)>>>0},t.prototype._loadRGBA=function(){this.r=255&this.uint32,this.g=this.uint32>>>8&255,this.b=this.uint32>>>16&255,this.a=this.uint32>>>24&255},t.prototype._loadQuadruplet=function(){this.rgba[0]=this.r,this.rgba[1]=this.g,this.rgba[2]=this.b,this.rgba[3]=this.a},t}();e.Point=n},function(t,e,r){"use strict";
/**
* @preserve TypeScript port:
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* neuquant.ts - part of Image Quantization Library
*/var i=r(22),n=r(24),a=function(){function t(t){this.r=this.g=this.b=this.a=t}return t.prototype.toPoint=function(){return n.Point.createByRGBA(this.r>>3,this.g>>3,this.b>>3,this.a>>3)},t.prototype.subtract=function(t,e,r,i){this.r-=t,this.g-=e,this.b-=r,this.a-=i},t}(),o=function(){function t(t,e){void 0===e&&(e=256),this._distance=t,this._pointArray=[],this._sampleFactor=1,this._networkSize=e,this._distance.setWhitePoint(2040,2040,2040,2040)}return t.prototype.sample=function(t){this._pointArray=this._pointArray.concat(t.getPointArray())},t.prototype.quantize=function(){return this._init(),this._learn(),this._buildPalette()},t.prototype._init=function(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(var e=0;e<this._networkSize;e++)this._network[e]=new a((e<<11)/this._networkSize),this._freq[e]=t._initialBias/this._networkSize,this._bias[e]=0},t.prototype._learn=function(){var e=this._sampleFactor,r=this._pointArray.length;r<t._minpicturebytes&&(e=1);var i,n=30+(e-1)/3,a=r/e,o=a/t._nCycles|0,s=t._initAlpha,u=(this._networkSize>>3)*t._radiusBias,h=u>>t._radiusBiasShift;h<=1&&(h=0);for(var l=0;l<h;l++)this._radPower[l]=s*((h*h-l*l)*t._radBias/(h*h));i=r<t._minpicturebytes?1:r%t._prime1!=0?t._prime1:r%t._prime2!=0?t._prime2:r%t._prime3!=0?t._prime3:t._prime4,l=0;for(var f=0;l<a;){var c=this._pointArray[f],d=c.b<<3,p=c.g<<3,m=c.r<<3,b=c.a<<3,g=this._contest(d,p,m,b);if(this._alterSingle(s,g,d,p,m,b),0!=h&&this._alterNeighbour(h,g,d,p,m,b),(f+=i)>=r&&(f-=r),0==o&&(o=1),++l%o==0){s-=s/n,(h=(u-=u/t._radiusDecrease)>>t._radiusBiasShift)<=1&&(h=0);for(var _=0;_<h;_++)this._radPower[_]=s*((h*h-_*_)*t._radBias/(h*h))}}},t.prototype._buildPalette=function(){var t=new i.Palette;return this._network.forEach((function(e){t.add(e.toPoint())})),t.sort(),t},t.prototype._alterNeighbour=function(e,r,i,n,a,o){var s=r-e;s<-1&&(s=-1);var u=r+e;u>this._networkSize&&(u=this._networkSize);for(var h=r+1,l=r-1,f=1;h<u||l>s;){var c,d=this._radPower[f++]/t._alphaRadBias;h<u&&(c=this._network[h++]).subtract(d*(c.r-a),d*(c.g-n),d*(c.b-i),d*(c.a-o)),l>s&&(c=this._network[l--]).subtract(d*(c.r-a),d*(c.g-n),d*(c.b-i),d*(c.a-o))}},t.prototype._alterSingle=function(e,r,i,n,a,o){e/=t._initAlpha;var s=this._network[r];s.subtract(e*(s.r-a),e*(s.g-n),e*(s.b-i),e*(s.a-o))},t.prototype._contest=function(e,r,i,n){for(var a=~(1<<31),o=a,s=-1,u=s,h=0;h<this._networkSize;h++){var l=this._network[h],f=8160*this._distance.calculateNormalized(l,{r:i,g:r,b:e,a:n});f<a&&(a=f,s=h);var c=f-(this._bias[h]>>t._initialBiasShift-3);c<o&&(o=c,u=h);var d=this._freq[h]>>t._betaShift;this._freq[h]-=d,this._bias[h]+=d<<t._gammaShift}return this._freq[s]+=t._beta,this._bias[s]-=t._betaGamma,u},t._prime1=499,t._prime2=491,t._prime3=487,t._prime4=503,t._minpicturebytes=t._prime4,t._nCycles=100,t._initialBiasShift=16,t._initialBias=1<<t._initialBiasShift,t._gammaShift=10,t._betaShift=10,t._beta=t._initialBias>>t._betaShift,t._betaGamma=t._initialBias<<t._gammaShift-t._betaShift,t._radiusBiasShift=6,t._radiusBias=1<<t._radiusBiasShift,t._radiusDecrease=30,t._alphaBiasShift=10,t._initAlpha=1<<t._alphaBiasShift,t._radBiasShift=8,t._radBias=1<<t._radBiasShift,t._alphaRadBiasShift=t._alphaBiasShift+t._radBiasShift,t._alphaRadBias=1<<t._alphaRadBiasShift,t}();e.NeuQuantFloat=o},function(t,e,r){"use strict";
/**
* @preserve TypeScript port:
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* rgbquant.ts - part of Image Quantization Library
*/var i=r(22),n=r(24),a=r(27),o=r(6),s=function(t,e,r){this.index=t,this.color=e,this.distance=r},u=function(){function t(t,e,r){void 0===e&&(e=256),void 0===r&&(r=2),this._distance=t,this._colors=e,this._histogram=new a.ColorHistogram(r,e),this._initialDistance=.01,this._distanceIncrement=.005}return t.prototype.sample=function(t){this._histogram.sample(t)},t.prototype.quantize=function(){var t=this._histogram.getImportanceSortedColorsIDXI32();if(0===t.length)throw new Error("No colors in image");var e=this._buildPalette(t);return e.sort(),e},t.prototype._buildPalette=function(t){for(var e=new i.Palette,r=e.getPointContainer().getPointArray(),a=new Array(t.length),u=0;u<t.length;u++)r.push(n.Point.createByUint32(t[u])),a[u]=1;for(var h=r.length,l=[],f=h,c=this._initialDistance;f>this._colors;){for(l.length=0,u=0;u<h;u++)if(0!==a[u])for(var d=r[u],p=u+1;p<h;p++)if(0!==a[p]){var m=r[p],b=this._distance.calculateNormalized(d,m);b<c&&(l.push(new s(p,m,b)),a[p]=0,f--)}c+=f>3*this._colors?this._initialDistance:this._distanceIncrement}if(f<this._colors){o.stableSort(l,(function(t,e){return e.distance-t.distance}));for(var g=0;f<this._colors&&g<l.length;)a[l[g].index]=1,f++,g++}for(var _=r.length,v=_-1;v>=0;v--)0===a[v]&&(v!==_-1&&(r[v]=r[_-1]),--_);return r.length=_,e},t}();e.RGBQuant=u},function(t,e,r){"use strict";
/**
* @preserve TypeScript port:
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* colorHistogram.ts - part of Image Quantization Library
*/var i=r(28),n=r(6),a=function(){function t(e,r){this._method=e,this._minHueCols=r<<2,this._initColors=r<<2,this._hueStats=new i.HueStatistics(t._hueGroups,this._minHueCols),this._histogram=Object.create(null)}return t.prototype.sample=function(t){switch(this._method){case 1:this._colorStats1D(t);break;case 2:this._colorStats2D(t)}},t.prototype.getImportanceSortedColorsIDXI32=function(){var t,e=this,r=n.stableSort(Object.keys(this._histogram),(function(t,r){return e._histogram[r]-e._histogram[t]}));if(0===r.length)return[];switch(this._method){case 1:var i=Math.min(r.length,this._initColors),a=r[i-1],o=this._histogram[a];t=r.slice(0,i);for(var s=i,u=r.length;s<u&&this._histogram[r[s]]==o;)t.push(r[s++]);this._hueStats.injectIntoArray(t);break;case 2:t=r;break;default:throw new Error("Incorrect method")}return t.map((function(t){return+t}))},t.prototype._colorStats1D=function(t){for(var e=this._histogram,r=t.getPointArray(),i=r.length,n=0;n<i;n++){var a=r[n].uint32;this._hueStats.check(a),a in e?e[a]++:e[a]=1}},t.prototype._colorStats2D=function(e){var r=this,i=e.getWidth(),n=e.getHeight(),a=e.getPointArray(),o=t._boxSize[0],s=t._boxSize[1],u=o*s,h=this._makeBoxes(i,n,o,s),l=this._histogram;h.forEach((function(e){var n=Math.round(e.w*e.h/u)*t._boxPixels;n<2&&(n=2);var o={};r._iterateBox(e,i,(function(t){var e=a[t].uint32;r._hueStats.check(e),e in l?l[e]++:e in o?++o[e]>=n&&(l[e]=o[e]):o[e]=1}))})),this._hueStats.injectIntoDictionary(l)},t.prototype._iterateBox=function(t,e,r){var i=t,n=i.y*e+i.x,a=(i.y+i.h-1)*e+(i.x+i.w-1),o=e-i.w+1,s=0,u=n;do{r.call(this,u),u+=++s%i.w==0?o:1}while(u<=a)},t.prototype._makeBoxes=function(t,e,r,i){for(var n=t%r,a=e%i,o=t-n,s=e-a,u=[],h=0;h<e;h+=i)for(var l=0;l<t;l+=r)u.push({x:l,y:h,w:l==o?n:r,h:h==s?a:i});return u},t._boxSize=[64,64],t._boxPixels=2,t._hueGroups=10,t}();e.ColorHistogram=a},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* hueStatistics.ts - part of Image Quantization Library
*/var i=r(5),n=r(22),a=function(){this.num=0,this.cols=[]},o=function(){function t(t,e){this._numGroups=t,this._minCols=e,this._stats=[];for(var r=0;r<=t;r++)this._stats[r]=new a;this._groupsFull=0}return t.prototype.check=function(t){this._groupsFull==this._numGroups+1&&(this.check=function(){});var e=255&t,r=t>>>8&255,a=t>>>16&255,o=e==r&&r==a?0:1+n.hueGroup(i.rgb2hsl(e,r,a).h,this._numGroups),s=this._stats[o],u=this._minCols;s.num++,s.num>u||(s.num==u&&this._groupsFull++,s.num<=u&&this._stats[o].cols.push(t))},t.prototype.injectIntoDictionary=function(t){for(var e=0;e<=this._numGroups;e++)this._stats[e].num<=this._minCols&&this._stats[e].cols.forEach((function(e){t[e]?t[e]++:t[e]=1}))},t.prototype.injectIntoArray=function(t){for(var e=0;e<=this._numGroups;e++)this._stats[e].num<=this._minCols&&this._stats[e].cols.forEach((function(e){-1==t.indexOf(e)&&t.push(e)}))},t}();e.HueStatistics=o},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* wuQuant.ts - part of Image Quantization Library
*/var i=r(22),n=r(24);function a(t){for(var e=[],r=0;r<t;r++)e[r]=0;return e}function o(t,e,r,i){for(var n=new Array(t),a=0;a<t;a++){n[a]=new Array(e);for(var o=0;o<e;o++){n[a][o]=new Array(r);for(var s=0;s<r;s++){n[a][o][s]=new Array(i);for(var u=0;u<i;u++)n[a][o][s][u]=0}}}return n}function s(t,e,r){for(var i=new Array(t),n=0;n<t;n++){i[n]=new Array(e);for(var a=0;a<e;a++){i[n][a]=new Array(r);for(var o=0;o<r;o++)i[n][a][o]=0}}return i}function u(t,e,r,i,n){for(var a=0;a<e;a++){t[a]=[];for(var o=0;o<r;o++){t[a][o]=[];for(var s=0;s<i;s++)t[a][o][s]=n}}}function h(t,e,r){for(var i=0;i<e;i++)t[i]=r}var l=function(){};e.WuColorCube=l;var f=function(){function t(t,e,r){void 0===e&&(e=256),void 0===r&&(r=5),this._distance=t,this._setQuality(r),this._initialize(e)}return t.prototype.sample=function(t){for(var e=t.getPointArray(),r=0,i=e.length;r<i;r++)this._addColor(e[r]);this._pixels=this._pixels.concat(e)},t.prototype.quantize=function(){this._preparePalette();for(var t=new i.Palette,e=0;e<this._colors;e++)if(this._sums[e]>0){var r=this._sums[e],a=this._reds[e]/r,o=this._greens[e]/r,s=this._blues[e]/r,u=this._alphas[e]/r,h=n.Point.createByRGBA(0|a,0|o,0|s,0|u);t.add(h)}return t.sort(),t},t.prototype._preparePalette=function(){this._calculateMoments();for(var e=0,r=a(this._colors),i=1;i<this._colors;++i){this._cut(this._cubes[e],this._cubes[i])?(r[e]=this._cubes[e].volume>1?this._calculateVariance(this._cubes[e]):0,r[i]=this._cubes[i].volume>1?this._calculateVariance(this._cubes[i]):0):(r[e]=0,i--),e=0;for(var n=r[0],o=1;o<=i;++o)r[o]>n&&(n=r[o],e=o);if(n<=0){this._colors=i+1;break}}for(var s=[],u=[],h=[],l=[],f=0;f<this._colors;++f){var c=t._volume(this._cubes[f],this._weights);c>0?(s[f]=t._volume(this._cubes[f],this._momentsRed)/c|0,u[f]=t._volume(this._cubes[f],this._momentsGreen)/c|0,h[f]=t._volume(this._cubes[f],this._momentsBlue)/c|0,l[f]=t._volume(this._cubes[f],this._momentsAlpha)/c|0):(s[f]=0,u[f]=0,h[f]=0,l[f]=0)}this._reds=a(this._colors+1),this._greens=a(this._colors+1),this._blues=a(this._colors+1),this._alphas=a(this._colors+1),this._sums=a(this._colors+1),o=0;for(var d=this._pixels.length;o<d;o++){for(var p=this._pixels[o],m=-1,b=Number.MAX_VALUE,g=0;g<this._colors;g++){var _=s[g],v=u[g],y=h[g],w=l[g],x=this._distance.calculateRaw(_,v,y,w,p.r,p.g,p.b,p.a);x<b&&(b=x,m=g)}this._reds[m]+=p.r,this._greens[m]+=p.g,this._blues[m]+=p.b,this._alphas[m]+=p.a,this._sums[m]++}},t.prototype._addColor=function(t){var e=8-this._significantBitsPerChannel,r=1+(t.r>>e),i=1+(t.g>>e),n=1+(t.b>>e),a=1+(t.a>>e);this._weights[a][r][i][n]++,this._momentsRed[a][r][i][n]+=t.r,this._momentsGreen[a][r][i][n]+=t.g,this._momentsBlue[a][r][i][n]+=t.b,this._momentsAlpha[a][r][i][n]+=t.a,this._moments[a][r][i][n]+=this._table[t.r]+this._table[t.g]+this._table[t.b]+this._table[t.a]},t.prototype._calculateMoments=function(){for(var t=[],e=[],r=[],i=[],n=[],a=[],o=s(this._sideSize,this._sideSize,this._sideSize),l=s(this._sideSize,this._sideSize,this._sideSize),f=s(this._sideSize,this._sideSize,this._sideSize),c=s(this._sideSize,this._sideSize,this._sideSize),d=s(this._sideSize,this._sideSize,this._sideSize),p=s(this._sideSize,this._sideSize,this._sideSize),m=1;m<=this._alphaMaxSideIndex;++m){u(o,this._sideSize,this._sideSize,this._sideSize,0),u(l,this._sideSize,this._sideSize,this._sideSize,0),u(f,this._sideSize,this._sideSize,this._sideSize,0),u(c,this._sideSize,this._sideSize,this._sideSize,0),u(d,this._sideSize,this._sideSize,this._sideSize,0),u(p,this._sideSize,this._sideSize,this._sideSize,0);for(var b=1;b<=this._maxSideIndex;++b){h(t,this._sideSize,0),h(e,this._sideSize,0),h(r,this._sideSize,0),h(i,this._sideSize,0),h(n,this._sideSize,0),h(a,this._sideSize,0);for(var g=1;g<=this._maxSideIndex;++g)for(var _=0,v=0,y=0,w=0,x=0,E=0,S=1;S<=this._maxSideIndex;++S)_+=this._weights[m][b][g][S],v+=this._momentsRed[m][b][g][S],y+=this._momentsGreen[m][b][g][S],w+=this._momentsBlue[m][b][g][S],x+=this._momentsAlpha[m][b][g][S],E+=this._moments[m][b][g][S],t[S]+=_,e[S]+=v,r[S]+=y,i[S]+=w,n[S]+=x,a[S]+=E,o[b][g][S]=o[b-1][g][S]+t[S],l[b][g][S]=l[b-1][g][S]+e[S],f[b][g][S]=f[b-1][g][S]+r[S],c[b][g][S]=c[b-1][g][S]+i[S],d[b][g][S]=d[b-1][g][S]+n[S],p[b][g][S]=p[b-1][g][S]+a[S],this._weights[m][b][g][S]=this._weights[m-1][b][g][S]+o[b][g][S],this._momentsRed[m][b][g][S]=this._momentsRed[m-1][b][g][S]+l[b][g][S],this._momentsGreen[m][b][g][S]=this._momentsGreen[m-1][b][g][S]+f[b][g][S],this._momentsBlue[m][b][g][S]=this._momentsBlue[m-1][b][g][S]+c[b][g][S],this._momentsAlpha[m][b][g][S]=this._momentsAlpha[m-1][b][g][S]+d[b][g][S],this._moments[m][b][g][S]=this._moments[m-1][b][g][S]+p[b][g][S]}}},t._volumeFloat=function(t,e){return e[t.alphaMaximum][t.redMaximum][t.greenMaximum][t.blueMaximum]-e[t.alphaMaximum][t.redMaximum][t.greenMinimum][t.blueMaximum]-e[t.alphaMaximum][t.redMinimum][t.greenMaximum][t.blueMaximum]+e[t.alphaMaximum][t.redMinimum][t.greenMinimum][t.blueMaximum]-e[t.alphaMinimum][t.redMaximum][t.greenMaximum][t.blueMaximum]+e[t.alphaMinimum][t.redMaximum][t.greenMinimum][t.blueMaximum]+e[t.alphaMinimum][t.redMinimum][t.greenMaximum][t.blueMaximum]-e[t.alphaMinimum][t.redMinimum][t.greenMinimum][t.blueMaximum]-(e[t.alphaMaximum][t.redMaximum][t.greenMaximum][t.blueMinimum]-e[t.alphaMinimum][t.redMaximum][t.greenMaximum][t.blueMinimum]-e[t.alphaMaximum][t.redMaximum][t.greenMinimum][t.blueMinimum]+e[t.alphaMinimum][t.redMaximum][t.greenMinimum][t.blueMinimum]-e[t.alphaMaximum][t.redMinimum][t.greenMaximum][t.blueMinimum]+e[t.alphaMinimum][t.redMinimum][t.greenMaximum][t.blueMinimum]+e[t.alphaMaximum][t.redMinimum][t.greenMinimum][t.blueMinimum]-e[t.alphaMinimum][t.redMinimum][t.greenMinimum][t.blueMinimum])},t._volume=function(e,r){return 0|t._volumeFloat(e,r)},t._top=function(e,r,i,n){var a;switch(r){case t.alpha:a=n[i][e.redMaximum][e.greenMaximum][e.blueMaximum]-n[i][e.redMaximum][e.greenMinimum][e.blueMaximum]-n[i][e.redMinimum][e.greenMaximum][e.blueMaximum]+n[i][e.redMinimum][e.greenMinimum][e.blueMaximum]-(n[i][e.redMaximum][e.greenMaximum][e.blueMinimum]-n[i][e.redMaximum][e.greenMinimum][e.blueMinimum]-n[i][e.redMinimum][e.greenMaximum][e.blueMinimum]+n[i][e.redMinimum][e.greenMinimum][e.blueMinimum]);break;case t.red:a=n[e.alphaMaximum][i][e.greenMaximum][e.blueMaximum]-n[e.alphaMaximum][i][e.greenMinimum][e.blueMaximum]-n[e.alphaMinimum][i][e.greenMaximum][e.blueMaximum]+n[e.alphaMinimum][i][e.greenMinimum][e.blueMaximum]-(n[e.alphaMaximum][i][e.greenMaximum][e.blueMinimum]-n[e.alphaMaximum][i][e.greenMinimum][e.blueMinimum]-n[e.alphaMinimum][i][e.greenMaximum][e.blueMinimum]+n[e.alphaMinimum][i][e.greenMinimum][e.blueMinimum]);break;case t.green:a=n[e.alphaMaximum][e.redMaximum][i][e.blueMaximum]-n[e.alphaMaximum][e.redMinimum][i][e.blueMaximum]-n[e.alphaMinimum][e.redMaximum][i][e.blueMaximum]+n[e.alphaMinimum][e.redMinimum][i][e.blueMaximum]-(n[e.alphaMaximum][e.redMaximum][i][e.blueMinimum]-n[e.alphaMaximum][e.redMinimum][i][e.blueMinimum]-n[e.alphaMinimum][e.redMaximum][i][e.blueMinimum]+n[e.alphaMinimum][e.redMinimum][i][e.blueMinimum]);break;case t.blue:a=n[e.alphaMaximum][e.redMaximum][e.greenMaximum][i]-n[e.alphaMaximum][e.redMaximum][e.greenMinimum][i]-n[e.alphaMaximum][e.redMinimum][e.greenMaximum][i]+n[e.alphaMaximum][e.redMinimum][e.greenMinimum][i]-(n[e.alphaMinimum][e.redMaximum][e.greenMaximum][i]-n[e.alphaMinimum][e.redMaximum][e.greenMinimum][i]-n[e.alphaMinimum][e.redMinimum][e.greenMaximum][i]+n[e.alphaMinimum][e.redMinimum][e.greenMinimum][i]);break;default:throw new Error("impossible")}return 0|a},t._bottom=function(e,r,i){switch(r){case t.alpha:return-i[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMaximum]+i[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]+i[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-i[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-i[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]+i[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]+i[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-i[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case t.red:return-i[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMaximum]+i[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]+i[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-i[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-i[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]+i[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]+i[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-i[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case t.green:return-i[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMaximum]+i[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]+i[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]-i[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-i[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+i[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]+i[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]-i[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case t.blue:return-i[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMinimum]+i[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+i[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]-i[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]-(-i[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]+i[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]+i[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-i[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);default:return 0}},t.prototype._calculateVariance=function(e){var r=t._volume(e,this._momentsRed),i=t._volume(e,this._momentsGreen),n=t._volume(e,this._momentsBlue),a=t._volume(e,this._momentsAlpha);return t._volumeFloat(e,this._moments)-(r*r+i*i+n*n+a*a)/t._volume(e,this._weights)},t.prototype._maximize=function(e,r,i,n,a,o,s,u,h){for(var l=0|t._bottom(e,r,this._momentsRed),f=0|t._bottom(e,r,this._momentsGreen),c=0|t._bottom(e,r,this._momentsBlue),d=0|t._bottom(e,r,this._momentsAlpha),p=0|t._bottom(e,r,this._weights),m=0,b=-1,g=i;g<n;++g){var _=l+t._top(e,r,g,this._momentsRed),v=f+t._top(e,r,g,this._momentsGreen),y=c+t._top(e,r,g,this._momentsBlue),w=d+t._top(e,r,g,this._momentsAlpha),x=p+t._top(e,r,g,this._weights);if(0!=x){var E=_*_+v*v+y*y+w*w,S=E/x;_=a-_,v=o-v,y=s-y,w=u-w,0!=(x=h-x)&&(S+=(E=_*_+v*v+y*y+w*w)/x)>m&&(m=S,b=g)}}return{max:m,position:b}},t.prototype._cut=function(e,r){var i,n=t._volume(e,this._momentsRed),a=t._volume(e,this._momentsGreen),o=t._volume(e,this._momentsBlue),s=t._volume(e,this._momentsAlpha),u=t._volume(e,this._weights),h=this._maximize(e,t.red,e.redMinimum+1,e.redMaximum,n,a,o,s,u),l=this._maximize(e,t.green,e.greenMinimum+1,e.greenMaximum,n,a,o,s,u),f=this._maximize(e,t.blue,e.blueMinimum+1,e.blueMaximum,n,a,o,s,u),c=this._maximize(e,t.alpha,e.alphaMinimum+1,e.alphaMaximum,n,a,o,s,u);if(c.max>=h.max&&c.max>=l.max&&c.max>=f.max){if(i=t.alpha,c.position<0)return!1}else i=h.max>=c.max&&h.max>=l.max&&h.max>=f.max?t.red:l.max>=c.max&&l.max>=h.max&&l.max>=f.max?t.green:t.blue;switch(r.redMaximum=e.redMaximum,r.greenMaximum=e.greenMaximum,r.blueMaximum=e.blueMaximum,r.alphaMaximum=e.alphaMaximum,i){case t.red:r.redMinimum=e.redMaximum=h.position,r.greenMinimum=e.greenMinimum,r.blueMinimum=e.blueMinimum,r.alphaMinimum=e.alphaMinimum;break;case t.green:r.greenMinimum=e.greenMaximum=l.position,r.redMinimum=e.redMinimum,r.blueMinimum=e.blueMinimum,r.alphaMinimum=e.alphaMinimum;break;case t.blue:r.blueMinimum=e.blueMaximum=f.position,r.redMinimum=e.redMinimum,r.greenMinimum=e.greenMinimum,r.alphaMinimum=e.alphaMinimum;break;case t.alpha:r.alphaMinimum=e.alphaMaximum=c.position,r.blueMinimum=e.blueMinimum,r.redMinimum=e.redMinimum,r.greenMinimum=e.greenMinimum}return e.volume=(e.redMaximum-e.redMinimum)*(e.greenMaximum-e.greenMinimum)*(e.blueMaximum-e.blueMinimum)*(e.alphaMaximum-e.alphaMinimum),r.volume=(r.redMaximum-r.redMinimum)*(r.greenMaximum-r.greenMinimum)*(r.blueMaximum-r.blueMinimum)*(r.alphaMaximum-r.alphaMinimum),!0},t.prototype._initialize=function(t){this._colors=t,this._cubes=[];for(var e=0;e<t;e++)this._cubes[e]=new l;this._cubes[0].redMinimum=0,this._cubes[0].greenMinimum=0,this._cubes[0].blueMinimum=0,this._cubes[0].alphaMinimum=0,this._cubes[0].redMaximum=this._maxSideIndex,this._cubes[0].greenMaximum=this._maxSideIndex,this._cubes[0].blueMaximum=this._maxSideIndex,this._cubes[0].alphaMaximum=this._alphaMaxSideIndex,this._weights=o(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsRed=o(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsGreen=o(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsBlue=o(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsAlpha=o(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._moments=o(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._table=[];for(var r=0;r<256;++r)this._table[r]=r*r;this._pixels=[]},t.prototype._setQuality=function(t){void 0===t&&(t=5),this._significantBitsPerChannel=t,this._maxSideIndex=1<<this._significantBitsPerChannel,this._alphaMaxSideIndex=this._maxSideIndex,this._sideSize=this._maxSideIndex+1,this._alphaSideSize=this._alphaMaxSideIndex+1},t.alpha=3,t.red=2,t.green=1,t.blue=0,t}();e.WuQuant=f},function(t,e,r){"use strict";var i=r(31);e.NearestColor=i.NearestColor;var n=r(32);e.ErrorDiffusionArray=n.ErrorDiffusionArray,e.ErrorDiffusionArrayKernel=n.ErrorDiffusionArrayKernel;var a=r(33);e.ErrorDiffusionRiemersma=a.ErrorDiffusionRiemersma},function(t,e){"use strict";var r=function(){function t(t){this._distance=t}return t.prototype.quantize=function(t,e){for(var r=t.getPointArray(),i=t.getWidth(),n=t.getHeight(),a=0;a<n;a++)for(var o=0,s=a*i;o<i;o++,s++){var u=r[s];u.from(e.getNearestColor(this._distance,u))}return t},t}();e.NearestColor=r},function(t,e,r){"use strict";var i=r(24),n=r(6);!function(t){t[t.FloydSteinberg=0]="FloydSteinberg",t[t.FalseFloydSteinberg=1]="FalseFloydSteinberg",t[t.Stucki=2]="Stucki",t[t.Atkinson=3]="Atkinson",t[t.Jarvis=4]="Jarvis",t[t.Burkes=5]="Burkes",t[t.Sierra=6]="Sierra",t[t.TwoSierra=7]="TwoSierra",t[t.SierraLite=8]="SierraLite"}(e.ErrorDiffusionArrayKernel||(e.ErrorDiffusionArrayKernel={}));var a=e.ErrorDiffusionArrayKernel,o=function(){function t(t,e,r,i,n){void 0===r&&(r=!0),void 0===i&&(i=0),void 0===n&&(n=!1),this._setKernel(e),this._distance=t,this._minColorDistance=i,this._serpentine=r,this._calculateErrorLikeGIMP=n}return t.prototype.quantize=function(t,e){for(var r=t.getPointArray(),a=new i.Point,o=t.getWidth(),s=t.getHeight(),u=[],h=1,l=1,f=0;f<this._kernel.length;f++){var c=this._kernel[f][2]+1;l<c&&(l=c)}for(f=0;f<l;f++)this._fillErrorLine(u[f]=[],o);for(var d=0;d<s;d++){this._serpentine&&(h*=-1);var p=d*o,m=1==h?0:o-1,b=1==h?o:-1;this._fillErrorLine(u[0],o),u.push(u.shift());for(var g=u[0],_=m,v=p+m;_!==b;_+=h,v+=h){var y=r[v],w=g[_];a.from(y);var x=i.Point.createByRGBA(n.inRange0to255Rounded(y.r+w[0]),n.inRange0to255Rounded(y.g+w[1]),n.inRange0to255Rounded(y.b+w[2]),n.inRange0to255Rounded(y.a+w[3])),E=e.getNearestColor(this._distance,x);if(y.from(E),!(this._minColorDistance&&this._distance.calculateNormalized(y,E)<this._minColorDistance)){var S=void 0,k=void 0,M=void 0,A=void 0;this._calculateErrorLikeGIMP?(S=x.r-E.r,k=x.g-E.g,M=x.b-E.b,A=x.a-E.a):(S=a.r-E.r,k=a.g-E.g,M=a.b-E.b,A=a.a-E.a);var I=1==h?0:this._kernel.length-1,T=1==h?this._kernel.length:-1;for(f=I;f!==T;f+=h){var R=this._kernel[f][1]*h,P=this._kernel[f][2];if(R+_>=0&&R+_<o&&P+d>=0&&P+d<s){var C=this._kernel[f][0],O=u[P][R+_];O[0]=O[0]+S*C,O[1]=O[1]+k*C,O[2]=O[2]+M*C,O[3]=O[3]+A*C}}}}}return t},t.prototype._fillErrorLine=function(t,e){t.length>e&&(t.length=e);for(var r=t.length,i=0;i<r;i++){var n=t[i];n[0]=n[1]=n[2]=n[3]=0}for(i=r;i<e;i++)t[i]=[0,0,0,0]},t.prototype._setKernel=function(t){switch(t){case a.FloydSteinberg:this._kernel=[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]];break;case a.FalseFloydSteinberg:this._kernel=[[3/8,1,0],[3/8,0,1],[2/8,1,1]];break;case a.Stucki:this._kernel=[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]];break;case a.Atkinson:this._kernel=[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]];break;case a.Jarvis:this._kernel=[[7/48,1,0],[5/48,2,0],[3/48,-2,1],[5/48,-1,1],[7/48,0,1],[5/48,1,1],[3/48,2,1],[1/48,-2,2],[3/48,-1,2],[5/48,0,2],[3/48,1,2],[1/48,2,2]];break;case a.Burkes:this._kernel=[[.25,1,0],[4/32,2,0],[2/32,-2,1],[4/32,-1,1],[.25,0,1],[4/32,1,1],[2/32,2,1]];break;case a.Sierra:this._kernel=[[5/32,1,0],[3/32,2,0],[2/32,-2,1],[4/32,-1,1],[5/32,0,1],[4/32,1,1],[2/32,2,1],[2/32,-1,2],[3/32,0,2],[2/32,1,2]];break;case a.TwoSierra:this._kernel=[[.25,1,0],[3/16,2,0],[1/16,-2,1],[2/16,-1,1],[3/16,0,1],[2/16,1,1],[1/16,2,1]];break;case a.SierraLite:this._kernel=[[.5,1,0],[1/4,-1,1],[1/4,0,1]];break;default:throw new Error("ErrorDiffusionArray: unknown kernel = "+t)}},t}();e.ErrorDiffusionArray=o},function(t,e,r){"use strict";var i=r(34),n=r(24),a=r(6),o=function(){function t(t,e,r){void 0===e&&(e=16),void 0===r&&(r=1),this._distance=t,this._errorPropagation=r,this._errorQueueSize=e,this._max=this._errorQueueSize,this._createWeights()}return t.prototype.quantize=function(t,e){for(var r=this,o=new i.HilbertCurveBase,s=t.getPointArray(),u=t.getWidth(),h=t.getHeight(),l=[],f=0,c=0;c<this._errorQueueSize;c++)l[c]={r:0,g:0,b:0,a:0};return o.walk(u,h,(function(t,i){for(var o=s[t+i*u],h=o.r,c=o.g,d=o.b,p=o.a,m=0;m<r._errorQueueSize;m++){var b=r._weights[m],g=l[(m+f)%r._errorQueueSize];h+=g.r*b,c+=g.g*b,d+=g.b*b,p+=g.a*b}var _=n.Point.createByRGBA(a.inRange0to255Rounded(h),a.inRange0to255Rounded(c),a.inRange0to255Rounded(d),a.inRange0to255Rounded(p)),v=e.getNearestColor(r._distance,_),y=((f=(f+1)%r._errorQueueSize)+r._errorQueueSize-1)%r._errorQueueSize;l[y].r=o.r-v.r,l[y].g=o.g-v.g,l[y].b=o.b-v.b,l[y].a=o.a-v.a,o.from(v)})),t},t.prototype._createWeights=function(){this._weights=[];for(var t=Math.exp(Math.log(this._max)/(this._errorQueueSize-1)),e=0,r=1;e<this._errorQueueSize;e++)this._weights[e]=(r+.5|0)/this._max*this._errorPropagation,r*=t},t}();e.ErrorDiffusionRiemersma=o},function(t,e){"use strict";var r;!function(t){t[t.NONE=0]="NONE",t[t.UP=1]="UP",t[t.LEFT=2]="LEFT",t[t.RIGHT=3]="RIGHT",t[t.DOWN=4]="DOWN"}(r||(r={}));var i=function(){function t(){}return t.prototype.walk=function(t,e,i){this._x=0,this._y=0,this._d=0,this._width=t,this._height=e,this._callback=i;var n=Math.max(t,e);this._level=Math.log(n)/Math.log(2)+1|0,this._walkHilbert(r.UP),this._visit(r.NONE)},t.prototype._walkHilbert=function(t){if(!(this._level<1)){switch(this._level--,t){case r.LEFT:this._walkHilbert(r.UP),this._visit(r.RIGHT),this._walkHilbert(r.LEFT),this._visit(r.DOWN),this._walkHilbert(r.LEFT),this._visit(r.LEFT),this._walkHilbert(r.DOWN);break;case r.RIGHT:this._walkHilbert(r.DOWN),this._visit(r.LEFT),this._walkHilbert(r.RIGHT),this._visit(r.UP),this._walkHilbert(r.RIGHT),this._visit(r.RIGHT),this._walkHilbert(r.UP);break;case r.UP:this._walkHilbert(r.LEFT),this._visit(r.DOWN),this._walkHilbert(r.UP),this._visit(r.RIGHT),this._walkHilbert(r.UP),this._visit(r.UP),this._walkHilbert(r.RIGHT);break;case r.DOWN:this._walkHilbert(r.RIGHT),this._visit(r.UP),this._walkHilbert(r.DOWN),this._visit(r.LEFT),this._walkHilbert(r.DOWN),this._visit(r.DOWN),this._walkHilbert(r.LEFT)}this._level++}},t.prototype._visit=function(t){switch(this._x>=0&&this._x<this._width&&this._y>=0&&this._y<this._height&&(this._callback(this._x,this._y,this._d),this._d++),t){case r.LEFT:this._x--;break;case r.RIGHT:this._x++;break;case r.UP:this._y--;break;case r.DOWN:this._y++}},t}();e.HilbertCurveBase=i},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* iq.ts - Image Quantization Library
*/var i=r(36);e.SSIM=i.SSIM},function(t,e,r){"use strict";var i=r(2),n=function(){function t(){}return t.prototype.compare=function(t,e){if(t.getHeight()!==e.getHeight()||t.getWidth()!==e.getWidth())throw new Error("Images have different sizes!");var r=Math.pow(.01*255,2),i=Math.pow(.03*255,2),n=0,a=0;return this._iterate(t,e,(function(t,e,o,s){for(var u=0,h=0,l=0,f=0;f<t.length;f++)h+=Math.pow(t[f]-o,2),l+=Math.pow(e[f]-s,2),u+=(t[f]-o)*(e[f]-s);var c=t.length-1;h/=c,l/=c;var d=(2*o*s+r)*(2*(u/=c)+i),p=(Math.pow(o,2)+Math.pow(s,2)+r)*(h+l+i);a+=d/p,n++})),a/n},t.prototype._iterate=function(t,e,r){for(var i=t.getWidth(),n=t.getHeight(),a=0;a<n;a+=8)for(var o=0;o<i;o+=8){var s=Math.min(8,i-o),u=Math.min(8,n-a),h=this._calculateLumaValuesForWindow(t,o,a,s,u),l=this._calculateLumaValuesForWindow(e,o,a,s,u);r(h,l,this._calculateAverageLuma(h),this._calculateAverageLuma(l))}},t.prototype._calculateLumaValuesForWindow=function(t,e,r,n,a){for(var o=t.getPointArray(),s=[],u=0,h=r;h<r+a;h++)for(var l=h*t.getWidth(),f=e;f<e+n;f++){var c=o[l+f];s[u]=c.r*i.Y.RED+c.g*i.Y.GREEN+c.b*i.Y.BLUE,u++}return s},t.prototype._calculateAverageLuma=function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r];return e/t.length},t}();e.SSIM=n},function(t,e,r){"use strict";
/**
* @preserve
* Copyright 2015-2016 Igor Bezkrovnyi
* All rights reserved. (MIT Licensed)
*
* iq.ts - Image Quantization Library
*/var i=r(6);e.arithmetic=i;var n=r(28);e.HueStatistics=n.HueStatistics;var a=r(22);e.Palette=a.Palette;var o=r(24);e.Point=o.Point;var s=r(23);e.PointContainer=s.PointContainer}])},"object"==typeof r&&"object"==typeof e?e.exports=n():"object"==typeof r?r.iq=n():i.iq=n()},{}],75:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],76:[function(t,e,r){function i(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(t){return null!=t&&(i(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&i(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],77:[function(t,e,r){"use strict";var i=Function.prototype.toString,n=/^\s*class\b/,a=function(t){try{var e=i.call(t);return n.test(e)}catch(t){return!1}},o=Object.prototype.toString,s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(s)return function(t){try{return!a(t)&&(i.call(t),!0)}catch(t){return!1}}(t);if(a(t))return!1;var e=o.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e}},{}],78:[function(t,e,r){e.exports=function(t){var e=i.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||void 0!==window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var i=Object.prototype.toString},{}],79:[function(t,e,r){var i={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},{}],80:[function(t,e,r){var i=t("./lib/encoder"),n=t("./lib/decoder");e.exports={encode:i,decode:n}},{"./lib/decoder":81,"./lib/encoder":82}],81:[function(t,e,r){(function(t){var r=function(){"use strict";var t=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),e=4017,r=799,i=3406,n=2276,a=1567,o=3784,s=5793,u=2896;function h(){}function l(t,e){for(var r,i,n=0,a=[],o=16;o>0&&!t[o-1];)o--;a.push({children:[],index:0});var s,u=a[0];for(r=0;r<o;r++){for(i=0;i<t[r];i++){for((u=a.pop()).children[u.index]=e[n];u.index>0;){if(0===a.length)throw new Error("Could not recreate Huffman Table");u=a.pop()}for(u.index++,a.push(u);a.length<=r;)a.push(s={children:[],index:0}),u.children[u.index]=s.children,u=s;n++}r+1<o&&(a.push(s={children:[],index:0}),u.children[u.index]=s.children,u=s)}return a[0].children}function f(e,r,i,n,a,o,s,u,h,l){i.precision,i.samplesPerLine,i.scanLines;var f=i.mcusPerLine,c=i.progressive,d=(i.maxH,i.maxV,r),p=0,m=0;function b(){if(m>0)return m--,p>>m&1;if(255==(p=e[r++])){var t=e[r++];if(t)throw new Error("unexpected marker: "+(p<<8|t).toString(16))}return m=7,p>>>7}function g(t){for(var e,r=t;null!==(e=b());){if("number"==typeof(r=r[e]))return r;if("object"!=typeof r)throw new Error("invalid huffman sequence")}return null}function _(t){for(var e=0;t>0;){var r=b();if(null===r)return;e=e<<1|r,t--}return e}function v(t){var e=_(t);return e>=1<<t-1?e:e+(-1<<t)+1}var y=0;var w,x=0;function E(t,e,r,i,n){var a=r%f,o=(r/f|0)*t.v+i,s=a*t.h+n;void 0===t.blocks[o]&&l.tolerantDecoding||e(t,t.blocks[o][s])}function S(t,e,r){var i=r/t.blocksPerLine|0,n=r%t.blocksPerLine;void 0===t.blocks[i]&&l.tolerantDecoding||e(t,t.blocks[i][n])}var k,M,A,I,T,R,P=n.length;R=c?0===o?0===u?function(t,e){var r=g(t.huffmanTableDC),i=0===r?0:v(r)<<h;e[0]=t.pred+=i}:function(t,e){e[0]|=b()<<h}:0===u?function(e,r){if(y>0)y--;else for(var i=o,n=s;i<=n;){var a=g(e.huffmanTableAC),u=15&a,l=a>>4;if(0!==u)r[t[i+=l]]=v(u)*(1<<h),i++;else{if(l<15){y=_(l)+(1<<l)-1;break}i+=16}}}:function(e,r){for(var i=o,n=s,a=0;i<=n;){var u=t[i],l=r[u]<0?-1:1;switch(x){case 0:var f=g(e.huffmanTableAC),c=15&f;if(a=f>>4,0===c)a<15?(y=_(a)+(1<<a),x=4):(a=16,x=1);else{if(1!==c)throw new Error("invalid ACn encoding");w=v(c),x=a?2:3}continue;case 1:case 2:r[u]?r[u]+=(b()<<h)*l:0==--a&&(x=2==x?3:0);break;case 3:r[u]?r[u]+=(b()<<h)*l:(r[u]=w<<h,x=0);break;case 4:r[u]&&(r[u]+=(b()<<h)*l)}i++}4===x&&0==--y&&(x=0)}:function(e,r){var i=g(e.huffmanTableDC),n=0===i?0:v(i);r[0]=e.pred+=n;for(var a=1;a<64;){var o=g(e.huffmanTableAC),s=15&o,u=o>>4;if(0!==s)r[t[a+=u]]=v(s),a++;else{if(u<15)break;a+=16}}};var C,O,L,B,D=0;for(O=1==P?n[0].blocksPerLine*n[0].blocksPerColumn:f*i.mcusPerColumn,a||(a=O);D<O;){for(M=0;M<P;M++)n[M].pred=0;if(y=0,1==P)for(k=n[0],T=0;T<a;T++)S(k,R,D),D++;else for(T=0;T<a;T++){for(M=0;M<P;M++)for(L=(k=n[M]).h,B=k.v,A=0;A<B;A++)for(I=0;I<L;I++)E(k,R,D,A,I);if(++D===O)break}if(D===O)do{if(255===e[r]&&0!==e[r+1])break;r+=1}while(r<e.length-2);if(m=0,(C=e[r]<<8|e[r+1])<65280)throw new Error("marker was not found");if(!(C>=65488&&C<=65495))break;r+=2}return r-d}function c(t,h){var l,f,c=[],d=h.blocksPerLine,p=h.blocksPerColumn,m=d<<3,g=new Int32Array(64),_=new Uint8Array(64);function v(t,l,f){var c,d,p,m,b,g,_,v,y,w,x=h.quantizationTable,E=f;for(w=0;w<64;w++)E[w]=t[w]*x[w];for(w=0;w<8;++w){var S=8*w;0!=E[1+S]||0!=E[2+S]||0!=E[3+S]||0!=E[4+S]||0!=E[5+S]||0!=E[6+S]||0!=E[7+S]?(c=s*E[0+S]+128>>8,d=s*E[4+S]+128>>8,p=E[2+S],m=E[6+S],b=u*(E[1+S]-E[7+S])+128>>8,v=u*(E[1+S]+E[7+S])+128>>8,g=E[3+S]<<4,_=E[5+S]<<4,y=c-d+1>>1,c=c+d+1>>1,d=y,y=p*o+m*a+128>>8,p=p*a-m*o+128>>8,m=y,y=b-_+1>>1,b=b+_+1>>1,_=y,y=v+g+1>>1,g=v-g+1>>1,v=y,y=c-m+1>>1,c=c+m+1>>1,m=y,y=d-p+1>>1,d=d+p+1>>1,p=y,y=b*n+v*i+2048>>12,b=b*i-v*n+2048>>12,v=y,y=g*r+_*e+2048>>12,g=g*e-_*r+2048>>12,_=y,E[0+S]=c+v,E[7+S]=c-v,E[1+S]=d+_,E[6+S]=d-_,E[2+S]=p+g,E[5+S]=p-g,E[3+S]=m+b,E[4+S]=m-b):(y=s*E[0+S]+512>>10,E[0+S]=y,E[1+S]=y,E[2+S]=y,E[3+S]=y,E[4+S]=y,E[5+S]=y,E[6+S]=y,E[7+S]=y)}for(w=0;w<8;++w){var k=w;0!=E[8+k]||0!=E[16+k]||0!=E[24+k]||0!=E[32+k]||0!=E[40+k]||0!=E[48+k]||0!=E[56+k]?(c=s*E[0+k]+2048>>12,d=s*E[32+k]+2048>>12,p=E[16+k],m=E[48+k],b=u*(E[8+k]-E[56+k])+2048>>12,v=u*(E[8+k]+E[56+k])+2048>>12,g=E[24+k],_=E[40+k],y=c-d+1>>1,c=c+d+1>>1,d=y,y=p*o+m*a+2048>>12,p=p*a-m*o+2048>>12,m=y,y=b-_+1>>1,b=b+_+1>>1,_=y,y=v+g+1>>1,g=v-g+1>>1,v=y,y=c-m+1>>1,c=c+m+1>>1,m=y,y=d-p+1>>1,d=d+p+1>>1,p=y,y=b*n+v*i+2048>>12,b=b*i-v*n+2048>>12,v=y,y=g*r+_*e+2048>>12,g=g*e-_*r+2048>>12,_=y,E[0+k]=c+v,E[56+k]=c-v,E[8+k]=d+_,E[48+k]=d-_,E[16+k]=p+g,E[40+k]=p-g,E[24+k]=m+b,E[32+k]=m-b):(y=s*f[w+0]+8192>>14,E[0+k]=y,E[8+k]=y,E[16+k]=y,E[24+k]=y,E[32+k]=y,E[40+k]=y,E[48+k]=y,E[56+k]=y)}for(w=0;w<64;++w){var M=128+(E[w]+8>>4);l[w]=M<0?0:M>255?255:M}}b(m*p*8);for(var y=0;y<p;y++){var w=y<<3;for(l=0;l<8;l++)c.push(new Uint8Array(m));for(var x=0;x<d;x++){v(h.blocks[y][x],_,g);var E=0,S=x<<3;for(f=0;f<8;f++){var k=c[w+f];for(l=0;l<8;l++)k[S+l]=_[E++]}}}return c}function d(t){return t<0?0:t>255?255:t}h.prototype={load:function(t){var e=new XMLHttpRequest;e.open("GET",t,!0),e.responseType="arraybuffer",e.onload=function(){var t=new Uint8Array(e.response||e.mozResponseArrayBuffer);this.parse(t),this.onload&&this.onload()}.bind(this),e.send(null)},parse:function(e){var r=1e3*this.opts.maxResolutionInMP*1e3,i=0;e.length;function n(){var t=e[i]<<8|e[i+1];return i+=2,t}function a(){var t=n(),r=e.subarray(i,i+t-2);return i+=r.length,r}function o(t){var e,r,i=0,n=0;for(r in t.components)t.components.hasOwnProperty(r)&&(i<(e=t.components[r]).h&&(i=e.h),n<e.v&&(n=e.v));var a=Math.ceil(t.samplesPerLine/8/i),o=Math.ceil(t.scanLines/8/n);for(r in t.components)if(t.components.hasOwnProperty(r)){e=t.components[r];var s=Math.ceil(Math.ceil(t.samplesPerLine/8)*e.h/i),u=Math.ceil(Math.ceil(t.scanLines/8)*e.v/n),h=a*e.h,l=o*e.v,f=[];b(256*(l*h));for(var c=0;c<l;c++){for(var d=[],p=0;p<h;p++)d.push(new Int32Array(64));f.push(d)}e.blocksPerLine=s,e.blocksPerColumn=u,e.blocks=f}t.maxH=i,t.maxV=n,t.mcusPerLine=a,t.mcusPerColumn=o}var s,u,h=null,d=null,p=[],m=[],g=[],_=[],v=n();if(this.comments=[],65496!=v)throw new Error("SOI not found");for(v=n();65497!=v;){switch(v){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var y=a();if(65534===v){var w=String.fromCharCode.apply(null,y);this.comments.push(w)}65504===v&&74===y[0]&&70===y[1]&&73===y[2]&&70===y[3]&&0===y[4]&&(h={version:{major:y[5],minor:y[6]},densityUnits:y[7],xDensity:y[8]<<8|y[9],yDensity:y[10]<<8|y[11],thumbWidth:y[12],thumbHeight:y[13],thumbData:y.subarray(14,14+3*y[12]*y[13])}),65505===v&&69===y[0]&&120===y[1]&&105===y[2]&&102===y[3]&&0===y[4]&&(this.exifBuffer=y.subarray(5,y.length)),65518===v&&65===y[0]&&100===y[1]&&111===y[2]&&98===y[3]&&101===y[4]&&0===y[5]&&(d={version:y[6],flags0:y[7]<<8|y[8],flags1:y[9]<<8|y[10],transformCode:y[11]});break;case 65499:for(var x=n()+i-2;i<x;){var E=e[i++];b(256);var S=new Int32Array(64);if(E>>4==0)for(Z=0;Z<64;Z++){S[t[Z]]=e[i++]}else{if(E>>4!=1)throw new Error("DQT: invalid table spec");for(Z=0;Z<64;Z++){S[t[Z]]=n()}}p[15&E]=S}break;case 65472:case 65473:case 65474:n(),(s={}).extended=65473===v,s.progressive=65474===v,s.precision=e[i++],s.scanLines=n(),s.samplesPerLine=n(),s.components={},s.componentsOrder=[];var k=s.scanLines*s.samplesPerLine;if(k>r){var M=Math.ceil((k-r)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${M}MP`)}var A,I=e[i++];for(q=0;q<I;q++){A=e[i];var T=e[i+1]>>4,R=15&e[i+1],P=e[i+2];s.componentsOrder.push(A),s.components[A]={h:T,v:R,quantizationIdx:P},i+=3}o(s),m.push(s);break;case 65476:var C=n();for(q=2;q<C;){var O=e[i++],L=new Uint8Array(16),B=0;for(Z=0;Z<16;Z++,i++)B+=L[Z]=e[i];b(16+B);var D=new Uint8Array(B);for(Z=0;Z<B;Z++,i++)D[Z]=e[i];q+=17+B,(O>>4==0?_:g)[15&O]=l(L,D)}break;case 65501:n(),u=n();break;case 65500:n(),n();break;case 65498:n();var N=e[i++],z=[];for(q=0;q<N;q++){Y=s.components[e[i++]];var j=e[i++];Y.huffmanTableDC=_[j>>4],Y.huffmanTableAC=g[15&j],z.push(Y)}var U=e[i++],F=e[i++],G=e[i++],H=f(e,i,s,z,u,U,F,G>>4,15&G,this.opts);i+=H;break;case 65535:255!==e[i]&&i--;break;default:if(255==e[i-3]&&e[i-2]>=192&&e[i-2]<=254){i-=3;break}throw new Error("unknown JPEG marker "+v.toString(16))}v=n()}if(1!=m.length)throw new Error("only single frame JPEGs supported");for(var q=0;q<m.length;q++){var W=m[q].components;for(var Z in W)W[Z].quantizationTable=p[W[Z].quantizationIdx],delete W[Z].quantizationIdx}this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=h,this.adobe=d,this.components=[];for(q=0;q<s.componentsOrder.length;q++){var Y=s.components[s.componentsOrder[q]];this.components.push({lines:c(0,Y),scaleX:Y.h/s.maxH,scaleY:Y.v/s.maxV})}},getData:function(t,e){var r,i,n,a,o,s,u,h,l,f,c,p,m,g,_,v,y,w,x,E,S,k=this.width/t,M=this.height/e,A=0,I=t*e*this.components.length;b(I);var T=new Uint8Array(I);switch(this.components.length){case 1:for(r=this.components[0],f=0;f<e;f++)for(o=r.lines[0|f*r.scaleY*M],l=0;l<t;l++)c=o[0|l*r.scaleX*k],T[A++]=c;break;case 2:for(r=this.components[0],i=this.components[1],f=0;f<e;f++)for(o=r.lines[0|f*r.scaleY*M],s=i.lines[0|f*i.scaleY*M],l=0;l<t;l++)c=o[0|l*r.scaleX*k],T[A++]=c,c=s[0|l*i.scaleX*k],T[A++]=c;break;case 3:for(S=!0,this.adobe&&this.adobe.transformCode?S=!0:void 0!==this.opts.colorTransform&&(S=!!this.opts.colorTransform),r=this.components[0],i=this.components[1],n=this.components[2],f=0;f<e;f++)for(o=r.lines[0|f*r.scaleY*M],s=i.lines[0|f*i.scaleY*M],u=n.lines[0|f*n.scaleY*M],l=0;l<t;l++)S?(c=o[0|l*r.scaleX*k],p=s[0|l*i.scaleX*k],w=d(c+1.402*((m=u[0|l*n.scaleX*k])-128)),x=d(c-.3441363*(p-128)-.71413636*(m-128)),E=d(c+1.772*(p-128))):(w=o[0|l*r.scaleX*k],x=s[0|l*i.scaleX*k],E=u[0|l*n.scaleX*k]),T[A++]=w,T[A++]=x,T[A++]=E;break;case 4:if(!this.adobe)throw new Error("Unsupported color mode (4 components)");for(S=!1,this.adobe&&this.adobe.transformCode?S=!0:void 0!==this.opts.colorTransform&&(S=!!this.opts.colorTransform),r=this.components[0],i=this.components[1],n=this.components[2],a=this.components[3],f=0;f<e;f++)for(o=r.lines[0|f*r.scaleY*M],s=i.lines[0|f*i.scaleY*M],u=n.lines[0|f*n.scaleY*M],h=a.lines[0|f*a.scaleY*M],l=0;l<t;l++)S?(c=o[0|l*r.scaleX*k],p=s[0|l*i.scaleX*k],m=u[0|l*n.scaleX*k],g=h[0|l*a.scaleX*k],_=255-d(c+1.402*(m-128)),v=255-d(c-.3441363*(p-128)-.71413636*(m-128)),y=255-d(c+1.772*(p-128))):(_=o[0|l*r.scaleX*k],v=s[0|l*i.scaleX*k],y=u[0|l*n.scaleX*k],g=h[0|l*a.scaleX*k]),T[A++]=255-_,T[A++]=255-v,T[A++]=255-y,T[A++]=255-g;break;default:throw new Error("Unsupported color mode")}return T},copyToImageData:function(t,e){var r,i,n,a,o,s,u,h,l,f=t.width,c=t.height,p=t.data,m=this.getData(f,c),b=0,g=0;switch(this.components.length){case 1:for(i=0;i<c;i++)for(r=0;r<f;r++)n=m[b++],p[g++]=n,p[g++]=n,p[g++]=n,e&&(p[g++]=255);break;case 3:for(i=0;i<c;i++)for(r=0;r<f;r++)u=m[b++],h=m[b++],l=m[b++],p[g++]=u,p[g++]=h,p[g++]=l,e&&(p[g++]=255);break;case 4:for(i=0;i<c;i++)for(r=0;r<f;r++)o=m[b++],s=m[b++],n=m[b++],u=255-d(o*(1-(a=m[b++])/255)+a),h=255-d(s*(1-a/255)+a),l=255-d(n*(1-a/255)+a),p[g++]=u,p[g++]=h,p[g++]=l,e&&(p[g++]=255);break;default:throw new Error("Unsupported color mode")}}};var p=0,m=0;function b(t=0){var e=p+t;if(e>m){var r=Math.ceil((e-m)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${r}MB`)}p=e}return h.resetMaxMemoryUsage=function(t){p=0,m=t},h.getBytesAllocated=function(){return p},h.requestMemoryAllocation=b,h}();function i(e,i={}){var n={...{colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512},...i},a=new Uint8Array(e),o=new r;o.opts=n,r.resetMaxMemoryUsage(1024*n.maxMemoryUsageInMB*1024),o.parse(a);var s=n.formatAsRGBA?4:3,u=o.width*o.height*s;try{r.requestMemoryAllocation(u);var h={width:o.width,height:o.height,exifBuffer:o.exifBuffer,data:n.useTArray?new Uint8Array(u):t.alloc(u)};o.comments.length>0&&(h.comments=o.comments)}catch(t){throw t instanceof RangeError?new Error("Could not allocate enough memory for the image. Required: "+u):t}return o.copyToImageData(h,n.formatAsRGBA),h}void 0!==e?e.exports=i:void 0!==window&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].decode=i)}).call(this,t("buffer").Buffer)},{buffer:48}],82:[function(t,e,r){(function(t){function r(r){Math.round;var i,n,a,o,s,u=Math.floor,h=new Array(64),l=new Array(64),f=new Array(64),c=new Array(64),d=new Array(65535),p=new Array(65535),m=new Array(64),b=new Array(64),g=[],_=0,v=7,y=new Array(64),w=new Array(64),x=new Array(64),E=new Array(256),S=new Array(2048),k=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],M=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],A=[0,1,2,3,4,5,6,7,8,9,10,11],I=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],T=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],R=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],P=[0,1,2,3,4,5,6,7,8,9,10,11],C=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],O=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function L(t,e){for(var r=0,i=0,n=new Array,a=1;a<=16;a++){for(var o=1;o<=t[a];o++)n[e[i]]=[],n[e[i]][0]=r,n[e[i]][1]=a,i++,r++;r*=2}return n}function B(t){for(var e=t[0],r=t[1]-1;r>=0;)e&1<<r&&(_|=1<<v),r--,--v<0&&(255==_?(D(255),D(0)):D(_),v=7,_=0)}function D(t){g.push(t)}function N(t){D(t>>8&255),D(255&t)}function z(t,e,r,i,n){for(var a,o=n[0],s=n[240],u=function(t,e){var r,i,n,a,o,s,u,h,l,f,c=0;for(l=0;l<8;++l){r=t[c],i=t[c+1],n=t[c+2],a=t[c+3],o=t[c+4],s=t[c+5],u=t[c+6];var d=r+(h=t[c+7]),p=r-h,b=i+u,g=i-u,_=n+s,v=n-s,y=a+o,w=a-o,x=d+y,E=d-y,S=b+_,k=b-_;t[c]=x+S,t[c+4]=x-S;var M=.707106781*(k+E);t[c+2]=E+M,t[c+6]=E-M;var A=.382683433*((x=w+v)-(k=g+p)),I=.5411961*x+A,T=1.306562965*k+A,R=.707106781*(S=v+g),P=p+R,C=p-R;t[c+5]=C+I,t[c+3]=C-I,t[c+1]=P+T,t[c+7]=P-T,c+=8}for(c=0,l=0;l<8;++l){r=t[c],i=t[c+8],n=t[c+16],a=t[c+24],o=t[c+32],s=t[c+40],u=t[c+48];var O=r+(h=t[c+56]),L=r-h,B=i+u,D=i-u,N=n+s,z=n-s,j=a+o,U=a-o,F=O+j,G=O-j,H=B+N,q=B-N;t[c]=F+H,t[c+32]=F-H;var W=.707106781*(q+G);t[c+16]=G+W,t[c+48]=G-W;var Z=.382683433*((F=U+z)-(q=D+L)),Y=.5411961*F+Z,V=1.306562965*q+Z,X=.707106781*(H=z+D),Q=L+X,K=L-X;t[c+40]=K+Y,t[c+24]=K-Y,t[c+8]=Q+V,t[c+56]=Q-V,c++}for(l=0;l<64;++l)f=t[l]*e[l],m[l]=f>0?f+.5|0:f-.5|0;return m}(t,e),h=0;h<64;++h)b[k[h]]=u[h];var l=b[0]-r;r=b[0],0==l?B(i[0]):(B(i[p[a=32767+l]]),B(d[a]));for(var f=63;f>0&&0==b[f];f--);if(0==f)return B(o),r;for(var c,g=1;g<=f;){for(var _=g;0==b[g]&&g<=f;++g);var v=g-_;if(v>=16){c=v>>4;for(var y=1;y<=c;++y)B(s);v&=15}a=32767+b[g],B(n[(v<<4)+p[a]]),B(d[a]),g++}return 63!=f&&B(o),r}function j(t){if(t<=0&&(t=1),t>100&&(t=100),s!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],r=0;r<64;r++){var i=u((e[r]*t+50)/100);i<1?i=1:i>255&&(i=255),h[k[r]]=i}for(var n=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var o=u((n[a]*t+50)/100);o<1?o=1:o>255&&(o=255),l[k[a]]=o}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],d=0,p=0;p<8;p++)for(var m=0;m<8;m++)f[d]=1/(h[k[d]]*s[p]*s[m]*8),c[d]=1/(l[k[d]]*s[p]*s[m]*8),d++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),s=t}}this.encode=function(r,s){(new Date).getTime();s&&j(s),g=new Array,_=0,v=7,N(65496),N(65504),N(16),D(74),D(70),D(73),D(70),D(0),D(1),D(1),D(0),N(1),N(1),D(0),D(0),function(t){if(t){N(65505),69===t[0]&&120===t[1]&&105===t[2]&&102===t[3]?N(t.length+2):(N(t.length+5+2),D(69),D(120),D(105),D(102),D(0));for(var e=0;e<t.length;e++)D(t[e])}}(r.exifBuffer),function(){N(65499),N(132),D(0);for(var t=0;t<64;t++)D(h[t]);D(1);for(var e=0;e<64;e++)D(l[e])}(),function(t,e){N(65472),N(17),D(8),N(e),N(t),D(3),D(1),D(17),D(0),D(2),D(17),D(1),D(3),D(17),D(1)}(r.width,r.height),function(){N(65476),N(418),D(0);for(var t=0;t<16;t++)D(M[t+1]);for(var e=0;e<=11;e++)D(A[e]);D(16);for(var r=0;r<16;r++)D(I[r+1]);for(var i=0;i<=161;i++)D(T[i]);D(1);for(var n=0;n<16;n++)D(R[n+1]);for(var a=0;a<=11;a++)D(P[a]);D(17);for(var o=0;o<16;o++)D(C[o+1]);for(var s=0;s<=161;s++)D(O[s])}(),N(65498),N(12),D(3),D(1),D(0),D(2),D(17),D(3),D(17),D(0),D(63),D(0);var u=0,d=0,p=0;_=0,v=7,this.encode.displayName="_encode_";for(var m,b,E,k,L,U,F,G,H,q=r.data,W=r.width,Z=r.height,Y=4*W,V=0;V<Z;){for(m=0;m<Y;){for(U=L=Y*V+m,F=-1,G=0,H=0;H<64;H++)U=L+(G=H>>3)*Y+(F=4*(7&H)),V+G>=Z&&(U-=Y*(V+1+G-Z)),m+F>=Y&&(U-=m+F-Y+4),b=q[U++],E=q[U++],k=q[U++],y[H]=(S[b]+S[E+256>>0]+S[k+512>>0]>>16)-128,w[H]=(S[b+768>>0]+S[E+1024>>0]+S[k+1280>>0]>>16)-128,x[H]=(S[b+1280>>0]+S[E+1536>>0]+S[k+1792>>0]>>16)-128;u=z(y,f,u,i,a),d=z(w,c,d,n,o),p=z(x,c,p,n,o),m+=32}V+=8}if(v>=0){var X=[];X[1]=v+1,X[0]=(1<<v+1)-1,B(X)}return N(65497),void 0===e?new Uint8Array(g):t.from(g)},function(){(new Date).getTime();r||(r=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)E[e]=t(e)}(),i=L(M,A),n=L(R,P),a=L(I,T),o=L(C,O),function(){for(var t=1,e=2,r=1;r<=15;r++){for(var i=t;i<e;i++)p[32767+i]=r,d[32767+i]=[],d[32767+i][1]=r,d[32767+i][0]=i;for(var n=-(e-1);n<=-t;n++)p[32767+n]=r,d[32767+n]=[],d[32767+n][1]=r,d[32767+n][0]=e-1+n;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)S[t]=19595*t,S[t+256>>0]=38470*t,S[t+512>>0]=7471*t+32768,S[t+768>>0]=-11059*t,S[t+1024>>0]=-21709*t,S[t+1280>>0]=32768*t+8421375,S[t+1536>>0]=-27439*t,S[t+1792>>0]=-5329*t}(),j(r),(new Date).getTime()}()}function i(t,e){return void 0===e&&(e=50),{data:new r(e).encode(t,e),width:t.width,height:t.height}}void 0!==e?e.exports=i:void 0!==window&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].encode=i)}).call(this,t("buffer").Buffer)},{buffer:48}],83:[function(t,e,r){(function(r){var i=t("path"),n=t("fs"),a=parseInt("0777",8);function o(t,e,s,u){"function"==typeof e?(s=e,e={}):e&&"object"==typeof e||(e={mode:e});var h=e.mode,l=e.fs||n;void 0===h&&(h=a&~r.umask()),u||(u=null);var f=s||function(){};t=i.resolve(t),l.mkdir(t,h,(function(r){if(!r)return f(null,u=u||t);switch(r.code){case"ENOENT":o(i.dirname(t),e,(function(r,i){r?f(r,i):o(t,e,f,i)}));break;default:l.stat(t,(function(t,e){t||!e.isDirectory()?f(r,u):f(null,u)}))}}))}e.exports=o.mkdirp=o.mkdirP=o,o.sync=function t(e,o,s){o&&"object"==typeof o||(o={mode:o});var u=o.mode,h=o.fs||n;void 0===u&&(u=a&~r.umask()),s||(s=null),e=i.resolve(e);try{h.mkdirSync(e,u),s=s||e}catch(r){switch(r.code){case"ENOENT":s=t(i.dirname(e),o,s),t(e,o,s);break;default:var l;try{l=h.statSync(e)}catch(t){throw r}if(!l.isDirectory())throw r}}return s}}).call(this,t("_process"))},{_process:133,fs:47,path:107}],84:[function(t,e,r){
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
"use strict";var i=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(t){i[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,u=o(t),h=1;h<arguments.length;h++){for(var l in r=Object(arguments[h]))n.call(r,l)&&(u[l]=r[l]);if(i){s=i(r);for(var f=0;f<s.length;f++)a.call(r,s[f])&&(u[s[f]]=r[s[f]])}}return u}},{}],85:[function(t,e,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],86:[function(t,e,r){"use strict";var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i},{"./lib/deflate":87,"./lib/inflate":88,"./lib/utils/common":89,"./lib/zlib/constants":92}],87:[function(t,e,r){"use strict";var i=t("./zlib/deflate"),n=t("./utils/common"),a=t("./utils/strings"),o=t("./zlib/messages"),s=t("./zlib/zstream"),u=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=n.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,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 s,this.strm.avail_out=0;var r=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(o[r]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){var l;if(l="string"==typeof e.dictionary?a.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=i.deflateSetDictionary(this.strm,l)))throw new Error(o[r]);this._dict_set=!0}}function l(t,e){var r=new h(e);if(r.push(t,!0),r.err)throw r.msg||o[r.err];return r.result}h.prototype.push=function(t,e){var r,o,s=this.strm,h=this.options.chunkSize;if(this.ended)return!1;o=e===~~e?e:!0===e?4:0,"string"==typeof t?s.input=a.string2buf(t):"[object ArrayBuffer]"===u.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new n.Buf8(h),s.next_out=0,s.avail_out=h),1!==(r=i.deflate(s,o))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(a.buf2binstring(n.shrinkBuf(s.output,s.next_out))):this.onData(n.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===o?(r=i.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==o||(this.onEnd(0),s.avail_out=0,!0)},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=h,r.deflate=l,r.deflateRaw=function(t,e){return(e=e||{}).raw=!0,l(t,e)},r.gzip=function(t,e){return(e=e||{}).gzip=!0,l(t,e)}},{"./utils/common":89,"./utils/strings":90,"./zlib/deflate":94,"./zlib/messages":99,"./zlib/zstream":101}],88:[function(t,e,r){"use strict";var i=t("./zlib/inflate"),n=t("./utils/common"),a=t("./utils/strings"),o=t("./zlib/constants"),s=t("./zlib/messages"),u=t("./zlib/zstream"),h=t("./zlib/gzheader"),l=Object.prototype.toString;function f(t){if(!(this instanceof f))return new f(t);this.options=n.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 u,this.strm.avail_out=0;var r=i.inflateInit2(this.strm,e.windowBits);if(r!==o.Z_OK)throw new Error(s[r]);this.header=new h,i.inflateGetHeader(this.strm,this.header)}function c(t,e){var r=new f(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}f.prototype.push=function(t,e){var r,s,u,h,f,c,d=this.strm,p=this.options.chunkSize,m=this.options.dictionary,b=!1;if(this.ended)return!1;s=e===~~e?e:!0===e?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof t?d.input=a.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new n.Buf8(p),d.next_out=0,d.avail_out=p),(r=i.inflate(d,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&m&&(c="string"==typeof m?a.string2buf(m):"[object ArrayBuffer]"===l.call(m)?new Uint8Array(m):m,r=i.inflateSetDictionary(this.strm,c)),r===o.Z_BUF_ERROR&&!0===b&&(r=o.Z_OK,b=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==o.Z_STREAM_END&&(0!==d.avail_in||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(u=a.utf8border(d.output,d.next_out),h=d.next_out-u,f=a.buf2string(d.output,u),d.next_out=h,d.avail_out=p-h,h&&n.arraySet(d.output,d.output,u,h,0),this.onData(f)):this.onData(n.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(b=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),d.avail_out=0,!0)},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=f,r.inflate=c,r.inflateRaw=function(t,e){return(e=e||{}).raw=!0,c(t,e)},r.ungzip=c},{"./utils/common":89,"./utils/strings":90,"./zlib/constants":92,"./zlib/gzheader":95,"./zlib/inflate":97,"./zlib/messages":99,"./zlib/zstream":101}],89:[function(t,e,r){arguments[4][36][0].apply(r,arguments)},{dup:36}],90:[function(t,e,r){"use strict";var i=t("./common"),n=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(t){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){a=!1}for(var o=new i.Buf8(256),s=0;s<256;s++)o[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function u(t,e){if(e<65537&&(t.subarray&&a||!t.subarray&&n))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var r="",o=0;o<e;o++)r+=String.fromCharCode(t[o]);return r}o[254]=o[254]=1,r.string2buf=function(t){var e,r,n,a,o,s=t.length,u=0;for(a=0;a<s;a++)55296==(64512&(r=t.charCodeAt(a)))&&a+1<s&&56320==(64512&(n=t.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(n-56320),a++),u+=r<128?1:r<2048?2:r<65536?3:4;for(e=new i.Buf8(u),o=0,a=0;o<u;a++)55296==(64512&(r=t.charCodeAt(a)))&&a+1<s&&56320==(64512&(n=t.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(n-56320),a++),r<128?e[o++]=r:r<2048?(e[o++]=192|r>>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},r.buf2binstring=function(t){return u(t,t.length)},r.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,n=e.length;r<n;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,i,n,a,s=e||t.length,h=new Array(2*s);for(i=0,r=0;r<s;)if((n=t[r++])<128)h[i++]=n;else if((a=o[n])>4)h[i++]=65533,r+=a-1;else{for(n&=2===a?31:3===a?15:7;a>1&&r<s;)n=n<<6|63&t[r++],a--;a>1?h[i++]=65533:n<65536?h[i++]=n:(n-=65536,h[i++]=55296|n>>10&1023,h[i++]=56320|1023&n)}return u(h,i)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+o[t[r]]>e?r:e}},{"./common":89}],91:[function(t,e,r){arguments[4][37][0].apply(r,arguments)},{dup:37}],92:[function(t,e,r){arguments[4][38][0].apply(r,arguments)},{dup:38}],93:[function(t,e,r){arguments[4][39][0].apply(r,arguments)},{dup:39}],94:[function(t,e,r){"use strict";var i,n=t("../utils/common"),a=t("./trees"),o=t("./adler32"),s=t("./crc32"),u=t("./messages"),h=-2,l=258,f=262,c=103,d=113,p=666;function m(t,e){return t.msg=u[e],e}function b(t){return(t<<1)-(t>4?9:0)}function g(t){for(var e=t.length;--e>=0;)t[e]=0}function _(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(n.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 v(t,e){a._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,_(t.strm)}function y(t,e){t.pending_buf[t.pending++]=e}function w(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function x(t,e){var r,i,n=t.max_chain_length,a=t.strstart,o=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-f?t.strstart-(t.w_size-f):0,h=t.window,c=t.w_mask,d=t.prev,p=t.strstart+l,m=h[a+o-1],b=h[a+o];t.prev_length>=t.good_match&&(n>>=2),s>t.lookahead&&(s=t.lookahead);do{if(h[(r=e)+o]===b&&h[r+o-1]===m&&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]&&a<p);if(i=l-(p-a),a=p-l,i>o){if(t.match_start=e,o=i,i>=s)break;m=h[a+o-1],b=h[a+o]}}}while((e=d[e&c])>u&&0!=--n);return o<=t.lookahead?o:t.lookahead}function E(t){var e,r,i,a,u,h,l,c,d,p,m=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-f)){n.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=r=t.hash_size;do{i=t.head[--e],t.head[e]=i>=m?i-m:0}while(--r);e=r=m;do{i=t.prev[--e],t.prev[e]=i>=m?i-m:0}while(--r);a+=m}if(0===t.strm.avail_in)break;if(h=t.strm,l=t.window,c=t.strstart+t.lookahead,d=a,p=void 0,(p=h.avail_in)>d&&(p=d),r=0===p?0:(h.avail_in-=p,n.arraySet(l,h.input,h.next_in,p,c),1===h.state.wrap?h.adler=o(h.adler,l,p,c):2===h.state.wrap&&(h.adler=s(h.adler,l,p,c)),h.next_in+=p,h.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+3-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<f&&0!==t.strm.avail_in)}function S(t,e){for(var r,i;;){if(t.lookahead<f){if(E(t),t.lookahead<f&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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-f&&(t.match_length=x(t,r)),t.match_length>=3)if(i=a._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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 i=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}function k(t,e){for(var r,i,n;;){if(t.lookahead<f){if(E(t),t.lookahead<f&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-f&&(t.match_length=x(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=a._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-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=2,t.strstart++,i&&(v(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((i=a._tr_tally(t,0,t.window[t.strstart-1]))&&v(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=a._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}function M(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}function A(){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=8,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 n.Buf16(1146),this.dyn_dtree=new n.Buf16(122),this.bl_tree=new n.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(16),this.heap=new n.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(573),g(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 I(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:d,t.adler=2===e.wrap?0:1,e.last_flush=0,a._tr_init(e),0):m(t,h)}function T(t){var e,r=I(t);return 0===r&&((e=t.state).window_size=2*e.w_size,g(e.head),e.max_lazy_match=i[e.level].max_lazy,e.good_match=i[e.level].good_length,e.nice_match=i[e.level].nice_length,e.max_chain_length=i[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),r}function R(t,e,r,i,a,o){if(!t)return h;var s=1;if(-1===e&&(e=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),a<1||a>9||8!==r||i<8||i>15||e<0||e>9||o<0||o>4)return m(t,h);8===i&&(i=9);var u=new A;return t.state=u,u.strm=t,u.wrap=s,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+3-1)/3),u.window=new n.Buf8(2*u.w_size),u.head=new n.Buf16(u.hash_size),u.prev=new n.Buf16(u.w_size),u.lit_bufsize=1<<a+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new n.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=o,u.method=r,T(t)}i=[new M(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(E(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,v(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-f&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(v(t,!1),t.strm.avail_out),1)})),new M(4,4,8,4,S),new M(4,5,16,8,S),new M(4,6,32,32,S),new M(4,4,16,16,k),new M(8,16,32,32,k),new M(8,16,128,128,k),new M(8,32,128,256,k),new M(32,128,258,1024,k),new M(32,258,258,4096,k)],r.deflateInit=function(t,e){return R(t,e,8,15,8,0)},r.deflateInit2=R,r.deflateReset=T,r.deflateResetKeep=I,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?h:(t.state.gzhead=e,0):h},r.deflate=function(t,e){var r,n,o,u;if(!t||!t.state||e>5||e<0)return t?m(t,h):h;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||n.status===p&&4!==e)return m(t,0===t.avail_out?-5:h);if(n.strm=t,r=n.last_flush,n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,y(n,31),y(n,139),y(n,8),n.gzhead?(y(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),y(n,255&n.gzhead.time),y(n,n.gzhead.time>>8&255),y(n,n.gzhead.time>>16&255),y(n,n.gzhead.time>>24&255),y(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),y(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(y(n,255&n.gzhead.extra.length),y(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=s(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(y(n,0),y(n,0),y(n,0),y(n,0),y(n,0),y(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),y(n,3),n.status=d);else{var f=8+(n.w_bits-8<<4)<<8;f|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(f|=32),f+=31-f%31,n.status=d,w(n,f),0!==n.strstart&&(w(n,t.adler>>>16),w(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),_(t),o=n.pending,n.pending!==n.pending_buf_size));)y(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),_(t),o=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,y(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),0===u&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),_(t),o=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,y(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),0===u&&(n.status=c)}else n.status=c;if(n.status===c&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&_(t),n.pending+2<=n.pending_buf_size&&(y(n,255&t.adler),y(n,t.adler>>8&255),t.adler=0,n.status=d)):n.status=d),0!==n.pending){if(_(t),0===t.avail_out)return n.last_flush=-1,0}else if(0===t.avail_in&&b(e)<=b(r)&&4!==e)return m(t,-5);if(n.status===p&&0!==t.avail_in)return m(t,-5);if(0!==t.avail_in||0!==n.lookahead||0!==e&&n.status!==p){var x=2===n.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(E(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(n,e):3===n.strategy?function(t,e){for(var r,i,n,o,s=t.window;;){if(t.lookahead<=l){if(E(t),t.lookahead<=l&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=s[n=t.strstart-1])===s[++n]&&i===s[++n]&&i===s[++n]){o=t.strstart+l;do{}while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&n<o);t.match_length=l-(o-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=a._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(n,e):i[n.level].func(n,e);if(3!==x&&4!==x||(n.status=p),1===x||3===x)return 0===t.avail_out&&(n.last_flush=-1),0;if(2===x&&(1===e?a._tr_align(n):5!==e&&(a._tr_stored_block(n,0,0,!1),3===e&&(g(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),_(t),0===t.avail_out))return n.last_flush=-1,0}return 4!==e?0:n.wrap<=0?1:(2===n.wrap?(y(n,255&t.adler),y(n,t.adler>>8&255),y(n,t.adler>>16&255),y(n,t.adler>>24&255),y(n,255&t.total_in),y(n,t.total_in>>8&255),y(n,t.total_in>>16&255),y(n,t.total_in>>24&255)):(w(n,t.adler>>>16),w(n,65535&t.adler)),_(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?0:1)},r.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==c&&e!==d&&e!==p?m(t,h):(t.state=null,e===d?m(t,-3):0):h},r.deflateSetDictionary=function(t,e){var r,i,a,s,u,l,f,c,d=e.length;if(!t||!t.state)return h;if(2===(s=(r=t.state).wrap)||1===s&&42!==r.status||r.lookahead)return h;for(1===s&&(t.adler=o(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(g(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new n.Buf8(r.w_size),n.arraySet(c,e,d-r.w_size,r.w_size,0),e=c,d=r.w_size),u=t.avail_in,l=t.next_in,f=t.input,t.avail_in=d,t.next_in=0,t.input=e,E(r);r.lookahead>=3;){i=r.strstart,a=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+3-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++}while(--a);r.strstart=i,r.lookahead=2,E(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=l,t.input=f,t.avail_in=u,r.wrap=s,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":89,"./adler32":91,"./crc32":93,"./messages":99,"./trees":100}],95:[function(t,e,r){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],96:[function(t,e,r){arguments[4][41][0].apply(r,arguments)},{dup:41}],97:[function(t,e,r){arguments[4][42][0].apply(r,arguments)},{"../utils/common":89,"./adler32":91,"./crc32":93,"./inffast":96,"./inftrees":98,dup:42}],98:[function(t,e,r){arguments[4][43][0].apply(r,arguments)},{"../utils/common":89,dup:43}],99:[function(t,e,r){arguments[4][44][0].apply(r,arguments)},{dup:44}],100:[function(t,e,r){"use strict";var i=t("../utils/common");function n(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,o=286,s=30,u=15,h=[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],l=[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],f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);n(d);var p=new Array(60);n(p);var m=new Array(512);n(m);var b=new Array(256);n(b);var g=new Array(29);n(g);var _,v,y,w=new Array(s);function x(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function E(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function S(t){return t<256?m[t]:m[256+(t>>>7)]}function k(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function M(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,k(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function A(t,e,r){M(t,r[2*e],r[2*e+1])}function I(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function T(t,e,r){var i,n,a=new Array(16),o=0;for(i=1;i<=u;i++)a[i]=o=o+r[i-1]<<1;for(n=0;n<=e;n++){var s=t[2*n+1];0!==s&&(t[2*n]=I(a[s]++,s))}}function R(t){var e;for(e=0;e<o;e++)t.dyn_ltree[2*e]=0;for(e=0;e<s;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function P(t){t.bi_valid>8?k(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 C(t,e,r,i){var n=2*e,a=2*r;return t[n]<t[a]||t[n]===t[a]&&i[e]<=i[r]}function O(t,e,r){for(var i=t.heap[r],n=r<<1;n<=t.heap_len&&(n<t.heap_len&&C(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!C(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i}function L(t,e,r){var i,n,o,s,u=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*u]<<8|t.pending_buf[t.d_buf+2*u+1],n=t.pending_buf[t.l_buf+u],u++,0===i?A(t,n,e):(A(t,(o=b[n])+a+1,e),0!==(s=h[o])&&M(t,n-=g[o],s),A(t,o=S(--i),r),0!==(s=l[o])&&M(t,i-=w[o],s))}while(u<t.last_lit);A(t,256,e)}function B(t,e){var r,i,n,a=e.dyn_tree,o=e.stat_desc.static_tree,s=e.stat_desc.has_stree,h=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<h;r++)0!==a[2*r]?(t.heap[++t.heap_len]=l=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)a[2*(n=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[n]=0,t.opt_len--,s&&(t.static_len-=o[2*n+1]);for(e.max_code=l,r=t.heap_len>>1;r>=1;r--)O(t,a,r);n=h;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],O(t,a,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,a[2*n]=a[2*r]+a[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,a[2*r+1]=a[2*i+1]=n,t.heap[1]=n++,O(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,a,o,s,h=e.dyn_tree,l=e.max_code,f=e.stat_desc.static_tree,c=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,b=0;for(a=0;a<=u;a++)t.bl_count[a]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(a=h[2*h[2*(i=t.heap[r])+1]+1]+1)>m&&(a=m,b++),h[2*i+1]=a,i>l||(t.bl_count[a]++,o=0,i>=p&&(o=d[i-p]),s=h[2*i],t.opt_len+=s*(a+o),c&&(t.static_len+=s*(f[2*i+1]+o)));if(0!==b){do{for(a=m-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[m]--,b-=2}while(b>0);for(a=m;0!==a;a--)for(i=t.bl_count[a];0!==i;)(n=t.heap[--r])>l||(h[2*n+1]!==a&&(t.opt_len+=(a-h[2*n+1])*h[2*n],h[2*n+1]=a),i--)}}(t,e),T(a,l,t.bl_count)}function D(t,e,r){var i,n,a=-1,o=e[1],s=0,u=7,h=4;for(0===o&&(u=138,h=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=o,o=e[2*(i+1)+1],++s<u&&n===o||(s<h?t.bl_tree[2*n]+=s:0!==n?(n!==a&&t.bl_tree[2*n]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,a=n,0===o?(u=138,h=3):n===o?(u=6,h=3):(u=7,h=4))}function N(t,e,r){var i,n,a=-1,o=e[1],s=0,u=7,h=4;for(0===o&&(u=138,h=3),i=0;i<=r;i++)if(n=o,o=e[2*(i+1)+1],!(++s<u&&n===o)){if(s<h)do{A(t,n,t.bl_tree)}while(0!=--s);else 0!==n?(n!==a&&(A(t,n,t.bl_tree),s--),A(t,16,t.bl_tree),M(t,s-3,2)):s<=10?(A(t,17,t.bl_tree),M(t,s-3,3)):(A(t,18,t.bl_tree),M(t,s-11,7));s=0,a=n,0===o?(u=138,h=3):n===o?(u=6,h=3):(u=7,h=4)}}n(w);var z=!1;function j(t,e,r,n){M(t,0+(n?1:0),3),function(t,e,r,n){P(t),n&&(k(t,r),k(t,~r)),i.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r,!0)}r._tr_init=function(t){z||(!function(){var t,e,r,i,n,a=new Array(16);for(r=0,i=0;i<28;i++)for(g[i]=r,t=0;t<1<<h[i];t++)b[r++]=i;for(b[r-1]=i,n=0,i=0;i<16;i++)for(w[i]=n,t=0;t<1<<l[i];t++)m[n++]=i;for(n>>=7;i<s;i++)for(w[i]=n<<7,t=0;t<1<<l[i]-7;t++)m[256+n++]=i;for(e=0;e<=u;e++)a[e]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,a[8]++;for(;t<=255;)d[2*t+1]=9,t++,a[9]++;for(;t<=279;)d[2*t+1]=7,t++,a[7]++;for(;t<=287;)d[2*t+1]=8,t++,a[8]++;for(T(d,287,a),t=0;t<s;t++)p[2*t+1]=5,p[2*t]=I(t,5);_=new x(d,h,257,o,u),v=new x(p,l,0,s,u),y=new x(new Array(0),f,0,19,7)}(),z=!0),t.l_desc=new E(t.dyn_ltree,_),t.d_desc=new E(t.dyn_dtree,v),t.bl_desc=new E(t.bl_tree,y),t.bi_buf=0,t.bi_valid=0,R(t)},r._tr_stored_block=j,r._tr_flush_block=function(t,e,r,i){var n,o,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),B(t,t.l_desc),B(t,t.d_desc),s=function(t){var e;for(D(t,t.dyn_ltree,t.l_desc.max_code),D(t,t.dyn_dtree,t.d_desc.max_code),B(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=n&&(n=o)):n=o=r+5,r+4<=n&&-1!==e?j(t,e,r,i):4===t.strategy||o===n?(M(t,2+(i?1:0),3),L(t,d,p)):(M(t,4+(i?1:0),3),function(t,e,r,i){var n;for(M(t,e-257,5),M(t,r-1,5),M(t,i-4,4),n=0;n<i;n++)M(t,t.bl_tree[2*c[n]+1],3);N(t,t.dyn_ltree,e-1),N(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),L(t,t.dyn_ltree,t.dyn_dtree)),R(t),i&&P(t)},r._tr_tally=function(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*(b[r]+a+1)]++,t.dyn_dtree[2*S(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){M(t,2,3),A(t,256,d),function(t){16===t.bi_valid?(k(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)}(t)}},{"../utils/common":89}],101:[function(t,e,r){arguments[4][46][0].apply(r,arguments)},{dup:46}],102:[function(t,e,r){function i(t,e){if(!(t=t.replace(/\t+/g," ").trim()))return null;var r=t.indexOf(" ");if(-1===r)throw new Error("no named row at line "+e);var i=t.substring(0,r);t=(t=(t=(t=t.substring(r+1)).replace(/letter=[\'\"]\S+[\'\"]/gi,"")).split("=")).map((function(t){return t.trim().match(/(".*?"|[^"\s]+)+(?=\s*|\s*$)/g)}));for(var a=[],o=0;o<t.length;o++){var s=t[o];0===o?a.push({key:s[0],data:""}):o===t.length-1?a[a.length-1].data=n(s[0]):(a[a.length-1].data=n(s[0]),a.push({key:s[1],data:""}))}var u={key:i,data:{}};return a.forEach((function(t){u.data[t.key]=t.data})),u}function n(t){return t&&0!==t.length?0===t.indexOf('"')||0===t.indexOf("'")?t.substring(1,t.length-1):-1!==t.indexOf(",")?function(t){return t.split(",").map((function(t){return parseInt(t,10)}))}(t):parseInt(t,10):""}e.exports=function(t){if(!t)throw new Error("no data provided");var e={pages:[],chars:[],kernings:[]},r=(t=t.toString().trim()).split(/\r\n?|\n/g);if(0===r.length)throw new Error("no data in BMFont file");for(var n=0;n<r.length;n++){var a=i(r[n],n);if(a)if("page"===a.key){if("number"!=typeof a.data.id)throw new Error("malformed file at line "+n+" -- needs page id=N");if("string"!=typeof a.data.file)throw new Error("malformed file at line "+n+' -- needs page file="path"');e.pages[a.data.id]=a.data.file}else"chars"===a.key||"kernings"===a.key||("char"===a.key?e.chars.push(a.data):"kerning"===a.key?e.kernings.push(a.data):e[a.key]=a.data)}return e}},{}],103:[function(t,e,r){var i=[66,77,70];function n(t,e,r){if(r>e.length-1)return 0;var i=e.readUInt8(r++),n=e.readInt32LE(r);switch(r+=4,i){case 1:t.info=function(t,e){var r={};r.size=t.readInt16LE(e);var i=t.readUInt8(e+2);r.smooth=i>>7&1,r.unicode=i>>6&1,r.italic=i>>5&1,r.bold=i>>4&1,i>>3&1&&(r.fixedHeight=1);return r.charset=t.readUInt8(e+3)||"",r.stretchH=t.readUInt16LE(e+4),r.aa=t.readUInt8(e+6),r.padding=[t.readInt8(e+7),t.readInt8(e+8),t.readInt8(e+9),t.readInt8(e+10)],r.spacing=[t.readInt8(e+11),t.readInt8(e+12)],r.outline=t.readUInt8(e+13),r.face=function(t,e){return a(t,e).toString("utf8")}(t,e+14),r}(e,r);break;case 2:t.common=function(t,e){var r={};r.lineHeight=t.readUInt16LE(e),r.base=t.readUInt16LE(e+2),r.scaleW=t.readUInt16LE(e+4),r.scaleH=t.readUInt16LE(e+6),r.pages=t.readUInt16LE(e+8);t.readUInt8(e+10);return r.packed=0,r.alphaChnl=t.readUInt8(e+11),r.redChnl=t.readUInt8(e+12),r.greenChnl=t.readUInt8(e+13),r.blueChnl=t.readUInt8(e+14),r}(e,r);break;case 3:t.pages=function(t,e,r){for(var i=[],n=a(t,e),o=n.length+1,s=r/o,u=0;u<s;u++)i[u]=t.slice(e,e+n.length).toString("utf8"),e+=o;return i}(e,r,n);break;case 4:t.chars=function(t,e,r){for(var i=[],n=r/20,a=0;a<n;a++){var o={},s=20*a;o.id=t.readUInt32LE(e+0+s),o.x=t.readUInt16LE(e+4+s),o.y=t.readUInt16LE(e+6+s),o.width=t.readUInt16LE(e+8+s),o.height=t.readUInt16LE(e+10+s),o.xoffset=t.readInt16LE(e+12+s),o.yoffset=t.readInt16LE(e+14+s),o.xadvance=t.readInt16LE(e+16+s),o.page=t.readUInt8(e+18+s),o.chnl=t.readUInt8(e+19+s),i[a]=o}return i}(e,r,n);break;case 5:t.kernings=function(t,e,r){for(var i=[],n=r/10,a=0;a<n;a++){var o={},s=10*a;o.first=t.readUInt32LE(e+0+s),o.second=t.readUInt32LE(e+4+s),o.amount=t.readInt16LE(e+8+s),i[a]=o}return i}(e,r,n)}return 5+n}function a(t,e){for(var r=e;r<t.length&&0!==t[r];r++);return t.slice(e,r)}e.exports=function(t){if(t.length<6)throw new Error("invalid buffer length for BMFont");if(!i.every((function(e,r){return t.readUInt8(r)===e})))throw new Error("BMFont missing BMF byte header");var e=3;if(t.readUInt8(e++)>3)throw new Error("Only supports BMFont Binary v3 (BMFont App v1.10)");for(var r={kernings:[],chars:[]},a=0;a<5;a++)e+=n(r,t,e);return r}},{}],104:[function(t,e,r){var i=t("./parse-attribs"),n=t("xml-parse-from-string"),a={scaleh:"scaleH",scalew:"scaleW",stretchh:"stretchH",lineheight:"lineHeight",alphachnl:"alphaChnl",redchnl:"redChnl",greenchnl:"greenChnl",bluechnl:"blueChnl"};function o(t){return function(t){for(var e=[],r=0;r<t.attributes.length;r++)e.push(t.attributes[r]);return e}(t).reduce((function(t,e){var r;return t[(r=e.nodeName,a[r.toLowerCase()]||r)]=e.nodeValue,t}),{})}e.exports=function(t){t=t.toString();var e=n(t),r={pages:[],chars:[],kernings:[]};["info","common"].forEach((function(t){var n=e.getElementsByTagName(t)[0];n&&(r[t]=i(o(n)))}));var a=e.getElementsByTagName("pages")[0];if(!a)throw new Error("malformed file -- no <pages> element");for(var s=a.getElementsByTagName("page"),u=0;u<s.length;u++){var h=s[u],l=parseInt(h.getAttribute("id"),10),f=h.getAttribute("file");if(isNaN(l))throw new Error('malformed file -- page "id" attribute is NaN');if(!f)throw new Error('malformed file -- needs page "file" attribute');r.pages[parseInt(l,10)]=f}return["chars","kernings"].forEach((function(t){var n=e.getElementsByTagName(t)[0];if(n)for(var a=t.substring(0,t.length-1),s=n.getElementsByTagName(a),u=0;u<s.length;u++){var h=s[u];r[t].push(i(o(h)))}})),r}},{"./parse-attribs":105,"xml-parse-from-string":188}],105:[function(t,e,r){var i="chasrset";e.exports=function(t){for(var e in i in t&&(t.charset=t.chasrset,delete t.chasrset),t)"face"!==e&&"charset"!==e&&(t[e]="padding"===e||"spacing"===e?t[e].split(",").map((function(t){return parseInt(t,10)})):parseInt(t[e],10));return t}},{}],106:[function(t,e,r){var i=t("trim"),n=t("for-each");e.exports=function(t){if(!t)return{};var e={};return n(i(t).split("\n"),(function(t){var r,n=t.indexOf(":"),a=i(t.slice(0,n)).toLowerCase(),o=i(t.slice(n+1));void 0===e[a]?e[a]=o:(r=e[a],"[object Array]"===Object.prototype.toString.call(r)?e[a].push(o):e[a]=[e[a],o])})),e}},{"for-each":63,trim:179}],107:[function(t,e,r){(function(t){function e(t,e){for(var r=0,i=t.length-1;i>=0;i--){var n=t[i];"."===n?t.splice(i,1):".."===n?(t.splice(i,1),r++):r&&(t.splice(i,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function i(t,e){if(t.filter)return t.filter(e);for(var r=[],i=0;i<t.length;i++)e(t[i],i,t)&&r.push(t[i]);return r}r.resolve=function(){for(var r="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,n="/"===o.charAt(0))}return(n?"/":"")+(r=e(i(r.split("/"),(function(t){return!!t})),!n).join("/"))||"."},r.normalize=function(t){var a=r.isAbsolute(t),o="/"===n(t,-1);return(t=e(i(t.split("/"),(function(t){return!!t})),!a).join("/"))||a||(t="."),t&&o&&(t+="/"),(a?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(i(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},r.relative=function(t,e){function i(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var n=i(t.split("/")),a=i(e.split("/")),o=Math.min(n.length,a.length),s=o,u=0;u<o;u++)if(n[u]!==a[u]){s=u;break}var h=[];for(u=s;u<n.length;u++)h.push("..");return(h=h.concat(a.slice(s))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,i=-1,n=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!n){i=a;break}}else n=!1;return-1===i?r?"/":".":r&&1===i?"/":t.slice(0,i)},r.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,i=-1,n=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!n){r=e+1;break}}else-1===i&&(n=!1,i=e+1);return-1===i?"":t.slice(r,i)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,i=-1,n=!0,a=0,o=t.length-1;o>=0;--o){var s=t.charCodeAt(o);if(47!==s)-1===i&&(n=!1,i=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1);else if(!n){r=o+1;break}}return-1===e||-1===i||0===a||1===a&&e===i-1&&e===r+1?"":t.slice(e,i)};var n="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,t("_process"))},{_process:133}],108:[function(t,e,r){(function(r){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=t("http"),a=t("https"),o=t("url"),s=t("querystring"),u=t("zlib"),h=t("util"),l=function(t,e){if("string"!=typeof t&&!t.hasOwnProperty("url"))throw new Error("Missing url option from options for request method.");var h="object"===(void 0===t?"undefined":i(t))?o.parse(t.url):o.parse(t),l={hostname:h.hostname,port:h.port||("http:"===h.protocol.toLowerCase()?80:443),path:h.path,method:"GET",headers:{},auth:h.auth||null,parse:"none",stream:!1};if("object"===(void 0===t?"undefined":i(t))&&(l=Object.assign(l,t)),l.port=Number(l.port),l.hasOwnProperty("timeout")&&delete l.timeout,!0===l.compressed&&(l.headers["accept-encoding"]="gzip, deflate"),t.hasOwnProperty("form")){if("object"!==i(t.form))throw new Error("phin 'form' option must be of type Object if present.");var f=s.stringify(t.form);l.headers["Content-Type"]="application/x-www-form-urlencoded",l.headers["Content-Length"]=r.byteLength(f),t.data=f}var c=void 0,d=function(t){var i=t;!0===l.compressed&&("gzip"===t.headers["content-encoding"]?i=t.pipe(u.createGunzip()):"deflate"===t.headers["content-encoding"]&&(i=t.pipe(u.createInflate()))),!0===l.stream?(t.stream=i,e(null,t)):(t.body=new r([]),i.on("data",(function(e){t.body=r.concat([t.body,e])})),i.on("end",(function(){if(e){if("json"===l.parse)try{t.body=JSON.parse(t.body.toString())}catch(r){return void e("Invalid JSON received.",t)}e(null,t)}})))};switch(h.protocol.toLowerCase()){case"http:":c=n.request(l,d);break;case"https:":c=a.request(l,d);break;default:return void(e&&e(new Error("Invalid / unknown URL protocol. Expected HTTP or HTTPS."),null))}if("number"==typeof t.timeout&&c.setTimeout(t.timeout,(function(){c.abort(),e(new Error("Timeout has been reached."),null),e=null})),c.on("error",(function(t){e&&e(t,null)})),t.hasOwnProperty("data")){var p=t.data;if(!(t.data instanceof r)&&"object"===i(t.data))if("application/x-www-form-urlencoded"===(l.headers["content-type"]||l.headers["Content-Type"]))p=s.stringify(t.data);else try{p=JSON.stringify(t.data)}catch(t){e(new Error("Couldn't stringify object. (Likely due to a circular reference.)"),null)}c.write(p)}c.end()};l.promisified=function(t,e){return new Promise((function(e,r){l(t,(function(t,i){t?r(t):e(i)}))}))},h.promisify&&(l[h.promisify.custom]=l.promisified),e.exports=l}).call(this,t("buffer").Buffer)},{buffer:48,http:156,https:72,querystring:137,url:180,util:186,zlib:35}],109:[function(t,e,r){"use strict";function i(t,e,r,a,o,s){for(var u,h,l,f,c=Math.max(e-1,0),d=Math.max(r-1,0),p=Math.min(e+1,a-1),m=Math.min(r+1,o-1),b=4*(r*a+e),g=0,_=0,v=0,y=0,w=0,x=c;x<=p;x++)for(var E=d;E<=m;E++)if(x!==e||E!==r){var S=n(t,t,b,4*(E*a+x),!0);if(0===S?g++:S<0?v++:S>0&&_++,g>2)return!1;s&&(S<y&&(y=S,u=x,h=E),S>w&&(w=S,l=x,f=E))}return!s||0!==v&&0!==_&&(!i(t,u,h,a,o)&&!i(s,u,h,a,o)||!i(t,l,f,a,o)&&!i(s,l,f,a,o))}function n(t,e,r,i,n){var h=t[r+3]/255,l=e[i+3]/255,f=u(t[r+0],h),c=u(t[r+1],h),d=u(t[r+2],h),p=u(e[i+0],l),m=u(e[i+1],l),b=u(e[i+2],l),g=a(f,c,d)-a(p,m,b);if(n)return g;var _=o(f,c,d)-o(p,m,b),v=s(f,c,d)-s(p,m,b);return.5053*g*g+.299*_*_+.1957*v*v}function a(t,e,r){return.29889531*t+.58662247*e+.11448223*r}function o(t,e,r){return.59597799*t-.2741761*e-.32180189*r}function s(t,e,r){return.21147017*t-.52261711*e+.31114694*r}function u(t,e){return 255+(t-255)*e}function h(t,e,r,i,n){t[e+0]=r,t[e+1]=i,t[e+2]=n,t[e+3]=255}e.exports=function(t,e,r,o,s,l){l||(l={});for(var f=void 0===l.threshold?.1:l.threshold,c=35215*f*f,d=0,p=0;p<s;p++)for(var m=0;m<o;m++){var b=4*(p*o+m);if(n(t,e,b,b)>c)l.includeAA||!i(t,m,p,o,s,e)&&!i(e,m,p,o,s,t)?(r&&h(r,b,255,0,0),d++):r&&h(r,b,255,255,0);else if(r){var g=u((y=void 0,w=void 0,x=void 0,E=void 0,y=(_=t)[(v=b)+3]/255,w=u(_[v+0],y),x=u(_[v+1],y),E=u(_[v+2],y),a(w,x,E)),.1);h(r,b,g,g,g)}}var _,v,y,w,x,E;return d}},{}],110:[function(t,e,r){(function(e){"use strict";var i=t("./interlace"),n={1:{0:0,1:0,2:0,3:255},2:{0:0,1:0,2:0,3:1},3:{0:0,1:1,2:2,3:255},4:{0:0,1:1,2:2,3:3}};function a(t,e,r,i,a,o){for(var s=t.width,u=t.height,h=t.index,l=0;l<u;l++)for(var f=0;f<s;f++){for(var c=r(f,l,h),d=0;d<4;d++){var p=n[i][d];if(255===p)e[c+d]=255;else{var m=p+o;if(m===a.length)throw new Error("Ran out of data");e[c+d]=a[m]}}o+=i}return o}function o(t,e,r,i,a,o){for(var s=t.width,u=t.height,h=t.index,l=0;l<u;l++){for(var f=0;f<s;f++)for(var c=a.get(i),d=r(f,l,h),p=0;p<4;p++){var m=n[i][p];e[d+p]=255!==m?c[m]:o}a.resetAfterLine()}}r.dataToBitMap=function(t,r){var n,s=r.width,u=r.height,h=r.depth,l=r.bpp,f=r.interlace;if(8!==h)var c=function(t,e){var r=[],i=0;function n(){if(i===t.length)throw new Error("Ran out of data");var n,a,o,s,u,h,l,f,c=t[i];switch(i++,e){default:throw new Error("unrecognised depth");case 16:l=t[i],i++,r.push((c<<8)+l);break;case 4:l=15&c,f=c>>4,r.push(f,l);break;case 2:u=3&c,h=c>>2&3,l=c>>4&3,f=c>>6&3,r.push(f,l,h,u);break;case 1:n=1&c,a=c>>1&1,o=c>>2&1,s=c>>3&1,u=c>>4&1,h=c>>5&1,l=c>>6&1,f=c>>7&1,r.push(f,l,h,u,s,o,a,n)}}return{get:function(t){for(;r.length<t;)n();var e=r.slice(0,t);return r=r.slice(t),e},resetAfterLine:function(){r.length=0},end:function(){if(i!==t.length)throw new Error("extra data found")}}}(t,h);n=h<=8?new e(s*u*4):new Uint16Array(s*u*4);var d,p,m=Math.pow(2,h)-1,b=0;if(f)d=i.getImagePasses(s,u),p=i.getInterlaceIterator(s,u);else{var g=0;p=function(){var t=g;return g+=4,t},d=[{width:s,height:u}]}for(var _=0;_<d.length;_++)8===h?b=a(d[_],n,p,l,t,b):o(d[_],n,p,l,c,m);if(8===h){if(b!==t.length)throw new Error("extra data found")}else c.end();return n}}).call(this,t("buffer").Buffer)},{"./interlace":120,buffer:48}],111:[function(t,e,r){(function(r){"use strict";var i=t("./constants");e.exports=function(t,e,n,a){var o,s=-1!==[i.COLORTYPE_COLOR_ALPHA,i.COLORTYPE_ALPHA].indexOf(a.colorType);if(a.colorType===a.inputColorType){var u=(o=new ArrayBuffer(2),new DataView(o).setInt16(0,256,!0),256!==new Int16Array(o)[0]);if(8===a.bitDepth||16===a.bitDepth&&u)return t}var h=16!==a.bitDepth?t:new Uint16Array(t.buffer),l=255,f=i.COLORTYPE_TO_BPP_MAP[a.inputColorType];4!=f||a.inputHasAlpha||(f=3);var c=i.COLORTYPE_TO_BPP_MAP[a.colorType];16===a.bitDepth&&(l=65535,c*=2);var d=new r(e*n*c),p=0,m=0,b=a.bgColor||{};function g(t,e){var r,n,o,u=l;switch(a.inputColorType){case i.COLORTYPE_COLOR_ALPHA:u=t[e+3],r=t[e],n=t[e+1],o=t[e+2];break;case i.COLORTYPE_COLOR:r=t[e],n=t[e+1],o=t[e+2];break;case i.COLORTYPE_ALPHA:u=t[e+1],n=r=t[e],o=r;break;case i.COLORTYPE_GRAYSCALE:n=r=t[e],o=r;break;default:throw new Error("input color type:"+a.inputColorType+" is not supported at present")}return a.inputHasAlpha&&(s||(u/=l,r=Math.min(Math.max(Math.round((1-u)*b.red+u*r),0),l),n=Math.min(Math.max(Math.round((1-u)*b.green+u*n),0),l),o=Math.min(Math.max(Math.round((1-u)*b.blue+u*o),0),l))),{red:r,green:n,blue:o,alpha:u}}void 0===b.red&&(b.red=l),void 0===b.green&&(b.green=l),void 0===b.blue&&(b.blue=l);for(var _=0;_<n;_++)for(var v=0;v<e;v++){var y=g(h,p);switch(a.colorType){case i.COLORTYPE_COLOR_ALPHA:case i.COLORTYPE_COLOR:8===a.bitDepth?(d[m]=y.red,d[m+1]=y.green,d[m+2]=y.blue,s&&(d[m+3]=y.alpha)):(d.writeUInt16BE(y.red,m),d.writeUInt16BE(y.green,m+2),d.writeUInt16BE(y.blue,m+4),s&&d.writeUInt16BE(y.alpha,m+6));break;case i.COLORTYPE_ALPHA:case i.COLORTYPE_GRAYSCALE:var w=(y.red+y.green+y.blue)/3;8===a.bitDepth?(d[m]=w,s&&(d[m+1]=y.alpha)):(d.writeUInt16BE(w,m),s&&d.writeUInt16BE(y.alpha,m+2))}p+=f,m+=c}return d}}).call(this,t("buffer").Buffer)},{"./constants":113,buffer:48}],112:[function(t,e,r){(function(r,i){"use strict";var n=t("util"),a=t("stream"),o=e.exports=function(){a.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};n.inherits(o,a),o.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e}),r.nextTick(function(){this._process(),this._paused&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))},o.prototype.write=function(t,e){return this.writable?(r=i.isBuffer(t)?t:new i(t,e||this._encoding),this._buffers.push(r),this._buffered+=r.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused):(this.emit("error",new Error("Stream not writable")),!1);var r},o.prototype.end=function(t,e){t&&this.write(t,e),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},o.prototype.destroySoon=o.prototype.end,o.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("There are some read requests waiting on finished stream")),this.destroy()},o.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},o.prototype._processReadAllowingLess=function(t){this._reads.shift();var e=this._buffers[0];e.length>t.length?(this._buffered-=t.length,this._buffers[0]=e.slice(t.length),t.func.call(this,e.slice(0,t.length))):(this._buffered-=e.length,this._buffers.shift(),t.func.call(this,e))},o.prototype._processRead=function(t){this._reads.shift();for(var e=0,r=0,n=new i(t.length);e<t.length;){var a=this._buffers[r++],o=Math.min(a.length,t.length-e);a.copy(n,e,0,o),e+=o,o!==a.length&&(this._buffers[--r]=a.slice(o))}r>0&&this._buffers.splice(0,r),this._buffered-=t.length,t.func.call(this,n)},o.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){var t=this._reads[0];if(t.allowLess)this._processReadAllowingLess(t);else{if(!(this._buffered>=t.length))break;this._processRead(t)}}this._buffers&&this._buffers.length>0&&null===this._buffers[0]&&this._end()}catch(t){this.emit("error",t)}}}).call(this,t("_process"),t("buffer").Buffer)},{_process:133,buffer:48,stream:155,util:186}],113:[function(t,e,r){"use strict";e.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},{}],114:[function(t,e,r){"use strict";var i=[];!function(){for(var t=0;t<256;t++){for(var e=t,r=0;r<8;r++)1&e?e=3988292384^e>>>1:e>>>=1;i[t]=e}}();var n=e.exports=function(){this._crc=-1};n.prototype.write=function(t){for(var e=0;e<t.length;e++)this._crc=i[255&(this._crc^t[e])]^this._crc>>>8;return!0},n.prototype.crc32=function(){return-1^this._crc},n.crc32=function(t){for(var e=-1,r=0;r<t.length;r++)e=i[255&(e^t[r])]^e>>>8;return-1^e}},{}],115:[function(t,e,r){(function(r){"use strict";var i=t("./paeth-predictor");var n={0:function(t,e,r,i,n){for(var a=0;a<r;a++)i[n+a]=t[e+a]},1:function(t,e,r,i,n,a){for(var o=0;o<r;o++){var s=o>=a?t[e+o-a]:0,u=t[e+o]-s;i[n+o]=u}},2:function(t,e,r,i,n){for(var a=0;a<r;a++){var o=e>0?t[e+a-r]:0,s=t[e+a]-o;i[n+a]=s}},3:function(t,e,r,i,n,a){for(var o=0;o<r;o++){var s=o>=a?t[e+o-a]:0,u=e>0?t[e+o-r]:0,h=t[e+o]-(s+u>>1);i[n+o]=h}},4:function(t,e,r,n,a,o){for(var s=0;s<r;s++){var u=s>=o?t[e+s-o]:0,h=e>0?t[e+s-r]:0,l=e>0&&s>=o?t[e+s-(r+o)]:0,f=t[e+s]-i(u,h,l);n[a+s]=f}}},a={0:function(t,e,r){for(var i=0,n=e+r,a=e;a<n;a++)i+=Math.abs(t[a]);return i},1:function(t,e,r,i){for(var n=0,a=0;a<r;a++){var o=a>=i?t[e+a-i]:0,s=t[e+a]-o;n+=Math.abs(s)}return n},2:function(t,e,r){for(var i=0,n=e+r,a=e;a<n;a++){var o=e>0?t[a-r]:0,s=t[a]-o;i+=Math.abs(s)}return i},3:function(t,e,r,i){for(var n=0,a=0;a<r;a++){var o=a>=i?t[e+a-i]:0,s=e>0?t[e+a-r]:0,u=t[e+a]-(o+s>>1);n+=Math.abs(u)}return n},4:function(t,e,r,n){for(var a=0,o=0;o<r;o++){var s=o>=n?t[e+o-n]:0,u=e>0?t[e+o-r]:0,h=e>0&&o>=n?t[e+o-(r+n)]:0,l=t[e+o]-i(s,u,h);a+=Math.abs(l)}return a}};e.exports=function(t,e,i,o,s){var u;if("filterType"in o&&-1!==o.filterType){if("number"!=typeof o.filterType)throw new Error("unrecognised filter types");u=[o.filterType]}else u=[0,1,2,3,4];16===o.bitDepth&&(s*=2);for(var h=e*s,l=0,f=0,c=new r((h+1)*i),d=u[0],p=0;p<i;p++){if(u.length>1)for(var m=1/0,b=0;b<u.length;b++){var g=a[u[b]](t,f,h,s);g<m&&(d=u[b],m=g)}c[l]=d,l++,n[d](t,f,h,c,l,s),l+=h,f+=h}return c}}).call(this,t("buffer").Buffer)},{"./paeth-predictor":124,buffer:48}],116:[function(t,e,r){(function(r){"use strict";var i=t("util"),n=t("./chunkstream"),a=t("./filter-parse"),o=e.exports=function(t){n.call(this);var e=[],i=this;this._filter=new a(t,{read:this.read.bind(this),write:function(t){e.push(t)},complete:function(){i.emit("complete",r.concat(e))}}),this._filter.start()};i.inherits(o,n)}).call(this,t("buffer").Buffer)},{"./chunkstream":112,"./filter-parse":118,buffer:48,util:186}],117:[function(t,e,r){(function(e){"use strict";var i=t("./sync-reader"),n=t("./filter-parse");r.process=function(t,r){var a=[],o=new i(t);return new n(r,{read:o.read.bind(o),write:function(t){a.push(t)},complete:function(){}}).start(),o.process(),e.concat(a)}}).call(this,t("buffer").Buffer)},{"./filter-parse":118,"./sync-reader":131,buffer:48}],118:[function(t,e,r){(function(r){"use strict";var i=t("./interlace"),n=t("./paeth-predictor");function a(t,e,r){var i=t*e;return 8!==r&&(i=Math.ceil(i/(8/r))),i}var o=e.exports=function(t,e){var r=t.width,n=t.height,o=t.interlace,s=t.bpp,u=t.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],o)for(var h=i.getImagePasses(r,n),l=0;l<h.length;l++)this._images.push({byteWidth:a(h[l].width,s,u),height:h[l].height,lineIndex:0});else this._images.push({byteWidth:a(r,s,u),height:n,lineIndex:0});this._xComparison=8===u?s:16===u?2*s:1};o.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},o.prototype._unFilterType1=function(t,e,r){for(var i=this._xComparison,n=i-1,a=0;a<r;a++){var o=t[1+a],s=a>n?e[a-i]:0;e[a]=o+s}},o.prototype._unFilterType2=function(t,e,r){for(var i=this._lastLine,n=0;n<r;n++){var a=t[1+n],o=i?i[n]:0;e[n]=a+o}},o.prototype._unFilterType3=function(t,e,r){for(var i=this._xComparison,n=i-1,a=this._lastLine,o=0;o<r;o++){var s=t[1+o],u=a?a[o]:0,h=o>n?e[o-i]:0,l=Math.floor((h+u)/2);e[o]=s+l}},o.prototype._unFilterType4=function(t,e,r){for(var i=this._xComparison,a=i-1,o=this._lastLine,s=0;s<r;s++){var u=t[1+s],h=o?o[s]:0,l=s>a?e[s-i]:0,f=s>a&&o?o[s-i]:0,c=n(l,h,f);e[s]=u+c}},o.prototype._reverseFilterLine=function(t){var e,i=t[0],n=this._images[this._imageIndex],a=n.byteWidth;if(0===i)e=t.slice(1,a+1);else switch(e=new r(a),i){case 1:this._unFilterType1(t,e,a);break;case 2:this._unFilterType2(t,e,a);break;case 3:this._unFilterType3(t,e,a);break;case 4:this._unFilterType4(t,e,a);break;default:throw new Error("Unrecognised filter type - "+i)}this.write(e),n.lineIndex++,n.lineIndex>=n.height?(this._lastLine=null,this._imageIndex++,n=this._images[this._imageIndex]):this._lastLine=e,n?this.read(n.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}}).call(this,t("buffer").Buffer)},{"./interlace":120,"./paeth-predictor":124,buffer:48}],119:[function(t,e,r){(function(t){"use strict";e.exports=function(e,r){var i=r.depth,n=r.width,a=r.height,o=r.colorType,s=r.transColor,u=r.palette,h=e;return 3===o?function(t,e,r,i,n){for(var a=0,o=0;o<i;o++)for(var s=0;s<r;s++){var u=n[t[a]];if(!u)throw new Error("index "+t[a]+" not in palette");for(var h=0;h<4;h++)e[a+h]=u[h];a+=4}}(e,h,n,a,u):(s&&function(t,e,r,i,n){for(var a=0,o=0;o<i;o++)for(var s=0;s<r;s++){var u=!1;if(1===n.length?n[0]===t[a]&&(u=!0):n[0]===t[a]&&n[1]===t[a+1]&&n[2]===t[a+2]&&(u=!0),u)for(var h=0;h<4;h++)e[a+h]=0;a+=4}}(e,h,n,a,s),8!==i&&(16===i&&(h=new t(n*a*4)),function(t,e,r,i,n){for(var a=Math.pow(2,n)-1,o=0,s=0;s<i;s++)for(var u=0;u<r;u++){for(var h=0;h<4;h++)e[o+h]=Math.floor(255*t[o+h]/a+.5);o+=4}}(e,h,n,a,i))),h}}).call(this,t("buffer").Buffer)},{buffer:48}],120:[function(t,e,r){"use strict";var i=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];r.getImagePasses=function(t,e){for(var r=[],n=t%8,a=e%8,o=(t-n)/8,s=(e-a)/8,u=0;u<i.length;u++){for(var h=i[u],l=o*h.x.length,f=s*h.y.length,c=0;c<h.x.length&&h.x[c]<n;c++)l++;for(c=0;c<h.y.length&&h.y[c]<a;c++)f++;l>0&&f>0&&r.push({width:l,height:f,index:u})}return r},r.getInterlaceIterator=function(t){return function(e,r,n){var a=e%i[n].x.length,o=(e-a)/i[n].x.length*8+i[n].x[a],s=r%i[n].y.length;return 4*o+((r-s)/i[n].y.length*8+i[n].y[s])*t*4}}},{}],121:[function(t,e,r){(function(r){"use strict";var i=t("util"),n=t("stream"),a=t("./constants"),o=t("./packer"),s=e.exports=function(t){n.call(this);var e=t||{};this._packer=new o(e),this._deflate=this._packer.createDeflate(),this.readable=!0};i.inherits(s,n),s.prototype.pack=function(t,e,i,n){this.emit("data",new r(a.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,i)),n&&this.emit("data",this._packer.packGAMA(n));var o=this._packer.filterData(t,e,i);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(t){this.emit("data",this._packer.packIDAT(t))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(o)}}).call(this,t("buffer").Buffer)},{"./constants":113,"./packer":123,buffer:48,stream:155,util:186}],122:[function(t,e,r){(function(r){"use strict";var i=!0,n=t("zlib");n.deflateSync||(i=!1);var a=t("./constants"),o=t("./packer");e.exports=function(t,e){if(!i)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");var s=new o(e||{}),u=[];u.push(new r(a.PNG_SIGNATURE)),u.push(s.packIHDR(t.width,t.height)),t.gamma&&u.push(s.packGAMA(t.gamma));var h=s.filterData(t.data,t.width,t.height),l=n.deflateSync(h,s.getDeflateOptions());if(h=null,!l||!l.length)throw new Error("bad png - invalid compressed data response");return u.push(s.packIDAT(l)),u.push(s.packIEND()),r.concat(u)}}).call(this,t("buffer").Buffer)},{"./constants":113,"./packer":123,buffer:48,zlib:35}],123:[function(t,e,r){(function(r){"use strict";var i=t("./constants"),n=t("./crc"),a=t("./bitpacker"),o=t("./filter-pack"),s=t("zlib"),u=e.exports=function(t){if(this._options=t,t.deflateChunkSize=t.deflateChunkSize||32768,t.deflateLevel=null!=t.deflateLevel?t.deflateLevel:9,t.deflateStrategy=null!=t.deflateStrategy?t.deflateStrategy:3,t.inputHasAlpha=null==t.inputHasAlpha||t.inputHasAlpha,t.deflateFactory=t.deflateFactory||s.createDeflate,t.bitDepth=t.bitDepth||8,t.colorType="number"==typeof t.colorType?t.colorType:i.COLORTYPE_COLOR_ALPHA,t.inputColorType="number"==typeof t.inputColorType?t.inputColorType:i.COLORTYPE_COLOR_ALPHA,-1===[i.COLORTYPE_GRAYSCALE,i.COLORTYPE_COLOR,i.COLORTYPE_COLOR_ALPHA,i.COLORTYPE_ALPHA].indexOf(t.colorType))throw new Error("option color type:"+t.colorType+" is not supported at present");if(-1===[i.COLORTYPE_GRAYSCALE,i.COLORTYPE_COLOR,i.COLORTYPE_COLOR_ALPHA,i.COLORTYPE_ALPHA].indexOf(t.inputColorType))throw new Error("option input color type:"+t.inputColorType+" is not supported at present");if(8!==t.bitDepth&&16!==t.bitDepth)throw new Error("option bit depth:"+t.bitDepth+" is not supported at present")};u.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},u.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},u.prototype.filterData=function(t,e,r){var n=a(t,e,r,this._options),s=i.COLORTYPE_TO_BPP_MAP[this._options.colorType];return o(n,e,r,this._options,s)},u.prototype._packChunk=function(t,e){var i=e?e.length:0,a=new r(i+12);return a.writeUInt32BE(i,0),a.writeUInt32BE(t,4),e&&e.copy(a,8),a.writeInt32BE(n.crc32(a.slice(4,a.length-4)),a.length-4),a},u.prototype.packGAMA=function(t){var e=new r(4);return e.writeUInt32BE(Math.floor(t*i.GAMMA_DIVISION),0),this._packChunk(i.TYPE_gAMA,e)},u.prototype.packIHDR=function(t,e){var n=new r(13);return n.writeUInt32BE(t,0),n.writeUInt32BE(e,4),n[8]=this._options.bitDepth,n[9]=this._options.colorType,n[10]=0,n[11]=0,n[12]=0,this._packChunk(i.TYPE_IHDR,n)},u.prototype.packIDAT=function(t){return this._packChunk(i.TYPE_IDAT,t)},u.prototype.packIEND=function(){return this._packChunk(i.TYPE_IEND,null)}}).call(this,t("buffer").Buffer)},{"./bitpacker":111,"./constants":113,"./crc":114,"./filter-pack":115,buffer:48,zlib:35}],124:[function(t,e,r){"use strict";e.exports=function(t,e,r){var i=t+e-r,n=Math.abs(i-t),a=Math.abs(i-e),o=Math.abs(i-r);return n<=a&&n<=o?t:a<=o?e:r}},{}],125:[function(t,e,r){"use strict";var i=t("util"),n=t("zlib"),a=t("./chunkstream"),o=t("./filter-parse-async"),s=t("./parser"),u=t("./bitmapper"),h=t("./format-normaliser"),l=e.exports=function(t){a.call(this),this._parser=new s(t,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this)}),this._options=t,this.writable=!0,this._parser.start()};i.inherits(l,a),l.prototype._handleError=function(t){this.emit("error",t),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",(function(){}))),this.errord=!0},l.prototype._inflateData=function(t){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=n.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{var e=(1+(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3))*this._bitmapInfo.height,r=Math.max(e,n.Z_MIN_CHUNK);this._inflate=n.createInflate({chunkSize:r});var i=e,a=this.emit.bind(this,"error");this._inflate.on("error",(function(t){i&&a(t)})),this._filter.on("complete",this._complete.bind(this));var o=this._filter.write.bind(this._filter);this._inflate.on("data",(function(t){i&&(t.length>i&&(t=t.slice(0,i)),i-=t.length,o(t))})),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(t)},l.prototype._handleMetaData=function(t){this.emit("metadata",t),this._bitmapInfo=Object.create(t),this._filter=new o(this._bitmapInfo)},l.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t},l.prototype._handlePalette=function(t){this._bitmapInfo.palette=t},l.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"),this.destroySoon())},l.prototype._complete=function(t){if(!this.errord){try{var e=u.dataToBitMap(t,this._bitmapInfo),r=h(e,this._bitmapInfo);e=null}catch(t){return void this._handleError(t)}this.emit("parsed",r)}}},{"./bitmapper":110,"./chunkstream":112,"./filter-parse-async":116,"./format-normaliser":119,"./parser":127,util:186,zlib:35}],126:[function(t,e,r){(function(r){"use strict";var i=!0,n=t("zlib"),a=t("./sync-inflate");n.deflateSync||(i=!1);var o=t("./sync-reader"),s=t("./filter-parse-sync"),u=t("./parser"),h=t("./bitmapper"),l=t("./format-normaliser");e.exports=function(t,e){if(!i)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");var f,c,d;var p=[];var m=new o(t);if(new u(e,{read:m.read.bind(m),error:function(t){f=t},metadata:function(t){c=t},gamma:function(t){d=t},palette:function(t){c.palette=t},transColor:function(t){c.transColor=t},inflateData:function(t){p.push(t)}}).start(),m.process(),f)throw f;var b,g=r.concat(p);if(p.length=0,c.interlace)b=n.inflateSync(g);else{var _=(1+(c.width*c.bpp*c.depth+7>>3))*c.height;b=a(g,{chunkSize:_,maxLength:_})}if(g=null,!b||!b.length)throw new Error("bad png - invalid inflate data response");var v=s.process(b,c);g=null;var y=h.dataToBitMap(v,c);v=null;var w=l(y,c);return c.data=w,c.gamma=d||0,c}}).call(this,t("buffer").Buffer)},{"./bitmapper":110,"./filter-parse-sync":117,"./format-normaliser":119,"./parser":127,"./sync-inflate":130,"./sync-reader":131,buffer:48,zlib:35}],127:[function(t,e,r){(function(r){"use strict";var i=t("./constants"),n=t("./crc"),a=e.exports=function(t,e){this._options=t,t.checkCRC=!1!==t.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[i.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[i.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[i.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[i.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[i.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[i.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished};a.prototype.start=function(){this.read(i.PNG_SIGNATURE.length,this._parseSignature.bind(this))},a.prototype._parseSignature=function(t){for(var e=i.PNG_SIGNATURE,r=0;r<e.length;r++)if(t[r]!==e[r])return void this.error(new Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},a.prototype._parseChunkBegin=function(t){for(var e=t.readUInt32BE(0),a=t.readUInt32BE(4),o="",s=4;s<8;s++)o+=String.fromCharCode(t[s]);var u=Boolean(32&t[4]);if(this._hasIHDR||a===i.TYPE_IHDR){if(this._crc=new n,this._crc.write(new r(o)),this._chunks[a])return this._chunks[a](e);u?this.read(e+4,this._skipChunk.bind(this)):this.error(new Error("Unsupported critical chunk type "+o))}else this.error(new Error("Expected IHDR on beggining"))},a.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},a.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},a.prototype._parseChunkEnd=function(t){var e=t.readInt32BE(0),r=this._crc.crc32();this._options.checkCRC&&r!==e?this.error(new Error("Crc error - "+e+" - "+r)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},a.prototype._handleIHDR=function(t){this.read(t,this._parseIHDR.bind(this))},a.prototype._parseIHDR=function(t){this._crc.write(t);var e=t.readUInt32BE(0),r=t.readUInt32BE(4),n=t[8],a=t[9],o=t[10],s=t[11],u=t[12];if(8===n||4===n||2===n||1===n||16===n)if(a in i.COLORTYPE_TO_BPP_MAP)if(0===o)if(0===s)if(0===u||1===u){this._colorType=a;var h=i.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:r,depth:n,interlace:Boolean(u),palette:Boolean(a&i.COLORTYPE_PALETTE),color:Boolean(a&i.COLORTYPE_COLOR),alpha:Boolean(a&i.COLORTYPE_ALPHA),bpp:h,colorType:a}),this._handleChunkEnd()}else this.error(new Error("Unsupported interlace method"));else this.error(new Error("Unsupported filter method"));else this.error(new Error("Unsupported compression method"));else this.error(new Error("Unsupported color type"));else this.error(new Error("Unsupported bit depth "+n))},a.prototype._handlePLTE=function(t){this.read(t,this._parsePLTE.bind(this))},a.prototype._parsePLTE=function(t){this._crc.write(t);for(var e=Math.floor(t.length/3),r=0;r<e;r++)this._palette.push([t[3*r],t[3*r+1],t[3*r+2],255]);this.palette(this._palette),this._handleChunkEnd()},a.prototype._handleTRNS=function(t){this.read(t,this._parseTRNS.bind(this))},a.prototype._parseTRNS=function(t){if(this._crc.write(t),this._colorType===i.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(new Error("Transparency chunk must be after palette"));if(t.length>this._palette.length)return void this.error(new Error("More transparent colors than palette size"));for(var e=0;e<t.length;e++)this._palette[e][3]=t[e];this.palette(this._palette)}this._colorType===i.COLORTYPE_GRAYSCALE&&this.transColor([t.readUInt16BE(0)]),this._colorType===i.COLORTYPE_COLOR&&this.transColor([t.readUInt16BE(0),t.readUInt16BE(2),t.readUInt16BE(4)]),this._handleChunkEnd()},a.prototype._handleGAMA=function(t){this.read(t,this._parseGAMA.bind(this))},a.prototype._parseGAMA=function(t){this._crc.write(t),this.gamma(t.readUInt32BE(0)/i.GAMMA_DIVISION),this._handleChunkEnd()},a.prototype._handleIDAT=function(t){this.read(-t,this._parseIDAT.bind(this,t))},a.prototype._parseIDAT=function(t,e){if(this._crc.write(e),this._colorType===i.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw new Error("Expected palette not found");this.inflateData(e);var r=t-e.length;r>0?this._handleIDAT(r):this._handleChunkEnd()},a.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))},a.prototype._parseIEND=function(t){this._crc.write(t),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}}).call(this,t("buffer").Buffer)},{"./constants":113,"./crc":114,buffer:48}],128:[function(t,e,r){"use strict";var i=t("./parser-sync"),n=t("./packer-sync");r.read=function(t,e){return i(t,e||{})},r.write=function(t,e){return n(t,e)}},{"./packer-sync":122,"./parser-sync":126}],129:[function(t,e,r){(function(e,i){"use strict";var n=t("util"),a=t("stream"),o=t("./parser-async"),s=t("./packer-async"),u=t("./png-sync"),h=r.PNG=function(t){a.call(this),t=t||{},this.width=0|t.width,this.height=0|t.height,this.data=this.width>0&&this.height>0?new i(4*this.width*this.height):null,t.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new o(t),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(t){this.data=t,this.emit("parsed",t)}.bind(this)),this._packer=new s(t),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};n.inherits(h,a),h.sync=u,h.prototype.pack=function(){return this.data&&this.data.length?(e.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this):(this.emit("error","No data provided"),this)},h.prototype.parse=function(t,e){var r,i;e&&(r=function(t){this.removeListener("error",i),this.data=t,e(null,this)}.bind(this),i=function(t){this.removeListener("parsed",r),e(t,null)}.bind(this),this.once("parsed",r),this.once("error",i));return this.end(t),this},h.prototype.write=function(t){return this._parser.write(t),!0},h.prototype.end=function(t){this._parser.end(t)},h.prototype._metadata=function(t){this.width=t.width,this.height=t.height,this.emit("metadata",t)},h.prototype._gamma=function(t){this.gamma=t},h.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},h.bitblt=function(t,e,r,i,n,a,o,s){if(i|=0,n|=0,a|=0,o|=0,s|=0,(r|=0)>t.width||i>t.height||r+n>t.width||i+a>t.height)throw new Error("bitblt reading outside image");if(o>e.width||s>e.height||o+n>e.width||s+a>e.height)throw new Error("bitblt writing outside image");for(var u=0;u<a;u++)t.data.copy(e.data,(s+u)*e.width+o<<2,(i+u)*t.width+r<<2,(i+u)*t.width+r+n<<2)},h.prototype.bitblt=function(t,e,r,i,n,a,o){return h.bitblt(this,t,e,r,i,n,a,o),this},h.adjustGamma=function(t){if(t.gamma){for(var e=0;e<t.height;e++)for(var r=0;r<t.width;r++)for(var i=t.width*e+r<<2,n=0;n<3;n++){var a=t.data[i+n]/255;a=Math.pow(a,1/2.2/t.gamma),t.data[i+n]=Math.round(255*a)}t.gamma=0}},h.prototype.adjustGamma=function(){h.adjustGamma(this)}}).call(this,t("_process"),t("buffer").Buffer)},{"./packer-async":121,"./parser-async":125,"./png-sync":128,_process:133,buffer:48,stream:155,util:186}],130:[function(t,e,r){(function(i,n){"use strict";var a=t("assert").ok,o=t("zlib"),s=t("util"),u=t("buffer").kMaxLength;function h(t){if(!(this instanceof h))return new h(t);t&&t.chunkSize<o.Z_MIN_CHUNK&&(t.chunkSize=o.Z_MIN_CHUNK),o.Inflate.call(this,t),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,t&&null!=t.maxLength&&(this._maxLength=t.maxLength)}function l(t,e){e&&i.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}function f(t,e){return function(t,e){if("string"==typeof e&&(e=n.from(e)),!(e instanceof n))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return null==r&&(r=o.Z_FINISH),t._processChunk(e,r)}(new h(e),t)}h.prototype._processChunk=function(t,e,r){if("function"==typeof r)return o.Inflate._processChunk.call(this,t,e,r);var i,s=this,h=t&&t.length,f=this._chunkSize-this._offset,c=this._maxLength,d=0,p=[],m=0;function b(t,e){if(!s._hadError){var r=f-e;if(a(r>=0,"have should not go down"),r>0){var i=s._buffer.slice(s._offset,s._offset+r);if(s._offset+=r,i.length>c&&(i=i.slice(0,c)),p.push(i),m+=i.length,0===(c-=i.length))return!1}return(0===e||s._offset>=s._chunkSize)&&(f=s._chunkSize,s._offset=0,s._buffer=n.allocUnsafe(s._chunkSize)),0===e&&(d+=h-t,h=t,!0)}}this.on("error",(function(t){i=t})),a(this._handle,"zlib binding closed");do{var g=this._handle.writeSync(e,t,d,h,this._buffer,this._offset,f);g=g||this._writeState}while(!this._hadError&&b(g[0],g[1]));if(this._hadError)throw i;if(m>=u)throw l(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes");var _=n.concat(p,m);return l(this),_},s.inherits(h,o.Inflate),e.exports=r=f,r.Inflate=h,r.createInflate=function(t){return new h(t)},r.inflateSync=f}).call(this,t("_process"),t("buffer").Buffer)},{_process:133,assert:25,buffer:48,util:186,zlib:35}],131:[function(t,e,r){"use strict";var i=e.exports=function(t){this._buffer=t,this._reads=[]};i.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})},i.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){var t=this._reads[0];if(!this._buffer.length||!(this._buffer.length>=t.length||t.allowLess))break;this._reads.shift();var e=this._buffer;this._buffer=e.slice(t.length),t.func.call(this,e.slice(0,t.length))}return this._reads.length>0?new Error("There are some read requests waitng on finished stream"):this._buffer.length>0?new Error("unrecognised content at end of stream"):void 0}},{}],132:[function(t,e,r){(function(t){"use strict";void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,i,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,r)}));case 3:return t.nextTick((function(){e.call(null,r,i)}));case 4:return t.nextTick((function(){e.call(null,r,i,n)}));default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return t.nextTick((function(){e.apply(null,a)}))}}}:e.exports=t}).call(this,t("_process"))},{_process:133}],133:[function(t,e,r){var i,n,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(t){if(i===setTimeout)return setTimeout(t,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(t){i=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var h,l=[],f=!1,c=-1;function d(){f&&h&&(f=!1,h.length?l=h.concat(l):c=-1,l.length&&p())}function p(){if(!f){var t=u(d);f=!0;for(var e=l.length;e;){for(h=l,l=[];++c<e;)h&&h[c].run();c=-1,e=l.length}h=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function b(){}a.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];l.push(new m(t,e)),1!==l.length||f||u(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=b,a.addListener=b,a.once=b,a.off=b,a.removeListener=b,a.removeAllListeners=b,a.emit=b,a.prependListener=b,a.prependOnceListener=b,a.listeners=function(t){return[]},a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],134:[function(t,e,r){(function(t){!function(i){var n="object"==typeof r&&r&&!r.nodeType&&r,a="object"==typeof e&&e&&!e.nodeType&&e,o="object"==typeof t&&t;o.global!==o&&o.window!==o&&o.self!==o||(i=o);var s,u,h=2147483647,l=36,f=/^xn--/,c=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,b=String.fromCharCode;function g(t){throw new RangeError(p[t])}function _(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function v(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+_((t=t.replace(d,".")).split("."),e).join(".")}function y(t){for(var e,r,i=[],n=0,a=t.length;n<a;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<a?56320==(64512&(r=t.charCodeAt(n++)))?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--):i.push(e);return i}function w(t){return _(t,(function(t){var e="";return t>65535&&(e+=b((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=b(t)})).join("")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function E(t,e,r){var i=0;for(t=r?m(t/700):t>>1,t+=m(t/e);t>455;i+=l)t=m(t/35);return m(i+36*t/(t+38))}function S(t){var e,r,i,n,a,o,s,u,f,c,d,p=[],b=t.length,_=0,v=128,y=72;for((r=t.lastIndexOf("-"))<0&&(r=0),i=0;i<r;++i)t.charCodeAt(i)>=128&&g("not-basic"),p.push(t.charCodeAt(i));for(n=r>0?r+1:0;n<b;){for(a=_,o=1,s=l;n>=b&&g("invalid-input"),((u=(d=t.charCodeAt(n++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:l)>=l||u>m((h-_)/o))&&g("overflow"),_+=u*o,!(u<(f=s<=y?1:s>=y+26?26:s-y));s+=l)o>m(h/(c=l-f))&&g("overflow"),o*=c;y=E(_-a,e=p.length+1,0==a),m(_/e)>h-v&&g("overflow"),v+=m(_/e),_%=e,p.splice(_++,0,v)}return w(p)}function k(t){var e,r,i,n,a,o,s,u,f,c,d,p,_,v,w,S=[];for(p=(t=y(t)).length,e=128,r=0,a=72,o=0;o<p;++o)(d=t[o])<128&&S.push(b(d));for(i=n=S.length,n&&S.push("-");i<p;){for(s=h,o=0;o<p;++o)(d=t[o])>=e&&d<s&&(s=d);for(s-e>m((h-r)/(_=i+1))&&g("overflow"),r+=(s-e)*_,e=s,o=0;o<p;++o)if((d=t[o])<e&&++r>h&&g("overflow"),d==e){for(u=r,f=l;!(u<(c=f<=a?1:f>=a+26?26:f-a));f+=l)w=u-c,v=l-c,S.push(b(x(c+w%v,0))),u=m(w/v);S.push(b(x(u,0))),a=E(r,_,i==n),r=0,++i}++r,++e}return S.join("")}if(s={version:"1.4.1",ucs2:{decode:y,encode:w},decode:S,encode:k,toASCII:function(t){return v(t,(function(t){return c.test(t)?"xn--"+k(t):t}))},toUnicode:function(t){return v(t,(function(t){return f.test(t)?S(t.slice(4).toLowerCase()):t}))}},n&&a)if(e.exports==n)a.exports=s;else for(u in s)s.hasOwnProperty(u)&&(n[u]=s[u]);else i.punycode=s}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{})},{}],135:[function(t,e,r){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,a){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var s=/\+/g;t=t.split(e);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var h=t.length;u>0&&h>u&&(h=u);for(var l=0;l<h;++l){var f,c,d,p,m=t[l].replace(s,"%20"),b=m.indexOf(r);b>=0?(f=m.substr(0,b),c=m.substr(b+1)):(f=m,c=""),d=decodeURIComponent(f),p=decodeURIComponent(c),i(o,d)?n(o[d])?o[d].push(p):o[d]=[o[d],p]:o[d]=p}return o};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],136:[function(t,e,r){"use strict";var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,s){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?a(o(t),(function(o){var s=encodeURIComponent(i(o))+r;return n(t[o])?a(t[o],(function(t){return s+encodeURIComponent(i(t))})).join(e):s+encodeURIComponent(i(t[o]))})).join(e):s?encodeURIComponent(i(s))+r+encodeURIComponent(i(t)):""};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function a(t,e){if(t.map)return t.map(e);for(var r=[],i=0;i<t.length;i++)r.push(e(t[i],i));return r}var o=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],137:[function(t,e,r){"use strict";r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":135,"./encode":136}],138:[function(t,e,r){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":139}],139:[function(t,e,r){"use strict";var i=t("process-nextick-args"),n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=f;var a=t("core-util-is");a.inherits=t("inherits");var o=t("./_stream_readable"),s=t("./_stream_writable");a.inherits(f,o);for(var u=n(s.prototype),h=0;h<u.length;h++){var l=u[h];f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(t){if(!(this instanceof f))return new f(t);o.call(this,t),s.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",c)}function c(){this.allowHalfOpen||this._writableState.ended||i.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),f.prototype._destroy=function(t,e){this.push(null),this.end(),i.nextTick(e,t)}},{"./_stream_readable":141,"./_stream_writable":143,"core-util-is":51,inherits:75,"process-nextick-args":132}],140:[function(t,e,r){"use strict";e.exports=a;var i=t("./_stream_transform"),n=t("core-util-is");function a(t){if(!(this instanceof a))return new a(t);i.call(this,t)}n.inherits=t("inherits"),n.inherits(a,i),a.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":142,"core-util-is":51,inherits:75}],141:[function(t,e,r){(function(r,i){"use strict";var n=t("process-nextick-args");e.exports=v;var a,o=t("isarray");v.ReadableState=_;t("events").EventEmitter;var s=function(t,e){return t.listeners(e).length},u=t("./internal/streams/stream"),h=t("safe-buffer").Buffer,l=i.Uint8Array||function(){};var f=t("core-util-is");f.inherits=t("inherits");var c=t("util"),d=void 0;d=c&&c.debuglog?c.debuglog("stream"):function(){};var p,m=t("./internal/streams/BufferList"),b=t("./internal/streams/destroy");f.inherits(v,u);var g=["error","close","destroy","pause","resume"];function _(e,r){e=e||{};var i=r instanceof(a=a||t("./_stream_duplex"));this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=t("string_decoder/").StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function v(e){if(a=a||t("./_stream_duplex"),!(this instanceof v))return new v(e);this._readableState=new _(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function y(t,e,r,i,n){var a,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,S(t)}(t,o)):(n||(a=function(t,e){var r;i=e,h.isBuffer(i)||i instanceof l||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(o,e)),a?t.emit("error",a):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===h.prototype||(e=function(t){return h.from(t)}(e)),i?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?w(t,o,e,!1):M(t,o)):w(t,o,e,!1))):i||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(o)}function w(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&S(t)),M(t,e)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),v.prototype.destroy=b.destroy,v.prototype._undestroy=b.undestroy,v.prototype._destroy=function(t,e){this.push(null),e(t)},v.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=h.from(t,e),e=""),r=!0),y(this,t,e,!1,r)},v.prototype.unshift=function(t){return y(this,t,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return p||(p=t("string_decoder/").StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var x=8388608;function E(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=x?t=x:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?n.nextTick(k,t):k(t))}function k(t){d("emit readable"),t.emit("readable"),R(t)}function M(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(A,t,e))}function A(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function I(t){d("readable nexttick read 0"),t.read(0)}function T(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),R(t),e.flowing&&!e.reading&&t.read(0)}function R(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function P(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,i=1,n=r.data;t-=n.length;for(;r=r.next;){var a=r.data,o=t>a.length?a.length:t;if(o===a.length?n+=a:n+=a.slice(0,t),0===(t-=o)){o===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(o));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=h.allocUnsafe(t),i=e.head,n=1;i.data.copy(r),t-=i.data.length;for(;i=i.next;){var a=i.data,o=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,o),0===(t-=o)){o===a.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=a.slice(o));break}++n}return e.length-=n,r}(t,e);return i}(t,e.buffer,e.decoder),r);var r}function C(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,n.nextTick(O,e,t))}function O(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function L(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}v.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?C(this):S(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&C(this),null;var i,n=e.needReadable;return d("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",n=!0),e.ended||e.reading?d("reading or ended",n=!1):n&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=E(r,e))),null===(i=t>0?P(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&C(this)),null!==i&&this.emit("data",i),i},v.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(t,e){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:v;function h(e,r){d("onunpipe"),e===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),t.removeListener("close",g),t.removeListener("finish",_),t.removeListener("drain",f),t.removeListener("error",b),t.removeListener("unpipe",h),i.removeListener("end",l),i.removeListener("end",v),i.removeListener("data",m),c=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function l(){d("onend"),t.end()}a.endEmitted?n.nextTick(u):i.once("end",u),t.on("unpipe",h);var f=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,R(t))}}(i);t.on("drain",f);var c=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==L(a.pipes,t))&&!c&&(d("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,p=!0),i.pause())}function b(e){d("onerror",e),v(),t.removeListener("error",b),0===s(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",_),v()}function _(){d("onfinish"),t.removeListener("close",g),v()}function v(){d("unpipe"),i.unpipe(t)}return i.on("data",m),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?o(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",b),t.once("close",g),t.once("finish",_),t.emit("pipe",i),a.flowing||(d("pipe resume"),i.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,r);return this}var o=L(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},v.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&S(this):n.nextTick(I,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(T,t,e))}(this,t)),this},v.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(d("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var a=0;a<g.length;a++)t.on(g[a],this.emit.bind(this,g[a]));return this._read=function(e){d("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=P}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{})},{"./_stream_duplex":139,"./internal/streams/BufferList":144,"./internal/streams/destroy":145,"./internal/streams/stream":146,_process:133,"core-util-is":51,events:52,inherits:75,isarray:79,"process-nextick-args":132,"safe-buffer":147,"string_decoder/":148,util:33}],142:[function(t,e,r){"use strict";e.exports=o;var i=t("./_stream_duplex"),n=t("core-util-is");function a(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);i.call(this,t),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",s)}function s(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){u(t,e,r)})):u(this,null,null)}function u(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}n.inherits=t("inherits"),n.inherits(o,i),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,i.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var r=this;i.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},{"./_stream_duplex":139,"core-util-is":51,inherits:75}],143:[function(t,e,r){(function(r,i,n){"use strict";var a=t("process-nextick-args");function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}e.exports=_;var s,u=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?n:a.nextTick;_.WritableState=g;var h=t("core-util-is");h.inherits=t("inherits");var l={deprecate:t("util-deprecate")},f=t("./internal/streams/stream"),c=t("safe-buffer").Buffer,d=i.Uint8Array||function(){};var p,m=t("./internal/streams/destroy");function b(){}function g(e,r){s=s||t("./_stream_duplex"),e=e||{};var i=r instanceof s;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,h=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(h||0===h)?h:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,n){--e.pendingcb,r?(a.nextTick(n,i),a.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),S(t,e))}(t,r,i,e,n);else{var o=x(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),i?u(y,t,r,o,n):y(t,r,o,n)}}(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function _(e){if(s=s||t("./_stream_duplex"),!(p.call(_,this)||this instanceof s))return new _(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function v(t,e,r,i,n,a,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function y(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),S(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)n[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;n.allBuffers=u,v(t,e,!0,e.length,n,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,l=r.encoding,f=r.callback;if(v(t,e,!1,e.objectMode?1:h.length,h,l,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function E(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)}))}function S(t,e){var r=x(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,a.nextTick(E,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}h.inherits(_,f),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===_&&(t&&t._writableState instanceof g)}})):p=function(t){return t instanceof this},_.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},_.prototype.write=function(t,e,r){var i,n=this._writableState,o=!1,s=!n.objectMode&&(i=t,c.isBuffer(i)||i instanceof d);return s&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=b),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),a.nextTick(e,r)}(this,r):(s||function(t,e,r,i){var n=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),a.nextTick(i,o),n=!1),n}(this,n,t,r))&&(n.pendingcb++,o=function(t,e,r,i,n,a){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,r));return e}(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var s=e.objectMode?1:i.length;e.length+=s;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else v(t,e,!1,s,i,n,a);return u}(this,n,s,t,e,r)),o},_.prototype.cork=function(){this._writableState.corked++},_.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},_.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},_.prototype._writev=null,_.prototype.end=function(t,e,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?a.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),_.prototype.destroy=m.destroy,_.prototype._undestroy=m.undestroy,_.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{},t("timers").setImmediate)},{"./_stream_duplex":139,"./internal/streams/destroy":145,"./internal/streams/stream":146,_process:133,"core-util-is":51,inherits:75,"process-nextick-args":132,"safe-buffer":147,timers:176,"util-deprecate":183}],144:[function(t,e,r){"use strict";var i=t("safe-buffer").Buffer,n=t("util");e.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e,r,n,a=i.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=a,n=s,e.copy(r,n),s+=o.data.length,o=o.next;return a},t}(),n&&n.inspect&&n.inspect.custom&&(e.exports.prototype[n.inspect.custom]=function(){var t=n.inspect({length:this.length});return this.constructor.name+" "+t})},{"safe-buffer":147,util:33}],145:[function(t,e,r){"use strict";var i=t("process-nextick-args");function n(t,e){t.emit("error",e)}e.exports={destroy:function(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||i.nextTick(n,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(i.nextTick(n,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":132}],146:[function(t,e,r){e.exports=t("events").EventEmitter},{events:52}],147:[function(t,e,r){var i=t("buffer"),n=i.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(a(i,r),r.Buffer=o),a(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},{buffer:48}],148:[function(t,e,r){"use strict";var i=t("safe-buffer").Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=h,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=l,this.end=f,e=3;break;default:return this.write=c,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function h(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}r.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},a.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},a.prototype.text=function(t,e){var r=function(t,e,r){var i=e.length-1;if(i<r)return 0;var n=o(e[i]);if(n>=0)return n>0&&(t.lastNeed=n-1),n;if(--i<r||-2===n)return 0;if((n=o(e[i]))>=0)return n>0&&(t.lastNeed=n-2),n;if(--i<r||-2===n)return 0;if((n=o(e[i]))>=0)return n>0&&(2===n?n=0:t.lastNeed=n-3),n;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":147}],149:[function(t,e,r){e.exports=t("./readable").PassThrough},{"./readable":150}],150:[function(t,e,r){(r=e.exports=t("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":139,"./lib/_stream_passthrough.js":140,"./lib/_stream_readable.js":141,"./lib/_stream_transform.js":142,"./lib/_stream_writable.js":143}],151:[function(t,e,r){e.exports=t("./readable").Transform},{"./readable":150}],152:[function(t,e,r){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":143}],153:[function(t,e,r){var i=function(t){"use strict";var e,r=Object.prototype,i=r.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function u(t,e,r,i){var n=e&&e.prototype instanceof m?e:m,a=Object.create(n.prototype),o=new A(i||[]);return a._invoke=function(t,e,r){var i=l;return function(n,a){if(i===c)throw new Error("Generator is already running");if(i===d){if("throw"===n)throw a;return T()}for(r.method=n,r.arg=a;;){var o=r.delegate;if(o){var s=S(o,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===l)throw i=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=c;var u=h(t,e,r);if("normal"===u.type){if(i=r.done?d:f,u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=d,r.method="throw",r.arg=u.arg)}}}(t,r,o),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",f="suspendedYield",c="executing",d="completed",p={};function m(){}function b(){}function g(){}var _={};_[a]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(I([])));y&&y!==r&&i.call(y,a)&&(_=y);var w=g.prototype=m.prototype=Object.create(_);function x(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function E(t){function e(r,n,a,o){var s=h(t[r],t,n);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&i.call(l,"__await")?Promise.resolve(l.__await).then((function(t){e("next",t,a,o)}),(function(t){e("throw",t,a,o)})):Promise.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return e("throw",t,a,o)}))}o(s.arg)}var r;this._invoke=function(t,i){function n(){return new Promise((function(r,n){e(t,i,r,n)}))}return r=r?r.then(n,n):n()}}function S(t,r){var i=t.iterator[r.method];if(i===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=h(i,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,p;var a=n.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,p):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function I(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function r(){for(;++n<t.length;)if(i.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:T}}function T(){return{value:e,done:!0}}return b.prototype=w.constructor=g,g.constructor=b,g[s]=b.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},x(E.prototype),E.prototype[o]=function(){return this},t.AsyncIterator=E,t.async=function(e,r,i,n){var a=new E(u(e,r,i,n));return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(w),w[s]="Generator",w[a]=function(){return this},w.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var i=e.pop();if(i in t)return r.value=i,r.done=!1,r}return r.done=!0,r}},t.values=I,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(i,n){return s.type="throw",s.arg=t,r.next=i,n&&(r.method="next",r.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),h=i.call(o,"finallyLoc");if(u&&h){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),M(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var i=r.completion;if("throw"===i.type){var n=i.arg;M(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,i){return this.delegate={iterator:I(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=e),p}},t}("object"==typeof e?e.exports:{});try{regeneratorRuntime=i}catch(t){Function("r","regeneratorRuntime = r")(i)}},{}],154:[function(t,e,r){var i=t("buffer"),n=i.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(a(i,r),r.Buffer=o),o.prototype=Object.create(n.prototype),a(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},{buffer:48}],155:[function(t,e,r){e.exports=n;var i=t("events").EventEmitter;function n(){i.call(this)}t("inherits")(n,i),n.Readable=t("readable-stream/readable.js"),n.Writable=t("readable-stream/writable.js"),n.Duplex=t("readable-stream/duplex.js"),n.Transform=t("readable-stream/transform.js"),n.PassThrough=t("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(t,e){var r=this;function n(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",n),t.on("drain",a),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",u));var o=!1;function s(){o||(o=!0,t.end())}function u(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function h(t){if(l(),0===i.listenerCount(this,"error"))throw t}function l(){r.removeListener("data",n),t.removeListener("drain",a),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",h),t.removeListener("error",h),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",h),t.on("error",h),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t}},{events:52,inherits:75,"readable-stream/duplex.js":138,"readable-stream/passthrough.js":149,"readable-stream/readable.js":150,"readable-stream/transform.js":151,"readable-stream/writable.js":152}],156:[function(t,e,r){(function(e){var i=t("./lib/request"),n=t("./lib/response"),a=t("xtend"),o=t("builtin-status-codes"),s=t("url"),u=r;u.request=function(t,r){t="string"==typeof t?s.parse(t):a(t);var n=-1===e.location.protocol.search(/^https?:$/)?"http:":"",o=t.protocol||n,u=t.hostname||t.host,h=t.port,l=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?o+"//"+u:"")+(h?":"+h:"")+l,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var f=new i(t);return r&&f.on("response",r),f},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=i,u.IncomingMessage=n.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=o,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{})},{"./lib/request":158,"./lib/response":159,"builtin-status-codes":50,url:180,xtend:189}],157:[function(t,e,r){(function(t){var e;function i(){if(void 0!==e)return e;if(t.XMLHttpRequest){e=new t.XMLHttpRequest;try{e.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(t){e=null}}else e=null;return e}function n(t){var e=i();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}function a(t){return"function"==typeof t}r.fetch=a(t.fetch)&&a(t.ReadableStream),r.writableStream=a(t.WritableStream),r.abortController=a(t.AbortController),r.arraybuffer=r.fetch||n("arraybuffer"),r.msstream=!r.fetch&&n("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&n("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!i()&&a(i().overrideMimeType),e=null}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{})},{}],158:[function(t,e,r){(function(r,i,n){var a=t("./capability"),o=t("inherits"),s=t("./response"),u=t("readable-stream"),h=s.IncomingMessage,l=s.readyStates;var f=e.exports=function(t){var e,r=this;u.Writable.call(r),r._opts=t,r._body=[],r._headers={},t.auth&&r.setHeader("Authorization","Basic "+n.from(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){r.setHeader(e,t.headers[e])}));var i=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!a.abortController)i=!1,e=!0;else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!a.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}r._mode=function(t,e){return a.fetch&&e?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&t?"arraybuffer":"text"}(e,i),r._fetchTimer=null,r.on("finish",(function(){r._onFinish()}))};o(f,u.Writable),f.prototype.setHeader=function(t,e){var r=t.toLowerCase();-1===c.indexOf(r)&&(this._headers[r]={name:t,value:e})},f.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},f.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},f.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts,n=t._headers,o=null;"GET"!==e.method&&"HEAD"!==e.method&&(o=new Blob(t._body,{type:(n["content-type"]||{}).value||""}));var s=[];if(Object.keys(n).forEach((function(t){var e=n[t].name,r=n[t].value;Array.isArray(r)?r.forEach((function(t){s.push([e,t])})):s.push([e,r])})),"fetch"===t._mode){var u=null;if(a.abortController){var h=new AbortController;u=h.signal,t._fetchAbortController=h,"requestTimeout"in e&&0!==e.requestTimeout&&(t._fetchTimer=i.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),e.requestTimeout))}i.fetch(t._opts.url,{method:t._opts.method,headers:s,body:o||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:u}).then((function(e){t._fetchResponse=e,t._connect()}),(function(e){i.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)}))}else{var f=t._xhr=new i.XMLHttpRequest;try{f.open(t._opts.method,t._opts.url,!0)}catch(e){return void r.nextTick((function(){t.emit("error",e)}))}"responseType"in f&&(f.responseType=t._mode),"withCredentials"in f&&(f.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(f.timeout=e.requestTimeout,f.ontimeout=function(){t.emit("requestTimeout")}),s.forEach((function(t){f.setRequestHeader(t[0],t[1])})),t._response=null,f.onreadystatechange=function(){switch(f.readyState){case l.LOADING:case l.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(f.onprogress=function(){t._onXHRProgress()}),f.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{f.send(o)}catch(e){return void r.nextTick((function(){t.emit("error",e)}))}}}},f.prototype._onXHRProgress=function(){var t=this;(function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}})(t._xhr)&&!t._destroyed&&(t._response||t._connect(),t._response._onXHRProgress())},f.prototype._connect=function(){var t=this;t._destroyed||(t._response=new h(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},f.prototype._write=function(t,e,r){this._body.push(t),r()},f.prototype.abort=f.prototype.destroy=function(){var t=this;t._destroyed=!0,i.clearTimeout(t._fetchTimer),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort()},f.prototype.end=function(t,e,r){"function"==typeof t&&(r=t,t=void 0),u.Writable.prototype.end.call(this,t,e,r)},f.prototype.flushHeaders=function(){},f.prototype.setTimeout=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var c=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{},t("buffer").Buffer)},{"./capability":157,"./response":159,_process:133,buffer:48,inherits:75,"readable-stream":174}],159:[function(t,e,r){(function(e,i,n){var a=t("./capability"),o=t("inherits"),s=t("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},h=r.IncomingMessage=function(t,r,o,u){var h=this;if(s.Readable.call(h),h._mode=o,h.headers={},h.rawHeaders=[],h.trailers={},h.rawTrailers=[],h.on("end",(function(){e.nextTick((function(){h.emit("close")}))})),"fetch"===o){if(h._fetchResponse=r,h.url=r.url,h.statusCode=r.status,h.statusMessage=r.statusText,r.headers.forEach((function(t,e){h.headers[e.toLowerCase()]=t,h.rawHeaders.push(e,t)})),a.writableStream){var l=new WritableStream({write:function(t){return new Promise((function(e,r){h._destroyed?r():h.push(n.from(t))?e():h._resumeFetch=e}))},close:function(){i.clearTimeout(u),h._destroyed||h.push(null)},abort:function(t){h._destroyed||h.emit("error",t)}});try{return void r.body.pipeTo(l).catch((function(t){i.clearTimeout(u),h._destroyed||h.emit("error",t)}))}catch(t){}}var f=r.body.getReader();!function t(){f.read().then((function(e){if(!h._destroyed){if(e.done)return i.clearTimeout(u),void h.push(null);h.push(n.from(e.value)),t()}})).catch((function(t){i.clearTimeout(u),h._destroyed||h.emit("error",t)}))}()}else{if(h._xhr=t,h._pos=0,h.url=t.responseURL,h.statusCode=t.status,h.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===h.headers[r]&&(h.headers[r]=[]),h.headers[r].push(e[2])):void 0!==h.headers[r]?h.headers[r]+=", "+e[2]:h.headers[r]=e[2],h.rawHeaders.push(e[1],e[2])}})),h._charset="x-user-defined",!a.overrideMimeType){var c=h.rawHeaders["mime-type"];if(c){var d=c.match(/;\s*charset=([^;])(;|$)/);d&&(h._charset=d[1].toLowerCase())}h._charset||(h._charset="utf-8")}}};o(h,s.Readable),h.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},h.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case"text":if((r=e.responseText).length>t._pos){var a=r.substr(t._pos);if("x-user-defined"===t._charset){for(var o=n.alloc(a.length),s=0;s<a.length;s++)o[s]=255&a.charCodeAt(s);t.push(o)}else t.push(a,t._charset);t._pos=r.length}break;case"arraybuffer":if(e.readyState!==u.DONE||!e.response)break;r=e.response,t.push(n.from(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=e.response,e.readyState!==u.LOADING||!r)break;t.push(n.from(new Uint8Array(r)));break;case"ms-stream":if(r=e.response,e.readyState!==u.LOADING)break;var h=new i.MSStreamReader;h.onprogress=function(){h.result.byteLength>t._pos&&(t.push(n.from(new Uint8Array(h.result.slice(t._pos)))),t._pos=h.result.byteLength)},h.onload=function(){t.push(null)},h.readAsArrayBuffer(r)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{},t("buffer").Buffer)},{"./capability":157,_process:133,buffer:48,inherits:75,"readable-stream":174}],160:[function(t,e,r){"use strict";var i={};function n(t,e,r){r||(r=Error);var n=function(t){var r,i;function n(r,i,n){return t.call(this,function(t,r,i){return"string"==typeof e?e:e(t,r,i)}(r,i,n))||this}return i=t,(r=n).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,n}(r);n.prototype.name=r.name,n.prototype.code=t,i[t]=n}function a(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,n,o,s;if("string"==typeof e&&(n="not ",e.substr(!o||o<0?0:+o,n.length)===n)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(a(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(u," ").concat(i," ").concat(a(e,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},{}],161:[function(t,e,r){(function(t){"use strict";var r=new Set;e.exports.emitExperimentalWarning=t.emitWarning?function(e){if(!r.has(e)){var i=e+" is an experimental feature. This feature could change at any time";r.add(e),t.emitWarning(i,"ExperimentalWarning")}}:function(){}}).call(this,t("_process"))},{_process:133}],162:[function(t,e,r){(function(r){"use strict";var i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=h;var n=t("./_stream_readable"),a=t("./_stream_writable");t("inherits")(h,n);for(var o=i(a.prototype),s=0;s<o.length;s++){var u=o[s];h.prototype[u]||(h.prototype[u]=a.prototype[u])}function h(t){if(!(this instanceof h))return new h(t);n.call(this,t),a.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||r.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,t("_process"))},{"./_stream_readable":164,"./_stream_writable":166,_process:133,inherits:75}],163:[function(t,e,r){"use strict";e.exports=n;var i=t("./_stream_transform");function n(t){if(!(this instanceof n))return new n(t);i.call(this,t)}t("inherits")(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":165,inherits:75}],164:[function(t,e,r){(function(r,i){"use strict";var n;e.exports=S,S.ReadableState=E;t("events").EventEmitter;var a=function(t,e){return t.listeners(e).length},o=t("./internal/streams/stream"),s=t("buffer").Buffer,u=i.Uint8Array||function(){};var h,l=t("util");h=l&&l.debuglog?l.debuglog("stream"):function(){};var f,c,d=t("./internal/streams/buffer_list"),p=t("./internal/streams/destroy"),m=t("./internal/streams/state").getHighWaterMark,b=t("../errors").codes,g=b.ERR_INVALID_ARG_TYPE,_=b.ERR_STREAM_PUSH_AFTER_EOF,v=b.ERR_METHOD_NOT_IMPLEMENTED,y=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w=t("../experimentalWarning").emitExperimentalWarning;t("inherits")(S,o);var x=["error","close","destroy","pause","resume"];function E(e,r,i){n=n||t("./_stream_duplex"),e=e||{},"boolean"!=typeof i&&(i=r instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=t("string_decoder/").StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function S(e){if(n=n||t("./_stream_duplex"),!(this instanceof S))return new S(e);var r=this instanceof n;this._readableState=new E(e,this,r),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function k(t,e,r,i,n){h("readableAddChunk",e);var a,o=t._readableState;if(null===e)o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?T(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}(t,o);else if(n||(a=function(t,e){var r;i=e,s.isBuffer(i)||i instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],e));var i;return r}(o,e)),a)t.emit("error",a);else if(o.objectMode||e&&e.length>0)if("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),i)o.endEmitted?t.emit("error",new y):M(t,o,e,!0);else if(o.ended)t.emit("error",new _);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?M(t,o,e,!1):P(t,o)):M(t,o,e,!1)}else i||(o.reading=!1,P(t,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function M(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&T(t)),P(t,e)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=p.destroy,S.prototype._undestroy=p.undestroy,S.prototype._destroy=function(t,e){e(t)},S.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=s.from(t,e),e=""),r=!0),k(this,t,e,!1,r)},S.prototype.unshift=function(t){return k(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return f||(f=t("string_decoder/").StringDecoder),this._readableState.decoder=new f(e),this._readableState.encoding=this._readableState.decoder.encoding,this};var A=8388608;function I(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=A?t=A:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(h("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(R,t))}function R(t){var e=t._readableState;h("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||t.emit("readable"),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,D(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(C,t,e))}function C(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(h("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function O(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function L(t){h("readable nexttick read 0"),t.read(0)}function B(t,e){h("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;for(h("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function z(t){var e=t._readableState;h("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(j,e,t))}function j(t,e){h("endReadableNT",t.endEmitted,t.length),t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function U(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}S.prototype.read=function(t){h("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return h("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?z(this):T(this),null;if(0===(t=I(t,e))&&e.ended)return 0===e.length&&z(this),null;var i,n=e.needReadable;return h("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&h("length less than watermark",n=!0),e.ended||e.reading?h("reading or ended",n=!1):n&&(h("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=I(r,e))),null===(i=t>0?N(t,e):null)?(e.needReadable=!0,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&z(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(t){this.emit("error",new v("_read()"))},S.prototype.pipe=function(t,e){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,h("pipe count=%d opts=%j",n.pipesCount,e);var o=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?u:b;function s(e,r){h("onunpipe"),e===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,h("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",s),i.removeListener("end",u),i.removeListener("end",b),i.removeListener("data",c),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){h("onend"),t.end()}n.endEmitted?r.nextTick(o):i.once("end",o),t.on("unpipe",s);var l=function(t){return function(){var e=t._readableState;h("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,D(t))}}(i);t.on("drain",l);var f=!1;function c(e){h("ondata");var r=t.write(e);h("dest.write",r),!1===r&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==U(n.pipes,t))&&!f&&(h("false write response, pause",n.awaitDrain),n.awaitDrain++),i.pause())}function d(e){h("onerror",e),b(),t.removeListener("error",d),0===a(t,"error")&&t.emit("error",e)}function p(){t.removeListener("finish",m),b()}function m(){h("onfinish"),t.removeListener("close",p),b()}function b(){h("unpipe"),i.unpipe(t)}return i.on("data",c),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",i),n.flowing||(h("pipe resume"),i.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=U(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},S.prototype.on=function(t,e){var i=o.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,h("on readable",n.length,n.reading),n.length?T(this):n.reading||r.nextTick(L,this))),i},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var i=o.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(O,this),i},S.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(O,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(h("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(B,t,e))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(h("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var a=0;a<x.length;a++)t.on(x[a],this.emit.bind(this,x[a]));return this._read=function(e){h("wrapped _read",e),i&&(i=!1,t.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return w("Readable[Symbol.asyncIterator]"),void 0===c&&(c=t("./internal/streams/async_iterator")),c(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),S._fromList=N,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}})}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{})},{"../errors":160,"../experimentalWarning":161,"./_stream_duplex":162,"./internal/streams/async_iterator":167,"./internal/streams/buffer_list":168,"./internal/streams/destroy":169,"./internal/streams/state":172,"./internal/streams/stream":173,_process:133,buffer:48,events:52,inherits:75,"string_decoder/":175,util:33}],165:[function(t,e,r){"use strict";e.exports=l;var i=t("../errors").codes,n=i.ERR_METHOD_NOT_IMPLEMENTED,a=i.ERR_MULTIPLE_CALLBACK,o=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=i.ERR_TRANSFORM_WITH_LENGTH_0,u=t("./_stream_duplex");function h(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new a);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",f)}function f(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?c(this,null,null):this._flush((function(e,r){c(t,e,r)}))}function c(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new s;if(t._transformState.transforming)throw new o;return t.push(null)}t("inherits")(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new n("_transform()"))},l.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},{"../errors":160,"./_stream_duplex":162,inherits:75}],166:[function(t,e,r){(function(r,i){"use strict";function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}(e,t)}}var a;e.exports=S,S.WritableState=E;var o={deprecate:t("util-deprecate")},s=t("./internal/streams/stream"),u=t("buffer").Buffer,h=i.Uint8Array||function(){};var l,f=t("./internal/streams/destroy"),c=t("./internal/streams/state").getHighWaterMark,d=t("../errors").codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,b=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,_=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,y=d.ERR_STREAM_WRITE_AFTER_END,w=d.ERR_UNKNOWN_ENCODING;function x(){}function E(e,i,o){a=a||t("./_stream_duplex"),e=e||{},"boolean"!=typeof o&&(o=i instanceof a),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=c(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,n=i.sync,a=i.writecb;if("function"!=typeof a)throw new b;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,n,a){--e.pendingcb,i?(r.nextTick(a,n),r.nextTick(R,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(a(n),t._writableState.errorEmitted=!0,t.emit("error",n),R(t,e))}(t,i,n,e,a);else{var o=I(i)||t.destroyed;o||i.corked||i.bufferProcessing||!i.bufferedRequest||A(t,i),n?r.nextTick(M,t,i,o,a):M(t,i,o,a)}}(i,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function S(e){var r=this instanceof(a=a||t("./_stream_duplex"));if(!r&&!l.call(S,this))return new S(e);this._writableState=new E(e,this,r),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function k(t,e,r,i,n,a,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new _("write")):r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function M(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),R(t,e)}function A(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,a=new Array(i),o=e.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)a[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;a.allBuffers=u,k(t,e,!0,e.length,a,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,l=r.encoding,f=r.callback;if(k(t,e,!1,e.objectMode?1:h.length,h,l,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function I(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function T(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),R(t,e)}))}function R(t,e){var i=I(e);return i&&(!function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,r.nextTick(T,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),i}t("inherits")(S,s),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===S&&(t&&t._writableState instanceof E)}})):l=function(t){return t instanceof this},S.prototype.pipe=function(){this.emit("error",new g)},S.prototype.write=function(t,e,i){var n,a=this._writableState,o=!1,s=!a.objectMode&&(n=t,u.isBuffer(n)||n instanceof h);return s&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(i=e,e=null),s?e="buffer":e||(e=a.defaultEncoding),"function"!=typeof i&&(i=x),a.ending?function(t,e){var i=new y;t.emit("error",i),r.nextTick(e,i)}(this,i):(s||function(t,e,i,n){var a;return null===i?a=new v:"string"==typeof i||e.objectMode||(a=new p("chunk",["string","Buffer"],i)),!a||(t.emit("error",a),r.nextTick(n,a),!1)}(this,a,t,i))&&(a.pendingcb++,o=function(t,e,r,i,n,a){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var s=e.objectMode?1:i.length;e.length+=s;var h=e.length<e.highWaterMark;h||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else k(t,e,!1,s,i,n,a);return h}(this,a,s,t,e,i)),o},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||A(this,t))},S.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,e,r){r(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,e,i){var n=this._writableState;return"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,i){e.ending=!0,R(t,e),i&&(e.finished?r.nextTick(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,n,i),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=f.destroy,S.prototype._undestroy=f.undestroy,S.prototype._destroy=function(t,e){e(t)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{})},{"../errors":160,"./_stream_duplex":162,"./internal/streams/destroy":169,"./internal/streams/state":172,"./internal/streams/stream":173,_process:133,buffer:48,inherits:75,"util-deprecate":183}],167:[function(t,e,r){(function(r){"use strict";var i;function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=t("./end-of-stream"),o=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),h=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),c=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[o];if(null!==e){var r=t[c].read();null!==r&&(t[l]=null,t[o]=null,t[s]=null,e(d(r,!1)))}}function m(t){r.nextTick(p,t)}var b=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((n(i={get stream(){return this[c]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[h])return Promise.resolve(d(void 0,!0));if(this[c].destroyed)return new Promise((function(e,i){r.nextTick((function(){t[u]?i(t[u]):e(d(void 0,!0))}))}));var i,n=this[l];if(n)i=new Promise(function(t,e){return function(r,i){t.then((function(){e[h]?r(d(void 0,!0)):e[f](r,i)}),i)}}(n,this));else{var a=this[c].read();if(null!==a)return Promise.resolve(d(a,!1));i=new Promise(this[f])}return this[l]=i,i}},Symbol.asyncIterator,(function(){return this})),n(i,"return",(function(){var t=this;return new Promise((function(e,r){t[c].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),i),b);e.exports=function(t){var e,r=Object.create(g,(n(e={},c,{value:t,writable:!0}),n(e,o,{value:null,writable:!0}),n(e,s,{value:null,writable:!0}),n(e,u,{value:null,writable:!0}),n(e,h,{value:t._readableState.endEmitted,writable:!0}),n(e,f,{value:function(t,e){var i=r[c].read();i?(r[l]=null,r[o]=null,r[s]=null,t(d(i,!1))):(r[o]=t,r[s]=e)},writable:!0}),e));return r[l]=null,a(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[s];return null!==e&&(r[l]=null,r[o]=null,r[s]=null,e(t)),void(r[u]=t)}var i=r[o];null!==i&&(r[l]=null,r[o]=null,r[s]=null,i(d(void 0,!0))),r[h]=!0})),t.on("readable",m.bind(null,r)),r}}).call(this,t("_process"))},{"./end-of-stream":170,_process:133}],168:[function(t,e,r){"use strict";function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var n=t("buffer").Buffer,a=t("util").inspect,o=a&&a.custom||"inspect";e.exports=function(){function t(){this.head=null,this.tail=null,this.length=0}var e=t.prototype;return e.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},e.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},e.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},e.clear=function(){this.head=this.tail=null,this.length=0},e.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},e.concat=function(t){if(0===this.length)return n.alloc(0);for(var e,r,i,a=n.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=a,i=s,n.prototype.copy.call(e,r,i),s+=o.data.length,o=o.next;return a},e.consume=function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r},e.first=function(){return this.head.data},e._getString=function(t){var e=this.head,r=1,i=e.data;for(t-=i.length;e=e.next;){var n=e.data,a=t>n.length?n.length:t;if(a===n.length?i+=n:i+=n.slice(0,t),0===(t-=a)){a===n.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(a));break}++r}return this.length-=r,i},e._getBuffer=function(t){var e=n.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var a=r.data,o=t>a.length?a.length:t;if(a.copy(e,e.length-t,0,o),0===(t-=o)){o===a.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=a.slice(o));break}++i}return this.length-=i,e},e[o]=function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){i(t,e,r[e])}))}return t}({},e,{depth:0,customInspect:!1}))},t}()},{buffer:48,util:33}],169:[function(t,e,r){(function(t){"use strict";function r(t,e){n(t,e),i(t)}function i(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function n(t,e){t.emit("error",e)}e.exports={destroy:function(e,a){var o=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(a?a(e):!e||this._writableState&&this._writableState.errorEmitted||t.nextTick(n,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?(t.nextTick(r,o,e),o._writableState&&(o._writableState.errorEmitted=!0)):a?(t.nextTick(i,o),a(e)):t.nextTick(i,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}).call(this,t("_process"))},{_process:133}],170:[function(t,e,r){"use strict";var i=t("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}e.exports=function t(e,r,a){if("function"==typeof r)return t(e,null,r);r||(r={}),a=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}(a||n);var o=r.readable||!1!==r.readable&&e.readable,s=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},h=e._writableState&&e._writableState.finished,l=function(){s=!1,h=!0,o||a.call(e)},f=e._readableState&&e._readableState.endEmitted,c=function(){o=!1,f=!0,s||a.call(e)},d=function(t){a.call(e,t)},p=function(){var t;return o&&!f?(e._readableState&&e._readableState.ended||(t=new i),a.call(e,t)):s&&!h?(e._writableState&&e._writableState.ended||(t=new i),a.call(e,t)):void 0},m=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?s&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?m():e.on("request",m)),e.on("end",c),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",c),e.removeListener("error",d),e.removeListener("close",p)}}},{"../../../errors":160}],171:[function(t,e,r){"use strict";var i;var n=t("../../../errors").codes,a=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function u(e,r,n,a){a=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(a);var s=!1;e.on("close",(function(){s=!0})),void 0===i&&(i=t("./end-of-stream")),i(e,{readable:r,writable:n},(function(t){if(t)return a(t);s=!0,a()}));var u=!1;return function(t){if(!s&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void a(t||new o("pipe"))}}function h(t){t()}function l(t,e){return t.pipe(e)}function f(t){return t.length?"function"!=typeof t[t.length-1]?s:t.pop():s}e.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i,n=f(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new a("streams");var o=e.map((function(t,r){var a=r<e.length-1;return u(t,a,r>0,(function(t){i||(i=t),t&&o.forEach(h),a||(o.forEach(h),n(i))}))}));return e.reduce(l)}},{"../../../errors":160,"./end-of-stream":170}],172:[function(t,e,r){"use strict";var i=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,r,n){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,n,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new i(n?r:"highWaterMark",a);return Math.floor(a)}return t.objectMode?16:16384}}},{"../../../errors":160}],173:[function(t,e,r){arguments[4][146][0].apply(r,arguments)},{dup:146,events:52}],174:[function(t,e,r){(r=e.exports=t("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js"),r.finished=t("./lib/internal/streams/end-of-stream.js"),r.pipeline=t("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":162,"./lib/_stream_passthrough.js":163,"./lib/_stream_readable.js":164,"./lib/_stream_transform.js":165,"./lib/_stream_writable.js":166,"./lib/internal/streams/end-of-stream.js":170,"./lib/internal/streams/pipeline.js":171}],175:[function(t,e,r){arguments[4][148][0].apply(r,arguments)},{dup:148,"safe-buffer":154}],176:[function(t,e,r){(function(e,i){var n=t("process/browser.js").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},u=0;function h(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new h(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new h(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=u++,i=!(arguments.length<2)&&o.call(arguments,1);return s[e]=!0,n((function(){s[e]&&(i?t.apply(null,i):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof i?i:function(t){delete s[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":133,timers:176}],177:[function(t,e,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r.clone=s,r.addLast=l,r.addFirst=f,r.removeLast=c,r.removeFirst=d,r.insert=p,r.removeAt=m,r.replaceAt=b,r.getIn=g,r.set=_,r.setIn=y,r.update=w,r.updateIn=x,r.merge=E,r.mergeDeep=S,r.mergeIn=k,r.omit=M,r.addDefaults=A;
/*!
* Timm
*
* Immutability helpers with fast reads and acceptable writes.
*
* @copyright Guillermo Grau Panea 2016
* @license MIT
*/
var i="INVALID_ARGS";function n(t){throw new Error(t)}function a(t){var e=Object.keys(t);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e}var o={}.hasOwnProperty;function s(t){if(Array.isArray(t))return t.slice();for(var e=a(t),r={},i=0;i<e.length;i++){var n=e[i];r[n]=t[n]}return r}function u(e,r,o){var l=o;null==l&&n("production"!==t.env.NODE_ENV?"At least one object should be provided to merge()":i);for(var f=!1,c=arguments.length,d=Array(c>3?c-3:0),p=3;p<c;p++)d[p-3]=arguments[p];for(var m=0;m<d.length;m++){var b=d[m];if(null!=b){var g=a(b);if(g.length)for(var _=0;_<=g.length;_++){var v=g[_];if(!e||void 0===l[v]){var y=b[v];r&&h(l[v])&&h(y)&&(y=u(e,r,l[v],y)),void 0!==y&&y!==l[v]&&(f||(f=!0,l=s(l)),l[v]=y)}}}}return l}function h(t){var r=void 0===t?"undefined":e(t);return null!=t&&"object"===r}function l(t,e){return Array.isArray(e)?t.concat(e):t.concat([e])}function f(t,e){return Array.isArray(e)?e.concat(t):[e].concat(t)}function c(t){return t.length?t.slice(0,t.length-1):t}function d(t){return t.length?t.slice(1):t}function p(t,e,r){return t.slice(0,e).concat(Array.isArray(r)?r:[r]).concat(t.slice(e))}function m(t,e){return e>=t.length||e<0?t:t.slice(0,e).concat(t.slice(e+1))}function b(t,e,r){if(t[e]===r)return t;for(var i=t.length,n=Array(i),a=0;a<i;a++)n[a]=t[a];return n[e]=r,n}function g(e,r){if(!Array.isArray(r)&&n("production"!==t.env.NODE_ENV?"A path array should be provided when calling getIn()":i),null!=e){for(var a=e,o=0;o<r.length;o++){var s=r[o];if(void 0===(a=null!=a?a[s]:void 0))return a}return a}}function _(t,e,r){var i=null==t?"number"==typeof e?[]:{}:t;if(i[e]===r)return i;var n=s(i);return n[e]=r,n}function v(t,e,r,i){var n=void 0,a=e[i];i===e.length-1?n=r:n=v(h(t)&&h(t[a])?t[a]:"number"==typeof e[i+1]?[]:{},e,r,i+1);return _(t,a,n)}function y(t,e,r){return e.length?v(t,e,r,0):r}function w(t,e,r){return _(t,e,r(null==t?void 0:t[e]))}function x(t,e,r){return y(t,e,r(g(t,e)))}function E(t,e,r,i,n,a){for(var o=arguments.length,s=Array(o>6?o-6:0),h=6;h<o;h++)s[h-6]=arguments[h];return s.length?u.call.apply(u,[null,!1,!1,t,e,r,i,n,a].concat(s)):u(!1,!1,t,e,r,i,n,a)}function S(t,e,r,i,n,a){for(var o=arguments.length,s=Array(o>6?o-6:0),h=6;h<o;h++)s[h-6]=arguments[h];return s.length?u.call.apply(u,[null,!1,!0,t,e,r,i,n,a].concat(s)):u(!1,!0,t,e,r,i,n,a)}function k(t,e,r,i,n,a,o){var s=g(t,e);null==s&&(s={});for(var h=arguments.length,l=Array(h>7?h-7:0),f=7;f<h;f++)l[f-7]=arguments[f];return y(t,e,l.length?u.call.apply(u,[null,!1,!1,s,r,i,n,a,o].concat(l)):u(!1,!1,s,r,i,n,a,o))}function M(t,e){for(var r=Array.isArray(e)?e:[e],i=!1,n=0;n<r.length;n++)if(o.call(t,r[n])){i=!0;break}if(!i)return t;for(var s={},u=a(t),h=0;h<u.length;h++){var l=u[h];r.indexOf(l)>=0||(s[l]=t[l])}return s}function A(t,e,r,i,n,a){for(var o=arguments.length,s=Array(o>6?o-6:0),h=6;h<o;h++)s[h-6]=arguments[h];return s.length?u.call.apply(u,[null,!0,!1,t,e,r,i,n,a].concat(s)):u(!0,!1,t,e,r,i,n,a)}var I={clone:s,addLast:l,addFirst:f,removeLast:c,removeFirst:d,insert:p,removeAt:m,replaceAt:b,getIn:g,set:_,setIn:y,update:w,updateIn:x,merge:E,mergeDeep:S,mergeIn:k,omit:M,addDefaults:A};r.default=I}).call(this,t("_process"))},{_process:133}],178:[function(t,e,r){!function(t){var r=/^\s+/,i=/\s+$/,n=0,a=t.round,o=t.min,s=t.max,u=t.random;function h(e,u){if(u=u||{},(e=e||"")instanceof h)return e;if(!(this instanceof h))return new h(e,u);var l=function(e){var n={r:0,g:0,b:0},a=1,u=null,h=null,l=null,f=!1,c=!1;"string"==typeof e&&(e=function(t){t=t.replace(r,"").replace(i,"").toLowerCase();var e,n=!1;if(A[t])t=A[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=U.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=U.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=U.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=U.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=U.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=U.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=U.hex8.exec(t))return{r:C(e[1]),g:C(e[2]),b:C(e[3]),a:D(e[4]),format:n?"name":"hex8"};if(e=U.hex6.exec(t))return{r:C(e[1]),g:C(e[2]),b:C(e[3]),format:n?"name":"hex"};if(e=U.hex4.exec(t))return{r:C(e[1]+""+e[1]),g:C(e[2]+""+e[2]),b:C(e[3]+""+e[3]),a:D(e[4]+""+e[4]),format:n?"name":"hex8"};if(e=U.hex3.exec(t))return{r:C(e[1]+""+e[1]),g:C(e[2]+""+e[2]),b:C(e[3]+""+e[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(F(e.r)&&F(e.g)&&F(e.b)?(d=e.r,p=e.g,m=e.b,n={r:255*R(d,255),g:255*R(p,255),b:255*R(m,255)},f=!0,c="%"===String(e.r).substr(-1)?"prgb":"rgb"):F(e.h)&&F(e.s)&&F(e.v)?(u=L(e.s),h=L(e.v),n=function(e,r,i){e=6*R(e,360),r=R(r,100),i=R(i,100);var n=t.floor(e),a=e-n,o=i*(1-r),s=i*(1-a*r),u=i*(1-(1-a)*r),h=n%6;return{r:255*[i,s,o,o,u,i][h],g:255*[u,i,i,s,o,o][h],b:255*[o,o,u,i,i,s][h]}}(e.h,u,h),f=!0,c="hsv"):F(e.h)&&F(e.s)&&F(e.l)&&(u=L(e.s),l=L(e.l),n=function(t,e,r){var i,n,a;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=R(t,360),e=R(e,100),r=R(r,100),0===e)i=n=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,u=2*r-s;i=o(u,s,t+1/3),n=o(u,s,t),a=o(u,s,t-1/3)}return{r:255*i,g:255*n,b:255*a}}(e.h,u,l),f=!0,c="hsl"),e.hasOwnProperty("a")&&(a=e.a));var d,p,m;return a=T(a),{ok:f,format:e.format||c,r:o(255,s(n.r,0)),g:o(255,s(n.g,0)),b:o(255,s(n.b,0)),a:a}}(e);this._originalInput=e,this._r=l.r,this._g=l.g,this._b=l.b,this._a=l.a,this._roundA=a(100*this._a)/100,this._format=u.format||l.format,this._gradientType=u.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=l.ok,this._tc_id=n++}function l(t,e,r){t=R(t,255),e=R(e,255),r=R(r,255);var i,n,a=s(t,e,r),u=o(t,e,r),h=(a+u)/2;if(a==u)i=n=0;else{var l=a-u;switch(n=h>.5?l/(2-a-u):l/(a+u),a){case t:i=(e-r)/l+(e<r?6:0);break;case e:i=(r-t)/l+2;break;case r:i=(t-e)/l+4}i/=6}return{h:i,s:n,l:h}}function f(t,e,r){t=R(t,255),e=R(e,255),r=R(r,255);var i,n,a=s(t,e,r),u=o(t,e,r),h=a,l=a-u;if(n=0===a?0:l/a,a==u)i=0;else{switch(a){case t:i=(e-r)/l+(e<r?6:0);break;case e:i=(r-t)/l+2;break;case r:i=(t-e)/l+4}i/=6}return{h:i,s:n,v:h}}function c(t,e,r,i){var n=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16))];return i&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function d(t,e,r,i){return[O(B(i)),O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16))].join("")}function p(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.s-=e/100,r.s=P(r.s),h(r)}function m(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.s+=e/100,r.s=P(r.s),h(r)}function b(t){return h(t).desaturate(100)}function g(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.l+=e/100,r.l=P(r.l),h(r)}function _(t,e){e=0===e?0:e||10;var r=h(t).toRgb();return r.r=s(0,o(255,r.r-a(-e/100*255))),r.g=s(0,o(255,r.g-a(-e/100*255))),r.b=s(0,o(255,r.b-a(-e/100*255))),h(r)}function v(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.l-=e/100,r.l=P(r.l),h(r)}function y(t,e){var r=h(t).toHsl(),i=(r.h+e)%360;return r.h=i<0?360+i:i,h(r)}function w(t){var e=h(t).toHsl();return e.h=(e.h+180)%360,h(e)}function x(t){var e=h(t).toHsl(),r=e.h;return[h(t),h({h:(r+120)%360,s:e.s,l:e.l}),h({h:(r+240)%360,s:e.s,l:e.l})]}function E(t){var e=h(t).toHsl(),r=e.h;return[h(t),h({h:(r+90)%360,s:e.s,l:e.l}),h({h:(r+180)%360,s:e.s,l:e.l}),h({h:(r+270)%360,s:e.s,l:e.l})]}function S(t){var e=h(t).toHsl(),r=e.h;return[h(t),h({h:(r+72)%360,s:e.s,l:e.l}),h({h:(r+216)%360,s:e.s,l:e.l})]}function k(t,e,r){e=e||6,r=r||30;var i=h(t).toHsl(),n=360/r,a=[h(t)];for(i.h=(i.h-(n*e>>1)+720)%360;--e;)i.h=(i.h+n)%360,a.push(h(i));return a}function M(t,e){e=e||6;for(var r=h(t).toHsv(),i=r.h,n=r.s,a=r.v,o=[],s=1/e;e--;)o.push(h({h:i,s:n,v:a})),a=(a+s)%1;return o}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,r,i,n=this.toRgb();return e=n.r/255,r=n.g/255,i=n.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(i<=.03928?i/12.92:t.pow((i+.055)/1.055,2.4))},setAlpha:function(t){return this._a=T(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),i=a(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+i+"%)":"hsva("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=l(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),i=a(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+i+"%)":"hsla("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return c(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,i,n){var o=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16)),O(B(i))];if(n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*R(this._r,255))+"%",g:a(100*R(this._g,255))+"%",b:a(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*R(this._r,255))+"%, "+a(100*R(this._g,255))+"%, "+a(100*R(this._b,255))+"%)":"rgba("+a(100*R(this._r,255))+"%, "+a(100*R(this._g,255))+"%, "+a(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(I[c(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+d(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var n=h(t);r="#"+d(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(v,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},h.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]="a"===i?t[i]:L(t[i]));t=r}return h(t,e)},h.equals=function(t,e){return!(!t||!e)&&h(t).toRgbString()==h(e).toRgbString()},h.random=function(){return h.fromRatio({r:u(),g:u(),b:u()})},h.mix=function(t,e,r){r=0===r?0:r||50;var i=h(t).toRgb(),n=h(e).toRgb(),a=r/100;return h({r:(n.r-i.r)*a+i.r,g:(n.g-i.g)*a+i.g,b:(n.b-i.b)*a+i.b,a:(n.a-i.a)*a+i.a})},h.readability=function(e,r){var i=h(e),n=h(r);return(t.max(i.getLuminance(),n.getLuminance())+.05)/(t.min(i.getLuminance(),n.getLuminance())+.05)},h.isReadable=function(t,e,r){var i,n,a=h.readability(t,e);switch(n=!1,(i=function(t){var e,r;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==r&&"large"!==r&&(r="small");return{level:e,size:r}}(r)).level+i.size){case"AAsmall":case"AAAlarge":n=a>=4.5;break;case"AAlarge":n=a>=3;break;case"AAAsmall":n=a>=7}return n},h.mostReadable=function(t,e,r){var i,n,a,o,s=null,u=0;n=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var l=0;l<e.length;l++)(i=h.readability(t,e[l]))>u&&(u=i,s=h(e[l]));return h.isReadable(t,s,{level:a,size:o})||!n?s:(r.includeFallbackColors=!1,h.mostReadable(t,["#fff","#000"],r))};var A=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},I=h.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(A);function T(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function R(e,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(e)&&(e="100%");var i=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(e);return e=o(r,s(0,parseFloat(e))),i&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function P(t){return o(1,s(0,t))}function C(t){return parseInt(t,16)}function O(t){return 1==t.length?"0"+t:""+t}function L(t){return t<=1&&(t=100*t+"%"),t}function B(e){return t.round(255*parseFloat(e)).toString(16)}function D(t){return C(t)/255}var N,z,j,U=(z="[\\s|\\(]+("+(N="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",j="[\\s|\\(]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",{CSS_UNIT:new RegExp(N),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+j),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+j),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+j),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function F(t){return!!U.CSS_UNIT.exec(t)}void 0!==e&&e.exports?e.exports=h:window.tinycolor=h}(Math)},{}],179:[function(t,e,r){(r=e.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},r.right=function(t){return t.replace(/\s*$/,"")}},{}],180:[function(t,e,r){"use strict";var i=t("punycode"),n=t("./util");function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=v,r.resolve=function(t,e){return v(t,!1,!0).resolve(e)},r.resolveObject=function(t,e){return t?v(t,!1,!0).resolveObject(e):e},r.format=function(t){n.isString(t)&&(t=v(t));return t instanceof a?t.format():a.prototype.format.call(t)},r.Url=a;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(h),f=["%","/","?",";","#"].concat(l),c=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=t("querystring");function v(t,e,r){if(t&&n.isObject(t)&&t instanceof a)return t;var i=new a;return i.parse(t,e,r),i}a.prototype.parse=function(t,e,r){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var a=t.indexOf("?"),s=-1!==a&&a<t.indexOf("#")?"?":"#",h=t.split(s);h[0]=h[0].replace(/\\/g,"/");var v=t=h.join(s);if(v=v.trim(),!r&&1===t.split("#").length){var y=u.exec(v);if(y)return this.path=v,this.href=v,this.pathname=y[1],y[2]?(this.search=y[2],this.query=e?_.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var w=o.exec(v);if(w){var x=(w=w[0]).toLowerCase();this.protocol=x,v=v.substr(w.length)}if(r||w||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===v.substr(0,2);!E||w&&b[w]||(v=v.substr(2),this.slashes=!0)}if(!b[w]&&(E||w&&!g[w])){for(var S,k,M=-1,A=0;A<c.length;A++){-1!==(I=v.indexOf(c[A]))&&(-1===M||I<M)&&(M=I)}-1!==(k=-1===M?v.lastIndexOf("@"):v.lastIndexOf("@",M))&&(S=v.slice(0,k),v=v.slice(k+1),this.auth=decodeURIComponent(S)),M=-1;for(A=0;A<f.length;A++){var I;-1!==(I=v.indexOf(f[A]))&&(-1===M||I<M)&&(M=I)}-1===M&&(M=v.length),this.host=v.slice(0,M),v=v.slice(M),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var R=this.hostname.split(/\./),P=(A=0,R.length);A<P;A++){var C=R[A];if(C&&!C.match(d)){for(var O="",L=0,B=C.length;L<B;L++)C.charCodeAt(L)>127?O+="x":O+=C[L];if(!O.match(d)){var D=R.slice(0,A),N=R.slice(A+1),z=C.match(p);z&&(D.push(z[1]),N.unshift(z[2])),N.length&&(v="/"+N.join(".")+v),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=i.toASCII(this.hostname));var j=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+j,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!m[x])for(A=0,P=l.length;A<P;A++){var F=l[A];if(-1!==v.indexOf(F)){var G=encodeURIComponent(F);G===F&&(G=escape(F)),v=v.split(F).join(G)}}var H=v.indexOf("#");-1!==H&&(this.hash=v.substr(H),v=v.slice(0,H));var q=v.indexOf("?");if(-1!==q?(this.search=v.substr(q),this.query=v.substr(q+1),e&&(this.query=_.parse(this.query)),v=v.slice(0,q)):e&&(this.search="",this.query={}),v&&(this.pathname=v),g[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var W=this.search||"";this.path=j+W}return this.href=this.format(),this},a.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",a=!1,o="";this.host?a=t+this.host:this.hostname&&(a=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(o=_.stringify(this.query));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||g[e])&&!1!==a?(a="//"+(a||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):a||(a=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),e+a+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+i},a.prototype.resolve=function(t){return this.resolveObject(v(t,!1,!0)).format()},a.prototype.resolveObject=function(t){if(n.isString(t)){var e=new a;e.parse(t,!1,!0),t=e}for(var r=new a,i=Object.keys(this),o=0;o<i.length;o++){var s=i[o];r[s]=this[s]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),h=0;h<u.length;h++){var l=u[h];"protocol"!==l&&(r[l]=t[l])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!g[t.protocol]){for(var f=Object.keys(t),c=0;c<f.length;c++){var d=f[c];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||b[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var m=r.pathname||"",_=r.search||"";r.path=m+_}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),w=y||v||r.host&&t.pathname,x=w,E=r.pathname&&r.pathname.split("/")||[],S=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),w=w&&(""===p[0]||""===E[0])),y)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),r.search=t.search,r.query=t.query;else if(!n.isNullOrUndefined(t.search)){if(S)r.hostname=r.host=E.shift(),(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.host=r.hostname=T.shift());return r.search=t.search,r.query=t.query,n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=E.slice(-1)[0],M=(r.host||t.host||E.length>1)&&("."===k||".."===k)||""===k,A=0,I=E.length;I>=0;I--)"."===(k=E[I])?E.splice(I,1):".."===k?(E.splice(I,1),A++):A&&(E.splice(I,1),A--);if(!w&&!x)for(;A--;A)E.unshift("..");!w||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),M&&"/"!==E.join("/").substr(-1)&&E.push("");var T,R=""===E[0]||E[0]&&"/"===E[0].charAt(0);S&&(r.hostname=r.host=R?"":E.length?E.shift():"",(T=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=T.shift(),r.host=r.hostname=T.shift()));return(w=w||r.host&&E.length)&&!R&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":181,punycode:134,querystring:137}],181:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],182:[function(t,e,r){(function(r){!function(){var i={};function n(){void 0!==r&&"development"!=r.env.NODE_ENV||console.log.apply(console,arguments)}"object"==typeof e?e.exports=i:self.UTIF=i,function(t,e){var r,i,a;r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t){this.message="JPEG error: "+t}return t.prototype=Error(),t.prototype.name="JpegError",t.constructor=t}(),a=function(){function t(t,e){this.message=t,this.g=e}return t.prototype=Error(),t.prototype.name="DNLMarkerError",t.constructor=t}(),function(){function e(){this.M=null,this.B=-1}function n(t,e){for(var r,i,n=0,a=[],o=16;0<o&&!t[o-1];)o--;a.push({children:[],index:0});var s,u=a[0];for(r=0;r<o;r++){for(i=0;i<t[r];i++){for((u=a.pop()).children[u.index]=e[n];0<u.index;)u=a.pop();for(u.index++,a.push(u);a.length<=r;)a.push(s={children:[],index:0}),u.children[u.index]=s.children,u=s;n++}r+1<o&&(a.push(s={children:[],index:0}),u.children[u.index]=s.children,u=s)}return a[0].children}function o(t,e,n,o,s,l,f,c,d){function p(){if(0<L)return L--,O>>L&1;if(255===(O=t[e++])){var r=t[e++];if(r){if(220===r&&R){e+=2;var o=t[e++]<<8|t[e++];if(0<o&&o!==n.g)throw new a("Found DNL marker (0xFFDC) while parsing scan data",o)}throw new i("unexpected marker "+(O<<8|r).toString(16))}}return L=7,O>>>7}function m(t){for(;;){if("number"==typeof(t=t[p()]))return t;if("object"!==(void 0===t?"undefined":r(t)))throw new i("invalid huffman sequence")}}function b(t){for(var e=0;0<t;)e=e<<1|p(),t--;return e}function g(t){if(1===t)return 1===p()?1:-1;var e=b(t);return e>=1<<t-1?e:e+(-1<<t)+1}function _(t,e){var r=m(t.D);for(r=0===r?0:g(r),t.a[e]=t.m+=r,r=1;64>r;){var i=m(t.o),n=15&i;if(i>>=4,0===n){if(15>i)break;r+=16}else r+=i,t.a[e+h[r]]=g(n),r++}}function v(t,e){var r=m(t.D);r=0===r?0:g(r)<<d,t.a[e]=t.m+=r}function y(t,e){t.a[e]|=p()<<d}function w(t,e){if(0<B)B--;else for(var r=l;r<=f;){var i=m(t.o),n=15&i;if(i>>=4,0===n){if(15>i){B=b(i)+(1<<i)-1;break}r+=16}else r+=i,t.a[e+h[r]]=g(n)*(1<<d),r++}}function x(t,e){for(var r,n=l,a=0;n<=f;){r=e+h[n];var o=0>t.a[r]?-1:1;switch(D){case 0:if(r=15&(a=m(t.o)),a>>=4,0===r)15>a?(B=b(a)+(1<<a),D=4):(a=16,D=1);else{if(1!==r)throw new i("invalid ACn encoding");E=g(r),D=a?2:3}continue;case 1:case 2:t.a[r]?t.a[r]+=o*(p()<<d):0==--a&&(D=2===D?3:0);break;case 3:t.a[r]?t.a[r]+=o*(p()<<d):(t.a[r]=E<<d,D=0);break;case 4:t.a[r]&&(t.a[r]+=o*(p()<<d))}n++}4===D&&0==--B&&(D=0)}for(var E,S,k,M,A,I,T,R=9<arguments.length&&void 0!==arguments[9]&&arguments[9],P=n.P,C=e,O=0,L=0,B=0,D=0,N=o.length,z=n.S?0===l?0===c?v:y:0===c?w:x:_,j=0,U=1===N?o[0].c*o[0].l:P*n.O;j<U;){var F=s?Math.min(U-j,s):U;for(S=0;S<N;S++)o[S].m=0;if(B=0,1===N){var G=o[0];for(A=0;A<F;A++)z(G,64*((G.c+1)*(j/G.c|0)+j%G.c)),j++}else for(A=0;A<F;A++){for(S=0;S<N;S++)for(I=(G=o[S]).h,T=G.j,k=0;k<T;k++)for(M=0;M<I;M++)z(G,64*((G.c+1)*((j/P|0)*G.j+k)+(j%P*G.h+M)));j++}if(L=0,(G=u(t,e))&&G.f&&((0,_util.warn)("decodeScan - unexpected MCU data, current marker is: "+G.f),e=G.offset),!(G=G&&G.F)||65280>=G)throw new i("marker was not found");if(!(65488<=G&&65495>=G))break;e+=2}return(G=u(t,e))&&G.f&&((0,_util.warn)("decodeScan - unexpected Scan data, current marker is: "+G.f),e=G.offset),e-C}function s(t,e){for(var r=e.c,n=e.l,a=new Int16Array(64),o=0;o<n;o++)for(var s=0;s<r;s++){var u=64*((e.c+1)*o+s),h=a,l=e.G,f=e.a;if(!l)throw new i("missing required Quantization Table.");for(var c=0;64>c;c+=8){var d=f[u+c],p=f[u+c+1],m=f[u+c+2],b=f[u+c+3],g=f[u+c+4],_=f[u+c+5],v=f[u+c+6],y=f[u+c+7];if(d*=l[c],0==(p|m|b|g|_|v|y))d=5793*d+512>>10,h[c]=d,h[c+1]=d,h[c+2]=d,h[c+3]=d,h[c+4]=d,h[c+5]=d,h[c+6]=d,h[c+7]=d;else{p*=l[c+1],m*=l[c+2],b*=l[c+3],g*=l[c+4],_*=l[c+5];var w=5793*d+128>>8,x=5793*g+128>>8,E=m,S=v*=l[c+6];x=(w=w+x+1>>1)-x,d=3784*E+1567*S+128>>8,E=1567*E-3784*S+128>>8,_=(g=(g=2896*(p-(y*=l[c+7]))+128>>8)+(_<<=4)+1>>1)-_,b=(y=(y=2896*(p+y)+128>>8)+(b<<=4)+1>>1)-b,S=(w=w+(S=d)+1>>1)-S,E=(x=x+E+1>>1)-E,d=2276*g+3406*y+2048>>12,g=3406*g-2276*y+2048>>12,y=d,d=799*b+4017*_+2048>>12,b=4017*b-799*_+2048>>12,_=d,h[c]=w+y,h[c+7]=w-y,h[c+1]=x+_,h[c+6]=x-_,h[c+2]=E+b,h[c+5]=E-b,h[c+3]=S+g,h[c+4]=S-g}}for(l=0;8>l;++l)d=h[l],0==((p=h[l+8])|(m=h[l+16])|(b=h[l+24])|(g=h[l+32])|(_=h[l+40])|(v=h[l+48])|(y=h[l+56]))?(d=-2040>(d=5793*d+8192>>14)?0:2024<=d?255:d+2056>>4,f[u+l]=d,f[u+l+8]=d,f[u+l+16]=d,f[u+l+24]=d,f[u+l+32]=d,f[u+l+40]=d,f[u+l+48]=d,f[u+l+56]=d):(w=5793*d+2048>>12,x=5793*g+2048>>12,d=3784*(E=m)+1567*(S=v)+2048>>12,E=1567*E-3784*S+2048>>12,S=d,_=(g=(g=2896*(p-y)+2048>>12)+_+1>>1)-_,b=(y=(y=2896*(p+y)+2048>>12)+b+1>>1)-b,d=2276*g+3406*y+2048>>12,g=3406*g-2276*y+2048>>12,y=d,d=799*b+4017*_+2048>>12,b=4017*b-799*_+2048>>12,p=(x=(x=(w=4112+(w+x+1>>1))-x)+E+1>>1)+(_=d),v=x-_,_=(E=x-E)-b,d=16>(d=(w=w+S+1>>1)+y)?0:4080<=d?255:d>>4,p=16>p?0:4080<=p?255:p>>4,m=16>(m=E+b)?0:4080<=m?255:m>>4,b=16>(b=(S=w-S)+g)?0:4080<=b?255:b>>4,g=16>(g=S-g)?0:4080<=g?255:g>>4,_=16>_?0:4080<=_?255:_>>4,v=16>v?0:4080<=v?255:v>>4,y=16>(y=w-y)?0:4080<=y?255:y>>4,f[u+l]=d,f[u+l+8]=p,f[u+l+16]=m,f[u+l+24]=b,f[u+l+32]=g,f[u+l+40]=_,f[u+l+48]=v,f[u+l+56]=y)}return e.a}function u(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e,i=t.length-1;if(r=r<e?r:e,e>=i)return null;var n=t[e]<<8|t[e+1];if(65472<=n&&65534>=n)return{f:null,F:n,offset:e};for(var a=t[r]<<8|t[r+1];!(65472<=a&&65534>=a);){if(++r>=i)return null;a=t[r]<<8|t[r+1]}return{f:n.toString(16),F:a,offset:r}}var h=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);e.prototype={parse:function(t){function e(){var e=t[d]<<8|t[d+1];return d+=2,e}function r(){var r=e(),i=u(t,r=d+r-2,d);return i&&i.f&&((0,_util.warn)("readDataBlock - incorrect length, current marker is: "+i.f),r=i.offset),r=t.subarray(d,r),d+=r.length,r}function l(t){for(var e=Math.ceil(t.v/8/t.s),r=Math.ceil(t.g/8/t.u),i=0;i<t.b.length;i++){A=t.b[i];var n=Math.ceil(Math.ceil(t.v/8)*A.h/t.s),a=Math.ceil(Math.ceil(t.g/8)*A.j/t.u);A.a=new Int16Array(64*r*A.j*(e*A.h+1)),A.c=n,A.l=a}t.P=e,t.O=r}var f=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).N,c=void 0===f?null:f,d=0,p=null,m=0;f=[];var b=[],g=[],_=e();if(65496!==_)throw new i("SOI not found");for(_=e();65497!==_;){switch(_){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var v=r();65518===_&&65===v[0]&&100===v[1]&&111===v[2]&&98===v[3]&&101===v[4]&&(p={version:v[5]<<8|v[6],Y:v[7]<<8|v[8],Z:v[9]<<8|v[10],W:v[11]});break;case 65499:_=e()+d-2;for(var y;d<_;){var w=t[d++],x=new Uint16Array(64);if(0==w>>4)for(v=0;64>v;v++)x[y=h[v]]=t[d++];else{if(1!=w>>4)throw new i("DQT - invalid table spec");for(v=0;64>v;v++)x[y=h[v]]=e()}f[15&w]=x}break;case 65472:case 65473:case 65474:if(E)throw new i("Only single frame JPEGs supported");e();var E={};for(E.X=65473===_,E.S=65474===_,E.precision=t[d++],_=e(),E.g=c||_,E.v=e(),E.b=[],E.C={},v=t[d++],_=x=w=0;_<v;_++){y=t[d];var S=t[d+1]>>4,k=15&t[d+1];w<S&&(w=S),x<k&&(x=k),S=E.b.push({h:S,j:k,T:t[d+2],G:null}),E.C[y]=S-1,d+=3}E.s=w,E.u=x,l(E);break;case 65476:for(y=e(),_=2;_<y;){for(w=t[d++],x=new Uint8Array(16),v=S=0;16>v;v++,d++)S+=x[v]=t[d];for(k=new Uint8Array(S),v=0;v<S;v++,d++)k[v]=t[d];_+=17+S,(0==w>>4?g:b)[15&w]=n(x,k)}break;case 65501:e();var M=e();break;case 65498:for(v=1==++m&&!c,e(),w=t[d++],y=[],_=0;_<w;_++){x=E.C[t[d++]];var A=E.b[x];x=t[d++],A.D=g[x>>4],A.o=b[15&x],y.push(A)}_=t[d++],w=t[d++],x=t[d++];try{var I=o(t,d,E,y,M,_,w,x>>4,15&x,v);d+=I}catch(e){if(e instanceof a)return(0,_util.warn)('Attempting to re-parse JPEG image using "scanLines" parameter found in DNL marker (0xFFDC) segment.'),this.parse(t,{N:e.g});throw e}break;case 65500:d+=4;break;case 65535:255!==t[d]&&d--;break;default:if(255===t[d-3]&&192<=t[d-2]&&254>=t[d-2])d-=3;else{if(!(v=u(t,d-2))||!v.f)throw new i("unknown marker "+_.toString(16));(0,_util.warn)("JpegImage.parse - unexpected data, current marker is: "+v.f),d=v.offset}}_=e()}for(this.width=E.v,this.height=E.g,this.A=p,this.b=[],_=0;_<E.b.length;_++)(M=f[(A=E.b[_]).T])&&(A.G=M),this.b.push({R:s(0,A),U:A.h/E.s,V:A.j/E.u,c:A.c,l:A.l});this.i=this.b.length},L:function(t,e){var r,i,n=this.width/t,a=this.height/e,o=this.b.length,s=t*e*o,u=new Uint8ClampedArray(s),h=new Uint32Array(t);for(i=0;i<o;i++){var l=this.b[i],f=l.U*n,c=l.V*a,d=i,p=l.R,m=l.c+1<<3;for(r=0;r<t;r++)l=0|r*f,h[r]=(4294967288&l)<<3|7&l;for(f=0;f<e;f++)for(l=m*(4294967288&(l=0|f*c))|(7&l)<<3,r=0;r<t;r++)u[d]=p[l+h[r]],d+=o}if(a=this.M)for(i=0;i<s;)for(n=l=0;l<o;l++,i++,n+=2)u[i]=(u[i]*a[n]>>8)+a[n+1];return u},w:function(){return this.A?!!this.A.W:3===this.i?0!==this.B:1===this.B},I:function(t){for(var e,r,i,n=0,a=t.length;n<a;n+=3)e=t[n],r=t[n+1],i=t[n+2],t[n]=e-179.456+1.402*i,t[n+1]=e+135.459-.344*r-.714*i,t[n+2]=e-226.816+1.772*r;return t},K:function(t){for(var e,r,i,n,a=0,o=0,s=t.length;o<s;o+=4)e=t[o],r=t[o+1],i=t[o+2],n=t[o+3],t[a++]=r*(-660635669420364e-19*r+.000437130475926232*i-54080610064599e-18*e+.00048449797120281*n-.154362151871126)-122.67195406894+i*(-.000957964378445773*i+.000817076911346625*e-.00477271405408747*n+1.53380253221734)+e*(.000961250184130688*e-.00266257332283933*n+.48357088451265)+n*(-.000336197177618394*n+.484791561490776),t[a++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*i+.000659397001245577*e+.000426105652938837*n-.176491792462875)+i*(-.000778269941513683*i+.00130872261408275*e+.000770482631801132*n-.151051492775562)+e*(.00126935368114843*e-.00265090189010898*n+.25802910206845)+n*(-.000318913117588328*n-.213742400323665),t[a++]=r*(-.000570115196973677*r-263409051004589e-19*i+.0020741088115012*e-.00288260236853442*n+.814272968359295)-20.810012546947+i*(-153496057440975e-19*i-.000132689043961446*e+.000560833691242812*n-.195152027534049)+e*(.00174418132927582*e-.00255243321439347*n+.116935020465145)+n*(-.000343531996510555*n+.24165260232407);return t.subarray(0,a)},J:function(t){for(var e,r,i,n=0,a=t.length;n<a;n+=4)e=t[n],r=t[n+1],i=t[n+2],t[n]=434.456-e-1.402*i,t[n+1]=119.541-e+.344*r+.714*i,t[n+2]=481.816-e-1.772*r;return t},H:function(t){for(var e,r,i,n,a=0,o=1/255,s=0,u=t.length;s<u;s+=4)e=t[s]*o,r=t[s+1]*o,i=t[s+2]*o,n=t[s+3]*o,t[a++]=255+e*(-4.387332384609988*e+54.48615194189176*r+18.82290502165302*i+212.25662451639585*n-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*i-17.873870861415444*n-5.497006427196366)+i*(-2.5217340131683033*i-21.248923337353073*n+17.5119270841813)-n*(21.86122147463605*n+189.48180835922747),t[a++]=255+e*(8.841041422036149*e+60.118027045597366*r+6.871425592049007*i+31.159100130055922*n-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*i+131.35250912493976*n-190.9453302588951)+i*(4.444339102852739*i+9.8632861493405*n-24.86741582555878)-n*(20.737325471181034*n+187.80453709719578),t[a++]=255+e*(.8842522430003296*e+8.078677503112928*r+30.89978309703729*i-.23883238689178934*n-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*i+50.606957656360734*n-112.23884253719248)+i*(.03296041114873217*i+115.60384449646641*n-193.58209356861505)-n*(22.33816807309886*n+180.12613974708367);return t.subarray(0,a)},getData:function(t,e,r){if(4<this.i)throw new i("Unsupported color mode");if(t=this.L(t,e),1===this.i&&r){r=t.length,e=new Uint8ClampedArray(3*r);for(var n=0,a=0;a<r;a++){var o=t[a];e[n++]=o,e[n++]=o,e[n++]=o}return e}if(3===this.i&&this.w())return this.I(t);if(4===this.i){if(this.w())return r?this.K(t):this.J(t);if(r)return this.H(t)}return t}},t.JpegDecoder=e}(),t.encodeImage=function(e,r,i,n){var a={t256:[r],t257:[i],t258:[8,8,8,8],t259:[1],t262:[2],t273:[1e3],t277:[4],t278:[i],t279:[r*i*4],t282:[1],t283:[1],t284:[1],t286:[0],t287:[0],t296:[1],t305:["Photopea (UTIF.js)"],t338:[1]};if(n)for(var o in n)a[o]=n[o];var s=new Uint8Array(t.encode([a])),u=new Uint8Array(e),h=new Uint8Array(1e3+r*i*4);for(o=0;o<s.length;o++)h[o]=s[o];for(o=0;o<u.length;o++)h[1e3+o]=u[o];return h.buffer},t.encode=function(e){var r=new Uint8Array(2e4),i=4,n=t._binBE;r[0]=77,r[1]=77,r[3]=42;var a=8;n.writeUint(r,i,a),i+=4;for(var o=0;o<e.length;o++){var s=t._writeIFD(n,r,a,e[o]);a=s[1],o<e.length-1&&n.writeUint(r,s[0],a)}return r.slice(0,a).buffer},t.decode=function(e){t.decode._decodeG3.allow2D=null;var r=new Uint8Array(e),i=0,n=t._binBE.readASCII(r,i,2);i+=2;var a="II"==n?t._binLE:t._binBE;a.readUshort(r,i);i+=2;var o=a.readUint(r,i);i+=4;for(var s=[];;){var u=t._readIFD(a,r,o,s);if(0==(o=a.readUint(r,u)))break}return s},t.decodeImages=function(e,r){for(var i=new Uint8Array(e),a=t._binBE.readASCII(i,0,2),o=0;o<r.length;o++){var s=r[o];if(null!=s.t256){s.isLE="II"==a,s.width=s.t256[0],s.height=s.t257[0];var u=s.t259?s.t259[0]:1,h=s.t266?s.t266[0]:1;s.t284&&2==s.t284[0]&&n("PlanarConfiguration 2 should not be used!");var l=(s.t258?Math.min(32,s.t258[0]):1)*(s.t277?s.t277[0]:1),f=8*Math.ceil(s.width*l/8),c=s.t273;null==c&&(c=s.t324);var d=s.t279;1==u&&1==c.length&&(d=[s.height*(f>>>3)]),null==d&&(d=s.t325);var p=new Uint8Array(s.height*(f>>>3)),m=0;if(null!=s.t322){for(var b=s.t322[0],g=s.t323[0],_=Math.floor((s.width+b-1)/b),v=Math.floor((s.height+g-1)/g),y=new Uint8Array(0|Math.ceil(b*g*l/8)),w=0;w<v;w++)for(var x=0;x<_;x++){for(var E=w*_+x,S=0;S<y.length;S++)y[S]=0;t.decode._decompress(s,i,c[E],d[E],u,y,0,h),6==u?p=y:t._copyTile(y,0|Math.ceil(b*l/8),g,p,0|Math.ceil(s.width*l/8),s.height,0|Math.ceil(x*b*l/8),w*g)}m=8*p.length}else{var k=s.t278?s.t278[0]:s.height;k=Math.min(k,s.height);for(E=0;E<c.length;E++)t.decode._decompress(s,i,c[E],d[E],u,p,0|Math.ceil(m/8),h),m+=f*k;m=Math.min(m,8*p.length)}s.data=new Uint8Array(p.buffer,0,0|Math.ceil(m/8))}}},t.decode._decompress=function(r,i,a,o,s,u,h,l){if(1==s)for(var f=0;f<o;f++)u[h+f]=i[a+f];else if(3==s)t.decode._decodeG3(i,a,o,u,h,r.width,l);else if(4==s)t.decode._decodeG4(i,a,o,u,h,r.width,l);else if(5==s)t.decode._decodeLZW(i,a,u,h);else if(6==s)t.decode._decodeOldJPEG(r,i,a,o,u,h);else if(7==s)t.decode._decodeNewJPEG(r,i,a,o,u,h);else if(8==s)for(var c=new Uint8Array(i.buffer,a,o),d=e.inflate(c),p=0;p<d.length;p++)u[h+p]=d[p];else 32773==s?t.decode._decodePackBits(i,a,o,u,h):32809==s?t.decode._decodeThunder(i,a,o,u,h):n("Unknown compression",s);if(r.t317&&2==r.t317[0])for(var m=r.t277?r.t277[0]:1,b=r.t278?r.t278[0]:r.height,g=r.width*m,_=0;_<b;_++){var v=h+_*g;if(3==m)for(f=3;f<g;f+=3)u[v+f]=u[v+f]+u[v+f-3]&255,u[v+f+1]=u[v+f+1]+u[v+f-2]&255,u[v+f+2]=u[v+f+2]+u[v+f-1]&255;else for(f=m;f<g;f++)u[v+f]=u[v+f]+u[v+f-m]&255}},t.decode._decodeNikon=function(t,e,r,i,a){var o,s;n(t.slice(e,e+100)),o=t[e],s=t[++e],e++,n(o.toString(16),s.toString(16),r)},t.decode._decodeNewJPEG=function(e,r,i,n,a,o){var s=e.t347,u=s?s.length:0,h=new Uint8Array(u+n);if(s){for(var l=0,f=0;f<u-1&&(255!=s[f]||217!=s[f+1]);f++)h[l++]=s[f];var c=r[i],d=r[i+1];255==c&&216==d||(h[l++]=c,h[l++]=d);for(f=2;f<n;f++)h[l++]=r[i+f]}else for(f=0;f<n;f++)h[f]=r[i+f];if(32803==e.t262){var p=e.t258[0],m=(new LosslessJpegDecoder).decode(h),b=m.length;if(16==p)for(f=0;f<b;f++)a[o++]=255&m[f],a[o++]=m[f]>>>8;else{if(12!=p)throw new Error("unsupported bit depth "+p);for(f=0;f<b;f+=2)a[o++]=m[f]>>>4,a[o++]=255&(m[f]<<4|m[f+1]>>>8),a[o++]=255&m[f+1]}}else{var g=new t.JpegDecoder;g.parse(h);var _=g.getData(g.width,g.height);for(f=0;f<_.length;f++)a[o+f]=_[f]}6==e.t262[0]&&(e.t262[0]=2)},t.decode._decodeOldJPEGInit=function(t,e,r,i){var a,o,s,u,h,l=216,f=0,c=0,d=!1,p=t.t513,m=p?p[0]:0,b=t.t514,g=b?b[0]:0,_=t.t324||t.t273||p,v=t.t530,y=0,w=0,x=t.t277?t.t277[0]:1,E=t.t515;if(_&&(c=_[0],d=_.length>1),!d){if(255==e[r]&&e[r+1]==l)return{jpegOffset:r};if(null!=p&&(255==e[r+m]&&e[r+m+1]==l?f=r+m:n("JPEGInterchangeFormat does not point to SOI"),null==b?n("JPEGInterchangeFormatLength field is missing"):(m>=c||m+g<=c)&&n("JPEGInterchangeFormatLength field value is invalid"),null!=f))return{jpegOffset:f}}if(null!=v&&(y=v[0],w=v[1]),null!=p&&null!=b)if(g>=2&&m+g<=c){for(a=255==e[r+m+g-2]&&e[r+m+g-1]==l?new Uint8Array(g-2):new Uint8Array(g),s=0;s<a.length;s++)a[s]=e[r+m+s];n("Incorrect JPEG interchange format: using JPEGInterchangeFormat offset to derive tables")}else n("JPEGInterchangeFormat+JPEGInterchangeFormatLength > offset to first strip or tile");if(null==a){var S=0,k=[];k[S++]=255,k[S++]=l;var M=t.t519;if(null==M)throw new Error("JPEGQTables tag is missing");for(s=0;s<M.length;s++)for(k[S++]=255,k[S++]=219,k[S++]=0,k[S++]=67,k[S++]=s,u=0;u<64;u++)k[S++]=e[r+M[s]+u];for(h=0;h<2;h++){var A=t[0==h?"t520":"t521"];if(null==A)throw new Error((0==h?"JPEGDCTables":"JPEGACTables")+" tag is missing");for(s=0;s<A.length;s++){k[S++]=255,k[S++]=196;var I=19;for(u=0;u<16;u++)I+=e[r+A[s]+u];for(k[S++]=I>>>8,k[S++]=255&I,k[S++]=s|h<<4,u=0;u<16;u++)k[S++]=e[r+A[s]+u];for(u=0;u<I;u++)k[S++]=e[r+A[s]+16+u]}}if(k[S++]=255,k[S++]=192,k[S++]=0,k[S++]=8+3*x,k[S++]=8,k[S++]=t.height>>>8&255,k[S++]=255&t.height,k[S++]=t.width>>>8&255,k[S++]=255&t.width,k[S++]=x,1==x)k[S++]=1,k[S++]=17,k[S++]=0;else for(s=0;s<3;s++)k[S++]=s+1,k[S++]=0!=s?17:(15&y)<<4|15&w,k[S++]=s;null!=E&&0!=E[0]&&(k[S++]=255,k[S++]=221,k[S++]=0,k[S++]=4,k[S++]=E[0]>>>8&255,k[S++]=255&E[0]),a=new Uint8Array(k)}var T=-1;for(s=0;s<a.length-1;){if(255==a[s]&&192==a[s+1]){T=s;break}s++}if(-1==T){var R=new Uint8Array(a.length+10+3*x);R.set(a);var P=a.length;if(T=a.length,(a=R)[P++]=255,a[P++]=192,a[P++]=0,a[P++]=8+3*x,a[P++]=8,a[P++]=t.height>>>8&255,a[P++]=255&t.height,a[P++]=t.width>>>8&255,a[P++]=255&t.width,a[P++]=x,1==x)a[P++]=1,a[P++]=17,a[P++]=0;else for(s=0;s<3;s++)a[P++]=s+1,a[P++]=0!=s?17:(15&y)<<4|15&w,a[P++]=s}if(255==e[c]&&218==e[c+1]){var C=e[c+2]<<8|e[c+3];for((o=new Uint8Array(C+2))[0]=e[c],o[1]=e[c+1],o[2]=e[c+2],o[3]=e[c+3],s=0;s<C-2;s++)o[s+4]=e[c+s+4]}else{var O=0;if((o=new Uint8Array(8+2*x))[O++]=255,o[O++]=218,o[O++]=0,o[O++]=6+2*x,o[O++]=x,1==x)o[O++]=1,o[O++]=0;else for(s=0;s<3;s++)o[O++]=s+1,o[O++]=s<<4|s;o[O++]=0,o[O++]=63,o[O++]=0}return{jpegOffset:r,tables:a,sosMarker:o,sofPosition:T}},t.decode._decodeOldJPEG=function(e,r,i,n,a,o){var s,u,h,l=t.decode._decodeOldJPEGInit(e,r,i,n);if(null!=l.jpegOffset)for(s=i+n-l.jpegOffset,h=new Uint8Array(s),d=0;d<s;d++)h[d]=r[l.jpegOffset+d];else{for(u=l.tables.length,(h=new Uint8Array(u+l.sosMarker.length+n+2)).set(l.tables),u,h[l.sofPosition+5]=e.height>>>8&255,h[l.sofPosition+6]=255&e.height,h[l.sofPosition+7]=e.width>>>8&255,h[l.sofPosition+8]=255&e.width,255==r[i]&&r[i+1]==SOS||(h.set(l.sosMarker,bufoff),bufoff+=sosMarker.length),d=0;d<n;d++)h[bufoff++]=r[i+d];h[bufoff++]=255,h[bufoff++]=EOI}var f=new t.JpegDecoder;f.parse(h);for(var c=f.getData(f.width,f.height),d=0;d<c.length;d++)a[o+d]=c[d];6==e.t262[0]&&(e.t262[0]=2)},t.decode._decodePackBits=function(t,e,r,i,n){for(var a=new Int8Array(t.buffer),o=new Int8Array(i.buffer),s=e+r;e<s;){var u=a[e];if(e++,u>=0&&u<128)for(var h=0;h<u+1;h++)o[n]=a[e],n++,e++;if(u>=-127&&u<0){for(h=0;h<1-u;h++)o[n]=a[e],n++;e++}}},t.decode._decodeThunder=function(t,e,r,i,n){for(var a=[0,1,0,-1],o=[0,1,2,3,0,-3,-2,-1],s=e+r,u=2*n,h=0;e<s;){var l=t[e],f=l>>>6,c=63&l;if(e++,3==f&&(h=15&c,i[u>>>1]|=h<<4*(1-u&1),u++),0==f)for(var d=0;d<c;d++)i[u>>>1]|=h<<4*(1-u&1),u++;if(2==f)for(d=0;d<2;d++){4!=(p=c>>>3*(1-d)&7)&&(h+=o[p],i[u>>>1]|=h<<4*(1-u&1),u++)}if(1==f)for(d=0;d<3;d++){var p;2!=(p=c>>>2*(2-d)&3)&&(h+=a[p],i[u>>>1]|=h<<4*(1-u&1),u++)}}},t.decode._dmap={1:0,"011":1,"000011":2,"0000011":3,"010":-1,"000010":-2,"0000010":-3},t.decode._lens=function(){var t=function(t,e,r,i){for(var n=0;n<e.length;n++)t[e[n]]=r+n*i},e="00110101,000111,0111,1000,1011,1100,1110,1111,10011,10100,00111,01000,001000,000011,110100,110101,101010,101011,0100111,0001100,0001000,0010111,0000011,0000100,0101000,0101011,0010011,0100100,0011000,00000010,00000011,00011010,00011011,00010010,00010011,00010100,00010101,00010110,00010111,00101000,00101001,00101010,00101011,00101100,00101101,00000100,00000101,00001010,00001011,01010010,01010011,01010100,01010101,00100100,00100101,01011000,01011001,01011010,01011011,01001010,01001011,00110010,00110011,00110100",r="0000110111,010,11,10,011,0011,0010,00011,000101,000100,0000100,0000101,0000111,00000100,00000111,000011000,0000010111,0000011000,0000001000,00001100111,00001101000,00001101100,00000110111,00000101000,00000010111,00000011000,000011001010,000011001011,000011001100,000011001101,000001101000,000001101001,000001101010,000001101011,000011010010,000011010011,000011010100,000011010101,000011010110,000011010111,000001101100,000001101101,000011011010,000011011011,000001010100,000001010101,000001010110,000001010111,000001100100,000001100101,000001010010,000001010011,000000100100,000000110111,000000111000,000000100111,000000101000,000001011000,000001011001,000000101011,000000101100,000001011010,000001100110,000001100111",i="11011,10010,010111,0110111,00110110,00110111,01100100,01100101,01101000,01100111,011001100,011001101,011010010,011010011,011010100,011010101,011010110,011010111,011011000,011011001,011011010,011011011,010011000,010011001,010011010,011000,010011011",n="0000001111,000011001000,000011001001,000001011011,000000110011,000000110100,000000110101,0000001101100,0000001101101,0000001001010,0000001001011,0000001001100,0000001001101,0000001110010,0000001110011,0000001110100,0000001110101,0000001110110,0000001110111,0000001010010,0000001010011,0000001010100,0000001010101,0000001011010,0000001011011,0000001100100,0000001100101",a="00000001000,00000001100,00000001101,000000010010,000000010011,000000010100,000000010101,000000010110,000000010111,000000011100,000000011101,000000011110,000000011111";e=e.split(","),r=r.split(","),i=i.split(","),n=n.split(","),a=a.split(",");var o={},s={};return t(o,e,0,1),t(o,i,64,64),t(o,a,1792,64),t(s,r,0,1),t(s,n,64,64),t(s,a,1792,64),[o,s]}(),t.decode._decodeG4=function(e,r,i,n,a,o,s){for(var u=t.decode,h=r<<3,l=0,f="",c=[],d=[],p=0;p<o;p++)d.push(0);d=u._makeDiff(d);for(var m=0,b=0,g=0,_=0,v=0,y=0,w="",x=0,E=8*Math.ceil(o/8);h>>>3<r+i;){g=u._findDiff(d,m+(0==m?0:1),1-v),_=u._findDiff(d,g,v);var S=0;if(1==s&&(S=e[h>>>3]>>>7-(7&h)&1),2==s&&(S=e[h>>>3]>>>(7&h)&1),h++,f+=S,"H"==w){if(null!=u._lens[v][f]){var k=u._lens[v][f];f="",l+=k,k<64&&(u._addNtimes(c,l,v),m+=l,v=1-v,l=0,0==--x&&(w=""))}}else"0001"==f&&(f="",u._addNtimes(c,_-m,v),m=_),"001"==f&&(f="",w="H",x=2),null!=u._dmap[f]&&(b=g+u._dmap[f],u._addNtimes(c,b-m,v),m=b,f="",v=1-v);c.length==o&&""==w&&(u._writeBits(c,n,8*a+y*E),v=0,y++,m=0,d=u._makeDiff(c),c=[])}},t.decode._findDiff=function(t,e,r){for(var i=0;i<t.length;i+=2)if(t[i]>=e&&t[i+1]==r)return t[i]},t.decode._makeDiff=function(t){var e=[];1==t[0]&&e.push(0,1);for(var r=1;r<t.length;r++)t[r-1]!=t[r]&&e.push(r,t[r]);return e.push(t.length,0,t.length,1),e},t.decode._decodeG3=function(e,r,i,n,a,o,s){for(var u=t.decode,h=r<<3,l=0,f="",c=[],d=[],p=0;p<o;p++)c.push(0);for(var m=0,b=0,g=0,_=0,v=0,y=-1,w="",x=0,E=!1,S=8*Math.ceil(o/8);h>>>3<r+i;){g=u._findDiff(d,m+(0==m?0:1),1-v),_=u._findDiff(d,g,v);var k=0;if(1==s&&(k=e[h>>>3]>>>7-(7&h)&1),2==s&&(k=e[h>>>3]>>>(7&h)&1),h++,f+=k,E){if(null!=u._lens[v][f]){var M=u._lens[v][f];f="",l+=M,M<64&&(u._addNtimes(c,l,v),v=1-v,l=0)}}else if("H"==w){if(null!=u._lens[v][f]){M=u._lens[v][f];f="",l+=M,M<64&&(u._addNtimes(c,l,v),m+=l,v=1-v,l=0,0==--x&&(w=""))}}else"0001"==f&&(f="",u._addNtimes(c,_-m,v),m=_),"001"==f&&(f="",w="H",x=2),null!=u._dmap[f]&&(b=g+u._dmap[f],u._addNtimes(c,b-m,v),m=b,f="",v=1-v);f.endsWith("000000000001")&&(y>=0&&u._writeBits(c,n,8*a+y*S),1==s&&(E=1==(e[h>>>3]>>>7-(7&h)&1)),2==s&&(E=1==(e[h>>>3]>>>(7&h)&1)),h++,null==u._decodeG3.allow2D&&(u._decodeG3.allow2D=E),u._decodeG3.allow2D||(E=!0,h--),f="",v=0,y++,m=0,d=u._makeDiff(c),c=[])}c.length==o&&u._writeBits(c,n,8*a+y*S)},t.decode._addNtimes=function(t,e,r){for(var i=0;i<e;i++)t.push(r)},t.decode._writeBits=function(t,e,r){for(var i=0;i<t.length;i++)e[r+i>>>3]|=t[i]<<7-(r+i&7)},t.decode._decodeLZW=function(e,r,i,n){if(null==t.decode._lzwTab){for(var a=new Uint32Array(65535),o=new Uint16Array(65535),s=new Uint8Array(2e6),u=0;u<256;u++)s[u<<2]=u,a[u]=u<<2,o[u]=1;t.decode._lzwTab=[a,o,s]}for(var h=t.decode._copyData,l=t.decode._lzwTab[0],f=t.decode._lzwTab[1],c=(s=t.decode._lzwTab[2],258),d=1032,p=9,m=r<<3,b=0,g=0;b=(e[m>>>3]<<16|e[m+8>>>3]<<8|e[m+16>>>3])>>24-(7&m)-p&(1<<p)-1,m+=p,257!=b;){if(256==b){if(p=9,c=258,d=1032,b=(e[m>>>3]<<16|e[m+8>>>3]<<8|e[m+16>>>3])>>24-(7&m)-p&(1<<p)-1,m+=p,257==b)break;i[n]=b,n++}else if(b<c){var _=l[b],v=f[b];if(h(s,_,i,n,v),n+=v,g>=c)l[c]=d,s[l[c]]=_[0],f[c]=1,d=d+1+3&-4,c++;else l[c]=d,h(s,l[g],s,d,y=f[g]),s[d+y]=s[_],y++,f[c]=y,c++,d=d+y+3&-4;c+1==1<<p&&p++}else{var y;if(g>=c)l[c]=d,f[c]=0,c++;else l[c]=d,h(s,l[g],s,d,y=f[g]),s[d+y]=s[d],y++,f[c]=y,c++,h(s,d,i,n,y),n+=y,d=d+y+3&-4;c+1==1<<p&&p++}g=b}},t.decode._copyData=function(t,e,r,i,n){for(var a=0;a<n;a+=4)r[i+a]=t[e+a],r[i+a+1]=t[e+a+1],r[i+a+2]=t[e+a+2],r[i+a+3]=t[e+a+3]},t.tags={254:"NewSubfileType",255:"SubfileType",256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",266:"FillOrder",269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffset",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",285:"PageName",286:"XPosition",287:"YPosition",292:"T4Options",296:"ResolutionUnit",297:"PageNumber",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:"WhitePoint",319:"PrimaryChromaticities",320:"ColorMap",321:"HalftoneHints",322:"TileWidth",323:"TileLength",324:"TileOffset",325:"TileByteCounts",330:"SubIFDs",336:"DotRange",338:"ExtraSample",339:"SampleFormat",347:"JPEGTables",512:"JPEGProc",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",519:"JPEGQTables",520:"JPEGDCTables",521:"JPEGACTables",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite",700:"XMP",33421:"CFARepeatPatternDim",33422:"CFAPattern",33432:"Copyright",33434:"ExposureTime",33437:"FNumber",33723:"IPTC/NAA",34377:"Photoshop",34665:"ExifIFD",34675:"ICC Profile",34850:"ExposureProgram",34853:"GPSInfo",34855:"ISOSpeedRatings",34858:"TimeZoneOffset",34859:"SelfTimeMode",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37377:"ShutterSpeedValue",37378:"ApertureValue",37380:"ExposureBiasValue",37383:"MeteringMode",37385:"Flash",37386:"FocalLength",37390:"FocalPlaneXResolution",37391:"FocalPlaneYResolution",37392:"FocalPlaneResolutionUnit",37393:"ImageNumber",37398:"TIFF/EPStandardID",37399:"SensingMethod",37500:"MakerNote",37510:"UserComment",37724:"ImageSourceData",40092:"XPComment",40094:"XPKeywords",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelXDimension",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",50706:"DNGVersion",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50710:"CFAPlaneColor",50711:"CFALayout",50712:"LinearizationTable",50713:"BlackLevelRepeatDim",50714:"BlackLevel",50716:"BlackLevelDeltaV",50717:"WhiteLevel",50718:"DefaultScale",50719:"DefaultCropOrigin",50720:"DefaultCropSize",50733:"BayerGreenSplit",50738:"AntiAliasStrength",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50727:"AnalogBalance",50728:"AsShotNeutral",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"LensInfo",50739:"ShadowScale",50740:"DNGPrivateData",50741:"MakerNoteSafety",50778:"CalibrationIlluminant1",50779:"CalibrationIlluminant2",50780:"BestQualityScale",50781:"RawDataUniqueID",50827:"OriginalRawFileName",50829:"ActiveArea",50830:"MaskedAreas",50931:"CameraCalibrationSignature",50932:"ProfileCalibrationSignature",50935:"NoiseReductionApplied",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:"ProfileEmbedPolicy",50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50969:"PreviewSettingsDigest",50970:"PreviewColorSpace",50971:"PreviewDateTime",50972:"RawImageDigest",51008:"OpcodeList1",51009:"OpcodeList2",51022:"OpcodeList3",51041:"NoiseProfile",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualityFinalSize",51091:"OriginalDefaultCropSize",51125:"DefaultUserCrop"},t.ttypes={256:3,257:3,258:3,259:3,262:3,273:4,274:3,277:3,278:4,279:4,282:5,283:5,284:3,286:5,287:5,296:3,305:2,306:2,338:3,513:4,514:4,34665:4},t._readIFD=function(e,r,i,a){var o=e.readUshort(r,i);i+=2;var s={};a.push(s);for(var u=0;u<o;u++){var h=e.readUshort(r,i);i+=2;var l=e.readUshort(r,i);i+=2;var f=e.readUint(r,i);i+=4;var c=e.readUint(r,i);i+=4;var d=[];if(s["t"+h]=d,1==l||7==l)for(var p=0;p<f;p++)d.push(r[(f<5?i-4:c)+p]);if(2==l&&d.push(e.readASCII(r,f<5?i-4:c,f-1)),3==l)for(p=0;p<f;p++)d.push(e.readUshort(r,(f<3?i-4:c)+2*p));if(4==l)for(p=0;p<f;p++)d.push(e.readUint(r,(f<2?i-4:c)+4*p));if(5==l)for(p=0;p<f;p++)d.push(e.readUint(r,c+8*p)/e.readUint(r,c+8*p+4));if(8==l)for(p=0;p<f;p++)d.push(e.readShort(r,(f<3?i-4:c)+2*p));if(9==l)for(p=0;p<f;p++)d.push(e.readInt(r,(f<2?i-4:c)+4*p));if(10==l)for(p=0;p<f;p++)d.push(e.readInt(r,c+8*p)/e.readInt(r,c+8*p+4));if(11==l)for(p=0;p<f;p++)d.push(e.readFloat(r,c+4*p));if(12==l)for(p=0;p<f;p++)d.push(e.readDouble(r,c+8*p));if(0!=f&&0==d.length&&n("unknown TIFF tag type: ",l,"num:",f),330==h)for(p=0;p<f;p++)t._readIFD(e,r,d[p],a)}return i},t._writeIFD=function(e,r,i,n){var a=Object.keys(n);e.writeUshort(r,i,a.length);for(var o=(i+=2)+12*a.length+4,s=0;s<a.length;s++){var u=a[s],h=parseInt(u.slice(1)),l=t.ttypes[h];if(null==l)throw new Error("unknown type of tag: "+h);var f=n[u];2==l&&(f=f[0]+"\0");var c=f.length;e.writeUshort(r,i,h),i+=2,e.writeUshort(r,i,l),i+=2,e.writeUint(r,i,c);var d=[-1,1,1,2,4,8,0,0,0,0,0,0,8][l]*c,p=i+=4;if(d>4&&(e.writeUint(r,i,o),p=o),2==l&&e.writeASCII(r,p,f),3==l)for(var m=0;m<c;m++)e.writeUshort(r,p+2*m,f[m]);if(4==l)for(m=0;m<c;m++)e.writeUint(r,p+4*m,f[m]);if(5==l)for(m=0;m<c;m++)e.writeUint(r,p+8*m,Math.round(1e4*f[m])),e.writeUint(r,p+8*m+4,1e4);if(12==l)for(m=0;m<c;m++)e.writeDouble(r,p+8*m,f[m]);d>4&&(o+=d+=1&d),i+=4}return[i,o]},t.toRGBA8=function(t){var e=t.width,r=t.height,i=e*r,a=4*i,o=t.data,s=new Uint8Array(4*i),u=t.t262[0],h=t.t258?Math.min(32,t.t258[0]):1,l=t.isLE?1:0;if(0==u)for(var f=Math.ceil(h*e/8),c=0;c<r;c++){var d=c*f,p=c*e;if(1==h)for(var m=0;m<e;m++){var b=p+m<<2,g=o[d+(m>>3)]>>7-(7&m)&1;s[b]=s[b+1]=s[b+2]=255*(1-g),s[b+3]=255}if(4==h)for(m=0;m<e;m++){b=p+m<<2,g=o[d+(m>>1)]>>4-4*(1&m)&15;s[b]=s[b+1]=s[b+2]=17*(15-g),s[b+3]=255}if(8==h)for(m=0;m<e;m++){b=p+m<<2,g=o[d+m];s[b]=s[b+1]=s[b+2]=255-g,s[b+3]=255}}else if(1==u)for(f=Math.ceil(h*e/8),c=0;c<r;c++){d=c*f,p=c*e;if(1==h)for(m=0;m<e;m++){b=p+m<<2,g=o[d+(m>>3)]>>7-(7&m)&1;s[b]=s[b+1]=s[b+2]=255*g,s[b+3]=255}if(2==h)for(m=0;m<e;m++){b=p+m<<2,g=o[d+(m>>2)]>>6-2*(3&m)&3;s[b]=s[b+1]=s[b+2]=85*g,s[b+3]=255}if(8==h)for(m=0;m<e;m++){b=p+m<<2,g=o[d+m];s[b]=s[b+1]=s[b+2]=g,s[b+3]=255}if(16==h)for(m=0;m<e;m++){b=p+m<<2,g=o[d+(2*m+l)];s[b]=s[b+1]=s[b+2]=Math.min(255,g),s[b+3]=255}}else if(2==u)if(8==h)if(t.t338)if(t.t338[0]>0)for(m=0;m<a;m++)s[m]=o[m];else for(m=0;m<a;m+=4)s[m]=o[m],s[m+1]=o[m+1],s[m+2]=o[m+2],s[m+3]=255;else{if(4==(w=t.t258?t.t258.length:3))for(m=0;m<a;m++)s[m]=o[m];if(3==w)for(m=0;m<i;m++){var _=3*m;s[b=m<<2]=o[_],s[b+1]=o[_+1],s[b+2]=o[_+2],s[b+3]=255}}else for(m=0;m<i;m++){_=6*m;s[b=m<<2]=o[_],s[b+1]=o[_+2],s[b+2]=o[_+4],s[b+3]=255}else if(3==u){var v=t.t320;for(m=0;m<i;m++){b=m<<2;var y=o[m];s[b]=v[y]>>8,s[b+1]=v[256+y]>>8,s[b+2]=v[512+y]>>8,s[b+3]=255}}else if(5==u){var w,x=(w=t.t258?t.t258.length:4)>4?1:0;for(m=0;m<i;m++){b=m<<2;var E=m*w,S=255-o[E],k=255-o[E+1],M=255-o[E+2],A=(255-o[E+3])*(1/255);s[b]=~~(S*A+.5),s[b+1]=~~(k*A+.5),s[b+2]=~~(M*A+.5),s[b+3]=255*(1-x)+o[E+4]*x}}else n("Unknown Photometric interpretation: "+u);return s},t.replaceIMG=function(){for(var e=document.getElementsByTagName("img"),r=0;r<e.length;r++){var i=e[r],n=i.getAttribute("src");if(null!=n){var a=n.split(".").pop().toLowerCase();if("tif"==a||"tiff"==a){var o=new XMLHttpRequest;t._xhrs.push(o),t._imgs.push(i),o.open("GET",n),o.responseType="arraybuffer",o.onload=t._imgLoaded,o.send()}}}},t._xhrs=[],t._imgs=[],t._imgLoaded=function(e){var r=e.target.response,i=t.decode(r),n=i[0];t.decodeImages(r,i);var a=t.toRGBA8(n),o=n.width,s=n.height,u=t._xhrs.indexOf(e.target),h=t._imgs[u];t._xhrs.splice(u,1),t._imgs.splice(u,1);var l=document.createElement("canvas");l.width=o,l.height=s;for(var f=l.getContext("2d"),c=f.createImageData(o,s),d=0;d<a.length;d++)c.data[d]=a[d];f.putImageData(c,0,0);var p=["style","class","id"];for(d=0;d<p.length;d++)l.setAttribute(p[d],h.getAttribute(p[d]));h.parentNode.replaceChild(l,h)},t._binBE={nextZero:function(t,e){for(;0!=t[e];)e++;return e},readUshort:function(t,e){return t[e]<<8|t[e+1]},readShort:function(e,r){var i=t._binBE.ui8;return i[0]=e[r+1],i[1]=e[r+0],t._binBE.i16[0]},readInt:function(e,r){var i=t._binBE.ui8;return i[0]=e[r+3],i[1]=e[r+2],i[2]=e[r+1],i[3]=e[r+0],t._binBE.i32[0]},readUint:function(e,r){var i=t._binBE.ui8;return i[0]=e[r+3],i[1]=e[r+2],i[2]=e[r+1],i[3]=e[r+0],t._binBE.ui32[0]},readASCII:function(t,e,r){for(var i="",n=0;n<r;n++)i+=String.fromCharCode(t[e+n]);return i},readFloat:function(e,r){for(var i=t._binBE.ui8,n=0;n<4;n++)i[n]=e[r+3-n];return t._binBE.fl32[0]},readDouble:function(e,r){for(var i=t._binBE.ui8,n=0;n<8;n++)i[n]=e[r+7-n];return t._binBE.fl64[0]},writeUshort:function(t,e,r){t[e]=r>>8&255,t[e+1]=255&r},writeUint:function(t,e,r){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=r>>0&255},writeASCII:function(t,e,r){for(var i=0;i<r.length;i++)t[e+i]=r.charCodeAt(i)},writeDouble:function(e,r,i){t._binBE.fl64[0]=i;for(var n=0;n<8;n++)e[r+n]=t._binBE.ui8[7-n]}},t._binBE.ui8=new Uint8Array(8),t._binBE.i16=new Int16Array(t._binBE.ui8.buffer),t._binBE.i32=new Int32Array(t._binBE.ui8.buffer),t._binBE.ui32=new Uint32Array(t._binBE.ui8.buffer),t._binBE.fl32=new Float32Array(t._binBE.ui8.buffer),t._binBE.fl64=new Float64Array(t._binBE.ui8.buffer),t._binLE={nextZero:t._binBE.nextZero,readUshort:function(t,e){return t[e+1]<<8|t[e]},readShort:function(e,r){var i=t._binBE.ui8;return i[0]=e[r+0],i[1]=e[r+1],t._binBE.i16[0]},readInt:function(e,r){var i=t._binBE.ui8;return i[0]=e[r+0],i[1]=e[r+1],i[2]=e[r+2],i[3]=e[r+3],t._binBE.i32[0]},readUint:function(e,r){var i=t._binBE.ui8;return i[0]=e[r+0],i[1]=e[r+1],i[2]=e[r+2],i[3]=e[r+3],t._binBE.ui32[0]},readASCII:t._binBE.readASCII,readFloat:function(e,r){for(var i=t._binBE.ui8,n=0;n<4;n++)i[n]=e[r+n];return t._binBE.fl32[0]},readDouble:function(e,r){for(var i=t._binBE.ui8,n=0;n<8;n++)i[n]=e[r+n];return t._binBE.fl64[0]}},t._copyTile=function(t,e,r,i,n,a,o,s){for(var u=Math.min(e,n-o),h=Math.min(r,a-s),l=0;l<h;l++)for(var f=(s+l)*n+o,c=l*e,d=0;d<u;d++)i[f+d]=t[c+d]}}(i,"function"==typeof t?t("pako"):self.pako)}()}).call(this,t("_process"))},{_process:133,pako:86}],183:[function(t,e,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(t){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(t,e){if(r("noDeprecation"))return t;var i=!1;return function(){if(!i){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:void 0!==window?window:{})},{}],184:[function(t,e,r){arguments[4][26][0].apply(r,arguments)},{dup:26}],185:[function(t,e,r){arguments[4][27][0].apply(r,arguments)},{dup:27}],186:[function(t,e,r){arguments[4][28][0].apply(r,arguments)},{"./support/isBuffer":185,_process:133,dup:28,inherits:184}],187:[function(t,e,r){"use strict";var i=t("global/window"),n=t("is-function"),a=t("parse-headers"),o=t("xtend");function s(t,e,r){var i=t;return n(e)?(r=e,"string"==typeof t&&(i={uri:t})):i=o(e,{uri:t}),i.callback=r,i}function u(t,e,r){return h(e=s(t,e,r))}function h(t){if(void 0===t.callback)throw new Error("callback argument missing");var e=!1,r=function(r,i,n){e||(e=!0,t.callback(r,i,n))};function i(){var t=void 0;if(t=l.response?l.response:l.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!e)return t.responseXML}catch(t){}return null}(l),g)try{t=JSON.parse(t)}catch(t){}return t}function n(t){return clearTimeout(f),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,r(t,_)}function o(){if(!h){var e;clearTimeout(f),e=t.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var n=_,o=null;return 0!==e?(n={body:i(),statusCode:e,method:d,headers:{},url:c,rawRequest:l},l.getAllResponseHeaders&&(n.headers=a(l.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),r(o,n,n.body)}}var s,h,l=t.xhr||null;l||(l=t.cors||t.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var f,c=l.url=t.uri||t.url,d=l.method=t.method||"GET",p=t.body||t.data,m=l.headers=t.headers||{},b=!!t.sync,g=!1,_={body:void 0,headers:{},statusCode:0,method:d,url:c,rawRequest:l};if("json"in t&&!1!==t.json&&(g=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),p=JSON.stringify(!0===t.json?p:t.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(o,0)},l.onload=o,l.onerror=n,l.onprogress=function(){},l.onabort=function(){h=!0},l.ontimeout=n,l.open(d,c,!b,t.username,t.password),b||(l.withCredentials=!!t.withCredentials),!b&&t.timeout>0&&(f=setTimeout((function(){if(!h){h=!0,l.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",n(t)}}),t.timeout)),l.setRequestHeader)for(s in m)m.hasOwnProperty(s)&&l.setRequestHeader(s,m[s]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(p||null),l}e.exports=u,e.exports.default=u,u.XMLHttpRequest=i.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:i.XDomainRequest,function(t,e){for(var r=0;r<t.length;r++)e(t[r])}(["get","put","post","patch","head","delete"],(function(t){u["delete"===t?"del":t]=function(e,r,i){return(r=s(e,r,i)).method=t.toUpperCase(),h(r)}}))},{"global/window":71,"is-function":78,"parse-headers":106,xtend:189}],188:[function(t,e,r){e.exports=void 0!==self.DOMParser?function(t){return(new self.DOMParser).parseFromString(t,"application/xml")}:void 0!==self.ActiveXObject&&new self.ActiveXObject("Microsoft.XMLDOM")?function(t){var e=new self.ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e}:function(t){var e=document.createElement("div");return e.innerHTML=t,e}},{}],189:[function(t,e,r){e.exports=function(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var n in r)i.call(r,n)&&(t[n]=r[n])}return t};var i=Object.prototype.hasOwnProperty},{}],190:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.srcOver=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var i=e.a+t.a-e.a*t.a,n=(t.r*t.a+e.r*e.a*(1-t.a))/i,a=(t.g*t.a+e.g*e.a*(1-t.a))/i,o=(t.b*t.a+e.b*e.a*(1-t.a))/i;return{r:n,g:a,b:o,a:i}},r.dstOver=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var i=e.a+t.a-e.a*t.a,n=(e.r*e.a+t.r*t.a*(1-e.a))/i,a=(e.g*e.a+t.g*t.a*(1-e.a))/i,o=(e.b*e.a+t.b*t.a*(1-e.a))/i;return{r:n,g:a,b:o,a:i}},r.multiply=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var i=e.a+t.a-e.a*t.a,n=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,u=e.g*e.a,h=e.b*e.a,l=(n*s+n*(1-e.a)+s*(1-t.a))/i,f=(a*u+a*(1-e.a)+u*(1-t.a))/i,c=(o*h+o*(1-e.a)+h*(1-t.a))/i;return{r:l,g:f,b:c,a:i}},r.add=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var i=e.a+t.a-e.a*t.a,n=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,u=e.g*e.a,h=e.b*e.a,l=(n+s)/i,f=(a+u)/i,c=(o+h)/i;return{r:l,g:f,b:c,a:i}},r.screen=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var i=e.a+t.a-e.a*t.a,n=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,u=e.g*e.a,h=e.b*e.a,l=(n*e.a+s*t.a-n*s+n*(1-e.a)+s*(1-t.a))/i,f=(a*e.a+u*t.a-a*u+a*(1-e.a)+u*(1-t.a))/i,c=(o*e.a+h*t.a-o*h+o*(1-e.a)+h*(1-t.a))/i;return{r:l,g:f,b:c,a:i}},r.overlay=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var i=e.a+t.a-e.a*t.a,n=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,u=e.g*e.a,h=e.b*e.a,l=(2*s<=e.a?2*n*s+n*(1-e.a)+s*(1-t.a):n*(1+e.a)+s*(1+t.a)-2*s*n-e.a*t.a)/i,f=(2*u<=e.a?2*a*u+a*(1-e.a)+u*(1-t.a):a*(1+e.a)+u*(1+t.a)-2*u*a-e.a*t.a)/i,c=(2*h<=e.a?2*o*h+o*(1-e.a)+h*(1-t.a):o*(1+e.a)+h*(1+t.a)-2*h*o-e.a*t.a)/i;return{r:l,g:f,b:c,a:i}},r.darken=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var i=e.a+t.a-e.a*t.a,n=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,u=e.g*e.a,h=e.b*e.a,l=(Math.min(n*e.a,s*t.a)+n*(1-e.a)+s*(1-t.a))/i,f=(Math.min(a*e.a,u*t.a)+a*(1-e.a)+u*(1-t.a))/i,c=(Math.min(o*e.a,h*t.a)+o*(1-e.a)+h*(1-t.a))/i;return{r:l,g:f,b:c,a:i}},r.lighten=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var i=e.a+t.a-e.a*t.a,n=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,u=e.g*e.a,h=e.b*e.a,l=(Math.max(n*e.a,s*t.a)+n*(1-e.a)+s*(1-t.a))/i,f=(Math.max(a*e.a,u*t.a)+a*(1-e.a)+u*(1-t.a))/i,c=(Math.max(o*e.a,h*t.a)+o*(1-e.a)+h*(1-t.a))/i;return{r:l,g:f,b:c,a:i}},r.hardLight=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var i=e.a+t.a-e.a*t.a,n=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,u=e.g*e.a,h=e.b*e.a,l=(2*n<=t.a?2*n*s+n*(1-e.a)+s*(1-t.a):n*(1+e.a)+s*(1+t.a)-2*s*n-e.a*t.a)/i,f=(2*a<=t.a?2*a*u+a*(1-e.a)+u*(1-t.a):a*(1+e.a)+u*(1+t.a)-2*u*a-e.a*t.a)/i,c=(2*o<=t.a?2*o*h+o*(1-e.a)+h*(1-t.a):o*(1+e.a)+h*(1+t.a)-2*h*o-e.a*t.a)/i;return{r:l,g:f,b:c,a:i}},r.difference=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var i=e.a+t.a-e.a*t.a,n=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,u=e.g*e.a,h=e.b*e.a,l=(n+s-2*Math.min(n*e.a,s*t.a))/i,f=(a+u-2*Math.min(a*e.a,u*t.a))/i,c=(o+h-2*Math.min(o*e.a,h*t.a))/i;return{r:l,g:f,b:c,a:i}},r.exclusion=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var i=e.a+t.a-e.a*t.a,n=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,u=e.g*e.a,h=e.b*e.a,l=(n*e.a+s*t.a-2*n*s+n*(1-e.a)+s*(1-t.a))/i,f=(a*e.a+u*t.a-2*a*u+a*(1-e.a)+u*(1-t.a))/i,c=(o*e.a+h*t.a-2*o*h+o*(1-e.a)+h*(1-t.a))/i;return{r:l,g:f,b:c,a:i}}},{}],191:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4?arguments[4]:void 0;"function"==typeof i&&(s=i,i={});if(!(t instanceof this.constructor))return n.throwError.call(this,"The source must be a Jimp image",s);if("number"!=typeof e||"number"!=typeof r)return n.throwError.call(this,"x and y must be numbers",s);var u=i,h=u.mode,l=u.opacitySource,f=u.opacityDest;h||(h=a.BLEND_SOURCE_OVER);("number"!=typeof l||l<0||l>1)&&(l=1);("number"!=typeof f||f<0||f>1)&&(f=1);var c=o[h];e=Math.round(e),r=Math.round(r);var d=this;1!==f&&d.opacity(f);t.scanQuiet(0,0,t.bitmap.width,t.bitmap.height,(function(t,i,n){var o=d.getPixelIndex(e+t,r+i,a.EDGE_CROP),s=c({r:this.bitmap.data[n+0]/255,g:this.bitmap.data[n+1]/255,b:this.bitmap.data[n+2]/255,a:this.bitmap.data[n+3]/255},{r:d.bitmap.data[o+0]/255,g:d.bitmap.data[o+1]/255,b:d.bitmap.data[o+2]/255,a:d.bitmap.data[o+3]/255},l);d.bitmap.data[o+0]=this.constructor.limit255(255*s.r),d.bitmap.data[o+1]=this.constructor.limit255(255*s.g),d.bitmap.data[o+2]=this.constructor.limit255(255*s.b),d.bitmap.data[o+3]=this.constructor.limit255(255*s.a)})),(0,n.isNodePattern)(s)&&s.call(this,null,this);return this};var n=t("@jimp/utils"),a=i(t("../constants")),o=i(t("./composite-modes"));e.exports=r.default},{"../constants":192,"./composite-modes":190,"@babel/runtime/helpers/interopRequireWildcard":12,"@jimp/utils":235}],192:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.EDGE_CROP=r.EDGE_WRAP=r.EDGE_EXTEND=r.BLEND_EXCLUSION=r.BLEND_DIFFERENCE=r.BLEND_HARDLIGHT=r.BLEND_LIGHTEN=r.BLEND_DARKEN=r.BLEND_OVERLAY=r.BLEND_SCREEN=r.BLEND_ADD=r.BLEND_MULTIPLY=r.BLEND_DESTINATION_OVER=r.BLEND_SOURCE_OVER=r.VERTICAL_ALIGN_BOTTOM=r.VERTICAL_ALIGN_MIDDLE=r.VERTICAL_ALIGN_TOP=r.HORIZONTAL_ALIGN_RIGHT=r.HORIZONTAL_ALIGN_CENTER=r.HORIZONTAL_ALIGN_LEFT=r.AUTO=void 0;r.AUTO=-1;r.HORIZONTAL_ALIGN_LEFT=1;r.HORIZONTAL_ALIGN_CENTER=2;r.HORIZONTAL_ALIGN_RIGHT=4;r.VERTICAL_ALIGN_TOP=8;r.VERTICAL_ALIGN_MIDDLE=16;r.VERTICAL_ALIGN_BOTTOM=32;r.BLEND_SOURCE_OVER="srcOver";r.BLEND_DESTINATION_OVER="dstOver";r.BLEND_MULTIPLY="multiply";r.BLEND_ADD="add";r.BLEND_SCREEN="screen";r.BLEND_OVERLAY="overlay";r.BLEND_DARKEN="darken";r.BLEND_LIGHTEN="lighten";r.BLEND_HARDLIGHT="hardLight";r.BLEND_DIFFERENCE="difference";r.BLEND_EXCLUSION="exclusion";r.EDGE_EXTEND=1;r.EDGE_WRAP=2;r.EDGE_CROP=3},{}],193:[function(t,e,r){(function(e){"use strict";var i=t("@babel/runtime/helpers/interopRequireWildcard"),n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.addConstants=q,r.addJimpMethods=W,r.jimpEvMethod=Z,r.jimpEvChange=Y,Object.defineProperty(r,"addType",{enumerable:!0,get:function(){return A.addType}}),r.default=void 0;for(var a=n(t("@babel/runtime/helpers/construct")),o=n(t("@babel/runtime/helpers/slicedToArray")),s=n(t("@babel/runtime/helpers/classCallCheck")),u=n(t("@babel/runtime/helpers/createClass")),h=n(t("@babel/runtime/helpers/possibleConstructorReturn")),l=n(t("@babel/runtime/helpers/getPrototypeOf")),f=n(t("@babel/runtime/helpers/assertThisInitialized")),c=n(t("@babel/runtime/helpers/inherits")),d=n(t("@babel/runtime/helpers/defineProperty")),p=n(t("@babel/runtime/helpers/typeof")),m=n(t("fs")),b=n(t("path")),g=n(t("events")),_=t("@jimp/utils"),v=n(t("any-base")),y=n(t("mkdirp")),w=n(t("pixelmatch")),x=n(t("tinycolor2")),E=n(t("./modules/phash")),S=n(t("./request")),k=n(t("./composite")),M=n(t("./utils/promisify")),A=i(t("./utils/mime")),I=t("./utils/image-bitmap"),T=i(t("./constants")),R="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",P=[NaN,NaN],C=2;C<65;C++){var O=(0,v.default)(v.default.BIN,R.slice(0,C))(new Array(65).join("1"));P.push(O.length)}function L(){}function B(t){return Object.prototype.toString.call(t).toLowerCase().indexOf("arraybuffer")>-1}function D(t){for(var r=e.alloc(t.byteLength),i=new Uint8Array(t),n=0;n<r.length;++n)r[n]=i[n];return r}function N(t,r){(0,S.default)(t,(function(i,n,a){if(i)return r(i);if("headers"in n&&"location"in n.headers)return t.url=n.headers.location,N(t,r);if("object"===(0,p.default)(a)&&e.isBuffer(a))return r(null,a);var o="Could not load Buffer from <"+t.url+"> (HTTP: "+n.statusCode+")";return new Error(o)}))}function z(t,e){m.default&&"function"==typeof m.default.readFile&&!t.match(/^(http|ftp)s?:\/\/./)?m.default.readFile(t,e):N({url:t},e)}function j(t){return t&&"object"===(0,p.default)(t)&&"number"==typeof t.width&&"number"==typeof t.height&&(e.isBuffer(t.data)||t.data instanceof Uint8Array||"function"==typeof Uint8ClampedArray&&t.data instanceof Uint8ClampedArray)&&(t.data.length===t.width*t.height*4||t.data.length===t.width*t.height*3)}function U(t){if(t.length%3!=0)throw new Error("Buffer length is incorrect");for(var r=e.allocUnsafe(t.length/3*4),i=0,n=0;n<t.length;n++)r[i]=t[n],(n+1)%3==0&&(r[++i]=255),i++;return r}var F,G={data:null,width:null,height:null},H=function(t){function r(){for(var t,i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];(0,s.default)(this,r),t=(0,h.default)(this,(0,l.default)(r).call(this)),(0,d.default)((0,f.default)(t),"bitmap",G),(0,d.default)((0,f.default)(t),"_background",0),(0,d.default)((0,f.default)(t),"_originalMime",r.MIME_PNG),(0,d.default)((0,f.default)(t),"_exif",null),(0,d.default)((0,f.default)(t),"_rgba",!0),(0,d.default)((0,f.default)(t),"writeAsync",(function(e){return(0,M.default)(t.write,(0,f.default)(t),e)})),(0,d.default)((0,f.default)(t),"getBase64Async",(function(e){return(0,M.default)(t.getBase64,(0,f.default)(t),e)})),(0,d.default)((0,f.default)(t),"getBuffer",I.getBuffer),(0,d.default)((0,f.default)(t),"getBufferAsync",I.getBufferAsync),(0,d.default)((0,f.default)(t),"getPixelColour",t.getPixelColor),(0,d.default)((0,f.default)(t),"setPixelColour",t.setPixelColor);var o=(0,f.default)(t),u=L;function c(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=e[0],n=i||{};n.methodName="constructor",setTimeout((function(){var t;i&&u===L?o.emitError("constructor",i):i||o.emitMulti("constructor","initialized"),(t=u).call.apply(t,[o].concat(e))}),1)}if(B(n[0])&&(n[0]=D(n[0])),"number"==typeof n[0]&&"number"==typeof n[1]||parseInt(n[0],10)&&parseInt(n[1],10)){var m=parseInt(n[0],10),b=parseInt(n[1],10);if(u=n[2],"number"==typeof n[2]&&(t._background=n[2],u=n[3]),"string"==typeof n[2]&&(t._background=r.cssColorToHex(n[2]),u=n[3]),void 0===u&&(u=L),"function"!=typeof u)return(0,h.default)(t,_.throwError.call((0,f.default)(t),"cb must be a function",c));t.bitmap={data:e.alloc(m*b*4),width:m,height:b};for(var g=0;g<t.bitmap.data.length;g+=4)t.bitmap.data.writeUInt32BE(t._background,g);c(null,(0,f.default)(t))}else if("object"===(0,p.default)(n[0])&&n[0].url){if("function"!=typeof(u=n[1]||L))return(0,h.default)(t,_.throwError.call((0,f.default)(t),"cb must be a function",c));N(n[0],(function(e,r){if(e)return _.throwError.call((0,f.default)(t),e,c);t.parseBitmap(r,n[0].url,c)}))}else if(n[0]instanceof r){var v=n[0];if(void 0===(u=n[1])&&(u=L),"function"!=typeof u)return(0,h.default)(t,_.throwError.call((0,f.default)(t),"cb must be a function",c));t.bitmap={data:e.from(v.bitmap.data),width:v.bitmap.width,height:v.bitmap.height},t._quality=v._quality,t._deflateLevel=v._deflateLevel,t._deflateStrategy=v._deflateStrategy,t._filterType=v._filterType,t._rgba=v._rgba,t._background=v._background,t._originalMime=v._originalMime,c(null,(0,f.default)(t))}else if(j(n[0])){var y=n[0];u=n[1]||L;var w=y.width*y.height*4===y.data.length,x=w?e.from(y.data):U(y.data);t.bitmap={data:x,width:y.width,height:y.height},c(null,(0,f.default)(t))}else if("string"==typeof n[0]){var E=n[0];if(void 0===(u=n[1])&&(u=L),"function"!=typeof u)return(0,h.default)(t,_.throwError.call((0,f.default)(t),"cb must be a function",c));z(E,(function(e,r){if(e)return _.throwError.call((0,f.default)(t),e,c);t.parseBitmap(r,E,c)}))}else if("object"===(0,p.default)(n[0])&&e.isBuffer(n[0])){var S=n[0];if("function"!=typeof(u=n[1]))return(0,h.default)(t,_.throwError.call((0,f.default)(t),"cb must be a function",c));t.parseBitmap(S,null,c)}else{"function"!=typeof(u=n[n.length-1])&&"function"!=typeof(u=n[n.length-2])&&(u=L);var k=r.__extraConstructors.find((function(t){return t.test.apply(t,n)}));if(!k)return(0,h.default)(t,_.throwError.call((0,f.default)(t),"No matching constructor overloading was found. Please see the docs for how to call the Jimp constructor.",c));new Promise((function(e,r){var i;return(i=k.run).call.apply(i,[(0,f.default)(t),e,r].concat(n))})).then((function(){return c(null,(0,f.default)(t))})).catch(c)}return t}return(0,c.default)(r,t),(0,u.default)(r,[{key:"parseBitmap",value:function(t,e,r){I.parseBitmap.call(this,t,null,r)}},{key:"rgba",value:function(t,e){return"boolean"!=typeof t?_.throwError.call(this,"bool must be a boolean, true for RGBA or false for RGB",e):(this._rgba=t,(0,_.isNodePattern)(e)&&e.call(this,null,this),this)}},{key:"emitMulti",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=Object.assign(r,{methodName:t,eventName:e}),this.emit("any",r),t&&this.emit(t,r),this.emit(e,r)}},{key:"emitError",value:function(t,e){this.emitMulti(t,"error",e)}},{key:"getHeight",value:function(){return this.bitmap.height}},{key:"getWidth",value:function(){return this.bitmap.width}},{key:"inspect",value:function(){return"<Jimp "+(this.bitmap===G?"pending...":this.bitmap.width+"x"+this.bitmap.height)+">"}},{key:"toString",value:function(){return"[object Jimp]"}},{key:"getMIME",value:function(){return this._originalMime||r.MIME_PNG}},{key:"getExtension",value:function(){var t=this.getMIME();return A.getExtension(t)}},{key:"write",value:function(t,e){var r=this;if(!m.default||!m.default.createWriteStream)throw new Error("Cant access the filesystem. You can use the getBase64 method.");if("string"!=typeof t)return _.throwError.call(this,"path must be a string",e);if(void 0===e&&(e=L),"function"!=typeof e)return _.throwError.call(this,"cb must be a function",e);var i=A.getType(t)||this.getMIME(),n=b.default.parse(t);return n.dir&&y.default.sync(n.dir),this.getBuffer(i,(function(i,n){if(i)return _.throwError.call(r,i,e);var a=m.default.createWriteStream(t);a.on("open",(function(){a.write(n),a.end()})).on("error",(function(t){return _.throwError.call(r,t,e)})),a.on("finish",(function(){e.call(r,null,r)}))})),this}},{key:"getBase64",value:function(t,e){return t===r.AUTO&&(t=this.getMIME()),"string"!=typeof t?_.throwError.call(this,"mime must be a string",e):"function"!=typeof e?_.throwError.call(this,"cb must be a function",e):(this.getBuffer(t,(function(r,i){if(r)return _.throwError.call(this,r,e);var n="data:"+t+";base64,"+i.toString("base64");e.call(this,null,n)})),this)}},{key:"hash",value:function(t,e){if("function"==typeof(t=t||64)&&(e=t,t=64),"number"!=typeof t)return _.throwError.call(this,"base must be a number",e);if(t<2||t>64)return _.throwError.call(this,"base must be a number between 2 and 64",e);var r=this.pHash();for(r=(0,v.default)(v.default.BIN,R.slice(0,t))(r);r.length<P[t];)r="0"+r;return(0,_.isNodePattern)(e)&&e.call(this,null,r),r}},{key:"pHash",value:function(){var t=new E.default;return t.getHash(this)}},{key:"distanceFromHash",value:function(t){var e=new E.default,r=e.getHash(this);return e.distance(r,t)}},{key:"getPixelIndex",value:function(t,e,i,n){var a,o;if("function"==typeof i&&void 0===n&&(n=i,i=null),i||(i=r.EDGE_EXTEND),"number"!=typeof t||"number"!=typeof e)return _.throwError.call(this,"x and y must be numbers",n);a=t=Math.round(t),o=e=Math.round(e),i===r.EDGE_EXTEND&&(t<0&&(a=0),t>=this.bitmap.width&&(a=this.bitmap.width-1),e<0&&(o=0),e>=this.bitmap.height&&(o=this.bitmap.height-1)),i===r.EDGE_WRAP&&(t<0&&(a=this.bitmap.width+t),t>=this.bitmap.width&&(a=t%this.bitmap.width),e<0&&(a=this.bitmap.height+e),e>=this.bitmap.height&&(o=e%this.bitmap.height));var s=this.bitmap.width*o+a<<2;return(a<0||a>=this.bitmap.width)&&(s=-1),(o<0||o>=this.bitmap.height)&&(s=-1),(0,_.isNodePattern)(n)&&n.call(this,null,s),s}},{key:"getPixelColor",value:function(t,e,r){if("number"!=typeof t||"number"!=typeof e)return _.throwError.call(this,"x and y must be numbers",r);t=Math.round(t),e=Math.round(e);var i=this.getPixelIndex(t,e),n=this.bitmap.data.readUInt32BE(i);return(0,_.isNodePattern)(r)&&r.call(this,null,n),n}},{key:"setPixelColor",value:function(t,e,r,i){if("number"!=typeof t||"number"!=typeof e||"number"!=typeof r)return _.throwError.call(this,"hex, x and y must be numbers",i);e=Math.round(e),r=Math.round(r);var n=this.getPixelIndex(e,r);return this.bitmap.data.writeUInt32BE(t,n),(0,_.isNodePattern)(i)&&i.call(this,null,this),this}},{key:"hasAlpha",value:function(){for(var t=0;t<this.bitmap.height;t++)for(var e=0;e<this.bitmap.width;e++){var r=this.bitmap.width*t+e<<2;if(255!==this.bitmap.data[r+3])return!0}return!1}},{key:"scanIterator",value:function(t,e,r,i){return"number"!=typeof t||"number"!=typeof e?_.throwError.call(this,"x and y must be numbers"):"number"!=typeof r||"number"!=typeof i?_.throwError.call(this,"w and h must be numbers"):(0,_.scanIterator)(this,t,e,r,i)}}]),r}(g.default);function q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H;Object.entries(t).forEach((function(t){var r=(0,o.default)(t,2),i=r[0],n=r[1];e[i]=n}))}function W(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H;Object.entries(t).forEach((function(t){var r=(0,o.default)(t,2),i=r[0],n=r[1];e.prototype[i]=n}))}function Z(t,e,r){var i="before-"+e,n=e.replace(/e$/,"")+"ed";H.prototype[t]=function(){for(var e,a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var u,h=o[r.length-1],l=this;"function"==typeof h?(e=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var a=r[0],o=r[1];a?l.emitError(t,a):l.emitMulti(t,n,(0,d.default)({},t,o)),h.apply(this,r)},o[o.length-1]=e):e=!1,this.emitMulti(t,i);try{u=r.apply(this,o),e||this.emitMulti(t,n,(0,d.default)({},t,u))}catch(e){e.methodName=t,this.emitError(t,e)}return u},H.prototype[t+"Quiet"]=r}function Y(t,e){Z(t,"change",e)}q(T),W({composite:k.default}),H.__extraConstructors=[],H.appendConstructorOption=function(t,e,r){H.__extraConstructors.push({name:t,test:e,run:r})},H.read=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return new Promise((function(t,r){(0,a.default)(H,e.concat([function(e,i){e?r(e):t(i)}]))}))},H.create=H.read,H.rgbaToInt=function(t,e,r,i,n){if("number"!=typeof t||"number"!=typeof e||"number"!=typeof r||"number"!=typeof i)return _.throwError.call(this,"r, g, b and a must be numbers",n);if(t<0||t>255)return _.throwError.call(this,"r must be between 0 and 255",n);if((e<0||e>255)&&_.throwError.call(this,"g must be between 0 and 255",n),r<0||r>255)return _.throwError.call(this,"b must be between 0 and 255",n);if(i<0||i>255)return _.throwError.call(this,"a must be between 0 and 255",n);t=Math.round(t),r=Math.round(r),e=Math.round(e),i=Math.round(i);var a=t*Math.pow(256,3)+e*Math.pow(256,2)+r*Math.pow(256,1)+i*Math.pow(256,0);return(0,_.isNodePattern)(n)&&n.call(this,null,a),a},H.intToRGBA=function(t,e){if("number"!=typeof t)return _.throwError.call(this,"i must be a number",e);var r={};return r.r=Math.floor(t/Math.pow(256,3)),r.g=Math.floor((t-r.r*Math.pow(256,3))/Math.pow(256,2)),r.b=Math.floor((t-r.r*Math.pow(256,3)-r.g*Math.pow(256,2))/Math.pow(256,1)),r.a=Math.floor((t-r.r*Math.pow(256,3)-r.g*Math.pow(256,2)-r.b*Math.pow(256,1))/Math.pow(256,0)),(0,_.isNodePattern)(e)&&e.call(this,null,r),r},H.cssColorToHex=function(t){return"number"==typeof(t=t||0)?Number(t):parseInt((0,x.default)(t).toHex8(),16)},H.limit255=function(t){return t=Math.max(t,0),t=Math.min(t,255)},H.diff=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1;if(!(t instanceof H&&e instanceof H))return _.throwError.call(this,"img1 and img2 must be an Jimp images");var i=t.bitmap,n=e.bitmap;if(i.width===n.width&&i.height===n.height||(i.width*i.height>n.width*n.height?t=t.cloneQuiet().resize(n.width,n.height):e=e.cloneQuiet().resize(i.width,i.height)),"number"!=typeof r||r<0||r>1)return _.throwError.call(this,"threshold must be a number between 0 and 1");var a=new H(i.width,i.height,4294967295),o=(0,w.default)(i.data,n.data,a.bitmap.data,a.bitmap.width,a.bitmap.height,{threshold:r});return{percent:o/(a.bitmap.width*a.bitmap.height),image:a}},H.distance=function(t,e){var r=new E.default,i=r.getHash(t),n=r.getHash(e);return r.distance(i,n)},H.compareHashes=function(t,e){return(new E.default).distance(t,e)},H.colorDiff=function(t,e){var r=function(t){return Math.pow(t,2)},i=Math.max;return 0===t.a||t.a||(t.a=255),0===e.a||e.a||(e.a=255),(i(r(t.r-e.r),r(t.r-e.r-t.a+e.a))+i(r(t.g-e.g),r(t.g-e.g-t.a+e.a))+i(r(t.b-e.b),r(t.b-e.b-t.a+e.a)))/195075},Z("clone","clone",(function(t){var e=new H(this);return(0,_.isNodePattern)(t)&&t.call(e,null,e),e})),Y("background",(function(t,e){return"number"!=typeof t?_.throwError.call(this,"hex must be a hexadecimal rgba value",e):(this._background=t,(0,_.isNodePattern)(e)&&e.call(this,null,this),this)})),Y("scan",(function(t,e,r,i,n,a){if("number"!=typeof t||"number"!=typeof e)return _.throwError.call(this,"x and y must be numbers",a);if("number"!=typeof r||"number"!=typeof i)return _.throwError.call(this,"w and h must be numbers",a);if("function"!=typeof n)return _.throwError.call(this,"f must be a function",a);var o=(0,_.scan)(this,t,e,r,i,n);return(0,_.isNodePattern)(a)&&a.call(this,null,o),o})),void 0!==window&&"object"===(void 0===window?"undefined":(0,p.default)(window))&&(F=window),"undefined"!=typeof self&&"object"===("undefined"==typeof self?"undefined":(0,p.default)(self))&&(F=self),F.Jimp=H,F.Buffer=e;var V=H;r.default=V}).call(this,t("buffer").Buffer)},{"./composite":191,"./constants":192,"./modules/phash":194,"./request":195,"./utils/image-bitmap":196,"./utils/mime":197,"./utils/promisify":198,"@babel/runtime/helpers/assertThisInitialized":3,"@babel/runtime/helpers/classCallCheck":4,"@babel/runtime/helpers/construct":5,"@babel/runtime/helpers/createClass":6,"@babel/runtime/helpers/defineProperty":7,"@babel/runtime/helpers/getPrototypeOf":9,"@babel/runtime/helpers/inherits":10,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/interopRequireWildcard":12,"@babel/runtime/helpers/possibleConstructorReturn":17,"@babel/runtime/helpers/slicedToArray":19,"@babel/runtime/helpers/typeof":21,"@jimp/utils":235,"any-base":23,buffer:48,events:52,fs:47,mkdirp:83,path:107,pixelmatch:109,tinycolor2:178}],194:[function(t,e,r){"use strict";function i(t,e){this.size=this.size||t,this.smallerSize=this.smallerSize||e,function(t){for(var e=1;e<t;e++)a[e]=1;a[0]=1/Math.sqrt(2)}(this.size)}function n(t){var e={};return e.r=Math.floor(t/Math.pow(256,3)),e.g=Math.floor((t-e.r*Math.pow(256,3))/Math.pow(256,2)),e.b=Math.floor((t-e.r*Math.pow(256,3)-e.g*Math.pow(256,2))/Math.pow(256,1)),e.a=Math.floor((t-e.r*Math.pow(256,3)-e.g*Math.pow(256,2)-e.b*Math.pow(256,1))/Math.pow(256,0)),e}i.prototype.size=32,i.prototype.smallerSize=8,i.prototype.distance=function(t,e){for(var r=0,i=0;i<t.length;i++)t[i]!==e[i]&&r++;return r/t.length},i.prototype.getHash=function(t){(t=t.clone().resize(this.size,this.size)).grayscale();for(var e=[],r=0;r<t.bitmap.width;r++){e[r]=[];for(var i=0;i<t.bitmap.height;i++)e[r][i]=n(t.getPixelColor(r,i)).b}for(var o=function(t,e){for(var r=e,i=[],n=0;n<r;n++){i[n]=[];for(var o=0;o<r;o++){for(var s=0,u=0;u<r;u++)for(var h=0;h<r;h++)s+=Math.cos((2*u+1)/(2*r)*n*Math.PI)*Math.cos((2*h+1)/(2*r)*o*Math.PI)*t[u][h];s*=a[n]*a[o]/4,i[n][o]=s}}return i}(e,this.size),s=0,u=0;u<this.smallerSize;u++)for(var h=0;h<this.smallerSize;h++)s+=o[u][h];for(var l=s/(this.smallerSize*this.smallerSize),f="",c=0;c<this.smallerSize;c++)for(var d=0;d<this.smallerSize;d++)f+=o[c][d]>l?"1":"0";return f};var a=[];e.exports=i},{}],195:[function(t,e,r){(function(r,i){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");n(t("@babel/runtime/helpers/defineProperty")),n(t("@babel/runtime/helpers/extends"));r.browser,e.exports=function(t,e){var r=new XMLHttpRequest;r.open("GET",t.url,!0),r.responseType="arraybuffer",r.addEventListener("load",(function(){if(r.status<400)try{var n=i.from(this.response);e(null,r,n)}catch(r){return e(new Error("Response is not a buffer for url "+t.url+". Error: "+r.message))}else e(new Error("HTTP Status "+r.status+" for url "+t.url))})),r.addEventListener("error",(function(t){e(t)})),r.send()}}).call(this,t("_process"),t("buffer").Buffer)},{"@babel/runtime/helpers/defineProperty":7,"@babel/runtime/helpers/extends":8,"@babel/runtime/helpers/interopRequireDefault":11,_process:133,buffer:48,phin:108}],196:[function(t,e,r){(function(e){"use strict";var i=t("@babel/runtime/helpers/interopRequireWildcard"),n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.parseBitmap=function(t,r,i){var n=function(t,e){var r=(0,o.default)(t);if(r)return r.mime;if(e)return l.getType(e);return null}(t,r);if("string"!=typeof n)return i(new Error("Could not find MIME for Buffer <"+r+">"));this._originalMime=n.toLowerCase();try{var h=this.getMIME();if(!this.constructor.decoders[h])return u.throwError.call(this,"Unsupported MIME type: "+h,i);this.bitmap=this.constructor.decoders[h](t)}catch(t){return i.call(this,t,this)}try{this._exif=s.default.create(t).parse(),function(t){if(c(t)<2)return;var r=function(t){var e=t.getWidth(),r=t.getHeight();switch(c(t)){case 1:return null;case 2:return function(t,r){return[e-t-1,r]};case 3:return function(t,i){return[e-t-1,r-i-1]};case 4:return function(t,e){return[t,r-e-1]};case 5:return function(t,e){return[e,t]};case 6:return function(t,e){return[e,r-t-1]};case 7:return function(t,i){return[e-i-1,r-t-1]};case 8:return function(t,r){return[e-r-1,t]};default:return null}}(t),i=c(t)>4,n=i?t.bitmap.height:t.bitmap.width,o=i?t.bitmap.width:t.bitmap.height;!function(t,r,i,n){for(var o=t.bitmap.data,s=t.bitmap.width,u=e.alloc(o.length),h=0;h<r;h++)for(var l=0;l<i;l++){var f=n(h,l),c=(0,a.default)(f,2),d=c[0],p=r*l+h<<2,m=s*c[1]+d<<2,b=o.readUInt32BE(m);u.writeUInt32BE(b,p)}t.bitmap.data=u,t.bitmap.width=r,t.bitmap.height=i}(t,n,o,r)}(this)}catch(t){}return i.call(this,null,this),this},r.getBuffer=d,r.getBufferAsync=function(t){return(0,f.default)(d,this,t)};var a=n(t("@babel/runtime/helpers/slicedToArray")),o=n(t("file-type")),s=n(t("exif-parser")),u=t("@jimp/utils"),h=i(t("../constants")),l=i(t("./mime")),f=n(t("./promisify"));function c(t){return t._exif&&t._exif.tags&&t._exif.tags.Orientation||1}function d(t,r){if(t===h.AUTO&&(t=this.getMIME()),"string"!=typeof t)return u.throwError.call(this,"mime must be a string",r);if("function"!=typeof r)return u.throwError.call(this,"cb must be a function",r);var i,n;if(t=t.toLowerCase(),this._rgba&&this.constructor.hasAlpha[t]?this.bitmap.data=e.from(this.bitmap.data):this.bitmap.data=(i=this.constructor,n=this,new i(n.bitmap.width,n.bitmap.height,n._background).composite(n,0,0).bitmap).data,this.constructor.encoders[t]){var a=this.constructor.encoders[t](this);r.call(this,null,a)}else r.call(this,"Unsupported MIME type: "+t);return this}}).call(this,t("buffer").Buffer)},{"../constants":192,"./mime":197,"./promisify":198,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/interopRequireWildcard":12,"@babel/runtime/helpers/slicedToArray":19,"@jimp/utils":235,buffer:48,"exif-parser":53,"file-type":62}],197:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getExtension=r.getType=r.addType=void 0;var i={};r.addType=function(t,e){i[t]=e};r.getType=function(t){var e=t.split("/").slice(-1);return function(t){return Object.entries(i).find((function(e){return e[1].includes(t)}))||[]}(e[e.length-1].split(".").pop())[0]};r.getExtension=function(t){return(i[t.toLowerCase()]||[])[0]}},{}],198:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),n=2;n<r;n++)i[n-2]=arguments[n];return new Promise((function(r,n){i.push((function(t,e){t&&n(t),r(e)})),t.bind(e).apply(void 0,i)}))};r.default=i,e.exports=r.default},{}],199:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireWildcard"),n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default,r={hasAlpha:{},encoders:{},decoders:{},class:{},constants:{}};function i(t){Object.entries(t).forEach((function(t){var e=(0,s.default)(t,2),i=e[0],n=e[1];r[i]=l({},r[i],{},n)}))}function n(t){var e=t();Array.isArray(e.mime)?u.addType.apply(void 0,(0,a.default)(e.mime)):Object.entries(e.mime).forEach((function(t){return u.addType.apply(void 0,(0,a.default)(t))})),delete e.mime,i(e)}function o(t){var e=t(u.jimpEvChange)||{};e.class||e.constants?i(e):i({class:e})}t.types&&(t.types.forEach(n),e.decoders=l({},e.decoders,{},r.decoders),e.encoders=l({},e.encoders,{},r.encoders),e.hasAlpha=l({},e.hasAlpha,{},r.hasAlpha));t.plugins&&t.plugins.forEach(o);return(0,u.addJimpMethods)(r.class,e),(0,u.addConstants)(r.constants,e),u.default};var a=n(t("@babel/runtime/helpers/toConsumableArray")),o=n(t("@babel/runtime/helpers/defineProperty")),s=n(t("@babel/runtime/helpers/slicedToArray")),u=i(t("@jimp/core"));function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(r,!0).forEach((function(e){(0,o.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e.exports=r.default},{"@babel/runtime/helpers/defineProperty":7,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/interopRequireWildcard":12,"@babel/runtime/helpers/slicedToArray":19,"@babel/runtime/helpers/toConsumableArray":20,"@jimp/core":193}],200:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=i(t("@jimp/custom")),a=i(t("@jimp/types")),o=i(t("@jimp/plugins")),s=(0,n.default)({types:[a.default],plugins:[o.default]});r.default=s,e.exports=r.default},{"@babel/runtime/helpers/interopRequireDefault":11,"@jimp/custom":199,"@jimp/plugins":228,"@jimp/types":234}],201:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=i(t("@babel/runtime/helpers/typeof")),a=t("@jimp/utils");r.default=function(){return{blit:function(t,e,r,i,o,s,u,h){if(!(t instanceof this.constructor))return a.throwError.call(this,"The source must be a Jimp image",h);if("number"!=typeof e||"number"!=typeof r)return a.throwError.call(this,"x and y must be numbers",h);if("function"==typeof i)h=i,i=0,o=0,s=t.bitmap.width,u=t.bitmap.height;else{if((0,n.default)(i)!==(0,n.default)(o)||(0,n.default)(o)!==(0,n.default)(s)||(0,n.default)(s)!==(0,n.default)(u))return a.throwError.call(this,"srcx, srcy, srcw, srch must be numbers",h);i=i||0,o=o||0,s=s||t.bitmap.width,u=u||t.bitmap.height}e=Math.round(e),r=Math.round(r),i=Math.round(i),o=Math.round(o),s=Math.round(s),u=Math.round(u);var l=this.bitmap.width,f=this.bitmap.height,c=this;return t.scanQuiet(i,o,s,u,(function(t,n,a){var s=e+t-i,u=r+n-o;if(s>=0&&u>=0&&l-s>0&&f-u>0){var h=c.getPixelIndex(s,u),d={r:this.bitmap.data[a],g:this.bitmap.data[a+1],b:this.bitmap.data[a+2],a:this.bitmap.data[a+3]},p={r:c.bitmap.data[h],g:c.bitmap.data[h+1],b:c.bitmap.data[h+2],a:c.bitmap.data[h+3]};c.bitmap.data[h]=(d.a*(d.r-p.r)-p.r+255>>8)+p.r,c.bitmap.data[h+1]=(d.a*(d.g-p.g)-p.g+255>>8)+p.g,c.bitmap.data[h+2]=(d.a*(d.b-p.b)-p.b+255>>8)+p.b,c.bitmap.data[h+3]=this.constructor.limit255(p.a+d.a)}})),(0,a.isNodePattern)(h)&&h.call(this,null,this),this}}},e.exports=r.default},{"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/typeof":21,"@jimp/utils":235}],202:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.shgTable=r.mulTable=void 0;r.mulTable=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1];r.shgTable=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18]},{}],203:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils"),n=t("./blur-tables");r.default=function(){return{blur:function(t,e){if("number"!=typeof t)return i.throwError.call(this,"r must be a number",e);if(t<1)return i.throwError.call(this,"r must be greater than 0",e);for(var r,a,o,s,u,h,l,f,c,d,p,m,b,g,_=this.bitmap.width-1,v=this.bitmap.height-1,y=t+1,w=n.mulTable[t],x=n.shgTable[t],E=[],S=[],k=[],M=[],A=[],I=[],T=2;T-- >0;){for(m=0,b=0,h=0;h<this.bitmap.height;h++){for(r=this.bitmap.data[b]*y,a=this.bitmap.data[b+1]*y,o=this.bitmap.data[b+2]*y,s=this.bitmap.data[b+3]*y,l=1;l<=t;l++)f=b+((l>_?_:l)<<2),r+=this.bitmap.data[f++],a+=this.bitmap.data[f++],o+=this.bitmap.data[f++],s+=this.bitmap.data[f];for(u=0;u<this.bitmap.width;u++)E[m]=r,S[m]=a,k[m]=o,M[m]=s,0===h&&(A[u]=((f=u+y)<_?f:_)<<2,I[u]=(f=u-t)>0?f<<2:0),c=b+A[u],d=b+I[u],r+=this.bitmap.data[c++]-this.bitmap.data[d++],a+=this.bitmap.data[c++]-this.bitmap.data[d++],o+=this.bitmap.data[c++]-this.bitmap.data[d++],s+=this.bitmap.data[c]-this.bitmap.data[d],m++;b+=this.bitmap.width<<2}for(u=0;u<this.bitmap.width;u++){for(r=E[p=u]*y,a=S[p]*y,o=k[p]*y,s=M[p]*y,l=1;l<=t;l++)r+=E[p+=l>v?0:this.bitmap.width],a+=S[p],o+=k[p],s+=M[p];for(m=u<<2,h=0;h<this.bitmap.height;h++)g=s*w>>>x,this.bitmap.data[m+3]=g,g>255&&(this.bitmap.data[m+3]=255),g>0?(g=255/g,this.bitmap.data[m]=(r*w>>>x)*g,this.bitmap.data[m+1]=(a*w>>>x)*g,this.bitmap.data[m+2]=(o*w>>>x)*g):(this.bitmap.data[m+2]=0,this.bitmap.data[m+1]=0,this.bitmap.data[m]=0),0===u&&(A[h]=((f=h+y)<v?f:v)*this.bitmap.width,I[h]=(f=h-t)>0?f*this.bitmap.width:0),c=u+A[h],d=u+I[h],r+=E[c]-E[d],a+=S[c]-S[d],o+=k[c]-k[d],s+=M[c]-M[d],m+=this.bitmap.width<<2}}return(0,i.isNodePattern)(e)&&e.call(this,null,this),this}}},e.exports=r.default},{"./blur-tables":202,"@jimp/utils":235}],204:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");r.default=function(){return{circle:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(e=t,t={});var r=t.radius||(this.bitmap.width>this.bitmap.height?this.bitmap.height:this.bitmap.width)/2,n={x:"number"==typeof t.x?t.x:this.bitmap.width/2,y:"number"==typeof t.y?t.y:this.bitmap.height/2};return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,i){var a=Math.sqrt(Math.pow(t-n.x,2)+Math.pow(e-n.y,2));r-a<=0?this.bitmap.data[i+3]=0:r-a<1&&(this.bitmap.data[i+3]=255*(r-a))})),(0,i.isNodePattern)(e)&&e.call(this,null,this),this}}},e.exports=r.default},{"@jimp/utils":235}],205:[function(t,e,r){(function(i){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=n(t("@babel/runtime/helpers/toConsumableArray")),o=n(t("tinycolor2")),s=t("@jimp/utils");function u(t,e,r,i){for(var n=[0,0,0],a=(e.length-1)/2,o=0;o<e.length;o+=1)for(var s=0;s<e[o].length;s+=1){var u=t.getPixelIndex(r+o-a,i+s-a);n[0]+=t.bitmap.data[u]*e[o][s],n[1]+=t.bitmap.data[u+1]*e[o][s],n[2]+=t.bitmap.data[u+2]*e[o][s]}return n}var h=function(t){return null!=t};function l(t){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){var i=parseInt(.2126*this.bitmap.data[r]+.7152*this.bitmap.data[r+1]+.0722*this.bitmap.data[r+2],10);this.bitmap.data[r]=i,this.bitmap.data[r+1]=i,this.bitmap.data[r+2]=i})),(0,s.isNodePattern)(t)&&t.call(this,null,this),this}function f(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;return{r:(e.r-t.r)*(r/100)+t.r,g:(e.g-t.g)*(r/100)+t.g,b:(e.b-t.b)*(r/100)+t.b}}function c(t,e){var r=this;return t&&Array.isArray(t)?(t=t.map((function(t){return"xor"!==t.apply&&"mix"!==t.apply||(t.params[0]=(0,o.default)(t.params[0]).toRgb()),t})),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(i,n,u){var h={r:r.bitmap.data[u],g:r.bitmap.data[u+1],b:r.bitmap.data[u+2]},l=function(t,e){return r.constructor.limit255(h[t]+e)};t.forEach((function(t){if("mix"===t.apply)h=f(h,t.params[0],t.params[1]);else if("tint"===t.apply)h=f(h,{r:255,g:255,b:255},t.params[0]);else if("shade"===t.apply)h=f(h,{r:0,g:0,b:0},t.params[0]);else if("xor"===t.apply)h={r:h.r^t.params[0].r,g:h.g^t.params[0].g,b:h.b^t.params[0].b};else if("red"===t.apply)h.r=l("r",t.params[0]);else if("green"===t.apply)h.g=l("g",t.params[0]);else if("blue"===t.apply)h.b=l("b",t.params[0]);else{var i;if("hue"===t.apply&&(t.apply="spin"),!(h=(0,o.default)(h))[t.apply])return s.throwError.call(r,"action "+t.apply+" not supported",e);h=(i=h)[t.apply].apply(i,(0,a.default)(t.params)).toRgb()}})),r.bitmap.data[u]=h.r,r.bitmap.data[u+1]=h.g,r.bitmap.data[u+2]=h.b})),(0,s.isNodePattern)(e)&&e.call(this,null,this),this):s.throwError.call(this,"actions must be an array",e)}r.default=function(){return{brightness:function(t,e){return"number"!=typeof t?s.throwError.call(this,"val must be numbers",e):t<-1||t>1?s.throwError.call(this,"val must be a number between -1 and +1",e):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,r,i){t<0?(this.bitmap.data[i]=this.bitmap.data[i]*(1+t),this.bitmap.data[i+1]=this.bitmap.data[i+1]*(1+t),this.bitmap.data[i+2]=this.bitmap.data[i+2]*(1+t)):(this.bitmap.data[i]=this.bitmap.data[i]+(255-this.bitmap.data[i])*t,this.bitmap.data[i+1]=this.bitmap.data[i+1]+(255-this.bitmap.data[i+1])*t,this.bitmap.data[i+2]=this.bitmap.data[i+2]+(255-this.bitmap.data[i+2])*t)})),(0,s.isNodePattern)(e)&&e.call(this,null,this),this)},contrast:function(t,e){if("number"!=typeof t)return s.throwError.call(this,"val must be numbers",e);if(t<-1||t>1)return s.throwError.call(this,"val must be a number between -1 and +1",e);var r=(t+1)/(1-t);function i(t){return(t=Math.floor(r*(t-127)+127))<0?0:t>255?255:t}return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){this.bitmap.data[r]=i(this.bitmap.data[r]),this.bitmap.data[r+1]=i(this.bitmap.data[r+1]),this.bitmap.data[r+2]=i(this.bitmap.data[r+2])})),(0,s.isNodePattern)(e)&&e.call(this,null,this),this},posterize:function(t,e){return"number"!=typeof t?s.throwError.call(this,"n must be numbers",e):(t<2&&(t=2),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,r,i){this.bitmap.data[i]=Math.floor(this.bitmap.data[i]/255*(t-1))/(t-1)*255,this.bitmap.data[i+1]=Math.floor(this.bitmap.data[i+1]/255*(t-1))/(t-1)*255,this.bitmap.data[i+2]=Math.floor(this.bitmap.data[i+2]/255*(t-1))/(t-1)*255})),(0,s.isNodePattern)(e)&&e.call(this,null,this),this)},greyscale:l,grayscale:l,opacity:function(t,e){return"number"!=typeof t?s.throwError.call(this,"f must be a number",e):t<0||t>1?s.throwError.call(this,"f must be a number from 0 to 1",e):(this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,r,i){var n=this.bitmap.data[i+3]*t;this.bitmap.data[i+3]=n})),(0,s.isNodePattern)(e)&&e.call(this,null,this),this)},sepia:function(t){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){var i=this.bitmap.data[r],n=this.bitmap.data[r+1],a=this.bitmap.data[r+2];a=.272*(i=.393*i+.769*n+.189*a)+.534*(n=.349*i+.686*n+.168*a)+.131*a,this.bitmap.data[r]=i<255?i:255,this.bitmap.data[r+1]=n<255?n:255,this.bitmap.data[r+2]=a<255?a:255})),(0,s.isNodePattern)(t)&&t.call(this,null,this),this},fade:function(t,e){return"number"!=typeof t?s.throwError.call(this,"f must be a number",e):t<0||t>1?s.throwError.call(this,"f must be a number from 0 to 1",e):(this.opacity(1-t),(0,s.isNodePattern)(e)&&e.call(this,null,this),this)},convolution:function(t,e,r){"function"==typeof e&&void 0===r&&(r=e,e=null),e||(e=this.constructor.EDGE_EXTEND);var n,a,o,u,h,l,f,c,d,p,m=i.from(this.bitmap.data),b=t.length,g=t[0].length,_=Math.floor(b/2),v=Math.floor(g/2),y=-_,w=-v;return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(r,i,s){u=0,o=0,a=0;for(var b=y;b<=_;b++)for(var g=w;g<=v;g++)c=r+g,d=i+b,n=t[b+_][g+v],-1===(p=this.getPixelIndex(c,d,e))?(f=0,l=0,h=0):(h=this.bitmap.data[p+0],l=this.bitmap.data[p+1],f=this.bitmap.data[p+2]),a+=n*h,o+=n*l,u+=n*f;a<0&&(a=0),o<0&&(o=0),u<0&&(u=0),a>255&&(a=255),o>255&&(o=255),u>255&&(u=255),m[s+0]=a,m[s+1]=o,m[s+2]=u})),this.bitmap.data=m,(0,s.isNodePattern)(r)&&r.call(this,null,this),this},opaque:function(t){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){this.bitmap.data[r+3]=255})),(0,s.isNodePattern)(t)&&t.call(this,null,this),this},pixelate:function(t,e,r,i,n,a){if("function"==typeof e)a=e,n=null,i=null,r=null,e=null;else{if("number"!=typeof t)return s.throwError.call(this,"size must be a number",a);if(h(e)&&"number"!=typeof e)return s.throwError.call(this,"x must be a number",a);if(h(r)&&"number"!=typeof r)return s.throwError.call(this,"y must be a number",a);if(h(i)&&"number"!=typeof i)return s.throwError.call(this,"w must be a number",a);if(h(n)&&"number"!=typeof n)return s.throwError.call(this,"h must be a number",a)}var o=[[1/16,2/16,1/16],[2/16,.25,2/16],[1/16,2/16,1/16]];e=e||0,r=r||0,i=h(i)?i:this.bitmap.width-e,n=h(n)?n:this.bitmap.height-r;var l=this.cloneQuiet();return this.scanQuiet(e,r,i,n,(function(e,r,i){e=t*Math.floor(e/t),r=t*Math.floor(r/t);var n=u(l,o,e,r);this.bitmap.data[i]=n[0],this.bitmap.data[i+1]=n[1],this.bitmap.data[i+2]=n[2]})),(0,s.isNodePattern)(a)&&a.call(this,null,this),this},convolute:function(t,e,r,i,n,a){if(!Array.isArray(t))return s.throwError.call(this,"the kernel must be an array",a);if("function"==typeof e)a=e,e=null,r=null,i=null,n=null;else{if(h(e)&&"number"!=typeof e)return s.throwError.call(this,"x must be a number",a);if(h(r)&&"number"!=typeof r)return s.throwError.call(this,"y must be a number",a);if(h(i)&&"number"!=typeof i)return s.throwError.call(this,"w must be a number",a);if(h(n)&&"number"!=typeof n)return s.throwError.call(this,"h must be a number",a)}var o=(t.length-1)/2;e=h(e)?e:o,r=h(r)?r:o,i=h(i)?i:this.bitmap.width-e,n=h(n)?n:this.bitmap.height-r;var l=this.cloneQuiet();return this.scanQuiet(e,r,i,n,(function(e,r,i){var n=u(l,t,e,r);this.bitmap.data[i]=this.constructor.limit255(n[0]),this.bitmap.data[i+1]=this.constructor.limit255(n[1]),this.bitmap.data[i+2]=this.constructor.limit255(n[2])})),(0,s.isNodePattern)(a)&&a.call(this,null,this),this},color:c,colour:c}},e.exports=r.default}).call(this,t("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/toConsumableArray":20,"@jimp/utils":235,buffer:48,tinycolor2:178}],206:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");r.default=function(){return{contain:function(t,e,r,n,a){if("number"!=typeof t||"number"!=typeof e)return i.throwError.call(this,"w and h must be numbers",a);"string"==typeof r&&("function"==typeof n&&void 0===a&&(a=n),n=r,r=null),"function"==typeof r&&(void 0===a&&(a=r),n=null,r=null),"function"==typeof n&&void 0===a&&(a=n,n=null);var o=7&(r=r||this.constructor.HORIZONTAL_ALIGN_CENTER|this.constructor.VERTICAL_ALIGN_MIDDLE),s=r>>3;if((0===o||o&o-1)&&(0===s||s&s-1))return i.throwError.call(this,"only use one flag per alignment direction",a);var u=o>>1,h=s>>1,l=t/e>this.bitmap.width/this.bitmap.height?e/this.bitmap.height:t/this.bitmap.width,f=this.cloneQuiet().scale(l,n);return this.resize(t,e,n),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){this.bitmap.data.writeUInt32BE(this._background,r)})),this.blit(f,(this.bitmap.width-f.bitmap.width)/2*u,(this.bitmap.height-f.bitmap.height)/2*h),(0,i.isNodePattern)(a)&&a.call(this,null,this),this}}},e.exports=r.default},{"@jimp/utils":235}],207:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");r.default=function(){return{cover:function(t,e,r,n,a){if("number"!=typeof t||"number"!=typeof e)return i.throwError.call(this,"w and h must be numbers",a);r&&"function"==typeof r&&void 0===a?(a=r,r=null,n=null):"function"==typeof n&&void 0===a&&(a=n,n=null);var o=7&(r=r||this.constructor.HORIZONTAL_ALIGN_CENTER|this.constructor.VERTICAL_ALIGN_MIDDLE),s=r>>3;if((0===o||o&o-1)&&(0===s||s&s-1))return i.throwError.call(this,"only use one flag per alignment direction",a);var u=o>>1,h=s>>1,l=t/e>this.bitmap.width/this.bitmap.height?t/this.bitmap.width:e/this.bitmap.height;return this.scale(l,n),this.crop((this.bitmap.width-t)/2*u,(this.bitmap.height-e)/2*h,t,e),(0,i.isNodePattern)(a)&&a.call(this,null,this),this}}},e.exports=r.default},{"@jimp/utils":235}],208:[function(t,e,r){(function(i){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){return t("crop",(function(t,e,r,n,a){if("number"!=typeof t||"number"!=typeof e)return o.throwError.call(this,"x and y must be numbers",a);if("number"!=typeof r||"number"!=typeof n)return o.throwError.call(this,"w and h must be numbers",a);if(t=Math.round(t),e=Math.round(e),r=Math.round(r),n=Math.round(n),0===t&&r===this.bitmap.width){var s=r*e+t<<2,u=s+n*r<<2;this.bitmap.data=this.bitmap.data.slice(s,u)}else{var h=i.allocUnsafe(r*n*4),l=0;this.scanQuiet(t,e,r,n,(function(t,e,r){var i=this.bitmap.data.readUInt32BE(r,!0);h.writeUInt32BE(i,l,!0),l+=4})),this.bitmap.data=h}return this.bitmap.width=r,this.bitmap.height=n,(0,o.isNodePattern)(a)&&a.call(this,null,this),this})),{class:{autocrop:function(){for(var t,e=this.bitmap.width,r=this.bitmap.height,i=1,n=0,s=2e-4,u=!0,h=!1,l={north:!1,south:!1,east:!1,west:!1},f=arguments.length,c=new Array(f),d=0;d<f;d++)c[d]=arguments[d];for(var p=0,m=c.length;p<m;p++)if("number"==typeof c[p]&&(s=c[p]),"boolean"==typeof c[p]&&(u=c[p]),"function"==typeof c[p]&&(t=c[p]),"object"===(0,a.default)(c[p])){var b=c[p];void 0!==b.tolerance&&(s=b.tolerance),void 0!==b.cropOnlyFrames&&(u=b.cropOnlyFrames),void 0!==b.cropSymmetric&&(h=b.cropSymmetric),void 0!==b.leaveBorder&&(n=b.leaveBorder),void 0!==b.ignoreSides&&(l=b.ignoreSides)}var g=this.getPixelColor(0,0),_=this.constructor.intToRGBA(g),v=0,y=0,w=0,x=0;if(g=this.getPixelColor(0,0),!l.north)t:for(var E=0;E<r-i;E++){for(var S=0;S<e;S++){var k=this.getPixelColor(S,E),M=this.constructor.intToRGBA(k);if(this.constructor.colorDiff(_,M)>s)break t}v++}if(g=this.getPixelColor(e,0),!l.east)t:for(var A=0;A<e-i;A++){for(var I=0+v;I<r;I++){var T=this.getPixelColor(A,I),R=this.constructor.intToRGBA(T);if(this.constructor.colorDiff(_,R)>s)break t}y++}if(g=this.getPixelColor(0,r),!l.south)t:for(var P=r-1;P>=v+i;P--){for(var C=e-y-1;C>=0;C--){var O=this.getPixelColor(C,P),L=this.constructor.intToRGBA(O);if(this.constructor.colorDiff(_,L)>s)break t}w++}if(g=this.getPixelColor(e,r),!l.west)t:for(var B=e-1;B>=0+y+i;B--){for(var D=r-1;D>=0+v;D--){var N=this.getPixelColor(B,D),z=this.constructor.intToRGBA(N);if(this.constructor.colorDiff(_,z)>s)break t}x++}if(x-=n,y-=n,v-=n,w-=n,h){var j=Math.min(y,x),U=Math.min(v,w);x=j,y=j,v=U,w=U}var F=e-((x=x>=0?x:0)+(y=y>=0?y:0)),G=r-((w=w>=0?w:0)+(v=v>=0?v:0));return(u?0!==y&&0!==v&&0!==x&&0!==w:0!==y||0!==v||0!==x||0!==w)&&this.crop(y,v,F,G),(0,o.isNodePattern)(t)&&t.call(this,null,this),this}}}};var a=n(t("@babel/runtime/helpers/typeof")),o=t("@jimp/utils");e.exports=r.default}).call(this,t("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/typeof":21,"@jimp/utils":235,buffer:48}],209:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=i(t("@babel/runtime/helpers/typeof")),a=t("@jimp/utils");r.default=function(){return{displace:function(t,e,r){if("object"!==(0,n.default)(t)||t.constructor!==this.constructor)return a.throwError.call(this,"The source must be a Jimp image",r);if("number"!=typeof e)return a.throwError.call(this,"factor must be a number",r);var i=this.cloneQuiet();return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(r,n,a){var o=t.bitmap.data[a]/256*e;o=Math.round(o);var s=this.getPixelIndex(r+o,n);this.bitmap.data[s]=i.bitmap.data[a],this.bitmap.data[s+1]=i.bitmap.data[a+1],this.bitmap.data[s+2]=i.bitmap.data[a+2]})),(0,a.isNodePattern)(r)&&r.call(this,null,this),this}}},e.exports=r.default},{"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/typeof":21,"@jimp/utils":235}],210:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");function n(t){var e=[1,9,3,11,13,5,15,7,4,12,2,10,16,8,14,6];return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,r,i){var n=e[((3&r)<<2)+t%4];this.bitmap.data[i]=Math.min(this.bitmap.data[i]+n,255),this.bitmap.data[i+1]=Math.min(this.bitmap.data[i+1]+n,255),this.bitmap.data[i+2]=Math.min(this.bitmap.data[i+2]+n,255)})),(0,i.isNodePattern)(t)&&t.call(this,null,this),this}r.default=function(){return{dither565:n,dither16:n}},e.exports=r.default},{"@jimp/utils":235}],211:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");r.default=function(){return{fisheye:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{r:2.5},r=arguments.length>1?arguments[1]:void 0;"function"==typeof e&&(r=e,e={r:2.5});var n=this.cloneQuiet(),a=n.bitmap,o=a.width,s=a.height;return n.scanQuiet(0,0,o,s,(function(r,i){var a=r/o,u=i/s,h=Math.sqrt(Math.pow(a-.5,2)+Math.pow(u-.5,2)),l=2*Math.pow(h,e.r),f=(a-.5)/h,c=(u-.5)/h,d=Math.round((l*f+.5)*o),p=Math.round((l*c+.5)*s),m=n.getPixelColor(d,p);t.setPixelColor(m,r,i)})),this.setPixelColor(n.getPixelColor(o/2,s/2),o/2,s/2),(0,i.isNodePattern)(r)&&r.call(this,null,this),this}}},e.exports=r.default},{"@jimp/utils":235}],212:[function(t,e,r){(function(i){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=t("@jimp/utils");function a(t,e,r){if("boolean"!=typeof t||"boolean"!=typeof e)return n.throwError.call(this,"horizontal and vertical must be Booleans",r);var a=i.alloc(this.bitmap.data.length);return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(r,i,n){var o=t?this.bitmap.width-1-r:r,s=e?this.bitmap.height-1-i:i,u=this.bitmap.width*s+o<<2,h=this.bitmap.data.readUInt32BE(n);a.writeUInt32BE(h,u)})),this.bitmap.data=i.from(a),(0,n.isNodePattern)(r)&&r.call(this,null,this),this}r.default=function(){return{flip:a,mirror:a}},e.exports=r.default}).call(this,t("buffer").Buffer)},{"@jimp/utils":235,buffer:48}],213:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");r.default=function(){return{gaussian:function(t,e){if("number"!=typeof t)return i.throwError.call(this,"r must be a number",e);if(t<1)return i.throwError.call(this,"r must be greater than 0",e);for(var r=Math.ceil(2.57*t),n=2*r+1,a=t*t*2,o=a*Math.PI,s=[],u=0;u<n;u++){s[u]=[];for(var h=0;h<n;h++){var l=Math.pow(h-r,2)+Math.pow(u-r,2);s[u][h]=Math.exp(-l/a)/o}}for(var f=0;f<this.bitmap.height;f++)for(var c=0;c<this.bitmap.width;c++)for(var d=0,p=0,m=0,b=0,g=0,_=0;_<n;_++){for(var v=0;v<n;v++){var y=Math.min(this.bitmap.width-1,Math.max(0,v+c-r)),w=Math.min(this.bitmap.height-1,Math.max(0,_+f-r)),x=s[_][v],E=w*this.bitmap.width+y<<2;d+=this.bitmap.data[E]*x,p+=this.bitmap.data[E+1]*x,m+=this.bitmap.data[E+2]*x,b+=this.bitmap.data[E+3]*x,g+=x}var S=f*this.bitmap.width+c<<2;this.bitmap.data[S]=Math.round(d/g),this.bitmap.data[S+1]=Math.round(p/g),this.bitmap.data[S+2]=Math.round(m/g),this.bitmap.data[S+3]=Math.round(b/g)}return(0,i.isNodePattern)(e)&&e.call(this,null,this),this}}},e.exports=r.default},{"@jimp/utils":235}],214:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");r.default=function(){return{invert:function(t){return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){this.bitmap.data[r]=255-this.bitmap.data[r],this.bitmap.data[r+1]=255-this.bitmap.data[r+1],this.bitmap.data[r+2]=255-this.bitmap.data[r+2]})),(0,i.isNodePattern)(t)&&t.call(this,null,this),this}}},e.exports=r.default},{"@jimp/utils":235}],215:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");r.default=function(){return{mask:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;if(!(t instanceof this.constructor))return i.throwError.call(this,"The source must be a Jimp image",n);if("number"!=typeof e||"number"!=typeof r)return i.throwError.call(this,"x and y must be numbers",n);e=Math.round(e),r=Math.round(r);var a=this.bitmap.width,o=this.bitmap.height,s=this;return t.scanQuiet(0,0,t.bitmap.width,t.bitmap.height,(function(t,i,n){var u=e+t,h=r+i;if(u>=0&&h>=0&&u<a&&h<o){var l=s.getPixelIndex(u,h),f=this.bitmap.data,c=(f[n+0]+f[n+1]+f[n+2])/3;s.bitmap.data[l+3]*=c/255}})),(0,i.isNodePattern)(n)&&n.call(this,null,this),this}}},e.exports=r.default},{"@jimp/utils":235}],216:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");function n(){var t={r:new Array(256).fill(0),g:new Array(256).fill(0),b:new Array(256).fill(0)};return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(e,r,i){t.r[this.bitmap.data[i+0]]++,t.g[this.bitmap.data[i+1]]++,t.b[this.bitmap.data[i+2]]++})),t}var a=function(t,e,r){return 255*(t-e)/(r-e)},o=function(t){return[t.findIndex((function(t){return t>0})),255-t.slice().reverse().findIndex((function(t){return t>0}))]};r.default=function(){return{normalize:function(t){var e=n.call(this),r={r:o(e.r),g:o(e.g),b:o(e.b)};return this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,i){var n=this.bitmap.data[i+0],o=this.bitmap.data[i+1],s=this.bitmap.data[i+2];this.bitmap.data[i+0]=a(n,r.r[0],r.r[1]),this.bitmap.data[i+1]=a(o,r.g[0],r.g[1]),this.bitmap.data[i+2]=a(s,r.b[0],r.b[1])})),(0,i.isNodePattern)(t)&&t.call(this,null,this),this}}},e.exports=r.default},{"@jimp/utils":235}],217:[function(t,e,r){(function(i){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=n(t("@babel/runtime/helpers/typeof")),o=n(t("@babel/runtime/helpers/toConsumableArray")),s=n(t("path")),u=n(t("load-bmfont")),h=t("@jimp/utils"),l=t("./measure-text");function f(t,e,r,i,n){if(n.width>0&&n.height>0){var a=e.pages[n.page];t.blit(a,r+n.xoffset,i+n.yoffset,n.x,n.y,n.width,n.height)}return t}function c(t,e,r,i,n){for(var a=0;a<i.length;a++){var o=void 0;o=t.chars[i[a]]?i[a]:/\s/.test(i[a])?"":"?";var s=t.chars[o]||{},u=t.kernings[o];f(this,t,e,r,s||{}),e+=(u&&u[i[a+1]]?u[i[a+1]]:0)+(s.xadvance||n)}}var d="browser/lib/";r.default=function(){return{constants:{measureText:l.measureText,measureTextHeight:l.measureTextHeight,FONT_SANS_8_BLACK:s.default.join(d,"fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt"),FONT_SANS_10_BLACK:s.default.join(d,"fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt"),FONT_SANS_12_BLACK:s.default.join(d,"fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt"),FONT_SANS_14_BLACK:s.default.join(d,"fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt"),FONT_SANS_16_BLACK:s.default.join(d,"fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt"),FONT_SANS_32_BLACK:s.default.join(d,"fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt"),FONT_SANS_64_BLACK:s.default.join(d,"fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt"),FONT_SANS_128_BLACK:s.default.join(d,"fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt"),FONT_SANS_8_WHITE:s.default.join(d,"fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt"),FONT_SANS_16_WHITE:s.default.join(d,"fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt"),FONT_SANS_32_WHITE:s.default.join(d,"fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt"),FONT_SANS_64_WHITE:s.default.join(d,"fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt"),FONT_SANS_128_WHITE:s.default.join(d,"fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt"),loadFont:function(t,e){var r=this;return"string"!=typeof t?h.throwError.call(this,"file must be a string",e):new Promise((function(i,n){e=e||function(t,e){t?n(t):i(e)},(0,u.default)(t,(function(i,n){var a={},o={};if(i)return h.throwError.call(r,i,e);for(var u=0;u<n.chars.length;u++)a[String.fromCharCode(n.chars[u].id)]=n.chars[u];for(var l=0;l<n.kernings.length;l++){var f=String.fromCharCode(n.kernings[l].first);o[f]=o[f]||{},o[f][String.fromCharCode(n.kernings[l].second)]=n.kernings[l].amount}(function(t,e,r){var i=r.map((function(r){return t.read(e+"/"+r)}));return Promise.all(i)})(r,s.default.dirname(t),n.pages).then((function(t){e(null,{chars:a,kernings:o,pages:t,common:n.common,info:n.info})}))}))}))}},class:{print:function(t,e,r,i,n,s,u){var f,d,p=this;if("function"==typeof n&&void 0===u&&(u=n,n=1/0),void 0===n&&(n=1/0),"function"==typeof s&&void 0===u&&(u=s,s=1/0),void 0===s&&(s=1/0),"object"!==(0,a.default)(t))return h.throwError.call(this,"font must be a Jimp loadFont",u);if("number"!=typeof e||"number"!=typeof r||"number"!=typeof n)return h.throwError.call(this,"x, y and maxWidth must be numbers",u);if("number"!=typeof n)return h.throwError.call(this,"maxWidth must be a number",u);if("number"!=typeof s)return h.throwError.call(this,"maxHeight must be a number",u);"object"===(0,a.default)(i)&&null!==i.text&&void 0!==i.text?(f=i.alignmentX||this.constructor.HORIZONTAL_ALIGN_LEFT,d=i.alignmentY||this.constructor.VERTICAL_ALIGN_TOP,i=i.text):(f=this.constructor.HORIZONTAL_ALIGN_LEFT,d=this.constructor.VERTICAL_ALIGN_TOP,i=i.toString());s!==1/0&&d===this.constructor.VERTICAL_ALIGN_BOTTOM?r+=s-(0,l.measureTextHeight)(t,i,n):s!==1/0&&d===this.constructor.VERTICAL_ALIGN_MIDDLE&&(r+=s/2-(0,l.measureTextHeight)(t,i,n)/2);var m=Object.entries(t.chars)[0][1].xadvance,b=function(t,e,r){var i=e.split(" "),n=[],a=[],s=0;return i.forEach((function(e){var i=[].concat((0,o.default)(a),[e]).join(" "),u=(0,l.measureText)(t,i);u<=r?(u>s&&(s=u),a.push(e)):(n.push(a),a=[e])})),n.push(a),{lines:n,longestLine:s}}(t,i,n),g=b.lines,_=b.longestLine;return g.forEach((function(i){var a=i.join(" "),o=function(t,e,r,i,n){return n===t.HORIZONTAL_ALIGN_LEFT?0:n===t.HORIZONTAL_ALIGN_CENTER?(i-(0,l.measureText)(e,r))/2:i-(0,l.measureText)(e,r)}(p.constructor,t,a,n,f);c.call(p,t,e+o,r,a,m),r+=t.common.lineHeight})),(0,h.isNodePattern)(u)&&u.call(this,null,this,{x:e+_,y:r}),this}}}},e.exports=r.default}).call(this,"/../../node_modules/@jimp/plugin-print/dist")},{"./measure-text":218,"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/toConsumableArray":20,"@babel/runtime/helpers/typeof":21,"@jimp/utils":235,"load-bmfont":219,path:107}],218:[function(t,e,r){"use strict";function i(t,e){for(var r=0,i=0;i<e.length;i++)if(t.chars[e[i]]){var n=t.kernings[e[i]]&&t.kernings[e[i]][e[i+1]]?t.kernings[e[i]][e[i+1]]:0;r+=(t.chars[e[i]].xadvance||0)+n}return r}Object.defineProperty(r,"__esModule",{value:!0}),r.measureText=i,r.measureTextHeight=function(t,e,r){for(var n=e.split(" "),a="",o=t.common.lineHeight,s=0;s<n.length;s++){var u=a+n[s]+" ";i(t,u)>r&&s>0?(o+=t.common.lineHeight,a=n[s]+" "):a=u}return o}},{}],219:[function(t,e,r){(function(r){var i=t("xhr"),n=function(){},a=t("parse-bmfont-ascii"),o=t("parse-bmfont-xml"),s=t("parse-bmfont-binary"),u=t("./lib/is-binary"),h=t("xtend"),l=self.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest;e.exports=function(t,e){e="function"==typeof e?e:n,"string"==typeof t?t={uri:t}:t||(t={}),t.binary&&(t=function(t){if(l)return h(t,{responseType:"arraybuffer"});if(void 0===self.XMLHttpRequest)throw new Error("your browser does not support XHR loading");var e=new self.XMLHttpRequest;return e.overrideMimeType("text/plain; charset=x-user-defined"),h({xhr:e},t)}(t)),i(t,(function(i,h,l){if(i)return e(i);if(!/^2/.test(h.statusCode))return e(new Error("http status code: "+h.statusCode));if(!l)return e(new Error("no body result"));var f,c,d=!1;if(f=l,"[object ArrayBuffer]"===Object.prototype.toString.call(f)){var p=new Uint8Array(l);l=new r(p,"binary")}u(l)&&(d=!0,"string"==typeof l&&(l=new r(l,"binary"))),d||(r.isBuffer(l)&&(l=l.toString(t.encoding)),l=l.trim());try{var m=h.headers["content-type"];c=d?s(l):/json/.test(m)||"{"===l.charAt(0)?JSON.parse(l):/xml/.test(m)||"<"===l.charAt(0)?o(l):a(l)}catch(t){e(new Error("error parsing font "+t.message)),e=n}e(null,c)}))}}).call(this,t("buffer").Buffer)},{"./lib/is-binary":220,buffer:48,"parse-bmfont-ascii":102,"parse-bmfont-binary":103,"parse-bmfont-xml":104,xhr:187,xtend:189}],220:[function(t,e,r){(function(r){var i=t("buffer-equal"),n=new r([66,77,70,3]);e.exports=function(t){return"string"==typeof t?"BMF"===t.substring(0,3):t.length>4&&i(t.slice(0,4),n)}}).call(this,t("buffer").Buffer)},{buffer:48,"buffer-equal":49}],221:[function(t,e,r){(function(i){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=t("@jimp/utils"),o=n(t("./modules/resize")),s=n(t("./modules/resize2"));r.default=function(){return{constants:{RESIZE_NEAREST_NEIGHBOR:"nearestNeighbor",RESIZE_BILINEAR:"bilinearInterpolation",RESIZE_BICUBIC:"bicubicInterpolation",RESIZE_HERMITE:"hermiteInterpolation",RESIZE_BEZIER:"bezierInterpolation"},class:{resize:function(t,e,r,n){if("number"!=typeof t||"number"!=typeof e)return a.throwError.call(this,"w and h must be numbers",n);if("function"==typeof r&&void 0===n&&(n=r,r=null),t===this.constructor.AUTO&&e===this.constructor.AUTO)return a.throwError.call(this,"w and h cannot both be set to auto",n);if(t===this.constructor.AUTO&&(t=this.bitmap.width*(e/this.bitmap.height)),e===this.constructor.AUTO&&(e=this.bitmap.height*(t/this.bitmap.width)),t<0||e<0)return a.throwError.call(this,"w and h must be positive numbers",n);if(t=Math.round(t),e=Math.round(e),"function"==typeof s.default[r]){var u={data:i.alloc(t*e*4),width:t,height:e};s.default[r](this.bitmap,u),this.bitmap=u}else{var h=this,l=new o.default(this.bitmap.width,this.bitmap.height,t,e,!0,!0,(function(r){h.bitmap.data=i.from(r),h.bitmap.width=t,h.bitmap.height=e}));l.resize(this.bitmap.data)}return(0,a.isNodePattern)(n)&&n.call(this,null,this),this}}}},e.exports=r.default}).call(this,t("buffer").Buffer)},{"./modules/resize":222,"./modules/resize2":223,"@babel/runtime/helpers/interopRequireDefault":11,"@jimp/utils":235,buffer:48}],222:[function(t,e,r){"use strict";function i(t,e,r,i,n,a,o){this.widthOriginal=Math.abs(Math.floor(t)||0),this.heightOriginal=Math.abs(Math.floor(e)||0),this.targetWidth=Math.abs(Math.floor(r)||0),this.targetHeight=Math.abs(Math.floor(i)||0),this.colorChannels=n?4:3,this.interpolationPass=Boolean(a),this.resizeCallback="function"==typeof o?o:function(){},this.targetWidthMultipliedByChannels=this.targetWidth*this.colorChannels,this.originalWidthMultipliedByChannels=this.widthOriginal*this.colorChannels,this.originalHeightMultipliedByChannels=this.heightOriginal*this.colorChannels,this.widthPassResultSize=this.targetWidthMultipliedByChannels*this.heightOriginal,this.finalResultSize=this.targetWidthMultipliedByChannels*this.targetHeight,this.initialize()}i.prototype.initialize=function(){if(!(this.widthOriginal>0&&this.heightOriginal>0&&this.targetWidth>0&&this.targetHeight>0))throw new Error("Invalid settings specified for the resizer.");this.configurePasses()},i.prototype.configurePasses=function(){this.widthOriginal===this.targetWidth?this.resizeWidth=this.bypassResizer:(this.ratioWeightWidthPass=this.widthOriginal/this.targetWidth,this.ratioWeightWidthPass<1&&this.interpolationPass?(this.initializeFirstPassBuffers(!0),this.resizeWidth=4===this.colorChannels?this.resizeWidthInterpolatedRGBA:this.resizeWidthInterpolatedRGB):(this.initializeFirstPassBuffers(!1),this.resizeWidth=4===this.colorChannels?this.resizeWidthRGBA:this.resizeWidthRGB)),this.heightOriginal===this.targetHeight?this.resizeHeight=this.bypassResizer:(this.ratioWeightHeightPass=this.heightOriginal/this.targetHeight,this.ratioWeightHeightPass<1&&this.interpolationPass?(this.initializeSecondPassBuffers(!0),this.resizeHeight=this.resizeHeightInterpolated):(this.initializeSecondPassBuffers(!1),this.resizeHeight=4===this.colorChannels?this.resizeHeightRGBA:this.resizeHeightRGB))},i.prototype._resizeWidthInterpolatedRGBChannels=function(t,e){var r,i,n=e?4:3,a=this.ratioWeightWidthPass,o=this.widthBuffer,s=0,u=0,h=0,l=0,f=0;for(r=0;s<1/3;r+=n,s+=a)for(u=r,h=0;u<this.widthPassResultSize;h+=this.originalWidthMultipliedByChannels,u+=this.targetWidthMultipliedByChannels)o[u]=t[h],o[u+1]=t[h+1],o[u+2]=t[h+2],e&&(o[u+3]=t[h+3]);for(s-=1/3,i=this.widthOriginal-1;s<i;r+=n,s+=a)for(l=1-(f=s%1),u=r,h=Math.floor(s)*n;u<this.widthPassResultSize;h+=this.originalWidthMultipliedByChannels,u+=this.targetWidthMultipliedByChannels)o[u+0]=t[h+0]*l+t[h+n+0]*f,o[u+1]=t[h+1]*l+t[h+n+1]*f,o[u+2]=t[h+2]*l+t[h+n+2]*f,e&&(o[u+3]=t[h+3]*l+t[h+n+3]*f);for(i=this.originalWidthMultipliedByChannels-n;r<this.targetWidthMultipliedByChannels;r+=n)for(u=r,h=i;u<this.widthPassResultSize;h+=this.originalWidthMultipliedByChannels,u+=this.targetWidthMultipliedByChannels)o[u]=t[h],o[u+1]=t[h+1],o[u+2]=t[h+2],e&&(o[u+3]=t[h+3]);return o},i.prototype._resizeWidthRGBChannels=function(t,e){var r=e?4:3,i=this.ratioWeightWidthPass,n=1/i,a=this.originalWidthMultipliedByChannels-r+1,o=this.targetWidthMultipliedByChannels-r+1,s=this.outputWidthWorkBench,u=this.widthBuffer,h=this.outputWidthWorkBenchOpaquePixelsCount,l=0,f=0,c=0,d=0,p=0,m=0,b=0,g=1,_=0,v=0,y=0,w=0;do{for(p=0;p<this.originalHeightMultipliedByChannels;)s[p++]=0,s[p++]=0,s[p++]=0,e&&(s[p++]=0,h[p/r-1]=0);l=i;do{for(f=1+c-d,g=Math.min(l,f),p=0,m=c;p<this.originalHeightMultipliedByChannels;m+=a)_=t[m],v=t[++m],y=t[++m],w=e?t[++m]:255,s[p++]+=(w?_:0)*g,s[p++]+=(w?v:0)*g,s[p++]+=(w?y:0)*g,e&&(s[p++]+=w*g,h[p/r-1]+=w?g:0);if(!(l>=f)){d+=l;break}d=c+=r,l-=f}while(l>0&&c<this.originalWidthMultipliedByChannels);for(p=0,m=b;p<this.originalHeightMultipliedByChannels;m+=o)l=e?h[p/r]:1,g=e?l?1/l:0:n,u[m]=s[p++]*g,u[++m]=s[p++]*g,u[++m]=s[p++]*g,e&&(u[++m]=s[p++]*n);b+=r}while(b<this.targetWidthMultipliedByChannels);return u},i.prototype._resizeHeightRGBChannels=function(t,e){var r=this.ratioWeightHeightPass,i=1/r,n=this.outputHeightWorkBench,a=this.heightBuffer,o=this.outputHeightWorkBenchOpaquePixelsCount,s=0,u=0,h=0,l=0,f=0,c=0,d=0,p=1,m=0,b=0,g=0,_=0;do{for(f=0;f<this.targetWidthMultipliedByChannels;)n[f++]=0,n[f++]=0,n[f++]=0,e&&(n[f++]=0,o[f/4-1]=0);s=r;do{for(u=1+h-l,p=Math.min(s,u),d=h,f=0;f<this.targetWidthMultipliedByChannels;)m=t[d++],b=t[d++],g=t[d++],_=e?t[d++]:255,n[f++]+=(_?m:0)*p,n[f++]+=(_?b:0)*p,n[f++]+=(_?g:0)*p,e&&(n[f++]+=_*p,o[f/4-1]+=_?p:0);if(!(s>=u)){l+=s;break}l=h=d,s-=u}while(s>0&&h<this.widthPassResultSize);for(f=0;f<this.targetWidthMultipliedByChannels;)s=e?o[f/4]:1,p=e?s?1/s:0:i,a[c++]=Math.round(n[f++]*p),a[c++]=Math.round(n[f++]*p),a[c++]=Math.round(n[f++]*p),e&&(a[c++]=Math.round(n[f++]*i))}while(c<this.finalResultSize);return a},i.prototype.resizeWidthInterpolatedRGB=function(t){return this._resizeWidthInterpolatedRGBChannels(t,!1)},i.prototype.resizeWidthInterpolatedRGBA=function(t){return this._resizeWidthInterpolatedRGBChannels(t,!0)},i.prototype.resizeWidthRGB=function(t){return this._resizeWidthRGBChannels(t,!1)},i.prototype.resizeWidthRGBA=function(t){return this._resizeWidthRGBChannels(t,!0)},i.prototype.resizeHeightInterpolated=function(t){for(var e,r=this.ratioWeightHeightPass,i=this.heightBuffer,n=0,a=0,o=0,s=0,u=0,h=0,l=0;n<1/3;n+=r)for(o=0;o<this.targetWidthMultipliedByChannels;)i[a++]=Math.round(t[o++]);for(n-=1/3,e=this.heightOriginal-1;n<e;n+=r)for(h=1-(l=n%1),u=(s=Math.floor(n)*this.targetWidthMultipliedByChannels)+this.targetWidthMultipliedByChannels,o=0;o<this.targetWidthMultipliedByChannels;++o)i[a++]=Math.round(t[s++]*h+t[u++]*l);for(;a<this.finalResultSize;)for(o=0,s=e*this.targetWidthMultipliedByChannels;o<this.targetWidthMultipliedByChannels;++o)i[a++]=Math.round(t[s++]);return i},i.prototype.resizeHeightRGB=function(t){return this._resizeHeightRGBChannels(t,!1)},i.prototype.resizeHeightRGBA=function(t){return this._resizeHeightRGBChannels(t,!0)},i.prototype.resize=function(t){this.resizeCallback(this.resizeHeight(this.resizeWidth(t)))},i.prototype.bypassResizer=function(t){return t},i.prototype.initializeFirstPassBuffers=function(t){this.widthBuffer=this.generateFloatBuffer(this.widthPassResultSize),t||(this.outputWidthWorkBench=this.generateFloatBuffer(this.originalHeightMultipliedByChannels),this.colorChannels>3&&(this.outputWidthWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.heightOriginal)))},i.prototype.initializeSecondPassBuffers=function(t){this.heightBuffer=this.generateUint8Buffer(this.finalResultSize),t||(this.outputHeightWorkBench=this.generateFloatBuffer(this.targetWidthMultipliedByChannels),this.colorChannels>3&&(this.outputHeightWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.targetWidth)))},i.prototype.generateFloatBuffer=function(t){try{return new Float32Array(t)}catch(t){return[]}},i.prototype.generateFloat64Buffer=function(t){try{return new Float64Array(t)}catch(t){return[]}},i.prototype.generateUint8Buffer=function(t){try{return new Uint8Array(t)}catch(t){return[]}},e.exports=i},{}],223:[function(t,e,r){(function(t){"use strict";e.exports={nearestNeighbor:function(t,e){for(var r=t.width,i=t.height,n=e.width,a=e.height,o=t.data,s=e.data,u=0;u<a;u++)for(var h=0;h<n;h++){var l=4*(u*n+h),f=4*(Math.floor(u*i/a)*r+Math.floor(h*r/n));s[l++]=o[f++],s[l++]=o[f++],s[l++]=o[f++],s[l++]=o[f++]}},bilinearInterpolation:function(t,e){for(var r=t.width,i=t.height,n=e.width,a=e.height,o=t.data,s=e.data,u=function(t,e,r,i,n){return e===i?r:Math.round((t-e)*n+(i-t)*r)},h=function(t,e,i,n,a,h,l,f){var c=4*(l*r+n)+e,d=4*(l*r+a)+e,p=u(i,n,o[c],a,o[d]);if(f===l)s[t+e]=p;else{d=4*(f*r+a)+e;var m=u(i,n,o[c=4*(f*r+n)+e],a,o[d]);s[t+e]=u(h,l,p,f,m)}},l=0;l<a;l++)for(var f=0;f<n;f++){var c=4*(l*n+f),d=f*r/n,p=Math.floor(d),m=Math.min(Math.ceil(d),r-1),b=l*i/a,g=Math.floor(b),_=Math.min(Math.ceil(b),i-1);h(c,0,d,p,m,b,g,_),h(c,1,d,p,m,b,g,_),h(c,2,d,p,m,b,g,_),h(c,3,d,p,m,b,g,_)}},_interpolate2D:function(e,r,i,n){for(var a=e.data,o=r.data,s=e.width,u=e.height,h=r.width,l=r.height,f=Math.max(1,Math.floor(s/h)),c=h*f,d=Math.max(1,Math.floor(u/l)),p=l*d,m=t.alloc(c*u*4),b=0;b<u;b++)for(var g=0;g<c;g++)for(var _=g*(s-1)/c,v=Math.floor(_),y=_-v,w=4*(b*s+v),x=4*(b*c+g),E=0;E<4;E++){var S=w+E,k=v>0?a[S-4]:2*a[S]-a[S+4],M=a[S],A=a[S+4],I=v<s-2?a[S+8]:2*a[S+4]-a[S];m[x+E]=n(k,M,A,I,y)}for(var T=t.alloc(c*p*4),R=0;R<p;R++)for(var P=0;P<c;P++)for(var C=R*(u-1)/p,O=Math.floor(C),L=C-O,B=4*(O*c+P),D=4*(R*c+P),N=0;N<4;N++){var z=B+N,j=O>0?m[z-4*c]:2*m[z]-m[z+4*c],U=m[z],F=m[z+4*c],G=O<u-2?m[z+8*c]:2*m[z+4*c]-m[z];T[D+N]=n(j,U,F,G,L)}var H=f*d;if(H>1)for(var q=0;q<l;q++)for(var W=0;W<h;W++){for(var Z=0,Y=0,V=0,X=0,Q=0,K=0;K<d;K++)for(var J=q*d+K,$=0;$<f;$++){var tt=4*(J*c+(W*f+$)),et=T[tt+3];et&&(Z+=T[tt],Y+=T[tt+1],V+=T[tt+2],Q++),X+=et}var rt=4*(q*h+W);o[rt]=Q?Math.round(Z/Q):0,o[rt+1]=Q?Math.round(Y/Q):0,o[rt+2]=Q?Math.round(V/Q):0,o[rt+3]=Math.round(X/H)}else r.data=T},bicubicInterpolation:function(t,e,r){return this._interpolate2D(t,e,r,(function(t,e,r,i,n){var a=i-r-t+e,o=t-e-a,s=r-t,u=e;return Math.max(0,Math.min(255,a*(n*n*n)+o*(n*n)+s*n+u))}))},hermiteInterpolation:function(t,e,r){return this._interpolate2D(t,e,r,(function(t,e,r,i,n){var a=e,o=.5*(r-t),s=t-2.5*e+2*r-.5*i,u=.5*(i-t)+1.5*(e-r);return Math.max(0,Math.min(255,Math.round(((u*n+s)*n+o)*n+a)))}))},bezierInterpolation:function(t,e,r){return this._interpolate2D(t,e,r,(function(t,e,r,i,n){var a=1-n,o=e*a*a*a,s=3*(e+(r-t)/4)*a*a*n,u=3*(r-(i-e)/4)*a*n*n,h=r*n*n*n;return Math.max(0,Math.min(255,Math.round(o+s+u+h)))}))}}}).call(this,t("buffer").Buffer)},{buffer:48}],224:[function(t,e,r){(function(i){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=t("@jimp/utils");function a(t,e){var r=(t%=360)*Math.PI/180,n=Math.cos(r),a=Math.sin(r),o=this.bitmap.width,s=this.bitmap.height;if(!0===e||"string"==typeof e){(o=Math.ceil(Math.abs(this.bitmap.width*n)+Math.abs(this.bitmap.height*a))+1)%2!=0&&o++,(s=Math.ceil(Math.abs(this.bitmap.width*a)+Math.abs(this.bitmap.height*n))+1)%2!=0&&s++;var u=this.cloneQuiet();this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,r){this.bitmap.data.writeUInt32BE(this._background,r)}));var h=Math.max(o,s,this.bitmap.width,this.bitmap.height);this.resize(h,h,e),this.blit(u,this.bitmap.width/2-u.bitmap.width/2,this.bitmap.height/2-u.bitmap.height/2)}var l=this.bitmap.width,f=this.bitmap.height,c=i.alloc(this.bitmap.data.length);function d(t,e){return function(r,i){return{x:r+t,y:i+e}}}for(var p=d(-l/2,-f/2),m=d(l/2+.5,f/2+.5),b=1;b<=f;b++)for(var g=1;g<=l;g++){var _=p(g,b),v=m(n*_.x-a*_.y,n*_.y+a*_.x),y=l*(b-1)+g-1<<2;if(v.x>=0&&v.x<l&&v.y>=0&&v.y<f){var w=(l*(0|v.y)+v.x|0)<<2,x=this.bitmap.data.readUInt32BE(w);c.writeUInt32BE(x,y)}else c.writeUInt32BE(this._background,y)}if(this.bitmap.data=c,!0===e||"string"==typeof e){var E=l/2-o/2,S=f/2-s/2;this.crop(E,S,o,s)}}r.default=function(){return{rotate:function(t,e,r){return null==e&&(e=!0),"function"==typeof e&&void 0===r&&(r=e,e=!0),"number"!=typeof t?n.throwError.call(this,"deg must be a number",r):"boolean"!=typeof e&&"string"!=typeof e?n.throwError.call(this,"mode must be a boolean or a string",r):(a.call(this,t,e,r),(0,n.isNodePattern)(r)&&r.call(this,null,this),this)}}},e.exports=r.default}).call(this,t("buffer").Buffer)},{"@jimp/utils":235,buffer:48}],225:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");r.default=function(){return{scale:function(t,e,r){if("number"!=typeof t)return i.throwError.call(this,"f must be a number",r);if(t<0)return i.throwError.call(this,"f must be a positive number",r);"function"==typeof e&&void 0===r&&(r=e,e=null);var n=this.bitmap.width*t,a=this.bitmap.height*t;return this.resize(n,a,e),(0,i.isNodePattern)(r)&&r.call(this,null,this),this},scaleToFit:function(t,e,r,n){if("number"!=typeof t||"number"!=typeof e)return i.throwError.call(this,"w and h must be numbers",n);"function"==typeof r&&void 0===n&&(n=r,r=null);var a=t/e>this.bitmap.width/this.bitmap.height?e/this.bitmap.height:t/this.bitmap.width;return this.scale(a,r),(0,i.isNodePattern)(n)&&n.call(this,null,this),this}}},e.exports=r.default},{"@jimp/utils":235}],226:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");r.default=function(){return{shadow:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof e&&(r=e,e={});var n=e,a=n.opacity,o=void 0===a?.7:a,s=n.size,u=void 0===s?1.1:s,h=n.x,l=void 0===h?-25:h,f=n.y,c=void 0===f?25:f,d=n.blur,p=void 0===d?5:d,m=this.clone(),b=this.clone();return b.scan(0,0,b.bitmap.width,b.bitmap.height,(function(e,r,i){b.bitmap.data[i]=0,b.bitmap.data[i+1]=0,b.bitmap.data[i+2]=0,b.bitmap.data[i+3]=b.constructor.limit255(b.bitmap.data[i+3]*o),t.bitmap.data[i]=0,t.bitmap.data[i+1]=0,t.bitmap.data[i+2]=0,t.bitmap.data[i+3]=0})),b.resize(b.bitmap.width*u,b.bitmap.height*u).blur(p),this.composite(b,l,c),this.composite(m,0,0),(0,i.isNodePattern)(r)&&r.call(this,null,this),this}}},e.exports=r.default},{"@jimp/utils":235}],227:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=t("@jimp/utils");r.default=function(){return{threshold:function(t,e){var r=this,n=t.max,a=t.replace,o=void 0===a?255:a,s=t.autoGreyscale,u=void 0===s||s;return"number"!=typeof n?i.throwError.call(this,"max must be a number",e):"number"!=typeof o?i.throwError.call(this,"replace must be a number",e):"boolean"!=typeof u?i.throwError.call(this,"autoGreyscale must be a boolean",e):(n=this.constructor.limit255(n),o=this.constructor.limit255(o),u&&this.greyscale(),this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,(function(t,e,i){var a=r.bitmap.data[i]<n?r.bitmap.data[i]:o;r.bitmap.data[i]=a,r.bitmap.data[i+1]=a,r.bitmap.data[i+2]=a})),(0,i.isNodePattern)(e)&&e.call(this,null,this),this)}}},e.exports=r.default},{"@jimp/utils":235}],228:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=i(t("@babel/runtime/helpers/toConsumableArray")),a=t("timm"),o=i(t("@jimp/plugin-blit")),s=i(t("@jimp/plugin-blur")),u=i(t("@jimp/plugin-circle")),h=i(t("@jimp/plugin-color")),l=i(t("@jimp/plugin-contain")),f=i(t("@jimp/plugin-cover")),c=i(t("@jimp/plugin-crop")),d=i(t("@jimp/plugin-displace")),p=i(t("@jimp/plugin-dither")),m=i(t("@jimp/plugin-fisheye")),b=i(t("@jimp/plugin-flip")),g=i(t("@jimp/plugin-gaussian")),_=i(t("@jimp/plugin-invert")),v=i(t("@jimp/plugin-mask")),y=i(t("@jimp/plugin-normalize")),w=i(t("@jimp/plugin-print")),x=i(t("@jimp/plugin-resize")),E=i(t("@jimp/plugin-rotate")),S=i(t("@jimp/plugin-scale")),k=i(t("@jimp/plugin-shadow")),M=i(t("@jimp/plugin-threshold")),A=[o.default,s.default,u.default,h.default,l.default,f.default,c.default,d.default,p.default,m.default,b.default,g.default,_.default,v.default,y.default,w.default,x.default,E.default,S.default,k.default,M.default];r.default=function(t){var e=A.map((function(e){var r=e(t)||{};return r.class||r.constants||(r={class:r}),r}));return a.mergeDeep.apply(void 0,(0,n.default)(e))},e.exports=r.default},{"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/helpers/toConsumableArray":20,"@jimp/plugin-blit":201,"@jimp/plugin-blur":203,"@jimp/plugin-circle":204,"@jimp/plugin-color":205,"@jimp/plugin-contain":206,"@jimp/plugin-cover":207,"@jimp/plugin-crop":208,"@jimp/plugin-displace":209,"@jimp/plugin-dither":210,"@jimp/plugin-fisheye":211,"@jimp/plugin-flip":212,"@jimp/plugin-gaussian":213,"@jimp/plugin-invert":214,"@jimp/plugin-mask":215,"@jimp/plugin-normalize":216,"@jimp/plugin-print":217,"@jimp/plugin-resize":221,"@jimp/plugin-rotate":224,"@jimp/plugin-scale":225,"@jimp/plugin-shadow":226,"@jimp/plugin-threshold":227,timm:177}],229:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=i(t("@babel/runtime/helpers/defineProperty")),a=i(t("bmp-js")),o=t("@jimp/utils"),s="image/bmp",u="image/x-ms-bmp";var h=function(t){return e=a.default.decode(t),(0,o.scan)({bitmap:e},0,0,e.width,e.height,(function(t,r,i){var n=this.bitmap.data[i+0],a=this.bitmap.data[i+1],o=this.bitmap.data[i+2],s=this.bitmap.data[i+3];this.bitmap.data[i+0]=s,this.bitmap.data[i+1]=o,this.bitmap.data[i+2]=a,this.bitmap.data[i+3]=e.is_with_alpha?n:255})).bitmap;var e},l=function(t){return a.default.encode(function(t){return(0,o.scan)(t,0,0,t.bitmap.width,t.bitmap.height,(function(t,e,r){var i=this.bitmap.data[r+0],n=this.bitmap.data[r+1],a=this.bitmap.data[r+2],o=this.bitmap.data[r+3];this.bitmap.data[r+0]=o,this.bitmap.data[r+1]=a,this.bitmap.data[r+2]=n,this.bitmap.data[r+3]=i})).bitmap}(t)).data};r.default=function(){var t,e;return{mime:(0,n.default)({},s,["bmp"]),constants:{MIME_BMP:s,MIME_X_MS_BMP:u},decoders:(t={},(0,n.default)(t,s,h),(0,n.default)(t,u,h),t),encoders:(e={},(0,n.default)(e,s,l),(0,n.default)(e,u,l),e)}},e.exports=r.default},{"@babel/runtime/helpers/defineProperty":7,"@babel/runtime/helpers/interopRequireDefault":11,"@jimp/utils":235,"bmp-js":30}],230:[function(t,e,r){(function(i){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=n(t("@babel/runtime/helpers/defineProperty")),o=n(t("omggif")),s=t("gifwrap"),u="image/gif";r.default=function(){return{mime:(0,a.default)({},u,["gif"]),constants:{MIME_GIF:u},decoders:(0,a.default)({},u,(function(t){var e=new o.default.GifReader(t),r=i.alloc(e.width*e.height*4);return e.decodeAndBlitFrameRGBA(0,r),{data:r,width:e.width,height:e.height}})),encoders:(0,a.default)({},u,(function(t){var e=new s.BitmapImage(t.bitmap);s.GifUtil.quantizeDekker(e,256);var r=new s.GifFrame(e);return(new s.GifCodec).encodeGif([r],{}).then((function(t){return t.buffer}))}))}},e.exports=r.default}).call(this,t("buffer").Buffer)},{"@babel/runtime/helpers/defineProperty":7,"@babel/runtime/helpers/interopRequireDefault":11,buffer:48,gifwrap:70,omggif:85}],231:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=i(t("@babel/runtime/helpers/defineProperty")),a=i(t("jpeg-js")),o=t("@jimp/utils"),s="image/jpeg";r.default=function(){return{mime:(0,n.default)({},s,["jpeg","jpg","jpe"]),constants:{MIME_JPEG:s},decoders:(0,n.default)({},s,a.default.decode),encoders:(0,n.default)({},s,(function(t){return a.default.encode(t.bitmap,t._quality).data})),class:{_quality:100,quality:function(t,e){return"number"!=typeof t?o.throwError.call(this,"n must be a number",e):t<0||t>100?o.throwError.call(this,"n must be a number 0 - 100",e):(this._quality=Math.round(t),(0,o.isNodePattern)(e)&&e.call(this,null,this),this)}}}},e.exports=r.default},{"@babel/runtime/helpers/defineProperty":7,"@babel/runtime/helpers/interopRequireDefault":11,"@jimp/utils":235,"jpeg-js":80}],232:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=i(t("@babel/runtime/helpers/defineProperty")),a=t("pngjs"),o=t("@jimp/utils"),s="image/png";r.default=function(){return{mime:(0,n.default)({},s,["png"]),constants:{MIME_PNG:s,PNG_FILTER_AUTO:-1,PNG_FILTER_NONE:0,PNG_FILTER_SUB:1,PNG_FILTER_UP:2,PNG_FILTER_AVERAGE:3,PNG_FILTER_PATH:4},hasAlpha:(0,n.default)({},s,!0),decoders:(0,n.default)({},s,a.PNG.sync.read),encoders:(0,n.default)({},s,(function(t){var e=new a.PNG({width:t.bitmap.width,height:t.bitmap.height});return e.data=t.bitmap.data,a.PNG.sync.write(e,{width:t.bitmap.width,height:t.bitmap.height,deflateLevel:t._deflateLevel,deflateStrategy:t._deflateStrategy,filterType:t._filterType,colorType:"number"==typeof t._colorType?t._colorType:t._rgba?6:2,inputHasAlpha:t._rgba})})),class:{_deflateLevel:9,_deflateStrategy:3,_filterType:-1,_colorType:null,deflateLevel:function(t,e){return"number"!=typeof t?o.throwError.call(this,"l must be a number",e):t<0||t>9?o.throwError.call(this,"l must be a number 0 - 9",e):(this._deflateLevel=Math.round(t),(0,o.isNodePattern)(e)&&e.call(this,null,this),this)},deflateStrategy:function(t,e){return"number"!=typeof t?o.throwError.call(this,"s must be a number",e):t<0||t>3?o.throwError.call(this,"s must be a number 0 - 3",e):(this._deflateStrategy=Math.round(t),(0,o.isNodePattern)(e)&&e.call(this,null,this),this)},filterType:function(t,e){return"number"!=typeof t?o.throwError.call(this,"n must be a number",e):t<-1||t>4?o.throwError.call(this,"n must be -1 (auto) or a number 0 - 4",e):(this._filterType=Math.round(t),(0,o.isNodePattern)(e)&&e.call(this,null,this),this)},colorType:function(t,e){return"number"!=typeof t?o.throwError.call(this,"s must be a number",e):0!==t&&2!==t&&4!==t&&6!==t?o.throwError.call(this,"s must be a number 0, 2, 4, 6.",e):(this._colorType=Math.round(t),(0,o.isNodePattern)(e)&&e.call(this,null,this),this)}}}},e.exports=r.default},{"@babel/runtime/helpers/defineProperty":7,"@babel/runtime/helpers/interopRequireDefault":11,"@jimp/utils":235,pngjs:129}],233:[function(t,e,r){(function(i){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=n(t("@babel/runtime/helpers/defineProperty")),o=n(t("utif")),s="image/tiff";r.default=function(){return{mime:(0,a.default)({},s,["tiff","tif"]),constants:{MIME_TIFF:s},decoders:(0,a.default)({},s,(function(t){var e=o.default.decode(t),r=e[0];o.default.decodeImages(t,e);var n=o.default.toRGBA8(r);return{data:i.from(n),width:r.t256[0],height:r.t257[0]}})),encoders:(0,a.default)({},s,(function(t){var e=o.default.encodeImage(t.bitmap.data,t.bitmap.width,t.bitmap.height);return i.from(e)}))}},e.exports=r.default}).call(this,t("buffer").Buffer)},{"@babel/runtime/helpers/defineProperty":7,"@babel/runtime/helpers/interopRequireDefault":11,buffer:48,utif:182}],234:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=t("timm"),a=i(t("@jimp/jpeg")),o=i(t("@jimp/png")),s=i(t("@jimp/bmp")),u=i(t("@jimp/tiff")),h=i(t("@jimp/gif"));r.default=function(){return(0,n.mergeDeep)((0,a.default)(),(0,o.default)(),(0,s.default)(),(0,u.default)(),(0,h.default)())},e.exports=r.default},{"@babel/runtime/helpers/interopRequireDefault":11,"@jimp/bmp":229,"@jimp/gif":230,"@jimp/jpeg":231,"@jimp/png":232,"@jimp/tiff":233,timm:177}],235:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.isNodePattern=function(t){if(void 0===t)return!1;if("function"!=typeof t)throw new TypeError("Callback must be a function");return!0},r.throwError=function(t,e){"string"==typeof t&&(t=new Error(t));if("function"==typeof e)return e.call(this,t);throw t},r.scan=function(t,e,r,i,n,a){e=Math.round(e),r=Math.round(r),i=Math.round(i),n=Math.round(n);for(var o=r;o<r+n;o++)for(var s=e;s<e+i;s++){var u=t.bitmap.width*o+s<<2;a.call(t,s,o,u)}return t},r.scanIterator=o;var n=i(t("@babel/runtime/regenerator")),a=n.default.mark(o);function o(t,e,r,i,o){var s,u,h;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:e=Math.round(e),r=Math.round(r),i=Math.round(i),o=Math.round(o),s=r;case 5:if(!(s<r+o)){n.next=17;break}u=e;case 7:if(!(u<e+i)){n.next=14;break}return h=t.bitmap.width*s+u<<2,n.next=11,{x:u,y:s,idx:h,image:t};case 11:u++,n.next=7;break;case 14:s++,n.next=5;break;case 17:case"end":return n.stop()}}),a)}},{"@babel/runtime/helpers/interopRequireDefault":11,"@babel/runtime/regenerator":22}]},{},[200])(200)}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment