Socket
Socket
Sign inDemoInstall

testee-client

Package Overview
Dependencies
12
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.2.0

dist/bootstrap.min.js

4

dist/testee.min.js

@@ -1,2 +0,2 @@

!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){var c=a("underscore"),d=a("./../guid"),e=function(a){this.runner=a,this.suites={},this.specs={},this.failed=0,this.total=0};c.extend(e.prototype,{log:c.noop,id:function(a,b){return a[b]?a[b]:a[b]=d()},reportRunnerStarting:function(){var a=this.runId=d();this.runner.start({id:a,environment:navigator.userAgent,runner:"Jasmine",time:(new Date).getTime()})},reportRunnerResults:function(){this.runner.end({id:this.runId,failed:this.failed,total:this.total,passed:this.total-this.failed})},reportSpecResults:function(a){if(a.results_.failedCount){var b=a.results_.items_[0].message,c=a.results_.items_[0].trace.stack;this.failed++,this.total++,this.runner.fail({id:this.id(this.specs,a.id),err:{message:b,stack:c}})}else if(a.results_.passedCount){var d=(new Date).getTime()-a.startTime||0;this.total++,this.runner.pass({duration:d,id:this.id(this.specs,a.id)})}},startSuite:function(a){null!==a.parentSuite&&(a.parentSuite.started||this.startSuite(a.parentSuite)),this.runner.suite(null!==a.parentSuite?{title:a.description,parent:this.id(this.suites,a.parentSuite.id),id:this.id(this.suites,a.id)}:{title:a.description,root:!0,id:this.id(this.suites,a.id),parent:this.runId}),a.started=!0},reportSpecStarting:function(a){a.suite.started||this.startSuite(a.suite),a.startTime=new Date,a.suite.startTime||(a.suite.startTime=a.startTime),this.runner.test({title:a.description,parent:this.id(this.suites,a.suite.id),id:this.id(this.specs,a.id)})},reportSuiteResults:function(a){a.started&&this.runner.suiteEnd({id:this.id(this.suites,a.id)})}}),b.exports=function(a,b){a.jasmine.getEnv().addReporter(new e(b))},b.exports.Reporter=e},{"./../guid":5,underscore:26}],2:[function(a,b){function c(a){var b=this,c={"test end":"testEnd","suite end":"suiteEnd"},f=function(d,e){a.on(d,function(){var a=e.apply(e,arguments),f=c[d]||d;b.api[f](a)})};this.originalReporter=new this.OldReporter(a),this.ids=[],this.uuids={},this.last={},this.total=0,this.pending=0,this.failed=0,this.runId=e(),f("start",function(){return{environment:navigator.userAgent,runner:"Mocha",time:(new Date).getTime(),id:b.runId}}),f("fail",function(a,c){var d=b.diff(a);return d.err={message:c.message,stack:c.stack||""},d}),f("end",function(a){var c=b.diff(a);return c.id=b.runId,c.total=b.total,c.failed=b.failed,c.pending=b.pending,c.passed=b.total-b.failed-b.pending,c}),f("suite",function(a){var c=b.diff(a);return a.root&&(c.parent=b.runId),c}),d.each(["suite end","pending","test","test end","pass"],function(a){f(a,d.bind(b.diff,b))}),a.on("pending",function(){b.pending++,b.total++}),a.on("fail",function(){b.failed++,b.total++}),a.on("pass",function(){b.total++})}var d=a("underscore"),e=a("./../guid");c.prototype.objectify=function(a){var b={},c=this;return d.each(a,function(a,e){var f=0===e.indexOf("_")||0===e.indexOf("$");if("object"!=typeof a||f)"function"==typeof a||f||void 0===a||(b[e]=a);else{var g=d.indexOf(c.ids,a);~g&&(b[e]=c.uuids[g])}}),b},c.prototype.diff=function(a){var b=this,c=b.objectify(a),f={},g=d.indexOf(b.ids,a);return~g?d.each(c,function(a,c){b.last[g][c]!==a&&(f[c]=a)}):(g=b.ids.push(a)-1,b.uuids[g]=e(),f=d.clone(c||{})),b.last[g]=c,f.id=b.uuids[g],f},b.exports=function(a,b){c.prototype.api=b,c.prototype.OldReporter=a.mocha._reporter,a.Mocha.reporters.Testee=c,a.mocha.reporter(c)},b.exports.Reporter=c},{"./../guid":5,underscore:26}],3:[function(a,b){var c=a("./../guid");b.exports=function(a,b){var d=a.QUnit,e=[],f=function(){return e[e.length-1]},g=function(){b.suiteEnd({id:f()}),e.pop()},h=c();return d.begin(function(){var d=a.document.getElementsByTagName("title")[0]||document.getElementsByTagName("h1")[0],f=c();b.start({id:h,environment:a.navigator.userAgent,runner:"QUnit",time:(new Date).getTime()}),b.suite({title:d?d.innerHTML:"",root:!0,id:f,parent:h}),e.push(f)}),d.moduleStart(function(a){var d=c();b.suite({title:a.name,parent:f(),id:d}),e.push(d)}),d.moduleDone(function(a){b.suiteEnd({failed:a.failed,total:a.total,id:f()}),e.pop()}),d.testStart(function(a){var d=c();b.suite({title:a.name,parent:f(),id:d}),e.push(d)}),d.testDone(g),d.log(function(a){var d=c(),e="";if(b.test({id:d,title:a.message||"okay",parent:f()}),a.result)b.pass({id:d});else{e=a.expected?"Expected "+a.expected+" but was "+a.actual:"Expected assertion to be truthy but it was not";var g=(a.source||"").replace(/\\n/g,"\n ");b.fail({id:d,err:{message:e,stack:"Error: "+e+"\n"+g}})}b.testEnd({id:d})}),d.done(function(a){a.id=h,g(),b.end(a)}),d}},{"./../guid":5}],4:[function(a,b){"use strict";var c=function(){},d=function(a){f=!1,d.isReady=!1,"function"==typeof a&&(c=a),i()},e=window.document,f=!1,g=function(){e.addEventListener?e.removeEventListener("DOMContentLoaded",g,!1):e.detachEvent("onreadystatechange",g),h()},h=function(){if(!d.isReady){if(!e.body)return setTimeout(h,1);d.isReady=!0,c()}},i=function(){var a=!1;if(!f)if(f=!0,"loading"!==e.readyState&&h(),e.addEventListener)e.addEventListener("DOMContentLoaded",g,!1),window.addEventListener("load",g,!1);else if(e.attachEvent){e.attachEvent("onreadystatechange",g),window.attachEvent("onload",g);try{a=null==window.frameElement}catch(b){}e.documentElement.doScroll&&a&&j()}},j=function(){if(!d.isReady){try{e.documentElement.doScroll("left")}catch(a){return void setTimeout(j,1)}h()}};d.isReady=!1,b.exports=d},{}],5:[function(a,b){var c=a("MD5");b.exports=function(){var a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"==a?b:3&b|8;return c.toString(16)});return c(a+navigator.useragent)}},{MD5:9}],6:[function(a){var b=a("underscore"),c=a("es6-promise").Promise,d=a("./docready"),e=a("./runner"),f=a("./service"),g=a("./adapters/qunit"),h=a("./adapters/jasmine-legacy"),i=a("./adapters/mocha");d(function(){var a=window.Testee=window.Testee||{};a.socket=a.socket||io(),b.defaults(a,{runs:f("runs",a.socket),suites:f("suites",a.socket),tests:f("tests",a.socket),coverages:f("coverages",a.socket),connect:new c(function(c){var d=function(){b.delay(function(){c(a.socket)},250)};a.socket.connected?d():a.socket.on("connect",d)})});var d=e(a),j=function(){window.QUnit&&g(window,d),window.jasmine&&window.jasmine.version_&&1===window.jasmine.version_.major&&h(window,d),window.mocha&&window.Mocha&&i(window,d)};a.autoinit===!1?window.Testee.init=j:j()})},{"./adapters/jasmine-legacy":1,"./adapters/mocha":2,"./adapters/qunit":3,"./docready":4,"./runner":7,"./service":8,"es6-promise":16,underscore:26}],7:[function(a,b){var c=a("underscore"),d=a("es6-promise").Promise;b.exports=function(a){var b={file:window.location.toString()};return c.extend({call:function(a,b){var e=c.toArray(arguments).slice(2),f=this[a];return this.connect=this.connect.then(function(){return new d(function(a,c){e.push({}),e.push(function(b,d){b?c(d):a(d)}),f[b].apply(f,e)})}),this.connect},start:function(a){a=c.extend({status:"running"},b,a),this.call("runs","create",a)},suite:function(a){a=c.extend({status:"running"},b,a),this.call("suites","create",a)},test:function(a){a=c.extend({},b,a),this.call("tests","create",a)},pending:function(a){a=c.extend({status:"pending"},b,a),this.call("tests","create",a)},pass:function(a){a=c.extend({status:"passed"},a),this.call("tests","patch",a.id,a)},fail:function(a){a=c.extend({status:"failed"},a),this.call("tests","patch",a.id,a)},testEnd:function(){},suiteEnd:function(a){a=c.extend({status:"finished"},a),this.call("suites","patch",a.id,a)},end:function(a){a=c.extend({status:"finished"},a);var b=this.socket;window.__coverage__&&this.coverages&&this.call("coverages","create",{id:a.id,run:a,coverage:window.__coverage__}),this.call("runs","patch",a.id,a).then(function(){"function"==typeof b.disconnect&&b.disconnect()})}},a)}},{"es6-promise":16,underscore:26}],8:[function(a,b){var c=a("underscore"),d=function(a){return a.replace(/^\/|\/$/g,"")},e=["find","get","create","update","patch","remove"],f=function(a,b){this.path=d(a),this.socket=b};f.prototype.on=function(a,b){this.socket.on(this.path+" "+a,b)},f.prototype.off=function(a,b){this.socket.off(this.path+" "+a,b)},c.each(e,function(a){f.prototype[a]=function(){var b=Array.prototype.slice.call(arguments,0);b.unshift(this.path+"::"+a),this.socket.emit.apply(this.socket,b)}}),b.exports=function(a,b){return new f(a,b)},b.exports.Service=f},{underscore:26}],9:[function(a,b){(function(c){!function(){var d=a("crypt"),e=a("charenc").utf8,f=a("charenc").bin,g=function(a,b){a.constructor==String?a=b&&"binary"===b.encoding?f.stringToBytes(a):e.stringToBytes(a):"undefined"!=typeof c&&"function"==typeof c.isBuffer&&c.isBuffer(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||(a=a.toString());for(var h=d.bytesToWords(a),i=8*a.length,j=1732584193,k=-271733879,l=-1732584194,m=271733878,n=0;n<h.length;n++)h[n]=16711935&(h[n]<<8|h[n]>>>24)|4278255360&(h[n]<<24|h[n]>>>8);h[i>>>5]|=128<<i%32,h[(i+64>>>9<<4)+14]=i;for(var o=g._ff,p=g._gg,q=g._hh,r=g._ii,n=0;n<h.length;n+=16){var s=j,t=k,u=l,v=m;j=o(j,k,l,m,h[n+0],7,-680876936),m=o(m,j,k,l,h[n+1],12,-389564586),l=o(l,m,j,k,h[n+2],17,606105819),k=o(k,l,m,j,h[n+3],22,-1044525330),j=o(j,k,l,m,h[n+4],7,-176418897),m=o(m,j,k,l,h[n+5],12,1200080426),l=o(l,m,j,k,h[n+6],17,-1473231341),k=o(k,l,m,j,h[n+7],22,-45705983),j=o(j,k,l,m,h[n+8],7,1770035416),m=o(m,j,k,l,h[n+9],12,-1958414417),l=o(l,m,j,k,h[n+10],17,-42063),k=o(k,l,m,j,h[n+11],22,-1990404162),j=o(j,k,l,m,h[n+12],7,1804603682),m=o(m,j,k,l,h[n+13],12,-40341101),l=o(l,m,j,k,h[n+14],17,-1502002290),k=o(k,l,m,j,h[n+15],22,1236535329),j=p(j,k,l,m,h[n+1],5,-165796510),m=p(m,j,k,l,h[n+6],9,-1069501632),l=p(l,m,j,k,h[n+11],14,643717713),k=p(k,l,m,j,h[n+0],20,-373897302),j=p(j,k,l,m,h[n+5],5,-701558691),m=p(m,j,k,l,h[n+10],9,38016083),l=p(l,m,j,k,h[n+15],14,-660478335),k=p(k,l,m,j,h[n+4],20,-405537848),j=p(j,k,l,m,h[n+9],5,568446438),m=p(m,j,k,l,h[n+14],9,-1019803690),l=p(l,m,j,k,h[n+3],14,-187363961),k=p(k,l,m,j,h[n+8],20,1163531501),j=p(j,k,l,m,h[n+13],5,-1444681467),m=p(m,j,k,l,h[n+2],9,-51403784),l=p(l,m,j,k,h[n+7],14,1735328473),k=p(k,l,m,j,h[n+12],20,-1926607734),j=q(j,k,l,m,h[n+5],4,-378558),m=q(m,j,k,l,h[n+8],11,-2022574463),l=q(l,m,j,k,h[n+11],16,1839030562),k=q(k,l,m,j,h[n+14],23,-35309556),j=q(j,k,l,m,h[n+1],4,-1530992060),m=q(m,j,k,l,h[n+4],11,1272893353),l=q(l,m,j,k,h[n+7],16,-155497632),k=q(k,l,m,j,h[n+10],23,-1094730640),j=q(j,k,l,m,h[n+13],4,681279174),m=q(m,j,k,l,h[n+0],11,-358537222),l=q(l,m,j,k,h[n+3],16,-722521979),k=q(k,l,m,j,h[n+6],23,76029189),j=q(j,k,l,m,h[n+9],4,-640364487),m=q(m,j,k,l,h[n+12],11,-421815835),l=q(l,m,j,k,h[n+15],16,530742520),k=q(k,l,m,j,h[n+2],23,-995338651),j=r(j,k,l,m,h[n+0],6,-198630844),m=r(m,j,k,l,h[n+7],10,1126891415),l=r(l,m,j,k,h[n+14],15,-1416354905),k=r(k,l,m,j,h[n+5],21,-57434055),j=r(j,k,l,m,h[n+12],6,1700485571),m=r(m,j,k,l,h[n+3],10,-1894986606),l=r(l,m,j,k,h[n+10],15,-1051523),k=r(k,l,m,j,h[n+1],21,-2054922799),j=r(j,k,l,m,h[n+8],6,1873313359),m=r(m,j,k,l,h[n+15],10,-30611744),l=r(l,m,j,k,h[n+6],15,-1560198380),k=r(k,l,m,j,h[n+13],21,1309151649),j=r(j,k,l,m,h[n+4],6,-145523070),m=r(m,j,k,l,h[n+11],10,-1120210379),l=r(l,m,j,k,h[n+2],15,718787259),k=r(k,l,m,j,h[n+9],21,-343485551),j=j+s>>>0,k=k+t>>>0,l=l+u>>>0,m=m+v>>>0}return d.endian([j,k,l,m])};g._ff=function(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+(e>>>0)+g;return(h<<f|h>>>32-f)+b},g._gg=function(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+(e>>>0)+g;return(h<<f|h>>>32-f)+b},g._hh=function(a,b,c,d,e,f,g){var h=a+(b^c^d)+(e>>>0)+g;return(h<<f|h>>>32-f)+b},g._ii=function(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+(e>>>0)+g;return(h<<f|h>>>32-f)+b},g._blocksize=16,g._digestsize=16,b.exports=function(a,b){if("undefined"!=typeof a){var c=d.wordsToBytes(g(a,b));return b&&b.asBytes?c:b&&b.asString?f.bytesToString(c):d.bytesToHex(c)}}}()}).call(this,a("buffer").Buffer)},{buffer:12,charenc:10,crypt:11}],10:[function(a,b){var c={utf8:{stringToBytes:function(a){return c.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(c.bin.bytesToString(a)))}},bin:{stringToBytes:function(a){for(var b=[],c=0;c<a.length;c++)b.push(255&a.charCodeAt(c));return b},bytesToString:function(a){for(var b=[],c=0;c<a.length;c++)b.push(String.fromCharCode(a[c]));return b.join("")}}};b.exports=c},{}],11:[function(a,b){!function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c={rotl:function(a,b){return a<<b|a>>>32-b},rotr:function(a,b){return a<<32-b|a>>>b},endian:function(a){if(a.constructor==Number)return 16711935&c.rotl(a,8)|4278255360&c.rotl(a,24);for(var b=0;b<a.length;b++)a[b]=c.endian(a[b]);return a},randomBytes:function(a){for(var b=[];a>0;a--)b.push(Math.floor(256*Math.random()));return b},bytesToWords:function(a){for(var b=[],c=0,d=0;c<a.length;c++,d+=8)b[d>>>5]|=a[c]<<24-d%32;return b},wordsToBytes:function(a){for(var b=[],c=0;c<32*a.length;c+=8)b.push(a[c>>>5]>>>24-c%32&255);return b},bytesToHex:function(a){for(var b=[],c=0;c<a.length;c++)b.push((a[c]>>>4).toString(16)),b.push((15&a[c]).toString(16));return b.join("")},hexToBytes:function(a){for(var b=[],c=0;c<a.length;c+=2)b.push(parseInt(a.substr(c,2),16));return b},bytesToBase64:function(b){for(var c=[],d=0;d<b.length;d+=3)for(var e=b[d]<<16|b[d+1]<<8|b[d+2],f=0;4>f;f++)c.push(8*d+6*f<=8*b.length?a.charAt(e>>>6*(3-f)&63):"=");return c.join("")},base64ToBytes:function(b){b=b.replace(/[^A-Z0-9+\/]/gi,"");for(var c=[],d=0,e=0;d<b.length;e=++d%4)0!=e&&c.push((a.indexOf(b.charAt(d-1))&Math.pow(2,-2*e+8)-1)<<2*e|a.indexOf(b.charAt(d))>>>6-2*e);return c}};b.exports=c}()},{}],12:[function(a,b,c){function d(a,b,c){if(!(this instanceof d))return new d(a,b,c);var e,f=typeof a;if("number"===f)e=a>0?a>>>0:0;else if("string"===f)"base64"===b&&(a=C(a)),e=d.byteLength(a,b);else{if("object"!==f||null===a)throw new Error("First argument needs to be a number, array or string.");"Buffer"===a.type&&E(a.data)&&(a=a.data),e=+a.length>0?Math.floor(+a.length):0}var g;T?g=d._augment(new Uint8Array(e)):(g=this,g.length=e,g._isBuffer=!0);var h;if(T&&"number"==typeof a.byteLength)g._set(a);else if(F(a))if(d.isBuffer(a))for(h=0;e>h;h++)g[h]=a.readUInt8(h);else for(h=0;e>h;h++)g[h]=(a[h]%256+256)%256;else if("string"===f)g.write(a,0,b);else if("number"===f&&!T&&!c)for(h=0;e>h;h++)g[h]=0;return g}function e(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;Q(f%2===0,"Invalid hex string"),d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);Q(!isNaN(h),"Invalid hex string"),a[c+g]=h}return g}function f(a,b,c,d){var e=L(H(b),a,c,d);return e}function g(a,b,c,d){var e=L(I(b),a,c,d);return e}function h(a,b,c,d){return g(a,b,c,d)}function i(a,b,c,d){var e=L(K(b),a,c,d);return e}function j(a,b,c,d){var e=L(J(b),a,c,d);return e}function k(a,b,c){return R.fromByteArray(0===b&&c===a.length?a:a.slice(b,c))}function l(a,b,c){var d="",e="";c=Math.min(a.length,c);for(var f=b;c>f;f++)a[f]<=127?(d+=M(e)+String.fromCharCode(a[f]),e=""):e+="%"+a[f].toString(16);return d+M(e)}function m(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function n(a,b,c){return m(a,b,c)}function o(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=G(a[f]);return e}function p(a,b,c){for(var d=a.slice(b,c),e="",f=0;f<d.length;f+=2)e+=String.fromCharCode(d[f]+256*d[f+1]);return e}function q(a,b,c,d){d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(void 0!==b&&null!==b,"missing offset"),Q(b+1<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){var f;return c?(f=a[b],e>b+1&&(f|=a[b+1]<<8)):(f=a[b]<<8,e>b+1&&(f|=a[b+1])),f}}function r(a,b,c,d){d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(void 0!==b&&null!==b,"missing offset"),Q(b+3<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){var f;return c?(e>b+2&&(f=a[b+2]<<16),e>b+1&&(f|=a[b+1]<<8),f|=a[b],e>b+3&&(f+=a[b+3]<<24>>>0)):(e>b+1&&(f=a[b+1]<<16),e>b+2&&(f|=a[b+2]<<8),e>b+3&&(f|=a[b+3]),f+=a[b]<<24>>>0),f}}function s(a,b,c,d){d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(void 0!==b&&null!==b,"missing offset"),Q(b+1<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){var f=q(a,b,c,!0),g=32768&f;return g?-1*(65535-f+1):f}}function t(a,b,c,d){d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(void 0!==b&&null!==b,"missing offset"),Q(b+3<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){var f=r(a,b,c,!0),g=2147483648&f;return g?-1*(4294967295-f+1):f}}function u(a,b,c,d){return d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(b+3<a.length,"Trying to read beyond buffer length")),S.read(a,b,c,23,4)}function v(a,b,c,d){return d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(b+7<a.length,"Trying to read beyond buffer length")),S.read(a,b,c,52,8)}function w(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+1<a.length,"trying to write beyond buffer length"),N(b,65535));var f=a.length;if(!(c>=f)){for(var g=0,h=Math.min(f-c,2);h>g;g++)a[c+g]=(b&255<<8*(d?g:1-g))>>>8*(d?g:1-g);return c+2}}function x(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+3<a.length,"trying to write beyond buffer length"),N(b,4294967295));var f=a.length;if(!(c>=f)){for(var g=0,h=Math.min(f-c,4);h>g;g++)a[c+g]=b>>>8*(d?g:3-g)&255;return c+4}}function y(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+1<a.length,"Trying to write beyond buffer length"),O(b,32767,-32768));var f=a.length;if(!(c>=f))return b>=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e),c+2}function z(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+3<a.length,"Trying to write beyond buffer length"),O(b,2147483647,-2147483648));var f=a.length;if(!(c>=f))return b>=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e),c+4}function A(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+3<a.length,"Trying to write beyond buffer length"),P(b,3.4028234663852886e38,-3.4028234663852886e38));var f=a.length;if(!(c>=f))return S.write(a,b,c,d,23,4),c+4}function B(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+7<a.length,"Trying to write beyond buffer length"),P(b,1.7976931348623157e308,-1.7976931348623157e308));var f=a.length;if(!(c>=f))return S.write(a,b,c,d,52,8),c+8}function C(a){for(a=D(a).replace(V,"");a.length%4!==0;)a+="=";return a}function D(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function E(a){return(Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)})(a)}function F(a){return E(a)||d.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function G(a){return 16>a?"0"+a.toString(16):a.toString(16)}function H(a){for(var b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);if(127>=d)b.push(d);else{var e=c;d>=55296&&57343>=d&&c++;for(var f=encodeURIComponent(a.slice(e,c+1)).substr(1).split("%"),g=0;g<f.length;g++)b.push(parseInt(f[g],16))}}return b}function I(a){for(var b=[],c=0;c<a.length;c++)b.push(255&a.charCodeAt(c));return b}function J(a){for(var b,c,d,e=[],f=0;f<a.length;f++)b=a.charCodeAt(f),c=b>>8,d=b%256,e.push(d),e.push(c);return e}function K(a){return R.toByteArray(a)}function L(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}function M(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function N(a,b){Q("number"==typeof a,"cannot write a non-number as a number"),Q(a>=0,"specified a negative value for writing an unsigned value"),Q(b>=a,"value is larger than maximum value for type"),Q(Math.floor(a)===a,"value has a fractional component")}function O(a,b,c){Q("number"==typeof a,"cannot write a non-number as a number"),Q(b>=a,"value larger than maximum allowed value"),Q(a>=c,"value smaller than minimum allowed value"),Q(Math.floor(a)===a,"value has a fractional component")}function P(a,b,c){Q("number"==typeof a,"cannot write a non-number as a number"),Q(b>=a,"value larger than maximum allowed value"),Q(a>=c,"value smaller than minimum allowed value")}function Q(a,b){if(!a)throw new Error(b||"Failed assertion")}var R=a("base64-js"),S=a("ieee754");c.Buffer=d,c.SlowBuffer=d,c.INSPECT_MAX_BYTES=50,d.poolSize=8192;var T=function(){try{var a=new ArrayBuffer(0),b=new Uint8Array(a);return b.foo=function(){return 42},42===b.foo()&&"function"==typeof b.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(c){return!1}}();d.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.isBuffer=function(a){return!(null==a||!a._isBuffer)},d.byteLength=function(a,b){var c;switch(a=a.toString(),b||"utf8"){case"hex":c=a.length/2;break;case"utf8":case"utf-8":c=H(a).length;break;case"ascii":case"binary":case"raw":c=a.length;break;case"base64":c=K(a).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":c=2*a.length;break;default:throw new Error("Unknown encoding")}return c},d.concat=function(a,b){if(Q(E(a),"Usage: Buffer.concat(list[, length])"),0===a.length)return new d(0);if(1===a.length)return a[0];var c;if(void 0===b)for(b=0,c=0;c<a.length;c++)b+=a[c].length;var e=new d(b),f=0;for(c=0;c<a.length;c++){var g=a[c];g.copy(e,f),f+=g.length}return e},d.compare=function(a,b){Q(d.isBuffer(a)&&d.isBuffer(b),"Arguments must be Buffers");for(var c=a.length,e=b.length,f=0,g=Math.min(c,e);g>f&&a[f]===b[f];f++);return f!==g&&(c=a[f],e=b[f]),e>c?-1:c>e?1:0},d.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var k=d;d=b,b=c,c=k}b=Number(b)||0;var l=this.length-b;c?(c=Number(c),c>l&&(c=l)):c=l,d=String(d||"utf8").toLowerCase();var m;switch(d){case"hex":m=e(this,a,b,c);break;case"utf8":case"utf-8":m=f(this,a,b,c);break;case"ascii":m=g(this,a,b,c);break;case"binary":m=h(this,a,b,c);break;case"base64":m=i(this,a,b,c);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":m=j(this,a,b,c);break;default:throw new Error("Unknown encoding")}return m},d.prototype.toString=function(a,b,c){var d=this;if(a=String(a||"utf8").toLowerCase(),b=Number(b)||0,c=void 0===c?d.length:Number(c),c===b)return"";var e;switch(a){case"hex":e=o(d,b,c);break;case"utf8":case"utf-8":e=l(d,b,c);break;case"ascii":e=m(d,b,c);break;case"binary":e=n(d,b,c);break;case"base64":e=k(d,b,c);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":e=p(d,b,c);break;default:throw new Error("Unknown encoding")}return e},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},d.prototype.equals=function(a){return Q(d.isBuffer(a),"Argument must be a Buffer"),0===d.compare(this,a)},d.prototype.compare=function(a){return Q(d.isBuffer(a),"Argument must be a Buffer"),d.compare(this,a)},d.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),d||0===d||(d=this.length),b||(b=0),d!==c&&0!==a.length&&0!==e.length){Q(d>=c,"sourceEnd < sourceStart"),Q(b>=0&&b<a.length,"targetStart out of bounds"),Q(c>=0&&c<e.length,"sourceStart out of bounds"),Q(d>=0&&d<=e.length,"sourceEnd out of bounds"),d>this.length&&(d=this.length),a.length-b<d-c&&(d=a.length-b+c);var f=d-c;if(100>f||!T)for(var g=0;f>g;g++)a[g+b]=this[g+c];else a._set(this.subarray(c,c+f),b)}},d.prototype.slice=function(a,b){var c=this.length;if(a=~~a,b=void 0===b?c:~~b,0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c),0>b?(b+=c,0>b&&(b=0)):b>c&&(b=c),a>b&&(b=a),T)return d._augment(this.subarray(a,b));for(var e=b-a,f=new d(e,void 0,!0),g=0;e>g;g++)f[g]=this[g+a];return f},d.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},d.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},d.prototype.readUInt8=function(a,b){return b||(Q(void 0!==a&&null!==a,"missing offset"),Q(a<this.length,"Trying to read beyond buffer length")),a>=this.length?void 0:this[a]},d.prototype.readUInt16LE=function(a,b){return q(this,a,!0,b)},d.prototype.readUInt16BE=function(a,b){return q(this,a,!1,b)},d.prototype.readUInt32LE=function(a,b){return r(this,a,!0,b)},d.prototype.readUInt32BE=function(a,b){return r(this,a,!1,b)},d.prototype.readInt8=function(a,b){if(b||(Q(void 0!==a&&null!==a,"missing offset"),Q(a<this.length,"Trying to read beyond buffer length")),!(a>=this.length)){var c=128&this[a];return c?-1*(255-this[a]+1):this[a]}},d.prototype.readInt16LE=function(a,b){return s(this,a,!0,b)},d.prototype.readInt16BE=function(a,b){return s(this,a,!1,b)},d.prototype.readInt32LE=function(a,b){return t(this,a,!0,b)},d.prototype.readInt32BE=function(a,b){return t(this,a,!1,b)},d.prototype.readFloatLE=function(a,b){return u(this,a,!0,b)},d.prototype.readFloatBE=function(a,b){return u(this,a,!1,b)},d.prototype.readDoubleLE=function(a,b){return v(this,a,!0,b)},d.prototype.readDoubleBE=function(a,b){return v(this,a,!1,b)},d.prototype.writeUInt8=function(a,b,c){return c||(Q(void 0!==a&&null!==a,"missing value"),Q(void 0!==b&&null!==b,"missing offset"),Q(b<this.length,"trying to write beyond buffer length"),N(a,255)),b>=this.length?void 0:(this[b]=a,b+1)},d.prototype.writeUInt16LE=function(a,b,c){return w(this,a,b,!0,c)},d.prototype.writeUInt16BE=function(a,b,c){return w(this,a,b,!1,c)},d.prototype.writeUInt32LE=function(a,b,c){return x(this,a,b,!0,c)},d.prototype.writeUInt32BE=function(a,b,c){return x(this,a,b,!1,c)},d.prototype.writeInt8=function(a,b,c){return c||(Q(void 0!==a&&null!==a,"missing value"),Q(void 0!==b&&null!==b,"missing offset"),Q(b<this.length,"Trying to write beyond buffer length"),O(a,127,-128)),b>=this.length?void 0:(a>=0?this.writeUInt8(a,b,c):this.writeUInt8(255+a+1,b,c),b+1)},d.prototype.writeInt16LE=function(a,b,c){return y(this,a,b,!0,c)},d.prototype.writeInt16BE=function(a,b,c){return y(this,a,b,!1,c)},d.prototype.writeInt32LE=function(a,b,c){return z(this,a,b,!0,c)},d.prototype.writeInt32BE=function(a,b,c){return z(this,a,b,!1,c)},d.prototype.writeFloatLE=function(a,b,c){return A(this,a,b,!0,c)},d.prototype.writeFloatBE=function(a,b,c){return A(this,a,b,!1,c)},d.prototype.writeDoubleLE=function(a,b,c){return B(this,a,b,!0,c)},d.prototype.writeDoubleBE=function(a,b,c){return B(this,a,b,!1,c)},d.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),Q(c>=b,"end < start"),c!==b&&0!==this.length){Q(b>=0&&b<this.length,"start out of bounds"),Q(c>=0&&c<=this.length,"end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=H(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},d.prototype.inspect=function(){for(var a=[],b=this.length,d=0;b>d;d++)if(a[d]=G(this[d]),d===c.INSPECT_MAX_BYTES){a[d+1]="...";break}return"<Buffer "+a.join(" ")+">"},d.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(T)return new d(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;c>b;b+=1)a[b]=this[b];return a.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var U=d.prototype;d._augment=function(a){return a._isBuffer=!0,a._get=a.get,a._set=a.set,a.get=U.get,a.set=U.set,a.write=U.write,a.toString=U.toString,a.toLocaleString=U.toString,a.toJSON=U.toJSON,a.equals=U.equals,a.compare=U.compare,a.copy=U.copy,a.slice=U.slice,a.readUInt8=U.readUInt8,a.readUInt16LE=U.readUInt16LE,a.readUInt16BE=U.readUInt16BE,a.readUInt32LE=U.readUInt32LE,a.readUInt32BE=U.readUInt32BE,a.readInt8=U.readInt8,a.readInt16LE=U.readInt16LE,a.readInt16BE=U.readInt16BE,a.readInt32LE=U.readInt32LE,a.readInt32BE=U.readInt32BE,a.readFloatLE=U.readFloatLE,a.readFloatBE=U.readFloatBE,a.readDoubleLE=U.readDoubleLE,a.readDoubleBE=U.readDoubleBE,a.writeUInt8=U.writeUInt8,a.writeUInt16LE=U.writeUInt16LE,a.writeUInt16BE=U.writeUInt16BE,a.writeUInt32LE=U.writeUInt32LE,a.writeUInt32BE=U.writeUInt32BE,a.writeInt8=U.writeInt8,a.writeInt16LE=U.writeInt16LE,a.writeInt16BE=U.writeInt16BE,a.writeInt32LE=U.writeInt32LE,a.writeInt32BE=U.writeInt32BE,a.writeFloatLE=U.writeFloatLE,a.writeFloatBE=U.writeFloatBE,a.writeDoubleLE=U.writeDoubleLE,a.writeDoubleBE=U.writeDoubleBE,a.fill=U.fill,a.inspect=U.inspect,a.toArrayBuffer=U.toArrayBuffer,a};var V=/[^+\/0-9A-z]/g},{"base64-js":13,ieee754:14}],13:[function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g?62:b===h?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}("undefined"==typeof c?this.base64js={}:c)},{}],14:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<<h)-1,j=i>>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<<j)-1,l=k>>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<<e|h,j+=e;j>0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],15:[function(a,b){function c(){}var d=b.exports={};d.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(){throw new Error("process.binding is not supported")
},d.cwd=function(){return"/"},d.chdir=function(){throw new Error("process.chdir is not supported")}},{}],16:[function(a,b,c){"use strict";var d=a("./promise/promise").Promise,e=a("./promise/polyfill").polyfill;c.Promise=d,c.polyfill=e},{"./promise/polyfill":20,"./promise/promise":21}],17:[function(a,b,c){"use strict";function d(a){var b=this;if(!e(a))throw new TypeError("You must pass an array to all.");return new b(function(b,c){function d(a){return function(b){e(a,b)}}function e(a,c){h[a]=c,0===--i&&b(h)}var g,h=[],i=a.length;0===i&&b([]);for(var j=0;j<a.length;j++)g=a[j],g&&f(g.then)?g.then(d(j),c):e(j,g)})}var e=a("./utils").isArray,f=a("./utils").isFunction;c.all=d},{"./utils":25}],18:[function(a,b,c){(function(a,b){"use strict";function d(){return function(){a.nextTick(g)}}function e(){var a=0,b=new k(g),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function f(){return function(){l.setTimeout(g,1)}}function g(){for(var a=0;a<m.length;a++){var b=m[a],c=b[0],d=b[1];c(d)}m=[]}function h(a,b){var c=m.push([a,b]);1===c&&i()}var i,j="undefined"!=typeof window?window:{},k=j.MutationObserver||j.WebKitMutationObserver,l="undefined"!=typeof b?b:void 0===this?window:this,m=[];i="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?d():k?e():f(),c.asap=h}).call(this,a("FWaASH"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{FWaASH:15}],19:[function(a,b,c){"use strict";function d(a,b){return 2!==arguments.length?e[a]:void(e[a]=b)}var e={instrument:!1};c.config=e,c.configure=d},{}],20:[function(a,b,c){(function(b){"use strict";function d(){var a;a="undefined"!=typeof b?b:"undefined"!=typeof window&&window.document?window:self;var c="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),f(b)}();c||(a.Promise=e)}var e=a("./promise").Promise,f=a("./utils").isFunction;c.polyfill=d}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./promise":21,"./utils":25}],21:[function(a,b,c){"use strict";function d(a){if(!q(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof d))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],e(a,this)}function e(a,b){function c(a){j(b,a)}function d(a){l(b,a)}try{a(c,d)}catch(e){d(e)}}function f(a,b,c,d){var e,f,g,h,k=q(c);if(k)try{e=c(d),g=!0}catch(m){h=!0,f=m}else e=d,g=!0;i(b,e)||(k&&g?j(b,e):h?l(b,f):a===y?j(b,e):a===z&&l(b,e))}function g(a,b,c,d){var e=a._subscribers,f=e.length;e[f]=b,e[f+y]=c,e[f+z]=d}function h(a,b){for(var c,d,e=a._subscribers,g=a._detail,h=0;h<e.length;h+=3)c=e[h],d=e[h+b],f(b,c,d,g);a._subscribers=null}function i(a,b){var c,d=null;try{if(a===b)throw new TypeError("A promises callback cannot return that same promise.");if(p(b)&&(d=b.then,q(d)))return d.call(b,function(d){return c?!0:(c=!0,void(b!==d?j(a,d):k(a,d)))},function(b){return c?!0:(c=!0,void l(a,b))}),!0}catch(e){return c?!0:(l(a,e),!0)}return!1}function j(a,b){a===b?k(a,b):i(a,b)||k(a,b)}function k(a,b){a._state===w&&(a._state=x,a._detail=b,o.async(m,a))}function l(a,b){a._state===w&&(a._state=x,a._detail=b,o.async(n,a))}function m(a){h(a,a._state=y)}function n(a){h(a,a._state=z)}var o=a("./config").config,p=(a("./config").configure,a("./utils").objectOrFunction),q=a("./utils").isFunction,r=(a("./utils").now,a("./all").all),s=a("./race").race,t=a("./resolve").resolve,u=a("./reject").reject,v=a("./asap").asap;o.async=v;var w=void 0,x=0,y=1,z=2;d.prototype={constructor:d,_state:void 0,_detail:void 0,_subscribers:void 0,then:function(a,b){var c=this,d=new this.constructor(function(){});if(this._state){var e=arguments;o.async(function(){f(c._state,d,e[c._state-1],c._detail)})}else g(this,d,a,b);return d},"catch":function(a){return this.then(null,a)}},d.all=r,d.race=s,d.resolve=t,d.reject=u,c.Promise=d},{"./all":17,"./asap":18,"./config":19,"./race":22,"./reject":23,"./resolve":24,"./utils":25}],22:[function(a,b,c){"use strict";function d(a){var b=this;if(!e(a))throw new TypeError("You must pass an array to race.");return new b(function(b,c){for(var d,e=0;e<a.length;e++)d=a[e],d&&"function"==typeof d.then?d.then(b,c):b(d)})}var e=a("./utils").isArray;c.race=d},{"./utils":25}],23:[function(a,b,c){"use strict";function d(a){var b=this;return new b(function(b,c){c(a)})}c.reject=d},{}],24:[function(a,b,c){"use strict";function d(a){if(a&&"object"==typeof a&&a.constructor===this)return a;var b=this;return new b(function(b){b(a)})}c.resolve=d},{}],25:[function(a,b,c){"use strict";function d(a){return e(a)||"object"==typeof a&&null!==a}function e(a){return"function"==typeof a}function f(a){return"[object Array]"===Object.prototype.toString.call(a)}var g=Date.now||function(){return(new Date).getTime()};c.objectOrFunction=d,c.isFunction=e,c.isArray=f,c.now=g},{}],26:[function(a,b,c){(function(){var a=this,d=a._,e=Array.prototype,f=Object.prototype,g=Function.prototype,h=e.push,i=e.slice,j=e.concat,k=f.toString,l=f.hasOwnProperty,m=Array.isArray,n=Object.keys,o=g.bind,p=function(a){return a instanceof p?a:this instanceof p?void(this._wrapped=a):new p(a)};"undefined"!=typeof c?("undefined"!=typeof b&&b.exports&&(c=b.exports=p),c._=p):a._=p,p.VERSION="1.7.0";var q=function(a,b,c){if(void 0===b)return a;switch(null==c?3:c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return function(){return a.apply(b,arguments)}};p.iteratee=function(a,b,c){return null==a?p.identity:p.isFunction(a)?q(a,b,c):p.isObject(a)?p.matches(a):p.property(a)},p.each=p.forEach=function(a,b,c){if(null==a)return a;b=q(b,c);var d,e=a.length;if(e===+e)for(d=0;e>d;d++)b(a[d],d,a);else{var f=p.keys(a);for(d=0,e=f.length;e>d;d++)b(a[f[d]],f[d],a)}return a},p.map=p.collect=function(a,b,c){if(null==a)return[];b=p.iteratee(b,c);for(var d,e=a.length!==+a.length&&p.keys(a),f=(e||a).length,g=Array(f),h=0;f>h;h++)d=e?e[h]:h,g[h]=b(a[d],d,a);return g};var r="Reduce of empty array with no initial value";p.reduce=p.foldl=p.inject=function(a,b,c,d){null==a&&(a=[]),b=q(b,d,4);var e,f=a.length!==+a.length&&p.keys(a),g=(f||a).length,h=0;if(arguments.length<3){if(!g)throw new TypeError(r);c=a[f?f[h++]:h++]}for(;g>h;h++)e=f?f[h]:h,c=b(c,a[e],e,a);return c},p.reduceRight=p.foldr=function(a,b,c,d){null==a&&(a=[]),b=q(b,d,4);var e,f=a.length!==+a.length&&p.keys(a),g=(f||a).length;if(arguments.length<3){if(!g)throw new TypeError(r);c=a[f?f[--g]:--g]}for(;g--;)e=f?f[g]:g,c=b(c,a[e],e,a);return c},p.find=p.detect=function(a,b,c){var d;return b=p.iteratee(b,c),p.some(a,function(a,c,e){return b(a,c,e)?(d=a,!0):void 0}),d},p.filter=p.select=function(a,b,c){var d=[];return null==a?d:(b=p.iteratee(b,c),p.each(a,function(a,c,e){b(a,c,e)&&d.push(a)}),d)},p.reject=function(a,b,c){return p.filter(a,p.negate(p.iteratee(b)),c)},p.every=p.all=function(a,b,c){if(null==a)return!0;b=p.iteratee(b,c);var d,e,f=a.length!==+a.length&&p.keys(a),g=(f||a).length;for(d=0;g>d;d++)if(e=f?f[d]:d,!b(a[e],e,a))return!1;return!0},p.some=p.any=function(a,b,c){if(null==a)return!1;b=p.iteratee(b,c);var d,e,f=a.length!==+a.length&&p.keys(a),g=(f||a).length;for(d=0;g>d;d++)if(e=f?f[d]:d,b(a[e],e,a))return!0;return!1},p.contains=p.include=function(a,b){return null==a?!1:(a.length!==+a.length&&(a=p.values(a)),p.indexOf(a,b)>=0)},p.invoke=function(a,b){var c=i.call(arguments,2),d=p.isFunction(b);return p.map(a,function(a){return(d?b:a[b]).apply(a,c)})},p.pluck=function(a,b){return p.map(a,p.property(b))},p.where=function(a,b){return p.filter(a,p.matches(b))},p.findWhere=function(a,b){return p.find(a,p.matches(b))},p.max=function(a,b,c){var d,e,f=-1/0,g=-1/0;if(null==b&&null!=a){a=a.length===+a.length?a:p.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],d>f&&(f=d)}else b=p.iteratee(b,c),p.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-1/0&&f===-1/0)&&(f=a,g=e)});return f},p.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=a.length===+a.length?a:p.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],f>d&&(f=d)}else b=p.iteratee(b,c),p.each(a,function(a,c,d){e=b(a,c,d),(g>e||1/0===e&&1/0===f)&&(f=a,g=e)});return f},p.shuffle=function(a){for(var b,c=a&&a.length===+a.length?a:p.values(a),d=c.length,e=Array(d),f=0;d>f;f++)b=p.random(0,f),b!==f&&(e[f]=e[b]),e[b]=c[f];return e},p.sample=function(a,b,c){return null==b||c?(a.length!==+a.length&&(a=p.values(a)),a[p.random(a.length-1)]):p.shuffle(a).slice(0,Math.max(0,b))},p.sortBy=function(a,b,c){return b=p.iteratee(b,c),p.pluck(p.map(a,function(a,c,d){return{value:a,index:c,criteria:b(a,c,d)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var s=function(a){return function(b,c,d){var e={};return c=p.iteratee(c,d),p.each(b,function(d,f){var g=c(d,f,b);a(e,d,g)}),e}};p.groupBy=s(function(a,b,c){p.has(a,c)?a[c].push(b):a[c]=[b]}),p.indexBy=s(function(a,b,c){a[c]=b}),p.countBy=s(function(a,b,c){p.has(a,c)?a[c]++:a[c]=1}),p.sortedIndex=function(a,b,c,d){c=p.iteratee(c,d,1);for(var e=c(b),f=0,g=a.length;g>f;){var h=f+g>>>1;c(a[h])<e?f=h+1:g=h}return f},p.toArray=function(a){return a?p.isArray(a)?i.call(a):a.length===+a.length?p.map(a,p.identity):p.values(a):[]},p.size=function(a){return null==a?0:a.length===+a.length?a.length:p.keys(a).length},p.partition=function(a,b,c){b=p.iteratee(b,c);var d=[],e=[];return p.each(a,function(a,c,f){(b(a,c,f)?d:e).push(a)}),[d,e]},p.first=p.head=p.take=function(a,b,c){return null==a?void 0:null==b||c?a[0]:0>b?[]:i.call(a,0,b)},p.initial=function(a,b,c){return i.call(a,0,Math.max(0,a.length-(null==b||c?1:b)))},p.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:i.call(a,Math.max(a.length-b,0))},p.rest=p.tail=p.drop=function(a,b,c){return i.call(a,null==b||c?1:b)},p.compact=function(a){return p.filter(a,p.identity)};var t=function(a,b,c,d){if(b&&p.every(a,p.isArray))return j.apply(d,a);for(var e=0,f=a.length;f>e;e++){var g=a[e];p.isArray(g)||p.isArguments(g)?b?h.apply(d,g):t(g,b,c,d):c||d.push(g)}return d};p.flatten=function(a,b){return t(a,b,!1,[])},p.without=function(a){return p.difference(a,i.call(arguments,1))},p.uniq=p.unique=function(a,b,c,d){if(null==a)return[];p.isBoolean(b)||(d=c,c=b,b=!1),null!=c&&(c=p.iteratee(c,d));for(var e=[],f=[],g=0,h=a.length;h>g;g++){var i=a[g];if(b)g&&f===i||e.push(i),f=i;else if(c){var j=c(i,g,a);p.indexOf(f,j)<0&&(f.push(j),e.push(i))}else p.indexOf(e,i)<0&&e.push(i)}return e},p.union=function(){return p.uniq(t(arguments,!0,!0,[]))},p.intersection=function(a){if(null==a)return[];for(var b=[],c=arguments.length,d=0,e=a.length;e>d;d++){var f=a[d];if(!p.contains(b,f)){for(var g=1;c>g&&p.contains(arguments[g],f);g++);g===c&&b.push(f)}}return b},p.difference=function(a){var b=t(i.call(arguments,1),!0,!0,[]);return p.filter(a,function(a){return!p.contains(b,a)})},p.zip=function(a){if(null==a)return[];for(var b=p.max(arguments,"length").length,c=Array(b),d=0;b>d;d++)c[d]=p.pluck(arguments,d);return c},p.object=function(a,b){if(null==a)return{};for(var c={},d=0,e=a.length;e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},p.indexOf=function(a,b,c){if(null==a)return-1;var d=0,e=a.length;if(c){if("number"!=typeof c)return d=p.sortedIndex(a,b),a[d]===b?d:-1;d=0>c?Math.max(0,e+c):c}for(;e>d;d++)if(a[d]===b)return d;return-1},p.lastIndexOf=function(a,b,c){if(null==a)return-1;var d=a.length;for("number"==typeof c&&(d=0>c?d+c+1:Math.min(d,c+1));--d>=0;)if(a[d]===b)return d;return-1},p.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=c||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=Array(d),f=0;d>f;f++,a+=c)e[f]=a;return e};var u=function(){};p.bind=function(a,b){var c,d;if(o&&a.bind===o)return o.apply(a,i.call(arguments,1));if(!p.isFunction(a))throw new TypeError("Bind must be called on a function");return c=i.call(arguments,2),d=function(){if(!(this instanceof d))return a.apply(b,c.concat(i.call(arguments)));u.prototype=a.prototype;var e=new u;u.prototype=null;var f=a.apply(e,c.concat(i.call(arguments)));return p.isObject(f)?f:e}},p.partial=function(a){var b=i.call(arguments,1);return function(){for(var c=0,d=b.slice(),e=0,f=d.length;f>e;e++)d[e]===p&&(d[e]=arguments[c++]);for(;c<arguments.length;)d.push(arguments[c++]);return a.apply(this,d)}},p.bindAll=function(a){var b,c,d=arguments.length;if(1>=d)throw new Error("bindAll must be passed function names");for(b=1;d>b;b++)c=arguments[b],a[c]=p.bind(a[c],a);return a},p.memoize=function(a,b){var c=function(d){var e=c.cache,f=b?b.apply(this,arguments):d;return p.has(e,f)||(e[f]=a.apply(this,arguments)),e[f]};return c.cache={},c},p.delay=function(a,b){var c=i.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)},p.defer=function(a){return p.delay.apply(p,[a,1].concat(i.call(arguments,1)))},p.throttle=function(a,b,c){var d,e,f,g=null,h=0;c||(c={});var i=function(){h=c.leading===!1?0:p.now(),g=null,f=a.apply(d,e),g||(d=e=null)};return function(){var j=p.now();h||c.leading!==!1||(h=j);var k=b-(j-h);return d=this,e=arguments,0>=k||k>b?(clearTimeout(g),g=null,h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},p.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=p.now()-g;b>j&&j>0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=p.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},p.wrap=function(a,b){return p.partial(b,a)},p.negate=function(a){return function(){return!a.apply(this,arguments)}},p.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},p.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},p.before=function(a,b){var c;return function(){return--a>0?c=b.apply(this,arguments):b=null,c}},p.once=p.partial(p.before,2),p.keys=function(a){if(!p.isObject(a))return[];if(n)return n(a);var b=[];for(var c in a)p.has(a,c)&&b.push(c);return b},p.values=function(a){for(var b=p.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},p.pairs=function(a){for(var b=p.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},p.invert=function(a){for(var b={},c=p.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},p.functions=p.methods=function(a){var b=[];for(var c in a)p.isFunction(a[c])&&b.push(c);return b.sort()},p.extend=function(a){if(!p.isObject(a))return a;for(var b,c,d=1,e=arguments.length;e>d;d++){b=arguments[d];for(c in b)l.call(b,c)&&(a[c]=b[c])}return a},p.pick=function(a,b,c){var d,e={};if(null==a)return e;if(p.isFunction(b)){b=q(b,c);for(d in a){var f=a[d];b(f,d,a)&&(e[d]=f)}}else{var g=j.apply([],i.call(arguments,1));a=new Object(a);for(var h=0,k=g.length;k>h;h++)d=g[h],d in a&&(e[d]=a[d])}return e},p.omit=function(a,b,c){if(p.isFunction(b))b=p.negate(b);else{var d=p.map(j.apply([],i.call(arguments,1)),String);b=function(a,b){return!p.contains(d,b)}}return p.pick(a,b,c)},p.defaults=function(a){if(!p.isObject(a))return a;for(var b=1,c=arguments.length;c>b;b++){var d=arguments[b];for(var e in d)void 0===a[e]&&(a[e]=d[e])}return a},p.clone=function(a){return p.isObject(a)?p.isArray(a)?a.slice():p.extend({},a):a},p.tap=function(a,b){return b(a),a};var v=function(a,b,c,d){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;a instanceof p&&(a=a._wrapped),b instanceof p&&(b=b._wrapped);var e=k.call(a);if(e!==k.call(b))return!1;switch(e){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}if("object"!=typeof a||"object"!=typeof b)return!1;for(var f=c.length;f--;)if(c[f]===a)return d[f]===b;var g=a.constructor,h=b.constructor;if(g!==h&&"constructor"in a&&"constructor"in b&&!(p.isFunction(g)&&g instanceof g&&p.isFunction(h)&&h instanceof h))return!1;c.push(a),d.push(b);var i,j;if("[object Array]"===e){if(i=a.length,j=i===b.length)for(;i--&&(j=v(a[i],b[i],c,d)););}else{var l,m=p.keys(a);if(i=m.length,j=p.keys(b).length===i)for(;i--&&(l=m[i],j=p.has(b,l)&&v(a[l],b[l],c,d)););}return c.pop(),d.pop(),j};p.isEqual=function(a,b){return v(a,b,[],[])},p.isEmpty=function(a){if(null==a)return!0;if(p.isArray(a)||p.isString(a)||p.isArguments(a))return 0===a.length;for(var b in a)if(p.has(a,b))return!1;return!0},p.isElement=function(a){return!(!a||1!==a.nodeType)},p.isArray=m||function(a){return"[object Array]"===k.call(a)},p.isObject=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a},p.each(["Arguments","Function","String","Number","Date","RegExp"],function(a){p["is"+a]=function(b){return k.call(b)==="[object "+a+"]"}}),p.isArguments(arguments)||(p.isArguments=function(a){return p.has(a,"callee")}),"function"!=typeof/./&&(p.isFunction=function(a){return"function"==typeof a||!1}),p.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},p.isNaN=function(a){return p.isNumber(a)&&a!==+a},p.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"===k.call(a)},p.isNull=function(a){return null===a},p.isUndefined=function(a){return void 0===a},p.has=function(a,b){return null!=a&&l.call(a,b)},p.noConflict=function(){return a._=d,this},p.identity=function(a){return a},p.constant=function(a){return function(){return a}},p.noop=function(){},p.property=function(a){return function(b){return b[a]}},p.matches=function(a){var b=p.pairs(a),c=b.length;return function(a){if(null==a)return!c;a=new Object(a);for(var d=0;c>d;d++){var e=b[d],f=e[0];if(e[1]!==a[f]||!(f in a))return!1}return!0}},p.times=function(a,b,c){var d=Array(Math.max(0,a));b=q(b,c,1);for(var e=0;a>e;e++)d[e]=b(e);return d},p.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},p.now=Date.now||function(){return(new Date).getTime()};var w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},x=p.invert(w),y=function(a){var b=function(b){return a[b]},c="(?:"+p.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};p.escape=y(w),p.unescape=y(x),p.result=function(a,b){if(null==a)return void 0;var c=a[b];return p.isFunction(c)?a[b]():c};var z=0;p.uniqueId=function(a){var b=++z+"";return a?a+b:b},p.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},C=/\\|'|\r|\n|\u2028|\u2029/g,D=function(a){return"\\"+B[a]};p.template=function(a,b,c){!b&&c&&(b=c),b=p.defaults({},b,p.templateSettings);var d=RegExp([(b.escape||A).source,(b.interpolate||A).source,(b.evaluate||A).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(C,D),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(h){throw h.source=f,h}var i=function(a){return g.call(this,a,p)},j=b.variable||"obj";return i.source="function("+j+"){\n"+f+"}",i},p.chain=function(a){var b=p(a);return b._chain=!0,b};var E=function(a){return this._chain?p(a).chain():a};p.mixin=function(a){p.each(p.functions(a),function(b){var c=p[b]=a[b];p.prototype[b]=function(){var a=[this._wrapped];return h.apply(a,arguments),E.call(this,c.apply(p,a))}})},p.mixin(p),p.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=e[a];p.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],E.call(this,c)}}),p.each(["concat","join","slice"],function(a){var b=e[a];p.prototype[a]=function(){return E.call(this,b.apply(this._wrapped,arguments))}}),p.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return p})}).call(this)},{}]},{},[6]);
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){var c=a("underscore"),d=a("./../guid"),e=function(a){this.runner=a,this.suites={},this.specs={},this.failed=0,this.total=0};c.extend(e.prototype,{log:c.noop,id:function(a,b){return a[b]?a[b]:a[b]=d()},reportRunnerStarting:function(){var a=this.runId=d();this.runner.start({id:a,environment:navigator.userAgent,runner:"Jasmine",time:(new Date).getTime()})},reportRunnerResults:function(){this.runner.end({id:this.runId,failed:this.failed,total:this.total,passed:this.total-this.failed})},reportSpecResults:function(a){if(a.results_.failedCount){var b=a.results_.items_[0].message,c=a.results_.items_[0].trace.stack;this.failed++,this.total++,this.runner.fail({id:this.id(this.specs,a.id),err:{message:b,stack:c}})}else if(a.results_.passedCount){var d=(new Date).getTime()-a.startTime||0;this.total++,this.runner.pass({duration:d,id:this.id(this.specs,a.id)})}},startSuite:function(a){null!==a.parentSuite&&(a.parentSuite.started||this.startSuite(a.parentSuite)),this.runner.suite(null!==a.parentSuite?{title:a.description,parent:this.id(this.suites,a.parentSuite.id),id:this.id(this.suites,a.id)}:{title:a.description,root:!0,id:this.id(this.suites,a.id),parent:this.runId}),a.started=!0},reportSpecStarting:function(a){a.suite.started||this.startSuite(a.suite),a.startTime=new Date,a.suite.startTime||(a.suite.startTime=a.startTime),this.runner.test({title:a.description,parent:this.id(this.suites,a.suite.id),id:this.id(this.specs,a.id)})},reportSuiteResults:function(a){a.started&&this.runner.suiteEnd({id:this.id(this.suites,a.id)})}}),b.exports=function(a,b){a.getEnv().addReporter(new e(b))},b.exports.Reporter=e},{"./../guid":5,underscore:26}],2:[function(a,b){function c(a){var b=this,c={"test end":"testEnd","suite end":"suiteEnd"},f=function(d,e){a.on(d,function(){var a=e.apply(e,arguments),f=c[d]||d;b.api[f](a)})};this.originalReporter=new this.OldReporter(a),this.ids=[],this.uuids={},this.last={},this.total=0,this.pending=0,this.failed=0,this.runId=e(),f("start",function(){return{environment:navigator.userAgent,runner:"Mocha",time:(new Date).getTime(),id:b.runId}}),f("fail",function(a,c){var d=b.diff(a);return d.err={message:c.message,stack:c.stack||""},d}),f("end",function(a){var c=b.diff(a);return c.id=b.runId,c.total=b.total,c.failed=b.failed,c.pending=b.pending,c.passed=b.total-b.failed-b.pending,c}),f("suite",function(a){var c=b.diff(a);return a.root&&(c.parent=b.runId),c}),d.each(["suite end","pending","test","test end","pass"],function(a){f(a,d.bind(b.diff,b))}),a.on("pending",function(){b.pending++,b.total++}),a.on("fail",function(){b.failed++,b.total++}),a.on("pass",function(){b.total++})}var d=a("underscore"),e=a("./../guid");c.prototype.objectify=function(a){var b={},c=this;return d.each(a,function(a,e){var f=0===e.indexOf("_")||0===e.indexOf("$");if("object"!=typeof a||f)"function"==typeof a||f||void 0===a||(b[e]=a);else{var g=d.indexOf(c.ids,a);~g&&(b[e]=c.uuids[g])}}),b},c.prototype.diff=function(a){var b=this,c=b.objectify(a),f={},g=d.indexOf(b.ids,a);return~g?d.each(c,function(a,c){b.last[g][c]!==a&&(f[c]=a)}):(g=b.ids.push(a)-1,b.uuids[g]=e(),f=d.clone(c||{})),b.last[g]=c,f.id=b.uuids[g],f},b.exports=function(a,b){c.prototype.api=b,c.prototype.OldReporter=a._reporter,a.reporter(c)},b.exports.Reporter=c},{"./../guid":5,underscore:26}],3:[function(a,b){var c=a("./../guid");b.exports=function(a,b,d){var e=[],f=function(){return e[e.length-1]},g=function(){b.suiteEnd({id:f()}),e.pop()},h=c();return a.begin(function(){var a=d.document.getElementsByTagName("title")[0]||document.getElementsByTagName("h1")[0],f=c();b.start({id:h,environment:d.navigator.userAgent,runner:"QUnit",time:(new Date).getTime()}),b.suite({title:a?a.innerHTML:"",root:!0,id:f,parent:h}),e.push(f)}),a.moduleStart(function(a){var d=c();b.suite({title:a.name,parent:f(),id:d}),e.push(d)}),a.moduleDone(function(a){b.suiteEnd({failed:a.failed,total:a.total,id:f()}),e.pop()}),a.testStart(function(a){var d=c();b.suite({title:a.name,parent:f(),id:d}),e.push(d)}),a.testDone(g),a.log(function(a){var d=c(),e="";if(b.test({id:d,title:a.message||"okay",parent:f()}),a.result)b.pass({id:d});else{e=a.expected?"Expected "+a.expected+" but was "+a.actual:"Expected assertion to be truthy but it was not";var g=(a.source||"").replace(/\\n/g,"\n ");b.fail({id:d,err:{message:e,stack:"Error: "+e+"\n"+g}})}b.testEnd({id:d})}),a.done(function(a){a.id=h,g(),b.end(a)}),a}},{"./../guid":5}],4:[function(a,b){"use strict";var c=function(){},d=function(a){f=!1,d.isReady=!1,"function"==typeof a&&(c=a),i()},e=window.document,f=!1,g=function(){e.addEventListener?e.removeEventListener("DOMContentLoaded",g,!1):e.detachEvent("onreadystatechange",g),h()},h=function(){if(!d.isReady){if(!e.body)return setTimeout(h,1);d.isReady=!0,c()}},i=function(){var a=!1;if(!f)if(f=!0,"loading"!==e.readyState&&h(),e.addEventListener)e.addEventListener("DOMContentLoaded",g,!1),window.addEventListener("load",g,!1);else if(e.attachEvent){e.attachEvent("onreadystatechange",g),window.attachEvent("onload",g);try{a=null==window.frameElement}catch(b){}e.documentElement.doScroll&&a&&j()}},j=function(){if(!d.isReady){try{e.documentElement.doScroll("left")}catch(a){return void setTimeout(j,1)}h()}};d.isReady=!1,b.exports=d},{}],5:[function(a,b){var c=a("MD5");b.exports=function(){var a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"==a?b:3&b|8;return c.toString(16)});return c(a+navigator.useragent)}},{MD5:9}],6:[function(a){var b=a("underscore"),c=a("es6-promise").Promise,d=a("./docready"),e=a("./runner"),f=a("./service"),g=a("./adapters/qunit"),h=a("./adapters/jasmine-legacy"),i=a("./adapters/mocha");d(function(){var a=window.Testee=window.Testee||{};a.socket=a.socket||io(),b.defaults(a,{runs:f("runs",a.socket),suites:f("suites",a.socket),tests:f("tests",a.socket),coverages:f("coverages",a.socket),runner:function(){return this._runner||(this._runner=e(a)),this._runner},init:function(){window.QUnit&&this.initQUnit(window.QUnit),window.jasmine&&window.jasmine.version_&&1===window.jasmine.version_.major&&this.initJasmine1(window.jasmine),window.mocha&&window.Mocha&&this.initMocha(window.mocha)},initQUnit:function(a){g(a,this.runner(),window)},initJasmine1:function(a){h(a,this.runner(),window)},initMocha:function(a){i(a||window.mocha,this.runner(),window)},connect:new c(function(c){var d=function(){b.delay(function(){c(a.socket)},250)};a.socket.connected?d():a.socket.on("connect",d)})}),a.autoInit!==!1&&a.init()}),window._restoreUMD&&window._restoreUMD()},{"./adapters/jasmine-legacy":1,"./adapters/mocha":2,"./adapters/qunit":3,"./docready":4,"./runner":7,"./service":8,"es6-promise":16,underscore:26}],7:[function(a,b){var c=a("underscore"),d=a("es6-promise").Promise;b.exports=function(a){var b={file:window.location.toString()};return c.extend({call:function(a,b){var e=c.toArray(arguments).slice(2),f=this[a];return this.connect=this.connect.then(function(){return new d(function(a,c){e.push({}),e.push(function(b,d){b?c(d):a(d)}),f[b].apply(f,e)})}),this.connect},start:function(a){a=c.extend({status:"running"},b,a),this.call("runs","create",a)},suite:function(a){a=c.extend({status:"running"},b,a),this.call("suites","create",a)},test:function(a){a=c.extend({},b,a),this.call("tests","create",a)},pending:function(a){a=c.extend({status:"pending"},b,a),this.call("tests","create",a)},pass:function(a){a=c.extend({status:"passed"},a),this.call("tests","patch",a.id,a)},fail:function(a){a=c.extend({status:"failed"},a),this.call("tests","patch",a.id,a)},testEnd:function(){},suiteEnd:function(a){a=c.extend({status:"finished"},a),this.call("suites","patch",a.id,a)},end:function(a){a=c.extend({status:"finished"},a);var b=this.socket;window.__coverage__&&this.coverages&&this.call("coverages","create",{id:a.id,run:a,coverage:window.__coverage__}),this.call("runs","patch",a.id,a).then(function(){"function"==typeof b.disconnect&&b.disconnect()})}},a)}},{"es6-promise":16,underscore:26}],8:[function(a,b){var c=a("underscore"),d=function(a){return a.replace(/^\/|\/$/g,"")},e=["find","get","create","update","patch","remove"],f=function(a,b){this.path=d(a),this.socket=b};f.prototype.on=function(a,b){this.socket.on(this.path+" "+a,b)},f.prototype.off=function(a,b){this.socket.off(this.path+" "+a,b)},c.each(e,function(a){f.prototype[a]=function(){var b=Array.prototype.slice.call(arguments,0);b.unshift(this.path+"::"+a),this.socket.emit.apply(this.socket,b)}}),b.exports=function(a,b){return new f(a,b)},b.exports.Service=f},{underscore:26}],9:[function(a,b){(function(c){!function(){var d=a("crypt"),e=a("charenc").utf8,f=a("charenc").bin,g=function(a,b){a.constructor==String?a=b&&"binary"===b.encoding?f.stringToBytes(a):e.stringToBytes(a):"undefined"!=typeof c&&"function"==typeof c.isBuffer&&c.isBuffer(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||(a=a.toString());for(var h=d.bytesToWords(a),i=8*a.length,j=1732584193,k=-271733879,l=-1732584194,m=271733878,n=0;n<h.length;n++)h[n]=16711935&(h[n]<<8|h[n]>>>24)|4278255360&(h[n]<<24|h[n]>>>8);h[i>>>5]|=128<<i%32,h[(i+64>>>9<<4)+14]=i;for(var o=g._ff,p=g._gg,q=g._hh,r=g._ii,n=0;n<h.length;n+=16){var s=j,t=k,u=l,v=m;j=o(j,k,l,m,h[n+0],7,-680876936),m=o(m,j,k,l,h[n+1],12,-389564586),l=o(l,m,j,k,h[n+2],17,606105819),k=o(k,l,m,j,h[n+3],22,-1044525330),j=o(j,k,l,m,h[n+4],7,-176418897),m=o(m,j,k,l,h[n+5],12,1200080426),l=o(l,m,j,k,h[n+6],17,-1473231341),k=o(k,l,m,j,h[n+7],22,-45705983),j=o(j,k,l,m,h[n+8],7,1770035416),m=o(m,j,k,l,h[n+9],12,-1958414417),l=o(l,m,j,k,h[n+10],17,-42063),k=o(k,l,m,j,h[n+11],22,-1990404162),j=o(j,k,l,m,h[n+12],7,1804603682),m=o(m,j,k,l,h[n+13],12,-40341101),l=o(l,m,j,k,h[n+14],17,-1502002290),k=o(k,l,m,j,h[n+15],22,1236535329),j=p(j,k,l,m,h[n+1],5,-165796510),m=p(m,j,k,l,h[n+6],9,-1069501632),l=p(l,m,j,k,h[n+11],14,643717713),k=p(k,l,m,j,h[n+0],20,-373897302),j=p(j,k,l,m,h[n+5],5,-701558691),m=p(m,j,k,l,h[n+10],9,38016083),l=p(l,m,j,k,h[n+15],14,-660478335),k=p(k,l,m,j,h[n+4],20,-405537848),j=p(j,k,l,m,h[n+9],5,568446438),m=p(m,j,k,l,h[n+14],9,-1019803690),l=p(l,m,j,k,h[n+3],14,-187363961),k=p(k,l,m,j,h[n+8],20,1163531501),j=p(j,k,l,m,h[n+13],5,-1444681467),m=p(m,j,k,l,h[n+2],9,-51403784),l=p(l,m,j,k,h[n+7],14,1735328473),k=p(k,l,m,j,h[n+12],20,-1926607734),j=q(j,k,l,m,h[n+5],4,-378558),m=q(m,j,k,l,h[n+8],11,-2022574463),l=q(l,m,j,k,h[n+11],16,1839030562),k=q(k,l,m,j,h[n+14],23,-35309556),j=q(j,k,l,m,h[n+1],4,-1530992060),m=q(m,j,k,l,h[n+4],11,1272893353),l=q(l,m,j,k,h[n+7],16,-155497632),k=q(k,l,m,j,h[n+10],23,-1094730640),j=q(j,k,l,m,h[n+13],4,681279174),m=q(m,j,k,l,h[n+0],11,-358537222),l=q(l,m,j,k,h[n+3],16,-722521979),k=q(k,l,m,j,h[n+6],23,76029189),j=q(j,k,l,m,h[n+9],4,-640364487),m=q(m,j,k,l,h[n+12],11,-421815835),l=q(l,m,j,k,h[n+15],16,530742520),k=q(k,l,m,j,h[n+2],23,-995338651),j=r(j,k,l,m,h[n+0],6,-198630844),m=r(m,j,k,l,h[n+7],10,1126891415),l=r(l,m,j,k,h[n+14],15,-1416354905),k=r(k,l,m,j,h[n+5],21,-57434055),j=r(j,k,l,m,h[n+12],6,1700485571),m=r(m,j,k,l,h[n+3],10,-1894986606),l=r(l,m,j,k,h[n+10],15,-1051523),k=r(k,l,m,j,h[n+1],21,-2054922799),j=r(j,k,l,m,h[n+8],6,1873313359),m=r(m,j,k,l,h[n+15],10,-30611744),l=r(l,m,j,k,h[n+6],15,-1560198380),k=r(k,l,m,j,h[n+13],21,1309151649),j=r(j,k,l,m,h[n+4],6,-145523070),m=r(m,j,k,l,h[n+11],10,-1120210379),l=r(l,m,j,k,h[n+2],15,718787259),k=r(k,l,m,j,h[n+9],21,-343485551),j=j+s>>>0,k=k+t>>>0,l=l+u>>>0,m=m+v>>>0}return d.endian([j,k,l,m])};g._ff=function(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+(e>>>0)+g;return(h<<f|h>>>32-f)+b},g._gg=function(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+(e>>>0)+g;return(h<<f|h>>>32-f)+b},g._hh=function(a,b,c,d,e,f,g){var h=a+(b^c^d)+(e>>>0)+g;return(h<<f|h>>>32-f)+b},g._ii=function(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+(e>>>0)+g;return(h<<f|h>>>32-f)+b},g._blocksize=16,g._digestsize=16,b.exports=function(a,b){if("undefined"!=typeof a){var c=d.wordsToBytes(g(a,b));return b&&b.asBytes?c:b&&b.asString?f.bytesToString(c):d.bytesToHex(c)}}}()}).call(this,a("buffer").Buffer)},{buffer:12,charenc:10,crypt:11}],10:[function(a,b){var c={utf8:{stringToBytes:function(a){return c.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(c.bin.bytesToString(a)))}},bin:{stringToBytes:function(a){for(var b=[],c=0;c<a.length;c++)b.push(255&a.charCodeAt(c));return b},bytesToString:function(a){for(var b=[],c=0;c<a.length;c++)b.push(String.fromCharCode(a[c]));return b.join("")}}};b.exports=c},{}],11:[function(a,b){!function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c={rotl:function(a,b){return a<<b|a>>>32-b},rotr:function(a,b){return a<<32-b|a>>>b},endian:function(a){if(a.constructor==Number)return 16711935&c.rotl(a,8)|4278255360&c.rotl(a,24);for(var b=0;b<a.length;b++)a[b]=c.endian(a[b]);return a},randomBytes:function(a){for(var b=[];a>0;a--)b.push(Math.floor(256*Math.random()));return b},bytesToWords:function(a){for(var b=[],c=0,d=0;c<a.length;c++,d+=8)b[d>>>5]|=a[c]<<24-d%32;return b},wordsToBytes:function(a){for(var b=[],c=0;c<32*a.length;c+=8)b.push(a[c>>>5]>>>24-c%32&255);return b},bytesToHex:function(a){for(var b=[],c=0;c<a.length;c++)b.push((a[c]>>>4).toString(16)),b.push((15&a[c]).toString(16));return b.join("")},hexToBytes:function(a){for(var b=[],c=0;c<a.length;c+=2)b.push(parseInt(a.substr(c,2),16));return b},bytesToBase64:function(b){for(var c=[],d=0;d<b.length;d+=3)for(var e=b[d]<<16|b[d+1]<<8|b[d+2],f=0;4>f;f++)c.push(8*d+6*f<=8*b.length?a.charAt(e>>>6*(3-f)&63):"=");return c.join("")},base64ToBytes:function(b){b=b.replace(/[^A-Z0-9+\/]/gi,"");for(var c=[],d=0,e=0;d<b.length;e=++d%4)0!=e&&c.push((a.indexOf(b.charAt(d-1))&Math.pow(2,-2*e+8)-1)<<2*e|a.indexOf(b.charAt(d))>>>6-2*e);return c}};b.exports=c}()},{}],12:[function(a,b,c){function d(a,b,c){if(!(this instanceof d))return new d(a,b,c);var e,f=typeof a;if("number"===f)e=a>0?a>>>0:0;else if("string"===f)"base64"===b&&(a=C(a)),e=d.byteLength(a,b);else{if("object"!==f||null===a)throw new Error("First argument needs to be a number, array or string.");"Buffer"===a.type&&E(a.data)&&(a=a.data),e=+a.length>0?Math.floor(+a.length):0}var g;T?g=d._augment(new Uint8Array(e)):(g=this,g.length=e,g._isBuffer=!0);var h;if(T&&"number"==typeof a.byteLength)g._set(a);else if(F(a))if(d.isBuffer(a))for(h=0;e>h;h++)g[h]=a.readUInt8(h);else for(h=0;e>h;h++)g[h]=(a[h]%256+256)%256;else if("string"===f)g.write(a,0,b);else if("number"===f&&!T&&!c)for(h=0;e>h;h++)g[h]=0;return g}function e(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;Q(f%2===0,"Invalid hex string"),d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);Q(!isNaN(h),"Invalid hex string"),a[c+g]=h}return g}function f(a,b,c,d){var e=L(H(b),a,c,d);return e}function g(a,b,c,d){var e=L(I(b),a,c,d);return e}function h(a,b,c,d){return g(a,b,c,d)}function i(a,b,c,d){var e=L(K(b),a,c,d);return e}function j(a,b,c,d){var e=L(J(b),a,c,d);return e}function k(a,b,c){return R.fromByteArray(0===b&&c===a.length?a:a.slice(b,c))}function l(a,b,c){var d="",e="";c=Math.min(a.length,c);for(var f=b;c>f;f++)a[f]<=127?(d+=M(e)+String.fromCharCode(a[f]),e=""):e+="%"+a[f].toString(16);return d+M(e)}function m(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function n(a,b,c){return m(a,b,c)}function o(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=G(a[f]);return e}function p(a,b,c){for(var d=a.slice(b,c),e="",f=0;f<d.length;f+=2)e+=String.fromCharCode(d[f]+256*d[f+1]);return e}function q(a,b,c,d){d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(void 0!==b&&null!==b,"missing offset"),Q(b+1<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){var f;return c?(f=a[b],e>b+1&&(f|=a[b+1]<<8)):(f=a[b]<<8,e>b+1&&(f|=a[b+1])),f}}function r(a,b,c,d){d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(void 0!==b&&null!==b,"missing offset"),Q(b+3<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){var f;return c?(e>b+2&&(f=a[b+2]<<16),e>b+1&&(f|=a[b+1]<<8),f|=a[b],e>b+3&&(f+=a[b+3]<<24>>>0)):(e>b+1&&(f=a[b+1]<<16),e>b+2&&(f|=a[b+2]<<8),e>b+3&&(f|=a[b+3]),f+=a[b]<<24>>>0),f}}function s(a,b,c,d){d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(void 0!==b&&null!==b,"missing offset"),Q(b+1<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){var f=q(a,b,c,!0),g=32768&f;return g?-1*(65535-f+1):f}}function t(a,b,c,d){d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(void 0!==b&&null!==b,"missing offset"),Q(b+3<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){var f=r(a,b,c,!0),g=2147483648&f;return g?-1*(4294967295-f+1):f}}function u(a,b,c,d){return d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(b+3<a.length,"Trying to read beyond buffer length")),S.read(a,b,c,23,4)}function v(a,b,c,d){return d||(Q("boolean"==typeof c,"missing or invalid endian"),Q(b+7<a.length,"Trying to read beyond buffer length")),S.read(a,b,c,52,8)}function w(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+1<a.length,"trying to write beyond buffer length"),N(b,65535));var f=a.length;if(!(c>=f)){for(var g=0,h=Math.min(f-c,2);h>g;g++)a[c+g]=(b&255<<8*(d?g:1-g))>>>8*(d?g:1-g);return c+2}}function x(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+3<a.length,"trying to write beyond buffer length"),N(b,4294967295));var f=a.length;if(!(c>=f)){for(var g=0,h=Math.min(f-c,4);h>g;g++)a[c+g]=b>>>8*(d?g:3-g)&255;return c+4}}function y(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+1<a.length,"Trying to write beyond buffer length"),O(b,32767,-32768));var f=a.length;if(!(c>=f))return b>=0?w(a,b,c,d,e):w(a,65535+b+1,c,d,e),c+2}function z(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+3<a.length,"Trying to write beyond buffer length"),O(b,2147483647,-2147483648));var f=a.length;if(!(c>=f))return b>=0?x(a,b,c,d,e):x(a,4294967295+b+1,c,d,e),c+4}function A(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+3<a.length,"Trying to write beyond buffer length"),P(b,3.4028234663852886e38,-3.4028234663852886e38));var f=a.length;if(!(c>=f))return S.write(a,b,c,d,23,4),c+4}function B(a,b,c,d,e){e||(Q(void 0!==b&&null!==b,"missing value"),Q("boolean"==typeof d,"missing or invalid endian"),Q(void 0!==c&&null!==c,"missing offset"),Q(c+7<a.length,"Trying to write beyond buffer length"),P(b,1.7976931348623157e308,-1.7976931348623157e308));var f=a.length;if(!(c>=f))return S.write(a,b,c,d,52,8),c+8}function C(a){for(a=D(a).replace(V,"");a.length%4!==0;)a+="=";return a}function D(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function E(a){return(Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)})(a)}function F(a){return E(a)||d.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function G(a){return 16>a?"0"+a.toString(16):a.toString(16)}function H(a){for(var b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);if(127>=d)b.push(d);else{var e=c;d>=55296&&57343>=d&&c++;for(var f=encodeURIComponent(a.slice(e,c+1)).substr(1).split("%"),g=0;g<f.length;g++)b.push(parseInt(f[g],16))}}return b}function I(a){for(var b=[],c=0;c<a.length;c++)b.push(255&a.charCodeAt(c));return b}function J(a){for(var b,c,d,e=[],f=0;f<a.length;f++)b=a.charCodeAt(f),c=b>>8,d=b%256,e.push(d),e.push(c);return e}function K(a){return R.toByteArray(a)}function L(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}function M(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function N(a,b){Q("number"==typeof a,"cannot write a non-number as a number"),Q(a>=0,"specified a negative value for writing an unsigned value"),Q(b>=a,"value is larger than maximum value for type"),Q(Math.floor(a)===a,"value has a fractional component")}function O(a,b,c){Q("number"==typeof a,"cannot write a non-number as a number"),Q(b>=a,"value larger than maximum allowed value"),Q(a>=c,"value smaller than minimum allowed value"),Q(Math.floor(a)===a,"value has a fractional component")}function P(a,b,c){Q("number"==typeof a,"cannot write a non-number as a number"),Q(b>=a,"value larger than maximum allowed value"),Q(a>=c,"value smaller than minimum allowed value")}function Q(a,b){if(!a)throw new Error(b||"Failed assertion")}var R=a("base64-js"),S=a("ieee754");c.Buffer=d,c.SlowBuffer=d,c.INSPECT_MAX_BYTES=50,d.poolSize=8192;var T=function(){try{var a=new ArrayBuffer(0),b=new Uint8Array(a);return b.foo=function(){return 42},42===b.foo()&&"function"==typeof b.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(c){return!1}}();d.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.isBuffer=function(a){return!(null==a||!a._isBuffer)},d.byteLength=function(a,b){var c;switch(a=a.toString(),b||"utf8"){case"hex":c=a.length/2;break;case"utf8":case"utf-8":c=H(a).length;break;case"ascii":case"binary":case"raw":c=a.length;break;case"base64":c=K(a).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":c=2*a.length;break;default:throw new Error("Unknown encoding")}return c},d.concat=function(a,b){if(Q(E(a),"Usage: Buffer.concat(list[, length])"),0===a.length)return new d(0);if(1===a.length)return a[0];var c;if(void 0===b)for(b=0,c=0;c<a.length;c++)b+=a[c].length;var e=new d(b),f=0;for(c=0;c<a.length;c++){var g=a[c];g.copy(e,f),f+=g.length}return e},d.compare=function(a,b){Q(d.isBuffer(a)&&d.isBuffer(b),"Arguments must be Buffers");for(var c=a.length,e=b.length,f=0,g=Math.min(c,e);g>f&&a[f]===b[f];f++);return f!==g&&(c=a[f],e=b[f]),e>c?-1:c>e?1:0},d.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var k=d;d=b,b=c,c=k}b=Number(b)||0;var l=this.length-b;c?(c=Number(c),c>l&&(c=l)):c=l,d=String(d||"utf8").toLowerCase();var m;switch(d){case"hex":m=e(this,a,b,c);break;case"utf8":case"utf-8":m=f(this,a,b,c);break;case"ascii":m=g(this,a,b,c);break;case"binary":m=h(this,a,b,c);break;case"base64":m=i(this,a,b,c);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":m=j(this,a,b,c);break;default:throw new Error("Unknown encoding")}return m},d.prototype.toString=function(a,b,c){var d=this;if(a=String(a||"utf8").toLowerCase(),b=Number(b)||0,c=void 0===c?d.length:Number(c),c===b)return"";var e;switch(a){case"hex":e=o(d,b,c);break;case"utf8":case"utf-8":e=l(d,b,c);break;case"ascii":e=m(d,b,c);break;case"binary":e=n(d,b,c);break;case"base64":e=k(d,b,c);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":e=p(d,b,c);break;default:throw new Error("Unknown encoding")}return e},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},d.prototype.equals=function(a){return Q(d.isBuffer(a),"Argument must be a Buffer"),0===d.compare(this,a)},d.prototype.compare=function(a){return Q(d.isBuffer(a),"Argument must be a Buffer"),d.compare(this,a)},d.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),d||0===d||(d=this.length),b||(b=0),d!==c&&0!==a.length&&0!==e.length){Q(d>=c,"sourceEnd < sourceStart"),Q(b>=0&&b<a.length,"targetStart out of bounds"),Q(c>=0&&c<e.length,"sourceStart out of bounds"),Q(d>=0&&d<=e.length,"sourceEnd out of bounds"),d>this.length&&(d=this.length),a.length-b<d-c&&(d=a.length-b+c);var f=d-c;if(100>f||!T)for(var g=0;f>g;g++)a[g+b]=this[g+c];else a._set(this.subarray(c,c+f),b)}},d.prototype.slice=function(a,b){var c=this.length;if(a=~~a,b=void 0===b?c:~~b,0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c),0>b?(b+=c,0>b&&(b=0)):b>c&&(b=c),a>b&&(b=a),T)return d._augment(this.subarray(a,b));for(var e=b-a,f=new d(e,void 0,!0),g=0;e>g;g++)f[g]=this[g+a];return f},d.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},d.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},d.prototype.readUInt8=function(a,b){return b||(Q(void 0!==a&&null!==a,"missing offset"),Q(a<this.length,"Trying to read beyond buffer length")),a>=this.length?void 0:this[a]},d.prototype.readUInt16LE=function(a,b){return q(this,a,!0,b)},d.prototype.readUInt16BE=function(a,b){return q(this,a,!1,b)},d.prototype.readUInt32LE=function(a,b){return r(this,a,!0,b)},d.prototype.readUInt32BE=function(a,b){return r(this,a,!1,b)},d.prototype.readInt8=function(a,b){if(b||(Q(void 0!==a&&null!==a,"missing offset"),Q(a<this.length,"Trying to read beyond buffer length")),!(a>=this.length)){var c=128&this[a];return c?-1*(255-this[a]+1):this[a]}},d.prototype.readInt16LE=function(a,b){return s(this,a,!0,b)},d.prototype.readInt16BE=function(a,b){return s(this,a,!1,b)},d.prototype.readInt32LE=function(a,b){return t(this,a,!0,b)},d.prototype.readInt32BE=function(a,b){return t(this,a,!1,b)},d.prototype.readFloatLE=function(a,b){return u(this,a,!0,b)},d.prototype.readFloatBE=function(a,b){return u(this,a,!1,b)},d.prototype.readDoubleLE=function(a,b){return v(this,a,!0,b)},d.prototype.readDoubleBE=function(a,b){return v(this,a,!1,b)},d.prototype.writeUInt8=function(a,b,c){return c||(Q(void 0!==a&&null!==a,"missing value"),Q(void 0!==b&&null!==b,"missing offset"),Q(b<this.length,"trying to write beyond buffer length"),N(a,255)),b>=this.length?void 0:(this[b]=a,b+1)},d.prototype.writeUInt16LE=function(a,b,c){return w(this,a,b,!0,c)},d.prototype.writeUInt16BE=function(a,b,c){return w(this,a,b,!1,c)},d.prototype.writeUInt32LE=function(a,b,c){return x(this,a,b,!0,c)},d.prototype.writeUInt32BE=function(a,b,c){return x(this,a,b,!1,c)},d.prototype.writeInt8=function(a,b,c){return c||(Q(void 0!==a&&null!==a,"missing value"),Q(void 0!==b&&null!==b,"missing offset"),Q(b<this.length,"Trying to write beyond buffer length"),O(a,127,-128)),b>=this.length?void 0:(a>=0?this.writeUInt8(a,b,c):this.writeUInt8(255+a+1,b,c),b+1)},d.prototype.writeInt16LE=function(a,b,c){return y(this,a,b,!0,c)},d.prototype.writeInt16BE=function(a,b,c){return y(this,a,b,!1,c)},d.prototype.writeInt32LE=function(a,b,c){return z(this,a,b,!0,c)},d.prototype.writeInt32BE=function(a,b,c){return z(this,a,b,!1,c)},d.prototype.writeFloatLE=function(a,b,c){return A(this,a,b,!0,c)},d.prototype.writeFloatBE=function(a,b,c){return A(this,a,b,!1,c)},d.prototype.writeDoubleLE=function(a,b,c){return B(this,a,b,!0,c)},d.prototype.writeDoubleBE=function(a,b,c){return B(this,a,b,!1,c)},d.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),Q(c>=b,"end < start"),c!==b&&0!==this.length){Q(b>=0&&b<this.length,"start out of bounds"),Q(c>=0&&c<=this.length,"end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=H(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},d.prototype.inspect=function(){for(var a=[],b=this.length,d=0;b>d;d++)if(a[d]=G(this[d]),d===c.INSPECT_MAX_BYTES){a[d+1]="...";break}return"<Buffer "+a.join(" ")+">"},d.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(T)return new d(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;c>b;b+=1)a[b]=this[b];return a.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var U=d.prototype;d._augment=function(a){return a._isBuffer=!0,a._get=a.get,a._set=a.set,a.get=U.get,a.set=U.set,a.write=U.write,a.toString=U.toString,a.toLocaleString=U.toString,a.toJSON=U.toJSON,a.equals=U.equals,a.compare=U.compare,a.copy=U.copy,a.slice=U.slice,a.readUInt8=U.readUInt8,a.readUInt16LE=U.readUInt16LE,a.readUInt16BE=U.readUInt16BE,a.readUInt32LE=U.readUInt32LE,a.readUInt32BE=U.readUInt32BE,a.readInt8=U.readInt8,a.readInt16LE=U.readInt16LE,a.readInt16BE=U.readInt16BE,a.readInt32LE=U.readInt32LE,a.readInt32BE=U.readInt32BE,a.readFloatLE=U.readFloatLE,a.readFloatBE=U.readFloatBE,a.readDoubleLE=U.readDoubleLE,a.readDoubleBE=U.readDoubleBE,a.writeUInt8=U.writeUInt8,a.writeUInt16LE=U.writeUInt16LE,a.writeUInt16BE=U.writeUInt16BE,a.writeUInt32LE=U.writeUInt32LE,a.writeUInt32BE=U.writeUInt32BE,a.writeInt8=U.writeInt8,a.writeInt16LE=U.writeInt16LE,a.writeInt16BE=U.writeInt16BE,a.writeInt32LE=U.writeInt32LE,a.writeInt32BE=U.writeInt32BE,a.writeFloatLE=U.writeFloatLE,a.writeFloatBE=U.writeFloatBE,a.writeDoubleLE=U.writeDoubleLE,a.writeDoubleBE=U.writeDoubleBE,a.fill=U.fill,a.inspect=U.inspect,a.toArrayBuffer=U.toArrayBuffer,a};var V=/[^+\/0-9A-z]/g},{"base64-js":13,ieee754:14}],13:[function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g?62:b===h?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}("undefined"==typeof c?this.base64js={}:c)},{}],14:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<<h)-1,j=i>>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<<j)-1,l=k>>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<<e|h,j+=e;j>0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],15:[function(a,b){function c(){}var d=b.exports={};d.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();
d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(){throw new Error("process.chdir is not supported")}},{}],16:[function(a,b,c){"use strict";var d=a("./promise/promise").Promise,e=a("./promise/polyfill").polyfill;c.Promise=d,c.polyfill=e},{"./promise/polyfill":20,"./promise/promise":21}],17:[function(a,b,c){"use strict";function d(a){var b=this;if(!e(a))throw new TypeError("You must pass an array to all.");return new b(function(b,c){function d(a){return function(b){e(a,b)}}function e(a,c){h[a]=c,0===--i&&b(h)}var g,h=[],i=a.length;0===i&&b([]);for(var j=0;j<a.length;j++)g=a[j],g&&f(g.then)?g.then(d(j),c):e(j,g)})}var e=a("./utils").isArray,f=a("./utils").isFunction;c.all=d},{"./utils":25}],18:[function(a,b,c){(function(a,b){"use strict";function d(){return function(){a.nextTick(g)}}function e(){var a=0,b=new k(g),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function f(){return function(){l.setTimeout(g,1)}}function g(){for(var a=0;a<m.length;a++){var b=m[a],c=b[0],d=b[1];c(d)}m=[]}function h(a,b){var c=m.push([a,b]);1===c&&i()}var i,j="undefined"!=typeof window?window:{},k=j.MutationObserver||j.WebKitMutationObserver,l="undefined"!=typeof b?b:void 0===this?window:this,m=[];i="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?d():k?e():f(),c.asap=h}).call(this,a("FWaASH"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{FWaASH:15}],19:[function(a,b,c){"use strict";function d(a,b){return 2!==arguments.length?e[a]:void(e[a]=b)}var e={instrument:!1};c.config=e,c.configure=d},{}],20:[function(a,b,c){(function(b){"use strict";function d(){var a;a="undefined"!=typeof b?b:"undefined"!=typeof window&&window.document?window:self;var c="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),f(b)}();c||(a.Promise=e)}var e=a("./promise").Promise,f=a("./utils").isFunction;c.polyfill=d}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./promise":21,"./utils":25}],21:[function(a,b,c){"use strict";function d(a){if(!q(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof d))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],e(a,this)}function e(a,b){function c(a){j(b,a)}function d(a){l(b,a)}try{a(c,d)}catch(e){d(e)}}function f(a,b,c,d){var e,f,g,h,k=q(c);if(k)try{e=c(d),g=!0}catch(m){h=!0,f=m}else e=d,g=!0;i(b,e)||(k&&g?j(b,e):h?l(b,f):a===y?j(b,e):a===z&&l(b,e))}function g(a,b,c,d){var e=a._subscribers,f=e.length;e[f]=b,e[f+y]=c,e[f+z]=d}function h(a,b){for(var c,d,e=a._subscribers,g=a._detail,h=0;h<e.length;h+=3)c=e[h],d=e[h+b],f(b,c,d,g);a._subscribers=null}function i(a,b){var c,d=null;try{if(a===b)throw new TypeError("A promises callback cannot return that same promise.");if(p(b)&&(d=b.then,q(d)))return d.call(b,function(d){return c?!0:(c=!0,void(b!==d?j(a,d):k(a,d)))},function(b){return c?!0:(c=!0,void l(a,b))}),!0}catch(e){return c?!0:(l(a,e),!0)}return!1}function j(a,b){a===b?k(a,b):i(a,b)||k(a,b)}function k(a,b){a._state===w&&(a._state=x,a._detail=b,o.async(m,a))}function l(a,b){a._state===w&&(a._state=x,a._detail=b,o.async(n,a))}function m(a){h(a,a._state=y)}function n(a){h(a,a._state=z)}var o=a("./config").config,p=(a("./config").configure,a("./utils").objectOrFunction),q=a("./utils").isFunction,r=(a("./utils").now,a("./all").all),s=a("./race").race,t=a("./resolve").resolve,u=a("./reject").reject,v=a("./asap").asap;o.async=v;var w=void 0,x=0,y=1,z=2;d.prototype={constructor:d,_state:void 0,_detail:void 0,_subscribers:void 0,then:function(a,b){var c=this,d=new this.constructor(function(){});if(this._state){var e=arguments;o.async(function(){f(c._state,d,e[c._state-1],c._detail)})}else g(this,d,a,b);return d},"catch":function(a){return this.then(null,a)}},d.all=r,d.race=s,d.resolve=t,d.reject=u,c.Promise=d},{"./all":17,"./asap":18,"./config":19,"./race":22,"./reject":23,"./resolve":24,"./utils":25}],22:[function(a,b,c){"use strict";function d(a){var b=this;if(!e(a))throw new TypeError("You must pass an array to race.");return new b(function(b,c){for(var d,e=0;e<a.length;e++)d=a[e],d&&"function"==typeof d.then?d.then(b,c):b(d)})}var e=a("./utils").isArray;c.race=d},{"./utils":25}],23:[function(a,b,c){"use strict";function d(a){var b=this;return new b(function(b,c){c(a)})}c.reject=d},{}],24:[function(a,b,c){"use strict";function d(a){if(a&&"object"==typeof a&&a.constructor===this)return a;var b=this;return new b(function(b){b(a)})}c.resolve=d},{}],25:[function(a,b,c){"use strict";function d(a){return e(a)||"object"==typeof a&&null!==a}function e(a){return"function"==typeof a}function f(a){return"[object Array]"===Object.prototype.toString.call(a)}var g=Date.now||function(){return(new Date).getTime()};c.objectOrFunction=d,c.isFunction=e,c.isArray=f,c.now=g},{}],26:[function(a,b,c){(function(){var a=this,d=a._,e=Array.prototype,f=Object.prototype,g=Function.prototype,h=e.push,i=e.slice,j=e.concat,k=f.toString,l=f.hasOwnProperty,m=Array.isArray,n=Object.keys,o=g.bind,p=function(a){return a instanceof p?a:this instanceof p?void(this._wrapped=a):new p(a)};"undefined"!=typeof c?("undefined"!=typeof b&&b.exports&&(c=b.exports=p),c._=p):a._=p,p.VERSION="1.7.0";var q=function(a,b,c){if(void 0===b)return a;switch(null==c?3:c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return function(){return a.apply(b,arguments)}};p.iteratee=function(a,b,c){return null==a?p.identity:p.isFunction(a)?q(a,b,c):p.isObject(a)?p.matches(a):p.property(a)},p.each=p.forEach=function(a,b,c){if(null==a)return a;b=q(b,c);var d,e=a.length;if(e===+e)for(d=0;e>d;d++)b(a[d],d,a);else{var f=p.keys(a);for(d=0,e=f.length;e>d;d++)b(a[f[d]],f[d],a)}return a},p.map=p.collect=function(a,b,c){if(null==a)return[];b=p.iteratee(b,c);for(var d,e=a.length!==+a.length&&p.keys(a),f=(e||a).length,g=Array(f),h=0;f>h;h++)d=e?e[h]:h,g[h]=b(a[d],d,a);return g};var r="Reduce of empty array with no initial value";p.reduce=p.foldl=p.inject=function(a,b,c,d){null==a&&(a=[]),b=q(b,d,4);var e,f=a.length!==+a.length&&p.keys(a),g=(f||a).length,h=0;if(arguments.length<3){if(!g)throw new TypeError(r);c=a[f?f[h++]:h++]}for(;g>h;h++)e=f?f[h]:h,c=b(c,a[e],e,a);return c},p.reduceRight=p.foldr=function(a,b,c,d){null==a&&(a=[]),b=q(b,d,4);var e,f=a.length!==+a.length&&p.keys(a),g=(f||a).length;if(arguments.length<3){if(!g)throw new TypeError(r);c=a[f?f[--g]:--g]}for(;g--;)e=f?f[g]:g,c=b(c,a[e],e,a);return c},p.find=p.detect=function(a,b,c){var d;return b=p.iteratee(b,c),p.some(a,function(a,c,e){return b(a,c,e)?(d=a,!0):void 0}),d},p.filter=p.select=function(a,b,c){var d=[];return null==a?d:(b=p.iteratee(b,c),p.each(a,function(a,c,e){b(a,c,e)&&d.push(a)}),d)},p.reject=function(a,b,c){return p.filter(a,p.negate(p.iteratee(b)),c)},p.every=p.all=function(a,b,c){if(null==a)return!0;b=p.iteratee(b,c);var d,e,f=a.length!==+a.length&&p.keys(a),g=(f||a).length;for(d=0;g>d;d++)if(e=f?f[d]:d,!b(a[e],e,a))return!1;return!0},p.some=p.any=function(a,b,c){if(null==a)return!1;b=p.iteratee(b,c);var d,e,f=a.length!==+a.length&&p.keys(a),g=(f||a).length;for(d=0;g>d;d++)if(e=f?f[d]:d,b(a[e],e,a))return!0;return!1},p.contains=p.include=function(a,b){return null==a?!1:(a.length!==+a.length&&(a=p.values(a)),p.indexOf(a,b)>=0)},p.invoke=function(a,b){var c=i.call(arguments,2),d=p.isFunction(b);return p.map(a,function(a){return(d?b:a[b]).apply(a,c)})},p.pluck=function(a,b){return p.map(a,p.property(b))},p.where=function(a,b){return p.filter(a,p.matches(b))},p.findWhere=function(a,b){return p.find(a,p.matches(b))},p.max=function(a,b,c){var d,e,f=-1/0,g=-1/0;if(null==b&&null!=a){a=a.length===+a.length?a:p.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],d>f&&(f=d)}else b=p.iteratee(b,c),p.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-1/0&&f===-1/0)&&(f=a,g=e)});return f},p.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=a.length===+a.length?a:p.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],f>d&&(f=d)}else b=p.iteratee(b,c),p.each(a,function(a,c,d){e=b(a,c,d),(g>e||1/0===e&&1/0===f)&&(f=a,g=e)});return f},p.shuffle=function(a){for(var b,c=a&&a.length===+a.length?a:p.values(a),d=c.length,e=Array(d),f=0;d>f;f++)b=p.random(0,f),b!==f&&(e[f]=e[b]),e[b]=c[f];return e},p.sample=function(a,b,c){return null==b||c?(a.length!==+a.length&&(a=p.values(a)),a[p.random(a.length-1)]):p.shuffle(a).slice(0,Math.max(0,b))},p.sortBy=function(a,b,c){return b=p.iteratee(b,c),p.pluck(p.map(a,function(a,c,d){return{value:a,index:c,criteria:b(a,c,d)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var s=function(a){return function(b,c,d){var e={};return c=p.iteratee(c,d),p.each(b,function(d,f){var g=c(d,f,b);a(e,d,g)}),e}};p.groupBy=s(function(a,b,c){p.has(a,c)?a[c].push(b):a[c]=[b]}),p.indexBy=s(function(a,b,c){a[c]=b}),p.countBy=s(function(a,b,c){p.has(a,c)?a[c]++:a[c]=1}),p.sortedIndex=function(a,b,c,d){c=p.iteratee(c,d,1);for(var e=c(b),f=0,g=a.length;g>f;){var h=f+g>>>1;c(a[h])<e?f=h+1:g=h}return f},p.toArray=function(a){return a?p.isArray(a)?i.call(a):a.length===+a.length?p.map(a,p.identity):p.values(a):[]},p.size=function(a){return null==a?0:a.length===+a.length?a.length:p.keys(a).length},p.partition=function(a,b,c){b=p.iteratee(b,c);var d=[],e=[];return p.each(a,function(a,c,f){(b(a,c,f)?d:e).push(a)}),[d,e]},p.first=p.head=p.take=function(a,b,c){return null==a?void 0:null==b||c?a[0]:0>b?[]:i.call(a,0,b)},p.initial=function(a,b,c){return i.call(a,0,Math.max(0,a.length-(null==b||c?1:b)))},p.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:i.call(a,Math.max(a.length-b,0))},p.rest=p.tail=p.drop=function(a,b,c){return i.call(a,null==b||c?1:b)},p.compact=function(a){return p.filter(a,p.identity)};var t=function(a,b,c,d){if(b&&p.every(a,p.isArray))return j.apply(d,a);for(var e=0,f=a.length;f>e;e++){var g=a[e];p.isArray(g)||p.isArguments(g)?b?h.apply(d,g):t(g,b,c,d):c||d.push(g)}return d};p.flatten=function(a,b){return t(a,b,!1,[])},p.without=function(a){return p.difference(a,i.call(arguments,1))},p.uniq=p.unique=function(a,b,c,d){if(null==a)return[];p.isBoolean(b)||(d=c,c=b,b=!1),null!=c&&(c=p.iteratee(c,d));for(var e=[],f=[],g=0,h=a.length;h>g;g++){var i=a[g];if(b)g&&f===i||e.push(i),f=i;else if(c){var j=c(i,g,a);p.indexOf(f,j)<0&&(f.push(j),e.push(i))}else p.indexOf(e,i)<0&&e.push(i)}return e},p.union=function(){return p.uniq(t(arguments,!0,!0,[]))},p.intersection=function(a){if(null==a)return[];for(var b=[],c=arguments.length,d=0,e=a.length;e>d;d++){var f=a[d];if(!p.contains(b,f)){for(var g=1;c>g&&p.contains(arguments[g],f);g++);g===c&&b.push(f)}}return b},p.difference=function(a){var b=t(i.call(arguments,1),!0,!0,[]);return p.filter(a,function(a){return!p.contains(b,a)})},p.zip=function(a){if(null==a)return[];for(var b=p.max(arguments,"length").length,c=Array(b),d=0;b>d;d++)c[d]=p.pluck(arguments,d);return c},p.object=function(a,b){if(null==a)return{};for(var c={},d=0,e=a.length;e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},p.indexOf=function(a,b,c){if(null==a)return-1;var d=0,e=a.length;if(c){if("number"!=typeof c)return d=p.sortedIndex(a,b),a[d]===b?d:-1;d=0>c?Math.max(0,e+c):c}for(;e>d;d++)if(a[d]===b)return d;return-1},p.lastIndexOf=function(a,b,c){if(null==a)return-1;var d=a.length;for("number"==typeof c&&(d=0>c?d+c+1:Math.min(d,c+1));--d>=0;)if(a[d]===b)return d;return-1},p.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=c||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=Array(d),f=0;d>f;f++,a+=c)e[f]=a;return e};var u=function(){};p.bind=function(a,b){var c,d;if(o&&a.bind===o)return o.apply(a,i.call(arguments,1));if(!p.isFunction(a))throw new TypeError("Bind must be called on a function");return c=i.call(arguments,2),d=function(){if(!(this instanceof d))return a.apply(b,c.concat(i.call(arguments)));u.prototype=a.prototype;var e=new u;u.prototype=null;var f=a.apply(e,c.concat(i.call(arguments)));return p.isObject(f)?f:e}},p.partial=function(a){var b=i.call(arguments,1);return function(){for(var c=0,d=b.slice(),e=0,f=d.length;f>e;e++)d[e]===p&&(d[e]=arguments[c++]);for(;c<arguments.length;)d.push(arguments[c++]);return a.apply(this,d)}},p.bindAll=function(a){var b,c,d=arguments.length;if(1>=d)throw new Error("bindAll must be passed function names");for(b=1;d>b;b++)c=arguments[b],a[c]=p.bind(a[c],a);return a},p.memoize=function(a,b){var c=function(d){var e=c.cache,f=b?b.apply(this,arguments):d;return p.has(e,f)||(e[f]=a.apply(this,arguments)),e[f]};return c.cache={},c},p.delay=function(a,b){var c=i.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)},p.defer=function(a){return p.delay.apply(p,[a,1].concat(i.call(arguments,1)))},p.throttle=function(a,b,c){var d,e,f,g=null,h=0;c||(c={});var i=function(){h=c.leading===!1?0:p.now(),g=null,f=a.apply(d,e),g||(d=e=null)};return function(){var j=p.now();h||c.leading!==!1||(h=j);var k=b-(j-h);return d=this,e=arguments,0>=k||k>b?(clearTimeout(g),g=null,h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},p.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=p.now()-g;b>j&&j>0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=p.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},p.wrap=function(a,b){return p.partial(b,a)},p.negate=function(a){return function(){return!a.apply(this,arguments)}},p.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},p.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},p.before=function(a,b){var c;return function(){return--a>0?c=b.apply(this,arguments):b=null,c}},p.once=p.partial(p.before,2),p.keys=function(a){if(!p.isObject(a))return[];if(n)return n(a);var b=[];for(var c in a)p.has(a,c)&&b.push(c);return b},p.values=function(a){for(var b=p.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},p.pairs=function(a){for(var b=p.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},p.invert=function(a){for(var b={},c=p.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},p.functions=p.methods=function(a){var b=[];for(var c in a)p.isFunction(a[c])&&b.push(c);return b.sort()},p.extend=function(a){if(!p.isObject(a))return a;for(var b,c,d=1,e=arguments.length;e>d;d++){b=arguments[d];for(c in b)l.call(b,c)&&(a[c]=b[c])}return a},p.pick=function(a,b,c){var d,e={};if(null==a)return e;if(p.isFunction(b)){b=q(b,c);for(d in a){var f=a[d];b(f,d,a)&&(e[d]=f)}}else{var g=j.apply([],i.call(arguments,1));a=new Object(a);for(var h=0,k=g.length;k>h;h++)d=g[h],d in a&&(e[d]=a[d])}return e},p.omit=function(a,b,c){if(p.isFunction(b))b=p.negate(b);else{var d=p.map(j.apply([],i.call(arguments,1)),String);b=function(a,b){return!p.contains(d,b)}}return p.pick(a,b,c)},p.defaults=function(a){if(!p.isObject(a))return a;for(var b=1,c=arguments.length;c>b;b++){var d=arguments[b];for(var e in d)void 0===a[e]&&(a[e]=d[e])}return a},p.clone=function(a){return p.isObject(a)?p.isArray(a)?a.slice():p.extend({},a):a},p.tap=function(a,b){return b(a),a};var v=function(a,b,c,d){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;a instanceof p&&(a=a._wrapped),b instanceof p&&(b=b._wrapped);var e=k.call(a);if(e!==k.call(b))return!1;switch(e){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}if("object"!=typeof a||"object"!=typeof b)return!1;for(var f=c.length;f--;)if(c[f]===a)return d[f]===b;var g=a.constructor,h=b.constructor;if(g!==h&&"constructor"in a&&"constructor"in b&&!(p.isFunction(g)&&g instanceof g&&p.isFunction(h)&&h instanceof h))return!1;c.push(a),d.push(b);var i,j;if("[object Array]"===e){if(i=a.length,j=i===b.length)for(;i--&&(j=v(a[i],b[i],c,d)););}else{var l,m=p.keys(a);if(i=m.length,j=p.keys(b).length===i)for(;i--&&(l=m[i],j=p.has(b,l)&&v(a[l],b[l],c,d)););}return c.pop(),d.pop(),j};p.isEqual=function(a,b){return v(a,b,[],[])},p.isEmpty=function(a){if(null==a)return!0;if(p.isArray(a)||p.isString(a)||p.isArguments(a))return 0===a.length;for(var b in a)if(p.has(a,b))return!1;return!0},p.isElement=function(a){return!(!a||1!==a.nodeType)},p.isArray=m||function(a){return"[object Array]"===k.call(a)},p.isObject=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a},p.each(["Arguments","Function","String","Number","Date","RegExp"],function(a){p["is"+a]=function(b){return k.call(b)==="[object "+a+"]"}}),p.isArguments(arguments)||(p.isArguments=function(a){return p.has(a,"callee")}),"function"!=typeof/./&&(p.isFunction=function(a){return"function"==typeof a||!1}),p.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},p.isNaN=function(a){return p.isNumber(a)&&a!==+a},p.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"===k.call(a)},p.isNull=function(a){return null===a},p.isUndefined=function(a){return void 0===a},p.has=function(a,b){return null!=a&&l.call(a,b)},p.noConflict=function(){return a._=d,this},p.identity=function(a){return a},p.constant=function(a){return function(){return a}},p.noop=function(){},p.property=function(a){return function(b){return b[a]}},p.matches=function(a){var b=p.pairs(a),c=b.length;return function(a){if(null==a)return!c;a=new Object(a);for(var d=0;c>d;d++){var e=b[d],f=e[0];if(e[1]!==a[f]||!(f in a))return!1}return!0}},p.times=function(a,b,c){var d=Array(Math.max(0,a));b=q(b,c,1);for(var e=0;a>e;e++)d[e]=b(e);return d},p.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},p.now=Date.now||function(){return(new Date).getTime()};var w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},x=p.invert(w),y=function(a){var b=function(b){return a[b]},c="(?:"+p.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};p.escape=y(w),p.unescape=y(x),p.result=function(a,b){if(null==a)return void 0;var c=a[b];return p.isFunction(c)?a[b]():c};var z=0;p.uniqueId=function(a){var b=++z+"";return a?a+b:b},p.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},C=/\\|'|\r|\n|\u2028|\u2029/g,D=function(a){return"\\"+B[a]};p.template=function(a,b,c){!b&&c&&(b=c),b=p.defaults({},b,p.templateSettings);var d=RegExp([(b.escape||A).source,(b.interpolate||A).source,(b.evaluate||A).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(C,D),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(h){throw h.source=f,h}var i=function(a){return g.call(this,a,p)},j=b.variable||"obj";return i.source="function("+j+"){\n"+f+"}",i},p.chain=function(a){var b=p(a);return b._chain=!0,b};var E=function(a){return this._chain?p(a).chain():a};p.mixin=function(a){p.each(p.functions(a),function(b){var c=p[b]=a[b];p.prototype[b]=function(){var a=[this._wrapped];return h.apply(a,arguments),E.call(this,c.apply(p,a))}})},p.mixin(p),p.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=e[a];p.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],E.call(this,c)}}),p.each(["concat","join","slice"],function(a){var b=e[a];p.prototype[a]=function(){return E.call(this,b.apply(this._wrapped,arguments))}}),p.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return p})}).call(this)},{}]},{},[6]);

