git Merge branch 'master' of vcs.fsf.org:libreplanet-static
[libreplanet-static.git] / 2019 / assets / js / engine.io.bundle.min.js
1 !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.eio=e()}}(function(){var e;return function t(e,n,i){function s(o,r){if(!n[o]){if(!e[o]){var c="function"==typeof require&&require;if(!r&&c)return c(o,!0);if(a)return a(o,!0);throw new Error("Cannot find module '"+o+"'")}var l=n[o]={exports:{}};e[o][0].call(l.exports,function(t){var n=e[o][1][t];return s(n?n:t)},l,l.exports,t,e,n,i)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)s(i[o]);return s}({1:[function(e,t){t.exports=e("./lib/")},{"./lib/":2}],2:[function(e,t){t.exports=e("./socket"),t.exports.parser=e("engine.io-parser")},{"./socket":3,"engine.io-parser":15}],3:[function(e,t){(function(n){function i(e,t){if(!(this instanceof i))return new i(e,t);if(t=t||{},e&&"object"==typeof e&&(t=e,e=null),e&&(e=h(e),t.host=e.host,t.secure="https"==e.protocol||"wss"==e.protocol,t.port=e.port,e.query&&(t.query=e.query)),this.secure=null!=t.secure?t.secure:n.location&&"https:"==location.protocol,t.host){var s=t.host.split(":");t.hostname=s.shift(),s.length&&(t.port=s.pop())}this.agent=t.agent||!1,this.hostname=t.hostname||(n.location?location.hostname:"localhost"),this.port=t.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=d.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.open(),this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades}function s(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var a=e("./transports"),o=e("component-emitter"),r=e("debug")("engine.io-client:socket"),c=e("indexof"),l=e("engine.io-parser"),h=e("parseuri"),p=e("parsejson"),d=e("parseqs");t.exports=i,i.priorWebsocketSuccess=!1,o(i.prototype),i.protocol=l.protocol,i.Socket=i,i.Transport=e("./transport"),i.transports=e("./transports"),i.parser=e("engine.io-parser"),i.prototype.createTransport=function(e){r('creating transport "%s"',e);var t=s(this.query);t.EIO=l.protocol,t.transport=e,this.id&&(t.sid=this.id);var n=new a[e]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:t,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this});return n},i.prototype.open=function(){var e;if(this.rememberUpgrade&&i.priorWebsocketSuccess&&-1!=this.transports.indexOf("websocket"))e="websocket";else{if(0==this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";var e;try{e=this.createTransport(e)}catch(n){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},i.prototype.setTransport=function(e){r("setting transport %s",e.name);var t=this;this.transport&&(r("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},i.prototype.probe=function(e){function t(){if(d.onlyBinaryUpgrades){var t=!this.supportsBinary&&d.transport.supportsBinary;p=p||t}p||(r('probe transport "%s" opened',e),h.send([{type:"ping",data:"probe"}]),h.once("packet",function(t){if(!p)if("pong"==t.type&&"probe"==t.data)r('probe transport "%s" pong',e),d.upgrading=!0,d.emit("upgrading",h),i.priorWebsocketSuccess="websocket"==h.name,r('pausing current transport "%s"',d.transport.name),d.transport.pause(function(){p||"closed"!=d.readyState&&"closing"!=d.readyState&&(r("changing transport and sending upgrade packet"),l(),d.setTransport(h),h.send([{type:"upgrade"}]),d.emit("upgrade",h),h=null,d.upgrading=!1,d.flush())});else{r('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=h.name,d.emit("upgradeError",n)}}))}function n(){p||(p=!0,l(),h.close(),h=null)}function s(t){var i=new Error("probe error: "+t);i.transport=h.name,n(),r('probe transport "%s" failed because of error: %s',e,t),d.emit("upgradeError",i)}function a(){s("transport closed")}function o(){s("socket closed")}function c(e){h&&e.name!=h.name&&(r('"%s" works - aborting "%s"',e.name,h.name),n())}function l(){h.removeListener("open",t),h.removeListener("error",s),h.removeListener("close",a),d.removeListener("close",o),d.removeListener("upgrading",c)}r('probing transport "%s"',e);var h=this.createTransport(e,{probe:1}),p=!1,d=this;i.priorWebsocketSuccess=!1,h.once("open",t),h.once("error",s),h.once("close",a),this.once("close",o),this.once("upgrading",c),h.open()},i.prototype.onOpen=function(){if(r("socket open"),this.readyState="open",i.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){r("starting upgrade probes");for(var e=0,t=this.upgrades.length;t>e;e++)this.probe(this.upgrades[e])}},i.prototype.onPacket=function(e){if("opening"==this.readyState||"open"==this.readyState)switch(r('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(p(e.data));break;case"pong":this.setPing();break;case"error":var t=new Error("server error");t.code=e.data,this.emit("error",t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else r('packet received with socket readyState "%s"',this.readyState)},i.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!=this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},i.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!=t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},i.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){r("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},i.prototype.ping=function(){this.sendPacket("ping")},i.prototype.onDrain=function(){for(var e=0;e<this.prevBufferLen;e++)this.callbackBuffer[e]&&this.callbackBuffer[e]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0==this.writeBuffer.length?this.emit("drain"):this.flush()},i.prototype.flush=function(){"closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(r("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},i.prototype.write=i.prototype.send=function(e,t){return this.sendPacket("message",e,t),this},i.prototype.sendPacket=function(e,t,n){var i={type:e,data:t};this.emit("packetCreate",i),this.writeBuffer.push(i),this.callbackBuffer.push(n),this.flush()},i.prototype.close=function(){return("opening"==this.readyState||"open"==this.readyState)&&(this.onClose("forced close"),r("socket closing - telling transport to close"),this.transport.close()),this},i.prototype.onError=function(e){r("socket error %j",e),i.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},i.prototype.onClose=function(e,t){if("opening"==this.readyState||"open"==this.readyState){r('socket close with reason: "%s"',e);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){n.writeBuffer=[],n.callbackBuffer=[],n.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t)}},i.prototype.filterUpgrades=function(e){for(var t=[],n=0,i=e.length;i>n;n++)~c(this.transports,e[n])&&t.push(e[n]);return t}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./transport":4,"./transports":5,"component-emitter":12,debug:14,"engine.io-parser":15,indexof:23,parsejson:24,parseqs:25,parseuri:26}],4:[function(e,t){function n(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR}var i=e("engine.io-parser"),s=e("component-emitter");t.exports=n,s(n.prototype),n.timestamps=0,n.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},n.prototype.open=function(){return("closed"==this.readyState||""==this.readyState)&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return("opening"==this.readyState||"open"==this.readyState)&&(this.doClose(),this.onClose()),this},n.prototype.send=function(e){if("open"!=this.readyState)throw new Error("Transport not open");this.write(e)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(e){var t=i.decodePacket(e,this.socket.binaryType);this.onPacket(t)},n.prototype.onPacket=function(e){this.emit("packet",e)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":12,"engine.io-parser":15}],5:[function(e,t,n){(function(t){function i(e){var n,i=!1,r=!1,c=!1!==e.jsonp;if(t.location){var l="https:"==location.protocol,h=location.port;h||(h=l?443:80),i=e.hostname!=location.hostname||h!=e.port,r=e.secure!=l}if(e.xdomain=i,e.xscheme=r,n=new s(e),"open"in n&&!e.forceJSONP)return new a(e);if(!c)throw new Error("JSONP disabled");return new o(e)}var s=e("xmlhttprequest"),a=e("./polling-xhr"),o=e("./polling-jsonp"),r=e("./websocket");n.polling=i,n.websocket=r}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling-jsonp":6,"./polling-xhr":7,"./websocket":9,xmlhttprequest:10}],6:[function(e,t){(function(n){function i(){}function s(e){a.call(this,e),this.query=this.query||{},r||(n.___eio||(n.___eio=[]),r=n.___eio),this.index=r.length;var t=this;r.push(function(e){t.onData(e)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){t.script&&(t.script.onerror=i)})}var a=e("./polling"),o=e("component-inherit");t.exports=s;var r,c=/\n/g,l=/\\n/g;o(s,a),s.prototype.supportsBinary=!1,s.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null),a.prototype.doClose.call(this)},s.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n),this.script=t;var i="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);i&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},s.prototype.doWrite=function(e,t){function n(){i(),t()}function i(){if(s.iframe)try{s.form.removeChild(s.iframe)}catch(e){s.onError("jsonp polling iframe removal error",e)}try{var t='<iframe src="javascript:0" name="'+s.iframeId+'">';a=document.createElement(t)}catch(e){a=document.createElement("iframe"),a.name=s.iframeId,a.src="javascript:0"}a.id=s.iframeId,s.form.appendChild(a),s.iframe=a}var s=this;if(!this.form){var a,o=document.createElement("form"),r=document.createElement("textarea"),h=this.iframeId="eio_iframe_"+this.index;o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=h,o.method="POST",o.setAttribute("accept-charset","utf-8"),r.name="d",o.appendChild(r),document.body.appendChild(o),this.form=o,this.area=r}this.form.action=this.uri(),i(),e=e.replace(l,"\\\n"),this.area.value=e.replace(c,"\\n");try{this.form.submit()}catch(p){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"==s.iframe.readyState&&n()}:this.iframe.onload=n}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":8,"component-inherit":13}],7:[function(e,t){(function(n){function i(){}function s(e){if(c.call(this,e),n.location){var t="https:"==location.protocol,i=location.port;i||(i=t?443:80),this.xd=e.hostname!=n.location.hostname||i!=e.port,this.xs=e.secure!=t}}function a(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!=e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.create()}function o(){for(var e in a.requests)a.requests.hasOwnProperty(e)&&a.requests[e].abort()}var r=e("xmlhttprequest"),c=e("./polling"),l=e("component-emitter"),h=e("component-inherit"),p=e("debug")("engine.io-client:polling-xhr");t.exports=s,t.exports.Request=a,h(s,c),s.prototype.supportsBinary=!0,s.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,new a(e)},s.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,i=this.request({method:"POST",data:e,isBinary:n}),s=this;i.on("success",t),i.on("error",function(e){s.onError("xhr post error",e)}),this.sendXhr=i},s.prototype.doPoll=function(){p("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},l(a.prototype),a.prototype.create=function(){var e=this.xhr=new r({agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR}),t=this;try{if(p("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async),this.supportsBinary&&(e.responseType="arraybuffer"),"POST"==this.method)try{this.isBinary?e.setRequestHeader("Content-type","application/octet-stream"):e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(i){}"withCredentials"in e&&(e.withCredentials=!0),this.hasXDR()?(e.onload=function(){t.onLoad()},e.onerror=function(){t.onError(e.responseText)}):e.onreadystatechange=function(){4==e.readyState&&(200==e.status||1223==e.status?t.onLoad():setTimeout(function(){t.onError(e.status)},0))},p("xhr data %s",this.data),e.send(this.data)}catch(i){return void setTimeout(function(){t.onError(i)},0)}n.document&&(this.index=a.requestsCount++,a.requests[this.index]=this)},a.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},a.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},a.prototype.onError=function(e){this.emit("error",e),this.cleanup()},a.prototype.cleanup=function(){if("undefined"!=typeof this.xhr&&null!==this.xhr){this.hasXDR()?this.xhr.onload=this.xhr.onerror=i:this.xhr.onreadystatechange=i;try{this.xhr.abort()}catch(e){}n.document&&delete a.requests[this.index],this.xhr=null}},a.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(n){}e="application/octet-stream"===t?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(n){this.onError(n)}null!=e&&this.onData(e)},a.prototype.hasXDR=function(){return"undefined"!=typeof n.XDomainRequest&&!this.xs&&this.enablesXDR},a.prototype.abort=function(){this.cleanup()},n.document&&(a.requestsCount=0,a.requests={},n.attachEvent?n.attachEvent("onunload",o):n.addEventListener&&n.addEventListener("beforeunload",o))}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":8,"component-emitter":12,"component-inherit":13,debug:14,xmlhttprequest:10}],8:[function(e,t){function n(e){var t=e&&e.forceBase64;(!c||t)&&(this.supportsBinary=!1),i.call(this,e)}var i=e("../transport"),s=e("parseqs"),a=e("engine.io-parser"),o=e("component-inherit"),r=e("debug")("engine.io-client:polling");t.exports=n;var c=function(){var t=e("xmlhttprequest"),n=new t({agent:this.agent,xdomain:!1});return null!=n.responseType}();o(n,i),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(e){function t(){r("paused"),n.readyState="paused",e()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var i=0;this.polling&&(r("we are currently polling - waiting to pause"),i++,this.once("pollComplete",function(){r("pre-pause polling complete"),--i||t()})),this.writable||(r("we are currently writing - waiting to pause"),i++,this.once("drain",function(){r("pre-pause writing complete"),--i||t()}))}else t()},n.prototype.poll=function(){r("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(e){var t=this;r("polling got data %s",e);var n=function(e){return"opening"==t.readyState&&t.onOpen(),"close"==e.type?(t.onClose(),!1):void t.onPacket(e)};a.decodePayload(e,this.socket.binaryType,n),"closed"!=this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"==this.readyState?this.poll():r('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function e(){r("writing close packet"),t.write([{type:"close"}])}var t=this;"open"==this.readyState?(r("transport open - closing"),e()):(r("transport not open - deferring close"),this.once("open",e))},n.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")},t=this;a.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},n.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=+new Date+"-"+i.timestamps++),this.supportsBinary||e.sid||(e.b64=1),e=s.encode(e),this.port&&("https"==t&&443!=this.port||"http"==t&&80!=this.port)&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+this.hostname+n+this.path+e}},{"../transport":4,"component-inherit":13,debug:14,"engine.io-parser":15,parseqs:25,xmlhttprequest:10}],9:[function(e,t){function n(e){var t=e&&e.forceBase64;t&&(this.supportsBinary=!1),i.call(this,e)}var i=e("../transport"),s=e("engine.io-parser"),a=e("parseqs"),o=e("component-inherit"),r=e("debug")("engine.io-client:websocket"),c=e("ws");t.exports=n,o(n,i),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=void 0,n={agent:this.agent};this.ws=new c(e,t,n),void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.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)}},"undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(e){var t=this;setTimeout(function(){i.prototype.onData.call(t,e)},0)}),n.prototype.write=function(e){function t(){n.writable=!0,n.emit("drain")}var n=this;this.writable=!1;for(var i=0,a=e.length;a>i;i++)s.encodePacket(e[i],this.supportsBinary,function(e){try{n.ws.send(e)}catch(t){r("websocket closed before onclose event")}});setTimeout(t,0)},n.prototype.onClose=function(){i.prototype.onClose.call(this)},n.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},n.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"==t&&443!=this.port||"ws"==t&&80!=this.port)&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=+new Date),this.supportsBinary||(e.b64=1),e=a.encode(e),e.length&&(e="?"+e),t+"://"+this.hostname+n+this.path+e},n.prototype.check=function(){return!(!c||"__initialize"in c&&this.name===n.prototype.name)}},{"../transport":4,"component-inherit":13,debug:14,"engine.io-parser":15,parseqs:25,ws:27}],10:[function(e,t){var n=e("has-cors");t.exports=function(e){var t=e.xdomain,i=e.xscheme,s=e.enablesXDR;try{if("undefined"!=typeof XDomainRequest&&!i&&s)return new XDomainRequest}catch(a){}try{if("undefined"!=typeof XMLHttpRequest&&(!t||n))return new XMLHttpRequest}catch(a){}if(!t)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}},{"has-cors":21}],11:[function(e,t){(function(e){function n(e,t){t=t||{};for(var n=new i,s=0;s<e.length;s++)n.append(e[s]);return t.type?n.getBlob(t.type):n.getBlob()}var i=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,s=function(){try{var e=new Blob(["hi"]);return 2==e.size}catch(t){return!1}}(),a=i&&i.prototype.append&&i.prototype.getBlob;t.exports=function(){return s?e.Blob:a?n:void 0}()}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],12:[function(e,t){function n(e){return e?i(e):void 0}function i(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){i.off(e,n),t.apply(this,arguments)}var i=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var i,s=0;s<n.length;s++)if(i=n[s],i===t||i.fn===t){n.splice(s,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks[e];if(n){n=n.slice(0);for(var i=0,s=n.length;s>i;++i)n[i].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],13:[function(e,t){t.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],14:[function(e,t){function n(e){return n.enabled(e)?function(t){t=i(t);var s=new Date,a=s-(n[e]||s);n[e]=s,t=e+" "+t+" +"+n.humanize(a),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function i(e){return e instanceof Error?e.stack||e.message:e}t.exports=n,n.names=[],n.skips=[],n.enable=function(e){try{localStorage.debug=e}catch(t){}for(var i=(e||"").split(/[\s,]+/),s=i.length,a=0;s>a;a++)e=i[a].replace("*",".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$"))},n.disable=function(){n.enable("")},n.humanize=function(e){var t=1e3,n=6e4,i=60*n;return e>=i?(e/i).toFixed(1)+"h":e>=n?(e/n).toFixed(1)+"m":e>=t?(e/t|0)+"s":e+"ms"},n.enabled=function(e){for(var t=0,i=n.skips.length;i>t;t++)if(n.skips[t].test(e))return!1;for(var t=0,i=n.names.length;i>t;t++)if(n.names[t].test(e))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch(s){}},{}],15:[function(e,t,n){(function(t){function i(e,t,i){if(!t)return n.encodeBase64Packet(e,i);var s=e.data,a=new Uint8Array(s),o=new Uint8Array(1+s.byteLength);o[0]=u[e.type];for(var r=0;r<a.length;r++)o[r+1]=a[r];return i(o.buffer)}function s(e,t,i){if(!t)return n.encodeBase64Packet(e,i);var s=new FileReader;return s.onload=function(){e.data=s.result,n.encodePacket(e,t,!0,i)},s.readAsArrayBuffer(e.data)}function a(e,t,i){if(!t)return n.encodeBase64Packet(e,i);if(d)return s(e,t,i);var a=new Uint8Array(1);a[0]=u[e.type];var o=new g([a.buffer,e.data]);return i(o)}function o(e,t,n){for(var i=new Array(e.length),s=h(e.length,n),a=function(e,n,s){t(n,function(t,n){i[e]=n,s(t,i)})},o=0;o<e.length;o++)a(o,e[o],s)}var r=e("./keys"),c=e("arraybuffer.slice"),l=e("base64-arraybuffer"),h=e("after"),p=e("utf8"),d=navigator.userAgent.match(/Android/i);n.protocol=3;var u=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},f=r(u),m={type:"error",data:"parser error"},g=e("blob");n.encodePacket=function(e,n,s,o){"function"==typeof n&&(o=n,n=!1),"function"==typeof s&&(o=s,s=null);var r=void 0===e.data?void 0:e.data.buffer||e.data;if(t.ArrayBuffer&&r instanceof ArrayBuffer)return i(e,n,o);if(g&&r instanceof t.Blob)return a(e,n,o);var c=u[e.type];return void 0!==e.data&&(c+=s?p.encode(String(e.data)):String(e.data)),o(""+c)},n.encodeBase64Packet=function(e,i){var s="b"+n.packets[e.type];if(g&&e.data instanceof g){var a=new FileReader;return a.onload=function(){var e=a.result.split(",")[1];i(s+e)},a.readAsDataURL(e.data)}var o;try{o=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(r){for(var c=new Uint8Array(e.data),l=new Array(c.length),h=0;h<c.length;h++)l[h]=c[h];o=String.fromCharCode.apply(null,l)}return s+=t.btoa(o),i(s)},n.decodePacket=function(e,t,i){if("string"==typeof e||void 0===e){if("b"==e.charAt(0))return n.decodeBase64Packet(e.substr(1),t);if(i)try{e=p.decode(e)}catch(s){return m}var a=e.charAt(0);return Number(a)==a&&f[a]?e.length>1?{type:f[a],data:e.substring(1)}:{type:f[a]}:m}var o=new Uint8Array(e),a=o[0],r=c(e,1);return g&&"blob"===t&&(r=new g([r])),{type:f[a],data:r}},n.decodeBase64Packet=function(e,n){var i=f[e.charAt(0)];if(!t.ArrayBuffer)return{type:i,data:{base64:!0,data:e.substr(1)}};var s=l.decode(e.substr(1));return"blob"===n&&g&&(s=new g([s])),{type:i,data:s}},n.encodePayload=function(e,t,i){function s(e){return e.length+":"+e}function a(e,i){n.encodePacket(e,t,!0,function(e){i(null,s(e))})}return"function"==typeof t&&(i=t,t=null),t?g&&!d?n.encodePayloadAsBlob(e,i):n.encodePayloadAsArrayBuffer(e,i):e.length?void o(e,a,function(e,t){return i(t.join(""))}):i("0:")},n.decodePayload=function(e,t,i){if("string"!=typeof e)return n.decodePayloadAsBinary(e,t,i);"function"==typeof t&&(i=t,t=null);var s;if(""==e)return i(m,0,1);for(var a,o,r="",c=0,l=e.length;l>c;c++){var h=e.charAt(c);if(":"!=h)r+=h;else{if(""==r||r!=(a=Number(r)))return i(m,0,1);if(o=e.substr(c+1,a),r!=o.length)return i(m,0,1);if(o.length){if(s=n.decodePacket(o,t,!0),m.type==s.type&&m.data==s.data)return i(m,0,1);var p=i(s,c+a,l);if(!1===p)return}c+=a,r=""}}return""!=r?i(m,0,1):void 0},n.encodePayloadAsArrayBuffer=function(e,t){function i(e,t){n.encodePacket(e,!0,!0,function(e){return t(null,e)})}return e.length?void o(e,i,function(e,n){var i=n.reduce(function(e,t){var n;return n="string"==typeof t?t.length:t.byteLength,e+n.toString().length+n+2},0),s=new Uint8Array(i),a=0;return n.forEach(function(e){var t="string"==typeof e,n=e;if(t){for(var i=new Uint8Array(e.length),o=0;o<e.length;o++)i[o]=e.charCodeAt(o);n=i.buffer}s[a++]=t?0:1;for(var r=n.byteLength.toString(),o=0;o<r.length;o++)s[a++]=parseInt(r[o]);s[a++]=255;for(var i=new Uint8Array(n),o=0;o<i.length;o++)s[a++]=i[o]}),t(s.buffer)}):t(new ArrayBuffer(0))},n.encodePayloadAsBlob=function(e,t){function i(e,t){n.encodePacket(e,!0,!0,function(e){var n=new Uint8Array(1);if(n[0]=1,"string"==typeof e){for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);e=i.buffer,n[0]=0}for(var a=e instanceof ArrayBuffer?e.byteLength:e.size,o=a.toString(),r=new Uint8Array(o.length+1),s=0;s<o.length;s++)r[s]=parseInt(o[s]);if(r[o.length]=255,g){var c=new g([n.buffer,r.buffer,e]);t(null,c)}})}o(e,i,function(e,n){return t(new g(n))})},n.decodePayloadAsBinary=function(e,t,i){"function"==typeof t&&(i=t,t=null);for(var s=e,a=[],o=!1;s.byteLength>0;){for(var r=new Uint8Array(s),l=0===r[0],h="",p=1;255!=r[p];p++){if(h.length>310){o=!0;break}h+=r[p]}if(o)return i(m,0,1);s=c(s,2+h.length),h=parseInt(h);var d=c(s,0,h);if(l)try{d=String.fromCharCode.apply(null,new Uint8Array(d))}catch(u){var f=new Uint8Array(d);d="";for(var p=0;p<f.length;p++)d+=String.fromCharCode(f[p])}a.push(d),s=c(s,h)}var g=a.length;a.forEach(function(e,s){i(n.decodePacket(e,t,!0),s,g)})}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./keys":16,after:17,"arraybuffer.slice":18,"base64-arraybuffer":19,blob:11,utf8:20}],16:[function(e,t){t.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var i in e)n.call(e,i)&&t.push(i);return t}},{}],17:[function(e,t){function n(e,t,n){function s(e,i){if(s.count<=0)throw new Error("after called too many times");--s.count,e?(a=!0,t(e),t=n):0!==s.count||a||t(null,i)}var a=!1;return n=n||i,s.count=e,0===e?t():s}function i(){}t.exports=n},{}],18:[function(e,t){t.exports=function(e,t,n){var i=e.byteLength;if(t=t||0,n=n||i,e.slice)return e.slice(t,n);if(0>t&&(t+=i),0>n&&(n+=i),n>i&&(n=i),t>=i||t>=n||0===i)return new ArrayBuffer(0);for(var s=new Uint8Array(e),a=new Uint8Array(n-t),o=t,r=0;n>o;o++,r++)a[r]=s[o];return a.buffer}},{}],19:[function(e,t,n){!function(e){"use strict";n.encode=function(t){var n,i=new Uint8Array(t),s=i.length,a="";for(n=0;s>n;n+=3)a+=e[i[n]>>2],a+=e[(3&i[n])<<4|i[n+1]>>4],a+=e[(15&i[n+1])<<2|i[n+2]>>6],a+=e[63&i[n+2]];return s%3===2?a=a.substring(0,a.length-1)+"=":s%3===1&&(a=a.substring(0,a.length-2)+"=="),a},n.decode=function(t){var n,i,s,a,o,r=.75*t.length,c=t.length,l=0;"="===t[t.length-1]&&(r--,"="===t[t.length-2]&&r--);var h=new ArrayBuffer(r),p=new Uint8Array(h);for(n=0;c>n;n+=4)i=e.indexOf(t[n]),s=e.indexOf(t[n+1]),a=e.indexOf(t[n+2]),o=e.indexOf(t[n+3]),p[l++]=i<<2|s>>4,p[l++]=(15&s)<<4|a>>2,p[l++]=(3&a)<<6|63&o;return h}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],20:[function(t,n,i){(function(t){!function(s){function a(e){for(var t,n,i=[],s=0,a=e.length;a>s;)t=e.charCodeAt(s++),t>=55296&&56319>=t&&a>s?(n=e.charCodeAt(s++),56320==(64512&n)?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),s--)):i.push(t);return i}function o(e){for(var t,n=e.length,i=-1,s="";++i<n;)t=e[i],t>65535&&(t-=65536,s+=w(t>>>10&1023|55296),t=56320|1023&t),s+=w(t);return s}function r(e,t){return w(e>>t&63|128)}function c(e){if(0==(4294967168&e))return w(e);var t="";return 0==(4294965248&e)?t=w(e>>6&31|192):0==(4294901760&e)?(t=w(e>>12&15|224),t+=r(e,6)):0==(4292870144&e)&&(t=w(e>>18&7|240),t+=r(e,12),t+=r(e,6)),t+=w(63&e|128)}function l(e){for(var t,n=a(e),i=n.length,s=-1,o="";++s<i;)t=n[s],o+=c(t);return o}function h(){if(v>=_)throw Error("Invalid byte index");var e=255&g[v];if(v++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function p(){var e,t,n,i,s;if(v>_)throw Error("Invalid byte index");if(v==_)return!1;if(e=255&g[v],v++,0==(128&e))return e;if(192==(224&e)){var t=h();if(s=(31&e)<<6|t,s>=128)return s;throw Error("Invalid continuation byte")}if(224==(240&e)){if(t=h(),n=h(),s=(15&e)<<12|t<<6|n,s>=2048)return s;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=h(),n=h(),i=h(),s=(15&e)<<18|t<<12|n<<6|i,s>=65536&&1114111>=s))return s;throw Error("Invalid UTF-8 detected")}function d(e){g=a(e),_=g.length,v=0;for(var t,n=[];(t=p())!==!1;)n.push(t);return o(n)}var u="object"==typeof i&&i,f="object"==typeof n&&n&&n.exports==u&&n,m="object"==typeof t&&t;(m.global===m||m.window===m)&&(s=m);var g,_,v,w=String.fromCharCode,b={version:"2.0.0",encode:l,decode:d};
2 if("function"==typeof e&&"object"==typeof e.amd&&e.amd)e(function(){return b});else if(u&&!u.nodeType)if(f)f.exports=b;else{var k={},y=k.hasOwnProperty;for(var $ in b)y.call(b,$)&&(u[$]=b[$])}else s.utf8=b}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],21:[function(e,t){var n=e("global");try{t.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch(i){t.exports=!1}},{global:22}],22:[function(e,t){t.exports=function(){return this}()},{}],23:[function(e,t){var n=[].indexOf;t.exports=function(e,t){if(n)return e.indexOf(t);for(var i=0;i<e.length;++i)if(e[i]===t)return i;return-1}},{}],24:[function(e,t){(function(e){var n=/^[\],:{}\s]*$/,i=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,s=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,a=/(?:^|:|,)(?:\s*\[)+/g,o=/^\s+/,r=/\s+$/;t.exports=function(t){return"string"==typeof t&&t?(t=t.replace(o,"").replace(r,""),e.JSON&&JSON.parse?JSON.parse(t):n.test(t.replace(i,"@").replace(s,"]").replace(a,""))?new Function("return "+t)():void 0):null}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],25:[function(e,t,n){n.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},n.decode=function(e){for(var t={},n=e.split("&"),i=0,s=n.length;s>i;i++){var a=n[i].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}},{}],26:[function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,i=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(e){var t=e,s=e.indexOf("["),a=e.indexOf("]");-1!=s&&-1!=a&&(e=e.substring(0,s)+e.substring(s,a).replace(/:/g,";")+e.substring(a,e.length));for(var o=n.exec(e||""),r={},c=14;c--;)r[i[c]]=o[c]||"";return-1!=s&&-1!=a&&(r.source=t,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r}},{}],27:[function(e,t){function n(e,t){var n;return n=t?new s(e,t):new s(e)}var i=function(){return this}(),s=i.WebSocket||i.MozWebSocket;t.exports=s?n:null,s&&(n.prototype=s.prototype)},{}]},{},[1])(1)});var EngineioTools={ReconnectingSocket:function(e,t){function n(){c=!0,l=!1,g=!1,f=0,p=0,clearTimeout(m)}function i(){c=!1,g||l||o()}function s(){l&&o()}function a(){g=!0,r.call(_)}function o(){if(f>=u)return void _.emit("reconnecting_failed");var e=d?2*(p||h/2):h*f;l=!0,m=setTimeout(function(){_.open()},e),p=e,_.emit("reconnecting",{attempt:f+1,max_attempts:u,delay:e}),f++}var r,c=!1,l=!1,h=4e3,p=0,d=!0,u=5,f=0,m=null,g=!1,_=eio.apply(eio,arguments);return _.on("open",n),_.on("close",i),_.on("error",s),r=_.close,_.close=a,t&&("number"==typeof t.reconnect_delay&&(h=t.reconnect_delay),"number"==typeof t.reconnect_max_attempts&&(u=t.reconnect_max_attempts),"undefined"!=typeof t.reconnect_delay_exponential&&(d=!!t.reconnect_delay_exponential)),_},Rpc:function(){function e(e){var n=new t(e),i=function(){return i.makeCall.apply(i,arguments)};for(var s in n)i[s]=n[s];return i._mixinEmitter(),i._bindSocketListeners(),i._rpc=i,i}function t(e){this._next_id=0,this._rpc_callbacks={},this._socket=e,this._rpc=this,this._namespace="",this._namespaces=[]}return t.prototype._bindSocketListeners=function(){var e=this;this._onMessageProxy=function(){e._onMessage.apply(e,arguments)},this._socket.on("message",this._onMessageProxy)},t.prototype.dispose=function(){this._onMessageProxy&&(this._socket.removeListener("message",this._onMessageProxy),delete this._onMessageProxy);for(var e in this._namespaces)this._namespaces[e].dispose();this.removeAllListeners()},t.prototype.namespace=function(e){var t,n;return t=this._namespace?this._namespace+"."+e:e,n=new this._rpc.Namespace(this._rpc,t),this._rpc._namespaces.push(n),n},t.prototype._findRelevantNamespaces=function(e){var t=[];for(var n in this._namespaces)this._namespaces[n]._namespace===e&&t.push(this._namespaces[n]),0===this._namespaces[n]._namespace.indexOf(e+".")&&t.push(this._namespaces[n]);return t},t.prototype._mixinEmitter=function(e){var t=["on","once","off","removeListener","removeAllListeners","emit","listeners","hasListeners"];e=e||this;for(var n=0;n<t.length;n++)"function"==typeof this._socket[t[n]]&&(e[t[n]]=this._socket[t[n]])},t.prototype._isCall=function(e){return"undefined"!=typeof e.method&&"undefined"!=typeof e.params},t.prototype._isResponse=function(e){return"undefined"!=typeof e.id&&"undefined"!=typeof e.response},t.prototype.makeCall=function(e){var t,n,i;t=Array.prototype.slice.call(arguments,1,arguments.length),"function"==typeof t[t.length-1]&&(n=t[t.length-1],t=t.slice(0,t.length-1)),i={method:e,params:t},"function"==typeof n&&(i.id=this._next_id,this._next_id++,this._rpc_callbacks[i.id]=n),this.send(i)},t.prototype.send=function(e){this._socket&&this._socket.send(JSON.stringify(e))},t.prototype._onMessage=function(e){var t,n,i,s,a,o;try{if(t=JSON.parse(e),!t)throw"Corrupt packet"}catch(r){return}if(this._isResponse(t)){if("function"!=typeof this._rpc_callbacks[t.id])return;i=this._rpc_callbacks[t.id],delete this._rpc_callbacks[t.id],i.apply(this,t.response)}else if(this._isCall(t)&&(n="undefined"!=typeof t.id?this._createReturnCallFn(t.id):this._noop,this.emit.apply(this,["all",t.method,n].concat(t.params)),this.emit.apply(this,[t.method,n].concat(t.params)),t.method.indexOf(".")>0)){s=t.method.substring(0,t.method.lastIndexOf(".")),a=this._findRelevantNamespaces(s);for(o in a)t.method=t.method.replace(a[o]._namespace+".",""),a[o].emit.apply(a[o],[t.method,n].concat(t.params))}},t.prototype._createReturnCallFn=function(e){var t=this;return function(){var n=Array.prototype.slice.call(arguments,0),i={id:e,response:n};t.send(i)}},t.prototype._noop=function(){},t.prototype.Namespace=function(e,t){var n=function(){return"undefined"!=typeof arguments[0]?(arguments[0]=n._namespace+"."+arguments[0],n._rpc.apply(n._rpc,arguments)):void 0};return n._rpc=e,n._namespace=t,n.dispose=function(){n.removeAllListeners(),n._rpc=null},e._mixinEmitter(n),n},e}()};