2023-03-13 10:59:28 +00:00
|
|
|
(()=>{var __webpack_modules__={990:(e,a,s)=>{"use strict";const{EMPTY_BUFFER:i}=s(328);const r=Buffer[Symbol.species];function concat(e,a){if(e.length===0)return i;if(e.length===1)return e[0];const s=Buffer.allocUnsafe(a);let t=0;for(let a=0;a<e.length;a++){const i=e[a];s.set(i,t);t+=i.length}if(t<a){return new r(s.buffer,s.byteOffset,t)}return s}function _mask(e,a,s,i,r){for(let t=0;t<r;t++){s[i+t]=e[t]^a[t&3]}}function _unmask(e,a){for(let s=0;s<e.length;s++){e[s]^=a[s&3]}}function toArrayBuffer(e){if(e.length===e.buffer.byteLength){return e.buffer}return e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function toBuffer(e){toBuffer.readOnly=true;if(Buffer.isBuffer(e))return e;let a;if(e instanceof ArrayBuffer){a=new r(e)}else if(ArrayBuffer.isView(e)){a=new r(e.buffer,e.byteOffset,e.byteLength)}else{a=Buffer.from(e);toBuffer.readOnly=false}return a}e.exports={concat:concat,mask:_mask,toArrayBuffer:toArrayBuffer,toBuffer:toBuffer,unmask:_unmask};if(!process.env.WS_NO_BUFFER_UTIL){try{const a=s(921);e.exports.mask=function(e,s,i,r,t){if(t<48)_mask(e,s,i,r,t);else a.mask(e,s,i,r,t)};e.exports.unmask=function(e,s){if(e.length<32)_unmask(e,s);else a.unmask(e,s)}}catch(e){}}},328:e=>{"use strict";e.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},427:(e,a,s)=>{"use strict";const{kForOnEventAttribute:i,kListener:r}=s(328);const t=Symbol("kCode");const d=Symbol("kData");const n=Symbol("kError");const o=Symbol("kMessage");const c=Symbol("kReason");const l=Symbol("kTarget");const f=Symbol("kType");const u=Symbol("kWasClean");class Event{constructor(e){this[l]=null;this[f]=e}get target(){return this[l]}get type(){return this[f]}}Object.defineProperty(Event.prototype,"target",{enumerable:true});Object.defineProperty(Event.prototype,"type",{enumerable:true});class CloseEvent extends Event{constructor(e,a={}){super(e);this[t]=a.code===undefined?0:a.code;this[c]=a.reason===undefined?"":a.reason;this[u]=a.wasClean===undefined?false:a.wasClean}get code(){return this[t]}get reason(){return this[c]}get wasClean(){return this[u]}}Object.defineProperty(CloseEvent.prototype,"code",{enumerable:true});Object.defineProperty(CloseEvent.prototype,"reason",{enumerable:true});Object.defineProperty(CloseEvent.prototype,"wasClean",{enumerable:true});class ErrorEvent extends Event{constructor(e,a={}){super(e);this[n]=a.error===undefined?null:a.error;this[o]=a.message===undefined?"":a.message}get error(){return this[n]}get message(){return this[o]}}Object.defineProperty(ErrorEvent.prototype,"error",{enumerable:true});Object.defineProperty(ErrorEvent.prototype,"message",{enumerable:true});class MessageEvent extends Event{constructor(e,a={}){super(e);this[d]=a.data===undefined?null:a.data}get data(){return this[d]}}Object.defineProperty(MessageEvent.prototype,"data",{enumerable:true});const b={addEventListener(e,a,s={}){for(const t of this.listeners(e)){if(!s[i]&&t[r]===a&&!t[i]){return}}let t;if(e==="message"){t=function onMessage(e,s){const i=new MessageEvent("message",{data:s?e:e.toString()});i[l]=this;callListener(a,this,i)}}else if(e==="close"){t=function onClose(e,s){const i=new CloseEvent("close",{code:e,reason:s.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});i[l]=this;callListener(a,this,i)}}else if(e==="error"){t=function onError(e){const s=new ErrorEvent("error",{error:e,message:e.message});s[l]=this;callListener(a,this,s)}}else if(e==="open"){t=function onOpen(){const e=new Event("open");e[l]=this;callListener(a,this,e)}}else{return}t[i]=!!s[i];t[r]=a;if(s.once){this.once(e,t)}else{this.on(e,t)}},removeEventListener(e,a){for(const s of this.listeners(e)){if(s[r]===a&&!s[i]){this.removeListener(e,s);break}}}};e.exports={CloseEvent:CloseEvent,ErrorEvent:ErrorEvent,Event:Event,EventTarget:b,MessageEvent:MessageEvent};function callListener(e,a,s){if(typeof e==="object"&&e.han
|