You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
39 KiB
81 lines
39 KiB
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};$jscomp.assign="function"==typeof Object.assign?Object.assign:function(a,b){for(var h=1;h<arguments.length;h++){var d=arguments[h];if(d)for(var f in d)$jscomp.owns(d,f)&&(a[f]=d[f])}return a};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;
|
|
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,h){a!=Array.prototype&&a!=Object.prototype&&(a[b]=h.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);
|
|
$jscomp.polyfill=function(a,b,h,d){if(b){h=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var f=a[d];f in h||(h[f]={});h=h[f]}a=a[a.length-1];d=h[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(h,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Object.assign",function(a){return a||$jscomp.assign},"es6","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};
|
|
$jscomp.Symbol=function(){var a=0;return function(b){return $jscomp.SYMBOL_PREFIX+(b||"")+a++}}();$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};
|
|
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.asyncIterator;a||(a=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.arrayIterator=function(a){var b=0;return $jscomp.iteratorPrototype(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})};
|
|
$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};$jscomp.polyfill("Array.from",function(a){return a?a:function(a,h,d){$jscomp.initSymbolIterator();h=null!=h?h:function(c){return c};var b=[],l=a[Symbol.iterator];if("function"==typeof l){a=l.call(a);for(var c=0;!(l=a.next()).done;)b.push(h.call(d,l.value,c++))}else for(l=a.length,c=0;c<l;c++)b.push(h.call(d,a[c],c));return b}},"es6","es3");
|
|
$jscomp.iteratorFromArray=function(a,b){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var h=0,d={next:function(){if(h<a.length){var f=h++;return{value:b(f,a[f]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6","es3");
|
|
$jscomp.makeIterator=function(a){$jscomp.initSymbolIterator();var b=a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
|
|
$jscomp.polyfill("Promise",function(a){function b(){this.batch_=null}function h(c){return c instanceof f?c:new f(function(a,k){a(c)})}if(a&&!$jscomp.FORCE_POLYFILL_PROMISE)return a;b.prototype.asyncExecute=function(c){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(c);return this};b.prototype.asyncExecuteBatch_=function(){var c=this;this.asyncExecuteFunction(function(){c.executeBatch_()})};var d=$jscomp.global.setTimeout;b.prototype.asyncExecuteFunction=function(c){d(c,
|
|
0)};b.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var c=this.batch_;this.batch_=[];for(var a=0;a<c.length;++a){var k=c[a];c[a]=null;try{k()}catch(e){this.asyncThrow_(e)}}}this.batch_=null};b.prototype.asyncThrow_=function(c){this.asyncExecuteFunction(function(){throw c;})};var f=function(c){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var a=this.createResolveAndReject_();try{c(a.resolve,a.reject)}catch(k){a.reject(k)}};f.prototype.createResolveAndReject_=
|
|
function(){function c(c){return function(e){k||(k=!0,c.call(a,e))}}var a=this,k=!1;return{resolve:c(this.resolveTo_),reject:c(this.reject_)}};f.prototype.resolveTo_=function(c){if(c===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(c instanceof f)this.settleSameAsPromise_(c);else{a:switch(typeof c){case "object":var a=null!=c;break a;case "function":a=!0;break a;default:a=!1}a?this.resolveToNonPromiseObj_(c):this.fulfill_(c)}};f.prototype.resolveToNonPromiseObj_=function(c){var a=
|
|
void 0;try{a=c.then}catch(k){this.reject_(k);return}"function"==typeof a?this.settleSameAsThenable_(a,c):this.fulfill_(c)};f.prototype.reject_=function(a){this.settle_(2,a)};f.prototype.fulfill_=function(a){this.settle_(1,a)};f.prototype.settle_=function(a,b){if(0!=this.state_)throw Error("Cannot settle("+a+", "+b+"): Promise already settled in state"+this.state_);this.state_=a;this.result_=b;this.executeOnSettledCallbacks_()};f.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var a=
|
|
0;a<this.onSettledCallbacks_.length;++a)l.asyncExecute(this.onSettledCallbacks_[a]);this.onSettledCallbacks_=null}};var l=new b;f.prototype.settleSameAsPromise_=function(a){var c=this.createResolveAndReject_();a.callWhenSettled_(c.resolve,c.reject)};f.prototype.settleSameAsThenable_=function(a,b){var c=this.createResolveAndReject_();try{a.call(b,c.resolve,c.reject)}catch(e){c.reject(e)}};f.prototype.then=function(a,b){function c(a,c){return"function"==typeof a?function(c){try{e(a(c))}catch(q){g(q)}}:
|
|
c}var e,g,d=new f(function(a,c){e=a;g=c});this.callWhenSettled_(c(a,e),c(b,g));return d};f.prototype.catch=function(a){return this.then(void 0,a)};f.prototype.callWhenSettled_=function(a,b){function c(){switch(e.state_){case 1:a(e.result_);break;case 2:b(e.result_);break;default:throw Error("Unexpected state: "+e.state_);}}var e=this;null==this.onSettledCallbacks_?l.asyncExecute(c):this.onSettledCallbacks_.push(c)};f.resolve=h;f.reject=function(a){return new f(function(c,b){b(a)})};f.race=function(a){return new f(function(c,
|
|
b){for(var e=$jscomp.makeIterator(a),k=e.next();!k.done;k=e.next())h(k.value).callWhenSettled_(c,b)})};f.all=function(a){var c=$jscomp.makeIterator(a),b=c.next();return b.done?h([]):new f(function(a,k){function e(c){return function(e){g[c]=e;m--;0==m&&a(g)}}var g=[],m=0;do g.push(void 0),m++,h(b.value).callWhenSettled_(e(g.length-1),k),b=c.next();while(!b.done)})};return f},"es6","es3");$jscomp.polyfill("Object.getOwnPropertySymbols",function(a){return a?a:function(){return[]}},"es6","es5");
|
|
$jscomp.polyfill("Reflect.ownKeys",function(a){return a?a:function(a){var b=[],d=Object.getOwnPropertyNames(a);a=Object.getOwnPropertySymbols(a);for(var f=0;f<d.length;f++)("jscomp_symbol_"==d[f].substring(0,14)?a:b).push(d[f]);return b.concat(a)}},"es6","es5");$jscomp.findInternal=function(a,b,h){a instanceof String&&(a=String(a));for(var d=a.length,f=0;f<d;f++){var l=a[f];if(b.call(h,l,f,a))return{i:f,v:l}}return{i:-1,v:void 0}};
|
|
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,h){return $jscomp.findInternal(this,a,h).v}},"es6","es3");$jscomp.polyfill("Array.prototype.findIndex",function(a){return a?a:function(a,h){return $jscomp.findInternal(this,a,h).i}},"es6","es3");
|
|
var _slicedToArray=function(){return function(a,b){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a)){var h=[],d=!0,f=!1,l=void 0;try{for(var c=a[Symbol.iterator](),g;!(d=(g=c.next()).done)&&(h.push(g.value),!b||h.length!==b);d=!0);}catch(k){f=!0,l=k}finally{try{if(!d&&c["return"])c["return"]()}finally{if(f)throw l;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),_createClass=function(){function a(a,h){for(var b=0;b<h.length;b++){var f=h[b];f.enumerable=
|
|
f.enumerable||!1;f.configurable=!0;"value"in f&&(f.writable=!0);Object.defineProperty(a,f.key,f)}}return function(b,h,d){h&&a(b.prototype,h);d&&a(b,d);return b}}(),_extends2=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var h=arguments[b],d;for(d in h)Object.prototype.hasOwnProperty.call(h,d)&&(a[d]=h[d])}return a},_typeof2="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&
|
|
a!==Symbol.prototype?"symbol":typeof a},_templateObject=_taggedTemplateLiteral([""," is not an array"],[""," is not an array"]),_templateObject2=_taggedTemplateLiteral([""," is not an object"],[""," is not an object"]),_templateObject3=_taggedTemplateLiteral([""," doesn't have length ",""],[""," doesn't have length ",""]),_templateObject4=_taggedTemplateLiteral([""," is not equal to ",""],[""," is not equal to ",""]),_templateObject5=_taggedTemplateLiteral([""," is not deeply equal to ",""],[""," is not deeply equal to ",
|
|
""]),_templateObject6=_taggedTemplateLiteral([""," does not contain ",""],[""," does not contain ",""]),_templateObject7=_taggedTemplateLiteral([""," is not true"],[""," is not true"]),_templateObject8=_taggedTemplateLiteral([""," is not false"],[""," is not false"]),_templateObject9=_taggedTemplateLiteral([""," does not have property '","'"],[""," does not have property '","'"]),_templateObject10=_taggedTemplateLiteral(["<","> does not exist in ",""],["<","> does not exist in ",""]),_templateObject11=
|
|
_taggedTemplateLiteral([""," is not a promise"],[""," is not a promise"]),_templateObject12=_taggedTemplateLiteral(["'","' does not resolve to '","'"],["'","' does not resolve to '","'"]),_templateObject13=_taggedTemplateLiteral(["'","' is not of type '","'"],["'","' is not of type '","'"]),_templateObject14=_taggedTemplateLiteral(["'","' is not greater than ",""],["'","' is not greater than ",""]),_templateObject15=_taggedTemplateLiteral(["'","' is not less than ",""],["'","' is not less than ",
|
|
""]),_templateObject16=_taggedTemplateLiteral(["'","' is less than ",""],["'","' is less than ",""]),_templateObject17=_taggedTemplateLiteral(["'","' is greater than ",""],["'","' is greater than ",""]);function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!==typeof b&&"function"!==typeof b?a:b}
|
|
function _inherits(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function _taggedTemplateLiteral(a,b){return Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}
|
|
function _toArray(a){return Array.isArray(a)?a:Array.from(a)}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");}function _defineProperty2(a,b,h){b in a?Object.defineProperty(a,b,{value:h,enumerable:!0,configurable:!0,writable:!0}):a[b]=h;return a}function _toConsumableArray2(a){if(Array.isArray(a)){for(var b=0,h=Array(a.length);b<a.length;b++)h[b]=a[b];return h}return Array.from(a)}
|
|
(function(a){"object"===("undefined"===typeof exports?"undefined":_typeof2(exports))&&"undefined"!==typeof module?module.exports=a():"function"===typeof define&&define.amd?define([],a):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).Gunner=a()})(function(){return function(){function a(b,h,d){function f(c,k){if(!h[c]){if(!b[c]){var e="function"==typeof require&&require;if(!k&&e)return e(c,!0);if(l)return l(c,!0);k=Error("Cannot find module '"+
|
|
c+"'");throw k.code="MODULE_NOT_FOUND",k;}k=h[c]={exports:{}};b[c][0].call(k.exports,function(a){return f(b[c][1][a]||a)},k,k.exports,a,b,h,d)}return h[c].exports}for(var l="function"==typeof require&&require,c=0;c<d.length;c++)f(d[c]);return f}return a}()({1:[function(a,b,h){b.exports=a("../src/gunner")},{"../src/gunner":8}],2:[function(a,b,h){(function(d){(function(a){"object"===("undefined"===typeof h?"undefined":_typeof2(h))&&"undefined"!==typeof b?b.exports=a():("undefined"!==typeof window?window:
|
|
"undefined"!==typeof d?d:"undefined"!==typeof self?self:this).isEq=a()})(function(){return function(){function b(f,c,g){function k(m,d){if(!c[m]){if(!f[m]){var l="function"==typeof a&&a;if(!d&&l)return l(m,!0);if(e)return e(m,!0);d=Error("Cannot find module '"+m+"'");throw d.code="MODULE_NOT_FOUND",d;}d=c[m]={exports:{}};f[m][0].call(d.exports,function(a){var c=f[m][1][a];return k(c?c:a)},d,d.exports,b,f,c,g)}return c[m].exports}for(var e="function"==typeof a&&a,m=0;m<g.length;m++)k(g[m]);return k}
|
|
return b}()({1:[function(a,b,c){var g="function"===typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(a){return"undefined"===typeof a?"undefined":_typeof2(a)}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":"undefined"===typeof a?"undefined":_typeof2(a)};b.exports=function n(a,c,b){if(a===c)return!0;if(("undefined"===typeof a?"undefined":g(a))!==("undefined"===typeof c?"undefined":g(c))||Array.isArray(a)&&!Array.isArray(c)||Array.isArray(c)&&
|
|
!Array.isArray(a))return!1;if("number"===typeof a)return isNaN(a)&&isNaN(c)?!1:a===c;if("string"===typeof a||"boolean"===typeof a||null===a||void 0===a)return a===c;if(a instanceof RegExp)return String(a)===String(c);if("object"!==("undefined"===typeof a?"undefined":g(a))||"object"!==("undefined"===typeof c?"undefined":g(c)))return a===c;var e=Object.keys(a),m=Object.keys(c);if(!b&&(b=e,e.length!==m.length))return!1;if(!Array.isArray(b))throw Error("[isEq] third parameter should be an array of keys!");
|
|
if(0===b.length)return!0;for(var d in b)if(e=b[d],Array.isArray(a[e])&&Array.isArray(c[e])&&(e=d),a[e]!==c[e])if(g("object"===a[e])&&g("object"===c[e])||Array.isArray(a[e])&&Array.isArray(c[e])){if(!n(a[e],c[e]))return!1}else return!1;return!0}},{}]},{},[1])(1)})}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],3:[function(a,b,h){(function(d){function f(a,c,b){c in a?Object.defineProperty(a,c,{value:b,enumerable:!0,configurable:!0,
|
|
writable:!0}):a[c]=b;return a}function l(a){if(Array.isArray(a)){for(var c=0,b=Array(a.length);c<a.length;c++)b[c]=a[c];return b}return Array.from(a)}var c=Object.assign||function(a){for(var c=1;c<arguments.length;c++){var b=arguments[c],g;for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(a[g]=b[g])}return a},g="function"===typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(a){return"undefined"===typeof a?"undefined":_typeof2(a)}:function(a){return a&&"function"===typeof Symbol&&a.constructor===
|
|
Symbol&&a!==Symbol.prototype?"symbol":"undefined"===typeof a?"undefined":_typeof2(a)};(function(a){"object"===("undefined"===typeof h?"undefined":g(h))&&"undefined"!==typeof b?b.exports=a():("undefined"!==typeof window?window:"undefined"!==typeof d?d:"undefined"!==typeof self?self:this).promiseObject=a()})(function(){return function(){function c(b,g,d){function e(k,m){if(!g[k]){if(!b[k]){var l="function"==typeof a&&a;if(!m&&l)return l(k,!0);if(f)return f(k,!0);m=Error("Cannot find module '"+k+"'");
|
|
throw m.code="MODULE_NOT_FOUND",m;}m=g[k]={exports:{}};b[k][0].call(m.exports,function(a){return e(b[k][1][a]||a)},m,m.exports,c,b,g,d)}return g[k].exports}for(var f="function"==typeof a&&a,k=0;k<d.length;k++)e(d[k]);return e}return c}()({1:[function(a,c,b){c.exports=a("../index.js")},{"../index.js":2}],2:[function(a,b,d){var e=function(a){return a&&"object"===("undefined"===typeof a?"undefined":g(a))&&a.constructor===Object},k="undefined"!==typeof Symbol?Symbol("SELF"):"[~~//-- SELF --//~~]",m=function(a,
|
|
c){return function w(b){return Object.keys(b).reduce(function(g,k){var d=b[k];return d===c?(b[k]=a,[].concat(l(g),[k])):e(d)?[].concat(l(g),l(w(d,c))):g},[])}(a)},h=function(a,c){return Promise.all(a.map(function(a){return Promise.resolve(a).then(c)}))},q=function(a){return Promise.all(Object.keys(a).map(function(c){return Promise.resolve(a[c]).then(function(b){return a[c]=b})})).then(function(c){return a})};b.exports=function(a){var b=!1;return function w(g){return Promise.resolve(g).then(function(g){return Array.isArray(g)?
|
|
h(g,function(a){return w(a)}):e(g)?q(Object.keys(g).reduce(function(e,d){return g[d]===a?(b=!0,c({},e,f({},d,k))):c({},e,f({},d,w(g[d])))},{})):g})}(a).then(function(a){b&&m(a,k);return a})}},{}]},{},[1])(1)})}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../index.js":4}],4:[function(a,b,h){var d=function(a){return a&&"object"===("undefined"===typeof a?"undefined":_typeof2(a))&&a.constructor===Object},f="undefined"!==typeof Symbol?
|
|
Symbol("SELF"):"[~~//-- SELF --//~~]",l=function(a,c){return function n(b){return Object.keys(b).reduce(function(e,g){var k=b[g];return k===c?(b[g]=a,[].concat(_toConsumableArray2(e),[g])):d(k)?[].concat(_toConsumableArray2(e),_toConsumableArray2(n(k,c))):e},[])}(a)},c=function(a,c){return Promise.all(a.map(function(a){return Promise.resolve(a).then(c)}))},g=function(a){return Promise.all(Object.keys(a).map(function(c){return Promise.resolve(a[c]).then(function(b){return a[c]=b})})).then(function(c){return a})};
|
|
b.exports=function(a){var b=!1;return function n(e){return Promise.resolve(e).then(function(e){return Array.isArray(e)?c(e,function(a){return n(a)}):d(e)?g(Object.keys(e).reduce(function(c,g){return e[g]===a?(b=!0,_extends2({},c,_defineProperty2({},g,f))):_extends2({},c,_defineProperty2({},g,n(e[g])))},{})):e})}(a).then(function(a){b&&l(a,f);return a})}},{}],5:[function(a,b,h){function d(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=p(null),this._eventsCount=
|
|
0);this._maxListeners=this._maxListeners||void 0}function f(a,c,b,e){var g;if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');if(g=a._events){g.newListener&&(a.emit("newListener",c,b.listener?b.listener:b),g=a._events);var f=g[c]}else g=a._events=p(null),a._eventsCount=0;f?("function"===typeof f?f=g[c]=e?[b,f]:[f,b]:e?f.unshift(b):f.push(b),f.warned||(b=void 0===a._maxListeners?d.defaultMaxListeners:a._maxListeners)&&0<b&&f.length>b&&(f.warned=!0,b=Error("Possible EventEmitter memory leak detected. "+
|
|
f.length+' "'+String(c)+'" listeners added. Use emitter.setMaxListeners() to increase limit.'),b.name="MaxListenersExceededWarning",b.emitter=a,b.type=c,b.count=f.length,"object"===("undefined"===typeof console?"undefined":_typeof2(console))&&console.warn&&console.warn("%s: %s",b.name,b.message))):(g[c]=b,++a._eventsCount);return a}function l(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,
|
|
arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var a=Array(arguments.length),c=0;c<a.length;++c)a[c]=arguments[c];this.listener.apply(this.target,a)}}function c(a,c,b){a={fired:!1,wrapFn:void 0,target:a,type:c,listener:b};c=q.call(l,a);c.listener=b;return a.wrapFn=c}function g(a,c,b){a=a._events;if(!a)return[];c=a[c];if(!c)return[];if("function"===typeof c)return b?
|
|
[c.listener||c]:[c];if(b)for(b=Array(c.length),a=0;a<b.length;++a)b[a]=c[a].listener||c[a];else b=e(c,c.length);return b}function k(a){var c=this._events;if(c){a=c[a];if("function"===typeof a)return 1;if(a)return a.length}return 0}function e(a,c){for(var b=Array(c),e=0;e<c;++e)b[e]=a[e];return b}function m(a){var c=function(){};c.prototype=a;return new c}function r(a){var c=[],b;for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return b}function n(a){var c=this;return function(){return c.apply(a,
|
|
arguments)}}var p=Object.create||m,t=Object.keys||r,q=Function.prototype.bind||n;b.exports=d;d.EventEmitter=d;d.prototype._events=void 0;d.prototype._maxListeners=void 0;var u=10;try{a={};Object.defineProperty&&Object.defineProperty(a,"x",{value:0});var v=0===a.x}catch(x){v=!1}v?Object.defineProperty(d,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(a){if("number"!==typeof a||0>a||a!==a)throw new TypeError('"defaultMaxListeners" must be a positive number');u=a}}):d.defaultMaxListeners=
|
|
u;d.prototype.setMaxListeners=function(a){if("number"!==typeof a||0>a||isNaN(a))throw new TypeError('"n" argument must be a positive number');this._maxListeners=a;return this};d.prototype.getMaxListeners=function(){return void 0===this._maxListeners?d.defaultMaxListeners:this._maxListeners};d.prototype.emit=function(a){var c,b,g;var d="error"===a;if(g=this._events)d=d&&null==g.error;else if(!d)return!1;if(d){1<arguments.length&&(c=arguments[1]);if(c instanceof Error)throw c;g=Error('Unhandled "error" event. ('+
|
|
c+")");g.context=c;throw g;}c=g[a];if(!c)return!1;g="function"===typeof c;var f=arguments.length;switch(f){case 1:if(g)c.call(this);else for(g=c.length,c=e(c,g),d=0;d<g;++d)c[d].call(this);break;case 2:d=arguments[1];if(g)c.call(this,d);else for(g=c.length,c=e(c,g),f=0;f<g;++f)c[f].call(this,d);break;case 3:d=arguments[1];f=arguments[2];if(g)c.call(this,d,f);else for(g=c.length,c=e(c,g),b=0;b<g;++b)c[b].call(this,d,f);break;case 4:d=arguments[1];f=arguments[2];b=arguments[3];if(g)c.call(this,d,f,
|
|
b);else{g=c.length;c=e(c,g);for(var k=0;k<g;++k)c[k].call(this,d,f,b)}break;default:d=Array(f-1);for(b=1;b<f;b++)d[b-1]=arguments[b];if(g)c.apply(this,d);else for(g=c.length,c=e(c,g),f=0;f<g;++f)c[f].apply(this,d)}return!0};d.prototype.addListener=function(a,c){return f(this,a,c,!1)};d.prototype.on=d.prototype.addListener;d.prototype.prependListener=function(a,c){return f(this,a,c,!0)};d.prototype.once=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');
|
|
this.on(a,c(this,a,b));return this};d.prototype.prependOnceListener=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');this.prependListener(a,c(this,a,b));return this};d.prototype.removeListener=function(a,c){var b;if("function"!==typeof c)throw new TypeError('"listener" argument must be a function');var g=this._events;if(!g)return this;var e=g[a];if(!e)return this;if(e===c||e.listener===c)0===--this._eventsCount?this._events=p(null):(delete g[a],
|
|
g.removeListener&&this.emit("removeListener",a,e.listener||c));else if("function"!==typeof e){var d=-1;for(b=e.length-1;0<=b;b--)if(e[b]===c||e[b].listener===c){var f=e[b].listener;d=b;break}if(0>d)return this;if(0===d)e.shift();else{b=d+1;for(var k=e.length;b<k;d+=1,b+=1)e[d]=e[b];e.pop()}1===e.length&&(g[a]=e[0]);g.removeListener&&this.emit("removeListener",a,f||c)}return this};d.prototype.removeAllListeners=function(a){var c=this._events;if(!c)return this;if(!c.removeListener)return 0===arguments.length?
|
|
(this._events=p(null),this._eventsCount=0):c[a]&&(0===--this._eventsCount?this._events=p(null):delete c[a]),this;if(0===arguments.length){var b=t(c);for(c=0;c<b.length;++c){var g=b[c];"removeListener"!==g&&this.removeAllListeners(g)}this.removeAllListeners("removeListener");this._events=p(null);this._eventsCount=0;return this}b=c[a];if("function"===typeof b)this.removeListener(a,b);else if(b)for(c=b.length-1;0<=c;c--)this.removeListener(a,b[c]);return this};d.prototype.listeners=function(a){return g(this,
|
|
a,!0)};d.prototype.rawListeners=function(a){return g(this,a,!1)};d.listenerCount=function(a,c){return"function"===typeof a.listenerCount?a.listenerCount(c):k.call(a,c)};d.prototype.listenerCount=k;d.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}},{}],6:[function(a,b,h){function d(a,b){var c=[],g=[];null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+g.slice(0,c.indexOf(b)).join(".")+"]"});return function(d,e){if(0<c.length){var f=c.indexOf(this);
|
|
~f?c.splice(f+1):c.push(this);~f?g.splice(f,Infinity,d):g.push(d);~c.indexOf(e)&&(e=b.call(this,d,e))}else c.push(e);return null==a?e:a.call(this,d,e)}}h=b.exports=function(a,b,c,g){return JSON.stringify(a,d(b,g),c)};h.getSerialize=d},{}],7:[function(a,b,h){function d(){throw Error("setTimeout has not been defined");}function f(){throw Error("clearTimeout has not been defined");}function l(a){if(r===setTimeout)return setTimeout(a,0);if((r===d||!r)&&setTimeout)return r=setTimeout,setTimeout(a,0);try{return r(a,
|
|
0)}catch(x){try{return r.call(null,a,0)}catch(y){return r.call(this,a,0)}}}function c(a){if(n===clearTimeout)return clearTimeout(a);if((n===f||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(a);try{return n(a)}catch(x){try{return n.call(null,a)}catch(y){return n.call(this,a)}}}function g(){t&&q&&(t=!1,q.length?p=q.concat(p):u=-1,p.length&&k())}function k(){if(!t){var a=l(g);t=!0;for(var b=p.length;b;){q=p;for(p=[];++u<b;)q&&q[u].run();u=-1;b=p.length}q=null;t=!1;c(a)}}function e(a,c){this.fun=
|
|
a;this.array=c}function m(){}a=b.exports={};try{var r="function"===typeof setTimeout?setTimeout:d}catch(v){r=d}try{var n="function"===typeof clearTimeout?clearTimeout:f}catch(v){n=f}var p=[],t=!1,q,u=-1;a.nextTick=function(a){var c=Array(arguments.length-1);if(1<arguments.length)for(var b=1;b<arguments.length;b++)c[b-1]=arguments[b];p.push(new e(a,c));1!==p.length||t||l(k)};e.prototype.run=function(){this.fun.apply(null,this.array)};a.title="browser";a.browser=!0;a.env={};a.argv=[];a.version="";a.versions=
|
|
{};a.on=m;a.addListener=m;a.once=m;a.off=m;a.removeListener=m;a.removeAllListeners=m;a.emit=m;a.prependListener=m;a.prependOnceListener=m;a.listeners=function(a){return[]};a.binding=function(a){throw Error("process.binding is not supported");};a.cwd=function(){return"/"};a.chdir=function(a){throw Error("process.chdir is not supported");};a.umask=function(){return 0}},{}],8:[function(a,b,h){(function(d){var f=a("./util").arrayOrPush,l=a("./lib/caller"),c=a("./lib/emitter"),g=a("./reporters"),k=a("./lib/testrunner"),
|
|
e=a("./lib/expect"),m=a("./util/symbols"),h=function(){function a(c){var b,g;_classCallCheck(this,a);this.name=c;this.__suite__={tests:[],beforeHooks:(b={},_defineProperty2(b,m.Start,[]),_defineProperty2(b,m.End,[]),_defineProperty2(b,"*",[]),b),afterHooks:(g={},_defineProperty2(g,m.Start,[]),_defineProperty2(g,m.End,[]),_defineProperty2(g,"*",[]),g)}}_createClass(a,[{key:"test",value:function(a,c){if(this.__suite__.tests.find(function(c){return c.description===a}))throw Error("Test '"+a+"' already exists!");
|
|
this.__suite__.tests.push({description:a,type:"test",run:function(a){return l(c,a)}});return this}},{key:"before",value:function(a,c,b){f(this.__suite__.beforeHooks,a,{description:a,label:b,type:"hook",run:function(a){return l(c,a)}});return this}},{key:"after",value:function(a,c,b){f(this.__suite__.afterHooks,a,{description:a,label:b,type:"hook",run:function(a){return l(c,a)}});return this}},{key:"run",value:function(){var a=this,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!0===
|
|
b.reporter)g.default(c,b);else if("function"===typeof b.reporter)b.reporter(c,b);else if(g[b.reporter])g[b.reporter](c,b);c.emit("start");return k(this,b).then(function(e){var f;e.count=e.length;e.success=e.filter(function(a){return"ok"===a.status});e.failures=e.filter(function(a){return"notOk"===a.status});e.skipped=e.filter(function(a){return"skip"===a.status});e.successPercent=Math.floor(e.success.length/e.length*100);e.name=a.name;100!==e.successPercent&&"undefined"!==typeof d&&(d.exitCode=1);
|
|
c.emit("test end",e);c.emit("end",e);return b.request?(f={},_defineProperty2(f,b.request,g[b.request].convert(e)),_defineProperty2(f,"json",e),f):e})}}]);return a}();b.exports=h;b.exports.expect=e;b.exports.expectMany=e.expectMany;b.exports.Start=m.Start;b.exports.End=m.End;b.exports.Gunner=b.exports}).call(this,a("_process"))},{"./lib/caller":12,"./lib/emitter":13,"./lib/expect":14,"./lib/testrunner":15,"./reporters":17,"./util":20,"./util/symbols":21,_process:7}],9:[function(a,b,h){var d=a("../util").isPromise,
|
|
f=function(a){for(var c=arguments.length,b=Array(1<c?c-1:0),d=1;d<c;d++)b[d-1]=arguments[d];return Promise.reject(a?a.apply(void 0,b):"")};b.exports=function(a,c){var b=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},k=_toArray(c),e=k[0],m=k.slice(1);e=b.skipStatement?function(){return b.skipStatement}:e;return d(a)?a.catch(function(){return f.apply(void 0,[e].concat(_toConsumableArray2(m)))}):a?Promise.resolve():f.apply(void 0,[e].concat(_toConsumableArray2(m)))}},{"../util":20}],10:[function(a,
|
|
b,h){var d=a("@codefeathers/iseq"),f=a("../util"),l=f.taggedStringify;b.exports.done=[function(){return!0},function(){return null}];b.exports.fail=[function(){return!1},function(a,b){return b}];b.exports.exists=[function(a){return"undefined"!==typeof a},function(){return"Value is undefined"}];b.exports.isArray=[function(a){return Array.isArray(a)},function(a){return l(_templateObject,a)}];b.exports.isObject=[function(a){return"object"===("undefined"===typeof a?"undefined":_typeof2(a))&&null!==a},
|
|
function(a){return l(_templateObject2,a)}];b.exports.hasLength=[function(a,b){return a.length===b},function(a,b){return l(_templateObject3,a,b)}];b.exports.equals=[function(a,b){return a===b},function(a,b){return l(_templateObject4,a,b)}];b.exports.deepEquals=[function(a,b){return d(a,b)},function(a,b){return l(_templateObject5,a,b)}];b.exports.contains=[function(a,b){return d(a,b,Object.keys(b))},function(a,b){return l(_templateObject6,a,b)}];b.exports.isTrue=[function(a){return!0===a},function(a){return l(_templateObject7,
|
|
a)}];b.exports.isFalse=[function(a){return!1===a},function(a){return l(_templateObject8,a)}];b.exports.hasProp=[function(a,b){return a.hasOwnProperty(b)},function(a,b){return l(_templateObject9,a,b)}];b.exports.hasPair=[function(a){for(var c=arguments.length,b=Array(1<c?c-1:0),e=1;e<c;e++)b[e-1]=arguments[e];return d(a[b[0]],b[1])},function(a){for(var c=arguments.length,b=Array(1<c?c-1:0),e=1;e<c;e++)b[e-1]=arguments[e];return l(_templateObject10,b,a)}];b.exports.isPromise=[function(a){return f.isPromise(a)},
|
|
function(a){return l(_templateObject11,a)},{shouldCatch:!0}];b.exports.resolvesTo=[function(a,b){return f.isPromise(a)?a.then(function(a){return a===b?Promise.resolve():Promise.reject()}):Promise.reject(a+" was not a Promise")},function(a,b){return l(_templateObject12,a,b)}];b.exports.isType=[function(a,b){return"nil"===b&&("null"===a||"undefined"===a)||("undefined"===typeof a?"undefined":_typeof2(a))===b||Array.isArray(a)&&"array"===b&&null===a&&"object"!==b},function(a,b){return l(_templateObject13,
|
|
a,b)}];b.exports.greaterThan=[function(a,b){return a>b},function(a,b){return l(_templateObject14,a,b)}];b.exports.lessThan=[function(a,b){return a<b},function(a,b){return l(_templateObject15,a,b)}];b.exports.gte=[function(a,b){return a>=b},function(a,b){return l(_templateObject16,a,b)}];b.exports.lte=[function(a,b){return a<=b},function(a,b){return l(_templateObject17,a,b)}];b.exports.success=b.exports.done;b.exports.succeed=b.exports.done;b.exports.failure=b.exports.fail;b.exports.equal=b.exports.equals;
|
|
b.exports.deepEqual=b.exports.deepEquals;b.exports.match=b.exports.deepEquals;b.exports.greaterThanOrEqualTo=b.exports.gte;b.exports.lessThanOrEqualTo=b.exports.lte},{"../util":20,"@codefeathers/iseq":2}],11:[function(a,b,h){a("../gunner");var d=a("../util/symbols"),f=function(a){return function(b){return{type:a,unit:b}}};b.exports=function(a){var b=[];Array.prototype.push.apply(b,a.__suite__.beforeHooks[d.Start].map(f("@start")));b.push.apply(a.__suite__.afterHooks[d.Start].map(f("@start")));a.__suite__.tests.forEach(function(c){return Array.prototype.push.apply(b,
|
|
a.__suite__.beforeHooks["*"].map(f("@every"))),Array.prototype.push.apply(b,(a.__suite__.beforeHooks[c.description]||[]).map(f("@this"))),b.push(f("@test")(c)),Array.prototype.push.apply(b,(a.__suite__.afterHooks[c.description]||[]).map(f("@afterTest"))),Array.prototype.push.apply(b,a.__suite__.afterHooks["*"].map(f("@afterEvery")))});Array.prototype.push.apply(b,a.__suite__.beforeHooks[d.End].map(f("@beforeend")));Array.prototype.push.apply(b,a.__suite__.afterHooks[d.End].map(f("@end")));return b}},
|
|
{"../gunner":8,"../util/symbols":21}],12:[function(a,b,h){var d=a("../util").isPromise;b.exports=function(a,b){var c=void 0,f=void 0,k=void 0;try{c=a(b)}catch(e){k=!0,f=e}return d(c)?c.then(function(a){return{status:"ok",resolve:a,promise:!0}}).catch(function(a){return{status:"notOk",rejection:a,promise:!0}}):Promise.resolve(_extends2({status:k?"notOk":"ok"},!k&&{value:c},k&&{error:f},{promise:!1}))}},{"../util":20}],13:[function(a,b,h){a=function(a){function b(){_classCallCheck(this,b);return _possibleConstructorReturn(this,
|
|
(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}_inherits(b,a);return b}(a("events"));b.exports=new a},{events:5}],14:[function(a,b,h){h=a("../util");var d=h.liftPromise,f=h.lowerCaseFirstLetter,l=a("./assertionsLibrary"),c=a("./assertPromise"),g=function(a,b){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return function(f){return function(){for(var g=arguments.length,m=Array(g),k=0;k<g;k++)m[k]=arguments[k];return d(function(e){return c(a.apply(void 0,[f].concat(m)),
|
|
[b,e].concat(m))},f).catch(function(d){return e.shouldCatch?c(a.apply(void 0,[f].concat(m)),[b,d].concat(m),{skipStatement:d}):Promise.reject(d)})}}},k=Object.keys(l).reduce(function(a,b){var c=_slicedToArray(l[b],3);a[b]=g(c[0],c[1],c[2]);return a},{});b.exports=function(a,b){return new Proxy({},{get:function(c,e){var d=b?a.apply(void 0,_toConsumableArray2(b)):a;if(k.hasOwnProperty(e))return function(){return k[e](d).apply(void 0,arguments)};if("not"===e.slice(0,3))return function(){return k[f(e.slice(3))](d).apply(void 0,
|
|
arguments).then(Promise.reject,Promise.resolve)};throw Error("Unknown assertion method",e);}})};b.exports.expectMany=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return Promise.all(b)}},{"../util":20,"./assertPromise":9,"./assertionsLibrary":10}],15:[function(a,b,h){a("../gunner");Promise.object=a("@codefeathers/promise.object");h=a("../util");var d=h.last,f=h.pipe,l=h.pick,c=h.assignToObject,g=a("./buildTestQueue"),k=function(a,b){var c=a.findIndex(function(a){return"@start"===
|
|
a.type}),e=a.findIndex(function(a){return"@every"===a.type}),d=a.findIndex(function(a){return a.description===b.description});return-1!==c&&"A start hook failed\n"+a[c].error||-1!==e&&"An every hook failed\n"+a[e].error||-1!==d&&"A before test hook failed\n"+a[d].error},e=function(a){return a.reduce(function(b,e){return Promise.resolve(b).then(function(b){return Promise.all([d(b.results),Promise.object(b.state)]).then(function(a){a=_slicedToArray(a,2)[1];return[k(b.skip,e.unit),a]}).then(function(a){var b=
|
|
_slicedToArray(a,2);a=b[0];b=b[1];return a?{status:"skip",description:a}:e.unit.run(b)}).then(function(d){var f=d.status;if("@test"===e.type){var g=_extends2({status:f,description:e.unit.description},("notOk"===f||"skip"===f)&&{reason:d.error||d.rejection||d.description});b.results.push(g)}else{g=e.unit.label||a.filter(function(a){return a.type===e.type}).filter(function(a){return a.unit.description===e.unit.description}).length;var k="ok"===f?d.promise?d.resolve:d.value:null;g&&k&&c(b.state,e.type)(g,
|
|
k)}"notOk"===f&&b.skip.push({type:e.type,description:e.unit.description,error:d.promise?d.rejection:d.error});return b})})},{results:[],state:{},skip:[]})};b.exports=function(a){return Promise.object(f(g,e,l("results"))(a))}},{"../gunner":8,"../util":20,"./buildTestQueue":11,"@codefeathers/promise.object":3}],16:[function(a,b,h){var d={ok:["ok","\u2705"],notOk:["notOk","\u274c"],skip:["skip","\u26a0\ufe0f"]};b.exports=function(a,b){a.on("start",function(){return console.log("Started tests")});a.on("test end",
|
|
function(a){a.forEach(function(a){var c=d[a.status];console.log(">",c[0],c[1],a.description);b.trace&&a.reason&&console.log("\n---\n\n",a.reason,"\n\n---\n")})});a.on("end",function(a){console.log(a.success.length,"tests of",a.length,"passed");console.log("Success ratio:",a.successPercent,"%")})};b.exports.convert=function(a){return a}},{}],17:[function(a,b,h){b.exports={default:a("./default"),tap:a("./tap"),xunit:a("./xunit")}},{"./default":16,"./tap":18,"./xunit":19}],18:[function(a,b,h){var d=
|
|
{ok:"ok",notOk:"not ok",skip:"skip"},f=function(a,b){return"\nTAP version 13\n"+(a.length?"1":0)+".."+a.length+"\n"+a.map(function(a,c){var e=b.trace&&a.reason&&(a.reason.stack?a.reason.stack:a.reason)||"";return d[a.status]+" "+(c+1)+" - "+a.description+(e&&"\n ---\n message: |\n "+e+"\n ---\n")}).join("\n")+"\n"};b.exports=function(a,b){a.on("end",function(a){return console.log(f(a,b))})};b.exports.convert=f},{}],19:[function(a,b,h){var d=function(a,b,d,f){d=d?"/>":">";var c=[],g=void 0;Object.keys(b).forEach(function(a){Object.prototype.hasOwnProperty.call(b,
|
|
a)&&c.push(a+'="'+b[a]+'"')});g="<"+a+(c.length?" "+c.join(" "):"")+d;f&&(g+=f+"</"+a+d);return new String(g)},f=function(a){return'<?xml version="1.0"?>'+d("testsuites",{},!1,d("testsuite",{tests:a.count,success:a.success.length,failures:a.failures.length,skipped:a.skipped.length},!1,a.reduce(function(a,b){var c="ok"===b.status,e="ok"!==b.status&&("skip"===b.status?d("skipped",{},!0):d("failure",{},!b.reason,b.reason?escape(b.reason):""));return a+=d("testcase",{name:escape(b.description)},c,e||
|
|
"")},"")))};b.exports=function(a){a.on("end",function(a){console.log(f(a))})};b.exports.convert=f},{}],20:[function(a,b,h){var d=a("json-stringify-safe"),f=function(a){return a&&"object"===("undefined"===typeof a?"undefined":_typeof2(a))},l=function(a){return f(a)?a.stack||d(a):a},c=function(a){return a&&"function"===typeof a.then},g=function(a,b){return c(b)?b.then(a):a(b)};b.exports={isObject:f,isPromise:c,liftPromise:g,path:function(a){return function(b){return b.reduce(function(a,b){return a&&
|
|
a[b]},a)}},pick:function(a){return function(b){return b[a]}},pipe:function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return function(a){return b.reduce(function(a,b){return g(b,a)},a)}},reduce:function(a,b){return function(c){return c.reduce(a,b)}},flatten:function(a){return[].concat.apply([],a)},deepFlatten:function m(a){var b;return(b=[]).concat.apply(b,_toConsumableArray2(a.map(function(a){return Array.isArray(a)?m(a):a})))},map:function(a){return function(b){return b.map(a)}},
|
|
filter:function(a){return function(b){return b.filter(a)}},identity:function(a){return a},wrapWith:function(a){return function(b){return _defineProperty2({},a,b)}},unwrapFrom:function(a){return function(b){return b[a]}},promiseAll:function(a){return Promise.all(a)},partial:function(a){for(var b=arguments.length,c=Array(1<b?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];return function(){for(var b=arguments.length,d=Array(b),e=0;e<b;e++)d[e]=arguments[e];return a.apply(void 0,c.concat(d))}},isIn:function(a,
|
|
b){return-1!==a.indexOf(b)},containsPath:function(a,b){return a.some(function(a){return b.match(new RegExp("/"+a+"/?$"))})},stringify:l,taggedStringify:function(a){for(var b=arguments.length,c=Array(1<b?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];return a.reduce(function(a,b,d){return a+b+(l(c[d])||"")},"")},short:function(a,b){return function(c){return function(d){return a(d)?b(d):c(d)}}},hasProp:function(a){return function(b){return b in a}},last:function(a){return a[a.length-1]},upperCaseFirstLetter:function(a){return a[0].toUpperCase()+
|
|
a.slice(1)},lowerCaseFirstLetter:function(a){return a[0].toLowerCase()+a.slice(1)},arrayOrPush:function(a,b,c){return Array.isArray(a[b])?a[b].push(c):a[b]=[c]},assignToObject:function(a,b){return function(c,d){return f(a[b])?a[b][c]=d:a[b]=_defineProperty2({},c,d)}}}},{"json-stringify-safe":6}],21:[function(a,b,h){b.exports={Start:Symbol("Start"),End:Symbol("End"),expect:Symbol("expect"),pass:"pass",fail:"fail"}},{}]},{},[1])(1)});
|
|
|