/*
脚本引用 https://raw.githubusercontent.com/Keywos/rule/main/script/wy/js/wyres.js
*/
// @timestamp thenkey 2025-02-19 07:37:36
(()=>{var x=typeof globalThis<"u"?globalThis:{},J={exports:{}},K;function L(){return K||(K=1,J.exports=(f=f||function(h,_){var c;if(typeof window<"u"&&window.crypto&&(c=window.crypto),typeof self<"u"&&self.crypto&&(c=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(c=globalThis.crypto),!c&&x!==void 0&&x.crypto&&(c=x.crypto),!c)try{c=o}catch{}var E=function(){if(c){if(typeof c.getRandomValues=="function")try{return c.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof c.randomBytes=="function")try{return c.randomBytes(4).readInt32LE()}catch{}}throw new Error("6")},b=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),g={},R=g.lib={},v=R.Base=function(){return{extend:function(t){var e=b(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),i=R.WordArray=v.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=e!=_?e:4*t.length},toString:function(t){return(t||d).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,a=t.sigBytes;if(this.clamp(),n%4)for(var m=0;m>>2]>>>24-m%4*8&255;e[n+m>>>2]|=p<<24-(n+m)%4*8}else for(var l=0;l>>2]=r[l>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=h.ceil(e/4)},clone:function(){var t=v.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r>>2]>>>24-a%4*8&255;n.push((m>>>4).toString(16)),n.push((15&m).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new i.init(r,e/2)}},B=y.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],a=0;a>>2]>>>24-a%4*8&255;n.push(String.fromCharCode(m))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new i.init(r,e)}},O=y.Utf8={stringify:function(t){try{return decodeURIComponent(escape(B.stringify(t)))}catch{throw new Error("MU8")}},parse:function(t){return B.parse(unescape(encodeURIComponent(t)))}},S=R.BufferedBlockAlgorithm=v.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(t){typeof t=="string"&&(t=O.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e,r=this._data,n=r.words,a=r.sigBytes,m=this.blockSize,p=a/(4*m),l=(p=t?h.ceil(p):h.max((0|p)-this._minBufferSize,0))*m,k=h.min(4*l,a);if(l){for(var C=0;C>>2]|=c[g]<<24-g%4*8;h.call(this,b,E)}else h.apply(this,arguments)};_.prototype=f}}(),x.lib.WordArray)),X.exports}var ce={exports:{}},W={exports:{}},V,q;function le(){return V||(V=1,W.exports=(x=L(),void(x.lib.Cipher||function(f){var h=x,_=h.lib,c=_.Base,E=_.WordArray,b=_.BufferedBlockAlgorithm,g=h.enc;g.Utf8;var R=h.algo.EvpKDF,v=_.Cipher=b.extend({cfg:c.extend(),createEncryptor:function(e,r){return this.create(this._ENC_XFORM_MODE,e,r)},createDecryptor:function(e,r){return this.create(this._DEC_XFORM_MODE,e,r)},init:function(e,r,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=r,this.reset()},reset:function(){b.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(r){return typeof r=="string"?V:t}return function(r){return{encrypt:function(n,a,m){return e(a).encrypt(r,n,a,m)},decrypt:function(n,a,m){return e(a).decrypt(r,n,a,m)}}}}()});_.StreamCipher=v.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var i=h.mode={},y=_.BlockCipherMode=c.extend({createEncryptor:function(e,r){return this.Encryptor.create(e,r)},createDecryptor:function(e,r){return this.Decryptor.create(e,r)},init:function(e,r){this._cipher=e,this._iv=r}}),d=i.CBC=function(){var e=y.extend();return e.Encryptor=e.extend({processBlock:function(r,n){var a=this._cipher,m=a.blockSize;a.encryptBlock(r,n),this._prevBlock=r.slice(n,n+m)}}),e.Decryptor=e.extend({processBlock:function(r,n){var a=this._cipher,m=a.blockSize,p=r.slice(n,n+m);a.decryptBlock(r,n),this._prevBlock=p}}),e}(),B=(h.pad={}).kos={pad:function(e,r){for(var n=4*r,a=n-e.sigBytes%n,m=a<<24|a<<16|a<<8|a,p=[],l=0;l>>2];e.sigBytes-=r}};_.BlockCipher=v.extend({cfg:v.cfg.extend({mode:d,padding:B}),reset:function(){var e;v.reset.call(this);var r=this.cfg,n=r.iv,a=r.mode;this._xformMode==this._ENC_XFORM_MODE?e=a.createEncryptor:(e=a.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(a,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,r){this._mode.processBlock(e,r)},_doFinalize:function(){var e,r=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(r.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),r.unpad(e)),e},blockSize:4});var O=_.CipherParams=c.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),S=(h.format={}).OpenSSL={stringify:function(e){var r=e.ciphertext,n=e.salt;return(n?E.create([1398893684,1701076831]).concat(n).concat(r):r).toString(I)},parse:function(e){var r,n=I.parse(e),a=n.words;return a[0]==1398893684&&a[1]==1701076831&&(r=E.create(a.slice(2,4)),a.splice(0,4),n.sigBytes-=16),O.create({ciphertext:n,salt:r})}},u={words:[1698181731,1801809512,946104675,1751477816],sigBytes:16},t=_.SerializableCipher=c.extend({cfg:c.extend({format:S}),encrypt:function(e,r,n,a){a=this.cfg.extend(a);var m=e.createEncryptor(u,a),p=m.finalize(r),l=m.cfg;return O.create({ciphertext:p,key:u,iv:l.iv,algorithm:e,mode:this.nes,padding:this.kos,blockSize:e.blockSize,formatter:a.format})},decrypt:function(e,r,n,a){return a=this.cfg.extend(a),r=this._parse(r,a.format),e.createDecryptor(u,a).finalize(r)},_parse:function(e,r){return typeof e=="string"?r.parse(e,this):e}})}()))),W.exports}var Q={exports:{}},Z,P,T,N=(f=>f)(L(),se(),q||(q=1,ce.exports=(T=L(),le(),T.mode.nes=((P=T.lib.BlockCipherMode.extend()).Encryptor=P.extend({processBlock:function(f,h){this._cipher.encryptBlock(f,h)}}),P.Decryptor=P.extend({processBlock:function(f,h){this._cipher.decryptBlock(f,h)}}),P),T.mode.nes)),function(){return Z?Q.exports:(Z=1,Q.exports=(x=L(),function(){var f=x,h=f.lib.BlockCipher,_=f.algo,c=[],E=[],b=[],g=[],R=[],v=[],i=[],y=[],d=[],B=[];(function(){for(var u=[],t=0;t<256;t++)u[t]=t<128?t<<1:t<<1^283;var e=0,r=0;for(t=0;t<256;t++){var n=r^r<<1^r<<2^r<<3^r<<4;n=n>>>8^255&n^99,c[e]=n,E[n]=e;var a=u[e],m=u[a],p=u[m],l=257*u[n]^16843008*n;b[e]=l<<24|l>>>8,g[e]=l<<16|l>>>16,R[e]=l<<8|l>>>24,v[e]=l,l=16843009*p^65537*m^257*a^16843008*e,i[n]=l<<24|l>>>8,y[n]=l<<16|l>>>16,d[n]=l<<8|l>>>24,B[n]=l,e?(e=a^u[u[u[p^a]]],r^=u[u[r]]):e=r=1}})();var O=[0,1,2,4,8,16,32,64,128,27,54],S=_.AES=h.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var u=this._keyPriorReset=this._key,t=u.words,e=u.sigBytes/4,r=4*((this._nRounds=e+6)+1),n=this._keySchedule=[],a=0;a6&&a%e==4&&(l=c[l>>>24]<<24|c[l>>>16&255]<<16|c[l>>>8&255]<<8|c[255&l]):(l=c[(l=l<<8|l>>>24)>>>24]<<24|c[l>>>16&255]<<16|c[l>>>8&255]<<8|c[255&l],l^=O[a/e|0]<<24),n[a]=n[a-e]^l);for(var m=this._invKeySchedule=[],p=0;p>>24]]^y[c[l>>>16&255]]^d[c[l>>>8&255]]^B[c[255&l]]}}},encryptBlock:function(u,t){this._doCryptBlock(u,t,this._keySchedule,b,g,R,v,c)},decryptBlock:function(u,t){var e=u[t+1];u[t+1]=u[t+3],u[t+3]=e,this._doCryptBlock(u,t,this._invKeySchedule,i,y,d,B,E),e=u[t+1],u[t+1]=u[t+3],u[t+3]=e},_doCryptBlock:function(u,t,e,r,n,a,m,p){for(var l=this._nRounds,k=u[t]^e[0],C=u[t+1]^e[1],M=u[t+2]^e[2],w=u[t+3]^e[3],A=4,Y=1;Y>>24]^n[C>>>16&255]^a[M>>>8&255]^m[255&w]^e[A++],$=r[C>>>24]^n[M>>>16&255]^a[w>>>8&255]^m[255&k]^e[A++],F=r[M>>>24]^n[w>>>16&255]^a[k>>>8&255]^m[255&C]^e[A++],H=r[w>>>24]^n[k>>>16&255]^a[C>>>8&255]^m[255&M]^e[A++];k=U,C=$,M=F,w=H}U=(p[k>>>24]<<24|p[C>>>16&255]<<16|p[M>>>8&255]<<8|p[255&w])^e[A++],$=(p[C>>>24]<<24|p[M>>>16&255]<<16|p[w>>>8&255]<<8|p[255&k])^e[A++],F=(p[M>>>24]<<24|p[w>>>16&255]<<16|p[k>>>8&255]<<8|p[255&C])^e[A++],H=(p[w>>>24]<<24|p[k>>>16&255]<<16|p[C>>>8&255]<<8|p[255&M])^e[A++],u[t]=U,u[t+1]=$,u[t+2]=F,u[t+3]=H},keySize:8});f.AES=h._createHelper(S)}(),x.AES))}());$request||$done({});var ne=$request.headers?.["x-aeapi"]=="true";function fe(f){try{if(f=N.AES.decrypt(N.lib.WordArray.create(f)),ne){let h=new Uint8Array(f.sigBytes);for(let _=0;_>>2]>>>24-_%4*8&255;return JSON.parse(new TextDecoder("utf-8").decode($utils.ungzip(h)))}return JSON.parse(N.enc.Utf8.stringify(f))}catch(h){return console.log(h.message),null}}function de(f){f=N.AES.encrypt(JSON.stringify(f)).ciphertext;let h=new Uint8Array(f.sigBytes);for(let _=0;_>>2]>>>24-_%4*8&255;return h}var j=$request.url,ee={},te=j.match(/(?:^https?:\/\/[^\/]+)\/(?:e?api)(\/[a-z0-9-/]+)(\?.*)?/),re=te?te[1]:$done({}),s=fe($response.body),z=2e12,G=["PAGE_RECOMMEND_DAILY_RECOMMEND","PAGE_RECOMMEND_SPECIAL_CLOUD_VILLAGE_PLAYLIST","PAGE_RECOMMEND_SHORTCUT","HOMEPAGE_MUSIC_PARTNER","PAGE_RECOMMEND_RADAR","PAGE_RECOMMEND_RANK"];function ie(){if(ae())try{let f={PRGG:"PAGE_RECOMMEND_GREETING",PRDRD:"PAGE_RECOMMEND_DAILY_RECOMMEND",PRSCVPT:"PAGE_RECOMMEND_SPECIAL_CLOUD_VILLAGE_PLAYLIST",PRST:"PAGE_RECOMMEND_SHORTCUT",HMPR:"HOMEPAGE_MUSIC_PARTNER",PRRR:"PAGE_RECOMMEND_RADAR",PRRK:"PAGE_RECOMMEND_RANK",PRMST:"PAGE_RECOMMEND_MY_SHEET",PRCN:"PAGE_RECOMMEND_COMBINATION"};try{D=JSON.parse($argument)}catch{D=$argument}G=Object.keys(D).filter(h=>D[h]!=1).map(h=>f[h])}catch{}}var D;function oe(f){f?.musicPackage&&(f.musicPackage&&(f.musicPackage.expireTime=z,f.musicPackage.vipLevel=7),f.associator&&(f.associator.expireTime=z,f.associator.vipLevel=7),f.voiceBookVip&&(f.voiceBookVip.expireTime=z,f.voiceBookVip.vipLevel=7),f.redplus={vipCode:300,expireTime:z,iconUrl:null,dynamicIconUrl:null,vipLevel:7,isSignDeduct:!1,isSignIap:!1,isSignIapDeduct:!1,isSign:!1},f.redVipLevel&&(f.redVipLevel=7))}try{if(s===null)throw new Error("\u89E3\u5BC6\u5931\u8D25 "+ne+" : "+re);switch(re){case"/batch":let h=(i,y={})=>{s[i]?.data&&(s[i].data=y)};h("/api/comment/tips/v2/get",{count:0,offset:0,records:[]}),h("/api/social/event/bff/ad/resources"),h("/api/ad/get",{code:200,ads:{}});let _="/api/music-vip-membership/client/vip/info",c="/api/v2/resource/comments",E="/api/comment/feed/inserted/resources",b="/api/event/rcmd/topic/list",g="/api/platform/song/bff/grading/song/order/entrance";s[_]?.data&&oe(s[_].data),s[c]?.data?.comments&&s[c].data.comments.forEach(i=>{i.user?.followed===!1&&(i.user.followed=!0),i.user.vipRights=null,i.user.avatarDetail=null,i.userBizLevels=null,i.pendantData=null,i.tag.extDatas=[],i.tag.contentPicDatas=null}),s[E]?.data&&(s[E].data={},s[E].trp?.rules&&(s[E].trp.rules=[])),s[b]?.data?.topicList&&(s[b].data.topicList=[]),s[g]?.data?.songOrderEntrance&&(s[g].data.songOrderEntrance={});break;case"/v2/resource/comment/floor/get":s.data?.ownerComment&&(s.data.ownerComment.user.vipRights=null,s.data.ownerComment.user.avatarDetail={},s.data.ownerComment.pendantData=null),s.data?.comments&&s.data.comments.forEach(i=>{i.user?.followed===!1&&(i.user.followed=!0),i.user.vipRights=null,i.user.avatarDetail=null,i.userBizLevels=null,i.pendantData=null,i.tag.extDatas=[],i.tag.contentPicDatas=null});break;case"/music-vip-membership/client/vip/info":oe(s.data);break;case"api/ad/get":s={code:200,ads:{}};break;case"/link/position/show/resource":s.data?.crossPlatformResource?.positionCode&&s.data.crossPlatformResource.positionCode==="MyPageBar"&&(s.data.crossPlatformResource={});break;case"/user/follow/users/mixed/get/v2":s.data?.records&&s.data.records.forEach(i=>{i.mutualFollowDay===null&&(i.showContent={message:"\u{1F4A2}\u4ED6/\u5979,\u672A\u5173\u6CE8\u4F60",time:1e12,active:!0,boxContent:{}})});break;case"/vipnewcenter/app/resource/newaccountpage":s.data&&(s.data.mainTitle.vipCurrLevel=7,s.data.mainTitle.imgUrl="",s.data.mainTitle.jumpUrl="",s.data.mainTitle.reachMaxLevel=!0,s.data.subTitle.carousels=[],s.data.buttonTitle={});break;case"/link/home/framework/tab":let R=[],v=!1;if(ae())try{try{D=JSON.parse($argument)}catch{D=$argument}let i={MY:"\u6F2B\u6E38",DT:"\u7B14\u8BB0",FX:"\u53D1\u73B0"};R=Object.keys(D).filter(y=>D[y]==1).map(y=>i[y])}catch{v=!0}else v=!0;v&&(R=["\u6F2B\u6E38"]),s.data?.commonResourceList&&(s.data.commonResourceList=s.data.commonResourceList.filter(i=>!R.includes(i.title)),s.data.commonResourceList.forEach(i=>{i.title==="\u53D1\u73B0"&&(i.subCommonResourceList=i.subCommonResourceList.filter(y=>!["\u76F4\u64AD"].includes(y.title)))}));break;case"/song/play/more/list/v2":if(s.data?.bottomItem?.itemNodeList){let i=s.data.bottomItem.itemNodeList[0],y=i.find(B=>B.type==="effect"),d=i.indexOf(y);d!==-1&&(i.splice(d,1),i.unshift(y))}break;case"homepage/block/page":if(s.data?.blocks){for(let i=0;i!["\u6D3B\u52A8","\u5E7F\u544A"].includes(y.typeTitle));break}}break;case"/link/page/discovery/resource/show":if(s.data?.blockCodeOrderList)try{s.data.blockCodeOrderList=JSON.stringify(JSON.parse(s.data.blockCodeOrderList).filter(i=>!["PAGE_DISCOVERY_BANNER"].includes(i)))}catch{console.log("101123")}s.data?.blocks&&(s.data.blocks=s.data.blocks.filter(i=>!["PAGE_DISCOVERY_BANNER"].includes(i.bizCode)));break;case"/link/page/rcmd/resource/show":if(ie(),s.data?.blocks&&(s.data.blocks=s.data.blocks.filter(i=>G.includes(i.bizCode)),s.data.blocks.length>0)){for(let i=0;i{s.data.blocks[i].dslData[y].commonResourceList&&(s.data.blocks[i].dslData[y].commonResourceList=s.data.blocks[i].dslData[y].commonResourceList.forEach(d=>{(d.summary||d.extraMap||d.title)&&(d.summary&&(d.summary=""),d.extraMap&&(d.extraMap={}),d.trp_id&&(d.trp_id=""),d.log&&(d.log={}),d.icon&&(d.icon=""),d.actionUrl&&(d.actionUrl=""),d.s_ctrp&&(d.s_ctrp=""),d.resourceType&&(d.resourceType=""))}))});break}}if(s.data?.blockCodeOrderList)try{s.data.blockCodeOrderList=JSON.stringify(JSON.parse(s.data.blockCodeOrderList).filter(i=>G.includes(i)))}catch{}break;case"/link/page/rcmd/block/resource/multi/refresh":if(s.data&&(ie(),s.data=s.data.filter(i=>G.includes(i.blockCode)),s.data?.length>0)){for(let i=0;i{s.data[i].block.dslData[y].commonResourceList&&(s.data[i].block.dslData[y].commonResourceList=s.data[i].block.dslData[y].commonResourceList.forEach(d=>{(d.summary||d.extraMap||d.title)&&(d.summary&&(d.summary=""),d.extraMap&&(d.extraMap={}),d.trp_id&&(d.trp_id=""),d.log&&(d.log={}),d.icon&&(d.icon=""),d.actionUrl&&(d.actionUrl=""),d.s_ctrp&&(d.s_ctrp=""),d.resourceType&&(d.resourceType=""))}))});break}}break;default:console.log("\u672A\u5339\u914D\u5230: "+j),$done({})}ee={body:de(s)}}catch(f){console.log(j),console.log(f.message)}finally{$done(ee)}function ae(){return typeof $argument<"u"&&$argument!==""}})();