1import{g as Rt,a as St}from"./_commonjsHelpers-CVXumQ-_.js";import"./photoswipe-n7lXYKL2.js";function Et(u,i){for(var f=0;f<i.length;f++){const a=i[f];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in u)){const c=Object.getOwnPropertyDescriptor(a,l);c&&Object.defineProperty(u,l,c.get?c:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var U={exports:{}},Y,Ee;function mt(){if(Ee)return Y;Ee=1;var u=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,i=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];Y=function(c){var d=c,o=c.indexOf("["),h=c.indexOf("]");o!=-1&&h!=-1&&(c=c.substring(0,o)+c.substring(o,h).replace(/:/g,";")+c.substring(h,c.length));for(var r=u.exec(c||""),t={},e=14;e--;)t[i[e]]=r[e]||"";return o!=-1&&h!=-1&&(t.source=d,t.host=t.host.substring(1,t.host.length-1).replace(/;/g,":"),t.authority=t.authority.replace("[","").replace("]","").replace(/;/g,":"),t.ipv6uri=!0),t.pathNames=f(t,t.path),t.queryKey=a(t,t.query),t};function f(l,c){var d=/\/{2,9}/g,o=c.replace(d,"/").split("/");return(c.substr(0,1)=="/"||c.length===0)&&o.splice(0,1),c.substr(c.length-1,1)=="/"&&o.splice(o.length-1,1),o}function a(l,c){var d={};return c.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,h,r){h&&(d[h]=r)}),d}return Y}var M={exports:{}}
1,L={exports:{}},G,Ne;function Nt(){if(Ne)return G;Ne=1;var u=1e3,i=u*60,f=i*60,a=f*24,l=a*365.25;G=function(r,t){t=t||{};var e=typeof r;if(e==="string"&&r.length>0)return c(r);if(e==="number"&&isNaN(r)===!1)return t.long?o(r):d(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function c(r){if(r=String(r),!(r.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(t){var e=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return e*l;case"days":case"day":case"d":return e*a;case"hours":case"hour":case"hrs":case"hr":case"h":return e*f;case"minutes":case"minute":case"mins":case"min":case"m":return e*i;case"seconds":case"second":case"secs":case"sec":case"s":return e*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function d(r){return r>=a?Math.round(r/a)+"d":r>=f?Math.round(r/f)+"h":r>=i?Math.round(r/i)+"m":r>=u?Math.round(r/u)+"s":r+"ms"}function o(r){return h(r,a,"day")||h(r,f,"hour")||h(r,i,"minute")||h(r,u,"second")||r+" ms"}function h(r,t,e){if(!(r<t))return r<t*1.5?Math.floor(r/t)+" "+e:Math.ceil(r/t)+" "+e+"s"}return G}var Te;function Tt(){return Te||(Te=1,(function(u,i){i=u.exports=a.debug=a.default=a,i.coerce=h,i.disable=d,i.enable=c,i.enabled=o,i.humanize=Nt(),i.instances=[],i.names=[],i.skips=[],i.formatters={};function f(r){var t=0,e;for(e in r)t=(t<<5)-t+r.charCodeAt(e),t|=0;return i.colors[Math.abs(t)%i.colors.length]}function a(r){var t;function e(){if(e.enabled){var n=e,s=+new Date,y=s-(t||s);n.diff=y,n.prev=t,n.curr=s,t=s;for(var g=new Array(arguments.length),w=0;w<g.length;w++)g[w]=arguments[w];g[0]=i.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");var k=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,function(B,p){if(B==="%%")return B;k++;var m=i.formatters[p];if(typeof m=="function"){var b=g[k];B=m.call(n,b),g.splice(k,1),k--}return B}),i.formatArgs.call(n,g);var v=e.log||i.log||console.log.bind(console);v.apply(n,g)}}return e.namespace=r,e.enabled=i.enabled(r),e.useColors=i.useColors(),e.color=f(r),e.destroy=l,typeof i.init=="function"&&i.init(e),i.instances.push(e),e}function l(){var r=i.instances.indexOf(this);return r!==-1?(i.instances.splice(r,1),!0):!1}function c(r){i.save(r),i.names=[],i.skips=[];var t,e=(typeof r=="string"?r:"").split(/[\s,]+/),n=e.length;for(t=0;t<n;t++)e[t]&&(r=e[t].replace(/\*/g,".*?"),r[0]==="-"?i.skips.push(new RegExp("^"+r.substr(1)+"$")):i.names.push(new RegExp("^"+r+"$")));for(t=0;t<i.instances.length;t++){var s=i.instances[t];s.enabled=i.enabled(s.namespace)}}function d(){i.enable("")}function o(r){if(r[r.length-1]==="*")return!0;var t,e;for(t=0,e=i.skips.length;t<e;t++)if(i.skips[t].test(r))return!1;for(t=0,e=i.names.length;t<e;t++)if(i.names[t].test(r))return!0;return!1}function h(r){return r instanceof Error?r.stack||r.message:r}})(L,L.exports)),L.exports}var Pe;function T(){return Pe||(Pe=1,(function(u,i){var f={};i=u.exports=Tt(),i.log=c,i.formatArgs=l,i.save=d,i.load=o,i.useColors=a,i.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:h(),i.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"];function a(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}i.formatters.j=function(r){try{return JSON.stringify(r)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function l(r){var t=this.useColors;if(r[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+r[0]+(t?"%c ":" ")+"+"+i.humanize(this.diff),!!t){var e="color: "+this.color;r.splice(1,0,e,"color: inherit");var n=0,s=0;r[0].replace(/%[a-zA-Z%]/g,function(y){y!=="%%"&&(n++,y==="%c"&&(s=n))}),r.splice(s,0,e)}}function c(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function d(r){try{r==null?i.storage.removeItem("debug"):i.storage.debug=r}catch{}}function o(){var r;try{r=i.storage.debug}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=f.DEBUG),r}i.enable(o());function h(){try{return window.localStorage}catch{}}}
1)(M,M.exports)),M.exports}var Q,_e;function Pt(){if(_e)return Q;_e=1;var u=mt(),i=T()("socket.io-client:url");Q=f;function f(a,l){var c=a;l=l||typeof location<"u"&&location,a==null&&(a=l.protocol+"//"+l.host),typeof a=="string"&&(a.charAt(0)==="/"&&(a.charAt(1)==="/"?a=l.protocol+a:a=l.host+a),/^(https?|wss?):\/\//.test(a)||(i("protocol-less url %s",a),typeof l<"u"?a=l.protocol+"//"+a:a="https://"+a),i("parse %s",a),c=u(a)),c.port||(/^(http|ws)$/.test(c.protocol)?c.port="80":/^(http|ws)s$/.test(c.protocol)&&(c.port="443")),c.path=c.path||"/";var d=c.host.indexOf(":")!==-1,o=d?"["+c.host+"]":c.host;return c.id=c.protocol+"://"+o+":"+c.port,c.href=c.protocol+"://"+o+(l&&l.port===c.port?"":":"+c.port),c}return Q}var Z={},$={exports:{}},Oe;function D(){return Oe||(Oe=1,(function(u){u.exports=i;function i(a){if(a)return f(a)}function f(a){for(var l in i.prototype)a[l]=i.prototype[l];return a}i.prototype.on=i.prototype.addEventListener=function(a,l){return this._callbacks=this._callbacks||{},(this._callbacks["$"+a]=this._callbacks["$"+a]||[]).push(l),this},i.prototype.once=function(a,l){function c(){this.off(a,c),l.apply(this,arguments)}return c.fn=l,this.on(a,c),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(a,l){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var c=this._callbacks["$"+a];if(!c)return this;if(arguments.length==1)return delete this._callbacks["$"+a],this;for(var d,o=0;o<c.length;o++)if(d=c[o],d===l||d.fn===l){c.splice(o,1);break}return c.length===0&&delete this._callbacks["$"+a],this},i.prototype.emit=function(a){this._callbacks=this._callbacks||{};for(var l=new Array(arguments.length-1),c=this._callbacks["$"+a],d=1;d<arguments.length;d++)l[d-1]=arguments[d];if(c){c=c.slice(0);for(var d=0,o=c.length;d<o;++d)c[d].apply(this,l)}return this},i.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks["$"+a]||[]},i.prototype.hasListeners=function(a){return!!this.listeners(a).length}})($)),$.exports}var I={},ee,De;function qe(){if(De)return ee;De=1;var u={}.toString;return ee=Array.isArray||function(i){return u.call(i)=="[object Array]"},ee}var te,Ie;function bt(){if(Ie)return te;Ie=1,te=a;var u=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",i=typeof ArrayBuffer=="function",f=function(l){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(l):l.buffer instanceof ArrayBuffer};function a(l){return u&&Buffer.isBuffer(l)||i&&(l instanceof ArrayBuffer||f(l))}return te}var Ue;function _t(){if(Ue)return I;Ue=1;var u=qe(),i=bt(),f=Object.prototype.toString,a=typeof Blob=="function"||typeof Blob<"u"&&f.call(Blob)==="[object BlobConstructor]",l=typeof File=="function"||typeof File<"u"&&f.call(File)==="[object FileConstructor]";I.deconstructPacket=function(o){var h=[],r=o.data,t=o;return t.data=c(r,h),t.attachments=h.length,{packet:t,buffers:h}};function c(o,h){if(!o)return o;if(i(o)){var r={_placeholder:!0,num:h.length};return h.push(o),r}else if(u(o)){for(var t=new Array(o.length),e=0;e<o.length;e++)t[e]=c(o[e],h);return t}else if(typeof o=="object"&&!(o instanceof Date)){var t={};for(var n in o)t[n]=c(o[n],h);return t}return o}I.reconstructPacket=function(o,h){return o.data=d(o.data,h),o.attachments=void 0,o};function d(o,h){if(!o)return o;if(o&&o._placeholder===!0){var r=typeof o.num=="number"&&o.num>=0&&o.num<h.length;if(r)return h[o.num];throw new Error("illegal attachments")}else if(u(o))for(var t=0;t<o.length;t++)o[t]=d(o[t],h);else if(typeof o=="object")for(var e in o)o[e]=d(o[e],h);return o}return I.removeBlobs=function(o,h){function r(n,s,y){if(!n)return n;if(a&&n instanceof Blob||l&&n instanceof File){t++;var g=new FileReader;g.onload=function(){y?y[s]=this.result:e=this.result,--t||h(e)},g.readAsArrayBuffer(n)}else if(u(n))for(var w=0;w<n.length;w++)r(n[w],w,n);else if(typeof n=="object"&&!i(n))for(var k in n)r(n[k],k,n)}var t=0,e=o;r(e),t||h(e)},I}var Me;function Fe(){return Me||(Me=1,(function(u){var i=T()("socket.io-parser"),f=D(),a=_t(),l=qe(),c=bt();u.protocol=4,u.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],u.CONNECT=0,u.DISCONNECT=1,u.EVENT=2,u.ACK=3,u.ERROR=4,u.BINARY_EVENT=5,u.BINARY_ACK=6,u.Encoder=d,u.Decoder=e;function d(){}var o=u.ERROR+'"encode error"';d.prototype.encode=function(v,B){if(i("encoding packet %j",v),u.BINARY_EVENT===v.type||u.BINARY_ACK===v.type)t(v,B);
1else{var p=h(v);B([p])}};function h(v){var B=""+v.type;if((u.BINARY_EVENT===v.type||u.BINARY_ACK===v.type)&&(B+=v.attachments+"-"),v.nsp&&v.nsp!=="/"&&(B+=v.nsp+","),v.id!=null&&(B+=v.id),v.data!=null){var p=r(v.data);if(p!==!1)B+=p;else return o}return i("encoded %j as %s",v,B),B}function r(v){try{return JSON.stringify(v)}catch{return!1}}function t(v,B){function p(m){var b=a.deconstructPacket(m),C=h(b.packet),A=b.buffers;A.unshift(C),B(A)}a.removeBlobs(v,p)}function e(v){this.reconstructor=null,v=v||{},this.opts={maxAttachments:v.maxAttachments||10}}f(e.prototype),e.prototype.add=function(v){var B;if(typeof v=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");B=s(v,this.opts.maxAttachments),u.BINARY_EVENT===B.type||u.BINARY_ACK===B.type?(this.reconstructor=new g(B),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",B)):this.emit("decoded",B)}else if(c(v)||v.base64)if(this.reconstructor)B=this.reconstructor.takeBinaryData(v),B&&(this.reconstructor=null,this.emit("decoded",B));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+v)};function n(v,B){switch(v){case 0:return typeof B=="object";case 1:return B===void 0;case 4:return typeof B=="string"||typeof B=="object";case 2:case 5:return l(B)&&(typeof B[0]=="string"||typeof B[0]=="number");case 3:case 6:return l(B)}}function s(v,B){var p=0,m={type:Number(v.charAt(0))};if(u.types[m.type]==null)return w("unknown packet type "+m.type);if(u.BINARY_EVENT===m.type||u.BINARY_ACK===m.type){for(var b=p+1;v.charAt(++p)!=="-"&&p!=v.length;);var C=v.substring(b,p);if(C!=Number(C)||v.charAt(p)!=="-")throw new Error("Illegal attachments");var A=Number(C);if(!k(A)||A<0)throw new Error("Illegal attachments");if(A>B)throw new Error("too many attachments");m.attachments=A}if(v.charAt(p+1)==="/"){for(var b=p+1;++p;){var q=v.charAt(p);if(q===","||p===v.length)break}m.nsp=v.substring(b,p)}else m.nsp="/";var F=v.charAt(p+1);if(F!==""&&Number(F)==F){for(var b=p+1;++p;){var q=v.charAt(p);if(q==null||Number(q)!=q){--p;break}if(p===v.length)break}m.id=Number(v.substring(b,p+1))}if(v.charAt(++p)){var x=y(v.substr(p));if(n(m.type,x))m.data=x;else throw new Error("invalid payload")}return i("decoded %s as %j",v,m),m}function y(v){try{return JSON.parse(v)}catch{return!1}}e.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function g(v){this.reconPack=v,this.buffers=[]}g.prototype.takeBinaryData=function(v){if(this.buffers.push(v),this.buffers.length===this.reconPack.attachments){var B=a.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),B}return null},g.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function w(v){return{type:u.ERROR,data:"parser error: "+v}}var k=Number.isInteger||function(v){return typeof v=="number"&&isFinite(v)&&Math.floor(v)===v}})(Z)),Z}var H={exports:{}},X={},z={exports:{}},Le;function Ot(){if(Le)return z.exports;Le=1;try{z.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{z.exports=!1}return z.exports}var re,He;function xe(){return He||(He=1,re=(function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()})()),re}var ne,Xe;function Re(){if(Xe)return ne;Xe=1;var u=Ot(),i=xe();return ne=function(f){var a=f.xdomain,l=f.xscheme,c=f.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!a||u))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!l&&c)return new XDomainRequest}catch{}if(!a)try{return new i[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},ne}var W={exports:{}},ie={},oe,ze;function Dt(){return ze||(ze=1,oe=Object.keys||function(i){var f=[],a=Object.prototype.hasOwnProperty;
1for(var l in i)a.call(i,l)&&f.push(l);return f}),oe}var se,We;function wt(){if(We)return se;We=1;var u=qe(),i=Object.prototype.toString,f=typeof Blob=="function"||typeof Blob<"u"&&i.call(Blob)==="[object BlobConstructor]",a=typeof File=="function"||typeof File<"u"&&i.call(File)==="[object FileConstructor]";se=l;function l(c){if(!c||typeof c!="object")return!1;if(u(c)){for(var d=0,o=c.length;d<o;d++)if(l(c[d]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(c)||typeof ArrayBuffer=="function"&&c instanceof ArrayBuffer||f&&c instanceof Blob||a&&c instanceof File)return!0;if(c.toJSON&&typeof c.toJSON=="function"&&arguments.length===1)return l(c.toJSON(),!0);for(var h in c)if(Object.prototype.hasOwnProperty.call(c,h)&&l(c[h]))return!0;return!1}return se}var ae,Je;function It(){return Je||(Je=1,ae=function(u,i,f){var a=u.byteLength;if(i=i||0,f=f||a,u.slice)return u.slice(i,f);if(i<0&&(i+=a),f<0&&(f+=a),f>a&&(f=a),i>=a||i>=f||a===0)return new ArrayBuffer(0);for(var l=new Uint8Array(u),c=new Uint8Array(f-i),d=i,o=0;d<f;d++,o++)c[o]=l[d];return c.buffer}),ae}var ce,je;function Ut(){if(je)return ce;je=1,ce=u;function u(f,a,l){var c=!1;return l=l||i,d.count=f,f===0?a():d;function d(o,h){if(d.count<=0)throw new Error("after called too many times");--d.count,o?(c=!0,a(o),a=l):d.count===0&&!c&&a(null,h)}}function i(){}return ce}/*! https://mths.be/utf8js v2.1.2 by @mathias */var ue,Ke;function Mt(){if(Ke)return ue;Ke=1;var u=String.fromCharCode;function i(s){for(var y=[],g=0,w=s.length,k,v;g<w;)k=s.charCodeAt(g++),k>=55296&&k<=56319&&g<w?(v=s.charCodeAt(g++),(v&64512)==56320?y.push(((k&1023)<<10)+(v&1023)+65536):(y.push(k),g--)):y.push(k);return y}function f(s){for(var y=s.length,g=-1,w,k="";++g<y;)w=s[g],w>65535&&(w-=65536,k+=u(w>>>10&1023|55296),w=56320|w&1023),k+=u(w);return k}function a(s,y){if(s>=55296&&s<=57343){if(y)throw Error("Lone surrogate U+"+s.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function l(s,y){return u(s>>y&63|128)}function c(s,y){if((s&4294967168)==0)return u(s);var g="";return(s&4294965248)==0?g=u(s>>6&31|192):(s&4294901760)==0?(a(s,y)||(s=65533),g=u(s>>12&15|224),g+=l(s,6)):(s&4292870144)==0&&(g=u(s>>18&7|240),g+=l(s,12),g+=l(s,6)),g+=u(s&63|128),g}function d(s,y){y=y||{};for(var g=y.strict!==!1,w=i(s),k=w.length,v=-1,B,p="";++v<k;)B=w[v],p+=c(B,g);return p}function o(){if(e>=t)throw Error("Invalid byte index");var s=r[e]&255;if(e++,(s&192)==128)return s&63;throw Error("Invalid continuation byte")}function h(s){var y,g,w,k,v;if(e>t)throw Error("Invalid byte index");if(e==t)return!1;if(y=r[e]&255,e++,(y&128)==0)return y;if((y&224)==192){if(g=o(),v=(y&31)<<6|g,v>=128)return v;throw Error("Invalid continuation byte")}if((y&240)==224){if(g=o(),w=o(),v=(y&15)<<12|g<<6|w,v>=2048)return a(v,s)?v:65533;throw Error("Invalid continuation byte")}if((y&248)==240&&(g=o(),w=o(),k=o(),v=(y&7)<<18|g<<12|w<<6|k,v>=65536&&v<=1114111))return v;throw Error("Invalid UTF-8 detected")}var r,t,e;function n(s,y){y=y||{};var g=y.strict!==!1;r=i(s),t=r.length,e=0;for(var w=[],k;(k=h(g))!==!1;)w.push(k);return f(w)}return ue={version:"2.1.2",encode:d,decode:n},ue}var J={},Ve;function Lt(){return Ve||(Ve=1,(function(u){J.encode=function(i){var f=new Uint8Array(i),a,l=f.length,c="";for(a=0;a<l;a+=3)c+=u[f[a]>>2],c+=u[(f[a]&3)<<4|f[a+1]>>4],c+=u[(f[a+1]&15)<<2|f[a+2]>>6],c+=u[f[a+2]&63];return l%3===2?c=c.substring(0,c.length-1)+"=":l%3===1&&(c=c.substring(0,c.length-2)+"=="),c},J.decode=function(i){var f=i.length*.75,a=i.length,l,c=0,d,o,h,r;i[i.length-1]==="="&&(f--,i[i.length-2]==="="&&f--);var t=new ArrayBuffer(f),e=new Uint8Array(t);for(l=0;l<a;l+=4)d=u.indexOf(i[l]),o=u.indexOf(i[l+1]),h=u.indexOf(i[l+2]),r=u.indexOf(i[l+3]),e[c++]=d<<2|o>>4,e[c++]=(o&15)<<4|h>>2,e[c++]=(h&3)<<6|r&63;return t}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),J}var fe,Ye;function Ht(){if(Ye)return fe;Ye=1;var u=typeof u<"u"?u:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,i=(function(){try{var o=new Blob(["hi"]);return o.size===2}catch{return!1}})(),f=i&&(function(){try{var o=new Blob([new Uint8Array([1,2])]);return o.size===2}catch{return!1}})(),a=u&&u.prototype.append&&u.prototype.getBlob;function l(o){return o.map(function(h){if(h.buffer instanceof ArrayBuffer){var r=h.buffer;if(h.byteLength!==r.byteLength){var t=new Uint8Array(h.byteLength);t.set(new Uint8Array(r,h.byteOffset,h.byteLength)),r=t.buffer}return r}return h})}function c(o,h){h=h||{};var r=new u;
1return l(o).forEach(function(t){r.append(t)}),h.type?r.getBlob(h.type):r.getBlob()}function d(o,h){return new Blob(l(o),h||{})}return typeof Blob<"u"&&(c.prototype=Blob.prototype,d.prototype=Blob.prototype),fe=(function(){return i?f?Blob:d:a?c:void 0})(),fe}var Ge;function O(){return Ge||(Ge=1,(function(u){var i=Dt(),f=wt(),a=It(),l=Ut(),c=Mt(),d;typeof ArrayBuffer<"u"&&(d=Lt());var o=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),h=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),r=o||h;u.protocol=3;var t=u.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},e=i(t),n={type:"error",data:"parser error"},s=Ht();u.encodePacket=function(p,m,b,C){typeof m=="function"&&(C=m,m=!1),typeof b=="function"&&(C=b,b=null);var A=p.data===void 0?void 0:p.data.buffer||p.data;if(typeof ArrayBuffer<"u"&&A instanceof ArrayBuffer)return g(p,m,C);if(typeof s<"u"&&A instanceof s)return k(p,m,C);if(A&&A.base64)return y(p,C);var q=t[p.type];return p.data!==void 0&&(q+=b?c.encode(String(p.data),{strict:!1}):String(p.data)),C(""+q)};function y(p,m){var b="b"+u.packets[p.type]+p.data.data;return m(b)}function g(p,m,b){if(!m)return u.encodeBase64Packet(p,b);var C=p.data,A=new Uint8Array(C),q=new Uint8Array(1+C.byteLength);q[0]=t[p.type];for(var F=0;F<A.length;F++)q[F+1]=A[F];return b(q.buffer)}function w(p,m,b){if(!m)return u.encodeBase64Packet(p,b);var C=new FileReader;return C.onload=function(){u.encodePacket({type:p.type,data:C.result},m,!0,b)},C.readAsArrayBuffer(p.data)}function k(p,m,b){if(!m)return u.encodeBase64Packet(p,b);if(r)return w(p,m,b);var C=new Uint8Array(1);C[0]=t[p.type];var A=new s([C.buffer,p.data]);return b(A)}u.encodeBase64Packet=function(p,m){var b="b"+u.packets[p.type];if(typeof s<"u"&&p.data instanceof s){var C=new FileReader;return C.onload=function(){var R=C.result.split(",")[1];m(b+R)},C.readAsDataURL(p.data)}var A;try{A=String.fromCharCode.apply(null,new Uint8Array(p.data))}catch{for(var q=new Uint8Array(p.data),F=new Array(q.length),x=0;x<q.length;x++)F[x]=q[x];A=String.fromCharCode.apply(null,F)}return b+=btoa(A),m(b)},u.decodePacket=function(p,m,b){if(p===void 0)return n;if(typeof p=="string"){if(p.charAt(0)==="b")return u.decodeBase64Packet(p.substr(1),m);if(b&&(p=v(p),p===!1))return n;var A=p.charAt(0);return Number(A)!=A||!e[A]?n:p.length>1?{type:e[A],data:p.substring(1)}:{type:e[A]}}var C=new Uint8Array(p),A=C[0],q=a(p,1);return s&&m==="blob"&&(q=new s([q])),{type:e[A],data:q}};function v(p){try{p=c.decode(p,{strict:!1})}catch{return!1}return p}u.decodeBase64Packet=function(p,m){var b=e[p.charAt(0)];if(!d)return{type:b,data:{base64:!0,data:p.substr(1)}};var C=d.decode(p.substr(1));return m==="blob"&&s&&(C=new s([C])),{type:b,data:C}},u.encodePayload=function(p,m,b){typeof m=="function"&&(b=m,m=null);var C=f(p);if(m&&C)return s&&!r?u.encodePayloadAsBlob(p,b):u.encodePayloadAsArrayBuffer(p,b);if(!p.length)return b("0:");function A(F){return F.length+":"+F}function q(F,x){u.encodePacket(F,C?m:!1,!1,function(R){x(null,A(R))})}B(p,q,function(F,x){return b(x.join(""))})};function B(p,m,b){for(var C=new Array(p.length),A=l(p.length,b),q=function(x,R,S){m(R,function(E,N){C[x]=N,S(E,C)})},F=0;F<p.length;F++)q(F,p[F],A)}u.decodePayload=function(p,m,b){if(typeof p!="string")return u.decodePayloadAsBinary(p,m,b);typeof m=="function"&&(b=m,m=null);var C;if(p==="")return b(n,0,1);for(var A="",q,F,x=0,R=p.length;x<R;x++){var S=p.charAt(x);if(S!==":"){A+=S;continue}if(A===""||A!=(q=Number(A))||(F=p.substr(x+1,q),A!=F.length))return b(n,0,1);if(F.length){if(C=u.decodePacket(F,m,!1),n.type===C.type&&n.data===C.data)return b(n,0,1);var E=b(C,x+q,R);if(E===!1)return}x+=q,A=""}if(A!=="")return b(n,0,1)},u.encodePayloadAsArrayBuffer=function(p,m){if(!p.length)return m(new ArrayBuffer(0));function b(C,A){u.encodePacket(C,!0,!0,function(q){return A(null,q)})}B(p,b,function(C,A){var q=A.reduce(function(R,S){var E;return typeof S=="string"?E=S.length:E=S.byteLength,R+E.toString().length+E+2},0),F=new Uint8Array(q),x=0;return A.forEach(function(R){var S=typeof R=="string",E=R;if(S){for(var _=new Uint8Array(R.length),N=0;N<R.length;
1N++)_[N]=R.charCodeAt(N);E=_.buffer}S?F[x++]=0:F[x++]=1;for(var P=E.byteLength.toString(),N=0;N<P.length;N++)F[x++]=parseInt(P[N]);F[x++]=255;for(var _=new Uint8Array(E),N=0;N<_.length;N++)F[x++]=_[N]}),m(F.buffer)})},u.encodePayloadAsBlob=function(p,m){function b(C,A){u.encodePacket(C,!0,!0,function(q){var F=new Uint8Array(1);if(F[0]=1,typeof q=="string"){for(var x=new Uint8Array(q.length),R=0;R<q.length;R++)x[R]=q.charCodeAt(R);q=x.buffer,F[0]=0}for(var S=q instanceof ArrayBuffer?q.byteLength:q.size,E=S.toString(),N=new Uint8Array(E.length+1),R=0;R<E.length;R++)N[R]=parseInt(E[R]);if(N[E.length]=255,s){var P=new s([F.buffer,N.buffer,q]);A(null,P)}})}B(p,b,function(C,A){return m(new s(A))})},u.decodePayloadAsBinary=function(p,m,b){typeof m=="function"&&(b=m,m=null);for(var C=p,A=[];C.byteLength>0;){for(var q=new Uint8Array(C),F=q[0]===0,x="",R=1;q[R]!==255;R++){if(x.length>310)return b(n,0,1);x+=q[R]}C=a(C,2+x.length),x=parseInt(x);var S=a(C,0,x);if(F)try{S=String.fromCharCode.apply(null,new Uint8Array(S))}catch{var E=new Uint8Array(S);S="";for(var R=0;R<E.length;R++)S+=String.fromCharCode(E[R])}A.push(S),C=a(C,x)}var N=A.length;A.forEach(function(P,_){b(u.decodePacket(P,m,!0),_,N)})}})(ie)),ie}var he,Qe;function Se(){if(Qe)return he;Qe=1;var u=O(),i=D();he=f;function f(a){this.path=a.path,this.hostname=a.hostname,this.port=a.port,this.secure=a.secure,this.query=a.query,this.timestampParam=a.timestampParam,this.timestampRequests=a.timestampRequests,this.readyState="",this.agent=a.agent||!1,this.socket=a.socket,this.enablesXDR=a.enablesXDR,this.withCredentials=a.withCredentials,this.pfx=a.pfx,this.key=a.key,this.passphrase=a.passphrase,this.cert=a.cert,this.ca=a.ca,this.ciphers=a.ciphers,this.rejectUnauthorized=a.rejectUnauthorized,this.forceNode=a.forceNode,this.isReactNative=a.isReactNative,this.extraHeaders=a.extraHeaders,this.localAddress=a.localAddress}return i(f.prototype),f.prototype.onError=function(a,l){var c=new Error(a);return c.type="TransportError",c.description=l,this.emit("error",c),this},f.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},f.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},f.prototype.send=function(a){if(this.readyState==="open")this.write(a);else throw new Error("Transport not open")},f.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},f.prototype.onData=function(a){var l=u.decodePacket(a,this.socket.binaryType);this.onPacket(l)},f.prototype.onPacket=function(a){this.emit("packet",a)},f.prototype.onClose=function(){this.readyState="closed",this.emit("close")},he}var j={},Ze;function K(){return Ze||(Ze=1,j.encode=function(u){var i="";for(var f in u)u.hasOwnProperty(f)&&(i.length&&(i+="&"),i+=encodeURIComponent(f)+"="+encodeURIComponent(u[f]));return i},j.decode=function(u){for(var i={},f=u.split("&"),a=0,l=f.length;a<l;a++){var c=f[a].split("=");i[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return i}),j}var le,$e;function V(){return $e||($e=1,le=function(u,i){var f=function(){};f.prototype=i.prototype,u.prototype=new f,u.prototype.constructor=u}),le}var pe,et;function Ct(){if(et)return pe;et=1;var u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i=64,f={},a=0,l=0,c;function d(r){var t="";do t=u[r%i]+t,r=Math.floor(r/i);while(r>0);return t}function o(r){var t=0;for(l=0;l<r.length;l++)t=t*i+f[r.charAt(l)];return t}function h(){var r=d(+new Date);return r!==c?(a=0,c=r):r+"."+d(a++)}for(;l<i;l++)f[u[l]]=l;return h.encode=d,h.decode=o,pe=h,pe}var de,tt;function Bt(){if(tt)return de;tt=1;var u=Se(),i=K(),f=O(),a=V(),l=Ct(),c=T()("engine.io-client:polling");de=o;var d=(function(){var h=Re(),r=new h({xdomain:!1});return r.responseType!=null})();function o(h){var r=h&&h.forceBase64;(!d||r)&&(this.supportsBinary=!1),u.call(this,h)}return a(o,u),o.prototype.name="polling",o.prototype.doOpen=function(){this.poll()},o.prototype.pause=function(h){var r=this;this.readyState="pausing";function t(){c("paused"),r.readyState="paused",h()}if(this.polling||!this.writable){var e=0;this.polling&&(c("we are currently polling - waiting to pause"),e++,this.once("pollComplete",function(){c("pre-pause polling complete"),--e||t()})),this.writable||(c("we are currently writing - waiting to pause"),e++,this.once("drain",function(){c("pre-pause writing complete"),--e||t()}))}else t()},o.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit
1("poll")},o.prototype.onData=function(h){var r=this;c("polling got data %s",h);var t=function(e,n,s){if(r.readyState==="opening"&&e.type==="open"&&r.onOpen(),e.type==="close")return r.onClose(),!1;r.onPacket(e)};f.decodePayload(h,this.socket.binaryType,t),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},o.prototype.doClose=function(){var h=this;function r(){c("writing close packet"),h.write([{type:"close"}])}this.readyState==="open"?(c("transport open - closing"),r()):(c("transport not open - deferring close"),this.once("open",r))},o.prototype.write=function(h){var r=this;this.writable=!1;var t=function(){r.writable=!0,r.emit("drain")};f.encodePayload(h,this.supportsBinary,function(e){r.doWrite(e,t)})},o.prototype.uri=function(){var h=this.query||{},r=this.secure?"https":"http",t="";this.timestampRequests!==!1&&(h[this.timestampParam]=l()),!this.supportsBinary&&!h.sid&&(h.b64=1),h=i.encode(h),this.port&&(r==="https"&&Number(this.port)!==443||r==="http"&&Number(this.port)!==80)&&(t=":"+this.port),h.length&&(h="?"+h);var e=this.hostname.indexOf(":")!==-1;return r+"://"+(e?"["+this.hostname+"]":this.hostname)+t+this.path+h},de}var rt;function Xt(){if(rt)return W.exports;rt=1;var u=Re(),i=Bt(),f=D(),a=V(),l=T()("engine.io-client:polling-xhr"),c=xe();W.exports=o,W.exports.Request=h;function d(){}function o(e){if(i.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,typeof location<"u"){var n=location.protocol==="https:",s=location.port;s||(s=n?443:80),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port,this.xs=e.secure!==n}}a(o,i),o.prototype.supportsBinary=!0,o.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new h(e)},o.prototype.doWrite=function(e,n){var s=typeof e!="string"&&e!==void 0,y=this.request({method:"POST",data:e,isBinary:s}),g=this;y.on("success",n),y.on("error",function(w){g.onError("xhr post error",w)}),this.sendXhr=y},o.prototype.doPoll=function(){l("xhr poll");var e=this.request(),n=this;e.on("data",function(s){n.onData(s)}),e.on("error",function(s){n.onError("xhr poll error",s)}),this.pollXhr=e};function h(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(f(h.prototype),h.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new u(e),s=this;try{l("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(var y in this.extraHeaders)this.extraHeaders.hasOwnProperty(y)&&n.setRequestHeader(y,this.extraHeaders[y])}}catch{}if(this.method==="POST")try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.withCredentials),this.requestTimeout&&(n.timeout=this.requestTimeout),this.hasXDR()?(n.onload=function(){s.onLoad()},n.onerror=function(){s.onError(n.responseText)}):n.onreadystatechange=function(){if(n.readyState===2)try{var g=n.getResponseHeader("Content-Type");(s.supportsBinary&&g==="application/octet-stream"||g==="application/octet-stream; charset=UTF-8")&&(n.responseType="arraybuffer")}catch{}n.readyState===4&&(n.status===200||n.status===1223?s.onLoad():setTimeout(function(){s.onError(typeof n.status=="number"?n.status:0)},0))},l("xhr data %s",this.data),n.send(this.data)}catch(g){setTimeout(function(){s.onError(g)},0);return}typeof document<"u"&&(this.index=h.requestsCount++,h.requests[this.index]=this)}
1,h.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},h.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},h.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},h.prototype.cleanup=function(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=d:this.xhr.onreadystatechange=d,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete h.requests[this.index],this.xhr=null}},h.prototype.onLoad=function(){var e;try{var n;try{n=this.xhr.getResponseHeader("Content-Type")}catch{}n==="application/octet-stream"||n==="application/octet-stream; charset=UTF-8"?e=this.xhr.response||this.xhr.responseText:e=this.xhr.responseText}catch(s){this.onError(s)}e!=null&&this.onData(e)},h.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR},h.prototype.abort=function(){this.cleanup()},h.requestsCount=0,h.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",t);else if(typeof addEventListener=="function"){var r="onpagehide"in c?"pagehide":"unload";addEventListener(r,t,!1)}}function t(){for(var e in h.requests)h.requests.hasOwnProperty(e)&&h.requests[e].abort()}return W.exports}var ye,nt;function zt(){if(nt)return ye;nt=1;var u=Bt(),i=V(),f=xe();ye=o;var a=/\n/g,l=/\\n/g,c;function d(){}function o(h){u.call(this,h),this.query=this.query||{},c||(c=f.___eio=f.___eio||[]),this.index=c.length;var r=this;c.push(function(t){r.onData(t)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){r.script&&(r.script.onerror=d)},!1)}return i(o,u),o.prototype.supportsBinary=!1,o.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),u.prototype.doClose.call(this)},o.prototype.doPoll=function(){var h=this,r=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),r.async=!0,r.src=this.uri(),r.onerror=function(n){h.onError("jsonp poll error",n)};var t=document.getElementsByTagName("script")[0];t?t.parentNode.insertBefore(r,t):(document.head||document.body).appendChild(r),this.script=r;var e=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);e&&setTimeout(function(){var n=document.createElement("iframe");document.body.appendChild(n),document.body.removeChild(n)},100)},o.prototype.doWrite=function(h,r){var t=this;if(!this.form){var e=document.createElement("form"),n=document.createElement("textarea"),s=this.iframeId="eio_iframe_"+this.index,y;e.className="socketio",e.style.position="absolute",e.style.top="-1000px",e.style.left="-1000px",e.target=s,e.method="POST",e.setAttribute("accept-charset","utf-8"),n.name="d",e.appendChild(n),document.body.appendChild(e),this.form=e,this.area=n}this.form.action=this.uri();function g(){w(),r()}function w(){if(t.iframe)try{t.form.removeChild(t.iframe)}catch(v){t.onError("jsonp polling iframe removal error",v)}try{var k='<iframe src="javascript:0" name="'+t.iframeId+'">';y=document.createElement(k)}catch{y=document.createElement("iframe"),y.name=t.iframeId,y.src="javascript:0"}y.id=t.iframeId,t.form.appendChild(y),t.iframe=y}w(),h=h.replace(l,`\\ 2`),this.area.value=h.replace(a,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){t.iframe.readyState==="complete"&&g()}:this.iframe.onload=g},ye}const Wt={},Jt=Object.freeze(Object.defineProperty({__proto__:null,default:Wt},Symbol.toStringTag,{value:"Module"})),jt=Rt(Jt);var ve,it;function Kt(){if(it)return ve;it=1;var u=Se(),i=O(),f=K(),a=V(),l=Ct(),c=T()("engine.io-client:websocket"),d,o;if(typeof WebSocket<"u"?d=WebSocket:typeof self<"u"&&(d=self.WebSocket||self.MozWebSocket),typeof window>"u")try{o=jt}catch{}var h=d||o;ve=r;function r(t){var e=t&&t.forceBase64;e&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=d&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(h=o),u.call(this,t)}return a(r,u),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=this.protocols,n={};this.isReactNative||(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?e?new h(t,e):new h(t):new h(t,e,n)}
2catch(s){return this.emit("error",s)}this.ws.binaryType===void 0&&(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){var e=this;this.writable=!1;for(var n=t.length,s=0,y=n;s<y;s++)(function(w){i.encodePacket(w,e.supportsBinary,function(k){if(!e.usingBrowserWebSocket){var v={};if(w.options&&(v.compress=w.options.compress),e.perMessageDeflate){var B=typeof k=="string"?Buffer.byteLength(k):k.length;B<e.perMessageDeflate.threshold&&(v.compress=!1)}}try{e.usingBrowserWebSocket?e.ws.send(k):e.ws.send(k,v)}catch{c("websocket closed before onclose event")}--n||g()})})(t[s]);function g(){e.emit("flush"),setTimeout(function(){e.writable=!0,e.emit("drain")},0)}},r.prototype.onClose=function(){u.prototype.onClose.call(this)},r.prototype.doClose=function(){typeof this.ws<"u"&&(this.ws.onerror=function(){},this.ws.close())},r.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",n="";this.port&&(e==="wss"&&Number(this.port)!==443||e==="ws"&&Number(this.port)!==80)&&(n=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=l()),this.supportsBinary||(t.b64=1),t=f.encode(t),t.length&&(t="?"+t);var s=this.hostname.indexOf(":")!==-1;return e+"://"+(s?"["+this.hostname+"]":this.hostname)+n+this.path+t},r.prototype.check=function(){return!!h&&!("__initialize"in h&&this.name===r.prototype.name)}
2,ve}var ot;function st(){if(ot)return X;ot=1;var u=Re(),i=Xt(),f=zt(),a=Kt();X.polling=l,X.websocket=a;function l(c){var d,o=!1,h=!1,r=c.jsonp!==!1;if(typeof location<"u"){var t=location.protocol==="https:",e=location.port;e||(e=t?443:80),o=c.hostname!==location.hostname||e!==c.port,h=c.secure!==t}if(c.xdomain=o,c.xscheme=h,d=new u(c),"open"in d&&!c.forceJSONP)return new i(c);if(!r)throw new Error("JSONP disabled");return new f(c)}return X}var ge,at;function At(){if(at)return ge;at=1;var u=[].indexOf;return ge=function(i,f){if(u)return i.indexOf(f);for(var a=0;a<i.length;++a)if(i[a]===f)return a;return-1},ge}var me,ct;function Vt(){if(ct)return me;ct=1;var u=st(),i=D(),f=T()("engine.io-client:socket"),a=At(),l=O(),c=mt(),d=K();me=o;function o(r,t){if(!(this instanceof o))return new o(r,t);t=t||{},r&&typeof r=="object"&&(t=r,r=null),r?(r=c(r),t.hostname=r.host,t.secure=r.protocol==="https"||r.protocol==="wss",t.port=r.port,r.query&&(t.query=r.query)):t.host&&(t.hostname=c(t.host).host),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?443:80),this.query=t.query||{},typeof this.query=="string"&&(this.query=d.decode(this.query)),this.upgrade=t.upgrade!==!1,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=t.jsonp!==!1,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=t.withCredentials!==!1,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=t.perMessageDeflate!==!1?t.perMessageDeflate||{}:!1,this.perMessageDeflate===!0&&(this.perMessageDeflate={}),this.perMessageDeflate&&this.perMessageDeflate.threshold==null&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||void 0,this.key=t.key||void 0,this.passphrase=t.passphrase||void 0,this.cert=t.cert||void 0,this.ca=t.ca||void 0,this.ciphers=t.ciphers||void 0,this.rejectUnauthorized=t.rejectUnauthorized===void 0?!0:t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",(typeof self>"u"||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}o.priorWebsocketSuccess=!1,i(o.prototype),o.protocol=l.protocol,o.Socket=o,o.Transport=Se(),o.transports=st(),o.parser=O(),o.prototype.createTransport=function(r){f('creating transport "%s"',r);var t=h(this.query);t.EIO=l.protocol,t.transport=r;var e=this.transportOptions[r]||{};this.id&&(t.sid=this.id);var n=new u[r]({query:t,socket:this,agent:e.agent||this.agent,hostname:e.hostname||this.hostname,port:e.port||this.port,secure:e.secure||this.secure,path:e.path||this.path,forceJSONP:e.forceJSONP||this.forceJSONP,jsonp:e.jsonp||this.jsonp,forceBase64:e.forceBase64||this.forceBase64,enablesXDR:e.enablesXDR||this.enablesXDR,withCredentials:e.withCredentials||this.withCredentials,timestampRequests:e.timestampRequests||this.timestampRequests,timestampParam:e.timestampParam||this.timestampParam,policyPort:e.policyPort||this.policyPort,pfx:e.pfx||this.pfx,key:e.key||this.key,passphrase:e.passphrase||this.passphrase,cert:e.cert||this.cert,ca:e.ca||this.ca,ciphers:e.ciphers||this.ciphers,rejectUnauthorized:e.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:e.perMessageDeflate||this.perMessageDeflate,extraHeaders:e.extraHeaders||this.extraHeaders,forceNo
2de:e.forceNode||this.forceNode,localAddress:e.localAddress||this.localAddress,requestTimeout:e.requestTimeout||this.requestTimeout,protocols:e.protocols||void 0,isReactNative:this.isReactNative});return n};function h(r){var t={};for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);return t}return o.prototype.open=function(){var r;if(this.rememberUpgrade&&o.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)r="websocket";else if(this.transports.length===0){var t=this;setTimeout(function(){t.emit("error","No transports available")},0);return}else r=this.transports[0];this.readyState="opening";try{r=this.createTransport(r)}catch{this.transports.shift(),this.open();return}r.open(),this.setTransport(r)},o.prototype.setTransport=function(r){f("setting transport %s",r.name);var t=this;this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=r,r.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},o.prototype.probe=function(r){f('probing transport "%s"',r);var t=this.createTransport(r,{probe:1}),e=!1,n=this;o.priorWebsocketSuccess=!1;function s(){if(n.onlyBinaryUpgrades){var p=!this.supportsBinary&&n.transport.supportsBinary;e=e||p}e||(f('probe transport "%s" opened',r),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(m){if(!e)if(m.type==="pong"&&m.data==="probe"){if(f('probe transport "%s" pong',r),n.upgrading=!0,n.emit("upgrading",t),!t)return;o.priorWebsocketSuccess=t.name==="websocket",f('pausing current transport "%s"',n.transport.name),n.transport.pause(function(){e||n.readyState!=="closed"&&(f("changing transport and sending upgrade packet"),B(),n.setTransport(t),t.send([{type:"upgrade"}]),n.emit("upgrade",t),t=null,n.upgrading=!1,n.flush())})}else{f('probe transport "%s" failed',r);var b=new Error("probe error");b.transport=t.name,n.emit("upgradeError",b)}}))}function y(){e||(e=!0,B(),t.close(),t=null)}function g(p){var m=new Error("probe error: "+p);m.transport=t.name,y(),f('probe transport "%s" failed because of error: %s',r,p),n.emit("upgradeError",m)}function w(){g("transport closed")}function k(){g("socket closed")}function v(p){t&&p.name!==t.name&&(f('"%s" works - aborting "%s"',p.name,t.name),y())}function B(){t.removeListener("open",s),t.removeListener("error",g),t.removeListener("close",w),n.removeListener("close",k),n.removeListener("upgrading",v)}t.once("open",s),t.once("error",g),t.once("close",w),this.once("close",k),this.once("upgrading",v),t.open()},o.prototype.onOpen=function(){if(f("socket open"),this.readyState="open",o.priorWebsocketSuccess=this.transport.name==="websocket",this.emit("open"),this.flush(),this.readyState==="open"&&this.upgrade&&this.transport.pause){f("starting upgrade probes");for(var r=0,t=this.upgrades.length;r<t;r++)this.probe(this.upgrades[r])}},o.prototype.onPacket=function(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(f('socket receive: type "%s", data "%s"',r.type,r.data),this.emit("packet",r),this.emit("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=r.data,this.onError(t);break;
2case"message":this.emit("data",r.data),this.emit("message",r.data);break}else f('packet received with socket readyState "%s"',this.readyState)},o.prototype.onHandshake=function(r){this.emit("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this.upgrades=this.filterUpgrades(r.upgrades),this.pingInterval=r.pingInterval,this.pingTimeout=r.pingTimeout,this.onOpen(),this.readyState!=="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},o.prototype.onHeartbeat=function(r){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){t.readyState!=="closed"&&t.onClose("ping timeout")},r||t.pingInterval+t.pingTimeout)},o.prototype.setPing=function(){var r=this;clearTimeout(r.pingIntervalTimer),r.pingIntervalTimer=setTimeout(function(){f("writing ping packet - expecting pong within %sms",r.pingTimeout),r.ping(),r.onHeartbeat(r.pingTimeout)},r.pingInterval)},o.prototype.ping=function(){var r=this;this.sendPacket("ping",function(){r.emit("ping")})},o.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emit("drain"):this.flush()},o.prototype.flush=function(){this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(f("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},o.prototype.write=o.prototype.send=function(r,t,e){return this.sendPacket("message",r,t,e),this},o.prototype.sendPacket=function(r,t,e,n){if(typeof t=="function"&&(n=t,t=void 0),typeof e=="function"&&(n=e,e=null),!(this.readyState==="closing"||this.readyState==="closed")){e=e||{},e.compress=e.compress!==!1;var s={type:r,data:t,options:e};this.emit("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}},o.prototype.close=function(){if(this.readyState==="opening"||this.readyState==="open"){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():t()}):this.upgrading?n():t()}function t(){r.onClose("forced close"),f("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)}return this},o.prototype.onError=function(r){f("socket error %j",r),o.priorWebsocketSuccess=!1,this.emit("error",r),this.onClose("transport error",r)},o.prototype.onClose=function(r,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){f('socket close with reason: "%s"',r);var e=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",r,t),e.writeBuffer=[],e.prevBufferLen=0}},o.prototype.filterUpgrades=function(r){for(var t=[],e=0,n=r.length;e<n;e++)~a(this.transports,r[e])&&t.push(r[e]);return t},me}var ut;function Yt(){return ut||(ut=1,H.exports=Vt(),H.exports.parser=O()),H.exports}var be={exports:{}},we,ft;function Gt(){if(ft)return we;ft=1,we=u;function u(i,f){var a=[];f=f||0;for(var l=f||0;l<i.length;l++)a[l-f]=i[l];return a}return we}var Ce,ht;function kt(){if(ht)return Ce;ht=1,Ce=u;function u(i,f,a){return i.on(f,a),{destroy:function(){i.removeListener(f,a)}}}return Ce}var Be,lt;function qt(){if(lt)return Be;lt=1;var u=[].slice;return Be=function(i,f){if(typeof f=="string"&&(f=i[f]),typeof f!="function")throw new Error("bind() requires a function");var a=u.call(arguments,2);return function(){return f.apply(i,a.concat(u.call(arguments)))}},Be}var pt;function Ft(){return pt||(pt=1,(function(u,i){var f=Fe(),a=D(),l=Gt(),c=kt(),d=qt(),o=T()("socket.io-client:socket"),h=K(),r=wt();u.exports=n;var t={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},e=a.prototype.emit;function n(s,y,g){this.io=s,this.nsp=y,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},g&&g.query&&(this.query=g.query),this.io.autoConnect&&this.open()}a(n.prototype),n.prototype.subEvents=function(){if(!this.subs){var s=this.io;this.subs=[c(s,"open",d(this,"onopen")),c(s,"packet",d(this,"onpacket")),c(s,"close",d(this,"onclose"))]}},n.prototype.open=n.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.reconnecting||this.io.open(),this.io.readyState==="open"&&this.onopen(),this.emit
2("connecting"),this)},n.prototype.send=function(){var s=l(arguments);return s.unshift("message"),this.emit.apply(this,s),this},n.prototype.emit=function(s){if(t.hasOwnProperty(s))return e.apply(this,arguments),this;var y=l(arguments),g={type:(this.flags.binary!==void 0?this.flags.binary:r(y))?f.BINARY_EVENT:f.EVENT,data:y};return g.options={},g.options.compress=!this.flags||this.flags.compress!==!1,typeof y[y.length-1]=="function"&&(o("emitting packet with ack id %d",this.ids),this.acks[this.ids]=y.pop(),g.id=this.ids++),this.connected?this.packet(g):this.sendBuffer.push(g),this.flags={},this},n.prototype.packet=function(s){s.nsp=this.nsp,this.io.packet(s)},n.prototype.onopen=function(){if(o("transport is open - connecting"),this.nsp!=="/")if(this.query){var s=typeof this.query=="object"?h.encode(this.query):this.query;o("sending connect packet with query %s",s),this.packet({type:f.CONNECT,query:s})}else this.packet({type:f.CONNECT})},n.prototype.onclose=function(s){o("close (%s)",s),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",s)},n.prototype.onpacket=function(s){var y=s.nsp===this.nsp,g=s.type===f.ERROR&&s.nsp==="/";if(!(!y&&!g))switch(s.type){case f.CONNECT:this.onconnect();break;case f.EVENT:this.onevent(s);break;case f.BINARY_EVENT:this.onevent(s);break;case f.ACK:this.onack(s);break;case f.BINARY_ACK:this.onack(s);break;case f.DISCONNECT:this.ondisconnect();break;case f.ERROR:this.emit("error",s.data);break}},n.prototype.onevent=function(s){var y=s.data||[];o("emitting event %j",y),s.id!=null&&(o("attaching ack callback to event"),y.push(this.ack(s.id))),this.connected?e.apply(this,y):this.receiveBuffer.push(y)},n.prototype.ack=function(s){var y=this,g=!1;return function(){if(!g){g=!0;var w=l(arguments);o("sending ack %j",w),y.packet({type:r(w)?f.BINARY_ACK:f.ACK,id:s,data:w})}}},n.prototype.onack=function(s){var y=this.acks[s.id];typeof y=="function"?(o("calling ack %s with %j",s.id,s.data),y.apply(this,s.data),delete this.acks[s.id]):o("bad ack %s",s.id)},n.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emit("connect")},n.prototype.emitBuffered=function(){var s;for(s=0;s<this.receiveBuffer.length;s++)e.apply(this,this.receiveBuffer[s]);for(this.receiveBuffer=[],s=0;s<this.sendBuffer.length;s++)this.packet(this.sendBuffer[s]);this.sendBuffer=[]},n.prototype.ondisconnect=function(){o("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},n.prototype.destroy=function(){if(this.subs){for(var s=0;s<this.subs.length;s++)this.subs[s].destroy();this.subs=null}this.io.destroy(this)},n.prototype.close=n.prototype.disconnect=function(){return this.connected&&(o("performing disconnect (%s)",this.nsp),this.packet({type:f.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},n.prototype.compress=function(s){return this.flags.compress=s,this},n.prototype.binary=function(s){return this.flags.binary=s,this}})(be)),be.exports}var Ae,dt;function Qt(){if(dt)return Ae;dt=1,Ae=u;function u(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}return u.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var f=Math.random(),a=Math.floor(f*this.jitter*i);i=(Math.floor(f*10)&1)==0?i-a:i+a}return Math.min(i,this.max)|0},u.prototype.reset=function(){this.attempts=0},u.prototype.setMin=function(i){this.ms=i},u.prototype.setMax=function(i){this.max=i},u.prototype.setJitter=function(i){this.jitter=i},Ae}var ke,yt;function vt(){if(yt)return ke;yt=1;var u=Yt(),i=Ft(),f=D(),a=Fe(),l=kt(),c=qt(),d=T()("socket.io-client:manager"),o=At(),h=Qt(),r=Object.prototype.hasOwnProperty;ke=t;function t(e,n){if(!(this instanceof t))return new t(e,n);e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.nsps={},this.subs=[],this.opts=n,this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor(n.randomizationFactor||.5),this.backoff=new h({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var s=n.parser||a;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this.autoConnect=n.autoConnect!==!1,this.autoConnect&&this.open()}return t.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)r.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},t.prototype.updateSocketIds=function(){for(var e in this.nsps)r.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},t.prototype.generateId=function(e){return(e==="/"?"":e+"#")+this.engine.id},f(t.prototype),t.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},t.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},t.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},t.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},t.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},t.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},t.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},t.prototype.open=t.prototype.connect=function(e,n){if(d("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;d("opening %s",this.uri),this.engine=u(this.uri,this.opts);var s=this.engine,y=this;this.readyState="opening",this.skipReconnect=!1;var g=l(s,"open",function(){y.onopen(),e&&e()}),w=l(s,"error",function(B){if(d("connect_error"),y.cleanup(),y.readyState="closed",y.emitAll("connect_error",B),e){var p=new Error("Connection error");p.data=B,e(p)}else y.maybeReconnectOnOpen()});if(this._timeout!==!1){var k=this._timeout;d("connect attempt will timeout after %d",k),k===0&&g.destroy();var v=setTimeout(function(){d("connect attempt timed out after %d",k),g.destroy(),s.close(),s.emit("error","timeout"),y.emitAll("connect_timeout",k)},k);this.subs.push({destroy:function(){clearTimeout(v)}})}return this.subs.push(g),this.subs.push(w),this},t.prototype.onopen=function(){d("open"),this.cleanup(),this.readyState="open",this.emit
2("open");var e=this.engine;this.subs.push(l(e,"data",c(this,"ondata"))),this.subs.push(l(e,"ping",c(this,"onping"))),this.subs.push(l(e,"pong",c(this,"onpong"))),this.subs.push(l(e,"error",c(this,"onerror"))),this.subs.push(l(e,"close",c(this,"onclose"))),this.subs.push(l(this.decoder,"decoded",c(this,"ondecoded")))},t.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},t.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},t.prototype.ondata=function(e){this.decoder.add(e)},t.prototype.ondecoded=function(e){this.emit("packet",e)},t.prototype.onerror=function(e){d("error",e),this.emitAll("error",e)},t.prototype.socket=function(e,n){var s=this.nsps[e];if(!s){s=new i(this,e,n),this.nsps[e]=s;var y=this;s.on("connecting",g),s.on("connect",function(){s.id=y.generateId(e)}),this.autoConnect&&g()}function g(){~o(y.connecting,s)||y.connecting.push(s)}return s},t.prototype.destroy=function(e){var n=o(this.connecting,e);~n&&this.connecting.splice(n,1),!this.connecting.length&&this.close()},t.prototype.packet=function(e){d("writing packet %j",e);var n=this;e.query&&e.type===0&&(e.nsp+="?"+e.query),n.encoding?n.packetBuffer.push(e):(n.encoding=!0,this.encoder.encode(e,function(s){for(var y=0;y<s.length;y++)n.engine.write(s[y],e.options);n.encoding=!1,n.processPacketQueue()}))},t.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},t.prototype.cleanup=function(){d("cleanup");for(var e=this.subs.length,n=0;n<e;n++){var s=this.subs.shift();s.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},t.prototype.close=t.prototype.disconnect=function(){d("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,this.readyState==="opening"&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},t.prototype.onclose=function(e){d("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},t.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)d("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var n=this.backoff.duration();d("will wait %dms before reconnect attempt",n),this.reconnecting=!0;var s=setTimeout(function(){e.skipReconnect||(d("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),!e.skipReconnect&&e.open(function(y){y?(d("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",y.data)):(d("reconnect success"),e.onreconnect())}))},n);this.subs.push({destroy:function(){clearTimeout(s)}})}},t.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)},ke}var gt;function Zt(){return gt||(gt=1,(function(u,i){var f=Pt(),a=Fe(),l=vt(),c=T()("socket.io-client");u.exports=i=o;var d=i.managers={};function o(h,r){typeof h=="object"&&(r=h,h=void 0),r=r||{};var t=f(h),e=t.source,n=t.id,s=t.path,y=d[n]&&s in d[n].nsps,g=r.forceNew||r["force new connection"]||r.multiplex===!1||y,w;return g?(c("ignoring socket cache for %s",e),w=l(e,r)):(d[n]||(c("new io instance for %s",e),d[n]=l(e,r)),w=d[n]),t.query&&!r.query&&(r.query=t.query),w.socket(t.path,r)}i.protocol=a.protocol,i.connect=o,i.Manager=vt(),i.Socket=Ft()})(U,U.exports)),U.exports}var xt=Zt();const $t=St(xt),rr=Et({__proto__:null,default:$t},[xt]);export{rr as i};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.