faker3/jd_dpqd_record.js
2024-07-14 21:16:07 +08:00

19 lines
33 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
活动名称:批量店铺签到(历史查询)
活动链接https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html?token=<token>
环境变量jd_dpqd_tokens // 活动令牌,多个用英文逗号分割
jd_dpqd_task_threads // 控制签到并发线程数正整数默认1
jd_dpqd_account_threads // 控制账号并发线程数正整数默认1
jd_dpqd_account_interval // 自定义运行间隔时长整数单位毫秒默认0
此脚本为高并发历史查询本,需要读取主脚本生成的活动信息缓存
脚本主要用于查询连签天数,不会进行签到操作,为了提高签到本的效率故将此功能分离
cron:1 1 1 1 *
*/
const $ = new Env('批量店铺签到(历史查询)')
var il='jsjiami.com.v7';const il1ii=iii1II;(function(lill11,liI1i1,I11i11,I1llII,Iil1il,I11i1i,l1l1iI){return lill11=lill11>>0x7,I11i1i='hs',l1l1iI='hs',function(I1llI1,I11i1l,il1il,Il1i1i,iIIili){const i1ii1=iii1II;Il1i1i='tfi',I11i1i=Il1i1i+I11i1i,iIIili='up',l1l1iI+=iIIili,I11i1i=il1il(I11i1i),l1l1iI=il1il(l1l1iI),il1il=0x0;const Ii1iiI=I1llI1();while(!![]&&--I1llII+I11i1l){try{Il1i1i=parseInt(i1ii1(0x1cd,'#3[9'))/0x1+-parseInt(i1ii1(0x169,'k[DZ'))/0x2+parseInt(i1ii1(0x11a,'r(Qj'))/0x3*(parseInt(i1ii1(0x1e9,')aDm'))/0x4)+-parseInt(i1ii1(0x131,'OK01'))/0x5*(parseInt(i1ii1(0x148,'TZou'))/0x6)+-parseInt(i1ii1(0x16a,'8M6K'))/0x7*(parseInt(i1ii1(0x1d7,'!AWz'))/0x8)+parseInt(i1ii1(0x1f1,'JZmQ'))/0x9*(-parseInt(i1ii1(0x14d,'%[WW'))/0xa)+parseInt(i1ii1(0x124,'&#xV'))/0xb;}catch(Ilil1I){Il1i1i=il1il;}finally{iIIili=Ii1iiI[I11i1i]();if(lill11<=I1llII)il1il?Iil1il?Il1i1i=iIIili:Iil1il=iIIili:il1il=iIIili;else{if(il1il==Iil1il['replace'](/[CIhxYQueSDdNErgAfkJV=]/g,'')){if(Il1i1i===I11i1l){Ii1iiI['un'+I11i1i](iIIili);break;}Ii1iiI[l1l1iI](iIIili);}}}}}(I11i11,liI1i1,function(iliIiI,II11iI,Il1i1l,Iil1ii,lill1I,Ii1ii1,Ilil11){return II11iI='\x73\x70\x6c\x69\x74',iliIiI=arguments[0x0],iliIiI=iliIiI[II11iI](''),Il1i1l='\x72\x65\x76\x65\x72\x73\x65',iliIiI=iliIiI[Il1i1l]('\x76'),Iil1ii='\x6a\x6f\x69\x6e',(0x1625b7,iliIiI[Iil1ii](''));});}(0x6080,0xb1d3f,Iii11l,0xc3),Iii11l)&&(il=0x944);const jdCookie=require(il1ii(0x132,'As*E')),notify=require(il1ii(0x1b5,'As*E')),common=require(il1ii(0x1c7,'8M6K')),{jsTk}=require('./utils/Rebels_H');console[il1ii(0x18f,'TZoy')](''),console[il1ii(0x1d2,'CvqL')](il1ii(0x203,'R#xx')+$[il1ii(0x187,'tL52')]+il1ii(0x13c,'I!ej')),console[il1ii(0x1d1,'k[DZ')](il1ii(0x1b3,'^(34')),console[il1ii(0x19a,'HyjE')](il1ii(0x1df,'k[DZ')),console[il1ii(0x17c,'R#xx')](il1ii(0x20d,'J#ke')),console[il1ii(0x176,'Hvim')](il1ii(0x20e,'TZou')),console['log'](il1ii(0x1bb,'DLF5')+$['name']+il1ii(0x1ad,'8M6K')),console[il1ii(0x19a,'HyjE')]('');let tokensList=(process[il1ii(0x1a2,'nY!N')][il1ii(0x1b4,'&Fr2')]||'')[il1ii(0x138,'J#ke')](/[,@&|\n]+/g)['filter'](Boolean),taskThreads=process['env'][il1ii(0x161,'kfn5')]||'1',accountThreads=process[il1ii(0x19c,'&#xV')][il1ii(0x1ba,'M3Fh')]||'1';const runInterval=process[il1ii(0x12d,')m2n')]['jd_dpqd_account_interval']||'',isNotify=![];let TokensMap=new Map();const invalidTokensMap=new Map(),CacheFile=__dirname+il1ii(0x202,'OK01'),cookiesArr=Object[il1ii(0x193,'T#FF')](jdCookie)['map'](lil11I=>jdCookie[lil11I])[il1ii(0x1af,'GEdJ')](Iliii1=>Iliii1);!cookiesArr[0x0]&&($['msg']($['name'],'【提示】请先获取Cookie'),process[il1ii(0x147,'dMEF')](0x1));!(async()=>{const llI111=il1ii,iIiIi={'rnDFM':function(iil1ll,iiilil){return iil1ll(iiilil);},'vwieU':function(iil1li,lillIl){return iil1li!==lillIl;},'cUZjo':llI111(0x19e,'Do3*'),'eLjUq':function(iIiIl,iiilii,li1i1i,IlIli1,illIiI,lI1lli){return iIiIl(iiilii,li1i1i,IlIli1,illIiI,lI1lli);},'HrKvf':llI111(0x141,'IdP9'),'JrCEW':function(Ill1l,llI1Il){return Ill1l<=llI1Il;},'Anehx':function(ii1iii,i11iil){return ii1iii(i11iil);},'wjfzJ':llI111(0x1f9,'97$X'),'otHQD':llI111(0x160,'Hvim'),'thjqP':function(Ill1i,ii1iil){return Ill1i(ii1iil);},'cuGjV':function(lllI1l,i11iii){return lllI1l>=i11iii;},'aUGyU':llI111(0x123,'DUB)'),'XJmDY':llI111(0x198,'I!ej'),'JiYjz':function(llI1Ii,lllI1i){return llI1Ii>lllI1i;},'yynRH':function(li1i1l,II1i1){return li1i1l===II1i1;},'symGW':llI111(0x177,'TZoy'),'GGPzw':llI111(0x16e,'JZmQ'),'irIdo':function(lI1lll,iIiII){return lI1lll(iIiII);},'jVEXs':function(iil1lI,iiiliI){return iil1lI!==iiiliI;},'pIQjt':function(li1i1I,illIii){return li1i1I===illIii;},'QaNHN':llI111(0x125,'JZmQ')};try{if(llI111(0x121,'Vs9@')!==iIiIi['HrKvf'])lilIli[llI111(0x18f,'TZoy')]('❌\x20脚本运行遇到了错误\x0a'+Iliili);else{notify['config']({'title':$[llI111(0x11f,'DLF5')]});if(tokensList[llI111(0x158,'97$X')]>0x0)tokensList=[...new Set(tokensList[llI111(0x180,'&#xV')](illIil=>illIil!==''))];if(iIiIi[llI111(0x190,'%[WW')](tokensList[llI111(0x1e6,'!AWz')],0x0)){console[llI111(0x1d0,'^(34')]('⚠\x20请先定义必要的环境变量后再运行脚本');return;}const lI1llI=iIiIi['Anehx'](require,'fs');if(lI1llI['existsSync'](CacheFile)){if(iIiIi[llI111(0x20a,'!AWz')](llI111(0x18a,'IdP9'),iIiIi[llI111(0x20f,'JZmQ')])){const Ill1I=lI1llI[llI111(0x1ea,'Do3*')](CacheFile,iIiIi[llI111(0x14a,'IdP9')]),i11iiI=JSON[llI111(0x122,')m2n')](Ill1I);for(const lIli11 in i11iiI){TokensMap['set'](lIli11,i11iiI[lIli11]);}}else lilIl[llI111(0x135,'CvqL')]=!![];}$[llI111(0x1d5,'DUB)')]=null;if(runInterval)try{const lillI1=iIiIi[llI111(0x16f,'tKBC')](parseInt,runInterval);iIiIi['cuGjV'](lillI1,0x0)&&($[llI111(0x1e2,'r(Qj')]=lillI1);}catch{iIiIi[llI111(0x1dd,'#3[9')](iIiIi[llI111(0x137,'r(Qj')],iIiIi[llI111(0x19f,'I!ej')])?console[llI111(0x1e5,'Cy]%')](llI111(0x191,'&Fr2')):(lilIll=l1i111['venderId'],iliII1=II11I1[llI111(0x126,'IdP9')],Iii11I=Iil1II[llI111(0x155,'X6J#')]);}try{const i1l1i1=iIiIi[llI111(0x130,'X)vs')](parseInt,taskThreads);iIiIi[llI111(0x1f0,'GEdJ')](i1l1i1,0x0)&&iIiIi[llI111(0x12f,'*#SR')](i1l1i1,0x1)&&(taskThreads=i1l1i1);}catch{iIiIi[llI111(0x1dc,'*#SR')](iIiIi[llI111(0x16d,'#3[9')],iIiIi['GGPzw'])?ill11I=0x1:taskThreads=0x1;}try{const iiillI=iIiIi[llI111(0x1fa,'&cJl')](parseInt,accountThreads);iiillI>0x0&&iIiIi[llI111(0x1d4,'Cy]%')](iiillI,0x1)&&(accountThreads=iiillI);}catch{if(iIiIi[llI111(0x13f,'As*E')](iIiIi['QaNHN'],llI111(0x14e,'I!ej'))){const l1iIII=iIiIi[llI111(0x150,'tL52')](iliIII,iIIl1i);l1iIII>0x0&&l1iIII!==0x1&&(ill111=l1iIII);}else accountThreads=0x1;}await common[llI111(0x11c,'r(Qj')](accountThreads,cookiesArr,async(llI1I1,IlIlil)=>{const i1iIiI=llI111;if(iIiIi['vwieU'](iIiIi[i1iIiI(0x1a8,'k[DZ')],'PfIam')){Iiiil[i1iIiI(0x15a,')aDm')](Iiiii+i1iIiI(0x13e,'GEdJ'));return;}else{await iIiIi[i1iIiI(0x145,'iXKU')](concMain,taskThreads,tokensList,llI1I1,IlIlil,Main);if($['waitTime'])await $[i1iIiI(0x167,'%[WW')]($[i1iIiI(0x18d,'#3[9')]);}}),isNotify&&notify[llI111(0x120,'HyjE')]()&&await notify['push']();}}catch(II1il){console[llI111(0x166,'dMEF')](llI111(0x1ed,'&cJl')+II1il);}})()[il1ii(0x11d,'k[DZ')](lllI11=>$[il1ii(0x1f5,'nY!N')](lllI11))['finally'](()=>$[il1ii(0x214,'Hvim')]());function iii1II(_0x14834a,_0x32026c){const _0x5b6b9d=Iii11l();return iii1II=function(_0x213623,_0x1e929b){_0x213623=_0x213623-0x11a;let _0x15ed2d=_0x5b6b9d[_0x213623];if(iii1II['JMNaVE']===undefined){var _0x18cefc=function(_0x3d510c){const _0x4c5393='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x23e865='',_0x1b5d01='';for(let _0xb1e5f5=0x0,_0x3f5f41,_0x3f65e3,_0x318fa3=0x0;_0x3f65e3=_0x3d510c['charAt'](_0x318fa3++);~_0x3f65e3&&(_0x3f5f41=_0xb1e5f5%0x4?_0x3f5f41*0x40+_0x3f65e3:_0x3f65e3,_0xb1e5f5++%0x4)?_0x23e865+=String['fromCharCode'](0xff&_0x3f5f41>>(-0x2*_0xb1e5f5&0x6)):0x0){_0x3f65e3=_0x4c5393['indexOf'](_0x3f65e3);}for(let _0x49df13=0x0,_0x1bdbd3=_0x23e865['length'];_0x49df13<_0x1bdbd3;_0x49df13++){_0x1b5d01+='%'+('00'+_0x23e865['charCodeAt'](_0x49df13)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1b5d01);};const _0xe07412=function(_0xd07ea3,_0x2f749d){let _0x143aa2=[],_0x2afb95=0x0,_0x4fde21,_0x34865c='';_0xd07ea3=_0x18cefc(_0xd07ea3);let _0x135fcc;for(_0x135fcc=0x0;_0x135fcc<0x100;_0x135fcc++){_0x143aa2[_0x135fcc]=_0x135fcc;}for(_0x135fcc=0x0;_0x135fcc<0x100;_0x135fcc++){_0x2afb95=(_0x2afb95+_0x143aa2[_0x135fcc]+_0x2f749d['charCodeAt'](_0x135fcc%_0x2f749d['length']))%0x100,_0x4fde21=_0x143aa2[_0x135fcc],_0x143aa2[_0x135fcc]=_0x143aa2[_0x2afb95],_0x143aa2[_0x2afb95]=_0x4fde21;}_0x135fcc=0x0,_0x2afb95=0x0;for(let _0x48669c=0x0;_0x48669c<_0xd07ea3['length'];_0x48669c++){_0x135fcc=(_0x135fcc+0x1)%0x100,_0x2afb95=(_0x2afb95+_0x143aa2[_0x135fcc])%0x100,_0x4fde21=_0x143aa2[_0x135fcc],_0x143aa2[_0x135fcc]=_0x143aa2[_0x2afb95],_0x143aa2[_0x2afb95]=_0x4fde21,_0x34865c+=String['fromCharCode'](_0xd07ea3['charCodeAt'](_0x48669c)^_0x143aa2[(_0x143aa2[_0x135fcc]+_0x143aa2[_0x2afb95])%0x100]);}return _0x34865c;};iii1II['QneNvi']=_0xe07412,_0x14834a=arguments,iii1II['JMNaVE']=!![];}const _0xc591bb=_0x5b6b9d[0x0],_0xaf38a8=_0x213623+_0xc591bb,_0x2e2bf1=_0x14834a[_0xaf38a8];return!_0x2e2bf1?(iii1II['ctIzjP']===undefined&&(iii1II['ctIzjP']=!![]),_0x15ed2d=iii1II['QneNvi'](_0x15ed2d,_0x1e929b),_0x14834a[_0xaf38a8]=_0x15ed2d):_0x15ed2d=_0x2e2bf1,_0x15ed2d;},iii1II(_0x14834a,_0x32026c);}async function Main(I1lIll,I1lIli){const IlllI1=il1ii,II1ii={'ELZjM':function(I1lIlI,ii1ill){return I1lIlI===ii1ill;},'UJEnx':function(II1iI,llI1II){return II1iI(llI1II);},'tPbuY':function(lIli1l){return lIli1l();},'eAhXk':function(lillIi,illIi1,ii1ili){return lillIi(illIi1,ii1ili);},'qejQc':function(liil1i,lI1lil){return liil1i>=lI1lil;},'nsSko':IlllI1(0x139,'T#FF'),'CnAeM':function(i1l1iI,liil1l){return i1l1iI===liil1l;},'yJzwF':IlllI1(0x175,'k[DZ'),'qlUWs':function(lI1lii,Iiili1){return lI1lii===Iiili1;},'phBaw':IlllI1(0x1ef,'JZmQ'),'Znaxi':'pgxVS','UzNAa':function(Iil1l1,i1i11I){return Iil1l1>i1i11I;},'neAli':function(il1iIl,iii1ii){return il1iIl>=iii1ii;},'FZAVe':IlllI1(0x1e3,'4BKb'),'AKyKJ':function(il1iIi,iii1il){return il1iIi!==iii1il;},'CISYu':IlllI1(0x20c,'IdP9'),'OOcwB':'rbbjn','cgtPW':IlllI1(0x211,'kfn5'),'PHodN':IlllI1(0x17f,']Ev2'),'WGAAL':IlllI1(0x12a,'IdP9'),'kPNKS':IlllI1(0x206,'R#xx'),'FgWSY':'https://api.m.jd.com/api','rfepy':IlllI1(0x1e8,'kfn5'),'fqEfF':'interact_center_shopSign_getSignRecord','cEBHA':function(II11li,I1l11i){return II11li(I1l11i);},'CDKiX':function(iIIiiI,liiI1i){return iIIiiI===liiI1i;},'iXonB':'RGWnI','tOkBF':IlllI1(0x194,'97$X'),'VEZZm':'zh-CN,zh-Hans;q=0.9','svPRv':IlllI1(0x1b8,'k[DZ'),'xxiai':IlllI1(0x162,'kfn5'),'zKOXr':IlllI1(0x136,'X6J#'),'sLOKv':IlllI1(0x182,'Vs9@'),'qvsmw':IlllI1(0x16c,'tL52'),'ftNUS':IlllI1(0x16b,'&cJl'),'ptihh':'GET','AyTOP':function(ililIi,lilIIl){return ililIi===lilIIl;},'NPNTU':function(ililIl,liiI1l){return ililIl<liiI1l;},'Tmbvt':function(i1l1II,i1ill){return i1l1II!==i1ill;},'fTdpZ':'Yyjpl','ThRtl':IlllI1(0x156,'Do3*'),'eBTkL':function(I1l11l,lilIIi){return I1l11l>=lilIIi;},'XSIfO':function(i1l1Il,llIli){return i1l1Il===llIli;},'fqKLX':IlllI1(0x151,'Vs9@'),'NEOlI':IlllI1(0x208,'R#xx'),'bkBJR':function(i1i11l,i1i11i){return i1i11l!==i1i11i;},'TOddr':function(II11l1,Iil1lI){return II11l1===Iil1lI;},'PjmxG':function(IiiliI,iii1iI){return IiiliI/ iii1iI;}},{title:IIIIII,UA:lillII,cookie:ii1ilI,message:lI1ll1,jsToken:iIiI1}=I1lIli;if(invalidTokensMap[IlllI1(0x215,')m2n')](I1lIll))return;let liil1I='',i11ii1='',IlIliI=null;const l1iII1=TokensMap[IlllI1(0x165,'DLF5')](I1lIll);if(l1iII1)liil1I=l1iII1[IlllI1(0x21b,'dMEF')],i11ii1=l1iII1['activityId'],IlIliI=l1iII1['maxLevel'];else try{if(I1lIll[IlllI1(0x1e7,'R#xx')](':')&&I1lIll['split'](':')[IlllI1(0x154,'HyjE')]===0x3){if(II1ii[IlllI1(0x201,'#3[9')](II1ii[IlllI1(0x209,'Hvim')],II1ii[IlllI1(0x15f,'IdP9')])){const il1iII=II1ii['eAhXk'](lI11Ii,()=>{const I1il11=IlllI1;II1ii['ELZjM'](l1il11,0x0)&&(II1ii[I1il11(0x1be,'^(34')](illIli,il1iII),II1ii['tPbuY'](l11i1l));},0x64);}else{const iilli=I1lIll[IlllI1(0x1b7,'uEOz')](':');if(!iilli[0x0]||!iilli[0x1]||!iilli[0x2])return;I1lIll=iilli[0x0];if(II1ii[IlllI1(0x20b,'&Fr2')](I1lIll[IlllI1(0x174,'Do3*')],0x20)||!/^[A-Z0-9]*$/[IlllI1(0x1a3,'wOyH')](I1lIll))return;i11ii1=iilli[0x1],liil1I=iilli[0x2],iilli[0x2][IlllI1(0x218,'As*E')]('123')&&II1ii['TOddr'](iilli[0x2][IlllI1(0x181,'OK01')],0x8)&&!iilli[0x1]['startsWith'](II1ii[IlllI1(0x199,'nY!N')])&&(i11ii1=iilli[0x2],liil1I=iilli[0x1]),TokensMap[IlllI1(0x12e,'nY!N')](I1lIll,{'index':null,'venderId':liil1I,'shopName':'','activityId':i11ii1,'startTime':'','endTime':'','isValid':!![],'rules':[],'minLevel':null,'maxLevel':null});}}}catch(IlllIl){return;}if(!liil1I||!i11ii1)return;const iiill1=Math[IlllI1(0x1c1,'I!ej')](II1ii[IlllI1(0x179,'CvqL')](Date['now'](),0x3e8))+IlllI1(0x1b9,'tL52');if(invalidTokensMap[IlllI1(0x1c3,'Vs9@')](I1lIll))return;await II1ii[IlllI1(0x197,'I!ej')](IIIII1,II1ii['kPNKS']);if($['waitTime'])await $['wait']($[IlllI1(0x18e,'4BKb')]);function lIli1i(II11lI,lI1IIi){const II11l=IlllI1,I1l11I={'ZBOOF':function(Ilil1l,iIIiii){const lI1l11=iii1II;return II1ii[lI1l11(0x142,'tL52')](Ilil1l,iIIiii);},'iDxiS':II1ii[II11l(0x21a,'Cy]%')],'TBJoH':function(iilll,il1iI1){return iilll===il1iI1;}};try{switch(II11lI){case II11l(0x1d8,'Hvim'):if(lI1IIi[II11l(0x1e4,'8M6K')]===0xc8&&II1ii[II11l(0x1cc,'DLF5')](lI1IIi['success'],!![])&&lI1IIi['data']){if(II1ii['ELZjM'](II1ii[II11l(0x19d,'SGQ#')],II1ii[II11l(0x17d,'*#SR')])){if(II1li1[II11l(0x1eb,'tKBC')](':')&&I1l11I[II11l(0x1fb,'Yuie')](l1lIlI[II11l(0x186,'Yuie')](':')[II11l(0x1b6,'IdP9')],0x3)){const iIIiil=lIIiil['split'](':');if(!iIIiil[0x0]||!iIIiil[0x1]||!iIIiil[0x2])return;l1lIii=iIIiil[0x0];if(I11iI1['length']!==0x20||!/^[A-Z0-9]*$/[II11l(0x1b0,'J#ke')](l1lIil))return;IiiIli=iIIiil[0x1],iillli=iIIiil[0x2],iIIiil[0x2][II11l(0x196,'*#SR')](I1l11I[II11l(0x178,'uEOz')])&&I1l11I[II11l(0x1a5,'GEdJ')](iIIiil[0x2]['length'],0x8)&&!iIIiil[0x1][II11l(0x1c4,'TZoy')](II11l(0x168,'SGQ#'))&&(ilI1lI=iIIiil[0x2],IiiIll=iIIiil[0x1]),I1i11l[II11l(0x128,'dMEF')](llIlii,{'index':null,'venderId':llIlil,'shopName':'','activityId':IIlil,'startTime':'','endTime':'','isValid':!![],'rules':[],'minLevel':null,'maxLevel':null});}}else{const i1l1Ii=lI1IIi['data']['days'];console[II11l(0x15c,'Do3*')](''+IIIIII+I1lIll+II11l(0x1bc,'SGQ#')+(i1l1Ii>0x9?i1l1Ii:'\x20'+i1l1Ii)+'天'+(II1ii[II11l(0x1ac,'DLF5')](i1l1Ii,0x0)&&IlIliI&&II1ii[II11l(0x15e,']Ev2')](i1l1Ii,IlIliI)?II1ii[II11l(0x1ce,'%[WW')]:''));}}else{if(lI1IIi[II11l(0x1a6,'T#FF')])console['log'](''+IIIIII+I1lIll+II11l(0x17e,'EwG6')+lI1IIi['msg']+'');else{if(II1ii[II11l(0x1a1,'WMk^')](II1ii[II11l(0x210,'DUB)')],II1ii['OOcwB']))console['log'](''+IIIIII+I1lIll+II11l(0x183,'%[WW')+JSON['stringify'](lI1IIi));else try{const I1iIIl=II1ii['UJEnx'](I1iIil,lI1Iil);II1ii[II11l(0x1a9,']Ev2')](I1iIIl,0x0)&&(i1l1I[II11l(0x1d5,'DUB)')]=I1iIIl);}catch{IiilIl[II11l(0x14b,'tL52')](II1ii[II11l(0x1c0,'TZou')]);}}}break;}}catch(lI1IIl){console['log'](II11l(0x1bf,'Cy]%')+II11lI+II11l(0x1b1,'M3Fh')+(lI1IIl[II11l(0x173,'X)vs')]||lI1IIl));}}async function IIIII1(i1ilI){const II11i=IlllI1,iii1lI={'AhooG':II1ii['PHodN']};if(II11i(0x143,'Vs9@')!==II1ii[II11i(0x153,')aDm')]){let i1ilI1='',Iiilii=null,Iil1li=null,Iiilil=II11i(0x1f3,'SGQ#'),Iil1ll={},iillI={};switch(i1ilI){case II1ii[II11i(0x216,'GEdJ')]:i1ilI1=II1ii[II11i(0x11e,'#3[9')],Iil1li={'appid':II1ii[II11i(0x219,'As*E')],'functionId':II1ii[II11i(0x14c,'CvqL')],'body':JSON[II11i(0x144,'%[WW')]({'token':I1lIll,'venderId':II1ii[II11i(0x159,'X)vs')](parseInt,liil1I)||'','activityId':II1ii[II11i(0x204,'M3Fh')](parseInt,i11ii1)||'','type':0x38}),'jsonp':II11i(0x1de,'!AWz')};break;}const lI1III={'t':iiill1,'loginType':'2','x-api-eid-token':iIiI1};Iiilii&&Object['assign'](Iiilii,lI1III);if(Iil1li){if(II1ii['CDKiX'](II1ii[II11i(0x192,'8M6K')],II1ii['iXonB']))Object[II11i(0x184,'tL52')](Iil1li,lI1III);else{IiilI1['log'](iii1lI['AhooG']);return;}}const IIliIi={'url':i1ilI1,'method':Iiilil,'headers':{'Accept':II11i(0x1cf,'wOyH'),'Accept-Encoding':II1ii['tOkBF'],'Accept-Language':II1ii['VEZZm'],'Connection':II1ii['svPRv'],'Content-Type':II1ii[II11i(0x1c5,'X6J#')],'Host':II11i(0x1f4,'wOyH'),'Referer':II1ii[II11i(0x13a,'DLF5')],'Sec-Fetch-Dest':II1ii[II11i(0x149,'nY!N')],'Sec-Fetch-Mode':II1ii[II11i(0x1f8,'SGQ#')],'Sec-Fetch-Site':II1ii[II11i(0x15b,'97$X')],'User-Agent':lillII,'Cookie':ii1ilI},'params':Iil1li,'data':Iiilii,'timeout':0x7530};if(II1ii[II11i(0x189,'SGQ#')](Iiilil,II1ii[II11i(0x1f6,'I!ej')])){if(II1ii[II11i(0x18b,'HyjE')](II11i(0x1d3,'T#FF'),II11i(0x205,'nY!N')))delete IIliIi[II11i(0x171,'r(Qj')],delete IIliIi['headers']['Content-Type'];else{const ililI1=lliiii['data'][II11i(0x14f,'TZou')];IliI1i['log'](''+ll1ii+IIli11+II11i(0x172,'TZoy')+(ililI1>0x9?ililI1:'\x20'+ililI1)+'天'+(ililI1>0x0&&IllIII&&ililI1>=ii1li?II1ii[II11i(0x1fe,')aDm')]:''));}}const IllIiI=0x3;let i1il1=0x0,I1l111=null,IIii1l=![];while(II1ii[II11i(0x1a4,'Hvim')](i1il1,IllIiI)){if(II1ii['Tmbvt'](II1ii[II11i(0x15d,'TZoy')],'Yyjpl'))l1l1II=Iil1I1;else{const i1ili=await common[II11i(0x19b,'TZou')](IIliIi);if(!i1ili[II11i(0x1a7,'kfn5')]){if(II1ii[II11i(0x13d,'Cy]%')]===II11i(0x1db,'CvqL')){I1l111=''+IIIIII+I1lIll+'\x20➜\x20请求失败'+i1ili['error']+')🚫',i1il1++;continue;}else{const I1iII1=II11Ii['readFileSync'](II11Il,II11i(0x1ca,'iXKU')),lilII1=IlI11[II11i(0x129,'I!ej')](I1iII1);for(const iill1 in lilII1){lilIlI[II11i(0x1bd,'*#SR')](iill1,lilII1[iill1]);}}}if(!i1ili[II11i(0x1fc,'kfn5')]){I1l111=''+IIIIII+I1lIll+II11i(0x133,')m2n'),i1il1++;continue;}II1ii[II11i(0x134,'4BKb')](lIli1i,i1ilI,i1ili[II11i(0x11b,'8M6K')]),IIii1l=![];break;}}II1ii[II11i(0x1ec,'EwG6')](i1il1,IllIiI)&&(console['log'](I1l111),IIii1l&&($[II11i(0x1e1,'Do3*')]=!![]));}else lilIl1['msg'](i1l1ii[II11i(0x17a,'&#xV')],II1ii['cgtPW']),i1l1[II11i(0x185,'4BKb')](0x1);}}function Iii11l(){const liI1il=(function(){return[il,'uYjCxsNjxiAaIrmDkCirY.SCQcom.vhJ7fVEEegd==','WQytBW8','xtjWoSoHWOKcdq','hrpcJmo/W4G','WRJcGupdNCo1','WQBdI8oA','W6mKWPeNW7e','FriYW7VcTmkgsMW','W6lcTaT5dG','c2DWga','WRJdISo5C8oV','W6nGWPFcKYG','ff4HWQVdQW','hmkTkg3dMW','gvZdG8oXW5Cz','W59KWQKhW6/dRCo1CG','W4roW4JdKCkr','WP5tFfJcVCoyjcXRvxC','WRelxxv+fa','W5JdSCoaaSoO','j8kfdG','WRSAFuDz','W4XOW4O','W6dcJ8klDuW','DZ7cOCo8W4i','WPNcSetdOmo4','sCo3gvHZ','dSofma7dQXm/W4i8kSkzWQOdWO/dU0JdINStwq','emoefX7cTbi3W7WHjq','iuiDWOVdMq','W7PFtgBdH8oKpG','WPiIW6y','WQ8eyq','o0mvW4W','W5zwWRm','mmk7WQLsWRb8kuZdOIuVnCoY','kWKNDJZdLh4','W4NcTbddRIjHaSofW6uFBG','WQtdI8kqvSonWQDD','WPRcVCkHa8oh','WRDlW4vbW5y','ph3cVCo4hW','WPmlW6T7a3S','ktuRW40','WQBINyFdJW','W5BdKCoXoCoiW6L9','W4XIW4pdL8kjW40','mmk6WQW','umoSga','W7ZcKmkwvL8','u1RcKu7cVa','W5u/WRK5W7a','dJupWOq','WRiJW4BcOK4','r8kSW4y','cdpcSK7cRa','WRVINPFdJokDRutMNAtOR47LPiNOTBtVViG','4PQ5E+ISL+whMowSSEs4Vow/OoIKSUEAHUEmV+wGPownUoMfREwqR+weP+I/GEIJKoIhGUAEGo+8SW','bJ0oWPv/W64','eCocW7FcSCoKWQW','W5LXWQ7cGXeu','BokEVLZIN7tdPEACIEIVMUwKHoI3IN7dOCkD','WQVdL8ooxmofWRS','kaddUCoh','WR5PwgxdPa','WQtdHCoqua','tmkrWQddP8kNW7tdOmoCWQRdHXm5W4RcSG','WPyiW5vjhG','WRZcLgFdICo+','neddUCozW7m','bhrpF3C','WP7cPCkLmmoewMWz','oHNdUCohAdRcP0q','W6RcTmki','bLa/W73cKG','4PUHoUIhNEwUKUs5S+I/OUIGOUMwVUMAGEAuJ+MxRoIVLEE8JoMvRoITSa','DrCWCIK','WOWTW5tdGq','WROuwMiMxmksW54bzSkph3BdM8oIe8kR','WRflW6roW6e','isNcSKtcSwxcLhG8bq','W4BcTXD1hq','W6FcKXzskG','fXxcUCodW7G','gvBdIG','hwn4hSodWQ8h'].concat((function(){return['btOu','WPCmW4j/gG','W7bHW6tdKCkq','W4VcTZ9Fpa','lSoxW4G/W7y','e2enWQBdPW','cZhcTq','W78jj8kH','CSotmseE','huRdQu/cSa','WOO7W4O','f8oudaNdVHeO','ySoDW4uoW60','Ad7cISobW4G','WOSYW6f9WRJcOSoks3/cUSkpW4C','cKjBuN8','WQa9W5ZcLh8','5O+m56w157Qm5P2dvSkrctS4zLtdTsFdQW','u2zuW5uTWQJdRt/dLrlcGuldPW','l2hdJ1tcNCk5','fSo4W6mI','oUIVNUAXGEwsGow6UCom','WQO+W5bRaG','A8kZW5udW5nsWRPuW7JcUCkQDff3gGGCWQdMTOdLIk8EWPdVVRBLP4tKU5NNLR7OIO/MLR3PGj3LJOdLIONLIyK','k35OBePdcHvHWPBdUa4mbG','tM/cMqn1WQTEWO3cT1ehWOpdP2lcHHJdJmo2W73dK8k/C8kkvapcJXe','WRVcKgxdQ8ofsG','sw7cHu7cMW','ASoTW7OuWQ8LC2NdKZm','W7RcLmkn','Ce1Ckv3cNsVdImoCytvcWQ4amItdHCoKWPdcPsRdLSoE','W4H6WQ/dQcnnWOLMbSoW','W4FIN7JcOa','itJcPW','vmkDW48jW5S','4P+mWP3MNjdOGOJMRyZNO43LP4BNK6RdRG','axvAamoj','W7xcKt10fW','dCk3r0f4W7NdTSkkWRldLmoqW7zB','W413WQG','W7xcR8koD2ldOb1FWPaR','W4P9WRGQW6m','w3lcHq','mMaQAaldGeCPvZ4lWQ12WQvJWQzbnCoSeN01W5i','W4SSWR4cW78','W6WjoSkaeq','W6eEW63dUCoj','CcP5s0Tyhbm','WOqRW4FcGM0','W5ddS8o8CSkIcLSPyvLYWPW','cNG9W67cOa','WQfdFG','BCk4W60','BCoNW7G','W6K6WRm','WR45W6tdVGq','W6RdQ38Txa','zs/cVK7dPgGYWP0','WOVdG8o+qmoo','WQFcItldPLddPSookmoqmCo2W5hdIa','w8oMcYyIWQFcRSktWQxdGCo+W459','kgZdLmkPWP9eemoyzmoQW7BdRSoa','xSkoW7KlWOi','W6eCWReGW5S','kYtcVwtcJq','WP/cS8kLiCof','W77dJ2xcVbldRSoivSkN','A8oSW4aaW7i1E1/dKtCKp8oiWRa5W5qWzCkQBhVcTM7cLoAnN+wkT+ESVowjUow6I+woHU+8TEM7RUIVVCo6','WQ4gwNr+','W49YW5NdTSkrW4tdMW','oJu2W5G0yLhdJW','772f5BAk6lYU5lQ56zMS772A','FYa7Eq','W6ZdKL0','W7JdMwtcTrBcTW','qSkTW4ibWRJcNSkxWPO','dCopgW/dQse+W7m8lSkyWP4VWPpdVeRdVhmqra','ESoEurJcPmk6WOHJWQetW6/cMhK','W5jIW4ZdLmk7W4ZdKmk5jX1jW4q','ixVcTmoLoKizW7q','W75jWRHkka','4P+2W7xOHAFMNQFOV5/OOylPGlFLIPZKUitPLA/OR68W','mw9eya','WQjEW4DuW4u','a2hdUKRcGG','W4aRWPSJWRddRa/cMmkbWOOsvqa','FLBcOSkDdx3dUG'].concat((function(){return['WQaHW5q','W6OCpCo7pt8jWRhcHHK5WRW','aJdcPmoXW4Xl','W6pcItTZdq','p00UW7RcKW','WPysW7nZgG','WRO2ENfT','W5pcPZtdR2a','WPDBE0pdLG','amoagWS','f1BdGSo6W4yqpW','dCkWkhRdSG','bYxcMdTZWQbeW4ZcTKaeWPldVMi','6lAC5yYI5PAD5PEdl/cCU5S','WRhcL8kfiSoF','uSovW6RcICo0WRtcQmkaWOtdPG4xW7VcPSkpW7ddRmoDWRyt','fSo+WPXqW7ddH8opW5tcHCkb','EwXbbwW','nY7cISo4W64','tmkMW5u+WQtcNCkCWRVdNCoFWOeTtG','e3myWPRdUW','wmk6W680WPO','wSoYndKt','W6ldI2pcTZC','i3f1qMG','WRBcKv/dM8oE','cmo5W48YW5FdONpdPmkkW7TcjulcNYHdW6WUWP3dSgyPW7OZWPXEWO7MJl3LIANOTRNLJQlLUPlLJAVVVlJPUkZORk7dOa','bwjwd8owWQ0xasW3WPFcJmkVF015WPlcRSoKW5iRWQWyWRyHAqBdPUIhV+wUIUs7PUI+QoIHSEMxHoMyTUAwOoMuPa','WOrZW4TTW40','uqFcHgpdHq','44g05O2X56wv44g76k2S5ysQ6i+S5y2lcYtcHCkQnCkE','sCkEk8ogWPhdTCo7sfv7beZcTCkD','CfZdKfNcN8kyW4a','wmoSera','sCkEkW','iLJdRwVcQW','umkPW6KhW6ddHMBdQa','eZtcJqvOWRr6W4VcKvW','eIBcIqDL','W7NdT0acAq','WRuoAb95C8o0Ca','DaaSW5uhwgW','Ec4RFq','lJSXW480AK/dGq','ySoPW6ShW6O','WQ/cO8kBf8oj','WPSMW7/cSa','eLZdMCoBW4yciJbdWQS','W5LdWQZcNXq','xSkAlCo2WPS','EslcRMNdTq','uwjBW5aTWQZdPwBdRs3cVvxdUv4','WOzpW5XtW4G','WRBcLN/dPCohs1JcVqtcPG','dhrScSosWRK','WRaoCG','W6pcNcbOaa','WOlcR0xdImol','CI8ppaGlwartWPtdIXSs','W6XDbsq4rmoaW7CGECkwcNy','s8kvkq','htRcTW','jcRcULpcKa','W4/dNmoOo8o5','tmkqWQ3dR8kKW7xdRmkpWR3dQdaYW7W','tM/cHHnFWQHcW4NcJfe','dUkDP3/ORBlMSRZLPQVOTRxVVkNML5dLK6dLU7hMLzdMJQ7VV7hWSAQu','kdNdUmoRvW','W6OGWQahW5VcJ3a','W5PXWQu7W7NcOCk/mvBdVCoLW6XApdRdMaBdUSoOsa','laeyW5u1','eCoTW7W/W5m','4PMhAoIfH+wSQos4NEI9HoIHMEMvQEMAHEAuOoMwRUIUNoE8VEMxLUISNq','WO8mW53cJwW','pK8AWORdMCk0','5y2l6ysY6k6M5PIvwmonk8kiWR/dKmkBWRldMmkQ','W5tdLwGbqW','6lwV5y+/5Pwd5PwOW5JXJAI7','eaNcVr1O','gJhdVmoqFG','WQtcPhVdUCoe','WONdISo8umoV','W617WQZcOI4','p1yoW5hcQ8kluvpcLG','W7eMW6hcGCka','WOGiW6n7kG'];}()));}()));}());Iii11l=function(){return liI1il;};return Iii11l();};async function concMain(IIliIl=0x1,II11ll,liiI1I,ililII,lI1II1){const iI1Iii=il1ii,i1ilII={'GdTwP':function(Ill11l,il1ll){return Ill11l!==il1ll;},'OOvXZ':'sLwtS','AcmLt':'vvssx','KXlZE':function(i1ilIi,lill1l,l1l1i1){return i1ilIi(lill1l,l1l1i1);},'veNGX':function(i1iiI){return i1iiI();},'olceG':function(i1ilIl,llI11I){return i1ilIl>llI11I;},'uMXfO':function(Il1i11,iii1li){return Il1i11===iii1li;},'adGNa':function(Iil1i1){return Iil1i1();},'soRBV':function(IIii11,iliIl1,Ii1il1){return IIii11(iliIl1,Ii1il1);},'qBGvj':'pt_pin','MZPuo':function(iii1ll,IIliI1){return iii1ll===IIliI1;},'LJXiQ':iI1Iii(0x1fd,'HyjE'),'FtUFF':'https://h5.m.jd.com/babelDiy/Zeus/2PAAf74aG3D61qvfKUM5dxUssJQ9/index.html','hdqia':function(il1lI,IliIIl){return il1lI<IliIIl;},'AYlwV':function(I1il1l,lI1l1l){return I1il1l(lI1l1l);},'EnxwM':function(IIliII){return IIliII();}},iIIii1=II11ll['map'](iiliI=>iiliI),IllIi1=decodeURIComponent(common[iI1Iii(0x212,')m2n')](liiI1I,i1ilII['qBGvj'])),lilIII='【账号'+ililII+'】'+IllIi1+'',Ii1ilI=await common[iI1Iii(0x1ff,'As*E')](liiI1I);if(!Ii1ilI&&i1ilII[iI1Iii(0x1b2,'SGQ#')](typeof Ii1ilI,i1ilII[iI1Iii(0x1a0,'J#ke')])){console[iI1Iii(0x1d0,'^(34')](lilIII+iI1Iii(0x200,'&cJl'));return;}const II11i1=notify[iI1Iii(0x127,'TZou')](ililII,IllIi1),iliIil=common[iI1Iii(0x1c9,'wOyH')](IllIi1),{jsToken:iliIii}=await jsTk(iliIil,i1ilII[iI1Iii(0x152,'WMk^')],{'bizId':iI1Iii(0x157,'Yuie'),'v':iI1Iii(0x1f2,'4BKb'),'qs':iI1Iii(0x170,'SGQ#')+II11ll[0x0]}),lill1i={'cookie':liiI1I,'index':ililII,'title':lilIII,'UA':iliIil,'message':II11i1,'jsToken':iliIii};let il1li=0x0;async function iIIill(Ill11I){const liI1ii=iI1Iii;i1ilII[liI1ii(0x17b,'DLF5')](i1ilII['OOvXZ'],i1ilII['AcmLt'])?(await i1ilII[liI1ii(0x1ab,'&Fr2')](lI1II1,Ill11I,lill1i),il1li--,i1ilII['veNGX'](iilii)):lIIill['assign'](I11iIi,I1ilII);}async function iilii(){const lIIiIl=iI1Iii;while(il1li<IIliIl&&i1ilII[lIIiIl(0x146,'SGQ#')](iIIii1['length'],0x0)){const IliIIi=iIIii1[lIIiIl(0x1e0,'97$X')]();il1li++,await iIIill(IliIIi);}}const Ill11i=Math['min'](iIIii1[iI1Iii(0x13b,'WMk^')],IIliIl),iilil=[];for(let lI1l1i=0x0;i1ilII['hdqia'](lI1l1i,Ill11i);lI1l1i++){const i1iil=iIIii1[iI1Iii(0x163,'WMk^')]();il1li++,iilil[iI1Iii(0x1ee,'&Fr2')](i1ilII[iI1Iii(0x207,'WMk^')](iIIill,i1iil));}await Promise[iI1Iii(0x1c6,'uEOz')](iilil),i1ilII[iI1Iii(0x18c,'&Fr2')](iilii),await new Promise(llI11l=>{const il1iI=iI1Iii,I1llIl={'AgCul':function(I1llIi,IIii1I){return i1ilII['olceG'](I1llIi,IIii1I);},'FZrdG':function(llI11i,i1iIi1){const iI1Iil=iii1II;return i1ilII[iI1Iil(0x1da,'R#xx')](llI11i,i1iIi1);},'rczTP':il1iI(0x140,'4BKb'),'NyjCH':function(l1l1il){return i1ilII['adGNa'](l1l1il);}},i1iii=i1ilII[il1iI(0x1f7,'%[WW')](setInterval,()=>{const i1iIil=il1iI,I11i1I={'BRIYf':function(iliIi1,l1l1ii){const i1iIii=iii1II;return I1llIl[i1iIii(0x1d6,'tL52')](iliIi1,l1l1ii);},'kCspp':function(Il1i1I,Ii1iii){return Il1i1I!==Ii1iii;}};if(I1llIl['FZrdG'](il1li,0x0)){if(I1llIl['rczTP']===I1llIl['rczTP'])clearInterval(i1iii),I1llIl[i1iIil(0x1c8,'CvqL')](llI11l);else{const il1l1=Iliiii(i1illI);I11i1I[i1iIil(0x195,'JZmQ')](il1l1,0x0)&&I11i1I['kCspp'](il1l1,0x1)&&(I1lll1=il1l1);}}},0x64);});}var version_ = 'jsjiami.com.v7';
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)}