iobroker.devices 2.0.3 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +23 -2
  2. package/admin/assets/hostInit-LzITLWDa.js +1 -0
  3. package/admin/assets/index-By05vlt_.js +2783 -0
  4. package/admin/assets/index-D3eYsCtw.js +1 -0
  5. package/admin/assets/localSharedImportMap-CoMzwmdv.js +1 -0
  6. package/admin/assets/preload-helper-BDBacUwf.js +1 -0
  7. package/admin/assets/virtualExposes-BIHI7g3E.js +1 -0
  8. package/admin/assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_devices__remoteEntry_js-D5_qLLYC.js +8 -0
  9. package/admin/index_m.html +5 -1
  10. package/admin/manifest.json +13 -13
  11. package/admin/mf-manifest.json +1 -0
  12. package/admin/remoteEntry.js +1 -0
  13. package/admin/tab.html +5 -1
  14. package/admin/vendor/socket.io.js +3446 -4
  15. package/build/lib/WidgetsManagement.js +159 -26
  16. package/build/lib/WidgetsManagement.js.map +1 -1
  17. package/build/packages/dm-widgets/src/StateContext.js +64 -0
  18. package/build/packages/dm-widgets/src/StateContext.js.map +1 -0
  19. package/build/packages/dm-widgets/src/WidgetGeneric.js +223 -0
  20. package/build/packages/dm-widgets/src/WidgetGeneric.js.map +1 -0
  21. package/build/packages/dm-widgets/src/index.js +99 -0
  22. package/build/packages/dm-widgets/src/index.js.map +1 -0
  23. package/build/packages/dm-widgets/src/types.js +3 -0
  24. package/build/packages/dm-widgets/src/types.js.map +1 -0
  25. package/build/src/lib/WidgetsManagement.js +760 -0
  26. package/build/src/lib/WidgetsManagement.js.map +1 -0
  27. package/build/src/main.js +53 -0
  28. package/build/src/main.js.map +1 -0
  29. package/build/src/widget-utils/WidgetsManagement.js +119 -0
  30. package/build/src/widget-utils/WidgetsManagement.js.map +1 -0
  31. package/build/src/widget-utils/index.js +18 -0
  32. package/build/src/widget-utils/index.js.map +1 -0
  33. package/build/src/widget-utils/types/api.js +3 -0
  34. package/build/src/widget-utils/types/api.js.map +1 -0
  35. package/build/src/widget-utils/types/base.js +3 -0
  36. package/build/src/widget-utils/types/base.js.map +1 -0
  37. package/build/src/widget-utils/types/index.js +3 -0
  38. package/build/src/widget-utils/types/index.js.map +1 -0
  39. package/build/widget-utils/WidgetsManagement.js +0 -2
  40. package/build/widget-utils/WidgetsManagement.js.map +1 -1
  41. package/io-package.json +25 -90
  42. package/package.json +9 -6
  43. package/www/assets/index-7xkEJSKC.js +1 -0
  44. package/www/assets/index-BoZ6w1gP.js +2815 -0
  45. package/www/index.html +2 -1
  46. package/admin/assets/index-BaeInhLO.js +0 -845
  47. package/www/assets/index-lrSafi0L.js +0 -748
@@ -3,7 +3,3449 @@
3
3
  * (c) 2014-2019 Guillermo Rauch
4
4
  * Released under the MIT License.
5
5
  */
