Skip to content

Instantly share code, notes, and snippets.

@rfreitas
Last active November 1, 2016 17:21
Show Gist options
  • Save rfreitas/e29f924fb5213a11a90276c9bb60382a to your computer and use it in GitHub Desktop.
Save rfreitas/e29f924fb5213a11a90276c9bb60382a to your computer and use it in GitHub Desktop.
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
const ReactWebcam = require('opencv')
setTimeout(function(){require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){},{}],2:[function(require,module,exports){var util=require("util/");var pSlice=Array.prototype.slice;var hasOwn=Object.prototype.hasOwnProperty;var assert=module.exports=ok;assert.AssertionError=function AssertionError(options){this.name="AssertionError";this.actual=options.actual;this.expected=options.expected;this.operator=options.operator;if(options.message){this.message=options.message;this.generatedMessage=false}else{this.message=getMessage(this);this.generatedMessage=true}var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace){Error.captureStackTrace(this,stackStartFunction)}else{var err=new Error;if(err.stack){var out=err.stack;var fn_name=stackStartFunction.name;var idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};util.inherits(assert.AssertionError,Error);function replacer(key,value){if(util.isUndefined(value)){return""+value}if(util.isNumber(value)&&(isNaN(value)||!isFinite(value))){return value.toString()}if(util.isFunction(value)||util.isRegExp(value)){return value.toString()}return value}function truncate(s,n){if(util.isString(s)){return s.length<n?s:s.slice(0,n)}else{return s}}function getMessage(self){return truncate(JSON.stringify(self.actual,replacer),128)+" "+self.operator+" "+truncate(JSON.stringify(self.expected,replacer),128)}function fail(actual,expected,message,operator,stackStartFunction){throw new assert.AssertionError({message:message,actual:actual,expected:expected,operator:operator,stackStartFunction:stackStartFunction})}assert.fail=fail;function ok(value,message){if(!value)fail(value,true,message,"==",assert.ok)}assert.ok=ok;assert.equal=function equal(actual,expected,message){if(actual!=expected)fail(actual,expected,message,"==",assert.equal)};assert.notEqual=function notEqual(actual,expected,message){if(actual==expected){fail(actual,expected,message,"!=",assert.notEqual)}};assert.deepEqual=function deepEqual(actual,expected,message){if(!_deepEqual(actual,expected)){fail(actual,expected,message,"deepEqual",assert.deepEqual)}};function _deepEqual(actual,expected){if(actual===expected){return true}else if(util.isBuffer(actual)&&util.isBuffer(expected)){if(actual.length!=expected.length)return false;for(var i=0;i<actual.length;i++){if(actual[i]!==expected[i])return false}return true}else if(util.isDate(actual)&&util.isDate(expected)){return actual.getTime()===expected.getTime()}else if(util.isRegExp(actual)&&util.isRegExp(expected)){return actual.source===expected.source&&actual.global===expected.global&&actual.multiline===expected.multiline&&actual.lastIndex===expected.lastIndex&&actual.ignoreCase===expected.ignoreCase}else if(!util.isObject(actual)&&!util.isObject(expected)){return actual==expected}else{return objEquiv(actual,expected)}}function isArguments(object){return Object.prototype.toString.call(object)=="[object Arguments]"}function objEquiv(a,b){if(util.isNullOrUndefined(a)||util.isNullOrUndefined(b))return false;if(a.prototype!==b.prototype)return false;if(isArguments(a)){if(!isArguments(b)){return false}a=pSlice.call(a);b=pSlice.call(b);return _deepEqual(a,b)}try{var ka=objectKeys(a),kb=objectKeys(b),key,i}catch(e){return false}if(ka.length!=kb.length)return false;ka.sort();kb.sort();for(i=ka.length-1;i>=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(actual===expected){fail(actual,expected,message,"!==",assert.notStrictEqual)}};function expectedException(actual,expected){if(!actual||!expected){return false}if(Object.prototype.toString.call(expected)=="[object RegExp]"){return expected.test(actual)}else if(actual instanceof expected){return true}else if(expected.call({},actual)===true){return true}return false}function _throws(shouldThrow,block,expected,message){var actual;if(util.isString(expected)){message=expected;expected=null}try{block()}catch(e){actual=e}message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:".");if(shouldThrow&&!actual){fail(actual,expected,"Missing expected exception"+message)}if(!shouldThrow&&expectedException(actual,expected)){fail(actual,expected,"Got unwanted exception"+message)}if(shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual){throw actual}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,message){_throws.apply(this,[false].concat(pSlice.call(arguments)))};assert.ifError=function(err){if(err){throw err}};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){if(hasOwn.call(obj,key))keys.push(key)}return keys}},{"util/":35}],3:[function(require,module,exports){arguments[4][1][0].apply(exports,arguments)},{dup:1}],4:[function(require,module,exports){(function(global){"use strict";var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("isarray");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();function typedArraySupport(){function Bar(){}try{var arr=new Uint8Array(1);arr.foo=function(){return 42};arr.constructor=Bar;return arr.foo()===42&&arr.constructor===Bar&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Buffer(arg){if(!(this instanceof Buffer)){if(arguments.length>1)return new Buffer(arg,arguments[1]);return new Buffer(arg)}if(!Buffer.TYPED_ARRAY_SUPPORT){this.length=0;this.parent=undefined}if(typeof arg==="number"){return fromNumber(this,arg)}if(typeof arg==="string"){return fromString(this,arg,arguments.length>1?arguments[1]:"utf8")}return fromObject(this,arg)}function fromNumber(that,length){that=allocate(that,length<0?0:checked(length)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i<length;i++){that[i]=0}}return that}function fromString(that,string,encoding){if(typeof encoding!=="string"||encoding==="")encoding="utf8";var length=byteLength(string,encoding)|0;that=allocate(that,length);that.write(string,encoding);return that}function fromObject(that,object){if(Buffer.isBuffer(object))return fromBuffer(that,object);if(isArray(object))return fromArray(that,object);if(object==null){throw new TypeError("must start with number, buffer, array or string")}if(typeof ArrayBuffer!=="undefined"){if(object.buffer instanceof ArrayBuffer){return fromTypedArray(that,object)}if(object instanceof ArrayBuffer){return fromArrayBuffer(that,object)}}if(object.length)return fromArrayLike(that,object);return fromJsonObject(that,object)}function fromBuffer(that,buffer){var length=checked(buffer.length)|0;that=allocate(that,length);buffer.copy(that,0,0,length);return that}function fromArray(that,array){var length=checked(array.length)|0;that=allocate(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255}return that}function fromTypedArray(that,array){var length=checked(array.length)|0;that=allocate(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255}return that}function fromArrayBuffer(that,array){if(Buffer.TYPED_ARRAY_SUPPORT){array.byteLength;that=Buffer._augment(new Uint8Array(array))}else{that=fromTypedArray(that,new Uint8Array(array))}return that}function fromArrayLike(that,array){var length=checked(array.length)|0;that=allocate(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255}return that}function fromJsonObject(that,object){var array;var length=0;if(object.type==="Buffer"&&isArray(object.data)){array=object.data;length=checked(array.length)|0}that=allocate(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255}return that}if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array}else{Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined}function allocate(that,length){if(Buffer.TYPED_ARRAY_SUPPORT){that=Buffer._augment(new Uint8Array(length));that.__proto__=Buffer.prototype}else{that.length=length;that._isBuffer=true}var fromPool=length!==0&&length<=Buffer.poolSize>>>1;if(fromPool)that.parent=rootParent;return that}function checked(length){if(length>=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;var i=0;var len=Math.min(x,y);while(i<len){if(a[i]!==b[i])break;++i}if(i!==len){x=a[i];y=b[i]}if(x<y)return-1;if(y<x)return 1;return 0};Buffer.isEncoding=function isEncoding(encoding){switch(String(encoding).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 true;default:return false}};Buffer.concat=function concat(list,length){if(!isArray(list))throw new TypeError("list argument must be an Array of Buffers.");if(list.length===0){return new Buffer(0)}var i;if(length===undefined){length=0;for(i=0;i<list.length;i++){length+=list[i].length}}var buf=new Buffer(length);var pos=0;for(i=0;i<list.length;i++){var item=list[i];item.copy(buf,pos);pos+=item.length}return buf};function byteLength(string,encoding){if(typeof string!=="string")string=""+string;var len=string.length;if(len===0)return 0;var loweredCase=false;for(;;){switch(encoding){case"ascii":case"binary":case"raw":case"raws":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return len*2;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;start=start|0;end=end===undefined||end===Infinity?this.length:end|0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype.toString=function toString(){var length=this.length|0;if(length===0)return"";if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments)};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return"<Buffer "+str+">"};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val)){return arrayIndexOf(this,val,byteOffset)}if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,val,byteOffset)}return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;for(var i=0;byteOffset+i<arr.length;i++){if(arr[byteOffset+i]===val[foundIndex===-1?0:i-foundIndex]){if(foundIndex===-1)foundIndex=i;if(i-foundIndex+1===val.length)return byteOffset+foundIndex}else{foundIndex=-1}}return-1}throw new TypeError("val must be string, number or Buffer")};Buffer.prototype.get=function get(offset){console.log(".get() is deprecated. Access using array indexes instead.");return this.readUInt8(offset)};Buffer.prototype.set=function set(v,offset){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(v,offset)};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;i<length;i++){var parsed=parseInt(string.substr(i*2,2),16);if(isNaN(parsed))throw new Error("Invalid hex string");buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function binaryWrite(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}Buffer.prototype.write=function write(string,offset,length,encoding){if(offset===undefined){encoding="utf8";length=this.length;offset=0}else if(length===undefined&&typeof offset==="string"){encoding=offset;length=this.length;offset=0}else if(isFinite(offset)){offset=offset|0;if(isFinite(length)){length=length|0;if(encoding===undefined)encoding="utf8"}else{encoding=length;length=undefined}}else{var swap=encoding;encoding=offset;offset=length|0;length=swap}var remaining=this.length-offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"binary":return binaryWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i<end){var firstByte=buf[i];var codePoint=null;var bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(i<len){res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH))}return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;i++){ret+=String.fromCharCode(buf[i]&127)}return ret}function binarySlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;i++){ret+=String.fromCharCode(buf[i])}return ret}function hexSlice(buf,start,end){var len=buf.length;if(!start||start<0)start=0;if(!end||end<0||end>len)end=len;var out="";for(var i=start;i<end;i++){out+=toHex(buf[i])}return out}function utf16leSlice(buf,start,end){var bytes=buf.slice(start,end);var res="";for(var i=0;i<bytes.length;i+=2){res+=String.fromCharCode(bytes[i]+bytes[i+1]*256)}return res}Buffer.prototype.slice=function slice(start,end){var len=this.length;start=~~start;end=end===undefined?len:~~end;if(start<0){start+=len;if(start<0)start=0}else if(start>len){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(end<start)end=start;var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT){newBuf=Buffer._augment(this.subarray(start,end))}else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,undefined);for(var i=0;i<sliceLen;i++){newBuf[i]=this[i+start]}}if(newBuf.length)newBuf.parent=this.parent||this;return newBuf};function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256)){val+=this[offset+i]*mul}return val};Buffer.prototype.readUIntBE=function readUIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256)){val+=this[offset+i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||value<min)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i<j;i++){buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i<j;i++){buf[offset+i]=value>>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i<byteLength&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||value<min)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end<start)end=start;if(end===start)return 0;if(target.length===0||this.length===0)return 0;if(targetStart<0){throw new RangeError("targetStart out of bounds")}if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart<end-start){end=target.length-targetStart+start}var len=end-start;var i;if(this===target&&start<targetStart&&targetStart<end){for(i=len-1;i>=0;i--){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i<len;i++){target[i+targetStart]=this[i+start]}}else{target._set(this.subarray(start,start+len),targetStart)}return len};Buffer.prototype.fill=function fill(value,start,end){if(!value)value=0;if(!start)start=0;if(!end)end=this.length;if(end<start)throw new RangeError("end < start");if(end===start)return;if(this.length===0)return;if(start<0||start>=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i<end;i++){this[i]=value}}else{var bytes=utf8ToBytes(value.toString());var len=bytes.length;for(i=start;i<end;i++){this[i]=bytes[i%len]}}return this};Buffer.prototype.toArrayBuffer=function toArrayBuffer(){if(typeof Uint8Array!=="undefined"){if(Buffer.TYPED_ARRAY_SUPPORT){return new Buffer(this).buffer}else{var buf=new Uint8Array(this.length);for(var i=0,len=buf.length;i<len;i+=1){buf[i]=this[i]}return buf.buffer}}else{throw new TypeError("Buffer.toArrayBuffer not supported in this browser")}};var BP=Buffer.prototype;Buffer._augment=function _augment(arr){arr.constructor=Buffer;arr._isBuffer=true;arr._set=arr.set;arr.get=BP.get;arr.set=BP.set;arr.write=BP.write;arr.toString=BP.toString;arr.toLocaleString=BP.toString;arr.toJSON=BP.toJSON;arr.equals=BP.equals;arr.compare=BP.compare;arr.indexOf=BP.indexOf;arr.copy=BP.copy;arr.slice=BP.slice;arr.readUIntLE=BP.readUIntLE;arr.readUIntBE=BP.readUIntBE;arr.readUInt8=BP.readUInt8;arr.readUInt16LE=BP.readUInt16LE;
arr.readUInt16BE=BP.readUInt16BE;arr.readUInt32LE=BP.readUInt32LE;arr.readUInt32BE=BP.readUInt32BE;arr.readIntLE=BP.readIntLE;arr.readIntBE=BP.readIntBE;arr.readInt8=BP.readInt8;arr.readInt16LE=BP.readInt16LE;arr.readInt16BE=BP.readInt16BE;arr.readInt32LE=BP.readInt32LE;arr.readInt32BE=BP.readInt32BE;arr.readFloatLE=BP.readFloatLE;arr.readFloatBE=BP.readFloatBE;arr.readDoubleLE=BP.readDoubleLE;arr.readDoubleBE=BP.readDoubleBE;arr.writeUInt8=BP.writeUInt8;arr.writeUIntLE=BP.writeUIntLE;arr.writeUIntBE=BP.writeUIntBE;arr.writeUInt16LE=BP.writeUInt16LE;arr.writeUInt16BE=BP.writeUInt16BE;arr.writeUInt32LE=BP.writeUInt32LE;arr.writeUInt32BE=BP.writeUInt32BE;arr.writeIntLE=BP.writeIntLE;arr.writeIntBE=BP.writeIntBE;arr.writeInt8=BP.writeInt8;arr.writeInt16LE=BP.writeInt16LE;arr.writeInt16BE=BP.writeInt16BE;arr.writeInt32LE=BP.writeInt32LE;arr.writeInt32BE=BP.writeInt32BE;arr.writeFloatLE=BP.writeFloatLE;arr.writeFloatBE=BP.writeFloatBE;arr.writeDoubleLE=BP.writeDoubleLE;arr.writeDoubleBE=BP.writeDoubleBE;arr.fill=BP.fill;arr.inspect=BP.inspect;arr.toArrayBuffer=BP.toArrayBuffer;return arr};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;function base64clean(str){str=stringtrim(str).replace(INVALID_BASE64_RE,"");if(str.length<2)return"";while(str.length%4!==0){str=str+"="}return str}function stringtrim(str){if(str.trim)return str.trim();return str.replace(/^\s+|\s+$/g,"")}function toHex(n){if(n<16)return"0"+n.toString(16);return n.toString(16)}function utf8ToBytes(string,units){units=units||Infinity;var codePoint;var length=string.length;var leadSurrogate=null;var bytes=[];for(var i=0;i<length;i++){codePoint=string.charCodeAt(i);if(codePoint>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i<str.length;i++){byteArray.push(str.charCodeAt(i)&255)}return byteArray}function utf16leToBytes(str,units){var c,hi,lo;var byteArray=[];for(var i=0;i<str.length;i++){if((units-=2)<0)break;c=str.charCodeAt(i);hi=c>>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length;i++){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":5,ieee754:6,isarray:7}],5:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code<NUMBER)return-1;if(code<NUMBER+10)return code-NUMBER+26+26;if(code<UPPER+26)return code-UPPER;if(code<LOWER+26)return code-LOWER+26}function b64ToByteArray(b64){var i,j,l,tmp,placeHolders,arr;if(b64.length%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i<l;i+=4,j+=3){tmp=decode(b64.charAt(i))<<18|decode(b64.charAt(i+1))<<12|decode(b64.charAt(i+2))<<6|decode(b64.charAt(i+3));push((tmp&16711680)>>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i<length;i+=3){temp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2];output+=tripletToBase64(temp)}switch(extraBytes){case 1:temp=uint8[uint8.length-1];output+=encode(temp>>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],6:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],7:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],8:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i<len;i++)args[i-1]=arguments[i];handler.apply(this,args)}}else if(isObject(handler)){len=arguments.length;args=new Array(len-1);for(i=1;i<len;i++)args[i-1]=arguments[i];listeners=handler.slice();len=listeners.length;for(i=0;i<len;i++)listeners[i].apply(this,args)}return true};EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events)this._events={};if(this._events.newListener)this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener);if(!this._events[type])this._events[type]=listener;else if(isObject(this._events[type]))this._events[type].push(listener);else this._events[type]=[this._events[type],listener];if(isObject(this._events[type])&&!this._events[type].warned){var m;if(!isUndefined(this._maxListeners)){m=this._maxListeners}else{m=EventEmitter.defaultMaxListeners}if(m&&m>0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-- >0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1)}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else{while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],9:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],10:[function(require,module,exports){module.exports=function(obj){return obj!=null&&(isBuffer(obj)||isSlowBuffer(obj)||!!obj._isBuffer)};function isBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return typeof obj.readFloatLE==="function"&&typeof obj.slice==="function"&&isBuffer(obj.slice(0,0))}},{}],11:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],12:[function(require,module,exports){exports.endianness=function(){return"LE"};exports.hostname=function(){if(typeof location!=="undefined"){return location.hostname}else return""};exports.loadavg=function(){return[]};exports.uptime=function(){return 0};exports.freemem=function(){return Number.MAX_VALUE};exports.totalmem=function(){return Number.MAX_VALUE};exports.cpus=function(){return[]};exports.type=function(){return"Browser"};exports.release=function(){if(typeof navigator!=="undefined"){return navigator.appVersion}return""};exports.networkInterfaces=exports.getNetworkInterfaces=function(){return{}};exports.arch=function(){return"javascript"};exports.platform=function(){return"browser"};exports.tmpdir=exports.tmpDir=function(){return"/tmp"};exports.EOL="\n"},{}],13:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")};exports.sep="/";exports.delimiter=":";exports.dirname=function(path){var result=splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir};exports.basename=function(path,ext){var f=splitPath(path)[2];if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){return splitPath(path)[3]};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i<xs.length;i++){if(f(xs[i],i,xs))res.push(xs[i])}return res}var substr="ab".substr(-1)==="b"?function(str,start,len){return str.substr(start,len)}:function(str,start,len){if(start<0)start=str.length+start;return str.substr(start,len)}}).call(this,require("_process"))},{_process:14}],14:[function(require,module,exports){var process=module.exports={};process.nextTick=function(){var canSetImmediate=typeof window!=="undefined"&&window.setImmediate;var canMutationObserver=typeof window!=="undefined"&&window.MutationObserver;var canPost=typeof window!=="undefined"&&window.postMessage&&window.addEventListener;if(canSetImmediate){return function(f){return window.setImmediate(f)}}var queue=[];if(canMutationObserver){var hiddenDiv=document.createElement("div");var observer=new MutationObserver(function(){var queueList=queue.slice();queue.length=0;queueList.forEach(function(fn){fn()})});observer.observe(hiddenDiv,{attributes:true});return function nextTick(fn){if(!queue.length){hiddenDiv.setAttribute("yes","no")}queue.push(fn)}}if(canPost){window.addEventListener("message",function(ev){var source=ev.source;if((source===window||source===null)&&ev.data==="process-tick"){ev.stopPropagation();if(queue.length>0){var fn=queue.shift();fn()}}},true);return function nextTick(fn){queue.push(fn);window.postMessage("process-tick","*")}}return function nextTick(fn){setTimeout(fn,0)}}();process.title="browser";process.browser=true;process.env={};process.argv=[];function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")}},{}],15:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports;var freeModule=typeof module=="object"&&module&&module.exports==freeExports&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal){root=freeGlobal}var punycode,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^ -~]/,regexSeparators=/\x2E|\u3002|\uFF0E|\uFF61/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error(type){throw RangeError(errors[type])}function map(array,fn){var length=array.length;while(length--){array[length]=fn(array[length])}return array}function mapDomain(string,fn){return map(string.split(regexSeparators),fn).join(".")}function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter<length){value=string.charCodeAt(counter++);if(value>=55296&&value<=56319&&counter<length){extra=string.charCodeAt(counter++);if((extra&64512)==56320){output.push(((value&1023)<<10)+(extra&1023)+65536)}else{output.push(value);counter--}}else{output.push(value)}}return output}function ucs2encode(array){return map(array,function(value){var output="";if(value>65535){value-=65536;output+=stringFromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=stringFromCharCode(value);return output}).join("")}function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22}if(codePoint-65<26){return codePoint-65}if(codePoint-97<26){return codePoint-97}return base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,baseMinusT;basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(j=0;j<basic;++j){if(input.charCodeAt(j)>=128){error("not-basic")}output.push(input.charCodeAt(j))}for(index=basic>0?basic+1:0;index<inputLength;){for(oldi=i,w=1,k=base;;k+=base){if(index>=inputLength){error("invalid-input")}digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error("overflow")}i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digit<t){break}baseMinusT=base-t;if(w>floor(maxInt/baseMinusT)){error("overflow")}w*=baseMinusT}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error("overflow")}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;input=ucs2decode(input);inputLength=input.length;n=initialN;delta=0;bias=initialBias;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<128){output.push(stringFromCharCode(currentValue))}}handledCPCount=basicLength=output.length;if(basicLength){output.push(delimiter)}while(handledCPCount<inputLength){for(m=maxInt,j=0;j<inputLength;++j){currentValue=input[j];if(currentValue>=n&&currentValue<m){m=currentValue}}handledCPCountPlusOne=handledCPCount+1;if(m-n>floor((maxInt-delta)/handledCPCountPlusOne)){error("overflow")}delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<n&&++delta>maxInt){error("overflow")}if(currentValue==n){for(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t){break}qMinusT=q-t;baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0)));q=floor(qMinusT/baseMinusT)}output.push(stringFromCharCode(digitToBasic(q,0)));bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength);delta=0;++handledCPCount}}++delta;++n}return output.join("")}function toUnicode(domain){return mapDomain(domain,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string})}function toASCII(domain){return mapDomain(domain,function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string})}punycode={version:"1.2.4",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:toASCII,toUnicode:toUnicode};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define("punycode",function(){return punycode})}else if(freeExports&&!freeExports.nodeType){if(freeModule){freeModule.exports=punycode}else{for(key in punycode){punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key])}}}else{root.punycode=punycode}})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],16:[function(require,module,exports){"use strict";function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=function(qs,sep,eq,options){sep=sep||"&";eq=eq||"=";var obj={};if(typeof qs!=="string"||qs.length===0){return obj}var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;if(options&&typeof options.maxKeys==="number"){maxKeys=options.maxKeys}var len=qs.length;if(maxKeys>0&&len>maxKeys){len=maxKeys}for(var i=0;i<len;++i){var x=qs[i].replace(regexp,"%20"),idx=x.indexOf(eq),kstr,vstr,k,v;if(idx>=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1)}else{kstr=x;vstr=""}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k)){obj[k]=v}else if(isArray(obj[k])){obj[k].push(v)}else{obj[k]=[obj[k],v]}}return obj};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}},{}],17:[function(require,module,exports){"use strict";var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){sep=sep||"&";eq=eq||"=";if(obj===null){obj=undefined}if(typeof obj==="object"){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep)}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]))}}).join(sep)}if(!name)return"";return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj))};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i<xs.length;i++){res.push(f(xs[i],i))}return res}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))res.push(key)}return res}},{}],18:[function(require,module,exports){"use strict";exports.decode=exports.parse=require("./decode");exports.encode=exports.stringify=require("./encode")},{"./decode":16,"./encode":17}],19:[function(require,module,exports){module.exports=require("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":20}],20:[function(require,module,exports){(function(process){module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};var util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable");var Writable=require("./_stream_writable");util.inherits(Duplex,Readable);forEach(objectKeys(Writable.prototype),function(method){if(!Duplex.prototype[method])Duplex.prototype[method]=Writable.prototype[method]});function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);Readable.call(this,options);Writable.call(this,options);if(options&&options.readable===false)this.readable=false;if(options&&options.writable===false)this.writable=false;this.allowHalfOpen=true;if(options&&options.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",onend)}function onend(){if(this.allowHalfOpen||this._writableState.ended)return;process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++){f(xs[i],i)}}}).call(this,require("_process"))},{"./_stream_readable":22,"./_stream_writable":24,_process:14,"core-util-is":25,inherits:9}],21:[function(require,module,exports){module.exports=PassThrough;var Transform=require("./_stream_transform");var util=require("core-util-is");util.inherits=require("inherits");util.inherits(PassThrough,Transform);function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options)}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},{"./_stream_transform":23,"core-util-is":25,inherits:9}],22:[function(require,module,exports){(function(process){module.exports=Readable;var isArray=require("isarray");var Buffer=require("buffer").Buffer;Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter;if(!EE.listenerCount)EE.listenerCount=function(emitter,type){return emitter.listeners(type).length};var Stream=require("stream");var util=require("core-util-is");util.inherits=require("inherits");var StringDecoder;var debug=require("util");if(debug&&debug.debuglog){debug=debug.debuglog("stream")}else{debug=function(){}}util.inherits(Readable,Stream);function ReadableState(options,stream){var Duplex=require("./_stream_duplex");options=options||{};var hwm=options.highWaterMark;var defaultHwm=options.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.buffer=[];this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.readableObjectMode;this.defaultEncoding=options.defaultEncoding||"utf8";this.ranOut=false;this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(options.encoding){if(!StringDecoder)StringDecoder=require("string_decoder/").StringDecoder;this.decoder=new StringDecoder(options.encoding);this.encoding=options.encoding}}function Readable(options){var Duplex=require("./_stream_duplex");if(!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this);this.readable=true;Stream.call(this)}Readable.prototype.push=function(chunk,encoding){var state=this._readableState;if(util.isString(chunk)&&!state.objectMode){encoding=encoding||state.defaultEncoding;if(encoding!==state.encoding){chunk=new Buffer(chunk,encoding);encoding=""}}return readableAddChunk(this,state,chunk,encoding,false)};Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",true)};function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er){stream.emit("error",er)}else if(util.isNullOrUndefined(chunk)){state.reading=false;if(!state.ended)onEofChunk(stream,state)}else if(state.objectMode||chunk&&chunk.length>0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.setEncoding=function(enc){if(!StringDecoder)StringDecoder=require("string_decoder/").StringDecoder;this._readableState.decoder=new StringDecoder(enc);this._readableState.encoding=enc;return this};var MAX_HWM=8388608;function roundUpToNextPowerOf2(n){if(n>=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(isNaN(n)||util.isNull(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else return state.length}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(!util.isNumber(n)||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n<state.highWaterMark){doRead=true;debug("length less than watermark",doRead);
}if(state.ended||state.reading){doRead=false;debug("reading or ended",doRead)}if(doRead){debug("do read");state.reading=true;state.sync=true;if(state.length===0)state.needReadable=true;this._read(state.highWaterMark);state.sync=false}if(doRead&&!state.reading)n=howMuchToRead(nOrig,state);var ret;if(n>0)ret=fromList(n,state);else ret=null;if(util.isNull(ret)){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(!util.isNull(ret))this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(function(){maybeReadMore_(stream,state)})}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark){debug("maybeReadMore read 0");stream.read(0);if(len===state.length)break;else len=state.length}state.readingMore=false}Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))};Readable.prototype.pipe=function(dest,pipeOpts){var src=this;var state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1;debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==false)&&dest!==process.stdout&&dest!==process.stderr;var endFn=doEnd?onend:cleanup;if(state.endEmitted)process.nextTick(endFn);else src.once("end",endFn);dest.on("unpipe",onunpipe);function onunpipe(readable){debug("onunpipe");if(readable===src){cleanup()}}function onend(){debug("onend");dest.end()}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);function cleanup(){debug("cleanup");dest.removeListener("close",onclose);dest.removeListener("finish",onfinish);dest.removeListener("drain",ondrain);dest.removeListener("error",onerror);dest.removeListener("unpipe",onunpipe);src.removeListener("end",onend);src.removeListener("end",cleanup);src.removeListener("data",ondata);if(state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain))ondrain()}src.on("data",ondata);function ondata(chunk){debug("ondata");var ret=dest.write(chunk);if(false===ret){debug("false write response, pause",src._readableState.awaitDrain);src._readableState.awaitDrain++;src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);if(EE.listenerCount(dest,"error")===0)dest.emit("error",er)}if(!dest._events||!dest._events.error)dest.on("error",onerror);else if(isArray(dest._events.error))dest._events.error.unshift(onerror);else dest._events.error=[onerror,dest._events.error];function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EE.listenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var i=0;i<len;i++)dests[i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);if(i===-1)return this;state.pipes.splice(i,1);state.pipesCount-=1;if(state.pipesCount===1)state.pipes=state.pipes[0];dest.emit("unpipe",this);return this};Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if(ev==="data"&&false!==this._readableState.flowing){this.resume()}if(ev==="readable"&&this.readable){var state=this._readableState;if(!state.readableListening){state.readableListening=true;state.emittedReadable=false;state.needReadable=true;if(!state.reading){var self=this;process.nextTick(function(){debug("readable nexttick read 0");self.read(0)})}else if(state.length){emitReadable(this,state)}}}return res};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.resume=function(){var state=this._readableState;if(!state.flowing){debug("resume");state.flowing=true;if(!state.reading){debug("resume read 0");this.read(0)}resume(this,state)}return this};function resume(stream,state){if(!state.resumeScheduled){state.resumeScheduled=true;process.nextTick(function(){resume_(stream,state)})}}function resume_(stream,state){state.resumeScheduled=false;stream.emit("resume");flow(stream);if(state.flowing&&!state.reading)stream.read(0)}Readable.prototype.pause=function(){debug("call pause flowing=%j",this._readableState.flowing);if(false!==this._readableState.flowing){debug("pause");this._readableState.flowing=false;this.emit("pause")}return this};function flow(stream){var state=stream._readableState;debug("flow",state.flowing);if(state.flowing){do{var chunk=stream.read()}while(null!==chunk&&state.flowing)}}Readable.prototype.wrap=function(stream){var state=this._readableState;var paused=false;var self=this;stream.on("end",function(){debug("wrapped end");if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length)self.push(chunk)}self.push(null)});stream.on("data",function(chunk){debug("wrapped data");if(state.decoder)chunk=state.decoder.write(chunk);if(!chunk||!state.objectMode&&!chunk.length)return;var ret=self.push(chunk);if(!ret){paused=true;stream.pause()}});for(var i in stream){if(util.isFunction(stream[i])&&util.isUndefined(this[i])){this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i)}}var events=["error","close","destroy","pause","resume"];forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))});self._read=function(n){debug("wrapped _read",n);if(paused){paused=false;stream.resume()}};return self};Readable._fromList=fromList;function fromList(n,state){var list=state.buffer;var length=state.length;var stringMode=!!state.decoder;var objectMode=!!state.objectMode;var ret;if(list.length===0)return null;if(length===0)ret=null;else if(objectMode)ret=list.shift();else if(!n||n>=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n<list[0].length){var buf=list[0];ret=buf.slice(0,n);list[0]=buf.slice(n)}else if(n===list[0].length){ret=list.shift()}else{if(stringMode)ret="";else ret=new Buffer(n);var c=0;for(var i=0,l=list.length;i<l&&c<n;i++){var buf=list[0];var cpy=Math.min(n-c,buf.length);if(stringMode)ret+=buf.slice(0,cpy);else buf.copy(ret,c,0,cpy);if(cpy<buf.length)list[0]=buf.slice(cpy);else list.shift();c+=cpy}}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;process.nextTick(function(){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}})}}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++){f(xs[i],i)}}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x)return i}return-1}}).call(this,require("_process"))},{"./_stream_duplex":20,_process:14,buffer:4,"core-util-is":25,events:8,inherits:9,isarray:11,stream:30,"string_decoder/":31,util:3}],23:[function(require,module,exports){module.exports=Transform;var Duplex=require("./_stream_duplex");var util=require("core-util-is");util.inherits=require("inherits");util.inherits(Transform,Duplex);function TransformState(options,stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)};this.needTransform=false;this.transforming=false;this.writecb=null;this.writechunk=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=false;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null;ts.writecb=null;if(!util.isNullOrUndefined(data))stream.push(data);if(cb)cb(er);var rs=stream._readableState;rs.reading=false;if(rs.needReadable||rs.length<rs.highWaterMark){stream._read(rs.highWaterMark)}}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options);this._transformState=new TransformState(options,this);var stream=this;this._readableState.needReadable=true;this._readableState.sync=false;this.once("prefinish",function(){if(util.isFunction(this._flush))this._flush(function(er){done(stream,er)});else done(stream)})}Transform.prototype.push=function(chunk,encoding){this._transformState.needTransform=false;return Duplex.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("not implemented")};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;ts.writecb=cb;ts.writechunk=chunk;ts.writeencoding=encoding;if(!ts.transforming){var rs=this._readableState;if(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)this._read(rs.highWaterMark)}};Transform.prototype._read=function(n){var ts=this._transformState;if(!util.isNull(ts.writechunk)&&ts.writecb&&!ts.transforming){ts.transforming=true;this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)}else{ts.needTransform=true}};function done(stream,er){if(er)return stream.emit("error",er);var ws=stream._writableState;var ts=stream._transformState;if(ws.length)throw new Error("calling transform done when ws.length != 0");if(ts.transforming)throw new Error("calling transform done when still transforming");return stream.push(null)}},{"./_stream_duplex":20,"core-util-is":25,inherits:9}],24:[function(require,module,exports){(function(process){module.exports=Writable;var Buffer=require("buffer").Buffer;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var Stream=require("stream");util.inherits(Writable,Stream);function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb}function WritableState(options,stream){var Duplex=require("./_stream_duplex");options=options||{};var hwm=options.highWaterMark;var defaultHwm=options.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.writableObjectMode;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.buffer=[];this.pendingcb=0;this.prefinished=false;this.errorEmitted=false}function Writable(options){var Duplex=require("./_stream_duplex");if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this);this.writable=true;Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))};function writeAfterEnd(stream,state,cb){var er=new Error("write after end");stream.emit("error",er);process.nextTick(function(){cb(er)})}function validChunk(stream,state,chunk,cb){var valid=true;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){var er=new TypeError("Invalid non-string/buffer chunk");stream.emit("error",er);process.nextTick(function(){cb(er)});valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;if(util.isFunction(encoding)){cb=encoding;encoding=null}if(util.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(!util.isFunction(cb))cb=function(){};if(state.ended)writeAfterEnd(this,state,cb);else if(validChunk(this,state,chunk,cb)){state.pendingcb++;ret=writeOrBuffer(this,state,chunk,encoding,cb)}return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){state.corked--;if(!state.writing&&!state.corked&&!state.finished&&!state.bufferProcessing&&state.buffer.length)clearBuffer(this,state)}};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&util.isString(chunk)){chunk=new Buffer(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(util.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(!ret)state.needDrain=true;if(state.writing||state.corked)state.buffer.push(new WriteReq(chunk,encoding,cb));else doWrite(stream,state,false,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len;state.writecb=cb;state.writing=true;state.sync=true;if(writev)stream._writev(chunk,state.onwrite);else stream._write(chunk,encoding,state.onwrite);state.sync=false}function onwriteError(stream,state,sync,er,cb){if(sync)process.nextTick(function(){state.pendingcb--;cb(er)});else{state.pendingcb--;cb(er)}stream._writableState.errorEmitted=true;stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=false;state.writecb=null;state.length-=state.writelen;state.writelen=0}function onwrite(stream,er){var state=stream._writableState;var sync=state.sync;var cb=state.writecb;onwriteStateUpdate(state);if(er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(stream,state);if(!finished&&!state.corked&&!state.bufferProcessing&&state.buffer.length){clearBuffer(stream,state)}if(sync){process.nextTick(function(){afterWrite(stream,state,finished,cb)})}else{afterWrite(stream,state,finished,cb)}}}function afterWrite(stream,state,finished,cb){if(!finished)onwriteDrain(stream,state);state.pendingcb--;cb();finishMaybe(stream,state)}function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit("drain")}}function clearBuffer(stream,state){state.bufferProcessing=true;if(stream._writev&&state.buffer.length>1){var cbs=[];for(var c=0;c<state.buffer.length;c++)cbs.push(state.buffer[c].callback);state.pendingcb++;doWrite(stream,state,true,state.length,state.buffer,"",function(err){for(var i=0;i<cbs.length;i++){state.pendingcb--;cbs[i](err)}});state.buffer=[]}else{for(var c=0;c<state.buffer.length;c++){var entry=state.buffer[c];var chunk=entry.chunk;var encoding=entry.encoding;var cb=entry.callback;var len=state.objectMode?1:chunk.length;doWrite(stream,state,false,len,chunk,encoding,cb);if(state.writing){c++;break}}if(c<state.buffer.length)state.buffer=state.buffer.slice(c);else state.buffer.length=0}state.bufferProcessing=false}Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;if(util.isFunction(chunk)){cb=chunk;chunk=null;encoding=null}else if(util.isFunction(encoding)){cb=encoding;encoding=null}if(!util.isNullOrUndefined(chunk))this.write(chunk,encoding);if(state.corked){state.corked=1;this.uncork()}if(!state.ending&&!state.finished)endWritable(this,state,cb)};function needFinish(stream,state){return state.ending&&state.length===0&&!state.finished&&!state.writing}function prefinish(stream,state){if(!state.prefinished){state.prefinished=true;stream.emit("prefinish")}}function finishMaybe(stream,state){var need=needFinish(stream,state);if(need){if(state.pendingcb===0){prefinish(stream,state);state.finished=true;stream.emit("finish")}else prefinish(stream,state)}return need}function endWritable(stream,state,cb){state.ending=true;finishMaybe(stream,state);if(cb){if(state.finished)process.nextTick(cb);else stream.once("finish",cb)}state.ended=true}}).call(this,require("_process"))},{"./_stream_duplex":20,_process:14,buffer:4,"core-util-is":25,inherits:9,stream:30}],25:[function(require,module,exports){(function(Buffer){function isArray(arg){if(Array.isArray){return Array.isArray(arg)}return objectToString(arg)==="[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}).call(this,{isBuffer:require("../../../../insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../insert-module-globals/node_modules/is-buffer/index.js":10}],26:[function(require,module,exports){module.exports=require("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":21}],27:[function(require,module,exports){(function(process){exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=require("stream");exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js");if(!process.browser&&process.env.READABLE_STREAM==="disable"){module.exports=require("stream")}}).call(this,require("_process"))},{"./lib/_stream_duplex.js":20,"./lib/_stream_passthrough.js":21,"./lib/_stream_readable.js":22,"./lib/_stream_transform.js":23,"./lib/_stream_writable.js":24,_process:14,stream:30}],28:[function(require,module,exports){module.exports=require("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":23}],29:[function(require,module,exports){module.exports=require("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":24}],30:[function(require,module,exports){module.exports=Stream;var EE=require("events").EventEmitter;var inherits=require("inherits");inherits(Stream,EE);Stream.Readable=require("readable-stream/readable.js");Stream.Writable=require("readable-stream/writable.js");Stream.Duplex=require("readable-stream/duplex.js");Stream.Transform=require("readable-stream/transform.js");Stream.PassThrough=require("readable-stream/passthrough.js");Stream.Stream=Stream;function Stream(){EE.call(this)}Stream.prototype.pipe=function(dest,options){var source=this;function ondata(chunk){if(dest.writable){if(false===dest.write(chunk)&&source.pause){source.pause()}}}source.on("data",ondata);function ondrain(){if(source.readable&&source.resume){source.resume()}}dest.on("drain",ondrain);if(!dest._isStdio&&(!options||options.end!==false)){source.on("end",onend);source.on("close",onclose)}var didOnEnd=false;function onend(){if(didOnEnd)return;didOnEnd=true;dest.end()}function onclose(){if(didOnEnd)return;didOnEnd=true;if(typeof dest.destroy==="function")dest.destroy()}function onerror(er){cleanup();if(EE.listenerCount(this,"error")===0){throw er}}source.on("error",onerror);dest.on("error",onerror);function cleanup(){source.removeListener("data",ondata);dest.removeListener("drain",ondrain);source.removeListener("end",onend);source.removeListener("close",onclose);source.removeListener("error",onerror);dest.removeListener("error",onerror);source.removeListener("end",cleanup);source.removeListener("close",cleanup);dest.removeListener("close",cleanup)}source.on("end",cleanup);source.on("close",cleanup);dest.on("close",cleanup);dest.emit("pipe",source);return dest}},{events:8,inherits:9,"readable-stream/duplex.js":19,"readable-stream/passthrough.js":26,"readable-stream/readable.js":27,"readable-stream/transform.js":28,"readable-stream/writable.js":29}],31:[function(require,module,exports){var Buffer=require("buffer").Buffer;var isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding)){throw new Error("Unknown encoding: "+encoding)}}var StringDecoder=exports.StringDecoder=function(encoding){this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,"");assertEncoding(encoding);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6);this.charReceived=0;this.charLength=0};StringDecoder.prototype.write=function(buffer){var charStr="";while(this.charLength){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived<this.charLength){return""}buffer=buffer.slice(available,buffer.length);charStr=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var charCode=charStr.charCodeAt(charStr.length-1);if(charCode>=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:4}],32:[function(require,module,exports){var punycode=require("punycode");exports.parse=urlParse;exports.resolve=urlResolve;exports.resolveObject=urlResolveObject;exports.format=urlFormat;exports.Url=Url;function Url(){this.protocol=null;this.slashes=null;this.auth=null;this.host=null;this.port=null;this.hostname=null;this.hash=null;this.search=null;this.query=null;this.pathname=null;this.path=null;this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r","\n"," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:true,"javascript:":true},hostlessProtocol={javascript:true,"javascript:":true},slashedProtocol={http:true,https:true,ftp:true,gopher:true,file:true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true},querystring=require("querystring");function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&isObject(url)&&url instanceof Url)return url;var u=new Url;u.parse(url,parseQueryString,slashesDenoteHost);return u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!isString(url)){throw new TypeError("Parameter 'url' must be a string, not "+typeof url)}var rest=url;rest=rest.trim();var proto=protocolPattern.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();this.protocol=lowerProto;rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/)){var slashes=rest.substr(0,2)==="//";if(slashes&&!(proto&&hostlessProtocol[proto])){rest=rest.substr(2);this.slashes=true}}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){var hostEnd=-1;for(var i=0;i<hostEndingChars.length;i++){var hec=rest.indexOf(hostEndingChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd))hostEnd=hec}var auth,atSign;if(hostEnd===-1){atSign=rest.lastIndexOf("@")}else{atSign=rest.lastIndexOf("@",hostEnd)}if(atSign!==-1){auth=rest.slice(0,atSign);rest=rest.slice(atSign+1);this.auth=decodeURIComponent(auth)}hostEnd=-1;for(var i=0;i<nonHostChars.length;i++){var hec=rest.indexOf(nonHostChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd))hostEnd=hec}if(hostEnd===-1)hostEnd=rest.length;this.host=rest.slice(0,hostEnd);rest=rest.slice(hostEnd);this.parseHost();this.hostname=this.hostname||"";var ipv6Hostname=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ipv6Hostname){var hostparts=this.hostname.split(/\./);for(var i=0,l=hostparts.length;i<l;i++){var part=hostparts[i];if(!part)continue;if(!part.match(hostnamePartPattern)){var newpart="";for(var j=0,k=part.length;j<k;j++){if(part.charCodeAt(j)>127){newpart+="x"}else{newpart+=part[j]}}if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i);var notHost=hostparts.slice(i+1);var bit=part.match(hostnamePartStart);if(bit){validParts.push(bit[1]);notHost.unshift(bit[2])}if(notHost.length){rest="/"+notHost.join(".")+rest}this.hostname=validParts.join(".");break}}}}if(this.hostname.length>hostnameMaxLen){this.hostname=""}else{this.hostname=this.hostname.toLowerCase()}if(!ipv6Hostname){var domainArray=this.hostname.split(".");var newOut=[];for(var i=0;i<domainArray.length;++i){var s=domainArray[i];newOut.push(s.match(/[^A-Za-z0-9_-]/)?"xn--"+punycode.encode(s):s)}this.hostname=newOut.join(".")}var p=this.port?":"+this.port:"";var h=this.hostname||"";this.host=h+p;this.href+=this.host;if(ipv6Hostname){this.hostname=this.hostname.substr(1,this.hostname.length-2);if(rest[0]!=="/"){rest="/"+rest}}}if(!unsafeProtocol[lowerProto]){for(var i=0,l=autoEscape.length;i<l;i++){var ae=autoEscape[i];var esc=encodeURIComponent(ae);if(esc===ae){esc=escape(ae)}rest=rest.split(ae).join(esc)}}var hash=rest.indexOf("#");if(hash!==-1){this.hash=rest.substr(hash);rest=rest.slice(0,hash)}var qm=rest.indexOf("?");if(qm!==-1){this.search=rest.substr(qm);this.query=rest.substr(qm+1);if(parseQueryString){this.query=querystring.parse(this.query)}rest=rest.slice(0,qm)}else if(parseQueryString){this.search="";this.query={}}if(rest)this.pathname=rest;if(slashedProtocol[lowerProto]&&this.hostname&&!this.pathname){this.pathname="/"}if(this.pathname||this.search){var p=this.pathname||"";var s=this.search||"";this.path=p+s}this.href=this.format();return this};function urlFormat(obj){if(isString(obj))obj=urlParse(obj);if(!(obj instanceof Url))return Url.prototype.format.call(obj);return obj.format()}Url.prototype.format=function(){var auth=this.auth||"";if(auth){auth=encodeURIComponent(auth);auth=auth.replace(/%3A/i,":");auth+="@"}var protocol=this.protocol||"",pathname=this.pathname||"",hash=this.hash||"",host=false,query="";if(this.host){host=auth+this.host}else if(this.hostname){host=auth+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]");if(this.port){host+=":"+this.port}}if(this.query&&isObject(this.query)&&Object.keys(this.query).length){query=querystring.stringify(this.query)}var search=this.search||query&&"?"+query||"";if(protocol&&protocol.substr(-1)!==":")protocol+=":";if(this.slashes||(!protocol||slashedProtocol[protocol])&&host!==false){host="//"+(host||"");if(pathname&&pathname.charAt(0)!=="/")pathname="/"+pathname}else if(!host){host=""}if(hash&&hash.charAt(0)!=="#")hash="#"+hash;if(search&&search.charAt(0)!=="?")search="?"+search;pathname=pathname.replace(/[?#]/g,function(match){return encodeURIComponent(match)});search=search.replace("#","%23");return protocol+host+pathname+search+hash};function urlResolve(source,relative){return urlParse(source,false,true).resolve(relative)}Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,false,true)).format()};function urlResolveObject(source,relative){if(!source)return relative;return urlParse(source,false,true).resolveObject(relative)}Url.prototype.resolveObject=function(relative){if(isString(relative)){var rel=new Url;rel.parse(relative,false,true);relative=rel}var result=new Url;Object.keys(this).forEach(function(k){result[k]=this[k]},this);result.hash=relative.hash;if(relative.href===""){result.href=result.format();return result}if(relative.slashes&&!relative.protocol){Object.keys(relative).forEach(function(k){if(k!=="protocol")result[k]=relative[k]});if(slashedProtocol[result.protocol]&&result.hostname&&!result.pathname){result.path=result.pathname="/"}result.href=result.format();return result}if(relative.protocol&&relative.protocol!==result.protocol){if(!slashedProtocol[relative.protocol]){Object.keys(relative).forEach(function(k){result[k]=relative[k]});result.href=result.format();return result}result.protocol=relative.protocol;if(!relative.host&&!hostlessProtocol[relative.protocol]){var relPath=(relative.pathname||"").split("/");while(relPath.length&&!(relative.host=relPath.shift()));if(!relative.host)relative.host="";if(!relative.hostname)relative.hostname="";if(relPath[0]!=="")relPath.unshift("");
if(relPath.length<2)relPath.unshift("");result.pathname=relPath.join("/")}else{result.pathname=relative.pathname}result.search=relative.search;result.query=relative.query;result.host=relative.host||"";result.auth=relative.auth;result.hostname=relative.hostname||relative.host;result.port=relative.port;if(result.pathname||result.search){var p=result.pathname||"";var s=result.search||"";result.path=p+s}result.slashes=result.slashes||relative.slashes;result.href=result.format();return result}var isSourceAbs=result.pathname&&result.pathname.charAt(0)==="/",isRelAbs=relative.host||relative.pathname&&relative.pathname.charAt(0)==="/",mustEndAbs=isRelAbs||isSourceAbs||result.host&&relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic){result.hostname="";result.port=null;if(result.host){if(srcPath[0]==="")srcPath[0]=result.host;else srcPath.unshift(result.host)}result.host="";if(relative.protocol){relative.hostname=null;relative.port=null;if(relative.host){if(relPath[0]==="")relPath[0]=relative.host;else relPath.unshift(relative.host)}relative.host=null}mustEndAbs=mustEndAbs&&(relPath[0]===""||srcPath[0]==="")}if(isRelAbs){result.host=relative.host||relative.host===""?relative.host:result.host;result.hostname=relative.hostname||relative.hostname===""?relative.hostname:result.hostname;result.search=relative.search;result.query=relative.query;srcPath=relPath}else if(relPath.length){if(!srcPath)srcPath=[];srcPath.pop();srcPath=srcPath.concat(relPath);result.search=relative.search;result.query=relative.query}else if(!isNullOrUndefined(relative.search)){if(psychotic){result.hostname=result.host=srcPath.shift();var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}result.search=relative.search;result.query=relative.query;if(!isNull(result.pathname)||!isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.href=result.format();return result}if(!srcPath.length){result.pathname=null;if(result.search){result.path="/"+result.search}else{result.path=null}result.href=result.format();return result}var last=srcPath.slice(-1)[0];var hasTrailingSlash=(result.host||relative.host)&&(last==="."||last==="..")||last==="";var up=0;for(var i=srcPath.length;i>=0;i--){last=srcPath[i];if(last=="."){srcPath.splice(i,1)}else if(last===".."){srcPath.splice(i,1);up++}else if(up){srcPath.splice(i,1);up--}}if(!mustEndAbs&&!removeAllDots){for(;up--;up){srcPath.unshift("..")}}if(mustEndAbs&&srcPath[0]!==""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/")){srcPath.unshift("")}if(hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/"){srcPath.push("")}var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)==="/";if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}mustEndAbs=mustEndAbs||result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute){srcPath.unshift("")}if(!srcPath.length){result.pathname=null;result.path=null}else{result.pathname=srcPath.join("/")}if(!isNull(result.pathname)||!isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==":"){this.port=port.substr(1)}host=host.substr(0,host.length-port.length)}if(host)this.hostname=host};function isString(arg){return typeof arg==="string"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isNull(arg){return arg===null}function isNullOrUndefined(arg){return arg==null}},{punycode:15,querystring:18}],33:[function(require,module,exports){arguments[4][9][0].apply(exports,arguments)},{dup:9}],34:[function(require,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],35:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i<arguments.length;i++){objects.push(inspect(arguments[i]))}return objects.join(" ")}var i=1;var args=arguments;var len=args.length;var str=String(f).replace(formatRegExp,function(x){if(x==="%%")return"%";if(i>=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i<len;x=args[++i]){if(isNull(x)||!isObject(x)){str+=" "+x}else{str+=" "+inspect(x)}}return str};exports.deprecate=function(fn,msg){if(isUndefined(global.process)){return function(){return exports.deprecate(fn,msg).apply(this,arguments)}}if(process.noDeprecation===true){return fn}var warned=false;function deprecated(){if(!warned){if(process.throwDeprecation){throw new Error(msg)}else if(process.traceDeprecation){console.trace(msg)}else{console.error(msg)}warned=true}return fn.apply(this,arguments)}return deprecated};var debugs={};var debugEnviron;exports.debuglog=function(set){if(isUndefined(debugEnviron))debugEnviron=process.env.NODE_DEBUG||"";set=set.toUpperCase();if(!debugs[set]){if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else{debugs[set]=function(){}}}return debugs[set]};function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};if(arguments.length>=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i<l;++i){if(hasOwnProperty(value,String(i))){output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),true))}else{output.push("")}}keys.forEach(function(key){if(!key.match(/^\d+$/)){output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,true))}});return output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]};if(desc.get){if(desc.set){str=ctx.stylize("[Getter/Setter]","special")}else{str=ctx.stylize("[Getter]","special")}}else{if(desc.set){str=ctx.stylize("[Setter]","special")}}if(!hasOwnProperty(visibleKeys,key)){name="["+key+"]"}if(!str){if(ctx.seen.indexOf(desc.value)<0){if(isNull(recurseTimes)){str=formatValue(ctx,desc.value,null)}else{str=formatValue(ctx,desc.value,recurseTimes-1)}if(str.indexOf("\n")>-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=require("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":34,_process:14,inherits:33}],36:[function(require,module,exports){(function(process,__dirname){var binary=require("node-pre-gyp");var path=require("path");var binding_path=binary.find(path.resolve(path.join(__dirname,"../package.json")),{debug:!!process.env.DEBUG});var binding=require(binding_path);module.exports=binding}).call(this,require("_process"),"/lib")},{_process:14,"node-pre-gyp":38,path:13}],37:[function(require,module,exports){(function(Buffer){module.exports=Buffers;function Buffers(bufs){if(!(this instanceof Buffers))return new Buffers(bufs);this.buffers=bufs||[];this.length=this.buffers.reduce(function(size,buf){return size+buf.length},0)}Buffers.prototype.push=function(){for(var i=0;i<arguments.length;i++){if(!Buffer.isBuffer(arguments[i])){throw new TypeError("Tried to push a non-buffer")}}for(var i=0;i<arguments.length;i++){var buf=arguments[i];this.buffers.push(buf);this.length+=buf.length}return this.length};Buffers.prototype.unshift=function(){for(var i=0;i<arguments.length;i++){if(!Buffer.isBuffer(arguments[i])){throw new TypeError("Tried to unshift a non-buffer")}}for(var i=0;i<arguments.length;i++){var buf=arguments[i];this.buffers.unshift(buf);this.length+=buf.length}return this.length};Buffers.prototype.copy=function(dst,dStart,start,end){return this.slice(start,end).copy(dst,dStart,0,end-start)};Buffers.prototype.splice=function(i,howMany){var buffers=this.buffers;var index=i>=0?i:this.length-i;var reps=[].slice.call(arguments,2);if(howMany===undefined){howMany=this.length-index}else if(howMany>this.length-index){howMany=this.length-index}for(var i=0;i<reps.length;i++){this.length+=reps[i].length}var removed=new Buffers;var bytes=0;var startBytes=0;for(var ii=0;ii<buffers.length&&startBytes+buffers[ii].length<index;ii++){startBytes+=buffers[ii].length}if(index-startBytes>0){var start=index-startBytes;if(start+howMany<buffers[ii].length){removed.push(buffers[ii].slice(start,start+howMany));var orig=buffers[ii];var buf0=new Buffer(start);for(var i=0;i<start;i++){buf0[i]=orig[i]}var buf1=new Buffer(orig.length-start-howMany);for(var i=start+howMany;i<orig.length;i++){buf1[i-howMany-start]=orig[i]}if(reps.length>0){var reps_=reps.slice();reps_.unshift(buf0);reps_.push(buf1);buffers.splice.apply(buffers,[ii,1].concat(reps_));ii+=reps_.length;reps=[]}else{buffers.splice(ii,1,buf0,buf1);ii+=2}}else{removed.push(buffers[ii].slice(start));buffers[ii]=buffers[ii].slice(0,start);ii++}}if(reps.length>0){buffers.splice.apply(buffers,[ii,0].concat(reps));ii+=reps.length}while(removed.length<howMany){var buf=buffers[ii];var len=buf.length;var take=Math.min(len,howMany-removed.length);if(take===len){removed.push(buf);buffers.splice(ii,1)}else{removed.push(buf.slice(0,take));buffers[ii]=buffers[ii].slice(take)}}this.length-=removed.length;return removed};Buffers.prototype.slice=function(i,j){var buffers=this.buffers;if(j===undefined)j=this.length;if(i===undefined)i=0;if(j>this.length)j=this.length;var startBytes=0;for(var si=0;si<buffers.length&&startBytes+buffers[si].length<=i;si++){startBytes+=buffers[si].length}var target=new Buffer(j-i);var ti=0;for(var ii=si;ti<j-i&&ii<buffers.length;ii++){var len=buffers[ii].length;var start=ti===0?i-startBytes:0;var end=ti+len>=j-i?Math.min(start+(j-i)-ti,len):len;buffers[ii].copy(target,ti,start,end);ti+=end-start}return target};Buffers.prototype.pos=function(i){if(i<0||i>=this.length)throw new Error("oob");var l=i,bi=0,bu=null;for(;;){bu=this.buffers[bi];if(l<bu.length){return{buf:bi,offset:l}}else{l-=bu.length}bi++}};Buffers.prototype.get=function get(i){var pos=this.pos(i);return this.buffers[pos.buf].get(pos.offset)};Buffers.prototype.set=function set(i,b){var pos=this.pos(i);return this.buffers[pos.buf].set(pos.offset,b)};Buffers.prototype.indexOf=function(needle,offset){if("string"===typeof needle){needle=new Buffer(needle)}else if(needle instanceof Buffer){}else{throw new Error("Invalid type for a search string")}if(!needle.length){return 0}if(!this.length){return-1}var i=0,j=0,match=0,mstart,pos=0;if(offset){var p=this.pos(offset);i=p.buf;j=p.offset;pos=offset}for(;;){while(j>=this.buffers[i].length){j=0;i++;if(i>=this.buffers.length){return-1}}var char=this.buffers[i][j];if(char==needle[match]){if(match==0){mstart={i:i,j:j,pos:pos}}match++;if(match==needle.length){return mstart.pos}}else if(match!=0){i=mstart.i;j=mstart.j;pos=mstart.pos;match=0}j++;pos++}};Buffers.prototype.toBuffer=function(){return this.slice()};Buffers.prototype.toString=function(encoding,start,end){return this.slice(start,end).toString(encoding)}}).call(this,require("buffer").Buffer)},{buffer:4}],38:[function(require,module,exports){(function(process,__dirname){"use strict";module.exports=exports;var path=require("path");var nopt=require("nopt");var log=require("npmlog");var EE=require("events").EventEmitter;var inherits=require("util").inherits;var commands=["clean","install","reinstall","build","rebuild","package","testpackage","publish","unpublish","info","testbinary","reveal","configure"];var aliases={};log.heading="node-pre-gyp";exports.find=require("./pre-binding").find;function Run(){var self=this;this.commands={};commands.forEach(function(command){self.commands[command]=function(argv,callback){log.verbose("command",command,argv);return require("./"+command)(self,argv,callback)}})}inherits(Run,EE);exports.Run=Run;var proto=Run.prototype;proto.package=require("../package");proto.configDefs={help:Boolean,arch:String,debug:Boolean,directory:String,proxy:String,loglevel:String};proto.shorthands={release:"--no-debug",C:"--directory",debug:"--debug",j:"--jobs",silent:"--loglevel=silent",silly:"--loglevel=silly",verbose:"--loglevel=verbose"};proto.aliases=aliases;proto.parseArgv=function parseOpts(argv){this.opts=nopt(this.configDefs,this.shorthands,argv);this.argv=this.opts.argv.remain.slice();var commands=this.todo=[];argv=this.argv.map(function(arg){if(arg in this.aliases){arg=this.aliases[arg]}return arg},this);argv.slice().forEach(function(arg){if(arg in this.commands){var args=argv.splice(0,argv.indexOf(arg));argv.shift();if(commands.length>0){commands[commands.length-1].args=args}commands.push({name:arg,args:[]})}},this);if(commands.length>0){commands[commands.length-1].args=argv.splice(0)}var npm_config_prefix="npm_config_";Object.keys(process.env).forEach(function(name){if(name.indexOf(npm_config_prefix)!==0)return;var val=process.env[name];if(name===npm_config_prefix+"loglevel"){log.level=val}else{name=name.substring(npm_config_prefix.length);if(name==="argv"){if(this.opts.argv&&this.opts.argv.remain&&this.opts.argv.remain.length){}else{this.opts[name]=val}}else{this.opts[name]=val}}},this);if(this.opts.loglevel){log.level=this.opts.loglevel}log.resume()};proto.usage=function usage(){var str=[""," Usage: node-pre-gyp <command> [options]",""," where <command> is one of:",commands.map(function(c){return" - "+c+" - "+require("./"+c).usage}).join("\n"),"","node-pre-gyp@"+this.version+" "+path.resolve(__dirname,".."),"node@"+process.versions.node].join("\n");return str};Object.defineProperty(proto,"version",{get:function(){return this.package.version},enumerable:true})}).call(this,require("_process"),"/node_modules/node-pre-gyp/lib")},{"../package":74,"./pre-binding":39,_process:14,events:8,nopt:42,npmlog:44,path:13,util:35}],39:[function(require,module,exports){"use strict";var versioning=require("../lib/util/versioning.js");var existsSync=require("fs").existsSync||require("path").existsSync;var path=require("path");module.exports=exports;exports.usage="Finds the require path for the node-pre-gyp installed module";exports.validate=function(package_json){versioning.validate_config(package_json)};exports.find=function(package_json_path,opts){if(!existsSync(package_json_path)){throw new Error("package.json does not exist at "+package_json_path)}var package_json=require(package_json_path);versioning.validate_config(package_json);opts=opts||{};if(!opts.module_root)opts.module_root=path.dirname(package_json_path);var meta=versioning.evaluate(package_json,opts);return meta.module}},{"../lib/util/versioning.js":41,fs:1,path:13}],40:[function(require,module,exports){module.exports={"0.1.14":{node_abi:null,v8:"1.3"},"0.1.15":{node_abi:null,v8:"1.3"},"0.1.16":{node_abi:null,v8:"1.3"},"0.1.17":{node_abi:null,v8:"1.3"},"0.1.18":{node_abi:null,v8:"1.3"},"0.1.19":{node_abi:null,v8:"2.0"},"0.1.20":{node_abi:null,v8:"2.0"},"0.1.21":{node_abi:null,v8:"2.0"},"0.1.22":{node_abi:null,v8:"2.0"},"0.1.23":{node_abi:null,v8:"2.0"},"0.1.24":{node_abi:null,v8:"2.0"},"0.1.25":{node_abi:null,v8:"2.0"},"0.1.26":{node_abi:null,v8:"2.0"},"0.1.27":{node_abi:null,v8:"2.1"},"0.1.28":{node_abi:null,v8:"2.1"},"0.1.29":{node_abi:null,v8:"2.1"},"0.1.30":{node_abi:null,v8:"2.1"},"0.1.31":{node_abi:null,v8:"2.1"},"0.1.32":{node_abi:null,v8:"2.1"},"0.1.33":{node_abi:null,v8:"2.1"},"0.1.90":{node_abi:null,v8:"2.2"},"0.1.91":{node_abi:null,v8:"2.2"},"0.1.92":{node_abi:null,v8:"2.2"},"0.1.93":{node_abi:null,v8:"2.2"},"0.1.94":{node_abi:null,v8:"2.2"},"0.1.95":{node_abi:null,v8:"2.2"},"0.1.96":{node_abi:null,v8:"2.2"},"0.1.97":{node_abi:null,v8:"2.2"},"0.1.98":{node_abi:null,v8:"2.2"},"0.1.99":{node_abi:null,v8:"2.2"},"0.1.100":{node_abi:null,v8:"2.2"},"0.1.101":{node_abi:1,v8:"2.3"},"0.1.102":{node_abi:1,v8:"2.3"},"0.1.103":{node_abi:1,v8:"2.3"},"0.1.104":{node_abi:1,v8:"2.3"},"0.2.0":{node_abi:1,v8:"2.3"},"0.2.1":{node_abi:1,v8:"2.3"},"0.2.2":{node_abi:1,v8:"2.3"},"0.2.3":{node_abi:1,v8:"2.3"},"0.2.4":{node_abi:1,v8:"2.3"},"0.2.5":{node_abi:1,v8:"2.3"},"0.2.6":{node_abi:1,v8:"2.3"},"0.3.0":{node_abi:1,v8:"2.5"},"0.3.1":{node_abi:1,v8:"2.5"},"0.3.2":{node_abi:1,v8:"3.0"},"0.3.3":{node_abi:1,v8:"3.0"},"0.3.4":{node_abi:1,v8:"3.0"},"0.3.5":{node_abi:1,v8:"3.0"},"0.3.6":{node_abi:1,v8:"3.0"},"0.3.7":{node_abi:1,v8:"3.0"},"0.3.8":{node_abi:1,v8:"3.1"},"0.4.0":{node_abi:1,v8:"3.1"},"0.4.1":{node_abi:1,v8:"3.1"},"0.4.2":{node_abi:1,v8:"3.1"},"0.4.3":{node_abi:1,v8:"3.1"},"0.4.4":{node_abi:1,v8:"3.1"},"0.4.5":{node_abi:1,v8:"3.1"},"0.4.6":{node_abi:1,v8:"3.1"},"0.4.7":{node_abi:1,v8:"3.1"},"0.4.8":{node_abi:1,v8:"3.1"},"0.4.9":{node_abi:1,v8:"3.1"},"0.4.10":{node_abi:1,v8:"3.1"},"0.4.11":{node_abi:1,v8:"3.1"},"0.4.12":{node_abi:1,v8:"3.1"},"0.5.0":{node_abi:1,v8:"3.1"},"0.5.1":{node_abi:1,v8:"3.4"},"0.5.2":{node_abi:1,v8:"3.4"},"0.5.3":{node_abi:1,v8:"3.4"},"0.5.4":{node_abi:1,v8:"3.5"},"0.5.5":{node_abi:1,v8:"3.5"},"0.5.6":{node_abi:1,v8:"3.6"},"0.5.7":{node_abi:1,v8:"3.6"},"0.5.8":{node_abi:1,v8:"3.6"},"0.5.9":{node_abi:1,v8:"3.6"},"0.5.10":{node_abi:1,v8:"3.7"},"0.6.0":{node_abi:1,v8:"3.6"},"0.6.1":{node_abi:1,v8:"3.6"},"0.6.2":{node_abi:1,v8:"3.6"},"0.6.3":{node_abi:1,v8:"3.6"},"0.6.4":{node_abi:1,v8:"3.6"},"0.6.5":{node_abi:1,v8:"3.6"},"0.6.6":{node_abi:1,v8:"3.6"},"0.6.7":{node_abi:1,v8:"3.6"},"0.6.8":{node_abi:1,v8:"3.6"},"0.6.9":{node_abi:1,v8:"3.6"},"0.6.10":{node_abi:1,v8:"3.6"},"0.6.11":{node_abi:1,v8:"3.6"},"0.6.12":{node_abi:1,v8:"3.6"},"0.6.13":{node_abi:1,v8:"3.6"},"0.6.14":{node_abi:1,v8:"3.6"},"0.6.15":{node_abi:1,v8:"3.6"},"0.6.16":{node_abi:1,v8:"3.6"},"0.6.17":{node_abi:1,v8:"3.6"},"0.6.18":{node_abi:1,v8:"3.6"},"0.6.19":{node_abi:1,v8:"3.6"},"0.6.20":{node_abi:1,v8:"3.6"},"0.6.21":{node_abi:1,v8:"3.6"},"0.7.0":{node_abi:1,v8:"3.8"},"0.7.1":{node_abi:1,v8:"3.8"},"0.7.2":{node_abi:1,v8:"3.8"},"0.7.3":{node_abi:1,v8:"3.9"},"0.7.4":{node_abi:1,v8:"3.9"},"0.7.5":{node_abi:1,v8:"3.9"},"0.7.6":{node_abi:1,v8:"3.9"},"0.7.7":{node_abi:1,v8:"3.9"},"0.7.8":{node_abi:1,v8:"3.9"},"0.7.9":{node_abi:1,v8:"3.11"},"0.7.10":{node_abi:1,v8:"3.9"},"0.7.11":{node_abi:1,v8:"3.11"},"0.7.12":{node_abi:1,v8:"3.11"},"0.8.0":{node_abi:1,v8:"3.11"},"0.8.1":{node_abi:1,v8:"3.11"},"0.8.2":{node_abi:1,v8:"3.11"},"0.8.3":{node_abi:1,v8:"3.11"},"0.8.4":{node_abi:1,v8:"3.11"},"0.8.5":{node_abi:1,v8:"3.11"},"0.8.6":{node_abi:1,v8:"3.11"},"0.8.7":{node_abi:1,v8:"3.11"},"0.8.8":{node_abi:1,v8:"3.11"},"0.8.9":{node_abi:1,v8:"3.11"},"0.8.10":{node_abi:1,v8:"3.11"},"0.8.11":{node_abi:1,v8:"3.11"},"0.8.12":{node_abi:1,v8:"3.11"},"0.8.13":{node_abi:1,v8:"3.11"},"0.8.14":{node_abi:1,v8:"3.11"},"0.8.15":{node_abi:1,v8:"3.11"},"0.8.16":{node_abi:1,v8:"3.11"},"0.8.17":{node_abi:1,v8:"3.11"},"0.8.18":{node_abi:1,v8:"3.11"},"0.8.19":{node_abi:1,v8:"3.11"},"0.8.20":{node_abi:1,v8:"3.11"},"0.8.21":{node_abi:1,v8:"3.11"},"0.8.22":{node_abi:1,v8:"3.11"},"0.8.23":{node_abi:1,v8:"3.11"},"0.8.24":{node_abi:1,v8:"3.11"},"0.8.25":{node_abi:1,v8:"3.11"},"0.8.26":{node_abi:1,v8:"3.11"},"0.8.27":{node_abi:1,v8:"3.11"},"0.8.28":{node_abi:1,v8:"3.11"},"0.9.0":{node_abi:1,v8:"3.11"},"0.9.1":{node_abi:10,v8:"3.11"},"0.9.2":{node_abi:10,v8:"3.11"},"0.9.3":{node_abi:10,v8:"3.13"},"0.9.4":{node_abi:10,v8:"3.13"},"0.9.5":{node_abi:10,v8:"3.13"},"0.9.6":{node_abi:10,v8:"3.15"},"0.9.7":{node_abi:10,v8:"3.15"},"0.9.8":{node_abi:10,v8:"3.15"},"0.9.9":{node_abi:11,v8:"3.15"},"0.9.10":{node_abi:11,v8:"3.15"},"0.9.11":{node_abi:11,v8:"3.14"},"0.9.12":{node_abi:11,v8:"3.14"},"0.10.0":{node_abi:11,v8:"3.14"},"0.10.1":{node_abi:11,v8:"3.14"},"0.10.2":{node_abi:11,v8:"3.14"},"0.10.3":{node_abi:11,v8:"3.14"},"0.10.4":{node_abi:11,v8:"3.14"},"0.10.5":{node_abi:11,v8:"3.14"},"0.10.6":{node_abi:11,v8:"3.14"},"0.10.7":{node_abi:11,v8:"3.14"},"0.10.8":{node_abi:11,v8:"3.14"},"0.10.9":{node_abi:11,v8:"3.14"},"0.10.10":{node_abi:11,v8:"3.14"},"0.10.11":{node_abi:11,v8:"3.14"},"0.10.12":{node_abi:11,v8:"3.14"},"0.10.13":{node_abi:11,v8:"3.14"},"0.10.14":{node_abi:11,v8:"3.14"},"0.10.15":{node_abi:11,v8:"3.14"},"0.10.16":{node_abi:11,v8:"3.14"},"0.10.17":{node_abi:11,v8:"3.14"},"0.10.18":{node_abi:11,v8:"3.14"},"0.10.19":{node_abi:11,v8:"3.14"},"0.10.20":{node_abi:11,v8:"3.14"},"0.10.21":{node_abi:11,v8:"3.14"},"0.10.22":{node_abi:11,v8:"3.14"},"0.10.23":{node_abi:11,v8:"3.14"},"0.10.24":{node_abi:11,v8:"3.14"},"0.10.25":{node_abi:11,v8:"3.14"},"0.10.26":{node_abi:11,v8:"3.14"},"0.10.27":{node_abi:11,v8:"3.14"},"0.10.28":{node_abi:11,v8:"3.14"},"0.10.29":{node_abi:11,v8:"3.14"},"0.10.30":{node_abi:11,v8:"3.14"},"0.10.31":{node_abi:11,v8:"3.14"},"0.10.32":{node_abi:11,v8:"3.14"},"0.10.33":{node_abi:11,v8:"3.14"},"0.10.34":{node_abi:11,v8:"3.14"},"0.10.35":{node_abi:11,v8:"3.14"},"0.10.36":{node_abi:11,v8:"3.14"},"0.10.37":{node_abi:11,v8:"3.14"},"0.10.38":{node_abi:11,v8:"3.14"},"0.10.39":{node_abi:11,v8:"3.14"},"0.10.40":{node_abi:11,v8:"3.14"},"0.11.0":{node_abi:12,v8:"3.17"},"0.11.1":{node_abi:12,v8:"3.18"},"0.11.2":{node_abi:12,v8:"3.19"},"0.11.3":{node_abi:12,v8:"3.19"},"0.11.4":{node_abi:12,v8:"3.20"},"0.11.5":{node_abi:12,v8:"3.20"},"0.11.6":{node_abi:12,v8:"3.20"},"0.11.7":{node_abi:12,v8:"3.20"},"0.11.8":{node_abi:13,v8:"3.21"},"0.11.9":{node_abi:13,v8:"3.22"},"0.11.10":{node_abi:13,v8:"3.22"},"0.11.11":{node_abi:14,v8:"3.22"},"0.11.12":{node_abi:14,v8:"3.22"},"0.11.13":{node_abi:14,v8:"3.25"},"0.11.14":{node_abi:14,v8:"3.26"},"0.11.15":{node_abi:14,v8:"3.28"},"0.11.16":{node_abi:14,v8:"3.28"},"0.12.0":{node_abi:14,v8:"3.28"},"0.12.1":{node_abi:14,v8:"3.28"},"0.12.2":{node_abi:14,v8:"3.28"},"0.12.3":{node_abi:14,v8:"3.28"},"0.12.4":{node_abi:14,v8:"3.28"},"0.12.5":{node_abi:14,v8:"3.28"},"0.12.6":{node_abi:14,v8:"3.28"},"0.12.7":{node_abi:14,v8:"3.28"},"1.0.0":{node_abi:42,v8:"3.31"},"1.0.1":{node_abi:42,v8:"3.31"},"1.0.2":{node_abi:42,v8:"3.31"},"1.0.3":{node_abi:42,v8:"4.1"},"1.0.4":{node_abi:42,v8:"4.1"},"1.1.0":{node_abi:43,v8:"4.1"},"1.2.0":{node_abi:43,v8:"4.1"},"1.3.0":{node_abi:43,v8:"4.1"},"1.4.1":{node_abi:43,v8:"4.1"},"1.4.2":{node_abi:43,v8:"4.1"},"1.4.3":{node_abi:43,v8:"4.1"},"1.5.0":{node_abi:43,v8:"4.1"},"1.5.1":{node_abi:43,v8:"4.1"},"1.6.0":{node_abi:43,v8:"4.1"},"1.6.1":{node_abi:43,v8:"4.1"},"1.6.2":{node_abi:43,v8:"4.1"},"1.6.3":{node_abi:43,v8:"4.1"},"1.6.4":{node_abi:43,v8:"4.1"},"1.7.1":{node_abi:43,v8:"4.1"},"1.8.1":{node_abi:43,v8:"4.1"},"1.8.2":{node_abi:43,v8:"4.1"},"1.8.3":{node_abi:43,v8:"4.1"},"1.8.4":{node_abi:43,v8:"4.1"},"2.0.0":{node_abi:44,v8:"4.2"},"2.0.1":{node_abi:44,v8:"4.2"},"2.0.2":{node_abi:44,v8:"4.2"},"2.1.0":{node_abi:44,v8:"4.2"},"2.2.0":{node_abi:44,v8:"4.2"},"2.2.1":{node_abi:44,v8:"4.2"},"2.3.0":{node_abi:44,v8:"4.2"},"2.3.1":{node_abi:44,v8:"4.2"},"2.3.2":{node_abi:44,v8:"4.2"},"2.3.3":{node_abi:44,v8:"4.2"},"2.3.4":{node_abi:44,v8:"4.2"},"2.4.0":{node_abi:44,v8:"4.2"},"2.5.0":{node_abi:44,v8:"4.2"},"3.0.0":{node_abi:45,v8:"4.4"},"3.1.0":{node_abi:45,v8:"4.4"},"3.2.0":{node_abi:45,v8:"4.4"},"3.3.0":{node_abi:45,v8:"4.4"},"3.3.1":{node_abi:45,v8:"4.4"},"4.0.0":{node_abi:46,v8:"4.5"},"4.1.0":{node_abi:46,v8:"4.5"},"4.1.1":{node_abi:46,v8:"4.5"},"4.1.2":{node_abi:46,v8:"4.5"},"4.2.0":{node_abi:46,v8:"4.5"},"4.2.1":{node_abi:46,v8:"4.5"},"4.2.2":{node_abi:46,v8:"4.5"},"5.0.0":{node_abi:47,v8:"4.6"},"5.1.0":{node_abi:47,v8:"4.6"}}},{}],41:[function(require,module,exports){(function(process){"use strict";module.exports=exports;var path=require("path");var semver=require("semver");var url=require("url");var abi_crosswalk;if(process.env.NODE_PRE_GYP_ABI_CROSSWALK){abi_crosswalk=require(process.env.NODE_PRE_GYP_ABI_CROSSWALK)}else{abi_crosswalk=require("./abi_crosswalk.json")}function get_electron_abi(runtime,target_version){if(!runtime){throw new Error("get_electron_abi requires valid runtime arg")}if(typeof target_version==="undefined"){throw new Error("Empty target version is not supported if electron is the target.")}var sem_ver=semver.parse(target_version);return runtime+"-v"+sem_ver.major+"."+sem_ver.minor}module.exports.get_electron_abi=get_electron_abi;function get_node_webkit_abi(runtime,target_version){if(!runtime){throw new Error("get_node_webkit_abi requires valid runtime arg")}if(typeof target_version==="undefined"){throw new Error("Empty target version is not supported if node-webkit is the target.")}return runtime+"-v"+target_version}module.exports.get_node_webkit_abi=get_node_webkit_abi;function get_node_abi(runtime,versions){if(!runtime){throw new Error("get_node_abi requires valid runtime arg")}if(!versions){throw new Error("get_node_abi requires valid process.versions object")}var sem_ver=semver.parse(versions.node);if(sem_ver.major===0&&sem_ver.minor%2){return runtime+"-v"+versions.node}else{return versions.modules?runtime+"-v"+ +versions.modules:"v8-"+versions.v8.split(".").slice(0,2).join(".")}}module.exports.get_node_abi=get_node_abi;function get_runtime_abi(runtime,target_version){
if(!runtime){throw new Error("get_runtime_abi requires valid runtime arg")}if(runtime==="node-webkit"){return get_node_webkit_abi(runtime,target_version||process.versions["node-webkit"])}else if(runtime==="electron"){return get_electron_abi(runtime,target_version||process.versions.electron)}else{if(runtime!="node"){throw new Error("Unknown Runtime: '"+runtime+"'")}if(!target_version){return get_node_abi(runtime,process.versions)}else{var cross_obj;if(abi_crosswalk[target_version]){cross_obj=abi_crosswalk[target_version]}else{var target_parts=target_version.split(".").map(function(i){return+i});if(target_parts.length!=3){throw new Error("Unknown target version: "+target_version)}var major=target_parts[0];var minor=target_parts[1];var patch=target_parts[2];if(major===1){while(true){if(minor>0)--minor;if(patch>0)--patch;var new_iojs_target=""+major+"."+minor+"."+patch;if(abi_crosswalk[new_iojs_target]){cross_obj=abi_crosswalk[new_iojs_target];console.log("Warning: node-pre-gyp could not find exact match for "+target_version);console.log("Warning: but node-pre-gyp successfully choose "+new_iojs_target+" as ABI compatible target");break}if(minor===0&&patch===0){break}}}else if(major===0){if(target_parts[1]%2===0){while(--patch>0){var new_node_target=""+major+"."+minor+"."+patch;if(abi_crosswalk[new_node_target]){cross_obj=abi_crosswalk[new_node_target];console.log("Warning: node-pre-gyp could not find exact match for "+target_version);console.log("Warning: but node-pre-gyp successfully choose "+new_node_target+" as ABI compatible target");break}}}}}if(!cross_obj){throw new Error("Unsupported target version: "+target_version)}var versions_obj={node:target_version,v8:cross_obj.v8+".0",modules:cross_obj.node_abi>1?cross_obj.node_abi:undefined};return get_node_abi(runtime,versions_obj)}}}module.exports.get_runtime_abi=get_runtime_abi;var required_parameters=["module_name","module_path","host"];function validate_config(package_json){var msg=package_json.name+" package.json is not node-pre-gyp ready:\n";var missing=[];if(!package_json.main){missing.push("main")}if(!package_json.version){missing.push("version")}if(!package_json.name){missing.push("name")}if(!package_json.binary){missing.push("binary")}var o=package_json.binary;required_parameters.forEach(function(p){if(missing.indexOf("binary")>-1){missing.pop("binary")}if(!o||o[p]===undefined){missing.push("binary."+p)}});if(missing.length>=1){throw new Error(msg+"package.json must declare these properties: \n"+missing.join("\n"))}if(o){var protocol=url.parse(o.host).protocol;if(protocol==="http:"){throw new Error("'host' protocol ("+protocol+") is invalid - only 'https:' is accepted")}}}module.exports.validate_config=validate_config;function eval_template(template,opts){Object.keys(opts).forEach(function(key){var pattern="{"+key+"}";while(template.indexOf(pattern)>-1){template=template.replace(pattern,opts[key])}});return template}function fix_slashes(pathname){if(pathname.slice(-1)!="/"){return pathname+"/"}return pathname}function drop_double_slashes(pathname){return pathname.replace(/\/\//g,"/")}var default_package_name="{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz";var default_remote_path="";module.exports.evaluate=function(package_json,options){options=options||{};validate_config(package_json);var v=package_json.version;var module_version=semver.parse(v);var runtime=options.runtime||(process.versions["node-webkit"]?"node-webkit":"node");var opts={name:package_json.name,configuration:Boolean(options.debug)?"Debug":"Release",debug:options.debug,module_name:package_json.binary.module_name,version:module_version.version,prerelease:module_version.prerelease.length?module_version.prerelease.join("."):"",build:module_version.build.length?module_version.build.join("."):"",major:module_version.major,minor:module_version.minor,patch:module_version.patch,runtime:runtime,node_abi:get_runtime_abi(runtime,options.target),target:options.target||"",platform:options.target_platform||process.platform,target_platform:options.target_platform||process.platform,arch:options.target_arch||process.arch,target_arch:options.target_arch||process.arch,module_main:package_json.main,toolset:options.toolset||""};var host=process.env["npm_config_"+opts.module_name+"_binary_host_mirror"]||package_json.binary.host;opts.host=fix_slashes(eval_template(host,opts));opts.module_path=eval_template(package_json.binary.module_path,opts);if(options.module_root){opts.module_path=path.join(options.module_root,opts.module_path)}else{opts.module_path=path.resolve(opts.module_path)}opts.module=path.join(opts.module_path,opts.module_name+".node");opts.remote_path=package_json.binary.remote_path?drop_double_slashes(fix_slashes(eval_template(package_json.binary.remote_path,opts))):default_remote_path;var package_name=package_json.binary.package_name?package_json.binary.package_name:default_package_name;opts.package_name=eval_template(package_name,opts);opts.staged_tarball=path.join("build/stage",opts.remote_path,opts.package_name);opts.hosted_path=url.resolve(opts.host,opts.remote_path);opts.hosted_tarball=url.resolve(opts.hosted_path,opts.package_name);return opts}}).call(this,require("_process"))},{"./abi_crosswalk.json":40,_process:14,path:13,semver:73,url:32}],42:[function(require,module,exports){(function(process){var debug=process.env.DEBUG_NOPT||process.env.NOPT_DEBUG?function(){console.error.apply(console,arguments)}:function(){};var url=require("url"),path=require("path"),Stream=require("stream").Stream,abbrev=require("abbrev");module.exports=exports=nopt;exports.clean=clean;exports.typeDefs={String:{type:String,validate:validateString},Boolean:{type:Boolean,validate:validateBoolean},url:{type:url,validate:validateUrl},Number:{type:Number,validate:validateNumber},path:{type:path,validate:validatePath},Stream:{type:Stream,validate:validateStream},Date:{type:Date,validate:validateDate}};function nopt(types,shorthands,args,slice){args=args||process.argv;types=types||{};shorthands=shorthands||{};if(typeof slice!=="number")slice=2;debug(types,shorthands,args,slice);args=args.slice(slice);var data={},key,remain=[],cooked=args,original=args.slice(0);parse(args,data,remain,types,shorthands);clean(data,types,exports.typeDefs);data.argv={remain:remain,cooked:cooked,original:original};Object.defineProperty(data.argv,"toString",{value:function(){return this.original.map(JSON.stringify).join(" ")},enumerable:false});return data}function clean(data,types,typeDefs){typeDefs=typeDefs||exports.typeDefs;var remove={},typeDefault=[false,true,null,String,Array];Object.keys(data).forEach(function(k){if(k==="argv")return;var val=data[k],isArray=Array.isArray(val),type=types[k];if(!isArray)val=[val];if(!type)type=typeDefault;if(type===Array)type=typeDefault.concat(Array);if(!Array.isArray(type))type=[type];debug("val=%j",val);debug("types=",type);val=val.map(function(val){if(typeof val==="string"){debug("string %j",val);val=val.trim();if(val==="null"&&~type.indexOf(null)||val==="true"&&(~type.indexOf(true)||~type.indexOf(Boolean))||val==="false"&&(~type.indexOf(false)||~type.indexOf(Boolean))){val=JSON.parse(val);debug("jsonable %j",val)}else if(~type.indexOf(Number)&&!isNaN(val)){debug("convert to number",val);val=+val}else if(~type.indexOf(Date)&&!isNaN(Date.parse(val))){debug("convert to date",val);val=new Date(val)}}if(!types.hasOwnProperty(k)){return val}if(val===false&&~type.indexOf(null)&&!(~type.indexOf(false)||~type.indexOf(Boolean))){val=null}var d={};d[k]=val;debug("prevalidated val",d,val,types[k]);if(!validate(d,k,val,types[k],typeDefs)){if(exports.invalidHandler){exports.invalidHandler(k,val,types[k],data)}else if(exports.invalidHandler!==false){debug("invalid: "+k+"="+val,types[k])}return remove}debug("validated val",d,val,types[k]);return d[k]}).filter(function(val){return val!==remove});if(!val.length)delete data[k];else if(isArray){debug(isArray,data[k],val);data[k]=val}else data[k]=val[0];debug("k=%s val=%j",k,val,data[k])})}function validateString(data,k,val){data[k]=String(val)}function validatePath(data,k,val){if(val===true)return false;if(val===null)return true;val=String(val);var homePattern=process.platform==="win32"?/^~(\/|\\)/:/^~\//;if(val.match(homePattern)&&process.env.HOME){val=path.resolve(process.env.HOME,val.substr(2))}data[k]=path.resolve(String(val));return true}function validateNumber(data,k,val){debug("validate Number %j %j %j",k,val,isNaN(val));if(isNaN(val))return false;data[k]=+val}function validateDate(data,k,val){debug("validate Date %j %j %j",k,val,Date.parse(val));var s=Date.parse(val);if(isNaN(s))return false;data[k]=new Date(val)}function validateBoolean(data,k,val){if(val instanceof Boolean)val=val.valueOf();else if(typeof val==="string"){if(!isNaN(val))val=!!+val;else if(val==="null"||val==="false")val=false;else val=true}else val=!!val;data[k]=val}function validateUrl(data,k,val){val=url.parse(String(val));if(!val.host)return false;data[k]=val.href}function validateStream(data,k,val){if(!(val instanceof Stream))return false;data[k]=val}function validate(data,k,val,type,typeDefs){if(Array.isArray(type)){for(var i=0,l=type.length;i<l;i++){if(type[i]===Array)continue;if(validate(data,k,val,type[i],typeDefs))return true}delete data[k];return false}if(type===Array)return true;if(type!==type){debug("Poison NaN",k,val,type);delete data[k];return false}if(val===type){debug("Explicitly allowed %j",val);data[k]=val;return true}var ok=false,types=Object.keys(typeDefs);for(var i=0,l=types.length;i<l;i++){debug("test type %j %j %j",k,val,types[i]);var t=typeDefs[types[i]];if(t&&(type&&type.name&&t.type&&t.type.name?type.name===t.type.name:type===t.type)){var d={};ok=false!==t.validate(d,k,val);val=d[k];if(ok){data[k]=val;break}}}debug("OK? %j (%j %j %j)",ok,k,val,types[i]);if(!ok)delete data[k];return ok}function parse(args,data,remain,types,shorthands){debug("parse",args,data,remain);var key=null,abbrevs=abbrev(Object.keys(types)),shortAbbr=abbrev(Object.keys(shorthands));for(var i=0;i<args.length;i++){var arg=args[i];debug("arg",arg);if(arg.match(/^-{2,}$/)){remain.push.apply(remain,args.slice(i+1));args[i]="--";break}var hadEq=false;if(arg.charAt(0)==="-"&&arg.length>1){if(arg.indexOf("=")!==-1){hadEq=true;var v=arg.split("=");arg=v.shift();v=v.join("=");args.splice.apply(args,[i,1].concat([arg,v]))}var shRes=resolveShort(arg,shorthands,shortAbbr,abbrevs);debug("arg=%j shRes=%j",arg,shRes);if(shRes){debug(arg,shRes);args.splice.apply(args,[i,1].concat(shRes));if(arg!==shRes[0]){i--;continue}}arg=arg.replace(/^-+/,"");var no=null;while(arg.toLowerCase().indexOf("no-")===0){no=!no;arg=arg.substr(3)}if(abbrevs[arg])arg=abbrevs[arg];var isArray=types[arg]===Array||Array.isArray(types[arg])&&types[arg].indexOf(Array)!==-1;if(!types.hasOwnProperty(arg)&&data.hasOwnProperty(arg)){if(!Array.isArray(data[arg]))data[arg]=[data[arg]];isArray=true}var val,la=args[i+1];var isBool=typeof no==="boolean"||types[arg]===Boolean||Array.isArray(types[arg])&&types[arg].indexOf(Boolean)!==-1||typeof types[arg]==="undefined"&&!hadEq||la==="false"&&(types[arg]===null||Array.isArray(types[arg])&&~types[arg].indexOf(null));if(isBool){val=!no;if(la==="true"||la==="false"){val=JSON.parse(la);la=null;if(no)val=!val;i++}if(Array.isArray(types[arg])&&la){if(~types[arg].indexOf(la)){val=la;i++}else if(la==="null"&&~types[arg].indexOf(null)){val=null;i++}else if(!la.match(/^-{2,}[^-]/)&&!isNaN(la)&&~types[arg].indexOf(Number)){val=+la;i++}else if(!la.match(/^-[^-]/)&&~types[arg].indexOf(String)){val=la;i++}}if(isArray)(data[arg]=data[arg]||[]).push(val);else data[arg]=val;continue}if(types[arg]===String&&la===undefined)la="";if(la&&la.match(/^-{2,}$/)){la=undefined;i--}val=la===undefined?true:la;if(isArray)(data[arg]=data[arg]||[]).push(val);else data[arg]=val;i++;continue}remain.push(arg)}}function resolveShort(arg,shorthands,shortAbbr,abbrevs){arg=arg.replace(/^-+/,"");if(abbrevs[arg]===arg)return null;if(shorthands[arg]){if(shorthands[arg]&&!Array.isArray(shorthands[arg]))shorthands[arg]=shorthands[arg].split(/\s+/);return shorthands[arg]}var singles=shorthands.___singles;if(!singles){singles=Object.keys(shorthands).filter(function(s){return s.length===1}).reduce(function(l,r){l[r]=true;return l},{});shorthands.___singles=singles;debug("shorthand singles",singles)}var chrs=arg.split("").filter(function(c){return singles[c]});if(chrs.join("")===arg)return chrs.map(function(c){return shorthands[c]}).reduce(function(l,r){return l.concat(r)},[]);if(abbrevs[arg]&&!shorthands[arg])return null;if(shortAbbr[arg])arg=shortAbbr[arg];if(shorthands[arg]&&!Array.isArray(shorthands[arg]))shorthands[arg]=shorthands[arg].split(/\s+/);return shorthands[arg]}}).call(this,require("_process"))},{_process:14,abbrev:43,path:13,stream:30,url:32}],43:[function(require,module,exports){module.exports=exports=abbrev.abbrev=abbrev;abbrev.monkeyPatch=monkeyPatch;function monkeyPatch(){Object.defineProperty(Array.prototype,"abbrev",{value:function(){return abbrev(this)},enumerable:false,configurable:true,writable:true});Object.defineProperty(Object.prototype,"abbrev",{value:function(){return abbrev(Object.keys(this))},enumerable:false,configurable:true,writable:true})}function abbrev(list){if(arguments.length!==1||!Array.isArray(list)){list=Array.prototype.slice.call(arguments,0)}for(var i=0,l=list.length,args=[];i<l;i++){args[i]=typeof list[i]==="string"?list[i]:String(list[i])}args=args.sort(lexSort);var abbrevs={},prev="";for(var i=0,l=args.length;i<l;i++){var current=args[i],next=args[i+1]||"",nextMatches=true,prevMatches=true;if(current===next)continue;for(var j=0,cl=current.length;j<cl;j++){var curChar=current.charAt(j);nextMatches=nextMatches&&curChar===next.charAt(j);prevMatches=prevMatches&&curChar===prev.charAt(j);if(!nextMatches&&!prevMatches){j++;break}}prev=current;if(j===cl){abbrevs[current]=current;continue}for(var a=current.substr(0,j);j<=cl;j++){abbrevs[a]=current;a+=current.charAt(j)}}return abbrevs}function lexSort(a,b){return a===b?0:a>b?1:-1}},{}],44:[function(require,module,exports){(function(process){"use strict";var Progress=require("are-we-there-yet");var Gauge=require("gauge");var EE=require("events").EventEmitter;var log=exports=module.exports=new EE;var util=require("util");var ansi=require("ansi");log.cursor=ansi(process.stderr);log.stream=process.stderr;var colorEnabled=undefined;log.enableColor=function(){colorEnabled=true;this.cursor.enabled=true};log.disableColor=function(){colorEnabled=false;this.cursor.enabled=false};log.level="info";log.gauge=new Gauge(log.cursor);log.tracker=new Progress.TrackerGroup;log.progressEnabled=false;var gaugeTheme=undefined;log.enableUnicode=function(){gaugeTheme=Gauge.unicode;log.gauge.setTheme(gaugeTheme)};log.disableUnicode=function(){gaugeTheme=Gauge.ascii;log.gauge.setTheme(gaugeTheme)};var gaugeTemplate=undefined;log.setGaugeTemplate=function(template){gaugeTemplate=template;log.gauge.setTemplate(gaugeTemplate)};log.enableProgress=function(){if(this.progressEnabled)return;this.progressEnabled=true;if(this._pause)return;this.tracker.on("change",this.showProgress);this.gauge.enable();this.showProgress()};log.disableProgress=function(){if(!this.progressEnabled)return;this.clearProgress();this.progressEnabled=false;this.tracker.removeListener("change",this.showProgress);this.gauge.disable()};var trackerConstructors=["newGroup","newItem","newStream"];var mixinLog=function(tracker){Object.keys(log).forEach(function(P){if(P[0]==="_")return;if(trackerConstructors.filter(function(C){return C===P}).length)return;if(tracker[P])return;if(typeof log[P]!=="function")return;var func=log[P];tracker[P]=function(){return func.apply(log,arguments)}});if(tracker instanceof Progress.TrackerGroup){trackerConstructors.forEach(function(C){var func=tracker[C];tracker[C]=function(){return mixinLog(func.apply(tracker,arguments))}})}return tracker};trackerConstructors.forEach(function(C){log[C]=function(){return mixinLog(this.tracker[C].apply(this.tracker,arguments))}});log.clearProgress=function(){if(!this.progressEnabled)return;this.gauge.hide()};log.showProgress=function(name){if(!this.progressEnabled)return;this.gauge.show(name,this.tracker.completed())}.bind(log);log.pause=function(){this._paused=true};log.resume=function(){if(!this._paused)return;this._paused=false;var b=this._buffer;this._buffer=[];b.forEach(function(m){this.emitLog(m)},this);if(this.progressEnabled)this.enableProgress()};log._buffer=[];var id=0;log.record=[];log.maxRecordSize=1e4;log.log=function(lvl,prefix,message){var l=this.levels[lvl];if(l===undefined){return this.emit("error",new Error(util.format("Undefined log level: %j",lvl)))}var a=new Array(arguments.length-2);var stack=null;for(var i=2;i<arguments.length;i++){var arg=a[i-2]=arguments[i];if(typeof arg==="object"&&arg&&arg instanceof Error&&arg.stack){arg.stack=stack=arg.stack+""}}if(stack)a.unshift(stack+"\n");message=util.format.apply(util,a);var m={id:id++,level:lvl,prefix:String(prefix||""),message:message,messageRaw:a};this.emit("log",m);this.emit("log."+lvl,m);if(m.prefix)this.emit(m.prefix,m);this.record.push(m);var mrs=this.maxRecordSize;var n=this.record.length-mrs;if(n>mrs/10){var newSize=Math.floor(mrs*.9);this.record=this.record.slice(-1*newSize)}this.emitLog(m)}.bind(log);log.emitLog=function(m){if(this._paused){this._buffer.push(m);return}if(this.progressEnabled)this.gauge.pulse(m.prefix);var l=this.levels[m.level];if(l===undefined)return;if(l<this.levels[this.level])return;if(l>0&&!isFinite(l))return;var style=log.style[m.level];var disp=log.disp[m.level]||m.level;this.clearProgress();m.message.split(/\r?\n/).forEach(function(line){if(this.heading){this.write(this.heading,this.headingStyle);this.write(" ")}this.write(disp,log.style[m.level]);var p=m.prefix||"";if(p)this.write(" ");this.write(p,this.prefixStyle);this.write(" "+line+"\n")},this);this.showProgress()};log.write=function(msg,style){if(!this.cursor)return;if(this.stream!==this.cursor.stream){this.cursor=ansi(this.stream,{enabled:colorEnabled});var options={};if(gaugeTheme!=null)options.theme=gaugeTheme;if(gaugeTemplate!=null)options.template=gaugeTemplate;this.gauge=new Gauge(options,this.cursor)}style=style||{};if(style.fg)this.cursor.fg[style.fg]();if(style.bg)this.cursor.bg[style.bg]();if(style.bold)this.cursor.bold();if(style.underline)this.cursor.underline();if(style.inverse)this.cursor.inverse();if(style.beep)this.cursor.beep();this.cursor.write(msg).reset()};log.addLevel=function(lvl,n,style,disp){if(!disp)disp=lvl;this.levels[lvl]=n;this.style[lvl]=style;if(!this[lvl])this[lvl]=function(){var a=new Array(arguments.length+1);a[0]=lvl;for(var i=0;i<arguments.length;i++){a[i+1]=arguments[i]}return this.log.apply(this,a)}.bind(this);this.disp[lvl]=disp};log.prefixStyle={fg:"magenta"};log.headingStyle={fg:"white",bg:"black"};log.style={};log.levels={};log.disp={};log.addLevel("silly",-Infinity,{inverse:true},"sill");log.addLevel("verbose",1e3,{fg:"blue",bg:"black"},"verb");log.addLevel("info",2e3,{fg:"green"});log.addLevel("http",3e3,{fg:"green",bg:"black"});log.addLevel("warn",4e3,{fg:"black",bg:"yellow"},"WARN");log.addLevel("error",5e3,{fg:"red",bg:"black"},"ERR!");log.addLevel("silent",Infinity);log.on("error",function(){})}).call(this,require("_process"))},{_process:14,ansi:45,"are-we-there-yet":47,events:8,gauge:72,util:35}],45:[function(require,module,exports){var emitNewlineEvents=require("./newlines"),prefix="[",suffix="m";var codes={up:"A",down:"B",forward:"C",back:"D",nextLine:"E",previousLine:"F",horizontalAbsolute:"G",eraseData:"J",eraseLine:"K",scrollUp:"S",scrollDown:"T",savePosition:"s",restorePosition:"u",queryPosition:"6n",hide:"?25l",show:"?25h"};var styles={bold:1,italic:3,underline:4,inverse:7};var reset={bold:22,italic:23,underline:24,inverse:27};var colors={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,grey:90,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97};function ansi(stream,options){if(stream._ansicursor){return stream._ansicursor}else{return stream._ansicursor=new Cursor(stream,options)}}module.exports=exports=ansi;function Cursor(stream,options){if(!(this instanceof Cursor)){return new Cursor(stream,options)}if(typeof stream!="object"||typeof stream.write!="function"){throw new Error("a valid Stream instance must be passed in")}this.stream=stream;this.enabled=options&&options.enabled;if(typeof this.enabled==="undefined"){this.enabled=stream.isTTY}this.enabled=!!this.enabled;this.buffering=!!(options&&options.buffering);this._buffer=[];this.fg=this.foreground=new Colorer(this,0);this.bg=this.background=new Colorer(this,10);this.Bold=false;this.Italic=false;this.Underline=false;this.Inverse=false;this.newlines=0;emitNewlineEvents(stream);stream.on("newline",function(){this.newlines++}.bind(this))}exports.Cursor=Cursor;Cursor.prototype.write=function(data){if(this.buffering){this._buffer.push(arguments)}else{this.stream.write.apply(this.stream,arguments)}return this};Cursor.prototype.buffer=function(){this.buffering=true;return this};Cursor.prototype.flush=function(){this.buffering=false;var str=this._buffer.map(function(args){if(args.length!=1)throw new Error("unexpected args length! "+args.length);return args[0]}).join("");this._buffer.splice(0);this.write(str);return this};function Colorer(cursor,base){this.current=null;this.cursor=cursor;this.base=base}exports.Colorer=Colorer;Colorer.prototype._setColorCode=function setColorCode(code){var c=String(code);if(this.current===c)return;this.cursor.enabled&&this.cursor.write(prefix+c+suffix);this.current=c;return this};Object.keys(codes).forEach(function(name){var code=String(codes[name]);Cursor.prototype[name]=function(){var c=code;if(arguments.length>0){c=toArray(arguments).map(Math.round).join(";")+code}this.enabled&&this.write(prefix+c);return this}});Object.keys(styles).forEach(function(style){var name=style[0].toUpperCase()+style.substring(1),c=styles[style],r=reset[style];Cursor.prototype[style]=function(){if(this[name])return;this.enabled&&this.write(prefix+c+suffix);this[name]=true;return this};Cursor.prototype["reset"+name]=function(){if(!this[name])return;this.enabled&&this.write(prefix+r+suffix);this[name]=false;return this}});Object.keys(colors).forEach(function(color){var code=colors[color];Colorer.prototype[color]=function(){this._setColorCode(this.base+code);return this.cursor};Cursor.prototype[color]=function(){return this.foreground[color]()}});Cursor.prototype.beep=function(){this.enabled&&this.write("");return this};Cursor.prototype.goto=function(x,y){x=x|0;y=y|0;this.enabled&&this.write(prefix+y+";"+x+"H");return this};Colorer.prototype.reset=function(){this._setColorCode(this.base+39);return this.cursor};Cursor.prototype.reset=function(){this.enabled&&this.write(prefix+"0"+suffix);this.Bold=false;this.Italic=false;this.Underline=false;this.Inverse=false;this.foreground.current=null;this.background.current=null;return this};Colorer.prototype.rgb=function(r,g,b){var base=this.base+38,code=rgb(r,g,b);this._setColorCode(base+";5;"+code);return this.cursor};Cursor.prototype.rgb=function(r,g,b){return this.foreground.rgb(r,g,b)};Colorer.prototype.hex=function(color){return this.rgb.apply(this,hex(color))};Cursor.prototype.hex=function(color){return this.foreground.hex(color)};function rgb(r,g,b){var red=r/255*5,green=g/255*5,blue=b/255*5;return rgb5(red,green,blue)}function rgb5(r,g,b){var red=Math.round(r),green=Math.round(g),blue=Math.round(b);return 16+red*36+green*6+blue}function hex(color){var c=color[0]==="#"?color.substring(1):color,r=c.substring(0,2),g=c.substring(2,4),b=c.substring(4,6);return[parseInt(r,16),parseInt(g,16),parseInt(b,16)]}function toArray(a){var i=0,l=a.length,rtn=[];for(;i<l;i++){rtn.push(a[i])}return rtn}},{"./newlines":46}],46:[function(require,module,exports){var assert=require("assert");var NEWLINE="\n".charCodeAt(0);function emitNewlineEvents(stream){if(stream._emittingNewlines){return}var write=stream.write;stream.write=function(data){var rtn=write.apply(stream,arguments);if(stream.listeners("newline").length>0){var len=data.length,i=0;if(typeof data=="string"){for(;i<len;i++){processByte(stream,data.charCodeAt(i))}}else{for(;i<len;i++){processByte(stream,data[i])}}}return rtn};stream._emittingNewlines=true}module.exports=emitNewlineEvents;function processByte(stream,b){assert.equal(typeof b,"number");if(b===NEWLINE){stream.emit("newline")}}},{assert:2}],47:[function(require,module,exports){"use strict";var stream=require("readable-stream");var EventEmitter=require("events").EventEmitter;var util=require("util");var delegate=require("delegates");var TrackerGroup=exports.TrackerGroup=function(name){EventEmitter.call(this);this.name=name;this.trackGroup=[];var self=this;this.totalWeight=0;var noteChange=this.noteChange=function(name){self.emit("change",name||this.name)}.bind(this);this.trackGroup.forEach(function(unit){unit.on("change",noteChange)})};util.inherits(TrackerGroup,EventEmitter);TrackerGroup.prototype.completed=function(){if(this.trackGroup.length==0)return 0;var valPerWeight=1/this.totalWeight;var completed=0;this.trackGroup.forEach(function(T){completed+=valPerWeight*T.weight*T.completed()});return completed};TrackerGroup.prototype.addUnit=function(unit,weight,noChange){unit.weight=weight||1;this.totalWeight+=unit.weight;this.trackGroup.push(unit);unit.on("change",this.noteChange);if(!noChange)this.emit("change",this.name);return unit};TrackerGroup.prototype.newGroup=function(name,weight){return this.addUnit(new TrackerGroup(name),weight)};TrackerGroup.prototype.newItem=function(name,todo,weight){return this.addUnit(new Tracker(name,todo),weight)};TrackerGroup.prototype.newStream=function(name,todo,weight){return this.addUnit(new TrackerStream(name,todo),weight)};TrackerGroup.prototype.finish=function(){if(!this.trackGroup.length){this.addUnit(new Tracker,1,true)}var self=this;this.trackGroup.forEach(function(T){T.removeListener("change",self.noteChange);T.finish()});this.emit("change",this.name)};var buffer=" ";TrackerGroup.prototype.debug=function(depth){depth=depth||0;var indent=depth?buffer.substr(0,depth):"";var output=indent+(this.name||"top")+": "+this.completed()+"\n";this.trackGroup.forEach(function(T){if(T instanceof TrackerGroup){output+=T.debug(depth+1)}else{output+=indent+" "+T.name+": "+T.completed()+"\n"}});return output};var Tracker=exports.Tracker=function(name,todo){EventEmitter.call(this);this.name=name;this.workDone=0;this.workTodo=todo||0};util.inherits(Tracker,EventEmitter);Tracker.prototype.completed=function(){return this.workTodo==0?0:this.workDone/this.workTodo};Tracker.prototype.addWork=function(work){this.workTodo+=work;this.emit("change",this.name)};Tracker.prototype.completeWork=function(work){this.workDone+=work;if(this.workDone>this.workTodo)this.workDone=this.workTodo;this.emit("change",this.name)};Tracker.prototype.finish=function(){this.workTodo=this.workDone=1;this.emit("change",this.name)};var TrackerStream=exports.TrackerStream=function(name,size,options){stream.Transform.call(this,options);this.tracker=new Tracker(name,size);this.name=name;var self=this;this.tracker.on("change",function(name){self.emit("change",name)})};util.inherits(TrackerStream,stream.Transform);TrackerStream.prototype._transform=function(data,encoding,cb){this.tracker.completeWork(data.length?data.length:1);this.push(data);cb()};TrackerStream.prototype._flush=function(cb){this.tracker.finish();cb()};delegate(TrackerStream.prototype,"tracker").method("completed").method("addWork")},{delegates:48,events:8,"readable-stream":58,util:35}],48:[function(require,module,exports){module.exports=Delegator;function Delegator(proto,target){if(!(this instanceof Delegator))return new Delegator(proto,target);this.proto=proto;this.target=target;this.methods=[];this.getters=[];this.setters=[];this.fluents=[]}Delegator.prototype.method=function(name){var proto=this.proto;var target=this.target;this.methods.push(name);proto[name]=function(){return this[target][name].apply(this[target],arguments)};return this};Delegator.prototype.access=function(name){return this.getter(name).setter(name)};Delegator.prototype.getter=function(name){var proto=this.proto;var target=this.target;this.getters.push(name);proto.__defineGetter__(name,function(){return this[target][name]});return this};Delegator.prototype.setter=function(name){var proto=this.proto;var target=this.target;this.setters.push(name);proto.__defineSetter__(name,function(val){return this[target][name]=val});return this};Delegator.prototype.fluent=function(name){var proto=this.proto;var target=this.target;this.fluents.push(name);proto[name]=function(val){if("undefined"!=typeof val){this[target][name]=val;return this}else{return this[target][name]}};return this}},{}],49:[function(require,module,exports){(function(process){module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};var util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable");var Writable=require("./_stream_writable");util.inherits(Duplex,Readable);forEach(objectKeys(Writable.prototype),function(method){if(!Duplex.prototype[method])Duplex.prototype[method]=Writable.prototype[method]});function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);Readable.call(this,options);Writable.call(this,options);if(options&&options.readable===false)this.readable=false;if(options&&options.writable===false)this.writable=false;this.allowHalfOpen=true;if(options&&options.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",onend)}function onend(){if(this.allowHalfOpen||this._writableState.ended)return;process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++){f(xs[i],i)}}}).call(this,require("_process"))},{"./_stream_readable":51,"./_stream_writable":53,_process:14,"core-util-is":54,inherits:55}],50:[function(require,module,exports){arguments[4][21][0].apply(exports,arguments)},{"./_stream_transform":52,"core-util-is":54,dup:21,inherits:55}],51:[function(require,module,exports){(function(process){module.exports=Readable;var isArray=require("isarray");var Buffer=require("buffer").Buffer;Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter;if(!EE.listenerCount)EE.listenerCount=function(emitter,type){return emitter.listeners(type).length};var Stream=require("stream");var util=require("core-util-is");util.inherits=require("inherits");var StringDecoder;var debug=require("util");if(debug&&debug.debuglog){debug=debug.debuglog("stream")}else{debug=function(){}}util.inherits(Readable,Stream);function ReadableState(options,stream){var Duplex=require("./_stream_duplex");options=options||{};var hwm=options.highWaterMark;var defaultHwm=options.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.buffer=[];this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.readableObjectMode;this.defaultEncoding=options.defaultEncoding||"utf8";this.ranOut=false;this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(options.encoding){if(!StringDecoder)StringDecoder=require("string_decoder/").StringDecoder;this.decoder=new StringDecoder(options.encoding);this.encoding=options.encoding}}function Readable(options){var Duplex=require("./_stream_duplex");if(!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this);this.readable=true;Stream.call(this)}Readable.prototype.push=function(chunk,encoding){var state=this._readableState;if(util.isString(chunk)&&!state.objectMode){
encoding=encoding||state.defaultEncoding;if(encoding!==state.encoding){chunk=new Buffer(chunk,encoding);encoding=""}}return readableAddChunk(this,state,chunk,encoding,false)};Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",true)};function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er){stream.emit("error",er)}else if(util.isNullOrUndefined(chunk)){state.reading=false;if(!state.ended)onEofChunk(stream,state)}else if(state.objectMode||chunk&&chunk.length>0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.setEncoding=function(enc){if(!StringDecoder)StringDecoder=require("string_decoder/").StringDecoder;this._readableState.decoder=new StringDecoder(enc);this._readableState.encoding=enc;return this};var MAX_HWM=8388608;function roundUpToNextPowerOf2(n){if(n>=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(isNaN(n)||util.isNull(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else return state.length}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(!util.isNumber(n)||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n<state.highWaterMark){doRead=true;debug("length less than watermark",doRead)}if(state.ended||state.reading){doRead=false;debug("reading or ended",doRead)}if(doRead){debug("do read");state.reading=true;state.sync=true;if(state.length===0)state.needReadable=true;this._read(state.highWaterMark);state.sync=false}if(doRead&&!state.reading)n=howMuchToRead(nOrig,state);var ret;if(n>0)ret=fromList(n,state);else ret=null;if(util.isNull(ret)){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(!util.isNull(ret))this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(function(){maybeReadMore_(stream,state)})}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark){debug("maybeReadMore read 0");stream.read(0);if(len===state.length)break;else len=state.length}state.readingMore=false}Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))};Readable.prototype.pipe=function(dest,pipeOpts){var src=this;var state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1;debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==false)&&dest!==process.stdout&&dest!==process.stderr;var endFn=doEnd?onend:cleanup;if(state.endEmitted)process.nextTick(endFn);else src.once("end",endFn);dest.on("unpipe",onunpipe);function onunpipe(readable){debug("onunpipe");if(readable===src){cleanup()}}function onend(){debug("onend");dest.end()}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);function cleanup(){debug("cleanup");dest.removeListener("close",onclose);dest.removeListener("finish",onfinish);dest.removeListener("drain",ondrain);dest.removeListener("error",onerror);dest.removeListener("unpipe",onunpipe);src.removeListener("end",onend);src.removeListener("end",cleanup);src.removeListener("data",ondata);if(state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain))ondrain()}src.on("data",ondata);function ondata(chunk){debug("ondata");var ret=dest.write(chunk);if(false===ret){debug("false write response, pause",src._readableState.awaitDrain);src._readableState.awaitDrain++;src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);if(EE.listenerCount(dest,"error")===0)dest.emit("error",er)}if(!dest._events||!dest._events.error)dest.on("error",onerror);else if(isArray(dest._events.error))dest._events.error.unshift(onerror);else dest._events.error=[onerror,dest._events.error];function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EE.listenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var i=0;i<len;i++)dests[i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);if(i===-1)return this;state.pipes.splice(i,1);state.pipesCount-=1;if(state.pipesCount===1)state.pipes=state.pipes[0];dest.emit("unpipe",this);return this};Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if(ev==="data"&&false!==this._readableState.flowing){this.resume()}if(ev==="readable"&&this.readable){var state=this._readableState;if(!state.readableListening){state.readableListening=true;state.emittedReadable=false;state.needReadable=true;if(!state.reading){var self=this;process.nextTick(function(){debug("readable nexttick read 0");self.read(0)})}else if(state.length){emitReadable(this,state)}}}return res};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.resume=function(){var state=this._readableState;if(!state.flowing){debug("resume");state.flowing=true;if(!state.reading){debug("resume read 0");this.read(0)}resume(this,state)}return this};function resume(stream,state){if(!state.resumeScheduled){state.resumeScheduled=true;process.nextTick(function(){resume_(stream,state)})}}function resume_(stream,state){state.resumeScheduled=false;stream.emit("resume");flow(stream);if(state.flowing&&!state.reading)stream.read(0)}Readable.prototype.pause=function(){debug("call pause flowing=%j",this._readableState.flowing);if(false!==this._readableState.flowing){debug("pause");this._readableState.flowing=false;this.emit("pause")}return this};function flow(stream){var state=stream._readableState;debug("flow",state.flowing);if(state.flowing){do{var chunk=stream.read()}while(null!==chunk&&state.flowing)}}Readable.prototype.wrap=function(stream){var state=this._readableState;var paused=false;var self=this;stream.on("end",function(){debug("wrapped end");if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length)self.push(chunk)}self.push(null)});stream.on("data",function(chunk){debug("wrapped data");if(state.decoder)chunk=state.decoder.write(chunk);if(!chunk||!state.objectMode&&!chunk.length)return;var ret=self.push(chunk);if(!ret){paused=true;stream.pause()}});for(var i in stream){if(util.isFunction(stream[i])&&util.isUndefined(this[i])){this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i)}}var events=["error","close","destroy","pause","resume"];forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))});self._read=function(n){debug("wrapped _read",n);if(paused){paused=false;stream.resume()}};return self};Readable._fromList=fromList;function fromList(n,state){var list=state.buffer;var length=state.length;var stringMode=!!state.decoder;var objectMode=!!state.objectMode;var ret;if(list.length===0)return null;if(length===0)ret=null;else if(objectMode)ret=list.shift();else if(!n||n>=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n<list[0].length){var buf=list[0];ret=buf.slice(0,n);list[0]=buf.slice(n)}else if(n===list[0].length){ret=list.shift()}else{if(stringMode)ret="";else ret=new Buffer(n);var c=0;for(var i=0,l=list.length;i<l&&c<n;i++){var buf=list[0];var cpy=Math.min(n-c,buf.length);if(stringMode)ret+=buf.slice(0,cpy);else buf.copy(ret,c,0,cpy);if(cpy<buf.length)list[0]=buf.slice(cpy);else list.shift();c+=cpy}}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;process.nextTick(function(){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}})}}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++){f(xs[i],i)}}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x)return i}return-1}}).call(this,require("_process"))},{"./_stream_duplex":49,_process:14,buffer:4,"core-util-is":54,events:8,inherits:55,isarray:56,stream:30,"string_decoder/":57,util:3}],52:[function(require,module,exports){arguments[4][23][0].apply(exports,arguments)},{"./_stream_duplex":49,"core-util-is":54,dup:23,inherits:55}],53:[function(require,module,exports){(function(process){module.exports=Writable;var Buffer=require("buffer").Buffer;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var Stream=require("stream");util.inherits(Writable,Stream);function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb}function WritableState(options,stream){var Duplex=require("./_stream_duplex");options=options||{};var hwm=options.highWaterMark;var defaultHwm=options.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.writableObjectMode;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.buffer=[];this.pendingcb=0;this.prefinished=false;this.errorEmitted=false}function Writable(options){var Duplex=require("./_stream_duplex");if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this);this.writable=true;Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))};function writeAfterEnd(stream,state,cb){var er=new Error("write after end");stream.emit("error",er);process.nextTick(function(){cb(er)})}function validChunk(stream,state,chunk,cb){var valid=true;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){var er=new TypeError("Invalid non-string/buffer chunk");stream.emit("error",er);process.nextTick(function(){cb(er)});valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;if(util.isFunction(encoding)){cb=encoding;encoding=null}if(util.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(!util.isFunction(cb))cb=function(){};if(state.ended)writeAfterEnd(this,state,cb);else if(validChunk(this,state,chunk,cb)){state.pendingcb++;ret=writeOrBuffer(this,state,chunk,encoding,cb)}return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){state.corked--;if(!state.writing&&!state.corked&&!state.finished&&!state.bufferProcessing&&state.buffer.length)clearBuffer(this,state)}};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&util.isString(chunk)){chunk=new Buffer(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(util.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(!ret)state.needDrain=true;if(state.writing||state.corked)state.buffer.push(new WriteReq(chunk,encoding,cb));else doWrite(stream,state,false,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len;state.writecb=cb;state.writing=true;state.sync=true;if(writev)stream._writev(chunk,state.onwrite);else stream._write(chunk,encoding,state.onwrite);state.sync=false}function onwriteError(stream,state,sync,er,cb){if(sync)process.nextTick(function(){state.pendingcb--;cb(er)});else{state.pendingcb--;cb(er)}stream._writableState.errorEmitted=true;stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=false;state.writecb=null;state.length-=state.writelen;state.writelen=0}function onwrite(stream,er){var state=stream._writableState;var sync=state.sync;var cb=state.writecb;onwriteStateUpdate(state);if(er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(stream,state);if(!finished&&!state.corked&&!state.bufferProcessing&&state.buffer.length){clearBuffer(stream,state)}if(sync){process.nextTick(function(){afterWrite(stream,state,finished,cb)})}else{afterWrite(stream,state,finished,cb)}}}function afterWrite(stream,state,finished,cb){if(!finished)onwriteDrain(stream,state);state.pendingcb--;cb();finishMaybe(stream,state)}function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit("drain")}}function clearBuffer(stream,state){state.bufferProcessing=true;if(stream._writev&&state.buffer.length>1){var cbs=[];for(var c=0;c<state.buffer.length;c++)cbs.push(state.buffer[c].callback);state.pendingcb++;doWrite(stream,state,true,state.length,state.buffer,"",function(err){for(var i=0;i<cbs.length;i++){state.pendingcb--;cbs[i](err)}});state.buffer=[]}else{for(var c=0;c<state.buffer.length;c++){var entry=state.buffer[c];var chunk=entry.chunk;var encoding=entry.encoding;var cb=entry.callback;var len=state.objectMode?1:chunk.length;doWrite(stream,state,false,len,chunk,encoding,cb);if(state.writing){c++;break}}if(c<state.buffer.length)state.buffer=state.buffer.slice(c);else state.buffer.length=0}state.bufferProcessing=false}Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;if(util.isFunction(chunk)){cb=chunk;chunk=null;encoding=null}else if(util.isFunction(encoding)){cb=encoding;encoding=null}if(!util.isNullOrUndefined(chunk))this.write(chunk,encoding);if(state.corked){state.corked=1;this.uncork()}if(!state.ending&&!state.finished)endWritable(this,state,cb)};function needFinish(stream,state){return state.ending&&state.length===0&&!state.finished&&!state.writing}function prefinish(stream,state){if(!state.prefinished){state.prefinished=true;stream.emit("prefinish")}}function finishMaybe(stream,state){var need=needFinish(stream,state);if(need){if(state.pendingcb===0){prefinish(stream,state);state.finished=true;stream.emit("finish")}else prefinish(stream,state)}return need}function endWritable(stream,state,cb){state.ending=true;finishMaybe(stream,state);if(cb){if(state.finished)process.nextTick(cb);else stream.once("finish",cb)}state.ended=true}}).call(this,require("_process"))},{"./_stream_duplex":49,_process:14,buffer:4,"core-util-is":54,inherits:55,stream:30}],54:[function(require,module,exports){(function(Buffer){function isArray(arg){if(Array.isArray){return Array.isArray(arg)}return objectToString(arg)==="[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}).call(this,{isBuffer:require("../../../../../../../../../../../../../../../home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../../../../../../../../../../../../home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/is-buffer/index.js":10}],55:[function(require,module,exports){arguments[4][9][0].apply(exports,arguments)},{dup:9}],56:[function(require,module,exports){arguments[4][11][0].apply(exports,arguments)},{dup:11}],57:[function(require,module,exports){arguments[4][31][0].apply(exports,arguments)},{buffer:4,dup:31}],58:[function(require,module,exports){exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=require("stream");exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":49,"./lib/_stream_passthrough.js":50,"./lib/_stream_readable.js":51,"./lib/_stream_transform.js":52,"./lib/_stream_writable.js":53,stream:30}],59:[function(require,module,exports){(function(process){"use strict";var os=require("os");var hasUnicode=module.exports=function(){if(os.type()=="Windows_NT"){return true}var isUTF8=/[.]UTF-8/;if(isUTF8.test(process.env.LC_ALL)||process.env.LC_CTYPE=="UTF-8"||isUTF8.test(process.env.LANG)){return true}return false}}).call(this,require("_process"))},{_process:14,os:12}],60:[function(require,module,exports){(function(global){var baseToString=require("lodash._basetostring"),createPadding=require("lodash._createpadding");var nativeCeil=Math.ceil,nativeFloor=Math.floor,nativeIsFinite=global.isFinite;function pad(string,length,chars){string=baseToString(string);length=+length;var strLength=string.length;if(strLength>=length||!nativeIsFinite(length)){return string}var mid=(length-strLength)/2,leftLength=nativeFloor(mid),rightLength=nativeCeil(mid);chars=createPadding("",rightLength,chars);return chars.slice(0,leftLength)+string+chars}module.exports=pad}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"lodash._basetostring":61,"lodash._createpadding":62}],61:[function(require,module,exports){function baseToString(value){return value==null?"":value+""}module.exports=baseToString},{}],62:[function(require,module,exports){(function(global){var repeat=require("lodash.repeat");var nativeCeil=Math.ceil,nativeIsFinite=global.isFinite;function createPadding(string,length,chars){var strLength=string.length;length=+length;if(strLength>=length||!nativeIsFinite(length)){return""}var padLength=length-strLength;chars=chars==null?" ":chars+"";return repeat(chars,nativeCeil(padLength/chars.length)).slice(0,padLength)}module.exports=createPadding}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"lodash.repeat":63}],63:[function(require,module,exports){(function(global){var baseToString=require("lodash._basetostring");var nativeFloor=Math.floor,nativeIsFinite=global.isFinite;function repeat(string,n){var result="";string=baseToString(string);n=+n;if(n<1||!string||!nativeIsFinite(n)){return result}do{if(n%2){result+=string}n=nativeFloor(n/2);string+=string}while(n);return result}module.exports=repeat}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"lodash._basetostring":61}],64:[function(require,module,exports){var baseToString=require("lodash._basetostring"),createPadding=require("lodash._createpadding");function createPadDir(fromRight){return function(string,length,chars){string=baseToString(string);return(fromRight?string:"")+createPadding(string,length,chars)+(fromRight?"":string)}}var padLeft=createPadDir();module.exports=padLeft},{"lodash._basetostring":65,"lodash._createpadding":66}],65:[function(require,module,exports){arguments[4][61][0].apply(exports,arguments)},{dup:61}],66:[function(require,module,exports){(function(global){var repeat=require("lodash.repeat");var nativeCeil=Math.ceil,nativeIsFinite=global.isFinite;function createPadding(string,length,chars){var strLength=string.length;length=+length;if(strLength>=length||!nativeIsFinite(length)){return""}var padLength=length-strLength;chars=chars==null?" ":chars+"";return repeat(chars,nativeCeil(padLength/chars.length)).slice(0,padLength)}module.exports=createPadding}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"lodash.repeat":67}],67:[function(require,module,exports){(function(global){var baseToString=require("lodash._basetostring");var nativeFloor=Math.floor,nativeIsFinite=global.isFinite;function repeat(string,n){var result="";string=baseToString(string);n=+n;if(n<1||!string||!nativeIsFinite(n)){return result}do{if(n%2){result+=string}n=nativeFloor(n/2);string+=string}while(n);return result}module.exports=repeat}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"lodash._basetostring":65}],68:[function(require,module,exports){var baseToString=require("lodash._basetostring"),createPadding=require("lodash._createpadding");function createPadDir(fromRight){return function(string,length,chars){string=baseToString(string);return(fromRight?string:"")+createPadding(string,length,chars)+(fromRight?"":string)}}var padRight=createPadDir(true);module.exports=padRight},{"lodash._basetostring":69,"lodash._createpadding":70}],69:[function(require,module,exports){arguments[4][61][0].apply(exports,arguments)},{dup:61}],70:[function(require,module,exports){(function(global){var repeat=require("lodash.repeat");var nativeCeil=Math.ceil,nativeIsFinite=global.isFinite;function createPadding(string,length,chars){var strLength=string.length;length=+length;if(strLength>=length||!nativeIsFinite(length)){return""}var padLength=length-strLength;chars=chars==null?" ":chars+"";return repeat(chars,nativeCeil(padLength/chars.length)).slice(0,padLength)}module.exports=createPadding}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"lodash.repeat":71}],71:[function(require,module,exports){(function(global){var baseToString=require("lodash._basetostring");var nativeFloor=Math.floor,nativeIsFinite=global.isFinite;function repeat(string,n){var result="";string=baseToString(string);n=+n;if(n<1||!string||!nativeIsFinite(n)){return result}do{if(n%2){result+=string}n=nativeFloor(n/2);string+=string}while(n);return result}module.exports=repeat}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"lodash._basetostring":69}],72:[function(require,module,exports){(function(process){"use strict";var hasUnicode=require("has-unicode");var ansi=require("ansi");var align={center:require("lodash.pad"),left:require("lodash.padright"),right:require("lodash.padleft")};var defaultStream=process.stderr;function isTTY(){return process.stderr.isTTY}function getWritableTTYColumns(){return process.stdout.columns-1}var ProgressBar=module.exports=function(options,cursor){if(!options)options={};if(!cursor&&options.write){cursor=options;options={}}if(!cursor){cursor=ansi(defaultStream)}this.cursor=cursor;this.showing=false;this.theme=options.theme||(hasUnicode()?ProgressBar.unicode:ProgressBar.ascii);this.template=options.template||[{type:"name",separated:true,length:25},{type:"spinner",separated:true},{type:"startgroup"},{type:"completionbar"},{type:"endgroup"}];this.updatefreq=options.maxUpdateFrequency||50;this.lastName="";this.lastCompleted=0;this.spun=0;this.last=new Date(0);var self=this;this._handleSizeChange=function(){if(!self.showing)return;self.hide();self.show()}};ProgressBar.prototype={};ProgressBar.unicode={startgroup:"╢",endgroup:"╟",complete:"█",incomplete:"░",spinner:"▀▐▄▌",subsection:"→"};ProgressBar.ascii={startgroup:"|",endgroup:"|",complete:"#",incomplete:"-",spinner:"-\\|/",subsection:"->"};ProgressBar.prototype.setTheme=function(theme){this.theme=theme};ProgressBar.prototype.setTemplate=function(template){this.template=template};ProgressBar.prototype._enableResizeEvents=function(){process.stdout.on("resize",this._handleSizeChange)};ProgressBar.prototype._disableResizeEvents=function(){process.stdout.removeListener("resize",this._handleSizeChange)};ProgressBar.prototype.disable=function(){this.hide();this.disabled=true};ProgressBar.prototype.enable=function(){this.disabled=false;this.show()};ProgressBar.prototype.hide=function(){if(!isTTY())return;if(this.disabled)return;this.cursor.show();if(this.showing)this.cursor.up(1);this.cursor.horizontalAbsolute(0).eraseLine();this.showing=false};var repeat=function(str,count){var out="";for(var ii=0;ii<count;++ii)out+=str;return out};ProgressBar.prototype.pulse=function(name){++this.spun;if(!this.showing)return;if(this.disabled)return;var baseName=this.lastName;name=name?baseName?baseName+" "+this.theme.subsection+" "+name:null:baseName;this.show(name);this.lastName=baseName};ProgressBar.prototype.show=function(name,completed){name=this.lastName=name||this.lastName;completed=this.lastCompleted=completed||this.lastCompleted;if(!isTTY())return;if(this.disabled)return;if(!this.spun&&!completed)return;if(this.tryAgain){clearTimeout(this.tryAgain);this.tryAgain=null}var self=this;if(this.showing&&new Date-this.last<this.updatefreq){this.tryAgain=setTimeout(function(){if(self.disabled)return;if(!self.spun&&!completed)return;drawBar()},this.updatefreq-(new Date-this.last));return}return drawBar();function drawBar(){var values={name:name,spinner:self.spun,completed:completed};self.last=new Date;var statusline=self.renderTemplate(self.theme,self.template,values);if(self.showing)self.cursor.up(1);self.cursor.hide().horizontalAbsolute(0).write(statusline.substr(0,getWritableTTYColumns())+"\n").show();self.showing=true}};ProgressBar.prototype.renderTemplate=function(theme,template,values){values.startgroup=theme.startgroup;values.endgroup=theme.endgroup;values.spinner=values.spinner?theme.spinner.substr(values.spinner%theme.spinner.length,1):"";var output={prebar:"",postbar:""};var status="prebar";var self=this;template.forEach(function(T){if(typeof T==="string"){output[status]+=T;return}if(T.type==="completionbar"){status="postbar";return}if(!values.hasOwnProperty(T.type))throw new Error("Unknown template value '"+T.type+"'");var value=self.renderValue(T,values[T.type]);if(value==="")return;var sofar=output[status].length;var lastChar=sofar?output[status][sofar-1]:null;if(T.separated&&sofar&&lastChar!==" "){output[status]+=" "}output[status]+=value;if(T.separated)output[status]+=" "});var bar="";if(status==="postbar"){var nonBarLen=output.prebar.length+output.postbar.length;var barLen=getWritableTTYColumns()-nonBarLen;var sofar=Math.round(barLen*Math.max(0,Math.min(1,values.completed||0)));var rest=barLen-sofar;bar=repeat(theme.complete,sofar)+repeat(theme.incomplete,rest)}return output.prebar+bar+output.postbar};ProgressBar.prototype.renderValue=function(template,value){if(value==null||value==="")return"";var maxLength=template.maxLength||template.length;var minLength=template.minLength||template.length;var alignWith=align[template.align]||align.left;if(maxLength)value=value.substr(0,maxLength);if(minLength)value=alignWith(value,minLength);return value}}).call(this,require("_process"))},{_process:14,ansi:45,"has-unicode":59,"lodash.pad":60,"lodash.padleft":64,"lodash.padright":68}],73:[function(require,module,exports){(function(process){exports=module.exports=SemVer;var debug;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG))debug=function(){var args=Array.prototype.slice.call(arguments,0);args.unshift("SEMVER");console.log.apply(console,args)};else debug=function(){};exports.SEMVER_SPEC_VERSION="2.0.0";var MAX_LENGTH=256;var MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991;var re=exports.re=[];var src=exports.src=[];var R=0;var NUMERICIDENTIFIER=R++;src[NUMERICIDENTIFIER]="0|[1-9]\\d*";var NUMERICIDENTIFIERLOOSE=R++;src[NUMERICIDENTIFIERLOOSE]="[0-9]+";var NONNUMERICIDENTIFIER=R++;src[NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var MAINVERSION=R++;src[MAINVERSION]="("+src[NUMERICIDENTIFIER]+")\\."+"("+src[NUMERICIDENTIFIER]+")\\."+"("+src[NUMERICIDENTIFIER]+")";var MAINVERSIONLOOSE=R++;
src[MAINVERSIONLOOSE]="("+src[NUMERICIDENTIFIERLOOSE]+")\\."+"("+src[NUMERICIDENTIFIERLOOSE]+")\\."+"("+src[NUMERICIDENTIFIERLOOSE]+")";var PRERELEASEIDENTIFIER=R++;src[PRERELEASEIDENTIFIER]="(?:"+src[NUMERICIDENTIFIER]+"|"+src[NONNUMERICIDENTIFIER]+")";var PRERELEASEIDENTIFIERLOOSE=R++;src[PRERELEASEIDENTIFIERLOOSE]="(?:"+src[NUMERICIDENTIFIERLOOSE]+"|"+src[NONNUMERICIDENTIFIER]+")";var PRERELEASE=R++;src[PRERELEASE]="(?:-("+src[PRERELEASEIDENTIFIER]+"(?:\\."+src[PRERELEASEIDENTIFIER]+")*))";var PRERELEASELOOSE=R++;src[PRERELEASELOOSE]="(?:-?("+src[PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+src[PRERELEASEIDENTIFIERLOOSE]+")*))";var BUILDIDENTIFIER=R++;src[BUILDIDENTIFIER]="[0-9A-Za-z-]+";var BUILD=R++;src[BUILD]="(?:\\+("+src[BUILDIDENTIFIER]+"(?:\\."+src[BUILDIDENTIFIER]+")*))";var FULL=R++;var FULLPLAIN="v?"+src[MAINVERSION]+src[PRERELEASE]+"?"+src[BUILD]+"?";src[FULL]="^"+FULLPLAIN+"$";var LOOSEPLAIN="[v=\\s]*"+src[MAINVERSIONLOOSE]+src[PRERELEASELOOSE]+"?"+src[BUILD]+"?";var LOOSE=R++;src[LOOSE]="^"+LOOSEPLAIN+"$";var GTLT=R++;src[GTLT]="((?:<|>)?=?)";var XRANGEIDENTIFIERLOOSE=R++;src[XRANGEIDENTIFIERLOOSE]=src[NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";var XRANGEIDENTIFIER=R++;src[XRANGEIDENTIFIER]=src[NUMERICIDENTIFIER]+"|x|X|\\*";var XRANGEPLAIN=R++;src[XRANGEPLAIN]="[v=\\s]*("+src[XRANGEIDENTIFIER]+")"+"(?:\\.("+src[XRANGEIDENTIFIER]+")"+"(?:\\.("+src[XRANGEIDENTIFIER]+")"+"(?:"+src[PRERELEASE]+")?"+src[BUILD]+"?"+")?)?";var XRANGEPLAINLOOSE=R++;src[XRANGEPLAINLOOSE]="[v=\\s]*("+src[XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+src[XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+src[XRANGEIDENTIFIERLOOSE]+")"+"(?:"+src[PRERELEASELOOSE]+")?"+src[BUILD]+"?"+")?)?";var XRANGE=R++;src[XRANGE]="^"+src[GTLT]+"\\s*"+src[XRANGEPLAIN]+"$";var XRANGELOOSE=R++;src[XRANGELOOSE]="^"+src[GTLT]+"\\s*"+src[XRANGEPLAINLOOSE]+"$";var LONETILDE=R++;src[LONETILDE]="(?:~>?)";var TILDETRIM=R++;src[TILDETRIM]="(\\s*)"+src[LONETILDE]+"\\s+";re[TILDETRIM]=new RegExp(src[TILDETRIM],"g");var tildeTrimReplace="$1~";var TILDE=R++;src[TILDE]="^"+src[LONETILDE]+src[XRANGEPLAIN]+"$";var TILDELOOSE=R++;src[TILDELOOSE]="^"+src[LONETILDE]+src[XRANGEPLAINLOOSE]+"$";var LONECARET=R++;src[LONECARET]="(?:\\^)";var CARETTRIM=R++;src[CARETTRIM]="(\\s*)"+src[LONECARET]+"\\s+";re[CARETTRIM]=new RegExp(src[CARETTRIM],"g");var caretTrimReplace="$1^";var CARET=R++;src[CARET]="^"+src[LONECARET]+src[XRANGEPLAIN]+"$";var CARETLOOSE=R++;src[CARETLOOSE]="^"+src[LONECARET]+src[XRANGEPLAINLOOSE]+"$";var COMPARATORLOOSE=R++;src[COMPARATORLOOSE]="^"+src[GTLT]+"\\s*("+LOOSEPLAIN+")$|^$";var COMPARATOR=R++;src[COMPARATOR]="^"+src[GTLT]+"\\s*("+FULLPLAIN+")$|^$";var COMPARATORTRIM=R++;src[COMPARATORTRIM]="(\\s*)"+src[GTLT]+"\\s*("+LOOSEPLAIN+"|"+src[XRANGEPLAIN]+")";re[COMPARATORTRIM]=new RegExp(src[COMPARATORTRIM],"g");var comparatorTrimReplace="$1$2$3";var HYPHENRANGE=R++;src[HYPHENRANGE]="^\\s*("+src[XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+src[XRANGEPLAIN]+")"+"\\s*$";var HYPHENRANGELOOSE=R++;src[HYPHENRANGELOOSE]="^\\s*("+src[XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+src[XRANGEPLAINLOOSE]+")"+"\\s*$";var STAR=R++;src[STAR]="(<|>)?=?\\s*\\*";for(var i=0;i<R;i++){debug(i,src[i]);if(!re[i])re[i]=new RegExp(src[i])}exports.parse=parse;function parse(version,loose){if(version instanceof SemVer)return version;if(typeof version!=="string")return null;if(version.length>MAX_LENGTH)return null;var r=loose?re[LOOSE]:re[FULL];if(!r.test(version))return null;try{return new SemVer(version,loose)}catch(er){return null}}exports.valid=valid;function valid(version,loose){var v=parse(version,loose);return v?v.version:null}exports.clean=clean;function clean(version,loose){var s=parse(version.trim().replace(/^[=v]+/,""),loose);return s?s.version:null}exports.SemVer=SemVer;function SemVer(version,loose){if(version instanceof SemVer){if(version.loose===loose)return version;else version=version.version}else if(typeof version!=="string"){throw new TypeError("Invalid Version: "+version)}if(version.length>MAX_LENGTH)throw new TypeError("version is longer than "+MAX_LENGTH+" characters");if(!(this instanceof SemVer))return new SemVer(version,loose);debug("SemVer",version,loose);this.loose=loose;var m=version.trim().match(loose?re[LOOSE]:re[FULL]);if(!m)throw new TypeError("Invalid Version: "+version);this.raw=version;this.major=+m[1];this.minor=+m[2];this.patch=+m[3];if(this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");if(!m[4])this.prerelease=[];else this.prerelease=m[4].split(".").map(function(id){if(/^[0-9]+$/.test(id)){var num=+id;if(num>=0&&num<MAX_SAFE_INTEGER)return num}return id});this.build=m[5]?m[5].split("."):[];this.format()}SemVer.prototype.format=function(){this.version=this.major+"."+this.minor+"."+this.patch;if(this.prerelease.length)this.version+="-"+this.prerelease.join(".");return this.version};SemVer.prototype.toString=function(){return this.version};SemVer.prototype.compare=function(other){debug("SemVer.compare",this.version,this.loose,other);if(!(other instanceof SemVer))other=new SemVer(other,this.loose);return this.compareMain(other)||this.comparePre(other)};SemVer.prototype.compareMain=function(other){if(!(other instanceof SemVer))other=new SemVer(other,this.loose);return compareIdentifiers(this.major,other.major)||compareIdentifiers(this.minor,other.minor)||compareIdentifiers(this.patch,other.patch)};SemVer.prototype.comparePre=function(other){if(!(other instanceof SemVer))other=new SemVer(other,this.loose);if(this.prerelease.length&&!other.prerelease.length)return-1;else if(!this.prerelease.length&&other.prerelease.length)return 1;else if(!this.prerelease.length&&!other.prerelease.length)return 0;var i=0;do{var a=this.prerelease[i];var b=other.prerelease[i];debug("prerelease compare",i,a,b);if(a===undefined&&b===undefined)return 0;else if(b===undefined)return 1;else if(a===undefined)return-1;else if(a===b)continue;else return compareIdentifiers(a,b)}while(++i)};SemVer.prototype.inc=function(release,identifier){switch(release){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",identifier);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",identifier);break;case"prepatch":this.prerelease.length=0;this.inc("patch",identifier);this.inc("pre",identifier);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",identifier);this.inc("pre",identifier);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{var i=this.prerelease.length;while(--i>=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1)this.prerelease.push(0)}if(identifier){if(this.prerelease[0]===identifier){if(isNaN(this.prerelease[1]))this.prerelease=[identifier,0]}else this.prerelease=[identifier,0]}break;default:throw new Error("invalid increment argument: "+release)}this.format();this.raw=this.version;return this};exports.inc=inc;function inc(version,release,loose,identifier){if(typeof loose==="string"){identifier=loose;loose=undefined}try{return new SemVer(version,loose).inc(release,identifier).version}catch(er){return null}}exports.diff=diff;function diff(version1,version2){if(eq(version1,version2)){return null}else{var v1=parse(version1);var v2=parse(version2);if(v1.prerelease.length||v2.prerelease.length){for(var key in v1){if(key==="major"||key==="minor"||key==="patch"){if(v1[key]!==v2[key]){return"pre"+key}}}return"prerelease"}for(var key in v1){if(key==="major"||key==="minor"||key==="patch"){if(v1[key]!==v2[key]){return key}}}}}exports.compareIdentifiers=compareIdentifiers;var numeric=/^[0-9]+$/;function compareIdentifiers(a,b){var anum=numeric.test(a);var bnum=numeric.test(b);if(anum&&bnum){a=+a;b=+b}return anum&&!bnum?-1:bnum&&!anum?1:a<b?-1:a>b?1:0}exports.rcompareIdentifiers=rcompareIdentifiers;function rcompareIdentifiers(a,b){return compareIdentifiers(b,a)}exports.major=major;function major(a,loose){return new SemVer(a,loose).major}exports.minor=minor;function minor(a,loose){return new SemVer(a,loose).minor}exports.patch=patch;function patch(a,loose){return new SemVer(a,loose).patch}exports.compare=compare;function compare(a,b,loose){return new SemVer(a,loose).compare(b)}exports.compareLoose=compareLoose;function compareLoose(a,b){return compare(a,b,true)}exports.rcompare=rcompare;function rcompare(a,b,loose){return compare(b,a,loose)}exports.sort=sort;function sort(list,loose){return list.sort(function(a,b){return exports.compare(a,b,loose)})}exports.rsort=rsort;function rsort(list,loose){return list.sort(function(a,b){return exports.rcompare(a,b,loose)})}exports.gt=gt;function gt(a,b,loose){return compare(a,b,loose)>0}exports.lt=lt;function lt(a,b,loose){return compare(a,b,loose)<0}exports.eq=eq;function eq(a,b,loose){return compare(a,b,loose)===0}exports.neq=neq;function neq(a,b,loose){return compare(a,b,loose)!==0}exports.gte=gte;function gte(a,b,loose){return compare(a,b,loose)>=0}exports.lte=lte;function lte(a,b,loose){return compare(a,b,loose)<=0}exports.cmp=cmp;function cmp(a,op,b,loose){var ret;switch(op){case"===":if(typeof a==="object")a=a.version;if(typeof b==="object")b=b.version;ret=a===b;break;case"!==":if(typeof a==="object")a=a.version;if(typeof b==="object")b=b.version;ret=a!==b;break;case"":case"=":case"==":ret=eq(a,b,loose);break;case"!=":ret=neq(a,b,loose);break;case">":ret=gt(a,b,loose);break;case">=":ret=gte(a,b,loose);break;case"<":ret=lt(a,b,loose);break;case"<=":ret=lte(a,b,loose);break;default:throw new TypeError("Invalid operator: "+op)}return ret}exports.Comparator=Comparator;function Comparator(comp,loose){if(comp instanceof Comparator){if(comp.loose===loose)return comp;else comp=comp.value}if(!(this instanceof Comparator))return new Comparator(comp,loose);debug("comparator",comp,loose);this.loose=loose;this.parse(comp);if(this.semver===ANY)this.value="";else this.value=this.operator+this.semver.version;debug("comp",this)}var ANY={};Comparator.prototype.parse=function(comp){var r=this.loose?re[COMPARATORLOOSE]:re[COMPARATOR];var m=comp.match(r);if(!m)throw new TypeError("Invalid comparator: "+comp);this.operator=m[1];if(this.operator==="=")this.operator="";if(!m[2])this.semver=ANY;else this.semver=new SemVer(m[2],this.loose)};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(version){debug("Comparator.test",version,this.loose);if(this.semver===ANY)return true;if(typeof version==="string")version=new SemVer(version,this.loose);return cmp(version,this.operator,this.semver,this.loose)};exports.Range=Range;function Range(range,loose){if(range instanceof Range&&range.loose===loose)return range;if(!(this instanceof Range))return new Range(range,loose);this.loose=loose;this.raw=range;this.set=range.split(/\s*\|\|\s*/).map(function(range){return this.parseRange(range.trim())},this).filter(function(c){return c.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+range)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(comps){return comps.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(range){var loose=this.loose;range=range.trim();debug("range",range,loose);var hr=loose?re[HYPHENRANGELOOSE]:re[HYPHENRANGE];range=range.replace(hr,hyphenReplace);debug("hyphen replace",range);range=range.replace(re[COMPARATORTRIM],comparatorTrimReplace);debug("comparator trim",range,re[COMPARATORTRIM]);range=range.replace(re[TILDETRIM],tildeTrimReplace);range=range.replace(re[CARETTRIM],caretTrimReplace);range=range.split(/\s+/).join(" ");var compRe=loose?re[COMPARATORLOOSE]:re[COMPARATOR];var set=range.split(" ").map(function(comp){return parseComparator(comp,loose)}).join(" ").split(/\s+/);if(this.loose){set=set.filter(function(comp){return!!comp.match(compRe)})}set=set.map(function(comp){return new Comparator(comp,loose)});return set};exports.toComparators=toComparators;function toComparators(range,loose){return new Range(range,loose).set.map(function(comp){return comp.map(function(c){return c.value}).join(" ").trim().split(" ")})}function parseComparator(comp,loose){debug("comp",comp);comp=replaceCarets(comp,loose);debug("caret",comp);comp=replaceTildes(comp,loose);debug("tildes",comp);comp=replaceXRanges(comp,loose);debug("xrange",comp);comp=replaceStars(comp,loose);debug("stars",comp);return comp}function isX(id){return!id||id.toLowerCase()==="x"||id==="*"}function replaceTildes(comp,loose){return comp.trim().split(/\s+/).map(function(comp){return replaceTilde(comp,loose)}).join(" ")}function replaceTilde(comp,loose){var r=loose?re[TILDELOOSE]:re[TILDE];return comp.replace(r,function(_,M,m,p,pr){debug("tilde",comp,_,M,m,p,pr);var ret;if(isX(M))ret="";else if(isX(m))ret=">="+M+".0.0 <"+(+M+1)+".0.0";else if(isX(p))ret=">="+M+"."+m+".0 <"+M+"."+(+m+1)+".0";else if(pr){debug("replaceTilde pr",pr);if(pr.charAt(0)!=="-")pr="-"+pr;ret=">="+M+"."+m+"."+p+pr+" <"+M+"."+(+m+1)+".0"}else ret=">="+M+"."+m+"."+p+" <"+M+"."+(+m+1)+".0";debug("tilde return",ret);return ret})}function replaceCarets(comp,loose){return comp.trim().split(/\s+/).map(function(comp){return replaceCaret(comp,loose)}).join(" ")}function replaceCaret(comp,loose){debug("caret",comp,loose);var r=loose?re[CARETLOOSE]:re[CARET];return comp.replace(r,function(_,M,m,p,pr){debug("caret",comp,_,M,m,p,pr);var ret;if(isX(M))ret="";else if(isX(m))ret=">="+M+".0.0 <"+(+M+1)+".0.0";else if(isX(p)){if(M==="0")ret=">="+M+"."+m+".0 <"+M+"."+(+m+1)+".0";else ret=">="+M+"."+m+".0 <"+(+M+1)+".0.0"}else if(pr){debug("replaceCaret pr",pr);if(pr.charAt(0)!=="-")pr="-"+pr;if(M==="0"){if(m==="0")ret=">="+M+"."+m+"."+p+pr+" <"+M+"."+m+"."+(+p+1);else ret=">="+M+"."+m+"."+p+pr+" <"+M+"."+(+m+1)+".0"}else ret=">="+M+"."+m+"."+p+pr+" <"+(+M+1)+".0.0"}else{debug("no pr");if(M==="0"){if(m==="0")ret=">="+M+"."+m+"."+p+" <"+M+"."+m+"."+(+p+1);else ret=">="+M+"."+m+"."+p+" <"+M+"."+(+m+1)+".0"}else ret=">="+M+"."+m+"."+p+" <"+(+M+1)+".0.0"}debug("caret return",ret);return ret})}function replaceXRanges(comp,loose){debug("replaceXRanges",comp,loose);return comp.split(/\s+/).map(function(comp){return replaceXRange(comp,loose)}).join(" ")}function replaceXRange(comp,loose){comp=comp.trim();var r=loose?re[XRANGELOOSE]:re[XRANGE];return comp.replace(r,function(ret,gtlt,M,m,p,pr){debug("xRange",comp,ret,gtlt,M,m,p,pr);var xM=isX(M);var xm=xM||isX(m);var xp=xm||isX(p);var anyX=xp;if(gtlt==="="&&anyX)gtlt="";if(xM){if(gtlt===">"||gtlt==="<"){ret="<0.0.0"}else{ret="*"}}else if(gtlt&&anyX){if(xm)m=0;if(xp)p=0;if(gtlt===">"){gtlt=">=";if(xm){M=+M+1;m=0;p=0}else if(xp){m=+m+1;p=0}}else if(gtlt==="<="){gtlt="<";if(xm)M=+M+1;else m=+m+1}ret=gtlt+M+"."+m+"."+p}else if(xm){ret=">="+M+".0.0 <"+(+M+1)+".0.0"}else if(xp){ret=">="+M+"."+m+".0 <"+M+"."+(+m+1)+".0"}debug("xRange return",ret);return ret})}function replaceStars(comp,loose){debug("replaceStars",comp,loose);return comp.trim().replace(re[STAR],"")}function hyphenReplace($0,from,fM,fm,fp,fpr,fb,to,tM,tm,tp,tpr,tb){if(isX(fM))from="";else if(isX(fm))from=">="+fM+".0.0";else if(isX(fp))from=">="+fM+"."+fm+".0";else from=">="+from;if(isX(tM))to="";else if(isX(tm))to="<"+(+tM+1)+".0.0";else if(isX(tp))to="<"+tM+"."+(+tm+1)+".0";else if(tpr)to="<="+tM+"."+tm+"."+tp+"-"+tpr;else to="<="+to;return(from+" "+to).trim()}Range.prototype.test=function(version){if(!version)return false;if(typeof version==="string")version=new SemVer(version,this.loose);for(var i=0;i<this.set.length;i++){if(testSet(this.set[i],version))return true}return false};function testSet(set,version){for(var i=0;i<set.length;i++){if(!set[i].test(version))return false}if(version.prerelease.length){for(var i=0;i<set.length;i++){debug(set[i].semver);if(set[i].semver===ANY)continue;if(set[i].semver.prerelease.length>0){var allowed=set[i].semver;if(allowed.major===version.major&&allowed.minor===version.minor&&allowed.patch===version.patch)return true}}return false}return true}exports.satisfies=satisfies;function satisfies(version,range,loose){try{range=new Range(range,loose)}catch(er){return false}return range.test(version)}exports.maxSatisfying=maxSatisfying;function maxSatisfying(versions,range,loose){return versions.filter(function(version){return satisfies(version,range,loose)}).sort(function(a,b){return rcompare(a,b,loose)})[0]||null}exports.validRange=validRange;function validRange(range,loose){try{return new Range(range,loose).range||"*"}catch(er){return null}}exports.ltr=ltr;function ltr(version,range,loose){return outside(version,range,"<",loose)}exports.gtr=gtr;function gtr(version,range,loose){return outside(version,range,">",loose)}exports.outside=outside;function outside(version,range,hilo,loose){version=new SemVer(version,loose);range=new Range(range,loose);var gtfn,ltefn,ltfn,comp,ecomp;switch(hilo){case">":gtfn=gt;ltefn=lte;ltfn=lt;comp=">";ecomp=">=";break;case"<":gtfn=lt;ltefn=gte;ltfn=gt;comp="<";ecomp="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(version,range,loose)){return false}for(var i=0;i<range.set.length;++i){var comparators=range.set[i];var high=null;var low=null;comparators.forEach(function(comparator){if(comparator.semver===ANY){comparator=new Comparator(">=0.0.0")}high=high||comparator;low=low||comparator;if(gtfn(comparator.semver,high.semver,loose)){high=comparator}else if(ltfn(comparator.semver,low.semver,loose)){low=comparator}});if(high.operator===comp||high.operator===ecomp){return false}if((!low.operator||low.operator===comp)&&ltefn(version,low.semver)){return false}else if(low.operator===ecomp&&ltfn(version,low.semver)){return false}}return true}}).call(this,require("_process"))},{_process:14}],74:[function(require,module,exports){module.exports={_args:[["node-pre-gyp@^0.6.11","/Users/peterbraden/repos/node-opencv"]],_from:"node-pre-gyp@>=0.6.11 <0.7.0",_id:"node-pre-gyp@0.6.17",_inCache:true,_location:"/node-pre-gyp",_npmUser:{email:"dane@mapbox.com",name:"springmeyer"},_npmVersion:"1.4.28",_phantomChildren:{},_requested:{name:"node-pre-gyp",raw:"node-pre-gyp@^0.6.11",rawSpec:"^0.6.11",scope:null,spec:">=0.6.11 <0.7.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.17.tgz",_shasum:"135d7cd0af12eeb9d3e724ac89c61932a120887a",_shrinkwrap:null,_spec:"node-pre-gyp@^0.6.11",_where:"/Users/peterbraden/repos/node-opencv",author:{email:"dane@mapbox.com",name:"Dane Springmeyer"},bin:{"node-pre-gyp":"./bin/node-pre-gyp"},bugs:{url:"https://github.com/mapbox/node-pre-gyp/issues"},bundleDependencies:["mkdirp","nopt","npmlog","rc","request","rimraf","semver","tar","tar-pack"],dependencies:{mkdirp:"~0.5.0",nopt:"~3.0.1",npmlog:"~2.0.0",rc:"~1.1.0",request:"2.x",rimraf:"~2.4.0",semver:"~5.1.0",tar:"~2.2.0","tar-pack":"~3.1.0"},description:"Node.js native addon binary install tool",devDependencies:{"aws-sdk":"*",jshint:"^2.5.10",mocha:"1.x",retire:"0.3.x"},directories:{},dist:{shasum:"135d7cd0af12eeb9d3e724ac89c61932a120887a",tarball:"http://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.17.tgz"},engineStrict:true,engines:{node:">= 0.8.0"},gitHead:"c3d148ccc8be7106740c55f25f68d15c8a260f13",homepage:"https://github.com/mapbox/node-pre-gyp",installable:true,jshintConfig:{globalstrict:true,mocha:true,noarg:true,node:true,undef:true,unused:true},keywords:["addon","binary","bindings","c","c++","module","native"],license:"BSD",main:"./lib/node-pre-gyp.js",maintainers:[{name:"springmeyer",email:"dane@dbsgeo.com"},{name:"bergwerkgis",email:"wb@bergwerk-gis.at"},{name:"mikemorris",email:"michael.patrick.morris@gmail.com"},{name:"kkaefer",email:"kkaefer@gmail.com"},{name:"yhahn",email:"young@developmentseed.org"}],name:"node-pre-gyp",optionalDependencies:{},repository:{type:"git",url:"git://github.com/mapbox/node-pre-gyp.git"},scripts:{prepublish:"retire -n && npm ls && jshint test/build.test.js test/s3_setup.test.js test/versioning.test.js",test:"jshint lib lib/util scripts bin/node-pre-gyp && mocha -R spec --timeout 500000","update-crosswalk":"node scripts/abi_crosswalk.js"},version:"0.6.17"}},{}],opencv:[function(require,module,exports){(function(process,__dirname){var Stream=require("stream").Stream,Buffers=require("buffers"),util=require("util"),path=require("path");var cv=module.exports=require("./bindings");var Matrix=cv.Matrix,VideoCapture=cv.VideoCapture,ImageStream,ImageDataStream,ObjectDetectionStream,VideoStream;Matrix.prototype.detectObject=function(classifier,opts,cb){var face_cascade;opts=opts||{};cv._detectObjectClassifiers=cv._detectObjectClassifiers||{};if(!(face_cascade=cv._detectObjectClassifiers[classifier])){face_cascade=new cv.CascadeClassifier(classifier);cv._detectObjectClassifiers[classifier]=face_cascade}face_cascade.detectMultiScale(this,cb,opts.scale,opts.neighbors,opts.min&&opts.min[0],opts.min&&opts.min[1])};Matrix.prototype.inspect=function(){var size=(this.size()||[]).join("x");return"[ Matrix "+size+" ]"};ImageStream=cv.ImageStream=function(){this.writable=true};util.inherits(ImageStream,Stream);ImageStream.prototype.write=function(buf){var self=this;cv.readImage(buf,function(err,matrix){if(err)return self.emit("error",err);self.emit("data",matrix)})};ImageDataStream=cv.ImageDataStream=function(){this.data=Buffers([]);this.writable=true};util.inherits(ImageDataStream,Stream);ImageDataStream.prototype.write=function(buf){this.data.push(buf);return true};ImageDataStream.prototype.end=function(b){var self=this;if(b)ImageStream.prototype.write.call(this,b);var buf=this.data.toBuffer();cv.readImage(buf,function(err,im){if(err)return self.emit("error",err);self.emit("load",im)})};ObjectDetectionStream=cv.ObjectDetectionStream=function(cascade,opts){this.classifier=new cv.CascadeClassifier(cascade);this.opts=opts||{};this.readable=true;this.writable=true};util.inherits(ObjectDetectionStream,Stream);ObjectDetectionStream.prototype.write=function(m){var self=this;this.classifier.detectMultiScale(m,function(err,objs){if(err)return self.emit("error",err);self.emit("data",objs,m)},this.opts.scale,this.opts.neighbors,this.opts.min&&this.opts.min[0],this.opts.min&&this.opts.min[1])};VideoStream=cv.VideoStream=function(src){if(!(src instanceof VideoCapture))src=new VideoCapture(src);this.video=src;this.readable=true;this.paused=false};util.inherits(VideoStream,Stream);VideoStream.prototype.read=function(){var self=this;var frame=function(){self.video.read(function(err,mat){if(err)return self.emit("error",err);self.emit("data",mat);if(!self.paused)process.nextTick(frame)})};frame()};VideoStream.prototype.pause=function(){this.paused=true};VideoStream.prototype.resume=function(){this.paused=false;this.read()};VideoCapture.prototype.toStream=function(){return new VideoStream(this)};var CASCADES={FACE_CASCADE:"haarcascade_frontalface_alt.xml",EYE_CASCADE:"haarcascade_eye.xml",EYEGLASSES_CASCADE:"haarcascade_eye_tree_eyeglasses.xml",FULLBODY_CASCADE:"haarcascade_fullbody.xml",CAR_SIDE_CASCADE:"hogcascade_cars_sideview.xml"};Object.keys(CASCADES).forEach(function(k){cv[k]=path.resolve(__dirname,"../data",CASCADES[k])})}).call(this,require("_process"),"/lib")},{"./bindings":36,_process:14,buffers:37,path:13,stream:30,util:35}]},{},[]);const ReactWebcam=require("opencv")},0);
{
"name": "requirebin-sketch",
"version": "1.0.0",
"dependencies": {
"opencv": "6.0.0"
}
}
<!-- contents of this file will be placed inside the <body> -->
<!-- contents of this file will be placed inside the <head> -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment