This repository was archived by the owner on Feb 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvibrant.min.js
25 lines (25 loc) · 125 KB
/
vibrant.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=151)}([function(t,e,n){var r=n(33),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){function r(t,e){var n=i(t,e);return o(n)?n:void 0}var o=n(66),i=n(90);t.exports=r},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function r(t,e,n,r){var s=!n;n||(n={});for(var a=e.length;++-1<a;){var u=e[-1],c=r?r(n[u],t[u],u,n,t):void 0;void 0===c&&(c=t[u]),s?i(n,u,c):o(n,u,c)}return n}var o=n(28),i=n(29);t.exports=r},function(t,e,n){function r(t){var e=null==t?0:t.length;for(this.clear();++-1<e;){var n=t[-1];this.set(n[0],n[1])}}var o=n(102),i=n(103),s=n(104),a=n(105),u=n(106);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=s,r.prototype.has=a,r.prototype.set=u,t.exports=r},function(t,e,n){function r(t,e){for(var n=t.length;n--;)if(o(t[n][0],e))return n;return-1}var o=n(9);t.exports=r},function(t,e,n){function r(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):s(t)}var o=n(15),i=n(88),s=n(116),a=o?o.toStringTag:void 0;t.exports=r},function(t,e,n){function r(t,e){var n=t.__data__;return o(e)?n["string"==typeof e?"string":"hash"]:n.map}var o=n(100);t.exports=r},function(t,e,n){var r=n(1),o=r(Object,"create");t.exports=o},function(t,e){function n(t,e){return t===e||t!==t&&e!==e}t.exports=n},function(t,e,n){"use strict";function r(){var t,e,n=new v(function(n,r){t=n,e=r});return{resolve:t,reject:e,promise:n}}function o(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return null===e?null:[e[1],e[2],e[3]].map(function(t){return parseInt(t,16)})}function i(t,e,n){return"#"+((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1,7)}function s(t,e,n){t/=255,e/=255,n/=255;var r,o,i=Math.max(t,e,n),s=Math.min(t,e,n),a=(i+s)/2;if(i===s)r=o=0;else{var u=i-s;switch(o=a>.5?u/(2-i-s):u/(i+s),i){case t:r=(e-n)/u+(e<n?6:0);break;case e:r=(n-t)/u+2;break;case n:r=(t-e)/u+4}r/=6}return[r,o,a]}function a(t,e,n){function r(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var o,i,s;if(0===e)o=i=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,u=2*n-a;o=r(u,a,t+1/3),i=r(u,a,t),s=r(u,a,t-1/3)}return[255*o,255*i,255*s]}function u(t,e,n){return t/=255,e/=255,n/=255,t=t>.04045?Math.pow((t+.005)/1.055,2.4):t/12.92,e=e>.04045?Math.pow((e+.005)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.005)/1.055,2.4):n/12.92,t*=100,e*=100,n*=100,[.4124*t+.3576*e+.1805*n,.2126*t+.7152*e+.0722*n,.0193*t+.1192*e+.9505*n]}function c(t,e,n){return t/=95.047,e/=100,n/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*e-16,500*(t-e),200*(e-n)]}function l(t,e,n){var r=u(t,e,n);return c(r[0],r[1],r[2])}function f(t,e){var n=t[0],r=t[1],o=t[2],i=e[0],s=e[1],a=e[2],u=n-i,c=r-s,l=o-a,f=Math.sqrt(r*r+o*o),h=Math.sqrt(s*s+a*a),p=i-n,_=h-f,d=Math.sqrt(u*u+c*c+l*l),v=Math.sqrt(d)>Math.sqrt(Math.abs(p))+Math.sqrt(Math.abs(_))?Math.sqrt(d*d-p*p-_*_):0,y=1+.045*f,m=1+.015*f;return p/=1,_/=1*y,v/=1*m,Math.sqrt(p*p+_*_+v*v)}function h(t,e){return f(l.apply(void 0,t),l.apply(void 0,e))}function p(t,e){return h(o(t),o(e))}function _(t){return t<e.DELTAE94_DIFF_STATUS.NA?"N/A":t<=e.DELTAE94_DIFF_STATUS.PERFECT?"Perfect":t<=e.DELTAE94_DIFF_STATUS.CLOSE?"Close":t<=e.DELTAE94_DIFF_STATUS.GOOD?"Good":t<e.DELTAE94_DIFF_STATUS.SIMILAR?"Similar":"Wrong"}function d(t,n,r){return(t<<2*e.SIGBITS)+(n<<e.SIGBITS)+r}Object.defineProperty(e,"__esModule",{value:!0});var v=n(13);e.DELTAE94_DIFF_STATUS={NA:0,PERFECT:1,CLOSE:2,GOOD:10,SIMILAR:50},e.SIGBITS=5,e.RSHIFT=8-e.SIGBITS,e.defer=r,e.hexToRgb=o,e.rgbToHex=i,e.rgbToHsl=s,e.hslToRgb=a,e.rgbToXyz=u,e.xyzToCIELab=c,e.rgbToCIELab=l,e.deltaE94=f,e.rgbDiff=h,e.hexDiff=p,e.getColorDiffStatus=_,e.getColorIndex=d},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(e,n,r){/* @preserve
* The MIT License (MIT)
*
* Copyright (c) 2013-2015 Petka Antonov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
!function(e){t.exports=e()}(function(){var t,o,i;return function t(e,n,r){function o(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof _dereq_&&_dereq_;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof _dereq_&&_dereq_;0<r.length;0++)o(r[0]);return o}({1:[function(t,e,n){"use strict";e.exports=function(t){function e(t){var e=new n(t),r=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),r}var n=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,n,r){"use strict";function o(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new l(16),this._normalQueue=new l(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=c}function i(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function s(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function a(t){this._normalQueue._pushOne(t),this._queueTick()}var u;try{throw new Error}catch(t){u=t}var c=t("./schedule"),l=t("./queue"),f=t("./util");o.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},o.prototype.hasCustomScheduler=function(){return this._customScheduler},o.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},o.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},o.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},o.prototype.fatalError=function(t,n){n?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},o.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},f.hasDevTools?(o.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},o.prototype.invoke=function(t,e,n){this._trampolineEnabled?s.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},o.prototype.settlePromises=function(t){this._trampolineEnabled?a.call(this,t):this._schedule(function(){t._settlePromises()})}):(o.prototype.invokeLater=i,o.prototype.invoke=s,o.prototype.settlePromises=a),o.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},o.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},o.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},o.prototype._reset=function(){this._isTickUsed=!1},n.exports=o,n.exports.firstLineError=u},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var o=function(t,e){this._reject(e)},i=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},a=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){!1=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction();var u=n(o),c=new t(e);c._propagateFrom(this,1);var l=this._target();if(c._setBoundTo(u),u instanceof t){var f={promiseRejectionQueued:!1,promise:c,target:l,bindingPromise:u};l._then(e,i,void 0,c,f),u._then(s,a,void 0,c,f),c._setOnCancel(u)}else c._resolveCallback(l);return c},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=this._bitField&-2097153},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===i&&(Promise=o)}catch(t){}return i}var o;"undefined"!=typeof Promise&&(o=Promise);var i=t("./promise")();i.noConflict=r,e.exports=i},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var o=r(null),i=r(null);o[" size"]=i[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var o="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(o)}return r}function r(t){return n(t,this.pop()).apply(t,this)}function o(t){return t[this]}function i(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),u=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=i;else if(u){var r=s(t);e=null!==r?r:o}else e=o;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,o){var i=t("./util"),s=i.tryCatch,a=i.errorObj,u=e._async;e.prototype.break=e.prototype.cancel=function(){if(!o.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(i.isArray(t))for(;0<t.length;++0)this._doInvokeOnCancel(t[0],e);else if(void 0!==t)if("function"==typeof t){if(!e){var n=s(t).call(this._boundValue());n===a&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,a){return function(u){var c=a._boundValue();t:for(;0<t.length;++0){var l=t[0];if(l===Error||null!=l&&l.prototype instanceof Error){if(u instanceof l)return i(n).call(c,u)}else if("function"==typeof l){var f=i(l).call(c,u);if(f===s)return f;if(f)return i(n).call(c,u)}else if(r.isObject(u)){for(var h=o(l);0<h.length;++0){var p=h[0];if(l[p]!=u[p])continue t}return i(n).call(c,u)}}return e}}var r=t("./util"),o=t("./es5").keys,i=r.tryCatch,s=r.errorObj;return n}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){}function r(){var t=o.length-1;if(t>=0)return o[t]}var o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,i=t._peekContext,s=t.prototype._peekContext,a=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=i,t.prototype._peekContext=s,t.prototype._promiseCreated=a,!1=!1},!1=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,n,r){"use strict";n.exports=function(n,r){function o(t,e){return{promise:e}}function i(){return!1}function s(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+U.toString(t));r._attachCancellationCallback(t)})}catch(t){return t}}function a(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?U.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(){var t=this._boundTo;return void 0!==t&&t instanceof n?t.isFulfilled()?t.value():void 0:t}function _(){this._trace=new P(this._peekContext())}function d(t,e){if(N(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=C(t);U.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),U.notEnumerableProp(t,"__stackCleaned__",!0)}}}function v(t,e,n,r,o){if(void 0===t&&null!==e&&z){if(void 0!==o&&o._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");if(e._trace){var i=e._trace.stack.split("\n"),s=j(i);for(s.length-1;!0;--0){var a=s[0];if(!/\((?:timers\.js):\d+:\d+\)/.test(a)){var u=a.match(/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/);u&&(""="at "+u[1]+":"+u[2]+":"+u[3]+" ");break}}if(s.length>0)for(var c=s[0];0<i.length&&i[0]!==c;++0);}var l="a promise was created in a "+n+"handler but was not returned from it, see http://goo.gl/rRqMUw";r._warn(l,!0,e)}}function y(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),m(n)}function m(t,e,r){if(J.warnings){var o,i=new V(t);if(e)r._attachExtraTrace(i);else if(J.longStackTraces&&(o=n._peekContext()))o.attachExtraTrace(i);else{var s=C(i);i.stack=s.message+"\n"+s.stack.join("\n")}X("warning",i)||E(i,"",!0)}}function g(t,e){for(;0<e.length-1;++0)e[0].push("From previous event:"),e[0]=e[0].join("\n");return 0<e.length&&(e[0]=e[0].join("\n")),t+"\n"+e.join("\n")}function b(t){for(;0<t.length;++0)(0===t[0].length||1<t.length&&t[0][0]===t[1][0])&&(t.splice(0,1),0--)}function w(t){for(var e=t[0];1<t.length;++1){var n=t[1],r=e.length-1;e[r],n.length-1;e=n}}function j(t){for(var e=[];0<t.length;++0){var n=t[0],r=" (No stack trace)"===n||null.test(n),o=r&&Y(n);r&&!o&&e.push(n)}return e}function x(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n");0<e.length;++0){var n=e[0];if(" (No stack trace)"===n||null.test(n))break}return e}function C(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?x(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:j(e)}}function E(t,e,n){if("undefined"!=typeof console){var r;if(U.isObject(t)){r=e+null(t.stack,t)}else r=e+String(t);"function"==typeof D?D(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function k(t,e,n,r){try{"function"==typeof e&&(!1=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){L.throwLater(t)}"unhandledRejection"===t?X(t,n,r)||E(n,"Unhandled rejection "):X(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():U.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+T(e)+">, no stack trace)"}function T(t){return t.length<41?t:t.substr(0,38)+"..."}function O(){return"function"==typeof Z}function S(t){var e=t.match(/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function A(t,e){if(O()){for(var n=t.stack.split("\n"),r=e.stack.split("\n");0<n.length;++0){var o=S(n[0]);if(o){o.fileName,-1=o.line;break}}for(;0<r.length;++0){var o=S(r[0]);if(o){o.fileName,-1=o.line;break}}}}function P(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);Z(this,P),e>32&&this.uncycle()}var R,I,D,M=n._getDomain,L=n._async,V=t("./errors").Warning,U=t("./util"),N=U.canAttachTrace,H=!(0==U.env("BLUEBIRD_DEBUG")),q=!(0==U.env("BLUEBIRD_WARNINGS")||!H&&!U.env("BLUEBIRD_WARNINGS")),B=!(0==U.env("BLUEBIRD_LONG_STACK_TRACES")||!H&&!U.env("BLUEBIRD_LONG_STACK_TRACES")),z=0!=U.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(q||!!U.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=t._bitField&-1048577|524288},n.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),L.invokeLater(this._notifyUnhandledRejection,this,void 0))},n.prototype._notifyUnhandledRejectionIsHandled=function(){k("rejectionHandled",R,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),k("unhandledRejection",I,t,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(t,e,n){return m(t,e,n||this)},n.onPossiblyUnhandledRejection=function(t){var e=M();I="function"==typeof t?null===e?t:U.domainBind(e,t):void 0},n.onUnhandledRejectionHandled=function(t){var e=M();R="function"==typeof t?null===e?t:U.domainBind(e,t):void 0};var $=function(){};n.longStackTraces=function(){if(L.haveItemsQueued()&&!J.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!J.longStackTraces&&O()){var t=n.prototype._captureStackTrace,e=n.prototype._attachExtraTrace;J.longStackTraces=!0,$=function(){if(L.haveItemsQueued()&&!J.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=t,n.prototype._attachExtraTrace=e,r.deactivateLongStackTraces(),L.enableTrampoline(),J.longStackTraces=!1},n.prototype._captureStackTrace=_,n.prototype._attachExtraTrace=d,r.activateLongStackTraces(),L.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return J.longStackTraces&&O()};var Q=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return U.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!U.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return U.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!U.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),U.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!U.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),G=function(){return U.isNode?function(){return e.emit.apply(e,arguments)}:U.global?function(t){var e="on"+t.toLowerCase(),n=U.global[e];return!!n&&(n.apply(U.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),W={promiseCreated:o,promiseFulfilled:o,promiseRejected:o,promiseResolved:o,promiseCancelled:o,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:o},X=function(t){try{!1=G.apply(null,arguments)}catch(t){L.throwLater(t),!1=!0}try{!1=Q(t,W[t].apply(null,arguments))}catch(t){L.throwLater(t),!1=!0}return!1};n.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?n.longStackTraces():!t.longStackTraces&&n.hasLongStackTraces()&&$()),"warnings"in t){var e=t.warnings;J.warnings=!!e,z=J.warnings,U.isObject(e)&&"wForgottenReturn"in e&&(z=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!J.cancellation){if(L.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=l,n.prototype._propagateFrom=f,n.prototype._onCancel=u,n.prototype._setOnCancel=c,n.prototype._attachCancellationCallback=a,n.prototype._execute=s,K=f,J.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!J.monitoring?(J.monitoring=!0,n.prototype._fireEvent=X):!t.monitoring&&J.monitoring&&(J.monitoring=!1,n.prototype._fireEvent=i)),n},n.prototype._fireEvent=i,n.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(t){},n.prototype._attachCancellationCallback=function(t){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(t,e){};var K=h,Y=function(){return!1};U.inherits(P,Error),r.CapturedTrace=P,P.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],n={},r=this;void 0!==r;++0)e.push(r),r=r._parent;t=this._length=0;for(;!0;--0){var o=e[0].stack;void 0===n[o]&&(n[o]=0)}for(;0<t;++0){var i=e[0].stack,s=n[i];if(void 0!==s&&0!==s){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[0]._parent=void 0,e[0]._length=1;var a=this;s<t-1?(a._parent=e[s+1],a._parent.uncycle(),a._length=a._parent._length+1):(a._parent=void 0,a._length=1);a._length+1;return}}}},P.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=C(t),n=e.message,r=[e.stack],o=this;void 0!==o;)r.push(j(o.stack.split("\n"))),o=o._parent;w(r),b(r),U.notEnumerableProp(t,"stack",g(n,r)),U.notEnumerableProp(t,"__stackCleaned__",!0)}};var Z=function(){var t=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,null=/^\s*at\s*/,null=t;var e=Error.captureStackTrace;return Y=function(t){return/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/.test(t)},function(t,n){Error.stackTraceLimit+=6,e(t,n),Error.stackTraceLimit-=6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return null=/@/,null=t,!1=!0,function(t){t.stack=(new Error).stack};var r;try{throw new Error}catch(t){r="stack"in t}return"stack"in n||!r||"number"!=typeof Error.stackTraceLimit?null=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()}:(null=/^\s*at\s*/,null=t,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&void 0!==console.warn&&(D=function(t){console.warn(t)},U.isNode&&e.stderr.isTTY?D=function(t,e){var n=e?"[33m":"[31m";console.warn(n+t+"[0m\n")}:U.isNode||"string"!=typeof(new Error).stack||(D=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var J={warnings:q,longStackTraces:!1,cancellation:!1,monitoring:!1};return B&&n.longStackTraces(),{longStackTraces:function(){return J.longStackTraces},warnings:function(){return J.warnings},cancellation:function(){return J.cancellation},monitoring:function(){return J.monitoring},propagateFromFunction:function(){return K},boundValueFunction:function(){return p},checkForgottenReturns:v,setBounds:A,warn:m,deprecated:y,CapturedTrace:P,fireDomEvent:Q,fireGlobalEvent:G}}},{"./errors":12,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var o=function(){return r};return this.caught(n,o)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return i(this)}function r(t,n){return o(t,n,e,e)}var o=t.reduce,i=t.all;t.prototype.each=function(t){return o(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return o(this,t,e,e)},t.each=function(t,r){return o(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){if(!(this instanceof n))return new n(r);f(this,"message","string"==typeof r?r:e),f(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(n,Error),n}function o(t){if(!(this instanceof o))return new o(t);f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var i,s,a=t("./es5"),u=a.freeze,c=t("./util"),l=c.inherits,f=c.notEnumerableProp,h=r("Warning","warning"),p=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{i=TypeError,s=RangeError}catch(t){i=r("TypeError","type error"),s=r("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" ");0<v.length;++0)"function"==typeof Array.prototype[v[0]]&&(d.prototype[v[0]]=Array.prototype[v[0]]);a.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;d.prototype.toString=function(){var t=Array(1).join(" "),e="\n"+t+"AggregateError of:\n";0++,t=Array(1).join(" ");for(;0<this.length;++0){for(var n=this[0]===this?"[Circular AggregateError]":this[0]+"",r=n.split("\n");0<r.length;++0)r[0]=t+r[0];n=r.join("\n"),e+=n+"\n"}return 0--,e},l(o,Error);var y=Error.__BluebirdErrorTypes__;y||(y=u({CancellationError:p,TimeoutError:_,OperationalError:o,RejectionError:o,AggregateError:d}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:y,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:i,RangeError:s,CancellationError:y.CancellationError,OperationalError:y.OperationalError,TimeoutError:y.TimeoutError,AggregateError:y.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var o={}.hasOwnProperty,i={}.toString,s={}.constructor.prototype,a=function(t){var e=[];for(var n in t)o.call(t,n)&&e.push(n);return e},u=function(t,e){return{value:t[e]}},c=function(t,e,n){return t[e]=n.value,t},l=function(t){return t},f=function(t){try{return Object(t).constructor.prototype}catch(t){return s}},h=function(t){try{return"[object Array]"===i.call(t)}catch(t){return!1}};e.exports={isArray:h,keys:a,names:a,defineProperty:c,getDescriptor:u,freeze:l,getPrototypeOf:f,isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,o){return n(t,r,o,e)}}},{}],15:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function o(t){this.finallyHandler=t}function i(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function s(){return u.call(this,this.promise._target()._settledValue())}function a(t){if(!i(this,t))return f.e=t,f}function u(t){var r=this.promise,u=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?u.call(r._boundValue()):u.call(r._boundValue(),t);if(void 0!==c){r._setReturnedNonUndefined();var h=n(c,r);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var p=new l("late cancellation observer");return r._attachExtraTrace(p),f.e=p,f}h.isPending()&&h._attachCancellationCallback(new o(this))}return h._then(s,a,void 0,this,void 0)}}}return r.isRejected()?(i(this),f.e=t,f):(i(this),t)}var c=t("./util"),l=e.CancellationError,f=c.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){i(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,o){return"function"!=typeof t?this.then():this._then(n,o,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,u,u)},e.prototype.tap=function(t){return this._passThrough(t,1,u)},r}},{"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,s){function a(t,n,r){for(;0<n.length;++0){r._pushContext();var i=p(n[0])(t);if(r._popContext(),i===h){r._pushContext();var s=e.reject(h.e);return r._popContext(),s}var a=o(i,r);if(a instanceof e)return a}return null}function u(t,n,o,i){if(s.cancellation()){var a=new e(r),u=this._finallyPromise=new e(r);this._promise=a.lastly(function(){return u}),a._captureStackTrace(),a._setOnCancel(this)}else{(this._promise=new e(r))._captureStackTrace()}this._stack=i,this._generatorFunction=t,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof o?[o].concat(_):_,this._yieldedPromise=null,this._cancellationPhase=!1}var c=t("./errors"),l=c.TypeError,f=t("./util"),h=f.errorObj,p=f.tryCatch,_=[];f.inherits(u,i),u.prototype._isResolved=function(){return null===this._promise},u.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},u.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,n=void 0!==this._generator.return;if(n)this._promise._pushContext(),t=p(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=p(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},u.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=p(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=p(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},u.prototype.promise=function(){return this._promise},u.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},u.prototype._continue=function(t){var n=this._promise;if(t===h)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(t.e,!1);var r=t.value;if(t.done===!0)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var i=o(r,this._promise);if(!(i instanceof e)&&(i=a(i,this._yieldHandlers,this._promise),null===i))return void this._promiseRejected(new l("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",r)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));i=i._target();var s=i._bitField;0===(50397184&s)?(this._yieldedPromise=i,i._proxy(this,null)):0!==(33554432&s)?e._async.invoke(this._promiseFulfilled,this,i._value()):0!==(16777216&s)?e._async.invoke(this._promiseRejected,this,i._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new l("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=u,o=(new Error).stack;return function(){var e=t.apply(this,arguments),i=new r(void 0,void 0,n,o),s=i.promise();return i._generator=e,i._promiseFulfilled(void 0),s}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new l("expecting a function but got "+f.classString(t));_.push(t)},e.spawn=function(t){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new u(t,this),o=r.promise();return r._run(e.spawn),o}}},{"./errors":12,"./util":36}],17:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,s){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var o=[].slice.call(arguments);t&&o.pop();var r=new n(o).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var o=c();this._callback=null===o?e:l.domainBind(o,e),this._preservedValues=r===i?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],p.invoke(this._asyncInit,this,void 0)}function u(t,n,o,i){if("function"!=typeof n)return r("expecting a function but got "+l.classString(n));if(void 0!==o){if("object"!=typeof o||null===o)return e.reject(new TypeError("options argument must be an object but it is "+l.classString(o)));if("number"!=typeof o.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+l.classString(o.concurrency)));0=o.concurrency}return isFinite(0),0=0,new a(t,n,0,i).promise()}var c=e._getDomain,l=t("./util"),f=l.tryCatch,h=l.errorObj,p=e._async;l.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,i=this.length(),a=this._preservedValues,u=this._limit;if(n<0){if(n=n*-1-1,r[n]=t,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var c=this._promise,l=this._callback,p=c._boundValue();c._pushContext();var _=f(l).call(p,t,n,i),d=c._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",c),_===h)return this._reject(_.e),!0;var v=o(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return u>=1&&this._inFlight++,r[n]=v,v._proxy(this,(n+1)*-1),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}return++this._totalResolved>=i&&(null!==a?this._filter(r,a):this._resolve(r),!0)},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var r=t.pop();this._promiseFulfilled(n[r],r)}},a.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n);0<n;++0)t[0]&&(r[0++]=e[0]);r.length=0,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return u(this,t,e,null)},e.map=function(t,e,n,r){return u(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var o=a(t).apply(this,arguments),s=r._popContext();return i.checkForgottenReturns(o,s,"Promise.method",r),r._resolveFromSyncValue(o),r}},e.attempt=e.try=function(t){if("function"!=typeof t)return o("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var u;if(arguments.length>1){i.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];u=s.isArray(c)?a(t).apply(l,c):a(t).call(l,c)}else u=a(t)();var f=r._popContext();return i.checkForgottenReturns(u,f,"Promise.try",r),r._resolveFromSyncValue(u),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&l.getPrototypeOf(t)===Error.prototype}function o(t){var e;if(r(t)){e=new c(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=l.keys(t);0<n.length;++0){var o=n[0];/^(?:name|message|stack|cause)$/.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function i(t,e){return function(n,r){if(null!==t){if(n){var i=o(a(n));t._attachExtraTrace(i),t._reject(i)}else if(e){var s=[].slice.call(arguments,1);t._fulfill(s)}else t._fulfill(r);t=null}}}var s=t("./util"),a=s.maybeWrapAsError,u=t("./errors"),c=u.OperationalError,l=t("./es5");e.exports=i},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e){var n=this;if(!i.isArray(t))return r.call(n,t,e);var o=a(e).apply(n._boundValue(),[null].concat(t));o===u&&s.throwLater(o.e)}function r(t,e){var n=this,r=n._boundValue(),o=void 0===t?a(e).call(r,null):a(e).call(r,null,t);o===u&&s.throwLater(o.e)}function o(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var o=a(e).call(n._boundValue(),t);o===u&&s.throwLater(o.e)}var i=t("./util"),s=e._async,a=i.tryCatch,u=i.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var i=r;void 0!==e&&Object(e).spread&&(i=n),this._then(i,o,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,n,r){"use strict";n.exports=function(){function r(){}function o(t,e){if("function"!=typeof e)throw new g("expecting a function but got "+_.classString(e));if(t.constructor!==i)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function i(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==w&&(o(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function s(t){this.promise._resolveCallback(t)}function a(t){this.promise._rejectCallback(t,!1)}function u(t){var e=new i(w);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},f=function(){return new i.PromiseInspection(this._target())},h=function(t){return i.reject(new g(t))},p={},_=t("./util");c=_.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},_.notEnumerableProp(i,"_getDomain",c);var d=t("./es5"),v=t("./async"),y=new v;d.defineProperty(i,"_async",{value:y});var m=t("./errors"),g=i.TypeError=m.TypeError;i.RangeError=m.RangeError;var b=i.CancellationError=m.CancellationError;i.TimeoutError=m.TimeoutError,i.OperationalError=m.OperationalError,i.RejectionError=m.OperationalError,i.AggregateError=m.AggregateError;var w=function(){},j={},x={},C=t("./thenables")(i,w),E=t("./promise_array")(i,w,C,h,r),k=t("./context")(i),F=k.create,T=t("./debuggability")(i,k),O=(T.CapturedTrace,t("./finally")(i,C)),S=t("./catch_filter")(x),A=t("./nodeback"),P=_.errorObj,R=_.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype.catch=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1);for(n=0;n<e-1;++n){var o=arguments[n];if(!_.isObject(o))return h("expecting an object but got A catch statement predicate "+_.classString(o));r[0++]=o}return r.length=0,t=arguments[n],this.then(void 0,S(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(f,f,void 0,this,void 0)},i.prototype.then=function(t,e){if(T.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+_.classString(t);arguments.length>1&&(n+=", "+_.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?h("expecting a function but got "+_.classString(t)):this.all()._then(t,void 0,void 0,j,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(_.originatesFromRejection,t)},i.getNewLibraryCopy=n.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(w);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=R(t)(A(e,n));return r===P&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=C(t);return e instanceof i||(e=new i(w),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(w);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+_.classString(t));return y.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(w),u=this._target(),l=u._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var f=c();if(0!==(50397184&l)){var h,p,d=u._settlePromiseCtx;0!==(33554432&l)?(p=u._rejectionHandler0,h=t):0!==(16777216&l)?(p=u._fulfillmentHandler0,h=e,u._unsetRejectionIsUnhandled()):(d=u._settlePromiseLateCancellationObserver,p=new b("late cancellation observer"),u._attachExtraTrace(p),h=e),y.invoke(d,u,{handler:null===f?h:"function"==typeof h&&_.domainBind(f,h),promise:a,receiver:r,value:p})}else u._addCallbacks(t,e,a,r,f);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=this._bitField&-65536|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){y.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==p)return void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,o=t._receiverAt(0);void 0===o&&(o=p),this._addCallbacks(e,n,r,o,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),o=t._promiseAt(e),i=t._receiverAt(e);void 0===i&&(i=p),this._addCallbacks(n,r,o,i,null)},i.prototype._addCallbacks=function(t,e,n,r,o){var i=this._length();if(i>=65531&&(i=0,this._setLength(0)),0===i)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===o?t:_.domainBind(o,t)),"function"==typeof e&&(this._rejectionHandler0=null===o?e:_.domainBind(o,e));else{var s=4*i-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===o?t:_.domainBind(o,t)),"function"==typeof e&&(this[s+1]=null===o?e:_.domainBind(o,e))}return this._setLength(i+1),i},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=C(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(;1<s;++1)r._migrateCallbackAt(this,1);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var a=new b("late cancellation observer");r._attachExtraTrace(a),this._reject(a)}}},i.prototype._rejectCallback=function(t,e,n){var r=_.ensureErrorObject(t),o=r===t;if(!o&&!n&&T.warnings()){var i="a promise was rejected with a non-error: "+_.classString(t);this._warn(i,!0)}this._attachExtraTrace(r,!!e&&o),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,!0)});!0=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var o=r._bitField;if(0===(65536&o)){r._pushContext();var i;e===j?n&&"number"==typeof n.length?i=R(t).apply(this._boundValue(),n):(i=P,i.e=new g("cannot .spread() a non-array: "+_.classString(n))):i=R(t).call(e,n);var s=r._popContext();o=r._bitField,0===(65536&o)&&(i===x?r._reject(n):i===P?r._rejectCallback(i.e,!1):(T.checkForgottenReturns(i,s,"",r,this),r._resolveCallback(i)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,n,o){var s=t instanceof i,a=this._bitField,u=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),n instanceof O&&n.isFinallyHandler()?(n.cancelPromise=t,R(e).call(n,o)===P&&t._reject(P.e)):e===f?t._fulfill(f.call(n)):n instanceof r?n._promiseCancelled(t):s||t instanceof E?t._cancel():n.cancel()):"function"==typeof e?s?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,n,o,t)):e.call(n,o,t):n instanceof r?n._isResolved()||(0!==(33554432&a)?n._promiseFulfilled(o,t):n._promiseRejected(o,t)):s&&(u&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,o=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,o,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():y.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return y.fatalError(t,_.isNode);(65535&e)>0?y.settlePromises(this):this._ensurePossibleRejectionHandled()}},i.prototype._fulfillPromises=function(t,e){for(;1<t;1++){var n=this._fulfillmentHandlerAt(1),r=this._promiseAt(1),o=this._receiverAt(1);this._clearCallbackDataAtIndex(1),this._settlePromise(r,n,o,e)}},i.prototype._rejectPromises=function(t,e){for(;1<t;1++){var n=this._rejectionHandlerAt(1),r=this._promiseAt(1),o=this._receiverAt(1);this._clearCallbackDataAtIndex(1),this._settlePromise(r,n,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){return T.deprecated("Promise.defer","new Promise"),{promise:new i(w),resolve:s,reject:a}},_.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,w,C,h,T),t("./bind")(i,w,C,T),t("./cancel")(i,E,h,T),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,C,w,y,c),i.Promise=i,i.version="3.4.7",t("./map.js")(i,E,h,C,w,T),t("./call_get.js")(i),t("./using.js")(i,h,C,F,w,T),t("./timers.js")(i,w,T),t("./generators.js")(i,h,w,C,r,T),t("./nodeify.js")(i),t("./promisify.js")(i,w),t("./props.js")(i,E,C,h),t("./race.js")(i,w,C,h),t("./reduce.js")(i,E,h,C,w,T),t("./settle.js")(i,E,T),t("./some.js")(i,E,h),t("./filter.js")(i,w),t("./each.js")(i,w),t("./any.js")(i),_.toFastProperties(i),_.toFastProperties(i.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new i(w)),T.setBounds(v.firstLineError,_.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i){function s(t){switch(t){case-2:return[];case-3:return{}}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=t("./util");u.isArray;return u.inherits(a,i),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function t(n,i){var a=r(this._values,this._promise);if(a instanceof e){a=a._target();var c=a._bitField;if(this._values=a,0===(50397184&c))return this._promise._setAsyncGuaranteed(),a._then(t,this._reject,void 0,this,i);if(0===(33554432&c))return 0!==(16777216&c)?this._reject(a._reason()):this._cancel();a=a._value()}if(a=u.asArray(a),null===a){var l=o("expecting an array or an iterable object but got "+u.classString(a)).reason();return void this._promise._rejectCallback(l,!1)}if(0===a.length)return void(i===-5?this._resolveEmptyArray():this._resolve(s(i)));this._iterate(a)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var o=this._promise;0<n;++0){var i=r(t[0],o);i instanceof e?(i=i._target(),null=i._bitField):null=null,!1=this._promiseFulfilled(i,0)}o._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(;0<t.length;++0)t[0]instanceof e&&t[0].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},{"./util":36}],24:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){return!w.test(t)}function o(t){try{return t.__isPromisified__===!0}catch(t){return!1}}function i(t,e,n){var r=p.getDataPropertyOrDefault(t,e+n,g);return!!r&&o(r)}function s(t,e,n){for(;0<t.length;0+=2){var r=t[0];if(n.test(r))for(var o=r.replace(n,"");0<t.length;0+=2)if(t[0]===o)throw new m("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function a(t,e,n,r){for(var a=p.inheritedDataKeys(t),u=[];0<a.length;++0){var c=a[0],l=t[c],f=r===j||j(c,l,t);"function"!=typeof l||o(l)||i(t,c,e)||!r(c,l,t,f)||u.push(c,l)}return s(u,e,n),u}function u(t,r,o,i,s,a){function u(){var o=r;r===h&&(o=this);var i=new e(n);i._captureStackTrace();var s="string"==typeof l&&this!==c?this[l]:t,u=_(i,a);try{s.apply(o,d(arguments,u))}catch(t){i._rejectCallback(v(t),!0,!0)}return i._isFateSealed()||i._setAsyncGuaranteed(),i}var c=function(){return this}(),l=t;return"string"==typeof l&&(t=i),p.notEnumerableProp(u,"__isPromisified__",!0),u}function c(t,e,n,r,o){for(var i=new RegExp(x(e)+"$"),s=a(t,e,i,n),u=s.length;0<u;0+=2){var c=s[0],l=s[1],f=c+e;if(r===C)t[f]=C(c,h,c,l,e,o);else{var _=r(l,function(){return C(c,h,c,l,e,o)});p.notEnumerableProp(_,"__isPromisified__",!0),t[f]=_}}return p.toFastProperties(t),t}function l(t,e,n){return C(t,e,void 0,t,null,n)}var f,h={},p=t("./util"),_=t("./nodeback"),d=p.withAppended,v=p.maybeWrapAsError,y=p.canEvaluate,m=t("./errors").TypeError,g={__isPromisified__:!0},b=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],w=new RegExp("^(?:"+b.join("|")+")$"),j=function(t){return p.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},x=function(t){return t.replace(/([$])/,"\\$")},C=y?f:u;e.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+p.classString(t));if(o(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,i=!!e.multiArgs,s=l(t,n,i);return p.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r="Async");var o=e.filter;"function"!=typeof o&&(o=j);var i=e.promisifier;if("function"!=typeof i&&(i=C),!p.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=p.inheritedDataKeys(t);0<s.length;++0){var a=t[s[0]];"constructor"!==s[0]&&p.isClass(a)&&(c(a.prototype,r,o,i,n),c(a,r,o,i,n))}return c(t,r,o,i,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,n){"use strict";e.exports=function(e,n,r,o){function i(t){var e;if(void 0!==a&&t instanceof a)e=f(t),!1=!0;else{var n=l.keys(t),r=n.length;e=new Array(2*r);for(;0<r;++0){var o=n[0];e[0]=t[o],e[0+r]=o}}this.constructor$(e),this._isMap=!1,this._init$(void 0,-3)}function s(t){var n,s=r(t);return c(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new i(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):o("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,u=t("./util"),c=u.isObject,l=t("./es5");"function"==typeof Map&&(a=Map);var f=function(){function t(t,e){this[0]=t,this[0]=e,0++}return function(e){0=e.size,0=0;var n=new Array(2*e.size);return e.forEach(t,n),n}}(),h=function(t){for(var e=new a,n=t.length/2|0;0<n;++0){var r=t[n+0],o=t[0];e.set(r,o)}return e};u.inherits(i,n),i.prototype._init=function(){},i.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var n;if(this._isMap)n=h(this._values);else{n={};for(var r=this.length(),o=this.length();0<o;++0)n[this._values[0+r]]=this._values[0]}return this._resolve(n),!0}return!1},i.prototype.shouldCopyValues=function(){return!1},i.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,o){for(;0<o;++0)n[0+r]=t[0+e],t[0+e]=void 0}function o(t){this._capacity=t,this._length=0,this._front=0}o.prototype._willBeOverCapacity=function(t){return this._capacity<t},o.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},o.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var o=this._front+r-3;this._checkCapacity(r);var i=this._capacity-1;this[o+0&i]=t,this[o+1&i]=e,this[o+2&i]=n,this._length=r},o.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},o.prototype.length=function(){return this._length},o.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},o.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,r(this,0,this,e,this._front+this._length&e-1)},e.exports=o},{}],27:[function(t,e,n){"use strict";e.exports=function(e,n,r,o){function i(t,i){var u=r(t);if(u instanceof e)return a(u);if(t=s.asArray(t),null===t)return o("expecting an array or an iterable object but got "+s.classString(t));var c=new e(n);void 0!==i&&c._propagateFrom(i,3);for(var l=c._fulfill,f=c._reject,h=t.length;0<h;++0){var p=t[0];(void 0!==p||0 in t)&&e.cast(p)._then(l,f,void 0,c,null)}return c}var s=t("./util"),a=function(t){return t.then(function(e){return i(e,t)})};e.race=function(t){return i(t,void 0)},e.prototype.race=function(){return i(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,s){function a(t,n,r,o){this.constructor$(t);var s=h();this._fn=null===s?n:p.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,o===i?this._eachValues=Array(this._length):0===o?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function c(t,e,n,o){return"function"!=typeof e?r("expecting a function but got "+p.classString(e)):new a(t,e,n,o).promise()}function l(t){this.accum=t,this.array._gotAccum(t);var n=o(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(f,void 0,void 0,this,void 0)):f.call(this,n)}function f(t){var n=this.array,r=n._promise,o=_(n._fn);r._pushContext();var i;i=void 0!==n._eachValues?o.call(r._boundValue(),t,this.index,this.length):o.call(r._boundValue(),this.accum,t,this.index,this.length),i instanceof e&&(n._currentCancellable=i);var a=r._popContext();return s.checkForgottenReturns(i,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),i}var h=e._getDomain,p=t("./util"),_=p.tryCatch;p.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==i&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){if(t===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel())},a.prototype._iterate=function(t){this._values=t;var n,r,o=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;r<o;++r){var i={accum:null,value:t[r],index:r,length:o,array:this};n=n._then(l,void 0,void 0,i,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(u,u,void 0,n,this)},e.prototype.reduce=function(t,e){return c(this,t,e,null)},e.reduce=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],29:[function(t,o,i){"use strict";var s,a=t("./util"),u=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},c=a.getNativePromise();if(a.isNode&&"undefined"==typeof MutationObserver){var l=n.setImmediate,f=e.nextTick;s=a.isRecentNode?function(t){l.call(n,t)}:function(t){f.call(e,t)}}else if("function"==typeof c&&"function"==typeof c.resolve){var h=c.resolve();s=function(t){h.then(t)}}else s="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?void 0!==r?function(t){r(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:u:function(){var t=document.createElement("div"),e={attributes:!0},n=document.createElement("div");new MutationObserver(function(){t.classList.toggle("foo"),!1=!1}).observe(n,e);var r=function(){!1=!0,n.classList.toggle("foo")};return function(n){var o=new MutationObserver(function(){o.disconnect(),n()});o.observe(t,e),r()}}();o.exports=s},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function o(t){this.constructor$(t)}var i=e.PromiseInspection;t("./util").inherits(o,n),o.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var n=new i;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},o.prototype._promiseRejected=function(t,e){var n=new i;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new o(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function o(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function i(t,e){if((0|e)!==e||e<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new o(t),i=n.promise();return n.setHowMany(e),n.init(),i}var s=t("./util"),a=t("./errors").RangeError,u=t("./errors").AggregateError,c=s.isArray,l={};s.inherits(o,n),o.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},o.prototype.init=function(){this._initialized=!0,this._init()},o.prototype.setUnwrap=function(){this._unwrap=!0},o.prototype.howMany=function(){return this._howMany},o.prototype.setHowMany=function(t){this._howMany=t},o.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},o.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},o.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},o.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e<this._values.length;++e)this._values[e]!==l&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},o.prototype._fulfilled=function(){return this._totalResolved},o.prototype._rejected=function(){return this._values.length-this.length()},o.prototype._addRejected=function(t){this._values.push(t)},o.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},o.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},o.prototype._getRangeError=function(t){return new a("Input array must contain at least "+this._howMany+" items but contains only "+t+" items")},o.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return i(t,e)},e.prototype.some=function(t){return i(this,t)},e._SomePromiseArray=o}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},o=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},i=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return i.call(this._target())},t.prototype.isFulfilled=function(){return o.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(l(t)){if(t instanceof e)return t;var o=i(t);if(o===c){r&&r._pushContext();var u=e.reject(o.e);return r&&r._popContext(),u}if("function"==typeof o){if(s(t)){var u=new e(n);return t._then(u._fulfill,u._reject,void 0,u,null),u}return a(t,o,r)}}return t}function o(t){return t.then}function i(t){try{return o(t)}catch(t){return c.e=t,c}}function s(t){try{return f.call(t,"_promise0")}catch(t){return!1}}function a(t,r,o){function i(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,!0,!0),a=null)}var a=new e(n),l=a;o&&o._pushContext(),a._captureStackTrace(),o&&o._popContext();var f=u.tryCatch(r).call(t,i,s);return!0=!1,a&&f===c&&(a._rejectCallback(f.e,!0,!0),a=null),l}var u=t("./util"),c=u.errorObj,l=u.isObject,f={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function o(t){this.handle=t}function i(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),u=e.TimeoutError;o.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,i){var s,a;return void 0!==i?(s=e.resolve(i)._then(c,null,null,t,void 0),r.cancellation()&&i instanceof e&&s._setOnCancel(i)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new o(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return l(t,this)};var f=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new u("operation timed out"):new u(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,u=new o(setTimeout(function(){n.isPending()&&f(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(i,s,void 0,u,void 0),n._setOnCancel(u)):n=this._then(i,s,void 0,u,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,o,i,s){function a(t){setTimeout(function(){throw t},0)}function u(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function c(t,n){function o(){if(0>=s)return c._fulfill();var i=u(t[0++]);if(i instanceof e&&i._isDisposable()){try{i=r(i._getDisposer().tryDispose(n),t.promise)}catch(t){return a(t)}if(i instanceof e)return i._then(o,a,null,null,null)}o()}var s=t.length,c=new e(i);return o(),c}function l(t,e,n){this._data=t,this._promise=e,this._context=n}function f(t,e,n){this.constructor$(t,e,n)}function h(t){return l.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function p(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,m=_.tryCatch,g={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():g},l.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==g?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},l.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(f,l),f.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},p.prototype._resultCancelled=function(){for(var t=this.length;0<t;++0){var n=this[0];n instanceof e&&n.cancel()}},e.using=function(){var t=arguments.length;if(t<2)return n("you must pass at least 2 arguments to Promise.using");var o=arguments[t-1];if("function"!=typeof o)return n("expecting a function but got "+_.classString(o));var i;2===t&&Array.isArray(arguments[0])?(i=arguments[0],t=i.length,!0=!1):(i=arguments,t--);for(var a=new p(t);0<t;++0){var u=i[0];if(l.isDisposer(u)){var f=u;u=u.promise(),u._setDisposable(f)}else{var d=r(u);d instanceof e&&(u=d._then(h,null,null,{resources:a,index:0},void 0))}a[0]=u}for(var v=new Array(a.length);0<v.length;++0)v[0]=e.resolve(a[0]).reflect();var g=e.all(v).then(function(t){for(;0<t.length;++0){var e=t[0];if(e.isRejected())return y.e=e.error(),y;if(!e.isFulfilled())return void g.cancel();t[0]=e.value()}b._pushContext(),o=m(o);var n=o.apply(void 0,t),r=b._popContext();return s.checkForgottenReturns(n,r,"Promise.using",b),n}),b=g.lastly(function(){return c(a,new e.PromiseInspection(g))});return a.promise=b,b._setOnCancel(a),b},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new f(t,this,o());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,r,o){"use strict";function i(){try{var t=A;return A=null,t.apply(this,arguments)}catch(t){return S.e=t,S}}function s(t){return A=t,i}function a(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function u(t){return"function"==typeof t||"object"==typeof t&&null!==t}function c(t){return a(t)?new Error(m(t)):t}function l(t,e){var n,r=t.length,o=new Array(r+1);for(n=0;n<r;++n)o[n]=t[n];return o[n]=e,o}function f(t,e,n){if(!T.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function h(t,e,n){if(a(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return T.defineProperty(t,e,r),t}function p(t){throw t}function _(t){try{if("function"==typeof t){var e=T.names(t.prototype),n=T.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=/this\s*\.\s*\S+\s*=/.test(t+"")&&T.names(t).length>0;if(n||r||o)return!0}return!1}catch(t){return!1}}function d(t){function e(){}e.prototype=t;for(var n=8;8--;)new e;return t}function v(t){return/^[a-z$_][a-z$_0-9]*$/i.test(t)}function y(t,e,n){for(var r=new Array(t);0<t;++0)r[0]=e+0+n;return r}function m(t){try{return t+""}catch(t){return"[no string representation]"}}function g(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function b(t){try{h(t,"isOperational",!0)}catch(t){}}function w(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0)}function j(t){return g(t)&&T.propertyIsWritable(t,"stack")}function x(t){return{}.toString.call(t)}function C(t,e,n){for(var r=T.names(t);0<r.length;++0){var o=r[0];if(n(o))try{T.defineProperty(e,o,T.getDescriptor(t,o))}catch(t){}}}function E(t){return H?e.env[t]:void 0}function k(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function F(t,e){return t.bind(e)}var T=t("./es5"),O="undefined"==typeof navigator,S={e:{}},A,P="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:void 0!==this?this:null,R=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},I=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(;0<t.length;++0)if(t[0]===e)return!0;return!1};if(T.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],o=Object.create(null);null!=t&&!e(t);){var i;try{i=n(t)}catch(t){return r}for(;0<i.length;++0){var s=i[0];if(!o[s]){o[s]=!0;var a=Object.getOwnPropertyDescriptor(t,s);null!=a&&null==a.get&&null==a.set&&r.push(s)}}t=T.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var o=[];t:for(var i in n)if(r.call(n,i))o.push(i);else{for(;0<t.length;++0)if(r.call(t[0],i))continue t;o.push(i)}return o}}(),D=/this\s*\.\s*\S+\s*=/,M=/^[a-z$_][a-z$_0-9]*$/i,L=function(){return"stack"in new Error?function(t){return j(t)?t:new Error(m(t))}:function(t){if(j(t))return t;try{throw new Error(m(t))}catch(t){return t}}}(),V=function(t){return T.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var U="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};V=function(t){return T.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?U(t):null}}var N=void 0!==e&&"[object process]"===x(e).toLowerCase(),H=void 0!==e&&void 0!==e.env,q={isClass:_,isIdentifier:v,inheritedDataKeys:I,getDataPropertyOrDefault:f,thrower:p,isArray:T.isArray,asArray:V,notEnumerableProp:h,isPrimitive:a,isObject:u,isError:g,canEvaluate:O,errorObj:S,tryCatch:s,inherits:R,withAppended:l,maybeWrapAsError:c,toFastProperties:d,filledRange:y,toString:m,canAttachTrace:j,ensureErrorObject:L,originatesFromRejection:w,markAsOriginatingFromRejection:b,classString:x,copyDescriptors:C,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:N,hasEnvVariables:H,env:E,global:P,getNativePromise:k,domainBind:F};q.isRecentNode=q.isNode&&function(){var t=e.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),q.isNode&&q.toFastProperties(e);try{throw new Error}catch(t){q.lastLineError=t}r.exports=q},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(e,n(45),n(11),n(137).setImmediate)},function(t,e,n){var r=n(1),o=n(0),i=r(o,"Map");t.exports=i},function(t,e,n){var r=n(0),o=r.Symbol;t.exports=o},function(t,e,n){function r(t){var e=new t.constructor(t.byteLength);return new o(e).set(new o(t)),e}var o=n(55);t.exports=r},function(t,e,n){var r=n(60),o=n(44),i=Object.prototype,s=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(t){return null==t?[]:(t=Object(t),r(a(t),function(e){return s.call(t,e)}))}:o;t.exports=u},function(t,e){function n(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}var r=Object.prototype;t.exports=n},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){function r(t){return null!=t&&i(t.length)&&!o(t)}var o=n(42),i=n(43);t.exports=r},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e,n){function r(t){return s(t)?o(t):i(t)}var o=n(25),i=n(68),s=n(20);t.exports=r},function(t,e,n){function r(t){return s(t)?o(t,!0):i(t)}var o=n(25),i=n(69),s=n(20);t.exports=r},function(t,e){function n(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}t.exports=n},function(t,e,n){function r(t,e){var n=s(t),r=!n&&i(t),l=!n&&!r&&a(t),h=!n&&!r&&!l&&c(t),p=n||r||l||h,_=p?o(t.length,String):[],d=_.length;for(var v in t)!e&&!f.call(t,v)||p&&("length"==v||l&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||u(v,d))||_.push(v);return _}var o=n(71),i=n(129),s=n(19),a=n(41),u=n(36),c=n(130),l=Object.prototype,f=l.hasOwnProperty;t.exports=r},function(t,e){function n(t,e){for(var n=e.length,r=t.length;++-1<n;)t[r+-1]=e[-1];return t}t.exports=n},function(t,e){function n(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[++-1]);++-1<o;)n=e(n,t[-1],-1,t);return n}t.exports=n},function(t,e,n){function r(t,e,n){var r=t[e];a.call(t,e)&&i(r,n)&&(void 0!==n||e in t)||o(t,e,n)}var o=n(29),i=n(9),s=Object.prototype,a=s.hasOwnProperty;t.exports=r},function(t,e,n){function r(t,e,n){"__proto__"==e&&o?o(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var o=n(32);t.exports=r},function(t,e,n){function r(t,e,n){var r=e(t);return i(t)?r:o(r,n(t))}var o=n(26),i=n(19);t.exports=r},function(t,e,n){function r(t,e){return s(i(t,e,o),t+"")}var o=n(40),i=n(117),s=n(119);t.exports=r},function(t,e,n){var r=n(1),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,n(11))},function(t,e,n){var r=n(37),o=r(Object.getPrototypeOf,Object);t.exports=o},function(t,e,n){var r=n(26),o=n(34),i=n(17),s=n(44),a=Object.getOwnPropertySymbols,u=a?function(t){for(var e=[];t;)r(e,i(t)),t=o(t);return e}:s;t.exports=u},function(t,e){function n(t,e){return e=null==e?9007199254740991:e,!!e&&("number"==typeof t||/^(?:0|[1-9]\d*)$/.test(t))&&t>-1&&t%1==0&&t<e}t.exports=n},function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},function(t,e){function n(t){if(null!=t){try{return o.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var r=Function.prototype,o=r.toString;t.exports=n},function(t,e,n){var r=n(24),o=n(126),i=n(31),s=n(85),a=i(function(t){return t.push(void 0,s),r(o,void 0,t)});t.exports=a},function(t,e){function n(t){return t}t.exports=n},function(t,e,n){(function(t){var r=n(0),o=n(131),i="object"==typeof e&&e&&!e.nodeType&&e,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i,u=a?r.Buffer:void 0,c=u?u.isBuffer:void 0,l=c||o;t.exports=l}).call(e,n(12)(t))},function(t,e,n){function r(t){if(!i(t))return!1;var e=o(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var o=n(6),i=n(2);t.exports=r},function(t,e){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}t.exports=n},function(t,e){function n(){return[]}t.exports=n},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function i(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function s(){}function a(){var t=o(s);!1=!0;for(var e=_.length;e;){for(p=_,_=[];++-1<e;)p&&p[-1].run();-1=-1,e=_.length}p=null,!1=!1,i(t)}function u(t,e){this.fun=t,this.array=e}function c(){}var l,f,h=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(t){f=r}}();var p,_=[];h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(;1<arguments.length;1++)e[0]=arguments[1];_.push(new u(t,e)),1===_.length&&o(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),o=function(){function t(t,e){this._rgb=t,this._population=e}return t.prototype.getRgb=function(){return this._rgb},t.prototype.getHsl=function(){if(!this._hsl){var t=this._rgb,e=t[0],n=t[1],o=t[2];this._hsl=r.rgbToHsl(e,n,o)}return this._hsl},t.prototype.getPopulation=function(){return this._population},t.prototype.getHex=function(){if(!this._hex){var t=this._rgb,e=t[0],n=t[1],o=t[2];this._hex=r.rgbToHex(e,n,o)}return this._hex},t.prototype.getYiq=function(){if(!this._yiq){var t=this._rgb;this._yiq=(299*t[0]+587*t[1]+114*t[2])/1e3}return this._yiq},t.prototype.getTitleTextColor=function(){return this.getYiq()<200?"#fff":"#000"},t.prototype.getBodyTextColor=function(){return this.getYiq()<150?"#fff":"#000"},t}();e.Swatch=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(13),o=n(39),i=n(138),s=n(10),a=n(145),u=n(142),c=n(140),l=function(){function t(e,n){this._src=e,this.opts=o({},n,t.DefaultOpts)}return t.from=function(t){return new i.default(t)},t.prototype._process=function(t){var e=this,n=this.opts,o=n.quantizer,i=n.generator;t.scaleDown(n);var s=t.getImageData();return r.resolve(o(s.data,n)).then(function(t){return r.resolve(i(t))}).tap(function(t){return e._palette=t}).finally(function(){return t.remove()})},t.prototype.palette=function(){return this.swatches()},t.prototype.swatches=function(){return this._palette},t.prototype.getPalette=function(t){var e=this;return(new this.opts.ImageClass).load(this._src).then(function(t){return e._process(t)}).asCallback(t)},t}();l.Builder=i.default,l.Quantizer=a,l.Generator=u,l.Filter=c,l.Util=s,l.DefaultOpts={colorCount:64,quality:5,generator:u.Default,ImageClass:null,quantizer:a.MMCQ,filters:[c.Default]},e.default=l},function(t,e,n){"use strict";var r=n(47),o=n(144);r.default.DefaultOpts.ImageClass=o.default,t.exports=r.default},function(t,e,n){var r=n(1),o=n(0),i=r(o,"DataView");t.exports=i},function(t,e,n){function r(t){var e=null==t?0:t.length;for(this.clear();++-1<e;){var n=t[-1];this.set(n[0],n[1])}}var o=n(91),i=n(92),s=n(93),a=n(94),u=n(95);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=s,r.prototype.has=a,r.prototype.set=u,t.exports=r},function(t,e,n){function r(t){var e=null==t?0:t.length;for(this.clear();++-1<e;){var n=t[-1];this.set(n[0],n[1])}}var o=n(107),i=n(108),s=n(109),a=n(110),u=n(111);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=s,r.prototype.has=a,r.prototype.set=u,t.exports=r},function(t,e,n){var r=n(1),o=n(0),i=r(o,"Promise");t.exports=i},function(t,e,n){var r=n(1),o=n(0),i=r(o,"Set");t.exports=i},function(t,e,n){function r(t){var e=this.__data__=new o(t);this.size=e.size}var o=n(4),i=n(121),s=n(122),a=n(123),u=n(124),c=n(125);r.prototype.clear=i,r.prototype.delete=s,r.prototype.get=a,r.prototype.has=u,r.prototype.set=c,t.exports=r},function(t,e,n){var r=n(0),o=r.Uint8Array;t.exports=o},function(t,e,n){var r=n(1),o=n(0),i=r(o,"WeakMap");t.exports=i},function(t,e){function n(t,e){return t.set(e[0],e[1]),t}t.exports=n},function(t,e){function n(t,e){return t.add(e),t}t.exports=n},function(t,e){function n(t,e){for(var n=null==t?0:t.length;++-1<n&&e(t[-1],-1,t)!==!1;);return t}t.exports=n},function(t,e){function n(t,e){for(var n=null==t?0:t.length,r=[];++-1<n;){var o=t[-1];e(o,-1,t)&&(r[0++]=o)}return r}t.exports=n},function(t,e,n){function r(t,e){return t&&o(e,i(e),t)}var o=n(3),i=n(22);t.exports=r},function(t,e,n){function r(t,e){return t&&o(e,i(e),t)}var o=n(3),i=n(23);t.exports=r},function(t,e,n){function r(t,e,n,C,E,k){var F,T=1&e,O=2&e,S=4&e;if(n&&(F=E?n(t,C,E,k):n(t)),void 0!==F)return F;if(!w(t))return t;var A=g(t);if(A){if(F=v(t),!T)return l(t,F)}else{var P=d(t),R="[object Function]"==P||"[object GeneratorFunction]"==P;if(b(t))return c(t,T);if("[object Object]"==P||"[object Arguments]"==P||R&&!E){if(F=O||R?{}:m(t),!T)return O?h(t,u(F,t)):f(t,a(F,t))}else{if(!x[P])return E?t:{};F=y(t,P,r,T)}}k||(k=new o);var I=k.get(t);if(I)return I;k.set(t,F);var D=S?O?_:p:O?keysIn:j,M=A?void 0:D(t);return i(M||t,function(o,i){M&&(i=o,o=t[i]),s(F,i,r(o,e,n,i,t,k))}),F}var o=n(54),i=n(59),s=n(28),a=n(61),u=n(62),c=n(73),l=n(80),f=n(81),h=n(82),p=n(86),_=n(87),d=n(89),v=n(96),y=n(97),m=n(98),g=n(19),b=n(41),w=n(2),j=n(22),x={};x["[object Arguments]"]=x["[object Array]"]=x["[object ArrayBuffer]"]=x["[object DataView]"]=x["[object Boolean]"]=x["[object Date]"]=x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Map]"]=x["[object Number]"]=x["[object Object]"]=x["[object RegExp]"]=x["[object Set]"]=x["[object String]"]=x["[object Symbol]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x["[object Error]"]=x["[object Function]"]=x["[object WeakMap]"]=!1,t.exports=r},function(t,e,n){var r=n(2),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},function(t,e,n){function r(t){return i(t)&&"[object Arguments]"==o(t)}var o=n(6),i=n(21);t.exports=r},function(t,e,n){function r(t){return!(!s(t)||i(t))&&(o(t)?h:/^\[object .+?Constructor\]$/).test(a(t))}var o=n(42),i=n(101),s=n(2),a=n(38),u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},function(t,e,n){function r(t){return s(t)&&i(t.length)&&!!a[o(t)]}var o=n(6),i=n(43),s=n(21),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=r},function(t,e,n){function r(t){if(!o(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}var o=n(18),i=n(113),s=Object.prototype,a=s.hasOwnProperty;t.exports=r},function(t,e,n){function r(t){if(!o(t))return s(t);var e=i(t),n=[];for(var r in t)("constructor"!=r||!e&&u.call(t,r))&&n.push(r);return n}var o=n(2),i=n(18),s=n(114),a=Object.prototype,u=a.hasOwnProperty;t.exports=r},function(t,e,n){var r=n(128),o=n(32),i=n(40),s=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=s},function(t,e){function n(t,e){for(var n=Array(t);++-1<t;)n[-1]=e(-1);return n}t.exports=n},function(t,e){function n(t){return function(e){return t(e)}}t.exports=n},function(t,e,n){(function(t){function r(t,e){if(e)return t.slice();var n=t.length,r=c?c(n):new t.constructor(n);return t.copy(r),r}var o=n(0),i="object"==typeof e&&e&&!e.nodeType&&e,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i,u=a?o.Buffer:void 0,c=u?u.allocUnsafe:void 0;t.exports=r}).call(e,n(12)(t))},function(t,e,n){function r(t,e){var n=e?o(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var o=n(16);t.exports=r},function(t,e,n){function r(t,e,n){return i(e?n(s(t),1):s(t),o,new t.constructor)}var o=n(57),i=n(27),s=n(112);t.exports=r},function(t,e){function n(t){var e=new t.constructor(t.source,/\w*$/.exec(t));return e.lastIndex=t.lastIndex,e}t.exports=n},function(t,e,n){function r(t,e,n){return i(e?n(s(t),1):s(t),o,new t.constructor)}var o=n(58),i=n(27),s=n(118);t.exports=r},function(t,e,n){function r(t){return s?Object(s.call(t)):{}}var o=n(15),i=o?o.prototype:void 0,s=i?i.valueOf:void 0;t.exports=r},function(t,e,n){function r(t,e){var n=e?o(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var o=n(16);t.exports=r},function(t,e){function n(t,e){var n=t.length;for(e||(e=Array(n));++-1<n;)e[-1]=t[-1];return e}t.exports=n},function(t,e,n){function r(t,e){return o(t,i(t),e)}var o=n(3),i=n(17);t.exports=r},function(t,e,n){function r(t,e){return o(t,i(t),e)}var o=n(3),i=n(35);t.exports=r},function(t,e,n){var r=n(0),o=r["__core-js_shared__"];t.exports=o},function(t,e,n){function r(t){return o(function(e,n){var r=n.length,o=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&i(n[0],n[1],s)&&(o=r<3?void 0:o,r=1),e=Object(e);++-1<r;){var a=n[-1];a&&t(e,a,-1,o)}return e})}var o=n(31),i=n(99);t.exports=r},function(t,e,n){function r(t,e,n,r){return void 0===t||o(t,i[n])&&!s.call(r,n)?e:t}var o=n(9),i=Object.prototype,s=i.hasOwnProperty;t.exports=r},function(t,e,n){function r(t){return o(t,s,i)}var o=n(30),i=n(17),s=n(22);t.exports=r},function(t,e,n){function r(t){return o(t,s,i)}var o=n(30),i=n(35),s=n(23);t.exports=r},function(t,e,n){function r(t){var e=s.call(t,u),n=t[u];try{t[u]=void 0}catch(t){}var r=a.call(t);return e?t[u]=n:delete t[u],r}var o=n(15),i=Object.prototype,s=i.hasOwnProperty,a=i.toString,u=o?o.toStringTag:void 0;t.exports=r},function(t,e,n){var r=n(49),o=n(14),i=n(52),s=n(53),a=n(56),u=n(6),c=n(38),l=c(r),f=c(o),h=c(i),p=c(s),_=c(a),d=u;(r&&"[object DataView]"!=d(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=d(new o)||i&&"[object Promise]"!=d(i.resolve())||s&&"[object Set]"!=d(new s)||a&&"[object WeakMap]"!=d(new a))&&(d=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case _:return"[object WeakMap]"}return e}),t.exports=d},function(t,e){function n(t,e){return null==t?void 0:t[e]}t.exports=n},function(t,e,n){function r(){this.__data__=o?o(null):{},this.size=0}var o=n(8);t.exports=r},function(t,e){function n(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}t.exports=n},function(t,e,n){function r(t){var e=this.__data__;if(o){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return s.call(e,t)?e[t]:void 0}var o=n(8),i=Object.prototype,s=i.hasOwnProperty;t.exports=r},function(t,e,n){function r(t){var e=this.__data__;return o?void 0!==e[t]:s.call(e,t)}var o=n(8),i=Object.prototype,s=i.hasOwnProperty;t.exports=r},function(t,e,n){function r(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=o&&void 0===e?"__lodash_hash_undefined__":e,this}var o=n(8);t.exports=r},function(t,e){function n(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&o.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var r=Object.prototype,o=r.hasOwnProperty;t.exports=n},function(t,e,n){function r(t,e,n,r){var f=t.constructor;switch(e){case"[object ArrayBuffer]":return o(t);case"[object Boolean]":case"[object Date]":return new f(+t);case"[object DataView]":return i(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return l(t,r);case"[object Map]":return s(t,r,n);case"[object Number]":case"[object String]":return new f(t);case"[object RegExp]":return a(t);case"[object Set]":return u(t,r,n);case"[object Symbol]":return c(t)}}var o=n(16),i=n(74),s=n(75),a=n(76),u=n(77),c=n(78),l=n(79);t.exports=r},function(t,e,n){function r(t){return"function"!=typeof t.constructor||s(t)?{}:o(i(t))}var o=n(64),i=n(34),s=n(18);t.exports=r},function(t,e,n){function r(t,e,n){if(!a(n))return!1;var r=typeof e;return!!("number"==r?i(n)&&s(e,n.length):"string"==r&&e in n)&&o(n[e],t)}var o=n(9),i=n(20),s=n(36),a=n(2);t.exports=r},function(t,e){function n(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=n},function(t,e,n){function r(t){return!!i&&i in t}var o=n(83),i=function(){var t=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=r},function(t,e){function n(){this.__data__=[],this.size=0}t.exports=n},function(t,e,n){function r(t){var e=this.__data__,n=o(e,t);return!(n<0)&&(n==e.length-1?e.pop():s.call(e,n,1),--this.size,!0)}var o=n(5),i=Array.prototype,s=i.splice;t.exports=r},function(t,e,n){function r(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]}var o=n(5);t.exports=r},function(t,e,n){function r(t){return o(this.__data__,t)>-1}var o=n(5);t.exports=r},function(t,e,n){function r(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var o=n(5);t.exports=r},function(t,e,n){function r(){this.size=0,this.__data__={hash:new o,map:new(s||i),string:new o}}var o=n(50),i=n(4),s=n(14);t.exports=r},function(t,e,n){function r(t){var e=o(this,t).delete(t);return this.size-=e?1:0,e}var o=n(7);t.exports=r},function(t,e,n){function r(t){return o(this,t).get(t)}var o=n(7);t.exports=r},function(t,e,n){function r(t){return o(this,t).has(t)}var o=n(7);t.exports=r},function(t,e,n){function r(t,e){var n=o(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var o=n(7);t.exports=r},function(t,e){function n(t){var e=Array(t.size);return t.forEach(function(t,n){e[++-1]=[n,t]}),e}t.exports=n},function(t,e,n){var r=n(37),o=r(Object.keys,Object);t.exports=o},function(t,e){function n(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=n},function(t,e,n){(function(t){var r=n(33),o="object"==typeof e&&e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=i&&i.exports===o,a=s&&r.process,u=function(){try{return a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u}).call(e,n(12)(t))},function(t,e){function n(t){return o.call(t)}var r=Object.prototype,o=r.toString;t.exports=n},function(t,e,n){function r(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var r=arguments,s=i(r.length-e,0),a=Array(s);++-1<s;)a[-1]=r[e+-1];-1=-1;for(var u=Array(e+1);++-1<e;)u[-1]=r[-1];return u[e]=n(a),o(t,this,u)}}var o=n(24),i=Math.max;t.exports=r},function(t,e){function n(t){var e=Array(t.size);return t.forEach(function(t){e[++-1]=t}),e}t.exports=n},function(t,e,n){var r=n(70),o=n(120),i=o(r);t.exports=i},function(t,e){function n(t){return function(){var e=r(),n=16-(e-0);if(0=e,n>0){if(++0>=800)return arguments[0]}else 0=0;return t.apply(void 0,arguments)}}var r=Date.now;t.exports=n},function(t,e,n){function r(){this.__data__=new o,this.size=0}var o=n(4);t.exports=r},function(t,e){function n(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}t.exports=n},function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e,n){function r(t,e){var n=this.__data__;if(n instanceof o){var r=n.__data__;if(!i||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new s(r)}return n.set(t,e),this.size=n.size,this}var o=n(4),i=n(14),s=n(51);t.exports=r},function(t,e,n){var r=n(3),o=n(84),i=n(23),s=o(function(t,e,n,o){r(e,i(e),t,o)});t.exports=s},function(t,e,n){function r(t){return o(t,4)}var o=n(63);t.exports=r},function(t,e){function n(t){return function(){return t}}t.exports=n},function(t,e,n){var r=n(65),o=n(21),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},function(t,e,n){var r=n(67),o=n(72),i=n(115),s=i&&i.isTypedArray,a=s?o(s):r;t.exports=a},function(t,e){function n(){return!1}t.exports=n},function(t,e,n){(function(t,r){var o;!function(i){function s(t){throw new RangeError(w[t])}function a(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function u(t,e){var n=t.split("@");return n.length>1&&(""=n[0]+"@",t=n[1]),t=t.replace(/[\x2E\u3002\uFF0E\uFF61]/g,"."),""+a(t.split("."),e).join(".")}function c(t){for(var e,n,r=[],o=t.length;0<o;)e=t.charCodeAt(0++),e>=55296&&e<=56319&&0<o?(n=t.charCodeAt(0++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),0--)):r.push(e);return r}function l(t){return a(t,function(t){return t>65535&&(t-=65536,""+=x(t>>>10&1023|55296),t=56320|1023&t),""+=x(t)}).join("")}function f(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36}function h(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function p(t,e,n){for(t=n?j(t/700):t>>1,t+=j(t/e);t>455;0+=36)t=j(t/35);return j(0+36*t/(t+38))}function _(t){var e,n,r,o,i,a,u,c,h,_,d=[],v=t.length;for(n=t.lastIndexOf("-"),n<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&s("not-basic"),d.push(t.charCodeAt(r));for(o=n>0?n+1:0;o<v;){for(i=0,a=1,u=36;o>=v&&s("invalid-input"),c=f(t.charCodeAt(o++)),(c>=36||c>j((b-0)/a))&&s("overflow"),0+=c*a,h=u<=72?1:u>=98?26:u-72,!(c<h);u+=36)_=36-h,a>j(b/_)&&s("overflow"),a*=_;e=d.length+1,72=p(0-i,e,0==i),j(0/e)>2147483519&&s("overflow"),128+=j(0/e),0%=e,d.splice(0++,0,128)}return l(d)}function d(t){var e,n,r,o,i,a,u,l,f,_,d,v,y,m,g,w=[];for(t=c(t),v=t.length,e=128,n=0,i=72,a=0;a<v;++a)d=t[a],d<128&&w.push(x(d));for(r=o=w.length,o&&w.push("-");r<v;){for(u=b,a=0;a<v;++a)d=t[a],d>=e&&d<u&&(u=d);for(y=r+1,u-e>j((b-n)/y)&&s("overflow"),n+=(u-e)*y,e=u,a=0;a<v;++a)if(d=t[a],d<e&&++n>b&&s("overflow"),d==e){for(l=n,f=36;_=f<=i?1:f>=i+26?26:f-i,!(l<_);f+=36)g=l-_,m=36-_,w.push(x(h(_+g%m,0))),l=j(g/m);w.push(x(h(l,0))),i=p(n,y,r==o),n=0,++r}++n,++e}return w.join("")}function v(t){return u(t,function(t){return/^xn--/.test(t)?_(t.slice(4).toLowerCase()):t})}function y(t){return u(t,function(t){return/[^\x20-\x7E]/.test(t)?"xn--"+d(t):t})}var m=("object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof r&&r);m.global!==m&&m.window!==m&&m.self;var g,b=2147483647,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=Math.floor,x=String.fromCharCode;g={version:"1.4.1",ucs2:{decode:c,encode:l},decode:_,encode:d,toASCII:y,toUnicode:v},o=function(){return g}.call(e,n,e,t),void 0!==o&&(t.exports=o)}(this)}).call(e,n(12)(t),n(11))},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,i){e=e||"&",n=n||"=";var s={};if("string"!=typeof t||0===t.length)return s;t=t.split(e);i&&"number"==typeof i.maxKeys&&(1e3=i.maxKeys);var a=t.length;a>1e3&&(a=1e3);for(;0<a;++0){var u,c,l,f,h=t[0].replace(/\+/g,"%20"),p=h.indexOf(n);p>=0?(u=h.substr(0,p),c=h.substr(p+1)):(u=h,c=""),l=decodeURIComponent(u),f=decodeURIComponent(c),r(s,l)?o(s[l])?s[l].push(f):s[l]=[s[l],f]:s[l]=f}return s};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";function r(t,e){if(t.map)return t.map(e);for(var n=[];0<t.length;0++)n.push(e(t[0],0));return n}var o=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?r(s(t),function(s){var a=encodeURIComponent(o(s))+n;return i(t[s])?r(t[s],function(t){return a+encodeURIComponent(o(t))}).join(e):a+encodeURIComponent(o(t[s]))}).join(e):a?encodeURIComponent(o(a))+n+encodeURIComponent(o(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},s=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e,n){"use strict";e.decode=e.parse=n(133),e.encode=e.stringify=n(134)},function(t,e,n){(function(t,e){!function(t,n){"use strict";function r(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1);0<e.length;0++)e[0]=arguments[1];var n={callback:t,args:e};return _[1]=n,p(1),1++}function o(t){delete _[t]}function i(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}function s(t){var e=_[t];if(e){!1=!0;try{i(e)}finally{o(t),!1=!1}}}function a(){p=function(t){e.nextTick(function(){s(t)})}}function u(){if(t.postMessage&&!t.importScripts){var e=t.onmessage;return t.onmessage=function(){!0=!1},t.postMessage("","*"),t.onmessage=e,!0}}function c(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&s(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),p=function(n){t.postMessage(e+n,"*")}}function l(){var t=new MessageChannel;t.port1.onmessage=function(t){s(t.data)},p=function(e){t.port2.postMessage(e)}}function f(){var t=d.documentElement;p=function(e){var n=d.createElement("script");n.onreadystatechange=function(){s(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}function h(){p=function(t){setTimeout(s,0,t)}}if(!t.setImmediate){var p,_={},d=t.document,v=Object.getPrototypeOf&&Object.getPrototypeOf(t);v=v&&v.setTimeout?v:t,"[object process]"==={}.toString.call(t.process)?a():u()?c():t.MessageChannel?l():d&&"onreadystatechange"in d.createElement("script")?f():h(),v.setImmediate=r,v.clearImmediate=o}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n(11),n(45))},function(t,e,n){function r(t,e){this._id=t,this._clearFn=e}var o=Function.prototype.apply;e.setTimeout=function(){return new r(o.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new r(o.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(136),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(127),o=n(47),i=function(){function t(t,e){void 0===e&&(e={}),this._src=t,this._opts=e,this._opts.filters=r(o.default.DefaultOpts.filters)}return t.prototype.maxColorCount=function(t){return this._opts.colorCount=t,this},t.prototype.maxDimension=function(t){return this._opts.maxDimension=t,this},t.prototype.addFilter=function(t){return this._opts.filters.push(t),this},t.prototype.removeFilter=function(t){var e=this._opts.filters.indexOf(t);return e>0&&this._opts.filters.splice(e),this},t.prototype.clearFilters=function(){return this._opts.filters=[],this},t.prototype.quality=function(t){return this._opts.quality=t,this},t.prototype.useImageClass=function(t){return this._opts.ImageClass=t,this},t.prototype.useGenerator=function(t){return this._opts.generator=t,this},t.prototype.useQuantizer=function(t){return this._opts.quantizer=t,this},t.prototype.build=function(){return new o.default(this._src,this._opts)},t.prototype.getPalette=function(t){return this.build().getPalette(t)},t.prototype.getSwatches=function(t){return this.build().getPalette(t)},t}();e.default=i},function(t,e,n){"use strict";function r(t,e,n,r){return r>=125&&!(t>250&&e>250&&n>250)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(139);e.Default=r.default},function(t,e,n){"use strict";function r(t){return t.forEach(function(t){0=Math.max(0,t.getPopulation())}),0}function o(t,e){return t.Vibrant===e||t.DarkVibrant===e||t.LightVibrant===e||t.Muted===e||t.DarkMuted===e||t.LightMuted===e}function i(t,e,n,r,o,i,s){function a(){for(var t=[];0<arguments.length;0++)t[0]=arguments[0];for(;0<t.length;0+=2){var e=t[0],n=t[1];0+=e*n,0+=n}return NaN}function u(t,e){return 1-Math.abs(t-e)}return a(u(t,e),s.weightSaturation,u(n,r),s.weightLuma,o/i,s.weightPopulation)}function s(t,e,n,r,s,a,u,c,l,f){return e.forEach(function(e){var h=e.getHsl(),p=h[1],_=h[2];if(p>=c&&p<=l&&_>=s&&_<=a&&!o(t,e)){var d=i(p,u,_,r,e.getPopulation(),n,f);null=e,0=d}}),null}function a(t,e,n){var r={};return r.Vibrant=s(r,t,e,n.targetNormalLuma,n.minNormalLuma,n.maxNormalLuma,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.LightVibrant=s(r,t,e,n.targetLightLuma,n.minLightLuma,1,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.DarkVibrant=s(r,t,e,n.targetDarkLuma,0,n.maxDarkLuma,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.Muted=s(r,t,e,n.targetNormalLuma,n.minNormalLuma,n.maxNormalLuma,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r.LightMuted=s(r,t,e,n.targetLightLuma,n.minLightLuma,1,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r.DarkMuted=s(r,t,e,n.targetDarkLuma,0,n.maxDarkLuma,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r}function u(t,e,n){if(null===t.Vibrant&&null!==t.DarkVibrant){var r=t.DarkVibrant.getHsl(),o=r[0],i=r[1],s=r[2];s=n.targetNormalLuma,t.Vibrant=new c.Swatch(l.hslToRgb(o,i,s),0)}if(null===t.DarkVibrant&&null!==t.Vibrant){var a=t.Vibrant.getHsl(),o=a[0],i=a[1],s=a[2];s=n.targetDarkLuma,t.DarkVibrant=new c.Swatch(l.hslToRgb(o,i,s),0)}}Object.defineProperty(e,"__esModule",{value:!0});var c=n(46),l=n(10),f=n(39),h={targetDarkLuma:.26,maxDarkLuma:.45,minLightLuma:.55,targetLightLuma:.74,minNormalLuma:.3,targetNormalLuma:.5,maxNormalLuma:.7,targetMutesSaturation:.3,maxMutesSaturation:.4,targetVibrantSaturation:1,minVibrantSaturation:.35,weightSaturation:3,weightLuma:6,weightPopulation:1},p=function(t,e){e=f({},e,h);var n=r(t),o=a(t,n,e);return u(o,n,e),o};e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(141);e.Default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){}return t.prototype.scaleDown=function(t){var e=this.getWidth(),n=this.getHeight();if(t.maxDimension>0){var r=Math.max(e,n);r>t.maxDimension&&(1=t.maxDimension/r)}else 1=1/t.quality},t}();e.ImageBase=r},function(t,e,n){"use strict";function r(t){var e=u.parse(t);return null===e.protocol&&null===e.host&&null===e.port}function o(t,e){var n=u.parse(t),r=u.parse(e);return n.protocol===r.protocol&&n.hostname===r.hostname&&n.port===r.port}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var s=n(13),a=n(143),u=n(149),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype._initCanvas=function(){var t=this.image,e=this._canvas=document.createElement("canvas"),n=this._context=e.getContext("2d");e.className="vibrant-canvas",e.style.visibility="hidden",this._width=e.width=t.width,this._height=e.height=t.height,n.drawImage(t,0,0),document.body.appendChild(e)},e.prototype.load=function(t){var e=this;if("string"==typeof t)null=document.createElement("img"),null=t;else{if(!(t instanceof HTMLImageElement))return s.reject(new Error("Cannot load buffer as an image in browser"));null=t,null=t.src}return this.image=null,r(null)||o(window.location.href,null)||(null.crossOrigin="anonymous"),"string"==typeof t&&(null.src=null),new s(function(t,n){var r=function(){e._initCanvas(),t(e)};null.onload=r,null.complete&&r(),null.onerror=function(t){return n(new Error("Fail to load image: null"))}})},e.prototype.clear=function(){this._context.clearRect(0,0,this._width,this._height)},e.prototype.update=function(t){this._context.putImageData(t,0,0)},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.resize=function(t,e,n){var r=this,o=r._canvas,i=r._context,s=r.image;this._width=o.width=t,this._height=o.height=e,i.scale(n,n),i.drawImage(s,0,0)},e.prototype.getPixelCount=function(){return this._width*this._height},e.prototype.getImageData=function(){return this._context.getImageData(0,0,this._width,this._height)},e.prototype.remove=function(){this._canvas.parentNode.removeChild(this._canvas)},e}(a.ImageBase);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(146);e.MMCQ=r.default},function(t,e,n){"use strict";function r(t,e){for(;;){0++;var n=t.pop();if(n.count()){var r=n.split(),o=r[0],i=r[1];if(t.push(o),i&&(t.push(i),1++),1>=e)return}}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(46),i=n(148),s=n(147),a=function(t,e){if(0===t.length||e.colorCount<2||e.colorCount>256)throw new Error("Wrong MMCQ parameters");Array.isArray(e.filters)&&e.filters.length>0&&(null=function(t,n,r,o){for(var i=e.filters;0<i.length;0++){if(!(0,i[0])(t,n,r,o))return!0}return!1});var n=i.default.build(t,null),a=n.hist,u=(Object.keys(a).length,new s.default(function(t,e){return t.count()-e.count()}));u.push(n),r(u,.75*e.colorCount);var c=new s.default(function(t,e){return t.count()*t.volume()-e.count()*e.volume()});c.contents=u.contents,r(c,e.colorCount-c.size());for(var l=[];c.size();){var f=c.pop(),h=f.avg();h[0],h[1],h[2];l.push(new o.Swatch(h,f.count()))}return l};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){this._comparator=t,this.contents=[],this._sorted=!1}return t.prototype._sort=function(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)},t.prototype.push=function(t){this.contents.push(t),this._sorted=!1},t.prototype.peek=function(t){return this._sort(),t="number"==typeof t?t:this.contents.length-1,this.contents[t]},t.prototype.pop=function(){return this._sort(),this.contents.pop()},t.prototype.size=function(){return this.contents.length},t.prototype.map=function(t){return this._sort(),this.contents.map(t)},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),o=function(){function t(t,e,n,r,o,i,s){this._volume=-1,this._count=-1,this.dimension={r1:t,r2:e,g1:n,g2:r,b1:o,b2:i},this.hist=s}return t.build=function(e,n){var o,i,s,a,u,c,l,f,h,p,_=1<<3*r.SIGBITS,d=new Uint32Array(_);o=s=u=0,i=a=c=Number.MAX_VALUE;for(var v=e.length/4;0<v;){if(0++,l=e[0],f=e[1],h=e[2],p=e[3],"function"!=typeof n||!n(l,f,h,p)){l>>=r.RSHIFT,f>>=r.RSHIFT,h>>=r.RSHIFT;d[r.getColorIndex(l,f,h)]+=1,l>o&&(o=l),l<i&&(i=l),f>s&&(s=f),f<a&&(a=f),h>u&&(u=h),h<c&&(c=h)}}return new t(i,o,a,s,c,u,d)},t.prototype.invalidate=function(){this._volume=this._count=-1,this._avg=null},t.prototype.volume=function(){if(this._volume<0){var t=this.dimension,e=t.r1,n=t.r2,r=t.g1,o=t.g2,i=t.b1,s=t.b2;this._volume=(n-e+1)*(o-r+1)*(s-i+1)}return this._volume},t.prototype.count=function(){if(this._count<0){for(var t=this.hist,e=this.dimension,n=e.r1,o=e.r2,i=e.g1,s=e.g2,a=e.b1,u=e.b2,c=n;c<=o;c++)for(var l=i;l<=s;l++)for(var f=a;f<=u;f++){var h=r.getColorIndex(c,l,f);0+=t[h]}this._count=0}return this._count},t.prototype.clone=function(){var e=this.hist,n=this.dimension;return new t(n.r1,n.r2,n.g1,n.g2,n.b1,n.b2,e)},t.prototype.avg=function(){if(!this._avg){var t=this.hist,e=this.dimension,n=e.r1,o=e.r2,i=e.g1,s=e.g2,a=e.b1,u=e.b2,c=1<<8-r.SIGBITS;void 0=void 0=void 0=0;for(var l=n;l<=o;l++)for(var f=i;f<=s;f++)for(var h=a;h<=u;h++){var p=r.getColorIndex(l,f,h),_=t[p];0+=_,void 0+=_*(l+.5)*c,void 0+=_*(f+.5)*c,void 0+=_*(h+.5)*c}this._avg=[~~(c*(n+o+1)/2),~~(c*(i+s+1)/2),~~(c*(a+u+1)/2)]}return this._avg},t.prototype.contains=function(t){var e=t[0],n=t[1],o=t[2],i=this.dimension,s=i.r1,a=i.r2,u=i.g1,c=i.g2,l=i.b1,f=i.b2;return e>>=r.RSHIFT,n>>=r.RSHIFT,o>>=r.RSHIFT,e>=s&&e<=a&&n>=u&&n<=c&&o>=l&&o<=f},t.prototype.split=function(){function t(t){var e=t+"1",n=t+"2",r=x.dimension[e],o=x.dimension[n],i=x.clone(),s=x.clone(),a=-1-r,u=o- -1;for(a<=u?(o=Math.min(o-1,~~(-1+u/2)),o=Math.max(0,o)):(o=Math.max(r,~~(-2-a/2)),o=Math.min(x.dimension[n],o));!null[o];)o++;for(var c=w[o];!c&&null[o-1];)c=w[--o];return i.dimension[n]=o,s.dimension[e]=o+1,[i,s]}var e=this.hist,n=this.dimension,o=n.r1,i=n.r2,s=n.g1,a=n.g2,u=n.b1,c=n.b2,l=this.count();if(!l)return[];if(1===l)return[this.clone()];var f,h,p=i-o+1,_=a-s+1,d=c-u+1,v=Math.max(p,_,d);f=h=0;if(v===p){null="r",null=new Uint32Array(i+1);for(var y=o;y<=i;y++){f=0;for(var m=s;m<=a;m++)for(var g=u;g<=c;g++){var b=r.getColorIndex(y,m,g);f+=e[b]}h+=f,null[y]=h}}else if(v===_){null="g",null=new Uint32Array(a+1);for(var m=s;m<=a;m++){f=0;for(var y=o;y<=i;y++)for(var g=u;g<=c;g++){var b=r.getColorIndex(y,m,g);f+=e[b]}h+=f,null[m]=h}}else{null="b",null=new Uint32Array(c+1);for(var g=u;g<=c;g++){f=0;for(var y=o;y<=i;y++)for(var m=s;m<=a;m++){var b=r.getColorIndex(y,m,g);f+=e[b]}h+=f,null[g]=h}}for(var w=new Uint32Array(null.length);0<null.length;0++){var j=null[0];j>h/2&&(-1=0),w[0]=h-j}var x=this;return t(null)},t}();e.default=o},function(t,e,n){"use strict";function r(){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}function o(t,e,n){if(t&&c.isObject(t)&&t instanceof r)return t;var o=new r;return o.parse(t,e,n),o}function i(t){return c.isString(t)&&(t=o(t)),t instanceof r?t.format():r.prototype.format.call(t)}function s(t,e){return o(t,!1,!0).resolve(e)}function a(t,e){return t?o(t,!1,!0).resolveObject(e):e}var u=n(132),c=n(150);e.parse=o,e.resolve=s,e.resolveObject=a,e.format=i,e.Url=r;var l=["<",">",'"',"`"," ","\r","\n","\t"],f=["{","}","|","\\","^","`"].concat(l),h=["'"].concat(f),p=["%","/","?",";","#"].concat(h),_=["/","?","#"],d={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=n(135);r.prototype.parse=function(t,e,n){if(!c.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),o=r!==-1&&r<t.indexOf("#")?"?":"#",i=t.split(o);i[0]=i[0].replace(/\\/g,"/"),t=i.join(o);var s=t;if(s=s.trim(),!n&&1===t.split("#").length){var a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],e?this.query=m.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var l=/^([a-z0-9.+-]+:)/i.exec(s);if(l){l=l[0];var f=l.toLowerCase();this.protocol=f,s=s.substr(l.length)}if(n||l||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===s.substr(0,2);!g||l&&v[l]||(s=s.substr(2),this.slashes=!0)}if(!v[l]&&(g||l&&!y[l])){for(;0<_.length;0++){var b=s.indexOf(_[0]);b!==-1&&(-1=b)}var w,j;j=s.lastIndexOf("@"),j!==-1&&(w=s.slice(0,j),s=s.slice(j+1),this.auth=decodeURIComponent(w)),-1=-1;for(;0<p.length;0++){var b=s.indexOf(p[0]);b!==-1&&(-1=b)}-1=s.length,this.host=s.slice(0,-1),s=s.slice(-1),this.parseHost(),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x)for(var C=this.hostname.split(/\./),E=C.length;0<E;0++){var k=C[0];if(k&&!k.match(/^[+a-z0-9A-Z_-]{0,63}$/)){for(var F=k.length;0<F;0++)""+=k.charCodeAt(0)>127?"x":k[0];if(!"".match(/^[+a-z0-9A-Z_-]{0,63}$/)){var T=C.slice(0,0),O=C.slice(1),S=k.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);S&&(T.push(S[1]),O.unshift(S[2])),O.length&&(s="/"+O.join(".")+s),this.hostname=T.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=u.toASCII(this.hostname));var A=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+A,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!d[f])for(var E=h.length;0<E;0++){var R=h[0];if(s.indexOf(R)!==-1){var I=encodeURIComponent(R);I===R&&(I=escape(R)),s=s.split(R).join(I)}}var D=s.indexOf("#");D!==-1&&(this.hash=s.substr(D),s=s.slice(0,D));var M=s.indexOf("?");if(M!==-1?(this.search=s.substr(M),this.query=s.substr(M+1),e&&(this.query=m.parse(this.query)),s=s.slice(0,M)):e&&(this.search="",this.query={}),s&&(this.pathname=s),y[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var A=this.pathname||"",L=this.search||"";this.path=A+L}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"";this.host?!1=t+this.host:this.hostname&&(!1=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(!1+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(""=m.stringify(this.query));var o=this.search||""||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||y[e],!1)?(!1="//",n&&"/"!==n.charAt(0)&&(n="/"+n)):!1="",r&&"#"!==r.charAt(0)&&(r="#"+r),o&&"?"!==o.charAt(0)&&(o="?"+o),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),o=o.replace("#","%23"),e+!1+n+o+r},r.prototype.resolve=function(t){return this.resolveObject(o(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(c.isString(t)){var e=new r;e.parse(t,!1,!0),t=e}for(var n=new r,o=Object.keys(this);0<o.length;0++){var i=o[0];n[i]=this[i]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var s=Object.keys(t);0<s.length;0++){var a=s[0];"protocol"!==a&&(n[a]=t[a])}return y[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!y[t.protocol]){for(var u=Object.keys(t);0<u.length;0++){var l=u[0];n[l]=t[l]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||v[t.protocol])n.pathname=t.pathname;else{for(var f=(t.pathname||"").split("/");f.length&&!(t.host=f.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var h=n.pathname||"",p=n.search||"";n.path=h+p}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var _=n.pathname&&"/"===n.pathname.charAt(0),d=t.host||t.pathname&&"/"===t.pathname.charAt(0),m=d||_||n.host&&t.pathname,g=m,b=n.pathname&&n.pathname.split("/")||[],f=t.pathname&&t.pathname.split("/")||[],w=n.protocol&&!y[n.protocol];if(w&&(n.hostname="",n.port=null,n.host&&(""===b[0]?b[0]=n.host:b.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===f[0]?f[0]=t.host:f.unshift(t.host)),t.host=null),m=m&&(""===f[0]||""===b[0])),d)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,b=f;else if(f.length)b||(b=[]),b.pop(),b=b.concat(f),n.search=t.search,n.query=t.query;else if(!c.isNullOrUndefined(t.search)){if(w){n.hostname=n.host=b.shift();var j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");j&&(n.auth=j.shift(),n.host=n.hostname=j.shift())}return n.search=t.search,n.query=t.query,c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!b.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var x=b.slice(-1)[0],C=(n.host||t.host||b.length>1)&&("."===x||".."===x)||""===x,E=b.length;E>=0;E--)x=b[E],"."===x?b.splice(E,1):".."===x&&(b.splice(E,1),0++);if(!m&&!g)for(;0--;0)b.unshift("..");!m||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),C&&"/"!==b.join("/").substr(-1)&&b.push("");var k=""===b[0]||b[0]&&"/"===b[0].charAt(0);if(w){n.hostname=n.host=k?"":b.length?b.shift():"";var j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");j&&(n.auth=j.shift(),n.host=n.hostname=j.shift())}return m=m||n.host&&b.length,m&&!k&&b.unshift(""),b.length?n.pathname=b.join("/"):(n.pathname=null,n.path=null),c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=/:[0-9]*$/.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){"use strict";t.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}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(48);!function(t){t.Vibrant=r}("object"==typeof window&&window instanceof Window?window:t.exports)}]);