!function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}__webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{enumerable:!0,get:getter})},__webpack_require__.r=function(exports){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.t=function(value,mode){if(1&mode&&(value=__webpack_require__(value)),8&mode)return value;if(4&mode&&"object"==typeof value&&value&&value.__esModule)return value;var ns=Object.create(null);if(__webpack_require__.r(ns),Object.defineProperty(ns,"default",{enumerable:!0,value:value}),2&mode&&"string"!=typeof value)for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key]}.bind(null,key));return ns},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=6)}([function(module,exports,__webpack_require__){"use strict"; /*! * assert.js - assertions for javascript * Copyright (c) 2018, Christopher Jeffrey (MIT License). * https://github.com/chjj/bsert */class AssertionError extends Error{constructor(options){"string"==typeof options&&(options={message:options}),null!==options&&"object"==typeof options||(options={});let message=null,operator="fail",generatedMessage=Boolean(options.generatedMessage);var value;if(null!=options.message&&(message="string"==typeof(value=options.message)?value:isError(value)?tryString(value):stringify(value)),"string"==typeof options.operator&&(operator=options.operator),null==message){if("fail"===operator)message="Assertion failed.";else{message=`${stringify(options.actual)} ${operator} ${stringify(options.expected)}`}generatedMessage=!0}super(message);let start=this.constructor;"function"==typeof options.stackStartFunction?start=options.stackStartFunction:"function"==typeof options.stackStartFn&&(start=options.stackStartFn),this.type="AssertionError",this.name="AssertionError [ERR_ASSERTION]",this.code="ERR_ASSERTION",this.generatedMessage=generatedMessage,this.actual=options.actual,this.expected=options.expected,this.operator=operator,Error.captureStackTrace&&Error.captureStackTrace(this,start)}}function assert(value,message){if(!value){let generatedMessage=!1;if(0===arguments.length)message="No value argument passed to `assert()`.",generatedMessage=!0;else if(null==message)message="Assertion failed.",generatedMessage=!0;else if(isError(message))throw message;throw new AssertionError({message:message,actual:value,expected:!0,operator:"==",generatedMessage:generatedMessage,stackStartFn:assert})}}function equal(actual,expected,message){if(!Object.is(actual,expected)){if(isError(message))throw message;throw new AssertionError({message:message,actual:actual,expected:expected,operator:"strictEqual",stackStartFn:equal})}}function notEqual(actual,expected,message){if(Object.is(actual,expected)){if(isError(message))throw message;throw new AssertionError({message:message,actual:actual,expected:expected,operator:"notStrictEqual",stackStartFn:notEqual})}}function doesNotThrow(func,expected,message){"string"==typeof expected&&(message=expected,expected=void 0);let thrown=!1,err=null;enforce("function"==typeof func,"func","function");try{func()}catch(e){thrown=!0,err=e}if(thrown){if(testError(err,expected,message,doesNotThrow)){let generatedMessage=!1;throw null==message&&(message="Got unwanted exception.",generatedMessage=!0),new AssertionError({message:message,actual:err,expected:expected,operator:"doesNotThrow",generatedMessage:generatedMessage,stackStartFn:doesNotThrow})}throw err}}async function rejects(func,expected,message){"string"==typeof expected&&(message=expected,expected=void 0);let thrown=!1,err=null;"function"!=typeof func&&enforce(isPromise(func),"func","promise");try{isPromise(func)?await func:await func()}catch(e){thrown=!0,err=e}if(!thrown){let generatedMessage=!1;throw null==message&&(message="Missing expected rejection.",generatedMessage=!0),new AssertionError({message:message,actual:void 0,expected:expected,operator:"rejects",generatedMessage:generatedMessage,stackStartFn:rejects})}if(!testError(err,expected,message,rejects))throw err}async function doesNotReject(func,expected,message){"string"==typeof expected&&(message=expected,expected=void 0);let thrown=!1,err=null;"function"!=typeof func&&enforce(isPromise(func),"func","promise");try{isPromise(func)?await func:await func()}catch(e){thrown=!0,err=e}if(thrown){if(testError(err,expected,message,doesNotReject)){let generatedMessage=!1;throw null==message&&(message="Got unwanted rejection.",generatedMessage=!0),new AssertionError({message:message,actual:void 0,expected:expected,operator:"doesNotReject",generatedMessage:generatedMessage,stackStartFn:doesNotReject})}throw err}}function deepEqual(actual,expected,message){if(!isDeepEqual(actual,expected,!1)){if(isError(message))throw message;throw new AssertionError({message:message,actual:actual,expected:expected,operator:"deepStrictEqual",stackStartFn:deepEqual})}}function notDeepEqual(actual,expected,message){if(isDeepEqual(actual,expected,!0)){if(isError(message))throw message;throw new AssertionError({message:message,actual:actual,expected:expected,operator:"notDeepStrictEqual",stackStartFn:notDeepEqual})}}function enforce(value,name,type){if(!value){let msg;msg=null==name?"Invalid type for parameter.":null==type?`Invalid type for "${name}".`:`"${name}" must be a(n) ${type}.`;const err=new TypeError(msg);throw Error.captureStackTrace&&Error.captureStackTrace(err,enforce),err}}function stringify(value){switch(typeof value){case"undefined":return"undefined";case"object":return null===value?"null":`[${function(obj){const type=function(obj){return objectString(obj).slice(8,-1)}(obj);if(null==obj)return type;if("Object"!==type&&"Error"!==type)return type;let ctor,name;try{ctor=obj.constructor}catch(e){}if(null==ctor)return type;try{name=ctor.name}catch(e){return type}return"string"!=typeof name||0===name.length?type:name}(value)}]`;case"boolean":case"number":return`${value}`;case"string":return value.length>80&&(value=`${value.substring(0,77)}...`),JSON.stringify(value);case"symbol":return tryString(value);case"function":return`[${function(func){let name;try{name=func.name}catch(e){}return"string"!=typeof name||0===name.length?"Function":`Function: ${name}`}(value)}]`;case"bigint":return`${value}n`;default:return`[${typeof value}]`}}function tryString(value){try{return String(value)}catch(e){return"Object"}}function testError(err,expected,message,func){if(null==expected)return!0;if(isRegExp(expected))return expected.test(err);if("function"!=typeof expected){if(func===doesNotThrow||func===doesNotReject)throw new TypeError('"expected" must not be an object.');if("object"!=typeof expected)throw new TypeError('"expected" must be an object.');let generatedMessage=!1;if(null==message){message=`Missing expected ${func===rejects?"rejection":"exception"}.`,generatedMessage=!0}if(null==err||"object"!=typeof err)throw new AssertionError({actual:err,expected:expected,message:message,operator:func.name,generatedMessage:generatedMessage,stackStartFn:func});const keys=Object.keys(expected);if(isError(expected)&&keys.push("name","message"),0===keys.length)throw new TypeError('"expected" may not be an empty object.');for(const key of keys){const expect=expected[key],value=err[key];if(("string"!=typeof value||!isRegExp(expect)||!expect.test(value))&&!(key in err&&isDeepEqual(value,expect,!1)))throw new AssertionError({actual:err,expected:expected,message:message,operator:func.name,generatedMessage:generatedMessage,stackStartFn:func})}return!0}return void 0!==expected.prototype&&err instanceof expected||!Error.isPrototypeOf(expected)&&!0===expected.call({},err)}function isDeepEqual(x,y,fail){try{return compare(x,y,null)}catch(e){return fail}}function compare(a,b,cache){if(Object.is(a,b))return!0;if(!isObject(a)||!isObject(b))return!1;if(objectString(a)!==objectString(b))return!1;if(Object.getPrototypeOf(a)!==Object.getPrototypeOf(b))return!1;if(isBuffer(a)&&isBuffer(b))return a.equals(b);if(a instanceof Date)return Object.is(a.getTime(),b.getTime());if(isRegExp(a))return a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.lastIndex===b.lastIndex&&a.ignoreCase===b.ignoreCase;if(isError(a)&&a.message!==b.message)return!1;if(function(obj){return obj instanceof ArrayBuffer}(a)&&(a=new Uint8Array(a),b=new Uint8Array(b)),function(obj){return ArrayBuffer.isView(obj)}(a)&&!isBuffer(a)){if(isBuffer(b))return!1;const x=new Uint8Array(a.buffer),y=new Uint8Array(b.buffer);if(x.length!==y.length)return!1;for(let i=0;i>>1?null:raw}return expected}assert.AssertionError=AssertionError,assert.assert=assert,assert.strict=assert,assert.ok=assert,assert.equal=equal,assert.notEqual=notEqual,assert.strictEqual=equal,assert.notStrictEqual=notEqual,assert.fail=function fail(message){let generatedMessage=!1;if(isError(message))throw message;throw null==message&&(message="Assertion failed.",generatedMessage=!0),new AssertionError({message:message,actual:!1,expected:!0,operator:"fail",generatedMessage:generatedMessage,stackStartFn:fail})},assert.throws=function throws(func,expected,message){"string"==typeof expected&&(message=expected,expected=void 0);let thrown=!1,err=null;enforce("function"==typeof func,"func","function");try{func()}catch(e){thrown=!0,err=e}if(!thrown){let generatedMessage=!1;throw null==message&&(message="Missing expected exception.",generatedMessage=!0),new AssertionError({message:message,actual:void 0,expected:expected,operator:"throws",generatedMessage:generatedMessage,stackStartFn:throws})}if(!testError(err,expected,message,throws))throw err},assert.doesNotThrow=doesNotThrow,assert.rejects=rejects,assert.doesNotReject=doesNotReject,assert.ifError=function ifError(err){if(null!=err){let message="ifError got unwanted exception: ";throw"object"==typeof err&&"string"==typeof err.message?0===err.message.length&&err.constructor?message+=err.constructor.name:message+=err.message:message+=stringify(err),new AssertionError({message:message,actual:err,expected:null,operator:"ifError",generatedMessage:!0,stackStartFn:ifError})}},assert.deepEqual=deepEqual,assert.notDeepEqual=notDeepEqual,assert.deepStrictEqual=deepEqual,assert.notDeepStrictEqual=notDeepEqual,assert.bufferEqual=function bufferEqual(actual,expected,enc,message){if(isEncoding(enc)||(message=enc,enc=null),null==enc&&(enc="hex"),expected=bufferize(actual,expected,enc),enforce(isBuffer(actual),"actual","buffer"),enforce(isBuffer(expected),"expected","buffer"),actual!==expected&&!actual.equals(expected)){if(isError(message))throw message;throw new AssertionError({message:message,actual:actual.toString(enc),expected:expected.toString(enc),operator:"bufferEqual",stackStartFn:bufferEqual})}},assert.notBufferEqual=function notBufferEqual(actual,expected,enc,message){if(isEncoding(enc)||(message=enc,enc=null),null==enc&&(enc="hex"),expected=bufferize(actual,expected,enc),enforce(isBuffer(actual),"actual","buffer"),enforce(isBuffer(expected),"expected","buffer"),actual===expected||actual.equals(expected)){if(isError(message))throw message;throw new AssertionError({message:message,actual:actual.toString(enc),expected:expected.toString(enc),operator:"notBufferEqual",stackStartFn:notBufferEqual})}},assert.enforce=enforce,assert.range=function range(value,name){if(!value){const err=new RangeError(null!=name?`"${name}" is out of range.`:"Parameter is out of range.");throw Error.captureStackTrace&&Error.captureStackTrace(err,range),err}},module.exports=assert},function(module,exports,__webpack_require__){"use strict";(function(global){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var base64=__webpack_require__(11),ieee754=__webpack_require__(12),isArray=__webpack_require__(13);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case void 0:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),byteOffset=+byteOffset,isNaN(byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var i,indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;jremaining&&(length=remaining):length=remaining;var strLen=string.length;if(strLen%2!=0)throw new TypeError("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;i>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end)switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:128==(192&(secondByte=buf[i+1]))&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return function(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);var res="",i=0;for(;ithis.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if((end>>>=0)<=(start>>>=0))return"";for(encoding||(encoding="utf8");;)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"latin1":case"binary":return latin1Slice(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=!0}}.apply(this,arguments)},Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return this.length>0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),""},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(this===target)return 0;for(var x=(thisEnd>>>=0)-(thisStart>>>=0),y=(end>>>=0)-(start>>>=0),len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;iremaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)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"latin1":case"binary":return latin1Write(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=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;ilen)&&(end=len);for(var out="",i=start;ilength)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){value<0&&(value=65535+value+1);for(var i=0,j=Math.min(buf.length-offset,2);i>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){value<0&&(value=4294967295+value+1);for(var i=0,j=Math.min(buf.length-offset,4);i>>8*(littleEndian?i:3-i)&255}function checkIEEE754(buf,value,offset,ext,max,min){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){return noAssert||checkIEEE754(buf,0,offset,4),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,0,offset,8),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}Buffer.prototype.slice=function(start,end){var newBuf,len=this.length;if((start=~~start)<0?(start+=len)<0&&(start=0):start>len&&(start=len),(end=void 0===end?len:~~end)<0?(end+=len)<0&&(end=0):end>len&&(end=len),end0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){(value=+value,offset|=0,byteLength|=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var mul=1,i=0;for(this[offset]=255&value;++i=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart=0;--i)target[i+targetStart]=this[i+start];else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,end=void 0===end?this.length:end>>>0,val||(val=0),"number"==typeof val)for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function base64ToBytes(str){return base64.toByteArray(function(str){if((str=function(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}(str).replace(INVALID_BASE64_RE,"")).length<2)return"";for(;str.length%4!=0;)str+="=";return str}(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}}).call(this,__webpack_require__(2))},function(module,exports){var g;g=function(){return this}();try{g=g||new Function("return this")()}catch(e){"object"==typeof window&&(g=window)}module.exports=g},function(module,exports,__webpack_require__){"use strict";var ReflectOwnKeys,R="object"==typeof Reflect?Reflect:null,ReflectApply=R&&"function"==typeof R.apply?R.apply:function(target,receiver,args){return Function.prototype.apply.call(target,receiver,args)};ReflectOwnKeys=R&&"function"==typeof R.ownKeys?R.ownKeys:Object.getOwnPropertySymbols?function(target){return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))}:function(target){return Object.getOwnPropertyNames(target)};var NumberIsNaN=Number.isNaN||function(value){return value!=value};function EventEmitter(){EventEmitter.init.call(this)}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var defaultMaxListeners=10;function $getMaxListeners(that){return void 0===that._maxListeners?EventEmitter.defaultMaxListeners:that._maxListeners}function _addListener(target,type,listener,prepend){var m,events,existing,warning;if("function"!=typeof listener)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof listener);if(void 0===(events=target._events)?(events=target._events=Object.create(null),target._eventsCount=0):(void 0!==events.newListener&&(target.emit("newListener",type,listener.listener?listener.listener:listener),events=target._events),existing=events[type]),void 0===existing)existing=events[type]=listener,++target._eventsCount;else if("function"==typeof existing?existing=events[type]=prepend?[listener,existing]:[existing,listener]:prepend?existing.unshift(listener):existing.push(listener),(m=$getMaxListeners(target))>0&&existing.length>m&&!existing.warned){existing.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+" "+String(type)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=target,w.type=type,w.count=existing.length,warning=w,console&&console.warn&&console.warn(warning)}return target}function _onceWrap(target,type,listener){var state={fired:!1,wrapFn:void 0,target:target,type:type,listener:listener},wrapped=function(){for(var args=[],i=0;i0&&(er=args[0]),er instanceof Error)throw er;var err=new Error("Unhandled error."+(er?" ("+er.message+")":""));throw err.context=er,err}var handler=events[type];if(void 0===handler)return!1;if("function"==typeof handler)ReflectApply(handler,this,args);else{var len=handler.length,listeners=arrayClone(handler,len);for(i=0;i=0;i--)if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener,position=i;break}if(position<0)return this;0===position?list.shift():function(list,index){for(;index+1=0;i--)this.removeListener(type,listeners[i]);return this},EventEmitter.prototype.listeners=function(type){return _listeners(this,type,!0)},EventEmitter.prototype.rawListeners=function(type){return _listeners(this,type,!1)},EventEmitter.listenerCount=function(emitter,type){return"function"==typeof emitter.listenerCount?emitter.listenerCount(type):listenerCount.call(emitter,type)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]}},function(module,exports,__webpack_require__){"use strict";(function(global){module.exports={Client:global.WebSocket||global.MozWebSocket,EventSource:global.EventSource}}).call(this,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const assert=__webpack_require__(0),DUMMY=Buffer.alloc(0),types={OPEN:0,CLOSE:1,PING:2,PONG:3,MESSAGE:4,UPGRADE:5,NOOP:6};class Frame{constructor(type,data,binary){assert("number"==typeof type),assert(type>>>0===type),assert(type<=types.NOOP),assert("boolean"==typeof binary),binary?(null==data&&(data=DUMMY),assert(Buffer.isBuffer(data))):(null==data&&(data=""),assert("string"==typeof data)),this.type=type,this.data=data,this.binary=binary}toString(){let str="";return this.binary?(str+="b",str+=this.type.toString(10),str+=this.data.toString("base64")):(str+=this.type.toString(10),str+=this.data),str}static fromString(str){assert("string"==typeof str);let data,type=str.charCodeAt(0),binary=!1;return 98===type?(assert(str.length>1),type=str.charCodeAt(1),data=Buffer.from(str.substring(2),"base64"),binary=!0):data=str.substring(1),assert((type-=48)>=0&&type<=9),assert(type<=types.NOOP),new this(type,data,binary)}size(){let len=1;return this.binary?len+=this.data.length:len+=Buffer.byteLength(this.data,"utf8"),len}toRaw(){const data=Buffer.allocUnsafe(this.size());return data[0]=this.type,this.binary?this.data.copy(data,1):this.data.length>0&&data.write(this.data,1,"utf8"),data}static fromRaw(data){assert(Buffer.isBuffer(data)),assert(data.length>0);const type=data[0];return assert(type<=types.NOOP),new this(type,data.slice(1),!0)}}Frame.types=types,Frame.table=["open","close","ping","pong","message","upgrade","noop"],module.exports=Frame}).call(this,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const Types_1=__webpack_require__(7);var bsock=__webpack_require__(8);class FrontblockConfigLib{constructor(){this.parseSubResponse=Types_1.parseSubResponse,this.parseResponse=Types_1.parseResponse,this.socket=bsock.connect(2e4,"localhost",!1),this.init()}async init(){const info=await this.info();for(const i of info){let f;switch(i.info.type){case"call":f=this.callGenerator(i.name,i.args);break;case"hook":f=this.hookGenerator(i.name,i.args);break;case"unhook":f=this.unhookGenerator(i.name,i.args)}null==this[i.owner]&&(this[i.owner]={}),this[i.owner][i.name]=f,this[i.owner][i.name].bind(this)}}async info(){return await this.socket.call("info")}callGenerator(fnName,fnArgs){return eval("( () => async ("+fnArgs+') => { return await this.socket.call("'+fnName+'", '+fnArgs+")} )()")}hookGenerator(fnName,fnArgs){return eval("( () => async ("+fnArgs+(0!==fnArgs.length?",":"")+' callback) => {\n const r = await this.socket.call("'+fnName+'", '+fnArgs+")\n const res = await this.parseSubResponse(r);\n if(res.uid != null){\n this.socket.hook(res.uid, callback)\n }\n return res\n } )()")}unhookGenerator(fnName,fnArgs){return eval("( () => async ("+fnArgs+') => {\n const r = await this.socket.call("'+fnName+'", '+fnArgs+")\n const res = await this.parseResponse(r)\n if(res.uid != null)\n this.socket.unhook(res.uid)\n return res\n } )()")}}exports.FrontblockConfigLib=FrontblockConfigLib,window.fb=new FrontblockConfigLib},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});class Response{constructor(message){this.message=message}}exports.Response=Response;class SuccessResponse extends Response{constructor(message){super(message),this.result="Success"}}exports.SuccessResponse=SuccessResponse;class ErrorResponse extends Response{constructor(message="Unknown error"){super(message),this.result="Error"}}exports.ErrorResponse=ErrorResponse;class SubscriptionResponse extends SuccessResponse{constructor(uid,message){super(message),this.uid=uid}}function parseResponse(resp){return null==resp.result?new ErrorResponse("Faulty response"):"Success"==resp.result?null!=resp.uid?new SubscriptionResponse(resp.uid,resp.message):new SuccessResponse:"Error"==resp.result?new ErrorResponse(resp.message):new ErrorResponse("Faulty response")}exports.SubscriptionResponse=SubscriptionResponse,exports.parseResponse=parseResponse,exports.parseSubResponse=function(resp){let response=parseResponse(resp);return response instanceof SuccessResponse?null==resp.uid?new ErrorResponse("Expected a SubscriptionResponse but got a SuccessResponse"):new SubscriptionResponse(resp.uid,resp.message):response}},function(module,exports,__webpack_require__){"use strict";const WebSocket=__webpack_require__(4),Server=__webpack_require__(9),Socket=__webpack_require__(10);exports.WebSocket=WebSocket,exports.Server=Server,exports.server=()=>new Server,exports.createServer=Server.createServer.bind(Server),exports.attach=Server.attach.bind(Server),exports.Socket=Socket,exports.socket=()=>new Socket,exports.connect=Socket.connect.bind(Socket)},function(module,exports,__webpack_require__){"use strict";const EventEmitter=__webpack_require__(3);module.exports=class Server extends EventEmitter{constructor(options){super(),this.sockets=new Set,this.channels=new Map,this.mounts=[]}attach(){return this}mount(){}async open(){}async close(){}join(){return!0}leave(){return!0}channel(){return null}to(){}all(){}static attach(parent,options){return new this(options).attach(parent)}static createServer(options){return new this(options)}}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const assert=__webpack_require__(0),EventEmitter=__webpack_require__(3),WebSocket=__webpack_require__(4).Client,Packet=__webpack_require__(14),Frame=__webpack_require__(5),util=__webpack_require__(15),Parser=__webpack_require__(23),codes=__webpack_require__(24),blacklist=__webpack_require__(25);class Job{constructor(resolve,reject,time){this.resolve=resolve,this.reject=reject,this.time=time}}function castCode(code){return null!==code&&"number"!=typeof code&&"string"!=typeof code?null:code}function castMsg(msg){return"string"!=typeof msg?"No message.":msg}function castString(type){return"string"!=typeof type?null:type}function enforce(value,name,type){if(!value){const err=new TypeError(`'${name}' must be a(n) ${type}.`);throw Error.captureStackTrace&&Error.captureStackTrace(err,enforce),err}}module.exports=class Socket extends EventEmitter{constructor(){super(),this.server=null,this.ws=null,this.protocol="",this.url="ws://127.0.0.1:80/socket.io/?transport=websocket",this.ssl=!1,this.host="127.0.0.1",this.port=80,this.inbound=!1,this.handshake=!1,this.opened=!1,this.connected=!1,this.challenge=!1,this.destroyed=!1,this.reconnection=!0,this.time=0,this.sequence=0,this.pingInterval=25e3,this.pingTimeout=6e4,this.lastPing=0,this.parser=new Parser,this.binary=!1,this.packet=null,this.timer=null,this.jobs=new Map,this.hooks=new Map,this.channels=new Set,this.events=new EventEmitter,this.buffer=[],this.admin=!1,this.auth=!1}accept(server,req,socket,ws){assert(!this.ws,"Cannot accept twice."),assert(server),assert(req),assert(socket),assert(socket.remoteAddress),assert(null!=socket.remotePort),assert(ws);let proto="ws",host=socket.remoteAddress,port=socket.remotePort;return socket.encrypted&&(proto="wss"),-1!==host.indexOf(":")&&(host=`[${host}]`),port||(port=0),this.server=server,this.binary=-1===req.url.indexOf("b64=1"),this.url=`${proto}://${host}:${port}/socket.io/?transport=websocket`,this.ssl="wss"===proto,this.host=socket.remoteAddress,this.port=socket.remotePort,this.inbound=!0,this.ws=ws,this.init(),this}connect(port,host,ssl,protocols){assert(!this.ws,"Cannot connect twice."),"string"==typeof port&&(protocols=host,[port,host,ssl]=util.parseURL(port));let proto="ws";ssl&&(proto="wss"),host||(host="127.0.0.1"),assert("string"==typeof host),assert((65535&port)===port,"Must pass a port."),assert(!ssl||"boolean"==typeof ssl),assert(!protocols||Array.isArray(protocols));let hostname=host;-1!==host.indexOf(":")&&"["!==host[0]&&(hostname=`[${host}]`);const url=`${proto}://${hostname}:${port}/socket.io/?transport=websocket`;return this.binary=!0,this.url=url,this.ssl=ssl,this.host=host,this.port=port,this.inbound=!1,this.ws=new WebSocket(url,protocols),this.init(),this}init(){this.protocol=this.ws.protocol,this.time=Date.now(),this.observe(),this.parser.on("error",err=>{this.emit("error",err)}),this.parser.on("frame",async frame=>{try{await this.handleFrame(frame)}catch(e){this.emit("error",e)}}),this.start()}observe(){const ws=this.ws;assert(ws),ws.binaryType="arraybuffer",ws.onopen=async()=>{await this.onOpen()},ws.onmessage=async event=>{await this.onMessage(event)},ws.onerror=async event=>{await this.onError(event)},ws.onclose=async event=>{await this.onClose(event)}}async onOpen(){this.destroyed||this.inbound&&(assert(!this.opened),assert(!this.connected),assert(!this.handshake),this.opened=!0,this.handshake=!0,await this.emitAsync("open"),this.sendHandshake(),this.connected=!0,await this.emitAsync("connect"),this.sendConnect())}async emitAsync(event,...args){const handlers=this.listeners(event);for(const handler of handlers)try{await handler(...args)}catch(e){this.emit("error",e)}}async onMessage(event){if(this.destroyed)return;let data;try{data=await function(data){return new Promise((resolve,reject)=>{if("string"!=typeof data)if(data&&"object"==typeof data)if(Buffer.isBuffer(data))resolve(data);else if(data instanceof ArrayBuffer){const result=Buffer.from(data);resolve(result)}else if(data.buffer instanceof ArrayBuffer){const result=Buffer.from(data.buffer,data.byteOffset,data.byteLength);resolve(result)}else{if("undefined"!=typeof Blob&&Blob&&data instanceof Blob){const reader=new FileReader;return reader.onloadend=()=>{const result=Buffer.from(reader.result);resolve(result)},void reader.readAsArrayBuffer(data)}reject(new Error("Bad data object."))}else reject(new Error("Bad data object."));else resolve(data)})}(event.data)}catch(e){return void this.emit("error",e)}"string"!=typeof data?this.parser.feedBinary(data):this.parser.feedString(data)}async onError(event){this.destroyed||(this.emit("error",new Error(event.message)),this.inbound?this.destroy():this.close())}async onClose(event){if(this.destroyed)return;if(1e3===event.code||1001===event.code)return this.connected||this.emit("error",new Error("Could not connect.")),this.inbound?void this.destroy():void this.close();const code=codes[event.code]||"UNKNOWN_CODE",reason=event.reason||"Unknown reason",err=new Error(`Websocket Closed: ${reason} (code=${code}).`);err.reason=event.reason||"",err.code=event.code||0,this.emit("error",err),this.inbound?this.destroy():this.reconnection?this.close():this.destroy()}close(){if(!this.destroyed){this.time=Date.now(),this.packet=null,this.handshake=!1,this.connected=!1,this.challenge=!1,this.sequence=0,this.lastPing=0;for(const[id,job]of this.jobs)this.jobs.delete(id),job.reject(new Error("Job timed out."));assert(this.ws),this.ws.onopen=()=>{},this.ws.onmessage=()=>{},this.ws.onerror=()=>{},this.ws.onclose=()=>{},this.ws.close(),this.emitAsync("disconnect")}}error(msg){this.destroyed||this.emit("error",new Error(msg))}destroy(){this.destroyed||(this.close(),this.stop(),this.opened=!1,this.destroyed=!0,this.buffer.length=0,this.emitAsync("close"),this.removeAllListeners(),this.on("error",()=>{}))}send(frame){this.destroyed||(assert(this.ws),frame.binary&&this.binary?this.ws.send(frame.toRaw()):this.ws.send(frame.toString()))}reconnect(){assert(!this.inbound),this.close(),this.ws=new WebSocket(this.url),this.time=Date.now(),this.observe()}start(){assert(this.ws),assert(null==this.timer),this.timer=setInterval(()=>this.stall(),5e3)}stop(){null!=this.timer&&(clearInterval(this.timer),this.timer=null)}stall(){const now=Date.now();if(assert(this.ws),!this.connected)return now-this.time>1e4?this.inbound||!this.reconnection?(this.error("Timed out waiting for connection."),void this.destroy()):(this.error("Timed out waiting for connection. Reconnecting..."),void this.reconnect()):void 0;for(const[id,job]of this.jobs)now-job.time>6e5&&(this.jobs.delete(id),job.reject(new Error("Job timed out.")));return this.inbound||this.challenge?!this.inbound&&now-this.lastPing>this.pingTimeout?(this.error("Connection is stalling (ping)."),this.inbound?void this.destroy():void this.close()):void 0:(this.challenge=!0,this.lastPing=now,void this.sendPing())}async handleFrame(frame){if(!this.destroyed)switch(frame.type){case Frame.types.OPEN:return this.handleOpen(frame);case Frame.types.CLOSE:return this.handleClose(frame);case Frame.types.PING:return this.handlePing(frame);case Frame.types.PONG:return this.handlePong(frame);case Frame.types.MESSAGE:return this.handleMessage(frame);case Frame.types.UPGRADE:return this.handleUpgrade(frame);case Frame.types.NOOP:return this.handleNoop(frame);default:throw new Error("Unknown frame.")}}async handleOpen(frame){if(this.inbound)throw new Error("Inbound socket sent an open frame.");if(frame.binary)throw new Error("Received a binary open frame.");if(this.handshake)throw new Error("Duplicate open frame.");const json=JSON.parse(frame.data);enforce(json&&"object"==typeof json,"open","object");const{pingInterval:pingInterval,pingTimeout:pingTimeout}=json;enforce(pingInterval>>>0===pingInterval,"interval","uint32"),enforce(pingTimeout>>>0===pingTimeout,"timeout","uint32"),this.pingInterval=pingInterval,this.pingTimeout=pingTimeout,this.handshake=!0,this.opened||(this.opened=!0,await this.emitAsync("open"))}async handleClose(frame){if(this.inbound)throw new Error("Inbound socket sent a close frame.");this.close()}async handlePing(){if(!this.inbound)throw new Error("Outbound socket sent a ping frame.");this.sendPong()}async handlePong(){if(this.inbound)throw new Error("Inbound socket sent a pong frame.");if(!this.challenge)return this.error("Remote node sent bad pong."),void this.destroy();this.challenge=!1}async handleMessage(frame){if(this.packet){const packet=this.packet;if(!frame.binary)throw new Error("Received non-binary frame as attachment.");return packet.buffers.push(frame.data),packet.buffers.length===packet.attachments?(this.packet=null,this.handlePacket(packet)):void 0}if(frame.binary)throw new Error("Received binary frame as a message.");const packet=Packet.fromString(frame.data);if(!(packet.attachments>0))return this.handlePacket(packet);this.packet=packet}async handleUpgrade(frame){if(!this.inbound)throw new Error("Outbound socket sent an upgrade frame.");throw new Error("Cannot upgrade from websocket.")}async handleNoop(frame){}sendFrame(type,data,binary){this.send(new Frame(type,data,binary))}sendOpen(data){this.sendFrame(Frame.types.OPEN,data,!1)}sendClose(data){this.sendFrame(Frame.types.CLOSE,data,!1)}sendPing(data){this.sendFrame(Frame.types.PING,data,!1)}sendPong(data){this.sendFrame(Frame.types.PONG,data,!1)}sendMessage(data){this.sendFrame(Frame.types.MESSAGE,data,!1)}sendBinary(data){this.sendFrame(Frame.types.MESSAGE,data,!0)}sendHandshake(){const handshake=JSON.stringify({sid:"00000000000000000000",upgrades:[],pingInterval:this.pingInterval,pingTimeout:this.pingTimeout});this.sendOpen(handshake)}async handlePacket(packet){if(!this.destroyed)switch(packet.type){case Packet.types.CONNECT:return this.handleConnect();case Packet.types.DISCONNECT:return this.handleDisconnect();case Packet.types.EVENT:case Packet.types.BINARY_EVENT:{const args=packet.getData();return enforce(Array.isArray(args),"args","array"),enforce(args.length>0,"args","array"),enforce("string"==typeof args[0],"event","string"),-1!==packet.id?this.handleCall(packet.id,args):this.handleEvent(args)}case Packet.types.ACK:case Packet.types.BINARY_ACK:{enforce(-1!==packet.id,"id","uint32");const json=packet.getData();enforce(null==json||Array.isArray(json),"args","array");let err=null,result=null;return json&&json.length>0&&(err=json[0]),json&&json.length>1&&(result=json[1]),null==result&&(result=null),err?(enforce("object"==typeof err,"error","object"),this.handleError(packet.id,err)):this.handleAck(packet.id,result)}case Packet.types.ERROR:{const err=packet.getData();return enforce(err&&"object"==typeof err,"error","object"),this.handleError(-1,err)}default:throw new Error("Unknown packet.")}}async handleConnect(){if(this.inbound)throw new Error("Inbound socket sent connect packet.");this.connected=!0,await this.emitAsync("connect");for(const packet of this.buffer)this.sendPacket(packet);this.buffer.length=0}async handleDisconnect(){this.close()}async handleEvent(args){try{const event=args[0];if(blacklist.hasOwnProperty(event))throw new Error(`Cannot emit blacklisted event: ${event}.`);this.events.emit(...args)}catch(e){this.emit("error",e),this.sendError(-1,e)}}async handleCall(id,args){let result;try{const event=args.shift();if(blacklist.hasOwnProperty(event))throw new Error(`Cannot emit blacklisted event: ${event}.`);const handler=this.hooks.get(event);if(!handler)throw new Error(`Call not found: ${event}.`);result=await handler(...args)}catch(e){return this.emit("error",e),void this.sendError(id,e)}null==result&&(result=null),this.sendAck(id,result)}async handleAck(id,data){const job=this.jobs.get(id);if(!job)throw new Error(`Job not found for ${id}.`);this.jobs.delete(id),job.resolve(data)}async handleError(id,err){const msg=castMsg(err.message),name=castString(err.name),type=castString(err.type),code=castCode(err.code);if(-1===id){const e=new Error(msg);return e.name=name,e.type=type,e.code=code,void this.emit("error",e)}const job=this.jobs.get(id);if(!job)throw new Error(`Job not found for ${id}.`);this.jobs.delete(id);const e=new Error(msg);e.name=name,e.type=type,e.code=code,job.reject(e)}sendPacket(packet){this.sendMessage(packet.toString());for(const data of packet.buffers)this.sendBinary(data)}sendConnect(){this.sendPacket(new Packet(Packet.types.CONNECT))}sendDisconnect(){this.sendPacket(new Packet(Packet.types.DISCONNECT))}sendEvent(data){const packet=new Packet;packet.type=Packet.types.EVENT,packet.setData(data),this.connected?this.sendPacket(packet):this.buffer.push(packet)}sendCall(id,data){const packet=new Packet;packet.type=Packet.types.EVENT,packet.id=id,packet.setData(data),this.connected?this.sendPacket(packet):this.buffer.push(packet)}sendAck(id,data){const packet=new Packet;packet.type=Packet.types.ACK,packet.id=id,packet.setData([null,data]),this.sendPacket(packet)}sendError(id,err){const message=castMsg(err.message),name=castString(err.name),type=castString(err.type),code=castCode(err.code);if(-1===id){const packet=new Packet;return packet.type=Packet.types.ERROR,packet.setData({message:message,name:name,type:type,code:code}),void this.sendPacket(packet)}const packet=new Packet;packet.type=Packet.types.ACK,packet.id=id,packet.setData([{message:message,name:name,type:type,code:code}]),this.sendPacket(packet)}bind(event,handler){enforce("string"==typeof event,"event","string"),enforce("function"==typeof handler,"handler","function"),assert(!blacklist.hasOwnProperty(event),"Blacklisted event."),this.events.on(event,handler)}unbind(event,handler){enforce("string"==typeof event,"event","string"),enforce("function"==typeof handler,"handler","function"),assert(!blacklist.hasOwnProperty(event),"Blacklisted event."),this.events.removeListener(event,handler)}fire(...args){enforce(args.length>0,"event","string"),enforce("string"==typeof args[0],"event","string"),this.sendEvent(args)}hook(event,handler){enforce("string"==typeof event,"event","string"),enforce("function"==typeof handler,"handler","function"),assert(!this.hooks.has(event),"Hook already bound."),assert(!blacklist.hasOwnProperty(event),"Blacklisted event."),this.hooks.set(event,handler)}unhook(event){enforce("string"==typeof event,"event","string"),assert(!blacklist.hasOwnProperty(event),"Blacklisted event."),this.hooks.delete(event)}call(...args){enforce(args.length>0,"event","string"),enforce("string"==typeof args[0],"event","string");const id=this.sequence;return this.sequence+=1,this.sequence>>>=0,assert(!this.jobs.has(id),"ID collision."),this.sendCall(id,args),new Promise((resolve,reject)=>{this.jobs.set(id,new Job(resolve,reject,Date.now()))})}channel(name){return this.channels.has(name)}join(name){return!!this.server&&this.server.join(this,name)}leave(name){return!!this.server&&this.server.leave(this,name)}static accept(server,req,socket,ws){return(new this).accept(server,req,socket,ws)}static connect(port,host,ssl,protocols){return(new this).connect(port,host,ssl,protocols)}}}).call(this,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){"use strict";exports.byteLength=function(b64){var lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1];return 3*(validLen+placeHoldersLen)/4-placeHoldersLen},exports.toByteArray=function(b64){for(var tmp,lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1],arr=new Arr(function(b64,validLen,placeHoldersLen){return 3*(validLen+placeHoldersLen)/4-placeHoldersLen}(0,validLen,placeHoldersLen)),curByte=0,len=placeHoldersLen>0?validLen-4:validLen,i=0;i>16&255,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp;2===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[curByte++]=255&tmp);1===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp);return arr},exports.fromByteArray=function(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,parts=[],i=0,len2=len-extraBytes;ilen2?len2:i+16383));1===extraBytes?(tmp=uint8[len-1],parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"="));return parts.join("")};for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");return-1===validLen&&(validLen=len),[validLen,validLen===len?0:4-validLen%4]}function encodeChunk(uint8,start,end){for(var tmp,num,output=[],i=start;i>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]);return output.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},function(module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:1/0*(s?-1:1);m+=Math.pow(2,mLen),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,eLen=8*nBytes-mLen-1,eMax=(1<>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),(value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias))*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},function(module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return"[object Array]"==toString.call(arr)}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const assert=__webpack_require__(0),types={CONNECT:0,DISCONNECT:1,EVENT:2,ACK:3,ERROR:4,BINARY_EVENT:5,BINARY_ACK:6};class Packet{constructor(type){this.type=type||0,this.attachments=0,this.nsp="/",this.id=-1,this.data="",this.buffers=[]}setData(data){assert(void 0!==data),assert("number"!=typeof data),assert("function"!=typeof data);const[str,buffers]=function(obj){const buffers=[],out=function replace(key,value,buffers,seen){if(null===value||"object"!=typeof value)return value;if(Buffer.isBuffer(value)){const placeholder=seen.get(value);if(null!=placeholder)return placeholder;const out={_placeholder:!0,num:buffers.length};return seen.set(value,out),buffers.push(value),out}if(seen.has(value))throw new TypeError("Converting circular structure to JSON.");if(Array.isArray(value)){const out=[];seen.set(value,null);for(let i=0;i0)switch(this.type){case types.EVENT:this.type=types.BINARY_EVENT;break;case types.ACK:this.type=types.BINARY_ACK}return this}getData(){return 0===this.data.length?null:(str=this.data,buffers=this.buffers,JSON.parse(str,(key,value)=>(function(obj){return null!==obj&&"object"==typeof obj&&!0===obj._placeholder&&obj.num>>>0===obj.num})(value)&&value.num0);let i=0,type=0,attachments=0,nsp="/",id=-1,data="";switch([i,type]=function(str,i){const ch=str.charCodeAt(i)-48;return ch<0||ch>9?-1:[i+1,ch]}(str,i),assert(-1!==type),assert(type<=types.BINARY_ACK),type){case types.BINARY_EVENT:case types.BINARY_ACK:[i,attachments]=readInt(str,i),assert(-1!==attachments),assert(i9)break;num*=10,num+=ch,assert((len+=1)<=10)}return assert(num<=4294967295),0===len&&(num=-1),[i,num]}Packet.types=types,module.exports=Packet}).call(this,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){"use strict";const assert=__webpack_require__(0),URL=__webpack_require__(16);exports.parseURL=function(url){-1===url.indexOf("://")&&(url=`ws://${url}`);const data=URL.parse(url);if("http:"!==data.protocol&&"https:"!==data.protocol&&"ws:"!==data.protocol&&"wss:"!==data.protocol)throw new Error("Invalid protocol for websocket URL.");if(!data.hostname)throw new Error("Malformed URL.");const host=data.hostname;let port=80,ssl=!1;return"https:"!==data.protocol&&"wss:"!==data.protocol||(port=443,ssl=!0),data.port&&(port=parseInt(data.port,10),assert((65535&port)===port),assert(0!==port)),[port,host,ssl]}},function(module,exports,__webpack_require__){"use strict";var punycode=__webpack_require__(17),util=__webpack_require__(19);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}exports.parse=urlParse,exports.resolve=function(source,relative){return urlParse(source,!1,!0).resolve(relative)},exports.resolveObject=function(source,relative){return source?urlParse(source,!1,!0).resolveObject(relative):relative},exports.format=function(obj){util.isString(obj)&&(obj=urlParse(obj));return obj instanceof Url?obj.format():Url.prototype.format.call(obj)},exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,unwise=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=__webpack_require__(20);function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&util.isObject(url)&&url instanceof Url)return url;var u=new Url;return u.parse(url,parseQueryString,slashesDenoteHost),u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url))throw new TypeError("Parameter 'url' must be a string, not "+typeof url);var queryIndex=url.indexOf("?"),splitter=-1!==queryIndex&&queryIndex127?newpart+="x":newpart+=part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(hostnamePartStart);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest="/"+notHost.join(".")+rest),this.hostname=validParts.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),ipv6Hostname||(this.hostname=punycode.toASCII(this.hostname));var p=this.port?":"+this.port:"",h=this.hostname||"";this.host=h+p,this.href+=this.host,ipv6Hostname&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==rest[0]&&(rest="/"+rest))}if(!unsafeProtocol[lowerProto])for(i=0,l=autoEscape.length;i0)&&result.host.split("@"))&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift());return result.search=relative.search,result.query=relative.query,util.isNull(result.pathname)&&util.isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.href=result.format(),result}if(!srcPath.length)return result.pathname=null,result.search?result.path="/"+result.search:result.path=null,result.href=result.format(),result;for(var last=srcPath.slice(-1)[0],hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&("."===last||".."===last)||""===last,up=0,i=srcPath.length;i>=0;i--)"."===(last=srcPath[i])?srcPath.splice(i,1):".."===last?(srcPath.splice(i,1),up++):up&&(srcPath.splice(i,1),up--);if(!mustEndAbs&&!removeAllDots)for(;up--;up)srcPath.unshift("..");!mustEndAbs||""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0)||srcPath.unshift(""),hasTrailingSlash&&"/"!==srcPath.join("/").substr(-1)&&srcPath.push("");var authInHost,isAbsolute=""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0);psychotic&&(result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"",(authInHost=!!(result.host&&result.host.indexOf("@")>0)&&result.host.split("@"))&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift()));return(mustEndAbs=mustEndAbs||result.host&&srcPath.length)&&!isAbsolute&&srcPath.unshift(""),srcPath.length?result.pathname=srcPath.join("/"):(result.pathname=null,result.path=null),util.isNull(result.pathname)&&util.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(),result},Url.prototype.parseHost=function(){var host=this.host,port=portPattern.exec(host);port&&(":"!==(port=port[0])&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)}},function(module,exports,__webpack_require__){(function(module,global){var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(root){exports&&exports.nodeType,module&&module.nodeType;var freeGlobal="object"==typeof global&&global;freeGlobal.global!==freeGlobal&&freeGlobal.window!==freeGlobal&&freeGlobal.self;var punycode,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,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;function error(type){throw new RangeError(errors[type])}function map(array,fn){for(var length=array.length,result=[];length--;)result[length]=fn(array[length]);return result}function mapDomain(string,fn){var parts=string.split("@"),result="";return parts.length>1&&(result=parts[0]+"@",string=parts[1]),result+map((string=string.replace(regexSeparators,".")).split("."),fn).join(".")}function ucs2decode(string){for(var value,extra,output=[],counter=0,length=string.length;counter=55296&&value<=56319&&counter65535&&(output+=stringFromCharCode((value-=65536)>>>10&1023|55296),value=56320|1023&value),output+=stringFromCharCode(value)}).join("")}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((0!=flag)<<5)}function adapt(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/damp):delta>>1,delta+=floor(delta/numPoints);delta>baseMinusTMin*tMax>>1;k+=base)delta=floor(delta/baseMinusTMin);return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var out,basic,j,index,oldi,w,k,digit,t,baseMinusT,codePoint,output=[],inputLength=input.length,i=0,n=initialN,bias=initialBias;for((basic=input.lastIndexOf(delimiter))<0&&(basic=0),j=0;j=128&&error("not-basic"),output.push(input.charCodeAt(j));for(index=basic>0?basic+1:0;index=inputLength&&error("invalid-input"),((digit=(codePoint=input.charCodeAt(index++))-48<10?codePoint-22:codePoint-65<26?codePoint-65:codePoint-97<26?codePoint-97:base)>=base||digit>floor((maxInt-i)/w))&&error("overflow"),i+=digit*w,!(digit<(t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias));k+=base)w>floor(maxInt/(baseMinusT=base-t))&&error("overflow"),w*=baseMinusT;bias=adapt(i-oldi,out=output.length+1,0==oldi),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,inputLength,handledCPCountPlusOne,baseMinusT,qMinusT,output=[];for(inputLength=(input=ucs2decode(input)).length,n=initialN,delta=0,bias=initialBias,j=0;j=n&¤tValuefloor((maxInt-delta)/(handledCPCountPlusOne=handledCPCount+1))&&error("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m,j=0;jmaxInt&&error("overflow"),currentValue==n){for(q=delta,k=base;!(q<(t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias));k+=base)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("")}punycode={version:"1.4.1",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:function(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string})},toUnicode:function(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string})}},void 0===(__WEBPACK_AMD_DEFINE_RESULT__=function(){return punycode}.call(exports,__webpack_require__,exports,module))||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}()}).call(this,__webpack_require__(18)(module),__webpack_require__(2))},function(module,exports){module.exports=function(module){return module.webpackPolyfill||(module.deprecate=function(){},module.paths=[],module.children||(module.children=[]),Object.defineProperty(module,"loaded",{enumerable:!0,get:function(){return module.l}}),Object.defineProperty(module,"id",{enumerable:!0,get:function(){return module.i}}),module.webpackPolyfill=1),module}},function(module,exports,__webpack_require__){"use strict";module.exports={isString:function(arg){return"string"==typeof arg},isObject:function(arg){return"object"==typeof arg&&null!==arg},isNull:function(arg){return null===arg},isNullOrUndefined:function(arg){return null==arg}}},function(module,exports,__webpack_require__){"use strict";exports.decode=exports.parse=__webpack_require__(21),exports.encode=exports.stringify=__webpack_require__(22)},function(module,exports,__webpack_require__){"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("string"!=typeof qs||0===qs.length)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;options&&"number"==typeof options.maxKeys&&(maxKeys=options.maxKeys);var len=qs.length;maxKeys>0&&len>maxKeys&&(len=maxKeys);for(var i=0;i=0?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty(obj,k)?isArray(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)}},function(module,exports,__webpack_require__){"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){return sep=sep||"&",eq=eq||"=",null===obj&&(obj=void 0),"object"==typeof obj?map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;return isArray(obj[k])?map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep):ks+encodeURIComponent(stringifyPrimitive(obj[k]))}).join(sep):name?encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj)):""};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)};function map(xs,f){if(xs.map)return xs.map(f);for(var res=[],i=0;iMAX_MESSAGE)return void this.error("Frame too large.");let frame;try{frame=Frame.fromRaw(data)}catch(e){return void this.emit("error",e)}this.emit("frame",frame)}feedString(data){if(assert("string"==typeof data),Buffer.byteLength(data,"utf8")>MAX_MESSAGE)return void this.error("Frame too large.");let frame;try{frame=Frame.fromString(data)}catch(e){return void this.emit("error",e)}this.emit("frame",frame)}}}).call(this,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){"use strict";module.exports={1000:"NORMAL_CLOSURE",1001:"GOING_AWAY",1002:"PROTOCOL_ERROR",1003:"UNSUPPORTED_DATA",1004:"RESERVED",1005:"NO_STATUS_RECVD",1006:"ABNORMAL_CLOSURE",1007:"INVALID_FRAME_PAYLOAD_DATA",1008:"POLICY_VIOLATION",1009:"MESSAGE_TOO_BIG",1010:"MISSING_EXTENSION",1011:"INTERNAL_ERROR",1012:"SERVICE_RESTART",1013:"TRY_AGAIN_LATER",1014:"BAD_GATEWAY",1015:"TLS_HANDSHAKE"}},function(module,exports,__webpack_require__){"use strict";module.exports={connect:!0,connect_error:!0,connect_timeout:!0,connecting:!0,disconnect:!0,error:!0,reconnect:!0,reconnect_attempt:!0,reconnect_failed:!0,reconnect_error:!0,reconnecting:!0,ping:!0,pong:!0}}]);