KR/jd_seckillViewTask.js

7 lines
27 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
39 5 * * * jd_seckillViewTask.js
*/
const $ = new Env('秒杀浏览商品领豆');
var version_='jsjiami.com.v7';const il1li=iii1II;(function(ililI1,IIii1i,i1ili,Iiill1,I1iII1,lilII1,iill1){return ililI1=ililI1>>0x3,lilII1='hs',iill1='hs',function(iii1l1,IIliIl,II11ll,liiI1I,ililII){const lill1i=iii1II;liiI1I='tfi',lilII1=liiI1I+lilII1,ililII='up',iill1+=ililII,lilII1=II11ll(lilII1),iill1=II11ll(iill1),II11ll=0x0;const lI1II1=iii1l1();while(!![]&&--Iiill1+IIliIl){try{liiI1I=-parseInt(lill1i(0xf0,'dy8y'))/0x1+parseInt(lill1i(0x122,'8jqx'))/0x2*(-parseInt(lill1i(0xc3,'SiRQ'))/0x3)+parseInt(lill1i(0x108,'QNO5'))/0x4*(parseInt(lill1i(0x141,'b)88'))/0x5)+parseInt(lill1i(0x9a,'pptM'))/0x6+-parseInt(lill1i(0x120,'Hg$K'))/0x7*(-parseInt(lill1i(0x14a,'*82u'))/0x8)+-parseInt(lill1i(0xfd,'ZIOv'))/0x9*(parseInt(lill1i(0x94,'5[3r'))/0xa)+parseInt(lill1i(0xcf,'iZnI'))/0xb*(parseInt(lill1i(0xba,'skU4'))/0xc);}catch(i1ilII){liiI1I=II11ll;}finally{ililII=lI1II1[lilII1]();if(ililI1<=Iiill1)II11ll?I1iII1?liiI1I=ililII:I1iII1=ililII:II11ll=ililII;else{if(II11ll==I1iII1['replace'](/[VlKekRuJryPxLgMbGqUN=]/g,'')){if(liiI1I===IIliIl){lI1II1['un'+lilII1](ililII);break;}lI1II1[iill1](ililII);}}}}}(i1ili,IIii1i,function(iIIii1,IllIi1,lilIII,Ii1ilI,II11i1,iliIil,iliIii){return IllIi1='\x73\x70\x6c\x69\x74',iIIii1=arguments[0x0],iIIii1=iIIii1[IllIi1](''),lilIII=`\x72\x65\x76\x65\x72\x73\x65`,iIIii1=iIIii1[lilIII]('\x76'),Ii1ilI=`\x6a\x6f\x69\x6e`,(0x1478d5,iIIii1[Ii1ilI](''));});}(0x5f8,0xa009b,Iii11l,0xc1),Iii11l)&&(version_=il1li(0x8a,'1K1D'));const ii1iiI=$[il1li(0x12f,'Ebw!')]()?require(il1li(0x8d,']o(4')):'',lllilI=$[il1li(0x140,'bZSU')]()?require(il1li(0x132,'Smxe')):'',ilil11=require(il1li(0x10b,')!0c'));let illlI1=!![],IIIl11=[],I1lIi1='',liiIIi='';if($[il1li(0xab,'YrVt')]()){Object['keys'](lllilI)[il1li(0xa9,'ZIOv')](lillIl=>{const iIIill=il1li;IIIl11[iIIill(0xf7,'aSJ0')](lllilI[lillIl]);});if(process[il1li(0xe3,'QNO5')][il1li(0xe9,')!0c')]&&process[il1li(0x10f,'q15*')]['JD_DEBUG']===il1li(0xb2,'5PtB'))console[il1li(0xe4,'5PtB')]=()=>{};}else IIIl11=[$[il1li(0x13b,'4UeG')](il1li(0x144,'aSJ0')),$[il1li(0xd7,'tGnf')]('CookieJD2'),...iil1li($[il1li(0xa5,'(oyd')](il1li(0xb0,'pptM'))||'[]')['map'](iIiIl=>iIiIl['cookie'])]['filter'](iiilii=>!!iiilii);function Iii11l(){const iii1ll=(function(){return[...[version_,'xPujxsRjJgiRyVaxmlkiN.cGborVmUg.qvUM7LeK==','WOFcTSoXgJNdHmktW6pdOCkYWPfr','W5OQWOpcUSod','W5NdQmkK','pJ/cQ8kP','wCouW4S','W50jvrfQFCkNWRrkCSoslcS','r1OjvZJdOIpdVCowi8oDWR8GCCoFhYbzWPvm','vqnOoq','bKmCiCoF','B8o0WPmDpG','sSoNerG','FeSDBCkn','xSk/W5ZdPmoT','W6JcQmoopemmC8kDWOTj','vSk9WPFcOfO','W4LKb8k7tfpcT8owFmoCW5FdVhldUSoKva','W7CEW7JcOCk+WR7dSCkW','WRxdTSkB','nhpcMNW','WPLMWPz3W50','W7dcRg8dWP9GmbS','cueRpSossg5T','zbv/bg4','W7yGW5RcKmoo','WQ9aWQ7dV8kSWO7dUSkGW4eh','W6PxWP7dJYjUW44qWR4Kla','qCoQiJGF','WOVdSgWeWR9IkrFdJNGDWQ/dVxdcRJxdG8kmW7u','p1/cT8kJWOa','DvPDca','A14VyCkJWRtdT8krFCoBWQ3dLh0','W5CObq','WRxcJgPoxv3cGa','44oh5O+D56E/44cJW7T6AHqnbow0MEwNTUAuIa','5lQz5lUa6lAj5y2v','pCkCWO5OWQRdSSkY','CKW7','lmojb17dGYtcR8o4W5JcGSkH','5Rwn6kwD5A2R5OMU772A6i+b5B6yW4C','W6xdVwCbW5e','nSkCeK3dLbZcJ8oGW5ZcKSoWkHLoWPKD','sX94oLecW5NdLG','W50nva1K','W7hdRhS9W758','W7NcRv3cOrW','xSoXW7S','qCoEW55wxq','5RwQ6kA+oW','hr1peN/dR1RcLCovnCokW7u','5B2D5AsQ5RAG6kw75zwv5zgCWRJcKSoa','nSofW7ddNatdLCkZWOVcVa3dIJ4Z','lCkoWPZdHW','W7xcJwLuzw/cJq','W5mmW4FcTmoc','xfOptIxcV2xcTmoF','WRBdSmoBxSk2W6jaW4mHlSo3cCoQr8o3WQ00nWjxWQ/dP8oJFmkmeSkLFarAamk5W4tdHujcWRhdOMddMmkaWPbCWPHQltX+W5repIW2FfJdTIpcISkCn13cUCk0W7VcGLvWl1VcUSkaWQpdKqefW5P9WQnfWPz/W7VcJSoSW4qCWQdcKbpcJ3lcQW','W5y2tILL','gCknWPy','WRRdS8om','W4pcLSo5W5hcHW','WRDbhMrFDCkhW4etWRC','W4SdW77cV8kfWRVdUCkM','WRxdPCokwCkCWQPE','WQfoWPTtvCod','WQZcOmkjrmk5WQP6W45KESkYtW','rSoqW5LnBLNcNq','amkPdX02pCk1WRfWW6BcUWVdHG'],...(function(){return[...['jGpdLNK/','44gu5O+w56Et44cf6kYb5yA+6i2E5y+T5lMV5lQb6ls25y+u5lUeW4tdS3ZdLSketa3NMldMJkBKV5/NL7ZdLhxdQmk7AadNMipKUiZKU4/NRi/LIzFOJARLJA0','W6RcVCo8','mmkQWQTPWOi','gmoeW5FcOCoO','fmksWPG/qJ3dGCodWQD8i8kC','i8o8W5hcP8oV','h1OzpmoR','W6hcG2HCBwJcMa','W7fADSktW78','WO8hdbjDhWhcVW','rCk9WO3cOeq','l1CGkmosrNDHW7tcUW','WOGDirz3gW','W6BcSmkEbCoNWO56W4SwbCoK','acldIhGL','W6ddVwG6W55UlW','zHL0oNygW77dTW','W6SNW63dKH3dTJOrexi8WOhdQ8o+','W6CKW57cQ8kS','x8oTW7VdUMBcGG','rCkJna','D0SOESkeW6BcQSoBB8odWQVcLNqKWRldMmkEW5LaWQfkWPRdK8kBlCkrnaCIW60naH7cJa','WOf5WRtcJmoCWRVdKHi','yKi0g8kQ','W67cPSoVW6JcOSkHt2JdT8kpW5pcOau2WOTjW55FWRPuWRNcO8o4WOO3mSorWQdcHf7cN8kwAeldHCkpyxmPpWNcUbWbWP0VWP0CuCk1eqNdL8o4WPRcIMisyLPdW4pcGMGkDujJW5ZdNfC','AmkFWQu','W4K5W4pdUGO','BCkdWO7cGfBcJCoL','WQtcRmk3BKhdR2hcSmo1BetdVmkpzxxdUtldVHiBWRFcJbrIW7/cTstdRmknlCoYW5BdK8kbWQnzcmoHb1vVWP0','WPyeW5ZdT+IVSEAZGEwKMoI1Jo+8ToISLoAGJoAFRUE+JoI0UEMhM+ISPa','eLKDcCoz','wmoAW5HcBW','W6JdQ2m9W7f2k1RcQ2lcRMxdJ8oI','W5GjW4pcU8ki','x8o0W5TXsW','WQHFxZrCqSkeW583WOXFaW','pI/cTmkNWOy','5lMm5PAK5BwA5A2V5OQ75REc6ks3776n77YB77+l','qgCvsa4','W6hdLmkbsfK','BCkIWPRcOf4','e8klWP9Wq3/dKG','DcWRzbymW6NdGZVcHb0','WRVdR8om','WOZORRBPHAxMLzpNM5dLV5JOJyJLJzOqWQiMWRlcSXyaW5tdVqu2DXZdS1/cVL/cOg86q3xdP0uBWO3dGmkmhCkAtgFcVSo9ECoSW4JcOKuVW5VdImkLWRK','W5xcVNGcWRq','W67cIeTSW7Ku','vxKWzcO','FZRdTmocW6jSWPVdPSkIW4tcV3rq','iwtcPq','WPZdUmo9uCkD','BKSaf8kz','g+IVJoMhPoAxMEEyI+w/MoIpMUwnIHZdLSk/F8oKjW','ACkrWRi','D8kPWPdcUwC','uCouW4je','W493WPddQJ8','wCouW4TKDvG','W7errsu','cbhdS0qUAb4','W6hdJhO4W5C','W4eOWPhcT8oAWP/dQYXlu8kHWRS','jSoPW5hcTmo0gdT5WQJcTmk7gSkWWPm8W6FdJ3W5dmkvWOjAWRhdMHBcG8oGWP/dMHZdVmkvtG3cTd0LydRdJSouWR4','WR/dTSkote88vG','yhCytX4','WPjQW5/dKa3cUW','lmkcWQJdOeu','k8kVBmoijW'],...(function(){return['W5SOf8k/rW','D1DgbGi','dMtcRCkCWRSXW5RdJ8kc','WQtcRmk3BKhdR2hcSmoNzuRdTCoizNxdVNJcUHvAWRNdJbSOW73cVglcSSkgi8oYWRddKmkjW6LivCoSc0zVWPXc','k8oFcL/dGG','o05rfKC','W4WIW6BdGs4','W5KMWOu','omknWOZdN3S','jCkbWPvbWQa','WR9EWPzlW70','kwFcNxFcNG','W6y9W7efWQSInK0ilmknWOyXW5S','W47cO2XSqG','W7eiW4VdNgG','WOFcTSo1gJ3dJmozW7JdPmklWPbnsa','W607W6a','nSocWRhcG2FcO8o+WO0','W68VW4ZcHSot','WR9kWOXkW58','omkmWPBdMhi','AttcQCk+WPtcSci','W5C1W7ZdKM/dOeGDuCkmWQiKWQxdU2hcHKPEoZ92WPmVWQyaW7/cK8kzWRVcPfhcKGS','k8kYzmocoeC2','WQVcVCkTs3m','pCoFff/dGG','W4BcQMa2WPW','5lMn5lMY6lwj5y6o','cmksWORdGv3dVmo7W5K','kMFcHhe','DdHRkxS','sSk9WQJcNLK','q0eA','B8otWPZdN0xdMSoJW5a','WO0bca','W5mdssn8r8kNW5u','pCoPW5FcRCoPrq','B8kPbSk/W7C','W6xcSCkzaSoMW69lW5iNe8oHhW','W5K9W5ZcR8kL','WQ89bIPx','jCkKFmojpLO5','DIddSSkMWRhcP8kDfCk/z8klWONcI8kl','x8oNW7ldMgdcMa','w8k9W4ldHW','prn8kmkdWR3dTSkFwSokWRldNtSWW7JcJCkqW4C','B8oNWQWBja','CSoGWPqw','BmkHWQxcGx0','W7hdRhS9W758kXlcSq','WQaNW53cJCoiW7NcLSoJDmkdnSo7WRaawCkqWRSlp0aBWRHfW4ruWRCQF1GL','W5JdTmkK','WRddPCoF','W7SEW60','iCoraq','mLmJkq','6k615yI+6zQh5OAI5z23BdFcGtil6l6M5yAd5Qc25lYh5PA45ysI5A68c+w5SUITHEMcOoI+GUIeJEADKEwnP+InOEwmHmkWmmkuq8o0lG','W6lcVCo1W70','WRTIWQi','W6/cM1u1WPrdcdK','WP1oWRboF8ohimkX','W6/cLvbxA3xcLW','W67dT24','zKOMmCkW','xCoYfXaBnCkZWRXG','oSohdLVdHG'];}())];}())];}());Iii11l=function(){return iii1ll;};return Iii11l();}function iii1II(_0x3e402d,_0x11ab36){const _0x3cb630=Iii11l();return iii1II=function(_0x11c8e4,_0x3f142a){_0x11c8e4=_0x11c8e4-0x84;let _0x3c1b9e=_0x3cb630[_0x11c8e4];if(iii1II['rSxdMr']===undefined){var _0x1a0b77=function(_0x30dac4){const _0x9c165e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x142d63='',_0x39e33b='';for(let _0xe0b542=0x0,_0x505b68,_0x2c7ae5,_0x423837=0x0;_0x2c7ae5=_0x30dac4['charAt'](_0x423837++);~_0x2c7ae5&&(_0x505b68=_0xe0b542%0x4?_0x505b68*0x40+_0x2c7ae5:_0x2c7ae5,_0xe0b542++%0x4)?_0x142d63+=String['fromCharCode'](0xff&_0x505b68>>(-0x2*_0xe0b542&0x6)):0x0){_0x2c7ae5=_0x9c165e['indexOf'](_0x2c7ae5);}for(let _0x2c0379=0x0,_0x84f0dc=_0x142d63['length'];_0x2c0379<_0x84f0dc;_0x2c0379++){_0x39e33b+='%'+('00'+_0x142d63['charCodeAt'](_0x2c0379)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x39e33b);};const _0x131aae=function(_0x2f69c4,_0x593174){let _0x246704=[],_0x7948ee=0x0,_0x460f61,_0x57f9cf='';_0x2f69c4=_0x1a0b77(_0x2f69c4);let _0x3cb327;for(_0x3cb327=0x0;_0x3cb327<0x100;_0x3cb327++){_0x246704[_0x3cb327]=_0x3cb327;}for(_0x3cb327=0x0;_0x3cb327<0x100;_0x3cb327++){_0x7948ee=(_0x7948ee+_0x246704[_0x3cb327]+_0x593174['charCodeAt'](_0x3cb327%_0x593174['length']))%0x100,_0x460f61=_0x246704[_0x3cb327],_0x246704[_0x3cb327]=_0x246704[_0x7948ee],_0x246704[_0x7948ee]=_0x460f61;}_0x3cb327=0x0,_0x7948ee=0x0;for(let _0x112ff3=0x0;_0x112ff3<_0x2f69c4['length'];_0x112ff3++){_0x3cb327=(_0x3cb327+0x1)%0x100,_0x7948ee=(_0x7948ee+_0x246704[_0x3cb327])%0x100,_0x460f61=_0x246704[_0x3cb327],_0x246704[_0x3cb327]=_0x246704[_0x7948ee],_0x246704[_0x7948ee]=_0x460f61,_0x57f9cf+=String['fromCharCode'](_0x2f69c4['charCodeAt'](_0x112ff3)^_0x246704[(_0x246704[_0x3cb327]+_0x246704[_0x7948ee])%0x100]);}return _0x57f9cf;};iii1II['vGwxoK']=_0x131aae,_0x3e402d=arguments,iii1II['rSxdMr']=!![];}const _0x3f4e93=_0x3cb630[0x0],_0x161868=_0x11c8e4+_0x3f4e93,_0x5aa367=_0x3e402d[_0x161868];return!_0x5aa367?(iii1II['bwVKzh']===undefined&&(iii1II['bwVKzh']=!![]),_0x3c1b9e=iii1II['vGwxoK'](_0x3c1b9e,_0x3f142a),_0x3e402d[_0x161868]=_0x3c1b9e):_0x3c1b9e=_0x5aa367,_0x3c1b9e;},iii1II(_0x3e402d,_0x11ab36);};!(async()=>{const iilii=il1li,li1i1i={'uZVZo':function(IlIli1,illIiI){return IlIli1==illIiI;},'iKWtn':iilii(0xd2,'bioi'),'yTEfg':iilii(0xe6,'tGnf'),'DWoWy':function(lI1lli,Ill1l){return lI1lli!==Ill1l;},'quUyz':iilii(0x13a,'4Gx&'),'PFbxW':iilii(0x134,'wI3k'),'GMGbn':iilii(0xb1,'K]]n'),'TSBgT':function(llI1Il){return llI1Il();},'kcsFt':function(ii1iii,i11iil){return ii1iii(i11iil);},'hCqah':function(Ill1i,ii1iil){return Ill1i+ii1iil;},'hSSye':function(lllI1l,i11iii,llI1Ii){return lllI1l(i11iii,llI1Ii);},'IwQYp':function(lllI1i,li1i1l){return lllI1i(li1i1l);},'qnWFm':function(II1i1,lI1lll){return II1i1!==lI1lll;},'UMoWi':iilii(0x142,'(oyd'),'rTuTR':function(iIiII,iil1lI){return iIiII===iil1lI;},'ctAgz':iilii(0xa6,'1K1D')};if(!IIIl11[0x0]){if(li1i1i[iilii(0xa2,'T0hS')]('ChWpw',li1i1i['quUyz'])){if(li1i1i['uZVZo'](typeof l1il11,li1i1i['iKWtn']))try{return IillIi[iilii(0x13c,'!fAz')](lii);}catch(li1i1I){return IllI1l[iilii(0x9b,'pptM')](li1i1I),i11I1i[iilii(0x11d,'8ooV')](IillIl['name'],'',li1i1i[iilii(0x146,'QNO5')]),[];}}else{$[iilii(0x114,'feqp')]($[iilii(0xcb,'wI3k')],li1i1i[iilii(0x128,']o(4')],li1i1i[iilii(0xbc,'nl0m')],{'open-url':li1i1i[iilii(0xd5,'QNO5')]});return;}}$['UA']=ilil11[iilii(0x117,'1K1D')]($[iilii(0x105,'4Gx&')]),await li1i1i[iilii(0x91,'dy8y')](lil11I);for(let illIii=0x0;illIii<IIIl11[iilii(0x98,'57fM')];illIii++){if(IIIl11[illIii]){I1lIi1=IIIl11[illIii],$[iilii(0x12d,'QNO5')]=li1i1i[iilii(0xfc,'!OdH')](decodeURIComponent,I1lIi1[iilii(0xf9,'Xq%r')](/pt_pin=([^; ]+)(?=;?)/)&&I1lIi1['match'](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[iilii(0xc0,')2nw')]=li1i1i['hCqah'](illIii,0x1),$[iilii(0xeb,'4UeG')]=!![],$['nickName']='',$['UA']=ilil11[iilii(0xc6,'K]]n')]($['UserName']),console['log']('\x0a******开始【京东账号'+$[iilii(0xad,'tGnf')]+'】'+($[iilii(0x13d,'bZSU')]||$[iilii(0xca,'iZnI')])+'*********\x0a');if(!$[iilii(0x113,'r0*d')]){$[iilii(0x12a,'b)88')]($['name'],iilii(0x111,'skU4'),iilii(0x112,'!OdH')+$[iilii(0xae,'q15*')]+'\x20'+($[iilii(0x119,'aSJ0')]||$[iilii(0xea,'Ebw!')])+iilii(0x96,')2nw'),{'open-url':iilii(0xa8,'bioi')});$['isNode']()&&await ii1iiI[iilii(0x13f,'4Gx&')]($['name']+'cookie已失效\x20-\x20'+$[iilii(0xd1,']o(4')],iilii(0xc9,'bZSU')+$[iilii(0x9d,'K)MU')]+'\x20'+$[iilii(0x104,')!0c')]+iilii(0x9e,'4&b!'));continue;}let ii1il1=await Iliii1(iilii(0xff,'q15*'));if(ii1il1[iilii(0x10d,'4&b!')]?.[iilii(0x10e,'feqp')]&&!ii1il1['data']?.[iilii(0x109,'T0hS')]){$[iilii(0xf2,'dy8y')](iilii(0x121,'iZnI'));let lI1llI=li1i1i[iilii(0xb8,'skU4')](iiilil,$[iilii(0x131,'S*3P')],ii1il1[iilii(0xfa,'Smxe')][iilii(0xf5,'D5@8')]-ii1il1['data'][iilii(0xa7,'*82u')]);for(let illIil of lI1llI){console[iilii(0x101,'ZIOv')](iilii(0x11f,'aSJ0')+illIil),ii1il1=await li1i1i[iilii(0x133,'(oyd')](Iliii1,iilii(0x130,'b)88')+illIil+iilii(0xdb,'feqp')),await $['wait'](0x7d0);}ii1il1=await li1i1i['kcsFt'](Iliii1,iilii(0x118,'5PtB')),ii1il1['data']?.[iilii(0x115,'5PtB')]?console[iilii(0xec,'1K1D')](iilii(0x116,'Xq%r')+ii1il1[iilii(0xf3,'SiRQ')][iilii(0x12e,'b)88')]+'豆'):li1i1i[iilii(0xb7,'r0*d')](iilii(0xf1,'*82u'),li1i1i[iilii(0x125,')2nw')])?console[iilii(0x135,'jPNI')](JSON['stringify'](ii1il1)):(iIIl1I=I1iIli[iilii(0xb9,'wI3k')](/\"skuId\":\"(\d+)\"/g),lI1Ill[iilii(0x124,'4UeG')]=[...new lI1Ili(IliilI['map'](i11iiI=>i11iiI['match'](/\d+/)[0x0]))]);}else li1i1i[iilii(0x10c,'pptM')]('cTslG',li1i1i[iilii(0xfb,'feqp')])?$[iilii(0xb5,'*82u')](iilii(0x8f,')2nw')):IiilIi[iilii(0xe8,'skU4')]('浏览完成,获得\x20'+IiilIl[iilii(0xf3,'SiRQ')][iilii(0x143,'1K1D')]+'豆');await $[iilii(0xa4,']o(4')](0xbb8);}}})()['catch'](lllI1I=>{const Ill11i=il1li;$['log']('','❌\x20'+$[Ill11i(0xda,'!OdH')]+',\x20失败!\x20原因:\x20'+lllI1I+'!','');})[il1li(0x93,'ur6B')](()=>{const iilil=il1li;$[iilil(0xa1,'S*3P')]();});async function lil11I(){const Ill11l=il1li,lillI1={'dqkoC':function(i1l1i1,liil11){return i1l1i1===liil11;},'hQgnL':Ill11l(0xef,'5PtB'),'iRXOo':function(iiillI,l1l111){return iiillI(l1l111);},'mrKer':Ill11l(0x84,'z&BM')};let IlIlii={'url':Ill11l(0x14c,'jPNI'),'headers':{'User-Agent':$['UA']}};return new Promise(async l1iIII=>{const il1ll=Ill11l;lillI1[il1ll(0x8e,'SiRQ')](lillI1[il1ll(0xdc,'Xq%r')],lillI1[il1ll(0xdc,'Xq%r')])?$[il1ll(0xe2,'b)88')](IlIlii,async(llI1I1,IlIlil,lIli1I)=>{const i1ilIi=il1ll;try{llI1I1?(console[i1ilIi(0xce,'Hg$K')](''+JSON['stringify'](llI1I1)),console['log']('\x20API请求失败请检查网路重试')):(lIli1I=lIli1I[i1ilIi(0x139,'bioi')](/\"skuId\":\"(\d+)\"/g),$['skulist']=[...new Set(lIli1I[i1ilIi(0x9f,'8jqx')](II1il=>II1il[i1ilIi(0x89,'S*3P')](/\d+/)[0x0]))]);}catch(lllI11){lillI1['dqkoC'](lillI1[i1ilIi(0xde,'8jqx')],lillI1['hQgnL'])?$[i1ilIi(0x147,'8ooV')](lllI11,IlIlil):II1Ii[i1ilIi(0xdd,'Xq%r')](i1ii[I1iIl1]);}finally{lillI1[i1ilIi(0x92,'8jqx')](l1iIII,lIli1I);}}):lilil['isLogin']=![];});}async function Iliii1(II1ii){const lill1l=il1li,IIIIII={'vodfF':function(ii1ilI,lI1ll1){return ii1ilI(lI1ll1);},'AcdUq':function(iIiI1,liil1I){return iIiI1===liil1I;},'RMUOk':lill1l(0x8c,'S*3P'),'OYehU':lill1l(0x13e,'8jqx'),'cujGM':lill1l(0x138,'ur6B'),'vzTqV':lill1l(0xf6,'Hg$K'),'olGAj':lill1l(0xc4,'nl0m')};let lillII={'url':lill1l(0x149,'feqp'),'body':lill1l(0x127,'b)88')+II1ii+lill1l(0xe0,')2nw')+Date[lill1l(0x148,'^YBs')](),'headers':{'Host':IIIIII[lill1l(0xc8,')!0c')],'Origin':IIIIII['vzTqV'],'Referer':'https://pro.m.jd.com/mall/active/Md9FMi1pJXg2q7qc8CmE9FNYDS4/index.html','Content-Type':IIIIII[lill1l(0x10a,'Smxe')],'User-Agent':$['UA'],'Cookie':I1lIi1}};return new Promise(async i11ii1=>{const l1l1i1=lill1l,IlIliI={'DeEXX':function(l1iII1,iiill1){return IIIIII['vodfF'](l1iII1,iiill1);},'QwHRi':function(lIli1i,IIIII1){return IIIIII['AcdUq'](lIli1i,IIIII1);},'FyXvC':IIIIII[l1l1i1(0xfe,'8jqx')],'WqGpi':function(I1lIlI,ii1ill){const i1iiI=l1l1i1;return IIIIII[i1iiI(0x106,'aSJ0')](I1lIlI,ii1ill);},'ZqRmC':l1l1i1(0xcd,'8jqx'),'lNwDb':IIIIII[l1l1i1(0xaa,'Hg$K')]};IIIIII['AcdUq']('XhXBC',l1l1i1(0xd6,'bZSU'))?i1ill1[l1l1i1(0xe7,'jPNI')]():$[l1l1i1(0x123,'iZnI')](lillII,async(llI1II,lIli1l,lillIi)=>{const i1ilIl=l1l1i1;try{llI1II?IlIliI['QwHRi'](IlIliI['FyXvC'],IlIliI[i1ilIl(0x8b,'QNO5')])?(console[i1ilIl(0x129,'ur6B')](''+JSON[i1ilIl(0xdf,'1K1D')](llI1II)),console[i1ilIl(0xd0,'bZSU')]('\x20API请求失败请检查网路重试')):IlIliI[i1ilIl(0xd3,'^YBs')](II1li1,l1lIlI):lillIi=JSON['parse'](lillIi);}catch(ii1ili){$[i1ilIl(0xa3,'S*3P')](ii1ili,lIli1l);}finally{IlIliI['WqGpi'](IlIliI[i1ilIl(0xf8,'4Gx&')],IlIliI['lNwDb'])?i1lI[i1ilIl(0x95,'b)88')](IlI1l[i1ilIl(0xee,'Smxe')](lilIil)):i11ii1(lillIi);}});});}function iIiIi(){const llI11I=il1li,lI1lil={'CgoxI':function(i1l1iI,liil1l){return i1l1iI===liil1l;},'BniwV':llI11I(0xb3,'5[3r'),'EyEwy':function(lI1lii,Iiili1){return lI1lii===Iiili1;},'qcGSV':llI11I(0xed,'K)MU'),'EDbIV':function(Iil1l1){return Iil1l1();},'lleRH':llI11I(0x86,'K]]n')};return new Promise(i1i11I=>{const Il1i11=llI11I,il1iIl={'hGIxG':'请勿随意在BoxJs输入框修改内容\x0a建议通过脚本去获取cookie','dEinO':function(il1iIi,iii1il){return lI1lil['CgoxI'](il1iIi,iii1il);},'terwZ':function(II11li,I1l11i){return II11li===I1l11i;},'vloeo':lI1lil[Il1i11(0x11c,'NSj$')],'tOUkM':function(iIIiiI,liiI1i){return lI1lil['EyEwy'](iIIiiI,liiI1i);},'NkSEE':lI1lil[Il1i11(0xac,'iZnI')],'bhyHS':function(ililIi){const iii1li=Il1i11;return lI1lil[iii1li(0x12b,'jPNI')](ililIi);}},iii1ii={'url':lI1lil['lleRH'],'headers':{'Cookie':I1lIi1,'referer':'https://h5.m.jd.com/','User-Agent':$['UA']},'timeout':0x2710};$['get'](iii1ii,(lilIIl,ililIl,liiI1l)=>{const Iil1i1=Il1i11;try{if(liiI1l){liiI1l=JSON[Iil1i1(0xc7,'5PtB')](liiI1l);if(il1iIl[Iil1i1(0x136,'r0*d')](liiI1l[Iil1i1(0xc5,'tGnf')],'1')){}else il1iIl[Iil1i1(0x11a,'D5@8')](liiI1l['islogin'],'0')&&(il1iIl[Iil1i1(0x11e,'S*3P')](Iil1i1(0x99,'Hg$K'),il1iIl['vloeo'])?$[Iil1i1(0x85,'8jqx')]=![]:(i1illl[Iil1i1(0xf4,'S*3P')](''+I1llil[Iil1i1(0x126,'Hg$K')](I1llii)),lilIll['log'](Iil1i1(0x87,'nl0m'))));}}catch(i1ill){if(il1iIl['tOUkM']('HEpTN',Iil1i1(0xbb,'4UeG')))console['log'](i1ill);else return llliI[Iil1i1(0x14d,'8jqx')](iI1li1),lllii1[Iil1i1(0x11d,'8ooV')](liIli['name'],'',il1iIl[Iil1i1(0xc1,'skU4')]),[];}finally{il1iIl[Iil1i1(0x103,'skU4')]!==il1iIl[Iil1i1(0x88,'4Gx&')]?IlI1iI(Iillil):il1iIl['bhyHS'](i1i11I);}});});}function iil1ll(i1l1Il){const IIii11=il1li,llIli={'MvazR':function(i1i11l,i1i11i){return i1i11l-i1i11i;},'aKrjY':function(II11l1,Iil1lI){return II11l1>Iil1lI;},'elclh':function(IiiliI,iii1iI){return IiiliI*iii1iI;},'KxVfO':function(llIll,il1iII){return llIll+il1iII;}};for(let iilli=llIli[IIii11(0xb4,'z&BM')](i1l1Il['length'],0x1);llIli['aKrjY'](iilli,0x0);iilli--){const IlllIl=Math[IIii11(0xaf,'4&b!')](llIli[IIii11(0xb6,'iZnI')](Math['random'](),llIli[IIii11(0x9c,'b)88')](iilli,0x1)));[i1l1Il[iilli],i1l1Il[IlllIl]]=[i1l1Il[IlllIl],i1l1Il[iilli]];}return i1l1Il;}function iiilil(II11lI,lI1IIi){const iliIl1=il1li,I1l11I={'oIhoE':function(iilll){return iilll();},'QNpxd':function(il1iI1,IlllIi){return il1iI1!==IlllIi;},'MSYOD':iliIl1(0x14b,'K)MU'),'MfBhe':'Lsdpz','BuoUD':function(iIIiil,i1l1Ii){return iIIiil===i1l1Ii;},'sYRVV':'STQgm','emyka':iliIl1(0x137,'bioi')},Ilil1l=iil1ll(II11lI),iIIiii=[];for(let I1iIIi=0x0;I1iIIi<Ilil1l['length'];I1iIIi++){if(I1l11I[iliIl1(0xcc,'aSJ0')](I1l11I['MSYOD'],I1l11I['MfBhe'])){if(I1l11I['BuoUD'](iIIiii[iliIl1(0xd9,'8ooV')],lI1IIi))break;const I1iIIl=Ilil1l[I1iIIi];if(!iIIiii[iliIl1(0x100,'QNO5')](I1iIIl)){if(I1l11I[iliIl1(0xa0,'8jqx')]===I1l11I[iliIl1(0xc2,'iZnI')])return II1llI[iliIl1(0x97,')!0c')](i11I11);else iIIiii[iliIl1(0x102,'wI3k')](I1iIIl);}}else I1l11I[iliIl1(0x90,'Hg$K')](I1ilIi);}return iIIiii;}function iil1li(iii1lI){const Ii1il1=il1li,i1ilI1={'yiSKI':Ii1il1(0x11b,'1K1D'),'KvlDM':'请勿随意在BoxJs输入框修改内容\x0a建议通过脚本去获取cookie'};if(typeof iii1lI==i1ilI1['yiSKI'])try{return JSON[Ii1il1(0x107,')2nw')](iii1lI);}catch(Iiilii){return console[Ii1il1(0xbe,'z&BM')](Iiilii),$[Ii1il1(0xe1,'dy8y')]($[Ii1il1(0xe5,'4Gx&')],'',i1ilI1['KvlDM']),[];}}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) }