| 9 | `,errorLikeKeys:o=f,errorProperties:s=[]}){let a=S({input:e.stack,ident:r,eol:i}),c=`${r}${a}${i}`;if(s.length>0){let a,u=y.concat(t,"type","stack");a="*"===s[0]?Object.keys(e).filter(e=>!1===u.includes(e)):s.filter(e=>!1===u.includes(e));for(let t=0;t<a.length;t+=1){let s=a[t];if(s in e!=!1){if(_(e[s])){let t=x({input:e[s],errorLikeKeys:o,excludeLoggerKeys:!1,eol:i,ident:r+r});c=`${c}${r}${s}: {${i}${t}${r}}${i}`;continue}c=`${c}${r}${s}: ${e[s]}${i}`}}}return c},prettifyLevel:function({log:e,colorizer:t=u,levelKey:r=h,prettifier:i,customLevels:o,customLevelNames:s}){if(r in e==!1)return;let a=e[r];return i?i(a):t(a,{customLevels:o,customLevelNames:s})},prettifyMessage:function({log:e,messageFormat:t,messageKey:r=p,colorizer:i=u,levelLabel:o=d,levelKey:s=h,customLevels:a,useOnlyCustomProps:c}){if(t&&"string"==typeof t){let r=String(t).replace(/{([^{}]+)}/g,function(t,r){return r===o&&e[s]?(c?void 0===a:void 0===a[e[s]])?m[e[s]]:a[e[s]]:r.split(".").reduce(function(e,t){return e&&e[t]?e[t]:""},e)});return i.message(r)}if(t&&"function"==typeof t){let s=t(e,r,o);return i.message(s)}if(r in e!=!1&&"string"==typeof e[r])return i.message(e[r])},prettifyMetadata:function({log:e,prettifiers:t={}}){let r="";if(e.name||e.pid||e.hostname){if(r+="(",e.name&&(r+=t.name?t.name(e.name):e.name),e.pid){let i=t.pid?t.pid(e.pid):e.pid;e.name&&e.pid?r+="/"+i:r+=i}e.hostname&&(r+=`${"("===r?"on":" on"} ${t.hostname?t.hostname(e.hostname):e.hostname}`),r+=")"}if(e.caller&&(r+=`${""===r?"":" "}<${t.caller?t.caller(e.caller):e.caller}>`),""!==r)return r},prettifyObject:x,prettifyTime:function({log:e,timestampKey:t=g,translateFormat:r,prettifier:i}){let o=null;if(t in e?o=e[t]:"timestamp"in e&&(o=e.timestamp),null===o)return;let s=r?b(o,r):o;return i?i(s):`[${s}]`},buildSafeSonicBoom:function(e){let t=new s(e);return t.on("error",function e(r){if("EPIPE"===r.code){t.write=j,t.end=j,t.flushSync=j,t.destroy=j;return}t.removeListener("error",e)}),!e.sync&&c&&function(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=r(5463);t.register(e,T),e.on("close",function(){t.unregister(e)})}}(t),t},filterLog:function(e,t){let r=i(e);return t.forEach(e=>{k(r,e)}),r}},e.exports.internals={formatTime:b,joinLinesWithIndentation:S,prettifyError:E,deleteLogProperty:k,splitIgnoreKey:O,createDate:v,isValidDate:w}},2397:(e,t,r)=>{"use strict";var i,o=r(4526),s=r(82),a=r(8350),c=r(1088),u=r(9854),l=r(4298),f=r(8364),p="prototype",h="script",d=f("IE_PROTO"),g=function(){},y=function(e){return"<"+h+">"+e+"</"+h+">"},m=function(e){e.write(y("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=l("iframe");return t.style.display="none",u.appendChild(t),t.src=String("java"+h+":"),(e=t.contentWindow.document).open(),e.write(y("document.F=Object")),e.close(),e.F},v=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}v="undefined"!=typeof document?document.domain&&i?m(i):b():m(i);for(var e=a.length;e--;)delete v[p][a[e]];return v()};c[d]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(g[p]=o(e),r=new g,g[p]=null,r[d]=e):r=v(),void 0===t?r:s.f(r,t)}},2428:e=>{"use strict";e.exports=e=>{let t=e.length,r=43,i=(e=r)=>isNaN(e);if(r+1>t||i()||(r+=1+e[r],r+2>t||i())||(r+=2+e.readInt16BE(r),r+1>t||i())||(r+=1+e[r],r+2>t||i()))return null;let o=e.readInt16BE(r);r+=2;let s=r+o;if(s>t||i(s))return null;for(t=s;r+4<=t||i();){let o=e.readInt16BE(r),s=e.readInt16BE(r+2);if(r+=4,0!==o){r+=s;continue}if(r+2>t||i())break;let a=e.readInt16BE(r);if(r+=2,r+a>t)break;for(;r+3<=t||i();){let o=e[r],s=e.readInt16BE(r+1);if(r+=3,0!==o){r+=s;continue}if(r+s>t||i())return null;return e.toString("ascii",r,r+s)}}return null}},2436:(e,t,r)=>{"use strict";var i=r(3892),o=r(6078),s=r(2025).String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41})},2448:(e,t,r)=>{"use strict";var i=r(697),o=r(2675),s=r(6465),a=s.get,c=s.has,u=s.set;i({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,i,s=o(this);return c(s,e)?(r=a(s,e),"update"in t&&(r=t.update(r,e,s),u(s,e,r)),r):(i=t.insert(e,s),u(s,e,i),i)}})},2552:(e,t,r)=>{"use strict";var i=r(697),o=r(1196),s=r(1999),a=r(823);i({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return o(a,this,s(e))}})},2664:(e,t,r)=>{e.exports=r(9023).deprecate},2672:(e,t,r)=>{"use strict";let i=r(4434),o="cancel";e.exports={CancelRequest:class extends i{cancelled=!1;cancel(){this.cancelled=!0,this.emit(o)}},ON_CANCEL:o}},2675:(e,t,r)=>{"use strict";var i=r(6465).has;e.exports=function(e){return i(e),e}},2732:(e,t,r)=>{"use strict";var i=r(8585),o=r(6475),s=TypeError,a=Object.getOwnPropertyDescriptor;e.exports=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(o(e)&&!a(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},2736:(e,t,r)=>{"use strict";var i=r(697),o=r(4689),s=r(5773),a=r(9900);i({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0);return!1!==a(t,function(e){if(!r(e,e,t))return!1},!0)}})},2749:(e,t,r)=>{"use strict";var i=r(5773),o=r(7417),s=r(9900),a=r(1428);e.exports=function(e){var t=i(this),r=a(e);return!(o(t)>r.size)&&!1!==s(t,function(e){if(!r.includes(e))return!1},!0)}},2777:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(777),r(9071),r(4914);let i=r(9588),o=r(3186),s=r(23),a=r(2965),{getManagedCacheStorage:c}=r(4337),u=e=>({id:e.hash,id_hq:e["320hash"],id_sq:e.sqhash,name:e.songname,duration:1e3*e.duration,album:{id:e.album_id,name:e.album_name}}),l=e=>a("GET","http://mobilecdn.kugou.com/api/v3/search/song?keyword="+encodeURIComponent(e.keyword)+"&page=1&pagesize=10").then(e=>e.json()).then(t=>o(t.data.info.map(u),e)||Promise.reject()).catch(()=>i().kugou.search(e)),f=e=>Promise.all(["sqhash","hqhash","hash"].slice(+!o.ENABLE_FLAC).map(t=>((e,t)=>{let r=()=>{switch(t){case"hash":return e.id;case"hqhash":return e.id_hq;case"sqhash":return e.id_sq}return""};return a("GET","http://trackercdn.kugou.com/i/v2/?key="+s.md5.digest(`${r()}kgcloudv2`)+"&hash="+r()+"&appid=1005&pid=2&cmd=25&behavior=play&album_id="+e.album.id).then(e=>e.json()).then(e=>e.url[0]||Promise.reject())})(e,t).catch(()=>null))).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().kugou.track(e)),p=c("provider/kugou");e.exports={check:e=>p.cache(e,()=>l(e)).then(f),search:l}},2862:(e,t,r)=>{"use strict";r(2083)},2870:(e,t,r)=>{"use strict";var i=r(8173),o=r(5032),s=i({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(o(e),t)}},2896:(e,t,r)=>{var i=r(9491),o=r(5486),s=r(3081),a=r(3049),c=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),u=function(e,t){e._corked?e.once("uncork",t):t()},l=function(e,t){e._autoDestroy&&e.destroy(t)},f=function(e,t){return function(r){r?l(e,"premature close"===r.message?null:r):t&&!e._ended&&e.end()}},p=function(){},h=function(e,t,r){if(!(this instanceof h))return new h(e,t,r);i.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||!1!==r.autoDestroy,this._forwardDestroy=!r||!1!==r.destroy,this._forwardEnd=!r||!1!==r.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};s(h,i.Duplex),h.obj=function(e,t,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new h(e,t,r)},h.prototype.cork=function(){1==++this._corked&&this.emit("cork")},h.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},h.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed){e&&e.destroy&&e.destroy();return}if(null===e||!1===e)return void this.end();var t=this,r=o(e,{writable:!0,readable:!1},f(this,this._forwardEnd)),i=function(){var e=t._ondrain;t._ondrain=null,e&&e()};this._unwrite&&process.nextTick(i),this._writable=e,this._writable.on("drain",i),this._unwrite=function(){t._writable.removeListener("drain",i),r()},this.uncork()},h.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed){e&&e.destroy&&e.destroy();return}if(null===e||!1===e){this.push(null),this.resume();return}var t=this,r=o(e,{writable:!1,readable:!0},f(this)),s=function(){t._forward()},a=function(){t.push(null)};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:new i.Readable({objectMode:!0,highWaterMark:16}).wrap(e),this._readable2.on("readable",s),this._readable2.on("end",a),this._unread=function(){t._readable2.removeListener("readable",s),t._readable2.removeListener("end",a),r()},this._forward()},h.prototype._read=function(){this._drained=!0,this._forward()},h.prototype._forward=function(){var e;if(!this._forwarding&&this._readable2&&this._drained){for(this._forwarding=!0;this._drained&&null!==(e=a(this._readable2));)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},h.prototype.destroy=function(e,t){if(t||(t=p),this.destroyed)return t(null);this.destroyed=!0;var r=this;process.nextTick(function(){r._destroy(e),t(null)})},h.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},h.prototype._write=function(e,t,r){if(!this.destroyed){if(this._corked)return u(this,this._write.bind(this,e,t,r));if(e===c)return this._finish(r);if(!this._writable)return r();!1===this._writable.write(e)?this._ondrain=r:this.destroyed||r()}},h.prototype._finish=function(e){var t=this;this.emit("preend"),u(this,function(){var r,i;r=t._forwardEnd&&t._writable,i=function(){!1===t._writableState.prefinished&&(t._writableState.prefinished=!0),t.emit("prefinish"),u(t,e)},!r||r._writableState&&r._writableState.finished?i():r._writableState?r.end(i):(r.end(),i())})},h.prototype.end=function(e,t,r){return"function"==typeof e?this.end(null,null,e):"function"==typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this._writableState.destroyed||this.write(c),i.Writable.prototype.end.call(this,r))},e.exports=h},2913:(e,t,r)=>{"use strict";var i=r(7175);e.exports=function(e){return i(e.length)}},2965:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(777),r(4099),r(5267),r(1806);let i=r(3106),o=r(8611),s=r(5692),a=r(2672),c=r(15),{logScope:u}=r(6166),l=r(7016).parse,f=r(7016).format,p=u("request"),h=e=>(global.hosts||{})[e]||e,d=(e,t)=>("https:"===((void 0===t?global.proxy:t)||e).protocol?s:o).request,g=(e,t,r,i)=>{r=r||{},i=void 0===i?global.proxy:i,"content-length"in r&&delete r["content-length"];let o={};return o._headers=r,i&&"https:"===t.protocol?(o.method="CONNECT",o.headers=Object.keys(r).reduce((e,t)=>Object.assign(e,["host","user-agent"].includes(t)&&{[t]:r[t]}),{})):(o.method=e,o.headers=r),i?(o.hostname=h(i.hostname),o.port=i.port||("https:"===i.protocol?443:80),o.path="https:"===t.protocol?h(t.hostname)+":"+(t.port||443):"http://"+h(t.hostname)+t.path):(o.hostname=h(t.hostname),o.port=t.port||("https:"===t.protocol?443:80),o.path=t.path),o},y=(e,t,r,i,o,u)=>{let h=l(t),w=r||{},_=g(e,h,{host:h.hostname,accept:"application/json, text/plain, */*","accept-encoding":"gzip, deflate","accept-language":"zh-CN,zh;q=0.9","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",...w},o);return new Promise((r,l)=>{var g;p.debug(`Start requesting ${t}`);let y=d(h,o)(_),m=function(){y.destroy(new c(f(h)))};null==u||u.on(a,m),null!=(g=null==u?void 0:u.cancelled)&&g&&m(),y.setTimeout(1e4,()=>{p.warn({url:f(h)},"The request timed out, or the requester didn't handle the response."),m()}).on("response",e=>r(e)).on("connect",(t,o)=>{p.debug("received CONNECT, continuing with https.request()..."),s.request({method:e,path:h.path,headers:_._headers,socket:o,agent:!1}).on("response",e=>r(e)).on("error",e=>l(e)).end(i)}).on("error",e=>l(e)).end("CONNECT"===_.method.toUpperCase()?void 0:i)}).then(t=>{var r;if(null!=(r=null==u?void 0:u.cancelled)&&r)return Promise.reject(new c(f(h)));if([201,301,302,303,307,308].includes(t.statusCode)){let r=h.resolve(t.headers.location||h.href);return p.debug(`Redirect to ${r}`),delete w.host,y(e,r,w,i,o)}return Object.assign(t,{url:h,body:e=>m(t,e),json:()=>b(t),jsonp:()=>v(t)})})},m=(e,t)=>new Promise((t,r)=>{let i=[];e.on("data",e=>i.push(e)).on("end",()=>t(Buffer.concat(i))).on("error",e=>r(e))}).then(r=>{if(r.length)switch(e.headers["content-encoding"]){case"deflate":case"gzip":r=i.unzipSync(r);break;case"br":r=i.brotliDecompressSync(r)}return t?r:r.toString()}),b=e=>m(e,!1).then(e=>JSON.parse(e)),v=e=>m(e,!1).then(e=>JSON.parse(e.slice(e.indexOf("(")+1,-1)));y.read=m,y.create=d,y.translate=h,y.configure=g,e.exports=y},2985:(e,t,r)=>{"use strict";let i=r(9896),o=r(4434),s=r(9023).inherits,a=r(6928),c=r(7048);function u(e,t){function r(r,i){if(r){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",r)}):t.emit("error",r);return}t.fd=i,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&(t._writing||!(t._len>t.minLength)||t.destroyed||p(t))}t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;let o=t.append?"a":"w";if(t.sync)try{t.mkdir&&i.mkdirSync(a.dirname(e),{recursive:!0});let s=i.openSync(e,o);r(null,s)}catch(e){throw r(e),e}else t.mkdir?i.mkdir(a.dirname(e),{recursive:!0},t=>{if(t)return r(t);i.open(e,o,r)}):i.open(e,o,r)}function l(e){if(!(this instanceof l))return new l(e);let{fd:t,dest:r,minLength:o,sync:s,append:a=!0,mkdir:d,retryEAGAIN:g}=e||{};if(t=t||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._hwm=Math.max(o||0,16387),this.file=null,this.destroyed=!1,this.minLength=o||0,this.sync=s||!1,this.append=a||!1,this.retryEAGAIN=g||(()=>!0),this.mkdir=d||!1,"number"==typeof t)this.fd=t,process.nextTick(()=>this.emit("ready"));else if("string"==typeof t)u(t,this);else throw Error("SonicBoom supports only file descriptors and files");if(this.minLength>=0x1000000)throw Error("minLength should be smaller than MAX_WRITE (16777216)");this.release=(e,t)=>{if(e){if("EAGAIN"===e.code&&this.retryEAGAIN(e,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{c(100),this.release(void 0,0)}catch(e){this.release(e)}else setTimeout(()=>{i.write(this.fd,this._writingBuf,"utf8",this.release)},100);else this._writing=!1,this.emit("error",e);return}if(this._len-=t,this._writingBuf=this._writingBuf.slice(t),this._writingBuf.length){if(!this.sync)return void i.write(this.fd,this._writingBuf,"utf8",this.release);try{do{let e=i.writeSync(this.fd,this._writingBuf,"utf8");this._len-=e,this._writingBuf=this._writingBuf.slice(e)}while(this._writingBuf)}catch(e){this.release(e);return}}let r=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):r>this.minLength?p(this):this._ending?r>0?p(this):(this._writing=!1,h(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(f,this)):this.emit("drain"))},this.on("newListener",function(e){"drain"===e&&(this._asyncDrainScheduled=!1)})}function f(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}function p(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift(),e.sync)try{let r=i.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(e){t(e)}else i.write(e.fd,e._writingBuf,"utf8",t)}function h(e){if(-1===e.fd)return void e.once("ready",h.bind(null,e));i.close(e.fd,t=>{if(t)return void e.emit("error",t);e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}),e.destroyed=!0,e._bufs=[]}s(l,o),l.prototype.write=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return!this._writing&&t>0x1000000?r.push(e):0===r.length?r[0]=""+e:r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&p(this),this._len<this._hwm},l.prototype.flush=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._writing||this.minLength<=0||(0===this._bufs.length&&this._bufs.push(""),p(this))},l.prototype.reopen=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");if(this._opening)return void this.once("ready",()=>{this.reopen(e)});if(this._ending)return;if(!this.file)throw Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&i.close(t,e=>{if(e)return this.emit("error",e)})}),u(e||this.file,this)},l.prototype.end=function(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this._opening)return void this.once("ready",()=>{this.end()});!this._ending&&(this._ending=!0,this._writing||(this._len>0&&this.fd>=0?p(this):h(this)))},l.prototype.flushSync=function(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this.fd<0)throw Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let e=this._bufs[0];try{this._len-=i.writeSync(this.fd,e,"utf8"),this._bufs.shift()}catch(t){if("EAGAIN"!==t.code||!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;c(100)}}},l.prototype.destroy=function(){this.destroyed||h(this)},l.SonicBoom=l,l.default=l,e.exports=l},3049:e=>{e.exports=function(e){var t,r=e._readableState;return r?r.objectMode||"number"==typeof e._duplexState?e.read():e.read((t=r).buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length):null}},3060:(e,t,r)=>{"use strict";r(6535)},3081:(e,t,r)=>{try{var i=r(9023);if("function"!=typeof i.inherits)throw"";e.exports=i.inherits}catch(t){e.exports=r(3522)}},3093:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(7784),r(2448),r(1202),r(8795),r(8422),r(4500),r(488),r(9158),r(1808),r(1933),r(1501),r(8255),r(6925),r(3416),r(777),r(7055),r(7172),r(9071),r(4099),r(7500),r(9049),r(5410);let i=r(9041),o=r(2965),{PROVIDERS:s,DEFAULT_SOURCE:a}=r(6406),{isHostWrapper:c}=r(1084),u=r(806),l=r(7591),f=r(8729),{logScope:p}=r(6166),h=r(15),d=p("provider/match"),g=new Map([["bilivideo.com","https://www.bilibili.com/"],["upos-hz-mirrorakam.akamaized.net","https://www.bilibili.com/"]]);async function y(e,t){d.debug({source:e,info:t},"Getting the audio...");let r=await s[e].check(t);if(!r)throw new u(e);let i=await m(r);if(d.debug(i,"The matched song is:"),!i||"string"!=typeof i.url)throw new f("song is undefined, or song.url is not a string.");return d.debug({source:e,info:t},"The audio matched!"),{...i,source:e}}async function m(e){let t,r=c(e),i={size:0,br:null,url:null,md5:null},s={range:"bytes=0-8191","accept-encoding":"identity"};g.forEach((e,t)=>{r(t)&&(s.referer=e)});let a=await o("GET",e,s),{headers:u}=a;if(!((t=a.statusCode)>=200&&t<=299))throw new l(e,a.statusCode);i.url=a.url.href;let f=await a.body(!0);try{let e=function(e){let t={3:{3:["free",32,64,96,128,160,192,224,256,288,320,352,384,416,448,"bad"],2:["free",32,48,56,64,80,96,112,128,160,192,224,256,320,384,"bad"],1:["free",32,40,48,56,64,80,96,112,128,160,192,224,256,320,"bad"]},2:{3:["free",32,48,56,64,80,96,112,128,144,160,176,192,224,256,"bad"],2:["free",8,16,24,32,40,48,56,64,80,96,112,128,144,160,"bad"]}};t[2][1]=t[2][2],t[0]=t[2];let r=0;if("fLaC"===e.slice(0,4).toString())return 999;"ID3"===e.slice(0,3).toString()&&(r=6,r=10+e.slice(r,r+4).reduce((e,t,r)=>e+(127&t)<<7*(3-r),0));let i=e.slice(r,r+4);if(4===i.length&&255===i[0]&&(i[1]>>5&7)==7&&(i[1]>>1&3)!=0&&(i[2]>>4&15)!=15&&(i[2]>>2&3)!=3){let e=i[1]>>3&3,r=i[1]>>1&3,o=i[2]>>4;return t[e][r][o]}}(f);i.br=e&&!isNaN(e)?1e3*e:null}catch(e){d.debug(e,"Failed to decode and extract the bitrate")}if(!i.br){if(r("qq.com")&&i.url.includes(".m4a")&&(i.br=96e3),r("bilivideo.com")&&i.url.includes(".m4a")){let e=parseInt(i.url.match(/-(\d+)k\.m4a/));isNaN(e)||e<96||e>999?e=192e3:e*=1e3,i.br=e}r("googlevideo.com")&&(i.br=128e3)}return u&&(r("126.net")&&(i.md5=i.url.split("/").slice(-1)[0].replace(/\..*/g,"")),r("qq.com")&&(i.md5=u["server-md5"]),i.size=parseInt((u["content-range"]||"").split("/").pop()||u["content-length"])||0,"8192"!==u["content-length"])?Promise.reject():i}e.exports=async function e(e,t,r){let o=(t||global.source||a).filter(e=>e in s),c=await i(e,r),l=null;if(process.env.SELECT_MAX_BR){let e=await Promise.allSettled(o.map(async e=>y(e,c).catch(e=>{throw e&&(e instanceof h?d.debug(e):d.error(e)),e})));if(0===(e=e.filter(e=>"fulfilled"===e.status)).length)throw new u("any source");l=(e=e.map(e=>e.value)).reduce((e,t)=>e.br>=t.br?e:t)}else if(process.env.FOLLOW_SOURCE_ORDER){for(let e=0;e<o.length;e++){let t=o[e];try{l=await y(t,c);break}catch(e){e&&(e instanceof h?d.debug(e):d.error(e))}}if(!l)throw"No audioData!"}else l=await Promise.any(o.map(async e=>y(e,c).catch(e=>{throw e&&(e instanceof h?d.debug(e):d.error(e)),e})));let{id:f,name:p}=c,{url:g}=l;return d.debug({audioInfo:c,audioData:l},"The data to replace:"),d.info({audioId:f,songName:p,url:g},`Replaced: [${f}] ${p}`),l}},3106:e=>{"use strict";e.exports=require("zlib")},3172:(e,t,r)=>{"use strict";var i=r(697),o=r(1196),s=r(1999),a=r(5449);i({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return o(a,this,s(e))}})},3186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(777),r(4914),e.exports=(e,t)=>{let{duration:r}=t,i=e.slice(0,5).find(e=>e.duration&&5e3>Math.abs(e.duration-r));return i||e[0]},e.exports.ENABLE_FLAC="true"===(process.env.ENABLE_FLAC||"").toLowerCase()},3193:e=>{"use strict";e.exports=require("string_decoder")},3354:(e,t,r)=>{"use strict";var i=r(6078),o=r(8295);e.exports=!i(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)})},3367:(e,t,r)=>{"use strict";var i=r(697),o=r(8173),s=r(5773),a=r(9900),c=r(6790),u=o([].join),l=o([].push);i({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=s(this),r=void 0===e?",":c(e),i=[];return a(t,function(e){l(i,e)}),u(i,r)}})},3416:(e,t,r)=>{"use strict";var i=r(697),o=r(5869),s=r(2675),a=r(6465),c=TypeError,u=a.get,l=a.has,f=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=s(this),i=arguments.length;o(t);var a=l(r,e);if(!a&&i<3)throw new c("Updating absent value");var p=a?u(r,e):o(i>2?arguments[2]:void 0)(e,r);return f(r,e,t(p,e,r)),r}})},3480:e=>{"use strict";e.exports=require("querystring")},3509:(e,t,r)=>{"use strict";var i=r(2025),o=r(6880),s=i.WeakMap;e.exports=o(s)&&/native code/.test(String(s))},3522:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},3531:(e,t,r)=>{"use strict";var i=r(6880);e.exports=function(e){return"object"==typeof e?null!==e:i(e)}},3543:(e,t,r)=>{"use strict";var i=r(697),o=r(1196),s=r(1999),a=r(7044);i({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return o(a,this,s(e))}})},3557:(e,t,r)=>{"use strict";var i=r(8585),o=r(8142),s=r(8295);e.exports=function(e,t,r){i?o.f(e,t,s(0,r)):e[t]=r}},3561:(e,t,r)=>{"use strict";var i=r(8034),o=TypeError;e.exports=function(e){if(i(e))throw new o("Can't call method on "+e);return e}},3567:(e,t,r)=>{"use strict";var i=r(6724),o=Math.max,s=Math.min;e.exports=function(e,t){var r=i(e);return r<0?o(r+t,0):s(r,t)}},3581:(e,t,r)=>{"use strict";function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var r=t,i=e,o=r.entry;for(r.entry=null;o;){var s=o.callback;i.pendingcb--,s(void 0),o=o.next}i.corkedRequestsFree.next=r}}e.exports=O,O.WritableState=E;var o,s,a={deprecate:r(2664)},c=r(5251),u=r(181).Buffer,l=global.Uint8Array||function(){},f=r(849),p=r(6906).getHighWaterMark,h=r(8396).F,d=h.ERR_INVALID_ARG_TYPE,g=h.ERR_METHOD_NOT_IMPLEMENTED,y=h.ERR_MULTIPLE_CALLBACK,m=h.ERR_STREAM_CANNOT_PIPE,b=h.ERR_STREAM_DESTROYED,v=h.ERR_STREAM_NULL_VALUES,w=h.ERR_STREAM_WRITE_AFTER_END,_=h.ERR_UNKNOWN_ENCODING,S=f.errorOrDestroy;function x(){}function E(e,t,s){o=o||r(5535),e=e||{},"boolean"!=typeof s&&(s=t instanceof o),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=p(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new y;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,i?(process.nextTick(o,t),process.nextTick(M,e,r),e._writableState.errorEmitted=!0,S(e,t)):(o(t),e._writableState.errorEmitted=!0,S(e,t),M(e,r));else{var s=R(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),i?process.nextTick(j,e,r,s,o):j(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}r(3081)(O,c),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(E.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}function O(e){var t=this instanceof(o=o||r(5535));if(!t&&!s.call(O,this))return new O(e);this._writableState=new E(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function k(e,t,r,i,o,s,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(o,t.onwrite):e._write(o,s,t.onwrite),t.sync=!1}function j(e,t,r,i){var o,s;r||(o=e,0===(s=t).length&&s.needDrain&&(s.needDrain=!1,o.emit("drain"))),t.pendingcb--,i(),M(e,t)}function T(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var o=Array(t.bufferedRequestCount),s=t.corkedRequestsFree;s.entry=r;for(var a=0,c=!0;r;)o[a]=r,r.isBuf||(c=!1),r=r.next,a+=1;o.allBuffers=c,k(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,f=r.callback,p=t.objectMode?1:u.length;if(k(e,t,!1,p,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function P(e,t){e._final(function(r){t.pendingcb--,r&&S(e,r),t.prefinished=!0,e.emit("prefinish"),M(e,t)})}function M(e,t){var r=R(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(P,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===O&&e&&e._writableState instanceof E}})):s=function(e){return e instanceof this},O.prototype.pipe=function(){S(this,new m)},O.prototype.write=function(e,t,r){var i,o,s,a,c,f,p,h=this._writableState,g=!1,y=!h.objectMode&&(i=e,u.isBuffer(i)||i instanceof l);return(y&&!u.isBuffer(e)&&(o=e,e=u.from(o)),"function"==typeof t&&(r=t,t=null),y?t="buffer":t||(t=h.defaultEncoding),"function"!=typeof r&&(r=x),h.ending)?(s=r,S(this,a=new w),process.nextTick(s,a)):(y||(c=e,f=r,null===c?p=new v:"string"==typeof c||h.objectMode||(p=new d("chunk",["string","Buffer"],c)),!p||(S(this,p),process.nextTick(f,p),0)))&&(h.pendingcb++,g=function(e,t,r,i,o,s){if(!r){var a,c,l=(a=i,c=o,t.objectMode||!1===t.decodeStrings||"string"!=typeof a||(a=u.from(a,c)),a);i!==l&&(r=!0,o="buffer",i=l)}var f=t.objectMode?1:i.length;t.length+=f;var p=t.length<t.highWaterMark;if(p||(t.needDrain=!0),t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:o,isBuf:r,callback:s,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else k(e,t,!1,f,i,o,s);return p}(this,h,y,e,t,r)),g},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},O.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(e,t,r){r(new g("_write()"))},O.prototype._writev=null,O.prototype.end=function(e,t,r){var i,o,s,a=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||(i=this,o=a,s=r,o.ending=!0,M(i,o),s&&(o.finished?process.nextTick(s):i.once("finish",s)),o.ended=!0,i.writable=!1),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),O.prototype.destroy=f.destroy,O.prototype._undestroy=f.undestroy,O.prototype._destroy=function(e,t){t(e)}},3621:(e,t,r)=>{"use strict";r(9988)},3695:(e,t,r)=>{"use strict";var i=r(8585),o=r(6078);e.exports=i&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},3710:(e,t,r)=>{"use strict";let i=Symbol.for("pino.metadata"),o=r(202),s=r(2896);function a(e,t){process.nextTick(t,e)}e.exports=function(e,t={}){let r="lines"===t.parse,c="function"==typeof t.parseLine?t.parseLine:JSON.parse,u=t.close||a,l=o(function(e){let t;try{t=c(e)}catch(t){this.emit("unknown",e,t);return}return null===t?void this.emit("unknown",e,"Null value ignored"):("object"!=typeof t&&(t={data:t,time:Date.now()}),l[i]&&(l.lastTime=t.time,l.lastLevel=t.level,l.lastObj=t),r)?e:t},{autoDestroy:!0});l._destroy=function(e,t){let r=u(e,t);r&&"function"==typeof r.then&&r.then(t,t)},!1!==t.metadata&&(l[i]=!0,l.lastTime=0,l.lastLevel=0,l.lastObj=null);let f=e(l);if(f&&"function"==typeof f.catch)f.catch(e=>{l.destroy(e)}),f=null;else if(t.enablePipelining&&f)return s(l,f,{objectMode:!0});return l}},3746:(e,t,r)=>{"use strict";var i=r(5653),o=r(6880),s=r(9061),a=r(8078)("toStringTag"),c=Object,u="Arguments"===s(function(){return arguments}()),l=function(e,t){try{return e[t]}catch(e){}};e.exports=i?s:function(e){var t,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=l(t=c(e),a))?r:u?s(t):"Object"===(i=s(t))&&o(t.callee)?"Arguments":i}},3806:(e,t,r)=>{"use strict";var i=r(4554);e.exports=function(e,t){return i[e]||(i[e]=t||{})}},3808:(e,t,r)=>{"use strict";var i=r(4526);e.exports=function(){var e=i(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},3845:(e,t,r)=>{"use strict";var i=r(4689),o=r(1196),s=r(4526),a=r(8498),c=r(8550),u=r(2913),l=r(6814),f=r(9058),p=r(574),h=r(9384),d=TypeError,g=function(e,t){this.stopped=e,this.result=t},y=g.prototype;e.exports=function(e,t,r){var m,b,v,w,_,S,x,E=r&&r.that,O=!!(r&&r.AS_ENTRIES),k=!!(r&&r.IS_RECORD),j=!!(r&&r.IS_ITERATOR),T=!!(r&&r.INTERRUPTED),R=i(t,E),P=function(e){return m&&h(m,"normal"),new g(!0,e)},M=function(e){return O?(s(e),T?R(e[0],e[1],P):R(e[0],e[1])):T?R(e,P):R(e)};if(k)m=e.iterator;else if(j)m=e;else{if(!(b=p(e)))throw new d(a(e)+" is not iterable");if(c(b)){for(v=0,w=u(e);w>v;v++)if((_=M(e[v]))&&l(y,_))return _;return new g(!1)}m=f(e,b)}for(S=k?e.next:m.next;!(x=o(S,m)).done;){try{_=M(x.value)}catch(e){h(m,"throw",e)}if("object"==typeof _&&_&&l(y,_))return _}return new g(!1)}},3892:(e,t,r)=>{"use strict";var i,o,s=r(2025),a=r(1576),c=s.process,u=s.Deno,l=c&&c.versions||u&&u.version,f=l&&l.v8;f&&(o=(i=f.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=+i[1]),e.exports=o},3946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(5267),r(777),r(9071),r(7055),r(5410),r(8630),r(4099);let i={width:80,_program:{},_options:[],program:(e={})=>(i._program=e,i),option:(e,t={})=>(e=Array.isArray(e)?e:[e],t.dest=t.dest||e.slice(-1)[0].toLowerCase().replace(/^-+/,"").replace(/-[a-z]/g,e=>e.slice(1).toUpperCase()),t.help=t.help||({help:"output usage information",version:"output the version number"})[t.action],i._options.push(Object.assign(t,{flags:e,positional:!e[0].startsWith("-")})),i),parse:e=>{let t=i._options.map((e,t)=>e.positional?t:null).filter(e=>null!==e),o={};i._options.forEach((e,t)=>e.positional?null:e.flags.forEach(e=>o[e]=t)),i._program.name=i._program.name||r(6928).parse(e[1]).base;let s=e.slice(2).reduce((e,t)=>/^-[^-]/.test(t)?e.concat(t.slice(1).split("").map(e=>"-"+e)):e.concat(t),[]),l=0;for(;l<s.length;){let e=null,r=s[l],f=r.startsWith("-")?o[r]:t.shift();void 0===f&&(r.startsWith("-")?u(`no such option: ${r}`):u(`extra arguments found: ${r}`)),r.startsWith("-")&&(l+=1);let{action:p}=i._options[f];if(["help","version"].includes(p))"help"===p?a():"version"===p&&c();else if(["store_true","store_false"].includes(p))e="store_true"===p;else{let t=s.slice(l).findIndex(e=>e in o),a=-1===t?s.length:l+t;0===(e=s.slice(l,a)).length&&(i._options[f].positional?u(`the following arguments are required: ${r}`):"+"===i._options[f].nargs?u(`argument ${r}: expected at least one argument`):u(`argument ${r}: expected one argument`)),"+"!==i._options[f].nargs?(e=e[0],l+=1):l=a}i[i._options[f].dest]=e}return t.length&&u(`the following arguments are required: ${t.map(e=>i._options[e].flags[0]).join(", ")}`),i}},o=e=>Array(e+1).join(" "),s=()=>{let e=i._options.map(e=>{let t=e.flags.sort((e,t)=>e.length-t.length)[0],r=e.metavar||e.dest;if(e.positional)if("+"===e.nargs)return`${r} [${r} ...]`;else return`${r}`;return["store_true","store_false","help","version"].includes(e.action)?`[${t}]`:"+"===e.nargs?`[${t} ${r} [${r} ...]]`:`[${t} ${r}]`}),t=i.width,r=`usage: ${i._program.name}`,s=[r];e.map(e=>" "+e).forEach(e=>{s[s.length-1].length+e.length<t?s[s.length-1]+=e:s.push(o(r.length)+e)}),console.log(s.join(` |