1
0
mirror of https://github.com/c9fe/22120.git synced 2024-11-15 07:22:28 +01:00
22120/81.22120.js

2 lines
40 KiB
JavaScript
Raw Normal View History

2021-11-03 05:55:13 +01:00
#!/usr/bin/env node
"use strict";exports.id=81,exports.ids=[81],exports.modules={977:(e,t,s)=>{const{EMPTY_BUFFER:r}=s(1872);function i(e,t){if(0===e.length)return r;if(1===e.length)return e[0];const s=Buffer.allocUnsafe(t);let i=0;for(let t=0;t<e.length;t++){const r=e[t];s.set(r,i),i+=r.length}return i<t?s.slice(0,i):s}function o(e,t,s,r,i){for(let o=0;o<i;o++)s[r+o]=e[o]^t[3&o]}function n(e,t){for(let s=0;s<e.length;s++)e[s]^=t[3&s]}function a(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}function h(e){if(h.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=Buffer.from(e):ArrayBuffer.isView(e)?t=Buffer.from(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),h.readOnly=!1),t}try{const t=s(Object(function(){var e=new Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e}()));e.exports={concat:i,mask(e,s,r,i,n){n<48?o(e,s,r,i,n):t.mask(e,s,r,i,n)},toArrayBuffer:a,toBuffer:h,unmask(e,s){e.length<32?n(e,s):t.unmask(e,s)}}}catch(t){e.exports={concat:i,mask:o,toArrayBuffer:a,toBuffer:h,unmask:n}}},1872:e=>{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:()=>{}}},62:(e,t,s)=>{const{kForOnEventAttribute:r,kListener:i}=s(1872),o=Symbol("kCode"),n=Symbol("kData"),a=Symbol("kError"),h=Symbol("kMessage"),c=Symbol("kReason"),l=Symbol("kTarget"),d=Symbol("kType"),f=Symbol("kWasClean");class _{constructor(e){this[l]=null,this[d]=e}get target(){return this[l]}get type(){return this[d]}}Object.defineProperty(_.prototype,"target",{enumerable:!0}),Object.defineProperty(_.prototype,"type",{enumerable:!0});class u extends _{constructor(e,t={}){super(e),this[o]=void 0===t.code?0:t.code,this[c]=void 0===t.reason?"":t.reason,this[f]=void 0!==t.wasClean&&t.wasClean}get code(){return this[o]}get reason(){return this[c]}get wasClean(){return this[f]}}Object.defineProperty(u.prototype,"code",{enumerable:!0}),Object.defineProperty(u.prototype,"reason",{enumerable:!0}),Object.defineProperty(u.prototype,"wasClean",{enumerable:!0});class p extends _{constructor(e,t={}){super(e),this[a]=void 0===t.error?null:t.error,this[h]=void 0===t.message?"":t.message}get error(){return this[a]}get message(){return this[h]}}Object.defineProperty(p.prototype,"error",{enumerable:!0}),Object.defineProperty(p.prototype,"message",{enumerable:!0});class m extends _{constructor(e,t={}){super(e),this[n]=void 0===t.data?null:t.data}get data(){return this[n]}}Object.defineProperty(m.prototype,"data",{enumerable:!0});const y={addEventListener(e,t,s={}){let o;if("message"===e)o=function(e,s){const r=new m("message",{data:s?e:e.toString()});r[l]=this,t.call(this,r)};else if("close"===e)o=function(e,s){const r=new u("close",{code:e,reason:s.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[l]=this,t.call(this,r)};else if("error"===e)o=function(e){const s=new p("error",{error:e,message:e.message});s[l]=this,t.call(this,s)};else{if("open"!==e)return;o=function(){const e=new _("open");e[l]=this,t.call(this,e)}}o[r]=!!s[r],o[i]=t,s.once?this.once(e,o):this.on(e,o)},removeEventListener(e,t){for(const s of this.listeners(e))if(s[i]===t&&!s[r]){this.removeListener(e,s);break}}};e.exports={CloseEvent:u,ErrorEvent:p,Event:_,EventTarget:y,MessageEvent:m}},1503:(e,t,s)=>{const{tokenChars:r}=s(6746);function i(e,t,s){void 0===e[t]?e[t]=[s]:e[t].push(s)}e.exports={format:function(e){return Object.keys(e).map((t=>{let s=e[t];return Array.isArray(s)||(s=[s]),s.map((e=>[t].concat(Object.keys(e).map((t=>{let s=e[t];return Array.isArray(s)||(s=[s]),s.map((e=>!0===e?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(e){const t=Object.create(null);let s,o,n=Object.create(null),a=!1,h=!1,c=!1,l=-1,d=-1,f=-1,_=0;for(;_<e.length;_++)if(d=e.charCodeAt(_),void 0===s)if(-1===f&&1===r[d])-1===l&&(l=_);else if(0===_||