!function r(o,i,s){function a(e,t){if(!i[e]){if(!o[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(c)return c(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}n=i[e]={exports:{}},o[e][0].call(n.exports,function(t){return a(o[e][1][t]||t)},n,n.exports,r,o,i,s)}return i[e].exports}for(var c="function"==typeof require&&require,t=0;ta[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]>2])+p[(3&e[o])<<4|e[o+1]>>4])+p[(15&e[o+1])<<2|e[o+2]>>6])+p[63&e[o+2]];return n%3==2?r=r.substring(0,r.length-1)+"=":n%3==1&&(r=r.substring(0,r.length-2)+"=="),r},n.decode=function(t){for(var e,n,r,o,i=.75*t.length,s=t.length,a=0,i=("="===t[t.length-1]&&(i--,"="===t[t.length-2])&&i--,new ArrayBuffer(i)),c=new Uint8Array(i),u=0;u>4,c[a++]=(15&n)<<4|r>>2,c[a++]=(3&r)<<6|63&o;return i}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],25:[function(t,e,n){"use strict";n.byteLength=function(t){var t=p(t),e=t[0],t=t[1];return 3*(e+t)/4-t},n.toByteArray=function(t){var e,n,r=p(t),o=r[0],r=r[1],i=new u(function(t,e){return 3*(t+e)/4-e}(o,r)),s=0,a=0>16&255,i[s++]=e>>8&255,i[s++]=255&e;2===r&&(e=c[t.charCodeAt(n)]<<2|c[t.charCodeAt(n+1)]>>4,i[s++]=255&e);1===r&&(e=c[t.charCodeAt(n)]<<10|c[t.charCodeAt(n+1)]<<4|c[t.charCodeAt(n+2)]>>2,i[s++]=e>>8&255,i[s++]=255&e);return i},n.fromByteArray=function(t){for(var e,n=t.length,r=n%3,o=[],i=0,s=n-r;i>18&63]+a[t>>12&63]+a[t>>6&63]+a[63&t]}(r));return o.join("")}(t,i,s>2]+a[e<<4&63]+"==")):2==r&&(e=(t[n-2]<<8)+t[n-1],o.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"="));return o.join("")};for(var a=[],c=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=r.length;o>>1;case"base64":return L(t).length;default:if(o)return r?-1:S(t).length;e=(""+e).toLowerCase(),o=!0}}function n(t,e,n){var r,o=!1;if((e=void 0===e||e<0?0:e)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":var i=this,s=e,a=n,c=i.length;(!a||a<0||c=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=f.from(e,r)),f.isBuffer(e))return 0===e.length?-1:d(t,e,n,r,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,e,n):d(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function d(t,e,n,r,o){var i=1,s=t.length,a=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s/=i=2,a/=2,n/=2}function c(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}if(o)for(var u=-1,p=n;p>8,o.push(n%256),o.push(r);return o}(e,t.length-n),t,n,r)}function x(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o>>10&1023|55296),p=56320|1023&p),r.push(p),o+=f}var h=r,l=h.length;if(l<=v)return String.fromCharCode.apply(String,h);for(var d="",y=0;ye&&(t+=" ... "),""},f.prototype.compare=function(t,e,n,r,o){if(j(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),(e=void 0===e?0:e)<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(o<=r&&n<=e)return 0;if(o<=r)return-1;if(n<=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(i,s),c=this.slice(r,o),u=t.slice(e,n),p=0;p>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||othis.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";for(var i,s,a,c=!1;;)switch(r){case"hex":var u=this,p=t,f=e,h=n,l=(f=Number(f)||0,u.length-f);(!h||l<(h=Number(h)))&&(h=l),(l=p.length)/2t.length)throw new RangeError("Index out of range")}function w(t,e,n,r){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function A(t,e,n,r,o){return e=+e,n>>>=0,o||w(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function C(t,e,n,r,o){return e=+e,n>>>=0,o||w(t,0,n,8),i.write(t,e,n,r,52,8),n+8}f.prototype.slice=function(t,e){var n=this.length,n=((t=~~t)<0?(t+=n)<0&&(t=0):n>>=0,e>>>=0,n||y(t,e,this.length);for(var r=this[t],o=1,i=0;++i>>=0,e>>>=0,n||y(t,e,this.length);for(var r=this[t+--e],o=1;0>>=0,e||y(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||y(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||y(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||y(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||y(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||y(t,e,this.length);for(var r=this[t],o=1,i=0;++i>>=0,e>>>=0,n||y(t,e,this.length);for(var r=e,o=1,i=this[t+--r];0>>=0,e||y(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||y(t,2,this.length);e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,e){t>>>=0,e||y(t,2,this.length);e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return t>>>=0,e||y(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||y(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||y(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||y(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||b(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i>>=0,n>>>=0,r||b(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;0<=--o&&(i*=256);)this[e+o]=t/i&255;return e+n},f.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||b(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||b(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||b(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||b(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||b(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeIntLE=function(t,e,n,r){t=+t,e>>>=0,r||b(this,t,e,n,(r=Math.pow(2,8*n-1))-1,-r);var o=0,i=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+n},f.prototype.writeIntBE=function(t,e,n,r){t=+t,e>>>=0,r||b(this,t,e,n,(r=Math.pow(2,8*n-1))-1,-r);var o=n-1,i=1,s=0;for(this[e+o]=255&t;0<=--o&&(i*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/i>>0)-s&255;return e+n},f.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||b(this,t,e,1,127,-128),this[e]=255&(t=t<0?255+t+1:t),e+1},f.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||b(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||b(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||b(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||b(this,t,e,4,2147483647,-2147483648),this[e]=(t=t<0?4294967295+t+1:t)>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeFloatLE=function(t,e,n){return A(this,t,e,!0,n)},f.prototype.writeFloatBE=function(t,e,n){return A(this,t,e,!1,n)},f.prototype.writeDoubleLE=function(t,e,n){return C(this,t,e,!0,n)},f.prototype.writeDoubleBE=function(t,e,n){return C(this,t,e,!1,n)},f.prototype.copy=function(t,e,n,r){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n=n||0,r||0===r||(r=this.length),e>=t.length&&(e=t.length),(r=0=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length);var o=(r=t.length-e>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(t=t||0))for(i=e;i>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function L(t){return k.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function O(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function j(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function M(t){return t!=t}}.call(this)}.call(this,E("buffer").Buffer)},{"base64-js":25,buffer:28,ieee754:51}],29:[function(t,e,n){var r=[].slice;e.exports=function(t,e){if("function"!=typeof(e="string"==typeof e?t[e]:e))throw new Error("bind() requires a function");var n=r.call(arguments,2);return function(){return e.apply(t,n.concat(r.call(arguments)))}}},{}],30:[function(t,e,n){function r(t){if(t){var e,n=t;for(e in r.prototype)n[e]=r.prototype[e];return n}}void 0!==e&&(e.exports=r),r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)this._callbacks={};else{var n=this._callbacks["$"+t];if(n)if(1==arguments.length)delete this._callbacks["$"+t];else{for(var r,o=0;o';i=document.createElement(t)}catch(t){(i=document.createElement("iframe")).name=s.iframeId,i.src="javascript:0"}i.id=s.iframeId,s.form.appendChild(i),s.iframe=i}this.form||(n=document.createElement("form"),r=document.createElement("textarea"),o=this.iframeId="eio_iframe_"+this.index,n.className="socketio",n.style.position="absolute",n.style.top="-1000px",n.style.left="-1000px",n.target=o,n.method="POST",n.setAttribute("accept-charset","utf-8"),r.name="d",n.appendChild(r),document.body.appendChild(n),this.form=n,this.area=r),this.form.action=this.uri(),c(),t=t.replace(p,"\\\n"),this.area.value=t.replace(u,"\\n");try{this.form.submit()}catch(t){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===s.iframe.readyState&&a()}:this.iframe.onload=a}},{"../globalThis":32,"./polling":39,"component-inherit":31}],38:[function(t,e,n){var o=t("./xmlhttprequest"),r=t("./polling"),i=t("component-emitter"),s=t("component-inherit"),a=t("debug")("engine.io-client:polling-xhr"),t=t("../globalThis");function c(){}function u(t){var e,n;r.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,"undefined"!=typeof location&&(e="https:"===location.protocol,n=(n=location.port)||(e?443:80),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e)}function p(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}function f(){for(var t in p.requests)p.requests.hasOwnProperty(t)&&p.requests[t].abort()}e.exports=u,e.exports.Request=p,s(u,r),u.prototype.supportsBinary=!0,u.prototype.request=function(t){return(t=t||{}).uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.withCredentials=this.withCredentials,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new p(t)},u.prototype.doWrite=function(t,e){var t=this.request({method:"POST",data:t,isBinary:"string"!=typeof t&&void 0!==t}),n=this;t.on("success",e),t.on("error",function(t){n.onError("xhr post error",t)}),this.sendXhr=t},u.prototype.doPoll=function(){a("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},i(p.prototype),p.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR},e=(t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,this.xhr=new o(t)),n=this;try{a("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var r in e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(r)&&e.setRequestHeader(r,this.extraHeaders[r])}catch(t){}if("POST"===this.method)try{this.isBinary?e.setRequestHeader("Content-type","application/octet-stream"):e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.withCredentials),this.requestTimeout&&(e.timeout=this.requestTimeout),this.hasXDR()?(e.onload=function(){n.onLoad()},e.onerror=function(){n.onError(e.responseText)}):e.onreadystatechange=function(){if(2===e.readyState)try{var t=e.getResponseHeader("Content-Type");(n.supportsBinary&&"application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&(e.responseType="arraybuffer")}catch(t){}4===e.readyState&&(200===e.status||1223===e.status?n.onLoad():setTimeout(function(){n.onError("number"==typeof e.status?e.status:0)},0))},a("xhr data %s",this.data),e.send(this.data)}catch(t){return void setTimeout(function(){n.onError(t)},0)}"undefined"!=typeof document&&(this.index=p.requestsCount++,p.requests[this.index]=this)},p.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},p.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},p.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},p.prototype.cleanup=function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete p.requests[this.index],this.xhr=null}},p.prototype.onLoad=function(){var t,e;try{try{e=this.xhr.getResponseHeader("Content-Type")}catch(t){}t=("application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e)&&this.xhr.response||this.xhr.responseText}catch(t){this.onError(t)}null!=t&&this.onData(t)},p.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},p.prototype.abort=function(){this.cleanup()},p.requestsCount=0,p.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",f):"function"==typeof addEventListener&&(e="onpagehide"in t?"pagehide":"unload",addEventListener(e,f,!1)))},{"../globalThis":32,"./polling":39,"./xmlhttprequest":41,"component-emitter":30,"component-inherit":31,debug:42}],39:[function(t,e,n){var r=t("../transport"),o=t("parseqs"),i=t("engine.io-parser"),s=t("component-inherit"),a=t("yeast"),c=t("debug")("engine.io-client:polling"),u=(e.exports=p,null!=new(t("./xmlhttprequest"))({xdomain:!1}).responseType);function p(t){var e=t&&t.forceBase64;u&&!e||(this.supportsBinary=!1),r.call(this,t)}s(p,r),p.prototype.name="polling",p.prototype.doOpen=function(){this.poll()},p.prototype.pause=function(t){var e,n=this;function r(){c("paused"),n.readyState="paused",t()}this.readyState="pausing",this.polling||!this.writable?(e=0,this.polling&&(c("we are currently polling - waiting to pause"),e++,this.once("pollComplete",function(){c("pre-pause polling complete"),--e||r()})),this.writable||(c("we are currently writing - waiting to pause"),e++,this.once("drain",function(){c("pre-pause writing complete"),--e||r()}))):r()},p.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},p.prototype.onData=function(t){var r=this;c("polling got data %s",t);i.decodePayload(t,this.socket.binaryType,function(t,e,n){if("opening"===r.readyState&&"open"===t.type&&r.onOpen(),"close"===t.type)return r.onClose(),!1;r.onPacket(t)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},p.prototype.doClose=function(){var t=this;function e(){c("writing close packet"),t.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),e()):(c("transport not open - deferring close"),this.once("open",e))},p.prototype.write=function(t){function e(){n.writable=!0,n.emit("drain")}var n=this;this.writable=!1;i.encodePayload(t,this.supportsBinary,function(t){n.doWrite(t,e)})},p.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(t[this.timestampParam]=a()),this.supportsBinary||t.sid||(t.b64=1),t=o.encode(t),this.port&&("https"==e&&443!==Number(this.port)||"http"==e&&80!==Number(this.port))&&(n=":"+this.port),t.length&&(t="?"+t),e+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+t}},{"../transport":35,"./xmlhttprequest":41,"component-inherit":31,debug:42,"engine.io-parser":44,parseqs:54,yeast:72}],40:[function(f,h,t){!function(p){!function(){var e,n,r=f("../transport"),i=f("engine.io-parser"),o=f("parseqs"),t=f("component-inherit"),s=f("yeast"),a=f("debug")("engine.io-client:websocket");if("undefined"!=typeof WebSocket?e=WebSocket:"undefined"!=typeof self&&(e=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{n=f("ws")}catch(t){}var c=e||n;function u(t){t&&t.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=e&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(c=n),r.call(this,t)}t(h.exports=u,r),u.prototype.name="websocket",u.prototype.supportsBinary=!0,u.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=this.protocols,n={};this.isReactNative||(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?e?new c(t,e):new c(t):new c(t,e,n)}catch(t){return this.emit("error",t)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},u.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},u.prototype.write=function(t){for(var r=this,o=(this.writable=!1,t.length),e=0,n=o;e>e&63|128)}function g(){if(f<=h)throw Error("Invalid byte index");var t=255&p[h];if(h++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}e.exports={version:"2.1.2",encode:function(t,e){for(var n,r,o,i=!1!==(e=e||{}).strict,s=d(t),a=s.length,c=-1,u="";++c>6&31|192):0==(4294901760&n)?(y(n,r)||(n=65533),o=l(n>>12&15|224),o+=m(n,6)):0==(4292870144&n)&&(o=l(n>>18&7|240),o=(o+=m(n,12))+m(n,6)),o+l(63&n|128)));return u},decode:function(t,e){for(var n,r=!1!==(e=e||{}).strict,o=(p=d(t),f=p.length,h=0,[]);!1!==(n=function(t){var e,n;if(f>>10&1023|55296),i=56320|1023&i),u+=l(i);return u}}},{}],47:[function(t,e,n){var f=Object.create||function(t){function e(){}return e.prototype=t,new e},s=Object.keys||function(t){var e,n=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.push(e);return e},r=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function o(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=f(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}((e.exports=o).EventEmitter=o).prototype._events=void 0,o.prototype._maxListeners=void 0;var i,a=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),i=0===c.x}catch(t){i=!1}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function p(t,e,n,r){var o,i;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');return(o=t._events)?(o.newListener&&(t.emit("newListener",e,n.listener||n),o=t._events),i=o[e]):(o=t._events=f(null),t._eventsCount=0),i?("function"==typeof i?i=o[e]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),i.warned||(r=u(t))&&0r&&(i.warned=!0,(r=new Error("Possible EventEmitter memory leak detected. "+i.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.')).name="MaxListenersExceededWarning",r.emitter=t,r.type=e,r.count=i.length,"object"==typeof console)&&console.warn&&console.warn("%s: %s",r.name,r.message)):(i=o[e]=n,++t._eventsCount),t}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e>1,p=-7,f=n?o-1:0,h=n?-1:1,o=t[e+f];for(f+=h,i=o&(1<<-p)-1,o>>=-p,p+=a;0>=-p,p+=r;0>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,l=r?1:-1,i=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(r=Math.pow(2,-s))<1&&(s--,r*=2),2<=(e+=1<=s+p?f/r:f*Math.pow(2,1-p))*r&&(s++,r/=2),u<=s+p?(a=0,s=u):1<=s+p?(a=(e*r-1)*Math.pow(2,o),s+=p):(a=e*Math.pow(2,p-1)*Math.pow(2,o),s=0));8<=o;t[n+h]=255&a,h+=l,a/=256,o-=8);for(s=s<=this._reconnectionAttempts?(p("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1):(t=this.backoff.duration(),p("will wait %dms before reconnect attempt",t),this.reconnecting=!0,e=setTimeout(function(){n.skipReconnect||(p("attempting reconnect"),n.emitAll("reconnect_attempt",n.backoff.attempts),n.emitAll("reconnecting",n.backoff.attempts),n.skipReconnect)||n.open(function(t){t?(p("reconnect attempt error"),n.reconnecting=!1,n.reconnect(),n.emitAll("reconnect_error",t.data)):(p("reconnect success"),n.onreconnect())})},t),this.subs.push({destroy:function(){clearTimeout(e)}}))},l.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},{"./on":60,"./socket":61,backo2:23,"component-bind":29,"component-emitter":30,debug:63,"engine.io-client":33,indexof:52,"socket.io-parser":66}],60:[function(t,e,n){e.exports=function(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}},{}],61:[function(t,e,n){var o=t("socket.io-parser"),r=t("component-emitter"),i=t("to-array"),s=t("./on"),a=t("component-bind"),c=t("debug")("socket.io-client:socket"),u=t("parseqs"),p=t("has-binary2"),f=(e.exports=l,{connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1}),h=r.prototype.emit;function l(t,e,n){this.io=t,this.nsp=e,(this.json=this).ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}r(l.prototype),l.prototype.subEvents=function(){var t;this.subs||(t=this.io,this.subs=[s(t,"open",a(this,"onopen")),s(t,"packet",a(this,"onpacket")),s(t,"close",a(this,"onclose"))])},l.prototype.open=l.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.reconnecting||this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},l.prototype.send=function(){var t=i(arguments);return t.unshift("message"),this.emit.apply(this,t),this},l.prototype.emit=function(t){var e,n;return f.hasOwnProperty(t)?h.apply(this,arguments):(e=i(arguments),(n={type:(void 0!==this.flags.binary?this.flags.binary:p(e))?o.BINARY_EVENT:o.EVENT,data:e,options:{}}).options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={}),this},l.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},l.prototype.onopen=function(){var t;c("transport is open - connecting"),"/"!==this.nsp&&(this.query?(t="object"==typeof this.query?u.encode(this.query):this.query,c("sending connect packet with query %s",t),this.packet({type:o.CONNECT,query:t})):this.packet({type:o.CONNECT}))},l.prototype.onclose=function(t){c("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},l.prototype.onpacket=function(t){var e=t.nsp===this.nsp,n=t.type===o.ERROR&&"/"===t.nsp;if(e||n)switch(t.type){case o.CONNECT:this.onconnect();break;case o.EVENT:case o.BINARY_EVENT:this.onevent(t);break;case o.ACK:case o.BINARY_ACK:this.onack(t);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",t.data)}},l.prototype.onevent=function(t){var e=t.data||[];c("emitting event %j",e),null!=t.id&&(c("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?h.apply(this,e):this.receiveBuffer.push(e)},l.prototype.ack=function(e){var n=this,r=!1;return function(){var t;r||(r=!0,t=i(arguments),c("sending ack %j",t),n.packet({type:p(t)?o.BINARY_ACK:o.ACK,id:e,data:t}))}},l.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(c("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):c("bad ack %s",t.id)},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emit("connect")},l.prototype.emitBuffered=function(){for(var t=0;t