mirror of https://github.com/KingRan/KR.git
13 lines
29 KiB
JavaScript
13 lines
29 KiB
JavaScript
/*
|
|
领京豆签到
|
|
cron:15 0,16 * * *
|
|
============Quantumultx===============
|
|
[task_local]
|
|
#领京豆签到
|
|
15 0,16 * * * jd_beanSign.js, tag=领京豆签到, enabled=true
|
|
*/
|
|
|
|
const $ = new Env('领京豆签到');
|
|
var version_='jsjiami.com.v7';const lIIIl1Il=II1l1Il1;(function(lliilIl1,llIi1i11,lI1ll1il,Iil1Il1I,illilIl1,iIIllill,IIIllI1){return lliilIl1=lliilIl1>>0x4,iIIllill='hs',IIIllI1='hs',function(l1lI1Ii1,iiIli1I,ili1l1II,i1liIli1,I1I1llI){const i1l11Il1=II1l1Il1;i1liIli1='tfi',iIIllill=i1liIli1+iIIllill,I1I1llI='up',IIIllI1+=I1I1llI,iIIllill=ili1l1II(iIIllill),IIIllI1=ili1l1II(IIIllI1),ili1l1II=0x0;const l1l1l11=l1lI1Ii1();while(!![]&&--Iil1Il1I+iiIli1I){try{i1liIli1=parseInt(i1l11Il1(0x1d4,'RC*('))/0x1*(-parseInt(i1l11Il1(0x228,'X9W0'))/0x2)+parseInt(i1l11Il1(0x1cb,'aEvB'))/0x3+parseInt(i1l11Il1(0x1a8,'3OSs'))/0x4*(-parseInt(i1l11Il1(0x210,'Q%ei'))/0x5)+-parseInt(i1l11Il1(0x23b,'fsF%'))/0x6*(parseInt(i1l11Il1(0x1a4,'GhN3'))/0x7)+parseInt(i1l11Il1(0x1b8,'PSPp'))/0x8+-parseInt(i1l11Il1(0x22b,'Jnk*'))/0x9+parseInt(i1l11Il1(0x1e7,'GhN3'))/0xa;}catch(Ii1Ili){i1liIli1=ili1l1II;}finally{I1I1llI=l1l1l11[iIIllill]();if(lliilIl1<=Iil1Il1I)ili1l1II?illilIl1?i1liIli1=I1I1llI:illilIl1=I1I1llI:ili1l1II=I1I1llI;else{if(ili1l1II==illilIl1['replace'](/[nkeGqMCJwLNupKxWIf=]/g,'')){if(i1liIli1===iiIli1I){l1l1l11['un'+iIIllill](I1I1llI);break;}l1l1l11[IIIllI1](I1I1llI);}}}}}(lI1ll1il,llIi1i11,function(lIiii1ll,IIil1lI,Iil1IiI,li11lIi,i1l1iiII,IlIIilI,I1iIlIl){return IIil1lI='\x73\x70\x6c\x69\x74',lIiii1ll=arguments[0x0],lIiii1ll=lIiii1ll[IIil1lI](''),Iil1IiI=`\x72\x65\x76\x65\x72\x73\x65`,lIiii1ll=lIiii1ll[Iil1IiI]('\x76'),li11lIi=`\x6a\x6f\x69\x6e`,(0x13b43b,lIiii1ll[li11lIi](''));});}(0xc00,0xa9b4a,II1Ii1ll,0xc2),II1Ii1ll)&&(version_=II1Ii1ll);const l1Ili1l=$['isNode']()?require(lIIIl1Il(0x24a,'Jnk*')):'',l1l1=$['isNode']()?require('./jdCookie.js'):'',IiI11I11=require('./function/krgetToken'),i1iiIil=require(lIIIl1Il(0x268,'5CXH')),IiIi1iil=require(lIIIl1Il(0x20a,'F4Qr')),i11iIlil=process[lIIIl1Il(0x1f3,'d10N')][lIIIl1Il(0x1eb,'GhN3')]||'';let iI1IiIil=i11IiIlI(0x28,lIIIl1Il(0x1fe,'$asw')),lIIil1ll=[],iilIIill='';if($[lIIIl1Il(0x245,'bfS7')]()){Object[lIIIl1Il(0x1b3,'OZ8[')](l1l1)[lIIIl1Il(0x241,'X9W0')](iIll1lI=>{const I111l1ll=lIIIl1Il;lIIil1ll[I111l1ll(0x1be,'d10N')](l1l1[iIll1lI]);});if(process[lIIIl1Il(0x1f2,'v1iJ')][lIIIl1Il(0x21d,'bfS7')]&&process[lIIIl1Il(0x247,'c%OK')]['JD_DEBUG']==='false')console[lIIIl1Il(0x1cf,'aEvB')]=()=>{};}else lIIil1ll=[$[lIIIl1Il(0x1d2,'3OSs')](lIIIl1Il(0x23c,'n$Gy')),$['getdata']('CookieJD2'),...iilIiIlI($[lIIIl1Il(0x1fd,'k5[E')](lIIIl1Il(0x1c8,'#zXm'))||'[]')[lIIIl1Il(0x20d,'Ocya')](lill111l=>lill111l['cookie'])][lIIIl1Il(0x1ed,'pF3d')](iiliII11=>!!iiliII11);let i1III1lI='';const liIllI=lIIIl1Il(0x1df,'F4Qr');function II1l1Il1(_0x1d9773,_0x374298){const _0x5ec842=II1Ii1ll();return II1l1Il1=function(_0x4c49d6,_0x49d7e9){_0x4c49d6=_0x4c49d6-0x1a2;let _0x2164f9=_0x5ec842[_0x4c49d6];if(II1l1Il1['HrnWlM']===undefined){var _0x28ecc1=function(_0x24129d){const _0x3ff622='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x369551='',_0x413c64='';for(let _0x16e6c6=0x0,_0x424fd7,_0xd9f6e3,_0x5f207e=0x0;_0xd9f6e3=_0x24129d['charAt'](_0x5f207e++);~_0xd9f6e3&&(_0x424fd7=_0x16e6c6%0x4?_0x424fd7*0x40+_0xd9f6e3:_0xd9f6e3,_0x16e6c6++%0x4)?_0x369551+=String['fromCharCode'](0xff&_0x424fd7>>(-0x2*_0x16e6c6&0x6)):0x0){_0xd9f6e3=_0x3ff622['indexOf'](_0xd9f6e3);}for(let _0x421ffd=0x0,_0x305a8b=_0x369551['length'];_0x421ffd<_0x305a8b;_0x421ffd++){_0x413c64+='%'+('00'+_0x369551['charCodeAt'](_0x421ffd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x413c64);};const _0x69c3ba=function(_0x158183,_0x529c14){let _0x57b67f=[],_0x56b5fa=0x0,_0x4e3d9a,_0x584648='';_0x158183=_0x28ecc1(_0x158183);let _0x40dd82;for(_0x40dd82=0x0;_0x40dd82<0x100;_0x40dd82++){_0x57b67f[_0x40dd82]=_0x40dd82;}for(_0x40dd82=0x0;_0x40dd82<0x100;_0x40dd82++){_0x56b5fa=(_0x56b5fa+_0x57b67f[_0x40dd82]+_0x529c14['charCodeAt'](_0x40dd82%_0x529c14['length']))%0x100,_0x4e3d9a=_0x57b67f[_0x40dd82],_0x57b67f[_0x40dd82]=_0x57b67f[_0x56b5fa],_0x57b67f[_0x56b5fa]=_0x4e3d9a;}_0x40dd82=0x0,_0x56b5fa=0x0;for(let _0x248629=0x0;_0x248629<_0x158183['length'];_0x248629++){_0x40dd82=(_0x40dd82+0x1)%0x100,_0x56b5fa=(_0x56b5fa+_0x57b67f[_0x40dd82])%0x100,_0x4e3d9a=_0x57b67f[_0x40dd82],_0x57b67f[_0x40dd82]=_0x57b67f[_0x56b5fa],_0x57b67f[_0x56b5fa]=_0x4e3d9a,_0x584648+=String['fromCharCode'](_0x158183['charCodeAt'](_0x248629)^_0x57b67f[(_0x57b67f[_0x40dd82]+_0x57b67f[_0x56b5fa])%0x100]);}return _0x584648;};II1l1Il1['VVIOEY']=_0x69c3ba,_0x1d9773=arguments,II1l1Il1['HrnWlM']=!![];}const _0x5d5afa=_0x5ec842[0x0],_0x4a7232=_0x4c49d6+_0x5d5afa,_0x136617=_0x1d9773[_0x4a7232];return!_0x136617?(II1l1Il1['LrqtNt']===undefined&&(II1l1Il1['LrqtNt']=!![]),_0x2164f9=II1l1Il1['VVIOEY'](_0x2164f9,_0x49d7e9),_0x1d9773[_0x4a7232]=_0x2164f9):_0x2164f9=_0x136617,_0x2164f9;},II1l1Il1(_0x1d9773,_0x374298);}!(async()=>{const iiliI=lIIIl1Il,IIlill1={'VwVVg':iiliI(0x213,'L&Tk'),'tjPsP':iiliI(0x1dd,'fPyv'),'sHWQr':function(lil,Illlii11){return lil<Illlii11;},'wQDpV':function(II1iI11l,IIl1Ill1){return II1iI11l===IIl1Ill1;},'ywmmn':iiliI(0x1cd,'heC0'),'IukJH':iiliI(0x1d8,'c%OK'),'KabNP':function(Ill1Iil,iIlIIilI){return Ill1Iil(iIlIIilI);},'uuzfV':function(iIiIlili){return iIiIlili();}};if(!lIIil1ll[0x0]){$[iiliI(0x1b6,'AARE')]($['name'],IIlill1['VwVVg'],IIlill1['tjPsP'],{'open-url':IIlill1['tjPsP']});return;}console['log'](iiliI(0x1bb,'c%OK'));for(let Ii1IIII=0x0;IIlill1['sHWQr'](Ii1IIII,lIIil1ll[iiliI(0x1f1,'3OSs')]);Ii1IIII++){if(IIlill1[iiliI(0x264,'AARE')](IIlill1[iiliI(0x1e3,'D[oo')],IIlill1['ywmmn'])){if(lIIil1ll[Ii1IIII]){if(IIlill1[iiliI(0x21e,'K$S^')](IIlill1[iiliI(0x25f,'pF3d')],iiliI(0x219,']jnr'))){iilIIill=lIIil1ll[Ii1IIII],$[iiliI(0x206,'L&Tk')]=IIlill1['KabNP'](decodeURIComponent,iilIIill[iiliI(0x1b5,'qYG@')](/pt_pin=([^; ]+)(?=;?)/)&&iilIIill[iiliI(0x200,'n$Gy')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$['index']=Ii1IIII+0x1,$[iiliI(0x1d3,'K$S^')]=!![],$[iiliI(0x1bf,'fsF%')]='',message='',console[iiliI(0x1cf,'aEvB')](iiliI(0x205,'Rvo2')+$['index']+'】'+($[iiliI(0x257,'F!Nm')]||$[iiliI(0x22c,'n$Gy')])+'*********\x0a');if(!$['isLogin']){$[iiliI(0x1b1,'Jnk*')]($[iiliI(0x243,'c%OK')],iiliI(0x1c2,'Kynd'),iiliI(0x1f0,'fsF%')+$[iiliI(0x1f4,'u@ri')]+'\x20'+($[iiliI(0x262,'s&EW')]||$[iiliI(0x20c,'g9BN')])+iiliI(0x1b7,'s&EW'),{'open-url':IIlill1[iiliI(0x1a5,'7xB5')]});$['isNode']()&&await l1Ili1l[iiliI(0x23f,'D[oo')]($[iiliI(0x251,'u@ri')]+iiliI(0x211,'K!b@')+$[iiliI(0x22c,'n$Gy')],iiliI(0x20f,'s&EW')+$[iiliI(0x1c5,'3Sms')]+'\x20'+$[iiliI(0x244,'$Yjr')]+iiliI(0x1a2,'3OSs'));continue;}$['UA']=await IIlill1[iiliI(0x1db,'heC0')](Iiil1I),await IIlill1[iiliI(0x222,'aEvB')](liiiIiii),await $[iiliI(0x1b4,'v^fo')](0x5dc);}else iiI1IIll['log'](ll1II1ii);}}else ll1II1i1['log']('','❌\x20'+lilIlIll[iiliI(0x1d6,'Kynd')]+iiliI(0x1a3,'K$S^')+II1lIliI+'!','');}if(i1III1lI){if($[iiliI(0x1ec,'#zXm')]())await l1Ili1l[iiliI(0x252,'c%OK')](''+$['name'],''+i1III1lI);$[iiliI(0x1ea,'poyq')]($[iiliI(0x212,'K!b@')],'',i1III1lI);}})()[lIIIl1Il(0x235,'3Sms')](il1111il=>{const iil11lIi=lIIIl1Il;$['log']('','❌\x20'+$[iil11lIi(0x201,'PSPp')]+iil11lIi(0x1f9,'Kynd')+il1111il+'!','');})['finally'](()=>{const llI1i1II=lIIIl1Il;$[llI1i1II(0x208,'GhN3')]();});async function liiiIiii(){const I11111Il=lIIIl1Il,iIi1llil={'wTypC':function(iiIIIllI){return iiIIIllI();}};await iIi1llil[I11111Il(0x1ae,'dxe6')](Il1li11I),await $['wait'](0x1f4);}function lII1ili1(l1iliIlI,illl1ii={}){const i1il11lI=lIIIl1Il,ii1ii1l1={'IhSzM':function(IIiIi11l,lI1I1l1){return IIiIi11l===lI1I1l1;},'ZseKT':i1il11lI(0x23a,'poyq'),'hVqJR':function(l11li1i1,I1IliIii){return l11li1i1(I1IliIii);},'JisFj':function(ll1lI1I1,I11l1il){return ll1lI1I1+I11l1il;}};let l1IlIli1=[],IiII1i1I=illl1ii[i1il11lI(0x26d,'EVuG')]||'&',I11l1lil=Object[i1il11lI(0x25e,'b1$w')](l1iliIlI);if(illl1ii[i1il11lI(0x21f,'eZk5')])I11l1lil=I11l1lil[i1il11lI(0x221,'ToaF')]();for(let iiii1Iil of I11l1lil){let lIil1l1I=l1iliIlI[iiii1Iil];if(lIil1l1I&&ii1ii1l1['IhSzM'](typeof lIil1l1I,ii1ii1l1[i1il11lI(0x1ee,'X9W0')]))lIil1l1I=JSON[i1il11lI(0x1cc,'eZk5')](lIil1l1I);if(lIil1l1I&&illl1ii['encode'])lIil1l1I=ii1ii1l1[i1il11lI(0x22f,'k5[E')](encodeURIComponent,lIil1l1I);l1IlIli1[i1il11lI(0x207,'F!Nm')](ii1ii1l1[i1il11lI(0x1ab,'TFh6')](iiii1Iil+'=',lIil1l1I));}return l1IlIli1['join'](IiII1i1I);}async function Il1li11I(){const I1l1lliI=lIIIl1Il,l1liIll={'YFSHp':function(iIiIII,ll1i1I1){return iIiIII-ll1i1I1;},'CJosi':function(I1IIl1il,lIII1lIi){return I1IIl1il===lIII1lIi;},'yhKli':I1l1lliI(0x1e0,'3OSs'),'nUCel':'jIynR','bZyPI':function(i111lIlI,l11I1II){return i111lIlI===l11I1II;},'UvkFv':I1l1lliI(0x237,'[OHT'),'tdxcu':function(i111illl,lll1lil){return i111illl==lll1lil;},'raCZD':I1l1lliI(0x226,'5CXH'),'cnXuu':I1l1lliI(0x26b,'eZk5'),'ISnyd':function(i1I1IIII,llIi1i1i){return i1I1IIII==llIi1i1i;},'tDNWq':function(iilli1Il,ii1Il1lI){return iilli1Il!==ii1Il1lI;},'EsftJ':'cxFbg','nrShI':function(liIll1ii){return liIll1ii();},'keWUk':I1l1lliI(0x1ca,'AARE'),'WNbwG':I1l1lliI(0x240,'D[oo'),'SRLyp':I1l1lliI(0x24e,'7xB5'),'bItZZ':function(liI1II1I,iliIIlII){return liI1II1I+iliIIlII;},'zqnaa':I1l1lliI(0x1c0,'$asw'),'PKEcz':function(ll11Ii,ll1I1lIl){return ll11Ii*ll1I1lIl;}},II1illI=I1l1lliI(0x259,'#zXm'),l1ll1i1={'fp':'-1','shshshfp':'-1','shshshfpa':'-1','referUrl':'-1','userAgent':'-1','jda':'-1','rnVersion':I1l1lliI(0x234,'F4Qr')};let i1I11iiI={'url':liIllI+I1l1lliI(0x1d0,'3OSs')+JSON['stringify'](l1ll1i1)+'&appid=ld&client=apple&clientVersion=12.0.10&uuid='+iI1IiIil+I1l1lliI(0x1de,'k5[E')+iI1IiIil+I1l1lliI(0x21c,'v^fo'),'headers':{'Host':l1liIll[I1l1lliI(0x25a,'PSPp')],'Accept':I1l1lliI(0x26f,'H9si'),'Cookie':l1liIll[I1l1lliI(0x265,'k5[E')](iilIIill,I1l1lliI(0x1f7,'c%OK')),'User-Agent':$['UA'],'Accept-Language':I1l1lliI(0x269,'3OSs'),'Accept-Encoding':I1l1lliI(0x22d,'5CXH'),'Referer':l1liIll[I1l1lliI(0x1b2,'D[oo')]},'timeout':l1liIll['PKEcz'](0xa,0x3e8)};return new Promise(IliIiiiI=>{const ilIilii=I1l1lliI,l1IIiI={'hGNSn':function(i1iiilII,I1liiil){return i1iiilII==I1liiil;},'sBPKW':l1liIll['keWUk'],'GtCBu':function(lil1i11i,I1i1lili){return l1liIll['bZyPI'](lil1i11i,I1i1lili);},'eEpsM':l1liIll['WNbwG']};$[ilIilii(0x227,'3OSs')](i1I11iiI,(ilIi1l1,lii11Ii,lI1iiIii)=>{const il1lIiI1=ilIilii,lI1iiiII={'wHEvf':function(lII1iilI,iIIi1iI){return lII1iilI*iIIi1iI;},'WcTzH':function(i11i1lil,i1iIiil){const ii1II1I1=II1l1Il1;return l1liIll[ii1II1I1(0x250,'u@ri')](i11i1lil,i1iIiil);},'httTU':'请勿随意在BoxJs输入框修改内容\x0a建议通过脚本去获取cookie'};if(l1liIll[il1lIiI1(0x1fc,'g9BN')](l1liIll[il1lIiI1(0x1e4,'Ocya')],l1liIll[il1lIiI1(0x25b,'ToaF')])){var Iilili=III1ii1l['round'](lI1iiiII[il1lIiI1(0x253,'$Yjr')](l1lllliI[il1lIiI1(0x246,'aEvB')](),lI1iiiII[il1lIiI1(0x1fa,'Q%ei')](llII1lll['length'],0x1)));I1lllI1i+=iIlIi11I[il1lIiI1(0x21a,'bfS7')](Iilili,Iilili+0x1);}else try{if(ilIi1l1){if(l1liIll['bZyPI'](il1lIiI1(0x258,'3Sms'),l1liIll[il1lIiI1(0x1c7,'Kynd')]))$[il1lIiI1(0x24d,'n$Gy')](ilIi1l1);else{if(l1IIiI['hGNSn'](typeof i1li1ii1,il1lIiI1(0x24f,'TFh6')))try{return ill1lll[il1lIiI1(0x1fb,'u@ri')](llilIili);}catch(liIillil){return ili11I[il1lIiI1(0x1f8,'GhN3')](liIillil),i1ll11i1[il1lIiI1(0x23d,'dxe6')](ilill1II[il1lIiI1(0x209,'L&Tk')],'',l1IIiI[il1lIiI1(0x1f5,'Ocya')]),[];}}}else{lI1iiIii=JSON[il1lIiI1(0x1e8,'AARE')](lI1iiIii);if(l1liIll[il1lIiI1(0x248,'dxe6')](lI1iiIii[il1lIiI1(0x1b0,'$asw')],0x0)&&!lI1iiIii?.[il1lIiI1(0x1c9,'5CXH')]){if(lI1iiIii?.[il1lIiI1(0x25d,'5CXH')]?.[il1lIiI1(0x220,'X9W0')])console['log'](''+(lI1iiIii?.[il1lIiI1(0x239,'dxe6')]?.[il1lIiI1(0x1aa,'ToaF')]?.['title']||'')+(lI1iiIii?.[il1lIiI1(0x270,'fsF%')]?.['newUserAward']?.['subTitle']||'')+lI1iiIii?.[il1lIiI1(0x1c4,'K!b@')]?.['newUserAward']?.[il1lIiI1(0x1e5,'poyq')][0x1]?.[il1lIiI1(0x249,'d10N')]+'京豆');else{if(l1liIll['bZyPI'](l1liIll['raCZD'],l1liIll[il1lIiI1(0x238,'n$Gy')]))return iIiiIIll[il1lIiI1(0x254,'PSPp')](l1lI1lli),il1ll1il[il1lIiI1(0x236,'3Sms')](I11ili[il1lIiI1(0x232,'7xB5')],'',lI1iiiII['httTU']),[];else{let IlI1IIi1=lI1iiIii?.[il1lIiI1(0x1d5,'PSPp')]?.[il1lIiI1(0x1e1,'K!b@')]||lI1iiIii?.[il1lIiI1(0x20e,'c%OK')]?.['continuityAward']||lI1iiIii?.['data']?.[il1lIiI1(0x1e9,'heC0')];console[il1lIiI1(0x224,'7xB5')](''+(IlI1IIi1?.['title']||'')+(IlI1IIi1?.[il1lIiI1(0x25c,'RC*(')]||'')+IlI1IIi1?.['beanAward']?.[il1lIiI1(0x266,'$asw')]+'京豆');}}}else{if(l1liIll[il1lIiI1(0x23e,'Q%ei')](lI1iiIii[il1lIiI1(0x1b0,'$asw')],0x3)){if(l1liIll[il1lIiI1(0x22e,'RC*(')](l1liIll[il1lIiI1(0x21b,'Kynd')],l1liIll[il1lIiI1(0x1ac,'n$Gy')])){iI1lilIl[il1lIiI1(0x223,'[OHT')](ilIIili)['forEach'](IiI1I111=>{const iIIIlii=il1lIiI1;IIi11I1i[iIIIlii(0x214,'5CXH')](IIiIlI11[IiI1I111]);});if(IllI1ll1[il1lIiI1(0x24b,'PSPp')][il1lIiI1(0x204,'3Sms')]&&l1IIiI[il1lIiI1(0x215,'pF3d')](lIii1l[il1lIiI1(0x1d7,'poyq')]['JD_DEBUG'],l1IIiI[il1lIiI1(0x1d9,'OZ8[')]))l1I1I111[il1lIiI1(0x1a9,'Jnk*')]=()=>{};}else console['log'](il1lIiI1(0x242,'AARE')+lI1iiIii?.[il1lIiI1(0x26e,'PSPp')]);}else console[il1lIiI1(0x26a,'g9BN')]('签到失败,'+lI1iiIii?.[il1lIiI1(0x1c9,'5CXH')]+':'+lI1iiIii?.['errorMessage']);}}}catch(iii1ll1l){$[il1lIiI1(0x1a7,'F4Qr')](iii1ll1l);}finally{l1liIll[il1lIiI1(0x1f6,'v1iJ')](IliIiiiI);}});});}async function Iiil1I(){const i1l11=lIIIl1Il,iIlliII1={'ldkSp':i1l11(0x1ff,'Rvo2'),'UvLJr':function(Il11i1ii,l1lIl1iI){return Il11i1ii<l1lIl1iI;},'CPQoH':function(i1lIIlli,li1l1l1){return i1lIIlli*li1l1l1;},'DzoiZ':function(I1l1IIIl,lIll1lll){return I1l1IIIl-lIll1lll;},'mLmdD':function(lIIl1IIl,Ii11iill){return lIIl1IIl+Ii11iill;},'kEszj':i1l11(0x267,'u@ri'),'vbQLW':i1l11(0x263,'Rvo2'),'Wujnu':i1l11(0x1d1,'Ocya')};for(var lIIlii1i='',Iil1Ii1i=iIlliII1[i1l11(0x1c6,'c%OK')],IIIi111i=0x0;iIlliII1[i1l11(0x202,'F4Qr')](IIIi111i,0x10);IIIi111i++){var l1ii1Ii1=Math['round'](iIlliII1[i1l11(0x203,'7xB5')](Math[i1l11(0x225,'Jnk*')](),iIlliII1[i1l11(0x217,'$Yjr')](Iil1Ii1i['length'],0x1)));lIIlii1i+=Iil1Ii1i[i1l11(0x229,'dxe6')](l1ii1Ii1,iIlliII1[i1l11(0x261,'K!b@')](l1ii1Ii1,0x1));}return iI1IiIil=Buffer[i1l11(0x260,'fPyv')](lIIlii1i,i1l11(0x230,'GhN3'))[i1l11(0x231,'H9si')](iIlliII1[i1l11(0x22a,'7xB5')]),ep=encodeURIComponent(JSON['stringify']({'hdid':iIlliII1[i1l11(0x233,'F4Qr')],'ts':new Date()['getTime'](),'ridx':-0x1,'cipher':{'sv':i1l11(0x1bc,'GhN3'),'ud':iI1IiIil,'iad':''},'ciphertype':0x5,'version':iIlliII1[i1l11(0x1bd,'Rvo2')],'appname':i1l11(0x1b9,'fPyv')})),'jdapp;iPhone;12.0.1;;;M/5.0;appBuild/168684;jdSupportDarkMode/0;ef/1;ep/'+ep+';Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2014_8\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148;supportJDSHWK/1;';}function i11IiIlI(iII1l1Il,i1lliI1l=lIIIl1Il(0x1af,'AARE')){const Il1iiIIl=lIIIl1Il,liIiiIil={'SQtrJ':function(i11liI1,i1Ii1i){return i11liI1!==i1Ii1i;},'iNMOH':Il1iiIIl(0x1ce,'k5[E'),'yHvcb':Il1iiIIl(0x256,'$Yjr'),'SjzFQ':function(IIIi1lIi,IlIli1II){return IIIi1lIi*IlIli1II;}};let I11IIil1='';for(let li1il1ll=0x0;li1il1ll<iII1l1Il;li1il1ll++){liIiiIil[Il1iiIIl(0x24c,'n$Gy')](liIiiIil['iNMOH'],liIiiIil[Il1iiIIl(0x1a6,'Q%ei')])?I11IIil1+=i1lliI1l[Math[Il1iiIIl(0x1ba,'bfS7')](liIiiIil[Il1iiIIl(0x20b,'dxe6')](Math[Il1iiIIl(0x1ad,'F!Nm')](),i1lliI1l[Il1iiIIl(0x1ef,'b1$w')]))]:IlII1IiI[Il1iiIIl(0x1e6,'b1$w')]();}return I11IIil1;}function iilIiIlI(Ill1llIl){const II1lili1=lIIIl1Il,li1lIiiI={'FRpXV':function(iiilli11,IliliilI){return iiilli11==IliliilI;},'WeTQJ':'string','sQqcX':II1lili1(0x216,'F!Nm')};if(li1lIiiI['FRpXV'](typeof Ill1llIl,li1lIiiI['WeTQJ']))try{return JSON['parse'](Ill1llIl);}catch(I1iIII11){return console[II1lili1(0x1e2,'EVuG')](I1iIII11),$[II1lili1(0x218,'$asw')]($[II1lili1(0x201,'PSPp')],'',li1lIiiI[II1lili1(0x255,'TFh6')]),[];}}function II1Ii1ll(){const lllIi1i1=(function(){return[...[version_,'GqJjsLNjLKiMJamWxiue.cnoKmw.fvL7wpCpfukI==','W4hdOmojWPzyWR/cHMnMjCkxEWm7WP3dTxBcKgHVwColjI5iWPK','qv/dTSkP','DLVdQG','mSkoWRpdK0e','qHHqWOu','sNpdLsq','WQGpWOGMhW','W53dPmol','e+ISKoMhR+AvLEEBK+w8NoIpRUwpGCoSsCkdWPNcVcpdLmo4j0BdINldG8kmW69GW40fymkEaZCnuWxdTSooDCo/uLCCnLBcMxZcSSo9W448W5HHWPSh','W4tcT8oIs8oJomk0WRZdOmk1WPWN','W4e5zSk/WQncW6OJarX9W6ffWOJdGcVdQxhdPa','W6G3EIJcNa','5RwW5yQT5yEU5y2T77+aqvtdKoMLREMHQmkO6AgX5lI96lgBWRlNRzNLIy0','WQxdVSkGtL57wXG','rIRcMfpcQG','bZ7dVgy','yKJcQmkMACkKmmkA','sKtdPSk8W6ZdLSkIrCk3rSk/CSoutCkrgW3dVCoZW7ZdLSk/oCoIq8k7bclcJCooo8ofxM3cOCk9qCknFwZcVColWObsW5aWW4ZdJCkiW47dSmk6W5xdJSk+W4ldT8k7CSoOW77cVSo6WQvRW5NcKNDaicRcQmosvCoPCfmSWPTXWOe0W45zW4/dPCkeWOdcPgldH8kwWOv3bJStz8kUWRldSmo8wqhdGv8YWOhcPmomiCkdWQLnW5X+W7xdImoWgmkGmmoJW7XJbfP1W5ddRmkftmkGWQlcOmkar8ofySkzW5n2yYRcImkSbhy8fuq6WRaZW5ZdMtWPdCkSdXdcOvxdMmk1hXhdVaCSaCouk8ozWPmiWPXDW69Bk8khmmo4WPCLEmo3W6HSoIC+W5m+qmkHrti5W73dOem/CeNdHSojsYRdUCk3lmoKEmogF3FdH8kqg8oosmkDWOSJD8kYzCk+m8oim8kWaJBdSmoHWQNcPSo7ySkAzSoddrhdGMPtWQpcH31ly8kGW5JcUeq9D8oXzLddQCkyW6lcNSoufdiVtsLmnmknW5JdLCkpjxbvaCo4fZfZW4tdJ8kQzJpcImoKaCksdXtcImkaaSkgnrBdUCoAWQWmEd7cJf/dISk6W7DHWOrUWP3cR8omWQZdQ3WgW5FdNmoqWPv1WRBdGeGaWQ7dJmkdkKrWW4KLWOVdHmk1WORcJq4Yqcf+us7cIuxcLYFdV8keWR3cTvddII3cOSoXWRrxW4LcW4nso8kzWOyoWOnEWPutm8kEWRmIW6yzWQLTW7ddKqddQ8oIwutdGmovu8kYoIlcUmo6W7FcHCkdW40/WPn7W6PYWPTkWQK8xSkxfSkIW6DsjSk/W4vwWOzUumolWQGkW4ubWOPmW4HavSo/W794WP3cPI1ZnSonvs/dG8oHFvzTttJcSXjfxmoTWR7dKSofqI7cRKRdHSoQW6TSWOhdVhGPWOvneSkCoSkHWPlcJqxcV8o7W5uZWQNcRCoTWQXkW6WVWQlcMNJcTxy4W6ZdV8oLoSode8omWPvpW6X/tCkhrajOfWr0W6hdKKvGWQLxWRRdKCkKaCkgWPNcQmoTiq','zhzhW7OXlSosW41mWOv0zXJdVq','44o95O2D56AB44gdWQZcLHCZWO915BsC5As75PAq','sGfLfCoPBCkYW5D0W6m','WRFdU8oZW7a','hSoqW658pW','j2hdOmoDWQO','WRJdU8okfmk5','xmkmWQb1WOlcOSk6WOe4','WR7cPSkAubzyBmoLbW','6k2h5yMO6zIJ5OER5zYeWOtcNhjdjUI9PEwfREAGOEs+S+AxG+weMowUPCoX5BU+6k676yc76l2V6iwk5P2G5y6D6i2d5y2er8k0WQxdGSoczq','WQKRW4zSndnBDGXXW47dNmod','jtmdWQvTCCkdWPTp','bvmKqmkr','mLWSC8or','W7z3WPy','FsPGWOmqW5K0tmoHjCoIASoiW7WkW7SrDSkakWxdL8khWPW','nCkwfdaf','jsLHWOKsW5K8','eLuLqmoYW44Q','dCkMAg7cIZxcN8kCW5a','WPBdPSkLgW','WOpdRmomnW','k8oBAW','ix/dS8ohWOS','tdHzWOvm','W4NdNCkbWQxdM3JcMCkvd1S1dmkV','p0KPumks','zxbbW7u3lSkPWQPfWRP9Fa','W4OIF8oHW6noW7vUfGaYW6upWOJcGspdPdpdOSkUdYvlWPZdPWXOo8o9W6BdOmoRW7JcISkmWQevW50pmSkNWPGS','w1CMqmosASkNW7LNWRG','WQPDjfhcOCkiW4RdK0pdIaf5WO8/a8oilSkBW5GoW4L7WOejW7f2W5hdRrlcV8o+u8ouW44','lG1MWQO+','WRFdU8oUW73cKdNcQLJcNCkz','kSkYjW','mCkiWRddN04','FCoqB3jF','l8ocFmkgm8kLpsiF','WQFdR3pcQq','W5tcHCoveYGYxHu+tSkkWRvsbq','W4ddTSoEWPDj','jfKKy8k3oZVcJKRdK8kcW5e','i8ogEG','WQZdSmk8DLnnkhOpw8k6WRXl','DSkqWOfXWO/cOG','cSkfB8oKDmoR','WQdcNCotW5JcVq','WQ/dPxpcQ3VdKW','5lQG5lI96lET5yY6','lIL7WOOhW4u','WQqzW6C'],...(function(){return[...['eIxdUq','orNcNqJcRa','D8o6DfvH','WQ8fW4ieW68','ffRdOCoQWOvYyCoMWQr+W6NcHmkSv8o2srRcLLRdN8knW5RcOCknW6vWWP5dfJ3dP1FcRmo+qLpdImkv','WORdM8ke','W4hcREwMKoI1T8oUW5NLJ6FLMRJdNda','mmksjtDf','ibBcIX7cSq','D8knzhFdIG','gL0IqCoDA8kI','eWlcOCo4WQRdMSk6uSoMq8oGAmkFvCkbtbVdU8oXWQpdHCkICSkWfSkQbdddMCoAiSkqweNcVmkH','iw7dGa7dQ8oiWOBcGNBdRgdcI8kfWQefW5z0W6xcMSoBW5j0bdNcJupdN8kqW6hdNatdS8kmkmoPvmoBxcJcN8kTE8kuimkVmCoXALZdTCoKoSkqWRyDs2FcQZtcGCo/Da','zSkeW6FcJmoL','WPZdPSk8hW','WPDFhgVcOa','omkub8k5W4u','pCo6W5vDaItdSSo2','g3xdMbFdTCoxWPRLVRxLPOxJG4xKUQ3KU7xOT4dLJli','W7z/W5fclmoPWRPA','tq7cGCky','WOldM8knqa','W41TW5Lv','W6WgnLtcVmorWPhcLu3dLKC9WOzsbSobBCkxW5K','wMZdK0xdOa','yCk0BNBdRCoQAwO','ACozva','l2tdV8oV','5lQ15lU76lse5yYs','vCobmarSC8kXWR8','WRddTCoOW7RcGb3LTk/LPiJMLQFdNCoSW50','WR3dU8oQW7q','44kZ5O+C56Ao44cH6k6v5yEa6i2G5y+P5lQz5lIi6lwJ5yYr5lIYeIJcHxSqzHJNMP3MJ6BKVQtNLjpcQ8kjbSoBW5ZcHUEyPEs5QUs4QEESLEwjP+IpNUwnOa','WQVcOCkBvW','k8kyqmosza','6k+k5yQe6zM95OE/5z6oCYX/xaxOV7dLH6lMOzhKVlBMLiZLHO7LR7ZcQUw6L+IUH+MbJ+I8VoIhSUAESEwnREImIUwmGGj9FmkOW57cMa','W6/dN8kMt8oO','t0pdTq','W4CmWPO2WPu','W70UDZtcMSkfW7JdP8o3','WQJdVSohjSkf','g37dKZC0bmozWRKkC3lcHmoEF8osFmkIx2/dGSoxW5bWtLOTFSk9FL8','W4qFsGpcQ8k1W4tdJG','dhCTx8od','jsGdWRG','WPtcI8obW4BcMI/dMSkUl2WKea','vK5vWP8','W69TWOS8ua','WRpcSWLK','f8kRmq','AuNdOYKyiq','WP/cL8k+wdq','jsLH','W43dL8kfWQpcVdJdMCkOl2S','ENpdI3ddHCodDx/dVG','emkbjCkSW6C','lX7cUxvoFt3dOCo0W5KLWOtdKW','xSkwW7BcNCodW47cG8ot','WRZcRSkbt0G7z8oKbd7dQmkos8ooWR8PWRO','s8oBhNVcKG','fw4NB8oU','WPpdGmkfhq','aCorWQLKFmo6uJi','fCkLo8kZ','WRrlaw3cHq','W7ehAq','fmoFW756lW','gSonW60','WOVcJcj8W5i','AmklW4VcMSo4'],...(function(){return['BwFdNwi','iCoxD8krnmkD','obddVSo1D8kgb8k7x8op','smkkW7ZcHmoKW4RcPmoY','zhxdJG','lSkIhZrP','o8kAWRpdLM7dR8oBchpdRW','lSkEWRhdGuu','WPZcGCoeW5BcIcNdGa','56+o5yQN5AAD6lEbaa','jwtdPSoR','W77dLSkSvmo8WPpcGfK','W6COwYJcISks','W6H5WP8+AwW','lMVdVq','FwldKwddHa','fs7dRMdcQCo7WO7dQmkG','nqFdVIGzkeFdGmoVW4iIWOq','WPFdQCkN','wmk0W6FcNCoh','z8kkW7q','gSk0p8o4W6aeruJdTviDya','W44TxbWUeW','cthcQIxcPa','pHBcLaG','ogddPCoQWPrVCmoPWP1K','W5ZdRCkmumou','WP7dQmk2','W44ixXyy','W6hdRmkmDCoB','uXlcKCkBW6HqlMi','jmoKW5HYlq','zmobWQLUW4NdVCoRW6znWQVdN8ouc8o5ecNdMmkkW4tdO8oVWOHZiCoNWRJdLstcSvpcU8o6tSokW4lcKCo7W4H8W5FcLLddGv9RW7vsW7pdG8o4WORcRtL1zSkYgJldIYadxJLfW6NdVqlcGCkNW4BcL1BdJmkKbCkBW5iOWO4wWQVcMN3cLrldL8o9utbUW7nfW5GpW4xcOqDZBxHuW5CsW6zykq','WQhdLCkDa8kN','s3rKWO5E','tmoQmNJcIJJcUCkO','WR/cTCkCxG','WQJdPwtcVW','jCkzAmoAwq','W4qKzmo8','WR7dLSoQW7xcRq','D8koqCkoW6yOnhi','wXldI3VdRSkeW4FdOb7cOMFcHCkqWOGPW4bkW53cNmoAWOLShwlcIqRdHCk1WQBdQqpdJ8k+bCkJqSo8uGpcO8kQtmkKvq','W4FdHSoOWPr6','h3eIF8oM','qfxdS8kIW5ZcG8o4bmkR','mHBcIGJdOSo+','W7xdU8kosGP4D8oOdtZcPSkrxmkfW7O/WPS+WQxdTW','ocq4WQusW4mUdSomiSk9jSkgWQq','wmkOBa','gcmYWPHe','W7qzArhcGCoaWPdcKu7dNW','jCkYlLhcGCkFWQa5wq','WPFdTCkJfCkLqCkAWQhdOSkvWR8j','x8krW5a','AedcV8kS','soIUU+MhMoAvNEEyIow/UoIpQUwpTCoSa8oPpmosW7a','vWBLPzJOTiRcTmkh5y+B5zMVnmoq','W5dcHmoAfuL4e0GOBG','d8kUbSkLW50','hSk5bY5V','WQ5gnW','CxSLW5rhWPuEDmo8fmo+fq','D0FdQG','s0rqWR5bo8oADuS0WOFdOq','W7CWxtmQ','tSkwW7xcM8oh','tXRcNmkuW4LC','FLldKhpdSG'];}())];}())];}());II1Ii1ll=function(){return lllIi1i1;};return II1Ii1ll();};var version_ = 'jsjiami.com.v7';
|
|
// prettier-ignore
|
|
function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} |