text: !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.External=t():e.External=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){
  /*!
   * SkyWay Copyright(c) 2019 NTT Communications Corporation
   * peerjs Copyright(c) 2013 Michelle Bu <michelle@michellebu.com>
   */
  var r;window,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/peer.js")}({"./node_modules/after/index.js":
  /*!*************************************!*\
    !*** ./node_modules/after/index.js ***!
    \*************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(){}e.exports=function(e,t,r){var i=!1;return r=r||n,o.count=e,0===e?t():o;function o(e,n){if(o.count<=0)throw new Error("after called too many times");--o.count,e?(i=!0,t(e),t=r):0!==o.count||i||t(null,n)}}},"./node_modules/arraybuffer.slice/index.js":
  /*!*************************************************!*\
    !*** ./node_modules/arraybuffer.slice/index.js ***!
    \*************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(t<0&&(t+=r),n<0&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(n-t),s=t,a=0;s<n;s++,a++)o[a]=i[s];return o.buffer}},"./node_modules/backo2/index.js":
  /*!**************************************!*\
    !*** ./node_modules/backo2/index.js ***!
    \**************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},"./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js":
  /*!*******************************************************************!*\
    !*** ./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js ***!
    \*******************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){!function(){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<e.length;r++)n[e.charCodeAt(r)]=r;t.encode=function(t){var n,r=new Uint8Array(t),i=r.length,o="";for(n=0;n<i;n+=3)o+=e[r[n]>>2],o+=e[(3&r[n])<<4|r[n+1]>>4],o+=e[(15&r[n+1])<<2|r[n+2]>>6],o+=e[63&r[n+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(e){var t,r,i,o,s,a=.75*e.length,c=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var d=new ArrayBuffer(a),p=new Uint8Array(d);for(t=0;t<c;t+=4)r=n[e.charCodeAt(t)],i=n[e.charCodeAt(t+1)],o=n[e.charCodeAt(t+2)],s=n[e.charCodeAt(t+3)],p[u++]=r<<2|i>>4,p[u++]=(15&i)<<4|o>>2,p[u++]=(3&o)<<6|63&s;return d}}()},"./node_modules/base64-js/index.js":
  /*!*****************************************!*\
    !*** ./node_modules/base64-js/index.js ***!
    \*****************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";t.byteLength=function(e){return 3*e.length/4-u(e)},t.toByteArray=function(e){var t,n,r,s,a,c=e.length;s=u(e),a=new o(3*c/4-s),n=s>0?c-4:c;var d=0;for(t=0;t<n;t+=4)r=i[e.charCodeAt(t)]<<18|i[e.charCodeAt(t+1)]<<12|i[e.charCodeAt(t+2)]<<6|i[e.charCodeAt(t+3)],a[d++]=r>>16&255,a[d++]=r>>8&255,a[d++]=255&r;2===s?(r=i[e.charCodeAt(t)]<<2|i[e.charCodeAt(t+1)]>>4,a[d++]=255&r):1===s&&(r=i[e.charCodeAt(t)]<<10|i[e.charCodeAt(t+1)]<<4|i[e.charCodeAt(t+2)]>>2,a[d++]=r>>8&255,a[d++]=255&r);return a},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o="",s=[],a=0,c=n-i;a<c;a+=16383)s.push(d(e,a,a+16383>c?c:a+16383));1===i?(t=e[n-1],o+=r[t>>2],o+=r[t<<4&63],o+="=="):2===i&&(t=(e[n-2]<<8)+e[n-1],o+=r[t>>10],o+=r[t>>4&63],o+=r[t<<2&63],o+="=");return s.push(o),s.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function d(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16)+(e[a+1]<<8)+e[a+2],s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},"./node_modules/blob/index.js":
  /*!************************************!*\
    !*** ./node_modules/blob/index.js ***!
    \************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t){var n=t.BlobBuilder||t.WebKitBlobBuilder||t.MSBlobBuilder||t.MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),i=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),o=n&&n.prototype.append&&n.prototype.getBlob;function s(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.buffer instanceof ArrayBuffer){var r=n.buffer;if(n.byteLength!==r.byteLength){var i=new Uint8Array(n.byteLength);i.set(new Uint8Array(r,n.byteOffset,n.byteLength)),r=i.buffer}e[t]=r}}}function a(e,t){t=t||{};var r=new n;s(e);for(var i=0;i<e.length;i++)r.append(e[i]);return t.type?r.getBlob(t.type):r.getBlob()}function c(e,t){return s(e),new Blob(e,t||{})}e.exports=r?i?t.Blob:c:o?a:void 0}).call(this,n(/*! ./../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"))},"./node_modules/component-bind/index.js":
  /*!**********************************************!*\
    !*** ./node_modules/component-bind/index.js ***!
    \**********************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},"./node_modules/component-emitter/index.js":
  /*!*************************************************!*\
    !*** ./node_modules/component-emitter/index.js ***!
    \*************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n)for(var r=0,i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t);return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},"./node_modules/component-inherit/index.js":
  /*!*************************************************!*\
    !*** ./node_modules/component-inherit/index.js ***!
    \*************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},"./node_modules/decode-uri-component/index.js":
  /*!****************************************************!*\
    !*** ./node_modules/decode-uri-component/index.js ***!
    \****************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function s(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=s(n[0]);r!==n[0]&&(t[n[0]]=r)}n=i.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),a=0;a<o.length;a++){var c=o[a];e=e.replace(new RegExp(c,"g"),t[c])}return e}(e)}}},"./node_modules/detect-browser/index.js":
  /*!**********************************************!*\
    !*** ./node_modules/detect-browser/index.js ***!
    \**********************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n){this.name=e,this.version=t,this.os=n};t.BrowserInfo=n;var r=function(t){this.version=t,this.name="node",this.os=e.platform};t.NodeInfo=r;var i=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};t.BotInfo=i;var o=3,s=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],a=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function c(e){var t=""!==e&&s.reduce(function(t,n){var r=n[0],i=n[1];if(t)return t;var o=i.exec(e);return!!o&&[r,o]},!1);if(!t)return null;var r=t[0],a=t[1];if("searchbot"===r)return new i;var c=a[1]&&a[1].split(/[._]/).slice(0,3);return c?c.length<o&&(c=c.concat(function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(o-c.length))):c=[],new n(r,c.join("."),u(e))}function u(e){for(var t=0,n=a.length;t<n;t++){var r=a[t],i=r[0];if(r[1].test(e))return i}return null}function d(){return void 0!==e&&e.version?new r(e.version.slice(1)):null}t.detect=function(){return"undefined"!=typeof navigator?c(navigator.userAgent):d()},t.parseUserAgent=c,t.detectOS=u,t.getNodeVersion=d}).call(this,n(/*! ./../process/browser.js */"./node_modules/process/browser.js"))},"./node_modules/engine.io-parser/lib/browser.js":
  /*!******************************************************!*\
    !*** ./node_modules/engine.io-parser/lib/browser.js ***!
    \******************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(e){var r,i=n(/*! ./keys */"./node_modules/engine.io-parser/lib/keys.js"),o=n(/*! has-binary2 */"./node_modules/has-binary2/index.js"),s=n(/*! arraybuffer.slice */"./node_modules/arraybuffer.slice/index.js"),a=n(/*! after */"./node_modules/after/index.js"),c=n(/*! ./utf8 */"./node_modules/engine.io-parser/lib/utf8.js");e&&e.ArrayBuffer&&(r=n(/*! base64-arraybuffer */"./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js"));var u="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),d="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),p=u||d;t.protocol=3;var h=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},l=i(h),f={type:"error",data:"parser error"},m=n(/*! blob */"./node_modules/blob/index.js");function y(e,t,n){for(var r=new Array(e.length),i=a(e.length,n),o=function(e,n,i){t(n,function(t,n){r[e]=n,i(t,r)})},s=0;s<e.length;s++)o(s,e[s],i)}t.encodePacket=function(n,r,i,o){"function"==typeof r&&(o=r,r=!1),"function"==typeof i&&(o=i,i=null);var s=void 0===n.data?void 0:n.data.buffer||n.data;if(e.ArrayBuffer&&s instanceof ArrayBuffer)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=e.data,o=new Uint8Array(i),s=new Uint8Array(1+i.byteLength);s[0]=h[e.type];for(var a=0;a<o.length;a++)s[a+1]=o[a];return r(s.buffer)}(n,r,o);if(m&&s instanceof e.Blob)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(p)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=new FileReader;return i.onload=function(){e.data=i.result,t.encodePacket(e,n,!0,r)},i.readAsArrayBuffer(e.data)}(e,n,r);var i=new Uint8Array(1);i[0]=h[e.type];var o=new m([i.buffer,e.data]);return r(o)}(n,r,o);if(s&&s.base64)return function(e,n){var r="b"+t.packets[e.type]+e.data.data;return n(r)}(n,o);var a=h[n.type];return void 0!==n.data&&(a+=i?c.encode(String(n.data),{strict:!1}):String(n.data)),o(""+a)},t.encodeBase64Packet=function(n,r){var i,o="b"+t.packets[n.type];if(m&&n.data instanceof e.Blob){var s=new FileReader;return s.onload=function(){var e=s.result.split(",")[1];r(o+e)},s.readAsDataURL(n.data)}try{i=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(e){for(var a=new Uint8Array(n.data),c=new Array(a.length),u=0;u<a.length;u++)c[u]=a[u];i=String.fromCharCode.apply(null,c)}return o+=e.btoa(i),r(o)},t.decodePacket=function(e,n,r){if(void 0===e)return f;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=function(e){try{e=c.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return f;var i=e.charAt(0);return Number(i)==i&&l[i]?e.length>1?{type:l[i],data:e.substring(1)}:{type:l[i]}:f}i=new Uint8Array(e)[0];var o=s(e,1);return m&&"blob"===n&&(o=new m([o])),{type:l[i],data:o}},t.decodeBase64Packet=function(e,t){var n=l[e.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:e.substr(1)}};var i=r.decode(e.substr(1));return"blob"===t&&m&&(i=new m([i])),{type:n,data:i}},t.encodePayload=function(e,n,r){"function"==typeof n&&(r=n,n=null);var i=o(e);if(n&&i)return m&&!p?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r);if(!e.length)return r("0:");y(e,function(e,r){t.encodePacket(e,!!i&&n,!1,function(e){r(null,function(e){return e.length+":"+e}(e))})},function(e,t){return r(t.join(""))})},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);var i;if("function"==typeof n&&(r=n,n=null),""===e)return r(f,0,1);for(var o,s,a="",c=0,u=e.length;c<u;c++){var d=e.charAt(c);if(":"===d){if(""===a||a!=(o=Number(a)))return r(f,0,1);if(a!=(s=e.substr(c+1,o)).length)return r(f,0,1);if(s.length){if(i=t.decodePacket(s,n,!1),f.type===i.type&&f.data===i.data)return r(f,0,1);if(!1===r(i,c+o,u))return}c+=o,a=""}else a+=d}return""!==a?r(f,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));y(e,function(e,n){t.encodePacket(e,!0,!0,function(e){return n(null,e)})},function(e,t){var r=t.reduce(function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2},0),i=new Uint8Array(r),o=0;return t.forEach(function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),s=0;s<e.length;s++)r[s]=e.charCodeAt(s);n=r.buffer}i[o++]=t?0:1;var a=n.byteLength.toString();for(s=0;s<a.length;s++)i[o++]=parseInt(a[s]);i[o++]=255;for(r=new Uint8Array(n),s=0;s<r.length;s++)i[o++]=r[s]}),n(i.buffer)})},t.encodePayloadAsBlob=function(e,n){y(e,function(e,n){t.encodePacket(e,!0,!0,function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);e=r.buffer,t[0]=0}var o=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),s=new Uint8Array(o.length+1);for(i=0;i<o.length;i++)s[i]=parseInt(o[i]);if(s[o.length]=255,m){var a=new m([t.buffer,s.buffer,e]);n(null,a)}})},function(e,t){return n(new m(t))})},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var i=e,o=[];i.byteLength>0;){for(var a=new Uint8Array(i),c=0===a[0],u="",d=1;255!==a[d];d++){if(u.length>310)return r(f,0,1);u+=a[d]}i=s(i,2+u.length),u=parseInt(u);var p=s(i,0,u);if(c)try{p=String.fromCharCode.apply(null,new Uint8Array(p))}catch(e){var h=new Uint8Array(p);p="";for(d=0;d<h.length;d++)p+=String.fromCharCode(h[d])}o.push(p),i=s(i,u)}var l=o.length;o.forEach(function(e,i){r(t.decodePacket(e,n,!0),i,l)})}}).call(this,n(/*! ./../../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"))},"./node_modules/engine.io-parser/lib/keys.js":
  /*!***************************************************!*\
    !*** ./node_modules/engine.io-parser/lib/keys.js ***!
    \***************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var r in e)n.call(e,r)&&t.push(r);return t}},"./node_modules/engine.io-parser/lib/utf8.js":
  /*!***************************************************!*\
    !*** ./node_modules/engine.io-parser/lib/utf8.js ***!
    \***************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(e,r){var i;/*! https://mths.be/utf8js v2.1.2 by @mathias */!function(o){var s="object"==typeof t&&t,a=("object"==typeof e&&e&&e.exports,"object"==typeof r&&r);a.global!==a&&a.window;var c,u,d,p=String.fromCharCode;function h(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function l(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function f(e,t){return p(e>>t&63|128)}function m(e,t){if(0==(4294967168&e))return p(e);var n="";return 0==(4294965248&e)?n=p(e>>6&31|192):0==(4294901760&e)?(l(e,t)||(e=65533),n=p(e>>12&15|224),n+=f(e,6)):0==(4292870144&e)&&(n=p(e>>18&7|240),n+=f(e,12),n+=f(e,6)),n+=p(63&e|128)}function y(){if(d>=u)throw Error("Invalid byte index");var e=255&c[d];if(d++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function g(e){var t,n;if(d>u)throw Error("Invalid byte index");if(d==u)return!1;if(t=255&c[d],d++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|y())>=128)return n;throw Error("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|y()<<6|y())>=2048)return l(n,e)?n:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|y()<<12|y()<<6|y())>=65536&&n<=1114111)return n;throw Error("Invalid UTF-8 detected")}var _={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,r=h(e),i=r.length,o=-1,s="";++o<i;)s+=m(r[o],n);return s},decode:function(e,t){var n=!1!==(t=t||{}).strict;c=h(e),u=c.length,d=0;for(var r,i=[];!1!==(r=g(n));)i.push(r);return function(e){for(var t,n=e.length,r=-1,i="";++r<n;)(t=e[r])>65535&&(i+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=p(t);return i}(i)}};void 0===(i=function(){return _}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(/*! ./../../webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(e),n(/*! ./../../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"))},"./node_modules/enum/dist/enum.js":
  /*!****************************************!*\
    !*** ./node_modules/enum/dist/enum.js ***!
    \****************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";(function(t){var r=function(e){return e&&e.__esModule?e.default:e},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=r(n(/*! ./enumItem */"./node_modules/enum/dist/enumItem.js")),s=n(/*! ./isType */"./node_modules/enum/dist/isType.js").isString,a=n(/*! ./indexOf */"./node_modules/enum/dist/indexOf.js").indexOf,c=r(n(/*! is-buffer */"./node_modules/is-buffer/index.js")),u="LE",d=function(){function e(t,n){var r=this;if(i(this,e),this.size=4,this.indirection=1,n&&s(n)&&(n={name:n}),this._options=n||{},this._options.separator=this._options.separator||" | ",this._options.endianness=this._options.endianness||u,this._options.ignoreCase=this._options.ignoreCase||!1,this._options.freez=this._options.freez||!1,this.enums=[],t.length){this._enumLastIndex=t.length;var a=t;t={};for(var c=0;c<a.length;c++)t[a[c]]=Math.pow(2,c)}for(var d in t)h(this._options.name,d),this[d]=new o(d,t[d],{ignoreCase:this._options.ignoreCase}),this.enums.push(this[d]);this._enumMap=t,this._options.ignoreCase&&(this.getLowerCaseEnums=function(){for(var e={},t=0,n=this.enums.length;t<n;t++)e[this.enums[t].key.toLowerCase()]=this.enums[t];return e}),this._options.name&&(this.name=this._options.name);this.isFlaggable=function(){for(var e=0,t=r.enums.length;e<t;e++){var n=r.enums[e];if(0===n.value||n.value&n.value-1)return!1}return!0}(),this._options.freez&&this.freezeEnums()}return e.prototype.getKey=function(e){var t=this.get(e);if(t)return t.key},e.prototype.getValue=function(e){var t=this.get(e);if(t)return t.value},e.prototype.get=function(e,t){if(null!=e){if(c(e)&&(e=e["readUInt32"+this._options.endianness](t||0)),o.isEnumItem(e)){if(a.call(this.enums,e)>=0)return e;if(!this.isFlaggable||this.isFlaggable&&e.key.indexOf(this._options.separator)<0)return;return this.get(e.key)}if(s(e)){var n=this;if(this._options.ignoreCase&&(n=this.getLowerCaseEnums(),e=e.toLowerCase()),e.indexOf(this._options.separator)>0){for(var r=e.split(this._options.separator),i=0,u=0;u<r.length;u++){i|=n[r[u]].value}return new o(e,i)}return n[e]}for(var d in this)if(this.hasOwnProperty(d)&&this[d].value===e)return this[d];var p=null;if(this.isFlaggable)for(var h in this)this.hasOwnProperty(h)&&0!=(e&this[h].value)&&(p?p+=this._options.separator:p="",p+=h);return this.get(p||null)}},e.prototype.set=function(e,t,n){var r=this.get(n);if(r)return e["writeUInt32"+this._options.endianness](r.value,t||0)},e.prototype.freezeEnums=function(){function e(e){return e}return Object.isFrozen&&Object.isSealed&&Object.getOwnPropertyNames&&Object.getOwnPropertyDescriptor&&Object.defineProperties&&Object.__defineGetter__&&Object.__defineSetter__&&function t(n){if("object"==typeof n&&null!==n&&!Object.isFrozen(n)&&!Object.isSealed(n)){for(var r in n)n.hasOwnProperty(r)&&(n.__defineGetter__(r,e.bind(null,n[r])),n.__defineSetter__(r,function(e){throw TypeError("Cannot redefine property; Enum Type is not extensible.")}),t(n[r]));Object.freeze?Object.freeze(n):function(e){Object.getOwnPropertyNames(e).forEach(function(t){Object.getOwnPropertyDescriptor(e,t).configurable&&Object.defineProperties(e,t,{writable:!1,configurable:!1})})}(n)}}(this),this},e.prototype.toJSON=function(){return this._enumMap},e.prototype.extend=function(e){if(e.length){var t=e;e={};for(var n=0;n<t.length;n++){var r=this._enumLastIndex+n;e[t[n]]=Math.pow(2,r)}for(var i in e)h(this._options.name,i),this[i]=new o(i,e[i],{ignoreCase:this._options.ignoreCase}),this.enums.push(this[i]);for(var s in this._enumMap)e[s]=this._enumMap[s];this._enumLastIndex+=e.length,this._enumMap=e,this._options.freez&&this.freezeEnums()}},e.register=function(){var n=void 0===arguments[0]?"Enum":arguments[0];t[n]||(t[n]=e)},e}();e.exports=d;var p=["_options","get","getKey","getValue","enums","isFlaggable","_enumMap","toJSON","_enumLastIndex"];function h(e,t){if(e&&"name"===t||a.call(p,t)>=0)throw new Error("Enum key "+t+" is a reserved word!")}}).call(this,n(/*! ./../../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"))},"./node_modules/enum/dist/enumItem.js":
  /*!********************************************!*\
    !*** ./node_modules/enum/dist/enumItem.js ***!
    \********************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=n(/*! ./isType */"./node_modules/enum/dist/isType.js"),o=i.isObject,s=i.isString,a=function(){function e(t,n){var i=void 0===arguments[2]?{}:arguments[2];r(this,e),this.key=t,this.value=n,this._options=i,this._options.ignoreCase=this._options.ignoreCase||!1}return e.prototype.has=function(t){return e.isEnumItem(t)?0!=(this.value&t.value):s(t)?this._options.ignoreCase?this.key.toLowerCase().indexOf(t.toLowerCase())>=0:this.key.indexOf(t)>=0:0!=(this.value&t)},e.prototype.is=function(t){return e.isEnumItem(t)?this.key===t.key:s(t)?this._options.ignoreCase?this.key.toLowerCase()===t.toLowerCase():this.key===t:this.value===t},e.prototype.toString=function(){return this.key},e.prototype.toJSON=function(){return this.key},e.prototype.valueOf=function(){return this.value},e.isEnumItem=function(t){return t instanceof e||o(t)&&void 0!==t.key&&void 0!==t.value},e}();e.exports=a},"./node_modules/enum/dist/indexOf.js":
  /*!*******************************************!*\
    !*** ./node_modules/enum/dist/indexOf.js ***!
    \*******************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";t.__esModule=!0;var r=Array.prototype.indexOf||function(e,t){void 0===t&&(t=0),t<0&&(t+=this.length),t<0&&(t=0);for(var n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};t.indexOf=r},"./node_modules/enum/dist/isType.js":
  /*!******************************************!*\
    !*** ./node_modules/enum/dist/isType.js ***!
    \******************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";t.__esModule=!0;var r=function(e,t){return typeof t===e};t.isType=r;t.isObject=function(e){return r("object",e)};t.isString=function(e){return r("string",e)}},"./node_modules/enum/index.js":
  /*!************************************!*\
    !*** ./node_modules/enum/index.js ***!
    \************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n(/*! ./dist/enum */"./node_modules/enum/dist/enum.js")},"./node_modules/has-binary2/index.js":
  /*!*******************************************!*\
    !*** ./node_modules/has-binary2/index.js ***!
    \*******************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t){var r=n(/*! isarray */"./node_modules/has-binary2/node_modules/isarray/index.js"),i=Object.prototype.toString,o="function"==typeof t.Blob||"[object BlobConstructor]"===i.call(t.Blob),s="function"==typeof t.File||"[object FileConstructor]"===i.call(t.File);e.exports=function e(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var i=0,a=n.length;i<a;i++)if(e(n[i]))return!0;return!1}if("function"==typeof t.Buffer&&t.Buffer.isBuffer&&t.Buffer.isBuffer(n)||"function"==typeof t.ArrayBuffer&&n instanceof ArrayBuffer||o&&n instanceof Blob||s&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return e(n.toJSON(),!0);for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)&&e(n[c]))return!0;return!1}}).call(this,n(/*! ./../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"))},"./node_modules/has-binary2/node_modules/isarray/index.js":
  /*!****************************************************************!*\
    !*** ./node_modules/has-binary2/node_modules/isarray/index.js ***!
    \****************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},"./node_modules/has-cors/index.js":
  /*!****************************************!*\
    !*** ./node_modules/has-cors/index.js ***!
    \****************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},"./node_modules/ieee754/index.js":
  /*!***************************************!*\
    !*** ./node_modules/ieee754/index.js ***!
    \***************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,c=(1<<a)-1,u=c>>1,d=-7,p=n?i-1:0,h=n?-1:1,l=e[t+p];for(p+=h,o=l&(1<<-d)-1,l>>=-d,d+=a;d>0;o=256*o+e[t+p],p+=h,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=r;d>0;s=256*s+e[t+p],p+=h,d-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,r),o-=u}return(l?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,c,u=8*o-i-1,d=(1<<u)-1,p=d>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:o-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+p>=1?h/c:h*Math.pow(2,1-p))*c>=2&&(s++,c/=2),s+p>=d?(a=0,s=d):s+p>=1?(a=(t*c-1)*Math.pow(2,i),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;e[n+l]=255&a,l+=f,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+l]=255&s,l+=f,s/=256,u-=8);e[n+l-f]|=128*m}},"./node_modules/indexof/index.js":
  /*!***************************************!*\
    !*** ./node_modules/indexof/index.js ***!
    \***************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},"./node_modules/is-buffer/index.js":
  /*!*****************************************!*\
    !*** ./node_modules/is-buffer/index.js ***!
    \*****************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
  /*!
   * Determine if an object is a Buffer
   *
   * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
   * @license  MIT
   */
  e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},"./node_modules/isarray/index.js":
  /*!***************************************!*\
    !*** ./node_modules/isarray/index.js ***!
    \***************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},"./node_modules/js-binarypack/lib/binarypack.js":
  /*!******************************************************!*\
    !*** ./node_modules/js-binarypack/lib/binarypack.js ***!
    \******************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./bufferbuilder */"./node_modules/js-binarypack/lib/bufferbuilder.js").BufferBuilder,i=n(/*! ./bufferbuilder */"./node_modules/js-binarypack/lib/bufferbuilder.js").binaryFeatures,o={unpack:function(e){return new s(e).unpack()},pack:function(e){var t=new a;return t.pack(e),t.getBuffer()}};function s(e){this.index=0,this.dataBuffer=e,this.dataView=new Uint8Array(this.dataBuffer),this.length=this.dataBuffer.byteLength}function a(){this.bufferBuilder=new r}function c(e){var t=e.charCodeAt(0);return t<=2047?"00":t<=65535?"000":t<=2097151?"0000":t<=67108863?"00000":"000000"}e.exports=o,s.prototype.unpack=function(){var e,t=this.unpack_uint8();if(t<128)return t;if((224^t)<32)return(224^t)-32;if((e=160^t)<=15)return this.unpack_raw(e);if((e=176^t)<=15)return this.unpack_string(e);if((e=144^t)<=15)return this.unpack_array(e);if((e=128^t)<=15)return this.unpack_map(e);switch(t){case 192:return null;case 193:return;case 194:return!1;case 195:return!0;case 202:return this.unpack_float();case 203:return this.unpack_double();case 204:return this.unpack_uint8();case 205:return this.unpack_uint16();case 206:return this.unpack_uint32();case 207:return this.unpack_uint64();case 208:return this.unpack_int8();case 209:return this.unpack_int16();case 210:return this.unpack_int32();case 211:return this.unpack_int64();case 212:case 213:case 214:case 215:return;case 216:return e=this.unpack_uint16(),this.unpack_string(e);case 217:return e=this.unpack_uint32(),this.unpack_string(e);case 218:return e=this.unpack_uint16(),this.unpack_raw(e);case 219:return e=this.unpack_uint32(),this.unpack_raw(e);case 220:return e=this.unpack_uint16(),this.unpack_array(e);case 221:return e=this.unpack_uint32(),this.unpack_array(e);case 222:return e=this.unpack_uint16(),this.unpack_map(e);case 223:return e=this.unpack_uint32(),this.unpack_map(e)}},s.prototype.unpack_uint8=function(){var e=255&this.dataView[this.index];return this.index++,e},s.prototype.unpack_uint16=function(){var e=this.read(2),t=256*(255&e[0])+(255&e[1]);return this.index+=2,t},s.prototype.unpack_uint32=function(){var e=this.read(4),t=256*(256*(256*e[0]+e[1])+e[2])+e[3];return this.index+=4,t},s.prototype.unpack_uint64=function(){var e=this.read(8),t=256*(256*(256*(256*(256*(256*(256*e[0]+e[1])+e[2])+e[3])+e[4])+e[5])+e[6])+e[7];return this.index+=8,t},s.prototype.unpack_int8=function(){var e=this.unpack_uint8();return e<128?e:e-256},s.prototype.unpack_int16=function(){var e=this.unpack_uint16();return e<32768?e:e-65536},s.prototype.unpack_int32=function(){var e=this.unpack_uint32();return e<Math.pow(2,31)?e:e-Math.pow(2,32)},s.prototype.unpack_int64=function(){var e=this.unpack_uint64();return e<Math.pow(2,63)?e:e-Math.pow(2,64)},s.prototype.unpack_raw=function(e){if(this.length<this.index+e)throw new Error("BinaryPackFailure: index is out of range "+this.index+" "+e+" "+this.length);var t=this.dataBuffer.slice(this.index,this.index+e);return this.index+=e,t},s.prototype.unpack_string=function(e){for(var t,n,r=this.read(e),i=0,o="";i<e;)(t=r[i])<128?(o+=String.fromCharCode(t),i++):(192^t)<32?(n=(192^t)<<6|63&r[i+1],o+=String.fromCharCode(n),i+=2):(n=(15&t)<<12|(63&r[i+1])<<6|63&r[i+2],o+=String.fromCharCode(n),i+=3);return this.index+=e,o},s.prototype.unpack_array=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=this.unpack();return t},s.prototype.unpack_map=function(e){for(var t={},n=0;n<e;n++){var r=this.unpack(),i=this.unpack();t[r]=i}return t},s.prototype.unpack_float=function(){var e=this.unpack_uint32(),t=(e>>23&255)-127;return(0==e>>31?1:-1)*(8388607&e|8388608)*Math.pow(2,t-23)},s.prototype.unpack_double=function(){var e=this.unpack_uint32(),t=this.unpack_uint32(),n=(e>>20&2047)-1023;return(0==e>>31?1:-1)*((1048575&e|1048576)*Math.pow(2,n-20)+t*Math.pow(2,n-52))},s.prototype.read=function(e){var t=this.index;if(t+e<=this.length)return this.dataView.subarray(t,t+e);throw new Error("BinaryPackFailure: read index out of range")},a.prototype.getBuffer=function(){return this.bufferBuilder.getBuffer()},a.prototype.pack=function(e){var t=typeof e;if("string"==t)this.pack_string(e);else if("number"==t)Math.floor(e)===e?this.pack_integer(e):this.pack_double(e);else if("boolean"==t)!0===e?this.bufferBuilder.append(195):!1===e&&this.bufferBuilder.append(194);else if("undefined"==t)this.bufferBuilder.append(192);else{if("object"!=t)throw new Error('Type "'+t+'" not yet supported');if(null===e)this.bufferBuilder.append(192);else{var n=e.constructor;if(n==Array)this.pack_array(e);else if(n==Blob||n==File)this.pack_bin(e);else if(n==ArrayBuffer)i.useArrayBufferView?this.pack_bin(new Uint8Array(e)):this.pack_bin(e);else if("BYTES_PER_ELEMENT"in e)i.useArrayBufferView?this.pack_bin(new Uint8Array(e.buffer)):this.pack_bin(e.buffer);else if(n==Object)this.pack_object(e);else if(n==Date)this.pack_string(e.toString());else{if("function"!=typeof e.toBinaryPack)throw new Error('Type "'+n.toString()+'" not yet supported');this.bufferBuilder.append(e.toBinaryPack())}}}this.bufferBuilder.flush()},a.prototype.pack_bin=function(e){var t=e.length||e.byteLength||e.size;if(t<=15)this.pack_uint8(160+t);else if(t<=65535)this.bufferBuilder.append(218),this.pack_uint16(t);else{if(!(t<=4294967295))throw new Error("Invalid length");this.bufferBuilder.append(219),this.pack_uint32(t)}this.bufferBuilder.append(e)},a.prototype.pack_string=function(e){var t=function(e){return e.length>600?new Blob([e]).size:e.replace(/[^\u0000-\u007F]/g,c).length}(e);if(t<=15)this.pack_uint8(176+t);else if(t<=65535)this.bufferBuilder.append(216),this.pack_uint16(t);else{if(!(t<=4294967295))throw new Error("Invalid length");this.bufferBuilder.append(217),this.pack_uint32(t)}this.bufferBuilder.append(e)},a.prototype.pack_array=function(e){var t=e.length;if(t<=15)this.pack_uint8(144+t);else if(t<=65535)this.bufferBuilder.append(220),this.pack_uint16(t);else{if(!(t<=4294967295))throw new Error("Invalid length");this.bufferBuilder.append(221),this.pack_uint32(t)}for(var n=0;n<t;n++)this.pack(e[n])},a.prototype.pack_integer=function(e){if(-32<=e&&e<=127)this.bufferBuilder.append(255&e);else if(0<=e&&e<=255)this.bufferBuilder.append(204),this.pack_uint8(e);else if(-128<=e&&e<=127)this.bufferBuilder.append(208),this.pack_int8(e);else if(0<=e&&e<=65535)this.bufferBuilder.append(205),this.pack_uint16(e);else if(-32768<=e&&e<=32767)this.bufferBuilder.append(209),this.pack_int16(e);else if(0<=e&&e<=4294967295)this.bufferBuilder.append(206),this.pack_uint32(e);else if(-2147483648<=e&&e<=2147483647)this.bufferBuilder.append(210),this.pack_int32(e);else if(-0x8000000000000000<=e&&e<=0x8000000000000000)this.bufferBuilder.append(211),this.pack_int64(e);else{if(!(0<=e&&e<=0x10000000000000000))throw new Error("Invalid integer");this.bufferBuilder.append(207),this.pack_uint64(e)}},a.prototype.pack_double=function(e){var t=0;e<0&&(t=1,e=-e);var n=Math.floor(Math.log(e)/Math.LN2),r=e/Math.pow(2,n)-1,i=Math.floor(r*Math.pow(2,52)),o=Math.pow(2,32),s=t<<31|n+1023<<20|i/o&1048575,a=i%o;this.bufferBuilder.append(203),this.pack_int32(s),this.pack_int32(a)},a.prototype.pack_object=function(e){var t=Object.keys(e).length;if(t<=15)this.pack_uint8(128+t);else if(t<=65535)this.bufferBuilder.append(222),this.pack_uint16(t);else{if(!(t<=4294967295))throw new Error("Invalid length");this.bufferBuilder.append(223),this.pack_uint32(t)}for(var n in e)e.hasOwnProperty(n)&&(this.pack(n),this.pack(e[n]))},a.prototype.pack_uint8=function(e){this.bufferBuilder.append(e)},a.prototype.pack_uint16=function(e){this.bufferBuilder.append(e>>8),this.bufferBuilder.append(255&e)},a.prototype.pack_uint32=function(e){var t=4294967295&e;this.bufferBuilder.append((4278190080&t)>>>24),this.bufferBuilder.append((16711680&t)>>>16),this.bufferBuilder.append((65280&t)>>>8),this.bufferBuilder.append(255&t)},a.prototype.pack_uint64=function(e){var t=e/Math.pow(2,32),n=e%Math.pow(2,32);this.bufferBuilder.append((4278190080&t)>>>24),this.bufferBuilder.append((16711680&t)>>>16),this.bufferBuilder.append((65280&t)>>>8),this.bufferBuilder.append(255&t),this.bufferBuilder.append((4278190080&n)>>>24),this.bufferBuilder.append((16711680&n)>>>16),this.bufferBuilder.append((65280&n)>>>8),this.bufferBuilder.append(255&n)},a.prototype.pack_int8=function(e){this.bufferBuilder.append(255&e)},a.prototype.pack_int16=function(e){this.bufferBuilder.append((65280&e)>>8),this.bufferBuilder.append(255&e)},a.prototype.pack_int32=function(e){this.bufferBuilder.append(e>>>24&255),this.bufferBuilder.append((16711680&e)>>>16),this.bufferBuilder.append((65280&e)>>>8),this.bufferBuilder.append(255&e)},a.prototype.pack_int64=function(e){var t=Math.floor(e/Math.pow(2,32)),n=e%Math.pow(2,32);this.bufferBuilder.append((4278190080&t)>>>24),this.bufferBuilder.append((16711680&t)>>>16),this.bufferBuilder.append((65280&t)>>>8),this.bufferBuilder.append(255&t),this.bufferBuilder.append((4278190080&n)>>>24),this.bufferBuilder.append((16711680&n)>>>16),this.bufferBuilder.append((65280&n)>>>8),this.bufferBuilder.append(255&n)}},"./node_modules/js-binarypack/lib/bufferbuilder.js":
  /*!*********************************************************!*\
    !*** ./node_modules/js-binarypack/lib/bufferbuilder.js ***!
    \*********************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={};n.useBlobBuilder=function(){try{return new Blob([]),!1}catch(e){return!0}}(),n.useArrayBufferView=!n.useBlobBuilder&&function(){try{return 0===new Blob([new Uint8Array([])]).size}catch(e){return!0}}(),e.exports.binaryFeatures=n;var r=e.exports.BlobBuilder;function i(){this._pieces=[],this._parts=[]}"undefined"!=typeof window&&(r=e.exports.BlobBuilder=window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder||window.BlobBuilder),i.prototype.append=function(e){"number"==typeof e?this._pieces.push(e):(this.flush(),this._parts.push(e))},i.prototype.flush=function(){if(this._pieces.length>0){var e=new Uint8Array(this._pieces);n.useArrayBufferView||(e=e.buffer),this._parts.push(e),this._pieces=[]}},i.prototype.getBuffer=function(){if(this.flush(),n.useBlobBuilder){for(var e=new r,t=0,i=this._parts.length;t<i;t++)e.append(this._parts[t]);return e.getBlob()}return new Blob(this._parts)},e.exports.BufferBuilder=i},"./node_modules/ms/index.js":
  /*!**********************************!*\
    !*** ./node_modules/ms/index.js ***!
    \**********************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=1e3,r=60*n,i=60*r,o=24*i,s=365.25*o;function a(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var c,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?a(c=e,o,"day")||a(c,i,"hour")||a(c,r,"minute")||a(c,n,"second")||c+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},"./node_modules/node-libs-browser/node_modules/buffer/index.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/node-libs-browser/node_modules/buffer/index.js ***!
    \*********************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";(function(e){
  /*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
   * @license  MIT
   */
  var r=n(/*! base64-js */"./node_modules/base64-js/index.js"),i=n(/*! ieee754 */"./node_modules/ieee754/index.js"),o=n(/*! isarray */"./node_modules/isarray/index.js");function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|f(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|l(t.length);return 0===(e=a(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function d(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t){if(d(t),e=a(e,t<0?0:0|l(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|l(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function l(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return V(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,i){var o,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var d=-1;for(o=n;o<a;o++)if(u(e,o)===u(t,-1===d?0:o-d)){if(-1===d&&(d=o),o-d+1===c)return d*s}else-1!==d&&(o-=o-d),d=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){for(var p=!0,h=0;h<c;h++)if(u(e,o+h)!==u(t,h)){p=!1;break}if(p)return o}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function b(e,t,n,r){return G(V(t,e.length-n),e,n,r)}function E(e,t,n,r){return G(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return E(e,t,n,r)}function S(e,t,n,r){return G(q(t),e,n,r)}function k(e,t,n,r){return G(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,c,u=e[i],d=null,p=u>239?4:u>223?3:u>191?2:1;if(i+p<=n)switch(p){case 1:u<128&&(d=u);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(d=c);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(d=c);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(d=c)}null===d?(d=65533,p=1):d>65535&&(d-=65536,r.push(d>>>10&1023|55296),d=56320|1023&d),r.push(d),i+=p}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return d(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return p(null,e)},c.allocUnsafeSlow=function(e){return p(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},c.byteLength=f,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):m.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(r,i),d=e.slice(t,n),p=0;p<a;++p)if(u[p]!==d[p]){o=u[p],s=d[p];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function x(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function O(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=F(e[o]);return i}function N(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function j(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,n,r,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function I(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,o){return o||I(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,o){return o||I(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var i=t-e;n=new c(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||B(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||B(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);B(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);B(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=c.isBuffer(e)?e:V(new c(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(/*! ./../../../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"))},"./node_modules/node-libs-browser/node_modules/events/events.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/node-libs-browser/node_modules/events/events.js ***!
    \**********************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,s,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}if(o(n=this._events[e]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(i(n))for(a=Array.prototype.slice.call(arguments,1),s=(u=n.slice()).length,c=0;c<s;c++)u[c].apply(this,a);return!0},n.prototype.addListener=function(e,t){var s;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(s=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},n.prototype.removeListener=function(e,t){var n,o,s,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,o=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(a=s;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},"./node_modules/object-sizeof/byte_size.js":
  /*!*************************************************!*\
    !*** ./node_modules/object-sizeof/byte_size.js ***!
    \*************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports={STRING:2,BOOLEAN:4,NUMBER:8}},"./node_modules/object-sizeof/index.js":
  /*!*********************************************!*\
    !*** ./node_modules/object-sizeof/index.js ***!
    \*********************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ./byte_size */"./node_modules/object-sizeof/byte_size.js"),i=n(/*! buffer */"./node_modules/node-libs-browser/node_modules/buffer/index.js").Buffer;e.exports=function e(t){if(null!==t&&"object"==typeof t){if(i.isBuffer(t))return t.length;var n=0;for(var o in t)if(Object.hasOwnProperty.call(t,o)){n+=e(o);try{n+=e(t[o])}catch(e){e instanceof RangeError&&(n=0)}}return n}return"string"==typeof t?t.length*r.STRING:"boolean"==typeof t?r.BOOLEAN:"number"==typeof t?r.NUMBER:0}},"./node_modules/parseqs/index.js":
  /*!***************************************!*\
    !*** ./node_modules/parseqs/index.js ***!
    \***************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,i=n.length;r<i;r++){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}},"./node_modules/parseuri/index.js":
  /*!****************************************!*\
    !*** ./node_modules/parseuri/index.js ***!
    \****************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,i=e.indexOf("["),o=e.indexOf("]");-1!=i&&-1!=o&&(e=e.substring(0,i)+e.substring(i,o).replace(/:/g,";")+e.substring(o,e.length));for(var s=n.exec(e||""),a={},c=14;c--;)a[r[c]]=s[c]||"";return-1!=i&&-1!=o&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},"./node_modules/process/browser.js":
  /*!*****************************************!*\
    !*** ./node_modules/process/browser.js ***!
    \*****************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var c,u=[],d=!1,p=-1;function h(){d&&c&&(d=!1,c.length?u=c.concat(u):p=-1,u.length&&l())}function l(){if(!d){var e=a(h);d=!0;for(var t=u.length;t;){for(c=u,u=[];++p<t;)c&&c[p].run();p=-1,t=u.length}c=null,d=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new f(e,t)),1!==u.length||d||a(l)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},"./node_modules/query-string/index.js":
  /*!********************************************!*\
    !*** ./node_modules/query-string/index.js ***!
    \********************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";const r=n(/*! strict-uri-encode */"./node_modules/strict-uri-encode/index.js"),i=n(/*! decode-uri-component */"./node_modules/decode-uri-component/index.js");function o(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function s(e,t){return t.decode?i(e):e}function a(e){const t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function c(e,t){const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":return(e,t,n)=>{const r="string"==typeof t&&t.split("").indexOf(",")>-1?t.split(","):t;n[e]=r};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t=Object.assign({decode:!0,arrayFormat:"none"},t)),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){let[e,o]=i.replace(/\+/g," ").split("=");o=void 0===o?null:s(o,t),n(s(e,t),o,r)}return Object.keys(r).sort().reduce((e,t)=>{const n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}t.extract=a,t.parse=c,t.stringify=(e,t)=>{if(!e)return"";const n=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r?n:null===r?[...n,[o(t,e),"[",i,"]"].join("")]:[...n,[o(t,e),"[",o(i,e),"]=",o(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r?n:null===r?[...n,[o(t,e),"[]"].join("")]:[...n,[o(t,e),"[]=",o(r,e)].join("")];case"comma":return t=>(n,r,i)=>r?0===i?[[o(t,e),"=",o(r,e)].join("")]:[[n,o(r,e)].join(",")]:n;default:return t=>(n,r)=>void 0===r?n:null===r?[...n,o(t,e)]:[...n,[o(t,e),"=",o(r,e)].join("")]}}(t=Object.assign({encode:!0,strict:!0,arrayFormat:"none"},t)),r=Object.keys(e);return!1!==t.sort&&r.sort(t.sort),r.map(r=>{const i=e[r];return void 0===i?"":null===i?o(r,t):Array.isArray(i)?i.reduce(n(r),[]).join("&"):o(r,t)+"="+o(i,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{const n=e.indexOf("#");return-1!==n&&(e=e.slice(0,n)),{url:e.split("?")[0]||"",query:c(a(e),t)}}},"./node_modules/sdp-interop/lib/array-equals.js":
  /*!******************************************************!*\
    !*** ./node_modules/sdp-interop/lib/array-equals.js ***!
    \******************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function e(t){if(!t)return!1;if(this.length!=t.length)return!1;for(var n=0,r=this.length;n<r;n++)if(this[n]instanceof Array&&t[n]instanceof Array){if(!e.apply(this[n],[t[n]]))return!1}else if(this[n]!=t[n])return!1;return!0}},"./node_modules/sdp-interop/lib/index.js":
  /*!***********************************************!*\
    !*** ./node_modules/sdp-interop/lib/index.js ***!
    \***********************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){t.Interop=n(/*! ./interop */"./node_modules/sdp-interop/lib/interop.js")},"./node_modules/sdp-interop/lib/interop.js":
  /*!*************************************************!*\
    !*** ./node_modules/sdp-interop/lib/interop.js ***!
    \*************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ./transform */"./node_modules/sdp-interop/lib/transform.js"),i=n(/*! ./array-equals */"./node_modules/sdp-interop/lib/array-equals.js");function o(){this.cache={mlB2UMap:{},mlU2BMap:{}}}e.exports=o,o.prototype.candidateToUnifiedPlan=function(e){var t=new RTCIceCandidate(e);return t.sdpMLineIndex=this.cache.mlB2UMap[t.sdpMLineIndex],t},o.prototype.candidateToPlanB=function(e){var t=new RTCIceCandidate(e);if(0===t.sdpMid.indexOf("audio"))t.sdpMid="audio";else{if(0!==t.sdpMid.indexOf("video"))throw new Error("candidate with "+t.sdpMid+" not allowed");t.sdpMid="video"}return t.sdpMLineIndex=this.cache.mlU2BMap[t.sdpMLineIndex],t},o.prototype.getFirstSendingIndexFromAnswer=function(e){if(!this.cache.answer)return null;var t=r.parse(this.cache.answer);if(t&&t.media&&Array.isArray(t.media))for(var n=0;n<t.media.length;n++)if(t.media[n].type==e&&(!t.media[n].direction||"sendrecv"===t.media[n].direction||"sendonly"===t.media[n].direction))return n;return null},o.prototype.toPlanB=function(e){var t=this;if("object"!=typeof e||null===e||"string"!=typeof e.sdp)return console.warn("An empty description was passed as an argument."),e;var n=r.parse(e.sdp);if(void 0===n.media||!Array.isArray(n.media)||0===n.media.length)return console.warn("The description has no media."),e;if(n.media.length<=3&&n.media.every(function(e){return-1!==["video","audio","data"].indexOf(e.mid)}))return console.warn("This description does not look like Unified Plan."),e;for(var i=e.sdp,o=!1,a=0;a<n.media.length;a++){n.media[a].rtp.forEach(function(e){if("NULL"===e.codec){o=!0;var n=r.parse(t.cache.offer);e.codec=n.media[a].rtp[0].codec}})}o&&(i=r.write(n)),this.cache[e.type]=i;var c=n.media;n.media=[];var u={},d=[],p={};c.forEach(function(e){if(("string"!=typeof e.rtcpMux||"rtcp-mux"!==e.rtcpMux)&&"inactive"!==e.direction)throw new Error("Cannot convert to Plan B because m-lines without the rtcp-mux attribute were found.");void 0!==u[e.type]&&"inactive"!==u[e.type].direction||(u[e.type]=e)}),c.forEach(function(e){var t=e.type;if("application"===t)return n.media.push(e),void d.push(e.mid);"object"==typeof e.sources&&Object.keys(e.sources).forEach(function(n){"object"!=typeof u[t].sources&&(u[t].sources={}),u[t].sources[n]=e.sources[n],void 0!==e.msid&&(u[t].sources[n].msid=e.msid)}),void 0!==e.ssrcGroups&&Array.isArray(e.ssrcGroups)&&(void 0!==u[t].ssrcGroups&&Array.isArray(u[t].ssrcGroups)||(u[t].ssrcGroups=[]),u[t].ssrcGroups=u[t].ssrcGroups.concat(e.ssrcGroups));var r=e.direction;p[t]=(p[t]||0)|s[r||"inactive"],u[t]===e&&(e.mid=t,delete e.bundleOnly,delete e.msid,"inactive"!==r&&d.push(t),n.media.push(e))}),n.groups.some(function(e){if("BUNDLE"===e.type)return e.mids=d.join(" "),!0}),n.msidSemantic={semantic:"WMS",token:"*"};var h=r.write(n);return new RTCSessionDescription({type:e.type,sdp:h})},o.prototype.toUnifiedPlan=function(e){var t=this;if("object"!=typeof e||null===e||"string"!=typeof e.sdp)return console.warn("An empty description was passed as an argument."),e;var n=r.parse(e.sdp);if(void 0===n.media||!Array.isArray(n.media)||0===n.media.length)return console.warn("The description has no media."),e;if(n.media.length>3||!n.media.every(function(e){return-1!==["video","audio","data"].indexOf(e.mid)}))return console.warn("This description does not look like Plan B."),e;var o=[];n.media.forEach(function(e){o.push(e.mid)});var s,a=!1;if(void 0!==n.groups&&Array.isArray(n.groups)&&(a=n.groups.every(function(e){return"BUNDLE"!==e.type||i.apply(e.mids.sort(),[o.sort()])})),!a)throw new Error("Cannot convert to Unified Plan because m-lines that are not bundled were found.");void 0!==this.cache[e.type]&&(s=r.parse(this.cache[e.type]));var c={audio:{},video:{}},u={},d=0,p=0;if(n.media.forEach(function(n){if(("string"!=typeof n.rtcpMux||"rtcp-mux"!==n.rtcpMux)&&"inactive"!==n.direction)throw new Error("Cannot convert to Unified Plan because m-lines without the rtcp-mux attribute were found.");if("application"!==n.type){var r=n.sources,i=n.ssrcGroups,o=n.candidates,a=n.iceUfrag,h=n.icePwd,l=n.fingerprint,f=n.port;delete n.sources,delete n.ssrcGroups,delete n.candidates,delete n.iceUfrag,delete n.icePwd,delete n.fingerprint,delete n.port,delete n.mid;var m={};void 0!==i&&Array.isArray(i)&&i.forEach(function(e){"SIM"!==e.semantics&&void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&e.ssrcs.forEach(function(t){void 0===m[t]&&(m[t]=[]),m[t].push(e)})});var y={};"object"==typeof r&&Object.keys(r).forEach(function(i){var g;if("offer"!==e.type||r[i].msid)if(void 0!==m[i]&&Array.isArray(m[i])&&m[i].some(function(e){return e.ssrcs.some(function(e){if("object"==typeof y[e])return g=y[e],!0})}),"object"==typeof g)g.sources[i]=r[i],delete r[i].msid;else{if(g=Object.create(n),y[i]=g,void 0!==r[i].msid&&(g.msid=r[i].msid,delete r[i].msid),g.sources={},g.sources[i]=r[i],g.ssrcGroups=m[i],void 0!==s&&void 0!==s.media&&Array.isArray(s.media)&&s.media.forEach(function(e){"object"==typeof e.sources&&Object.keys(e.sources).forEach(function(t){t===i&&(g.mid=e.mid)})}),void 0===g.mid){if("answer"===e.type)throw new Error("An unmapped SSRC was found.");g.mid=[n.type,"-",i].join("")}g.candidates=o,g.iceUfrag=a,g.icePwd=h,g.fingerprint=l,g.port=f,u[g.mid]=g,t.cache.mlU2BMap[p]=d,void 0===t.cache.mlB2UMap[d]&&(t.cache.mlB2UMap[d]=p),p++}else c[n.type][i]=r[i]}),d++}else u[n.mid]=n}),n.media=[],o=[],"answer"===e.type)for(var h=0;h<s.media.length;h++){var l=s.media[h];void 0===u[l.mid]&&(delete l.msid,delete l.sources,delete l.ssrcGroups,l.direction&&"sendrecv"!==l.direction?"sendonly"===l.direction&&(l.direction="inactive"):l.direction="recvonly"),n.media.push(l),"string"==typeof l.mid&&o.push(l.mid)}else void 0!==s&&void 0!==s.media&&Array.isArray(s.media)&&s.media.forEach(function(e){o.push(e.mid),void 0!==u[e.mid]?n.media.push(u[e.mid]):(delete e.msid,delete e.sources,delete e.ssrcGroups,e.direction&&"sendrecv"!==e.direction||(e.direction="recvonly"),e.direction&&"sendonly"!==e.direction||(e.direction="inactive"),n.media.push(e))}),Object.keys(u).forEach(function(e){-1===o.indexOf(e)&&(o.push(e),"recvonly"===u[e].direction?n.media.some(function(t){if(("sendrecv"===t.direction||"sendonly"===t.direction)&&t.type===u[e].type)return Object.keys(u[e].sources).forEach(function(n){t.sources[n]=u[e].sources[n]}),!0}):n.media.push(u[e]))});["audio","video"].forEach(function(e){if(n&&n.media&&Array.isArray(n.media)){var r=null;if(Object.keys(c[e]).length>0&&null===(r=t.getFirstSendingIndexFromAnswer(e)))for(var i=0;i<n.media.length;i++)if(n.media[i].type===e){r=i;break}if(r&&n.media.length>r){var o=n.media[r];Object.keys(c[e]).forEach(function(t){o.sources&&o.sources[t]&&console.warn("Replacing an existing SSRC."),o.sources||(o.sources={}),o.sources[t]=c[e][t]})}}}),n.groups.some(function(e){if("BUNDLE"===e.type)return e.mids=o.join(" "),!0}),n.msidSemantic={semantic:"WMS",token:"*"};var f=r.write(n);return this.cache[e.type]=f,new RTCSessionDescription({type:e.type,sdp:f})};var s={inactive:0,recvonly:1,sendonly:2,sendrecv:3}},"./node_modules/sdp-interop/lib/transform.js":
  /*!***************************************************!*\
    !*** ./node_modules/sdp-interop/lib/transform.js ***!
    \***************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! sdp-transform */"./node_modules/sdp-interop/node_modules/sdp-transform/lib/index.js");t.write=function(e,t){return void 0!==e&&void 0!==e.media&&Array.isArray(e.media)&&e.media.forEach(function(e){void 0!==e.sources&&0!==Object.keys(e.sources).length&&(e.ssrcs=[],Object.keys(e.sources).forEach(function(t){var n=e.sources[t];Object.keys(n).forEach(function(r){e.ssrcs.push({id:t,attribute:r,value:n[r]})})}),delete e.sources),void 0!==e.ssrcGroups&&Array.isArray(e.ssrcGroups)&&e.ssrcGroups.forEach(function(e){void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&(e.ssrcs=e.ssrcs.join(" "))})}),void 0!==e&&void 0!==e.groups&&Array.isArray(e.groups)&&e.groups.forEach(function(e){void 0!==e.mids&&Array.isArray(e.mids)&&(e.mids=e.mids.join(" "))}),r.write(e,t)},t.parse=function(e){var t=r.parse(e);return void 0!==t&&void 0!==t.media&&Array.isArray(t.media)&&t.media.forEach(function(e){void 0!==e.ssrcs&&Array.isArray(e.ssrcs)&&(e.sources={},e.ssrcs.forEach(function(t){e.sources[t.id]||(e.sources[t.id]={}),e.sources[t.id][t.attribute]=t.value}),delete e.ssrcs),void 0!==e.ssrcGroups&&Array.isArray(e.ssrcGroups)&&e.ssrcGroups.forEach(function(e){"string"==typeof e.ssrcs&&(e.ssrcs=e.ssrcs.split(" "))})}),void 0!==t&&void 0!==t.groups&&Array.isArray(t.groups)&&t.groups.forEach(function(e){"string"==typeof e.mids&&(e.mids=e.mids.split(" "))}),t}},"./node_modules/sdp-interop/node_modules/sdp-transform/lib/grammar.js":
  /*!****************************************************************************!*\
    !*** ./node_modules/sdp-interop/node_modules/sdp-transform/lib/grammar.js ***!
    \****************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=e.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w\/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-\.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%d trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))? (\S*)(?: (\S*))?/,names:["value","direction","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+" %s"+(e.config?" %s":"")}},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_\/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{push:"invalid",names:["value"]}]};Object.keys(n).forEach(function(e){n[e].forEach(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")})})},"./node_modules/sdp-interop/node_modules/sdp-transform/lib/index.js":
  /*!**************************************************************************!*\
    !*** ./node_modules/sdp-interop/node_modules/sdp-transform/lib/index.js ***!
    \**************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./parser */"./node_modules/sdp-interop/node_modules/sdp-transform/lib/parser.js"),i=n(/*! ./writer */"./node_modules/sdp-interop/node_modules/sdp-transform/lib/writer.js");t.write=i,t.parse=r.parse,t.parseFmtpConfig=r.parseFmtpConfig,t.parseParams=r.parseParams,t.parsePayloads=r.parsePayloads,t.parseRemoteCandidates=r.parseRemoteCandidates,t.parseImageAttributes=r.parseImageAttributes,t.parseSimulcastStreamList=r.parseSimulcastStreamList},"./node_modules/sdp-interop/node_modules/sdp-transform/lib/parser.js":
  /*!***************************************************************************!*\
    !*** ./node_modules/sdp-interop/node_modules/sdp-transform/lib/parser.js ***!
    \***************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=function(e){return String(Number(e))===e?Number(e):e},i=function(e,t,n){var i=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:i&&!t[e.name]&&(t[e.name]={});var o=e.push?{}:i?t[e.name]:t;!function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o<n.length;o+=1)null!=e[o+1]&&(t[n[o]]=r(e[o+1]))}(n.match(e.reg),o,e.names,e.name),e.push&&t[e.push].push(o)},o=n(/*! ./grammar */"./node_modules/sdp-interop/node_modules/sdp-transform/lib/grammar.js"),s=RegExp.prototype.test.bind(/^([a-z])=(.*)/);t.parse=function(e){var t={},n=[],r=t;return e.split(/(\r\n|\r|\n)/).filter(s).forEach(function(e){var t=e[0],s=e.slice(2);"m"===t&&(n.push({rtp:[],fmtp:[]}),r=n[n.length-1]);for(var a=0;a<(o[t]||[]).length;a+=1){var c=o[t][a];if(c.reg.test(s))return i(c,r,s)}}),t.media=n,t};var a=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length&&(e[n[0]]=r(n[1])),e};t.parseParams=function(e){return e.split(/\;\s?/).reduce(a,{})},t.parseFmtpConfig=t.parseParams,t.parsePayloads=function(e){return e.split(" ").map(Number)},t.parseRemoteCandidates=function(e){for(var t=[],n=e.split(" ").map(r),i=0;i<n.length;i+=3)t.push({component:n[i],ip:n[i+1],port:n[i+2]});return t},t.parseImageAttributes=function(e){return e.split(" ").map(function(e){return e.substring(1,e.length-1).split(",").reduce(a,{})})},t.parseSimulcastStreamList=function(e){return e.split(";").map(function(e){return e.split(",").map(function(e){var t,n=!1;return"~"!==e[0]?t=r(e):(t=r(e.substring(1,e.length)),n=!0),{scid:t,paused:n}})})}},"./node_modules/sdp-interop/node_modules/sdp-transform/lib/writer.js":
  /*!***************************************************************************!*\
    !*** ./node_modules/sdp-interop/node_modules/sdp-transform/lib/writer.js ***!
    \***************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./grammar */"./node_modules/sdp-interop/node_modules/sdp-transform/lib/grammar.js"),i=/%[sdv%]/g,o=function(e,t,n){var r=[e+"="+(t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format)];if(t.names)for(var o=0;o<t.names.length;o+=1){var s=t.names[o];t.name?r.push(n[t.name][s]):r.push(n[t.names[o]])}else r.push(n[t.name]);return function(e){var t=1,n=arguments,r=n.length;return e.replace(i,function(e){if(t>=r)return e;var i=n[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}})}.apply(null,r)},s=["v","o","s","i","u","e","p","c","b","t","r","z","a"],a=["i","c","b","a"];e.exports=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach(function(e){null==e.payloads&&(e.payloads="")});var n=t.outerOrder||s,i=t.innerOrder||a,c=[];return n.forEach(function(t){r[t].forEach(function(n){n.name in e&&null!=e[n.name]?c.push(o(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach(function(e){c.push(o(t,n,e))})})}),e.media.forEach(function(e){c.push(o("m",r.m[0],e)),i.forEach(function(t){r[t].forEach(function(n){n.name in e&&null!=e[n.name]?c.push(o(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach(function(e){c.push(o(t,n,e))})})})}),c.join("\r\n")+"\r\n"}},"./node_modules/sdp-transform/lib/grammar.js":
  /*!***************************************************!*\
    !*** ./node_modules/sdp-transform/lib/grammar.js ***!
    \***************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=e.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w\/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-\.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%d trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))? (\S*)(?: (\S*))?/,names:["value","direction","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+" %s"+(e.config?" %s":"")}},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_\/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"invalid",names:["value"]}]};Object.keys(n).forEach(function(e){n[e].forEach(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")})})},"./node_modules/sdp-transform/lib/index.js":
  /*!*************************************************!*\
    !*** ./node_modules/sdp-transform/lib/index.js ***!
    \*************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./parser */"./node_modules/sdp-transform/lib/parser.js"),i=n(/*! ./writer */"./node_modules/sdp-transform/lib/writer.js");t.write=i,t.parse=r.parse,t.parseFmtpConfig=r.parseFmtpConfig,t.parseParams=r.parseParams,t.parsePayloads=r.parsePayloads,t.parseRemoteCandidates=r.parseRemoteCandidates,t.parseImageAttributes=r.parseImageAttributes,t.parseSimulcastStreamList=r.parseSimulcastStreamList},"./node_modules/sdp-transform/lib/parser.js":
  /*!**************************************************!*\
    !*** ./node_modules/sdp-transform/lib/parser.js ***!
    \**************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=function(e){return String(Number(e))===e?Number(e):e},i=function(e,t,n){var i=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:i&&!t[e.name]&&(t[e.name]={});var o=e.push?{}:i?t[e.name]:t;!function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o<n.length;o+=1)null!=e[o+1]&&(t[n[o]]=r(e[o+1]))}(n.match(e.reg),o,e.names,e.name),e.push&&t[e.push].push(o)},o=n(/*! ./grammar */"./node_modules/sdp-transform/lib/grammar.js"),s=RegExp.prototype.test.bind(/^([a-z])=(.*)/);t.parse=function(e){var t={},n=[],r=t;return e.split(/(\r\n|\r|\n)/).filter(s).forEach(function(e){var t=e[0],s=e.slice(2);"m"===t&&(n.push({rtp:[],fmtp:[]}),r=n[n.length-1]);for(var a=0;a<(o[t]||[]).length;a+=1){var c=o[t][a];if(c.reg.test(s))return i(c,r,s)}}),t.media=n,t};var a=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length?e[n[0]]=r(n[1]):1===n.length&&t.length>1&&(e[n[0]]=void 0),e};t.parseParams=function(e){return e.split(/\;\s?/).reduce(a,{})},t.parseFmtpConfig=t.parseParams,t.parsePayloads=function(e){return e.split(" ").map(Number)},t.parseRemoteCandidates=function(e){for(var t=[],n=e.split(" ").map(r),i=0;i<n.length;i+=3)t.push({component:n[i],ip:n[i+1],port:n[i+2]});return t},t.parseImageAttributes=function(e){return e.split(" ").map(function(e){return e.substring(1,e.length-1).split(",").reduce(a,{})})},t.parseSimulcastStreamList=function(e){return e.split(";").map(function(e){return e.split(",").map(function(e){var t,n=!1;return"~"!==e[0]?t=r(e):(t=r(e.substring(1,e.length)),n=!0),{scid:t,paused:n}})})}},"./node_modules/sdp-transform/lib/writer.js":
  /*!**************************************************!*\
    !*** ./node_modules/sdp-transform/lib/writer.js ***!
    \**************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./grammar */"./node_modules/sdp-transform/lib/grammar.js"),i=/%[sdv%]/g,o=function(e,t,n){var r=[e+"="+(t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format)];if(t.names)for(var o=0;o<t.names.length;o+=1){var s=t.names[o];t.name?r.push(n[t.name][s]):r.push(n[t.names[o]])}else r.push(n[t.name]);return function(e){var t=1,n=arguments,r=n.length;return e.replace(i,function(e){if(t>=r)return e;var i=n[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}})}.apply(null,r)},s=["v","o","s","i","u","e","p","c","b","t","r","z","a"],a=["i","c","b","a"];e.exports=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach(function(e){null==e.payloads&&(e.payloads="")});var n=t.outerOrder||s,i=t.innerOrder||a,c=[];return n.forEach(function(t){r[t].forEach(function(n){n.name in e&&null!=e[n.name]?c.push(o(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach(function(e){c.push(o(t,n,e))})})}),e.media.forEach(function(e){c.push(o("m",r.m[0],e)),i.forEach(function(t){r[t].forEach(function(n){n.name in e&&null!=e[n.name]?c.push(o(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach(function(e){c.push(o(t,n,e))})})})}),c.join("\r\n")+"\r\n"}},"./node_modules/socket.io-client/lib/index.js":
  /*!****************************************************!*\
    !*** ./node_modules/socket.io-client/lib/index.js ***!
    \****************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./url */"./node_modules/socket.io-client/lib/url.js"),i=n(/*! socket.io-parser */"./node_modules/socket.io-client/node_modules/socket.io-parser/index.js"),o=n(/*! ./manager */"./node_modules/socket.io-client/lib/manager.js"),s=n(/*! debug */"./node_modules/socket.io-client/node_modules/debug/src/browser.js")("socket.io-client");e.exports=t=c;var a=t.managers={};function c(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i=r(e),c=i.source,u=i.id,d=i.path,p=a[u]&&d in a[u].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||p?(s("ignoring socket cache for %s",c),n=o(c,t)):(a[u]||(s("new io instance for %s",c),a[u]=o(c,t)),n=a[u]),i.query&&!t.query&&(t.query=i.query),n.socket(i.path,t)}t.protocol=i.protocol,t.connect=c,t.Manager=n(/*! ./manager */"./node_modules/socket.io-client/lib/manager.js"),t.Socket=n(/*! ./socket */"./node_modules/socket.io-client/lib/socket.js")},"./node_modules/socket.io-client/lib/manager.js":
  /*!******************************************************!*\
    !*** ./node_modules/socket.io-client/lib/manager.js ***!
    \******************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! engine.io-client */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/index.js"),i=n(/*! ./socket */"./node_modules/socket.io-client/lib/socket.js"),o=n(/*! component-emitter */"./node_modules/component-emitter/index.js"),s=n(/*! socket.io-parser */"./node_modules/socket.io-client/node_modules/socket.io-parser/index.js"),a=n(/*! ./on */"./node_modules/socket.io-client/lib/on.js"),c=n(/*! component-bind */"./node_modules/component-bind/index.js"),u=n(/*! debug */"./node_modules/socket.io-client/node_modules/debug/src/browser.js")("socket.io-client:manager"),d=n(/*! indexof */"./node_modules/indexof/index.js"),p=n(/*! backo2 */"./node_modules/backo2/index.js"),h=Object.prototype.hasOwnProperty;function l(e,t){if(!(this instanceof l))return new l(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=l,l.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)h.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},l.prototype.updateSocketIds=function(){for(var e in this.nsps)h.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},l.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},o(l.prototype),l.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},l.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},l.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},l.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},l.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},l.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},l.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},l.prototype.open=l.prototype.connect=function(e,t){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,i=this;this.readyState="opening",this.skipReconnect=!1;var o=a(n,"open",function(){i.onopen(),e&&e()}),s=a(n,"error",function(t){if(u("connect_error"),i.cleanup(),i.readyState="closed",i.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else i.maybeReconnectOnOpen()});if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c);var d=setTimeout(function(){u("connect attempt timed out after %d",c),o.destroy(),n.close(),n.emit("error","timeout"),i.emitAll("connect_timeout",c)},c);this.subs.push({destroy:function(){clearTimeout(d)}})}return this.subs.push(o),this.subs.push(s),this},l.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",c(this,"ondata"))),this.subs.push(a(e,"ping",c(this,"onping"))),this.subs.push(a(e,"pong",c(this,"onpong"))),this.subs.push(a(e,"error",c(this,"onerror"))),this.subs.push(a(e,"close",c(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",c(this,"ondecoded")))},l.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},l.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},l.prototype.ondata=function(e){this.decoder.add(e)},l.prototype.ondecoded=function(e){this.emit("packet",e)},l.prototype.onerror=function(e){u("error",e),this.emitAll("error",e)},l.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new i(this,e,t),this.nsps[e]=n;var r=this;n.on("connecting",o),n.on("connect",function(){n.id=r.generateId(e)}),this.autoConnect&&o()}function o(){~d(r.connecting,n)||r.connecting.push(n)}return n},l.prototype.destroy=function(e){var t=d(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},l.prototype.packet=function(e){u("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()}))},l.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},l.prototype.cleanup=function(){u("cleanup");for(var e=this.subs.length,t=0;t<e;t++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},l.prototype.close=l.prototype.disconnect=function(){u("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},l.prototype.onclose=function(e){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},l.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();u("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout(function(){e.skipReconnect||(u("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(u("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(u("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(n)}})}},l.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},"./node_modules/socket.io-client/lib/on.js":
  /*!*************************************************!*\
    !*** ./node_modules/socket.io-client/lib/on.js ***!
    \*************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},"./node_modules/socket.io-client/lib/socket.js":
  /*!*****************************************************!*\
    !*** ./node_modules/socket.io-client/lib/socket.js ***!
    \*****************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! socket.io-parser */"./node_modules/socket.io-client/node_modules/socket.io-parser/index.js"),i=n(/*! component-emitter */"./node_modules/component-emitter/index.js"),o=n(/*! to-array */"./node_modules/to-array/index.js"),s=n(/*! ./on */"./node_modules/socket.io-client/lib/on.js"),a=n(/*! component-bind */"./node_modules/component-bind/index.js"),c=n(/*! debug */"./node_modules/socket.io-client/node_modules/debug/src/browser.js")("socket.io-client:socket"),u=n(/*! parseqs */"./node_modules/parseqs/index.js"),d=n(/*! has-binary2 */"./node_modules/has-binary2/index.js");e.exports=l;var p={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=i.prototype.emit;function l(e,t,n){this.io=e,this.nsp=t,this.json=this,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()}i(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",a(this,"onopen")),s(e,"packet",a(this,"onpacket")),s(e,"close",a(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},l.prototype.send=function(){var e=o(arguments);return e.unshift("message"),this.emit.apply(this,e),this},l.prototype.emit=function(e){if(p.hasOwnProperty(e))return h.apply(this,arguments),this;var t=o(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:d(t))?r.BINARY_EVENT:r.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},l.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},l.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?u.encode(this.query):this.query;c("sending connect packet with query %s",e),this.packet({type:r.CONNECT,query:e})}else this.packet({type:r.CONNECT})},l.prototype.onclose=function(e){c("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},l.prototype.onpacket=function(e){var t=e.nsp===this.nsp,n=e.type===r.ERROR&&"/"===e.nsp;if(t||n)switch(e.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(e);break;case r.ACK:case r.BINARY_ACK:this.onack(e);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",e.data)}},l.prototype.onevent=function(e){var t=e.data||[];c("emitting event %j",t),null!=e.id&&(c("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?h.apply(this,t):this.receiveBuffer.push(t)},l.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var i=o(arguments);c("sending ack %j",i),t.packet({type:d(i)?r.BINARY_ACK:r.ACK,id:e,data:i})}}},l.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(c("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):c("bad ack %s",e.id)},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},l.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)h.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},l.prototype.compress=function(e){return this.flags.compress=e,this},l.prototype.binary=function(e){return this.flags.binary=e,this}},"./node_modules/socket.io-client/lib/url.js":
  /*!**************************************************!*\
    !*** ./node_modules/socket.io-client/lib/url.js ***!
    \**************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! parseuri */"./node_modules/parseuri/index.js"),i=n(/*! debug */"./node_modules/socket.io-client/node_modules/debug/src/browser.js")("socket.io-client:url");e.exports=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host);"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),i("parse %s",e),n=r(e));n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443"));n.path=n.path||"/";var o=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port,n.href=n.protocol+"://"+o+(t&&t.port===n.port?"":":"+n.port),n}},"./node_modules/socket.io-client/node_modules/debug/src/browser.js":
  /*!*************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/debug/src/browser.js ***!
    \*************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(r){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(/*! ./debug */"./node_modules/socket.io-client/node_modules/debug/src/debug.js")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(/*! ./../../../../process/browser.js */"./node_modules/process/browser.js"))},"./node_modules/socket.io-client/node_modules/debug/src/debug.js":
  /*!***********************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/debug/src/debug.js ***!
    \***********************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;c++;var i=t.formatters[r];if("function"==typeof i){var o=s[c];n=i.call(e,o),s.splice(c,1),c--}return n}),t.formatArgs.call(e,s),(r.log||t.log||console.log.bind(console)).apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=i,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function i(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(/*! ms */"./node_modules/ms/index.js"),t.instances=[],t.names=[],t.skips=[],t.formatters={}},"./node_modules/socket.io-client/node_modules/engine.io-client/lib/index.js":
  /*!**********************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/engine.io-client/lib/index.js ***!
    \**********************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n(/*! ./socket */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/socket.js"),e.exports.parser=n(/*! engine.io-parser */"./node_modules/engine.io-parser/lib/browser.js")},"./node_modules/socket.io-client/node_modules/engine.io-client/lib/socket.js":
  /*!***********************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/engine.io-client/lib/socket.js ***!
    \***********************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./transports/index */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/index.js"),i=n(/*! component-emitter */"./node_modules/component-emitter/index.js"),o=n(/*! debug */"./node_modules/socket.io-client/node_modules/debug/src/browser.js")("engine.io-client:socket"),s=n(/*! indexof */"./node_modules/indexof/index.js"),a=n(/*! engine.io-parser */"./node_modules/engine.io-parser/lib/browser.js"),c=n(/*! parseuri */"./node_modules/parseuri/index.js"),u=n(/*! parseqs */"./node_modules/parseqs/index.js");function d(e,t){if(!(this instanceof d))return new d(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=c(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=c(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=u.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.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=d,d.priorWebsocketSuccess=!1,i(d.prototype),d.protocol=a.protocol,d.Socket=d,d.Transport=n(/*! ./transport */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transport.js"),d.transports=n(/*! ./transports/index */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/index.js"),d.parser=n(/*! engine.io-parser */"./node_modules/engine.io-parser/lib/browser.js"),d.prototype.createTransport=function(e){o('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=a.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new r[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},d.prototype.open=function(){var e;if(this.rememberUpgrade&&d.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";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},d.prototype.setTransport=function(e){o("setting transport %s",e.name);var t=this;this.transport&&(o("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")})},d.prototype.probe=function(e){o('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,r=this;function i(){if(r.onlyBinaryUpgrades){var i=!this.supportsBinary&&r.transport.supportsBinary;n=n||i}n||(o('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(i){if(!n)if("pong"===i.type&&"probe"===i.data){if(o('probe transport "%s" pong',e),r.upgrading=!0,r.emit("upgrading",t),!t)return;d.priorWebsocketSuccess="websocket"===t.name,o('pausing current transport "%s"',r.transport.name),r.transport.pause(function(){n||"closed"!==r.readyState&&(o("changing transport and sending upgrade packet"),h(),r.setTransport(t),t.send([{type:"upgrade"}]),r.emit("upgrade",t),t=null,r.upgrading=!1,r.flush())})}else{o('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,r.emit("upgradeError",s)}}))}function s(){n||(n=!0,h(),t.close(),t=null)}function a(n){var i=new Error("probe error: "+n);i.transport=t.name,s(),o('probe transport "%s" failed because of error: %s',e,n),r.emit("upgradeError",i)}function c(){a("transport closed")}function u(){a("socket closed")}function p(e){t&&e.name!==t.name&&(o('"%s" works - aborting "%s"',e.name,t.name),s())}function h(){t.removeListener("open",i),t.removeListener("error",a),t.removeListener("close",c),r.removeListener("close",u),r.removeListener("upgrading",p)}d.priorWebsocketSuccess=!1,t.once("open",i),t.once("error",a),t.once("close",c),this.once("close",u),this.once("upgrading",p),t.open()},d.prototype.onOpen=function(){if(o("socket open"),this.readyState="open",d.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){o("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},d.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(o('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else o('packet received with socket readyState "%s"',this.readyState)},d.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))},d.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)},d.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){o("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},d.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},d.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},d.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(o("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},d.prototype.write=d.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},d.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:e,data:t,options:n};this.emit("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}},d.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?r():t()}):this.upgrading?r():t()}function t(){e.onClose("forced close"),o("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function r(){e.once("upgrade",n),e.once("upgradeError",n)}return this},d.prototype.onError=function(e){o("socket error %j",e),d.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},d.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){o('socket close with reason: "%s"',e);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0}},d.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;n<r;n++)~s(this.transports,e[n])&&t.push(e[n]);return t}},"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transport.js":
  /*!**************************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/engine.io-client/lib/transport.js ***!
    \**************************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! engine.io-parser */"./node_modules/engine.io-parser/lib/browser.js"),i=n(/*! component-emitter */"./node_modules/component-emitter/index.js");function o(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,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=o,i(o.prototype),o.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},o.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},o.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(e){var t=r.decodePacket(e,this.socket.binaryType);this.onPacket(t)},o.prototype.onPacket=function(e){this.emit("packet",e)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/index.js":
  /*!*********************************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/index.js ***!
    \*********************************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! xmlhttprequest-ssl */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/xmlhttprequest.js"),i=n(/*! ./polling-xhr */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling-xhr.js"),o=n(/*! ./polling-jsonp */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling-jsonp.js"),s=n(/*! ./websocket */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/websocket.js");t.polling=function(e){var t=!1,n=!1,s=!1!==e.jsonp;if("undefined"!=typeof location){var a="https:"===location.protocol,c=location.port;c||(c=a?443:80),t=e.hostname!==location.hostname||c!==e.port,n=e.secure!==a}if(e.xdomain=t,e.xscheme=n,"open"in new r(e)&&!e.forceJSONP)return new i(e);if(!s)throw new Error("JSONP disabled");return new o(e)},t.websocket=s},"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling-jsonp.js":
  /*!*****************************************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling-jsonp.js ***!
    \*****************************************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t){var r=n(/*! ./polling */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js"),i=n(/*! component-inherit */"./node_modules/component-inherit/index.js");e.exports=d;var o,s=/\n/g,a=/\\n/g;function c(){}function u(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{}}function d(e){if(r.call(this,e),this.query=this.query||{},!o){var t=u();o=t.___eio=t.___eio||[]}this.index=o.length;var n=this;o.push(function(e){n.onData(e)}),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",function(){n.script&&(n.script.onerror=c)},!1)}i(d,r),d.prototype.supportsBinary=!1,d.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,this.iframe=null),r.prototype.doClose.call(this)},d.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?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},d.prototype.doWrite=function(e,t){var n=this;if(!this.form){var r,i=document.createElement("form"),o=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;i.className="socketio",i.style.position="absolute",i.style.top="-1000px",i.style.left="-1000px",i.target=c,i.method="POST",i.setAttribute("accept-charset","utf-8"),o.name="d",i.appendChild(o),document.body.appendChild(i),this.form=i,this.area=o}function u(){d(),t()}function d(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(e)}catch(e){(r=document.createElement("iframe")).name=n.iframeId,r.src="javascript:0"}r.id=n.iframeId,n.form.appendChild(r),n.iframe=r}this.form.action=this.uri(),d(),e=e.replace(a,"\\\n"),this.area.value=e.replace(s,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&u()}:this.iframe.onload=u}}).call(this,n(/*! ./../../../../../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"))},"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling-xhr.js":
  /*!***************************************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling-xhr.js ***!
    \***************************************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! xmlhttprequest-ssl */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/xmlhttprequest.js"),i=n(/*! ./polling */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js"),o=n(/*! component-emitter */"./node_modules/component-emitter/index.js"),s=n(/*! component-inherit */"./node_modules/component-inherit/index.js"),a=n(/*! debug */"./node_modules/socket.io-client/node_modules/debug/src/browser.js")("engine.io-client:polling-xhr");function c(){}function u(e){if(i.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,"undefined"!=typeof location){var t="https:"===location.protocol,n=location.port;n||(n=t?443:80),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}}function d(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.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(e.exports=u,e.exports.Request=d,s(u,i),u.prototype.supportsBinary=!0,u.prototype.request=function(e){return(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,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new d(e)},u.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),i=this;r.on("success",t),r.on("error",function(e){i.onError("xhr post error",e)}),this.sendXhr=r},u.prototype.doPoll=function(){a("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},o(d.prototype),d.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new r(e),n=this;try{a("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var i in t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&t.setRequestHeader(i,this.extraHeaders[i])}catch(e){}if("POST"===this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=!0),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){n.onLoad()},t.onerror=function(){n.onError(t.responseText)}):t.onreadystatechange=function(){if(2===t.readyState)try{var e=t.getResponseHeader("Content-Type");n.supportsBinary&&"application/octet-stream"===e&&(t.responseType="arraybuffer")}catch(e){}4===t.readyState&&(200===t.status||1223===t.status?n.onLoad():setTimeout(function(){n.onError(t.status)},0))},a("xhr data %s",this.data),t.send(this.data)}catch(e){return void setTimeout(function(){n.onError(e)},0)}"undefined"!=typeof document&&(this.index=d.requestsCount++,d.requests[this.index]=this)},d.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},d.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},d.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},d.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete d.requests[this.index],this.xhr=null}},d.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e="application/octet-stream"===t&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},d.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},d.prototype.abort=function(){this.cleanup()},d.requestsCount=0,d.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",h);else if("function"==typeof addEventListener){var p="onpagehide"in self?"pagehide":"unload";addEventListener(p,h,!1)}function h(){for(var e in d.requests)d.requests.hasOwnProperty(e)&&d.requests[e].abort()}},"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js":
  /*!***********************************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/polling.js ***!
    \***********************************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../transport */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transport.js"),i=n(/*! parseqs */"./node_modules/parseqs/index.js"),o=n(/*! engine.io-parser */"./node_modules/engine.io-parser/lib/browser.js"),s=n(/*! component-inherit */"./node_modules/component-inherit/index.js"),a=n(/*! yeast */"./node_modules/yeast/index.js"),c=n(/*! debug */"./node_modules/socket.io-client/node_modules/debug/src/browser.js")("engine.io-client:polling");e.exports=d;var u=null!=new(n(/*! xmlhttprequest-ssl */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/xmlhttprequest.js"))({xdomain:!1}).responseType;function d(e){var t=e&&e.forceBase64;u&&!t||(this.supportsBinary=!1),r.call(this,e)}s(d,r),d.prototype.name="polling",d.prototype.doOpen=function(){this.poll()},d.prototype.pause=function(e){var t=this;function n(){c("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(c("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){c("pre-pause polling complete"),--r||n()})),this.writable||(c("we are currently writing - waiting to pause"),r++,this.once("drain",function(){c("pre-pause writing complete"),--r||n()}))}else n()},d.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},d.prototype.onData=function(e){var t=this;c("polling got data %s",e);o.decodePayload(e,this.socket.binaryType,function(e,n,r){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)}),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},d.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},d.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};o.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},d.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/websocket.js":
  /*!*************************************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/engine.io-client/lib/transports/websocket.js ***!
    \*************************************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t){var r,i,o=n(/*! ../transport */"./node_modules/socket.io-client/node_modules/engine.io-client/lib/transport.js"),s=n(/*! engine.io-parser */"./node_modules/engine.io-parser/lib/browser.js"),a=n(/*! parseqs */"./node_modules/parseqs/index.js"),c=n(/*! component-inherit */"./node_modules/component-inherit/index.js"),u=n(/*! yeast */"./node_modules/yeast/index.js"),d=n(/*! debug */"./node_modules/socket.io-client/node_modules/debug/src/browser.js")("engine.io-client:websocket");if("undefined"!=typeof WebSocket)r=WebSocket;else if("undefined"!=typeof self)r=self.WebSocket||self.MozWebSocket;else try{i=n(/*! ws */0)}catch(e){}var p=r||i;function h(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=r&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(p=i),o.call(this,e)}e.exports=h,c(h,o),h.prototype.name="websocket",h.prototype.supportsBinary=!0,h.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={agent:this.agent,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?t?new p(e,t):new p(e):new p(e,t,n)}catch(e){return this.emit("error",e)}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()}},h.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)}},h.prototype.write=function(e){var n=this;this.writable=!1;for(var r=e.length,i=0,o=r;i<o;i++)!function(e){s.encodePacket(e,n.supportsBinary,function(i){if(!n.usingBrowserWebSocket){var o={};if(e.options&&(o.compress=e.options.compress),n.perMessageDeflate)("string"==typeof i?t.byteLength(i):i.length)<n.perMessageDeflate.threshold&&(o.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(i):n.ws.send(i,o)}catch(e){d("websocket closed before onclose event")}--r||a()})}(e[i]);function a(){n.emit("flush"),setTimeout(function(){n.writable=!0,n.emit("drain")},0)}},h.prototype.onClose=function(){o.prototype.onClose.call(this)},h.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},h.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=u()),this.supportsBinary||(e.b64=1),(e=a.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},h.prototype.check=function(){return!(!p||"__initialize"in p&&this.name===h.prototype.name)}}).call(this,n(/*! ./../../../../../node-libs-browser/node_modules/buffer/index.js */"./node_modules/node-libs-browser/node_modules/buffer/index.js").Buffer)},"./node_modules/socket.io-client/node_modules/engine.io-client/lib/xmlhttprequest.js":
  /*!*******************************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/engine.io-client/lib/xmlhttprequest.js ***!
    \*******************************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! has-cors */"./node_modules/has-cors/index.js");e.exports=function(e){var t=e.xdomain,n=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(e){}if(!t)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},"./node_modules/socket.io-client/node_modules/isarray/index.js":
  /*!*********************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/isarray/index.js ***!
    \*********************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},"./node_modules/socket.io-client/node_modules/socket.io-parser/binary.js":
  /*!*******************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/socket.io-parser/binary.js ***!
    \*******************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! isarray */"./node_modules/socket.io-client/node_modules/isarray/index.js"),i=n(/*! ./is-buffer */"./node_modules/socket.io-client/node_modules/socket.io-parser/is-buffer.js"),o=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.deconstructPacket=function(e){var t=[],n=e.data,o=e;return o.data=function e(t,n){if(!t)return t;if(i(t)){var o={_placeholder:!0,num:n.length};return n.push(t),o}if(r(t)){for(var s=new Array(t.length),a=0;a<t.length;a++)s[a]=e(t[a],n);return s}if("object"==typeof t&&!(t instanceof Date)){var s={};for(var c in t)s[c]=e(t[c],n);return s}return t}(n,t),o.attachments=t.length,{packet:o,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(r(t))for(var i=0;i<t.length;i++)t[i]=e(t[i],n);else if("object"==typeof t)for(var o in t)t[o]=e(t[o],n);return t}(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,o=e;!function e(c,u,d){if(!c)return c;if(s&&c instanceof Blob||a&&c instanceof File){n++;var p=new FileReader;p.onload=function(){d?d[u]=this.result:o=this.result,--n||t(o)},p.readAsArrayBuffer(c)}else if(r(c))for(var h=0;h<c.length;h++)e(c[h],h,c);else if("object"==typeof c&&!i(c))for(var l in c)e(c[l],l,c)}(o),n||t(o)}},"./node_modules/socket.io-client/node_modules/socket.io-parser/index.js":
  /*!******************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/socket.io-parser/index.js ***!
    \******************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! debug */"./node_modules/socket.io-client/node_modules/debug/src/browser.js")("socket.io-parser"),i=n(/*! component-emitter */"./node_modules/component-emitter/index.js"),o=n(/*! ./binary */"./node_modules/socket.io-client/node_modules/socket.io-parser/binary.js"),s=n(/*! isarray */"./node_modules/socket.io-client/node_modules/isarray/index.js"),a=n(/*! ./is-buffer */"./node_modules/socket.io-client/node_modules/socket.io-parser/is-buffer.js");function c(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=c,t.Decoder=p;var u=t.ERROR+'"encode error"';function d(e){var n=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data){var i=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===i)return u;n+=i}return r("encoded %j as %s",e,n),n}function p(){this.reconstructor=null}function h(e){this.reconPack=e,this.buffers=[]}function l(e){return{type:t.ERROR,data:"parser error: "+e}}c.prototype.encode=function(e,n){(r("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)?function(e,t){o.removeBlobs(e,function(e){var n=o.deconstructPacket(e),r=d(n.packet),i=n.buffers;i.unshift(r),t(i)})}(e,n):n([d(e)])},i(p.prototype),p.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n=0,i={type:Number(e.charAt(0))};if(null==t.types[i.type])return l("unknown packet type "+i.type);if(t.BINARY_EVENT===i.type||t.BINARY_ACK===i.type){for(var o="";"-"!==e.charAt(++n)&&(o+=e.charAt(n),n!=e.length););if(o!=Number(o)||"-"!==e.charAt(n))throw new Error("Illegal attachments");i.attachments=Number(o)}if("/"===e.charAt(n+1))for(i.nsp="";++n;){var a=e.charAt(n);if(","===a)break;if(i.nsp+=a,n===e.length)break}else i.nsp="/";var c=e.charAt(n+1);if(""!==c&&Number(c)==c){for(i.id="";++n;){var a=e.charAt(n);if(null==a||Number(a)!=a){--n;break}if(i.id+=e.charAt(n),n===e.length)break}i.id=Number(i.id)}if(e.charAt(++n)){var u=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n)),d=!1!==u&&(i.type===t.ERROR||s(u));if(!d)return l("invalid payload");i.data=u}return r("decoded %s as %j",e,i),i}(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new h(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!a(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},p.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},h.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=o.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},h.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},"./node_modules/socket.io-client/node_modules/socket.io-parser/is-buffer.js":
  /*!**********************************************************************************!*\
    !*** ./node_modules/socket.io-client/node_modules/socket.io-parser/is-buffer.js ***!
    \**********************************************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t){e.exports=function(e){return n&&t.isBuffer(e)||r&&(e instanceof ArrayBuffer||i(e))};var n="function"==typeof t&&"function"==typeof t.isBuffer,r="function"==typeof ArrayBuffer,i=function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}}).call(this,n(/*! ./../../../node-libs-browser/node_modules/buffer/index.js */"./node_modules/node-libs-browser/node_modules/buffer/index.js").Buffer)},"./node_modules/strict-uri-encode/index.js":
  /*!*************************************************!*\
    !*** ./node_modules/strict-uri-encode/index.js ***!
    \*************************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},"./node_modules/to-array/index.js":
  /*!****************************************!*\
    !*** ./node_modules/to-array/index.js ***!
    \****************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t){for(var n=[],r=(t=t||0)||0;r<e.length;r++)n[r-t]=e[r];return n}},"./node_modules/webpack/buildin/global.js":
  /*!***********************************!*\
    !*** (webpack)/buildin/global.js ***!
    \***********************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},"./node_modules/webpack/buildin/module.js":
  /*!***********************************!*\
    !*** (webpack)/buildin/module.js ***!
    \***********************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./node_modules/yeast/index.js":
  /*!*************************************!*\
    !*** ./node_modules/yeast/index.js ***!
    \*************************************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),o=64,s={},a=0,c=0;function u(e){var t="";do{t=i[e%o]+t,e=Math.floor(e/o)}while(e>0);return t}function d(){var e=u(+new Date);return e!==r?(a=0,r=e):e+"."+u(a++)}for(;c<o;c++)s[i[c]]=c;d.encode=u,d.decode=function(e){var t=0;for(c=0;c<e.length;c++)t=t*o+s[e.charAt(c)];return t},e.exports=d},"./package.json":
  /*!**********************!*\
    !*** ./package.json ***!
    \**********************/
  /*! exports provided: name, version, description, main, module, types, scripts, repository, files, author, license, devDependencies, dependencies, default */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e){e.exports={name:"skyway-js",version:"2.0.1",description:"The official JavaScript SDK for SkyWay",main:"dist/skyway.js",module:"src/peer.js",types:"skyway-js.d.ts",scripts:{test:"karma start ./karma.conf.js",clean:"del ./dist",lint:"eslint .",build:"NODE_ENV=production webpack",dev:"webpack -w"},repository:{type:"git",url:"git+https://github.com/skyway/skyway-js-sdk"},files:["dist/skyway.js","skyway-js.d.ts","LICENSE","CHANGELOG.md","README.md"],author:"NTT Communications Corp.",license:"MIT",devDependencies:{"babel-loader":"^7.1.4","babel-plugin-espower":"^2.4.0","babel-plugin-istanbul":"^4.1.6","babel-preset-es2015":"^6.24.1","del-cli":"^1.1.0",eslint:"^5.0.0","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.4.0","inject-loader":"^4.0.1",karma:"^2.0.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^3.0.0",mocha:"^5.2.0","power-assert":"^1.4.4",prettier:"^1.9.2",sinon:"^6.0.1",webpack:"^4.12.1","webpack-cli":"^3.0.8"},dependencies:{"@types/node":"^12.0.8","detect-browser":"^4.2.0",enum:"git+https://github.com/eastandwest/enum.git#react-native",events:"^3.0.0","js-binarypack":"0.0.9","object-sizeof":"^1.3.0","query-string":"^6.4.0","sdp-interop":"^0.1.13","sdp-transform":"^2.7.0","socket.io-client":"^2.2.0"}}},"./src/peer.js":
  /*!**********************************!*\
    !*** ./src/peer.js + 12 modules ***!
    \**********************************/
  /*! exports provided: default */
  /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/detect-browser/index.js (<- Module is not an ECMAScript module) */
  /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/enum/index.js (<- Module is not an ECMAScript module) */
  /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/js-binarypack/lib/binarypack.js (<- Module is not an ECMAScript module) */
  /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/node-libs-browser/node_modules/events/events.js (<- Module is not an ECMAScript module) */
  /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/object-sizeof/index.js (<- Module is not an ECMAScript module) */
  /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/query-string/index.js (<- Module is not an ECMAScript module) */
  /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/sdp-interop/lib/index.js (<- Module is not an ECMAScript module) */
  /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/sdp-transform/lib/index.js (<- Module is not an ECMAScript module) */
  /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/socket.io-client/lib/index.js (<- Module is not an ECMAScript module) */
  /*! ModuleConcatenation bailout: Cannot concat with ./package.json (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("./node_modules/node-libs-browser/node_modules/events/events.js"),i=n.n(r),o=n("./node_modules/enum/index.js"),s=n.n(o),a=n("./node_modules/socket.io-client/lib/index.js"),c=n.n(a),u=n("./node_modules/query-string/index.js"),d=n.n(u);var p={DISPATCHER_HOST:"dispatcher.webrtc.ecl.ntt.com",DISPATCHER_PORT:443,DISPATCHER_SECURE:!0,DISPATCHER_TIMEOUT:1e4,TURN_HOST:"turn.webrtc.ecl.ntt.com",TURN_PORT:443,MESSAGE_TYPES:{CLIENT:new s.a(["SEND_OFFER","SEND_ANSWER","SEND_CANDIDATE","SEND_LEAVE","ROOM_JOIN","ROOM_LEAVE","ROOM_GET_LOGS","ROOM_GET_USERS","ROOM_SEND_DATA","SFU_GET_OFFER","SFU_ANSWER","SFU_CANDIDATE","PING","UPDATE_CREDENTIAL","SEND_FORCE_CLOSE"]),SERVER:new s.a(["OPEN","ERROR","OFFER","ANSWER","CANDIDATE","LEAVE","AUTH_EXPIRES_IN","ROOM_LOGS","ROOM_USERS","ROOM_DATA","ROOM_USER_JOIN","ROOM_USER_LEAVE","SFU_OFFER","FORCE_CLOSE"])},maxChunkSize:16300,reconnectionAttempts:2,numberServersToTry:3,sendInterval:1,pingInterval:25e3,defaultConfig:{iceServers:[{urls:"stun:stun.webrtc.ecl.ntt.com:3478",url:"stun:stun.webrtc.ecl.ntt.com:3478"}],iceTransportPolicy:"all"}};const h="SkyWay: ",l=new s.a({NONE:0,ERROR:1,WARN:2,FULL:3});var f=new class{constructor(){this._logLevel=l.NONE.value,this.LOG_LEVELS=l}setLogLevel(e){switch(e.value&&(e=e.value),parseInt(e,10)){case 0:this._logLevel=l.NONE.value;break;case 1:this._logLevel=l.ERROR.value;break;case 2:this._logLevel=l.WARN.value;break;case 3:this._logLevel=l.FULL.value;break;default:this._logLevel=l.NONE.value}}warn(...e){this._logLevel>=l.WARN.value&&console.warn(h,...e)}error(...e){this._logLevel>=l.ERROR.value&&console.error(h,...e)}log(...e){this._logLevel>=l.FULL.value&&console.log(h,...e)}},m=n("./package.json");var y=class extends i.a{constructor(e,t){if(super(),this._isOpen=!1,this._isPeerIdSet=!1,this._queue=[],this._io=null,this._key=e,this._reconnectAttempts=0,t.host&&t.port){const e=t.secure?"https://":"http://";this.signalingServerUrl=`${e}${t.host}:${t.port}`}else{const e=t.dispatcherHost||p.DISPATCHER_HOST,n=t.dispatcherPort||p.DISPATCHER_PORT,r=t.dispatcherSecure||p.DISPATCHER_SECURE?"https://":"http://";this._dispatcherUrl=`${r}${e}:${n}/signaling`}}get isOpen(){return Boolean(this._io&&this._io.connected&&this._isOpen)}async start(e,t,n){let r=`apiKey=${this._key}&token=${t}`+`&platform=javascript&sdk_version=${m.version}`;if(e&&(r+=`&peerId=${e}`,this._isPeerIdSet=!0),n&&(r+=`&credential=${encodeURIComponent(JSON.stringify(n))}`),this._dispatcherUrl){let e;try{e=await this._getSignalingServer()}catch(e){return void this.emit("error",e)}const t=e.secure?"https://":"http://";this.signalingServerUrl=`${t}${e.host}:${e.port}`}this._io=c()(this.signalingServerUrl,{"force new connection":!0,query:r,reconnectionAttempts:p.reconnectionAttempts}),this._io.on("reconnect_failed",()=>{this._stopPings(),this._connectToNewServer()}),this._io.on("error",e=>{f.error(e)}),this._setupMessageHandlers()}async _connectToNewServer(e=0){if(e>=10||this._reconnectAttempts>=p.numberServersToTry)return void this.emit("error","Could not connect to server.");let t;try{t=await this._getSignalingServer()}catch(e){return void this.emit("error",e)}if(-1===this.signalingServerUrl.indexOf(t.host)){const e=t.secure?"https://":"http://";this.signalingServerUrl=`${e}${t.host}:${t.port}`,this._io.io.uri=this.signalingServerUrl,this._io.connect(),this._reconnectAttempts++}else this._connectToNewServer(++e)}_getSignalingServer(){return new Promise((e,t)=>{const n=new XMLHttpRequest;n.timeout=p.DISPATCHER_TIMEOUT,n.open("GET",this._dispatcherUrl,!0),n.onerror=()=>{t(new Error("There was a problem with the request for the dispatcher. Check your peer options and network connections."))},n.onabort=()=>{t(new Error("The request for the dispatcher was aborted."))},n.ontimeout=()=>{t(new Error("The request for the dispatcher timed out. Check your firewall, network speed, SkyWay failure information"))},n.onload=()=>{if(200===n.status)try{const r=JSON.parse(n.responseText);if(r&&r.domain)return void e({host:r.domain,port:443,secure:!0});t(new Error("The dispatcher server returned an invalid JSON response. have no signaling server domain in JSON."))}catch(e){t(new Error("The dispatcher server returned an invalid JSON response."))}else t(new Error("Connection failed. Unexpected response: "+n.status))},n.send(null)})}send(e,t){e?this.isOpen?!0===this._io.connected&&this._io.emit(e,t):this._queue.push({type:e,message:t}):this._io.emit("error","Invalid message")}close(){this.isOpen&&(this._stopPings(),this._io.disconnect(),this._isOpen=!1)}reconnect(){this._io.connect()}updateCredential(e){const t=d.a.parse(this._io.io.opts.query);t.credential?t.credential=encodeURIComponent(JSON.stringify(e)):f.warn("Adding a credential when one wasn't specified before."),this._io.io.opts.query=d.a.stringify(t),this.send(p.MESSAGE_TYPES.CLIENT.UPDATE_CREDENTIAL.key,e)}_setupMessageHandlers(){p.MESSAGE_TYPES.SERVER.enums.forEach(e=>{e.key===p.MESSAGE_TYPES.SERVER.OPEN.key?this._io.on(e.key,t=>{t&&t.peerId&&(this._isPeerIdSet||(this._io.io.opts.query+=`&peerId=${t.peerId}`,this._isPeerIdSet=!0),this._reconnectAttempts=0,this._startPings(),this._sendQueuedMessages(),this._isOpen||(this._isOpen=!0,this.emit(e.key,t)))}):this._io.on(e.key,t=>{this.emit(e.key,t)})})}_sendQueuedMessages(){for(const e of this._queue)this.send(e.type,e.message);this._queue=[]}_startPings(){this._pingIntervalId||(this._pingIntervalId=setInterval(()=>{this.send(p.MESSAGE_TYPES.CLIENT.PING.key)},p.pingInterval))}_stopPings(){clearInterval(this._pingIntervalId),this._pingIntervalId=void 0}},g=n("./node_modules/sdp-transform/lib/index.js"),_=n.n(g),v=n("./node_modules/sdp-interop/lib/index.js");var b=new class{unifiedToPlanB(e){const t=(new v.Interop).toPlanB(e).sdp,n=new Set,r=/a=ssrc:\d+ msid:(\w+)/g;let i;for(;i=r.exec(t);)n.add(i[1]);const o=t.replace("a=msid-semantic:WMS *",`a=msid-semantic:WMS ${Array.from(n).join(" ")}`);return new RTCSessionDescription({type:"offer",sdp:o})}addVideoBandwidth(e,t){return this._validateBandwidth(t),this._addBandwidth(e,t,"video")}addAudioBandwidth(e,t){return this._validateBandwidth(t),this._addBandwidth(e,t,"audio")}filterVideoCodec(e,t){return this._filterCodec(e,t,"video")}filterAudioCodec(e,t){return this._filterCodec(e,t,"audio")}ensureUnifiedPlan(e){return e.split("\r\n").map(e=>e.startsWith("a=msid-semantic")?"a=msid-semantic:WMS *":e).join("\r\n")}_filterCodec(e,t,n){if(void 0===t)throw new Error("codec is not passed");const r=_.a.parse(e);return r.media=r.media.map(e=>{if(e.type===n){e.rtp=e.rtp.filter(e=>e.codec===t);const n=e.rtp.reduce((e,t)=>[...e,t.payload],[]);if(0===e.rtp.length)throw new Error(`${t} does not exist`);e.fmtp&&(e.fmtp=e.fmtp.filter(e=>n.includes(e.payload))),e.rtcpFb&&(e.rtcpFb=e.rtcpFb.filter(e=>n.includes(e.payload))),e.payloads=n.join(" ")}return e}),_.a.write(r)}_addBandwidth(e,t,n){const r=_.a.parse(e);return r.media=r.media.map(e=>(e.type===n&&(e.bandwidth=[{type:"AS",limit:t.toString()},{type:"TIAS",limit:(1e3*t).toString()}]),e)),_.a.write(r)}_validateBandwidth(e){if(void 0===e)throw new Error("bandwidth is not passed");if(!/^\d+$/.test(e))throw new Error(`${e} is not a number`)}};const E=new s.a(["addStream","dcCreated","offerCreated","answerCreated","iceCandidate","iceConnectionFailed","negotiationNeeded","error"]);class w extends i.a{constructor(){super(),this._offerQueue=[],this._isExpectingAnswer=!1,this._replaceStreamCalled=!1,this._isNegotiationAllowed=!0,this.hasRemoteDescription=!1}async startConnection(e={}){if(this._pc=this._createPeerConnection(e.pcConfig),this._setupPCListeners(),this.originator=e.originator,this._audioBandwidth=e.audioBandwidth,this._videoBandwidth=e.videoBandwidth,this._audioCodec=e.audioCodec,this._videoCodec=e.videoCodec,this._type=e.type,"media"===this._type)if(e.stream)e.stream.getTracks().forEach(t=>{this._pc.addTrack(t,e.stream)});else if(this.originator){const t=this._getReceiveOnlyState(e);t.audio&&this._pc.addTransceiver("audio",{direction:"recvonly"}),t.video&&this._pc.addTransceiver("video",{direction:"recvonly"})}if(this.originator){if("data"===this._type){const t=e.label||"",n=e.dcInit||{},r=this._pc.createDataChannel(t,n);this.emit(w.EVENTS.dcCreated.key,r)}}else await this.handleOffer(e.offer)}replaceStream(e){if(!this._pc)return;this._isNegotiationAllowed=!0;const t=this,n=e.getVideoTracks(),r=e.getAudioTracks(),i=this._pc.getSenders(),o=i.find(e=>e.track&&"video"===e.track.kind),s=i.find(e=>e.track&&"audio"===e.track.kind);function a(e,n,r){void 0===n&&void 0===e||(void 0!==n?void 0!==e?e.track.id!==n.id&&e.replaceTrack(n):t._pc.addTrack(n,r):t._pc.removeTrack(e))}a(o,n[0],e),a(s,r[0],e)}async handleOffer(e){if(this._lastOffer&&e&&this._lastOffer.sdp===e.sdp)return;if(this._isNegotiationAllowed=!0,e||(e=this._lastOffer),this._lastOffer=e,"have-remote-offer"===this._pc.signalingState)return void this._offerQueue.push(e);await this._setRemoteDescription(e);const t=await this._makeAnswerSdp().catch(e=>f.error(e));this.emit(w.EVENTS.answerCreated.key,t)}async handleAnswer(e){this._isNegotiationAllowed=!0,this._isExpectingAnswer?(await this._setRemoteDescription(e),this._isExpectingAnswer=!1):this._pc.onnegotiationneeded&&this._pc.onnegotiationneeded()}async handleCandidate(e){await this._pc.addIceCandidate(new RTCIceCandidate(e)).then(()=>f.log("Successfully added ICE candidate")).catch(e=>f.error("Failed to add ICE candidate",e))}cleanup(){f.log("Cleaning up PeerConnection"),!this._pc||"closed"===this._pc.readyState&&"closed"===this._pc.signalingState||this._pc.close(),this._pc=null}_createPeerConnection(e={}){return f.log("Creating RTCPeerConnection"),e.sdpSemantics="unified-plan",new RTCPeerConnection(e)}_setupPCListeners(){const e=this._pc;e.ontrack=e=>{f.log("Received remote media stream track"),e.streams.forEach(e=>{this.emit(w.EVENTS.addStream.key,e)})},e.ondatachannel=e=>{f.log("Received data channel");const t=e.channel;this.emit(w.EVENTS.dcCreated.key,t)},e.onicecandidate=e=>{e.candidate&&""!==e.candidate.candidate?(f.log("Generated ICE candidate for:",e.candidate),this.emit(w.EVENTS.iceCandidate.key,e.candidate)):f.log("ICE candidates gathering complete")},e.oniceconnectionstatechange=()=>{switch(e.iceConnectionState){case"completed":f.log("iceConnectionState is completed"),e.onicecandidate=()=>{};break;case"disconnected":f.log("iceConnectionState is disconnected, trying reconnect by browser");break;case"failed":f.log("iceConnectionState is failed, closing connection"),this.emit(w.EVENTS.iceConnectionFailed.key);break;default:f.log(`iceConnectionState is ${e.iceConnectionState}`)}},e.onnegotiationneeded=async()=>{if(f.log("`negotiationneeded` triggered"),"stable"===e.signalingState&&this._isNegotiationAllowed){if(this._isNegotiationAllowed=!1,this.originator){const e=await this._makeOfferSdp();this._setLocalDescription(e),this.emit(w.EVENTS.negotiationNeeded.key)}else this._replaceStreamCalled&&this.handleOffer();this._replaceStreamCalled=!1}},e.onsignalingstatechange=()=>{if(f.log(`signalingState is ${e.signalingState}`),"stable"===e.signalingState){const e=this._offerQueue.shift();e&&this.handleOffer(e)}}}async _makeOfferSdp(){let e;try{e=await this._pc.createOffer()}catch(e){throw e.type="webrtc",f.error(e),this.emit(w.EVENTS.error.key,e),f.log("Failed to createOffer, ",e),e}return f.log("Created offer."),this._audioBandwidth&&(e.sdp=b.addAudioBandwidth(e.sdp,this._audioBandwidth)),this._videoBandwidth&&(e.sdp=b.addVideoBandwidth(e.sdp,this._videoBandwidth)),this._audioCodec&&(e.sdp=b.filterAudioCodec(e.sdp,this._audioCodec)),this._videoCodec&&(e.sdp=b.filterVideoCodec(e.sdp,this._videoCodec)),e}async _makeAnswerSdp(){let e;try{e=await this._pc.createAnswer()}catch(e){throw e.type="webrtc",f.error(e),this.emit(w.EVENTS.error.key,e),f.log("Failed to createAnswer, ",e),e}f.log("Created answer."),this._audioBandwidth&&(e.sdp=b.addAudioBandwidth(e.sdp,this._audioBandwidth)),this._videoBandwidth&&(e.sdp=b.addVideoBandwidth(e.sdp,this._videoBandwidth)),this._audioCodec&&(e.sdp=b.filterAudioCodec(e.sdp,this._audioCodec)),this._videoCodec&&(e.sdp=b.filterVideoCodec(e.sdp,this._videoCodec));try{await this._pc.setLocalDescription(e)}catch(e){throw e.type="webrtc",f.error(e),this.emit(w.EVENTS.error.key,e),f.log("Failed to setLocalDescription, ",e),e}return f.log("Set localDescription: answer"),f.log(`Setting local description ${JSON.stringify(e.sdp)}`),e}async _setLocalDescription(e){f.log(`Setting local description ${JSON.stringify(e.sdp)}`);try{await this._pc.setLocalDescription(e)}catch(e){throw e.type="webrtc",f.error(e),this.emit(w.EVENTS.error.key,e),f.log("Failed to setLocalDescription, ",e),e}f.log("Set localDescription: offer"),this._isExpectingAnswer=!0,this.emit(w.EVENTS.offerCreated.key,e)}async _setRemoteDescription(e){f.log(`Setting remote description ${JSON.stringify(e)}`);try{await this._pc.setRemoteDescription(new RTCSessionDescription(e)),this.hasRemoteDescription=!0}catch(e){throw e.type="webrtc",f.error(e),this.emit(w.EVENTS.error.key,e),f.log("Failed to setRemoteDescription: ",e),e}f.log("Set remoteDescription:",e.type)}_getReceiveOnlyState(e={}){const t={audio:!1,video:!1},n=e.stream instanceof MediaStream,r=!!n&&0!==e.stream.getAudioTracks().length,i=!!n&&0!==e.stream.getVideoTracks().length;return!1===n&&void 0===e.audioReceiveEnabled&&void 0===e.videoReceiveEnabled?(t.audio=!0,t.video=!0,t):(e.audioReceiveEnabled&&!1===r&&(t.audio=!0),e.videoReceiveEnabled&&!1===i&&(t.video=!0),!1===e.audioReceiveEnabled&&r&&f.warn("Option audioReceiveEnabled will be treated as true, because passed stream has MediaStreamTrack(kind = audio)"),!1===e.videoReceiveEnabled&&i&&f.warn("Option videoReceiveEnabled will be treated as true, because passed stream has MediaStreamTrack(kind = video)"),t)}static get EVENTS(){return E}}var S=w,k=n("./node_modules/detect-browser/index.js");var C={validateId:function(e){return!e||/^[A-Za-z0-9_-]+(?:[ _-][A-Za-z0-9]+)*$/.exec(e)},validateKey:function(e){return!e||/^[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}$/.exec(e)},randomId:function(){return(Math.random().toString(36)+"0000000000000000000").substr(2,16)},randomToken:function(){return Math.random().toString(36).substr(2)},joinArrayBuffers:function(e){const t=e.reduce((e,t)=>e+t.byteLength,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(new Uint8Array(t),r),r+=t.byteLength;return n.buffer},blobToArrayBuffer:function(e,t){const n=new FileReader;n.onload=e=>{t(e.target.result)},n.readAsArrayBuffer(e)},isSecure:function(){return"https:"===location.protocol},detectBrowser:function(){const{name:e,version:t}=Object(k.detect)(),[n,r,i]=t.split(".").map(e=>parseInt(e));return{name:e,major:n,minor:r,patch:i}},isPlanBSafari:function(){const{name:e}=Object(k.detect)();return("safari"===e||"ios"===e)&&!RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")}};const A=new s.a(["candidate","offer","answer","close","forceClose"]);class T extends i.a{constructor(e,t){if(super(),t=t||{},this.constructor===T)throw new TypeError("Cannot construct Connection instances directly");this._options=t,this.open=!1,this.type=void 0,this.metadata=this._options.metadata,this.remoteId=e,this._negotiator=new S,this._idPrefix="c_",this._randomIdSuffix=C.randomToken(),this._setupNegotiatorMessageHandlers()}get id(){return this._options.connectionId||this._idPrefix+this._randomIdSuffix}async handleAnswer(e){this._pcAvailable?(await this._negotiator.handleAnswer(e.answer),this.open=!0,this._handleQueuedMessages()):(f.log(`Queuing ANSWER message in ${this.id} from ${this.remoteId}`),this._queuedMessages.push({type:p.MESSAGE_TYPES.SERVER.ANSWER.key,payload:e}))}handleCandidate(e){!this._negotiator.originator||this._negotiator.hasRemoteDescription?this._pcAvailable?this._negotiator.handleCandidate(e.candidate):(f.log(`Queuing CANDIDATE message in ${this.id} from ${this.remoteId}`),this._queuedMessages.push({type:p.MESSAGE_TYPES.SERVER.CANDIDATE.key,payload:e})):this._queuedMessages.push({type:p.MESSAGE_TYPES.SERVER.CANDIDATE.key,payload:e})}updateOffer(e){this.open?this._negotiator.handleOffer(e.offer):this._options.payload=e}getPeerConnection(){return this.open?this._negotiator._pc:null}_handleQueuedMessages(){for(const e of this._queuedMessages)switch(e.type){case p.MESSAGE_TYPES.SERVER.ANSWER.key:this.handleAnswer(e.payload);break;case p.MESSAGE_TYPES.SERVER.CANDIDATE.key:this.handleCandidate(e.payload);break;default:f.warn("Unrecognized message type:",e.type,"from peer:",this.remoteId)}this._queuedMessages=[]}close(e=!1){this.open&&(this.open=!1,this._negotiator.cleanup(),this.emit(T.EVENTS.close.key),e&&this.emit(T.EVENTS.forceClose.key))}_setupNegotiatorMessageHandlers(){this._negotiator.on(S.EVENTS.answerCreated.key,e=>{const t={answer:e,dst:this.remoteId,connectionId:this.id,connectionType:this.type};this.emit(T.EVENTS.answer.key,t)}),this._negotiator.on(S.EVENTS.offerCreated.key,e=>{const t={offer:e,dst:this.remoteId,connectionId:this.id,connectionType:this.type,metadata:this.metadata};this.serialization&&(t.serialization=this.serialization),this.label&&(t.label=this.label),this.dcInit&&(t.dcInit=this.dcInit),this.emit(T.EVENTS.offer.key,t)}),this._negotiator.on(S.EVENTS.iceCandidate.key,e=>{const t={candidate:e,dst:this.remoteId,connectionId:this.id,connectionType:this.type};this.emit(T.EVENTS.candidate.key,t)}),this._negotiator.on(S.EVENTS.iceConnectionFailed.key,()=>{this.close()})}get peer(){return f.warn(`${this.constructor.name}.peer is deprecated and may be removed from a future version.`+` Please use ${this.constructor.name}.remoteId instead.`),this.remoteId}static get EVENTS(){return A}}var x=T,R=n("./node_modules/js-binarypack/lib/binarypack.js"),O=n.n(R),N=n("./node_modules/object-sizeof/index.js"),j=n.n(N);const B=new s.a(["open","data","error"]);B.extend(x.EVENTS.enums);const P=new s.a(["binary","binary-utf8","json","none"]);class M extends x{constructor(e,t){if(super(e,t),this._idPrefix="dc_",this.type="data",this._isOnOpenCalled=!1,this.label=this._options.label||this.id,this.dcInit=this._options.dcInit||{},this.serialization=M.SERIALIZATIONS.binary.key,this._options.serialization){if(!M.SERIALIZATIONS.get(this._options.serialization))throw new Error("Invalid serialization");this.serialization=this._options.serialization,this._isUnreliableDCInit(this.dcInit)&&(f.warn("You can not specify serialization with unreliable mode enabled."),this.serialization=M.SERIALIZATIONS.binary.key)}this._sendBuffer=[],this._receivedData={},this._queuedMessages=this._options.queuedMessages||[],this._negotiator.on(S.EVENTS.dcCreated.key,e=>{this._dc=e,this._dc.binaryType="arraybuffer",this._setupMessageHandlers(),this._isOnOpenCalled||"open"!==this._dc.readyState||this._dc.onopen()}),this._options.payload&&(this._options.payload.pcConfig=this._options.pcConfig)}async startConnection(){await this._negotiator.startConnection(this._options.payload||{originator:!0,type:"data",label:this.label,dcInit:this.dcInit,pcConfig:this._options.pcConfig}),this._pcAvailable=!0,this._handleQueuedMessages()}_setupMessageHandlers(){this._dc.onopen=()=>{this._isOnOpenCalled||(f.log("Data channel connection success"),this.open=!0,this._isOnOpenCalled=!0,this.emit(M.EVENTS.open.key))},this._dc.onmessage=e=>{this._handleDataMessage(e)},this._dc.onclose=()=>{f.log("DataChannel closed for:",this.id),this.close()},this._dc.onerror=e=>{f.error(e)}}_handleDataMessage(e){if(this.serialization===M.SERIALIZATIONS.none.key)return void this.emit(M.EVENTS.data.key,e.data);if(this.serialization===M.SERIALIZATIONS.json.key)return void this.emit(M.EVENTS.data.key,JSON.parse(e.data));const t=O.a.unpack(e.data);let n=this._receivedData[t.id];if(n||(n=this._receivedData[t.id]={size:t.size,type:t.type,name:t.name,mimeType:t.mimeType,totalParts:t.totalParts,parts:new Array(t.totalParts),receivedParts:0}),n.receivedParts++,n.parts[t.index]=t.data,n.receivedParts===n.totalParts){delete this._receivedData[t.id];const e=C.joinArrayBuffers(n.parts),r=O.a.unpack(e);let i;switch(n.type){case"Blob":i=new Blob([new Uint8Array(r)],{type:n.mimeType});break;case"File":i=new File([new Uint8Array(r)],n.name,{type:n.mimeType});break;default:i=r}this.emit(M.EVENTS.data.key,i)}}send(e){if(!this.open)return void this.emit(M.EVENTS.error.key,new Error("Connection is not open. You should listen for the `open` event before sending messages."));if(null==e)return;if(this.serialization===M.SERIALIZATIONS.none.key)return this._sendBuffer.push(e),void this._startSendLoop();if(this.serialization===M.SERIALIZATIONS.json.key)return this._sendBuffer.push(JSON.stringify(e)),void this._startSendLoop();const t=O.a.pack(e),n=t.size,r=e.constructor.name,i={id:C.randomId(),type:r,size:n,totalParts:0};"File"===r&&(i.name=e.name),e instanceof Blob&&(i.mimeType=e.type);const o=p.maxChunkSize-j()(i),s=Math.ceil(n/o);i.totalParts=s;for(let e=0;e<s;e++){const n=t.slice(e*o,(e+1)*o);i.index=e,i.data=n,C.blobToArrayBuffer(O.a.pack(i),e=>{this._sendBuffer.push(e),this._startSendLoop()})}}close(e){super.close(e),this._isOnOpenCalled=!1}_startSendLoop(){this.sendInterval||(this.sendInterval=setInterval(()=>{const e=this._sendBuffer.shift();try{this._dc.send(e)}catch(t){this._sendBuffer.push(e)}0===this._sendBuffer.length&&(clearInterval(this.sendInterval),this.sendInterval=void 0)},p.sendInterval))}_isUnreliableDCInit(e){return!!e&&("maxRetransmits"in e||"maxPacketLifeTime"in e)}static get SERIALIZATIONS(){return P}static get EVENTS(){return B}}var I=M;const L=new s.a(["stream"]);L.extend(x.EVENTS.enums);class U extends x{constructor(e,t){super(e,t),this._idPrefix="mc_",this.type="media",this.localStream=this._options.stream,this._queuedMessages=this._options.queuedMessages||[],this._pcAvailable=!1}async startConnection(){this._options.originator&&(await this._negotiator.startConnection({type:"media",stream:this.localStream,originator:this._options.originator,pcConfig:this._options.pcConfig,videoBandwidth:this._options.videoBandwidth,audioBandwidth:this._options.audioBandwidth,videoCodec:this._options.videoCodec,audioCodec:this._options.audioCodec,videoReceiveEnabled:this._options.videoReceiveEnabled,audioReceiveEnabled:this._options.audioReceiveEnabled}),this._pcAvailable=!0,this._handleQueuedMessages())}answer(e,t={}){this.localStream?f.warn("localStream already exists on this MediaConnection. Are you answering a call twice?"):(this._options.payload.stream=e,this.localStream=e,this._negotiator.startConnection({type:"media",stream:this.localStream,originator:!1,offer:this._options.payload.offer,pcConfig:this._options.pcConfig,audioBandwidth:t.audioBandwidth,videoBandwidth:t.videoBandwidth,videoCodec:t.videoCodec,audioCodec:t.audioCodec,videoReceiveEnabled:t.videoReceiveEnabled,audioReceiveEnabled:t.audioReceiveEnabled}),this._pcAvailable=!0,this._handleQueuedMessages(),this.open=!0)}replaceStream(e){this._negotiator.replaceStream(e),this.localStream=e}_setupNegotiatorMessageHandlers(){super._setupNegotiatorMessageHandlers(),this._negotiator.on(S.EVENTS.addStream.key,e=>{f.log("Receiving stream",e),this.remoteStream&&this.remoteStream.id===e.id||(this.remoteStream=e,this.emit(U.EVENTS.stream.key,e))})}static get EVENTS(){return L}}var D=U;const F=new s.a(["stream","open","close","peerJoin","peerLeave","error","data","log"]),V=new s.a(["offer","answer","candidate","leave","close","getLog","broadcast"]);class q extends i.a{constructor(e,t,n={}){if(super(),this.constructor===q)throw new TypeError("Cannot construct Room instances directly");this.name=e,this._options=n,this._peerId=t,this._localStream=this._options.stream,this._pcConfig=this._options.pcConfig}handleData(e){const t={data:e.data,src:e.src};this.emit(q.EVENTS.data.key,t)}handleLog(e){this.emit(q.EVENTS.log.key,e)}getLog(){const e={roomName:this.name};this.emit(q.MESSAGE_EVENTS.getLog.key,e)}static get EVENTS(){return F}static get MESSAGE_EVENTS(){return V}}var G=q;const z=new s.a([]);z.extend(G.EVENTS.enums);const Y=new s.a(["offerRequest","candidate"]);Y.extend(G.MESSAGE_EVENTS.enums);class $ extends G{constructor(e,t,n){super(e,t,n),this.remoteStreams={},this.members=[],this._open=!1,this._msidMap={},this._unknownStreams={},this._negotiator=new S}call(e){e&&(this._localStream=e);const t={roomName:this.name};this.emit($.MESSAGE_EVENTS.offerRequest.key,t)}handleOffer(e){let t=e.offer;C.isPlanBSafari()&&(t=b.unifiedToPlanB(t)),this._connectionStarted?this._negotiator.handleOffer(t):(this._negotiator.startConnection({type:"media",stream:this._localStream,pcConfig:this._options.pcConfig,offer:t}),this._setupNegotiatorMessageHandlers(),this._connectionStarted=!0)}_setupNegotiatorMessageHandlers(){this._negotiator.on(S.EVENTS.addStream.key,e=>{const t=e;if(this._msidMap[t.id]){if(t.peerId=this._msidMap[t.id],t.peerId===this._peerId)return;const e=this.remoteStreams[t.id];if(e&&e.id===t.id)return;this.remoteStreams[t.id]=t,this.emit($.EVENTS.stream.key,t),f.log(`Received remote media stream for ${t.peerId} in ${this.name}`)}else this._unknownStreams[t.id]=t}),this._negotiator.on(S.EVENTS.negotiationNeeded.key,()=>{const e={roomName:this.name};this.emit($.MESSAGE_EVENTS.offerRequest.key,e)}),this._negotiator.on(S.EVENTS.answerCreated.key,e=>{C.isPlanBSafari()||(e.sdp=b.ensureUnifiedPlan(e.sdp));const t={roomName:this.name,answer:e};this.emit($.MESSAGE_EVENTS.answer.key,t)}),this._negotiator.on(S.EVENTS.iceConnectionFailed.key,()=>{this.close()}),this._negotiator.on(S.EVENTS.iceCandidate.key,e=>{const t={roomName:this.name,candidate:e};this.emit($.MESSAGE_EVENTS.candidate.key,t)})}handleJoin(e){const t=e.src;if(t===this._peerId)return this._open=!0,this.call(this._localStream),void this.emit($.EVENTS.open.key);this.members.push(t),this.emit($.EVENTS.peerJoin.key,t)}handleLeave(e){if(!this._open)return;const t=e.src,n=this.members.indexOf(t);n>=0&&this.members.splice(n,1);for(const e in this.remoteStreams)this.remoteStreams[e].peerId===t&&(delete this.remoteStreams[e],delete this._msidMap[e],delete this._unknownStreams[e]);this.emit($.EVENTS.peerLeave.key,t)}send(e){if(!this._open)return;const t={roomName:this.name,data:e};this.emit($.MESSAGE_EVENTS.broadcast.key,t)}close(){if(!this._open)return;this._negotiator&&this._negotiator.cleanup(),this._open=!1;const e={roomName:this.name};this.emit($.MESSAGE_EVENTS.leave.key,e),this.emit($.EVENTS.close.key)}replaceStream(e){this._localStream=e,this._negotiator.replaceStream(e)}updateMsidMap(e={}){this._msidMap=e;for(const e of Object.keys(this._unknownStreams))if(this._msidMap[e]){const t=this._unknownStreams[e];if(t.peerId=this._msidMap[t.id],delete this._unknownStreams[e],t.peerId===this._peerId)return;this.remoteStreams[t.id]=t,this.emit($.EVENTS.stream.key,t)}}static get EVENTS(){return z}static get MESSAGE_EVENTS(){return Y}}var H=$;const W=new s.a([]);W.extend(G.EVENTS.enums);const J=new s.a(["broadcastByDC","getPeers"]);J.extend(G.MESSAGE_EVENTS.enums);class X extends G{constructor(e,t,n){super(e,t,n),this.connections={},this._queuedMessages={}}call(e){e&&(this._localStream=e);const t={roomName:this.name,type:"media"};this.emit(X.MESSAGE_EVENTS.getPeers.key,t)}connect(){const e={roomName:this.name,type:"data"};this.emit(X.MESSAGE_EVENTS.getPeers.key,e)}makeMediaConnections(e){const t={stream:this._localStream,pcConfig:this._pcConfig,originator:!0,videoBandwidth:this._options.videoBandwidth,audioBandwidth:this._options.audioBandwidth,videoCodec:this._options.videoCodec,audioCodec:this._options.audioCodec,videoReceiveEnabled:this._options.videoReceiveEnabled,audioReceiveEnabled:this._options.audioReceiveEnabled};this._makeConnections(e,"media",t)}makeDataConnections(e){const t={pcConfig:this._pcConfig};this._makeConnections(e,"data",t)}handleJoin(e){const t=e.src;if(t===this._peerId)return this.call(this._localStream),void this.emit(X.EVENTS.open.key);this.emit(X.EVENTS.peerJoin.key,t)}handleLeave(e){const t=e.src;this._deleteConnections(t),this.emit(X.EVENTS.peerLeave.key,t)}handleOffer(e){const t=e.connectionId;let n=this._getConnection(e.src,t);n?n.updateOffer(e):"media"===e.connectionType?((n=new D(e.src,{connectionId:t,payload:e,metadata:e.metadata,queuedMessages:this._queuedMessages[t],pcConfig:this._pcConfig})).startConnection(),f.log("MediaConnection created in OFFER"),this._addConnection(e.src,n),this._setupMessageHandlers(n),n.answer(this._localStream,{videoBandwidth:this._options.videoBandwidth,audioBandwidth:this._options.audioBandwidth,videoCodec:this._options.videoCodec,audioCodec:this._options.audioCodec,videoReceiveEnabled:this._options.videoReceiveEnabled,audioReceiveEnabled:this._options.audioReceiveEnabled})):f.warn(`Received malformed connection type: ${e.connectionType}`)}handleAnswer(e){const t=this._getConnection(e.src,e.connectionId);t&&t.handleAnswer(e)}handleCandidate(e){const t=this._getConnection(e.src,e.connectionId);t?t.handleCandidate(e):(void 0===this._queuedMessages[e.connectionId]&&(this._queuedMessages[e.connectionId]=[]),this._queuedMessages[e.connectionId].push({type:p.MESSAGE_TYPES.SERVER.CANDIDATE.key,payload:e}))}send(e){const t={roomName:this.name,data:e};this.emit(X.MESSAGE_EVENTS.broadcast.key,t)}close(){for(const e in this.connections)this.connections.hasOwnProperty(e)&&this.connections[e].forEach(e=>{e.close()});const e={roomName:this.name};this.emit(X.MESSAGE_EVENTS.leave.key,e),this.emit(X.EVENTS.close.key)}replaceStream(e){this._localStream=e;for(const t in this.connections)this.connections.hasOwnProperty(t)&&this.connections[t].forEach(t=>{"media"===t.type&&t.replaceStream(e)})}_addConnection(e,t){this.connections[e]||(this.connections[e]=[]),this.connections[e].push(t)}_makeConnections(e,t,n){e.filter(e=>e!==this._peerId).forEach(e=>{let r;switch(t){case"data":r=new I(e,n);break;case"media":r=new D(e,n);break;default:return}r.startConnection(),this._addConnection(e,r),this._setupMessageHandlers(r),f.log(`${t} connection to ${e} created in ${this.name}`)})}_deleteConnections(e){this.connections[e]&&delete this.connections[e]}_getConnection(e,t){if(this.connections&&this.connections[e]){return this.connections[e].filter(e=>e.id===t)[0]}return null}_setupMessageHandlers(e){e.on(x.EVENTS.offer.key,e=>{e.roomName=this.name,this.emit(X.MESSAGE_EVENTS.offer.key,e)}),e.on(x.EVENTS.answer.key,e=>{e.roomName=this.name,this.emit(X.MESSAGE_EVENTS.answer.key,e)}),e.on(x.EVENTS.candidate.key,e=>{e.roomName=this.name,this.emit(X.MESSAGE_EVENTS.candidate.key,e)}),"media"===e.type&&e.on(D.EVENTS.stream.key,t=>{t.peerId=e.remoteId,this.emit(X.EVENTS.stream.key,t)})}static get EVENTS(){return W}static get MESSAGE_EVENTS(){return J}}var K=X;const Z=new s.a(["open","error","call","connection","expiresin","close","disconnected"]);class Q extends i.a{constructor(e,t){super(),this.connections={},this.rooms={},this._queuedMessages={},e&&e.constructor===Object?(t=e,e=void 0):e&&(e=e.toString());const n={debug:f.LOG_LEVELS.NONE,secure:!0,config:p.defaultConfig,turn:!0,dispatcherSecure:p.DISPATCHER_SECURE,dispatcherHost:p.DISPATCHER_HOST,dispatcherPort:p.DISPATCHER_PORT};this.options=Object.assign({},n,t),this.options.token=C.randomToken(),f.setLogLevel(this.options.debug),C.validateId(e)?C.validateKey(t.key)?("/"===this.options.host&&(this.options.host=window.location.hostname),void 0===t.secure&&443!==this.options.port&&(this.options.secure=void 0),this._initializeServerConnection(e)):this._abort("invalid-key",`API KEY "${this.options.key}" is invalid`):this._abort("invalid-id",`ID "${e}" is invalid`)}call(e,t,n={}){if(!this._checkOpenStatus())return;n.originator=!0,n.stream=t,n.pcConfig=this._pcConfig;const r=new D(e,n);return r.startConnection(),f.log("MediaConnection created in call method"),this._addConnection(e,r),r}connect(e,t={}){if(!this._checkOpenStatus())return;t.pcConfig=this._pcConfig;const n=new I(e,t);return n.startConnection(),f.log("DataConnection created in connect method"),this._addConnection(e,n),n}joinRoom(e,t={}){if(this._checkOpenStatus()){if(!e){const e=new Error("Room name must be defined.");return e.type="room-error",f.error(e),this.emit(Q.EVENTS.error.key,e),null}return t.pcConfig=this._pcConfig,t.peerId=this.id,"sfu"===t.mode?this._initializeSfuRoom(e,t):this._initializeFullMeshRoom(e,t)}}getConnection(e,t){if(this._checkOpenStatus()){if(this.connections[e])for(const n of this.connections[e])if(n.id===t)return n;return null}}get open(){return this.socket&&this.socket.isOpen}destroy(){this._cleanup(),this.disconnect()}disconnect(){this.open&&(this.socket.close(),this.emit(Q.EVENTS.disconnected.key,this.id))}reconnect(){this.open||this.socket.reconnect()}updateCredential(e){this.socket.updateCredential(e)}listAllPeers(e){if(!this._checkOpenStatus())return;e=e||function(){};const t=this,n=new XMLHttpRequest,r=`${this.socket.signalingServerUrl}/api/apikeys/${this.options.key}/clients/`;n.open("get",r,!0),n.onerror=function(){t._abort("server-error","Could not get peers from the server."),e([])},n.onreadystatechange=function(){if(4===n.readyState)if(401===n.status){e([]);const n=new Error("It doesn't look like you have permission to list peers IDs. Please enable the SkyWay REST API on dashboard");n.type="list-error",f.error(n),t.emit(Q.EVENTS.error.key,n)}else 200===n.status?e(JSON.parse(n.responseText)):e([])},n.send(null)}_checkOpenStatus(){return this.open||this._emitNotConnectedError(),this.open}_emitNotConnectedError(){f.warn("You cannot connect to a new Peer because you are not connecting to SkyWay server now.You can create a new Peer to reconnect, or call reconnect() on this peer if you believe its ID to still be available.");const e=new Error("Cannot connect to new Peer before connecting to SkyWay server or after disconnecting from the server.");e.type="disconnected",f.error(e),this.emit(Q.EVENTS.error.key,e)}_initializeServerConnection(e){this.socket=new y(this.options.key,{secure:this.options.secure,host:this.options.host,port:this.options.port,dispatcherSecure:this.options.dispatcherSecure,dispatcherHost:this.options.dispatcherHost,dispatcherPort:this.options.dispatcherPort}),this._setupMessageHandlers(),this.socket.on("error",e=>{this._abort("socket-error",e)}),this.socket.on("disconnect",()=>{this.disconnect();const e=new Error("Lost connection to server.");e.type="socket-error",f.error(e),this.emit(Q.EVENTS.error.key,e)}),this.socket.start(e,this.options.token,this.options.credential)}_initializeSfuRoom(e,t={}){if(this.rooms[e])return this.rooms[e];const n=new H(e,this.id,t);this.rooms[e]=n,this._setupSFURoomMessageHandlers(n);const r={roomName:e,roomType:"sfu"};return this.socket.send(p.MESSAGE_TYPES.CLIENT.ROOM_JOIN.key,r),n}_initializeFullMeshRoom(e,t={}){if(this.rooms[e])return this.rooms[e];const n=new K(e,this.id,t);this.rooms[e]=n,this._setupMeshRoomMessageHandlers(n);const r={roomName:e,roomType:"mesh"};return this.socket.send(p.MESSAGE_TYPES.CLIENT.ROOM_JOIN.key,r),n}_setupMessageHandlers(){this.socket.on(p.MESSAGE_TYPES.SERVER.OPEN.key,e=>{this.id=e.peerId,this._pcConfig=Object.assign({},this.options.config);const t=this._pcConfig.iceServers;this._pcConfig.iceServers=t?t.slice():[];const n=e.turnCredential;let r,i;if("object"==typeof n?(r=n.username,i=n.credential):"string"==typeof n&&(r=`${this.options.key}$${this.id}`,i=n),!0===this.options.turn&&r&&i){const e=[{protocol:"turn",transport:"tcp"},{protocol:"turn",transport:"udp"}];"edge"!==C.detectBrowser().name&&e.push({protocol:"turns",transport:"tcp"});for(const t of e){const e=t.protocol,n=t.transport,o={urls:`${e}:${p.TURN_HOST}:${p.TURN_PORT}?transport=${n}`,url:`${e}:${p.TURN_HOST}:${p.TURN_PORT}?transport=${n}`,username:r,credential:i};this._pcConfig.iceServers.push(o)}f.log("SkyWay TURN Server is available")}else f.log("SkyWay TURN Server is unavailable");this.emit(Q.EVENTS.open.key,this.id)}),this.socket.on(p.MESSAGE_TYPES.SERVER.ERROR.key,e=>{const t=new Error(e.message);t.type=e.type,f.error(t),this.emit(Q.EVENTS.error.key,t)}),this.socket.on(p.MESSAGE_TYPES.SERVER.LEAVE.key,e=>{f.log(`Received leave message from ${e}`),this._cleanupPeer(e)}),this.socket.on(p.MESSAGE_TYPES.SERVER.FORCE_CLOSE.key,({src:e,connectionId:t})=>{const n=this.getConnection(e,t);n&&n.close(!1)}),this.socket.on(p.MESSAGE_TYPES.SERVER.AUTH_EXPIRES_IN.key,e=>{f.log(`Credential expires in ${e}`),this.emit(Q.EVENTS.expiresin.key,e)}),this.socket.on(p.MESSAGE_TYPES.SERVER.OFFER.key,e=>{const t=e.roomName;if(t){const n=this.rooms[t];return void(n&&n.handleOffer(e))}const n=e.connectionId;let r=this.getConnection(e.src,n);r?r.updateOffer(e):("media"===e.connectionType?((r=new D(e.src,{connectionId:n,payload:e,metadata:e.metadata,originator:!1,queuedMessages:this._queuedMessages[n],pcConfig:this._pcConfig})).startConnection(),f.log("MediaConnection created in OFFER"),this._addConnection(e.src,r),this.emit(Q.EVENTS.call.key,r)):"data"===e.connectionType?((r=new I(e.src,{connectionId:n,payload:e,metadata:e.metadata,label:e.label,dcInit:e.dcInit,serialization:e.serialization,queuedMessages:this._queuedMessages[n],pcConfig:this._pcConfig})).startConnection(),f.log("DataConnection created in OFFER"),this._addConnection(e.src,r),this.emit(Q.EVENTS.connection.key,r)):f.warn("Received malformed connection type: ",e.connectionType),delete this._queuedMessages[n])}),this.socket.on(p.MESSAGE_TYPES.SERVER.ANSWER.key,e=>{const t=e.roomName;if(t){const n=this.rooms[t];return void(n&&n.handleAnswer(e))}const n=this.getConnection(e.src,e.connectionId);n?n.handleAnswer(e):this._storeMessage(p.MESSAGE_TYPES.SERVER.ANSWER.key,e)}),this.socket.on(p.MESSAGE_TYPES.SERVER.CANDIDATE.key,e=>{const t=e.roomName;if(t){const n=this.rooms[t];return void(n&&n.handleCandidate(e))}const n=this.getConnection(e.src,e.connectionId);n?n.handleCandidate(e):this._storeMessage(p.MESSAGE_TYPES.SERVER.CANDIDATE.key,e)}),this.socket.on(p.MESSAGE_TYPES.SERVER.ROOM_USER_JOIN.key,e=>{const t=this.rooms[e.roomName];t&&t.handleJoin(e)}),this.socket.on(p.MESSAGE_TYPES.SERVER.ROOM_USER_LEAVE.key,e=>{const t=this.rooms[e.roomName];t&&t.handleLeave(e)}),this.socket.on(p.MESSAGE_TYPES.SERVER.ROOM_DATA.key,e=>{const t=this.rooms[e.roomName];t&&t.handleData(e)}),this.socket.on(p.MESSAGE_TYPES.SERVER.ROOM_LOGS.key,e=>{const t=this.rooms[e.roomName];t&&t.handleLog(e.log)}),this.socket.on(p.MESSAGE_TYPES.SERVER.ROOM_USERS.key,e=>{const t=this.rooms[e.roomName];t&&("media"===e.type?t.makeMediaConnections(e.userList):t.makeDataConnections(e.userList))}),this.socket.on(p.MESSAGE_TYPES.SERVER.SFU_OFFER.key,e=>{const t=this.rooms[e.roomName];t&&(t.updateMsidMap(e.msids),t.handleOffer(e))})}_setupConnectionMessageHandlers(e){e.on(x.EVENTS.candidate.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.SEND_CANDIDATE.key,e)}),e.on(x.EVENTS.answer.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.SEND_ANSWER.key,e)}),e.on(x.EVENTS.offer.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.SEND_OFFER.key,e)}),e.on(x.EVENTS.forceClose.key,()=>{const t={dst:e.remoteId,connectionId:e.id};this.socket.send(p.MESSAGE_TYPES.CLIENT.SEND_FORCE_CLOSE.key,t)})}_setupRoomMessageHandlers(e){e.on(H.MESSAGE_EVENTS.broadcast.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.ROOM_SEND_DATA.key,e)}),e.on(H.MESSAGE_EVENTS.getLog.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.ROOM_GET_LOGS.key,e)}),e.on(H.MESSAGE_EVENTS.leave.key,t=>{delete this.rooms[e.name],this.socket.send(p.MESSAGE_TYPES.CLIENT.ROOM_LEAVE.key,t)})}_setupSFURoomMessageHandlers(e){this._setupRoomMessageHandlers(e),e.on(H.MESSAGE_EVENTS.offerRequest.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.SFU_GET_OFFER.key,e)}),e.on(H.MESSAGE_EVENTS.answer.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.SFU_ANSWER.key,e)}),e.on(H.MESSAGE_EVENTS.candidate.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.SFU_CANDIDATE.key,e)})}_setupMeshRoomMessageHandlers(e){this._setupRoomMessageHandlers(e),e.on(K.MESSAGE_EVENTS.offer.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.SEND_OFFER.key,e)}),e.on(K.MESSAGE_EVENTS.answer.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.SEND_ANSWER.key,e)}),e.on(K.MESSAGE_EVENTS.candidate.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.SEND_CANDIDATE.key,e)}),e.on(K.MESSAGE_EVENTS.getPeers.key,e=>{this.socket.send(p.MESSAGE_TYPES.CLIENT.ROOM_GET_USERS.key,e)})}_abort(e,t){f.error("Aborting!"),this.disconnect();const n=new Error(t);n.type=e,f.error(n),this.emit(Q.EVENTS.error.key,n)}_addConnection(e,t){this.connections[e]||(this.connections[e]=[]),this.connections[e].push(t),this._setupConnectionMessageHandlers(t)}_storeMessage(e,t){this._queuedMessages[t.connectionId]||(this._queuedMessages[t.connectionId]=[]),this._queuedMessages[t.connectionId].push({type:e,payload:t})}_cleanup(){if(this.connections)for(const e of Object.keys(this.connections))this._cleanupPeer(e);this.emit(Q.EVENTS.close.key)}_cleanupPeer(e){if(this.connections[e])for(const t of this.connections[e])t.close()}static get EVENTS(){return Z}}t.default=Q},0:
  /*!********************!*\
    !*** ws (ignored) ***!
    \********************/
  /*! no static exports found */
  /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){}}).default},e.exports=r()},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,o,s,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,o(this.listener,this.target,e))}.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):f(i,i.length)}function l(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,d=f(c,u);for(n=0;n<u;++n)o(d[n],this,t)}return!0},a.prototype.addListener=function(e,t){return d(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return d(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,o,s;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):l.call(e,t)},a.prototype.listenerCount=l,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),o=n(1);var s=class extends o.EventEmitter{constructor(e,t){super(),this.setMaxListeners(1/0),this._id=e,this._socket=t,this._name=""}get id(){return this._id}async join(e){const t=this._socket;t.send("ROOM_JOIN",{roomName:e,roomType:"mesh"}),await new Promise(e=>{t.once("ROOM_USER_JOIN",({src:t})=>{t===this._id&&e()})}),this._name=e,t.on("ROOM_USER_JOIN",({src:t,roomName:n})=>{n===e&&t!==this._id&&this.emit("@userJoin",t)}),t.on("ROOM_USER_LEAVE",({src:t,roomName:n})=>{n===e&&this.emit("@userLeave",t)}),t.on("ROOM_DATA",({data:t,src:n,roomName:r})=>{r===e&&this.emit("@message",{data:t,src:n})})}close(){const e=this._socket;e.send("ROOM_LEAVE",{roomName:this._name}),e.close()}send(e){this._socket.send("ROOM_SEND_DATA",{roomName:this._name,data:e})}async fetchUsers(){const e=this._socket;return e.send("ROOM_GET_USERS",{roomName:this._name,roomType:"mesh"}),new Promise(t=>{e.once("ROOM_USERS",({userList:e})=>t(e))})}};async function a(e,t){if(!e)throw new Error("Missing api key!");if(!t)throw new Error("Missing channel name!");const{id:n,socket:r}=await async function(e){return new Promise((t,n)=>{let r;try{(r=new i.a({key:e})).once("open",()=>{r.removeAllListeners("error"),t(r)}),r.once("error",e=>{r.close(),n(e)})}catch(e){r&&r.destroy(),n(e)}})}(e),o=new s(n,r);return await o.join(t),o}n.d(t,"createChannel",function(){return a})}])});