faker3/jd_wxtoken_m.js
2024-06-28 15:38:28 +08:00

8 lines
23 KiB
JavaScript

/*
快速获取token
38 11 11 11 * jd_wxtoken_m.js
*/
const $ = new Env('快速缓存token');
var _0xodU='jsjiami.com.v7';function _0x3c8c(){const _0x2683b7=(function(){return[...[_0xodU,'uAjsJjiqdatHFmkDTiU.rRncohAmdN.KpUvM7CCY==','wvXmWQJcQqfVW4y','osuVicrMiJFdLmoTW4ezpW','ghldICktW4i','6k2R5yQo6zQ05OEn5z6rWPBdUmofW64+6l+q5yAu5Qk15l+55PEq5yAf5A6yWR3LUzhORjNPG6ZOVlVOH7xMNPNLJO7OJPVLJ78qW6JdM8oTWQDx','AColuHzk','ba9f','vmkXk3xcHYfJW4hcOCkleZJdPLRdRX1jWPVcRmkzuW43WO5StSkWhw/dRmkJ','zSkaWOaviSkhgW','vHW8W5i','u8oIW4RcG8k9imoerwC','W5e2ESkAW6a','6l6y57QH5lUq5Q+J6i2F5yYb5AAh6lsC776D5y2h6ioD6zUk5yQGW64g77+B5ycy5Q2Z5OQ36koX776v77YT772z','W4qanq','B8kOWRa','vxjEW7KOWQCBma','amklpMqQyCkNuNr6W55hW4y','qY0TW4hdNW','dMxcRwuOWPO','Dh/dOCo6W5RdOmkdBmouW6PPW7BdHW','gSorsHtdH0GfjcPZc8kAWPS','W7aExa','WR3cUSkAkSoBFmkvwW','DYVdMLiyW7S2yq','WPVcK0bpaYZdS8k7','bwSAjhBcRa','vryMW5n3h3e','zZ3dJuCX','qtXoBCoD','ufK1kaG','CJzkrCo1','W6JdM8oMamkJEG','C8kYWQqe','W5ZdIIynrxxcQ8oQWPiOW6BcQaLT','hIBcU8oaDmkj','qSkhafa','x8oEztC','FSknFa','DdyG','sH7dGmk4ut3cLW','WOBdRSkLDCo3W6XeWQxcPCoPEmkdrNu','W7xdH8o7g8k1DLL/','z3RdOv7cT3ddVq','jcL8W5GKWQKebSoF','W63dH8op','t247WP1MW6vLA8ogwmoWiG','44g95O6c56EZ44k46k+T5yAM6i635yYf5lQX5lQ76lsI5y+A5lMdW4LkDCoJbSk+WPpNM7VMJjlKViZNLQJcRSkuAhRcM1RNMjpKU6BKU7NNRARLIRZOJkhLJP8'],...(function(){return[...['WPNdUowMOEI1PSoIW7ZLJ63LMBpdVmkA','W4ZdKmk+WP13umkuW5C6W6VdQW','tJi6','bIpcL8kAW7bUW4q','W4xcJmk+h3TP','C2uRiq','r8kKmmkbWPTLjmodw8osWOLFhW','sSoEW4pdRa','W4BcOCo7m8kb','gmowtXxdGuqgeqn4jSkMWR4','sSobo8oTW6hcOq','srNcMCo8WP4FFx8dBwbrga','xmoEEa','z8klafxcVW','wCkqdKZcOW','z8kNfLBcHW','lYlcVCkNWPa','W6uRnSovuq','oJJcHCkKwEADG+AuRoADItNdTowMSUwjG+MtH++8S+wSQoAxTUApQUMFTUAuJG','W4RdH8oenCkD','WQxcUeX/naFdImkB','ehpcQW','eSoQoxdcMNG4WOFcOSkFwcBcRHVdPWbu','C8omW4RcVSkL','hexdMmkoW4XfiG','hH0PW47cR8orkCoM','aN3dH3hcSW','stFdNmk9yW','s1C7','DY3dOtPMW5/cL+w+PUwKOEodPUI1I+wnHW','W78EvmkPW5dcSq','W70Daf9k','eGddSdiAaSoxh8kAmCkRegm','ee8upum','WOvSaCk+WRG','W6pdH8osj8kx','Bduxb8oB','v8owzJnZomoQ','5B6i6ycD572L5AYiz8kXWQrRW6mW55sq5lQR5BYy5y2q57cR5lME5yIq','g8o+A8osW6CZFmoZ','W7XwWPLjtvW','CGT6WOzF','W75sWPPl','WP/dI8obqcS9t1jSW4lcM3VcKa','W73cON3cJYe','uY4wW5ZdVG','bXHQWRJcSa','zcBdOv7cUh/dPCkd'],...(function(){return['AHeqb8o/','W6ZdICoCdmkV','zZ/dQ8kyDqVcO1e','BJXc','eSoRh8o3Ea','AJTV','r0dcSw9A','hCkJW4e','yrSwW4JdSa','vrCHW7zo','WOW2ASopsq','W4dcKmkx','y8o0W5VdKve','dcnAW6ul','W5VcNSkzba','wWiwW7LL','yJeIhCoh','dwhcVMqU','nx9pWQzUr8oZW6C','ESoIeCo6W5q','uJTTWRXAtSonW6O','yti2W4hdQa','rZBdIq','lSo4W7XXwa','m8k/W43dGfW','rf4AW5BcPSkdvCkHd8oHWPmGtmo7y8kfW7dcMmkKsbWcW6JcNv9Yz8kbWOy1W6jVW782WRFdPhbAc8owW75WWRy','l8oto2NdPWddL0/cT8kLgJpdHG','rsuQW57dOW','omo7bmoUCW','W7Oscv8','W43dKmkQWQzt','W7iywmkPW7FcTCo6W5G','W4Orl8oMxvCUeW','WPRcOmkDW44p','WOBdRmkHC8o3W61aW53cHmoqvCkJtG','umopEd5M','tHL6WOrL','W5BcUCoKimkR','rmkAySkTex4zcbWVj8oxWPa','xColfmo1W5y','uMO7gNNcUSkc','W4ldH8oda8kj','dCo1AdhdHY18WONcI8k8eHhcJq','DSkcFJVcTG','5Ps45OYl5lQM55gcn0GeFmo5W5hcScmEW47cLuDxWQr4F8kMka'];}())];}())];}());_0x3c8c=function(){return _0x2683b7;};return _0x3c8c();};const _0x589f43=_0x5083;(function(_0x4b6218,_0x39b1ee,_0x3ccfcc,_0x1bf7e5,_0x16b8b1,_0xb58854,_0x1e06db){return _0x4b6218=_0x4b6218>>0x4,_0xb58854='hs',_0x1e06db='hs',function(_0x2c67cd,_0x45c493,_0x783ef4,_0x36104c,_0x72b17d){const _0x1d8528=_0x5083;_0x36104c='tfi',_0xb58854=_0x36104c+_0xb58854,_0x72b17d='up',_0x1e06db+=_0x72b17d,_0xb58854=_0x783ef4(_0xb58854),_0x1e06db=_0x783ef4(_0x1e06db),_0x783ef4=0x0;const _0x1d3de7=_0x2c67cd();while(!![]&&--_0x1bf7e5+_0x45c493){try{_0x36104c=parseInt(_0x1d8528(0x13d,'!v0k'))/0x1*(-parseInt(_0x1d8528(0x123,'GoNA'))/0x2)+parseInt(_0x1d8528(0x109,'osL$'))/0x3+parseInt(_0x1d8528(0x10d,'KwC$'))/0x4+-parseInt(_0x1d8528(0x148,'(Da3'))/0x5*(-parseInt(_0x1d8528(0x114,'f(b^'))/0x6)+-parseInt(_0x1d8528(0xc2,'aJ3c'))/0x7*(-parseInt(_0x1d8528(0xe6,'!v0k'))/0x8)+-parseInt(_0x1d8528(0xd0,'6([Y'))/0x9*(-parseInt(_0x1d8528(0x101,'uTei'))/0xa)+-parseInt(_0x1d8528(0x134,'Fm8H'))/0xb;}catch(_0x5b9d26){_0x36104c=_0x783ef4;}finally{_0x72b17d=_0x1d3de7[_0xb58854]();if(_0x4b6218<=_0x1bf7e5)_0x783ef4?_0x16b8b1?_0x36104c=_0x72b17d:_0x16b8b1=_0x72b17d:_0x783ef4=_0x72b17d;else{if(_0x783ef4==_0x16b8b1['replace'](/[rquMRDNtFdHhTnAJpKkCYU=]/g,'')){if(_0x36104c===_0x45c493){_0x1d3de7['un'+_0xb58854](_0x72b17d);break;}_0x1d3de7[_0x1e06db](_0x72b17d);}}}}}(_0x3ccfcc,_0x39b1ee,function(_0x10c9ca,_0x19f72d,_0x152e07,_0x57894c,_0x5ed8d6,_0x1edd4f,_0x1dcd79){return _0x19f72d='\x73\x70\x6c\x69\x74',_0x10c9ca=arguments[0x0],_0x10c9ca=_0x10c9ca[_0x19f72d](''),_0x152e07=`\x72\x65\x76\x65\x72\x73\x65`,_0x10c9ca=_0x10c9ca[_0x152e07]('\x76'),_0x57894c=`\x6a\x6f\x69\x6e`,(0x1488c3,_0x10c9ca[_0x57894c](''));});}(0xc90,0xe4d64,_0x3c8c,0xcb),_0x3c8c)&&(_0xodU=0xcb);const _0x397d2d=$[_0x589f43(0x132,'RaSe')]()?require(_0x589f43(0x115,'jDJk')):'',_0x1210e5=require(_0x589f43(0xcd,'agQA'));function _0x5083(_0x824466,_0x345f8b){const _0x495eb8=_0x3c8c();return _0x5083=function(_0x3d48f1,_0x521bb9){_0x3d48f1=_0x3d48f1-0xc1;let _0x3c8cb2=_0x495eb8[_0x3d48f1];if(_0x5083['cKHhFz']===undefined){var _0x5083f6=function(_0x26d43a){const _0x4ab453='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1f903f='',_0x1d2f32='',_0x1f3ed2=_0x1f903f+_0x5083f6;for(let _0x288df6=0x0,_0x2ac347,_0x2008e1,_0x3e0fec=0x0;_0x2008e1=_0x26d43a['charAt'](_0x3e0fec++);~_0x2008e1&&(_0x2ac347=_0x288df6%0x4?_0x2ac347*0x40+_0x2008e1:_0x2008e1,_0x288df6++%0x4)?_0x1f903f+=_0x1f3ed2['charCodeAt'](_0x3e0fec+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x2ac347>>(-0x2*_0x288df6&0x6)):_0x288df6:0x0){_0x2008e1=_0x4ab453['indexOf'](_0x2008e1);}for(let _0x43bfef=0x0,_0x3ecceb=_0x1f903f['length'];_0x43bfef<_0x3ecceb;_0x43bfef++){_0x1d2f32+='%'+('00'+_0x1f903f['charCodeAt'](_0x43bfef)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1d2f32);};const _0x1b9222=function(_0xee0143,_0x27ef68){let _0x3d2f20=[],_0x4f9f44=0x0,_0x94e079,_0x100a9c='';_0xee0143=_0x5083f6(_0xee0143);let _0xa49492;for(_0xa49492=0x0;_0xa49492<0x100;_0xa49492++){_0x3d2f20[_0xa49492]=_0xa49492;}for(_0xa49492=0x0;_0xa49492<0x100;_0xa49492++){_0x4f9f44=(_0x4f9f44+_0x3d2f20[_0xa49492]+_0x27ef68['charCodeAt'](_0xa49492%_0x27ef68['length']))%0x100,_0x94e079=_0x3d2f20[_0xa49492],_0x3d2f20[_0xa49492]=_0x3d2f20[_0x4f9f44],_0x3d2f20[_0x4f9f44]=_0x94e079;}_0xa49492=0x0,_0x4f9f44=0x0;for(let _0x262328=0x0;_0x262328<_0xee0143['length'];_0x262328++){_0xa49492=(_0xa49492+0x1)%0x100,_0x4f9f44=(_0x4f9f44+_0x3d2f20[_0xa49492])%0x100,_0x94e079=_0x3d2f20[_0xa49492],_0x3d2f20[_0xa49492]=_0x3d2f20[_0x4f9f44],_0x3d2f20[_0x4f9f44]=_0x94e079,_0x100a9c+=String['fromCharCode'](_0xee0143['charCodeAt'](_0x262328)^_0x3d2f20[(_0x3d2f20[_0xa49492]+_0x3d2f20[_0x4f9f44])%0x100]);}return _0x100a9c;};_0x5083['JxqLjW']=_0x1b9222,_0x824466=arguments,_0x5083['cKHhFz']=!![];}const _0x4e9234=_0x495eb8[0x0],_0x26b596=_0x3d48f1+_0x4e9234,_0x364cad=_0x824466[_0x26b596];if(!_0x364cad){if(_0x5083['ncbDAI']===undefined){const _0x5364cd=function(_0x1bf032){this['TMeFrU']=_0x1bf032,this['eVLfHb']=[0x1,0x0,0x0],this['ftcKUz']=function(){return'newState';},this['kCeRCx']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['xsHGPV']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x5364cd['prototype']['vXwERK']=function(){const _0x4ae0da=new RegExp(this['kCeRCx']+this['xsHGPV']),_0x1913e1=_0x4ae0da['test'](this['ftcKUz']['toString']())?--this['eVLfHb'][0x1]:--this['eVLfHb'][0x0];return this['RRFviY'](_0x1913e1);},_0x5364cd['prototype']['RRFviY']=function(_0x1acaba){if(!Boolean(~_0x1acaba))return _0x1acaba;return this['adYQVh'](this['TMeFrU']);},_0x5364cd['prototype']['adYQVh']=function(_0x1f350d){for(let _0x20960e=0x0,_0x2651b5=this['eVLfHb']['length'];_0x20960e<_0x2651b5;_0x20960e++){this['eVLfHb']['push'](Math['round'](Math['random']())),_0x2651b5=this['eVLfHb']['length'];}return _0x1f350d(this['eVLfHb'][0x0]);},new _0x5364cd(_0x5083)['vXwERK'](),_0x5083['ncbDAI']=!![];}_0x3c8cb2=_0x5083['JxqLjW'](_0x3c8cb2,_0x521bb9),_0x824466[_0x26b596]=_0x3c8cb2;}else _0x3c8cb2=_0x364cad;return _0x3c8cb2;},_0x5083(_0x824466,_0x345f8b);}let _0x3fe89e=[],_0x1b13db='',_0x312024=0x0;if($[_0x589f43(0x146,'jUDP')]()){Object[_0x589f43(0x136,'%O4N')](_0x397d2d)[_0x589f43(0xcf,'aJ3c')](_0xdad163=>{const _0x93869f=_0x589f43;_0x3fe89e[_0x93869f(0x133,'s$gn')](_0x397d2d[_0xdad163]);});if(process[_0x589f43(0x138,'uTei')][_0x589f43(0xcb,'Fm8H')]&&process[_0x589f43(0xfd,'0l0O')][_0x589f43(0xe9,'JMrR')]===_0x589f43(0x108,'I0rs'))console[_0x589f43(0xd3,'djkw')]=()=>{};}else _0x3fe89e=[$[_0x589f43(0x145,'F!]O')](_0x589f43(0x107,'eeBr')),$[_0x589f43(0x12d,'DD0s')](_0x589f43(0x13e,'Md0p')),..._0x4bc8ae($[_0x589f43(0x13a,'JMrR')](_0x589f43(0x11d,'4dEM'))||'[]')[_0x589f43(0xc3,'GoNA')](_0x286aa9=>_0x286aa9[_0x589f43(0xd5,'6Let')])][_0x589f43(0x12c,'JR)G')](_0x29b175=>!!_0x29b175);!(async()=>{const _0x3b63cd=_0x589f43,_0x2ea888={'CFKeV':_0x3b63cd(0x141,'v)^7'),'CoklN':_0x3b63cd(0x100,'6([Y'),'zheOY':function(_0x31e7bd,_0x4683cb){return _0x31e7bd===_0x4683cb;},'Eergg':_0x3b63cd(0xf3,'Z$cs'),'doNjT':function(_0x331967,_0x381535){return _0x331967<_0x381535;},'tlPUE':function(_0x180dbd,_0x34d0eb){return _0x180dbd===_0x34d0eb;},'NiyvK':_0x3b63cd(0xd2,'JMrR'),'qsKqX':_0x3b63cd(0xca,'RaSe'),'sMbmP':function(_0x5ba85a,_0x1a6b13){return _0x5ba85a(_0x1a6b13);},'peoDf':function(_0xb498de,_0x58e363){return _0xb498de+_0x58e363;},'bXcXo':function(_0x3a30de,_0x4fef93){return _0x3a30de>_0x4fef93;},'NEous':function(_0x358716,_0xba56eb,_0x2bd5a5){return _0x358716(_0xba56eb,_0x2bd5a5);},'gdsAX':_0x3b63cd(0x11a,'agQA'),'lUvXe':function(_0x423b38,_0x578a19){return _0x423b38==_0x578a19;}};if(!_0x3fe89e[0x0]){if(_0x2ea888[_0x3b63cd(0xf7,'[AHI')](_0x2ea888[_0x3b63cd(0xf1,'J&Ld')],_0x2ea888[_0x3b63cd(0x12e,'0l0O')])){$[_0x3b63cd(0xee,'yi&q')]($[_0x3b63cd(0x149,'Z$cs')],_0x2ea888[_0x3b63cd(0xfa,'@iwc')],_0x2ea888[_0x3b63cd(0xff,'yi&q')],{'open-url':_0x2ea888[_0x3b63cd(0xfc,'8Nq$')]});return;}else{_0x179f9c[_0x3b63cd(0xcc,'OrfN')](_0x57f2d0[_0x3b63cd(0xe1,'WX3F')],_0x2ea888[_0x3b63cd(0xef,'8Nq$')],_0x2ea888[_0x3b63cd(0x110,'RaSe')],{'open-url':_0x2ea888[_0x3b63cd(0x12f,'Ugml')]});return;}}$[_0x3b63cd(0x139,'[AHI')](_0x3b63cd(0xdd,'JR)G')),$[_0x3b63cd(0x121,'s$gn')](_0x3b63cd(0xc9,'jZdK')),$[_0x3b63cd(0x128,'6Let')](_0x3b63cd(0x113,'jDJk'));for(let _0xdbc1ac=0x0;_0x2ea888[_0x3b63cd(0x10e,'@iwc')](_0xdbc1ac,_0x3fe89e[_0x3b63cd(0xdf,'WX3F')]);_0xdbc1ac++){if(_0x2ea888[_0x3b63cd(0xdb,'[AHI')](_0x2ea888[_0x3b63cd(0xc4,'%O4N')],_0x2ea888[_0x3b63cd(0xe4,'8Nq$')])){if(_0x417c4e){const _0x4ebb3c=_0x281714[_0x3b63cd(0xed,'wSVO')](_0x2c1a7a,arguments);return _0x481276=null,_0x4ebb3c;}}else{if(_0x3fe89e[_0xdbc1ac]){_0x1b13db=_0x3fe89e[_0xdbc1ac],$[_0x3b63cd(0xfb,'5%mA')]=_0x2ea888[_0x3b63cd(0xd8,'JR)G')](decodeURIComponent,_0x1b13db[_0x3b63cd(0x112,'uTei')](/pt_pin=([^; ]+)(?=;?)/)&&_0x1b13db[_0x3b63cd(0xe8,'RaSe')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[_0x3b63cd(0xd6,'*4zg')]=_0x2ea888[_0x3b63cd(0x131,'Ugml')](_0xdbc1ac,0x1),$[_0x3b63cd(0x106,'6Let')]='';if(_0x2ea888[_0x3b63cd(0x116,'aJ3c')](_0x312024,0x2)){console[_0x3b63cd(0xf2,'jUDP')](_0x3b63cd(0x11f,'rH^O'));break;};console[_0x3b63cd(0x13f,'RaSe')](_0x3b63cd(0xd4,'OrfN')+$[_0x3b63cd(0xc7,'rH^O')]+'】'+($[_0x3b63cd(0xde,'(Da3')]||$[_0x3b63cd(0x12a,'0l0O')])+_0x3b63cd(0x11b,'8&CA')),$[_0x3b63cd(0xd1,'!v0k')]=await _0x2ea888[_0x3b63cd(0xc6,'%O4N')](_0x1210e5,_0x1b13db,_0x2ea888[_0x3b63cd(0xf0,'DD0s')]),_0x2ea888[_0x3b63cd(0xc8,'eeBr')]($[_0x3b63cd(0xd9,'BHx2')],'')?_0x312024++:_0x312024=0x0,await $[_0x3b63cd(0xf5,'jUDP')](0x7d0);}}}})()[_0x589f43(0x10c,'osL$')](_0x4b0d5=>{const _0x1263ed=_0x589f43;$[_0x1263ed(0x144,'8Nq$')]('','❌\x20'+$[_0x1263ed(0x137,'GoNA')]+_0x1263ed(0x142,'osL$')+_0x4b0d5+'!','');})[_0x589f43(0xdc,'GoNA')](()=>{const _0x1a9604=_0x589f43;$[_0x1a9604(0x11c,'DD0s')]();});if(_0x589f43(0x120,'bzJ%')==_0x589f43(0x119,'f(b^'))return;function _0x4bc8ae(_0x51f9c6){const _0x39d610=_0x589f43,_0x484571={'gxwsE':function(_0x728ad7,_0x5afb65){return _0x728ad7!==_0x5afb65;},'XtZDU':_0x39d610(0x11e,'6Let'),'keIVF':function(_0x4113fd,_0x71629e){return _0x4113fd===_0x71629e;},'bozHP':_0x39d610(0xce,'4dEM'),'eUQIW':_0x39d610(0x140,'Md0p'),'sykpB':function(_0x340898,_0xb5cdb9,_0x447e81){return _0x340898(_0xb5cdb9,_0x447e81);},'GSplo':function(_0x231943){return _0x231943();},'uCrHK':function(_0x45bc0a,_0x567262){return _0x45bc0a==_0x567262;},'IQrJq':_0x39d610(0x135,'v)^7'),'iqDNs':_0x39d610(0x117,'6Let')},_0x5d5fe8=(function(){const _0x1e9b9b=_0x39d610,_0x352665={'MQQwQ':function(_0x2dd6b5,_0x3773f2){const _0x1e485d=_0x5083;return _0x484571[_0x1e485d(0x102,'8Nq$')](_0x2dd6b5,_0x3773f2);},'ovAuV':_0x484571[_0x1e9b9b(0x118,'GoNA')]};if(_0x484571[_0x1e9b9b(0xf4,'Md0p')](_0x484571[_0x1e9b9b(0x105,'T&RA')],_0x484571[_0x1e9b9b(0xda,'RaSe')])){let _0x25738d=!![];return function(_0x2b618a,_0xa50927){const _0x542f65=_0x1e9b9b,_0xed147c={'gAJnZ':function(_0x5cb2d8,_0x5ae956){const _0x3ca970=_0x5083;return _0x352665[_0x3ca970(0x103,'KwC$')](_0x5cb2d8,_0x5ae956);},'rHWUa':_0x352665[_0x542f65(0xe5,'f(b^')]},_0x4a7f82=_0x25738d?function(){const _0x35c876=_0x542f65;if(_0xa50927){if(_0xed147c[_0x35c876(0xeb,'KwC$')](_0xed147c[_0x35c876(0xe3,'NQrb')],_0xed147c[_0x35c876(0xe7,'[AHI')])){const _0x3f2914=_0x38b286?function(){const _0x51da28=_0x35c876;if(_0x112c6a){const _0x5f55ce=_0xd47b7a[_0x51da28(0x10a,'GoNA')](_0x23da49,arguments);return _0x5650d3=null,_0x5f55ce;}}:function(){};return _0x1026b2=![],_0x3f2914;}else{const _0x246f41=_0xa50927[_0x35c876(0x124,'8Nq$')](_0x2b618a,arguments);return _0xa50927=null,_0x246f41;}}}:function(){};return _0x25738d=![],_0x4a7f82;};}else _0x53acb4[_0x1e9b9b(0x147,'jDJk')]();}()),_0xbf799d=_0x484571[_0x39d610(0x14a,'osL$')](_0x5d5fe8,this,function(){const _0x17954d=_0x39d610;return _0xbf799d[_0x17954d(0x13c,'RaSe')]()[_0x17954d(0xc1,'@iwc')](_0x484571[_0x17954d(0xc5,'agQA')])[_0x17954d(0x12b,'Fm8H')]()[_0x17954d(0x143,'T&RA')](_0xbf799d)[_0x17954d(0x125,'OrfN')](_0x484571[_0x17954d(0xfe,'8&CA')]);});_0x484571[_0x39d610(0x130,'jDJk')](_0xbf799d);if(_0x484571[_0x39d610(0xe0,'5%mA')](typeof _0x51f9c6,_0x484571[_0x39d610(0x10b,'5%mA')]))try{return JSON[_0x39d610(0xf8,'OrfN')](_0x51f9c6);}catch(_0x3a39c5){return console[_0x39d610(0xea,'Ugml')](_0x3a39c5),$[_0x39d610(0xec,'5%mA')]($[_0x39d610(0x104,'*4zg')],'',_0x484571[_0x39d610(0xf6,'DD0s')]),[];}}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) }