@@ -18,2 +18,7 @@ 'use strict';

}
},
bootstrap: {
files: {
'dist/bootstrap.min.js': 'lib/bootstrap.js'
}
}

@@ -20,0 +25,0 @@ },

@@ -118,6 +118,6 @@ var _ = require('underscore');

module.exports = function (win, runner) {
win.jasmine.getEnv().addReporter(new TesteeReporter(runner));
module.exports = function (jasmine, runner) {
jasmine.getEnv().addReporter(new TesteeReporter(runner));
};
module.exports.Reporter = TesteeReporter;

@@ -127,9 +127,8 @@ var _ = require('underscore');

module.exports = function(win, api) {
module.exports = function(mocha, api) {
TesteeReporter.prototype.api = api;
TesteeReporter.prototype.OldReporter = win.mocha._reporter;
win.Mocha.reporters.Testee = TesteeReporter;
win.mocha.reporter(TesteeReporter);
TesteeReporter.prototype.OldReporter = mocha._reporter;
mocha.reporter(TesteeReporter);
};
module.exports.Reporter = TesteeReporter;
var guid = require('./../guid');
module.exports = function (win, Runner) {
var QUnit = win.QUnit;
module.exports = function (QUnit, Runner, win) {
var suites = []; // Contains all currently active suites (nested)

@@ -6,0 +5,0 @@ // Returns the id of the currently active test suite (last one pushed)

@@ -9,3 +9,3 @@ var _ = require('underscore');

var setupQunit = require('./adapters/qunit');
var setupJasmineLegacy = require('./adapters/jasmine-legacy');
var setupJasmine1 = require('./adapters/jasmine-legacy');
var setupMocha = require('./adapters/mocha');

@@ -19,5 +19,42 @@

runs: service('runs', options.socket),
suites: service('suites', options.socket),
tests: service('tests', options.socket),
coverages: service('coverages', options.socket),
runner: function() {
if(!this._runner) {
this._runner = Runner(options);
}
return this._runner;
},
init: function() {
if (window.QUnit) {
this.initQUnit(window.QUnit);
}
if (window.jasmine && window.jasmine.version_ && window.jasmine.version_.major === 1) {
this.initJasmine1(window.jasmine);
}
if (window.mocha && window.Mocha) {
this.initMocha(window.mocha);
}
},
initQUnit: function(QUnit) {
setupQunit(QUnit, this.runner(), window);
},
initJasmine1: function(jasmine) {
setupJasmine1(jasmine, this.runner(), window);
},
initMocha: function(mocha) {
setupMocha(mocha || window.mocha, this.runner(), window);
},
connect: new Deferred(function(resolve) {

@@ -40,22 +77,10 @@ var done = function() {

var runner = Runner(options);
var init = function() {
if (window.QUnit) {
setupQunit(window, runner);
}
if (window.jasmine && window.jasmine.version_ && window.jasmine.version_.major === 1) {
setupJasmineLegacy(window, runner);
}
if (window.mocha && window.Mocha) {
setupMocha(window, runner);
}
};
if(options.autoinit === false) {
window.Testee.init = init;
} else {
init();
if(options.autoInit !== false) {
options.init();
}
});
// Restore original loader global variables
if(window._restoreUMD) {
window._restoreUMD();
}
{
"name": "testee-client",
"version": "0.1.1",
"version": "0.2.0",
"description": "Testee testing framework client adapters",

@@ -5,0 +5,0 @@ "main": "dist/testee.js",

@@ -24,3 +24,3 @@ # Testee client adapters

window.Testee = {
autoinit: false
autoInit: false
}

@@ -27,0 +27,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc