2024-06-06 22:17:58 +08:00
|
|
|
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){"use strict";module.exports=asPromise;function asPromise(fn,ctx){var params=new Array(arguments.length-1),offset=0,index=2,pending=true;while(index<arguments.length)params[offset++]=arguments[index++];return new Promise(function executor(resolve,reject){params[offset]=function callback(err){if(pending){pending=false;if(err)reject(err);else{var params=new Array(arguments.length-1),offset=0;while(offset<params.length)params[offset++]=arguments[offset];resolve.apply(null,params)}}};try{fn.apply(ctx||null,params)}catch(err){if(pending){pending=false;reject(err)}}})}},{}],2:[function(require,module,exports){"use strict";var base64=exports;base64.length=function length(string){var p=string.length;if(!p)return 0;var n=0;while(--p%4>1&&string.charAt(p)==="=")++n;return Math.ceil(string.length*3)/4-n};var b64=new Array(64);var s64=new Array(123);for(var i=0;i<64;)s64[b64[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;base64.encode=function encode(buffer,start,end){var parts=null,chunk=[];var i=0,j=0,t;while(start<end){var b=buffer[start++];switch(j){case 0:chunk[i++]=b64[b>>2];t=(b&3)<<4;j=1;break;case 1:chunk[i++]=b64[t|b>>4];t=(b&15)<<2;j=2;break;case 2:chunk[i++]=b64[t|b>>6];chunk[i++]=b64[b&63];j=0;break}if(i>8191){(parts||(parts=[])).push(String.fromCharCode.apply(String,chunk));i=0}}if(j){chunk[i++]=b64[t];chunk[i++]=61;if(j===1)chunk[i++]=61}if(parts){if(i)parts.push(String.fromCharCode.apply(String,chunk.slice(0,i)));return parts.join("")}return String.fromCharCode.apply(String,chunk.slice(0,i))};var invalidEncoding="invalid encoding";base64.decode=function decode(string,buffer,offset){var start=offset;var j=0,t;for(var i=0;i<string.length;){var c=string.charCodeAt(i++);if(c===61&&j>1)break;if((c=s64[c])===undefined)throw Error(invalidEncoding);switch(j){case 0:t=c;j=1;break;case 1:buffer[offset++]=t<<2|(c&48)>>4;t=c;j=2;break;case 2:buffer[offset++]=(t&15)<<4|(c&60)>>2;t=c;j=3;break;case 3:buffer[offset++]=(t&3)<<6|c;j=0;break}}if(j===1)throw Error(invalidEncoding);return offset-start};base64.test=function test(string){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string)}},{}],3:[function(require,module,exports){"use strict";module.exports=EventEmitter;function EventEmitter(){this._listeners={}}EventEmitter.prototype.on=function on(evt,fn,ctx){(this._listeners[evt]||(this._listeners[evt]=[])).push({fn:fn,ctx:ctx||this});return this};EventEmitter.prototype.off=function off(evt,fn){if(evt===undefined)this._listeners={};else{if(fn===undefined)this._listeners[evt]=[];else{var listeners=this._listeners[evt];for(var i=0;i<listeners.length;)if(listeners[i].fn===fn)listeners.splice(i,1);else++i}}return this};EventEmitter.prototype.emit=function emit(evt){var listeners=this._listeners[evt];if(listeners){var args=[],i=1;for(;i<arguments.length;)args.push(arguments[i++]);for(i=0;i<listeners.length;)listeners[i].fn.apply(listeners[i++].ctx,args)}return this}},{}],4:[function(require,module,exports){"use strict";module.exports=factory(factory);function factory(exports){if(typeof Float32Array!=="undefined")(function(){var f32=new Float32Array([-0]),f8b=new Uint8Array(f32.buffer),le=f8b[3]===128;function writeFloat_f32_cpy(val,buf,pos){f32[0]=val;buf[pos]=f8b[0];buf[pos+1]=f8b[1];buf[pos+2]=f8b[2];buf[pos+3]=f8b[3]}function writeFloat_f32_rev(val,buf,pos){f32[0]=val;buf[pos]=f8b[3];buf[pos+1]=f8b[2];buf[pos+2]=f8b[1];buf[pos+3]=f8b[0]}exports.writeFloatLE=le?writeFloat_f32_cpy:writeFloat_f32_rev;exports.writeFloatBE=le?writeFloat_f32_rev:writeFloat_f32_cpy;function readFloat_f32_cpy(buf,pos){f8b[0]=buf[pos];f8b[1]=bu
|