!function(t,i){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=i():"function"==typeofdefine&&define.amd?define(i):(t="undefined"!=typeofglobalThis?globalThis:t||self).io=i()}(this,(function(){"use strict";functiont(t,i){returni.forEach((function(i){i&&"string"!=typeofi&&!Array.isArray(i)&&Object.keys(i).forEach((function(n){if("default"!==n&&!(nint)){varr=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){returni[n]}})}}))})),Object.freeze(t)}functioni(t,i){(null==i||i>t.length)&&(i=t.length);for(varn=0,r=Array(i);n<i;n++)r[n]=t[n];returnr}functionn(t,i){for(varn=0;n<i.length;n++){varr=i[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}functionr(t,i,r){returni&&n(t.prototype,i),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}functione(t,n){varr="undefined"!=typeofSymbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeoft)returni(t,n);varr={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,n):void0}}(t))||n&&t&&"number"==typeoft.length){r&&(t=r);vare=0,s=function(){};return{s:s,n:function(){returne>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throwt},f:s}}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}varo,h=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){vart=r.next();returnh=t.done,t},e:function(t){u=!0,o=t},f:function(){try{h||null==r.return||r.return()}finally{if(u)throwo}}}}functions(){returns=Object.assign?Object.assign.bind():function(t){for(vari=1;i<arguments.length;i++){varn=arguments[i];for(varrinn)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}returnt},s.apply(null,arguments)}functiono(t){returno=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){returnt.__proto__||Object.getPrototypeOf(t)},o(t)}functionh(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,f(t,i)}functionu(){try{vart=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}functionf(t,i){returnf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){returnt.__proto__=i,t},f(t,i)}functionc(t){vari=function(t,i){if("object"!=typeoft||!t)returnt;varn=t[Symbol.toPrimitive];if(void0!==n){varr=n.call(t,i||"default");if("object"!=typeofr)returnr;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)}(t,"string");return"symbol"==typeofi?i:i+""}functiona(t){returna="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},a(t)}functionv(t){vari="function"==typeofMap?newMap:void0;returnv=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(i){return"function"==typeoft}}(t))returnt;if("function"!=typeoft)thrownewTypeError("Super expression must either be null or a function");if(void0!==i){if(i.has(t))returni.get(t);i.set(t,n)}functionn(){returnfunction(t,i,n){if(u())returnReflect.construct.apply(null,arguments);varr=[null];r.push.apply(r,i);vare=new(t.bind.apply(t,r));returnn&&f(e,n.prototype),e}(t,arguments,o(this).constructor)}returnn.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,t)},v(t)}varl=Object.create(null);l.open="0",l.close="1",l.ping="2",l.pong="3",l.message="4",l.upgrade="5",l.noop="6";vard=Object.create(null);Object.keys(l).forEach((function(t){d[l[t]]=t}));varp,y={type:"error",data:"parser error"},w="function"==typeofBlob||"undefined"!=typeofBlob&&"[object BlobConstructor]"=