6
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.io=e():t.io=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){function r(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,r=o(t),i=r.source,u=r.id,p=r.path,h=c[u]&&p in c[u].nsps,f=e.forceNew||e["force new connection"]||!1===e.multiplex||h;return f?(a("ignoring socket cache for %s",i),n=s(i,e)):(c[u]||(a("new io instance for %s",i),c[u]=s(i,e)),n=c[u]),r.query&&!e.query&&(e.query=r.query),n.socket(r.path,e)}var o=n(1),i=n(7),s=n(15),a=n(3)("socket.io-client");t.exports=e=r;var c=e.managers={};e.protocol=i.protocol,e.connect=r,e.Manager=n(15),e.Socket=n(39)},function(t,e,n){function r(t,e){var n=t;e=e||"undefined"!=typeof location&&location,null==t&&(t=e.protocol+"//"+e.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?e.protocol+t:e.host+t),/^(https?|wss?):\/\//.test(t)||(i("protocol-less url %s",t),t="undefined"!=typeof e?e.protocol+"//"+t:"https://"+t),i("parse %s",t),n=o(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var r=n.host.indexOf(":")!==-1,s=r?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+s+":"+n.port,n.href=n.protocol+"://"+s+(e&&e.port===n.port?"":":"+n.port),n}var o=n(2),i=n(3)("socket.io-client:url");t.exports=r},function(t,e){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"];t.exports=function(t){var e=t,o=t.indexOf("["),i=t.indexOf("]");o!=-1&&i!=-1&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));for(var s=n.exec(t||""),a={},c=14;c--;)a[r[c]]=s[c]||"";return o!=-1&&i!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(t,e,n){(function(r){"use strict";function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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+)/))}function i(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(r++,"%c"===t&&(o=r))}),e.splice(o,0,n)}}function s(){var t;return"object"===("undefined"==typeof console?"undefined":p(console))&&console.log&&(t=console).log.apply(t,arguments)}function a(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(n){}}function c(){var t=void 0;try{t=e.storage.getItem("debug")}catch(n){}return!t&&"undefined"!=typeof r&&"env"in r&&(t=r.env.DEBUG),t}function u(){try{return localStorage}catch(t){}}var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.log=s,e.formatArgs=i,e.save=a,e.load=c,e.useColors=o,e.storage=u(),e.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.exports=n(5)(e);var h=t.exports.formatters;h.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(e,n(4))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(p===setTimeout)return setTimeout(t,0);if((p===n||!p)&&setTimeout)return p=setTimeout,setTimeout(t,0);try{return p(t,0)}catch(e){try{return p.call(null,t,0)}catch(e){return p.call(this,t,0)}}}function i(t){if(h===clearTimeout)return clearTimeout(t);if((h===r||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){y&&l&&(y=!1,l.length?d=l.concat(d):m=-1,d.length&&a())}function a(){if(!y){var t=o(s);y=!0;for(var e=d.length;e;){for(l=d,d=[];++m<e;)l&&l[m].run();m=-1,e=d.length}l=null,y=!1,i(t)}}function c(t,e){this.fun=t,this.array=e}function u(){}var p,h,f=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:n}catch(t){p=n}try{h="function"==typeof clearTimeout?clearTimeout:r}catch(t){h=r}}();var l,d=[],y=!1,m=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new c(t,e)),1!==d.length||y||o(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.prependListener=u,f.prependOnceListener=u,f.listeners=function(t){return[]},f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function o(t){function e(t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return o.colors[Math.abs(e)%o.colors.length]}function o(t){function n(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];if(n.enabled){var s=n,a=Number(new Date),c=a-(r||a);s.diff=c,s.prev=r,s.curr=a,r=a,e[0]=o.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");var u=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;u++;var r=o.formatters[n];if("function"==typeof r){var i=e[u];t=r.call(s,i),e.splice(u,1),u--}return t}),o.formatArgs.call(s,e);var p=s.log||o.log;p.apply(s,e)}}var r=void 0;return n.namespace=t,n.enabled=o.enabled(t),n.useColors=o.useColors(),n.color=e(t),n.destroy=i,n.extend=s,"function"==typeof o.init&&o.init(n),o.instances.push(n),n}function i(){var t=o.instances.indexOf(this);return t!==-1&&(o.instances.splice(t,1),!0)}function s(t,e){var n=o(this.namespace+("undefined"==typeof e?":":e)+t);return n.log=this.log,n}function a(t){o.save(t),o.names=[],o.skips=[];var e=void 0,n=("string"==typeof t?t:"").split(/[\s,]+/),r=n.length;for(e=0;e<r;e++)n[e]&&(t=n[e].replace(/\*/g,".*?"),"-"===t[0]?o.skips.push(new RegExp("^"+t.substr(1)+"$")):o.names.push(new RegExp("^"+t+"$")));for(e=0;e<o.instances.length;e++){var i=o.instances[e];i.enabled=o.enabled(i.namespace)}}function c(){var t=[].concat(r(o.names.map(p)),r(o.skips.map(p).map(function(t){return"-"+t}))).join(",");return o.enable(""),t}function u(t){if("*"===t[t.length-1])return!0;var e=void 0,n=void 0;for(e=0,n=o.skips.length;e<n;e++)if(o.skips[e].test(t))return!1;for(e=0,n=o.names.length;e<n;e++)if(o.names[e].test(t))return!0;return!1}function p(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}function h(t){return t instanceof Error?t.stack||t.message:t}return o.debug=o,o["default"]=o,o.coerce=h,o.disable=c,o.enable=a,o.enabled=u,o.humanize=n(6),Object.keys(t).forEach(function(e){o[e]=t[e]}),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=e,o.enable(o.load()),o}t.exports=o},function(t,e){function n(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*h;case"weeks":case"week":case"w":return n*p;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(t){var e=Math.abs(t);return e>=u?Math.round(t/u)+"d":e>=c?Math.round(t/c)+"h":e>=a?Math.round(t/a)+"m":e>=s?Math.round(t/s)+"s":t+"ms"}function o(t){var e=Math.abs(t);return e>=u?i(t,e,u,"day"):e>=c?i(t,e,c,"hour"):e>=a?i(t,e,a,"minute"):e>=s?i(t,e,s,"second"):t+" ms"}function i(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}var s=1e3,a=60*s,c=60*a,u=24*c,p=7*u,h=365.25*u;t.exports=function(t,e){e=e||{};var i=typeof t;if("string"===i&&t.length>0)return n(t);if("number"===i&&isFinite(t))return e["long"]?o(t):r(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(){}function o(t){var n=""+t.type;if(e.BINARY_EVENT!==t.type&&e.BINARY_ACK!==t.type||(n+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(n+=t.nsp+","),null!=t.id&&(n+=t.id),null!=t.data){var r=i(t.data);if(r===!1)return g;n+=r}return f("encoded %j as %s",t,n),n}function i(t){try{return JSON.stringify(t)}catch(e){return!1}}function s(t,e){function n(t){var n=d.deconstructPacket(t),r=o(n.packet),i=n.buffers;i.unshift(r),e(i)}d.removeBlobs(t,n)}function a(){this.reconstructor=null}function c(t){var n=0,r={type:Number(t.charAt(0))};if(null==e.types[r.type])return h("unknown packet type "+r.type);if(e.BINARY_EVENT===r.type||e.BINARY_ACK===r.type){for(var o="";"-"!==t.charAt(++n)&&(o+=t.charAt(n),n!=t.length););if(o!=Number(o)||"-"!==t.charAt(n))throw new Error("Illegal attachments");r.attachments=Number(o)}if("/"===t.charAt(n+1))for(r.nsp="";++n;){var i=t.charAt(n);if(","===i)break;if(r.nsp+=i,n===t.length)break}else r.nsp="/";var s=t.charAt(n+1);if(""!==s&&Number(s)==s){for(r.id="";++n;){var i=t.charAt(n);if(null==i||Number(i)!=i){--n;break}if(r.id+=t.charAt(n),n===t.length)break}r.id=Number(r.id)}if(t.charAt(++n)){var a=u(t.substr(n)),c=a!==!1&&(r.type===e.ERROR||y(a));if(!c)return h("invalid payload");r.data=a}return f("decoded %s as %j",t,r),r}function u(t){try{return JSON.parse(t)}catch(e){return!1}}function p(t){this.reconPack=t,this.buffers=[]}function h(t){return{type:e.ERROR,data:"parser error: "+t}}var f=n(8)("socket.io-parser"),l=n(11),d=n(12),y=n(13),m=n(14);e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=r,e.Decoder=a;var g=e.ERROR+'"encode error"';r.prototype.encode=function(t,n){if(f("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type)s(t,n);else{var r=o(t);n([r])}},l(a.prototype),a.prototype.add=function(t){var n;if("string"==typeof t)n=c(t),e.BINARY_EVENT===n.type||e.BINARY_ACK===n.type?(this.reconstructor=new p(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!m(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,this.emit("decoded",n))}},a.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},p.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=d.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},p.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(t,e,n){(function(r){"use strict";function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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+)/))}function i(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))}),t.splice(i,0,r)}}function s(){return"object"===("undefined"==typeof console?"undefined":p(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}}function c(){var t;try{t=e.storage.debug}catch(n){}return!t&&"undefined"!=typeof r&&"env"in r&&(t=r.env.DEBUG),t}function u(){try{return window.localStorage}catch(t){}}var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e=t.exports=n(9),e.log=s,e.formatArgs=i,e.save=a,e.load=c,e.useColors=o,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),e.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"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(c())}).call(e,n(4))},function(t,e,n){"use strict";function r(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}function o(t){function n(){if(n.enabled){var t=n,r=+new Date,i=r-(o||r);t.diff=i,t.prev=o,t.curr=r,o=r;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.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 o=e.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(t,i),s.splice(c,1),c--}return n}),e.formatArgs.call(t,s);var u=n.log||e.log||console.log.bind(console);u.apply(t,s)}}var o;return n.namespace=t,n.enabled=e.enabled(t),n.useColors=e.useColors(),n.color=r(t),n.destroy=i,"function"==typeof e.init&&e.init(n),e.instances.push(n),n}function i(){var t=e.instances.indexOf(this);return t!==-1&&(e.instances.splice(t,1),!0)}function s(t){e.save(t),e.names=[],e.skips=[];var n,r=("string"==typeof t?t:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&(t=r[n].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(n=0;n<e.instances.length;n++){var i=e.instances[n];i.enabled=e.enabled(i.namespace)}}function a(){e.enable("")}function c(t){if("*"===t[t.length-1])return!0;var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1}function u(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=o.debug=o["default"]=o,e.coerce=u,e.disable=a,e.enable=s,e.enabled=c,e.humanize=n(10),e.instances=[],e.names=[],e.skips=[],e.formatters={}},function(t,e){function n(t){if(t=String(t),!(t.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*p;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(t){return t>=u?Math.round(t/u)+"d":t>=c?Math.round(t/c)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function o(t){return i(t,u,"day")||i(t,c,"hour")||i(t,a,"minute")||i(t,s,"second")||t+" ms"}function i(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}var s=1e3,a=60*s,c=60*a,u=24*c,p=365.25*u;t.exports=function(t,e){e=e||{};var i=typeof t;if("string"===i&&t.length>0)return n(t);if("number"===i&&isNaN(t)===!1)return e["long"]?o(t):r(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){if(t)return o(t)}function o(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){function r(t,e){if(!t)return t;if(s(t)){var n={_placeholder:!0,num:e.length};return e.push(t),n}if(i(t)){for(var o=new Array(t.length),a=0;a<t.length;a++)o[a]=r(t[a],e);return o}if("object"==typeof t&&!(t instanceof Date)){var o={};for(var c in t)o[c]=r(t[c],e);return o}return t}function o(t,e){if(!t)return t;if(t&&t._placeholder)return e[t.num];if(i(t))for(var n=0;n<t.length;n++)t[n]=o(t[n],e);else if("object"==typeof t)for(var r in t)t[r]=o(t[r],e);return t}var i=n(13),s=n(14),a=Object.prototype.toString,c="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===a.call(Blob),u="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===a.call(File);e.deconstructPacket=function(t){var e=[],n=t.data,o=t;return o.data=r(n,e),o.attachments=e.length,{packet:o,buffers:e}},e.reconstructPacket=function(t,e){return t.data=o(t.data,e),t.attachments=void 0,t},e.removeBlobs=function(t,e){function n(t,a,p){if(!t)return t;if(c&&t instanceof Blob||u&&t instanceof File){r++;var h=new FileReader;h.onload=function(){p?p[a]=this.result:o=this.result,--r||e(o)},h.readAsArrayBuffer(t)}else if(i(t))for(var f=0;f<t.length;f++)n(t[f],f,t);else if("object"==typeof t&&!s(t))for(var l in t)n(t[l],l,t)}var r=0,o=t;n(o),r||e(o)}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){function n(t){return r&&Buffer.isBuffer(t)||o&&(t instanceof ArrayBuffer||i(t))}t.exports=n;var r="function"==typeof Buffer&&"function"==typeof Buffer.isBuffer,o="function"==typeof ArrayBuffer,i=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer}},function(t,e,n){function r(t,e){if(!(this instanceof r))return new r(t,e);t&&"object"==typeof t&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new f({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=e.parser||a;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=e.autoConnect!==!1,this.autoConnect&&this.open()}var o=n(16),i=n(39),s=n(11),a=n(7),c=n(41),u=n(42),p=n(3)("socket.io-client:manager"),h=n(38),f=n(43),l=Object.prototype.hasOwnProperty;t.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var t in this.nsps)l.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},r.prototype.updateSocketIds=function(){for(var t in this.nsps)l.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},r.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},s(r.prototype),r.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},r.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},r.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},r.prototype.open=r.prototype.connect=function(t,e){if(p("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;p("opening %s",this.uri),this.engine=o(this.uri,this.opts);var n=this.engine,r=this;this.readyState="opening",this.skipReconnect=!1;var i=c(n,"open",function(){r.onopen(),t&&t()}),s=c(n,"error",function(e){if(p("connect_error"),r.cleanup(),r.readyState="closed",r.emitAll("connect_error",e),t){var n=new Error("Connection error");n.data=e,t(n)}else r.maybeReconnectOnOpen()});if(!1!==this._timeout){var a=this._timeout;p("connect attempt will timeout after %d",a);var u=setTimeout(function(){p("connect attempt timed out after %d",a),i.destroy(),n.close(),n.emit("error","timeout"),r.emitAll("connect_timeout",a)},a);this.subs.push({destroy:function(){clearTimeout(u)}})}return this.subs.push(i),this.subs.push(s),this},r.prototype.onopen=function(){p("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(c(t,"data",u(this,"ondata"))),this.subs.push(c(t,"ping",u(this,"onping"))),this.subs.push(c(t,"pong",u(this,"onpong"))),this.subs.push(c(t,"error",u(this,"onerror"))),this.subs.push(c(t,"close",u(this,"onclose"))),this.subs.push(c(this.decoder,"decoded",u(this,"ondecoded")))},r.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},r.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},r.prototype.ondata=function(t){this.decoder.add(t)},r.prototype.ondecoded=function(t){this.emit("packet",t)},r.prototype.onerror=function(t){p("error",t),this.emitAll("error",t)},r.prototype.socket=function(t,e){function n(){~h(o.connecting,r)||o.connecting.push(r)}var r=this.nsps[t];if(!r){r=new i(this,t,e),this.nsps[t]=r;var o=this;r.on("connecting",n),r.on("connect",function(){r.id=o.generateId(t)}),this.autoConnect&&n()}return r},r.prototype.destroy=function(t){var e=h(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},r.prototype.packet=function(t){p("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(n){for(var r=0;r<n.length;r++)e.engine.write(n[r],t.options);e.encoding=!1,e.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},r.prototype.cleanup=function(){p("cleanup");for(var t=this.subs.length,e=0;e<t;e++){var n=this.subs.shift();n.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){p("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(t){p("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)p("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();p("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(p("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(p("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(p("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,n){t.exports=n(17),t.exports.parser=n(24)},function(t,e,n){function r(t,e){return this instanceof r?(e=e||{},t&&"object"==typeof t&&(e=t,t=null),t?(t=p(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=p(e.host).host),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.agent=e.agent||!1,this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=e.query||{},"string"==typeof this.query&&(this.query=h.decode(this.query)),this.upgrade=!1!==e.upgrade,this.path=(e.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!e.forceJSONP,this.jsonp=!1!==e.jsonp,this.forceBase64=!!e.forceBase64,this.enablesXDR=!!e.enablesXDR,this.withCredentials=!1!==e.withCredentials,this.timestampParam=e.timestampParam||"t",this.timestampRequests=e.timestampRequests,this.transports=e.transports||["polling","websocket"],this.transportOptions=e.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=e.policyPort||843,this.rememberUpgrade=e.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=e.onlyBinaryUpgrades,this.perMessageDeflate=!1!==e.perMessageDeflate&&(e.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=e.pfx||null,this.key=e.key||null,this.passphrase=e.passphrase||null,this.cert=e.cert||null,this.ca=e.ca||null,this.ciphers=e.ciphers||null,this.rejectUnauthorized=void 0===e.rejectUnauthorized||e.rejectUnauthorized,this.forceNode=!!e.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(e.extraHeaders&&Object.keys(e.extraHeaders).length>0&&(this.extraHeaders=e.extraHeaders),e.localAddress&&(this.localAddress=e.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,void this.open()):new r(t,e)}function o(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var i=n(18),s=n(11),a=n(3)("engine.io-client:socket"),c=n(38),u=n(24),p=n(2),h=n(32);t.exports=r,r.priorWebsocketSuccess=!1,s(r.prototype),r.protocol=u.protocol,r.Socket=r,r.Transport=n(23),r.transports=n(18),r.parser=n(24),r.prototype.createTransport=function(t){a('creating transport "%s"',t);var e=o(this.query);e.EIO=u.protocol,e.transport=t;var n=this.transportOptions[t]||{};this.id&&(e.sid=this.id);var r=new i[t]({query:e,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,withCredentials:n.withCredentials||this.withCredentials,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});return r},r.prototype.open=function(){var t;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else{
7
- if(0===this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(n){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},r.prototype.setTransport=function(t){a("setting transport %s",t.name);var e=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},r.prototype.probe=function(t){function e(){if(f.onlyBinaryUpgrades){var e=!this.supportsBinary&&f.transport.supportsBinary;h=h||e}h||(a('probe transport "%s" opened',t),p.send([{type:"ping",data:"probe"}]),p.once("packet",function(e){if(!h)if("pong"===e.type&&"probe"===e.data){if(a('probe transport "%s" pong',t),f.upgrading=!0,f.emit("upgrading",p),!p)return;r.priorWebsocketSuccess="websocket"===p.name,a('pausing current transport "%s"',f.transport.name),f.transport.pause(function(){h||"closed"!==f.readyState&&(a("changing transport and sending upgrade packet"),u(),f.setTransport(p),p.send([{type:"upgrade"}]),f.emit("upgrade",p),p=null,f.upgrading=!1,f.flush())})}else{a('probe transport "%s" failed',t);var n=new Error("probe error");n.transport=p.name,f.emit("upgradeError",n)}}))}function n(){h||(h=!0,u(),p.close(),p=null)}function o(e){var r=new Error("probe error: "+e);r.transport=p.name,n(),a('probe transport "%s" failed because of error: %s',t,e),f.emit("upgradeError",r)}function i(){o("transport closed")}function s(){o("socket closed")}function c(t){p&&t.name!==p.name&&(a('"%s" works - aborting "%s"',t.name,p.name),n())}function u(){p.removeListener("open",e),p.removeListener("error",o),p.removeListener("close",i),f.removeListener("close",s),f.removeListener("upgrading",c)}a('probing transport "%s"',t);var p=this.createTransport(t,{probe:1}),h=!1,f=this;r.priorWebsocketSuccess=!1,p.once("open",e),p.once("error",o),p.once("close",i),this.once("close",s),this.once("upgrading",c),p.open()},r.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},r.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(a('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else a('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!==e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},r.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){a("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},r.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},r.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},r.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},r.prototype.write=r.prototype.send=function(t,e,n){return this.sendPacket("message",t,e,n),this},r.prototype.sendPacket=function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){n=n||{},n.compress=!1!==n.compress;var o={type:t,data:e,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},r.prototype.close=function(){function t(){r.onClose("forced close"),a("socket closing - telling transport to close"),r.transport.close()}function e(){r.removeListener("upgrade",e),r.removeListener("upgradeError",e),t()}function n(){r.once("upgrade",e),r.once("upgradeError",e)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():t()}):this.upgrading?n():t()}return this},r.prototype.onError=function(t){a("socket error %j",t),r.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},r.prototype.onClose=function(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){a('socket close with reason: "%s"',t);var n=this;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",t,e),n.writeBuffer=[],n.prevBufferLen=0}},r.prototype.filterUpgrades=function(t){for(var e=[],n=0,r=t.length;n<r;n++)~c(this.transports,t[n])&&e.push(t[n]);return e}},function(t,e,n){function r(t){var e,n=!1,r=!1,a=!1!==t.jsonp;if("undefined"!=typeof location){var c="https:"===location.protocol,u=location.port;u||(u=c?443:80),n=t.hostname!==location.hostname||u!==t.port,r=t.secure!==c}if(t.xdomain=n,t.xscheme=r,e=new o(t),"open"in e&&!t.forceJSONP)return new i(t);if(!a)throw new Error("JSONP disabled");return new s(t)}var o=n(19),i=n(21),s=n(35),a=n(36);e.polling=r,e.websocket=a},function(t,e,n){var r=n(20);t.exports=function(t){var e=t.xdomain,n=t.xscheme,o=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r))return new XMLHttpRequest}catch(i){}try{if("undefined"!=typeof XDomainRequest&&!n&&o)return new XDomainRequest}catch(i){}if(!e)try{return new(self[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(i){}}},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(n){t.exports=!1}},function(t,e,n){function r(){}function o(t){if(c.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,"undefined"!=typeof location){var e="https:"===location.protocol,n=location.port;n||(n=e?443:80),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}}function i(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}function s(){for(var t in i.requests)i.requests.hasOwnProperty(t)&&i.requests[t].abort()}var a=n(19),c=n(22),u=n(11),p=n(33),h=n(3)("engine.io-client:polling-xhr");if(t.exports=o,t.exports.Request=i,p(o,c),o.prototype.supportsBinary=!0,o.prototype.request=function(t){return t=t||{},t.uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.withCredentials=this.withCredentials,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new i(t)},o.prototype.doWrite=function(t,e){var n="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:n}),o=this;r.on("success",e),r.on("error",function(t){o.onError("xhr post error",t)}),this.sendXhr=r},o.prototype.doPoll=function(){h("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},u(i.prototype),i.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var e=this.xhr=new a(t),n=this;try{h("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(var r in this.extraHeaders)this.extraHeaders.hasOwnProperty(r)&&e.setRequestHeader(r,this.extraHeaders[r])}}catch(o){}if("POST"===this.method)try{this.isBinary?e.setRequestHeader("Content-type","application/octet-stream"):e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{e.setRequestHeader("Accept","*/*")}catch(o){}"withCredentials"in e&&(e.withCredentials=this.withCredentials),this.requestTimeout&&(e.timeout=this.requestTimeout),this.hasXDR()?(e.onload=function(){n.onLoad()},e.onerror=function(){n.onError(e.responseText)}):e.onreadystatechange=function(){if(2===e.readyState)try{var t=e.getResponseHeader("Content-Type");(n.supportsBinary&&"application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&(e.responseType="arraybuffer")}catch(r){}4===e.readyState&&(200===e.status||1223===e.status?n.onLoad():setTimeout(function(){n.onError("number"==typeof e.status?e.status:0)},0))},h("xhr data %s",this.data),e.send(this.data)}catch(o){return void setTimeout(function(){n.onError(o)},0)}"undefined"!=typeof document&&(this.index=i.requestsCount++,i.requests[this.index]=this)},i.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},i.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},i.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},i.prototype.cleanup=function(t){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=r:this.xhr.onreadystatechange=r,t)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete i.requests[this.index],this.xhr=null}},i.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(n){}t="application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e?this.xhr.response||this.xhr.responseText:this.xhr.responseText}catch(n){this.onError(n)}null!=t&&this.onData(t)},i.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},i.prototype.abort=function(){this.cleanup()},i.requestsCount=0,i.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",s);else if("function"==typeof addEventListener){var f="onpagehide"in self?"pagehide":"unload";addEventListener(f,s,!1)}},function(t,e,n){function r(t){var e=t&&t.forceBase64;p&&!e||(this.supportsBinary=!1),o.call(this,t)}var o=n(23),i=n(32),s=n(24),a=n(33),c=n(34),u=n(3)("engine.io-client:polling");t.exports=r;var p=function(){var t=n(19),e=new t({xdomain:!1});return null!=e.responseType}();a(r,o),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(t){function e(){u("paused"),n.readyState="paused",t()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(u("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){u("pre-pause polling complete"),--r||e()})),this.writable||(u("we are currently writing - waiting to pause"),r++,this.once("drain",function(){u("pre-pause writing complete"),--r||e()}))}else e()},r.prototype.poll=function(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(t){var e=this;u("polling got data %s",t);var n=function(t,n,r){return"opening"===e.readyState&&e.onOpen(),"close"===t.type?(e.onClose(),!1):void e.onPacket(t)};s.decodePayload(t,this.socket.binaryType,n),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function t(){u("writing close packet"),e.write([{type:"close"}])}var e=this;"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))},r.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")};s.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,n)})},r.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",n="";!1!==this.timestampRequests&&(t[this.timestampParam]=c()),this.supportsBinary||t.sid||(t.b64=1),t=i.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(n=":"+this.port),t.length&&(t="?"+t);var r=this.hostname.indexOf(":")!==-1;return e+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+t}},function(t,e,n){function r(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.withCredentials=t.withCredentials,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.isReactNative=t.isReactNative,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}var o=n(24),i=n(11);t.exports=r,i(r.prototype),r.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},r.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},r.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(t){var e=o.decodePacket(t,this.socket.binaryType);this.onPacket(e)},r.prototype.onPacket=function(t){this.emit("packet",t)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,n){function r(t,n){var r="b"+e.packets[t.type]+t.data.data;return n(r)}function o(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=t.data,i=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=v[t.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return r(s.buffer)}function i(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=new FileReader;return o.onload=function(){e.encodePacket({type:t.type,data:o.result},n,!0,r)},o.readAsArrayBuffer(t.data)}function s(t,n,r){if(!n)return e.encodeBase64Packet(t,r);if(g)return i(t,n,r);var o=new Uint8Array(1);o[0]=v[t.type];var s=new w([o.buffer,t.data]);return r(s)}function a(t){try{t=d.decode(t,{strict:!1})}catch(e){return!1}return t}function c(t,e,n){for(var r=new Array(t.length),o=l(t.length,n),i=function(t,n,o){e(n,function(e,n){r[t]=n,o(e,r)})},s=0;s<t.length;s++)i(s,t[s],o)}var u,p=n(25),h=n(26),f=n(27),l=n(28),d=n(29);"undefined"!=typeof ArrayBuffer&&(u=n(30));var y="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),m="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),g=y||m;e.protocol=3;var v=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},b=p(v),C={type:"error",data:"parser error"},w=n(31);e.encodePacket=function(t,e,n,i){"function"==typeof e&&(i=e,e=!1),"function"==typeof n&&(i=n,n=null);var a=void 0===t.data?void 0:t.data.buffer||t.data;if("undefined"!=typeof ArrayBuffer&&a instanceof ArrayBuffer)return o(t,e,i);if("undefined"!=typeof w&&a instanceof w)return s(t,e,i);if(a&&a.base64)return r(t,i);var c=v[t.type];return void 0!==t.data&&(c+=n?d.encode(String(t.data),{strict:!1}):String(t.data)),i(""+c)},e.encodeBase64Packet=function(t,n){var r="b"+e.packets[t.type];if("undefined"!=typeof w&&t.data instanceof w){var o=new FileReader;return o.onload=function(){var t=o.result.split(",")[1];n(r+t)},o.readAsDataURL(t.data)}var i;try{i=String.fromCharCode.apply(null,new Uint8Array(t.data))}catch(s){for(var a=new Uint8Array(t.data),c=new Array(a.length),u=0;u<a.length;u++)c[u]=a[u];i=String.fromCharCode.apply(null,c)}return r+=btoa(i),n(r)},e.decodePacket=function(t,n,r){if(void 0===t)return C;if("string"==typeof t){if("b"===t.charAt(0))return e.decodeBase64Packet(t.substr(1),n);if(r&&(t=a(t),t===!1))return C;var o=t.charAt(0);return Number(o)==o&&b[o]?t.length>1?{type:b[o],data:t.substring(1)}:{type:b[o]}:C}var i=new Uint8Array(t),o=i[0],s=f(t,1);return w&&"blob"===n&&(s=new w([s])),{type:b[o],data:s}},e.decodeBase64Packet=function(t,e){var n=b[t.charAt(0)];if(!u)return{type:n,data:{base64:!0,data:t.substr(1)}};var r=u.decode(t.substr(1));return"blob"===e&&w&&(r=new w([r])),{type:n,data:r}},e.encodePayload=function(t,n,r){function o(t){return t.length+":"+t}function i(t,r){e.encodePacket(t,!!s&&n,!1,function(t){r(null,o(t))})}"function"==typeof n&&(r=n,n=null);var s=h(t);return n&&s?w&&!g?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r):t.length?void c(t,i,function(t,e){return r(e.join(""))}):r("0:")},e.decodePayload=function(t,n,r){if("string"!=typeof t)return e.decodePayloadAsBinary(t,n,r);"function"==typeof n&&(r=n,n=null);var o;if(""===t)return r(C,0,1);for(var i,s,a="",c=0,u=t.length;c<u;c++){var p=t.charAt(c);if(":"===p){if(""===a||a!=(i=Number(a)))return r(C,0,1);if(s=t.substr(c+1,i),a!=s.length)return r(C,0,1);if(s.length){if(o=e.decodePacket(s,n,!1),C.type===o.type&&C.data===o.data)return r(C,0,1);var h=r(o,c+i,u);if(!1===h)return}c+=i,a=""}else a+=p}return""!==a?r(C,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,n){function r(t,n){e.encodePacket(t,!0,!0,function(t){return n(null,t)})}return t.length?void c(t,r,function(t,e){var r=e.reduce(function(t,e){var n;return n="string"==typeof e?e.length:e.byteLength,t+n.toString().length+n+2},0),o=new Uint8Array(r),i=0;return e.forEach(function(t){var e="string"==typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),s=0;s<t.length;s++)r[s]=t.charCodeAt(s);n=r.buffer}e?o[i++]=0:o[i++]=1;for(var a=n.byteLength.toString(),s=0;s<a.length;s++)o[i++]=parseInt(a[s]);o[i++]=255;for(var r=new Uint8Array(n),s=0;s<r.length;s++)o[i++]=r[s]}),n(o.buffer)}):n(new ArrayBuffer(0))},e.encodePayloadAsBlob=function(t,n){function r(t,n){e.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);t=r.buffer,e[0]=0}for(var i=t instanceof ArrayBuffer?t.byteLength:t.size,s=i.toString(),a=new Uint8Array(s.length+1),o=0;o<s.length;o++)a[o]=parseInt(s[o]);if(a[s.length]=255,w){var c=new w([e.buffer,a.buffer,t]);n(null,c)}})}c(t,r,function(t,e){return n(new w(e))})},e.decodePayloadAsBinary=function(t,n,r){"function"==typeof n&&(r=n,n=null);for(var o=t,i=[];o.byteLength>0;){for(var s=new Uint8Array(o),a=0===s[0],c="",u=1;255!==s[u];u++){if(c.length>310)return r(C,0,1);c+=s[u]}o=f(o,2+c.length),c=parseInt(c);var p=f(o,0,c);if(a)try{p=String.fromCharCode.apply(null,new Uint8Array(p))}catch(h){var l=new Uint8Array(p);p="";for(var u=0;u<l.length;u++)p+=String.fromCharCode(l[u])}i.push(p),o=f(o,c)}var d=i.length;i.forEach(function(t,o){r(e.decodePacket(t,n,!0),o,d)})}},function(t,e){t.exports=Object.keys||function(t){var e=[],n=Object.prototype.hasOwnProperty;for(var r in t)n.call(t,r)&&e.push(r);return e}},function(t,e,n){function r(t){if(!t||"object"!=typeof t)return!1;if(o(t)){for(var e=0,n=t.length;e<n;e++)if(r(t[e]))return!0;return!1}if("function"==typeof Buffer&&Buffer.isBuffer&&Buffer.isBuffer(t)||"function"==typeof ArrayBuffer&&t instanceof ArrayBuffer||s&&t instanceof Blob||a&&t instanceof File)return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return r(t.toJSON(),!0);for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&r(t[i]))return!0;return!1}var o=n(13),i=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);t.exports=r},function(t,e){t.exports=function(t,e,n){var r=t.byteLength;if(e=e||0,n=n||r,t.slice)return t.slice(e,n);if(e<0&&(e+=r),n<0&&(n+=r),n>r&&(n=r),e>=r||e>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(n-e),s=e,a=0;s<n;s++,a++)i[a]=o[s];return i.buffer}},function(t,e){function n(t,e,n){function o(t,r){if(o.count<=0)throw new Error("after called too many times");--o.count,t?(i=!0,e(t),e=n):0!==o.count||i||e(null,r)}var i=!1;return n=n||r,o.count=t,0===t?e():o}function r(){}t.exports=n},function(t,e){function n(t){for(var e,n,r=[],o=0,i=t.length;o<i;)e=t.charCodeAt(o++),e>=55296&&e<=56319&&o<i?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function r(t){for(var e,n=t.length,r=-1,o="";++r<n;)e=t[r],e>65535&&(e-=65536,o+=d(e>>>10&1023|55296),e=56320|1023&e),o+=d(e);return o}function o(t,e){if(t>=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function i(t,e){return d(t>>e&63|128)}function s(t,e){if(0==(4294967168&t))return d(t);var n="";return 0==(4294965248&t)?n=d(t>>6&31|192):0==(4294901760&t)?(o(t,e)||(t=65533),n=d(t>>12&15|224),n+=i(t,6)):0==(4292870144&t)&&(n=d(t>>18&7|240),n+=i(t,12),n+=i(t,6)),n+=d(63&t|128)}function a(t,e){e=e||{};for(var r,o=!1!==e.strict,i=n(t),a=i.length,c=-1,u="";++c<a;)r=i[c],u+=s(r,o);return u}function c(){if(l>=f)throw Error("Invalid byte index");var t=255&h[l];if(l++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function u(t){var e,n,r,i,s;if(l>f)throw Error("Invalid byte index");if(l==f)return!1;if(e=255&h[l],l++,0==(128&e))return e;if(192==(224&e)){if(n=c(),s=(31&e)<<6|n,s>=128)return s;throw Error("Invalid continuation byte")}if(224==(240&e)){if(n=c(),r=c(),s=(15&e)<<12|n<<6|r,s>=2048)return o(s,t)?s:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(n=c(),r=c(),i=c(),s=(7&e)<<18|n<<12|r<<6|i,s>=65536&&s<=1114111))return s;throw Error("Invalid UTF-8 detected")}function p(t,e){e=e||{};var o=!1!==e.strict;h=n(t),f=h.length,l=0;for(var i,s=[];(i=u(o))!==!1;)s.push(i);return r(s)}/*! https://mths.be/utf8js v2.1.2 by @mathias */
8
- var h,f,l,d=String.fromCharCode;t.exports={version:"2.1.2",encode:a,decode:p}},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<t.length;r++)n[t.charCodeAt(r)]=r;e.encode=function(e){var n,r=new Uint8Array(e),o=r.length,i="";for(n=0;n<o;n+=3)i+=t[r[n]>>2],i+=t[(3&r[n])<<4|r[n+1]>>4],i+=t[(15&r[n+1])<<2|r[n+2]>>6],i+=t[63&r[n+2]];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(t){var e,r,o,i,s,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var p=new ArrayBuffer(a),h=new Uint8Array(p);for(e=0;e<c;e+=4)r=n[t.charCodeAt(e)],o=n[t.charCodeAt(e+1)],i=n[t.charCodeAt(e+2)],s=n[t.charCodeAt(e+3)],h[u++]=r<<2|o>>4,h[u++]=(15&o)<<4|i>>2,h[u++]=(3&i)<<6|63&s;return p}}()},function(t,e){function n(t){return t.map(function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var n=new Uint8Array(t.byteLength);n.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=n.buffer}return e}return t})}function r(t,e){e=e||{};var r=new i;return n(t).forEach(function(t){r.append(t)}),e.type?r.getBlob(e.type):r.getBlob()}function o(t,e){return new Blob(n(t),e||{})}var i="undefined"!=typeof i?i:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,s=function(){try{var t=new Blob(["hi"]);return 2===t.size}catch(e){return!1}}(),a=s&&function(){try{var t=new Blob([new Uint8Array([1,2])]);return 2===t.size}catch(e){return!1}}(),c=i&&i.prototype.append&&i.prototype.getBlob;"undefined"!=typeof Blob&&(r.prototype=Blob.prototype,o.prototype=Blob.prototype),t.exports=function(){return s?a?Blob:o:c?r:void 0}()},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e){"use strict";function n(t){var e="";do e=s[t%a]+e,t=Math.floor(t/a);while(t>0);return e}function r(t){var e=0;for(p=0;p<t.length;p++)e=e*a+c[t.charAt(p)];return e}function o(){var t=n(+new Date);return t!==i?(u=0,i=t):t+"."+n(u++)}for(var i,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),a=64,c={},u=0,p=0;p<a;p++)c[s[p]]=p;o.encode=n,o.decode=r,t.exports=o},function(t,e,n){(function(e){function r(){}function o(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof e?e:{}}function i(t){if(s.call(this,t),this.query=this.query||{},!c){var e=o();c=e.___eio=e.___eio||[]}this.index=c.length;var n=this;c.push(function(t){n.onData(t)}),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",function(){n.script&&(n.script.onerror=r)},!1)}var s=n(22),a=n(33);t.exports=i;var c,u=/\n/g,p=/\\n/g;a(i,s),i.prototype.supportsBinary=!1,i.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),s.prototype.doClose.call(this)},i.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(e,n):(document.head||document.body).appendChild(e),this.script=e;var r="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);r&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},i.prototype.doWrite=function(t,e){function n(){r(),e()}function r(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(t){o.onError("jsonp polling iframe removal error",t)}try{var e='<iframe src="javascript:0" name="'+o.iframeId+'">';i=document.createElement(e)}catch(t){i=document.createElement("iframe"),i.name=o.iframeId,i.src="javascript:0"}i.id=o.iframeId,o.form.appendChild(i),o.iframe=i}var o=this;if(!this.form){var i,s=document.createElement("form"),a=document.createElement("textarea"),c=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=c,s.method="POST",s.setAttribute("accept-charset","utf-8"),a.name="d",s.appendChild(a),document.body.appendChild(s),this.form=s,this.area=a}this.form.action=this.uri(),r(),t=t.replace(p,"\\\n"),this.area.value=t.replace(u,"\\n");try{this.form.submit()}catch(h){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===o.iframe.readyState&&n()}:this.iframe.onload=n}}).call(e,function(){return this}())},function(t,e,n){function r(t){var e=t&&t.forceBase64;e&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=o&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(l=i),s.call(this,t)}var o,i,s=n(23),a=n(24),c=n(32),u=n(33),p=n(34),h=n(3)("engine.io-client:websocket");if("undefined"!=typeof WebSocket?o=WebSocket:"undefined"!=typeof self&&(o=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{i=n(37)}catch(f){}var l=o||i;t.exports=r,u(r,s),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=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?e?new l(t,e):new l(t):new l(t,e,n)}catch(r){return this.emit("error",r)}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()}},r.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},r.prototype.write=function(t){function e(){n.emit("flush"),setTimeout(function(){n.writable=!0,n.emit("drain")},0)}var n=this;this.writable=!1;for(var r=t.length,o=0,i=r;o<i;o++)!function(t){a.encodePacket(t,n.supportsBinary,function(o){if(!n.usingBrowserWebSocket){var i={};if(t.options&&(i.compress=t.options.compress),n.perMessageDeflate){var s="string"==typeof o?Buffer.byteLength(o):o.length;s<n.perMessageDeflate.threshold&&(i.compress=!1)}}try{n.usingBrowserWebSocket?n.ws.send(o):n.ws.send(o,i)}catch(a){h("websocket closed before onclose event")}--r||e()})}(t[o])},r.prototype.onClose=function(){s.prototype.onClose.call(this)},r.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},r.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",n="";this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=p()),this.supportsBinary||(t.b64=1),t=c.encode(t),t.length&&(t="?"+t);var r=this.hostname.indexOf(":")!==-1;return e+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+t},r.prototype.check=function(){return!(!l||"__initialize"in l&&this.name===r.prototype.name)}},function(t,e){},function(t,e){var n=[].indexOf;t.exports=function(t,e){if(n)return t.indexOf(e);for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}},function(t,e,n){function r(t,e,n){this.io=t,this.nsp=e,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()}var o=n(7),i=n(11),s=n(40),a=n(41),c=n(42),u=n(3)("socket.io-client:socket"),p=n(32),h=n(26);t.exports=e=r;var f={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},l=i.prototype.emit;i(r.prototype),r.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[a(t,"open",c(this,"onopen")),a(t,"packet",c(this,"onpacket")),a(t,"close",c(this,"onclose"))]}},r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},r.prototype.send=function(){var t=s(arguments);return t.unshift("message"),this.emit.apply(this,t),this},r.prototype.emit=function(t){if(f.hasOwnProperty(t))return l.apply(this,arguments),this;var e=s(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:h(e))?o.BINARY_EVENT:o.EVENT,data:e};return n.options={},n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},r.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},r.prototype.onopen=function(){if(u("transport is open - connecting"),"/"!==this.nsp)if(this.query){var t="object"==typeof this.query?p.encode(this.query):this.query;u("sending connect packet with query %s",t),this.packet({type:o.CONNECT,query:t})}else this.packet({type:o.CONNECT})},r.prototype.onclose=function(t){u("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},r.prototype.onpacket=function(t){var e=t.nsp===this.nsp,n=t.type===o.ERROR&&"/"===t.nsp;if(e||n)switch(t.type){case o.CONNECT:this.onconnect();break;case o.EVENT:this.onevent(t);break;case o.BINARY_EVENT:this.onevent(t);break;case o.ACK:this.onack(t);break;case o.BINARY_ACK:this.onack(t);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",t.data)}},r.prototype.onevent=function(t){var e=t.data||[];u("emitting event %j",e),null!=t.id&&(u("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?l.apply(this,e):this.receiveBuffer.push(e)},r.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var r=s(arguments);u("sending ack %j",r),e.packet({type:h(r)?o.BINARY_ACK:o.ACK,id:t,data:r})}}},r.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(u("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):u("bad ack %s",t.id)},r.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},r.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)l.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},r.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},r.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},r.prototype.close=r.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},r.prototype.compress=function(t){return this.flags.compress=t,this},r.prototype.binary=function(t){return this.flags.binary=t,this}},function(t,e){function n(t,e){var n=[];e=e||0;for(var r=e||0;r<t.length;r++)n[r-e]=t[r];return n}t.exports=n},function(t,e){function n(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}t.exports=n},function(t,e){var n=[].slice;t.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}}},function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}}])});
9
- //# sourceMappingURL=socket.io.js.map
6
+ !(function (t, e) {
7
+ 'object' == typeof exports && 'object' == typeof module
8
+ ? (module.exports = e())
9
+ : 'function' == typeof define && define.amd
10
+ ? define([], e)
11
+ : 'object' == typeof exports
12
+ ? (exports.io = e())
13
+ : (t.io = e());
14
+ })(this, function () {
15
+ return (function (t) {
16
+ function e(r) {
17
+ if (n[r]) return n[r].exports;
18
+ var o = (n[r] = { exports: {}, id: r, loaded: !1 });
19
+ return (t[r].call(o.exports, o, o.exports, e), (o.loaded = !0), o.exports);
20
+ }
21
+ var n = {};
22
+ return ((e.m = t), (e.c = n), (e.p = ''), e(0));
23
+ })([
24
+ function (t, e, n) {
25
+ function r(t, e) {
26
+ ('object' == typeof t && ((e = t), (t = void 0)), (e = e || {}));
27
+ var n,
28
+ r = o(t),
29
+ i = r.source,
30
+ u = r.id,
31
+ p = r.path,
32
+ h = c[u] && p in c[u].nsps,
33
+ f = e.forceNew || e['force new connection'] || !1 === e.multiplex || h;
34
+ return (
35
+ f
36
+ ? (a('ignoring socket cache for %s', i), (n = s(i, e)))
37
+ : (c[u] || (a('new io instance for %s', i), (c[u] = s(i, e))), (n = c[u])),
38
+ r.query && !e.query && (e.query = r.query),
39
+ n.socket(r.path, e)
40
+ );
41
+ }
42
+ var o = n(1),
43
+ i = n(7),
44
+ s = n(15),
45
+ a = n(3)('socket.io-client');
46
+ t.exports = e = r;
47
+ var c = (e.managers = {});
48
+ ((e.protocol = i.protocol), (e.connect = r), (e.Manager = n(15)), (e.Socket = n(39)));
49
+ },
50
+ function (t, e, n) {
51
+ function r(t, e) {
52
+ var n = t;
53
+ ((e = e || ('undefined' != typeof location && location)),
54
+ null == t && (t = e.protocol + '//' + e.host),
55
+ 'string' == typeof t &&
56
+ ('/' === t.charAt(0) && (t = '/' === t.charAt(1) ? e.protocol + t : e.host + t),
57
+ /^(https?|wss?):\/\//.test(t) ||
58
+ (i('protocol-less url %s', t),
59
+ (t = 'undefined' != typeof e ? e.protocol + '//' + t : 'https://' + t)),
60
+ i('parse %s', t),
61
+ (n = o(t))),
62
+ n.port ||
63
+ (/^(http|ws)$/.test(n.protocol)
64
+ ? (n.port = '80')
65
+ : /^(http|ws)s$/.test(n.protocol) && (n.port = '443')),
66
+ (n.path = n.path || '/'));
67
+ var r = n.host.indexOf(':') !== -1,
68
+ s = r ? '[' + n.host + ']' : n.host;
69
+ return (
70
+ (n.id = n.protocol + '://' + s + ':' + n.port),
71
+ (n.href = n.protocol + '://' + s + (e && e.port === n.port ? '' : ':' + n.port)),
72
+ n
73
+ );
74
+ }
75
+ var o = n(2),
76
+ i = n(3)('socket.io-client:url');
77
+ t.exports = r;
78
+ },
79
+ function (t, e) {
80
+ var n =
81
+ /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
82
+ r = [
83
+ 'source',
84
+ 'protocol',
85
+ 'authority',
86
+ 'userInfo',
87
+ 'user',
88
+ 'password',
89
+ 'host',
90
+ 'port',
91
+ 'relative',
92
+ 'path',
93
+ 'directory',
94
+ 'file',
95
+ 'query',
96
+ 'anchor',
97
+ ];
98
+ t.exports = function (t) {
99
+ var e = t,
100
+ o = t.indexOf('['),
101
+ i = t.indexOf(']');
102
+ o != -1 &&
103
+ i != -1 &&
104
+ (t = t.substring(0, o) + t.substring(o, i).replace(/:/g, ';') + t.substring(i, t.length));
105
+ for (var s = n.exec(t || ''), a = {}, c = 14; c--; ) a[r[c]] = s[c] || '';
106
+ return (
107
+ o != -1 &&
108
+ i != -1 &&
109
+ ((a.source = e),
110
+ (a.host = a.host.substring(1, a.host.length - 1).replace(/;/g, ':')),
111
+ (a.authority = a.authority.replace('[', '').replace(']', '').replace(/;/g, ':')),
112
+ (a.ipv6uri = !0)),
113
+ a
114
+ );
115
+ };
116
+ },
117
+ function (t, e, n) {
118
+ (function (r) {
119
+ 'use strict';
120
+ function o() {
121
+ return (
122
+ !(
123
+ 'undefined' == typeof window ||
124
+ !window.process ||
125
+ ('renderer' !== window.process.type && !window.process.__nwjs)
126
+ ) ||
127
+ (('undefined' == typeof navigator ||
128
+ !navigator.userAgent ||
129
+ !navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) &&
130
+ (('undefined' != typeof document &&
131
+ document.documentElement &&
132
+ document.documentElement.style &&
133
+ document.documentElement.style.WebkitAppearance) ||
134
+ ('undefined' != typeof window &&
135
+ window.console &&
136
+ (window.console.firebug || (window.console.exception && window.console.table))) ||
137
+ ('undefined' != typeof navigator &&
138
+ navigator.userAgent &&
139
+ navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) &&
140
+ parseInt(RegExp.$1, 10) >= 31) ||
141
+ ('undefined' != typeof navigator &&
142
+ navigator.userAgent &&
143
+ navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))))
144
+ );
145
+ }
146
+ function i(e) {
147
+ if (
148
+ ((e[0] =
149
+ (this.useColors ? '%c' : '') +
150
+ this.namespace +
151
+ (this.useColors ? ' %c' : ' ') +
152
+ e[0] +
153
+ (this.useColors ? '%c ' : ' ') +
154
+ '+' +
155
+ t.exports.humanize(this.diff)),
156
+ this.useColors)
157
+ ) {
158
+ var n = 'color: ' + this.color;
159
+ e.splice(1, 0, n, 'color: inherit');
160
+ var r = 0,
161
+ o = 0;
162
+ (e[0].replace(/%[a-zA-Z%]/g, function (t) {
163
+ '%%' !== t && (r++, '%c' === t && (o = r));
164
+ }),
165
+ e.splice(o, 0, n));
166
+ }
167
+ }
168
+ function s() {
169
+ var t;
170
+ return (
171
+ 'object' === ('undefined' == typeof console ? 'undefined' : p(console)) &&
172
+ console.log &&
173
+ (t = console).log.apply(t, arguments)
174
+ );
175
+ }
176
+ function a(t) {
177
+ try {
178
+ t ? e.storage.setItem('debug', t) : e.storage.removeItem('debug');
179
+ } catch (n) {}
180
+ }
181
+ function c() {
182
+ var t = void 0;
183
+ try {
184
+ t = e.storage.getItem('debug');
185
+ } catch (n) {}
186
+ return (!t && 'undefined' != typeof r && 'env' in r && (t = r.env.DEBUG), t);
187
+ }
188
+ function u() {
189
+ try {
190
+ return localStorage;
191
+ } catch (t) {}
192
+ }
193
+ var p =
194
+ 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
195
+ ? function (t) {
196
+ return typeof t;
197
+ }
198
+ : function (t) {
199
+ return t &&
200
+ 'function' == typeof Symbol &&
201
+ t.constructor === Symbol &&
202
+ t !== Symbol.prototype
203
+ ? 'symbol'
204
+ : typeof t;
205
+ };
206
+ ((e.log = s),
207
+ (e.formatArgs = i),
208
+ (e.save = a),
209
+ (e.load = c),
210
+ (e.useColors = o),
211
+ (e.storage = u()),
212
+ (e.colors = [
213
+ '#0000CC',
214
+ '#0000FF',
215
+ '#0033CC',
216
+ '#0033FF',
217
+ '#0066CC',
218
+ '#0066FF',
219
+ '#0099CC',
220
+ '#0099FF',
221
+ '#00CC00',
222
+ '#00CC33',
223
+ '#00CC66',
224
+ '#00CC99',
225
+ '#00CCCC',
226
+ '#00CCFF',
227
+ '#3300CC',
228
+ '#3300FF',
229
+ '#3333CC',
230
+ '#3333FF',
231
+ '#3366CC',
232
+ '#3366FF',
233
+ '#3399CC',
234
+ '#3399FF',
235
+ '#33CC00',
236
+ '#33CC33',
237
+ '#33CC66',
238
+ '#33CC99',
239
+ '#33CCCC',
240
+ '#33CCFF',
241
+ '#6600CC',
242
+ '#6600FF',
243
+ '#6633CC',
244
+ '#6633FF',
245
+ '#66CC00',
246
+ '#66CC33',
247
+ '#9900CC',
248
+ '#9900FF',
249
+ '#9933CC',
250
+ '#9933FF',
251
+ '#99CC00',
252
+ '#99CC33',
253
+ '#CC0000',
254
+ '#CC0033',
255
+ '#CC0066',
256
+ '#CC0099',
257
+ '#CC00CC',
258
+ '#CC00FF',
259
+ '#CC3300',
260
+ '#CC3333',
261
+ '#CC3366',
262
+ '#CC3399',
263
+ '#CC33CC',
264
+ '#CC33FF',
265
+ '#CC6600',
266
+ '#CC6633',
267
+ '#CC9900',
268
+ '#CC9933',
269
+ '#CCCC00',
270
+ '#CCCC33',
271
+ '#FF0000',
272
+ '#FF0033',
273
+ '#FF0066',
274
+ '#FF0099',
275
+ '#FF00CC',
276
+ '#FF00FF',
277
+ '#FF3300',
278
+ '#FF3333',
279
+ '#FF3366',
280
+ '#FF3399',
281
+ '#FF33CC',
282
+ '#FF33FF',
283
+ '#FF6600',
284
+ '#FF6633',
285
+ '#FF9900',
286
+ '#FF9933',
287
+ '#FFCC00',
288
+ '#FFCC33',
289
+ ]),
290
+ (t.exports = n(5)(e)));
291
+ var h = t.exports.formatters;
292
+ h.j = function (t) {
293
+ try {
294
+ return JSON.stringify(t);
295
+ } catch (e) {
296
+ return '[UnexpectedJSONParseError]: ' + e.message;
297
+ }
298
+ };
299
+ }).call(e, n(4));
300
+ },
301
+ function (t, e) {
302
+ function n() {
303
+ throw new Error('setTimeout has not been defined');
304
+ }
305
+ function r() {
306
+ throw new Error('clearTimeout has not been defined');
307
+ }
308
+ function o(t) {
309
+ if (p === setTimeout) return setTimeout(t, 0);
310
+ if ((p === n || !p) && setTimeout) return ((p = setTimeout), setTimeout(t, 0));
311
+ try {
312
+ return p(t, 0);
313
+ } catch (e) {
314
+ try {
315
+ return p.call(null, t, 0);
316
+ } catch (e) {
317
+ return p.call(this, t, 0);
318
+ }
319
+ }
320
+ }
321
+ function i(t) {
322
+ if (h === clearTimeout) return clearTimeout(t);
323
+ if ((h === r || !h) && clearTimeout) return ((h = clearTimeout), clearTimeout(t));
324
+ try {
325
+ return h(t);
326
+ } catch (e) {
327
+ try {
328
+ return h.call(null, t);
329
+ } catch (e) {
330
+ return h.call(this, t);
331
+ }
332
+ }
333
+ }
334
+ function s() {
335
+ y && l && ((y = !1), l.length ? (d = l.concat(d)) : (m = -1), d.length && a());
336
+ }
337
+ function a() {
338
+ if (!y) {
339
+ var t = o(s);
340
+ y = !0;
341
+ for (var e = d.length; e; ) {
342
+ for (l = d, d = []; ++m < e; ) l && l[m].run();
343
+ ((m = -1), (e = d.length));
344
+ }
345
+ ((l = null), (y = !1), i(t));
346
+ }
347
+ }
348
+ function c(t, e) {
349
+ ((this.fun = t), (this.array = e));
350
+ }
351
+ function u() {}
352
+ var p,
353
+ h,
354
+ f = (t.exports = {});
355
+ !(function () {
356
+ try {
357
+ p = 'function' == typeof setTimeout ? setTimeout : n;
358
+ } catch (t) {
359
+ p = n;
360
+ }
361
+ try {
362
+ h = 'function' == typeof clearTimeout ? clearTimeout : r;
363
+ } catch (t) {
364
+ h = r;
365
+ }
366
+ })();
367
+ var l,
368
+ d = [],
369
+ y = !1,
370
+ m = -1;
371
+ ((f.nextTick = function (t) {
372
+ var e = new Array(arguments.length - 1);
373
+ if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
374
+ (d.push(new c(t, e)), 1 !== d.length || y || o(a));
375
+ }),
376
+ (c.prototype.run = function () {
377
+ this.fun.apply(null, this.array);
378
+ }),
379
+ (f.title = 'browser'),
380
+ (f.browser = !0),
381
+ (f.env = {}),
382
+ (f.argv = []),
383
+ (f.version = ''),
384
+ (f.versions = {}),
385
+ (f.on = u),
386
+ (f.addListener = u),
387
+ (f.once = u),
388
+ (f.off = u),
389
+ (f.removeListener = u),
390
+ (f.removeAllListeners = u),
391
+ (f.emit = u),
392
+ (f.prependListener = u),
393
+ (f.prependOnceListener = u),
394
+ (f.listeners = function (t) {
395
+ return [];
396
+ }),
397
+ (f.binding = function (t) {
398
+ throw new Error('process.binding is not supported');
399
+ }),
400
+ (f.cwd = function () {
401
+ return '/';
402
+ }),
403
+ (f.chdir = function (t) {
404
+ throw new Error('process.chdir is not supported');
405
+ }),
406
+ (f.umask = function () {
407
+ return 0;
408
+ }));
409
+ },
410
+ function (t, e, n) {
411
+ 'use strict';
412
+ function r(t) {
413
+ if (Array.isArray(t)) {
414
+ for (var e = 0, n = Array(t.length); e < t.length; e++) n[e] = t[e];
415
+ return n;
416
+ }
417
+ return Array.from(t);
418
+ }
419
+ function o(t) {
420
+ function e(t) {
421
+ for (var e = 0, n = 0; n < t.length; n++) ((e = (e << 5) - e + t.charCodeAt(n)), (e |= 0));
422
+ return o.colors[Math.abs(e) % o.colors.length];
423
+ }
424
+ function o(t) {
425
+ function n() {
426
+ for (var t = arguments.length, e = Array(t), i = 0; i < t; i++) e[i] = arguments[i];
427
+ if (n.enabled) {
428
+ var s = n,
429
+ a = Number(new Date()),
430
+ c = a - (r || a);
431
+ ((s.diff = c),
432
+ (s.prev = r),
433
+ (s.curr = a),
434
+ (r = a),
435
+ (e[0] = o.coerce(e[0])),
436
+ 'string' != typeof e[0] && e.unshift('%O'));
437
+ var u = 0;
438
+ ((e[0] = e[0].replace(/%([a-zA-Z%])/g, function (t, n) {
439
+ if ('%%' === t) return t;
440
+ u++;
441
+ var r = o.formatters[n];
442
+ if ('function' == typeof r) {
443
+ var i = e[u];
444
+ ((t = r.call(s, i)), e.splice(u, 1), u--);
445
+ }
446
+ return t;
447
+ })),
448
+ o.formatArgs.call(s, e));
449
+ var p = s.log || o.log;
450
+ p.apply(s, e);
451
+ }
452
+ }
453
+ var r = void 0;
454
+ return (
455
+ (n.namespace = t),
456
+ (n.enabled = o.enabled(t)),
457
+ (n.useColors = o.useColors()),
458
+ (n.color = e(t)),
459
+ (n.destroy = i),
460
+ (n.extend = s),
461
+ 'function' == typeof o.init && o.init(n),
462
+ o.instances.push(n),
463
+ n
464
+ );
465
+ }
466
+ function i() {
467
+ var t = o.instances.indexOf(this);
468
+ return t !== -1 && (o.instances.splice(t, 1), !0);
469
+ }
470
+ function s(t, e) {
471
+ var n = o(this.namespace + ('undefined' == typeof e ? ':' : e) + t);
472
+ return ((n.log = this.log), n);
473
+ }
474
+ function a(t) {
475
+ (o.save(t), (o.names = []), (o.skips = []));
476
+ var e = void 0,
477
+ n = ('string' == typeof t ? t : '').split(/[\s,]+/),
478
+ r = n.length;
479
+ for (e = 0; e < r; e++)
480
+ n[e] &&
481
+ ((t = n[e].replace(/\*/g, '.*?')),
482
+ '-' === t[0]
483
+ ? o.skips.push(new RegExp('^' + t.substr(1) + '$'))
484
+ : o.names.push(new RegExp('^' + t + '$')));
485
+ for (e = 0; e < o.instances.length; e++) {
486
+ var i = o.instances[e];
487
+ i.enabled = o.enabled(i.namespace);
488
+ }
489
+ }
490
+ function c() {
491
+ var t = []
492
+ .concat(
493
+ r(o.names.map(p)),
494
+ r(
495
+ o.skips.map(p).map(function (t) {
496
+ return '-' + t;
497
+ }),
498
+ ),
499
+ )
500
+ .join(',');
501
+ return (o.enable(''), t);
502
+ }
503
+ function u(t) {
504
+ if ('*' === t[t.length - 1]) return !0;
505
+ var e = void 0,
506
+ n = void 0;
507
+ for (e = 0, n = o.skips.length; e < n; e++) if (o.skips[e].test(t)) return !1;
508
+ for (e = 0, n = o.names.length; e < n; e++) if (o.names[e].test(t)) return !0;
509
+ return !1;
510
+ }
511
+ function p(t) {
512
+ return t
513
+ .toString()
514
+ .substring(2, t.toString().length - 2)
515
+ .replace(/\.\*\?$/, '*');
516
+ }
517
+ function h(t) {
518
+ return t instanceof Error ? t.stack || t.message : t;
519
+ }
520
+ return (
521
+ (o.debug = o),
522
+ (o['default'] = o),
523
+ (o.coerce = h),
524
+ (o.disable = c),
525
+ (o.enable = a),
526
+ (o.enabled = u),
527
+ (o.humanize = n(6)),
528
+ Object.keys(t).forEach(function (e) {
529
+ o[e] = t[e];
530
+ }),
531
+ (o.instances = []),
532
+ (o.names = []),
533
+ (o.skips = []),
534
+ (o.formatters = {}),
535
+ (o.selectColor = e),
536
+ o.enable(o.load()),
537
+ o
538
+ );
539
+ }
540
+ t.exports = o;
541
+ },
542
+ function (t, e) {
543
+ function n(t) {
544
+ if (((t = String(t)), !(t.length > 100))) {
545
+ var e =
546
+ /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
547
+ t,
548
+ );
549
+ if (e) {
550
+ var n = parseFloat(e[1]),
551
+ r = (e[2] || 'ms').toLowerCase();
552
+ switch (r) {
553
+ case 'years':
554
+ case 'year':
555
+ case 'yrs':
556
+ case 'yr':
557
+ case 'y':
558
+ return n * h;
559
+ case 'weeks':
560
+ case 'week':
561
+ case 'w':
562
+ return n * p;
563
+ case 'days':
564
+ case 'day':
565
+ case 'd':
566
+ return n * u;
567
+ case 'hours':
568
+ case 'hour':
569
+ case 'hrs':
570
+ case 'hr':
571
+ case 'h':
572
+ return n * c;
573
+ case 'minutes':
574
+ case 'minute':
575
+ case 'mins':
576
+ case 'min':
577
+ case 'm':
578
+ return n * a;
579
+ case 'seconds':
580
+ case 'second':
581
+ case 'secs':
582
+ case 'sec':
583
+ case 's':
584
+ return n * s;
585
+ case 'milliseconds':
586
+ case 'millisecond':
587
+ case 'msecs':
588
+ case 'msec':
589
+ case 'ms':
590
+ return n;
591
+ default:
592
+ return;
593
+ }
594
+ }
595
+ }
596
+ }
597
+ function r(t) {
598
+ var e = Math.abs(t);
599
+ return e >= u
600
+ ? Math.round(t / u) + 'd'
601
+ : e >= c
602
+ ? Math.round(t / c) + 'h'
603
+ : e >= a
604
+ ? Math.round(t / a) + 'm'
605
+ : e >= s
606
+ ? Math.round(t / s) + 's'
607
+ : t + 'ms';
608
+ }
609
+ function o(t) {
610
+ var e = Math.abs(t);
611
+ return e >= u
612
+ ? i(t, e, u, 'day')
613
+ : e >= c
614
+ ? i(t, e, c, 'hour')
615
+ : e >= a
616
+ ? i(t, e, a, 'minute')
617
+ : e >= s
618
+ ? i(t, e, s, 'second')
619
+ : t + ' ms';
620
+ }
621
+ function i(t, e, n, r) {
622
+ var o = e >= 1.5 * n;
623
+ return Math.round(t / n) + ' ' + r + (o ? 's' : '');
624
+ }
625
+ var s = 1e3,
626
+ a = 60 * s,
627
+ c = 60 * a,
628
+ u = 24 * c,
629
+ p = 7 * u,
630
+ h = 365.25 * u;
631
+ t.exports = function (t, e) {
632
+ e = e || {};
633
+ var i = typeof t;
634
+ if ('string' === i && t.length > 0) return n(t);
635
+ if ('number' === i && isFinite(t)) return e['long'] ? o(t) : r(t);
636
+ throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(t));
637
+ };
638
+ },
639
+ function (t, e, n) {
640
+ function r() {}
641
+ function o(t) {
642
+ var n = '' + t.type;
643
+ if (
644
+ ((e.BINARY_EVENT !== t.type && e.BINARY_ACK !== t.type) || (n += t.attachments + '-'),
645
+ t.nsp && '/' !== t.nsp && (n += t.nsp + ','),
646
+ null != t.id && (n += t.id),
647
+ null != t.data)
648
+ ) {
649
+ var r = i(t.data);
650
+ if (r === !1) return g;
651
+ n += r;
652
+ }
653
+ return (f('encoded %j as %s', t, n), n);
654
+ }
655
+ function i(t) {
656
+ try {
657
+ return JSON.stringify(t);
658
+ } catch (e) {
659
+ return !1;
660
+ }
661
+ }
662
+ function s(t, e) {
663
+ function n(t) {
664
+ var n = d.deconstructPacket(t),
665
+ r = o(n.packet),
666
+ i = n.buffers;
667
+ (i.unshift(r), e(i));
668
+ }
669
+ d.removeBlobs(t, n);
670
+ }
671
+ function a() {
672
+ this.reconstructor = null;
673
+ }
674
+ function c(t) {
675
+ var n = 0,
676
+ r = { type: Number(t.charAt(0)) };
677
+ if (null == e.types[r.type]) return h('unknown packet type ' + r.type);
678
+ if (e.BINARY_EVENT === r.type || e.BINARY_ACK === r.type) {
679
+ for (var o = ''; '-' !== t.charAt(++n) && ((o += t.charAt(n)), n != t.length); );
680
+ if (o != Number(o) || '-' !== t.charAt(n)) throw new Error('Illegal attachments');
681
+ r.attachments = Number(o);
682
+ }
683
+ if ('/' === t.charAt(n + 1))
684
+ for (r.nsp = ''; ++n; ) {
685
+ var i = t.charAt(n);
686
+ if (',' === i) break;
687
+ if (((r.nsp += i), n === t.length)) break;
688
+ }
689
+ else r.nsp = '/';
690
+ var s = t.charAt(n + 1);
691
+ if ('' !== s && Number(s) == s) {
692
+ for (r.id = ''; ++n; ) {
693
+ var i = t.charAt(n);
694
+ if (null == i || Number(i) != i) {
695
+ --n;
696
+ break;
697
+ }
698
+ if (((r.id += t.charAt(n)), n === t.length)) break;
699
+ }
700
+ r.id = Number(r.id);
701
+ }
702
+ if (t.charAt(++n)) {
703
+ var a = u(t.substr(n)),
704
+ c = a !== !1 && (r.type === e.ERROR || y(a));
705
+ if (!c) return h('invalid payload');
706
+ r.data = a;
707
+ }
708
+ return (f('decoded %s as %j', t, r), r);
709
+ }
710
+ function u(t) {
711
+ try {
712
+ return JSON.parse(t);
713
+ } catch (e) {
714
+ return !1;
715
+ }
716
+ }
717
+ function p(t) {
718
+ ((this.reconPack = t), (this.buffers = []));
719
+ }
720
+ function h(t) {
721
+ return { type: e.ERROR, data: 'parser error: ' + t };
722
+ }
723
+ var f = n(8)('socket.io-parser'),
724
+ l = n(11),
725
+ d = n(12),
726
+ y = n(13),
727
+ m = n(14);
728
+ ((e.protocol = 4),
729
+ (e.types = ['CONNECT', 'DISCONNECT', 'EVENT', 'ACK', 'ERROR', 'BINARY_EVENT', 'BINARY_ACK']),
730
+ (e.CONNECT = 0),
731
+ (e.DISCONNECT = 1),
732
+ (e.EVENT = 2),
733
+ (e.ACK = 3),
734
+ (e.ERROR = 4),
735
+ (e.BINARY_EVENT = 5),
736
+ (e.BINARY_ACK = 6),
737
+ (e.Encoder = r),
738
+ (e.Decoder = a));
739
+ var g = e.ERROR + '"encode error"';
740
+ ((r.prototype.encode = function (t, n) {
741
+ if ((f('encoding packet %j', t), e.BINARY_EVENT === t.type || e.BINARY_ACK === t.type)) s(t, n);
742
+ else {
743
+ var r = o(t);
744
+ n([r]);
745
+ }
746
+ }),
747
+ l(a.prototype),
748
+ (a.prototype.add = function (t) {
749
+ var n;
750
+ if ('string' == typeof t)
751
+ ((n = c(t)),
752
+ e.BINARY_EVENT === n.type || e.BINARY_ACK === n.type
753
+ ? ((this.reconstructor = new p(n)),
754
+ 0 === this.reconstructor.reconPack.attachments && this.emit('decoded', n))
755
+ : this.emit('decoded', n));
756
+ else {
757
+ if (!m(t) && !t.base64) throw new Error('Unknown type: ' + t);
758
+ if (!this.reconstructor) throw new Error('got binary data when not reconstructing a packet');
759
+ ((n = this.reconstructor.takeBinaryData(t)),
760
+ n && ((this.reconstructor = null), this.emit('decoded', n)));
761
+ }
762
+ }),
763
+ (a.prototype.destroy = function () {
764
+ this.reconstructor && this.reconstructor.finishedReconstruction();
765
+ }),
766
+ (p.prototype.takeBinaryData = function (t) {
767
+ if ((this.buffers.push(t), this.buffers.length === this.reconPack.attachments)) {
768
+ var e = d.reconstructPacket(this.reconPack, this.buffers);
769
+ return (this.finishedReconstruction(), e);
770
+ }
771
+ return null;
772
+ }),
773
+ (p.prototype.finishedReconstruction = function () {
774
+ ((this.reconPack = null), (this.buffers = []));
775
+ }));
776
+ },
777
+ function (t, e, n) {
778
+ (function (r) {
779
+ 'use strict';
780
+ function o() {
781
+ return (
782
+ !('undefined' == typeof window || !window.process || 'renderer' !== window.process.type) ||
783
+ (('undefined' == typeof navigator ||
784
+ !navigator.userAgent ||
785
+ !navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) &&
786
+ (('undefined' != typeof document &&
787
+ document.documentElement &&
788
+ document.documentElement.style &&
789
+ document.documentElement.style.WebkitAppearance) ||
790
+ ('undefined' != typeof window &&
791
+ window.console &&
792
+ (window.console.firebug || (window.console.exception && window.console.table))) ||
793
+ ('undefined' != typeof navigator &&
794
+ navigator.userAgent &&
795
+ navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) &&
796
+ parseInt(RegExp.$1, 10) >= 31) ||
797
+ ('undefined' != typeof navigator &&
798
+ navigator.userAgent &&
799
+ navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))))
800
+ );
801
+ }
802
+ function i(t) {
803
+ var n = this.useColors;
804
+ if (
805
+ ((t[0] =
806
+ (n ? '%c' : '') +
807
+ this.namespace +
808
+ (n ? ' %c' : ' ') +
809
+ t[0] +
810
+ (n ? '%c ' : ' ') +
811
+ '+' +
812
+ e.humanize(this.diff)),
813
+ n)
814
+ ) {
815
+ var r = 'color: ' + this.color;
816
+ t.splice(1, 0, r, 'color: inherit');
817
+ var o = 0,
818
+ i = 0;
819
+ (t[0].replace(/%[a-zA-Z%]/g, function (t) {
820
+ '%%' !== t && (o++, '%c' === t && (i = o));
821
+ }),
822
+ t.splice(i, 0, r));
823
+ }
824
+ }
825
+ function s() {
826
+ return (
827
+ 'object' === ('undefined' == typeof console ? 'undefined' : p(console)) &&
828
+ console.log &&
829
+ Function.prototype.apply.call(console.log, console, arguments)
830
+ );
831
+ }
832
+ function a(t) {
833
+ try {
834
+ null == t ? e.storage.removeItem('debug') : (e.storage.debug = t);
835
+ } catch (n) {}
836
+ }
837
+ function c() {
838
+ var t;
839
+ try {
840
+ t = e.storage.debug;
841
+ } catch (n) {}
842
+ return (!t && 'undefined' != typeof r && 'env' in r && (t = r.env.DEBUG), t);
843
+ }
844
+ function u() {
845
+ try {
846
+ return window.localStorage;
847
+ } catch (t) {}
848
+ }
849
+ var p =
850
+ 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
851
+ ? function (t) {
852
+ return typeof t;
853
+ }
854
+ : function (t) {
855
+ return t &&
856
+ 'function' == typeof Symbol &&
857
+ t.constructor === Symbol &&
858
+ t !== Symbol.prototype
859
+ ? 'symbol'
860
+ : typeof t;
861
+ };
862
+ ((e = t.exports = n(9)),
863
+ (e.log = s),
864
+ (e.formatArgs = i),
865
+ (e.save = a),
866
+ (e.load = c),
867
+ (e.useColors = o),
868
+ (e.storage =
869
+ 'undefined' != typeof chrome && 'undefined' != typeof chrome.storage
870
+ ? chrome.storage.local
871
+ : u()),
872
+ (e.colors = [
873
+ '#0000CC',
874
+ '#0000FF',
875
+ '#0033CC',
876
+ '#0033FF',
877
+ '#0066CC',
878
+ '#0066FF',
879
+ '#0099CC',
880
+ '#0099FF',
881
+ '#00CC00',
882
+ '#00CC33',
883
+ '#00CC66',
884
+ '#00CC99',
885
+ '#00CCCC',
886
+ '#00CCFF',
887
+ '#3300CC',
888
+ '#3300FF',
889
+ '#3333CC',
890
+ '#3333FF',
891
+ '#3366CC',
892
+ '#3366FF',
893
+ '#3399CC',
894
+ '#3399FF',
895
+ '#33CC00',
896
+ '#33CC33',
897
+ '#33CC66',
898
+ '#33CC99',
899
+ '#33CCCC',
900
+ '#33CCFF',
901
+ '#6600CC',
902
+ '#6600FF',
903
+ '#6633CC',
904
+ '#6633FF',
905
+ '#66CC00',
906
+ '#66CC33',
907
+ '#9900CC',
908
+ '#9900FF',
909
+ '#9933CC',
910
+ '#9933FF',
911
+ '#99CC00',
912
+ '#99CC33',
913
+ '#CC0000',
914
+ '#CC0033',
915
+ '#CC0066',
916
+ '#CC0099',
917
+ '#CC00CC',
918
+ '#CC00FF',
919
+ '#CC3300',
920
+ '#CC3333',
921
+ '#CC3366',
922
+ '#CC3399',
923
+ '#CC33CC',
924
+ '#CC33FF',
925
+ '#CC6600',
926
+ '#CC6633',
927
+ '#CC9900',
928
+ '#CC9933',
929
+ '#CCCC00',
930
+ '#CCCC33',
931
+ '#FF0000',
932
+ '#FF0033',
933
+ '#FF0066',
934
+ '#FF0099',
935
+ '#FF00CC',
936
+ '#FF00FF',
937
+ '#FF3300',
938
+ '#FF3333',
939
+ '#FF3366',
940
+ '#FF3399',
941
+ '#FF33CC',
942
+ '#FF33FF',
943
+ '#FF6600',
944
+ '#FF6633',
945
+ '#FF9900',
946
+ '#FF9933',
947
+ '#FFCC00',
948
+ '#FFCC33',
949
+ ]),
950
+ (e.formatters.j = function (t) {
951
+ try {
952
+ return JSON.stringify(t);
953
+ } catch (e) {
954
+ return '[UnexpectedJSONParseError]: ' + e.message;
955
+ }
956
+ }),
957
+ e.enable(c()));
958
+ }).call(e, n(4));
959
+ },
960
+ function (t, e, n) {
961
+ 'use strict';
962
+ function r(t) {
963
+ var n,
964
+ r = 0;
965
+ for (n in t) ((r = (r << 5) - r + t.charCodeAt(n)), (r |= 0));
966
+ return e.colors[Math.abs(r) % e.colors.length];
967
+ }
968
+ function o(t) {
969
+ function n() {
970
+ if (n.enabled) {
971
+ var t = n,
972
+ r = +new Date(),
973
+ i = r - (o || r);
974
+ ((t.diff = i), (t.prev = o), (t.curr = r), (o = r));
975
+ for (var s = new Array(arguments.length), a = 0; a < s.length; a++) s[a] = arguments[a];
976
+ ((s[0] = e.coerce(s[0])), 'string' != typeof s[0] && s.unshift('%O'));
977
+ var c = 0;
978
+ ((s[0] = s[0].replace(/%([a-zA-Z%])/g, function (n, r) {
979
+ if ('%%' === n) return n;
980
+ c++;
981
+ var o = e.formatters[r];
982
+ if ('function' == typeof o) {
983
+ var i = s[c];
984
+ ((n = o.call(t, i)), s.splice(c, 1), c--);
985
+ }
986
+ return n;
987
+ })),
988
+ e.formatArgs.call(t, s));
989
+ var u = n.log || e.log || console.log.bind(console);
990
+ u.apply(t, s);
991
+ }
992
+ }
993
+ var o;
994
+ return (
995
+ (n.namespace = t),
996
+ (n.enabled = e.enabled(t)),
997
+ (n.useColors = e.useColors()),
998
+ (n.color = r(t)),
999
+ (n.destroy = i),
1000
+ 'function' == typeof e.init && e.init(n),
1001
+ e.instances.push(n),
1002
+ n
1003
+ );
1004
+ }
1005
+ function i() {
1006
+ var t = e.instances.indexOf(this);
1007
+ return t !== -1 && (e.instances.splice(t, 1), !0);
1008
+ }
1009
+ function s(t) {
1010
+ (e.save(t), (e.names = []), (e.skips = []));
1011
+ var n,
1012
+ r = ('string' == typeof t ? t : '').split(/[\s,]+/),
1013
+ o = r.length;
1014
+ for (n = 0; n < o; n++)
1015
+ r[n] &&
1016
+ ((t = r[n].replace(/\*/g, '.*?')),
1017
+ '-' === t[0]
1018
+ ? e.skips.push(new RegExp('^' + t.substr(1) + '$'))
1019
+ : e.names.push(new RegExp('^' + t + '$')));
1020
+ for (n = 0; n < e.instances.length; n++) {
1021
+ var i = e.instances[n];
1022
+ i.enabled = e.enabled(i.namespace);
1023
+ }
1024
+ }
1025
+ function a() {
1026
+ e.enable('');
1027
+ }
1028
+ function c(t) {
1029
+ if ('*' === t[t.length - 1]) return !0;
1030
+ var n, r;
1031
+ for (n = 0, r = e.skips.length; n < r; n++) if (e.skips[n].test(t)) return !1;
1032
+ for (n = 0, r = e.names.length; n < r; n++) if (e.names[n].test(t)) return !0;
1033
+ return !1;
1034
+ }
1035
+ function u(t) {
1036
+ return t instanceof Error ? t.stack || t.message : t;
1037
+ }
1038
+ ((e = t.exports = o.debug = o['default'] = o),
1039
+ (e.coerce = u),
1040
+ (e.disable = a),
1041
+ (e.enable = s),
1042
+ (e.enabled = c),
1043
+ (e.humanize = n(10)),
1044
+ (e.instances = []),
1045
+ (e.names = []),
1046
+ (e.skips = []),
1047
+ (e.formatters = {}));
1048
+ },
1049
+ function (t, e) {
1050
+ function n(t) {
1051
+ if (((t = String(t)), !(t.length > 100))) {
1052
+ var e =
1053
+ /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
1054
+ t,
1055
+ );
1056
+ if (e) {
1057
+ var n = parseFloat(e[1]),
1058
+ r = (e[2] || 'ms').toLowerCase();
1059
+ switch (r) {
1060
+ case 'years':
1061
+ case 'year':
1062
+ case 'yrs':
1063
+ case 'yr':
1064
+ case 'y':
1065
+ return n * p;
1066
+ case 'days':
1067
+ case 'day':
1068
+ case 'd':
1069
+ return n * u;
1070
+ case 'hours':
1071
+ case 'hour':
1072
+ case 'hrs':
1073
+ case 'hr':
1074
+ case 'h':
1075
+ return n * c;
1076
+ case 'minutes':
1077
+ case 'minute':
1078
+ case 'mins':
1079
+ case 'min':
1080
+ case 'm':
1081
+ return n * a;
1082
+ case 'seconds':
1083
+ case 'second':
1084
+ case 'secs':
1085
+ case 'sec':
1086
+ case 's':
1087
+ return n * s;
1088
+ case 'milliseconds':
1089
+ case 'millisecond':
1090
+ case 'msecs':
1091
+ case 'msec':
1092
+ case 'ms':
1093
+ return n;
1094
+ default:
1095
+ return;
1096
+ }
1097
+ }
1098
+ }
1099
+ }
1100
+ function r(t) {
1101
+ return t >= u
1102
+ ? Math.round(t / u) + 'd'
1103
+ : t >= c
1104
+ ? Math.round(t / c) + 'h'
1105
+ : t >= a
1106
+ ? Math.round(t / a) + 'm'
1107
+ : t >= s
1108
+ ? Math.round(t / s) + 's'
1109
+ : t + 'ms';
1110
+ }
1111
+ function o(t) {
1112
+ return i(t, u, 'day') || i(t, c, 'hour') || i(t, a, 'minute') || i(t, s, 'second') || t + ' ms';
1113
+ }
1114
+ function i(t, e, n) {
1115
+ if (!(t < e)) return t < 1.5 * e ? Math.floor(t / e) + ' ' + n : Math.ceil(t / e) + ' ' + n + 's';
1116
+ }
1117
+ var s = 1e3,
1118
+ a = 60 * s,
1119
+ c = 60 * a,
1120
+ u = 24 * c,
1121
+ p = 365.25 * u;
1122
+ t.exports = function (t, e) {
1123
+ e = e || {};
1124
+ var i = typeof t;
1125
+ if ('string' === i && t.length > 0) return n(t);
1126
+ if ('number' === i && isNaN(t) === !1) return e['long'] ? o(t) : r(t);
1127
+ throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(t));
1128
+ };
1129
+ },
1130
+ function (t, e, n) {
1131
+ function r(t) {
1132
+ if (t) return o(t);
1133
+ }
1134
+ function o(t) {
1135
+ for (var e in r.prototype) t[e] = r.prototype[e];
1136
+ return t;
1137
+ }
1138
+ ((t.exports = r),
1139
+ (r.prototype.on = r.prototype.addEventListener =
1140
+ function (t, e) {
1141
+ return (
1142
+ (this._callbacks = this._callbacks || {}),
1143
+ (this._callbacks['$' + t] = this._callbacks['$' + t] || []).push(e),
1144
+ this
1145
+ );
1146
+ }),
1147
+ (r.prototype.once = function (t, e) {
1148
+ function n() {
1149
+ (this.off(t, n), e.apply(this, arguments));
1150
+ }
1151
+ return ((n.fn = e), this.on(t, n), this);
1152
+ }),
1153
+ (r.prototype.off =
1154
+ r.prototype.removeListener =
1155
+ r.prototype.removeAllListeners =
1156
+ r.prototype.removeEventListener =
1157
+ function (t, e) {
1158
+ if (((this._callbacks = this._callbacks || {}), 0 == arguments.length))
1159
+ return ((this._callbacks = {}), this);
1160
+ var n = this._callbacks['$' + t];
1161
+ if (!n) return this;
1162
+ if (1 == arguments.length) return (delete this._callbacks['$' + t], this);
1163
+ for (var r, o = 0; o < n.length; o++)
1164
+ if (((r = n[o]), r === e || r.fn === e)) {
1165
+ n.splice(o, 1);
1166
+ break;
1167
+ }
1168
+ return this;
1169
+ }),
1170
+ (r.prototype.emit = function (t) {
1171
+ this._callbacks = this._callbacks || {};
1172
+ var e = [].slice.call(arguments, 1),
1173
+ n = this._callbacks['$' + t];
1174
+ if (n) {
1175
+ n = n.slice(0);
1176
+ for (var r = 0, o = n.length; r < o; ++r) n[r].apply(this, e);
1177
+ }
1178
+ return this;
1179
+ }),
1180
+ (r.prototype.listeners = function (t) {
1181
+ return ((this._callbacks = this._callbacks || {}), this._callbacks['$' + t] || []);
1182
+ }),
1183
+ (r.prototype.hasListeners = function (t) {
1184
+ return !!this.listeners(t).length;
1185
+ }));
1186
+ },
1187
+ function (t, e, n) {
1188
+ function r(t, e) {
1189
+ if (!t) return t;
1190
+ if (s(t)) {
1191
+ var n = { _placeholder: !0, num: e.length };
1192
+ return (e.push(t), n);
1193
+ }
1194
+ if (i(t)) {
1195
+ for (var o = new Array(t.length), a = 0; a < t.length; a++) o[a] = r(t[a], e);
1196
+ return o;
1197
+ }
1198
+ if ('object' == typeof t && !(t instanceof Date)) {
1199
+ var o = {};
1200
+ for (var c in t) o[c] = r(t[c], e);
1201
+ return o;
1202
+ }
1203
+ return t;
1204
+ }
1205
+ function o(t, e) {
1206
+ if (!t) return t;
1207
+ if (t && t._placeholder) return e[t.num];
1208
+ if (i(t)) for (var n = 0; n < t.length; n++) t[n] = o(t[n], e);
1209
+ else if ('object' == typeof t) for (var r in t) t[r] = o(t[r], e);
1210
+ return t;
1211
+ }
1212
+ var i = n(13),
1213
+ s = n(14),
1214
+ a = Object.prototype.toString,
1215
+ c =
1216
+ 'function' == typeof Blob ||
1217
+ ('undefined' != typeof Blob && '[object BlobConstructor]' === a.call(Blob)),
1218
+ u =
1219
+ 'function' == typeof File ||
1220
+ ('undefined' != typeof File && '[object FileConstructor]' === a.call(File));
1221
+ ((e.deconstructPacket = function (t) {
1222
+ var e = [],
1223
+ n = t.data,
1224
+ o = t;
1225
+ return ((o.data = r(n, e)), (o.attachments = e.length), { packet: o, buffers: e });
1226
+ }),
1227
+ (e.reconstructPacket = function (t, e) {
1228
+ return ((t.data = o(t.data, e)), (t.attachments = void 0), t);
1229
+ }),
1230
+ (e.removeBlobs = function (t, e) {
1231
+ function n(t, a, p) {
1232
+ if (!t) return t;
1233
+ if ((c && t instanceof Blob) || (u && t instanceof File)) {
1234
+ r++;
1235
+ var h = new FileReader();
1236
+ ((h.onload = function () {
1237
+ (p ? (p[a] = this.result) : (o = this.result), --r || e(o));
1238
+ }),
1239
+ h.readAsArrayBuffer(t));
1240
+ } else if (i(t)) for (var f = 0; f < t.length; f++) n(t[f], f, t);
1241
+ else if ('object' == typeof t && !s(t)) for (var l in t) n(t[l], l, t);
1242
+ }
1243
+ var r = 0,
1244
+ o = t;
1245
+ (n(o), r || e(o));
1246
+ }));
1247
+ },
1248
+ function (t, e) {
1249
+ var n = {}.toString;
1250
+ t.exports =
1251
+ Array.isArray ||
1252
+ function (t) {
1253
+ return '[object Array]' == n.call(t);
1254
+ };
1255
+ },
1256
+ function (t, e) {
1257
+ function n(t) {
1258
+ return (r && Buffer.isBuffer(t)) || (o && (t instanceof ArrayBuffer || i(t)));
1259
+ }
1260
+ t.exports = n;
1261
+ var r = 'function' == typeof Buffer && 'function' == typeof Buffer.isBuffer,
1262
+ o = 'function' == typeof ArrayBuffer,
1263
+ i = function (t) {
1264
+ return 'function' == typeof ArrayBuffer.isView
1265
+ ? ArrayBuffer.isView(t)
1266
+ : t.buffer instanceof ArrayBuffer;
1267
+ };
1268
+ },
1269
+ function (t, e, n) {
1270
+ function r(t, e) {
1271
+ if (!(this instanceof r)) return new r(t, e);
1272
+ (t && 'object' == typeof t && ((e = t), (t = void 0)),
1273
+ (e = e || {}),
1274
+ (e.path = e.path || '/socket.io'),
1275
+ (this.nsps = {}),
1276
+ (this.subs = []),
1277
+ (this.opts = e),
1278
+ this.reconnection(e.reconnection !== !1),
1279
+ this.reconnectionAttempts(e.reconnectionAttempts || 1 / 0),
1280
+ this.reconnectionDelay(e.reconnectionDelay || 1e3),
1281
+ this.reconnectionDelayMax(e.reconnectionDelayMax || 5e3),
1282
+ this.randomizationFactor(e.randomizationFactor || 0.5),
1283
+ (this.backoff = new f({
1284
+ min: this.reconnectionDelay(),
1285
+ max: this.reconnectionDelayMax(),
1286
+ jitter: this.randomizationFactor(),
1287
+ })),
1288
+ this.timeout(null == e.timeout ? 2e4 : e.timeout),
1289
+ (this.readyState = 'closed'),
1290
+ (this.uri = t),
1291
+ (this.connecting = []),
1292
+ (this.lastPing = null),
1293
+ (this.encoding = !1),
1294
+ (this.packetBuffer = []));
1295
+ var n = e.parser || a;
1296
+ ((this.encoder = new n.Encoder()),
1297
+ (this.decoder = new n.Decoder()),
1298
+ (this.autoConnect = e.autoConnect !== !1),
1299
+ this.autoConnect && this.open());
1300
+ }
1301
+ var o = n(16),
1302
+ i = n(39),
1303
+ s = n(11),
1304
+ a = n(7),
1305
+ c = n(41),
1306
+ u = n(42),
1307
+ p = n(3)('socket.io-client:manager'),
1308
+ h = n(38),
1309
+ f = n(43),
1310
+ l = Object.prototype.hasOwnProperty;
1311
+ ((t.exports = r),
1312
+ (r.prototype.emitAll = function () {
1313
+ this.emit.apply(this, arguments);
1314
+ for (var t in this.nsps) l.call(this.nsps, t) && this.nsps[t].emit.apply(this.nsps[t], arguments);
1315
+ }),
1316
+ (r.prototype.updateSocketIds = function () {
1317
+ for (var t in this.nsps) l.call(this.nsps, t) && (this.nsps[t].id = this.generateId(t));
1318
+ }),
1319
+ (r.prototype.generateId = function (t) {
1320
+ return ('/' === t ? '' : t + '#') + this.engine.id;
1321
+ }),
1322
+ s(r.prototype),
1323
+ (r.prototype.reconnection = function (t) {
1324
+ return arguments.length ? ((this._reconnection = !!t), this) : this._reconnection;
1325
+ }),
1326
+ (r.prototype.reconnectionAttempts = function (t) {
1327
+ return arguments.length ? ((this._reconnectionAttempts = t), this) : this._reconnectionAttempts;
1328
+ }),
1329
+ (r.prototype.reconnectionDelay = function (t) {
1330
+ return arguments.length
1331
+ ? ((this._reconnectionDelay = t), this.backoff && this.backoff.setMin(t), this)
1332
+ : this._reconnectionDelay;
1333
+ }),
1334
+ (r.prototype.randomizationFactor = function (t) {
1335
+ return arguments.length
1336
+ ? ((this._randomizationFactor = t), this.backoff && this.backoff.setJitter(t), this)
1337
+ : this._randomizationFactor;
1338
+ }),
1339
+ (r.prototype.reconnectionDelayMax = function (t) {
1340
+ return arguments.length
1341
+ ? ((this._reconnectionDelayMax = t), this.backoff && this.backoff.setMax(t), this)
1342
+ : this._reconnectionDelayMax;
1343
+ }),
1344
+ (r.prototype.timeout = function (t) {
1345
+ return arguments.length ? ((this._timeout = t), this) : this._timeout;
1346
+ }),
1347
+ (r.prototype.maybeReconnectOnOpen = function () {
1348
+ !this.reconnecting && this._reconnection && 0 === this.backoff.attempts && this.reconnect();
1349
+ }),
1350
+ (r.prototype.open = r.prototype.connect =
1351
+ function (t, e) {
1352
+ if ((p('readyState %s', this.readyState), ~this.readyState.indexOf('open'))) return this;
1353
+ (p('opening %s', this.uri), (this.engine = o(this.uri, this.opts)));
1354
+ var n = this.engine,
1355
+ r = this;
1356
+ ((this.readyState = 'opening'), (this.skipReconnect = !1));
1357
+ var i = c(n, 'open', function () {
1358
+ (r.onopen(), t && t());
1359
+ }),
1360
+ s = c(n, 'error', function (e) {
1361
+ if (
1362
+ (p('connect_error'),
1363
+ r.cleanup(),
1364
+ (r.readyState = 'closed'),
1365
+ r.emitAll('connect_error', e),
1366
+ t)
1367
+ ) {
1368
+ var n = new Error('Connection error');
1369
+ ((n.data = e), t(n));
1370
+ } else r.maybeReconnectOnOpen();
1371
+ });
1372
+ if (!1 !== this._timeout) {
1373
+ var a = this._timeout;
1374
+ p('connect attempt will timeout after %d', a);
1375
+ var u = setTimeout(function () {
1376
+ (p('connect attempt timed out after %d', a),
1377
+ i.destroy(),
1378
+ n.close(),
1379
+ n.emit('error', 'timeout'),
1380
+ r.emitAll('connect_timeout', a));
1381
+ }, a);
1382
+ this.subs.push({
1383
+ destroy: function () {
1384
+ clearTimeout(u);
1385
+ },
1386
+ });
1387
+ }
1388
+ return (this.subs.push(i), this.subs.push(s), this);
1389
+ }),
1390
+ (r.prototype.onopen = function () {
1391
+ (p('open'), this.cleanup(), (this.readyState = 'open'), this.emit('open'));
1392
+ var t = this.engine;
1393
+ (this.subs.push(c(t, 'data', u(this, 'ondata'))),
1394
+ this.subs.push(c(t, 'ping', u(this, 'onping'))),
1395
+ this.subs.push(c(t, 'pong', u(this, 'onpong'))),
1396
+ this.subs.push(c(t, 'error', u(this, 'onerror'))),
1397
+ this.subs.push(c(t, 'close', u(this, 'onclose'))),
1398
+ this.subs.push(c(this.decoder, 'decoded', u(this, 'ondecoded'))));
1399
+ }),
1400
+ (r.prototype.onping = function () {
1401
+ ((this.lastPing = new Date()), this.emitAll('ping'));
1402
+ }),
1403
+ (r.prototype.onpong = function () {
1404
+ this.emitAll('pong', new Date() - this.lastPing);
1405
+ }),
1406
+ (r.prototype.ondata = function (t) {
1407
+ this.decoder.add(t);
1408
+ }),
1409
+ (r.prototype.ondecoded = function (t) {
1410
+ this.emit('packet', t);
1411
+ }),
1412
+ (r.prototype.onerror = function (t) {
1413
+ (p('error', t), this.emitAll('error', t));
1414
+ }),
1415
+ (r.prototype.socket = function (t, e) {
1416
+ function n() {
1417
+ ~h(o.connecting, r) || o.connecting.push(r);
1418
+ }
1419
+ var r = this.nsps[t];
1420
+ if (!r) {
1421
+ ((r = new i(this, t, e)), (this.nsps[t] = r));
1422
+ var o = this;
1423
+ (r.on('connecting', n),
1424
+ r.on('connect', function () {
1425
+ r.id = o.generateId(t);
1426
+ }),
1427
+ this.autoConnect && n());
1428
+ }
1429
+ return r;
1430
+ }),
1431
+ (r.prototype.destroy = function (t) {
1432
+ var e = h(this.connecting, t);
1433
+ (~e && this.connecting.splice(e, 1), this.connecting.length || this.close());
1434
+ }),
1435
+ (r.prototype.packet = function (t) {
1436
+ p('writing packet %j', t);
1437
+ var e = this;
1438
+ (t.query && 0 === t.type && (t.nsp += '?' + t.query),
1439
+ e.encoding
1440
+ ? e.packetBuffer.push(t)
1441
+ : ((e.encoding = !0),
1442
+ this.encoder.encode(t, function (n) {
1443
+ for (var r = 0; r < n.length; r++) e.engine.write(n[r], t.options);
1444
+ ((e.encoding = !1), e.processPacketQueue());
1445
+ })));
1446
+ }),
1447
+ (r.prototype.processPacketQueue = function () {
1448
+ if (this.packetBuffer.length > 0 && !this.encoding) {
1449
+ var t = this.packetBuffer.shift();
1450
+ this.packet(t);
1451
+ }
1452
+ }),
1453
+ (r.prototype.cleanup = function () {
1454
+ p('cleanup');
1455
+ for (var t = this.subs.length, e = 0; e < t; e++) {
1456
+ var n = this.subs.shift();
1457
+ n.destroy();
1458
+ }
1459
+ ((this.packetBuffer = []), (this.encoding = !1), (this.lastPing = null), this.decoder.destroy());
1460
+ }),
1461
+ (r.prototype.close = r.prototype.disconnect =
1462
+ function () {
1463
+ (p('disconnect'),
1464
+ (this.skipReconnect = !0),
1465
+ (this.reconnecting = !1),
1466
+ 'opening' === this.readyState && this.cleanup(),
1467
+ this.backoff.reset(),
1468
+ (this.readyState = 'closed'),
1469
+ this.engine && this.engine.close());
1470
+ }),
1471
+ (r.prototype.onclose = function (t) {
1472
+ (p('onclose'),
1473
+ this.cleanup(),
1474
+ this.backoff.reset(),
1475
+ (this.readyState = 'closed'),
1476
+ this.emit('close', t),
1477
+ this._reconnection && !this.skipReconnect && this.reconnect());
1478
+ }),
1479
+ (r.prototype.reconnect = function () {
1480
+ if (this.reconnecting || this.skipReconnect) return this;
1481
+ var t = this;
1482
+ if (this.backoff.attempts >= this._reconnectionAttempts)
1483
+ (p('reconnect failed'),
1484
+ this.backoff.reset(),
1485
+ this.emitAll('reconnect_failed'),
1486
+ (this.reconnecting = !1));
1487
+ else {
1488
+ var e = this.backoff.duration();
1489
+ (p('will wait %dms before reconnect attempt', e), (this.reconnecting = !0));
1490
+ var n = setTimeout(function () {
1491
+ t.skipReconnect ||
1492
+ (p('attempting reconnect'),
1493
+ t.emitAll('reconnect_attempt', t.backoff.attempts),
1494
+ t.emitAll('reconnecting', t.backoff.attempts),
1495
+ t.skipReconnect ||
1496
+ t.open(function (e) {
1497
+ e
1498
+ ? (p('reconnect attempt error'),
1499
+ (t.reconnecting = !1),
1500
+ t.reconnect(),
1501
+ t.emitAll('reconnect_error', e.data))
1502
+ : (p('reconnect success'), t.onreconnect());
1503
+ }));
1504
+ }, e);
1505
+ this.subs.push({
1506
+ destroy: function () {
1507
+ clearTimeout(n);
1508
+ },
1509
+ });
1510
+ }
1511
+ }),
1512
+ (r.prototype.onreconnect = function () {
1513
+ var t = this.backoff.attempts;
1514
+ ((this.reconnecting = !1),
1515
+ this.backoff.reset(),
1516
+ this.updateSocketIds(),
1517
+ this.emitAll('reconnect', t));
1518
+ }));
1519
+ },
1520
+ function (t, e, n) {
1521
+ ((t.exports = n(17)), (t.exports.parser = n(24)));
1522
+ },
1523
+ function (t, e, n) {
1524
+ function r(t, e) {
1525
+ return this instanceof r
1526
+ ? ((e = e || {}),
1527
+ t && 'object' == typeof t && ((e = t), (t = null)),
1528
+ t
1529
+ ? ((t = p(t)),
1530
+ (e.hostname = t.host),
1531
+ (e.secure = 'https' === t.protocol || 'wss' === t.protocol),
1532
+ (e.port = t.port),
1533
+ t.query && (e.query = t.query))
1534
+ : e.host && (e.hostname = p(e.host).host),
1535
+ (this.secure =
1536
+ null != e.secure
1537
+ ? e.secure
1538
+ : 'undefined' != typeof location && 'https:' === location.protocol),
1539
+ e.hostname && !e.port && (e.port = this.secure ? '443' : '80'),
1540
+ (this.agent = e.agent || !1),
1541
+ (this.hostname =
1542
+ e.hostname || ('undefined' != typeof location ? location.hostname : 'localhost')),
1543
+ (this.port =
1544
+ e.port ||
1545
+ ('undefined' != typeof location && location.port ? location.port : this.secure ? 443 : 80)),
1546
+ (this.query = e.query || {}),
1547
+ 'string' == typeof this.query && (this.query = h.decode(this.query)),
1548
+ (this.upgrade = !1 !== e.upgrade),
1549
+ (this.path = (e.path || '/engine.io').replace(/\/$/, '') + '/'),
1550
+ (this.forceJSONP = !!e.forceJSONP),
1551
+ (this.jsonp = !1 !== e.jsonp),
1552
+ (this.forceBase64 = !!e.forceBase64),
1553
+ (this.enablesXDR = !!e.enablesXDR),
1554
+ (this.withCredentials = !1 !== e.withCredentials),
1555
+ (this.timestampParam = e.timestampParam || 't'),
1556
+ (this.timestampRequests = e.timestampRequests),
1557
+ (this.transports = e.transports || ['polling', 'websocket']),
1558
+ (this.transportOptions = e.transportOptions || {}),
1559
+ (this.readyState = ''),
1560
+ (this.writeBuffer = []),
1561
+ (this.prevBufferLen = 0),
1562
+ (this.policyPort = e.policyPort || 843),
1563
+ (this.rememberUpgrade = e.rememberUpgrade || !1),
1564
+ (this.binaryType = null),
1565
+ (this.onlyBinaryUpgrades = e.onlyBinaryUpgrades),
1566
+ (this.perMessageDeflate = !1 !== e.perMessageDeflate && (e.perMessageDeflate || {})),
1567
+ !0 === this.perMessageDeflate && (this.perMessageDeflate = {}),
1568
+ this.perMessageDeflate &&
1569
+ null == this.perMessageDeflate.threshold &&
1570
+ (this.perMessageDeflate.threshold = 1024),
1571
+ (this.pfx = e.pfx || null),
1572
+ (this.key = e.key || null),
1573
+ (this.passphrase = e.passphrase || null),
1574
+ (this.cert = e.cert || null),
1575
+ (this.ca = e.ca || null),
1576
+ (this.ciphers = e.ciphers || null),
1577
+ (this.rejectUnauthorized = void 0 === e.rejectUnauthorized || e.rejectUnauthorized),
1578
+ (this.forceNode = !!e.forceNode),
1579
+ (this.isReactNative =
1580
+ 'undefined' != typeof navigator &&
1581
+ 'string' == typeof navigator.product &&
1582
+ 'reactnative' === navigator.product.toLowerCase()),
1583
+ ('undefined' == typeof self || this.isReactNative) &&
1584
+ (e.extraHeaders &&
1585
+ Object.keys(e.extraHeaders).length > 0 &&
1586
+ (this.extraHeaders = e.extraHeaders),
1587
+ e.localAddress && (this.localAddress = e.localAddress)),
1588
+ (this.id = null),
1589
+ (this.upgrades = null),
1590
+ (this.pingInterval = null),
1591
+ (this.pingTimeout = null),
1592
+ (this.pingIntervalTimer = null),
1593
+ (this.pingTimeoutTimer = null),
1594
+ void this.open())
1595
+ : new r(t, e);
1596
+ }
1597
+ function o(t) {
1598
+ var e = {};
1599
+ for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
1600
+ return e;
1601
+ }
1602
+ var i = n(18),
1603
+ s = n(11),
1604
+ a = n(3)('engine.io-client:socket'),
1605
+ c = n(38),
1606
+ u = n(24),
1607
+ p = n(2),
1608
+ h = n(32);
1609
+ ((t.exports = r),
1610
+ (r.priorWebsocketSuccess = !1),
1611
+ s(r.prototype),
1612
+ (r.protocol = u.protocol),
1613
+ (r.Socket = r),
1614
+ (r.Transport = n(23)),
1615
+ (r.transports = n(18)),
1616
+ (r.parser = n(24)),
1617
+ (r.prototype.createTransport = function (t) {
1618
+ a('creating transport "%s"', t);
1619
+ var e = o(this.query);
1620
+ ((e.EIO = u.protocol), (e.transport = t));
1621
+ var n = this.transportOptions[t] || {};
1622
+ this.id && (e.sid = this.id);
1623
+ var r = new i[t]({
1624
+ query: e,
1625
+ socket: this,
1626
+ agent: n.agent || this.agent,
1627
+ hostname: n.hostname || this.hostname,
1628
+ port: n.port || this.port,
1629
+ secure: n.secure || this.secure,
1630
+ path: n.path || this.path,
1631
+ forceJSONP: n.forceJSONP || this.forceJSONP,
1632
+ jsonp: n.jsonp || this.jsonp,
1633
+ forceBase64: n.forceBase64 || this.forceBase64,
1634
+ enablesXDR: n.enablesXDR || this.enablesXDR,
1635
+ withCredentials: n.withCredentials || this.withCredentials,
1636
+ timestampRequests: n.timestampRequests || this.timestampRequests,
1637
+ timestampParam: n.timestampParam || this.timestampParam,
1638
+ policyPort: n.policyPort || this.policyPort,
1639
+ pfx: n.pfx || this.pfx,
1640
+ key: n.key || this.key,
1641
+ passphrase: n.passphrase || this.passphrase,
1642
+ cert: n.cert || this.cert,
1643
+ ca: n.ca || this.ca,
1644
+ ciphers: n.ciphers || this.ciphers,
1645
+ rejectUnauthorized: n.rejectUnauthorized || this.rejectUnauthorized,
1646
+ perMessageDeflate: n.perMessageDeflate || this.perMessageDeflate,
1647
+ extraHeaders: n.extraHeaders || this.extraHeaders,
1648
+ forceNode: n.forceNode || this.forceNode,
1649
+ localAddress: n.localAddress || this.localAddress,
1650
+ requestTimeout: n.requestTimeout || this.requestTimeout,
1651
+ protocols: n.protocols || void 0,
1652
+ isReactNative: this.isReactNative,
1653
+ });
1654
+ return r;
1655
+ }),
1656
+ (r.prototype.open = function () {
1657
+ var t;
1658
+ if (this.rememberUpgrade && r.priorWebsocketSuccess && this.transports.indexOf('websocket') !== -1)
1659
+ t = 'websocket';
1660
+ else {
1661
+ if (0 === this.transports.length) {
1662
+ var e = this;
1663
+ return void setTimeout(function () {
1664
+ e.emit('error', 'No transports available');
1665
+ }, 0);
1666
+ }
1667
+ t = this.transports[0];
1668
+ }
1669
+ this.readyState = 'opening';
1670
+ try {
1671
+ t = this.createTransport(t);
1672
+ } catch (n) {
1673
+ return (this.transports.shift(), void this.open());
1674
+ }
1675
+ (t.open(), this.setTransport(t));
1676
+ }),
1677
+ (r.prototype.setTransport = function (t) {
1678
+ a('setting transport %s', t.name);
1679
+ var e = this;
1680
+ (this.transport &&
1681
+ (a('clearing existing transport %s', this.transport.name), this.transport.removeAllListeners()),
1682
+ (this.transport = t),
1683
+ t
1684
+ .on('drain', function () {
1685
+ e.onDrain();
1686
+ })
1687
+ .on('packet', function (t) {
1688
+ e.onPacket(t);
1689
+ })
1690
+ .on('error', function (t) {
1691
+ e.onError(t);
1692
+ })
1693
+ .on('close', function () {
1694
+ e.onClose('transport close');
1695
+ }));
1696
+ }),
1697
+ (r.prototype.probe = function (t) {
1698
+ function e() {
1699
+ if (f.onlyBinaryUpgrades) {
1700
+ var e = !this.supportsBinary && f.transport.supportsBinary;
1701
+ h = h || e;
1702
+ }
1703
+ h ||
1704
+ (a('probe transport "%s" opened', t),
1705
+ p.send([{ type: 'ping', data: 'probe' }]),
1706
+ p.once('packet', function (e) {
1707
+ if (!h)
1708
+ if ('pong' === e.type && 'probe' === e.data) {
1709
+ if (
1710
+ (a('probe transport "%s" pong', t),
1711
+ (f.upgrading = !0),
1712
+ f.emit('upgrading', p),
1713
+ !p)
1714
+ )
1715
+ return;
1716
+ ((r.priorWebsocketSuccess = 'websocket' === p.name),
1717
+ a('pausing current transport "%s"', f.transport.name),
1718
+ f.transport.pause(function () {
1719
+ h ||
1720
+ ('closed' !== f.readyState &&
1721
+ (a('changing transport and sending upgrade packet'),
1722
+ u(),
1723
+ f.setTransport(p),
1724
+ p.send([{ type: 'upgrade' }]),
1725
+ f.emit('upgrade', p),
1726
+ (p = null),
1727
+ (f.upgrading = !1),
1728
+ f.flush()));
1729
+ }));
1730
+ } else {
1731
+ a('probe transport "%s" failed', t);
1732
+ var n = new Error('probe error');
1733
+ ((n.transport = p.name), f.emit('upgradeError', n));
1734
+ }
1735
+ }));
1736
+ }
1737
+ function n() {
1738
+ h || ((h = !0), u(), p.close(), (p = null));
1739
+ }
1740
+ function o(e) {
1741
+ var r = new Error('probe error: ' + e);
1742
+ ((r.transport = p.name),
1743
+ n(),
1744
+ a('probe transport "%s" failed because of error: %s', t, e),
1745
+ f.emit('upgradeError', r));
1746
+ }
1747
+ function i() {
1748
+ o('transport closed');
1749
+ }
1750
+ function s() {
1751
+ o('socket closed');
1752
+ }
1753
+ function c(t) {
1754
+ p && t.name !== p.name && (a('"%s" works - aborting "%s"', t.name, p.name), n());
1755
+ }
1756
+ function u() {
1757
+ (p.removeListener('open', e),
1758
+ p.removeListener('error', o),
1759
+ p.removeListener('close', i),
1760
+ f.removeListener('close', s),
1761
+ f.removeListener('upgrading', c));
1762
+ }
1763
+ a('probing transport "%s"', t);
1764
+ var p = this.createTransport(t, { probe: 1 }),
1765
+ h = !1,
1766
+ f = this;
1767
+ ((r.priorWebsocketSuccess = !1),
1768
+ p.once('open', e),
1769
+ p.once('error', o),
1770
+ p.once('close', i),
1771
+ this.once('close', s),
1772
+ this.once('upgrading', c),
1773
+ p.open());
1774
+ }),
1775
+ (r.prototype.onOpen = function () {
1776
+ if (
1777
+ (a('socket open'),
1778
+ (this.readyState = 'open'),
1779
+ (r.priorWebsocketSuccess = 'websocket' === this.transport.name),
1780
+ this.emit('open'),
1781
+ this.flush(),
1782
+ 'open' === this.readyState && this.upgrade && this.transport.pause)
1783
+ ) {
1784
+ a('starting upgrade probes');
1785
+ for (var t = 0, e = this.upgrades.length; t < e; t++) this.probe(this.upgrades[t]);
1786
+ }
1787
+ }),
1788
+ (r.prototype.onPacket = function (t) {
1789
+ if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState)
1790
+ switch (
1791
+ (a('socket receive: type "%s", data "%s"', t.type, t.data),
1792
+ this.emit('packet', t),
1793
+ this.emit('heartbeat'),
1794
+ t.type)
1795
+ ) {
1796
+ case 'open':
1797
+ this.onHandshake(JSON.parse(t.data));
1798
+ break;
1799
+ case 'pong':
1800
+ (this.setPing(), this.emit('pong'));
1801
+ break;
1802
+ case 'error':
1803
+ var e = new Error('server error');
1804
+ ((e.code = t.data), this.onError(e));
1805
+ break;
1806
+ case 'message':
1807
+ (this.emit('data', t.data), this.emit('message', t.data));
1808
+ }
1809
+ else a('packet received with socket readyState "%s"', this.readyState);
1810
+ }),
1811
+ (r.prototype.onHandshake = function (t) {
1812
+ (this.emit('handshake', t),
1813
+ (this.id = t.sid),
1814
+ (this.transport.query.sid = t.sid),
1815
+ (this.upgrades = this.filterUpgrades(t.upgrades)),
1816
+ (this.pingInterval = t.pingInterval),
1817
+ (this.pingTimeout = t.pingTimeout),
1818
+ this.onOpen(),
1819
+ 'closed' !== this.readyState &&
1820
+ (this.setPing(),
1821
+ this.removeListener('heartbeat', this.onHeartbeat),
1822
+ this.on('heartbeat', this.onHeartbeat)));
1823
+ }),
1824
+ (r.prototype.onHeartbeat = function (t) {
1825
+ clearTimeout(this.pingTimeoutTimer);
1826
+ var e = this;
1827
+ e.pingTimeoutTimer = setTimeout(
1828
+ function () {
1829
+ 'closed' !== e.readyState && e.onClose('ping timeout');
1830
+ },
1831
+ t || e.pingInterval + e.pingTimeout,
1832
+ );
1833
+ }),
1834
+ (r.prototype.setPing = function () {
1835
+ var t = this;
1836
+ (clearTimeout(t.pingIntervalTimer),
1837
+ (t.pingIntervalTimer = setTimeout(function () {
1838
+ (a('writing ping packet - expecting pong within %sms', t.pingTimeout),
1839
+ t.ping(),
1840
+ t.onHeartbeat(t.pingTimeout));
1841
+ }, t.pingInterval)));
1842
+ }),
1843
+ (r.prototype.ping = function () {
1844
+ var t = this;
1845
+ this.sendPacket('ping', function () {
1846
+ t.emit('ping');
1847
+ });
1848
+ }),
1849
+ (r.prototype.onDrain = function () {
1850
+ (this.writeBuffer.splice(0, this.prevBufferLen),
1851
+ (this.prevBufferLen = 0),
1852
+ 0 === this.writeBuffer.length ? this.emit('drain') : this.flush());
1853
+ }),
1854
+ (r.prototype.flush = function () {
1855
+ 'closed' !== this.readyState &&
1856
+ this.transport.writable &&
1857
+ !this.upgrading &&
1858
+ this.writeBuffer.length &&
1859
+ (a('flushing %d packets in socket', this.writeBuffer.length),
1860
+ this.transport.send(this.writeBuffer),
1861
+ (this.prevBufferLen = this.writeBuffer.length),
1862
+ this.emit('flush'));
1863
+ }),
1864
+ (r.prototype.write = r.prototype.send =
1865
+ function (t, e, n) {
1866
+ return (this.sendPacket('message', t, e, n), this);
1867
+ }),
1868
+ (r.prototype.sendPacket = function (t, e, n, r) {
1869
+ if (
1870
+ ('function' == typeof e && ((r = e), (e = void 0)),
1871
+ 'function' == typeof n && ((r = n), (n = null)),
1872
+ 'closing' !== this.readyState && 'closed' !== this.readyState)
1873
+ ) {
1874
+ ((n = n || {}), (n.compress = !1 !== n.compress));
1875
+ var o = { type: t, data: e, options: n };
1876
+ (this.emit('packetCreate', o),
1877
+ this.writeBuffer.push(o),
1878
+ r && this.once('flush', r),
1879
+ this.flush());
1880
+ }
1881
+ }),
1882
+ (r.prototype.close = function () {
1883
+ function t() {
1884
+ (r.onClose('forced close'),
1885
+ a('socket closing - telling transport to close'),
1886
+ r.transport.close());
1887
+ }
1888
+ function e() {
1889
+ (r.removeListener('upgrade', e), r.removeListener('upgradeError', e), t());
1890
+ }
1891
+ function n() {
1892
+ (r.once('upgrade', e), r.once('upgradeError', e));
1893
+ }
1894
+ if ('opening' === this.readyState || 'open' === this.readyState) {
1895
+ this.readyState = 'closing';
1896
+ var r = this;
1897
+ this.writeBuffer.length
1898
+ ? this.once('drain', function () {
1899
+ this.upgrading ? n() : t();
1900
+ })
1901
+ : this.upgrading
1902
+ ? n()
1903
+ : t();
1904
+ }
1905
+ return this;
1906
+ }),
1907
+ (r.prototype.onError = function (t) {
1908
+ (a('socket error %j', t),
1909
+ (r.priorWebsocketSuccess = !1),
1910
+ this.emit('error', t),
1911
+ this.onClose('transport error', t));
1912
+ }),
1913
+ (r.prototype.onClose = function (t, e) {
1914
+ if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) {
1915
+ a('socket close with reason: "%s"', t);
1916
+ var n = this;
1917
+ (clearTimeout(this.pingIntervalTimer),
1918
+ clearTimeout(this.pingTimeoutTimer),
1919
+ this.transport.removeAllListeners('close'),
1920
+ this.transport.close(),
1921
+ this.transport.removeAllListeners(),
1922
+ (this.readyState = 'closed'),
1923
+ (this.id = null),
1924
+ this.emit('close', t, e),
1925
+ (n.writeBuffer = []),
1926
+ (n.prevBufferLen = 0));
1927
+ }
1928
+ }),
1929
+ (r.prototype.filterUpgrades = function (t) {
1930
+ for (var e = [], n = 0, r = t.length; n < r; n++) ~c(this.transports, t[n]) && e.push(t[n]);
1931
+ return e;
1932
+ }));
1933
+ },
1934
+ function (t, e, n) {
1935
+ function r(t) {
1936
+ var e,
1937
+ n = !1,
1938
+ r = !1,
1939
+ a = !1 !== t.jsonp;
1940
+ if ('undefined' != typeof location) {
1941
+ var c = 'https:' === location.protocol,
1942
+ u = location.port;
1943
+ (u || (u = c ? 443 : 80),
1944
+ (n = t.hostname !== location.hostname || u !== t.port),
1945
+ (r = t.secure !== c));
1946
+ }
1947
+ if (((t.xdomain = n), (t.xscheme = r), (e = new o(t)), 'open' in e && !t.forceJSONP)) return new i(t);
1948
+ if (!a) throw new Error('JSONP disabled');
1949
+ return new s(t);
1950
+ }
1951
+ var o = n(19),
1952
+ i = n(21),
1953
+ s = n(35),
1954
+ a = n(36);
1955
+ ((e.polling = r), (e.websocket = a));
1956
+ },
1957
+ function (t, e, n) {
1958
+ var r = n(20);
1959
+ t.exports = function (t) {
1960
+ var e = t.xdomain,
1961
+ n = t.xscheme,
1962
+ o = t.enablesXDR;
1963
+ try {
1964
+ if ('undefined' != typeof XMLHttpRequest && (!e || r)) return new XMLHttpRequest();
1965
+ } catch (i) {}
1966
+ try {
1967
+ if ('undefined' != typeof XDomainRequest && !n && o) return new XDomainRequest();
1968
+ } catch (i) {}
1969
+ if (!e)
1970
+ try {
1971
+ return new self[['Active'].concat('Object').join('X')]('Microsoft.XMLHTTP');
1972
+ } catch (i) {}
1973
+ };
1974
+ },
1975
+ function (t, e) {
1976
+ try {
1977
+ t.exports = 'undefined' != typeof XMLHttpRequest && 'withCredentials' in new XMLHttpRequest();
1978
+ } catch (n) {
1979
+ t.exports = !1;
1980
+ }
1981
+ },
1982
+ function (t, e, n) {
1983
+ function r() {}
1984
+ function o(t) {
1985
+ if (
1986
+ (c.call(this, t),
1987
+ (this.requestTimeout = t.requestTimeout),
1988
+ (this.extraHeaders = t.extraHeaders),
1989
+ 'undefined' != typeof location)
1990
+ ) {
1991
+ var e = 'https:' === location.protocol,
1992
+ n = location.port;
1993
+ (n || (n = e ? 443 : 80),
1994
+ (this.xd =
1995
+ ('undefined' != typeof location && t.hostname !== location.hostname) || n !== t.port),
1996
+ (this.xs = t.secure !== e));
1997
+ }
1998
+ }
1999
+ function i(t) {
2000
+ ((this.method = t.method || 'GET'),
2001
+ (this.uri = t.uri),
2002
+ (this.xd = !!t.xd),
2003
+ (this.xs = !!t.xs),
2004
+ (this.async = !1 !== t.async),
2005
+ (this.data = void 0 !== t.data ? t.data : null),
2006
+ (this.agent = t.agent),
2007
+ (this.isBinary = t.isBinary),
2008
+ (this.supportsBinary = t.supportsBinary),
2009
+ (this.enablesXDR = t.enablesXDR),
2010
+ (this.withCredentials = t.withCredentials),
2011
+ (this.requestTimeout = t.requestTimeout),
2012
+ (this.pfx = t.pfx),
2013
+ (this.key = t.key),
2014
+ (this.passphrase = t.passphrase),
2015
+ (this.cert = t.cert),
2016
+ (this.ca = t.ca),
2017
+ (this.ciphers = t.ciphers),
2018
+ (this.rejectUnauthorized = t.rejectUnauthorized),
2019
+ (this.extraHeaders = t.extraHeaders),
2020
+ this.create());
2021
+ }
2022
+ function s() {
2023
+ for (var t in i.requests) i.requests.hasOwnProperty(t) && i.requests[t].abort();
2024
+ }
2025
+ var a = n(19),
2026
+ c = n(22),
2027
+ u = n(11),
2028
+ p = n(33),
2029
+ h = n(3)('engine.io-client:polling-xhr');
2030
+ if (
2031
+ ((t.exports = o),
2032
+ (t.exports.Request = i),
2033
+ p(o, c),
2034
+ (o.prototype.supportsBinary = !0),
2035
+ (o.prototype.request = function (t) {
2036
+ return (
2037
+ (t = t || {}),
2038
+ (t.uri = this.uri()),
2039
+ (t.xd = this.xd),
2040
+ (t.xs = this.xs),
2041
+ (t.agent = this.agent || !1),
2042
+ (t.supportsBinary = this.supportsBinary),
2043
+ (t.enablesXDR = this.enablesXDR),
2044
+ (t.withCredentials = this.withCredentials),
2045
+ (t.pfx = this.pfx),
2046
+ (t.key = this.key),
2047
+ (t.passphrase = this.passphrase),
2048
+ (t.cert = this.cert),
2049
+ (t.ca = this.ca),
2050
+ (t.ciphers = this.ciphers),
2051
+ (t.rejectUnauthorized = this.rejectUnauthorized),
2052
+ (t.requestTimeout = this.requestTimeout),
2053
+ (t.extraHeaders = this.extraHeaders),
2054
+ new i(t)
2055
+ );
2056
+ }),
2057
+ (o.prototype.doWrite = function (t, e) {
2058
+ var n = 'string' != typeof t && void 0 !== t,
2059
+ r = this.request({ method: 'POST', data: t, isBinary: n }),
2060
+ o = this;
2061
+ (r.on('success', e),
2062
+ r.on('error', function (t) {
2063
+ o.onError('xhr post error', t);
2064
+ }),
2065
+ (this.sendXhr = r));
2066
+ }),
2067
+ (o.prototype.doPoll = function () {
2068
+ h('xhr poll');
2069
+ var t = this.request(),
2070
+ e = this;
2071
+ (t.on('data', function (t) {
2072
+ e.onData(t);
2073
+ }),
2074
+ t.on('error', function (t) {
2075
+ e.onError('xhr poll error', t);
2076
+ }),
2077
+ (this.pollXhr = t));
2078
+ }),
2079
+ u(i.prototype),
2080
+ (i.prototype.create = function () {
2081
+ var t = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
2082
+ ((t.pfx = this.pfx),
2083
+ (t.key = this.key),
2084
+ (t.passphrase = this.passphrase),
2085
+ (t.cert = this.cert),
2086
+ (t.ca = this.ca),
2087
+ (t.ciphers = this.ciphers),
2088
+ (t.rejectUnauthorized = this.rejectUnauthorized));
2089
+ var e = (this.xhr = new a(t)),
2090
+ n = this;
2091
+ try {
2092
+ (h('xhr open %s: %s', this.method, this.uri), e.open(this.method, this.uri, this.async));
2093
+ try {
2094
+ if (this.extraHeaders) {
2095
+ e.setDisableHeaderCheck && e.setDisableHeaderCheck(!0);
2096
+ for (var r in this.extraHeaders)
2097
+ this.extraHeaders.hasOwnProperty(r) && e.setRequestHeader(r, this.extraHeaders[r]);
2098
+ }
2099
+ } catch (o) {}
2100
+ if ('POST' === this.method)
2101
+ try {
2102
+ this.isBinary
2103
+ ? e.setRequestHeader('Content-type', 'application/octet-stream')
2104
+ : e.setRequestHeader('Content-type', 'text/plain;charset=UTF-8');
2105
+ } catch (o) {}
2106
+ try {
2107
+ e.setRequestHeader('Accept', '*/*');
2108
+ } catch (o) {}
2109
+ ('withCredentials' in e && (e.withCredentials = this.withCredentials),
2110
+ this.requestTimeout && (e.timeout = this.requestTimeout),
2111
+ this.hasXDR()
2112
+ ? ((e.onload = function () {
2113
+ n.onLoad();
2114
+ }),
2115
+ (e.onerror = function () {
2116
+ n.onError(e.responseText);
2117
+ }))
2118
+ : (e.onreadystatechange = function () {
2119
+ if (2 === e.readyState)
2120
+ try {
2121
+ var t = e.getResponseHeader('Content-Type');
2122
+ ((n.supportsBinary && 'application/octet-stream' === t) ||
2123
+ 'application/octet-stream; charset=UTF-8' === t) &&
2124
+ (e.responseType = 'arraybuffer');
2125
+ } catch (r) {}
2126
+ 4 === e.readyState &&
2127
+ (200 === e.status || 1223 === e.status
2128
+ ? n.onLoad()
2129
+ : setTimeout(function () {
2130
+ n.onError('number' == typeof e.status ? e.status : 0);
2131
+ }, 0));
2132
+ }),
2133
+ h('xhr data %s', this.data),
2134
+ e.send(this.data));
2135
+ } catch (o) {
2136
+ return void setTimeout(function () {
2137
+ n.onError(o);
2138
+ }, 0);
2139
+ }
2140
+ 'undefined' != typeof document &&
2141
+ ((this.index = i.requestsCount++), (i.requests[this.index] = this));
2142
+ }),
2143
+ (i.prototype.onSuccess = function () {
2144
+ (this.emit('success'), this.cleanup());
2145
+ }),
2146
+ (i.prototype.onData = function (t) {
2147
+ (this.emit('data', t), this.onSuccess());
2148
+ }),
2149
+ (i.prototype.onError = function (t) {
2150
+ (this.emit('error', t), this.cleanup(!0));
2151
+ }),
2152
+ (i.prototype.cleanup = function (t) {
2153
+ if ('undefined' != typeof this.xhr && null !== this.xhr) {
2154
+ if (
2155
+ (this.hasXDR()
2156
+ ? (this.xhr.onload = this.xhr.onerror = r)
2157
+ : (this.xhr.onreadystatechange = r),
2158
+ t)
2159
+ )
2160
+ try {
2161
+ this.xhr.abort();
2162
+ } catch (e) {}
2163
+ ('undefined' != typeof document && delete i.requests[this.index], (this.xhr = null));
2164
+ }
2165
+ }),
2166
+ (i.prototype.onLoad = function () {
2167
+ var t;
2168
+ try {
2169
+ var e;
2170
+ try {
2171
+ e = this.xhr.getResponseHeader('Content-Type');
2172
+ } catch (n) {}
2173
+ t =
2174
+ 'application/octet-stream' === e || 'application/octet-stream; charset=UTF-8' === e
2175
+ ? this.xhr.response || this.xhr.responseText
2176
+ : this.xhr.responseText;
2177
+ } catch (n) {
2178
+ this.onError(n);
2179
+ }
2180
+ null != t && this.onData(t);
2181
+ }),
2182
+ (i.prototype.hasXDR = function () {
2183
+ return 'undefined' != typeof XDomainRequest && !this.xs && this.enablesXDR;
2184
+ }),
2185
+ (i.prototype.abort = function () {
2186
+ this.cleanup();
2187
+ }),
2188
+ (i.requestsCount = 0),
2189
+ (i.requests = {}),
2190
+ 'undefined' != typeof document)
2191
+ )
2192
+ if ('function' == typeof attachEvent) attachEvent('onunload', s);
2193
+ else if ('function' == typeof addEventListener) {
2194
+ var f = 'onpagehide' in self ? 'pagehide' : 'unload';
2195
+ addEventListener(f, s, !1);
2196
+ }
2197
+ },
2198
+ function (t, e, n) {
2199
+ function r(t) {
2200
+ var e = t && t.forceBase64;
2201
+ ((p && !e) || (this.supportsBinary = !1), o.call(this, t));
2202
+ }
2203
+ var o = n(23),
2204
+ i = n(32),
2205
+ s = n(24),
2206
+ a = n(33),
2207
+ c = n(34),
2208
+ u = n(3)('engine.io-client:polling');
2209
+ t.exports = r;
2210
+ var p = (function () {
2211
+ var t = n(19),
2212
+ e = new t({ xdomain: !1 });
2213
+ return null != e.responseType;
2214
+ })();
2215
+ (a(r, o),
2216
+ (r.prototype.name = 'polling'),
2217
+ (r.prototype.doOpen = function () {
2218
+ this.poll();
2219
+ }),
2220
+ (r.prototype.pause = function (t) {
2221
+ function e() {
2222
+ (u('paused'), (n.readyState = 'paused'), t());
2223
+ }
2224
+ var n = this;
2225
+ if (((this.readyState = 'pausing'), this.polling || !this.writable)) {
2226
+ var r = 0;
2227
+ (this.polling &&
2228
+ (u('we are currently polling - waiting to pause'),
2229
+ r++,
2230
+ this.once('pollComplete', function () {
2231
+ (u('pre-pause polling complete'), --r || e());
2232
+ })),
2233
+ this.writable ||
2234
+ (u('we are currently writing - waiting to pause'),
2235
+ r++,
2236
+ this.once('drain', function () {
2237
+ (u('pre-pause writing complete'), --r || e());
2238
+ })));
2239
+ } else e();
2240
+ }),
2241
+ (r.prototype.poll = function () {
2242
+ (u('polling'), (this.polling = !0), this.doPoll(), this.emit('poll'));
2243
+ }),
2244
+ (r.prototype.onData = function (t) {
2245
+ var e = this;
2246
+ u('polling got data %s', t);
2247
+ var n = function (t, n, r) {
2248
+ return (
2249
+ 'opening' === e.readyState && e.onOpen(),
2250
+ 'close' === t.type ? (e.onClose(), !1) : void e.onPacket(t)
2251
+ );
2252
+ };
2253
+ (s.decodePayload(t, this.socket.binaryType, n),
2254
+ 'closed' !== this.readyState &&
2255
+ ((this.polling = !1),
2256
+ this.emit('pollComplete'),
2257
+ 'open' === this.readyState
2258
+ ? this.poll()
2259
+ : u('ignoring poll - transport state "%s"', this.readyState)));
2260
+ }),
2261
+ (r.prototype.doClose = function () {
2262
+ function t() {
2263
+ (u('writing close packet'), e.write([{ type: 'close' }]));
2264
+ }
2265
+ var e = this;
2266
+ 'open' === this.readyState
2267
+ ? (u('transport open - closing'), t())
2268
+ : (u('transport not open - deferring close'), this.once('open', t));
2269
+ }),
2270
+ (r.prototype.write = function (t) {
2271
+ var e = this;
2272
+ this.writable = !1;
2273
+ var n = function () {
2274
+ ((e.writable = !0), e.emit('drain'));
2275
+ };
2276
+ s.encodePayload(t, this.supportsBinary, function (t) {
2277
+ e.doWrite(t, n);
2278
+ });
2279
+ }),
2280
+ (r.prototype.uri = function () {
2281
+ var t = this.query || {},
2282
+ e = this.secure ? 'https' : 'http',
2283
+ n = '';
2284
+ (!1 !== this.timestampRequests && (t[this.timestampParam] = c()),
2285
+ this.supportsBinary || t.sid || (t.b64 = 1),
2286
+ (t = i.encode(t)),
2287
+ this.port &&
2288
+ (('https' === e && 443 !== Number(this.port)) ||
2289
+ ('http' === e && 80 !== Number(this.port))) &&
2290
+ (n = ':' + this.port),
2291
+ t.length && (t = '?' + t));
2292
+ var r = this.hostname.indexOf(':') !== -1;
2293
+ return e + '://' + (r ? '[' + this.hostname + ']' : this.hostname) + n + this.path + t;
2294
+ }));
2295
+ },
2296
+ function (t, e, n) {
2297
+ function r(t) {
2298
+ ((this.path = t.path),
2299
+ (this.hostname = t.hostname),
2300
+ (this.port = t.port),
2301
+ (this.secure = t.secure),
2302
+ (this.query = t.query),
2303
+ (this.timestampParam = t.timestampParam),
2304
+ (this.timestampRequests = t.timestampRequests),
2305
+ (this.readyState = ''),
2306
+ (this.agent = t.agent || !1),
2307
+ (this.socket = t.socket),
2308
+ (this.enablesXDR = t.enablesXDR),
2309
+ (this.withCredentials = t.withCredentials),
2310
+ (this.pfx = t.pfx),
2311
+ (this.key = t.key),
2312
+ (this.passphrase = t.passphrase),
2313
+ (this.cert = t.cert),
2314
+ (this.ca = t.ca),
2315
+ (this.ciphers = t.ciphers),
2316
+ (this.rejectUnauthorized = t.rejectUnauthorized),
2317
+ (this.forceNode = t.forceNode),
2318
+ (this.isReactNative = t.isReactNative),
2319
+ (this.extraHeaders = t.extraHeaders),
2320
+ (this.localAddress = t.localAddress));
2321
+ }
2322
+ var o = n(24),
2323
+ i = n(11);
2324
+ ((t.exports = r),
2325
+ i(r.prototype),
2326
+ (r.prototype.onError = function (t, e) {
2327
+ var n = new Error(t);
2328
+ return ((n.type = 'TransportError'), (n.description = e), this.emit('error', n), this);
2329
+ }),
2330
+ (r.prototype.open = function () {
2331
+ return (
2332
+ ('closed' !== this.readyState && '' !== this.readyState) ||
2333
+ ((this.readyState = 'opening'), this.doOpen()),
2334
+ this
2335
+ );
2336
+ }),
2337
+ (r.prototype.close = function () {
2338
+ return (
2339
+ ('opening' !== this.readyState && 'open' !== this.readyState) ||
2340
+ (this.doClose(), this.onClose()),
2341
+ this
2342
+ );
2343
+ }),
2344
+ (r.prototype.send = function (t) {
2345
+ if ('open' !== this.readyState) throw new Error('Transport not open');
2346
+ this.write(t);
2347
+ }),
2348
+ (r.prototype.onOpen = function () {
2349
+ ((this.readyState = 'open'), (this.writable = !0), this.emit('open'));
2350
+ }),
2351
+ (r.prototype.onData = function (t) {
2352
+ var e = o.decodePacket(t, this.socket.binaryType);
2353
+ this.onPacket(e);
2354
+ }),
2355
+ (r.prototype.onPacket = function (t) {
2356
+ this.emit('packet', t);
2357
+ }),
2358
+ (r.prototype.onClose = function () {
2359
+ ((this.readyState = 'closed'), this.emit('close'));
2360
+ }));
2361
+ },
2362
+ function (t, e, n) {
2363
+ function r(t, n) {
2364
+ var r = 'b' + e.packets[t.type] + t.data.data;
2365
+ return n(r);
2366
+ }
2367
+ function o(t, n, r) {
2368
+ if (!n) return e.encodeBase64Packet(t, r);
2369
+ var o = t.data,
2370
+ i = new Uint8Array(o),
2371
+ s = new Uint8Array(1 + o.byteLength);
2372
+ s[0] = v[t.type];
2373
+ for (var a = 0; a < i.length; a++) s[a + 1] = i[a];
2374
+ return r(s.buffer);
2375
+ }
2376
+ function i(t, n, r) {
2377
+ if (!n) return e.encodeBase64Packet(t, r);
2378
+ var o = new FileReader();
2379
+ return (
2380
+ (o.onload = function () {
2381
+ e.encodePacket({ type: t.type, data: o.result }, n, !0, r);
2382
+ }),
2383
+ o.readAsArrayBuffer(t.data)
2384
+ );
2385
+ }
2386
+ function s(t, n, r) {
2387
+ if (!n) return e.encodeBase64Packet(t, r);
2388
+ if (g) return i(t, n, r);
2389
+ var o = new Uint8Array(1);
2390
+ o[0] = v[t.type];
2391
+ var s = new w([o.buffer, t.data]);
2392
+ return r(s);
2393
+ }
2394
+ function a(t) {
2395
+ try {
2396
+ t = d.decode(t, { strict: !1 });
2397
+ } catch (e) {
2398
+ return !1;
2399
+ }
2400
+ return t;
2401
+ }
2402
+ function c(t, e, n) {
2403
+ for (
2404
+ var r = new Array(t.length),
2405
+ o = l(t.length, n),
2406
+ i = function (t, n, o) {
2407
+ e(n, function (e, n) {
2408
+ ((r[t] = n), o(e, r));
2409
+ });
2410
+ },
2411
+ s = 0;
2412
+ s < t.length;
2413
+ s++
2414
+ )
2415
+ i(s, t[s], o);
2416
+ }
2417
+ var u,
2418
+ p = n(25),
2419
+ h = n(26),
2420
+ f = n(27),
2421
+ l = n(28),
2422
+ d = n(29);
2423
+ 'undefined' != typeof ArrayBuffer && (u = n(30));
2424
+ var y = 'undefined' != typeof navigator && /Android/i.test(navigator.userAgent),
2425
+ m = 'undefined' != typeof navigator && /PhantomJS/i.test(navigator.userAgent),
2426
+ g = y || m;
2427
+ e.protocol = 3;
2428
+ var v = (e.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }),
2429
+ b = p(v),
2430
+ C = { type: 'error', data: 'parser error' },
2431
+ w = n(31);
2432
+ ((e.encodePacket = function (t, e, n, i) {
2433
+ ('function' == typeof e && ((i = e), (e = !1)), 'function' == typeof n && ((i = n), (n = null)));
2434
+ var a = void 0 === t.data ? void 0 : t.data.buffer || t.data;
2435
+ if ('undefined' != typeof ArrayBuffer && a instanceof ArrayBuffer) return o(t, e, i);
2436
+ if ('undefined' != typeof w && a instanceof w) return s(t, e, i);
2437
+ if (a && a.base64) return r(t, i);
2438
+ var c = v[t.type];
2439
+ return (
2440
+ void 0 !== t.data && (c += n ? d.encode(String(t.data), { strict: !1 }) : String(t.data)),
2441
+ i('' + c)
2442
+ );
2443
+ }),
2444
+ (e.encodeBase64Packet = function (t, n) {
2445
+ var r = 'b' + e.packets[t.type];
2446
+ if ('undefined' != typeof w && t.data instanceof w) {
2447
+ var o = new FileReader();
2448
+ return (
2449
+ (o.onload = function () {
2450
+ var t = o.result.split(',')[1];
2451
+ n(r + t);
2452
+ }),
2453
+ o.readAsDataURL(t.data)
2454
+ );
2455
+ }
2456
+ var i;
2457
+ try {
2458
+ i = String.fromCharCode.apply(null, new Uint8Array(t.data));
2459
+ } catch (s) {
2460
+ for (var a = new Uint8Array(t.data), c = new Array(a.length), u = 0; u < a.length; u++)
2461
+ c[u] = a[u];
2462
+ i = String.fromCharCode.apply(null, c);
2463
+ }
2464
+ return ((r += btoa(i)), n(r));
2465
+ }),
2466
+ (e.decodePacket = function (t, n, r) {
2467
+ if (void 0 === t) return C;
2468
+ if ('string' == typeof t) {
2469
+ if ('b' === t.charAt(0)) return e.decodeBase64Packet(t.substr(1), n);
2470
+ if (r && ((t = a(t)), t === !1)) return C;
2471
+ var o = t.charAt(0);
2472
+ return Number(o) == o && b[o]
2473
+ ? t.length > 1
2474
+ ? { type: b[o], data: t.substring(1) }
2475
+ : { type: b[o] }
2476
+ : C;
2477
+ }
2478
+ var i = new Uint8Array(t),
2479
+ o = i[0],
2480
+ s = f(t, 1);
2481
+ return (w && 'blob' === n && (s = new w([s])), { type: b[o], data: s });
2482
+ }),
2483
+ (e.decodeBase64Packet = function (t, e) {
2484
+ var n = b[t.charAt(0)];
2485
+ if (!u) return { type: n, data: { base64: !0, data: t.substr(1) } };
2486
+ var r = u.decode(t.substr(1));
2487
+ return ('blob' === e && w && (r = new w([r])), { type: n, data: r });
2488
+ }),
2489
+ (e.encodePayload = function (t, n, r) {
2490
+ function o(t) {
2491
+ return t.length + ':' + t;
2492
+ }
2493
+ function i(t, r) {
2494
+ e.encodePacket(t, !!s && n, !1, function (t) {
2495
+ r(null, o(t));
2496
+ });
2497
+ }
2498
+ 'function' == typeof n && ((r = n), (n = null));
2499
+ var s = h(t);
2500
+ return n && s
2501
+ ? w && !g
2502
+ ? e.encodePayloadAsBlob(t, r)
2503
+ : e.encodePayloadAsArrayBuffer(t, r)
2504
+ : t.length
2505
+ ? void c(t, i, function (t, e) {
2506
+ return r(e.join(''));
2507
+ })
2508
+ : r('0:');
2509
+ }),
2510
+ (e.decodePayload = function (t, n, r) {
2511
+ if ('string' != typeof t) return e.decodePayloadAsBinary(t, n, r);
2512
+ 'function' == typeof n && ((r = n), (n = null));
2513
+ var o;
2514
+ if ('' === t) return r(C, 0, 1);
2515
+ for (var i, s, a = '', c = 0, u = t.length; c < u; c++) {
2516
+ var p = t.charAt(c);
2517
+ if (':' === p) {
2518
+ if ('' === a || a != (i = Number(a))) return r(C, 0, 1);
2519
+ if (((s = t.substr(c + 1, i)), a != s.length)) return r(C, 0, 1);
2520
+ if (s.length) {
2521
+ if (((o = e.decodePacket(s, n, !1)), C.type === o.type && C.data === o.data))
2522
+ return r(C, 0, 1);
2523
+ var h = r(o, c + i, u);
2524
+ if (!1 === h) return;
2525
+ }
2526
+ ((c += i), (a = ''));
2527
+ } else a += p;
2528
+ }
2529
+ return '' !== a ? r(C, 0, 1) : void 0;
2530
+ }),
2531
+ (e.encodePayloadAsArrayBuffer = function (t, n) {
2532
+ function r(t, n) {
2533
+ e.encodePacket(t, !0, !0, function (t) {
2534
+ return n(null, t);
2535
+ });
2536
+ }
2537
+ return t.length
2538
+ ? void c(t, r, function (t, e) {
2539
+ var r = e.reduce(function (t, e) {
2540
+ var n;
2541
+ return (
2542
+ (n = 'string' == typeof e ? e.length : e.byteLength),
2543
+ t + n.toString().length + n + 2
2544
+ );
2545
+ }, 0),
2546
+ o = new Uint8Array(r),
2547
+ i = 0;
2548
+ return (
2549
+ e.forEach(function (t) {
2550
+ var e = 'string' == typeof t,
2551
+ n = t;
2552
+ if (e) {
2553
+ for (var r = new Uint8Array(t.length), s = 0; s < t.length; s++)
2554
+ r[s] = t.charCodeAt(s);
2555
+ n = r.buffer;
2556
+ }
2557
+ e ? (o[i++] = 0) : (o[i++] = 1);
2558
+ for (var a = n.byteLength.toString(), s = 0; s < a.length; s++)
2559
+ o[i++] = parseInt(a[s]);
2560
+ o[i++] = 255;
2561
+ for (var r = new Uint8Array(n), s = 0; s < r.length; s++) o[i++] = r[s];
2562
+ }),
2563
+ n(o.buffer)
2564
+ );
2565
+ })
2566
+ : n(new ArrayBuffer(0));
2567
+ }),
2568
+ (e.encodePayloadAsBlob = function (t, n) {
2569
+ function r(t, n) {
2570
+ e.encodePacket(t, !0, !0, function (t) {
2571
+ var e = new Uint8Array(1);
2572
+ if (((e[0] = 1), 'string' == typeof t)) {
2573
+ for (var r = new Uint8Array(t.length), o = 0; o < t.length; o++) r[o] = t.charCodeAt(o);
2574
+ ((t = r.buffer), (e[0] = 0));
2575
+ }
2576
+ for (
2577
+ var i = t instanceof ArrayBuffer ? t.byteLength : t.size,
2578
+ s = i.toString(),
2579
+ a = new Uint8Array(s.length + 1),
2580
+ o = 0;
2581
+ o < s.length;
2582
+ o++
2583
+ )
2584
+ a[o] = parseInt(s[o]);
2585
+ if (((a[s.length] = 255), w)) {
2586
+ var c = new w([e.buffer, a.buffer, t]);
2587
+ n(null, c);
2588
+ }
2589
+ });
2590
+ }
2591
+ c(t, r, function (t, e) {
2592
+ return n(new w(e));
2593
+ });
2594
+ }),
2595
+ (e.decodePayloadAsBinary = function (t, n, r) {
2596
+ 'function' == typeof n && ((r = n), (n = null));
2597
+ for (var o = t, i = []; o.byteLength > 0; ) {
2598
+ for (var s = new Uint8Array(o), a = 0 === s[0], c = '', u = 1; 255 !== s[u]; u++) {
2599
+ if (c.length > 310) return r(C, 0, 1);
2600
+ c += s[u];
2601
+ }
2602
+ ((o = f(o, 2 + c.length)), (c = parseInt(c)));
2603
+ var p = f(o, 0, c);
2604
+ if (a)
2605
+ try {
2606
+ p = String.fromCharCode.apply(null, new Uint8Array(p));
2607
+ } catch (h) {
2608
+ var l = new Uint8Array(p);
2609
+ p = '';
2610
+ for (var u = 0; u < l.length; u++) p += String.fromCharCode(l[u]);
2611
+ }
2612
+ (i.push(p), (o = f(o, c)));
2613
+ }
2614
+ var d = i.length;
2615
+ i.forEach(function (t, o) {
2616
+ r(e.decodePacket(t, n, !0), o, d);
2617
+ });
2618
+ }));
2619
+ },
2620
+ function (t, e) {
2621
+ t.exports =
2622
+ Object.keys ||
2623
+ function (t) {
2624
+ var e = [],
2625
+ n = Object.prototype.hasOwnProperty;
2626
+ for (var r in t) n.call(t, r) && e.push(r);
2627
+ return e;
2628
+ };
2629
+ },
2630
+ function (t, e, n) {
2631
+ function r(t) {
2632
+ if (!t || 'object' != typeof t) return !1;
2633
+ if (o(t)) {
2634
+ for (var e = 0, n = t.length; e < n; e++) if (r(t[e])) return !0;
2635
+ return !1;
2636
+ }
2637
+ if (
2638
+ ('function' == typeof Buffer && Buffer.isBuffer && Buffer.isBuffer(t)) ||
2639
+ ('function' == typeof ArrayBuffer && t instanceof ArrayBuffer) ||
2640
+ (s && t instanceof Blob) ||
2641
+ (a && t instanceof File)
2642
+ )
2643
+ return !0;
2644
+ if (t.toJSON && 'function' == typeof t.toJSON && 1 === arguments.length) return r(t.toJSON(), !0);
2645
+ for (var i in t) if (Object.prototype.hasOwnProperty.call(t, i) && r(t[i])) return !0;
2646
+ return !1;
2647
+ }
2648
+ var o = n(13),
2649
+ i = Object.prototype.toString,
2650
+ s =
2651
+ 'function' == typeof Blob ||
2652
+ ('undefined' != typeof Blob && '[object BlobConstructor]' === i.call(Blob)),
2653
+ a =
2654
+ 'function' == typeof File ||
2655
+ ('undefined' != typeof File && '[object FileConstructor]' === i.call(File));
2656
+ t.exports = r;
2657
+ },
2658
+ function (t, e) {
2659
+ t.exports = function (t, e, n) {
2660
+ var r = t.byteLength;
2661
+ if (((e = e || 0), (n = n || r), t.slice)) return t.slice(e, n);
2662
+ if ((e < 0 && (e += r), n < 0 && (n += r), n > r && (n = r), e >= r || e >= n || 0 === r))
2663
+ return new ArrayBuffer(0);
2664
+ for (var o = new Uint8Array(t), i = new Uint8Array(n - e), s = e, a = 0; s < n; s++, a++) i[a] = o[s];
2665
+ return i.buffer;
2666
+ };
2667
+ },
2668
+ function (t, e) {
2669
+ function n(t, e, n) {
2670
+ function o(t, r) {
2671
+ if (o.count <= 0) throw new Error('after called too many times');
2672
+ (--o.count, t ? ((i = !0), e(t), (e = n)) : 0 !== o.count || i || e(null, r));
2673
+ }
2674
+ var i = !1;
2675
+ return ((n = n || r), (o.count = t), 0 === t ? e() : o);
2676
+ }
2677
+ function r() {}
2678
+ t.exports = n;
2679
+ },
2680
+ function (t, e) {
2681
+ function n(t) {
2682
+ for (var e, n, r = [], o = 0, i = t.length; o < i; )
2683
+ ((e = t.charCodeAt(o++)),
2684
+ e >= 55296 && e <= 56319 && o < i
2685
+ ? ((n = t.charCodeAt(o++)),
2686
+ 56320 == (64512 & n) ? r.push(((1023 & e) << 10) + (1023 & n) + 65536) : (r.push(e), o--))
2687
+ : r.push(e));
2688
+ return r;
2689
+ }
2690
+ function r(t) {
2691
+ for (var e, n = t.length, r = -1, o = ''; ++r < n; )
2692
+ ((e = t[r]),
2693
+ e > 65535 && ((e -= 65536), (o += d(((e >>> 10) & 1023) | 55296)), (e = 56320 | (1023 & e))),
2694
+ (o += d(e)));
2695
+ return o;
2696
+ }
2697
+ function o(t, e) {
2698
+ if (t >= 55296 && t <= 57343) {
2699
+ if (e) throw Error('Lone surrogate U+' + t.toString(16).toUpperCase() + ' is not a scalar value');
2700
+ return !1;
2701
+ }
2702
+ return !0;
2703
+ }
2704
+ function i(t, e) {
2705
+ return d(((t >> e) & 63) | 128);
2706
+ }
2707
+ function s(t, e) {
2708
+ if (0 == (4294967168 & t)) return d(t);
2709
+ var n = '';
2710
+ return (
2711
+ 0 == (4294965248 & t)
2712
+ ? (n = d(((t >> 6) & 31) | 192))
2713
+ : 0 == (4294901760 & t)
2714
+ ? (o(t, e) || (t = 65533), (n = d(((t >> 12) & 15) | 224)), (n += i(t, 6)))
2715
+ : 0 == (4292870144 & t) && ((n = d(((t >> 18) & 7) | 240)), (n += i(t, 12)), (n += i(t, 6))),
2716
+ (n += d((63 & t) | 128))
2717
+ );
2718
+ }
2719
+ function a(t, e) {
2720
+ e = e || {};
2721
+ for (var r, o = !1 !== e.strict, i = n(t), a = i.length, c = -1, u = ''; ++c < a; )
2722
+ ((r = i[c]), (u += s(r, o)));
2723
+ return u;
2724
+ }
2725
+ function c() {
2726
+ if (l >= f) throw Error('Invalid byte index');
2727
+ var t = 255 & h[l];
2728
+ if ((l++, 128 == (192 & t))) return 63 & t;
2729
+ throw Error('Invalid continuation byte');
2730
+ }
2731
+ function u(t) {
2732
+ var e, n, r, i, s;
2733
+ if (l > f) throw Error('Invalid byte index');
2734
+ if (l == f) return !1;
2735
+ if (((e = 255 & h[l]), l++, 0 == (128 & e))) return e;
2736
+ if (192 == (224 & e)) {
2737
+ if (((n = c()), (s = ((31 & e) << 6) | n), s >= 128)) return s;
2738
+ throw Error('Invalid continuation byte');
2739
+ }
2740
+ if (224 == (240 & e)) {
2741
+ if (((n = c()), (r = c()), (s = ((15 & e) << 12) | (n << 6) | r), s >= 2048))
2742
+ return o(s, t) ? s : 65533;
2743
+ throw Error('Invalid continuation byte');
2744
+ }
2745
+ if (
2746
+ 240 == (248 & e) &&
2747
+ ((n = c()),
2748
+ (r = c()),
2749
+ (i = c()),
2750
+ (s = ((7 & e) << 18) | (n << 12) | (r << 6) | i),
2751
+ s >= 65536 && s <= 1114111)
2752
+ )
2753
+ return s;
2754
+ throw Error('Invalid UTF-8 detected');
2755
+ }
2756
+ function p(t, e) {
2757
+ e = e || {};
2758
+ var o = !1 !== e.strict;
2759
+ ((h = n(t)), (f = h.length), (l = 0));
2760
+ for (var i, s = []; (i = u(o)) !== !1; ) s.push(i);
2761
+ return r(s);
2762
+ } /*! https://mths.be/utf8js v2.1.2 by @mathias */
2763
+ var h,
2764
+ f,
2765
+ l,
2766
+ d = String.fromCharCode;
2767
+ t.exports = { version: '2.1.2', encode: a, decode: p };
2768
+ },
2769
+ function (t, e) {
2770
+ !(function () {
2771
+ 'use strict';
2772
+ for (
2773
+ var t = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
2774
+ n = new Uint8Array(256),
2775
+ r = 0;
2776
+ r < t.length;
2777
+ r++
2778
+ )
2779
+ n[t.charCodeAt(r)] = r;
2780
+ ((e.encode = function (e) {
2781
+ var n,
2782
+ r = new Uint8Array(e),
2783
+ o = r.length,
2784
+ i = '';
2785
+ for (n = 0; n < o; n += 3)
2786
+ ((i += t[r[n] >> 2]),
2787
+ (i += t[((3 & r[n]) << 4) | (r[n + 1] >> 4)]),
2788
+ (i += t[((15 & r[n + 1]) << 2) | (r[n + 2] >> 6)]),
2789
+ (i += t[63 & r[n + 2]]));
2790
+ return (
2791
+ o % 3 === 2
2792
+ ? (i = i.substring(0, i.length - 1) + '=')
2793
+ : o % 3 === 1 && (i = i.substring(0, i.length - 2) + '=='),
2794
+ i
2795
+ );
2796
+ }),
2797
+ (e.decode = function (t) {
2798
+ var e,
2799
+ r,
2800
+ o,
2801
+ i,
2802
+ s,
2803
+ a = 0.75 * t.length,
2804
+ c = t.length,
2805
+ u = 0;
2806
+ '=' === t[t.length - 1] && (a--, '=' === t[t.length - 2] && a--);
2807
+ var p = new ArrayBuffer(a),
2808
+ h = new Uint8Array(p);
2809
+ for (e = 0; e < c; e += 4)
2810
+ ((r = n[t.charCodeAt(e)]),
2811
+ (o = n[t.charCodeAt(e + 1)]),
2812
+ (i = n[t.charCodeAt(e + 2)]),
2813
+ (s = n[t.charCodeAt(e + 3)]),
2814
+ (h[u++] = (r << 2) | (o >> 4)),
2815
+ (h[u++] = ((15 & o) << 4) | (i >> 2)),
2816
+ (h[u++] = ((3 & i) << 6) | (63 & s)));
2817
+ return p;
2818
+ }));
2819
+ })();
2820
+ },
2821
+ function (t, e) {
2822
+ function n(t) {
2823
+ return t.map(function (t) {
2824
+ if (t.buffer instanceof ArrayBuffer) {
2825
+ var e = t.buffer;
2826
+ if (t.byteLength !== e.byteLength) {
2827
+ var n = new Uint8Array(t.byteLength);
2828
+ (n.set(new Uint8Array(e, t.byteOffset, t.byteLength)), (e = n.buffer));
2829
+ }
2830
+ return e;
2831
+ }
2832
+ return t;
2833
+ });
2834
+ }
2835
+ function r(t, e) {
2836
+ e = e || {};
2837
+ var r = new i();
2838
+ return (
2839
+ n(t).forEach(function (t) {
2840
+ r.append(t);
2841
+ }),
2842
+ e.type ? r.getBlob(e.type) : r.getBlob()
2843
+ );
2844
+ }
2845
+ function o(t, e) {
2846
+ return new Blob(n(t), e || {});
2847
+ }
2848
+ var i =
2849
+ 'undefined' != typeof i
2850
+ ? i
2851
+ : 'undefined' != typeof WebKitBlobBuilder
2852
+ ? WebKitBlobBuilder
2853
+ : 'undefined' != typeof MSBlobBuilder
2854
+ ? MSBlobBuilder
2855
+ : 'undefined' != typeof MozBlobBuilder && MozBlobBuilder,
2856
+ s = (function () {
2857
+ try {
2858
+ var t = new Blob(['hi']);
2859
+ return 2 === t.size;
2860
+ } catch (e) {
2861
+ return !1;
2862
+ }
2863
+ })(),
2864
+ a =
2865
+ s &&
2866
+ (function () {
2867
+ try {
2868
+ var t = new Blob([new Uint8Array([1, 2])]);
2869
+ return 2 === t.size;
2870
+ } catch (e) {
2871
+ return !1;
2872
+ }
2873
+ })(),
2874
+ c = i && i.prototype.append && i.prototype.getBlob;
2875
+ ('undefined' != typeof Blob && ((r.prototype = Blob.prototype), (o.prototype = Blob.prototype)),
2876
+ (t.exports = (function () {
2877
+ return s ? (a ? Blob : o) : c ? r : void 0;
2878
+ })()));
2879
+ },
2880
+ function (t, e) {
2881
+ ((e.encode = function (t) {
2882
+ var e = '';
2883
+ for (var n in t)
2884
+ t.hasOwnProperty(n) &&
2885
+ (e.length && (e += '&'), (e += encodeURIComponent(n) + '=' + encodeURIComponent(t[n])));
2886
+ return e;
2887
+ }),
2888
+ (e.decode = function (t) {
2889
+ for (var e = {}, n = t.split('&'), r = 0, o = n.length; r < o; r++) {
2890
+ var i = n[r].split('=');
2891
+ e[decodeURIComponent(i[0])] = decodeURIComponent(i[1]);
2892
+ }
2893
+ return e;
2894
+ }));
2895
+ },
2896
+ function (t, e) {
2897
+ t.exports = function (t, e) {
2898
+ var n = function () {};
2899
+ ((n.prototype = e.prototype), (t.prototype = new n()), (t.prototype.constructor = t));
2900
+ };
2901
+ },
2902
+ function (t, e) {
2903
+ 'use strict';
2904
+ function n(t) {
2905
+ var e = '';
2906
+ do ((e = s[t % a] + e), (t = Math.floor(t / a)));
2907
+ while (t > 0);
2908
+ return e;
2909
+ }
2910
+ function r(t) {
2911
+ var e = 0;
2912
+ for (p = 0; p < t.length; p++) e = e * a + c[t.charAt(p)];
2913
+ return e;
2914
+ }
2915
+ function o() {
2916
+ var t = n(+new Date());
2917
+ return t !== i ? ((u = 0), (i = t)) : t + '.' + n(u++);
2918
+ }
2919
+ for (
2920
+ var i,
2921
+ s = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split(''),
2922
+ a = 64,
2923
+ c = {},
2924
+ u = 0,
2925
+ p = 0;
2926
+ p < a;
2927
+ p++
2928
+ )
2929
+ c[s[p]] = p;
2930
+ ((o.encode = n), (o.decode = r), (t.exports = o));
2931
+ },
2932
+ function (t, e, n) {
2933
+ (function (e) {
2934
+ function r() {}
2935
+ function o() {
2936
+ return 'undefined' != typeof self
2937
+ ? self
2938
+ : 'undefined' != typeof window
2939
+ ? window
2940
+ : 'undefined' != typeof e
2941
+ ? e
2942
+ : {};
2943
+ }
2944
+ function i(t) {
2945
+ if ((s.call(this, t), (this.query = this.query || {}), !c)) {
2946
+ var e = o();
2947
+ c = e.___eio = e.___eio || [];
2948
+ }
2949
+ this.index = c.length;
2950
+ var n = this;
2951
+ (c.push(function (t) {
2952
+ n.onData(t);
2953
+ }),
2954
+ (this.query.j = this.index),
2955
+ 'function' == typeof addEventListener &&
2956
+ addEventListener(
2957
+ 'beforeunload',
2958
+ function () {
2959
+ n.script && (n.script.onerror = r);
2960
+ },
2961
+ !1,
2962
+ ));
2963
+ }
2964
+ var s = n(22),
2965
+ a = n(33);
2966
+ t.exports = i;
2967
+ var c,
2968
+ u = /\n/g,
2969
+ p = /\\n/g;
2970
+ (a(i, s),
2971
+ (i.prototype.supportsBinary = !1),
2972
+ (i.prototype.doClose = function () {
2973
+ (this.script && (this.script.parentNode.removeChild(this.script), (this.script = null)),
2974
+ this.form &&
2975
+ (this.form.parentNode.removeChild(this.form), (this.form = null), (this.iframe = null)),
2976
+ s.prototype.doClose.call(this));
2977
+ }),
2978
+ (i.prototype.doPoll = function () {
2979
+ var t = this,
2980
+ e = document.createElement('script');
2981
+ (this.script && (this.script.parentNode.removeChild(this.script), (this.script = null)),
2982
+ (e.async = !0),
2983
+ (e.src = this.uri()),
2984
+ (e.onerror = function (e) {
2985
+ t.onError('jsonp poll error', e);
2986
+ }));
2987
+ var n = document.getElementsByTagName('script')[0];
2988
+ (n ? n.parentNode.insertBefore(e, n) : (document.head || document.body).appendChild(e),
2989
+ (this.script = e));
2990
+ var r = 'undefined' != typeof navigator && /gecko/i.test(navigator.userAgent);
2991
+ r &&
2992
+ setTimeout(function () {
2993
+ var t = document.createElement('iframe');
2994
+ (document.body.appendChild(t), document.body.removeChild(t));
2995
+ }, 100);
2996
+ }),
2997
+ (i.prototype.doWrite = function (t, e) {
2998
+ function n() {
2999
+ (r(), e());
3000
+ }
3001
+ function r() {
3002
+ if (o.iframe)
3003
+ try {
3004
+ o.form.removeChild(o.iframe);
3005
+ } catch (t) {
3006
+ o.onError('jsonp polling iframe removal error', t);
3007
+ }
3008
+ try {
3009
+ var e = '<iframe src="javascript:0" name="' + o.iframeId + '">';
3010
+ i = document.createElement(e);
3011
+ } catch (t) {
3012
+ ((i = document.createElement('iframe')),
3013
+ (i.name = o.iframeId),
3014
+ (i.src = 'javascript:0'));
3015
+ }
3016
+ ((i.id = o.iframeId), o.form.appendChild(i), (o.iframe = i));
3017
+ }
3018
+ var o = this;
3019
+ if (!this.form) {
3020
+ var i,
3021
+ s = document.createElement('form'),
3022
+ a = document.createElement('textarea'),
3023
+ c = (this.iframeId = 'eio_iframe_' + this.index);
3024
+ ((s.className = 'socketio'),
3025
+ (s.style.position = 'absolute'),
3026
+ (s.style.top = '-1000px'),
3027
+ (s.style.left = '-1000px'),
3028
+ (s.target = c),
3029
+ (s.method = 'POST'),
3030
+ s.setAttribute('accept-charset', 'utf-8'),
3031
+ (a.name = 'd'),
3032
+ s.appendChild(a),
3033
+ document.body.appendChild(s),
3034
+ (this.form = s),
3035
+ (this.area = a));
3036
+ }
3037
+ ((this.form.action = this.uri()),
3038
+ r(),
3039
+ (t = t.replace(p, '\\\n')),
3040
+ (this.area.value = t.replace(u, '\\n')));
3041
+ try {
3042
+ this.form.submit();
3043
+ } catch (h) {}
3044
+ this.iframe.attachEvent
3045
+ ? (this.iframe.onreadystatechange = function () {
3046
+ 'complete' === o.iframe.readyState && n();
3047
+ })
3048
+ : (this.iframe.onload = n);
3049
+ }));
3050
+ }).call(
3051
+ e,
3052
+ (function () {
3053
+ return this;
3054
+ })(),
3055
+ );
3056
+ },
3057
+ function (t, e, n) {
3058
+ function r(t) {
3059
+ var e = t && t.forceBase64;
3060
+ (e && (this.supportsBinary = !1),
3061
+ (this.perMessageDeflate = t.perMessageDeflate),
3062
+ (this.usingBrowserWebSocket = o && !t.forceNode),
3063
+ (this.protocols = t.protocols),
3064
+ this.usingBrowserWebSocket || (l = i),
3065
+ s.call(this, t));
3066
+ }
3067
+ var o,
3068
+ i,
3069
+ s = n(23),
3070
+ a = n(24),
3071
+ c = n(32),
3072
+ u = n(33),
3073
+ p = n(34),
3074
+ h = n(3)('engine.io-client:websocket');
3075
+ if (
3076
+ ('undefined' != typeof WebSocket
3077
+ ? (o = WebSocket)
3078
+ : 'undefined' != typeof self && (o = self.WebSocket || self.MozWebSocket),
3079
+ 'undefined' == typeof window)
3080
+ )
3081
+ try {
3082
+ i = n(37);
3083
+ } catch (f) {}
3084
+ var l = o || i;
3085
+ ((t.exports = r),
3086
+ u(r, s),
3087
+ (r.prototype.name = 'websocket'),
3088
+ (r.prototype.supportsBinary = !0),
3089
+ (r.prototype.doOpen = function () {
3090
+ if (this.check()) {
3091
+ var t = this.uri(),
3092
+ e = this.protocols,
3093
+ n = { agent: this.agent, perMessageDeflate: this.perMessageDeflate };
3094
+ ((n.pfx = this.pfx),
3095
+ (n.key = this.key),
3096
+ (n.passphrase = this.passphrase),
3097
+ (n.cert = this.cert),
3098
+ (n.ca = this.ca),
3099
+ (n.ciphers = this.ciphers),
3100
+ (n.rejectUnauthorized = this.rejectUnauthorized),
3101
+ this.extraHeaders && (n.headers = this.extraHeaders),
3102
+ this.localAddress && (n.localAddress = this.localAddress));
3103
+ try {
3104
+ this.ws =
3105
+ this.usingBrowserWebSocket && !this.isReactNative
3106
+ ? e
3107
+ ? new l(t, e)
3108
+ : new l(t)
3109
+ : new l(t, e, n);
3110
+ } catch (r) {
3111
+ return this.emit('error', r);
3112
+ }
3113
+ (void 0 === this.ws.binaryType && (this.supportsBinary = !1),
3114
+ this.ws.supports && this.ws.supports.binary
3115
+ ? ((this.supportsBinary = !0), (this.ws.binaryType = 'nodebuffer'))
3116
+ : (this.ws.binaryType = 'arraybuffer'),
3117
+ this.addEventListeners());
3118
+ }
3119
+ }),
3120
+ (r.prototype.addEventListeners = function () {
3121
+ var t = this;
3122
+ ((this.ws.onopen = function () {
3123
+ t.onOpen();
3124
+ }),
3125
+ (this.ws.onclose = function () {
3126
+ t.onClose();
3127
+ }),
3128
+ (this.ws.onmessage = function (e) {
3129
+ t.onData(e.data);
3130
+ }),
3131
+ (this.ws.onerror = function (e) {
3132
+ t.onError('websocket error', e);
3133
+ }));
3134
+ }),
3135
+ (r.prototype.write = function (t) {
3136
+ function e() {
3137
+ (n.emit('flush'),
3138
+ setTimeout(function () {
3139
+ ((n.writable = !0), n.emit('drain'));
3140
+ }, 0));
3141
+ }
3142
+ var n = this;
3143
+ this.writable = !1;
3144
+ for (var r = t.length, o = 0, i = r; o < i; o++)
3145
+ !(function (t) {
3146
+ a.encodePacket(t, n.supportsBinary, function (o) {
3147
+ if (!n.usingBrowserWebSocket) {
3148
+ var i = {};
3149
+ if ((t.options && (i.compress = t.options.compress), n.perMessageDeflate)) {
3150
+ var s = 'string' == typeof o ? Buffer.byteLength(o) : o.length;
3151
+ s < n.perMessageDeflate.threshold && (i.compress = !1);
3152
+ }
3153
+ }
3154
+ try {
3155
+ n.usingBrowserWebSocket ? n.ws.send(o) : n.ws.send(o, i);
3156
+ } catch (a) {
3157
+ h('websocket closed before onclose event');
3158
+ }
3159
+ --r || e();
3160
+ });
3161
+ })(t[o]);
3162
+ }),
3163
+ (r.prototype.onClose = function () {
3164
+ s.prototype.onClose.call(this);
3165
+ }),
3166
+ (r.prototype.doClose = function () {
3167
+ 'undefined' != typeof this.ws && this.ws.close();
3168
+ }),
3169
+ (r.prototype.uri = function () {
3170
+ var t = this.query || {},
3171
+ e = this.secure ? 'wss' : 'ws',
3172
+ n = '';
3173
+ (this.port &&
3174
+ (('wss' === e && 443 !== Number(this.port)) || ('ws' === e && 80 !== Number(this.port))) &&
3175
+ (n = ':' + this.port),
3176
+ this.timestampRequests && (t[this.timestampParam] = p()),
3177
+ this.supportsBinary || (t.b64 = 1),
3178
+ (t = c.encode(t)),
3179
+ t.length && (t = '?' + t));
3180
+ var r = this.hostname.indexOf(':') !== -1;
3181
+ return e + '://' + (r ? '[' + this.hostname + ']' : this.hostname) + n + this.path + t;
3182
+ }),
3183
+ (r.prototype.check = function () {
3184
+ return !(!l || ('__initialize' in l && this.name === r.prototype.name));
3185
+ }));
3186
+ },
3187
+ function (t, e) {},
3188
+ function (t, e) {
3189
+ var n = [].indexOf;
3190
+ t.exports = function (t, e) {
3191
+ if (n) return t.indexOf(e);
3192
+ for (var r = 0; r < t.length; ++r) if (t[r] === e) return r;
3193
+ return -1;
3194
+ };
3195
+ },
3196
+ function (t, e, n) {
3197
+ function r(t, e, n) {
3198
+ ((this.io = t),
3199
+ (this.nsp = e),
3200
+ (this.json = this),
3201
+ (this.ids = 0),
3202
+ (this.acks = {}),
3203
+ (this.receiveBuffer = []),
3204
+ (this.sendBuffer = []),
3205
+ (this.connected = !1),
3206
+ (this.disconnected = !0),
3207
+ (this.flags = {}),
3208
+ n && n.query && (this.query = n.query),
3209
+ this.io.autoConnect && this.open());
3210
+ }
3211
+ var o = n(7),
3212
+ i = n(11),
3213
+ s = n(40),
3214
+ a = n(41),
3215
+ c = n(42),
3216
+ u = n(3)('socket.io-client:socket'),
3217
+ p = n(32),
3218
+ h = n(26);
3219
+ t.exports = e = r;
3220
+ var f = {
3221
+ connect: 1,
3222
+ connect_error: 1,
3223
+ connect_timeout: 1,
3224
+ connecting: 1,
3225
+ disconnect: 1,
3226
+ error: 1,
3227
+ reconnect: 1,
3228
+ reconnect_attempt: 1,
3229
+ reconnect_failed: 1,
3230
+ reconnect_error: 1,
3231
+ reconnecting: 1,
3232
+ ping: 1,
3233
+ pong: 1,
3234
+ },
3235
+ l = i.prototype.emit;
3236
+ (i(r.prototype),
3237
+ (r.prototype.subEvents = function () {
3238
+ if (!this.subs) {
3239
+ var t = this.io;
3240
+ this.subs = [
3241
+ a(t, 'open', c(this, 'onopen')),
3242
+ a(t, 'packet', c(this, 'onpacket')),
3243
+ a(t, 'close', c(this, 'onclose')),
3244
+ ];
3245
+ }
3246
+ }),
3247
+ (r.prototype.open = r.prototype.connect =
3248
+ function () {
3249
+ return this.connected
3250
+ ? this
3251
+ : (this.subEvents(),
3252
+ this.io.open(),
3253
+ 'open' === this.io.readyState && this.onopen(),
3254
+ this.emit('connecting'),
3255
+ this);
3256
+ }),
3257
+ (r.prototype.send = function () {
3258
+ var t = s(arguments);
3259
+ return (t.unshift('message'), this.emit.apply(this, t), this);
3260
+ }),
3261
+ (r.prototype.emit = function (t) {
3262
+ if (f.hasOwnProperty(t)) return (l.apply(this, arguments), this);
3263
+ var e = s(arguments),
3264
+ n = {
3265
+ type: (void 0 !== this.flags.binary ? this.flags.binary : h(e)) ? o.BINARY_EVENT : o.EVENT,
3266
+ data: e,
3267
+ };
3268
+ return (
3269
+ (n.options = {}),
3270
+ (n.options.compress = !this.flags || !1 !== this.flags.compress),
3271
+ 'function' == typeof e[e.length - 1] &&
3272
+ (u('emitting packet with ack id %d', this.ids),
3273
+ (this.acks[this.ids] = e.pop()),
3274
+ (n.id = this.ids++)),
3275
+ this.connected ? this.packet(n) : this.sendBuffer.push(n),
3276
+ (this.flags = {}),
3277
+ this
3278
+ );
3279
+ }),
3280
+ (r.prototype.packet = function (t) {
3281
+ ((t.nsp = this.nsp), this.io.packet(t));
3282
+ }),
3283
+ (r.prototype.onopen = function () {
3284
+ if ((u('transport is open - connecting'), '/' !== this.nsp))
3285
+ if (this.query) {
3286
+ var t = 'object' == typeof this.query ? p.encode(this.query) : this.query;
3287
+ (u('sending connect packet with query %s', t), this.packet({ type: o.CONNECT, query: t }));
3288
+ } else this.packet({ type: o.CONNECT });
3289
+ }),
3290
+ (r.prototype.onclose = function (t) {
3291
+ (u('close (%s)', t),
3292
+ (this.connected = !1),
3293
+ (this.disconnected = !0),
3294
+ delete this.id,
3295
+ this.emit('disconnect', t));
3296
+ }),
3297
+ (r.prototype.onpacket = function (t) {
3298
+ var e = t.nsp === this.nsp,
3299
+ n = t.type === o.ERROR && '/' === t.nsp;
3300
+ if (e || n)
3301
+ switch (t.type) {
3302
+ case o.CONNECT:
3303
+ this.onconnect();
3304
+ break;
3305
+ case o.EVENT:
3306
+ this.onevent(t);
3307
+ break;
3308
+ case o.BINARY_EVENT:
3309
+ this.onevent(t);
3310
+ break;
3311
+ case o.ACK:
3312
+ this.onack(t);
3313
+ break;
3314
+ case o.BINARY_ACK:
3315
+ this.onack(t);
3316
+ break;
3317
+ case o.DISCONNECT:
3318
+ this.ondisconnect();
3319
+ break;
3320
+ case o.ERROR:
3321
+ this.emit('error', t.data);
3322
+ }
3323
+ }),
3324
+ (r.prototype.onevent = function (t) {
3325
+ var e = t.data || [];
3326
+ (u('emitting event %j', e),
3327
+ null != t.id && (u('attaching ack callback to event'), e.push(this.ack(t.id))),
3328
+ this.connected ? l.apply(this, e) : this.receiveBuffer.push(e));
3329
+ }),
3330
+ (r.prototype.ack = function (t) {
3331
+ var e = this,
3332
+ n = !1;
3333
+ return function () {
3334
+ if (!n) {
3335
+ n = !0;
3336
+ var r = s(arguments);
3337
+ (u('sending ack %j', r), e.packet({ type: h(r) ? o.BINARY_ACK : o.ACK, id: t, data: r }));
3338
+ }
3339
+ };
3340
+ }),
3341
+ (r.prototype.onack = function (t) {
3342
+ var e = this.acks[t.id];
3343
+ 'function' == typeof e
3344
+ ? (u('calling ack %s with %j', t.id, t.data), e.apply(this, t.data), delete this.acks[t.id])
3345
+ : u('bad ack %s', t.id);
3346
+ }),
3347
+ (r.prototype.onconnect = function () {
3348
+ ((this.connected = !0), (this.disconnected = !1), this.emit('connect'), this.emitBuffered());
3349
+ }),
3350
+ (r.prototype.emitBuffered = function () {
3351
+ var t;
3352
+ for (t = 0; t < this.receiveBuffer.length; t++) l.apply(this, this.receiveBuffer[t]);
3353
+ for (this.receiveBuffer = [], t = 0; t < this.sendBuffer.length; t++)
3354
+ this.packet(this.sendBuffer[t]);
3355
+ this.sendBuffer = [];
3356
+ }),
3357
+ (r.prototype.ondisconnect = function () {
3358
+ (u('server disconnect (%s)', this.nsp), this.destroy(), this.onclose('io server disconnect'));
3359
+ }),
3360
+ (r.prototype.destroy = function () {
3361
+ if (this.subs) {
3362
+ for (var t = 0; t < this.subs.length; t++) this.subs[t].destroy();
3363
+ this.subs = null;
3364
+ }
3365
+ this.io.destroy(this);
3366
+ }),
3367
+ (r.prototype.close = r.prototype.disconnect =
3368
+ function () {
3369
+ return (
3370
+ this.connected &&
3371
+ (u('performing disconnect (%s)', this.nsp), this.packet({ type: o.DISCONNECT })),
3372
+ this.destroy(),
3373
+ this.connected && this.onclose('io client disconnect'),
3374
+ this
3375
+ );
3376
+ }),
3377
+ (r.prototype.compress = function (t) {
3378
+ return ((this.flags.compress = t), this);
3379
+ }),
3380
+ (r.prototype.binary = function (t) {
3381
+ return ((this.flags.binary = t), this);
3382
+ }));
3383
+ },
3384
+ function (t, e) {
3385
+ function n(t, e) {
3386
+ var n = [];
3387
+ e = e || 0;
3388
+ for (var r = e || 0; r < t.length; r++) n[r - e] = t[r];
3389
+ return n;
3390
+ }
3391
+ t.exports = n;
3392
+ },
3393
+ function (t, e) {
3394
+ function n(t, e, n) {
3395
+ return (
3396
+ t.on(e, n),
3397
+ {
3398
+ destroy: function () {
3399
+ t.removeListener(e, n);
3400
+ },
3401
+ }
3402
+ );
3403
+ }
3404
+ t.exports = n;
3405
+ },
3406
+ function (t, e) {
3407
+ var n = [].slice;
3408
+ t.exports = function (t, e) {
3409
+ if (('string' == typeof e && (e = t[e]), 'function' != typeof e))
3410
+ throw new Error('bind() requires a function');
3411
+ var r = n.call(arguments, 2);
3412
+ return function () {
3413
+ return e.apply(t, r.concat(n.call(arguments)));
3414
+ };
3415
+ };
3416
+ },
3417
+ function (t, e) {
3418
+ function n(t) {
3419
+ ((t = t || {}),
3420
+ (this.ms = t.min || 100),
3421
+ (this.max = t.max || 1e4),
3422
+ (this.factor = t.factor || 2),
3423
+ (this.jitter = t.jitter > 0 && t.jitter <= 1 ? t.jitter : 0),
3424
+ (this.attempts = 0));
3425
+ }
3426
+ ((t.exports = n),
3427
+ (n.prototype.duration = function () {
3428
+ var t = this.ms * Math.pow(this.factor, this.attempts++);
3429
+ if (this.jitter) {
3430
+ var e = Math.random(),
3431
+ n = Math.floor(e * this.jitter * t);
3432
+ t = 0 == (1 & Math.floor(10 * e)) ? t - n : t + n;
3433
+ }
3434
+ return 0 | Math.min(t, this.max);
3435
+ }),
3436
+ (n.prototype.reset = function () {
3437
+ this.attempts = 0;
3438
+ }),
3439
+ (n.prototype.setMin = function (t) {
3440
+ this.ms = t;
3441
+ }),
3442
+ (n.prototype.setMax = function (t) {
3443
+ this.max = t;
3444
+ }),
3445
+ (n.prototype.setJitter = function (t) {
3446
+ this.jitter = t;
3447
+ }));
3448
+ },
3449
+ ]);
3450
+ });
3451
+ //# sourceMappingURL=socket.io.js.map