1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1944],{16036:t=>{"use strict";function e(t,e){this.x=t||0,this.y=e||0}e.prototype={copy:function(){return new e(this.x,this.y)}},t.exports=e},20544:(t,e,r)=>{"use strict";var i=r(89045),n=null;try{n=r(21441)}catch(t){}var a=r(34581);function o(t,e){return 256*t+e}function s(t,e){if((t="number"==typeof t?i.clamp(Math.round(t),0,255):0)>(e="number"==typeof e?i.clamp(Math.round(e),0,255):255))throw Error('Invalid range "'+t+"..."+e+'"');return[t,e]}function h(t,e){if(this.data=null,this.pixels=0,this._sortedIndexes=null,this._cachedStats={},this._lookupTableH=null,"number"==typeof t)this._createArray(t);else if(t instanceof a)this._collectValuesBitmap(t);else if(n&&t instanceof n)this._collectValuesJimp(t,e);else throw Error("Unsupported image source")}h.MODE_LUMINANCE="luminance",h.MODE_R="r",h.MODE_G="g",h.MODE_B="b",h.prototype={_createArray:function(t){var e=t<=256?Uint8Array:t<=65536?Uint16Array:Uint32Array;return this.pixels=t,this.data=new e(256)},_collectValuesJimp:function(t,e){var r=t.bitmap.data,n=this._createArray(t.bitmap.width*t.bitmap.height);t.scan(0,0,t.bitmap.width,t.bitmap.height,function(t,a,o){var s=e===h.MODE_R?r[o]:e===h.MODE_G?r[o+1]:e===h.MODE_B?r[o+2]:i.luminance(r[o],r[o+1],r[o+2]);n[s]++})},_collectValuesBitmap:function(t){for(var e,r=this._createArray(t.size),i=t.data.length,n=0;n<i;n++)e=t.data[n],r[e]++},_getSortedIndexes:function(t){if(!t&&this._sortedIndexes)return this._sortedIndexes;for(var e=this.data,r=Array(256),i=0;i<256;i++)r[i]=i;return r.sort(function(t,r){return e[t]>e[r]?1:e[t]<e[r]?-1:0}),this._sortedIndexes=r,r},_thresholdingBuildLookupTable:function(){var t,e,r,i,n=new Float64Array(65536),a=new Float64Array(65536),s=new Float64Array(65536),h=this.pixels;for(t=1;t<256;++t)r=o(t,t),i=this.data[t]/h,n[r]=i,a[r]=t*i;for(t=1;t<255;++t)i=this.data[t+1]/h,n[(r=o(1,t))+1]=n[r]+i,a[r+1]=a[r]+(t+1)*i;for(t=2;t<256;t++)for(e=t+1;e<256;e++)n[o(t,e)]=n[o(1,e)]-n[o(1,t-1)],a[o(t,e)]=a[o(1,e)]-a[o(1,t-1)];for(t=1;t<256;++t)for(e=t+1;e<256;e++)s[r=o(t,e)]=0!==n[r]?a[r]*a[r]/n[r]:0;return this._lookupTableH=s},multilevelThresholding:function(t,e,r){if(r=(e=s(e,r))[1],e=e[0],(t=Math.min(r-e-2,~~t))<1)return[];this._lookupTableH||this._thresholdingBuildLookupTable();var i=this._lookupTableH,n=null,a=0;return t>4&&console.log("[Warning]: Threshold computation for more than 5 levels may take a long time"),!function e(s,h,u,l){s=(s||0)+1,h=h||0,u=u||Array(t);for(var f,c=(l=l||0)+1,d=s;d<r-t+l;d++)f=h+i[o(s,d)],u[c-1]=d,c+1<t+1?e(d,f,u,c):(f+=i[o(d+1,r)],a<f&&(a=f,n=u.slice()))}(e||0),n||[]},autoThreshold:function(t,e){var r=this.multilevelThresholding(1,t,e);return r.length?r[0]:null},getDominantColor:function(t,e,r){e=(t=s(t,e))[1],t=t[0],r=r||1;var n,a,o,h=this.data,u=-1,l=-1;if(t===e)return h[t]?t:-1;for(n=t;n<=e;n++){for(o=0,a=~~-(r/2);a<r;a++)o+=i.between(n+a,0,255)?h[n+a]:0;var f=o>l,c=l===o&&(u<0||h[n]>h[u]);(f||c)&&(u=n,l=o)}return l<=0?-1:u},getStats:function(t,e,r){if(e=(t=s(t,e))[1],t=t[0],!r&&this._cachedStats[t+"-"+e])return this._cachedStats[t+"-"+e];var i,n,a,o,h,u,l,f=this.data,c=this._getSortedIndexes(),d=0,p=null,m=0,b=0,g=0,_=0,v=0;for(h=t;h<=e;h++)d+=f[h],g+=f[h]*h,_+=+(0!==f[h]),v<f[h]&&(v=f[h]);for(h=0,i=g/d,a=d/(e-t),o=d/_,n=Math.floor(d/2);h<256;h++)u=f[l=c[h]],l<t||l>e||(b+=u,m+=Math.pow(l-i,2)*u,null===p&&b>=n&&(p=l));return this._cachedStats[t+"-"+e]={levels:{mean:i,median:p,stdDev:Math.sqrt(m/d),unique:_},pixelsPerLevel:{mean:a,median:o,peak:v},pixels:d}}},t.exports=h},21441:(t,e,r)=>{if((void 0===i||!i)&&"undefined"!=typeof self)var i=self;t.exports=function(){var t;return(function t(e,r,i){function n(o,s){if(!r[o]){if(!e[o]){if(a)return a(o,!0);var h=Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){return n(e[o][1][t]||t)},u,u.exports,t,e,r,i)}return r[o].exports}for(var a=void 0,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=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 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 TypeError("Cannot call a class as a function")}},{}],5:[function(t,e,r){var i=t("./setPrototypeOf");function n(t,r,a){return!function(){if("undefined"==typeof Reflect||!Reflect.construct||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}}()?e.exports=n=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}:e.exports=n=Reflect.construct,n.apply(null,arguments)}
1e.exports=n},{"./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 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 TypeError("Invalid attempt to destructure non-iterable instance")}},{}],16:[function(t,e,r){e.exports=function(){throw 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)?e:n(t)}},{"../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 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,h="str
1ing"==typeof t?"":[];if(!this.isValid(t))throw 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(e=0,r=0,i=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,h=this.dstAlphabet.slice(r,r+1).concat(h)}while(0!==i);return h},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,n){(function(r){"use strict";var i=t("object-assign");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)}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,h=Array.prototype.slice,u="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(u)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(u||!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))return r?t===e:t==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,a,s=y(t),u=y(e);if(s&&!u||!s&&u)return!1;if(s)return v(t=h.call(t),e=h.call(e),r);var l=E(t),f=E(e);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),a=l.length-1;a>=0;a--)if(l[a]!==f[a])return!1;for(a=l.length-1;a>=0;a--)if(!v(t[n=l[a]],e[n],r,i))return!1;return!0}(t,e,r,i))}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){if("function"!=typeof e)throw 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 n,a="string"==typeof i,s=!t&&o.isError(n),h=!t&&n&&!r;if((s&&a&&w(n,r)||h)&&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=(e=this,m(b(e.actual),128)+" "+e.operator+" "+m(b(e.expected),128)),this.generatedMessage=!0);var e,r=t.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var i=Error();if(i.stack){var n=i.stack,a=p(r),o=n.indexOf("\n"+a);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},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}
1,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,void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{})},{"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,n){(function(e,r){var i,a=/%[sdj%]/g;n.format=function(t){if(!g(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(s(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,n=i.length,o=String(t).replace(a,function(t){if("%%"===t)return"%";if(r>=n)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}}),h=i[r];r<n;h=i[++r])m(h)||!y(h)?o+=" "+h:o+=" "+s(h);return o},n.deprecate=function(t,i){if(_(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return function(){if(!a){if(e.throwDeprecation)throw Error(i);e.traceDeprecation?console.trace(i):console.error(i),a=!0}return t.apply(this,arguments)}};var o={};function s(t,e){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(e)?r.showHidden=e:e&&n._extend(r,e),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=h),l(r,t,r.depth)}function h(t,e){var r=s.styles[e];return r?"\x1b["+s.colors[r][0]+"m"+t+"\x1b["+s.colors[r][1]+"m":t}function u(t,e){return t}function l(t,e,r){if(t.customInspect&&e&&E(e.inspect)&&e.inspect!==n.inspect&&!(e.constructor&&e.constructor.prototype===e)){var i,a,o,s,h,u,y=e.inspect(r,t);return g(y)||(y=l(t,y,r)),y}var S=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")}return b(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,e);if(S)return S;var k=Object.keys(e),M=(h={},k.forEach(function(t,e){h[t]=!0}),h);if(t.showHidden&&(k=Object.getOwnPropertyNames(e)),x(e)&&(k.indexOf("message")>=0||k.indexOf("description")>=0))return f(e);if(0===k.length){if(E(e)){var I=e.name?": "+e.name:"";return t.stylize("[Function"+I+"]","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 T="",R=!1,P=["{","}"];if(d(e)&&(R=!0,P=["[","]"]),E(e)&&(T=" [Function"+(e.name?": "+e.name:"")+"]"),v(e)&&(T=" "+RegExp.prototype.toString.call(e)),w(e)&&(T=" "+Date.prototype.toUTCString.call(e)),x(e)&&(T=" "+f(e)),0===k.length&&(!R||0==e.length))return P[0]+T+P[1];if(r<0)if(v(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");else return t.stylize("[Object]","special");return t.seen.push(e),u=R?function(t,e,r,i,n){for(var a=[],o=0,s=e.length;o<s;++o)A(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,r,M,k):k.map(function(i){return c(t,e,r,M,i,R)}),t.seen.pop(),i=u,a=T,o=P,s=0,i.reduce(function(t,e){return s++,e.indexOf("\n")>=0&&s++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?o[0]+(""===a?"":a+"\n ")+" "+i.join(",\n ")+" "+o[1]:o[0]+a+" "+i.join(", ")+" "+o[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function c(t,e,r,i,n,a){var o,s,h;if((h=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?s=h.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):h.set&&(s=t.stylize("[
1Setter]","special")),A(i,n)||(o="["+n+"]"),!s&&(0>t.seen.indexOf(h.value)?(s=m(r)?l(t,h.value,null):l(t,h.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)}n.debuglog=function(t){if(_(i)&&(i=e.env.NODE_DEBUG||""),!o[t=t.toUpperCase()])if(RegExp("\\b"+t+"\\b","i").test(i)){var r=e.pid;o[t]=function(){var e=n.format.apply(n,arguments);console.error("%s %d: %s",t,r,e)}}else o[t]=function(){};return o[t]},n.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"},n.isArray=d,n.isBoolean=p,n.isNull=m,n.isNullOrUndefined=function(t){return null==t},n.isNumber=b,n.isString=g,n.isSymbol=function(t){return"symbol"==typeof t},n.isUndefined=_,n.isRegExp=v,n.isObject=y,n.isDate=w,n.isError=x,n.isFunction=E,n.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},n.isBuffer=t("./support/isBuffer");var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)}n.log=function(){var t,e;console.log("%s - %s",(e=[k((t=new Date).getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],e].join(" ")),n.format.apply(n,arguments))},n.inherits=t("inherits"),n._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}}
1).call(this,t("_process"),void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{})},{"./support/isBuffer":27,_process:133,inherits:26}],29:[function(t,e,r){"use strict";r.byteLength=function(t){var e=u(t),r=e[0],i=e[1];return(r+i)*3/4-i},r.toByteArray=function(t){var e,r,i=u(t),o=i[0],s=i[1],h=new a((o+s)*3/4-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)],h[l++]=e>>16&255,h[l++]=e>>8&255,h[l++]=255&e;return 2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[l++]=255&e),1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[l++]=e>>8&255,h[l++]=255&e),h},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,a=[],o=0,s=r-n;o<s;o+=16383)a.push(function(t,e,r){for(var n,a=[],o=e;o<r;o+=3)n=(t[o]<<16&0xff0000)+(t[o+1]<<8&65280)+(255&t[o+2]),a.push(i[n>>18&63]+i[n>>12&63]+i[n>>6&63]+i[63&n]);return a.join("")}(t,o,o+16383>s?s:o+16383));return 1===n?a.push(i[(e=t[r-1])>>2]+i[e<<4&63]+"=="):2===n&&a.push(i[(e=(t[r-2]<<8)+t[r-1])>>10]+i[e>>4&63]+i[e<<2&63]+"="),a.join("")};for(var i=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,h=o.length;s<h;++s)i[s]=o[s],n[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var i=r===e?0:4-r%4;return[r,i]}n[45]=62,n[95]=63},{}],30:[function(t,e,r){e.exports={encode:t("./lib/encoder"),decode:t("./lib/decoder")}},{"./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 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=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(){for(var t=Math.ceil(this.width/8),e=t%4,r=this.height>=0?this.height-1:-this.height,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;s++)if(8*n+s<this.width){var h=this.palette[a>>7-s&1];
1this.data[o+4*s]=0,this.data[o+4*s+1]=h.blue,this.data[o+4*s+2]=h.green,this.data[o+4*s+3]=h.red}else break;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}else if(1==n)break;else 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++),h=0;h<n;h++)r?u.call(this,15&s):u.call(this,(240&s)>>4),1&h&&h+1<n&&(s=this.buffer.readUInt8(this.pos++)),r=!r;(n+1>>1&1)==1&&this.pos++}else for(var h=0;h<i;h++)r?u.call(this,15&n):u.call(this,(240&n)>>4),r=!r}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 for(var l=Math.ceil(this.width/2),f=l%4,o=this.height-1;o>=0;o--){for(var c=this.bottom_up?o:this.height-1-o,a=0;a<l;a++){var n=this.buffer.readUInt8(this.pos++),t=c*this.width*4+2*a*4,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}else if(1==i)break;else 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++)s.call(this,this.buffer.readUInt8(this.pos++));!0&i&&this.pos++}else for(var o=0;o<r;o++)s.call(this,i)}function s(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 for(var h=this.width%4,a=this.height-1;a>=0;a--){for(var u=this.bottom_up?a:this.height-1-a,n=0;n<this.width;n++){var i=this.buffer.readUInt8(this.pos++),t=u*this.width*4+4*n;if(i<this.palette.length){var l=this.palette[i];this.data[t]=0,this.data[t+1]=l.blue,this.data[t+2]=l.green,this.data[t+3]=l.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,h=(a>>10&e)/e*255|0,u=a>>15?255:0,l=i*this.width*4+4*n;this.data[l]=u,this.data[l+1]=o,this.data[l+2]=s,this.data[l+3]=h}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],h=(o&this.maskGreen)>>e[1],u=(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]=h,this.data[l+3]=u}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(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 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"),h=t("pako/lib/zlib/constants");for(var u in h)r[u]=h[u];function l(t){if("number"!=typeof t||t<r.DEFLATE||t>r.UNZIP)throw 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}r.NONE=0,r.DEFLATE=1,r.INFLATE=2,r.GZIP=3,r.GUNZIP=4,r.DEFLATERAW=5,r.INFLATERAW=6,r.UNZIP=7,l.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}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,h,u,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 Error("Invalid flush value");if(null==o&&(o=i.alloc(0),h=0,s=0),this.strm.avail_in=h,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=f,this.strm.output=u,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;
1if(31===this.strm.input[t]){if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break}else{this.mode=r.INFLATE;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 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 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 Error("deflateParams Not supported")},l.prototype.reset=function(){this._reset(),this._setDictionary()},l.prototype._init=function(t,e,i,n,h){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 Error("Unknown mode "+this.mode)}this.err!==r.Z_OK&&this._error("Init error"),this.dictionary=h,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,h=t("buffer").kMaxLength,u="Cannot create final Buffer. It would be larger than 0x"+h.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_ER
1ROR: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>=h?o=RangeError(u):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 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 Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!M(t.finishFlush))throw 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 Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<r.Z_MIN_WINDOWBITS||t.windowBits>r.Z_MAX_WINDOWBITS))throw Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<r.Z_MIN_LEVEL||t.level>r.Z_MAX_LEVEL))throw Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<r.Z_MIN_MEMLEVEL||t.memLevel>r.Z_MAX_MEMLEVEL))throw 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 Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!i.isBuffer(t.dictionary))throw 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=Error(t);i.errno=e,i.code=r.codes[e],s.emit("error",i)};var h=r.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(h=t.level);var u=r.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(u=t.strategy),this._handle.init(t.windowBits||r.Z_DEFAULT_WINDOWBITS,h,t.memLevel||r.Z_DEFAULT_MEMLEVEL,u,t.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=h,this._strategy=u,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 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 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?void(s?n=this._finishFlushFlag:(n=this._flushFlag,t.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),this._processChunk(t,n,r)):r(Error("zlib binding closed")):r(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>=h)throw I(this),RangeError(u);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 _(h,u){if(this&&(this.buffer=null,this.callback=null),!l._hadError){var c=a-u;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===u||l._offset>=l._chunkSize)&&(a=l._chunkSize,l._offset=0,l._buffer=i.allocUnsafe(l._chunkSize)),0===u){if(o+=n-h,n=h,!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"))}
1,{"./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;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 TypeError(r+"must be non-object");for(var i in r)Object.prototype.hasOwnProperty.call(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 n={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray)return void t.set(e.subarray(r,r+i),n);for(var a=0;a<i;a++)t[n+a]=e[r+a]},flattenChunks:function(t){var e,r,i,n,a,o;for(e=0,i=0,r=t.length;e<r;e++)i+=t[e].length;for(e=0,o=new Uint8Array(i),n=0,r=t.length;e<r;e++)a=t[e],o.set(a,n),n+=a.length;return o}},a={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,n)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(i)},{}],37:[function(t,e,r){"use strict";e.exports=function(t,e,r,i){for(var n=65535&t,a=t>>>16&65535,o=0;0!==r;){o=r>2e3?2e3:r,r-=o;do a=a+(n=n+e[i++]|0)|0;while(--o);n%=65521,a%=65521}return n|a<<16}},{}],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?0xedb88320^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,n){var a=n+r;t^=-1;for(var o=n;o<a;o++)t=t>>>8^i[(t^e[o])&255];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"),h=t("./messages"),u=573;function l(t,e){return t.msg=h[e],e}function f(t){return(t<<1)-9*(t>4)}function c(t){for(var e=t.length;--e>=0;)t[e]=0}function d(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 p(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,d(t.strm)}function m(t,e){t.pending_buf[t.pending++]=e}function b(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function g(t,e){var r,i,n=t.max_chain_length,a=t.strstart,o=t.prev_length,s=t.nice_match,h=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,u=t.window,l=t.w_mask,f=t.prev,c=t.strstart+258,d=u[a+o-1],p=u[a+o];t.prev_length>=t.good_match&&(n>>=2),s>t.lookahead&&(s=t.lookahead);do{if(u[(r=e)+o]!==p||u[r+o-1]!==d||u[r]!==u[a]||u[++r]!==u[a+1])continue;a+=2,r++;do;while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&a<c);if(i=258-(c-a),a=c-258,i>o){if(t.match_start=e,o=i,i>=s)break;d=u[a+o-1],p=u[a+o]}}while((e=f[e&l])>h&&0!=--n);return o<=t.lookahead?o:t.lookahead}function _(t){var e,r,i,a,h,u=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=u+(u-262)){n.arraySet(t.window,t.window,u,u,0),t.match_start-=u,t.strstart-=u,t.block_start-=u,e=r=t.hash_size;do i=t.head[--e],t.head[e]=i>=u?i-u:0;while(--r);e=r=u;do i=t.prev[--e],t.prev[e]=i>=u?i-u:0;while(--r);a+=u}if(0===t.strm.avail_in)break;if(r=function(t,e,r,i){var a=t.avail_in;return(a>i&&(a=i),0===a)?0:(t.avail_in-=a,n.arraySet(e,t.input,t.next_in,a,r),1===t.state.wrap?t.adler=o(t.adler,e,a,r):2===t.state.wrap&&(t.adler=s(t.adler,e,a,r)),t.next_in+=a,t.total_in+=a,a)}(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=r,t.lookahead+t.insert>=3)for(h=t.strstart-t.insert,t.ins_h=t.window[h],t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+3-1])&t.hash_mask,t.prev[h&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=h,h++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function v(t,e){for(var r,i;;){if(t.lookahead<262){if(_(t),t.lookahead<262&&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-262&&(t.match_length=g(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&&(p(t,!1),0===t.strm.avail_out))return 1}return(t.insert=t.strstart<2?t.strstart:2,4===e)?(p(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}function y(t,e){for(var r,i,n;;){if(t.lookahead<262){if(_(t),t.lookahead<262&&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-262&&(t.match_length=g(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&&(p(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]))&&p(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)?(p(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}function w(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 x(){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(2*u),this.dyn_dtree=new n.Buf16(122),this.bl_tree=new n.Buf16(78),c(this.dyn_ltree),
vendor: 7,442 bytes, line 1
1c(this.dyn_dtree),c(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),c(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(573),c(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 E(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:113,t.adler=+(2!==e.wrap),e.last_flush=0,a._tr_init(e),0):l(t,-2)}function S(t){var e,r=E(t);return 0===r&&((e=t.state).window_size=2*e.w_size,c(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 k(t,e,r,i,a,o){if(!t)return -2;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 l(t,-2);8===i&&(i=9);var h=new x;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=i,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=a+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new n.Buf8(2*h.w_size),h.head=new n.Buf16(h.hash_size),h.prev=new n.Buf16(h.w_size),h.lit_bufsize=1<<a+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new n.Buf8(h.pending_buf_size),h.d_buf=+h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=o,h.method=r,S(t)}i=[new w(0,0,0,0,function(t,e){var r=65535;for(65535>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(_(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,p(t,!1),0===t.strm.avail_out)||t.strstart-t.block_start>=t.w_size-262&&(p(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,4===e)?(p(t,!0),0===t.strm.avail_out)?3:4:(t.strstart>t.block_start&&(p(t,!1),t.strm.avail_out),1)}),new w(4,4,8,4,v),new w(4,5,16,8,v),new w(4,6,32,32,v),new w(4,4,16,16,y),new w(8,16,32,32,y),new w(8,16,128,128,y),new w(8,32,128,256,y),new w(32,128,258,1024,y),new w(32,258,258,4096,y)],r.deflateInit=function(t,e){return k(t,e,8,15,8,0)},r.deflateInit2=k,r.deflateReset=S,r.deflateResetKeep=E,r.deflateSetHeader=function(t,e){return t&&t.state&&2===t.state.wrap?(t.state.gzhead=e,0):-2},r.deflate=function(t,e){if(!t||!t.state||e>5||e<0)return t?l(t,-2):-2;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||666===n.status&&4!==e)return l(t,0===t.avail_out?-5:-2);if(n.strm=t,r=n.last_flush,n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,m(n,31),m(n,139),m(n,8),n.gzhead?(m(n,+!!n.gzhead.text+2*!!n.gzhead.hcrc+4*!!n.gzhead.extra+8*!!n.gzhead.name+16*!!n.gzhead.comment),m(n,255&n.gzhead.time),m(n,n.gzhead.time>>8&255),m(n,n.gzhead.time>>16&255),m(n,n.gzhead.time>>24&255),m(n,9===n.level?2:4*(n.strategy>=2||n.level<2)),m(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(m(n,255&n.gzhead.extra.length),m(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):(m(n,0),m(n,0),m(n,0),m(n,0),m(n,0),m(n,9===n.level?2:4*(n.strategy>=2||n.level<2)),m(n,3),n.status=113);else{var r,n,o,h,u=8+(n.w_bits-8<<4)<<8;u|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(u|=32),u+=31-u%31,n.status=113,b(n,u),0!==n.strstart&&(b(n,t.adler>>>16),b(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)),d(t),o=n.pending,n.pending!==n.pending_buf_size));)m(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)),d(t),o=n.pending,n.pending===n.pending_buf_size)){h=1;break}h=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,m(n,h)}while(0!==h);n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),0===h&&(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)),d(t),o=n.pending,n.pending===n.pending_buf_size)){h=1;break}h=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,m(n,h)}while(0!==h);n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),0===h&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&d(t),n.pending+2<=n.pending_buf_size&&(m(n,255&t.adler),m(n,t.adler>>8&255),t.adler=0,n.status=113)):n.status=113),0!==n.pending){if(d(t),0===t.avail_out)return n.last_flush=-1,0}else if(0===t.avail_in&&f(e)<=f(r)&&4!==e)return l(t,-5);if(666===n.status&&0!==t.avail_in)return l(t,-5);if(0!==t.avail_in||0!==n.lookahead||0!==e&&666!==n.status){var g=2===n.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(_(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&&(p(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,4===e)?(p(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(p(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<=258){if(_(t),t.lookahead<=258&&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+258;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=258-(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&&(p(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,4===e)?(p(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}(n,e):i[n.level].func(n,e);if((3===g||4===g)&&(n.status=666),1===g||3===g)return 0===t.avail_out&&(n.last_flush=-1),0;if(2===g&&(1===e?a._tr_align(n):5!==e&&(a._tr_stored_block(n,0,0,!1),3===e&&(c(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),d(t),0===t.avail_out))return n.last_flush=-1,0}return 4!==e?0:n.wrap<=0?1:(2===n.wrap?(m(n,255&t.adler),m(n,t.adler>>8&255),m(n,t.adler>>16&255),m(n,t.adler>>24&255),m(n,255&t.total_in),m(n,t.total_in>>8&255),m(n,t.total_in>>16&255),m(n,t.total_in>>24&255)):(b(n,t.adler>>>16),b(n,65535&t.adler)),d(t),n.wrap>0&&(n.wrap=-n.wrap),+(0===n.pending))},r.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?l(t,-2):(t.state=null,113===e?l(t,-3):0):-2},r.deflateSetDictionary=function(t,e){var r,i,a,s,h,u,l,f,d=e.length;
1if(!t||!t.state||2===(s=(r=t.state).wrap)||1===s&&42!==r.status||r.lookahead)return -2;for(1===s&&(t.adler=o(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(c(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new n.Buf8(r.w_size),n.arraySet(f,e,d-r.w_size,r.w_size,0),e=f,d=r.w_size),h=t.avail_in,u=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=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,_(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=u,t.input=l,t.avail_in=h,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,h,u,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),h=r.dmax,u=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 for(p<15&&(d+=k[i++]<<p,p+=8,d+=k[i++]<<p,p+=8),v=m[d&g];;){if(d>>>=y=v>>>24,p-=y,0==(y=v>>>16&255))M[a++]=65535&v;else if(16&y)for(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&_];;){if(d>>>=y=v>>>24,p-=y,16&(y=v>>>16&255)){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)>h){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+=u-y,y<w){w-=y;do M[a++]=c[E++];while(--y);E=a-x,S=M}}else if(f<y){if(E+=u+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++]))}}else if((64&y)==0){v=b[(65535&v)+(d&(1<<y)-1)];continue}else{t.msg="invalid distance code",r.mode=30;break t}break}else if((64&y)==0){v=m[(65535&v)+(d&(1<<y)-1)];continue}else if(32&y){r.mode=12;break t}else{t.msg="invalid literal/length code",r.mode=30;break t}break}while(i<n&&a<s);i-=w=p>>3,p-=w<<3,d&=(1<<p)-1,t.next_in=i,t.next_out=a,t.avail_in=i<n?5+(n-i):5-(i-n),t.avail_out=a<s?257+(s-a):257-(a-s),r.hold=d,r.bits=p}},{}],42:[function(t,e,r){"use strict";var i,n,a=t("../utils/common"),o=t("./adler32"),s=t("./crc32"),h=t("./inffast"),u=t("./inftrees");function l(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(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 a.Buf32(852),e.distcode=e.distdyn=new a.Buf32(592),e.sane=1,e.back=-1,0):-2}function d(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,c(t)):-2}function p(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?-2:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,d(t)):-2}function m(t,e){var r,i;return t?(t.state=i=new f,i.window=null,0!==(r=p(t,e))&&(t.state=null),r):-2}var b=!0;function g(t,e,r,i){var n,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new a.Buf8(o.wsize)),i>=o.wsize?(a.arraySet(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((n=o.wsize-o.wnext)>i&&(n=i),a.arraySet(o.window,e,r-i,n,o.wnext),(i-=n)?(a.arraySet(o.window,e,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=n))),0}r.inflateReset=d,r.inflateReset2=p,r.inflateResetKeep=c,r.inflateInit=function(t){return m(t,15)},r.inflateInit2=m,r.inflate=function(t,e){var r,f,c,d,p,m,_,v,y,w,x,E,S,k,M,A,I,T,R,P,O,C,L,B,D=0,N=new a.Buf8(4),z=[
vendor: 6,680 bytes, line 1
116,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 -2;12===(r=t.state).mode&&(r.mode=13),p=t.next_out,c=t.output,_=t.avail_out,d=t.next_in,f=t.input,m=t.avail_in,v=r.hold,y=r.bits,w=m,x=_,C=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;y<16;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}if(2&r.wrap&&35615===v){r.check=0,N[0]=255&v,N[1]=v>>>8&255,r.check=s(r.check,N,2,0),v=0,y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&v)<<8)+(v>>8))%31){t.msg="incorrect header check",r.mode=30;break}if((15&v)!=8){t.msg="unknown compression method",r.mode=30;break}if(v>>>=4,y-=4,O=(15&v)+8,0===r.wbits)r.wbits=O;else if(O>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<O,t.adler=r.check=1,r.mode=512&v?10:12,v=0,y=0;break;case 2:for(;y<16;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}if(r.flags=v,(255&r.flags)!=8){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=v>>8&1),512&r.flags&&(N[0]=255&v,N[1]=v>>>8&255,r.check=s(r.check,N,2,0)),v=0,y=0,r.mode=3;case 3:for(;y<32;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}r.head&&(r.head.time=v),512&r.flags&&(N[0]=255&v,N[1]=v>>>8&255,N[2]=v>>>16&255,N[3]=v>>>24&255,r.check=s(r.check,N,4,0)),v=0,y=0,r.mode=4;case 4:for(;y<16;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}r.head&&(r.head.xflags=255&v,r.head.os=v>>8),512&r.flags&&(N[0]=255&v,N[1]=v>>>8&255,r.check=s(r.check,N,2,0)),v=0,y=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}r.length=v,r.head&&(r.head.extra_len=v),512&r.flags&&(N[0]=255&v,N[1]=v>>>8&255,r.check=s(r.check,N,2,0)),v=0,y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((E=r.length)>m&&(E=m),E&&(r.head&&(O=r.head.extra_len-r.length,r.head.extra||(r.head.extra=Array(r.head.extra_len)),a.arraySet(r.head.extra,f,d,E,O)),512&r.flags&&(r.check=s(r.check,f,E,d)),m-=E,d+=E,r.length-=E),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===m)break e;E=0;do O=f[d+E++],r.head&&O&&r.length<65536&&(r.head.name+=String.fromCharCode(O));while(O&&E<m);if(512&r.flags&&(r.check=s(r.check,f,E,d)),m-=E,d+=E,O)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===m)break e;E=0;do O=f[d+E++],r.head&&O&&r.length<65536&&(r.head.comment+=String.fromCharCode(O));while(O&&E<m);if(512&r.flags&&(r.check=s(r.check,f,E,d)),m-=E,d+=E,O)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;y<16;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}if(v!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}v=0,y=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;y<32;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}t.adler=r.check=l(v),v=0,y=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=p,t.avail_out=_,t.next_in=d,t.avail_in=m,r.hold=v,r.bits=y,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break e;case 13:if(r.last){v>>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}switch(r.last=1&v,y-=1,3&(v>>>=1)){case 0:r.mode=14;break;case 1:if(!function(t){if(b){var e;for(i=new a.Buf32(512),n=new a.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(u(1,t.lens,0,288,i,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;u(2,t.lens,0,32,n,0,t.work,{bits:5}),b=!1}t.lencode=i,t.lenbits=9,t.distcode=n,t.distbits=5}(r),r.mode=20,6===e){v>>>=2,y-=2;break e}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}v>>>=2,y-=2;break;case 14:for(v>>>=7&y,y-=7&y;y<32;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}if((65535&v)!=(v>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&v,v=0,y=0,r.mode=15,6===e)break e;case 15:r.mode=16;case 16:if(E=r.length){if(E>m&&(E=m),E>_&&(E=_),0===E)break e;a.arraySet(c,f,d,E,p),m-=E,d+=E,_-=E,p+=E,r.length-=E;break}r.mode=12;break;case 17:for(;y<14;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}if(r.nlen=(31&v)+257,y-=5,r.ndist=(31&(v>>>=5))+1,y-=5,r.ncode=(15&(v>>>=5))+4,v>>>=4,y-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;y<3;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}r.lens[z[r.have++]]=7&v,v>>>=3,y-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,L={bits:r.lenbits},C=u(0,r.lens,0,19,r.lencode,0,r.work,L),r.lenbits=L.bits,C){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;M=(D=r.lencode[v&(1<<r.lenbits)-1])>>>24,A=D>>>16&255,I=65535&D,!(M<=y);){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}if(I<16)v>>>=M,y-=M,r.lens[r.have++]=I;else{if(16===I){for(B=M+2;y<B;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}if(v>>>=M,y-=M,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}O=r.lens[r.have-1],E=3+(3&v),v>>>=2,y-=2}else if(17===I){for(B=M+3;y<B;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}v>>>=M,y-=M,O=0,E=3+(7&v),v>>>=3,y-=3}else{for(B=M+7;y<B;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}v>>>=M,y-=M,O=0,E=11+(127&v),v>>>=7,y-=7}if(r.have+E>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;E--;)r.lens[r.have++]=O}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,L={bits:r.lenbits},C=u(1,r.lens,0,r.nlen,r.lencode,0,r.work,L),r.lenbits=L.bits,C){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,L={bits:r.distbits},C=u(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,L),r.distbits=L.bits,C){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break e;case 20:r.mode=21;case 21:if(m>=6&&_>=258){t.next_out=p,t.avail_out=_,t.next_in=d,t.avail_in=m,r.hold=v,r.bits=y,h(t,x),p=t.next_out,c=t.output,_=t.avail_out,d=t.next_in,f=t.input,m=t.avail_in,v=r.hold,y=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;M=(D=r.lencode[v&(1<<r.lenbits)-1])>>>24,A=D>>>16&255,I=65535&D,!(M<=y);){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}if(A&&(240&A)==0){for(T=M,R=A,P=I;M=(D=r.lencode[P+((v&(1<<T+R)-1)>>T)])>>>24,A=D>>>16&255,I=65535&D,!(T+M<=y);){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}v>>>=T,y-=T,r.back+=T}if(v>>>=M,y-=M,r.back+=M,r.length=I,0===A){r.mode=26;break}if(32&A){r.back=-1,r.mode=12;break}if(64&A){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&A,r.mode=22;case 22:if(r.extra){for(B=r.extra;y<B;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}r.length+=v&(1<<r.extra)-1,v>>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;
1M=(D=r.distcode[v&(1<<r.distbits)-1])>>>24,A=D>>>16&255,I=65535&D,!(M<=y);){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}if((240&A)==0){for(T=M,R=A,P=I;M=(D=r.distcode[P+((v&(1<<T+R)-1)>>T)])>>>24,A=D>>>16&255,I=65535&D,!(T+M<=y);){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}v>>>=T,y-=T,r.back+=T}if(v>>>=M,y-=M,r.back+=M,64&A){t.msg="invalid distance code",r.mode=30;break}r.offset=I,r.extra=15&A,r.mode=24;case 24:if(r.extra){for(B=r.extra;y<B;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}r.offset+=v&(1<<r.extra)-1,v>>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===_)break e;if(E=x-_,r.offset>E){if((E=r.offset-E)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}E>r.wnext?(E-=r.wnext,S=r.wsize-E):S=r.wnext-E,E>r.length&&(E=r.length),k=r.window}else k=c,S=p-r.offset,E=r.length;E>_&&(E=_),_-=E,r.length-=E;do c[p++]=k[S++];while(--E);0===r.length&&(r.mode=21);break;case 26:if(0===_)break e;c[p++]=r.length,_--,r.mode=21;break;case 27:if(r.wrap){for(;y<32;){if(0===m)break e;m--,v|=f[d++]<<y,y+=8}if(x-=_,t.total_out+=x,r.total+=x,x&&(t.adler=r.check=r.flags?s(r.check,c,x,p-x):o(r.check,c,x,p-x)),x=_,(r.flags?v:l(v))!==r.check){t.msg="incorrect data check",r.mode=30;break}v=0,y=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;y<32;){if(0===m)break e;m--,v+=f[d++]<<y,y+=8}if(v!==(0|r.total)){t.msg="incorrect length check",r.mode=30;break}v=0,y=0}r.mode=29;case 29:C=1;break e;case 30:C=-3;break e;case 31:return -4;default:return -2}return(t.next_out=p,t.avail_out=_,t.next_in=d,t.avail_in=m,r.hold=v,r.bits=y,(r.wsize||x!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&g(t,t.output,t.next_out,x-t.avail_out))?(r.mode=31,-4):(w-=t.avail_in,x-=t.avail_out,t.total_in+=w,t.total_out+=x,r.total+=x,r.wrap&&x&&(t.adler=r.check=r.flags?s(r.check,c,x,t.next_out-x):o(r.check,c,x,t.next_out-x)),t.data_type=r.bits+64*!!r.last+128*(12===r.mode)+256*(20===r.mode||15===r.mode),(0===w&&0===x||4===e)&&0===C&&(C=-5),C)},r.inflateEnd=function(t){if(!t||!t.state)return -2;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&&(2&(r=t.state).wrap)!=0?(r.head=e,e.done=!1,0):-2},r.inflateSetDictionary=function(t,e){var r,i=e.length;return t&&t.state&&(0===(r=t.state).wrap||11===r.mode)?11===r.mode&&o(1,e,i,0)!==r.check?-3:g(t,e,i,i)?(r.mode=31,-4):(r.havedict=1,0):-2},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=[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],a=[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],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,r,h,u,l,f,c){var d,p,m,b,g,_,v,y,w,x=c.bits,E=0,S=0,k=0,M=0,A=0,I=0,T=0,R=0,P=0,O=0,C=null,L=0,B=new i.Buf16(16),D=new i.Buf16(16),N=null,z=0;for(E=0;E<=15;E++)B[E]=0;for(S=0;S<h;S++)B[e[r+S]]++;for(M=15,A=x;M>=1&&0===B[M];M--);if(A>M&&(A=M),0===M)return u[l++]=0x1400000,u[l++]=0x1400000,c.bits=1,0;for(k=1;k<M&&0===B[k];k++);for(A<k&&(A=k),R=1,E=1;E<=15;E++)if(R<<=1,(R-=B[E])<0)return -1;if(R>0&&(0===t||1!==M))return -1;for(E=1,D[1]=0;E<15;E++)D[E+1]=D[E]+B[E];for(S=0;S<h;S++)0!==e[r+S]&&(f[D[e[r+S]]++]=S);if(0===t?(C=N=f,_=19):1===t?(C=n,L-=257,N=a,z-=257,_=256):(C=o,N=s,_=-1),O=0,S=0,E=k,g=l,I=A,T=0,m=-1,b=(P=1<<A)-1,1===t&&P>852||2===t&&P>592)return 1;for(;;){v=E-T,f[S]<_?(y=0,w=f[S]):f[S]>_?(y=N[z+f[S]],w=C[L+f[S]]):(y=96,w=0),d=1<<E-T,k=p=1<<I;do u[g+(O>>T)+(p-=d)]=v<<24|y<<16|w;while(0!==p);for(d=1<<E-1;O&d;)d>>=1;if(0!==d?(O&=d-1,O+=d):O=0,S++,0==--B[E]){if(E===M)break;E=e[r+f[S]]}if(E>A&&(O&b)!==m){for(0===T&&(T=A),g+=k,R=1<<(I=E-T);I+T<M&&!((R-=B[I+T])<=0);)I++,R<<=1;if(P+=1<<I,1===t&&P>852||2===t&&P>592)return 1;u[m=O&b]=A<<24|I<<16|g-l}}return 0!==O&&(u[g+O]=E-T<<24|4194304),c.bits=A,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,n,a,o=t("../utils/common");function s(t){for(var e=t.length;--e>=0;)t[e]=0}var h=573,u=[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=Array(576);s(d);var p=Array(60);s(p);var m=Array(512);s(m);var b=Array(256);s(b);var g=Array(29);s(g);var _=Array(30);function v(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 y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w(t){return t<256?m[t]:m[256+(t>>
1>7)]}function x(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function E(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,x(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 S(t,e,r){E(t,r[2*e],r[2*e+1])}function k(t,e){var r=0;do r|=1&t,t>>>=1,r<<=1;while(--e>0);return r>>>1}function M(t,e,r){var i,n,a=Array(16),o=0;for(i=1;i<=15;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]=k(a[s]++,s))}}function A(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;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 I(t){t.bi_valid>8?x(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 T(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 R(t,e,r){for(var i=t.heap[r],n=r<<1;n<=t.heap_len&&(n<t.heap_len&&T(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!T(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i}function P(t,e,r){var i,n,a,o,s=0;if(0!==t.last_lit)do i=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],n=t.pending_buf[t.l_buf+s],s++,0===i?S(t,n,e):(S(t,(a=b[n])+256+1,e),0!==(o=u[a])&&E(t,n-=g[a],o),S(t,a=w(--i),r),0!==(o=l[a])&&E(t,i-=_[a],o));while(s<t.last_lit);S(t,256,e)}function O(t,e){var r,i,n,a=e.dyn_tree,o=e.stat_desc.static_tree,s=e.stat_desc.has_stree,u=e.stat_desc.elems,l=-1;for(r=0,t.heap_len=0,t.heap_max=h;r<u;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--)R(t,a,r);n=u;do r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R(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++,R(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,u=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<=15;a++)t.bl_count[a]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<h;r++)(a=u[2*u[2*(i=t.heap[r])+1]+1]+1)>m&&(a=m,b++),u[2*i+1]=a,!(i>l)&&(t.bl_count[a]++,o=0,i>=p&&(o=d[i-p]),s=u[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)&&(u[2*n+1]!==a&&(t.opt_len+=(a-u[2*n+1])*u[2*n],u[2*n+1]=a),i--)}}(t,e),M(a,l,t.bl_count)}function C(t,e,r){var i,n,a=-1,o=e[1],s=0,h=7,u=4;for(0===o&&(h=138,u=3),e[(r+1)*2+1]=65535,i=0;i<=r;i++)n=o,o=e[(i+1)*2+1],++s<h&&n===o||(s<u?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?(h=138,u=3):n===o?(h=6,u=3):(h=7,u=4))}function L(t,e,r){var i,n,a=-1,o=e[1],s=0,h=7,u=4;for(0===o&&(h=138,u=3),i=0;i<=r;i++)if(n=o,o=e[(i+1)*2+1],!(++s<h)||n!==o){if(s<u)do S(t,n,t.bl_tree);while(0!=--s);else 0!==n?(n!==a&&(S(t,n,t.bl_tree),s--),S(t,16,t.bl_tree),E(t,s-3,2)):s<=10?(S(t,17,t.bl_tree),E(t,s-3,3)):(S(t,18,t.bl_tree),E(t,s-11,7));s=0,a=n,0===o?(h=138,u=3):n===o?(h=6,u=3):(h=7,u=4)}}s(_);var B=!1;function D(t,e,r,i){E(t,0+ +!!i,3),I(t),x(t,r),x(t,~r),o.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}r._tr_init=function(t){B||(!function(){var t,e,r,o,s,h=Array(16);for(o=0,r=0;o<28;o++)for(t=0,g[o]=r;t<1<<u[o];t++)b[r++]=o;for(b[r-1]=o,s=0,o=0;o<16;o++)for(t=0,_[o]=s;t<1<<l[o];t++)m[s++]=o;for(s>>=7;o<30;o++)for(t=0,_[o]=s<<7;t<1<<l[o]-7;t++)m[256+s++]=o;for(e=0;e<=15;e++)h[e]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,h[8]++;for(;t<=255;)d[2*t+1]=9,t++,h[9]++;for(;t<=279;)d[2*t+1]=7,t++,h[7]++;for(;t<=287;)d[2*t+1]=8,t++,h[8]++;for(M(d,287,h),t=0;t<30;t++)p[2*t+1]=5,p[2*t]=k(t,5);i=new v(d,u,257,286,15),n=new v(p,l,0,30,15),a=new v([],f,0,19,7)}(),B=!0),t.l_desc=new y(t.dyn_ltree,i),t.d_desc=new y(t.dyn_dtree,n),t.bl_desc=new y(t.bl_tree,a),t.bi_buf=0,t.bi_valid=0,A(t)},r._tr_stored_block=D,r._tr_flush_block=function(t,e,r,i){var n,a,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=0xf3ffc07f;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<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),O(t,t.l_desc),O(t,t.d_desc),o=function(t){var e;
1for(C(t,t.dyn_ltree,t.l_desc.max_code),C(t,t.dyn_dtree,t.d_desc.max_code),O(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,(a=t.static_len+3+7>>>3)<=n&&(n=a)):n=a=r+5,r+4<=n&&-1!==e?D(t,e,r,i):4===t.strategy||a===n?(E(t,2+ +!!i,3),P(t,d,p)):(E(t,4+ +!!i,3),function(t,e,r,i){var n;for(E(t,e-257,5),E(t,r-1,5),E(t,i-4,4),n=0;n<i;n++)E(t,t.bl_tree[2*c[n]+1],3);L(t,t.dyn_ltree,e-1),L(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),P(t,t.dyn_ltree,t.dyn_dtree)),A(t),i&&I(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[(b[r]+256+1)*2]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){E(t,2,3),S(t,256,d),16===t.bi_valid?(x(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)}},{"../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){"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;function o(t){if(t>0x7fffffff)throw 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 TypeError('The "string" argument must be of type string. Received type number');return u(t)}return s(t,e,r)}function s(t,r,i){if("string"==typeof t){var n=t,a=r;if(("string"!=typeof a||""===a)&&(a="utf8"),!e.isEncoding(a))throw TypeError("Unknown encoding: "+a);var s=0|c(n,a),h=o(s),u=h.write(n,a);return u!==s&&(h=h.slice(0,u)),h}if(ArrayBuffer.isView(t))return l(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(I(t,ArrayBuffer)||t&&I(t.buffer,ArrayBuffer)){var d,p=t,m=r,b=i;if(m<0||p.byteLength<m)throw RangeError('"offset" is outside of buffer bounds');if(p.byteLength<m+(b||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(d=void 0===m&&void 0===b?new Uint8Array(p):void 0===b?new Uint8Array(p,m):new Uint8Array(p,m,b),e.prototype),d}if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var g=t.valueOf&&t.valueOf();if(null!=g&&g!==t)return e.from(g,r,i);var _=function(t){if(e.isBuffer(t)){var r=0|f(t.length),i=o(r);return 0===i.length||t.copy(i,0,0,r),i}return void 0!==t.length?"number"!=typeof t.length||function(t){return t!=t}(t.length)?o(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(_)return _;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return e.from(t[Symbol.toPrimitive]("string"),r,i);throw 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 TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return h(t),o(t<0?0:0|f(t))}function l(t){for(var e=t.length<0?0:0|f(t.length),r=o(e),i=0;i<e;i+=1)r[i]=255&t[i];return r}function f(t){if(t>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function c(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||I(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw 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 S(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return M(t).length;default:if(a)return n?-1:S(t).length;r=(""+r).toLowerCase(),a=!0}}function d(t,e,r){var n,a,o,s=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(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+=T[t[a]];return n}(this,e,r);case"utf8":case"utf-8":return g(this,e,r);case"ascii":return function(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}(this,e,r);case"latin1":case"binary":return function(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}(this,e,r);case"base64":return n=this,a=e,o=r,0===a&&o===n.length?i.fromByteArray(n):i.fromByteArray(n.slice(a,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(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}(this,e,r);default:if(s)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),s=!0}}function p(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function m(t,r,i,n,a){var o;if(0===t.length)return -1;if("string"==typeof i?(n=i,i=0):i>0x7fffffff?i=0x7fffffff:i<-0x80000000&&(i=-0x80000000),(o=i*=1)!=o&&(i=a?0:t.length-1),i<0&&(i=t.length+i),i>=t.length)if(a)return -1;else i=t.length-1;else if(i<0)if(!a)return -1;else i=0;if("string"==typeof r&&(r=e.from(r,n)),e.isBuffer(r))return 0===r.length?-1:b(t,r,i,n,a);if("number"==typeof r){if(r&=255,"function"==typeof Uint8Array.prototype.indexOf)if(a)return Uint8Array.prototype.indexOf.call(t,r,i);else return Uint8Array.prototype.lastIndexOf.call(t,r,i);return b(t,[r],i,n,a)}throw TypeError("val must be string, number or Buffer")}function b(t,e,r,i,n){var a,o=1,s=t.length,h=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,h/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(n){var l=-1;for(a=r;a<s;
vendor: 13,716 bytes, line 1
1a++)if(u(t,a)===u(e,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===h)return l*o}else -1!==l&&(a-=a-l),l=-1}else for(r+h>s&&(r=s-h),a=r;a>=0;a--){for(var f=!0,c=0;c<h;c++)if(u(t,a+c)!==u(e,c)){f=!1;break}if(f)return a}return -1}r.Buffer=e,r.SlowBuffer=function(t){return+t!=t&&(t=0),e.alloc(+t)},r.INSPECT_MAX_BYTES=50,r.kMaxLength=0x7fffffff,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 s(t,e,r)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array),e.alloc=function(t,e,r){return(h(t),t<=0)?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)},e.allocUnsafe=function(t){return u(t)},e.allocUnsafeSlow=function(t){return u(t)},e.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==e.prototype},e.compare=function(t,r){if(I(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),I(r,Uint8Array)&&(r=e.from(r,r.offset,r.byteLength)),!e.isBuffer(t)||!e.isBuffer(r))throw 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)},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 TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return e.alloc(0);if(void 0===r)for(i=0,r=0;i<t.length;++i)r+=t[i].length;var i,n=e.allocUnsafe(r),a=0;for(i=0;i<t.length;++i){var o=t[i];if(I(o,Uint8Array)&&(o=e.from(o)),!e.isBuffer(o))throw TypeError('"list" argument must be an Array of Buffers');o.copy(n,a),a+=o.length}return n},e.byteLength=c,e.prototype._isBuffer=!0,e.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)p(this,e,e+1);return this},e.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)p(this,e,e+3),p(this,e+1,e+2);return this},e.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(this,e+3,e+4);return this},e.prototype.toString=function(){var t=this.length;return 0===t?"":0==arguments.length?g(this,0,t):d.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw 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(I(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw 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 RangeError("out of range index");if(n>=a&&r>=i)return 0;if(n>=a)return -1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,a>>>=0,this===t)return 0;for(var o=a-n,s=i-r,h=Math.min(o,s),u=this.slice(n,a),l=t.slice(r,i),f=0;f<h;++f)if(u[f]!==l[f]){o=u[f],s=l[f];break}return o<s?-1:+(s<o)},e.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},e.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},e.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)};function g(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var a,o,s,h,u=t[n],l=null,f=u>239?4:u>223?3:u>191?2:1;if(n+f<=r)switch(f){case 1:u<128&&(l=u);break;case 2:(192&(a=t[n+1]))==128&&(h=(31&u)<<6|63&a)>127&&(l=h);break;case 3:a=t[n+1],o=t[n+2],(192&a)==128&&(192&o)==128&&(h=(15&u)<<12|(63&a)<<6|63&o)>2047&&(h<55296||h>57343)&&(l=h);break;case 4:a=t[n+1],o=t[n+2],s=t[n+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&(h=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&h<1114112&&(l=h)}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}var c=i,d=c.length;if(d<=4096)return String.fromCharCode.apply(String,c);for(var p="",m=0;m<d;)p+=String.fromCharCode.apply(String,c.slice(m,m+=4096));return p}function _(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function v(t,r,i,n,a,o){if(!e.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(r>a||r<o)throw RangeError('"value" argument is out of bounds');if(i+n>t.length)throw RangeError("Index out of range")}function y(t,e,r,i,n,a){if(r+i>t.length||r<0)throw RangeError("Index out of range")}function w(t,e,r,i,a){return e*=1,r>>>=0,a||y(t,e,r,4,34028234663852886e22,-34028234663852886e22),n.write(t,e,r,i,23,4),r+4}function x(t,e,r,i,a){return e*=1,r>>>=0,a||y(t,e,r,8,17976931348623157e292,-17976931348623157e292),n.write(t,e,r,i,52,8),r+8}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))e>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n,a,o,s,h,u,l,f,c=this.length-e;if((void 0===r||r>c)&&(r=c),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var d=!1;;)switch(i){case"hex":return 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,h=parseInt(e.substr(2*o,2),16);if((s=h)!=s)break;t[r+o]=h}return o}(this,t,e,r);case"utf8":case"utf-8":return n=e,a=r,A(S(t,this.length-n),this,n,a);case"ascii":return o=e,s=r,A(k(t),this,o,s);case"latin1":case"binary":return function(t,e,r,i){return A(k(e),t,r,i)}(this,t,e,r);case"base64":return h=e,u=r,A(M(t),this,h,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=e,f=r,A(function(t,e){for(var r,i,n=[],a=0;a<t.length&&!((e-=2)<0);++a)i=(r=t.charCodeAt(a))>>8,n.push(r%256),n.push(i);return n}(t,this.length-l),this,l,f);default:if(d)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),d=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},e.prototype.slice=function(t,r){var i=this.length;t=~~t,r=void 0===r?i:~~r,t<0?(t+=i)<0&&(t=0):t>i&&(t=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||_(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||_(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||_(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||_(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||_(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||_(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||_(t,4,this.length),0x1000000*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||_(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||_(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||_(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||_(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||_(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||_(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||_(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||_(t,4,this.length),n.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||_(t,4,this.length),n.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||_(t,8,this.length),n.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||_(t,8,this.length),n.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,i){if(t*=1,e>>>=0,r>>>=0,!i){var n=Math.pow(2,8*r)-1;v(this,t,e,r,n,0)}var a=1,o=0;for(this[e]=255&t;++o<r&&(a*=256);)this[e+o]=t/a&255;return e+r},e.prototype.writeUIntBE=function(t,e,r,i){if(t*=1,e>>>=0,r>>>=0,!i){var n=Math.pow(2,8*r)-1;v(this,t,e,r,n,0)}var a=r-1,o=1;for(this[e+a]=255&t;--a>=0&&(o*=256);)this[e+a]=t/o&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t*=1,e>>>=0,r||v(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t*=1,e>>>=0,r||v(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*=1,e>>>=0,r||v(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*=1,e>>>=0,r||v(this,t,e,4,0xffffffff,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*=1,e>>>=0,r||v(this,t,e,4,0xffffffff,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*=1,e>>>=0,!i){var n=Math.pow(2,8*r-1);v(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*=1,e>>>=0,!i){var n=Math.pow(2,8*r-1);v(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*=1,e>>>=0,r||v(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*=1,e>>>=0,r||v(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*=1,e>>>=0,r||v(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*=1,e>>>=0,r||v(this,t,e,4,0x7fffffff,-0x80000000),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*=1,e>>>=0,r||v(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+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 w(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return w(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return x(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return x(this,t,e,!1,r)},e.prototype.copy=function(t,r,i,n){if(!e.isBuffer(t))throw 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||0===t.length||0===this.length)return 0;if(r<0)throw RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw RangeError("Index out of range");if(n<0)throw 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 TypeError("encoding must be a string");if("string"==typeof n&&!e.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){var a,o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length<r||this.length<i)throw RangeError("Out of range index");if(i<=r)return this;if(r>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(a=r;a<i;++a)this[a]=t;else{var s=e.isBuffer(t)?t:e.from(t,n),h=s.length;
1if(0===h)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(a=0;a<i-r;++a)this[a+r]=s[a%h]}return this};var E=/[^+/0-9A-Za-z-_]/g;function S(t,e){e=e||1/0;for(var r,i=t.length,n=null,a=[],o=0;o<i;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!n){if(r>56319||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=(n-55296<<10|r-56320)+65536}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){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function k(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function M(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(E,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function A(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 I(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var T=function(){for(var t="0123456789abcdef",e=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,n=Object.create||function(t){var e=function(){};return e.prototype=t,new e},a=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return r},o=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var h=10;try{var u={};Object.defineProperty&&Object.defineProperty(u,"x",{value:0}),i=0===u.x}catch(t){i=!1}function l(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function f(t,e,r,i){if("function"!=typeof r)throw 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=n(null),t._eventsCount=0),s){if("function"==typeof s?s=o[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),!s.warned&&(a=l(t))&&a>0&&s.length>a){s.warned=!0;var a,o,s,h=Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",h.name,h.message)}}else s=o[e]=r,++t._eventsCount;return t}function c(){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=Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function d(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=o.call(c,i);return n.listener=r,i.wrapFn=n,n}function p(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=Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(n):b(n,n.length):[]}function m(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 b(t,e){for(var r=Array(e),i=0;i<e;++i)r[i]=t[i];return r}i?Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(t){if("number"!=typeof t||t<0||t!=t)throw TypeError('"defaultMaxListeners" must be a positive number');h=t}}):s.defaultMaxListeners=h,s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return l(this)},s.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 h=Error('Unhandled "error" event. ('+e+")");throw h.context=e,h}if(!(r=o[t]))return!1;var u="function"==typeof r;switch(i=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var i=t.length,n=b(t,i),a=0;a<i;++a)n[a].call(r)}(r,u,this);break;case 2:!function(t,e,r,i){if(e)t.call(r,i);else for(var n=t.length,a=b(t,n),o=0;o<n;++o)a[o].call(r,i)}(r,u,this,arguments[1]);break;case 3:!function(t,e,r,i,n){if(e)t.call(r,i,n);else for(var a=t.length,o=b(t,a),s=0;s<a;++s)o[s].call(r,i,n)}(r,u,this,arguments[1],arguments[2]);break;case 4:!function(t,e,r,i,n,a){if(e)t.call(r,i,n,a);else for(var o=t.length,s=b(t,o),h=0;h<o;
1++h)s[h].call(r,i,n,a)}(r,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(a=1,n=Array(i-1);a<i;a++)n[a-1]=arguments[a];!function(t,e,r,i){if(e)t.apply(r,i);else for(var n=t.length,a=b(t,n),o=0;o<n;++o)a[o].apply(r,i)}(r,u,this,n)}return!0},s.prototype.addListener=function(t,e){return f(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return f(this,t,e,!0)},s.prototype.once=function(t,e){if("function"!=typeof e)throw TypeError('"listener" argument must be a function');return this.on(t,d(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw TypeError('"listener" argument must be a function');return this.prependListener(t,d(this,t,e)),this},s.prototype.removeListener=function(t,e){var r,i,a,o,s;if("function"!=typeof e)throw TypeError('"listener" argument must be a function');if(!(i=this._events)||!(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=n(null):(delete i[t],i.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&&(i[t]=r[0]),i.removeListener&&this.emit("removeListener",t,s||e)}return this},s.prototype.removeAllListeners=function(t){var e,r,i;if(!(r=this._events))return this;if(!r.removeListener)return 0==arguments.length?(this._events=n(null),this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=n(null):delete r[t]),this;if(0==arguments.length){var o,s=a(r);for(i=0;i<s.length;++i)"removeListener"!==(o=s[i])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=n(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.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){return new i(e instanceof(r=r||(0,eval)("this")).ArrayBuffer?new(t("./lib/dom-bufferstream"))(e,0,e.byteLength,!0,r):new(t("./lib/bufferstream"))(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){return t=t.map(i),e=e.map(i),Date.UTC(t[0],t[1]-1,t[2],e[0],e[1],e[2],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[
11],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:"Backgroun
1dColorIndicator",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:"E
1xposureMode",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:"C
1olorimetricReference",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,r){var i,n,a=e.nextUInt16();for(n=0;n<a;++n)r((i=function(t,e){var r,i,n=e.nextUInt16(),a=e.nextUInt16(),o=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}}(a),s=e.nextUInt32(),h=o*s;if(h>4&&(e=t.openWithOffset(e.nextUInt32())),2===a){var u=(r=e.nextString(s)).indexOf("\0");-1!==u&&(r=r.substr(0,u))}else if(7===a)r=e.nextBuffer(s);else if(0!==a)for(i=0,r=[];i<s;++i)r.push(function(t,e){switch(t){case 1:return e.nextUInt8();case 3:case 8:return e.nextUInt16();case 4:case 9:return e.nextUInt32();case 5:return[e.nextUInt32(),e.nextUInt32()];case 6:return e.nextInt8();case 10:return[e.nextInt32(),e.nextInt32()];case 11:return e.nextFloat();case 12:return e.nextDouble();default:throw Error("Invalid format while decoding: "+t)}}(a,e));return h<4&&e.skip(4-h),[n,r,a]}(t,e))[0],i[1],i[2])}e.exports={IFD0:1,IFD1:2,GPSIFD:3,SubIFD:4,InteropIFD:5,parseTags:function(t,e){try{r=function(t){if("Exif\0\0"!==t.nextString(6))throw Error("Invalid EXIF header");var e=t.mark(),r=t.nextUInt16();if(18761===r)t.setBigEndian(!1);else if(19789===r)t.setBigEndian(!0);else throw Error("Invalid TIFF header");if(42!==t.nextUInt16())throw Error("Invalid TIFF data");return e}(t)}catch(t){return!1}var r,n,a,o,s=r.openWithOffset(t.nextUInt32()),h=this.IFD0;i(r,s,function(t,r,i){switch(t){case 34853:a=r[0];break;case 34665:n=r[0];break;default:e(h,t,r,i)}});var u=s.nextUInt32();if(0!==u){var l=r.openWithOffset(u);i(r,l,e.bind(null,this.IFD1))}if(a){var f=r.openWithOffset(a);i(r,f,e.bind(null,this.GPSIFD))}if(n){var c=r.openWithOffset(n),d=this.InteropIFD;i(r,c,function(t,r,i){40965===t?o=r[0]:e(d,t,r,i)})}if(o){var p=r.openWithOffset(o);i(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 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){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 e,r,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,h,u,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){e.value=r;return}}),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(h=i[0],b.hidePointers)return}else if(259===r&&(u=i[0],b.hidePointers))return;
1if(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,h,u,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;e(r,(i[0]+i[1]/60+i[2]/3600)*n)}})},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},h=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(h("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(h("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(h("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};var u=0,l=!1,f=null;do{var c=u+30;if(l||(l=r(o,{offset:c})||r(s,{offset:c})),!f&&(h("word/",{offset:c})?f={ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}:h("ppt/",{offset:c})?f={ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}:h("xl/",{offset:c})&&(f={ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),l&&f)return f;u=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]})}(e,c)}while(u>=0);if(f)return f}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"};
1if(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 d=e.subarray(4,4100),p=d.findIndex(function(t,e,r){return 66===r[e]&&130===r[e+1]});if(-1!==p){var m=p+3,b=function(t){return(0,i.default)(t).every(function(t,e){return d[m+e]===t.charCodeAt(0)})};if(b("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(b("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 g=0;g<2&&g<e.length-16;g++){if(r([73,68,51],{offset:g})||r([255,226],{offset:g,mask:[255,226]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([255,228],{offset:g,mask:[255,228]})||r([255,248],{offset:g,mask:[255,252]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,240],{offset:g,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"};
1if(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(h("<?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)},h=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){var a;if(!i(e))throw TypeError("iterator must be a function");arguments.length>=3&&(a=r),"[object Array]"===n.call(t)?o(t,e,a):"string"==typeof t?s(t,e,a):h(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,h=n+1,u=(1<<h)-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<h)break;var b=f&u;if(f>>=h,l-=h,b===a){s=o+1,u=(1<<(h=n+1))-1,m=null;continue}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)>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>=u+1&&h<12&&(++h,u=u<<1|1)),m=b}return c!==i&&console.log("Warning, gif stream shorter than expected."),r}try{r.GifWriter=function(t,e,r,i){var n=0,i=void 0===i?{}:i,a=void 0===i.loop?null:i.loop,o=void 0===i.palette?null:i.palette;if(e<=0||r<=0||e>65535||r>65535)throw Error("Width/Height invalid.");function s(t){var e=t.length;if(e<2||e>256||e&e-1)throw 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 h=0,u=0;if(null!==o){for(var l=s(o);l>>=1;)++h;if(l=1<<h,--h,void 0!==i.background){if((u=i.background)>=l)throw Error("Background index out of range.");if(0===u)throw 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++]=128*(null!==o)|h,t[n++]=u,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 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,h,u){if(!0===p&&(--n,p=!1),u=void 0===u?{}:u,e<0||r<0||e>65535||r>
165535)throw Error("x/y invalid.");if(i<=0||a<=0||i>65535||a>65535)throw Error("Width/Height invalid.");if(h.length<i*a)throw Error("Not enough pixels for the frame size.");var l=!0,f=u.palette;if(null==f&&(l=!1,f=o),null==f)throw 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===u.delay?0:u.delay,b=void 0===u.disposal?0:u.disposal;if(b<0||b>3)throw Error("Disposal out of range.");var g=!1,_=0;if(void 0!==u.transparent&&null!==u.transparent&&(g=!0,(_=u.transparent)<0||_>=c))throw 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,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,h=s+1,u=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+=u,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+=u;l>=8;)t[e++]=255&f,f>>=8,l-=8,e===n+256&&(t[n]=255,n=e++);4096===h?(d(a),h=s+1,u=r+1,m={}):(h>=1<<u&&++u,m[v]=h++),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,h)},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++]||(t[e++]+1&253)!=56||97!==t[e++])throw Error("Invalid GIF 87a/89a header.");var r=t[e++]|t[e++]<<8,n=t[e++]|t[e++]<<8,a=t[e++],o=1<<(7&a)+1;t[e++],t[e++];var s=null,h=null;a>>7&&(s=e,h=o,e+=3*o);var u=!0,l=[],f=0,c=null,d=0,p=null;for(this.width=r,this.height=n;u&&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,p=t[e++]|t[e++]<<8,e++;else for(e+=12;;){var m=t[e++];if(!(m>=0))throw Error("Invalid block size");if(0===m)break;e+=m}break;case 249:if(4!==t[e++]||0!==t[e+4])throw Error("Invalid graphics extension block.");var b=t[e++];f=t[e++]|t[e++]<<8,c=t[e++],(1&b)==0&&(c=null),d=b>>2&7,e++;break;case 254:for(;;){var m=t[e++];if(!(m>=0))throw Error("Invalid block size");if(0===m)break;e+=m}break;default:throw 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>>7,E=w>>6&1,S=1<<(7&w)+1,k=s,M=h,A=!1;if(x){var A=!0;k=e,M=S,e+=3*S}var I=e;for(e++;;){var m=t[e++];if(!(m>=0))throw Error("Invalid block size");if(0===m)break;e+=m}l.push({x:g,y:_,width:v,height:y,has_local_palette:A,palette_offset:k,palette_size:M,data_offset:I,data_length:e-I,transparent_index:c,interlaced:!!E,delay:f,disposal:d});break;case 59:u=!1;break;default:throw Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return l.length},this.loopCount=function(){return p},this.frameInfo=function(t){if(t<0||t>=l.length)throw Error("Frame index out of range.");return l[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 h=a.palette_offset,u=a.transparent_index;null===u&&(u=256);var l=a.width,f=r-l,c=l,d=(a.y*r+a.x)*4,p=((a.y+a.height)*r+a.x)*4,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&&(m+=b,c=l,m>=p&&(b=4*f+4*r*(g-1),m=d+(l+f)*(g<<1),g>>=1)),y===u)m+=4;else{var w=t[h+3*y],x=t[h+3*y+1],E=t[h+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 h=a.palette_offset,u=a.transparent_index;
1null===u&&(u=256);var l=a.width,f=r-l,c=l,d=(a.y*r+a.x)*4,p=((a.y+a.height)*r+a.x)*4,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&&(m+=b,c=l,m>=p&&(b=4*f+4*r*(g-1),m=d+(l+f)*(g<<1),g>>=1)),y===u)m+=4;else{var w=t[h+3*y],x=t[h+3*y+1],E=t[h+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 Error("constructor requires parameters");let i=e[0];if(null!==i&&"object"==typeof i)if(i instanceof r){let 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)this.bitmap=i;else throw Error("unrecognized constructor parameters");else if("number"==typeof i&&"number"==typeof e[1]){let r=e[1],n=e[2];this.bitmap={width:i,height:r},t.isBuffer(n)?this.bitmap.data=n:(this.bitmap.data=new t(i*r*4),"number"==typeof n&&this.fillRGBA(n))}else throw Error("unrecognized constructor parameters")}blit(t,e,r,i,n,a,o){if(i+a>this.bitmap.width)throw Error("copy exceeds width of source bitmap");if(e+a>t.bitmap.width)throw Error("copy exceeds width of target bitmap");if(n+o>this.bitmap.height)throw Error("copy exceeds height of source bitmap");if(r+o>t.bitmap.height)throw new Erro("copy exceeds height of target bitmap");let s=this.bitmap.data,h=t.bitmap.data,u=4*this.bitmap.width,l=4*t.bitmap.width,f=4*a,c=n*u+4*i,d=r*l+4*e;for(;--o>=0;)s.copy(h,d,c,c+f),c+=u,d+=l;return this}fillRGBA(t){let e=this.bitmap.data,r=4*this.bitmap.height,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){let r=(e*this.bitmap.width+t)*4;return this.bitmap.data.readUInt32BE(r)}getRGBASet(){let 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(){let t=this.bitmap.data;return this.scan(0,0,this.bitmap.width,this.bitmap.height,(e,r,i)=>{let n=Math.round(.299*t[i]+.587*t[i+1]+.114*t[i+2]);
1t[i]=n,t[i+1]=n,t[i+2]=n}),this}reframe(t,e,i,n,a){let o,s=t<0?0:t,h=e<0?0:e,u=i+s>this.bitmap.width?this.bitmap.width-s:i,l=n+h>this.bitmap.height?this.bitmap.height-h:n;if(void 0===a){if(s!==t||h!=e||u!==i||l!==n)throw new GifError("fillRGBA required for this reframing");o=new r(i,n)}else o=new r(i,n,a);return this.blit(o,t<0?-t:0,e<0?-e:0,s,h,u,l),this.bitmap=o.bitmap,this}scale(e){let r;if(1===e)return;if(!Number.isInteger(e)||e<1)throw Error("the scale must be an integer >= 1");let i=this.bitmap.width,n=this.bitmap.height,a=i*e*4,o=this.bitmap.data,s=new t(n*a*e),h=0,u=0;for(let t=0;t<n;++t){r=u;for(let t=0;t<i;++t){let t=o.readUInt32BE(h,!0);for(let r=0;r<e;++r)s.writeUInt32BE(t,u),u+=4;h+=4}for(let t=1;t<e;++t)s.copy(s,u,r,u),u+=a,r+=a}return this.bitmap={width:i*e,height:n*e,data:s},this}scanAllCoords(t){let e=this.bitmap.width,r=this.bitmap.data.length,i=0,n=0;for(let a=0;a<r;a+=4)t(i,n,a),++i===e&&(i=0,++n)}scanAllIndexes(t){let 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";let n,a=t("omggif"),{Gif:o,GifError:s}=t("./gif");e.nextTick(()=>{n=t("./gifutil")});let{GifFrame:h}=t("./gifframe");class u{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 a.GifReader(t)}catch(t){throw new s(t)}let r=e.numFrames(),i=[],n={width:e.width,height:e.height,loops:e.loopCount()};n.usesTransparency=!1;for(let t=0;t<r;++t){let r=this._decodeFrame(e,t,n.usesTransparency);i.push(r.frame),r.usesTransparency&&(n.usesTransparency=!0)}return Promise.resolve(new o(t,i,n))}catch(t){return Promise.reject(t)}}encodeGif(t,e={}){try{if(null===t||0===t.length)throw new s("there are no frames");let r=n.getMaxDimensions(t);return(e=Object.assign({},e)).width=r.maxWidth,e.height=r.maxHeight,e.loops=e.loops||0,e.colorScope=e.colorScope||o.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,(n.x+e*t.width)*4,(n.x+e*t.width)*4+4*n.width);a=a.slice(0,n.width*n.height*4)}}catch(t){throw new s(t)}let o=!1;if(null===this._transparentRGBA){if(!r)for(let t=3;t<a.length;t+=4)0===a[t]&&(o=!0,t=a.length)}else for(let t=3;t<a.length;t+=4)0===a[t]&&(a.writeUInt32BE(this._transparentRGBA,t-3),o=!0);return{frame:new h(n.width,n.height,a,{xOffset:n.x,yOffset:n.y,disposalMethod:n.disposal,interlaced:n.interlaced,delayCentisecs:n.delay}),usesTransparency:o}}_encodeGif(t,e){let r;if(e.colorScope===o.LocalColorsOnly)r=n.getColorInfo(t,0);else if(!(r=n.getColorInfo(t,256)).colors){if(e.colorScope===o.GlobalColorsOnly)throw new s("Too many color indexes for global color table");e.colorScope=o.LocalColorsOnly}e.usesTransparency=r.usesTransparency;let h=r.palettes;return e.colorScope===o.LocalColorsOnly?function(t,e,r,n){let h,u={loop:e.loops},l=new i(2e3);try{h=new a.GifWriter(l,e.width,e.height,u)}catch(t){throw new s(t)}for(let e=0;e<t.length;++e)l=m(h,e,t[e],n[e],!0);return new o(l.slice(0,h.end()),t,e)}(t,e,2e3,h):function(t,e,r,n){let h,u={colors:n.colors.slice(),usesTransparency:n.usesTransparency};c(u);let l={palette:u.colors,loop:e.loops},f=new i(2e3);try{h=new a.GifWriter(f,e.width,e.height,l)}catch(t){throw new s(t)}for(let e=0;e<t.length;++e)f=m(h,e,t[e],n,!1);return new o(f.slice(0,h.end()),t,e)}(t,e,2e3,r)}_getSizeEstimateGlobal(t,e){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let r=968,i=p(t);return e.forEach(t=>{r+=d(t,i)}),r}_getSizeEstimateLocal(t,e){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let r=200;for(let i=0;i<e.length;++i){let n=p(t[i]);r+=d(e[i],n)}return r}}function l(t,e){let r=t.indexOf(e);return -1===r?null:r}function f(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 c(t){let e=t.colors;t.usesTransparency&&e.push(0);let r=e.length,i=2;
1for(;r>i;)i<<=1;e.length=i,e.fill(0,r)}function d(t,e){let r=t.bitmap.width*t.bitmap.height;return r=Math.ceil(r*e/8),100+(r+=Math.ceil(r/255))+768}function p(t){let e=t.indexCount,r=0;for(--e;e;)++r,e>>=1;return r>0?r:1}function m(t,e,r,n,a){if(r.interlaced)throw new s("writing interlaced GIFs is not supported");let o=function(t,e,r){let n=r.colors,a=n.length<=8?l:f,o=e.bitmap.data,h=new i(o.length/4),u=n.length,c=0,d=0;for(;c<o.length;){if(0!==o[c+3]){let t=o.readUInt32BE(c,!0)>>8&0xffffff;h[d]=a(n,t)}else h[d]=u;c+=4,++d}if(r.usesTransparency){if(256===u)throw new s(`Frame ${t} already has 256 colorsand so can't use transparency`)}else u=null;return{buffer:h,transparentIndex:u}}(e,r,n),h={delay:r.delayCentisecs,disposal:r.disposalMethod,transparent:o.transparentIndex};a&&(c(n),h.palette=n.colors);try{let e,n=t.getOutputBuffer(),a=t.getOutputBufferPosition(),s=!0;for(;s;)if(e=t.addFrame(r.xOffset,r.yOffset,r.bitmap.width,r.bitmap.height,o.buffer,h),s=!1,e>=n.length-1){let e=new i(1.5*n.length);n.copy(e),t.setOutputBuffer(e),t.setOutputBufferPosition(a),n=e,s=!0}return n}catch(t){throw new s(t)}}r.GifCodec=u}).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";let i=t("./bitmapimage"),{GifError:n}=t("./gif");class a extends i{constructor(...t){if(super(...t),t[0]instanceof a){let e=t[0];this.xOffset=e.xOffset,this.yOffset=e.yOffset,this.disposalMethod=e.disposalMethod,this.delayCentisecs=e.delayCentisecs,this.interlaced=e.interlaced}else{let e=t[t.length-1],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(){let t=new Set,e=this.bitmap.data,r=0,i=!1;for(;r<e.length;){if(0===e[r+3])i=!0;else{let i=e.readUInt32BE(r,!0)>>8&0xffffff;t.add(i)}r+=4}let n=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";let i=t("fs"),n=t("image-q"),a=t("./bitmapimage"),{GifFrame:o}=t("./gifframe"),{GifError:s}=t("./gif"),{GifCodec:h}=t("./gifcodec"),u=[".jpg",".jpeg",".png",".bmp"],l=new h;function f(t,e,r,i,a){let o,s=Array.isArray(t)?t:[t];if(a){if(0>["FloydSteinberg","FalseFloydSteinberg","Stucki","Atkinson","Jarvis","Burkes","Sierra","TwoSierra","SierraLite"].indexOf(a.ditherAlgorithm))throw 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)}let h=new n.distance.Euclidean,u=new n.palette[e](h,r,i);o=a?new n.image.ErrorDiffusionArray(h,n.image.ErrorDiffusionArrayKernel[a.ditherAlgorithm],a.serpentine,a.minimumColorDistanceToDither,a.calculateErrorLikeGIMP):new n.image.NearestColor(h);let l=[];s.forEach(t=>{let e=t.bitmap.data,r=new Uint32Array(new ArrayBuffer(e.length));for(let t=0,i=0;t<e.length;t+=4,++i)r[i]=e.readUInt32LE(t,!0);let i=n.utils.PointContainer.fromUint32Array(r,t.bitmap.width,t.bitmap.height);u.sample(i),l.push(i)});let f=u.quantize();for(let t=0;t<s.length;++t){let e=s[t].bitmap.data,r=o.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,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};let 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};let o=Array(n.size),h=n.values();for(let t=0;t<o.length;++t)o[t]=h.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=>{let i=t.xOffset+t.bitmap.width;i>e&&(e=i);let 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;
1case"top-pop":n=1;break;default:throw 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 Error("Invalid quantization quality");f(t,"WuQuant",e,r,i)},r.read=function(t,r){var n;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))},r.shareAsJimp=function(t,e){let 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;let a=t.match(/\.[a-zA-Z]+$/);if(null!==a&&u.includes(a[0].toLowerCase()))throw Error(`GIF '${t}' has an unexpected suffix`);return n.encodeGif(e,r).then(e=>{var r,n;return(r=t,n=e.buffer,new Promise((t,e)=>{i.writeFile(r,n,r=>r?e(r):t())})).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";let i=t("./bitmapimage"),{Gif:n,GifError:a}=t("./gif"),{GifCodec:o}=t("./gifcodec"),{GifFrame:s}=t("./gifframe");e.exports={BitmapImage:i,Gif:n,GifCodec:o,GifFrame:s,GifUtil:t("./gifutil"),GifError:a}},{"./bitmapimage":65,"./gif":66,"./gifcodec":67,"./gifframe":68,"./gifutil":69}],71:[function(t,e,n){(function(t){e.exports=void 0!==i?i:void 0!==t?t:"undefined"!=typeof self?self:{}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{})},{}],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 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,h=(1<<s)-1,u=h>>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-u;else{if(a===h)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,i),a-=u}return(d?-1:1)*o*Math.pow(2,a-i)},r.write=function(t,e,r,i,n,a){var o,s,h,u=8*a-n-1,l=(1<<u)-1,f=l>>1,c=5960464477539062e-23*(23===n),d=i?0:a-1,p=i?1:-1,m=+(e<0||0===e&&1/e<0);for(isNaN(e=Math.abs(e))||e===1/0?(s=+!!isNaN(e),o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-o))<1&&(o--,h*=2),o+f>=1?e+=c/h:e+=c*Math.pow(2,1-f),e*h>=2&&(o++,h/=2),o+f>=l?(s=0,o=l):o+f>=1?(s=(e*h-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,u+=n;u>0;t[r+d]=255&o,d+=p,o/=256,u-=8);t[r+d-p]|=128*m}},{}],74:[function(e,r,i){var n;n=function(){var t=[function(t,e,r){"use strict";e.constants=r(1),e.conversion=r(3),e.distance=r(12),e.palette=r(20),e.image=r(30),e.quality=r(35),e.utils=r(37)},function(t,e,r){"use strict";e.bt709=r(2)},function(t,e){"use strict";var r,i,n,a,o,s;(a=r||(r={}))[a.RED=.2126]="RED",a[a.GREEN=.7152]="GREEN",a[a.BLUE=.0722]="BLUE",a[a.WHITE=1]="WHITE",e.Y=r,(o=i||(i={}))[o.RED=.64]="RED",o[o.GREEN=.3]="GREEN",o[o.BLUE=.15]="BLUE",o[o.WHITE=.3127]="WHITE",e.x=i,(s=n||(n={}))[s.RED=.33]="RED",s[s.GREEN=.6]="GREEN",s[s.BLUE=.06]="BLUE",s[s.WHITE=.329]="WHITE",e.y=n},function(t,e,r){"use strict";e.rgb2xyz=r(4).rgb2xyz,e.rgb2hsl=r(5).rgb2hsl,e.rgb2lab=r(7).rgb2lab,e.lab2xyz=r(9).lab2xyz,e.lab2rgb=r(10).lab2rgb,e.xyz2lab=r(8).xyz2lab,e.xyz2rgb=r(11).xyz2rgb},function(t,e){"use strict";function r(t){return t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92}e.rgb2xyz=function(t,e,i){return t=r(t/255),{x:.4124*t+.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";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,h=0;s>0&&s<1&&(h=o/(s<.5?a+n:510-a-n));var u=0;return o>0&&(u=(a===t?(e-r)/o:a===e?2+(r-t)/o:4+(t-e)/o)*60)<0&&(u+=360),{h:u,s:h,l:s}}},function(t,e){"use strict";e.degrees2radians=function(t){return Math.PI/180*t},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 h=t.slice(0);r=t.sort(function(t,r){return e(t,r)||h.indexOf(t)-h.indexOf(r)})}return r}},function(t,e,r){"use strict";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";function r(t){return t>.008856?Math.pow(t,1/3):7.787*t+16/116}
1e.xyz2lab=function(t,e,i){if(t=r(t/.95047),e=r(e/1),i=r(i/1.08883),116*e-16<0)throw Error("xxx");return{L:Math.max(0,116*e-16),a:500*(t-e),b:200*(e-i)}}},function(t,e){"use strict";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;return{x:.95047*r(e/500+n),y:+r(n),z:1.08883*r(n-i/200)}}},function(t,e,r){"use strict";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";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";e.AbstractDistanceCalculator=r(13).AbstractDistanceCalculator;var i=r(14);e.CIE94Textiles=i.CIE94Textiles,e.CIE94GraphicArts=i.CIE94GraphicArts,e.CIEDE2000=r(15).CIEDE2000,e.CMETRIC=r(16).CMETRIC;var n=r(17);e.AbstractEuclidean=n.AbstractEuclidean,e.Euclidean=n.Euclidean,e.EuclideanRgbQuantWOAlpha=n.EuclideanRgbQuantWOAlpha,e.EuclideanRgbQuantWithAlpha=n.EuclideanRgbQuantWithAlpha;var a=r(18);e.AbstractManhattan=a.AbstractManhattan,e.Manhattan=a.Manhattan,e.ManhattanSRGB=a.ManhattanSRGB,e.ManhattanNommyde=a.ManhattanNommyde,e.PNGQUANT=r(19).PNGQUANT},function(t,e){"use strict";e.AbstractDistanceCalculator=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}()},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,h,u){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(h*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 _=(u-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);e.AbstractCIE94=s,e.CIE94Textiles=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.CIE94GraphicArts=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)},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);e.CIEDE2000=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype.calculateRaw=function(t,r,i,n,s,h,u,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(h*this._whitePoint.g),o.inRange0to255(u*this._whitePoint.b)),d=(l-n)*this._whitePoint.a*e._kA;return Math.sqrt(this.calculateRawInLab(f,c)+d*d)},e.prototype.calculateRawInLab=function(t,r){var i=t.L,n=t.a,a=t.b,o=r.L,s=r.a,h=r.b,u=Math.pow((Math.sqrt(n*n+a*a)+Math.sqrt(s*s+h*h))/2,7),l=.5*(1-Math.sqrt(u/(u+e._pow25to7))),f=(1+l)*n,c=(1+l)*s,d=Math.sqrt(f*f+a*a),p=Math.sqrt(c*c+h*h),m=d*p,b=e._calculatehp(a,f),g=e._calculatehp(h,c),_=Math.abs(b-g),v=e._calculate_dHp(m,_,g,b),y=e._calculate_ahp(m,_,b,g),w=e._calculateT(y),x=(d+p)/2,E=Math.pow((i+o)/2-50,2),S=1+.015*E/Math.sqrt(20+E),
1k=1+.045*x,M=1+.015*w*x,A=e._calculateRT(y,x),I=(p-d)/k,T=v/M;return Math.pow((o-i)/S,2)+Math.pow(I,2)+Math.pow(T,2)+A*I*T},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));return-Math.sin(2*(e._deg30InRad*Math.exp(-Math.pow((t-e._deg275InRad)/e._deg25InRad,2))))*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=0x16bcc41e9,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)},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)};e.CMETRIC=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 h=(t+n)/2*this._whitePoint.r,u=(t-n)*this._whitePoint.r,l=(e-a)*this._whitePoint.g,f=(r-o)*this._whitePoint.b,c=((512+h)*u*u>>8)+4*l*l+((767-h)*f*f>>8),d=(s-i)*this._whitePoint.a;return Math.sqrt(c+d*d)},e}(r(13).AbstractDistanceCalculator)},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 h=n-t,u=a-e,l=o-r,f=s-i;return Math.sqrt(this._kR*h*h+this._kG*u*u+this._kB*l*l+this._kA*f*f)},e}(n.AbstractDistanceCalculator);e.AbstractEuclidean=o,e.Euclidean=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.EuclideanRgbQuantWithAlpha=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.EuclideanRgbQuantWOAlpha=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)},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 h=n-t,u=a-e,l=o-r,f=s-i;return h<0&&(h=0-h),u<0&&(u=0-u),l<0&&(l=0-l),f<0&&(f=0-f),this._kR*h+this._kG*u+this._kB*l+this._kA*f},e}(n.AbstractDistanceCalculator);e.AbstractManhattan=o,e.Manhattan=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.ManhattanNommyde=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.ManhattanSRGB=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)},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)};e.PNGQUANT=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 h=(s-i)*this._whitePoint.a;return this._colordifference_ch(t*this._whitePoint.r,n*this._whitePoint.r,h)+this._colordifference_ch(e*this._whitePoint.g,a*this._whitePoint.g,h)+this._colordifference_ch(r*this._whitePoint.b,o*this._whitePoint.b,h)},e.prototype._colordifference_ch=function(t,e,r){var i=t-e,n=i+r;return i*i+n*n},e}(r(13).AbstractDistanceCalculator)},function(t,e,r){"use strict";e.NeuQuant=r(21).NeuQuant,e.NeuQuantFloat=r(25).NeuQuantFloat,e.RGBQuant=r(26).RGBQuant,e.ColorHistogram=r(27).ColorHistogram;var i=r(29);e.WuQuant=i.WuQuant,e.WuColorCube=i.WuColorCube},function(t,e,r){"use strict";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}();e.NeuQuant=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,r=this._sampleFactor,i=this._pointArray.length;i<t._minpicturebytes&&(r=1);var n=30+(r-1)/3|0,a=i/r|0,o=a/t._nCycles|0,s=t._initAlpha,h=(this._networkSize>>3)*t._radiusBias,u=h>>t._radiusBiasShift;u<=1&&(u=0);for(var l=0;l<u;l++)this._radPower[l]=s*((u*u-l*l)*t._radBias/(u*u))>>>0;
1e=i<t._minpicturebytes?1:i%t._prime1!=0?t._prime1:i%t._prime2!=0?t._prime2:i%t._prime3!=0?t._prime3:t._prime4;for(var l=0,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!==u&&this._alterNeighbour(u,g,d,p,m,b),(f+=e)>=i&&(f-=i),0===o&&(o=1),++l%o==0){s-=s/n|0,h-=h/t._radiusDecrease|0,u=h>>t._radiusBiasShift,u<=1&&(u=0);for(var _=0;_<u;_++)this._radPower[_]=s*((u*u-_*_)*t._radBias/(u*u))>>>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 h=r+e;h>this._networkSize&&(h=this._networkSize);for(var u=r+1,l=r-1,f=1;u<h||l>s;){var c=this._radPower[f++]/t._alphaRadBias;if(u<h){var d=this._network[u++];d.subtract(c*(d.r-a),c*(d.g-n),c*(d.b-i),c*(d.a-o))}if(l>s){var d=this._network[l--];d.subtract(c*(d.r-a),c*(d.g-n),c*(d.b-i),c*(d.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=0x7fffffff,o=0x7fffffff,s=-1,h=-1,u=0;u<this._networkSize;u++){var l=this._network[u],f=8160*this._distance.calculateNormalized(l,{r:i,g:r,b:e,a:n})|0;f<a&&(a=f,s=u);var c=f-(this._bias[u]>>t._initialBiasShift-3);c<o&&(o=c,h=u);var d=this._freq[u]>>t._betaShift;this._freq[u]-=d,this._bias[u]+=d<<t._gammaShift}return this._freq[s]+=t._beta,this._bias[s]-=t._betaGamma,h},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}()},function(t,e,r){"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,e.Palette=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 h=t.getLuminosity(!0),u=e.getLuminosity(!0);if(u-h!=0)return u-h;var l=(100*i.s|0)-(100*r.s|0);return l?-l:0})},t}()},function(t,e,r){"use strict";var i=r(24);e.PointContainer=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)}
1,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}()},function(t,e,r){"use strict";var i=r(2);e.Point=function(){function t(){this.uint32=0xffffffff,this.r=this.g=this.b=this.a=0,this.rgba=[,,,,],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}()},function(t,e,r){"use strict";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}();e.NeuQuantFloat=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,r=this._sampleFactor,i=this._pointArray.length;i<t._minpicturebytes&&(r=1);var n=30+(r-1)/3,a=i/r,o=a/t._nCycles|0,s=t._initAlpha,h=(this._networkSize>>3)*t._radiusBias,u=h>>t._radiusBiasShift;u<=1&&(u=0);for(var l=0;l<u;l++)this._radPower[l]=s*((u*u-l*l)*t._radBias/(u*u));e=i<t._minpicturebytes?1:i%t._prime1!=0?t._prime1:i%t._prime2!=0?t._prime2:i%t._prime3!=0?t._prime3:t._prime4;for(var l=0,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!=u&&this._alterNeighbour(u,g,d,p,m,b),(f+=e)>=i&&(f-=i),0==o&&(o=1),++l%o==0){s-=s/n,h-=h/t._radiusDecrease,u=h>>t._radiusBiasShift,u<=1&&(u=0);for(var _=0;_<u;_++)this._radPower[_]=s*((u*u-_*_)*t._radBias/(u*u))}}},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 h=r+e;h>this._networkSize&&(h=this._networkSize);for(var u=r+1,l=r-1,f=1;
1u<h||l>s;){var c=this._radPower[f++]/t._alphaRadBias;if(u<h){var d=this._network[u++];d.subtract(c*(d.r-a),c*(d.g-n),c*(d.b-i),c*(d.a-o))}if(l>s){var d=this._network[l--];d.subtract(c*(d.r-a),c*(d.g-n),c*(d.b-i),c*(d.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=0x7fffffff,o=0x7fffffff,s=-1,h=-1,u=0;u<this._networkSize;u++){var l=this._network[u],f=8160*this._distance.calculateNormalized(l,{r:i,g:r,b:e,a:n});f<a&&(a=f,s=u);var c=f-(this._bias[u]>>t._initialBiasShift-3);c<o&&(o=c,h=u);var d=this._freq[u]>>t._betaShift;this._freq[u]-=d,this._bias[u]+=d<<t._gammaShift}return this._freq[s]+=t._beta,this._bias[s]-=t._betaGamma,h},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}()},function(t,e,r){"use strict";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};e.RGBQuant=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 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=Array(t.length),h=0;h<t.length;h++)r.push(n.Point.createByUint32(t[h])),a[h]=1;for(var u=r.length,l=[],f=u,c=this._initialDistance;f>this._colors;){l.length=0;for(var h=0;h<u;h++)if(0!==a[h]){for(var d=r[h],p=h+1;p<u;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}()},function(t,e,r){"use strict";var i=r(28),n=r(6);e.ColorHistogram=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,h=r.length;s<h&&this._histogram[r[s]]==o;)t.push(r[s++]);this._hueStats.injectIntoArray(t);break;case 2:t=r;break;default:throw 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],h=o*s,u=this._makeBoxes(i,n,o,s),l=this._histogram;u.forEach(function(e){var n=Math.round(e.w*e.h/h)*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.y*e+t.x,n=(t.y+t.h-1)*e+(t.x+t.w-1),a=e-t.w+1,o=0,s=i;do r.call(this,s),s+=++o%t.w==0?a:1;while(s<=n)},t.prototype._makeBoxes=function(t,e,r,i){for(var n=t%r,a=e%i,o=t-n,s=e-a,h=[],u=0;u<e;u+=i)for(var l=0;l<t;l+=r)h.push({x:l,y:u,w:l==o?n:r,h:u==s?a:i});return h},t._boxSize=[64,64],t._boxPixels=2,t._hueGroups=10,t}()},function(t,e,r){"use strict";var i=r(5),n=r(22),a=function(){this.num=0,this.cols=[]};e.HueStatistics=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],h=this._minCols;s.num++,!(s.num>h)&&(s.num==h&&this._groupsFull++,s.num<=h&&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.forEac
1h(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}()},function(t,e,r){"use strict";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=Array(t),a=0;a<t;a++){n[a]=Array(e);for(var o=0;o<e;o++){n[a][o]=Array(r);for(var s=0;s<r;s++){n[a][o][s]=Array(i);for(var h=0;h<i;h++)n[a][o][s][h]=0}}}return n}function s(t,e,r){for(var i=Array(t),n=0;n<t;n++){i[n]=Array(e);for(var a=0;a<e;a++){i[n][a]=Array(r);for(var o=0;o<r;o++)i[n][a][o]=0}}return i}function h(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 u(t,e,r){for(var i=0;i<e;i++)t[i]=r}var l=function(){};e.WuColorCube=l,e.WuQuant=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,h=this._alphas[e]/r,u=n.Point.createByRGBA(0|a,0|o,0|s,0|h);t.add(u)}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=[],h=[],u=[],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,h[f]=t._volume(this._cubes[f],this._momentsGreen)/c|0,u[f]=t._volume(this._cubes[f],this._momentsBlue)/c|0,l[f]=t._volume(this._cubes[f],this._momentsAlpha)/c|0):(s[f]=0,h[f]=0,u[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);for(var o=0,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=h[g],y=u[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=(t.r>>e)+1,i=(t.g>>e)+1,n=(t.b>>e)+1,a=(t.a>>e)+1;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){h(o,this._sideSize,this._sideSize,this._sideSize,0),h(l,this._sideSize,this._sideSize,this._sideSize,0),h(f,this._sideSize,this._sideSize,this._sideSize,0),h(c,this._sideSize,this._sideSize,this._sideSize,0),h(d,this._sideSize,this._sideSize,this._sideSize,0),h(p,this._sideSize,this._sideSize,this._sideSize,0);for(var b=1;b<=this._maxSideIndex;++b){u(t,this._sideSize,0),u(e,this._sideSize,0),u(r,this._sideSize,0),u(i,this._sideSize,0),u(n,this._sideSize,0),u(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 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,h,u){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=h-w,0!=(x=u-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),h=t._volume(e,this._weights),u=this._maximize(e,t.red,e.redMinimum+1,e.redMaximum,n,a,o,s,h),l=this._maximize(e,t.green,e.greenMinimum+1,e.greenMaximum,n,a,o,s,h),f=this._maximize(e,t.blue,e.blueMinimum+1,e.blueMaximum,n,a,o,s,h),c=this._maximize(e,t.alpha,e.alphaMinimum+1,e.alphaMaximum,n,a,o,s,h);if(c.max>=u.max&&c.max>=l.max&&c.max>=f.max){if(i=t.alpha,c.position<0)return!1}else i=u.max>=c.max&&u.max>=l.max&&u.max>=f.max?t.red:l.max>=c.max&&l.max>=u.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=u.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}()},function(t,e,r){"use strict";e.NearestColor=r(31).NearestColor;var i=r(32);e.ErrorDiffusionArray=i.ErrorDiffusionArray,e.ErrorDiffusionArrayKernel=i.ErrorDiffusionArrayKernel,e.ErrorDiffusionRiemersma=r(33).ErrorDiffusionRiemersma},function(t,e){"use strict";e.NearestColor=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 h=r[s];h.from(e.getNearestColor(this._distance,h))}return t},t}()},function(t,e,r){"use strict";var i,n=r(24),a=r(6);(i=e.ErrorDiffusionArrayKernel||(e.ErrorDiffusionArrayKernel={}))[i.FloydSteinberg=0]="FloydSteinberg",i[i.FalseFloydSteinberg=1]="FalseFloydSteinberg",i[i.Stucki=2]="Stucki",i[i.Atkinson=3]="Atkinson",i[i.Jarvis=4]="Jarvis",i[i.Burkes=5]="Burkes",i[i.Sierra=6]="Sierra",i[i.TwoSierra=7]="TwoSierra",i[i.SierraLite=8]="SierraLite";var o=e.ErrorDiffusionArrayKernel;e.ErrorDiffusionArray=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(),i=new n.Point,o=t.getWidth(),s=t.getHeight(),h=[],u=1,l=1,f=0;f<this._kernel.length;f++){var c=this._kernel[f][2]+1;l<c&&(l=c)}for(var f=0;f<l;f++)this._fillErrorLine(h[f]=[],o);for(var d=0;d<s;d++){this._serpentine&&(u*=-1);var p=d*o,m=1==u?0:o-1,b=1==u?o:-1;this._fillErrorLine(h[0],o),h.push(h.shift());for(var g=h[0],_=m,v=p+m;_!==b;_+=u,v+=u){var y=r[v],w=g[_];i.from(y);var x=n.Point.createByRGBA(a.inRange0to255Rounded(y.r+w[0]),a.inRange0to255Rounded(y.g+w[1]),a.inRange0to255Rounded(y.b+w[2]),a.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=i.r-E.r,k=i.g-E.g,M=i.b-E.b,A=i.a-E.a);for(var I=1==u?0:this._kernel.length-1,T=1==u?this._kernel.length:-1,f=I;f!==T;f+=u){var R=this._kernel[f][1]*u,P=this._kernel[f][2];if(R+_>=0&&R+_<o&&P+d>=0&&P+d<s){var O=this._kernel[f][0],C=h[P][R+_];C[0]=C[0]+S*O,C[1]=C[1]+k*O,C[2]=C[2]+M*O,C[3]=C[3]+A*O}}}}}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(var i=r;i<e;i++)t[i]=[0,0,0,0]},t.prototype._setKernel=function(t){switch(t){case o.FloydSteinberg:this._kernel=[[7/16,
11,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]];break;case o.FalseFloydSteinberg:this._kernel=[[3/8,1,0],[3/8,0,1],[2/8,1,1]];break;case o.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 o.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 o.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 o.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 o.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 o.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 o.SierraLite:this._kernel=[[.5,1,0],[1/4,-1,1],[1/4,0,1]];break;default:throw Error("ErrorDiffusionArray: unknown kernel = "+t)}},t}()},function(t,e,r){"use strict";var i=r(34),n=r(24),a=r(6);e.ErrorDiffusionRiemersma=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(),h=t.getWidth(),u=t.getHeight(),l=[],f=0,c=0;c<this._errorQueueSize;c++)l[c]={r:0,g:0,b:0,a:0};return o.walk(h,u,function(t,i){for(var o=s[t+i*h],u=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];u+=g.r*b,c+=g.g*b,d+=g.b*b,p+=g.a*b}var _=n.Point.createByRGBA(a.inRange0to255Rounded(u),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}()},function(t,e){"use strict";var r,i;(r=i||(i={}))[r.NONE=0]="NONE",r[r.UP=1]="UP",r[r.LEFT=2]="LEFT",r[r.RIGHT=3]="RIGHT",r[r.DOWN=4]="DOWN",e.HilbertCurveBase=function(){function t(){}return t.prototype.walk=function(t,e,r){this._x=0,this._y=0,this._d=0,this._width=t,this._height=e,this._callback=r;var n=Math.max(t,e);this._level=Math.log(n)/Math.log(2)+1|0,this._walkHilbert(i.UP),this._visit(i.NONE)},t.prototype._walkHilbert=function(t){if(!(this._level<1)){switch(this._level--,t){case i.LEFT:this._walkHilbert(i.UP),this._visit(i.RIGHT),this._walkHilbert(i.LEFT),this._visit(i.DOWN),this._walkHilbert(i.LEFT),this._visit(i.LEFT),this._walkHilbert(i.DOWN);break;case i.RIGHT:this._walkHilbert(i.DOWN),this._visit(i.LEFT),this._walkHilbert(i.RIGHT),this._visit(i.UP),this._walkHilbert(i.RIGHT),this._visit(i.RIGHT),this._walkHilbert(i.UP);break;case i.UP:this._walkHilbert(i.LEFT),this._visit(i.DOWN),this._walkHilbert(i.UP),this._visit(i.RIGHT),this._walkHilbert(i.UP),this._visit(i.UP),this._walkHilbert(i.RIGHT);break;case i.DOWN:this._walkHilbert(i.RIGHT),this._visit(i.UP),this._walkHilbert(i.DOWN),this._visit(i.LEFT),this._walkHilbert(i.DOWN),this._visit(i.DOWN),this._walkHilbert(i.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 i.LEFT:this._x--;break;case i.RIGHT:this._x++;break;case i.UP:this._y--;break;case i.DOWN:this._y++}},t}()},function(t,e,r){"use strict";e.SSIM=r(36).SSIM},function(t,e,r){"use strict";var i=r(2);e.SSIM=function(){function t(){}return t.prototype.compare=function(t,e){if(t.getHeight()!==e.getHeight()||t.getWidth()!==e.getWidth())throw Error("Images have different sizes!");var r=0,i=0;return this._iterate(t,e,function(t,e,n,a){for(var o=0,s=0,h=0,u=0;u<t.length;u++)s+=Math.pow(t[u]-n,2),h+=Math.pow(e[u]-a,2),o+=(t[u]-n)*(e[u]-a);var l=t.length-1;s/=l,h/=l;var f=(2*n*a+6.502500000000001)*(2*(o/=l)+58.522499999999994);i+=f/((Math.pow(n,2)+Math.pow(a,2)+6.502500000000001)*(s+h+58.522499999999994)),r++}),i/r},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),h=Math.min(8,n-a),u=this._calculateLumaValuesForWindow(t,o,a,s,h),l=this._calculateLumaValuesForWindow(e,o,a,s,h),f=this._calculateAverageLuma(u),c=this._calculateAverageLuma(l);r(u,l,f,c)}},t.prototype._calculateLumaValuesForWindow=function(t,e,r,n,a){for(var o=t.getPointArray(),s=[],h=0,u=r;u<r+a;u++)for(var l=u*t.getWidth(),f=e;f<e+n;f++){var c=o[l+f];s[h]=c.r*i.Y.RED+c.g*i.Y.GREEN+c.b*i.Y.BLUE,h++}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}()},function(t,e,r){"use strict";e.arithmetic=r(6),e.HueStatistics=r(28).HueStatistics,e.Palette=r(22).Palette,e.Point=r(24).Point,e.PointContainer=r(23).PointContainer}],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)},"object"==typeof i&&"object"==typeof r?r.exports=n():"function"==typeof t&&t.amd?t("iq",[],n):"object"==typeof i?i.iq=n():this.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)}e.exports=function(t){var e;return null!=t&&(i(t)||"function"==typeof(e=t).readFloatLE&&"function"==typeof e.slice&&i(e.slice(0,0))||!!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=function(t){try{if(a(t))return!1;return i.call(t),!0}catch(t){return!1}},s=Object.prototype.toString,h="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(t){if(!t||"function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;
1if(h)return o(t);if(a(t))return!1;var e=s.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e}},{}],78:[function(t,e,r){e.exports=function(t){var e=n.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||void 0!==i&&(t===i.setTimeout||t===i.alert||t===i.confirm||t===i.prompt)};var n=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){e.exports={encode:t("./lib/encoder"),decode:t("./lib/decoder")}},{"./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]);function e(){}function r(t){return t<0?0:t>255?255:t}e.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;function n(){var t=e[i]<<8|e[i+1];return i+=2,t}e.length;var o=null,s=null,h=[],u=[],l=[],f=[],c=n();if(65496!=c)throw Error("SOI not found");for(c=n();65497!=c;){switch(c){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 d=function(){var t=n(),r=e.subarray(i,i+t-2);return i+=r.length,r}();65504===c&&74===d[0]&&70===d[1]&&73===d[2]&&70===d[3]&&0===d[4]&&(o={version:{major:d[5],minor:d[6]},densityUnits:d[7],xDensity:d[8]<<8|d[9],yDensity:d[10]<<8|d[11],thumbWidth:d[12],thumbHeight:d[13],thumbData:d.subarray(14,14+3*d[12]*d[13])}),65505===c&&69===d[0]&&120===d[1]&&105===d[2]&&102===d[3]&&0===d[4]&&(this.exifBuffer=d.subarray(5,d.length)),65518===c&&65===d[0]&&100===d[1]&&111===d[2]&&98===d[3]&&101===d[4]&&0===d[5]&&(s={version:d[6],flags0:d[7]<<8|d[8],flags1:d[9]<<8|d[10],transformCode:d[11]});break;case 65499:for(var p=n()+i-2;i<p;){var m=e[i++];a(256);var b=new Int32Array(64);if(m>>4==0)for(E=0;E<64;E++){var g=t[E];b[g]=e[i++]}else if(m>>4==1)for(E=0;E<64;E++){var g=t[E];b[g]=n()}else throw Error("DQT: invalid table spec");h[15&m]=b}break;case 65472:case 65473:case 65474:n(),(y={}).extended=65473===c,y.progressive=65474===c,y.precision=e[i++],y.scanLines=n(),y.samplesPerLine=n(),y.components={},y.componentsOrder=[];var _=y.scanLines*y.samplesPerLine;if(_>r){var v=Math.ceil((_-r)/1e6);throw Error(`maxResolutionInMP limit exceeded by ${v}MP`)}var y,w,x,E,S,k=e[i++];for(x=0;x<k;x++){S=e[i];var M=e[i+1]>>4,A=15&e[i+1],I=e[i+2];y.componentsOrder.push(S),y.components[S]={h:M,v:A,quantizationIdx:I},i+=3}!function(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 o=Math.ceil(t.samplesPerLine/8/i),s=Math.ceil(t.scanLines/8/n);for(r in t.components)if(t.components.hasOwnProperty(r)){e=t.components[r];var h=Math.ceil(Math.ceil(t.samplesPerLine/8)*e.h/i),u=Math.ceil(Math.ceil(t.scanLines/8)*e.v/n),l=o*e.h,f=s*e.v,c=[];a(f*l*256);for(var d=0;d<f;d++){for(var p=[],m=0;m<l;m++)p.push(new Int32Array(64));c.push(p)}e.blocksPerLine=h,e.blocksPerColumn=u,e.blocks=c}t.maxH=i,t.maxV=n,t.mcusPerLine=o,t.mcusPerColumn=s}(y),u.push(y);break;case 65476:var T=n();for(x=2;x<T;){var R=e[i++],P=new Uint8Array(16),O=0;for(E=0;E<16;E++,i++)O+=P[E]=e[i];a(16+O);var C=new Uint8Array(O);for(E=0;E<O;E++,i++)C[E]=e[i];x+=17+O,(R>>4==0?f:l)[15&R]=function(t,e){for(var r,i,n=0,a=[],o=16;o>0&&!t[o-1];)o--;a.push({children:[],index:0});var s,h=a[0];for(r=0;r<o;r++){for(i=0;i<t[r];i++){for((h=a.pop()).children[h.index]=e[n];h.index>0;){if(0===a.length)throw Error("Could not recreate Huffman Table");h=a.pop()}for(h.index++,a.push(h);a.length<=r;)a.push(s={children:[],index:0}),h.children[h.index]=s.children,h=s;n++}r+1<o&&(a.push(s={children:[],index:0}),h.children[h.index]=s.children,h=s)}return a[0].children}(P,C)}break;case 65501:n(),w=n();break;case 65498:n();var L,B=e[i++],D=[];for(x=0;x<B;x++){L=y.components[e[i++]];var N=e[i++];L.huffmanTableDC=f[N>>4],L.huffmanTableAC=l[15&N],D.push(L)}var z=e[i++],j=e[i++],U=e[i++],F=function(e,r,i,n,a,o,s,h,u,l){i.precision,i.samplesPerLine,i.scanLines;var f,c,d,p=i.mcusPerLine,m=i.progressive;i.maxH,i.maxV;var b=r,g=0,_=0;function v(){if(_>0)return _--,g>>_&1;if(255==(g=e[r++])){var t=e[r++];if(t)throw Error("unexpected marker: "+(g<<8|t).toString(16))}return _=7,g>>>7}function y(t){for(var e,r=t;null!==(e=v());){if("number"==typeof(r=r[e]))return r;if("object"!=typeof r)throw Error("invalid huffman sequence")}return null}function w(t){for(var e=0;t>0;){var r=v();if(null===r)return;e=e<<1|r,t--}return e}function x(t){var e=w(t);return e>=1<<t-1?e:e+(-1<<t)+1}var E,S,k,M,A,I,T,R=0,P=0,O=n.length,C=m?0===o?0===h?function(t,e){var r=y(t.huffmanTableDC),i=0===r?0:x(r)<<u;e[0]=t.pred+=i}:function(t,e){e[0]|=v()<<u}
1:0===h?function(e,r){if(R>0)return void R--;for(var i=o;i<=s;){var n=y(e.huffmanTableAC),a=15&n,h=n>>4;if(0===a){if(h<15){R=w(h)+(1<<h)-1;break}i+=16;continue}r[t[i+=h]]=x(a)*(1<<u),i++}}:function(e,r){for(var i=o,n=0;i<=s;){var a=t[i],h=r[a]<0?-1:1;switch(P){case 0:var l=y(e.huffmanTableAC),f=15&l,n=l>>4;if(0===f)n<15?(R=w(n)+(1<<n),P=4):(n=16,P=1);else{if(1!==f)throw Error("invalid ACn encoding");E=x(f),P=n?2:3}continue;case 1:case 2:r[a]?r[a]+=(v()<<u)*h:0==--n&&(P=3*(2==P));break;case 3:r[a]?r[a]+=(v()<<u)*h:(r[a]=E<<u,P=0);break;case 4:r[a]&&(r[a]+=(v()<<u)*h)}i++}4===P&&0==--R&&(P=0)}:function(e,r){var i=y(e.huffmanTableDC),n=0===i?0:x(i);r[0]=e.pred+=n;for(var a=1;a<64;){var o=y(e.huffmanTableAC),s=15&o,h=o>>4;if(0===s){if(h<15)break;a+=16;continue}r[t[a+=h]]=x(s),a++}},L=0;for(f=1==O?n[0].blocksPerLine*n[0].blocksPerColumn:p*i.mcusPerColumn,a||(a=f);L<f;){for(k=0;k<O;k++)n[k].pred=0;if(R=0,1==O)for(I=0,S=n[0];I<a;I++)!function(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])}(S,C,L),L++;else for(I=0;I<a;I++){for(k=0;k<O;k++)for(M=0,c=(S=n[k]).h,d=S.v;M<d;M++)for(A=0;A<c;A++)!function(t,e,r,i,n){var a=(r/p|0)*t.v+i,o=r%p*t.h+n;void 0===t.blocks[a]&&l.tolerantDecoding||e(t,t.blocks[a][o])}(S,C,L,M,A);if(++L===f)break}if(L===f)do{if(255===e[r]&&0!==e[r+1])break;r+=1}while(r<e.length-2);if(_=0,(T=e[r]<<8|e[r+1])<65280)throw Error("marker was not found");if(T>=65488&&T<=65495)r+=2;else break}return r-b}(e,i,y,D,w,z,j,U>>4,15&U,this.opts);i+=F;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 Error("unknown JPEG marker "+c.toString(16))}c=n()}if(1!=u.length)throw Error("only single frame JPEGs supported");for(var x=0;x<u.length;x++){var G=u[x].components;for(var E in G)G[E].quantizationTable=h[G[E].quantizationIdx],delete G[E].quantizationIdx}this.width=y.samplesPerLine,this.height=y.scanLines,this.jfif=o,this.adobe=s,this.components=[];for(var x=0;x<y.componentsOrder.length;x++){var L=y.components[y.componentsOrder[x]];this.components.push({lines:function(t,e){var r,i,n=[],o=e.blocksPerLine,s=e.blocksPerColumn,h=o<<3,u=new Int32Array(64),l=new Uint8Array(64);a(h*s*8);for(var f=0;f<s;f++){var c=f<<3;for(r=0;r<8;r++)n.push(new Uint8Array(h));for(var d=0;d<o;d++){!function(t,r,i){var n,a,o,s,h,u,l,f,c,d,p=e.quantizationTable;for(d=0;d<64;d++)i[d]=t[d]*p[d];for(d=0;d<8;++d){var m=8*d;if(0==i[1+m]&&0==i[2+m]&&0==i[3+m]&&0==i[4+m]&&0==i[5+m]&&0==i[6+m]&&0==i[7+m]){c=5793*i[0+m]+512>>10,i[0+m]=c,i[1+m]=c,i[2+m]=c,i[3+m]=c,i[4+m]=c,i[5+m]=c,i[6+m]=c,i[7+m]=c;continue}n=5793*i[0+m]+128>>8,a=5793*i[4+m]+128>>8,o=i[2+m],s=i[6+m],h=2896*(i[1+m]-i[7+m])+128>>8,f=2896*(i[1+m]+i[7+m])+128>>8,u=i[3+m]<<4,l=i[5+m]<<4,c=n-a+1>>1,n=n+a+1>>1,a=c,c=3784*o+1567*s+128>>8,o=1567*o-3784*s+128>>8,s=c,c=h-l+1>>1,h=h+l+1>>1,l=c,c=f+u+1>>1,u=f-u+1>>1,f=c,c=n-s+1>>1,n=n+s+1>>1,s=c,c=a-o+1>>1,a=a+o+1>>1,o=c,c=2276*h+3406*f+2048>>12,h=3406*h-2276*f+2048>>12,f=c,c=799*u+4017*l+2048>>12,u=4017*u-799*l+2048>>12,l=c,i[0+m]=n+f,i[7+m]=n-f,i[1+m]=a+l,i[6+m]=a-l,i[2+m]=o+u,i[5+m]=o-u,i[3+m]=s+h,i[4+m]=s-h}for(d=0;d<8;++d){var b=d;if(0==i[8+b]&&0==i[16+b]&&0==i[24+b]&&0==i[32+b]&&0==i[40+b]&&0==i[48+b]&&0==i[56+b]){c=5793*i[d+0]+8192>>14,i[0+b]=c,i[8+b]=c,i[16+b]=c,i[24+b]=c,i[32+b]=c,i[40+b]=c,i[48+b]=c,i[56+b]=c;continue}n=5793*i[0+b]+2048>>12,a=5793*i[32+b]+2048>>12,o=i[16+b],s=i[48+b],h=2896*(i[8+b]-i[56+b])+2048>>12,f=2896*(i[8+b]+i[56+b])+2048>>12,u=i[24+b],l=i[40+b],c=n-a+1>>1,n=n+a+1>>1,a=c,c=3784*o+1567*s+2048>>12,o=1567*o-3784*s+2048>>12,s=c,c=h-l+1>>1,h=h+l+1>>1,l=c,c=f+u+1>>1,u=f-u+1>>1,f=c,c=n-s+1>>1,n=n+s+1>>1,s=c,c=a-o+1>>1,a=a+o+1>>1,o=c,c=2276*h+3406*f+2048>>12,h=3406*h-2276*f+2048>>12,f=c,c=799*u+4017*l+2048>>12,u=4017*u-799*l+2048>>12,l=c,i[0+b]=n+f,i[56+b]=n-f,i[8+b]=a+l,i[48+b]=a-l,i[16+b]=o+u,i[40+b]=o-u,i[24+b]=s+h,i[32+b]=s-h}for(d=0;d<64;++d){var g=128+(i[d]+8>>4);r[d]=g<0?0:g>255?255:g}}(e.blocks[f][d],l,u);var p=0,m=d<<3;for(i=0;i<8;i++){var b=n[c+i];for(r=0;r<8;r++)b[m+r]=l[p++]}}}return n}(0,L),scaleX:L.h/y.maxH,scaleY:L.v/y.maxV})}},getData:function(t,e){var i,n,o,s,h,u,l,f,c,d,p,m,b,g,_,v,y,w,x,E,S,k=this.width/t,M=this.height/e,A=0,I=t*e*this.components.length;a(I);var T=new Uint8Array(I);switch(this.components.length){case 1:for(d=0,i=this.components[0];d<e;d++)for(c=0,h=i.lines[0|d*i.scaleY*M];c<t;c++)p=h[0|c*i.scaleX*k],T[A++]=p;break;case 2:for(d=0,i=this.components[0],n=this.components[1];d<e;d++)for(c=0,h=i.lines[0|d*i.scaleY*M],u=n.lines[0|d*n.scaleY*M];c<t;c++)p=h[0|c*i.scaleX*k],T[A++]=p,p=u[0|c*n.scaleX*k],T[A++]=p;break;case 3:for(S=!0,this.adobe&&this.adobe.transformCode?S=!0:void 0!==this.opts.colorTransform&&(S=!!this.opts.colorTransform),i=this.components[0],n=this.components[1],o=this.components[2],d=0;d<e;d++)for(c=0,h=i.lines[0|d*i.scaleY*M],u=n.lines[0|d*n.scaleY*M],l=o.lines[0|d*o.scaleY*M];c<t;c++)S?(p=h[0|c*i.scaleX*k],m=u[0|c*n.scaleX*k],w=r(p+1.402*((b=l[0|c
1*o.scaleX*k])-128)),x=r(p-.3441363*(m-128)-.71413636*(b-128)),E=r(p+1.772*(m-128))):(w=h[0|c*i.scaleX*k],x=u[0|c*n.scaleX*k],E=l[0|c*o.scaleX*k]),T[A++]=w,T[A++]=x,T[A++]=E;break;case 4:if(!this.adobe)throw 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),i=this.components[0],n=this.components[1],o=this.components[2],s=this.components[3],d=0;d<e;d++)for(c=0,h=i.lines[0|d*i.scaleY*M],u=n.lines[0|d*n.scaleY*M],l=o.lines[0|d*o.scaleY*M],f=s.lines[0|d*s.scaleY*M];c<t;c++)S?(p=h[0|c*i.scaleX*k],m=u[0|c*n.scaleX*k],b=l[0|c*o.scaleX*k],g=f[0|c*s.scaleX*k],_=255-r(p+1.402*(b-128)),v=255-r(p-.3441363*(m-128)-.71413636*(b-128)),y=255-r(p+1.772*(m-128))):(_=h[0|c*i.scaleX*k],v=u[0|c*n.scaleX*k],y=l[0|c*o.scaleX*k],g=f[0|c*s.scaleX*k]),T[A++]=255-_,T[A++]=255-v,T[A++]=255-y,T[A++]=255-g;break;default:throw Error("Unsupported color mode")}return T},copyToImageData:function(t,e){var i,n,a,o,s,h,u,l,f,c=t.width,d=t.height,p=t.data,m=this.getData(c,d),b=0,g=0;switch(this.components.length){case 1:for(f=0;f<d;f++)for(l=0;l<c;l++)i=m[b++],p[g++]=i,p[g++]=i,p[g++]=i,e&&(p[g++]=255);break;case 3:for(f=0;f<d;f++)for(l=0;l<c;l++)s=m[b++],h=m[b++],u=m[b++],p[g++]=s,p[g++]=h,p[g++]=u,e&&(p[g++]=255);break;case 4:for(f=0;f<d;f++)for(l=0;l<c;l++)a=m[b++],o=m[b++],i=m[b++],s=255-r(a*(1-(n=m[b++])/255)+n),h=255-r(o*(1-n/255)+n),u=255-r(i*(1-n/255)+n),p[g++]=s,p[g++]=h,p[g++]=u,e&&(p[g++]=255);break;default:throw Error("Unsupported color mode")}}};var i=0,n=0;function a(t=0){var e=i+t;if(e>n){var r=Math.ceil((e-n)/1024/1024);throw Error(`maxMemoryUsageInMB limit exceeded by at least ${r}MB`)}i=e}return e.resetMaxMemoryUsage=function(t){i=0,n=t},e.getBytesAllocated=function(){return i},e.requestMemoryAllocation=a,e}();function n(e,i={}){var a={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512,...i},o=new Uint8Array(e),s=new r;s.opts=a,r.resetMaxMemoryUsage(1024*a.maxMemoryUsageInMB*1024),s.parse(o);var h=a.formatAsRGBA?4:3,u=s.width*s.height*h;try{r.requestMemoryAllocation(u);var l={width:s.width,height:s.height,exifBuffer:s.exifBuffer,data:a.useTArray?new Uint8Array(u):new t(u)}}catch(t){if(t instanceof RangeError)throw Error("Could not allocate enough memory for the image. Required: "+u);throw t}return s.copyToImageData(l,a.formatAsRGBA),l}void 0!==e?e.exports=n:void 0!==i&&(i["jpeg-js"]=i["jpeg-js"]||{},i["jpeg-js"].decode=n)}).call(this,t("buffer").Buffer)},{buffer:48}],82:[function(t,e,r){(function(t){function r(r){var i,n,a,o,s,h=Math.floor,u=Array(64),l=Array(64),f=Array(64),c=Array(64),d=Array(65535),p=Array(65535),m=Array(64),b=Array(64),g=[],_=0,v=7,y=Array(64),w=Array(64),x=Array(64),E=Array(256),S=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],O=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],C=[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=[],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,s=n[0],h=n[240],u=function(t,e){var r,i,n,a,o,s,h,u,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],h=t[c+6];var d=r+(u=t[c+7]),p=r-u,b=i+h,g=i-h,_=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=(k+E)*.707106781;t[c+2]=E+M,t[c+6]=E-M,x=w+v,S=v+g;var A=(x-(k=g+p))*.382683433,I=.5411961*x+A,T=1.306562965*k+A,R=.707106781*S,P=p+R,O=p-R;t[c+5]=O+I,t[c+3]=O-I,t[c+1]=P+T,t[c+7]=P-T,c+=8}for(l=0,c=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],h=t[c+48];var C=r+(u=t[c+56]),L=r-u,B=i+h,D=i-h,N=n+s,z=n-s,j=a+o,U=a-o,F=C+j,G=C-j,H=B+N,q=B-N;t[c]=F+H,t[c+32]=F-H;var W=(q+G)*.707106781;t[c+16]=G+W,t[c+48]=G-W,F=U+z,H=z+D;var Z=(F-(q=D+L))*.382683433,Y=.5411961*F+Z,V=1.306562965*q+Z,X=.707106781*H,Q=L+X,J=L-X;t[c+40]=J+Y,t[c+24]=J-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),l=0;l<64;++l)b[k[l]]=u[l];var f=b[0]-r;r=b[0],0==f?B(i[0]):(B(i[p[a=32767+f]]),B(d[a]));for(var c=63;c>
10&&0==b[c];c--);if(0==c)return B(s),r;for(var g=1;g<=c;){for(var _=g;0==b[g]&&g<=c;++g);var v=g-_;if(v>=16){o=v>>4;for(var y=1;y<=o;++y)B(h);v&=15}B(n[(v<<4)+p[a=32767+b[g]]]),B(d[a]),g++}return 63!=c&&B(s),r}function j(t){(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=h((e[r]*t+50)/100);i<1?i=1:i>255&&(i=255),u[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=h((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/(u[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=[],_=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);var h=r.exifBuffer;if(h){N(65505),69===h[0]&&120===h[1]&&105===h[2]&&102===h[3]?N(h.length+2):(N(h.length+5+2),D(69),D(120),D(105),D(102),D(0));for(var d=0;d<h.length;d++)D(h[d])}N(65499),N(132),D(0);for(var p=0;p<64;p++)D(u[p]);D(1);for(var m=0;m<64;m++)D(l[m]);Y=r.width,V=r.height,N(65472),N(17),D(8),N(V),N(Y),D(3),D(1),D(17),D(0),D(2),D(17),D(1),D(3),D(17),D(1),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(O[o+1]);for(var s=0;s<=161;s++)D(C[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 b=0,E=0,k=0;_=0,v=7,this.encode.displayName="_encode_";for(var L,U,F,G,H,q,W,Z,Y,V,X,Q=r.data,J=r.width,K=r.height,$=4*J,tt=0;tt<K;){for(X=0;X<$;){for(Z=0,H=G=$*tt+X,q=-1,W=0;Z<64;Z++)H=G+(W=Z>>3)*$+(q=(7&Z)*4),tt+W>=K&&(H-=$*(tt+1+W-K)),X+q>=$&&(H-=X+q-$+4),L=Q[H++],U=Q[H++],F=Q[H++],y[Z]=(S[L]+S[U+256|0]+S[F+512|0]>>16)-128,w[Z]=(S[L+768|0]+S[U+1024|0]+S[F+1280|0]>>16)-128,x[Z]=(S[L+1280|0]+S[U+1536|0]+S[F+1792|0]>>16)-128;b=z(y,f,b,i,a),E=z(w,c,E,n,o),k=z(x,c,k,n,o),X+=32}tt+=8}if(v>=0){var te=[];te[1]=v+1,te[0]=(1<<v+1)-1,B(te)}return(N(65497),void 0===e)?new Uint8Array(g):new t(g)},new Date().getTime(),r||(r=50);for(var U=String.fromCharCode,F=0;F<256;F++)E[F]=U(F);i=L(M,A),n=L(R,P),a=L(I,T),o=L(O,C),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}}();for(var G=0;G<256;G++)S[G]=19595*G,S[G+256|0]=38470*G,S[G+512|0]=7471*G+32768,S[G+768|0]=-11059*G,S[G+1024|0]=-21709*G,S[G+1280|0]=32768*G+8421375,S[G+1536|0]=-27439*G,S[G+1792|0]=-5329*G;j(r),new Date().getTime()}function n(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=n:void 0!==i&&(i["jpeg-js"]=i["jpeg-js"]||{},i["jpeg-js"].encode=n)}).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,h){"function"==typeof e?(s=e,e={}):e&&"object"==typeof e||(e={mode:e});var u=e.mode,l=e.fs||n;void 0===u&&(u=a&~r.umask()),h||(h=null);var f=s||function(){};t=i.resolve(t),l.mkdir(t,u,function(r){if(!r)return f(null,h=h||t);"ENOENT"===r.code?o(i.dirname(t),e,function(r,i){r?f(r,i):o(t,e,f,i)}):l.stat(t,function(t,e){t||!e.isDirectory()?f(r,h):f(null,h)})})}e.exports=o.mkdirp=o.mkdirP=o,o.sync=function t(e,o,s){o&&"object"==typeof o||(o={mode:o});var h,u=o.mode,l=o.fs||n;void 0===u&&(u=a&~r.umask()),s||(s=null),e=i.resolve(e);try{l.mkdirSync(e,u),s=s||e}catch(r){if("ENOENT"===r.code)s=t(i.dirname(e),o,s),t(e,o,s);else{try{h=l.statSync(e)}catch(t){throw r}if(!h.isDirectory())throw r}}return s}}).call(this,t("_process"))},{_process:133,fs:47,path:107}],84:[function(t,e,r){"use strict";var i=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;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;var i=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==i.join(""))return!1;var n={};if("abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join(""))return!1;return!0}catch(t){return!1}}()?function(t,e){for(var r,o,s=function(t){if(null==t)throw TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),h=1;h<arguments.length;h++){for(var u in r=Object(arguments[h]))n.call(r,u)&&(s[u]=r[u]);if(i){o=i(r);for(var l=0;l<o.length;l++)a.call(r,o[l])&&(s[o[l]]=r[o[l]])}}return s}:Object.assign},{}],85:[function(t,e,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],86:[function(t,e,r){"use strict";var i=t("./lib/utils/common").assign,n=t("./lib/deflate"),a=t("./lib/inflate"),o=t("./lib/zlib/constants"),s={};i(s,n,a,o),e.exports=s},{"./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"),h=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=n.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e,r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var l=i.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(0!==l)throw Error(o[l]);if(r.header&&i.deflateSetHeader(this.strm,r.header),r.dictionary){if(e="string"==typeof r.dictionary?a.string2buf(r.dictionary):"[object ArrayBuffer]"===h.call(r.dictionary)?new Uint8Array(r.dictionary):r.dictionary,0!==(l=i.deflateSetDictionary(this.strm,e)))throw Error(o[l]);this._dict_set=!0}}function l(t,e){var r=new u(e);
1if(r.push(t,!0),r.err)throw r.msg||o[r.err];return r.result}u.prototype.push=function(t,e){var r,o,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;o=e===~~e?e:4*(!0===e),"string"==typeof t?s.input=a.string2buf(t):"[object ArrayBuffer]"===h.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(u),s.next_out=0,s.avail_out=u),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)},u.prototype.onData=function(t){this.chunks.push(t)},u.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=u,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"),h=t("./zlib/zstream"),u=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&&(15&e.windowBits)==0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var r=i.inflateInit2(this.strm,e.windowBits);if(r!==o.Z_OK)throw Error(s[r]);this.header=new u,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,h,u,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?(h=a.utf8border(d.output,d.next_out),u=d.next_out-h,f=a.buf2string(d.output,h),d.next_out=u,d.avail_out=p-u,u&&n.arraySet(d.output,d.output,h,u,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 h(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,h=0;for(a=0;a<s;a++)(64512&(r=t.charCodeAt(a)))==55296&&a+1<s&&(64512&(n=t.charCodeAt(a+1)))==56320&&(r=65536+(r-55296<<10)+(n-56320),a++),h+=r<128?1:r<2048?2:r<65536?3:4;for(o=0,e=new i.Buf8(h),a=0;o<h;a++)(64512&(r=t.charCodeAt(a)))==55296&&a+1<s&&(64512&(n=t.charCodeAt(a+1)))==56320&&(r=65536+(r-55296<<10)+(n-56320),a++),r<128?e[o++]=r:(r<2048?e[o++]=192|r>>>6:(r<65536?e[o++]=224|r>>>12:(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 h(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,u=Array(2*s);for(i=0,r=0;r<s;){if((n=t[r++])<128){u[i++]=n;continue}if((a=o[n])>4){u[i++]=65533,r+=a-1;continue}for(n&=2===a?31:3===a?15:7;a>1&&r<s;)n=n<<6|63&t[r++],a--;
1if(a>1){u[i++]=65533;continue}n<65536?u[i++]=n:(n-=65536,u[i++]=55296|n>>10&1023,u[i++]=56320|1023&n)}return h(u,i)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&(192&t[r])==128;)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"),h=t("./messages"),u=573;function l(t,e){return t.msg=h[e],e}function f(t){return(t<<1)-9*(t>4)}function c(t){for(var e=t.length;--e>=0;)t[e]=0}function d(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 p(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,d(t.strm)}function m(t,e){t.pending_buf[t.pending++]=e}function b(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function g(t,e){var r,i,n=t.max_chain_length,a=t.strstart,o=t.prev_length,s=t.nice_match,h=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,u=t.window,l=t.w_mask,f=t.prev,c=t.strstart+258,d=u[a+o-1],p=u[a+o];t.prev_length>=t.good_match&&(n>>=2),s>t.lookahead&&(s=t.lookahead);do{if(u[(r=e)+o]!==p||u[r+o-1]!==d||u[r]!==u[a]||u[++r]!==u[a+1])continue;a+=2,r++;do;while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&a<c);if(i=258-(c-a),a=c-258,i>o){if(t.match_start=e,o=i,i>=s)break;d=u[a+o-1],p=u[a+o]}}while((e=f[e&l])>h&&0!=--n);return o<=t.lookahead?o:t.lookahead}function _(t){var e,r,i,a,h,u=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=u+(u-262)){n.arraySet(t.window,t.window,u,u,0),t.match_start-=u,t.strstart-=u,t.block_start-=u,e=r=t.hash_size;do i=t.head[--e],t.head[e]=i>=u?i-u:0;while(--r);e=r=u;do i=t.prev[--e],t.prev[e]=i>=u?i-u:0;while(--r);a+=u}if(0===t.strm.avail_in)break;if(r=function(t,e,r,i){var a=t.avail_in;return(a>i&&(a=i),0===a)?0:(t.avail_in-=a,n.arraySet(e,t.input,t.next_in,a,r),1===t.state.wrap?t.adler=o(t.adler,e,a,r):2===t.state.wrap&&(t.adler=s(t.adler,e,a,r)),t.next_in+=a,t.total_in+=a,a)}(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=r,t.lookahead+t.insert>=3)for(h=t.strstart-t.insert,t.ins_h=t.window[h],t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+3-1])&t.hash_mask,t.prev[h&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=h,h++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function v(t,e){for(var r,i;;){if(t.lookahead<262){if(_(t),t.lookahead<262&&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-262&&(t.match_length=g(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&&(p(t,!1),0===t.strm.avail_out))return 1}return(t.insert=t.strstart<2?t.strstart:2,4===e)?(p(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}function y(t,e){for(var r,i,n;;){if(t.lookahead<262){if(_(t),t.lookahead<262&&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-262&&(t.match_length=g(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&&(p(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]))&&p(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)?(p(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}function w(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 x(){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(2*u),this.dyn_dtree=new n.Buf16(122),this.bl_tree=new n.Buf16(78),c(this.dyn_ltree),
vendor: 7,442 bytes, line 1
1c(this.dyn_dtree),c(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),c(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(573),c(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 E(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:113,t.adler=+(2!==e.wrap),e.last_flush=0,a._tr_init(e),0):l(t,-2)}function S(t){var e,r=E(t);return 0===r&&((e=t.state).window_size=2*e.w_size,c(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 k(t,e,r,i,a,o){if(!t)return -2;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 l(t,-2);8===i&&(i=9);var h=new x;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=i,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=a+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new n.Buf8(2*h.w_size),h.head=new n.Buf16(h.hash_size),h.prev=new n.Buf16(h.w_size),h.lit_bufsize=1<<a+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new n.Buf8(h.pending_buf_size),h.d_buf=+h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=o,h.method=r,S(t)}i=[new w(0,0,0,0,function(t,e){var r=65535;for(65535>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(_(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,p(t,!1),0===t.strm.avail_out)||t.strstart-t.block_start>=t.w_size-262&&(p(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,4===e)?(p(t,!0),0===t.strm.avail_out)?3:4:(t.strstart>t.block_start&&(p(t,!1),t.strm.avail_out),1)}),new w(4,4,8,4,v),new w(4,5,16,8,v),new w(4,6,32,32,v),new w(4,4,16,16,y),new w(8,16,32,32,y),new w(8,16,128,128,y),new w(8,32,128,256,y),new w(32,128,258,1024,y),new w(32,258,258,4096,y)],r.deflateInit=function(t,e){return k(t,e,8,15,8,0)},r.deflateInit2=k,r.deflateReset=S,r.deflateResetKeep=E,r.deflateSetHeader=function(t,e){return t&&t.state&&2===t.state.wrap?(t.state.gzhead=e,0):-2},r.deflate=function(t,e){if(!t||!t.state||e>5||e<0)return t?l(t,-2):-2;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||666===n.status&&4!==e)return l(t,0===t.avail_out?-5:-2);if(n.strm=t,r=n.last_flush,n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,m(n,31),m(n,139),m(n,8),n.gzhead?(m(n,+!!n.gzhead.text+2*!!n.gzhead.hcrc+4*!!n.gzhead.extra+8*!!n.gzhead.name+16*!!n.gzhead.comment),m(n,255&n.gzhead.time),m(n,n.gzhead.time>>8&255),m(n,n.gzhead.time>>16&255),m(n,n.gzhead.time>>24&255),m(n,9===n.level?2:4*(n.strategy>=2||n.level<2)),m(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(m(n,255&n.gzhead.extra.length),m(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):(m(n,0),m(n,0),m(n,0),m(n,0),m(n,0),m(n,9===n.level?2:4*(n.strategy>=2||n.level<2)),m(n,3),n.status=113);else{var r,n,o,h,u=8+(n.w_bits-8<<4)<<8;u|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(u|=32),u+=31-u%31,n.status=113,b(n,u),0!==n.strstart&&(b(n,t.adler>>>16),b(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)),d(t),o=n.pending,n.pending!==n.pending_buf_size));)m(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)),d(t),o=n.pending,n.pending===n.pending_buf_size)){h=1;break}h=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,m(n,h)}while(0!==h);n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),0===h&&(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)),d(t),o=n.pending,n.pending===n.pending_buf_size)){h=1;break}h=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,m(n,h)}while(0!==h);n.gzhead.hcrc&&n.pending>o&&(t.adler=s(t.adler,n.pending_buf,n.pending-o,o)),0===h&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&d(t),n.pending+2<=n.pending_buf_size&&(m(n,255&t.adler),m(n,t.adler>>8&255),t.adler=0,n.status=113)):n.status=113),0!==n.pending){if(d(t),0===t.avail_out)return n.last_flush=-1,0}else if(0===t.avail_in&&f(e)<=f(r)&&4!==e)return l(t,-5);if(666===n.status&&0!==t.avail_in)return l(t,-5);if(0!==t.avail_in||0!==n.lookahead||0!==e&&666!==n.status){var g=2===n.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(_(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&&(p(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,4===e)?(p(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(p(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<=258){if(_(t),t.lookahead<=258&&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+258;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=258-(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&&(p(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,4===e)?(p(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}(n,e):i[n.level].func(n,e);if((3===g||4===g)&&(n.status=666),1===g||3===g)return 0===t.avail_out&&(n.last_flush=-1),0;if(2===g&&(1===e?a._tr_align(n):5!==e&&(a._tr_stored_block(n,0,0,!1),3===e&&(c(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),d(t),0===t.avail_out))return n.last_flush=-1,0}return 4!==e?0:n.wrap<=0?1:(2===n.wrap?(m(n,255&t.adler),m(n,t.adler>>8&255),m(n,t.adler>>16&255),m(n,t.adler>>24&255),m(n,255&t.total_in),m(n,t.total_in>>8&255),m(n,t.total_in>>16&255),m(n,t.total_in>>24&255)):(b(n,t.adler>>>16),b(n,65535&t.adler)),d(t),n.wrap>0&&(n.wrap=-n.wrap),+(0===n.pending))},r.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?l(t,-2):(t.state=null,113===e?l(t,-3):0):-2},r.deflateSetDictionary=function(t,e){var r,i,a,s,h,u,l,f,d=e.length;
1if(!t||!t.state||2===(s=(r=t.state).wrap)||1===s&&42!==r.status||r.lookahead)return -2;for(1===s&&(t.adler=o(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(c(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new n.Buf8(r.w_size),n.arraySet(f,e,d-r.w_size,r.w_size,0),e=f,d=r.w_size),h=t.avail_in,u=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=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,_(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=u,t.input=l,t.avail_in=h,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,n,a,o=t("../utils/common");function s(t){for(var e=t.length;--e>=0;)t[e]=0}var h=573,u=[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=Array(576);s(d);var p=Array(60);s(p);var m=Array(512);s(m);var b=Array(256);s(b);var g=Array(29);s(g);var _=Array(30);function v(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 y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w(t){return t<256?m[t]:m[256+(t>>>7)]}function x(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function E(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,x(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 S(t,e,r){E(t,r[2*e],r[2*e+1])}function k(t,e){var r=0;do r|=1&t,t>>>=1,r<<=1;while(--e>0);return r>>>1}function M(t,e,r){var i,n,a=Array(16),o=0;for(i=1;i<=15;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]=k(a[s]++,s))}}function A(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;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 I(t){t.bi_valid>8?x(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 T(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 R(t,e,r){for(var i=t.heap[r],n=r<<1;n<=t.heap_len&&(n<t.heap_len&&T(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!T(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i}function P(t,e,r){var i,n,a,o,s=0;if(0!==t.last_lit)do i=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],n=t.pending_buf[t.l_buf+s],s++,0===i?S(t,n,e):(S(t,(a=b[n])+256+1,e),0!==(o=u[a])&&E(t,n-=g[a],o),S(t,a=w(--i),r),0!==(o=l[a])&&E(t,i-=_[a],o));while(s<t.last_lit);S(t,256,e)}function O(t,e){var r,i,n,a=e.dyn_tree,o=e.stat_desc.static_tree,s=e.stat_desc.has_stree,u=e.stat_desc.elems,l=-1;for(r=0,t.heap_len=0,t.heap_max=h;r<u;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--)R(t,a,r);n=u;do r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R(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++,R(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,u=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<=15;a++)t.bl_count[a]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<h;r++)(a=u[2*u[2*(i=t.heap[r])+1]+1]+1)>m&&(a=m,b++),u[2*i+1]=a,!(i>l)&&(t.bl_count[a]++,o=0,i>=p&&(o=d[i-p]),s=u[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)&&(u[2*n+1]!==a&&(t.opt_len+=(a-u[2*n+1])*u[2*n],u[2*n+1]=a),i--)}}(t,e),M(a,l,t.bl_count)}
1function C(t,e,r){var i,n,a=-1,o=e[1],s=0,h=7,u=4;for(0===o&&(h=138,u=3),e[(r+1)*2+1]=65535,i=0;i<=r;i++)n=o,o=e[(i+1)*2+1],++s<h&&n===o||(s<u?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?(h=138,u=3):n===o?(h=6,u=3):(h=7,u=4))}function L(t,e,r){var i,n,a=-1,o=e[1],s=0,h=7,u=4;for(0===o&&(h=138,u=3),i=0;i<=r;i++)if(n=o,o=e[(i+1)*2+1],!(++s<h)||n!==o){if(s<u)do S(t,n,t.bl_tree);while(0!=--s);else 0!==n?(n!==a&&(S(t,n,t.bl_tree),s--),S(t,16,t.bl_tree),E(t,s-3,2)):s<=10?(S(t,17,t.bl_tree),E(t,s-3,3)):(S(t,18,t.bl_tree),E(t,s-11,7));s=0,a=n,0===o?(h=138,u=3):n===o?(h=6,u=3):(h=7,u=4)}}s(_);var B=!1;function D(t,e,r,i){E(t,0+ +!!i,3),I(t),x(t,r),x(t,~r),o.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}r._tr_init=function(t){B||(!function(){var t,e,r,o,s,h=Array(16);for(o=0,r=0;o<28;o++)for(t=0,g[o]=r;t<1<<u[o];t++)b[r++]=o;for(b[r-1]=o,s=0,o=0;o<16;o++)for(t=0,_[o]=s;t<1<<l[o];t++)m[s++]=o;for(s>>=7;o<30;o++)for(t=0,_[o]=s<<7;t<1<<l[o]-7;t++)m[256+s++]=o;for(e=0;e<=15;e++)h[e]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,h[8]++;for(;t<=255;)d[2*t+1]=9,t++,h[9]++;for(;t<=279;)d[2*t+1]=7,t++,h[7]++;for(;t<=287;)d[2*t+1]=8,t++,h[8]++;for(M(d,287,h),t=0;t<30;t++)p[2*t+1]=5,p[2*t]=k(t,5);i=new v(d,u,257,286,15),n=new v(p,l,0,30,15),a=new v([],f,0,19,7)}(),B=!0),t.l_desc=new y(t.dyn_ltree,i),t.d_desc=new y(t.dyn_dtree,n),t.bl_desc=new y(t.bl_tree,a),t.bi_buf=0,t.bi_valid=0,A(t)},r._tr_stored_block=D,r._tr_flush_block=function(t,e,r,i){var n,a,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=0xf3ffc07f;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<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),O(t,t.l_desc),O(t,t.d_desc),o=function(t){var e;for(C(t,t.dyn_ltree,t.l_desc.max_code),C(t,t.dyn_dtree,t.d_desc.max_code),O(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,(a=t.static_len+3+7>>>3)<=n&&(n=a)):n=a=r+5,r+4<=n&&-1!==e?D(t,e,r,i):4===t.strategy||a===n?(E(t,2+ +!!i,3),P(t,d,p)):(E(t,4+ +!!i,3),function(t,e,r,i){var n;for(E(t,e-257,5),E(t,r-1,5),E(t,i-4,4),n=0;n<i;n++)E(t,t.bl_tree[2*c[n]+1],3);L(t,t.dyn_ltree,e-1),L(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),P(t,t.dyn_ltree,t.dyn_dtree)),A(t),i&&I(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[(b[r]+256+1)*2]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){E(t,2,3),S(t,256,d),16===t.bi_valid?(x(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)}},{"../utils/common":89}],101:[function(t,e,r){arguments[4][46][0].apply(r,arguments)},{dup:46}],102:[function(t,e,r){e.exports=function(t){if(!t)throw Error("no data provided");t=t.toString().trim();var e={pages:[],chars:[],kernings:[]},r=t.split(/\r\n?|\n/g);if(0===r.length)throw Error("no data in BMFont file");for(var n=0;n<r.length;n++){var a=function(t,e){if(!(t=t.replace(/\t+/g," ").trim()))return null;var r=t.indexOf(" ");if(-1===r)throw Error("no named row at line "+e);var n=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=i(s[0]):(a[a.length-1].data=i(s[0]),a.push({key:s[1],data:""}))}var h={key:n,data:{}};return a.forEach(function(t){h.data[t.key]=t.data}),h}(r[n],n);if(a)if("page"===a.key){if("number"!=typeof a.data.id)throw Error("malformed file at line "+n+" -- needs page id=N");if("string"!=typeof a.data.file)throw 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};function i(t){return t&&0!==t.length?0===t.indexOf('"')||0===t.indexOf("'")?t.substring(1,t.length-1):-1!==t.indexOf(",")?t.split(",").map(function(t){return parseInt(t,10)}):parseInt(t,10):""}},{}],103:[function(t,e,r){var i=[66,77,70];function n(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 Error("invalid buffer length for BMFont");if(!i.every(function(e,r){return t.readUInt8(r)===e}))throw Error("BMFont missing BMF byte header");var e=3;if(t.readUInt8(e++)>3)throw Error("Only supports BMFont Binary v3 (BMFont App v1.10)");for(var r={kernings:[],chars:[]},a=0;a<5;a++)e+=function(t,e,r){if(r>e.length-1)return 0;var i=e.readUInt8(r++),a=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);return r.smooth=i>>7&1,r.unicode=i>>6&1,r.italic=i>>5&1,r.bold=i>>4&1,i>>
13&1&&(r.fixedHeight=1),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=n(t,e+14).toString("utf8"),r}(e,r);break;case 2:t.common=function(t,e){var r={};return 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),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=[],a=n(t,e),o=a.length+1,s=r/o,h=0;h<s;h++)i[h]=t.slice(e,e+a.length).toString("utf8"),e+=o;return i}(e,r,a);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,a);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,a)}return 5+a}(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[a[(r=e.nodeName).toLowerCase()]||r]=e.nodeValue,t},{})}e.exports=function(t){var e=n(t=t.toString()),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 Error("malformed file -- no <pages> element");for(var s=a.getElementsByTagName("page"),h=0;h<s.length;h++){var u=s[h],l=parseInt(u.getAttribute("id"),10),f=u.getAttribute("file");if(isNaN(l))throw Error('malformed file -- page "id" attribute is NaN');if(!f)throw 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),h=0;h<s.length;h++){var u=s[h];r[t].push(i(o(u)))}}),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[i],delete t[i]),t)if("face"===e||"charset"===e)continue;else"padding"===e||"spacing"===e?t[e]=t[e].split(",").map(function(t){return parseInt(t,10)}):t[e]=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--;)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 TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,n="/"===o.charAt(0))}return r=e(i(r.split("/"),function(t){return!!t}),!n).join("/"),(n?"/":"")+r||"."},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)}
1,r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(i(t,function(t,e){if("string"!=typeof t)throw 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,h=0;h<o;h++)if(n[h]!==a[h]){s=h;break}for(var u=[],h=s;h<n.length;h++)u.push("..");return(u=u.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){if(!n){r=o+1;break}continue}-1===i&&(n=!1,i=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1)}return -1===e||-1===i||0===a||1===a&&e===i-1&&e===r+1?"":t.slice(e,i)};var n=function(t,e,r){return 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"),h=t("zlib"),u=t("util"),l=function(t,e){if("string"!=typeof t&&!t.hasOwnProperty("url"))throw Error("Missing url option from options for request method.");var u=(void 0===t?"undefined":i(t))==="object"?o.parse(t.url):o.parse(t),l={hostname:u.hostname,port:u.port||("http:"===u.protocol.toLowerCase()?80:443),path:u.path,method:"GET",headers:{},auth:u.auth||null,parse:"none",stream:!1};if((void 0===t?"undefined":i(t))==="object"&&(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 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(h.createGunzip()):"deflate"===t.headers["content-encoding"]&&(i=t.pipe(h.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){e("Invalid JSON received.",t);return}e(null,t)}}))};switch(u.protocol.toLowerCase()){case"http:":c=n.request(l,d);break;case"https:":c=a.request(l,d);break;default:e&&e(Error("Invalid / unknown URL protocol. Expected HTTP or HTTPS."),null);return}if("number"==typeof t.timeout&&c.setTimeout(t.timeout,function(){c.abort(),e(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(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(r,i){l(t,function(t,e){t?i(t):r(e)},e)})},u.promisify&&(l[u.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 h,u,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=(r*a+e)*4,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,(E*a+x)*4,!0);if(0===S?g++:S<0?v++:S>0&&_++,g>2)return!1;s&&(S<y&&(y=S,h=x,u=E),S>w&&(w=S,l=x,f=E))}
1return!s||0!==v&&0!==_&&(!i(t,h,u,a,o)&&!i(s,h,u,a,o)||!i(t,l,f,a,o)&&!i(s,l,f,a,o))}function n(t,e,r,i,n){var u=t[r+3]/255,l=e[i+3]/255,f=h(t[r+0],u),c=h(t[r+1],u),d=h(t[r+2],u),p=h(e[i+0],l),m=h(e[i+1],l),b=h(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 h(t,e){return 255+(t-255)*e}function u(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=(p*o+m)*4;if(n(t,e,b,b)>c)!l.includeAA&&(i(t,m,p,o,s,e)||i(e,m,p,o,s,t))?r&&u(r,b,255,255,0):(r&&u(r,b,255,0,0),d++);else if(r){var g=h(function(t,e){var r=t[e+3]/255;return a(h(t[e+0],r),h(t[e+1],r),h(t[e+2],r))}(t,b),.1);u(r,b,g,g,g)}}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}};r.dataToBitMap=function(t,r){var a,o,s,h=r.width,u=r.height,l=r.depth,f=r.bpp,c=r.interlace;if(8!==l)var d,p,m=(d=[],p=0,{get:function(e){for(;d.length<e;)!function(){if(p===t.length)throw Error("Ran out of data");var e,r,i,n,a=t[p];switch(p++,l){default:throw Error("unrecognised depth");case 16:i=t[p],p++,d.push((a<<8)+i);break;case 4:i=15&a,n=a>>4,d.push(n,i);break;case 2:e=3&a,r=a>>2&3,i=a>>4&3,n=a>>6&3,d.push(n,i,r,e);break;case 1:e=a>>4&1,r=a>>5&1,i=a>>6&1,n=a>>7&1,d.push(n,i,r,e,a>>3&1,a>>2&1,a>>1&1,1&a)}}();var r=d.slice(0,e);return d=d.slice(e),r},resetAfterLine:function(){d.length=0},end:function(){if(p!==t.length)throw Error("extra data found")}});a=l<=8?new e(h*u*4):new Uint16Array(h*u*4);var b=Math.pow(2,l)-1,g=0;if(c)o=i.getImagePasses(h,u),s=i.getInterlaceIterator(h,u);else{var _=0;s=function(){var t=_;return _+=4,t},o=[{width:h,height:u}]}for(var v=0;v<o.length;v++)8===l?g=function(t,e,r,i,a,o){for(var s=t.width,h=t.height,u=t.index,l=0;l<h;l++)for(var f=0;f<s;f++){for(var c=r(f,l,u),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 Error("Ran out of data");e[c+d]=a[m]}}o+=i}return o}(o[v],a,s,f,t,g):function(t,e,r,i,a,o){for(var s=t.width,h=t.height,u=t.index,l=0;l<h;l++){for(var f=0;f<s;f++)for(var c=a.get(i),d=r(f,l,u),p=0;p<4;p++){var m=n[i][p];e[d+p]=255!==m?c[m]:o}a.resetAfterLine()}}(o[v],a,s,f,m,b);if(8===l){if(g!==t.length)throw Error("extra data found")}else m.end();return a}}).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=-1!==[i.COLORTYPE_COLOR_ALPHA,i.COLORTYPE_ALPHA].indexOf(a.colorType);if(a.colorType===a.inputColorType){var s,h=(new DataView(s=new ArrayBuffer(2)).setInt16(0,256,!0),256!==new Int16Array(s)[0]);if(8===a.bitDepth||16===a.bitDepth&&h)return t}var u=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||{};void 0===b.red&&(b.red=l),void 0===b.green&&(b.green=l),void 0===b.blue&&(b.blue=l);for(var g=0;g<n;g++)for(var _=0;_<e;_++){var v=function(t,e){var r,n,s,h=l;switch(a.inputColorType){case i.COLORTYPE_COLOR_ALPHA:h=t[e+3],r=t[e],n=t[e+1],s=t[e+2];break;case i.COLORTYPE_COLOR:r=t[e],n=t[e+1],s=t[e+2];break;case i.COLORTYPE_ALPHA:h=t[e+1],n=r=t[e],s=r;break;case i.COLORTYPE_GRAYSCALE:n=r=t[e],s=r;break;default:throw Error("input color type:"+a.inputColorType+" is not supported at present")}return a.inputHasAlpha&&!o&&(h/=l,r=Math.min(Math.max(Math.round((1-h)*b.red+h*r),0),l),n=Math.min(Math.max(Math.round((1-h)*b.green+h*n),0),l),s=Math.min(Math.max(Math.round((1-h)*b.blue+h*s),0),l)),{red:r,green:n,blue:s,alpha:h}}(u,p);switch(a.colorType){case i.COLORTYPE_COLOR_ALPHA:case i.COLORTYPE_COLOR:8===a.bitDepth?(d[m]=v.red,d[m+1]=v.green,d[m+2]=v.blue,o&&(d[m+3]=v.alpha)):(d.writeUInt16BE(v.red,m),d.writeUInt16BE(v.green,m+2),d.writeUInt16BE(v.blue,m+4),o&&d.writeUInt16BE(v.alpha,m+6));break;case i.COLORTYPE_ALPHA:case i.COLORTYPE_GRAYSCALE:var y=(v.red+v.green+v.blue)/3;8===a.bitDepth?(d[m]=y,o&&(d[m+1]=v.alpha)):(d.writeUInt16BE(y,m),o&&d.writeUInt16BE(v.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>
10&&(this._paused=!1,this.emit("drain"))}).bind(this))},o.prototype.write=function(t,e){var r;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",Error("Stream not writable")),!1)},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",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)this._processRead(t);else break}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:0x49484452,TYPE_IEND:0x49454e44,TYPE_IDAT:0x49444154,TYPE_PLTE:0x504c5445,TYPE_tRNS:0x74524e53,TYPE_gAMA:0x67414d41,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";for(var i=[],n=0;n<256;n++){for(var a=n,o=0;o<8;o++)1&a?a=0xedb88320^a>>>1:a>>>=1;i[n]=a}var s=e.exports=function(){this._crc=-1};s.prototype.write=function(t){for(var e=0;e<t.length;e++)this._crc=i[(this._crc^t[e])&255]^this._crc>>>8;return!0},s.prototype.crc32=function(){return -1^this._crc},s.crc32=function(t){for(var e=-1,r=0;r<t.length;r++)e=i[(e^t[r])&255]^e>>>8;return -1^e}},{}],115:[function(t,e,r){(function(r){"use strict";var i=t("./paeth-predictor"),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,h=t[e+o]-s;i[n+o]=h}},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,h=e>0?t[e+o-r]:0,u=t[e+o]-(s+h>>1);i[n+o]=u}},4:function(t,e,r,n,a,o){for(var s=0;s<r;s++){var h=s>=o?t[e+s-o]:0,u=e>0?t[e+s-r]:0,l=e>0&&s>=o?t[e+s-(r+o)]:0,f=t[e+s]-i(h,u,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;n+=Math.abs(t[e+a]-o)}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;i+=Math.abs(t[a]-o)}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;n+=Math.abs(t[e+a]-(o+s>>1))}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,h=e>0?t[e+o-r]:0,u=e>0&&o>=n?t[e+o-(r+n)]:0;a+=Math.abs(t[e+o]-i(s,h,u))}return a}};e.exports=function(t,e,i,o,s){if("filterType"in o&&-1!==o.filterType)if("number"==typeof o.filterType)h=[o.filterType];else throw Error("unrecognised filter types");else h=[0,1,2,3,4];16===o.bitDepth&&(s*=2);for(var h,u=e*s,l=0,f=0,c=new r((u+1)*i),d=h[0],p=0;p<i;p++){if(h.length>1)for(var m=1/0,b=0;b<h.length;b++){var g=a[h[b]](t,f,u,s);g<m&&(d=h[b],m=g)}c[l]=d,l++,n[d](t,f,u,c,l,s),l+=u,f+=u}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,h=t.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],o)for(var u=i.getImagePasses(r,n),l=0;l<u.length;l++)this._images.push({byteWidth:a(u[l].width,s,h),height:u[l].height,lineIndex:0});else this._images.push({byteWidth:a(r,s,h),height:n,lineIndex:0});8===h?this._xComparison=s:16===h?this._xComparison=2*s:this._xComparison=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],h=a?a[o]:0,u=Math.floor(((o>n?e[o-i]:0)+h)/2);e[o]=s+u}},o.prototype._unFilterType4=function(t,e,r){for(var i=this._xComparison,a=i-1,o=this._lastLine,s=0;s<r;s++){var h=t[1+s],u=o?o[s]:0,l=n(s>a?e[s-i]:0,u,s>a&&o?o[s-i]:0);e[s]=h+l}},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 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,h=r.palette,u=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 h=n[t[a]];if(!h)throw Error("index "+t[a]+" not in palette");for(var u=0;u<4;u++)e[a+u]=h[u];a+=4}}(e,u,n,a,h):(s&&function(t,e,r,i,n){for(var a=0,o=0;o<i;o++)for(var s=0;s<r;s++){var h=!1;if(1===n.length?n[0]===t[a]&&(h=!0):n[0]===t[a]&&n[1]===t[a+1]&&n[2]===t[a+2]&&(h=!0),h)for(var u=0;u<4;u++)e[a+u]=0;a+=4}}(e,u,n,a,s),8!==i&&(16===i&&(u=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 h=0;h<r;h++){for(var u=0;u<4;u++)e[o+u]=Math.floor(255*t[o+u]/a+.5);o+=4}}(e,u,n,a,i))),u}}).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]}
1,{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,h=0;h<i.length;h++){for(var u=i[h],l=o*u.x.length,f=s*u.y.length,c=0;c<u.x.length;c++)if(u.x[c]<n)l++;else break;for(c=0;c<u.y.length;c++)if(u.y[c]<a)f++;else break;l>0&&f>0&&r.push({width:l,height:f,index:h})}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),this._packer=new o(t||{}),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 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||{}),h=[];h.push(new r(a.PNG_SIGNATURE)),h.push(s.packIHDR(t.width,t.height)),t.gamma&&h.push(s.packGAMA(t.gamma));var u=s.filterData(t.data,t.width,t.height),l=n.deflateSync(u,s.getDeflateOptions());if(u=null,!l||!l.length)throw Error("bad png - invalid compressed data response");return h.push(s.packIDAT(l)),h.push(s.packIEND()),r.concat(h)}}).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"),h=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 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 Error("option input color type:"+t.inputColorType+" is not supported at present");if(8!==t.bitDepth&&16!==t.bitDepth)throw Error("option bit depth:"+t.bitDepth+" is not supported at present")};h.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},h.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},h.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)},h.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},h.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)},h.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)},h.prototype.packIDAT=function(t){return this._packChunk(i.TYPE_IDAT,t)},h.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);
1return 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"),h=t("./bitmapper"),u=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=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*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=h.dataToBitMap(t,this._bitmapInfo),r=u(e,this._bitmapInfo);e=null}catch(t){this._handleError(t);return}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"),h=t("./parser"),u=t("./bitmapper"),l=t("./format-normaliser");e.exports=function(t,e){if(!i)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");var f,c,d,p,m=[],b=new o(t);if(new h(e,{read:b.read.bind(b),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){m.push(t)}}).start(),b.process(),f)throw f;var g=r.concat(m);if(m.length=0,c.interlace)p=n.inflateSync(g);else{var _=((c.width*c.bpp*c.depth+7>>3)+1)*c.height;p=a(g,{chunkSize:_,maxLength:_})}if(g=null,!p||!p.length)throw Error("bad png - invalid inflate data response");var v=s.process(p,c);g=null;var y=u.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(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 h=!!(32&t[4]);return this._hasIHDR||a===i.TYPE_IHDR?(this._crc=new n,this._crc.write(new r(o)),this._chunks[a])?this._chunks[a](e):h?void this.read(e+4,this._skipChunk.bind(this)):void this.error(Error("Unsupported critical chunk type "+o
1)):void this.error(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();if(this._options.checkCRC&&r!==e)return void this.error(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],h=t[12];if(8!==n&&4!==n&&2!==n&&1!==n&&16!==n)return void this.error(Error("Unsupported bit depth "+n));if(!(a in i.COLORTYPE_TO_BPP_MAP))return void this.error(Error("Unsupported color type"));if(0!==o)return void this.error(Error("Unsupported compression method"));if(0!==s)return void this.error(Error("Unsupported filter method"));if(0!==h&&1!==h)return void this.error(Error("Unsupported interlace method"));this._colorType=a;var u=i.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:r,depth:n,interlace:!!h,palette:!!(a&i.COLORTYPE_PALETTE),color:!!(a&i.COLORTYPE_COLOR),alpha:!!(a&i.COLORTYPE_ALPHA),bpp:u,colorType:a}),this._handleChunkEnd()},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(Error("Transparency chunk must be after palette"));if(t.length>this._palette.length)return void this.error(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 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"),h=t("./png-sync"),u=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(u,a),u.sync=h,u.prototype.pack=function(){return this.data&&this.data.length?e.nextTick((function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}
1).bind(this)):this.emit("error","No data provided"),this},u.prototype.parse=function(t,e){if(e){var r,i;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},u.prototype.write=function(t){return this._parser.write(t),!0},u.prototype.end=function(t){this._parser.end(t)},u.prototype._metadata=function(t){this.width=t.width,this.height=t.height,this.emit("metadata",t)},u.prototype._gamma=function(t){this.gamma=t},u.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},u.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 Error("bitblt reading outside image");if(o>e.width||s>e.height||o+n>e.width||s+a>e.height)throw Error("bitblt writing outside image");for(var h=0;h<a;h++)t.data.copy(e.data,(s+h)*e.width+o<<2,(i+h)*t.width+r<<2,(i+h)*t.width+r+n<<2)},u.prototype.bitblt=function(t,e,r,i,n,a,o){return u.bitblt(this,t,e,r,i,n,a,o),this},u.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}},u.prototype.adjustGamma=function(){u.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"),h=t("buffer").kMaxLength;function u(t){if(!(this instanceof u))return new u(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){var r=new u(e),i=t;if("string"==typeof i&&(i=n.from(i)),!(i instanceof n))throw TypeError("Not a string or buffer");var a=r._finishFlushFlag;return null==a&&(a=o.Z_FINISH),r._processChunk(i,a)}u.prototype._processChunk=function(t,e,r){if("function"==typeof r)return o.Inflate._processChunk.call(this,t,e,r);var i,s=this,u=t&&t.length,f=this._chunkSize-this._offset,c=this._maxLength,d=0,p=[],m=0;this.on("error",function(t){i=t}),a(this._handle,"zlib binding closed");do{var b=this._handle.writeSync(e,t,d,u,this._buffer,this._offset,f);b=b||this._writeState}while(!this._hadError&&function(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+=u-t,u=t,!0)}}(b[0],b[1]));if(this._hadError)throw i;if(m>=h)throw l(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+h.toString(16)+" bytes");var g=n.concat(p,m);return l(this),g},s.inherits(u,o.Inflate),e.exports=r=f,r.Inflate=u,r.createInflate=function(t){return new u(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)){this._reads.shift();var e=this._buffer;this._buffer=e.slice(t.length),t.func.call(this,e.slice(0,t.length))}else break}return this._reads.length>0?Error("There are some read requests waitng on finished stream"):this._buffer.length>0?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=t:e.exp
1orts={nextTick:function(e,r,i,n){if("function"!=typeof e)throw 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=Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return t.nextTick(function(){e.apply(null,a)})}}}}).call(this,t("_process"))},{_process:133}],133:[function(t,e,r){var i,n,a,o=e.exports={};function s(){throw Error("setTimeout has not been defined")}function h(){throw Error("clearTimeout has not been defined")}try{i="function"==typeof setTimeout?setTimeout:s}catch(t){i=s}try{n="function"==typeof clearTimeout?clearTimeout:h}catch(t){n=h}function u(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!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)}}}var l=[],f=!1,c=-1;function d(){f&&a&&(f=!1,a.length?l=a.concat(l):c=-1,l.length&&p())}function p(){if(!f){var t=u(d);f=!0;for(var e=l.length;e;){for(a=l,l=[];++c<e;)a&&a[c].run();c=-1,e=l.length}a=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===h||!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(){}o.nextTick=function(t){var e=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)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=b,o.addListener=b,o.once=b,o.off=b,o.removeListener=b,o.removeAllListeners=b,o.emit=b,o.prependListener=b,o.prependOnceListener=b,o.listeners=function(t){return[]},o.binding=function(t){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],134:[function(e,n,a){(function(e){!function(r){var i="object"==typeof a&&a&&!a.nodeType&&a,o="object"==typeof n&&n&&!n.nodeType&&n,s="object"==typeof e&&e;(s.global===s||s.window===s||s.self===s)&&(r=s);var h,u,l=/^xn--/,f=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,m=String.fromCharCode;function b(t){throw RangeError(d[t])}function g(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function _(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+g((t=t.replace(c,".")).split("."),e).join(".")}function v(t){for(var e,r,i=[],n=0,a=t.length;n<a;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<a?(64512&(r=t.charCodeAt(n++)))==56320?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--):i.push(e);return i}function y(t){return g(t,function(t){var e="";return t>65535&&(t-=65536,e+=m(t>>>10&1023|55296),t=56320|1023&t),e+=m(t)}).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,r){var i=0;for(t=r?p(t/700):t>>1,t+=p(t/e);t>455;i+=36)t=p(t/35);return p(i+36*t/(t+38))}function E(t){var e,r,i,n,a,o,s,h,u,l,f,c=[],d=t.length,m=0,g=128,_=72;for((i=t.lastIndexOf("-"))<0&&(i=0),n=0;n<i;++n)t.charCodeAt(n)>=128&&b("not-basic"),c.push(t.charCodeAt(n));for(a=i>0?i+1:0;a<d;){for(o=m,s=1,h=36;a>=d&&b("invalid-input"),((u=(e=t.charCodeAt(a++))-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36)>=36||u>p((0x7fffffff-m)/s))&&b("overflow"),m+=u*s,!(u<(l=h<=_?1:h>=_+26?26:h-_));h+=36){;s>p(0x7fffffff/(f=36-l))&&b("overflow"),s*=f}_=x(m-o,r=c.length+1,0==o),p(m/r)>0x7fffffff-g&&b("overflow"),g+=p(m/r),m%=r,c.splice(m++,0,g)}return y(c)}function S(t){var e,r,i,n,a,o,s,h,u,l,f,c,d,g,_,y=[];for(o=0,c=(t=v(t)).length,e=128,r=0,a=72;o<c;++o)(f=t[o])<128&&y.push(m(f));for(i=n=y.length,n&&y.push("-");i<c;){for(s=0x7fffffff,o=0;o<c;++o)(f=t[o])>=e&&f<s&&(s=f);for(s-e>p((0x7fffffff-r)/(d=i+1))&&b("overflow"),r+=(s-e)*d,e=s,o=0;o<c;++o)if((f=t[o])<e&&++r>0x7fffffff&&b("overflow"),f==e){for(h=r,u=36;!(h<(l=u<=a?1:u>=a+26?26:u-a));u+=36)_=h-l,g=36-l,y.push(m(w(l+_%g,0))),h=p(_/g);y.push(m(w(h,0))),a=x(r,d,i==n),r=0,++i}++r,++e}return y.join("")}if(h={version:"1.4.1",ucs2:{decode:v,encode:y},decode:E,encode:S,toASCII:function(t){return _(t,function(t){return f.test(t)?"xn--"+S(t):t})},toUnicode:function(t){return _(t,function(t){return l.test(t)?E(t.slice(4).toLowerCase()):t})}},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return h});else if(i&&o)if(n.exports==i)o.exports=h;else for(u in h)h.hasOwnProperty(u)&&(i[u]=h[u]);
1else r.punycode=h}(this)}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{})},{}],135:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){e=e||"&",r=r||"=";var a={};if("string"!=typeof t||0===t.length)return a;var o=/\+/g;t=t.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var h=t.length;s>0&&h>s&&(h=s);for(var u=0;u<h;++u){var l,f,c,d,p=t[u].replace(o,"%20"),m=p.indexOf(r);(m>=0?(l=p.substr(0,m),f=p.substr(m+1)):(l=p,f=""),c=decodeURIComponent(l),d=decodeURIComponent(f),Object.prototype.hasOwnProperty.call(a,c))?i(a[c])?a[c].push(d):a[c]=[a[c],d]:a[c]=d}return a};var i=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 h=n(s.prototype),u=0;u<h.length;u++){var l=h[u];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,n){(function(r,i){"use strict";var n,a,o=t("process-nextick-args");e.exports=v;var s=t("isarray");v.ReadableState=_,t("events").EventEmitter;var h=function(t,e){return t.listeners(e).length},u=t("./internal/streams/stream"),l=t("safe-buffer").Buffer,f=i.Uint8Array||function(){},c=t("core-util-is");c.inherits=t("inherits");var d=t("util"),p=void 0;p=d&&d.debuglog?d.debuglog("stream"):function(){};var m=t("./internal/streams/BufferList"),b=t("./internal/streams/destroy");c.inherits(v,u);var g=["error","close","destroy","pause","resume"];function _(e,r){n=n||t("./_stream_duplex"),e=e||{};var i=r instanceof n;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,s=e.readableHighWaterMark,h=this.objectMode?16:16384;o||0===o?this.highWaterMark=o:i&&(s||0===s)?this.highWaterMark=s:this.highWaterMark=h,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&&(a||(a=t("string_decoder/").StringDecoder),this.decoder=new a(e.encoding),this.encoding=e.encoding)}function v(e){if(n=n||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,s,h=t._readableState;return null===e?(h.reading=!1,function(t,e){if(!e.ended){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(t)}}(t,h)):(n||(s=function(t,e){var r;return l.isBuffer(e)||e instanceof f||"string"==typeof e||void 0===e||t.objectMode||(r=TypeError("Invalid non-string/buffer chunk")),r}(h,e)),s)?t.emit("error",s):h.objectMode||e&&e.length>0?("string"==typeof e||h.objectMode||Object.getPrototypeOf(e)===l.prototype||(o=e,e=l.from(o)),i?h.endEmitted?t.emit("error",Error("stream.unshift() after end event")):w(t,h,e,!0):h.ended?t.emit("error",Error("stream.push() after EOF")):(h.reading=!1,h.decoder&&!r?(e=h.decoder.write(e),h.objectMode||0!==e.length?w(t,h,e,!1):k(t,h)):w(t,h,e,!1))):i||(h.reading=!1),!(a=h).ended&&(a.needReadable||a.length<a.highWaterMark||0===a.length)}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&&E(t)),k(t,e)}function x(t,e){var r;if(t<=0||0===e.length&&e.ended)return 0;if(e.objectMode)return 1;if(t!=t)if(e.flowing&&e.length)return e.buffer.head.data.length;else return e.length;return(t>e.highWaterMark&&((r=t)>=8388608?r=8388608:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),e.highWaterMark=r),t<=e.length)?t:e.ended?e.length:(e.needReadable=!0,0)}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?o.nextTick(S,t):S(t))}function S(t){p("emit readable"),t.emit("readable"),T(t)}function k(t,e){e.readingMore||(e.readingMore=!0,o.nextTick(M,t,e))}function M(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function A(t){p("readable nexttick read 0"),t.read(0)}function I(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),T(t),e.flowing&&!e.reading&&t.read(0)}function T(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function R(t,e){var r,i,n,a,o;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()):(i=t,n=e.buffer,a=e.decoder,i<n.head.data.length?(o=n.head.data.slice(0,i),n.head.data=n.head.data.slice(i)):o=i===n.head.data.length?n.shift():a?function(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;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
1=null):(e.head=r,r.data=a.slice(o));break}++i}return e.length-=i,n}(i,n):function(t,e){var r=l.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;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}(i,n),r=o),r)}function P(t){var e=t._readableState;if(e.length>0)throw Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,o.nextTick(O,e,t))}function O(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function C(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return -1}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=l.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 a||(a=t("string_decoder/").StringDecoder),this._readableState.decoder=new a(e),this._readableState.encoding=e,this},v.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e,r=this._readableState,i=t;if(0!==t&&(r.emittedReadable=!1),0===t&&r.needReadable&&(r.length>=r.highWaterMark||r.ended))return p("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?P(this):E(this),null;if(0===(t=x(t,r))&&r.ended)return 0===r.length&&P(this),null;var n=r.needReadable;return p("need readable",n),(0===r.length||r.length-t<r.highWaterMark)&&p("length less than watermark",n=!0),r.ended||r.reading?p("reading or ended",n=!1):n&&(p("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(t=x(i,r))),null===(e=t>0?R(t,r):null)?(r.needReadable=!0,t=0):r.length-=t,0===r.length&&(r.ended||(r.needReadable=!0),i!==t&&r.ended&&P(this)),null!==e&&this.emit("data",e),e},v.prototype._read=function(t){this.emit("error",Error("_read() is not implemented"))},v.prototype.pipe=function(t,e){var i,n=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,p("pipe count=%d opts=%j",a.pipesCount,e);var u=e&&!1===e.end||t===r.stdout||t===r.stderr?v:l;function l(){p("onend"),t.end()}a.endEmitted?o.nextTick(u):n.once("end",u),t.on("unpipe",function e(r,i){p("onunpipe"),r===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,p("cleanup"),t.removeListener("close",g),t.removeListener("finish",_),t.removeListener("drain",f),t.removeListener("error",b),t.removeListener("unpipe",e),n.removeListener("end",l),n.removeListener("end",v),n.removeListener("data",m),c=!0,a.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&f())});var f=(i=n,function(){var t=i._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&h(i,"data")&&(t.flowing=!0,T(i))});t.on("drain",f);var c=!1,d=!1;function m(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==C(a.pipes,t))&&!c&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function b(e){p("onerror",e),v(),t.removeListener("error",b),0===h(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",_),v()}function _(){p("onfinish"),t.removeListener("close",g),v()}function v(){p("unpipe"),n.unpipe(t)}return n.on("data",m),!function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(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",n),a.flowing||(p("pipe resume"),n.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=C(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&&E(this):o.nextTick(A,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var t,e,r=this._readableState;return r.flowing||(p("resume"),r.flowing=!0,t=this,(e=r).resumeScheduled||(e.resumeScheduled=!0,o.nextTick(I,t,e))),this},v.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit
1("pause")),this},v.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",function(){if(p("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){if(p("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){p("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=R}).call(this,t("_process"),void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{})},{"./_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",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){h(t,e,r)}):h(this,null,null)}function h(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw 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 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,n){(function(r,i,n){"use strict";var a,o,s=t("process-nextick-args");function h(t){var e=this;this.next=null,this.entry=null,this.finish=function(){var r=e,i=t,n=r.entry;for(r.entry=null;n;){var a=n.callback;i.pendingcb--,a(void 0),n=n.next}i.corkedRequestsFree?i.corkedRequestsFree.next=r:i.corkedRequestsFree=r}}e.exports=_;var u=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?n:s.nextTick;_.WritableState=g;var l=t("core-util-is");l.inherits=t("inherits");var f={deprecate:t("util-deprecate")},c=t("./internal/streams/stream"),d=t("safe-buffer").Buffer,p=i.Uint8Array||function(){},m=t("./internal/streams/destroy");function b(){}function g(e,r){a=a||t("./_stream_duplex"),e=e||{};var i=r instanceof a;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,o=e.writableHighWaterMark,l=this.objectMode?16:16384;n||0===n?this.highWaterMark=n:i&&(o||0===o)?this.highWaterMark=o:this.highWaterMark=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(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,e)--r.pendingcb,i?(s.nextTick(n,e),s.nextTick(S,t,r),t._writableState.errorEmitted=!0,t.emit("error",e)):(n(e),t._writableState.errorEmitted=!0,t.emit("error",e),S(t,r));else{var a=x(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),i?u(y,t,r,a,n):y(t,r,a,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 h(this)}l.inherits(_,c),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e};try{Object.defineProperty(g.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}function _(e){if(a=a||t("./_stream_duplex"),!o.call(_,this)&&!(this instanceof a))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)),c.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){var n,a;r||(n=t,0===(a=e).length&&a.needDrain&&(a.needDrain=!1,n.emit("drain"))),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=Array(e.bufferedRequestCount),n=e.corkedRequestsFree;n.entry=r;for(var a=0,o=!0;r;)i[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;i.allBuffers=o,v(t,e,!0,e.length,i,"",n.finish),e.pendingcb++,e.lastBufferedRequest=null,n.next?(e.corkedRequestsFree=n.next,n.next=null):e.corkedRequestsFree=new h(e),e.bufferedRequestCount=0}else{for(;r;){var s=r.chunk,u=r.encoding,l=r.callback,f=e.objectMode?1:s.length;if(v(t,e,!1,f,s,u,l),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&&(e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,s.nextTick(E,t,e)):(e.prefinished=!0,t.emit("prefinish"))),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(t){return!!o.call(this,t)||this===_&&t&&t._writableState instanceof g}})):o=function(t){return t instanceof this}
1,_.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))},_.prototype.write=function(t,e,r){var i,n,a,o,h,u,l,f,c=this._writableState,m=!1,g=!c.objectMode&&(i=t,d.isBuffer(i)||i instanceof p);return(g&&!d.isBuffer(t)&&(n=t,t=d.from(n)),"function"==typeof e&&(r=e,e=null),g?e="buffer":e||(e=c.defaultEncoding),"function"!=typeof r&&(r=b),c.ended)?(a=r,o=Error("write after end"),this.emit("error",o),s.nextTick(a,o)):(g||(h=t,u=r,l=!0,f=!1,null===h?f=TypeError("May not write null values to stream"):"string"==typeof h||void 0===h||c.objectMode||(f=TypeError("Invalid non-string/buffer chunk")),f&&(this.emit("error",f),s.nextTick(u,f),l=!1),l))&&(c.pendingcb++,m=function(t,e,r,i,n,a){if(!r){var o,s,h=(o=i,s=n,e.objectMode||!1===e.decodeStrings||"string"!=typeof o||(o=d.from(o,s)),o);i!==h&&(r=!0,n="buffer",i=h)}var u=e.objectMode?1:i.length;e.length+=u;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else v(t,e,!1,u,i,n,a);return l}(this,c,g,t,e,r)),m},_.prototype.cork=function(){var t=this._writableState;t.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 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(Error("_write() is not implemented"))},_.prototype._writev=null,_.prototype.end=function(t,e,r){var i,n,a,o=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),o.corked&&(o.corked=1,this.uncork()),o.ending||o.finished||(i=this,n=o,a=r,n.ending=!0,S(i,n),a&&(n.finished?s.nextTick(a):i.once("finish",a)),n.ended=!0,i.writable=!1)},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"),void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{},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(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");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=i.allocUnsafe(t>>>0),a=this.head,o=0;a;)e=a.data,r=o,e.copy(n,r),o+=a.data.length,a=a.next;return n},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._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 TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw 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 TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw 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){var e;if(!t)return"utf8";for(;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";
1case"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 Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=h,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=l,this.end=f,e=3;break;default:this.write=c,this.end=d;return}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((192&e[0])!=128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((192&e[1])!=128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(192&e[2])!=128)return t.lastNeed=2,"�"}}(this,t,0);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)):void(t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length)}function h(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 u(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){var e,r;if(0===t.length)return"";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]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||-2===n?0:(n=o(e[i]))>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||-2===n?0:(n=o(e[i]))>=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):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 h(t,r,i,n){var a,o,s,h,m=Object.create((r&&r.prototype instanceof p?r:p).prototype);return a=t,o=i,s=new k(n||[]),h=l,m._invoke=function(t,r){if(h===f)throw Error("Generator is already running");if(h===c){if("throw"===t)throw r;return A()}for(s.method=t,s.arg=r;;){var i=s.delegate;if(i){var n=function t(r,i){var n=r.iterator[i.method];if(e===n){if(i.delegate=null,"throw"===i.method){if(r.iterator.return&&
vendor: 5,248 bytes, line 1
1(i.method="return",i.arg=e,t(r,i),"throw"===i.method))return d;i.method="throw",i.arg=TypeError("The iterator does not provide a 'throw' method")}return d}var a=u(n,r.iterator,i.arg);if("throw"===a.type)return i.method="throw",i.arg=a.arg,i.delegate=null,d;var o=a.arg;return o?o.done?(i[r.resultName]=o.value,i.next=r.nextLoc,"return"!==i.method&&(i.method="next",i.arg=e),i.delegate=null,d):o:(i.method="throw",i.arg=TypeError("iterator result is not an object"),i.delegate=null,d)}(i,s);if(n){if(n===d)continue;return n}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(h===l)throw h=c,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);h=f;var p=u(a,o,s);if("normal"===p.type){if(h=s.done?c:"suspendedYield",p.arg===d)continue;return{value:p.arg,done:s.done}}"throw"===p.type&&(h=c,s.method="throw",s.arg=p.arg)}},m}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var l="suspendedStart",f="executing",c="completed",d={};function p(){}function m(){}function b(){}var g={};g[a]=function(){return this};var _=Object.getPrototypeOf,v=_&&_(_(M([])));v&&v!==r&&i.call(v,a)&&(g=v);var y=b.prototype=p.prototype=Object.create(g);function w(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function x(t){var e;this._invoke=function(r,n){function a(){return new Promise(function(e,a){!function e(r,n,a,o){var s=u(t[r],t,n);if("throw"===s.type)o(s.arg);else{var h=s.arg,l=h.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){h.value=t,a(h)},function(t){return e("throw",t,a,o)})}}(r,n,e,a)})}return e=e?e.then(a,a):a()}}function E(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function M(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:A}}function A(){return{value:e,done:!0}}return m.prototype=y.constructor=b,b.constructor=m,b[s]=m.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(x.prototype),x.prototype[o]=function(){return this},t.AsyncIterator=x,t.async=function(e,r,i,n){var a=new x(h(e,r,i,n));return t.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},w(y),y[s]="Generator",y[a]=function(){return this},y.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=M,k.prototype={constructor:k,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(S),!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 h=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(h&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);else if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(h){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else if(u){if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else throw Error("try statement without catch or finally")}}},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,d):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),d},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),S(r),d}},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;
1if("throw"===i.type){var n=i.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,i){return this.delegate={iterator:M(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=e),d}},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 TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw 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 TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw 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",h));var o=!1;function s(){o||(o=!0,t.end())}function h(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function u(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",h),r.removeListener("error",u),t.removeListener("error",u),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",u),t.on("error",u),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,n){(function(e){var r=t("./lib/request"),i=t("./lib/response"),a=t("xtend"),o=t("builtin-status-codes"),s=t("url");n.request=function(t,i){t="string"==typeof t?s.parse(t):a(t);var n=-1===e.location.protocol.search(/^https?:$/)?"http:":"",o=t.protocol||n,h=t.hostname||t.host,u=t.port,l=t.path||"/";h&&-1!==h.indexOf(":")&&(h="["+h+"]"),t.url=(h?o+"//"+h:"")+(u?":"+u:"")+l,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var f=new r(t);return i&&f.on("response",i),f},n.get=function(t,e){var r=n.request(t,e);return r.end(),r},n.ClientRequest=r,n.IncomingMessage=i.IncomingMessage,n.Agent=function(){},n.Agent.defaultMaxSockets=4,n.globalAgent=new n.Agent,n.STATUS_CODES=o,n.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,void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{})},{"./lib/request":158,"./lib/response":159,"builtin-status-codes":50,url:180,xtend:189}],157:[function(t,e,n){(function(t){var e;function r(){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 i(t){var e=r();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}function a(t){return"function"==typeof t}n.fetch=a(t.fetch)&&a(t.ReadableStream),n.writableStream=a(t.WritableStream),n.abortController=a(t.AbortController),n.arraybuffer=n.fetch||i("arraybuffer"),n.msstream=!n.fetch&&i("ms-stream"),n.mozchunkedarraybuffer=!n.fetch&&i("moz-chunked-arraybuffer"),n.overrideMimeType=n.fetch||!!r()&&a(r().overrideMimeType),e=null}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{})},{}],158:[function(t,e,n){(function(r,i,n){var a=t("./capability"),o=t("inherits"),s=t("./response"),h=t("readable-stream"),u=s.IncomingMessage,l=s.readyStates,f=e.exports=function(t){var e,r,i,o=this;h.Writable.call(o),o._opts=t,o._body=[],o._headers={},t.auth&&o.setHeader("Authorization","Basic "+n.from(t.auth).toString("base64")),Object.keys(t.headers).forEac
1h(function(e){o.setHeader(e,t.headers[e])});var s=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!a.abortController)s=!1,i=!0;else if("prefer-streaming"===t.mode)i=!1;else if("allow-wrong-content-type"===t.mode)i=!a.overrideMimeType;else if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw Error("Invalid value for opts.mode");else i=!0;e=i,r=s,o._mode=a.fetch&&r?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&e?"arraybuffer":"text",o._fetchTimer=null,o.on("finish",function(){o._onFinish()})};o(f,h.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 h=null;if(a.abortController){var u=new AbortController;h=u.signal,t._fetchAbortController=u,"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:h}).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){r.nextTick(function(){t.emit("error",e)});return}"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",Error("XHR error"))};try{f.send(o)}catch(e){r.nextTick(function(){t.emit("error",e)});return}}}},f.prototype._onXHRProgress=function(){(function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},f.prototype._connect=function(){var t=this;t._destroyed||(t._response=new u(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(){this._destroyed=!0,i.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},f.prototype.end=function(t,e,r){"function"==typeof t&&(r=t,t=void 0),h.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"),void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{},t("buffer").Buffer)},{"./capability":157,"./response":159,_process:133,buffer:48,inherits:75,"readable-stream":174}],159:[function(t,e,n){(function(e,r,i){var a=t("./capability"),o=t("inherits"),s=t("readable-stream"),h=n.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=n.IncomingMessage=function(t,n,o,h){var u=this;if(s.Readable.call(u),u._mode=o,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",function(){e.nextTick(function(){u.emit("close")})}),"fetch"===o){if(u._fetchResponse=n,u.url=n.url,u.statusCode=n.status,u.statusMessage=n.statusText,n.headers.forEac
1h(function(t,e){u.headers[e.toLowerCase()]=t,u.rawHeaders.push(e,t)}),a.writableStream){var l=new WritableStream({write:function(t){return new Promise(function(e,r){u._destroyed?r():u.push(i.from(t))?e():u._resumeFetch=e})},close:function(){r.clearTimeout(h),u._destroyed||u.push(null)},abort:function(t){u._destroyed||u.emit("error",t)}});try{n.body.pipeTo(l).catch(function(t){r.clearTimeout(h),u._destroyed||u.emit("error",t)});return}catch(t){}}var f=n.body.getReader();!function t(){f.read().then(function(e){if(!u._destroyed){if(e.done){r.clearTimeout(h),u.push(null);return}u.push(i.from(e.value)),t()}}).catch(function(t){r.clearTimeout(h),u._destroyed||u.emit("error",t)})}()}else if(u._xhr=t,u._pos=0,u.url=t.responseURL,u.statusCode=t.status,u.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===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(e[2])):void 0!==u.headers[r]?u.headers[r]+=", "+e[2]:u.headers[r]=e[2],u.rawHeaders.push(e[1],e[2])}}),u._charset="x-user-defined",!a.overrideMimeType){var c=u.rawHeaders["mime-type"];if(c){var d=c.match(/;\s*charset=([^;])(;|$)/);d&&(u._charset=d[1].toLowerCase())}u._charset||(u._charset="utf-8")}};o(u,s.Readable),u.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},u.prototype._onXHRProgress=function(){var t=this,e=t._xhr,n=null;switch(t._mode){case"text":if((n=e.responseText).length>t._pos){var a=n.substr(t._pos);if("x-user-defined"===t._charset){for(var o=i.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=n.length}break;case"arraybuffer":if(e.readyState!==h.DONE||!e.response)break;n=e.response,t.push(i.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=e.response,e.readyState!==h.LOADING||!n)break;t.push(i.from(new Uint8Array(n)));break;case"ms-stream":if(n=e.response,e.readyState!==h.LOADING)break;var u=new r.MSStreamReader;u.onprogress=function(){u.result.byteLength>t._pos&&(t.push(i.from(new Uint8Array(u.result.slice(t._pos)))),t._pos=u.result.byteLength)},u.onload=function(){t.push(null)},u.readAsArrayBuffer(n)}t._xhr.readyState===h.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,t("_process"),void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{},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){function r(r,i,n){return t.call(this,"string"==typeof e?e:e(r,i,n))||this}return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.__proto__=t,r}(r);n.prototype.name=r.name,n.prototype.code=t,i[t]=n}function a(t,e){if(!Array.isArray(t))return"of ".concat(e," ").concat(String(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])}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){if("string"==typeof e&&(i="not ",e.substr(0,i.length)===i)?(h="must not be",e=e.replace(/^not /,"")):h="must be",n=" argument",(void 0===o||o>t.length)&&(o=t.length),t.substring(o-n.length,o)===n)u="The ".concat(t," ").concat(h," ").concat(a(e,"type"));else{var i,n,o,s,h,u,l=("number"!=typeof s&&(s=0),s+1>t.length||-1===t.indexOf(".",s))?"argument":"property";u='The "'.concat(t,'" ').concat(l," ").concat(h," ").concat(a(e,"type"))}return u+". 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_
1UNKNOWN_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){r.has(e)||(r.add(e),t.emitWarning(e+" is an experimental feature. This feature could change at any time","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=u;var n=t("./_stream_readable"),a=t("./_stream_writable");t("inherits")(u,n);for(var o=i(a.prototype),s=0;s<o.length;s++){var h=o[s];u.prototype[h]||(u.prototype[h]=a.prototype[h])}function u(t){if(!(this instanceof u))return new u(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(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.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,n){(function(r,i){"use strict";e.exports=S,S.ReadableState=E,t("events").EventEmitter;var n,a,o,s,h=function(t,e){return t.listeners(e).length},u=t("./internal/streams/stream"),l=t("buffer").Buffer,f=i.Uint8Array||function(){},c=t("util");a=c&&c.debuglog?c.debuglog("stream"):function(){};var 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,u);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&&(o||(o=t("string_decoder/").StringDecoder),this.decoder=new o(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)),u.call(this)}function k(t,e,r,i,n){a("readableAddChunk",e);var o,s,h=t._readableState;if(null===e)h.reading=!1,function(t,e){if(!e.ended){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?I(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,T(t)))}}(t,h);else if(n||(s=function(t,e){var r;return l.isBuffer(e)||e instanceof f||"string"==typeof e||void 0===e||t.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],e)),r}(h,e)),s)t.emit("error",s);else if(h.objectMode||e&&e.length>0)if("string"==typeof e||h.objectMode||Object.getPrototypeOf(e)===l.prototype||(o=e,e=l.from(o)),i)h.endEmitted?t.emit("error",new y):M(t,h,e,!0);else if(h.ended)t.emit("error",new _);else{if(h.destroyed)return!1;h.reading=!1,h.decoder&&!r?(e=h.decoder.write(e),h.objectMode||0!==e.length?M(t,h,e,!1):R(t,h)):M(t,h,e,!1)}else i||(h.reading=!1,R(t,h));return!h.ended&&(h.length<h.highWaterMark||0===h.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&&I(t)),R(t,e)}function A(t,e){var r;if(t<=0||0===e.length&&e.ended)return 0;if(e.objectMode)return 1;if(t!=t)if(e.flowing&&e.length)return e.buffer.head.data.length;else return e.length;return(t>e.highWaterMark&&((r=t)>=8388608?r=8388608:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),e.highWaterMark=r),t<=e.length)?t:e.ended?e.length:(e.needReadable=!0,0)}function I(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(a("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(T,t))}function T(t){var e=t._readableState;
1a("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,B(t)}function R(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(P,t,e))}function P(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(a("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 C(t){a("readable nexttick read 0"),t.read(0)}function L(t,e){a("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(a("flow",e.flowing);e.flowing&&null!==t.read(););}function D(t,e){var r;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)}function N(t){var e=t._readableState;a("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(z,e,t))}function z(t,e){a("endReadableNT",t.endEmitted,t.length),t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function j(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return -1}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=l.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 o||(o=t("string_decoder/").StringDecoder),this._readableState.decoder=new o(e),this._readableState.encoding=this._readableState.decoder.encoding,this},S.prototype.read=function(t){a("read",t),t=parseInt(t,10);var e,r=this._readableState,i=t;if(0!==t&&(r.emittedReadable=!1),0===t&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return a("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?N(this):I(this),null;if(0===(t=A(t,r))&&r.ended)return 0===r.length&&N(this),null;var n=r.needReadable;return a("need readable",n),(0===r.length||r.length-t<r.highWaterMark)&&a("length less than watermark",n=!0),r.ended||r.reading?a("reading or ended",n=!1):n&&(a("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(t=A(i,r))),null===(e=t>0?D(t,r):null)?(r.needReadable=!0,t=0):(r.length-=t,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),i!==t&&r.ended&&N(this)),null!==e&&this.emit("data",e),e},S.prototype._read=function(t){this.emit("error",new v("_read()"))},S.prototype.pipe=function(t,e){var i,n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,a("pipe count=%d opts=%j",o.pipesCount,e);var s=e&&!1===e.end||t===r.stdout||t===r.stderr?b:u;function u(){a("onend"),t.end()}o.endEmitted?r.nextTick(s):n.once("end",s),t.on("unpipe",function e(r,i){a("onunpipe"),r===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,a("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",e),n.removeListener("end",u),n.removeListener("end",b),n.removeListener("data",c),f=!0,o.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l())});var l=(i=n,function(){var t=i._readableState;a("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&h(i,"data")&&(t.flowing=!0,B(i))});t.on("drain",l);var f=!1;function c(e){a("ondata");var r=t.write(e);a("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==j(o.pipes,t))&&!f&&(a("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function d(e){a("onerror",e),b(),t.removeListener("error",d),0===h(t,"error")&&t.emit("error",e)}function p(){t.removeListener("finish",m),b()}function m(){a("onfinish"),t.removeListener("close",p),b()}function b(){a("unpipe"),n.unpipe(t)}return n.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",n),o.flowing||(a("pipe resume"),n.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=j(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=u.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>
10,!1!==n.flowing&&this.resume()):"readable"!==t||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?I(this):n.reading||r.nextTick(C,this)),i},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var i=u.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(O,this),i},S.prototype.removeAllListeners=function(t){var e=u.prototype.removeAllListeners.apply(this,arguments);return("readable"===t||void 0===t)&&r.nextTick(O,this),e},S.prototype.resume=function(){var t,e,i=this._readableState;return i.flowing||(a("resume"),i.flowing=!i.readableListening,t=this,(e=i).resumeScheduled||(e.resumeScheduled=!0,r.nextTick(L,t,e))),i.paused=!1,this},S.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("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(a("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){if(a("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 o=0;o<x.length;o++)t.on(x[o],this.emit.bind(this,x[o]));return this._read=function(e){a("wrapped _read",e),i&&(i=!1,t.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return w("Readable[Symbol.asyncIterator]"),void 0===s&&(s=t("./internal/streams/async_iterator")),s(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=D,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}})}).call(this,t("_process"),void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{})},{"../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,h=t("./_stream_duplex");function u(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);h.call(this,t),this._transformState={afterTransform:u.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,h),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,h.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){h.prototype._destroy.call(this,t,function(t){e(t)})}},{"../errors":160,"./_stream_duplex":162,inherits:75}],166:[function(t,e,n){(function(r,i){"use strict";function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){var r=e,i=t,n=r.entry;for(r.entry=null;n;){var a=n.callback;i.pendingcb--,a(void 0),n=n.next}i.corkedRequestsFree.next=r}}e.exports=S,S.WritableState=E;var a,o,s={deprecate:t("util-deprecate")}
1,h=t("./internal/streams/stream"),u=t("buffer").Buffer,l=i.Uint8Array||function(){},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(i.writing=!1,i.writecb=null,i.length-=i.writelen,i.writelen=0,e)--i.pendingcb,n?(r.nextTick(a,e),r.nextTick(R,t,i),t._writableState.errorEmitted=!0,t.emit("error",e)):(a(e),t._writableState.errorEmitted=!0,t.emit("error",e),R(t,i));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)}t("inherits")(S,h),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e};try{Object.defineProperty(E.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}function S(e){var r=this instanceof(a=a||t("./_stream_duplex"));if(!r&&!o.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)),h.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){var n,a;r||(n=t,0===(a=e).length&&a.needDrain&&(a.needDrain=!1,n.emit("drain"))),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=Array(e.bufferedRequestCount),a=e.corkedRequestsFree;a.entry=r;for(var o=0,s=!0;r;)i[o]=r,r.isBuf||(s=!1),r=r.next,o+=1;i.allBuffers=s,k(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,u=r.encoding,l=r.callback,f=e.objectMode?1:h.length;if(k(t,e,!1,f,h,u,l),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&&(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))),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),i}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(t){return!!o.call(this,t)||this===S&&t&&t._writableState instanceof E}})):o=function(t){return t instanceof this}
1,S.prototype.pipe=function(){this.emit("error",new g)},S.prototype.write=function(t,e,i){var n,a,o,s,h,f,c,d=this._writableState,m=!1,b=!d.objectMode&&(n=t,u.isBuffer(n)||n instanceof l);return(b&&!u.isBuffer(t)&&(a=t,t=u.from(a)),"function"==typeof e&&(i=e,e=null),b?e="buffer":e||(e=d.defaultEncoding),"function"!=typeof i&&(i=x),d.ending)?(o=i,s=new y,this.emit("error",s),r.nextTick(o,s)):(b||(h=t,f=i,null===h?c=new v:"string"==typeof h||d.objectMode||(c=new p("chunk",["string","Buffer"],h)),!c||(this.emit("error",c),r.nextTick(f,c),0)))&&(d.pendingcb++,m=function(t,e,r,i,n,a){if(!r){var o,s,h=(o=i,s=n,e.objectMode||!1===e.decodeStrings||"string"!=typeof o||(o=u.from(o,s)),o);i!==h&&(r=!0,n="buffer",i=h)}var l=e.objectMode?1:i.length;e.length+=l;var f=e.length<e.highWaterMark;if(f||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else k(t,e,!1,l,i,n,a);return f}(this,d,b,t,e,i)),m},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,a,o,s=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),s.corked&&(s.corked=1,this.uncork()),s.ending||(n=this,a=s,o=i,a.ending=!0,R(n,a),o&&(a.finished?r.nextTick(o):n.once("finish",o)),a.ended=!0,n.writable=!1),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"),void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{})},{"../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";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,a=t("./end-of-stream"),o=Symbol("lastResolve"),s=Symbol("lastReject"),h=Symbol("error"),u=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((i(n={get stream(){return this[c]},next:function(){var t,e,i=this,n=this[h];if(null!==n)return Promise.reject(n);if(this[u])return Promise.resolve(d(void 0,!0));if(this[c].destroyed)return new Promise(function(t,e){r.nextTick(function(){i[h]?e(i[h]):t(d(void 0,!0))})});var a=this[l];if(a)e=new Promise((t=this,function(e,r){a.then(function(){if(t[u])return void e(d(void 0,!0));t[f](e,r)},r)}));else{var o=this[c].read();if(null!==o)return Promise.resolve(d(o,!1));e=new Promise(this[f])}return this[l]=e,e}},Symbol.asyncIterator,function(){return this}),i(n,"return",function(){var t=this;return new Promise(function(e,r){t[c].destroy(null,function(t){if(t)return void r(t);e(d(void 0,!0))})})}),n),b);e.exports=function(t){var e,r=Object.create(g,(i(e={},c,{value:t,writable:!0}),i(e,o,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,h,{value:null,writable:!0}),i(e,u,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var i=r[c].read();
1i?(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];null!==e&&(r[l]=null,r[o]=null,r[s]=null,e(t)),r[h]=t;return}var i=r[o];null!==i&&(r[l]=null,r[o]=null,r[s]=null,i(d(void 0,!0))),r[u]=!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";var i=t("buffer").Buffer,n=t("util").inspect,a=n&&n.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 i.alloc(0);for(var e,r,n=i.allocUnsafe(t>>>0),a=this.head,o=0;a;)e=a.data,r=o,i.prototype.copy.call(e,n,r),o+=a.data.length,a=a.next;return n},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=i.allocUnsafe(t),r=this.head,n=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?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=a.slice(o));break}++n}return this.length-=n,e},e[a]=function(t,e){return n(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),i.forEach(function(e){var i,n,a;i=t,n=e,a=r[e],n in i?Object.defineProperty(i,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[n]=a})}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,h=this._writableState&&this._writableState.destroyed;return s||h?a?a(e):!e||this._writableState&&this._writableState.errorEmitted||t.nextTick(n,this,e):(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={}),o=a||n,s=!1,a=function(){if(!s){s=!0;for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];o.apply(this,e)}};var o,s,h=r.readable||!1!==r.readable&&e.readable,u=r.writable||!1!==r.writable&&e.writable,l=function(){e.writable||c()},f=e._writableState&&e._writableState.finished,c=function(){u=!1,f=!0,h||a.call(e)},d=e._readableState&&e._readableState.endEmitted,p=function(){h=!1,d=!0,u||a.call(e)},m=function(t){a.call(e,t)},b=function(){var t;return h&&!d?(e._readableState&&e._readableState.ended||(t=new i),a.call(e,t)):u&&!f?(e._writableState&&e._writableState.ended||(t=new i),a.call(e,t)):void 0},g=function(){e.req.on("finish",c)};return e.setHeader&&"function"==typeof e.abort?(e.on("complete",c),e.on("abort",b),e.req?g():e.on("request",g)):u&&!e._writableState&&(e.on("end",l),e.on("close",l)),e.on("end",p),e.on("finish",c),!1!==r.error&&e.on("error",m),e.on("close",b),function(){e.removeListener("complete",c),e.removeListener("abort",b),e.removeListener("request",g),e.req&&e.req.removeListener("finish",c),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",c),e.removeListener("end",p),e.removeListener("error",m),e.removeListener("close",b)}}},{"../../../errors":160}],171:[function(t,e,r){"use strict";var i,n=t("../../../errors").codes,a=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function h(t){t()}function u(t,e){return t.pipe(e)}e.exports=function(){for(var e,r,n=arguments.length,l=Array(n),f=0;f<n;f++)l[f]=arguments[f];var c=(e=l).length&&"function"==typeof e[e.length-1]?e.pop():s;
1if(Array.isArray(l[0])&&(l=l[0]),l.length<2)throw new a("streams");var d=l.map(function(e,n){var a,s,u,f,p,m,b=n<l.length-1;return a=n>0,u=s=function(t){r||(r=t),t&&d.forEach(h),b||(d.forEach(h),c(r))},f=!1,s=function(){f||(f=!0,u.apply(void 0,arguments))},p=!1,e.on("close",function(){p=!0}),void 0===i&&(i=t("./end-of-stream")),i(e,{readable:b,writable:a},function(t){if(t)return s(t);p=!0,s()}),m=!1,function(t){if(!p&&!m){if(m=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();s(t||new o("pipe"))}}});return l.reduce(u)}},{"../../../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=null!=e.highWaterMark?e.highWaterMark:n?e[r]:null;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,n){var a=t("process/browser.js").nextTick,o=Function.prototype.apply,s=Array.prototype.slice,h={},u=0;function l(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new l(o.call(setTimeout,i,arguments),clearTimeout)},r.setInterval=function(){return new l(o.call(setInterval,i,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(i,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)&&s.call(arguments,1);return h[e]=!0,a(function(){h[e]&&(i?t.apply(null,i):t.call(null),r.clearImmediate(e))}),e},r.clearImmediate="function"==typeof n?n:function(t){delete h[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=v,r.update=y,r.updateIn=w,r.merge=x,r.mergeDeep=E,r.mergeIn=S,r.omit=k,r.addDefaults=M;var i="INVALID_ARGS";function n(t){throw 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 h(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&&u(l[v])&&u(y)&&(y=h(e,r,l[v],y)),void 0!==y&&y!==l[v]&&(f||(f=!0,l=s(l)),l[v]=y)}}}}return l}function u(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))break}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){return e.length?function t(e,r,i,n){var a=void 0,o=r[n];return a=n===r.length-1?i:t(u(e)&&u(e[o])?e[o]:"number"==typeof r[n+1]?[]:{},r,i,n+1),_(e,o,a)}(t,e,r,0):r}function y(t,e,r){var i=r(null==t?void 0:t[e]);return _(t,e,i)}function w(t,e,r){var i=r(g(t,e));return v(t,e,i)}function x(t,e,r,i,n,a){for(var o=arguments.length,s=Array(o>6?o-6:0),u=6;u<o;u++)s[u-6]=arguments[u];return s.length?h.call.apply(h,[null,!1,!1,t,e,r,i,n,a].concat(s)):h(!1,!1,t,e,r,i,n,a)}function E(t,e,r,i,n,a){for(var o=arguments.length,s=Array(o>6?o-6:0),u=6;u<o;u++)s[u-6]=arguments[u];return s.length?h.call.apply(h,[null,!1,!0,t,e,r,i,n,a].concat(s)):h(!1,!0,t,e,r,i,n,a)}function S(t,e,r,i,n,a,o){var s=g(t,e);null==s&&(s={});for(var u=void 0,l=arguments.length,f=Array(l>7?l-7:0),c=7;c<l;c++)f[c-7]=arguments[c];return v(t,e,f.length?h.call.apply(h,[null,!1,!1,s,r,i,n,a,o].concat(f)):h(!1,!1,s,r,i,n,a,o))}function k(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={},h=a(t),u=0;u<h.length;u++){var l=h[u];r.indexOf(l)>=0||(s[l]=t[l])}return s}function M(t,e,r,i,n,a){for(var o=arguments.length,s=Array(o>6?o-6:0),u=6;u<o;u++)s[u-6]=arguments[u];return s.length?h.call.apply(h,[null,!0,!1,t,e,r,i,n,a].concat(s)):h(!0,!1,t,e,r,i,n,a)}r.default={clone:s,addLast:l,addFirst:f,removeLast:c,removeFirst:d,insert:p,removeAt:m,replaceAt:b,getIn:g,set:_,setIn:v,update:y,updateIn:w,merge:x,mergeDeep:E,mergeIn:S,omit:k,addDefaults:M}}).call(this,t("_process"))},{_process:133}],178:[function(e,r,n){!function(e){var n,a,o,s=/^\s+/,h=/\s+$/,u=0,l=e.round,f=e.min,c=e.max,d=e.random;function p(t,r){if(r=r||{},(t=t||"")instanceof p)return t;if(!(this instanceof p))return new p(t,r);var i,n,a,o,d,m,b,g,_,v,y,w,x,E,S,k,M,A,I,T,R=(n={r:0,g:0,b:0},a=1,o=null,d=null,m=null,b=!1,g=!1,"string"==typeof(i=t)&&(i=function(t){t=t.replace(s,"").replace(h,"").toLowerCase();var e,r=!1;if(O[t])t=O[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=F.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=F.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=F.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=F.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=F.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=F.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=F.hex8.exec(t))?{r:N(e[1]),g:N(e[2]),b:N(e[3]),a:N(e[4])/255,format:r?"name":"hex8"}:(e=F.hex6.exec(t))?{r:N(e[1]),g:N(e[2]),b:N(e[3]),format:r?"name":"hex"}:(e=F.hex4.exec(t))?{r:N(e[1]+""+e[1]),g:N(e[2]+""+e[2]),b:N(e[3]+""+e[3]),a:N(e[4]+""+e[4])/255,format:r?"name":"hex8"}:!!(e=F.hex3.exec(t))&&{r:N(e[1]+""+e[1]),g:N(e[2]+""+e[2]),b:N(e[3]+""+e[3]),format:r?"name":"hex"}}
1(i)),"object"==typeof i&&(G(i.r)&&G(i.g)&&G(i.b)?(_=i.r,v=i.g,y=i.b,n={r:255*B(_,255),g:255*B(v,255),b:255*B(y,255)},b=!0,g="%"===String(i.r).substr(-1)?"prgb":"rgb"):G(i.h)&&G(i.s)&&G(i.v)?(o=j(i.s),d=j(i.v),w=i.h,x=o,E=d,w=6*B(w,360),x=B(x,100),E=B(E,100),S=e.floor(w),k=w-S,M=E*(1-x),A=E*(1-k*x),I=E*(1-(1-k)*x),n={r:255*[E,A,M,M,I,E][T=S%6],g:255*[I,E,E,A,M,M][T],b:255*[M,M,I,E,E,A][T]},b=!0,g="hsv"):G(i.h)&&G(i.s)&&G(i.l)&&(o=j(i.s),m=j(i.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+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=B(t,360),e=B(e,100),r=B(r,100),0===e)i=n=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,h=2*r-s;i=o(h,s,t+1/3),n=o(h,s,t),a=o(h,s,t-1/3)}return{r:255*i,g:255*n,b:255*a}}(i.h,o,m),b=!0,g="hsl"),i.hasOwnProperty("a")&&(a=i.a)),a=L(a),{ok:b,format:i.format||g,r:f(255,c(n.r,0)),g:f(255,c(n.g,0)),b:f(255,c(n.b,0)),a:a});this._originalInput=t,this._r=R.r,this._g=R.g,this._b=R.b,this._a=R.a,this._roundA=l(100*this._a)/100,this._format=r.format||R.format,this._gradientType=r.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=R.ok,this._tc_id=u++}function m(t,e,r){t=B(t,255);var i,n,a=c(t,e=B(e,255),r=B(r,255)),o=f(t,e,r),s=(a+o)/2;if(a==o)i=n=0;else{var h=a-o;switch(n=s>.5?h/(2-a-o):h/(a+o),a){case t:i=(e-r)/h+6*(e<r);break;case e:i=(r-t)/h+2;break;case r:i=(t-e)/h+4}i/=6}return{h:i,s:n,l:s}}function b(t,e,r){t=B(t,255);var i,n=c(t,e=B(e,255),r=B(r,255)),a=f(t,e,r),o=n-a;if(n==a)i=0;else{switch(n){case t:i=(e-r)/o+6*(e<r);break;case e:i=(r-t)/o+2;break;case r:i=(t-e)/o+4}i/=6}return{h:i,s:0===n?0:o/n,v:n}}function g(t,e,r,i){var n=[z(l(t).toString(16)),z(l(e).toString(16)),z(l(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 _(t,e,r,i){return[z(U(i)),z(l(t).toString(16)),z(l(e).toString(16)),z(l(r).toString(16))].join("")}function v(t,e){e=0===e?0:e||10;var r=p(t).toHsl();return r.s-=e/100,r.s=D(r.s),p(r)}function y(t,e){e=0===e?0:e||10;var r=p(t).toHsl();return r.s+=e/100,r.s=D(r.s),p(r)}function w(t){return p(t).desaturate(100)}function x(t,e){e=0===e?0:e||10;var r=p(t).toHsl();return r.l+=e/100,r.l=D(r.l),p(r)}function E(t,e){e=0===e?0:e||10;var r=p(t).toRgb();return r.r=c(0,f(255,r.r-l(-(e/100*255)))),r.g=c(0,f(255,r.g-l(-(e/100*255)))),r.b=c(0,f(255,r.b-l(-(e/100*255)))),p(r)}function S(t,e){e=0===e?0:e||10;var r=p(t).toHsl();return r.l-=e/100,r.l=D(r.l),p(r)}function k(t,e){var r=p(t).toHsl(),i=(r.h+e)%360;return r.h=i<0?360+i:i,p(r)}function M(t){var e=p(t).toHsl();return e.h=(e.h+180)%360,p(e)}function A(t){var e=p(t).toHsl(),r=e.h;return[p(t),p({h:(r+120)%360,s:e.s,l:e.l}),p({h:(r+240)%360,s:e.s,l:e.l})]}function I(t){var e=p(t).toHsl(),r=e.h;return[p(t),p({h:(r+90)%360,s:e.s,l:e.l}),p({h:(r+180)%360,s:e.s,l:e.l}),p({h:(r+270)%360,s:e.s,l:e.l})]}function T(t){var e=p(t).toHsl(),r=e.h;return[p(t),p({h:(r+72)%360,s:e.s,l:e.l}
1),p({h:(r+216)%360,s:e.s,l:e.l})]}function R(t,e,r){e=e||6,r=r||30;var i=p(t).toHsl(),n=360/r,a=[p(t)];for(i.h=(i.h-(n*e>>1)+720)%360;--e;)i.h=(i.h+n)%360,a.push(p(i));return a}function P(t,e){e=e||6;for(var r=p(t).toHsv(),i=r.h,n=r.s,a=r.v,o=[],s=1/e;e--;)o.push(p({h:i,s:n,v:a})),a=(a+s)%1;return o}p.prototype={isDark:function(){return 128>this.getBrightness()},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 t,r,i,n,a=this.toRgb();return t=a.r/255,r=a.g/255,i=a.b/255,n=t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4),.2126*n+.7152*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))+.0722*(i<=.03928?i/12.92:e.pow((i+.055)/1.055,2.4))},setAlpha:function(t){return this._a=L(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=b(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=b(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),i=l(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+i+"%)":"hsva("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),i=l(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+i+"%)":"hsla("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return g(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){var e,r,i,n,a,o;return e=this._r,r=this._g,i=this._b,n=this._a,a=t,o=[z(l(e).toString(16)),z(l(r).toString(16)),z(l(i).toString(16)),z(U(n))],a&&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)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*B(this._r,255))+"%",g:l(100*B(this._g,255))+"%",b:l(100*B(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*B(this._r,255))+"%, "+l(100*B(this._g,255))+"%, "+l(100*B(this._b,255))+"%)":"rgba("+l(100*B(this._r,255))+"%, "+l(100*B(this._g,255))+"%, "+l(100*B(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(C[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+_(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var n=p(t);r="#"+_(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)?"name"===t&&0===this._a?this.toName():this.toRgbString():("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())},clone:function(){return p(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(x,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(S,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(w,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(R,arguments)},complement:function(){return this._applyCombination(M,arguments)},monochromatic:function(){return this._applyCombination(P,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(I,arguments)}},p.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var i in t)t.hasOwnProperty(i)&&("a"===i?r[i]=t[i]:r[i]=j(t[i]));t=r}return p(t,e)},p.equals=function(t,e){return!!t&&!!e&&p(t).toRgbString()==p(e).toRgbString()},p.random=function(){return p.fromRatio({r:d(),g:d(),b:d()})},p.mix=function(t,e,r){r=0===r?0:r||50;var i=p(t).toRgb(),n=p(e).toRgb(),a=r/100;return p({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})},p.readability=function(t,r){var i=p(t),n=p(r);return(e.max(i.getLuminance(),n.getLuminance())+.05)/(e.min(i.getLuminance(),n.getLuminance())+.05)},p.isReadable=function(t,e,r){var i,n,a,o,s,h=p.readability(t,e);switch(s=!1,(n=((i=(i=r)||{level:"AA",size:"small"}).level||"AA").toUpperCase(),a=(i.size||"small").toLowerCase(),"AA"!==n&&"AAA"!==n&&(n="AA"),"small"!==a&&"large"!==a&&(a="small"),o={level:n,size:a}).level+o.size){case"AAsmall":case"AAAlarge":s=h>=4.5;break;case"AAlarge":s=h>=3;break;case"AAAsmall":s=h>=7}return s},p.mostReadable=function(t,e,r){var i,n,a,o,s=null,h=0;n=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;
vendor: 1,583 bytes, line 1
1for(var u=0;u<e.length;u++)(i=p.readability(t,e[u]))>h&&(h=i,s=p(e[u]));return p.isReadable(t,s,{level:a,size:o})||!n?s:(r.includeFallbackColors=!1,p.mostReadable(t,["#fff","#000"],r))};var O=p.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:"90ee9
10",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"},C=p.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(O);function L(t){return(isNaN(t=parseFloat(t))||t<0||t>1)&&(t=1),t}function B(t,r){"string"==typeof(i=t)&&-1!=i.indexOf(".")&&1===parseFloat(i)&&(t="100%");var i,n,a="string"==typeof(n=t)&&-1!=n.indexOf("%");return(t=f(r,c(0,parseFloat(t))),a&&(t=parseInt(t*r,10)/100),1e-6>e.abs(t-r))?1:t%r/parseFloat(r)}function D(t){return f(1,c(0,t))}function N(t){return parseInt(t,16)}function z(t){return 1==t.length?"0"+t:""+t}function j(t){return t<=1&&(t=100*t+"%"),t}function U(t){return e.round(255*parseFloat(t)).toString(16)}var F=(a="[\\s|\\(]+("+(n="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",{CSS_UNIT:new RegExp(n),rgb:RegExp("rgb"+a),rgba:RegExp("rgba"+o),hsl:RegExp("hsl"+a),hsla:RegExp("hsla"+o),hsv:RegExp("hsv"+a),hsva:RegExp("hsva"
1+o),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 G(t){return!!F.CSS_UNIT.exec(t)}void 0!==r&&r.exports?r.exports=p:"function"==typeof t&&t.amd?t(function(){return p}):i.tinycolor=p}(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=_,r.resolve=function(t,e){return _(t,!1,!0).resolve(e)},r.resolveObject=function(t,e){return t?_(t,!1,!0).resolveObject(e):e},r.format=function(t){return(n.isString(t)&&(t=_(t)),t instanceof a)?t.format():a.prototype.format.call(t)},r.Url=a;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["'"].concat(["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n"," "])),l=["%","/","?",";","#"].concat(u),f=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=t("querystring");function _(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 TypeError("Parameter 'url' must be a string, not "+typeof t);var a=t.indexOf("?"),s=-1!==a&&a<t.indexOf("#")?"?":"#",_=t.split(s);_[0]=_[0].replace(/\\/g,"/");var v=t=_.join(s);if(v=v.trim(),!r&&1===t.split("#").length){var y=h.exec(v);if(y)return this.path=v,this.href=v,this.pathname=y[1],y[2]?(this.search=y[2],e?this.query=g.parse(this.search.substr(1)):this.query=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&&m[w])&&(v=v.substr(2),this.slashes=!0)}if(!m[w]&&(E||w&&!b[w])){for(var S,k,M=-1,A=0;A<f.length;A++){var I=v.indexOf(f[A]);-1!==I&&(-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(var A=0;A<l.length;A++){var I=v.indexOf(l[A]);-1!==I&&(-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(/\./),A=0,P=R.length;A<P;A++){var O=R[A];if(O&&!O.match(c)){for(var C="",L=0,B=O.length;L<B;L++)O.charCodeAt(L)>127?C+="x":C+=O[L];if(!C.match(c)){var D=R.slice(0,A),N=R.slice(A+1),z=O.match(d);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(!p[x])for(var A=0,P=u.length;A<P;A++){var F=u[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=g.parse(this.query)),v=v.slice(0,q)):e&&(this.search="",this.query={}),v&&(this.pathname=v),b[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var j=this.pathname||"",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,":")+"@");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=g.stringify(this.query));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||b[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(_(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 h=Object.keys(t),u=0;u<h.length;u++){var l=h[u];"protocol"!==l&&(r[l]=t[l])}return b[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!b[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||m[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 g=r.pathname||"",_=r.search||"";r.path=g+_}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("/")||[],p=t.pathname&&t.pathname.split("/")||[],S=r.protocol&&!b[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();var k=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");k&&(r.auth=k.shift(),r.host=r.hostname=k.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 M=E.slice(-1)[0],A=(r.host||t.host||E.length>1)&&("."===M||".."===M)||""===M,I=0,T=E.length;T>=0;T--)"."===(M=E[T])?E.splice(T,1):".."===M?(E.splice(T,1),I++):I&&(E.splice(T,1),I--);if(!w&&!x)for(;I--;)E.unshift("..");w&&""!==E[0]&&(!E[0]||"/"!==E[0].charAt(0))&&E.unshift(""),A&&"/"!==E.join("/").substr(-1)&&E.push("");var R=""===E[0]||E[0]&&"/"===E[0].charAt(0);if(S){r.hostname=r.host=R?"":E.length?E.shift():"";var k=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");k&&(r.auth=k.shift(),r.host=r.hostname=k.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,n,a,o,s,h,u,l,f,c={};function d(){(void 0===r||"development"==r.env.NODE_ENV)&&console.log.apply(console,arguments)}"object"==typeof e?e.exports=c:self.UTIF=c,f="function"==typeof t?t("pako"):self.pako,function(){var t="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},e=function(){function t(t){this.message="JPEG error: "+t}return t.prototype=Error(),t.prototype.name="JpegError",t.constructor=t}(),r=function(){function t(t,e){this.message=t,this.g=e}return t.prototype=Error(),t.prototype.name="DNLMarkerError",t.constructor=t}();function i(){this.M=null,this.B=-1}function n(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];
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 a=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]);i.prototype={parse:function(i){function o(){var t=i[u]<<8|i[u+1];return u+=2,t}var s=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).N,h=void 0===s?null:s,u=0,l=null,f=0;s=[];var c=[],d=[],p=o();if(65496!==p)throw new e("SOI not found");for(p=o();65497!==p;){switch(p){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 m,b=function(){var t=o(),e=n(i,t=u+t-2,u);return e&&e.f&&((0,_util.warn)("readDataBlock - incorrect length, current marker is: "+e.f),t=e.offset),t=i.subarray(u,t),u+=t.length,t}();65518===p&&65===b[0]&&100===b[1]&&111===b[2]&&98===b[3]&&101===b[4]&&(l={version:b[5]<<8|b[6],Y:b[7]<<8|b[8],Z:b[9]<<8|b[10],W:b[11]});break;case 65499:for(p=o()+u-2;u<p;){var g=i[u++],_=new Uint16Array(64);if(0==g>>4)for(b=0;64>b;b++)_[m=a[b]]=i[u++];else if(1==g>>4)for(b=0;64>b;b++)_[m=a[b]]=o();else throw new e("DQT - invalid table spec");s[15&g]=_}break;case 65472:case 65473:case 65474:if(v)throw new e("Only single frame JPEGs supported");o();var v={};for(v.X=65473===p,v.S=65474===p,v.precision=i[u++],p=o(),v.g=h||p,v.v=o(),v.b=[],v.C={},b=i[u++],p=_=g=0;p<b;p++){m=i[u];var y=i[u+1]>>4,w=15&i[u+1];g<y&&(g=y),_<w&&(_=w),y=v.b.push({h:y,j:w,T:i[u+2],G:null}),v.C[m]=y-1,u+=3}v.s=g,v.u=_,function(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++){E=t.b[i];var n=Math.ceil(Math.ceil(t.v/8)*E.h/t.s),a=Math.ceil(Math.ceil(t.g/8)*E.j/t.u);E.a=new Int16Array(64*r*E.j*(e*E.h+1)),E.c=n,E.l=a}t.P=e,t.O=r}(v);break;case 65476:for(p=2,m=o();p<m;){for(g=i[u++],_=new Uint8Array(16),b=y=0;16>b;b++,u++)y+=_[b]=i[u];for(b=0,w=new Uint8Array(y);b<y;b++,u++)w[b]=i[u];p+=17+y,(0==g>>4?d:c)[15&g]=function(t,e){for(var r,i,n=0,a=[],o=16;0<o&&!t[o-1];)o--;a.push({children:[],index:0});var s,h=a[0];for(r=0;r<o;r++){for(i=0;i<t[r];i++){for((h=a.pop()).children[h.index]=e[n];0<h.index;)h=a.pop();for(h.index++,a.push(h);a.length<=r;)a.push(s={children:[],index:0}),h.children[h.index]=s.children,h=s;n++}r+1<o&&(a.push(s={children:[],index:0}),h.children[h.index]=s.children,h=s)}return a[0].children}(_,w)}break;case 65501:o();var x=o();break;case 65498:for(b=1==++f&&!h,o(),g=i[u++],m=[],p=0;p<g;p++){_=v.C[i[u++]];var E=v.b[_];_=i[u++],E.D=d[_>>4],E.o=c[15&_],m.push(E)}p=i[u++],g=i[u++],_=i[u++];try{var S=function(i,o,s,h,u,l,f,c,d){function p(){if(0<T)return T--,I>>T&1;if(255===(I=i[o++])){var t=i[o++];if(t){if(220===t&&k){o+=2;var n=i[o++]<<8|i[o++];if(0<n&&n!==s.g)throw new r("Found DNL marker (0xFFDC) while parsing scan data",n)}throw new e("unexpected marker "+(I<<8|t).toString(16))}}return T=7,I>>>7}function m(r){for(;;){if("number"==typeof(r=r[p()]))return r;if("object"!==(void 0===r?"undefined":t(r)))throw new e("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}for(var _,v,y,w,x,E,S,k=9<arguments.length&&void 0!==arguments[9]&&arguments[9],M=s.P,A=o,I=0,T=0,R=0,P=0,O=h.length,C=s.S?0===l?0===c?function(t,e){var r=m(t.D);r=0===r?0:g(r)<<d,t.a[e]=t.m+=r}:function(t,e){t.a[e]|=p()<<d}:0===c?function(t,e){if(0<R)R--;else for(var r=l;r<=f;){var i=m(t.o),n=15&i;if(i>>=4,0===n){if(15>i){R=b(i)+(1<<i)-1;break}r+=16}else r+=i,t.a[e+a[r]]=g(n)*(1<<d),r++}}:function(t,r){for(var i,n=l,o=0;n<=f;){i=r+a[n];var s=0>t.a[i]?-1:1;switch(P){case 0:if(i=15&(o=m(t.o)),o>>=4,0===i)15>o?(R=b(o)+(1<<o),P=4):(o=16,P=1);else{if(1!==i)throw new e("invalid ACn encoding");y=g(i),P=o?2:3}continue;case 1:case 2:t.a[i]?t.a[i]+=s*(p()<<d):0==--o&&(P=3*(2===P));break;case 3:t.a[i]?t.a[i]+=s*(p()<<d):(t.a[i]=y<<d,P=0);break;case 4:t.a[i]&&(t.a[i]+=s*(p()<<d))}n++}4===P&&0==--R&&(P=0)}: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}
1else r+=i,t.a[e+a[r]]=g(n),r++}},L=0,B=1===O?h[0].c*h[0].l:M*s.O;L<B;){var D=u?Math.min(B-L,u):B;for(w=0;w<O;w++)h[w].m=0;if(R=0,1===O){var N=h[0];for(S=0;S<D;S++)C(N,64*((N.c+1)*(L/N.c|0)+L%N.c)),L++}else for(S=0;S<D;S++){for(w=0;w<O;w++)for(_=(N=h[w]).h,v=N.j,x=0;x<v;x++)for(E=0;E<_;E++)C(N,64*((N.c+1)*((L/M|0)*N.j+x)+(L%M*N.h+E)));L++}if(T=0,(N=n(i,o))&&N.f&&((0,_util.warn)("decodeScan - unexpected MCU data, current marker is: "+N.f),o=N.offset),!(N=N&&N.F)||65280>=N)throw new e("marker was not found");if(65488<=N&&65495>=N)o+=2;else break}return(N=n(i,o))&&N.f&&((0,_util.warn)("decodeScan - unexpected Scan data, current marker is: "+N.f),o=N.offset),o-A}(i,u,v,m,x,p,g,_>>4,15&_,b);u+=S}catch(t){if(t instanceof r)return(0,_util.warn)('Attempting to re-parse JPEG image using "scanLines" parameter found in DNL marker (0xFFDC) segment.'),this.parse(i,{N:t.g});throw t}break;case 65500:u+=4;break;case 65535:255!==i[u]&&u--;break;default:if(255===i[u-3]&&192<=i[u-2]&&254>=i[u-2])u-=3;else if((b=n(i,u-2))&&b.f)(0,_util.warn)("JpegImage.parse - unexpected data, current marker is: "+b.f),u=b.offset;else throw new e("unknown marker "+p.toString(16))}p=o()}for(p=0,this.width=v.v,this.height=v.g,this.A=l,this.b=[];p<v.b.length;p++)(x=s[(E=v.b[p]).T])&&(E.G=x),this.b.push({R:function(t,r){for(var i=r.c,n=r.l,a=new Int16Array(64),o=0;o<n;o++)for(var s=0;s<i;s++){var h=64*((r.c+1)*o+s),u=r.G,l=r.a;if(!u)throw new e("missing required Quantization Table.");for(var f=0;64>f;f+=8){var c=l[h+f],d=l[h+f+1],p=l[h+f+2],m=l[h+f+3],b=l[h+f+4],g=l[h+f+5],_=l[h+f+6],v=l[h+f+7];if(c*=u[f],0==(d|p|m|b|g|_|v))c=5793*c+512>>10,a[f]=c,a[f+1]=c,a[f+2]=c,a[f+3]=c,a[f+4]=c,a[f+5]=c,a[f+6]=c,a[f+7]=c;else{d*=u[f+1],p*=u[f+2],m*=u[f+3],b*=u[f+4],g*=u[f+5],_*=u[f+6],v*=u[f+7];var y=5793*c+128>>8,w=5793*b+128>>8,x=p,E=_;b=2896*(d-v)+128>>8,v=2896*(d+v)+128>>8,m<<=4,g<<=4,w=(y=y+w+1>>1)-w,c=3784*x+1567*E+128>>8,x=1567*x-3784*E+128>>8,E=c,g=(b=b+g+1>>1)-g,m=(v=v+m+1>>1)-m,E=(y=y+E+1>>1)-E,x=(w=w+x+1>>1)-x,c=2276*b+3406*v+2048>>12,b=3406*b-2276*v+2048>>12,v=c,c=799*m+4017*g+2048>>12,m=4017*m-799*g+2048>>12,g=c,a[f]=y+v,a[f+7]=y-v,a[f+1]=w+g,a[f+6]=w-g,a[f+2]=x+m,a[f+5]=x-m,a[f+3]=E+b,a[f+4]=E-b}}for(u=0;8>u;++u)c=a[u],d=a[u+8],p=a[u+16],m=a[u+24],b=a[u+32],g=a[u+40],0==(d|p|m|b|g|(_=a[u+48])|(v=a[u+56]))?(c=-2040>(c=5793*c+8192>>14)?0:2024<=c?255:c+2056>>4,l[h+u]=c,l[h+u+8]=c,l[h+u+16]=c,l[h+u+24]=c,l[h+u+32]=c,l[h+u+40]=c,l[h+u+48]=c,l[h+u+56]=c):(y=5793*c+2048>>12,w=5793*b+2048>>12,x=p,E=_,b=2896*(d-v)+2048>>12,v=2896*(d+v)+2048>>12,w=(y=(y+w+1>>1)+4112)-w,c=3784*x+1567*E+2048>>12,x=1567*x-3784*E+2048>>12,E=c,g=(b=b+g+1>>1)-g,m=(v=v+m+1>>1)-m,E=(y=y+E+1>>1)-E,x=(w=w+x+1>>1)-x,c=2276*b+3406*v+2048>>12,b=3406*b-2276*v+2048>>12,v=c,c=799*m+4017*g+2048>>12,m=4017*m-799*g+2048>>12,g=c,c=y+v,v=y-v,d=w+g,_=w-g,p=x+m,g=x-m,c=16>c?0:4080<=c?255:c>>4,d=16>d?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=E-b)?0:4080<=b?255:b>>4,g=16>g?0:4080<=g?255:g>>4,_=16>_?0:4080<=_?255:_>>4,v=16>v?0:4080<=v?255:v>>4,l[h+u]=c,l[h+u+8]=d,l[h+u+16]=p,l[h+u+24]=m,l[h+u+32]=b,l[h+u+40]=g,l[h+u+48]=_,l[h+u+56]=v)}return r.a}(0,E),U:E.h/v.s,V:E.j/v.u,c:E.c,l:E.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,h=new Uint8ClampedArray(s),u=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,u[r]=(0xfffffff8&l)<<3|7&l;for(f=0;f<e;f++)for(l=m*(0xfffffff8&(l=0|f*c))|(7&l)<<3,r=0;r<t;r++)h[d]=p[l+u[r]],d+=o}if(a=this.M)for(i=0;i<s;)for(n=l=0;l<o;l++,i++,n+=2)h[i]=(h[i]*a[n]>>8)+a[n+1];return h},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++]=-122.67195406894+r*(-660635669420364e-19*r+437130475926232e-18*i-54080610064599e-18*e+48449797120281e-17*n-.154362151871126)+i*(-957964378445773e-18*i+817076911346625e-18*e-.00477271405408747*n+1.53380253221734)+e*(961250184130688e-18*e-.00266257332283933*n+.48357088451265)+n*(-336197177618394e-18*n+.484791561490776),t[a++]=107.268039397724+r*(219927104525741e
1-19*r-640992018297945e-18*i+659397001245577e-18*e+426105652938837e-18*n-.176491792462875)+i*(-778269941513683e-18*i+.00130872261408275*e+770482631801132e-18*n-.151051492775562)+e*(.00126935368114843*e-.00265090189010898*n+.25802910206845)+n*(-318913117588328e-18*n-.213742400323665),t[a++]=-20.810012546947+r*(-570115196973677e-18*r-263409051004589e-19*i+.0020741088115012*e-.00288260236853442*n+.814272968359295)+i*(-153496057440975e-19*i-132689043961446e-18*e+560833691242812e-18*n-.195152027534049)+e*(.00174418132927582*e-.00255243321439347*n+.116935020465145)+n*(-343531996510555e-18*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,h=t.length;s<h;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,r,i){if(4<this.i)throw new e("Unsupported color mode");if(t=this.L(t,r),1===this.i&&i){r=new Uint8ClampedArray(3*(i=t.length));for(var n=0,a=0;a<i;a++){var o=t[a];r[n++]=o,r[n++]=o,r[n++]=o}return r}if(3===this.i&&this.w())return this.I(t);if(4===this.i){if(this.w())return i?this.K(t):this.J(t);if(i)return this.H(t)}return t}},c.JpegDecoder=i}(),c.encodeImage=function(t,e,r,i){var n={t256:[e],t257:[r],t258:[8,8,8,8],t259:[1],t262:[2],t273:[1e3],t277:[4],t278:[r],t279:[e*r*4],t282:[1],t283:[1],t284:[1],t286:[0],t287:[0],t296:[1],t305:["Photopea (UTIF.js)"],t338:[1]};if(i)for(var a in i)n[a]=i[a];for(var o=new Uint8Array(c.encode([n])),s=new Uint8Array(t),h=new Uint8Array(1e3+e*r*4),a=0;a<o.length;a++)h[a]=o[a];for(var a=0;a<s.length;a++)h[1e3+a]=s[a];return h.buffer},c.encode=function(t){var e=new Uint8Array(2e4),r=4,i=c._binBE;e[0]=77,e[1]=77,e[3]=42;var n=8;i.writeUint(e,r,n),r+=4;for(var a=0;a<t.length;a++){var o=c._writeIFD(i,e,n,t[a]);n=o[1],a<t.length-1&&i.writeUint(e,o[0],n)}return e.slice(0,n).buffer},c.decode=function(t){c.decode._decodeG3.allow2D=null;var e=new Uint8Array(t),r=0,i=c._binBE.readASCII(e,r,2);r+=2;var n="II"==i?c._binLE:c._binBE;n.readUshort(e,r),r+=2;var a=n.readUint(e,r);r+=4;for(var o=[];;){var s=c._readIFD(n,e,a,o);if(0==(a=n.readUint(e,s)))break}return o},c.decodeImages=function(t,e){for(var r=new Uint8Array(t),i=c._binBE.readASCII(r,0,2),n=0;n<e.length;n++){var a=e[n];if(null!=a.t256){a.isLE="II"==i,a.width=a.t256[0],a.height=a.t257[0];var o=a.t259?a.t259[0]:1,s=a.t266?a.t266[0]:1;a.t284&&2==a.t284[0]&&d("PlanarConfiguration 2 should not be used!");var h=(a.t258?Math.min(32,a.t258[0]):1)*(a.t277?a.t277[0]:1),u=8*Math.ceil(a.width*h/8),l=a.t273;null==l&&(l=a.t324);var f=a.t279;1==o&&1==l.length&&(f=[a.height*(u>>>3)]),null==f&&(f=a.t325);var p=new Uint8Array(a.height*(u>>>3)),m=0;if(null!=a.t322){for(var b=a.t322[0],g=a.t323[0],_=Math.floor((a.width+b-1)/b),v=Math.floor((a.height+g-1)/g),y=new Uint8Array(0|Math.ceil(b*g*h/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;c.decode._decompress(a,r,l[E],f[E],o,y,0,s),6==o?p=y:c._copyTile(y,0|Math.ceil(b*h/8),g,p,0|Math.ceil(a.width*h/8),a.height,0|Math.ceil(x*b*h/8),w*g)}m=8*p.length}else{var k=a.t278?a.t278[0]:a.height;k=Math.min(k,a.height);for(var E=0;E<l.length;
1E++)c.decode._decompress(a,r,l[E],f[E],o,p,0|Math.ceil(m/8),s),m+=u*k;m=Math.min(m,8*p.length)}a.data=new Uint8Array(p.buffer,0,0|Math.ceil(m/8))}}},c.decode._decompress=function(t,e,r,i,n,a,o,s){if(1==n)for(var h=0;h<i;h++)a[o+h]=e[r+h];else if(3==n)c.decode._decodeG3(e,r,i,a,o,t.width,s);else if(4==n)c.decode._decodeG4(e,r,i,a,o,t.width,s);else if(5==n)c.decode._decodeLZW(e,r,a,o);else if(6==n)c.decode._decodeOldJPEG(t,e,r,i,a,o);else if(7==n)c.decode._decodeNewJPEG(t,e,r,i,a,o);else if(8==n)for(var u=new Uint8Array(e.buffer,r,i),l=f.inflate(u),p=0;p<l.length;p++)a[o+p]=l[p];else 32773==n?c.decode._decodePackBits(e,r,i,a,o):32809==n?c.decode._decodeThunder(e,r,i,a,o):d("Unknown compression",n);if(t.t317&&2==t.t317[0])for(var m=t.t277?t.t277[0]:1,b=t.t278?t.t278[0]:t.height,g=t.width*m,_=0;_<b;_++){var v=o+_*g;if(3==m)for(var h=3;h<g;h+=3)a[v+h]=a[v+h]+a[v+h-3]&255,a[v+h+1]=a[v+h+1]+a[v+h-2]&255,a[v+h+2]=a[v+h+2]+a[v+h-1]&255;else for(var h=m;h<g;h++)a[v+h]=a[v+h]+a[v+h-m]&255}},c.decode._decodeNikon=function(t,e,r,i,n){var a,o;d(t.slice(e,e+100)),a=t[e],o=t[++e],e++,d(a.toString(16),o.toString(16),r)},c.decode._decodeNewJPEG=function(t,e,r,i,n,a){var o=t.t347,s=o?o.length:0,h=new Uint8Array(s+i);if(o){for(var u=0,l=0;l<s-1&&(255!=o[l]||217!=o[l+1]);l++)h[u++]=o[l];var f=e[r],d=e[r+1];(255!=f||216!=d)&&(h[u++]=f,h[u++]=d);for(var l=2;l<i;l++)h[u++]=e[r+l]}else for(var l=0;l<i;l++)h[l]=e[r+l];if(32803==t.t262){var p=t.t258[0],m=new LosslessJpegDecoder().decode(h),b=m.length;if(16==p)for(var l=0;l<b;l++)n[a++]=255&m[l],n[a++]=m[l]>>>8;else if(12==p)for(var l=0;l<b;l+=2)n[a++]=m[l]>>>4,n[a++]=(m[l]<<4|m[l+1]>>>8)&255,n[a++]=255&m[l+1];else throw Error("unsupported bit depth "+p)}else{var g=new c.JpegDecoder;g.parse(h);for(var _=g.getData(g.width,g.height),l=0;l<_.length;l++)n[a+l]=_[l]}6==t.t262[0]&&(t.t262[0]=2)},c.decode._decodeOldJPEGInit=function(t,e,r,i){var n,a,o,s,h,u=0,l=0,f=!1,c=t.t513,p=c?c[0]:0,m=t.t514,b=m?m[0]:0,g=t.t324||t.t273||c,_=t.t530,v=0,y=0,w=t.t277?t.t277[0]:1,x=t.t515;if(g&&(l=g[0],f=g.length>1),!f){if(255==e[r]&&216==e[r+1])return{jpegOffset:r};if(null!=c&&(255==e[r+p]&&216==e[r+p+1]?u=r+p:d("JPEGInterchangeFormat does not point to SOI"),null==m?d("JPEGInterchangeFormatLength field is missing"):(p>=l||p+b<=l)&&d("JPEGInterchangeFormatLength field value is invalid"),null!=u))return{jpegOffset:u}}if(null!=_&&(v=_[0],y=_[1]),null!=c&&null!=m)if(b>=2&&p+b<=l){for(o=0,n=new Uint8Array(255==e[r+p+b-2]&&216==e[r+p+b-1]?b-2:b);o<n.length;o++)n[o]=e[r+p+o];d("Incorrect JPEG interchange format: using JPEGInterchangeFormat offset to derive tables")}else d("JPEGInterchangeFormat+JPEGInterchangeFormatLength > offset to first strip or tile");if(null==n){var E=0,S=[];S[E++]=255,S[E++]=216;var k=t.t519;if(null==k)throw Error("JPEGQTables tag is missing");for(o=0;o<k.length;o++)for(s=0,S[E++]=255,S[E++]=219,S[E++]=0,S[E++]=67,S[E++]=o;s<64;s++)S[E++]=e[r+k[o]+s];for(h=0;h<2;h++){var M=t[0==h?"t520":"t521"];if(null==M)throw Error((0==h?"JPEGDCTables":"JPEGACTables")+" tag is missing");for(o=0;o<M.length;o++){S[E++]=255,S[E++]=196;var A=19;for(s=0;s<16;s++)A+=e[r+M[o]+s];for(s=0,S[E++]=A>>>8,S[E++]=255&A,S[E++]=o|h<<4;s<16;s++)S[E++]=e[r+M[o]+s];for(s=0;s<A;s++)S[E++]=e[r+M[o]+16+s]}}if(S[E++]=255,S[E++]=192,S[E++]=0,S[E++]=8+3*w,S[E++]=8,S[E++]=t.height>>>8&255,S[E++]=255&t.height,S[E++]=t.width>>>8&255,S[E++]=255&t.width,S[E++]=w,1==w)S[E++]=1,S[E++]=17,S[E++]=0;else for(o=0;o<3;o++)S[E++]=o+1,S[E++]=0!=o?17:(15&v)<<4|15&y,S[E++]=o;null!=x&&0!=x[0]&&(S[E++]=255,S[E++]=221,S[E++]=0,S[E++]=4,S[E++]=x[0]>>>8&255,S[E++]=255&x[0]),n=new Uint8Array(S)}var I=-1;for(o=0;o<n.length-1;){if(255==n[o]&&192==n[o+1]){I=o;break}o++}if(-1==I){var T=new Uint8Array(n.length+10+3*w);T.set(n);var R=n.length;if(I=n.length,(n=T)[R++]=255,n[R++]=192,n[R++]=0,n[R++]=8+3*w,n[R++]=8,n[R++]=t.height>>>8&255,n[R++]=255&t.height,n[R++]=t.width>>>8&255,n[R++]=255&t.width,n[R++]=w,1==w)n[R++]=1,n[R++]=17,n[R++]=0;else for(o=0;o<3;o++)n[R++]=o+1,n[R++]=0!=o?17:(15&v)<<4|15&y,n[R++]=o}if(255==e[l]&&218==e[l+1]){var P=e[l+2]<<8|e[l+3];for(o=0,(a=new Uint8Array(P+2))[0]=e[l],a[1]=e[l+1],a[2]=e[l+2],a[3]=e[l+3];o<P-2;o++)a[o+4]=e[l+o+4]}else{a=new Uint8Array(8+2*w);var O=0;if(a[O++]=255,a[O++]=218,a[O++]=0,a[O++]=6+2*w,a[O++]=w,1==w)a[O++]=1,a[O++]=0;else for(o=0;o<3;o++)a[O++]=o+1,a[O++]=o<<4|o;a[O++]=0,a[O++]=63,a[O++]=0}return{jpegOffset:r,tables:n,sosMarker:a,sofPosition:I}},c.decode._decodeOldJPEG=function(t,e,r,i,n,a){var o,s,h,u=c.decode._decodeOldJPEGInit(t,e,r,i);if(null!=u.jpegOffset)for(o=0,h=new Uint8Array(s=r+i-u.jpegOffset);o<s;o++)h[o]=e[u.jpegOffset+o];else{for((h=new Uint8Array(u.tables.length+u.sosMarker.length+i+2)).set(u.tables),h[u.sofPosition+5]=t.height>>>8&255,h[u.sofPosition+6]=255&t.height,h[u.sofPosition+7]=t.width>>>
18&255,h[u.sofPosition+8]=255&t.width,(255!=e[r]||e[r+1]!=SOS)&&(h.set(u.sosMarker,bufoff),bufoff+=sosMarker.length),o=0;o<i;o++)h[bufoff++]=e[r+o];h[bufoff++]=255,h[bufoff++]=EOI}var l=new c.JpegDecoder;l.parse(h);for(var f=l.getData(l.width,l.height),o=0;o<f.length;o++)n[a+o]=f[o];6==t.t262[0]&&(t.t262[0]=2)},c.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 h=a[e];if(e++,h>=0&&h<128)for(var u=0;u<h+1;u++)o[n]=a[e],n++,e++;if(h>=-127&&h<0){for(var u=0;u<-h+1;u++)o[n]=a[e],n++;e++}}},c.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,h=2*n,u=0;e<s;){var l=t[e],f=l>>>6,c=63&l;if(e++,3==f&&(u=15&c,i[h>>>1]|=u<<4*(1-h&1),h++),0==f)for(var d=0;d<c;d++)i[h>>>1]|=u<<4*(1-h&1),h++;if(2==f)for(var d=0;d<2;d++){var p=c>>>3*(1-d)&7;4!=p&&(u+=o[p],i[h>>>1]|=u<<4*(1-h&1),h++)}if(1==f)for(var d=0;d<3;d++){var p=c>>>2*(2-d)&3;2!=p&&(u+=a[p],i[h>>>1]|=u<<4*(1-h&1),h++)}}},c.decode._dmap={1:0,"011":1,"000011":2,"0000011":3,"010":-1,"000010":-2,"0000010":-3},c.decode._lens=(i=function(t,e,r,i){for(var n=0;n<e.length;n++)t[e[n]]=r+n*i},a="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",o="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",s="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",h="00000001000,00000001100,00000001101,000000010010,000000010011,000000010100,000000010101,000000010110,000000010111,000000011100,000000011101,000000011110,000000011111",n=(n="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,
100101001,00101010,00101011,00101100,00101101,00000100,00000101,00001010,00001011,01010010,01010011,01010100,01010101,00100100,00100101,01011000,01011001,01011010,01011011,01001010,01001011,00110010,00110011,00110100").split(","),a=a.split(","),o=o.split(","),s=s.split(","),h=h.split(","),l={},i(u={},n,0,1),i(u,o,64,64),i(u,h,1792,64),i(l,a,0,1),i(l,s,64,64),i(l,h,1792,64),[u,l]),c.decode._decodeG4=function(t,e,r,i,n,a,o){for(var s=c.decode,h=e<<3,u=0,l="",f=[],d=[],p=0;p<a;p++)d.push(0);d=s._makeDiff(d);for(var m=0,b=0,g=0,_=0,v=0,y=0,w="",x=0,E=8*Math.ceil(a/8);h>>>3<e+r;){g=s._findDiff(d,m+ +(0!=m),1-v),_=s._findDiff(d,g,v);var S=0;if(1==o&&(S=t[h>>>3]>>>7-(7&h)&1),2==o&&(S=t[h>>>3]>>>(7&h)&1),h++,l+=S,"H"==w){if(null!=s._lens[v][l]){var k=s._lens[v][l];l="",u+=k,k<64&&(s._addNtimes(f,u,v),m+=u,v=1-v,u=0,0==--x&&(w=""))}}else"0001"==l&&(l="",s._addNtimes(f,_-m,v),m=_),"001"==l&&(l="",w="H",x=2),null!=s._dmap[l]&&(b=g+s._dmap[l],s._addNtimes(f,b-m,v),m=b,l="",v=1-v);f.length==a&&""==w&&(s._writeBits(f,i,8*n+y*E),v=0,y++,m=0,d=s._makeDiff(f),f=[])}},c.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]},c.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},c.decode._decodeG3=function(t,e,r,i,n,a,o){for(var s=c.decode,h=e<<3,u=0,l="",f=[],d=[],p=0;p<a;p++)f.push(0);for(var m=0,b=0,g=0,_=0,v=0,y=-1,w="",x=0,E=!1,S=8*Math.ceil(a/8);h>>>3<e+r;){g=s._findDiff(d,m+ +(0!=m),1-v),_=s._findDiff(d,g,v);var k=0;if(1==o&&(k=t[h>>>3]>>>7-(7&h)&1),2==o&&(k=t[h>>>3]>>>(7&h)&1),h++,l+=k,E){if(null!=s._lens[v][l]){var M=s._lens[v][l];l="",u+=M,M<64&&(s._addNtimes(f,u,v),v=1-v,u=0)}}else if("H"==w){if(null!=s._lens[v][l]){var M=s._lens[v][l];l="",u+=M,M<64&&(s._addNtimes(f,u,v),m+=u,v=1-v,u=0,0==--x&&(w=""))}}else"0001"==l&&(l="",s._addNtimes(f,_-m,v),m=_),"001"==l&&(l="",w="H",x=2),null!=s._dmap[l]&&(b=g+s._dmap[l],s._addNtimes(f,b-m,v),m=b,l="",v=1-v);l.endsWith("000000000001")&&(y>=0&&s._writeBits(f,i,8*n+y*S),1==o&&(E=(t[h>>>3]>>>7-(7&h)&1)==1),2==o&&(E=(t[h>>>3]>>>(7&h)&1)==1),h++,null==s._decodeG3.allow2D&&(s._decodeG3.allow2D=E),!s._decodeG3.allow2D&&(E=!0,h--),l="",v=0,y++,m=0,d=s._makeDiff(f),f=[])}f.length==a&&s._writeBits(f,i,8*n+y*S)},c.decode._addNtimes=function(t,e,r){for(var i=0;i<e;i++)t.push(r)},c.decode._writeBits=function(t,e,r){for(var i=0;i<t.length;i++)e[r+i>>>3]|=t[i]<<7-(r+i&7)},c.decode._decodeLZW=function(t,e,r,i){if(null==c.decode._lzwTab){for(var n=new Uint32Array(65535),a=new Uint16Array(65535),o=new Uint8Array(2e6),s=0;s<256;s++)o[s<<2]=s,n[s]=s<<2,a[s]=1;c.decode._lzwTab=[n,a,o]}for(var h=c.decode._copyData,u=c.decode._lzwTab[0],l=c.decode._lzwTab[1],o=c.decode._lzwTab[2],f=258,d=1032,p=9,m=e<<3,b=0,g=0,_=0;g=(t[m>>>3]<<16|t[m+8>>>3]<<8|t[m+16>>>3])>>24-(7&m)-p&(1<<p)-1,m+=p,257!=g;){if(256==g){if(p=9,f=258,d=1032,g=(t[m>>>3]<<16|t[m+8>>>3]<<8|t[m+16>>>3])>>24-(7&m)-p&(1<<p)-1,m+=p,257==g)break;r[i]=g,i++}else if(g<f){var v=u[g],y=l[g];if(h(o,v,r,i,y),i+=y,_>=f)u[f]=d,o[u[f]]=v[0],l[f]=1,d=d+1+3&-4,f++;else{u[f]=d;var w=u[_],x=l[_];h(o,w,o,d,x),o[d+x]=o[v],x++,l[f]=x,f++,d=d+x+3&-4}f+1==1<<p&&p++}else{if(_>=f)u[f]=d,l[f]=0,f++;else{u[f]=d;var w=u[_],x=l[_];h(o,w,o,d,x),o[d+x]=o[d],x++,l[f]=x,f++,h(o,d,r,i,x),i+=x,d=d+x+3&-4}f+1==1<<p&&p++}_=g}},c.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]},c.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",3738
10:"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"},c.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},c._readIFD=function(t,e,r,i){var n=t.readUshort(e,r);r+=2;var a={};i.push(a);for(var o=0;o<n;o++){var s=t.readUshort(e,r);r+=2;var h=t.readUshort(e,r);r+=2;var u=t.readUint(e,r);r+=4;var l=t.readUint(e,r);r+=4;var f=[];if(a["t"+s]=f,1==h||7==h)for(var p=0;p<u;p++)f.push(e[(u<5?r-4:l)+p]);if(2==h&&f.push(t.readASCII(e,u<5?r-4:l,u-1)),3==h)for(var p=0;p<u;p++)f.push(t.readUshort(e,(u<3?r-4:l)+2*p));if(4==h)for(var p=0;p<u;p++)f.push(t.readUint(e,(u<2?r-4:l)+4*p));if(5==h)for(var p=0;p<u;p++)f.push(t.readUint(e,l+8*p)/t.readUint(e,l+8*p+4));if(8==h)for(var p=0;p<u;p++)f.push(t.readShort(e,(u<3?r-4:l)+2*p));if(9==h)for(var p=0;p<u;p++)f.push(t.readInt(e,(u<2?r-4:l)+4*p));if(10==h)for(var p=0;p<u;p++)f.push(t.readInt(e,l+8*p)/t.readInt(e,l+8*p+4));if(11==h)for(var p=0;p<u;p++)f.push(t.readFloat(e,l+4*p));if(12==h)for(var p=0;p<u;p++)f.push(t.readDouble(e,l+8*p));if(0!=u&&0==f.length&&d("unknown TIFF tag type: ",h,"num:",u),330==s)for(var p=0;p<u;p++)c._readIFD(t,e,f[p],i)}return r},c._writeIFD=function(t,e,r,i){var n=Object.keys(i);t.writeUshort(e,r,n.length);for(var a=(r+=2)+12*n.length+4,o=0;o<n.length;o++){var s=n[o],h=parseInt(s.slice(1)),u=c.ttypes[h];if(null==u)throw Error("unknown type of tag: "+h);var l=i[s];2==u&&(l=l[0]+"\0");var f=l.length;t.writeUshort(e,r,h),r+=2,t.writeUshort(e,r,u),r+=2,t.writeUint(e,r,f);var d=[-1,1,1,2,4,8,0,0,0,0,0,0,8][u]*f,p=r+=4;if(d>4&&(t.writeUint(e,r,a),p=a),2==u&&t.writeASCII(e,p,l),3==u)for(var m=0;m<f;m++)t.writeUshort(e,p+2*m,l[m]);if(4==u)for(var m=0;m<f;m++)t.writeUint(e,p+4*m,l[m]);if(5==u)for(var m=0;m<f;m++)t.writeUint(e,p+8*m,Math.round(1e4*l[m])),t.writeUint(e,p+8*m+4,1e4);if(12==u)for(var m=0;m<f;m++)t.writeDouble(e,p+8*m,l[m]);d>4&&(d+=1&d,a+=d),r+=4}return[r,a]},c.toRGBA8=function(t){var e=t.width,r=t.height,i=e*r,n=4*i,a=t.data,o=new Uint8Array(4*i),s=t.t262[0],h=t.t258?Math.min(32,t.t258[0]):1,u=+!!t.isLE;if(0==s)for(var l=Math.ceil(h*e/8),f=0;f<r;f++){var c=f*l,p=f*e;if(1==h)for(var m=0;m<e;m++){var b=p+m<<2,g=a[c+(m>>3)]>>7-(7&m)&1;o[b]=o[b+1]=o[b+2]=(1-g)*255,o[b+3]=255}if(4==h)for(var m=0;m<e;m++){var b=p+m<<2,g=a[c+(m>>1)]>>4-4*(1&m)&15;o[b]=o[b+1]=o[b+2]=(15-g)*17,o[b+3]=255}if(8==h)for(var m=0;m<e;m++){var b=p+m<<2,g=a[c+m];o[b]=o[b+1]=o[b+2]=255-g,o[b+3]=255}}else if(1==s)for(var l=Math.ceil(h*e/8),f=0;f<r;f++){var c=f*l,p=f*e;if(1==h)for(var m=0;m<e;m++){var b=p+m<<2,g=a[c+(m>>3)]>>7-(7&m)&1;o[b]=o[b+1]=o[b+2]=255*g,o[b+3]=255}if(2==h)for(var m=0;m<e;m++){var b=p+m<<2,g=a[c+(m>>2)]>>6-2*(3&m)&3;o[b]=o[b+1]=o[b+2]=85*g,o[b+3]=255}if(8==h)for(var m=0;m<e;m++){var b=p+m<<2,g=a[c+m];o[b]=o[b+1]=o[b+2]=g,o[b+3]=255}if(16==h)for(var m=0;m<e;m++){var b=p+m<<2,g=a[c+(2*m+u)];o[b]=o[b+1]=o[b+2]=Math.min(255,g),o[b+3]=255}}else if(2==s)if(8==h)if(t.t338)if(t.t338[0]>0)for(var m=0;m<n;m++)o[m]=a[m];else for(var m=0;m<n;
1m+=4)o[m]=a[m],o[m+1]=a[m+1],o[m+2]=a[m+2],o[m+3]=255;else{var _=t.t258?t.t258.length:3;if(4==_)for(var m=0;m<n;m++)o[m]=a[m];if(3==_)for(var m=0;m<i;m++){var b=m<<2,v=3*m;o[b]=a[v],o[b+1]=a[v+1],o[b+2]=a[v+2],o[b+3]=255}}else for(var m=0;m<i;m++){var b=m<<2,v=6*m;o[b]=a[v],o[b+1]=a[v+2],o[b+2]=a[v+4],o[b+3]=255}else if(3==s)for(var y=t.t320,m=0;m<i;m++){var b=m<<2,w=a[m];o[b]=y[w]>>8,o[b+1]=y[256+w]>>8,o[b+2]=y[512+w]>>8,o[b+3]=255}else if(5==s)for(var _=t.t258?t.t258.length:4,x=+(_>4),m=0;m<i;m++){var b=m<<2,E=m*_,S=255-a[E],k=255-a[E+1],M=255-a[E+2],A=(255-a[E+3])*(1/255);o[b]=~~(S*A+.5),o[b+1]=~~(k*A+.5),o[b+2]=~~(M*A+.5),o[b+3]=255*(1-x)+a[E+4]*x}else d("Unknown Photometric interpretation: "+s);return o},c.replaceIMG=function(){for(var t=document.getElementsByTagName("img"),e=0;e<t.length;e++){var r=t[e],i=r.getAttribute("src");if(null!=i){var n=i.split(".").pop().toLowerCase();if("tif"==n||"tiff"==n){var a=new XMLHttpRequest;c._xhrs.push(a),c._imgs.push(r),a.open("GET",i),a.responseType="arraybuffer",a.onload=c._imgLoaded,a.send()}}}},c._xhrs=[],c._imgs=[],c._imgLoaded=function(t){var e=t.target.response,r=c.decode(e),i=r[0];c.decodeImages(e,r);var n=c.toRGBA8(i),a=i.width,o=i.height,s=c._xhrs.indexOf(t.target),h=c._imgs[s];c._xhrs.splice(s,1),c._imgs.splice(s,1);var u=document.createElement("canvas");u.width=a,u.height=o;for(var l=u.getContext("2d"),f=l.createImageData(a,o),d=0;d<n.length;d++)f.data[d]=n[d];l.putImageData(f,0,0);for(var p=["style","class","id"],d=0;d<p.length;d++)u.setAttribute(p[d],h.getAttribute(p[d]));h.parentNode.replaceChild(u,h)},c._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(t,e){var r=c._binBE.ui8;return r[0]=t[e+1],r[1]=t[e+0],c._binBE.i16[0]},readInt:function(t,e){var r=c._binBE.ui8;return r[0]=t[e+3],r[1]=t[e+2],r[2]=t[e+1],r[3]=t[e+0],c._binBE.i32[0]},readUint:function(t,e){var r=c._binBE.ui8;return r[0]=t[e+3],r[1]=t[e+2],r[2]=t[e+1],r[3]=t[e+0],c._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(t,e){for(var r=c._binBE.ui8,i=0;i<4;i++)r[i]=t[e+3-i];return c._binBE.fl32[0]},readDouble:function(t,e){for(var r=c._binBE.ui8,i=0;i<8;i++)r[i]=t[e+7-i];return c._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]=(0|r)&255},writeASCII:function(t,e,r){for(var i=0;i<r.length;i++)t[e+i]=r.charCodeAt(i)},writeDouble:function(t,e,r){c._binBE.fl64[0]=r;for(var i=0;i<8;i++)t[e+i]=c._binBE.ui8[7-i]}},c._binBE.ui8=new Uint8Array(8),c._binBE.i16=new Int16Array(c._binBE.ui8.buffer),c._binBE.i32=new Int32Array(c._binBE.ui8.buffer),c._binBE.ui32=new Uint32Array(c._binBE.ui8.buffer),c._binBE.fl32=new Float32Array(c._binBE.ui8.buffer),c._binBE.fl64=new Float64Array(c._binBE.ui8.buffer),c._binLE={nextZero:c._binBE.nextZero,readUshort:function(t,e){return t[e+1]<<8|t[e]},readShort:function(t,e){var r=c._binBE.ui8;return r[0]=t[e+0],r[1]=t[e+1],c._binBE.i16[0]},readInt:function(t,e){var r=c._binBE.ui8;return r[0]=t[e+0],r[1]=t[e+1],r[2]=t[e+2],r[3]=t[e+3],c._binBE.i32[0]},readUint:function(t,e){var r=c._binBE.ui8;return r[0]=t[e+0],r[1]=t[e+1],r[2]=t[e+2],r[3]=t[e+3],c._binBE.ui32[0]},readASCII:c._binBE.readASCII,readFloat:function(t,e){for(var r=c._binBE.ui8,i=0;i<4;i++)r[i]=t[e+i];return c._binBE.fl32[0]},readDouble:function(t,e){for(var r=c._binBE.ui8,i=0;i<8;i++)r[i]=t[e+i];return c._binBE.fl64[0]}},c._copyTile=function(t,e,r,i,n,a,o,s){for(var h=Math.min(e,n-o),u=Math.min(r,a-s),l=0;l<u;l++)for(var f=(s+l)*n+o,c=l*e,d=0;d<h;d++)i[f+d]=t[c+d]}}()}).call(this,t("_process"))},{_process:133,pako:86}],183:[function(t,e,n){(function(t){e.exports=function(t,e){if(r("noDeprecation"))return t;var i=!1;return function(){if(!i){if(r("throwDeprecation"))throw Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}};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()}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:void 0!==i?i:{})},{}],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}
1),i.callback=r,i}function h(t,e,r){return u(e=s(t,e,r))}function u(t){if(void 0===t.callback)throw Error("callback argument missing");var e,r,i,n=!1,o=function(e,r,i){n||(n=!0,t.callback(e,r,i))};function s(t){return clearTimeout(i),t instanceof Error||(t=Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,o(t,g)}function u(){if(!r){clearTimeout(i);var e=t.useXDR&&void 0===l.status?200:1223===l.status?204:l.status,n=g,s=null;return 0!==e?(n={body:function(){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),b)try{t=JSON.parse(t)}catch(t){}return t}(),statusCode:e,method:c,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(n.headers=a(l.getAllResponseHeaders()))):s=Error("Internal XMLHttpRequest Error"),o(s,n,n.body)}}var l=t.xhr||null;l||(l=t.cors||t.useXDR?new h.XDomainRequest:new h.XMLHttpRequest);var f=l.url=t.uri||t.url,c=l.method=t.method||"GET",d=t.body||t.data,p=l.headers=t.headers||{},m=!!t.sync,b=!1,g={body:void 0,headers:{},statusCode:0,method:c,url:f,rawRequest:l};if("json"in t&&!1!==t.json&&(b=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==c&&"HEAD"!==c&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),d=JSON.stringify(!0===t.json?d:t.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(u,0)},l.onload=u,l.onerror=s,l.onprogress=function(){},l.onabort=function(){r=!0},l.ontimeout=s,l.open(c,f,!m,t.username,t.password),m||(l.withCredentials=!!t.withCredentials),!m&&t.timeout>0&&(i=setTimeout(function(){if(!r){r=!0,l.abort("timeout");var t=Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",s(t)}},t.timeout)),l.setRequestHeader)for(e in p)p.hasOwnProperty(e)&&l.setRequestHeader(e,p[e]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw 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(d||null),l}e.exports=h,e.exports.default=h,h.XMLHttpRequest=i.XMLHttpRequest||function(){},h.XDomainRequest="withCredentials"in new h.XMLHttpRequest?h.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){h["delete"===t?"del":t]=function(e,r,i){return(r=s(e,r,i)).method=t.toUpperCase(),u(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;return{r:(t.r*t.a+e.r*e.a*(1-t.a))/i,g:(t.g*t.a+e.g*e.a*(1-t.a))/i,b:(t.b*t.a+e.b*e.a*(1-t.a))/i,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;return{r:(e.r*e.a+t.r*t.a*(1-e.a))/i,g:(e.g*e.a+t.g*t.a*(1-e.a))/i,b:(e.b*e.a+t.b*t.a*(1-e.a))/i,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,h=e.g*e.a,u=e.b*e.a;return{r:(n*s+n*(1-e.a)+s*(1-t.a))/i,g:(a*h+a*(1-e.a)+h*(1-t.a))/i,b:(o*u+o*(1-e.a)+u*(1-t.a))/i,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;return{r:(n+e.r*e.a)/i,g:(a+e.g*e.a)/i,b:(o+e.b*e.a)/i,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,h=e.g*e.a,u=e.b*e.a;return{r:(n*e.a+s*t.a-n*s+n*(1-e.a)+s*(1-t.a))/i,g:(a*e.a+h*t.a-a*h+a*(1-e.a)+h*(1-t.a))/i,b:(o*e.a+u*t.a-o*u+o*(1-e.a)+u*(1-t.a))/i,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,h=e.g*e.a,u=e.b*e.a;return{r:(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,g:(2*h<=e.a?2*a*h+a*(1-e.a)+h*(1-t.a):a*(1+e.a)+h*(1+t.a)-2*h*a-e.a*t.a)/i,b:(2*u<=e.a?2*o*u+o*(1-e.a)+u*(1-t.a):o*(1+e.a)+u*(1+t.a)-2*u*o-e.a*t.a)/i,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,h=e.g*e.a,u=e.b*e.a;return{r:(Math.min(n*e.a,s*t.a)+n*(1-e.a)+s*(1-t.a))/i,g:(Math.min(a*e.a,h*t.a)+a*(1-e.a)+h*(1-t.a))/i,b:(Math.min(o*e.a,u*t.a)+o*(1-e.a)+u*(1-t.a))/i,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,h=e.g*e.a,u=e.b*e.a;return{r:(Math.max(n*e.a,s*t.a)+n*(1-e.a)+s*(1-t.a))/i,g:(Math.max(a*e.a,h*t.a)+a*(1-e.a)+h*(1-t.a))/i,b:(Math.max(o*e.a,u*t.a)+o*(1-e.a)+u*(1-t.a))/i,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,h=e.g*e.a,u=e.b*e.a;return{r:(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,g:(2*a<=t.a?2*a*h+a*(1-e.a)+h*(1-t.a):a*(1+e.a)+h*(1+t.a)-2*h*a-e.a*t.a)/i,b:(2*o<=t.a?2*o*u+o*(1-e.a)+u*(1-t.a):o*(1+e.a)+u*(1+t.a)-2*u*o-e.a*t.a)/i,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,h=e.g*e.a,u=e.b*e.a;return{r:(n+s-2*Math.min(n*e.a,s*t.a))/i,g:(a+h-2*Math.min(a*e.a,h*t.a))/i,b:(o+u-2*Math.min(o*e.a,u*t.a))/i,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,h=e.g*e.a,u=e.b*e.a;return{r:(n*e.a+s*t.a-2*n*s+n*(1-e.a)+s*(1-t.a))/i,g:(a*e.a+h*t.a-2*a*h+a*(1-e.a)+h*(1-t.a))/i,b:(o*e.a+u*t.a-2*o*u+o*(1-e.a)+u*(1-t.a))/i,a:i}}},{}],191:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireWildcard");
1Object.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;if("function"==typeof i&&(s=i,i={}),!(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 h=i,u=h.mode,l=h.opacitySource,f=h.opacityDest;u||(u=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[u];e=Math.round(e),r=Math.round(r);var d=this;return 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),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 n,a=t("@babel/runtime/helpers/interopRequireWildcard"),o=t("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.addConstants=U,r.addJimpMethods=F,r.jimpEvMethod=G,r.jimpEvChange=H,Object.defineProperty(r,"addType",{enumerable:!0,get:function(){return T.addType}}),r.default=void 0;for(var s=o(t("@babel/runtime/helpers/construct")),h=o(t("@babel/runtime/helpers/slicedToArray")),u=o(t("@babel/runtime/helpers/classCallCheck")),l=o(t("@babel/runtime/helpers/createClass")),f=o(t("@babel/runtime/helpers/possibleConstructorReturn")),c=o(t("@babel/runtime/helpers/getPrototypeOf")),d=o(t("@babel/runtime/helpers/assertThisInitialized")),p=o(t("@babel/runtime/helpers/inherits")),m=o(t("@babel/runtime/helpers/defineProperty")),b=o(t("@babel/runtime/helpers/typeof")),g=
1o(t("fs")),_=o(t("path")),v=o(t("events")),y=t("@jimp/utils"),w=o(t("any-base")),x=o(t("mkdirp")),E=o(t("pixelmatch")),S=o(t("tinycolor2")),k=o(t("./modules/phash")),M=o(t("./request")),A=o(t("./composite")),I=o(t("./utils/promisify")),T=a(t("./utils/mime")),R=t("./utils/image-bitmap"),P=a(t("./constants")),O="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",C=[NaN,NaN],L=2;L<65;L++){var B=(0,w.default)(w.default.BIN,O.slice(0,L))(Array(65).join("1"));C.push(B.length)}function D(){}function N(t,r){(0,M.default)(t,function(i,n,a){return i?r(i):"headers"in n&&"location"in n.headers?(t.url=n.headers.location,N(t,r)):"object"===(0,b.default)(a)&&e.isBuffer(a)?r(null,a):Error("Could not load Buffer from <"+t.url+"> (HTTP: "+n.statusCode+")")})}var z={data:null,width:null,height:null},j=function(t){function r(){for(var t,i=arguments.length,n=Array(i),a=0;a<i;a++)n[a]=arguments[a];(0,u.default)(this,r),t=(0,f.default)(this,(0,c.default)(r).call(this)),(0,m.default)((0,d.default)(t),"bitmap",z),(0,m.default)((0,d.default)(t),"_background",0),(0,m.default)((0,d.default)(t),"_originalMime",r.MIME_PNG),(0,m.default)((0,d.default)(t),"_exif",null),(0,m.default)((0,d.default)(t),"_rgba",!0),(0,m.default)((0,d.default)(t),"writeAsync",function(e){return(0,I.default)(t.write,(0,d.default)(t),e)}),(0,m.default)((0,d.default)(t),"getBase64Async",function(e){return(0,I.default)(t.getBase64,(0,d.default)(t),e)}),(0,m.default)((0,d.default)(t),"getBuffer",R.getBuffer),(0,m.default)((0,d.default)(t),"getBufferAsync",R.getBufferAsync),(0,m.default)((0,d.default)(t),"getPixelColour",t.getPixelColor),(0,m.default)((0,d.default)(t),"setPixelColour",t.setPixelColor);var o=(0,d.default)(t),s=D;function h(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=e[0];(i||{}).methodName="constructor",setTimeout(function(){var t;i&&s===D?o.emitError("constructor",i):i||o.emitMulti("constructor","initialized"),(t=s).call.apply(t,[o].concat(e))},1)}if(x=n[0],Object.prototype.toString.call(x).toLowerCase().indexOf("arraybuffer")>-1&&(n[0]=function(t){for(var r=e.alloc(t.byteLength),i=new Uint8Array(t),n=0;n<r.length;++n)r[n]=i[n];return r}(n[0])),"number"==typeof n[0]&&"number"==typeof n[1]||parseInt(n[0],10)&&parseInt(n[1],10)){var l=parseInt(n[0],10),p=parseInt(n[1],10);if(s=n[2],"number"==typeof n[2]&&(t._background=n[2],s=n[3]),"string"==typeof n[2]&&(t._background=r.cssColorToHex(n[2]),s=n[3]),void 0===s&&(s=D),"function"!=typeof s)return(0,f.default)(t,y.throwError.call((0,d.default)(t),"cb must be a function",h));t.bitmap={data:e.alloc(l*p*4),width:l,height:p};for(var _=0;_<t.bitmap.data.length;_+=4)t.bitmap.data.writeUInt32BE(t._background,_);h(null,(0,d.default)(t))}else if("object"===(0,b.default)(n[0])&&n[0].url){if("function"!=typeof(s=n[1]||D))return(0,f.default)(t,y.throwError.call((0,d.default)(t),"cb must be a function",h));N(n[0],function(e,r){if(e)return y.throwError.call((0,d.default)(t),e,h);t.parseBitmap(r,n[0].url,h)})}else if(n[0]instanceof r){var v=n[0];if(void 0===(s=n[1])&&(s=D),"function"!=typeof s)return(0,f.default)(t,y.throwError.call((0,d.default)(t),"cb must be a function",h));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,h(null,(0,d.default)(t))}else if((E=n[0])&&"object"===(0,b.default)(E)&&"number"==typeof E.width&&"number"==typeof E.height&&(e.isBuffer(E.data)||E.data instanceof Uint8Array||"function"==typeof Uint8ClampedArray&&E.data instanceof Uint8ClampedArray)&&(E.data.length===E.width*E.height*4||E.data.length===E.width*E.height*3)){var w=n[0];s=n[1]||D,t.bitmap={data:w.width*w.height*4===w.data.length?e.from(w.data):function(t){if(t.length%3!=0)throw 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}(w.data),width:w.width,height:w.height},h(null,(0,d.default)(t))}else if("string"==typeof n[0]){var x,E,S,k=n[0];if(void 0===(s=n[1])&&(s=D),"function"!=typeof s)return(0,f.default)(t,y.throwError.call((0,d.default)(t),"cb must be a function",h));S=function(e,r){if(e)return y.throwError.call((0,d.default)(t),e,h);t.parseBitmap(r,k,h)},g.default&&"function"==typeof g.default.readFile&&!k.match(/^(http|ftp)s?:\/\/./)?g.default.readFile(k,S):N({url:k},S)}else if("object"===(0,b.default)(n[0])&&e.isBuffer(n[0])){var M=n[0];if("function"!=typeof(s=n[1]))return(0,f.default)(t,y.throwError.call((0,d.default)(t),"cb must be a function",h));t.parseBitmap(M,null,h)}else{"function"!=typeof(s=n[n.length-1])&&"function"!=typeof(s=n[n.length-2])&&(s=D);var A=r.__extraConstructors.find(function(t){return t.test.apply(t,n)});if(!A)return(0,f.default)(t,y.throwError.call((0,d.default)(t),"No matching constructor overloading was found. Please see the docs for how to call the Jimp constructor.",h));new Promise(function(e,r){var i;return(i=A.run).call.apply(i,[(0,d.default)(t),e,r].concat(n))}).then(function(){return h(null,(0,d.default)(t))}).catch(h)}return t}return(0,p.default)(r,t),(0,l.default)(r,[{key:"parseBitmap",value:function(t,e,r){R.parseBitmap.call(this,t,null,r)}},{key:"rgba",value:function(t,e){return"boolean"!=typeof t?y.throwError.call(this,"bool must be a boolean, true for RGBA or false for RGB",e):(this._rgba=t,(0,y.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}
1),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===z?"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 T.getExtension(t)}},{key:"write",value:function(t,e){var r=this;if(!g.default||!g.default.createWriteStream)throw Error("Cant access the filesystem. You can use the getBase64 method.");if("string"!=typeof t)return y.throwError.call(this,"path must be a string",e);if(void 0===e&&(e=D),"function"!=typeof e)return y.throwError.call(this,"cb must be a function",e);var i=T.getType(t)||this.getMIME(),n=_.default.parse(t);return n.dir&&x.default.sync(n.dir),this.getBuffer(i,function(i,n){if(i)return y.throwError.call(r,i,e);var a=g.default.createWriteStream(t);a.on("open",function(){a.write(n),a.end()}).on("error",function(t){return y.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)?y.throwError.call(this,"mime must be a string",e):"function"!=typeof e?y.throwError.call(this,"cb must be a function",e):(this.getBuffer(t,function(r,i){if(r)return y.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 y.throwError.call(this,"base must be a number",e);if(t<2||t>64)return y.throwError.call(this,"base must be a number between 2 and 64",e);var r=this.pHash();for(r=(0,w.default)(w.default.BIN,O.slice(0,t))(r);r.length<C[t];)r="0"+r;return(0,y.isNodePattern)(e)&&e.call(this,null,r),r}},{key:"pHash",value:function(){return new k.default().getHash(this)}},{key:"distanceFromHash",value:function(t){var e=new k.default,r=e.getHash(this);return e.distance(r,t)}},{key:"getPixelIndex",value:function(t,e,i,n){if("function"==typeof i&&void 0===n&&(n=i,i=null),i||(i=r.EDGE_EXTEND),"number"!=typeof t||"number"!=typeof e)return y.throwError.call(this,"x and y must be numbers",n);t=Math.round(t),e=Math.round(e),a=t,o=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 a,o,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,y.isNodePattern)(n)&&n.call(this,null,s),s}},{key:"getPixelColor",value:function(t,e,r){if("number"!=typeof t||"number"!=typeof e)return y.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,y.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 y.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,y.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?y.throwError.call(this,"x and y must be numbers"):"number"!=typeof r||"number"!=typeof i?y.throwError.call(this,"w and h must be numbers"):(0,y.scanIterator)(this,t,e,r,i)}}]),r}(v.default);function U(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j;Object.entries(t).forEach(function(t){var r=(0,h.default)(t,2),i=r[0],n=r[1];e[i]=n})}function F(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j;Object.entries(t).forEach(function(t){var r=(0,h.default)(t,2),i=r[0],n=r[1];e.prototype[i]=n})}function G(t,e,r){var i="before-"+e,n=e.replace(/e$/,"")+"ed";j.prototype[t]=function(){for(var e,a,o=arguments.length,s=Array(o),h=0;h<o;h++)s[h]=arguments[h];var u=s[r.length-1],l=this;"function"==typeof u?(e=function(){for(var e=arguments.length,r=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,m.default)({},t,o)),u.apply(this,r)}
1,s[s.length-1]=e):e=!1,this.emitMulti(t,i);try{a=r.apply(this,s),e||this.emitMulti(t,n,(0,m.default)({},t,a))}catch(e){e.methodName=t,this.emitError(t,e)}return a},j.prototype[t+"Quiet"]=r}function H(t,e){G(t,"change",e)}U(P),F({composite:A.default}),j.__extraConstructors=[],j.appendConstructorOption=function(t,e,r){j.__extraConstructors.push({name:t,test:e,run:r})},j.read=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return new Promise(function(t,r){(0,s.default)(j,e.concat([function(e,i){e?r(e):t(i)}]))})},j.create=j.read,j.rgbaToInt=function(t,e,r,i,n){if("number"!=typeof t||"number"!=typeof e||"number"!=typeof r||"number"!=typeof i)return y.throwError.call(this,"r, g, b and a must be numbers",n);if(t<0||t>255)return y.throwError.call(this,"r must be between 0 and 255",n);if((e<0||e>255)&&y.throwError.call(this,"g must be between 0 and 255",n),r<0||r>255)return y.throwError.call(this,"b must be between 0 and 255",n);if(i<0||i>255)return y.throwError.call(this,"a must be between 0 and 255",n);t=Math.round(t),r=Math.round(r);var a=0x1000000*t+65536*(e=Math.round(e))+256*r+ +(i=Math.round(i));return(0,y.isNodePattern)(n)&&n.call(this,null,a),a},j.intToRGBA=function(t,e){if("number"!=typeof t)return y.throwError.call(this,"i must be a number",e);var r={};return r.r=Math.floor(t/0x1000000),r.g=Math.floor((t-0x1000000*r.r)/65536),r.b=Math.floor((t-0x1000000*r.r-65536*r.g)/256),r.a=Math.floor((t-0x1000000*r.r-65536*r.g-256*r.b)/1),(0,y.isNodePattern)(e)&&e.call(this,null,r),r},j.cssColorToHex=function(t){return"number"==typeof(t=t||0)?Number(t):parseInt((0,S.default)(t).toHex8(),16)},j.limit255=function(t){return t=Math.min(t=Math.max(t,0),255)},j.diff=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1;if(!(t instanceof j)||!(e instanceof j))return y.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 y.throwError.call(this,"threshold must be a number between 0 and 1");var a=new j(i.width,i.height,0xffffffff);return{percent:(0,E.default)(i.data,n.data,a.bitmap.data,a.bitmap.width,a.bitmap.height,{threshold:r})/(a.bitmap.width*a.bitmap.height),image:a}},j.distance=function(t,e){var r=new k.default,i=r.getHash(t),n=r.getHash(e);return r.distance(i,n)},j.compareHashes=function(t,e){return new k.default().distance(t,e)},j.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},G("clone","clone",function(t){var e=new j(this);return(0,y.isNodePattern)(t)&&t.call(e,null,e),e}),H("background",function(t,e){return"number"!=typeof t?y.throwError.call(this,"hex must be a hexadecimal rgba value",e):(this._background=t,(0,y.isNodePattern)(e)&&e.call(this,null,this),this)}),H("scan",function(t,e,r,i,n,a){if("number"!=typeof t||"number"!=typeof e)return y.throwError.call(this,"x and y must be numbers",a);if("number"!=typeof r||"number"!=typeof i)return y.throwError.call(this,"w and h must be numbers",a);if("function"!=typeof n)return y.throwError.call(this,"f must be a function",a);var o=(0,y.scan)(this,t,e,r,i,n);return(0,y.isNodePattern)(a)&&a.call(this,null,o),o}),void 0!==i&&(void 0===i?"undefined":(0,b.default)(i))==="object"&&(n=i),"undefined"!=typeof self&&("undefined"==typeof self?"undefined":(0,b.default)(self))==="object"&&(n=self),n.Jimp=j,n.Buffer=e,r.default=j}).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++)n[e]=1;n[0]=1/Math.sqrt(2)}(this.size)}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]=function(t){var e={};return e.r=Math.floor(t/0x1000000),e.g=Math.floor((t-0x1000000*e.r)/65536),e.b=Math.floor((t-0x1000000*e.r-65536*e.g)/256),e.a=Math.floor((t-0x1000000*e.r-65536*e.g-256*e.b)/1),e}(t.getPixelColor(r,i)).b}for(var a=function(t,e){for(var r=[],i=0;i<e;i++){r[i]=[];for(var a=0;a<e;a++){for(var o=0,s=0;s<e;s++)for(var h=0;h<e;h++)o+=Math.cos((2*s+1)/(2*e)*i*Math.PI)*Math.cos((2*h+1)/(2*e)*a*Math.PI)*t[s][h];o*=n[i]*n[a]/4,r[i][a]=o}}return r}(e,this.size),o=0,s=0;s<this.smallerSize;s++)for(var h=0;h<this.smallerSize;h++)o+=a[s][h];for(var u=o/(this.smallerSize*this.smallerSize),l="",f=0;f<this.smallerSize;f++)for(var c=0;c<this.smallerSize;c++)l+=a[f][c]>u?"1":"0";return l};var n=[];e.exports=i},{}],195:[function(t,e,r){(function(r,i){"use strict";var n=t("@babel/runtime/helpers/interopRequireDefault");
1n(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(Error("Response is not a buffer for url "+t.url+". Error: "+r.message))}else e(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,u=(n=(0,o.default)(t))?n.mime:r?l.getType(r):null;if("string"!=typeof u)return i(Error("Could not find MIME for Buffer <"+r+">"));this._originalMime=u.toLowerCase();try{var f=this.getMIME();if(!this.constructor.decoders[f])return h.throwError.call(this,"Unsupported MIME type: "+f,i);this.bitmap=this.constructor.decoders[f](t)}catch(t){return i.call(this,t,this)}try{this._exif=s.default.create(t).parse(),function(t){if(!(2>c(t))){var r=function(t){var e=t.getWidth(),r=t.getHeight();switch(c(t)){case 1:default: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]}}}(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,h=e.alloc(o.length),u=0;u<r;u++)for(var l=0;l<i;l++){var f=n(u,l),c=(0,a.default)(f,2),d=c[0],p=c[1],m=r*l+u<<2,b=s*p+d<<2,g=o.readUInt32BE(b);h.writeUInt32BE(g,m)}t.bitmap.data=h,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")),h=t("@jimp/utils"),u=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===u.AUTO&&(t=this.getMIME()),"string"!=typeof t)return h.throwError.call(this,"mime must be a string",r);if("function"!=typeof r)return h.throwError.call(this,"cb must be a function",r);if(t=t.toLowerCase(),this._rgba&&this.constructor.hasAlpha[t])this.bitmap.data=e.from(this.bitmap.data);else{var i;this.bitmap.data=(i=this.constructor,new i(this.bitmap.width,this.bitmap.height,this._background).composite(this,0,0).bitmap).data}if(this.constructor.encoders[t]){var n=this.constructor.encoders[t](this);r.call(this,null,n)}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,r=t.split("/").slice(-1);return(e=r[r.length-1].split(".").pop(),Object.entries(i).find(function(t){return t[1].includes(e)})||[])[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,r.default=function(t,e){for(var r=arguments.length,i=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)})},e.exports=r.default},{}],199:[function(t,e,r){"use strict";var i=t("@babel/runtime/helpers/interopRequireWildcard"),n=t("@babel/runtime/helpers/interopRequireDefault");
1Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.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)})}return t.types&&(t.types.forEach(function(t){var e=t();Array.isArray(e.mime)?h.addType.apply(void 0,(0,a.default)(e.mime)):Object.entries(e.mime).forEach(function(t){return h.addType.apply(void 0,(0,a.default)(t))}),delete e.mime,i(e)}),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(function(t){var e=t(h.jimpEvChange)||{};e.class||e.constants?i(e):i({class:e})}),(0,h.addJimpMethods)(r.class,e),(0,h.addConstants)(r.constants,e),h.default};var a=n(t("@babel/runtime/helpers/toConsumableArray")),o=n(t("@babel/runtime/helpers/defineProperty")),s=n(t("@babel/runtime/helpers/slicedToArray")),h=i(t("@jimp/core"));function u(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?u(r,!0).forEach(function(e){(0,o.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(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"));r.default=(0,n.default)({types:[a.default],plugins:[o.default]}),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,h,u){if(!(t instanceof this.constructor))return a.throwError.call(this,"The source must be a Jimp image",u);if("number"!=typeof e||"number"!=typeof r)return a.throwError.call(this,"x and y must be numbers",u);if("function"==typeof i)u=i,i=0,o=0,s=t.bitmap.width,h=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)(h))return a.throwError.call(this,"srcx, srcy, srcw, srch must be numbers",u);i=i||0,o=o||0,s=s||t.bitmap.width,h=h||t.bitmap.height}e=Math.round(e),r=Math.round(r),i=Math.round(i),o=Math.round(o),s=Math.round(s),h=Math.round(h);var l=this.bitmap.width,f=this.bitmap.height,c=this;return t.scanQuiet(i,o,s,h,function(t,n,a){var s=e+t-i,h=r+n-o;if(s>=0&&h>=0&&l-s>0&&f-h>0){var u=c.getPixelIndex(s,h),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[u],g:c.bitmap.data[u+1],b:c.bitmap.data[u+2],a:c.bitmap.data[u+3]};c.bitmap.data[u]=(d.a*(d.r-p.r)-p.r+255>>8)+p.r,c.bitmap.data[u+1]=(d.a*(d.g-p.g)-p.g+255>>8)+p.g,c.bitmap.data[u+2]=(d.a*(d.b-p.b)-p.b+255>>8)+p.b,c.bitmap.data[u+3]=this.constructor.limit255(p.a+d.a)}}),(0,a.isNodePattern)(u)&&u.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";
1Object.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,h,u,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(u=0,m=0,b=0;u<this.bitmap.height;u++){for(l=1,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<=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(h=0;h<this.bitmap.width;h++)E[m]=r,S[m]=a,k[m]=o,M[m]=s,0===u&&(A[h]=((f=h+y)<_?f:_)<<2,I[h]=(f=h-t)>0?f<<2:0),c=b+A[h],d=b+I[h],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(h=0;h<this.bitmap.width;h++){for(l=1,r=E[p=h]*y,a=S[p]*y,o=k[p]*y,s=M[p]*y;l<=t;l++)p+=l>v?0:this.bitmap.width,r+=E[p],a+=S[p],o+=k[p],s+=M[p];for(u=0,m=h<<2;u<this.bitmap.height;u++)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===h&&(A[u]=((f=u+y)<v?f:v)*this.bitmap.width,I[u]=(f=u-t)>0?f*this.bitmap.width:0),c=h+A[u],d=h+I[u],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 h(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 h=t.getPixelIndex(r+o-a,i+s-a);n[0]+=t.bitmap.data[h]*e[o][s],n[1]+=t.bitmap.data[h+1]*e[o][s],n[2]+=t.bitmap.data[h+2]*e[o][s]}return n}var u=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,h){var u={r:r.bitmap.data[h],g:r.bitmap.data[h+1],b:r.bitmap.data[h+2]},l=function(t,e){return r.constructor.limit255(u[t]+e)};t.forEach(function(t){if("mix"===t.apply)u=f(u,t.params[0],t.params[1]);else if("tint"===t.apply)u=f(u,{r:255,g:255,b:255},t.params[0]);else if("shade"===t.apply)u=f(u,{r:0,g:0,b:0},t.params[0]);else if("xor"===t.apply)u={r:u.r^t.params[0].r,g:u.g^t.params[0].g,b:u.b^t.params[0].b};
1else if("red"===t.apply)u.r=l("r",t.params[0]);else if("green"===t.apply)u.g=l("g",t.params[0]);else if("blue"===t.apply)u.b=l("b",t.params[0]);else{var i;if("hue"===t.apply&&(t.apply="spin"),!(u=(0,o.default)(u))[t.apply])return s.throwError.call(r,"action "+t.apply+" not supported",e);u=(i=u)[t.apply].apply(i,(0,a.default)(t.params)).toRgb()}}),r.bitmap.data[h]=u.r,r.bitmap.data[h+1]=u.g,r.bitmap.data[h+2]=u.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];n=.349*(i=.393*i+.769*n+.189*a)+.686*n+.168*a,a=.272*i+.534*n+.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,h,u,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){h=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,u=0):(u=this.bitmap.data[p+0],l=this.bitmap.data[p+1],f=this.bitmap.data[p+2]),a+=n*u,o+=n*l,h+=n*f;a<0&&(a=0),o<0&&(o=0),h<0&&(h=0),a>255&&(a=255),o>255&&(o=255),h>255&&(h=255),m[s+0]=a,m[s+1]=o,m[s+2]=h}),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(u(e)&&"number"!=typeof e)return s.throwError.call(this,"x must be a number",a);if(u(r)&&"number"!=typeof r)return s.throwError.call(this,"y must be a number",a);if(u(i)&&"number"!=typeof i)return s.throwError.call(this,"w must be a number",a);if(u(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=u(i)?i:this.bitmap.width-e,n=u(n)?n:this.bitmap.height-r;var l=this.cloneQuiet();return this.scanQuiet(e,r,i,n,function(e,r,i){var n=h(l,o,e=t*Math.floor(e/t),r=t*Math.floor(r/t));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(u(e)&&"number"!=typeof e)return s.throwError.call(this,"x must be a number",a);if(u(r)&&"number"!=typeof r)return s.throwError.call(this,"y must be a number",a);if(u(i)&&"number"!=typeof i)return s.throwError.call(this,"w must be a number",a);if(u(n)&&"number"!=typeof n)return s.throwError.call(this,"h must be a number",a)}var o=(t.length-1)/2;e=u(e)?e:o,r=u(r)?r:o,i=u(i)?i:this.bitmap.width-e,n=u(n)?n:this.bitmap.height-r;var l=this.cloneQuiet();return this.scanQuiet(e,r,i,n,function(e,r,i){var n=h(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";
1Object.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 h=t/e>this.bitmap.width/this.bitmap.height?e/this.bitmap.height:t/this.bitmap.width,u=this.cloneQuiet().scale(h,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(u,(this.bitmap.width-u.bitmap.width)/2*(o>>1),(this.bitmap.height-u.bitmap.height)/2*(s>>1)),(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 h=t/e>this.bitmap.width/this.bitmap.height?t/this.bitmap.width:e/this.bitmap.height;return this.scale(h,n),this.crop((this.bitmap.width-t)/2*(o>>1),(this.bitmap.height-e)/2*(s>>1),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,h=s+n*r<<2;this.bitmap.data=this.bitmap.data.slice(s,h)}else{var u=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);u.writeUInt32BE(i,l,!0),l+=4}),this.bitmap.data=u}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=0,n=2e-4,s=!0,h=!1,u=arguments.length,l=Array(u),f=0;f<u;f++)l[f]=arguments[f];for(var c=0,d=l.length;c<d;c++)if("number"==typeof l[c]&&(n=l[c]),"boolean"==typeof l[c]&&(s=l[c]),"function"==typeof l[c]&&(t=l[c]),"object"===(0,a.default)(l[c])){var p=l[c];void 0!==p.tolerance&&(n=p.tolerance),void 0!==p.cropOnlyFrames&&(s=p.cropOnlyFrames),void 0!==p.cropSymmetric&&(h=p.cropSymmetric),void 0!==p.leaveBorder&&(i=p.leaveBorder)}var m=this.getPixelColor(0,0),b=this.constructor.intToRGBA(m),g=0,_=0,v=0,y=0;m=this.getPixelColor(0,0);r:for(var w=0;w<r-1;w++){for(var x=0;x<e;x++){var E=this.getPixelColor(x,w),S=this.constructor.intToRGBA(E);if(this.constructor.colorDiff(b,S)>n)break r}g++}m=this.getPixelColor(e,0);i:for(var k=0;k<e-1;k++){for(var M=0+g;M<r;M++){var A=this.getPixelColor(k,M),I=this.constructor.intToRGBA(A);if(this.constructor.colorDiff(b,I)>n)break i}_++}m=this.getPixelColor(0,r);n:for(var T=r-1;T>=g+1;T--){for(var R=e-_-1;R>=0;R--){var P=this.getPixelColor(R,T),O=this.constructor.intToRGBA(P);if(this.constructor.colorDiff(b,O)>n)break n}v++}m=this.getPixelColor(e,r);a:for(var C=e-1;C>=0+_+1;C--){for(var L=r-1;L>=0+g;L--){var B=this.getPixelColor(C,L),D=this.constructor.intToRGBA(B);if(this.constructor.colorDiff(b,D)>n)break a}y++}if(y-=i,_-=i,g-=i,v-=i,h){var N=Math.min(_,y),z=Math.min(g,v);y=N,_=N,g=z,v=z}var j=e-((y=y>=0?y:0)+(_=_>=0?_:0)),U=r-((v=v>=0?v:0)+(g=g>=0?g:0));return(s?0!==_&&0!==g&&0!==y&&0!==v:0!==_||0!==g||0!==y||0!==v)&&this.crop(_,g,j,U),(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");
1Object.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,h=i/s,u=Math.sqrt(Math.pow(a-.5,2)+Math.pow(h-.5,2)),l=2*Math.pow(u,e.r),f=Math.round(((a-.5)/u*l+.5)*o),c=Math.round(((h-.5)/u*l+.5)*s),d=n.getPixelColor(f,c);t.setPixelColor(d,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,h=this.bitmap.width*s+o<<2,u=this.bitmap.data.readUInt32BE(n);a.writeUInt32BE(u,h)}),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=[],h=0;h<n;h++){s[h]=[];for(var u=0;u<n;u++){var l=Math.pow(u-r,2)+Math.pow(h-r,2);s[h][u]=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";
1Object.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 h=e+t,u=r+i;if(h>=0&&u>=0&&h<a&&u<o){var l=s.getPixelIndex(h,u),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:Array(256).fill(0),g:Array(256).fill(0),b: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(t-e)*255/(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")),h=n(t("load-bmfont")),u=t("@jimp/utils"),l=t("./measure-text");function f(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]||{},h=t.kernings[o];!function(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)}}(this,t,e,r,s||{}),e+=(h&&h[i[a+1]]?h[i[a+1]]:0)+(s.xadvance||n)}}var c="browser/lib/";r.default=function(){return{constants:{measureText:l.measureText,measureTextHeight:l.measureTextHeight,FONT_SANS_8_BLACK:s.default.join(c,"fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt"),FONT_SANS_10_BLACK:s.default.join(c,"fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt"),FONT_SANS_12_BLACK:s.default.join(c,"fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt"),FONT_SANS_14_BLACK:s.default.join(c,"fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt"),FONT_SANS_16_BLACK:s.default.join(c,"fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt"),FONT_SANS_32_BLACK:s.default.join(c,"fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt"),FONT_SANS_64_BLACK:s.default.join(c,"fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt"),FONT_SANS_128_BLACK:s.default.join(c,"fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt"),FONT_SANS_8_WHITE:s.default.join(c,"fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt"),FONT_SANS_16_WHITE:s.default.join(c,"fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt"),FONT_SANS_32_WHITE:s.default.join(c,"fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt"),FONT_SANS_64_WHITE:s.default.join(c,"fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt"),FONT_SANS_128_WHITE:s.default.join(c,"fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt"),loadFont:function(t,e){var r=this;return"string"!=typeof t?u.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,h.default)(t,function(i,n){var a,o={},h={};if(i)return u.throwError.call(r,i,e);for(var l=0;l<n.chars.length;l++)o[String.fromCharCode(n.chars[l].id)]=n.chars[l];for(var f=0;f<n.kernings.length;f++){var c=String.fromCharCode(n.kernings[f].first);h[c]=h[c]||{},h[c][String.fromCharCode(n.kernings[f].second)]=n.kernings[f].amount}(a=s.default.dirname(t),Promise.all(n.pages.map(function(t){return r.read(a+"/"+t)}))).then(function(t){e(null,{chars:o,kernings:h,pages:t,common:n.common,info:n.info})})})})}},class:{print:function(t,e,r,i,n,s,h){var c,d,p,m,b,g,_,v,y=this;if("function"==typeof n&&void 0===h&&(h=n,n=1/0),void 0===n&&(n=1/0),"function"==typeof s&&void 0===h&&(h=s,s=1/0),void 0===s&&(s=1/0),"object"!==(0,a.default)(t))return u.throwError.call(this,"font must be a Jimp loadFont",h);if("number"!=typeof e||"number"!=typeof r||"number"!=typeof n)return u.throwError.call(this,"x, y and maxWidth must be numbers",h);if("number"!=typeof n)return u.throwError.call(this,"maxWidth must be a number",h);if("number"!=typeof s)return u.throwError.call(this,"maxHeight must be a number",h);"object"===(0,a.default)(i)&&null!==i.text&&void 0!==i.text?(_=i.alignmentX||this.constructor.HORIZONTAL_ALIGN_LEFT,v=i.alignmentY||this.constructor.VERTICAL_ALIGN_TOP,i=i.text):(_=this.constructor.HORIZONTAL_ALIGN_LEFT,v=this.constructor.VERTICAL_ALIGN_TOP,i=i.toString()),s!==1/0&&v===this.constructor.VERTICAL_ALIGN_BOTTOM?r+=s-(0,l.measureTextHeight)(t,i,n):s!==1/0&&v===this.constructor.VERTICAL_ALIGN_MIDDLE&&(r+=s/2-(0,l.measureTextHeight)(t,i,n)/2);var w=Object.entries(t.chars)[0][1].xadvance,x=(c=i,d=n,p=c.split(" "),m=[],b=[],g=0,p.forEach(function(e){var r=[].
1concat((0,o.default)(b),[e]).join(" "),i=(0,l.measureText)(t,r);i<=d?(i>g&&(g=i),b.push(e)):(m.push(b),b=[e])}),m.push(b),{lines:m,longestLine:g}),E=x.lines,S=x.longestLine;return E.forEach(function(i){var a,o,s,h=i.join(" "),u=(a=y.constructor,o=n,(s=_)===a.HORIZONTAL_ALIGN_LEFT?0:s===a.HORIZONTAL_ALIGN_CENTER?(o-(0,l.measureText)(t,h))/2:o-(0,l.measureText)(t,h));f.call(y,t,e+u,r,h,w),r+=t.common.lineHeight}),(0,u.isNodePattern)(h)&&h.call(this,null,this,{x:e+S,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 h=a+n[s]+" ";i(t,h)>r&&s>0?(o+=t.common.lineHeight,a=n[s]+" "):a=h}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"),h=t("./lib/is-binary"),u=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 u(t,{responseType:"arraybuffer"});if(void 0===self.XMLHttpRequest)throw Error("your browser does not support XHR loading");var e=new self.XMLHttpRequest;return e.overrideMimeType("text/plain; charset=x-user-defined"),u({xhr:e},t)}(t)),i(t,function(i,u,l){if(i)return e(i);if(!/^2/.test(u.statusCode))return e(Error("http status code: "+u.statusCode));if(!l)return e(Error("no body result"));var f,c,d=!1;f=l,"[object ArrayBuffer]"===Object.prototype.toString.call(f)&&(l=new r(new Uint8Array(l),"binary")),h(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 p=u.headers["content-type"];c=d?s(l):/json/.test(p)||"{"===l.charAt(0)?JSON.parse(l):/xml/.test(p)||"<"===l.charAt(0)?o(l):a(l)}catch(t){e(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 h={data:i.alloc(t*e*4),width:t,height:e};s.default[r](this.bitmap,h),this.bitmap=h}else{var u=this;new o.default(this.bitmap.width,this.bitmap.height,t,e,!0,!0,function(r){u.bitmap.data=i.from(r),u.bitmap.width=t,u.bitmap.height=e}).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=!!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)this.configurePasses();else throw Error("Invalid settings specified for the resizer.")},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,h=0,u=0,l=0,f=0;for(r=0;s<1/3;r+=n,s+=a)for(h=r,u=0;h<this.widthPassResultSize;u+=this.originalWidthMultipliedByChannels,h+=this.targetWidthMultipliedByChannels)
1o[h]=t[u],o[h+1]=t[u+1],o[h+2]=t[u+2],e&&(o[h+3]=t[u+3]);for(s-=1/3,i=this.widthOriginal-1;s<i;r+=n,s+=a)for(l=1-(f=s%1),h=r,u=Math.floor(s)*n;h<this.widthPassResultSize;u+=this.originalWidthMultipliedByChannels,h+=this.targetWidthMultipliedByChannels)o[h+0]=t[u+0]*l+t[u+n+0]*f,o[h+1]=t[u+1]*l+t[u+n+1]*f,o[h+2]=t[u+2]*l+t[u+n+2]*f,e&&(o[h+3]=t[u+3]*l+t[u+n+3]*f);for(i=this.originalWidthMultipliedByChannels-n;r<this.targetWidthMultipliedByChannels;r+=n)for(h=r,u=i;h<this.widthPassResultSize;u+=this.originalWidthMultipliedByChannels,h+=this.targetWidthMultipliedByChannels)o[h]=t[u],o[h+1]=t[u+1],o[h+2]=t[u+2],e&&(o[h+3]=t[u+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,h=this.widthBuffer,u=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,u[p/r-1]=0);l=i;do{for(p=0,g=Math.min(l,f=1+c-d),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,u[p/r-1]+=w?g:0);if(l>=f)c+=r,d=c,l-=f;else{d+=l;break}}while(l>0&&c<this.originalWidthMultipliedByChannels);for(p=0,m=b;p<this.originalHeightMultipliedByChannels;m+=o)l=e?u[p/r]:1,g=e?l?1/l:0:n,h[m]=s[p++]*g,h[++m]=s[p++]*g,h[++m]=s[p++]*g,e&&(h[++m]=s[p++]*n);b+=r}while(b<this.targetWidthMultipliedByChannels);return h},i.prototype._resizeHeightRGBChannels=function(t,e){var r=this.ratioWeightHeightPass,i=1/r,n=this.outputHeightWorkBench,a=this.heightBuffer,o=this.outputHeightWorkBenchOpaquePixelsCount,s=0,h=0,u=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(f=0,p=Math.min(s,h=1+u-l),d=u;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>=h)l=u=d,s-=h;else{l+=s;break}}while(s>0&&u<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,h=0,u=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(o=0,u=1-(l=n%1),h=(s=Math.floor(n)*this.targetWidthMultipliedByChannels)+this.targetWidthMultipliedByChannels;o<this.targetWidthMultipliedByChannels;++o)i[a++]=Math.round(t[s++]*u+t[h++]*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))
1)},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,h=0;h<a;h++)for(var u=0;u<n;u++){var l=(h*n+u)*4,f=Math.floor(u*r/n),c=(Math.floor(h*i/a)*r+f)*4;s[l++]=o[c++],s[l++]=o[c++],s[l++]=o[c++],s[l++]=o[c++]}},bilinearInterpolation:function(t,e){for(var r=t.width,i=t.height,n=e.width,a=e.height,o=t.data,s=e.data,h=function(t,e,r,i,n){return e===i?r:Math.round((t-e)*n+(i-t)*r)},u=function(t,e,i,n,a,u,l,f){var c=(l*r+n)*4+e,d=(l*r+a)*4+e,p=h(i,n,o[c],a,o[d]);if(f===l)s[t+e]=p;else{c=(f*r+n)*4+e,d=(f*r+a)*4+e;var m=h(i,n,o[c],a,o[d]);s[t+e]=h(u,l,p,f,m)}},l=0;l<a;l++)for(var f=0;f<n;f++){var c=(l*n+f)*4,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);u(c,0,d,p,m,b,g,_),u(c,1,d,p,m,b,g,_),u(c,2,d,p,m,b,g,_),u(c,3,d,p,m,b,g,_)}},_interpolate2D:function(e,r,i,n){for(var a=e.data,o=r.data,s=e.width,h=e.height,u=r.width,l=r.height,f=Math.max(1,Math.floor(s/u)),c=u*f,d=Math.max(1,Math.floor(h/l)),p=l*d,m=t.alloc(c*h*4),b=0;b<h;b++)for(var g=0;g<c;g++)for(var _=g*(s-1)/c,v=Math.floor(_),y=_-v,w=(b*s+v)*4,x=(b*c+g)*4,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 O=R*(h-1)/p,C=Math.floor(O),L=O-C,B=(C*c+P)*4,D=(R*c+P)*4,N=0;N<4;N++){var z=B+N,j=C>0?m[z-4*c]:2*m[z]-m[z+4*c],U=m[z],F=m[z+4*c],G=C<h-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<u;W++){for(var Z=0,Y=0,V=0,X=0,Q=0,J=0;J<d;J++)for(var K=q*d+J,$=0;$<f;$++){var tt=(K*c+(W*f+$))*4,te=T[tt+3];te&&(Z+=T[tt],Y+=T[tt+1],V+=T[tt+2],Q++),X+=te}var tr=(q*u+W)*4;o[tr]=Q?Math.round(Z/Q):0,o[tr+1]=Q?Math.round(Y/Q):0,o[tr+2]=Q?Math.round(V/Q):0,o[tr+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;return Math.max(0,Math.min(255,n*n*n*a+n*n*(t-e-a)+(r-t)*n+e))})},hermiteInterpolation:function(t,e,r){return this._interpolate2D(t,e,r,function(t,e,r,i,n){return Math.max(0,Math.min(255,Math.round((((.5*(i-t)+1.5*(e-r))*n+(t-2.5*e+2*r-.5*i))*n+.5*(r-t))*n+e)))})},bezierInterpolation:function(t,e,r){return this._interpolate2D(t,e,r,function(t,e,r,i,n){var a=1-n,o=3*(e+(r-t)/4)*a*a*n,s=3*(r-(i-e)/4)*a*n*n;return Math.max(0,Math.min(255,Math.round(e*a*a*a+o+s+r*n*n*n)))})}}}).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,s=Math.ceil(Math.abs(this.bitmap.width*a)+Math.abs(this.bitmap.height*n))+1,o%2!=0&&o++,s%2!=0&&s++;var h=this.cloneQuiet();this.scanQuiet(0,0,this.bitmap.width,this.bitmap.height,function(t,e,r){this.bitmap.data.writeUInt32BE(this._background,r)});var u=Math.max(o,s,this.bitmap.width,this.bitmap.height);this.resize(u,u,e),this.blit(h,this.bitmap.width/2-h.bitmap.width/2,this.bitmap.height/2-h.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";
1Object.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,h=void 0===s?1.1:s,u=n.x,l=n.y,f=n.blur,c=this.clone(),d=this.clone();return d.scan(0,0,d.bitmap.width,d.bitmap.height,function(e,r,i){d.bitmap.data[i]=0,d.bitmap.data[i+1]=0,d.bitmap.data[i+2]=0,d.bitmap.data[i+3]=d.constructor.limit255(d.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}),d.resize(d.bitmap.width*h,d.bitmap.height*h).blur(void 0===f?5:f),this.composite(d,void 0===u?-25:u,void 0===l?25:l),this.composite(c,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,h=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 h?i.throwError.call(this,"autoGreyscale must be a boolean",e):(n=this.constructor.limit255(n),o=this.constructor.limit255(o),h&&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")),h=i(t("@jimp/plugin-circle")),u=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,h.default,u.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-
1print":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",h="image/x-ms-bmp",u=function(t){var e;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},l=function(t){return a.default.encode((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).data};r.default=function(){var t,e;return{mime:(0,n.default)({},s,["bmp"]),constants:{MIME_BMP:s,MIME_X_MS_BMP:h},decoders:(t={},(0,n.default)(t,s,u),(0,n.default)(t,h,u),t),encoders:(e={},(0,n.default)(e,s,l),(0,n.default)(e,h,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"),h="image/gif";r.default=function(){return{mime:(0,a.default)({},h,["gif"]),constants:{MIME_GIF:h},decoders:(0,a.default)({},h,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)({},h,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}
1,{"@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")),h=i(t("@jimp/tiff")),u=i(t("@jimp/gif"));r.default=function(){return(0,n.mergeDeep)((0,a.default)(),(0,o.default)(),(0,s.default)(),(0,h.default)(),(0,u.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 TypeError("Callback must be a function");return!0},r.throwError=function(t,e){if("string"==typeof t&&(t=Error(t)),"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 h=t.bitmap.width*o+s<<2;a.call(t,s,o,h)}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,h,u;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}h=e;case 7:if(!(h<e+i)){n.next=14;break}return u=t.bitmap.width*s+h<<2,n.next=11,{x:h,y:s,idx:u,image:t};case 11:h++,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)}()},34581:(t,e,r)=>{"use strict";var i=r(16036),n=r(89045);function a(t,e){this._histogram=null,this.width=t,this.height=e,this.size=t*e,this.arrayBuffer=new ArrayBuffer(this.size),this.data=new Uint8Array(this.arrayBuffer)}t.exports=a,r(20544),a.prototype={getValueAt:function(t,e){var r="number"==typeof t&&"number"!=typeof e?t:this.pointToIndex(t,e);return this.data[r]},indexToPoint:function(t){var e=new i;return n.between(t,0,this.size)?(e.y=Math.floor(t/this.width),e.x=t-e.y*this.width):(e.x=-1,e.y=-1),e},pointToIndex:function(t,e){var r=t,a=e;return(t instanceof i&&(r=t.x,a=t.y),n.between(r,0,this.width)&&n.between(a,0,this.height))?this.width*a+r:-1},copy:function(t){var e,r=new a(this.width,this.height),i="function"==typeof t;for(e=0;e<this.size;e++)r.data[e]=i?t(this.data[e],e):this.data[e];return r},histogram:function(){var t=r(20544);return this._histogram||(this._histogram=new t(this)),this._histogram}}},48413:t=>{"use strict";t.exports=function(t,e,r,i,n){this.x=t,this.y=e,this.xy=r,this.x2=i,this.y2=n}},54085:t=>{"use strict";t.exports=function(t){this.n=t,this.tag=Array(t),this.c=Array(3*t),this.alphaCurve=0,this.vertex=Array(t),this.alpha=Array(t),this.alpha0=Array(t),this.beta=Array(t)}},68086:(t,e,r)=>{"use strict";var i=r(21441),n=r(34581),a=r(54085),o=r(16036),s=r(96865),h=r(94937),u=r(48413),l=r(95202),f=r(89045);function c(t){this._luminanceData=null,this._pathlist=[],this._imageLoadingIdentifier=null,this._imageLoaded=!1,this._processed=!1,this._params={turnPolicy:c.TURNPOLICY_MINORITY,turdSize:2,alphaMax:1,optCurve:!0,optTolerance:.2,threshold:c.THRESHOLD_AUTO,blackOnWhite:!0,color:c.COLOR_AUTO,background:c.COLOR_TRANSPARENT,width:null,height:null},t&&this.setParameters(t)}c.COLOR_AUTO="auto",c.COLOR_TRANSPARENT="transparent",c.THRESHOLD_AUTO=-1,c.TURNPOLICY_BLACK="black",c.TURNPOLICY_WHITE="white",c.TURNPOLICY_LEFT="left",c.TURNPOLICY_RIGHT="right",c.TURNPOLICY_MINORITY="minority",c.TURNPOLICY_MAJORITY="majority";var d=[c.TURNPOLICY_BLACK,c.TURNPOLICY_WHITE,c.TURNPOLICY_LEFT,c.TURNPOLICY_RIGHT,c.TURNPOLICY_MINORITY,c.TURNPOLICY_MAJORITY];c.prototype={_bmToPathlist:function(){var t,e,r=this,i=this._params.threshold,n=this._params.blackOnWhite,a=new o(0,0);function h(e,r){var i,n,a;for(i=2;i<5;i++){for(a=0,n=-i+1;n<=i-1;n++)a+=(t.getValueAt(e+n,r+i-1)?1:-1)+(t.getValueAt(e+i-1,r+n-1)?1:-1)+(t.getValueAt(e+n-1,r-i)?1:-1)+(t.getValueAt(e-i,r+n)?1:-1);if(a>0)return 1;if(a<0)break}return 0}for(i===c.THRESHOLD_AUTO&&(i=this._luminanceData.histogram().autoThreshold()||128),t=this._luminanceData.copy(function(t){return+!(n?t>i:t<i)}),this._pathlist=[];a=function(e){for(var r=t.pointToIndex(e);r<t.size&&1!==t.data[r];)r++;return r<t.size&&t.indexToPoint(r)}(a);)!function(e){var r,i,n,a,o,s,h,u=e.pt[0].y,l=e.len;for(o=1;o<l;o++)if(r=e.pt[o].x,(i=e.pt[o].y)!==u){for(a=u<i?u:i,n=e.maxX,s=r;s<n;s++)h=t.pointToIndex(s,a),t.data[h]=+!t.data[h];u=i}}(e=function(e){var i,n=new s,a=e.x,u=e.y,l=0,f=1;for(n.sign=t.getValueAt(e.x,e.y)?"+":"-";n.pt.push(new o(a,u)),a>n.maxX&&(n.maxX=a),a<n.minX&&(n.minX=a),u>n.maxY&&(n.maxY=u),u<n.minY&&(n.minY=u),n.len++,a+=l,u+=f,n.area-=a*f,a!==e.x||u!==e.y;){var c=t.getValueAt(a+(l+f-1)/2,u+(f-l-1)/2),d=t.getValueAt(a+(l-f-1)/2,u+(f+l-1)/2);d&&!c?"right"===r._params.turnPolicy||"black"===r._params.turnPolicy&&"+"===n.sign||"white"===r._params.turnPolicy&&"-"===n.sign||"majority"===r._params.turnPolicy&&h(a,u)||"minority"===r._params.turnPolicy&&!h(a,u)?(i=l,l=-f,f=i):(i=l,l=f,f=-i):d?(i=l,l=-f,f=i):c||(i=l,l=f,f=-i)}return n}
1(a)),e.area>r._params.turdSize&&this._pathlist.push(e)},_processPath:function(){for(var t=this,e=0;e<this._pathlist.length;e++){var r=this._pathlist[e];!function(t){t.x0=t.pt[0].x,t.y0=t.pt[0].y,t.sums=[];var e,r,i,n=t.sums;for(n.push(new u(0,0,0,0,0)),e=0;e<t.len;e++)r=t.pt[e].x-t.x0,i=t.pt[e].y-t.y0,n.push(new u(n[e].x+r,n[e].y+i,n[e].xy+r*i,n[e].x2+r*r,n[e].y2+i*i))}(r),function(t){var e,r=t.len,i=t.pt,n=Array(r),a=Array(r),s=[,,,,];t.lon=Array(r);var h,u,l,c,d,p,m,b,g=[new o,new o],_=new o,v=new o,y=new o,w=0;for(u=r-1;u>=0;u--)i[u].x!=i[w].x&&i[u].y!=i[w].y&&(w=u+1),a[u]=w;for(u=r-1;u>=0;u--){for(s[0]=s[1]=s[2]=s[3]=0,e=(3+3*(i[f.mod(u+1,r)].x-i[u].x)+(i[f.mod(u+1,r)].y-i[u].y))/2,s[e]++,g[0].x=0,g[0].y=0,g[1].x=0,g[1].y=0,w=a[u],c=u;;){if(h=0,e=(3+3*f.sign(i[w].x-i[c].x)+f.sign(i[w].y-i[c].y))/2,s[e]++,s[0]&&s[1]&&s[2]&&s[3]){n[u]=c,h=1;break}if(_.x=i[w].x-i[u].x,_.y=i[w].y-i[u].y,0>f.xprod(g[0],_)||f.xprod(g[1],_)>0||(1>=Math.abs(_.x)&&1>=Math.abs(_.y)||(v.x=_.x+(_.y>=0&&(_.y>0||_.x<0)?1:-1),v.y=_.y+(_.x<=0&&(_.x<0||_.y<0)?1:-1),f.xprod(g[0],v)>=0&&(g[0].x=v.x,g[0].y=v.y),v.x=_.x+(_.y<=0&&(_.y<0||_.x<0)?1:-1),v.y=_.y+(_.x>=0&&(_.x>0||_.y<0)?1:-1),0>=f.xprod(g[1],v)&&(g[1].x=v.x,g[1].y=v.y)),w=a[c=w],!f.cyclic(w,u,c)))break}0===h&&(y.x=f.sign(i[w].x-i[c].x),y.y=f.sign(i[w].y-i[c].y),_.x=i[c].x-i[u].x,_.y=i[c].y-i[u].y,d=f.xprod(g[0],_),p=f.xprod(g[0],y),m=f.xprod(g[1],_),b=f.xprod(g[1],y),l=1e7,p<0&&(l=Math.floor(-(d/p))),b>0&&(l=Math.min(l,Math.floor(-m/b))),n[u]=f.mod(c+l,r))}for(l=n[r-1],t.lon[r-1]=l,u=r-2;u>=0;u--)f.cyclic(u+1,n[u],l)&&(l=n[u]),t.lon[u]=l;for(u=r-1;f.cyclic(f.mod(u+1,r),l,t.lon[u]);u--)t.lon[u]=l}(r),function(t){var e,r,i,n,a,o,s,h=t.len,u=Array(h+1),l=Array(h+1),c=Array(h),d=Array(h+1),p=Array(h+1),m=Array(h+1);for(e=0;e<h;e++)(s=f.mod(t.lon[f.mod(e-1,h)]-1,h))==e&&(s=f.mod(e+1,h)),s<e?c[e]=h:c[e]=s;for(e=0,r=1;e<h;e++)for(;r<=c[e];)d[r]=e,r++;for(r=0,e=0;e<h;r++)p[r]=e,e=c[e];for(p[r]=h,i=r,e=h,r=i;r>0;r--)m[r]=e,e=d[e];for(r=1,m[0]=0,u[0]=0;r<=i;r++)for(e=m[r];e<=p[r];e++){for(o=-1,n=p[r-1];n>=d[e];n--)a=function(t,e,r){var i,n,a,o,s,h,u,l,f,c,d=t.len,p=t.pt,m=t.sums,b=0;return r>=d&&(r-=d,b=1),0===b?(i=m[r+1].x-m[e].x,n=m[r+1].y-m[e].y,o=m[r+1].x2-m[e].x2,a=m[r+1].xy-m[e].xy,s=m[r+1].y2-m[e].y2,h=r+1-e):(i=m[r+1].x-m[e].x+m[d].x,n=m[r+1].y-m[e].y+m[d].y,o=m[r+1].x2-m[e].x2+m[d].x2,a=m[r+1].xy-m[e].xy+m[d].xy,s=m[r+1].y2-m[e].y2+m[d].y2,h=r+1-e+d),u=(p[e].x+p[r].x)/2-p[0].x,l=(p[e].y+p[r].y)/2-p[0].y,c=p[r].x-p[e].x,f=-(p[r].y-p[e].y),Math.sqrt(f*f*((o-2*i*u)/h+u*u)+2*f*c*((a-i*l-n*u)/h+u*l)+c*c*((s-2*n*l)/h+l*l))}(t,n,e)+u[n],(o<0||a<o)&&(l[e]=n,o=a);u[e]=o}for(t.m=i,t.po=Array(i),e=h,r=i-1;e>0;r--)e=l[e],t.po[r]=e}(r),function(t){var e,r,i,n,s,u,l,c,d,p,m,b,g,_,v,y=t.m,w=t.po,x=t.len,E=t.pt,S=t.x0,k=t.y0,M=Array(y),A=Array(y),I=Array(y),T=[,,,],R=new o;for(b=0,t.curve=new a(y);b<y;b++)g=w[f.mod(b+1,y)],g=f.mod(g-w[b],x)+w[b],M[b]=new o,A[b]=new o,function(t,e,r,i,n){for(var a,o,s,h,u,l,f,c,d,p,m,b=t.len,g=t.sums,_=0;r>=b;)r-=b,_+=1;for(;e>=b;)e-=b,_-=1;for(;r<0;)r+=b,_-=1;for(;e<0;)e+=b,_+=1;a=g[r+1].x-g[e].x+_*g[b].x,o=g[r+1].y-g[e].y+_*g[b].y,s=g[r+1].x2-g[e].x2+_*g[b].x2,h=g[r+1].xy-g[e].xy+_*g[b].xy,u=g[r+1].y2-g[e].y2+_*g[b].y2,i.x=a/(l=r+1-e+_*b),i.y=o/l,f=(s-a*a/l)/l,c=(h-a*o/l)/l,p=(f+(d=(u-o*o/l)/l)+Math.sqrt((f-d)*(f-d)+4*c*c))/2,Math.abs(f-=p)>=Math.abs(d-=p)?0!==(m=Math.sqrt(f*f+c*c))&&(n.x=-c/m,n.y=f/m):0!==(m=Math.sqrt(d*d+c*c))&&(n.x=-d/m,n.y=c/m),0===m&&(n.x=n.y=0)}(t,w[b],g,M[b],A[b]);for(b=0;b<y;b++)if(I[b]=new h,0==(m=A[b].x*A[b].x+A[b].y*A[b].y))for(g=0;g<3;g++)for(_=0;_<3;_++)I[b].data[3*g+_]=0;else for(v=0,T[0]=A[b].y,T[1]=-A[b].x,T[2]=-T[1]*M[b].y-T[0]*M[b].x;v<3;v++)for(_=0;_<3;_++)I[b].data[3*v+_]=T[v]*T[_]/m;for(b=0;b<y;b++){for(v=0,e=new h,r=new o,R.x=E[w[b]].x-S,R.y=E[w[b]].y-k,g=f.mod(b-1,y);v<3;v++)for(_=0;_<3;_++)e.data[3*v+_]=I[g].at(v,_)+I[b].at(v,_);for(;;){if(0!=(s=e.at(0,0)*e.at(1,1)-e.at(0,1)*e.at(1,0))){r.x=(-e.at(0,2)*e.at(1,1)+e.at(1,2)*e.at(0,1))/s,r.y=(e.at(0,2)*e.at(1,0)-e.at(1,2)*e.at(0,0))/s;break}for(e.at(0,0)>e.at(1,1)?(T[0]=-e.at(0,1),T[1]=e.at(0,0)):e.at(1,1)?(T[0]=-e.at(1,1),T[1]=e.at(1,0)):(T[0]=1,T[1]=0),m=T[0]*T[0]+T[1]*T[1],T[2]=-T[1]*R.y-T[0]*R.x,v=0;v<3;v++)for(_=0;_<3;_++)e.data[3*v+_]+=T[v]*T[_]/m}if(i=Math.abs(r.x-R.x),n=Math.abs(r.y-R.y),i<=.5&&n<=.5){t.curve.vertex[b]=new o(r.x+S,r.y+k);continue}if(u=f.quadform(e,R),c=R.x,d=R.y,0!==e.at(0,0))for(p=0;p<2;p++)r.y=R.y-.5+p,r.x=-(e.at(0,1)*r.y+e.at(0,2))/e.at(0,0),i=Math.abs(r.x-R.x),l=f.quadform(e,r),i<=.5&&l<u&&(u=l,c=r.x,d=r.y);if(0!==e.at(1,1))for(p=0;p<2;p++)r.x=R.x-.5+p,r.y=-(e.at(1,0)*r.x+e.at(1,2))/e.at(1,1),n=Math.abs(r.y-R.y),l=f.quadform(e,r),n<=.5&&l<u&&(u=l,c=r.x,d=r.y);for(v=0;v<2;v++)for(_=0;_<2;_++)r.x=R.x-.5+v,r.y=R.y-.5+_,(l=f.quadform(e,r))<u&&(u=l,c=r.x,d=r.y);t.curve.vertex[b]=new o(c+S,d+k)}}(r),"-"===r.sign&&function(t){var e,r,i,n=t.curve,a=n.n,o=n.vertex;for(e=0,r=a-1;e<r;e++,r--)i=o[e],o[e]=o[r],o[r]=i}(r),function(e){var r,i,n,a,o,s,h,u,l,c=e.curve.n,d=e.curve;for(r=0;r<c;r++)i=f.mod(r+1,c),n=f.mod(r+2,c),l=f.interval(.5,d.vertex[n],d.vertex[i]),s=0!==(o=f.dden
1om(d.vertex[r],d.vertex[n]))?((a=Math.abs(a=f.dpara(d.vertex[r],d.vertex[i],d.vertex[n])/o))>1?1-1/a:0)/.75:4/3,d.alpha0[i]=s,s>=t._params.alphaMax?(d.tag[i]="CORNER",d.c[3*i+1]=d.vertex[i]):(s<.55?s=.55:s>1&&(s=1),h=f.interval(.5+.5*s,d.vertex[r],d.vertex[i]),u=f.interval(.5+.5*s,d.vertex[n],d.vertex[i]),d.tag[i]="CURVE",d.c[3*i+0]=h,d.c[3*i+1]=u),d.c[3*i+2]=l,d.alpha[i]=s,d.beta[i]=.5;d.alphaCurve=1}(r),t._params.optCurve&&function(e){var r,i,n,o,s,h,u,c,d,p,m=e.curve,b=m.n,g=m.vertex,_=Array(b+1),v=Array(b+1),y=Array(b+1),w=Array(b+1),x=new l,E=Array(b),S=Array(b+1);for(i=0;i<b;i++)"CURVE"==m.tag[i]?E[i]=f.sign(f.dpara(g[f.mod(i-1,b)],g[i],g[f.mod(i+1,b)])):E[i]=0;for(i=0,h=0,S[0]=0,o=m.vertex[0];i<b;i++)s=f.mod(i+1,b),"CURVE"==m.tag[s]&&(h+=.3*(u=m.alpha[s])*(4-u)*f.dpara(m.c[3*i+2],g[s],m.c[3*s+2])/2+f.dpara(o,m.c[3*i+2],m.c[3*s+2])/2),S[i+1]=h;for(n=1,_[0]=-1,v[0]=0,y[0]=0;n<=b;n++)for(_[n]=n-1,v[n]=v[n-1],y[n]=y[n-1]+1,i=n-2;i>=0&&!function(t,e,r,i,n,a,o){var s,h,u,l,c,d,p,m,b,g,_,v,y,w,x,E,S,k,M,A,I,T=t.curve.n,R=t.curve,P=R.vertex;if(e==r||(s=e,c=f.mod(e+1,T),0===(l=a[h=f.mod(s+1,T)])))return 1;for(m=f.ddist(P[e],P[c]),s=h;s!=r;s=h)if(h=f.mod(s+1,T),u=f.mod(s+2,T),a[h]!=l||f.sign(f.cprod(P[e],P[c],P[h],P[u]))!=l||f.iprod1(P[e],P[c],P[h],P[u])<-(m*f.ddist(P[h],P[u])*.999847695156))return 1;if(_=R.c[3*f.mod(e,T)+2].copy(),v=P[f.mod(e+1,T)].copy(),y=P[f.mod(r,T)].copy(),w=R.c[3*f.mod(r,T)+2].copy(),d=o[r]-o[e]-f.dpara(P[0],R.c[3*e+2],R.c[3*r+2])/2,e>=r&&(d+=o[T]),S=f.dpara(_,v,y),k=f.dpara(_,v,w),M=f.dpara(_,y,w),k==S||(I=M/(M-(S+M-k)),A=k/(k-S),0==(E=k*I/2)))return 1;for(p=2-Math.sqrt(4-d/E/.3),i.c[0]=f.interval(I*p,_,v),i.c[1]=f.interval(A*p,w,y),i.alpha=p,i.t=I,i.s=A,v=i.c[0].copy(),y=i.c[1].copy(),i.pen=0,s=f.mod(e+1,T);s!=r;s=h){if(h=f.mod(s+1,T),(I=f.tangent(_,v,y,w,P[s],P[h]))<-.5||(x=f.bezier(I,_,v,y,w),0===(m=f.ddist(P[s],P[h]))||Math.abs(b=f.dpara(P[s],P[h],x)/m)>n||0>f.iprod(P[s],P[h],x)||0>f.iprod(P[h],P[s],x)))return 1;i.pen+=b*b}for(s=e;s!=r;s=h){if(h=f.mod(s+1,T),(I=f.tangent(_,v,y,w,R.c[3*s+2],R.c[3*h+2]))<-.5||(x=f.bezier(I,_,v,y,w),0===(m=f.ddist(R.c[3*s+2],R.c[3*h+2])))||(b=f.dpara(R.c[3*s+2],R.c[3*h+2],x)/m,(g=f.dpara(R.c[3*s+2],R.c[3*h+2],P[h])/m*(.75*R.alpha[h]))<0&&(b=-b,g=-g),b<g-n))return 1;b<g&&(i.pen+=(b-g)*(b-g))}return 0}(e,i,f.mod(n,b),x,t._params.optTolerance,E,S);i--)(y[n]>y[i]+1||y[n]==y[i]+1&&v[n]>v[i]+x.pen)&&(_[n]=i,v[n]=v[i]+x.pen,y[n]=y[i]+1,w[n]=x,x=new l);for(c=new a(r=y[b]),d=Array(r),p=Array(r),n=b,i=r-1;i>=0;i--)_[n]==n-1?(c.tag[i]=m.tag[f.mod(n,b)],c.c[3*i+0]=m.c[3*f.mod(n,b)+0],c.c[3*i+1]=m.c[3*f.mod(n,b)+1],c.c[3*i+2]=m.c[3*f.mod(n,b)+2],c.vertex[i]=m.vertex[f.mod(n,b)],c.alpha[i]=m.alpha[f.mod(n,b)],c.alpha0[i]=m.alpha0[f.mod(n,b)],c.beta[i]=m.beta[f.mod(n,b)],d[i]=p[i]=1):(c.tag[i]="CURVE",c.c[3*i+0]=w[n].c[0],c.c[3*i+1]=w[n].c[1],c.c[3*i+2]=m.c[3*f.mod(n,b)+2],c.vertex[i]=f.interval(w[n].s,m.c[3*f.mod(n,b)+2],g[f.mod(n,b)]),c.alpha[i]=w[n].alpha,c.alpha0[i]=w[n].alpha,d[i]=w[n].s,p[i]=w[n].t),n=_[n];for(i=0;i<r;i++)s=f.mod(i+1,r),c.beta[i]=d[i]/(d[i]+p[s]);c.alphaCurve=1,e.curve=c}(r)}},_validateParameters:function(t){if(t&&t.turnPolicy&&-1===d.indexOf(t.turnPolicy))throw Error("Bad turnPolicy value. Allowed values are: '"+d.join("', '")+"'");if(t&&null!=t.threshold&&t.threshold!==c.THRESHOLD_AUTO&&("number"!=typeof t.threshold||!f.between(t.threshold,0,255)))throw Error("Bad threshold value. Expected to be an integer in range 0..255");if(t&&null!=t.optCurve&&"boolean"!=typeof t.optCurve)throw Error("'optCurve' must be Boolean")},_processLoadedImage:function(t){var e=new n(t.bitmap.width,t.bitmap.height),r=t.bitmap.data;t.scan(0,0,t.bitmap.width,t.bitmap.height,function(t,i,n){var a=r[n+3]/255,o=255+(r[n+0]-255)*a,s=255+(r[n+1]-255)*a,h=255+(r[n+2]-255)*a;e.data[n/4]=f.luminance(o,s,h)}),this._luminanceData=e,this._imageLoaded=!0},loadImage:function(t,e){var r=this,n={};this._imageLoadingIdentifier=n,this._imageLoaded=!1,t instanceof i?(this._imageLoadingIdentifier=null,this._imageLoaded=!0,r._processLoadedImage(t),e.call(r,null)):i.read(t,function(t,i){if(r._imageLoadingIdentifier!==n){var a=t||Error("Another image was loaded instead");return e.call(r,a)}r._imageLoadingIdentifier=null,r._processLoadedImage(i),e.call(r,null)})},setParameters:function(t){var e,r;
1for(e in this._validateParameters(t),this._params)this._params.hasOwnProperty(e)&&t.hasOwnProperty(e)&&(r=this._params[e],this._params[e]=t[e],r!==this._params[e]&&-1===["color","background"].indexOf(e)&&(this._processed=!1))},getPathTag:function(t,e){if(t=0==arguments.length?this._params.color:t,t===c.COLOR_AUTO&&(t=this._params.blackOnWhite?"black":"white"),!this._imageLoaded)throw Error("Image should be loaded first");this._processed||(this._bmToPathlist(),this._processPath(),this._processed=!0);var r='<path d="';return r+=this._pathlist.map(function(t){return f.renderCurve(t.curve,e)}).join(" "),r+='" stroke="none" fill="'+t+'" fill-rule="evenodd"/>'},getSymbol:function(t){return'<symbol viewBox="0 0 '+this._luminanceData.width+" "+this._luminanceData.height+'" id="'+t+'">'+this.getPathTag("")+"</symbol>"},getSVG:function(){var t=this._params.width||this._luminanceData.width,e=this._params.height||this._luminanceData.height,r={x:this._params.width?this._params.width/this._luminanceData.width:1,y:this._params.height?this._params.height/this._luminanceData.height:1};return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+e+'" viewBox="0 0 '+t+" "+e+'" version="1.1">\n'+(this._params.background!==c.COLOR_TRANSPARENT?' <rect x="0" y="0" width="100%" height="100%" fill="'+this._params.background+'" />\n':"")+" "+this.getPathTag(this._params.color,r)+"\n</svg>"}},t.exports=c},81944:(t,e,r)=>{"use strict";var i=r(68086),n=r(89609);t.exports={trace:function(t,e,r){2==arguments.length&&(r=e,e={});var n=new i(e);n.loadImage(t,function(t){if(t)return r(t);r(null,n.getSVG(),n)})},posterize:function(t,e,r){2==arguments.length&&(r=e,e={});var i=new n(e);i.loadImage(t,function(t){if(t)return r(t);r(null,i.getSVG(),i)})},Potrace:i,Posterizer:n}},89045:(t,e,r)=>{"use strict";var i=r(16036),n={};function a(t){return t.toFixed(3).replace(".000","")}function o(t){return t>0?1:t<0?-1:0}function s(t,e){var r=new i;return r.y=o(e.x-t.x),r.x=-o(e.y-t.y),r}function h(t,e,r,i){var n,a,o;return n=e.x-t.x,a=e.y-t.y,o=i.x-r.x,n*(i.y-r.y)-o*a}t.exports={luminance:function(t,e,r){return Math.round(.2126*t+.7153*e+.0721*r)},between:function(t,e,r){return t>=e&&t<=r},clamp:function(t,e,r){return Math.min(r,Math.max(e,t))},isNumber:function(t){return"number"==typeof t},setHtmlAttr:function(t,e,r){var i=" "+e+'="'+r+'"';return t=-1===t.indexOf(" "+e+'="')?t.replace(/<[a-z]+/i,function(t){return t+i}):t.replace((n[e]||(n[e]=RegExp(" "+e+'="((?:\\\\(?=")"|[^"])+)"',"i")),n[e]),i)},renderCurve:function(t,e){e=e||{x:1,y:1};var r=t.c[(t.n-1)*3+2],i=["M "+a(r.x*e.x)+" "+a(r.y*e.y)];return t.tag.forEach(function(r,n){var o=3*n,s=t.c[o],h=t.c[o+1],u=t.c[o+2];"CURVE"===r?i.push("C "+a(s.x*e.x)+" "+a(s.y*e.y)+", "+a(h.x*e.x)+" "+a(h.y*e.y)+", "+a(u.x*e.x)+" "+a(u.y*e.y)):"CORNER"===r&&i.push("L "+a(h.x*e.x)+" "+a(h.y*e.y)+" "+a(u.x*e.x)+" "+a(u.y*e.y))}),i.join(" ")},bezier:function(t,e,r,n,a){var o=1-t,s=new i;return s.x=o*o*o*e.x+o*o*t*3*r.x+t*t*o*3*n.x+t*t*t*a.x,s.y=o*o*o*e.y+o*o*t*3*r.y+t*t*o*3*n.y+t*t*t*a.y,s},tangent:function(t,e,r,i,n,a){var o,s,u,l,f,c,d,p;return(u=(o=h(t,e,n,a))-2*(s=h(e,r,n,a))+h(r,i,n,a),f=(l=-2*o+2*s)*l-4*u*o,0===u||f<0)?-1:(d=(-l+(c=Math.sqrt(f)))/(2*u),p=(-l-c)/(2*u),d>=0&&d<=1)?d:p>=0&&p<=1?p:-1},mod:function(t,e){return t>=e?t%e:t>=0?t:e-1-(-1-t)%e},xprod:function(t,e){return t.x*e.y-t.y*e.x},cyclic:function(t,e,r){return t<=r?t<=e&&e<r:t<=e||e<r},sign:o,quadform:function(t,e){var r,i,n,a=[,,,];for(r=0,a[0]=e.x,a[1]=e.y,a[2]=1,n=0;r<3;r++)for(i=0;i<3;i++)n+=a[r]*t.at(r,i)*a[i];return n},interval:function(t,e,r){var n=new i;return n.x=e.x+t*(r.x-e.x),n.y=e.y+t*(r.y-e.y),n},dorth_infty:s,ddenom:function(t,e){var r=s(t,e);return r.y*(e.x-t.x)-r.x*(e.y-t.y)},dpara:function(t,e,r){var i,n,a;return i=e.x-t.x,n=e.y-t.y,a=r.x-t.x,i*(r.y-t.y)-a*n},cprod:h,iprod:function(t,e,r){var i,n;return i=e.x-t.x,n=e.y-t.y,i*(r.x-t.x)+n*(r.y-t.y)},iprod1:function(t,e,r,i){var n,a;return n=e.x-t.x,a=e.y-t.y,n*(i.x-r.x)+a*(i.y-r.y)},ddist:function(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}}},89609:(t,e,r)=>{"use strict";var i=r(68086),n=r(89045);function a(t){this._potrace=new i,this._calculatedThreshold=null,this._params={threshold:i.THRESHOLD_AUTO,blackOnWhite:!0,steps:a.STEPS_AUTO,background:i.COLOR_TRANSPARENT,fillStrategy:a.FILL_DOMINANT,rangeDistribution:a.RANGES_AUTO},t&&this.setParameters(t)}for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&o===o.toUpperCase()&&(a[o]=i[o]);a.STEPS_AUTO=-1,a.FILL_SPREAD="spread",a.FILL_DOMINANT="dominant",a.FILL_MEDIAN="median",a.FILL_MEAN="mean",a.RANGES_AUTO="auto",a.RANGES_EQUAL="equal",a.prototype={_addExtraColorStop:function(t){var e=this._params.blackOnWhite,r=t[t.length-1],i=e?0:r.value,n=e?r.value:255;if(n-i>25&&1!==r.colorIntensity){var a=this._getImageHistogram(),o=a.getStats(i,n).levels,s=o.mean+o.stdDev<=25?o.mean+o.stdDev:o.mean-o.stdDev<=25?o.mean-o.stdDev:25,h=(e?a.getStats(0,s):a.getStats(s,255)).levels.mean;t.push({value:Math.abs(255*!e-s),colorIntensity:isNaN(h)?0:(e?255-h:h)/255})}return t},_calcColorIntensity:function(t){var e=this._params.blackOnWhite,r=this._params.fillStrategy,i=r!==a.FILL_SPREAD?this._getImageHistogram():null,o=Math.abs(this._paramThreshold()-255*!e);return t.map(function(s,h){var u=h+1===t.length?e?-1:256:t[h+1],l=Math.round(e?u+1:s),f=Math.round(e?s:u-1),c=h/(t.length-1),d=f-l,p=i.getStats(l,f),m=-1;if(0===p.pixels)return{value:s,colorIntensity:0};switch(r){case a.FILL_SPREAD:m=(e?l:f)+(e?1:-1)*d*Math.max(.5,o/255)*c;break;case a.FILL_DOMINANT:m=i.getDominantColor(l,f,n.clamp(d,1,5));break;case a.FILL_MEAN:m=p.levels.mean;break;case a.FILL_MEDIAN:m=p.levels.median}return 0!==h&&(m=e?n.clamp(m,l,f-Math.round(.1*d)):n.clamp(m,l+Math.round(.1*d),f)),{value:s,colorIntensity:-1===m?0:(e?255-m:m)/255}})},_getImageHistogram:function(){return this._potrace._luminanceData.histogram()},_getRanges:function(){var t=this._paramSteps();if(!Array.isArray(t))return this._params.rangeDistribution===a.RANGES_AUTO?this._getRangesAuto():this._getRangesEquallyDistributed();var e=[],r=this._paramThreshold(),i=this._params.blackOnWhite;return t.forEach(function(t){-1===e.indexOf(t)&&n.between(t,0,255)&&e.push(t)}),e.length||e.push(r),e=e.sort(function(t,e){return t<e===i?1:-1}),i&&e[0]<r?e.unshift(r):!i&&e[e.length-1]<r&&e.push(r),this._calcColorIntensity(e)},_getRangesAuto:function(){var t,e=this._getImageHistogram(),r=this._paramSteps(!0);if(this._params.threshold===i.THRESHOLD_AUTO)t=e.multilevelThresholding(r);else{var n=this._paramThreshold();t=this._params.blackOnWhite?e.multilevelThresholding(r-1,0,n):e.multilevelThresholding(r-1,n,255),this._params.blackOnWhite?t.push(n):t.unshift(n)}return this._params.blackOnWhite&&(t=t.reverse()),this._calcColorIntensity(t)},_getRangesEquallyDistributed:function(){for(var t,e=this._params.blackOnWhite,r=e?this._paramThreshold():255-this._paramThreshold(),i=this._paramSteps(),n=r/i,a=[],o=i-1;o>=0;)t=Math.min(r,(o+1)*n),t=e?t:255-t,o--,a.push(t);return this._calcColorIntensity(a)},_paramSteps:function(t){var e=this._params.steps;if(Array.isArray(e))return t?e.length:e;if(e===a.STEPS_AUTO&&this._params.threshold===i.THRESHOLD_AUTO)return 4;var r=this._params.blackOnWhite?this._paramThreshold():255-this._paramThreshold();return e===a.STEPS_AUTO?r>200?4:3:Math.min(r,Math.max(2,e))},_paramThreshold:function(){if(null!==this._calculatedThreshold)return this._calculatedThreshold;if(this._params.threshold!==i.THRESHOLD_AUTO)return this._calculatedThreshold=this._params.threshold,this._calculatedThreshold;var t=this._getImageHistogram().multilevelThresholding(2);return this._calculatedThreshold=this._params.blackOnWhite?t[1]:t[0],this._calculatedThreshold=this._calculatedThreshold||128,this._calculatedThreshold},_pathTags:function(t){var e=this._getRanges(),r=this._potrace,i=this._params.blackOnWhite;e.length>=10&&(e=this._addExtraColorStop(e)),r.setParameters({blackOnWhite:i});var a=0;return e.map(function(e){var i=e.colorIntensity;if(0===i)return"";var o=a&&1!==i?(a-i)/(a-1):i;o=n.clamp(parseFloat(o.toFixed(3)),0,1),a+=(1-a)*o,r.setParameters({threshold:e.value});var s=t?r.getPathTag(""):r.getPathTag();return s=n.setHtmlAttr(s,"fill-opacity",o.toFixed(3)),0===o||-1!==s.indexOf(' d=""')?"":s})},loadImage:function(t,e){var r=this;this._potrace.loadImage(t,function(t){r._calculatedThreshold=null,e.call(r,t)})},setParameters:function(t){if(t){if(this._potrace.setParameters(t),t.steps&&!Array.isArray(t.steps)&&(!n.isNumber(t.steps)||!n.between(t.steps,1,255)))throw Error("Bad 'steps' value");for(var e in this._params)this._params.hasOwnProperty(e)&&t.hasOwnProperty(e)&&(this._params[e]=t[e]);this._calculatedThreshold=null}},getSymbol:function(t){return'<symbol viewBox="0 0 '+this._potrace._luminanceData.width+" "+this._potrace._luminanceData.height+'" id="'+t+'">'+this._pathTags(!0).join("")+"</symbol>"},getSVG:function(){var t=this._potrace._luminanceData.width,e=this._potrace._luminanceData.height,r=this._pathTags(!1);return('<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+e+'" viewBox="0 0 '+t+" "+e+'" version="1.1">\n '+(this._params.background!==i.COLOR_TRANSPARENT?'<rect x="0" y="0" width="100%" height="100%" fill="'+this._params.background+'" />\n ':"")+r.join("\n ")+"\n</svg>").replace(/\n(?:\t*\n)+(\t*)/g,"\n$1")}},t.exports=a},94937:t=>{"use strict";function e(){this.data=[0,0,0,0,0,0,0,0,0]}e.prototype.at=function(t,e){return this.data[3*t+e]},t.exports=e},95202:(t,e,r)=>{"use strict";var i=r(16036);t.exports=function(){this.pen=0,this.c=[new i,new i],this.t=0,this.s=0,this.alpha=0}},96865:t=>{"use strict";
1t.exports=function(){this.area=0,this.len=0,this.curve={},this.pt=[],this.minX=1e5,this.minY=1e5,this.maxX=-1,this.maxY=-1}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.