this.packet(a)}};m.prototype.cleanup=function(){vara;while(a=this.subs.shift())a.destroy();this.packetBuffer=[];this.encoding=false;this.decoder.destroy()};m.prototype.close=m.prototype.disconnect=function(){this.skipReconnect=true;this.engine.close()};m.prototype.onclose=function(a){l("close");this.cleanup();this.readyState="closed";this.emit("close",a);if(this._reconnection&&!this.skipReconnect){this.reconnect()}};m.prototype.reconnect=function(){if(this.reconnecting)returnthis;vara=this;this.attempts++;if(this.attempts>this._reconnectionAttempts){l("reconnect failed");this.emitAll("reconnect_failed");this.reconnecting=false}else{varb=this.attempts*this.reconnectionDelay();b=Math.min(b,this.reconnectionDelayMax());l("will wait %dms before reconnect attempt",b);this.reconnecting=true;varc=setTimeout(function(){l("attempting reconnect");a.emitAll("reconnect_attempt",a.attempts);a.emitAll("reconnecting",a.attempts);a.open(function(b){if(b){l("reconnect attempt error");a.reconnecting=false;a.reconnect();a.emitAll("reconnect_error",b.data)}else{l("reconnect success");a.onreconnect()}})},b);this.subs.push({destroy:function(){clearTimeout(c)}})}};m.prototype.onreconnect=function(){vara=this.attempts;this.attempts=0;this.reconnecting=false;this.emitAll("reconnect",a)}},{"./on":4,"./socket":5,"./url":6,"component-bind":7,"component-emitter":8,debug:9,"engine.io-client":11,"object-component":37,"socket.io-parser":40}],4:[function(a,b,c){b.exports=d;functiond(a,b,c){a.on(b,c);return{destroy:function(){a.removeListener(b,c)}}}},{}],5:[function(a,b,c){vard=a("socket.io-parser");vare=a("component-emitter");varf=a("to-array");varg=a("./on");varh=a("component-bind");vari=a("debug")("socket.io-client:socket");varj=a("has-binary-data");vark=a("indexof");b.exports=c=n;varl={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1};varm=e.prototype.emit;functionn(a,b){this.io=a;this.nsp=b;this.json=this;this.ids=0;this.acks={};this.open();this.receiveBuffer=[];this.sendBuffer=[];this.connected=false;this.disconnected=true;this.subEvents()}e(n.prototype);n.prototype.subEvents=function(){vara=this.io;this.subs=[g(a,"open",h(this,"onopen")),g(a,"packet",h(this,"onpacket")),g(a,"close",h(this,"onclose"))]};n.prototype.open=n.prototype.connect=function(){if(this.connected)returnthis;this.io.open();if("open"==this.io.readyState)this.onopen();returnthis};n.prototype.send=function(){vara=f(arguments);a.unshift("message");this.emit.apply(this,a);returnthis};n.prototype.emit=function(a){if(l.hasOwnProperty(a)){m.apply(this,arguments);returnthis}varb=f(arguments);varc=d.EVENT;if(j(b)){c=d.BINARY_EVENT}vare={type:c,data:b};if("function"==typeofb[b.length-1]){i("emitting packet with ack id %d",this.ids);this.acks[this.ids]=b.pop();e.id=this.ids++}if(this.connected){this.packet(e)}else{this.sendBuffer.push(e)}returnthis};n.prototype.packet=function(a){a.nsp=this.nsp;this.io.packet(a)};n.prototype.onopen=function(){i("transport is open - connecting");if("/"!=this.nsp){this.packet({type:d.CONNECT})}};n.prototype.onclose=function(a){i("close (%s)",a);this.connected=false;this.disconnected=true;this.emit("disconnect",a)};n.prototype.onpacket=function(a){if(a.nsp!=this.nsp)return;switch(a.type){cased.CONNECT:this.onconnect();break;cased.EVENT:this.onevent(a);break;cased.BINARY_EVENT:this.onevent(a);break;cased.ACK:this.onack(a);break;cased.BINARY_ACK:this.onack(a);break;cased.DISCONNECT:this.ondisconnect();break;cased.ERROR:this.emit("error",a.data);break}};n.prototype.onevent=function(a){varb=a.data||[];i("emitting event %j",b);if(null!=a.id){i("attaching ack callback to event");b.push(this.ack(a.id))}if(this.connected){m.apply(this,b)}else{this.receiveBuffer.push(b)}};n.prototype.ack=function(a){varb=this;varc=false;returnfunction(){if(c)return;c=true;vare=f(arguments);i("sending ack %j",e);varg=j(e)?d.BINARY_ACK:d.ACK;b.packet({type:g,id:a,data:e})}};n.prototype.onack=function(a){i("calling ack %s with %j",a.id,a.data);va
}vare=g.decode(a.substr(1));if(b==="blob"&&n){e=newn([e])}return{type:c,data:e}};c.encodePayload=function(a,b,d){if(typeofb=="function"){d=b;b=null}if(b){if(n&&!j){returnc.encodePayloadAsBlob(a,d)}returnc.encodePayloadAsArrayBuffer(a,d)}if(!a.length){returnd("0:")}functione(a){returna.length+":"+a}functionf(a,d){c.encodePacket(a,b,function(a){d(null,e(a))})}r(a,f,function(a,b){returnd(b.join(""))})};functionr(a,b,c){vard=newArray(a.length);vare=h(a.length,c);varf=function(a,c,e){b(c,function(b,c){d[a]=c;e(b,d)})};for(varg=0;g<a.length;g++){f(g,a[g],e)}}c.decodePayload=function(a,b,d){if(typeofa!="string"){returnc.decodePayloadAsBinary(a,b,d)}if(typeofb==="function"){d=b;b=null}vare;if(a==""){returnd(m,0,1)}varf="",g,h;for(vari=0,j=a.length;i<j;i++){vark=a.charAt(i);if(":"!=k){f+=k}else{if(""==f||f!=(g=Number(f))){returnd(m,0,1)}h=a.substr(i+1,g);if(f!=h.length){returnd(m,0,1)}if(h.length){e=c.decodePacket(h,b);if(m.type==e.type&&m.data==e.data){returnd(m,0,1)}varl=d(e,i+g,j);if(false===l)return}i+=g;f=""}}if(f!=""){returnd(m,0,1)}};c.encodePayloadAsArrayBuffer=function(a,b){if(!a.length){returnb(newArrayBuffer(0))}functiond(a,b){c.encodePacket(a,true,function(a){returnb(null,a)})}r(a,d,function(a,c){vard=c.reduce(function(a,b){varc;if(typeofb==="string"){c=b.length}else{c=b.byteLength}returna+c.toString().length+c+2},0);vare=newUint8Array(d);varf=0;c.forEach(function(a){varb=typeofa==="string";varc=a;if(b){vard=newUint8Array(a.length);for(varg=0;g<a.length;g++){d[g]=a.charCodeAt(g)}c=d.buffer}if(b){e[f++]=0}else{e[f++]=1}varh=c.byteLength.toString();for(varg=0;g<h.length;g++){e[f++]=parseInt(h[g])}e[f++]=255;vard=newUint8Array(c);for(varg=0;g<d.length;g++){e[f++]=d[g]}});returnb(e.buffer)})};c.encodePayloadAsBlob=function(a,b){functiond(a,b){c.encodePacket(a,true,function(a){varc=newUint8Array(1);c[0]=1;if(typeofa==="string"){vard=newUint8Array(a.length);for(vare=0;e<a.length;e++){d[e]=a.charCodeAt(e)}a=d.buffer;c[0]=0}varf=ainstanceofArrayBuffer?a.byteLength:a.size;varg=f.toString();varh=newUint8Array(g.length+1);for(vare=0;e<g.length;e++){h[e]=parseInt(g[e])}h[g.length]=255;if(n){vari=newn([c.buffer,h.buffer,a]);b(null,i)}})}r(a,d,function(a,c){returnb(newn(c))})};c.decodePayloadAsBinary=function(a,b,d){if(typeofb==="function"){d=b;b=null}vare=a;varg=[];while(e.byteLength>0){varh=newUint8Array(e);vari=h[0]===0;varj="";for(vark=1;;k++){if(h[k]==255)break;j+=h[k]}e=f(e,2+j.length);j=parseInt(j);varl=f(e,0,j);if(i){try{l=String.fromCharCode.apply(null,newUint8Array(l))}catch(m){varn=newUint8Array(l);l="";for(vark=0;k<n.length;k++){l+=String.fromCharCode(n[k])}}}g.push(l);e=f(e,j)}varo=g.length;g.forEach(function(a,e){d(c.decodePacket(a,b),e,o)})}},{"./keys":23,after:24,"arraybuffer.slice":25,"base64-arraybuffer":26,blob:27,utf8:28}],23:[function(a,b,c){b.exports=Object.keys||functiond(a){varb=[];varc=Object.prototype.hasOwnProperty;for(vardina){if(c.call(a,d)){b.push(d)}}returnb}},{}],24:[function(a,b,c){b.exports=d;functiond(a,b,c){vard=false;c=c||e;f.count=a;returna===0?b():f;functionf(a,e){if(f.count<=0){thrownewError("after called too many times")}--f.count;if(a){d=true;b(a);b=c}elseif(f.count===0&&!d){b(null,e)}}}functione(){}},{}],25:[function(a,b,c){b.exports=function(a,b,c){vard=a.byteLength;b=b||0;c=c||d;if(a.slice){returna.slice(b,c)}if(b<0){b+=d}if(c<0){c+=d}if(c>d){c=d}if(b>=d||b>=c||d===0){returnnewArrayBuffer(0)}vare=newUint8Array(a);varf=newUint8Array(c-b);for(varg=b,h=0;g<c;g++,h++){f[h]=e[g]}returnf.buffer}},{}],26:[function(a,b,c){(function(a){"use strict";c.encode=function(b){varc=newUint8Array(b),d,e=c.length,f="";for(d=0;d<e;d+=3){f+=a[c[d]>>2];f+=a[(c[d]&3)<<4|c[d+1]>>4];f+=a[(c[d+1]&15)<<2|c[d+2]>>6];f+=a[c[d+2]&63]}if(e%3===2){f=f.substring(0,f.length-1)+"="}elseif(e%3===1){f=f.substring(0,f.length-2)+"=="}returnf};c.decode=function(b){varc=b.length*.75,d=b.length,e,f=0,g,h,i,j;if(b[b.length-1]==="="){c--;if(b[b.length-2]==="="){c--}}vark=newArrayBuffer(c),l=newUint8Array(k);for(e=0
case"String":if(!k(a[b])){returna[b]===c}if(!d){returnfalse}returnm(a[b],c);default:thrownewTypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}};f.commonPath=function(a,b){varc=Math.min(a.length,b.length);vard;for(d=0;d<c;d++){if(a.charAt(d)!==b.charAt(d)){d--;break}}if(d<1){returna.charAt(0)===b.charAt(0)&&a.charAt(0)==="/"?"/":""}if(a.charAt(d)!=="/"||b.charAt(d)!=="/"){d=a.substring(0,d).lastIndexOf("/")}returna.substring(0,d+1)};f.withinString=function(a,b,c){c||(c={});vard=c.start||f.findUri.start;vare=c.end||f.findUri.end;varg=c.trim||f.findUri.trim;varh=/[a-z0-9-]=["']?$/i;d.lastIndex=0;while(true){vari=d.exec(a);if(!i){break}varj=i.index;if(c.ignoreHtml){vark=a.slice(Math.max(j-3,0),j);if(k&&h.test(k)){continue}}varl=j+a.slice(j).search(e);varm=a.slice(j,l).replace(g,"");if(c.ignore&&c.ignore.test(m)){continue}l=j+m.length;varn=b(m,j,l,a);a=a.slice(0,j)+n+a.slice(l);d.lastIndex=j+n.length}d.lastIndex=0;returna};f.ensureValidHostname=function(b){if(b.match(f.invalid_hostname_characters)){if(!a){thrownewTypeError('Hostname "'+b+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available')}if(a.toASCII(b).match(f.invalid_hostname_characters)){thrownewTypeError('Hostname "'+b+'" contains characters other than [A-Z0-9.-]')}}};f.noConflict=function(a){if(a){varb={URI:this.noConflict()};if(d.URITemplate&&typeofd.URITemplate.noConflict==="function"){b.URITemplate=d.URITemplate.noConflict()}if(d.IPv6&&typeofd.IPv6.noConflict==="function"){b.IPv6=d.IPv6.noConflict()}if(d.SecondLevelDomains&&typeofd.SecondLevelDomains.noConflict==="function"){b.SecondLevelDomains=d.SecondLevelDomains.noConflict()}returnb}elseif(d.URI===this){d.URI=e}returnthis};g.build=function(a){if(a===true){this._deferred_build=true}elseif(a===undefined||this._deferred_build){this._string=f.build(this._parts);this._deferred_build=false}returnthis};g.clone=function(){returnnewf(this)};g.valueOf=g.toString=function(){returnthis.build(false)._string};q={protocol:"protocol",username:"username",password:"password",hostname:"hostname",port:"port"};s=function(a){returnfunction(b,c){if(b===undefined){returnthis._parts[a]||""}else{this._parts[a]=b||null;this.build(!c);returnthis}}};for(rinq){g[r]=s(q[r])}q={query:"?",fragment:"#"};s=function(a,b){returnfunction(c,d){if(c===undefined){returnthis._parts[a]||""}else{if(c!==null){c=c+"";if(c.charAt(0)===b){c=c.substring(1)}}this._parts[a]=c;this.build(!d);returnthis}}};for(rinq){g[r]=s(r,q[r])}q={search:["?","query"],hash:["#","fragment"]};s=function(a,b){returnfunction(c,d){vare=this[a](c,d);returntypeofe==="string"&&e.length?b+e:e}};for(rinq){g[r]=s(q[r][1],q[r][0])}g.pathname=function(a,b){if(a===undefined||a===true){varc=this._parts.path||(this._parts.hostname?"/":"");returna?f.decodePath(c):c}else{this._parts.path=a?f.recodePath(a):"/";this.build(!b);returnthis}};g.path=g.pathname;g.href=function(a,b){varc;if(a===undefined){returnthis.toString()}this._string="";this._parts=f._parts();vard=ainstanceoff;vare=typeofa==="object"&&(a.hostname||a.path||a.pathname);if(a.nodeName){varg=f.getDomAttribute(a);a=a[g]||"";e=false}if(!d&&e&&a.pathname!==undefined){a=a.toString()}if(typeofa==="string"){this._parts=f.parse(a,this._parts)}elseif(d||e){vari=d?a._parts:a;for(cini){if(h.call(this._parts,c)){this._parts[c]=i[c]}}}else{thrownewTypeError("invalid input")}this.build(!b);returnthis};g.is=function(a){varb=false;vard=false;vare=false;varg=false;varh=false;vari=false;varj=false;vark=!this._parts.urn;if(this._parts.hostname){k=false;d=f.ip4_expression.test(this._parts.hostname);e=f.ip6_expression.test(this._parts.hostname);b=d||e;g=!b;h=g&&c&&c.has(this._parts.hostname);i=g&&f.idn_expression.test(this._parts.hostname);j=g&&f.punycode_expression.test(this._parts.hostname)}switch(a.toLowerCase()){case"relative":returnk;case"absolute":return!k;case"domain":case"name":returng;case"sld":returnh;case"ip":returnb;case"ip4":case"ipv4":case"inet4":returnd;case"ip6":case"i