faker3/jd_superbrandhall.js
2024-11-12 11:17:55 +08:00

15 lines
27 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.

/*
活动名称:超级品牌殿堂
环境变量jd_superbrandhall_interval // 自定义运行间隔时长整数单位毫秒默认1000
jd_superbrandhall_notify // 是否推送通知true/false默认不推送
jd_superbrandhall_pinFilter // 账号pin过滤多个用@进行分割
cron:18 8,18 * * *
*/
const $ = new Env('超级品牌殿堂')
const _0x41627a=_0x3008;function _0x3008(_0x69374,_0x15419d){const _0x232f83=_0x232f();return _0x3008=function(_0x3008bb,_0x4d1e63){_0x3008bb=_0x3008bb-0xa6;let _0x4337ff=_0x232f83[_0x3008bb];if(_0x3008['SfGhvz']===undefined){var _0x239c20=function(_0x5a040f){const _0xe8c81f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1840f0='',_0x3d1859='';for(let _0x28b2a0=0x0,_0x3e6d29,_0x5e8aaf,_0x198ec8=0x0;_0x5e8aaf=_0x5a040f['charAt'](_0x198ec8++);~_0x5e8aaf&&(_0x3e6d29=_0x28b2a0%0x4?_0x3e6d29*0x40+_0x5e8aaf:_0x5e8aaf,_0x28b2a0++%0x4)?_0x1840f0+=String['fromCharCode'](0xff&_0x3e6d29>>(-0x2*_0x28b2a0&0x6)):0x0){_0x5e8aaf=_0xe8c81f['indexOf'](_0x5e8aaf);}for(let _0x59d942=0x0,_0x510fd8=_0x1840f0['length'];_0x59d942<_0x510fd8;_0x59d942++){_0x3d1859+='%'+('00'+_0x1840f0['charCodeAt'](_0x59d942)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3d1859);};const _0x55b905=function(_0x44a9ae,_0x2bc05b){let _0x129359=[],_0x3b8328=0x0,_0x40b4a5,_0x293f98='';_0x44a9ae=_0x239c20(_0x44a9ae);let _0x22c8bc;for(_0x22c8bc=0x0;_0x22c8bc<0x100;_0x22c8bc++){_0x129359[_0x22c8bc]=_0x22c8bc;}for(_0x22c8bc=0x0;_0x22c8bc<0x100;_0x22c8bc++){_0x3b8328=(_0x3b8328+_0x129359[_0x22c8bc]+_0x2bc05b['charCodeAt'](_0x22c8bc%_0x2bc05b['length']))%0x100,_0x40b4a5=_0x129359[_0x22c8bc],_0x129359[_0x22c8bc]=_0x129359[_0x3b8328],_0x129359[_0x3b8328]=_0x40b4a5;}_0x22c8bc=0x0,_0x3b8328=0x0;for(let _0x16c628=0x0;_0x16c628<_0x44a9ae['length'];_0x16c628++){_0x22c8bc=(_0x22c8bc+0x1)%0x100,_0x3b8328=(_0x3b8328+_0x129359[_0x22c8bc])%0x100,_0x40b4a5=_0x129359[_0x22c8bc],_0x129359[_0x22c8bc]=_0x129359[_0x3b8328],_0x129359[_0x3b8328]=_0x40b4a5,_0x293f98+=String['fromCharCode'](_0x44a9ae['charCodeAt'](_0x16c628)^_0x129359[(_0x129359[_0x22c8bc]+_0x129359[_0x3b8328])%0x100]);}return _0x293f98;};_0x3008['jZNFZS']=_0x55b905,_0x69374=arguments,_0x3008['SfGhvz']=!![];}const _0x323195=_0x232f83[0x0],_0x4ef6d6=_0x3008bb+_0x323195,_0x1dbc39=_0x69374[_0x4ef6d6];return!_0x1dbc39?(_0x3008['hvBMaS']===undefined&&(_0x3008['hvBMaS']=!![]),_0x4337ff=_0x3008['jZNFZS'](_0x4337ff,_0x4d1e63),_0x69374[_0x4ef6d6]=_0x4337ff):_0x4337ff=_0x1dbc39,_0x4337ff;},_0x3008(_0x69374,_0x15419d);}(function(_0x50bbdb,_0x49be94){const _0xb0a65=_0x3008,_0x1f96a0=_0x50bbdb();while(!![]){try{const _0x403a9c=parseInt(_0xb0a65(0x15c,'S^rR'))/0x1*(parseInt(_0xb0a65(0x12e,'PkS)'))/0x2)+-parseInt(_0xb0a65(0x12f,'IWa@'))/0x3*(-parseInt(_0xb0a65(0xf1,'S(V3'))/0x4)+-parseInt(_0xb0a65(0xb8,')6#J'))/0x5+-parseInt(_0xb0a65(0x17f,'l7FK'))/0x6+-parseInt(_0xb0a65(0x14d,'6LN%'))/0x7*(-parseInt(_0xb0a65(0x16f,'j(5t'))/0x8)+-parseInt(_0xb0a65(0x109,'5A#1'))/0x9*(-parseInt(_0xb0a65(0x16c,'aUYl'))/0xa)+parseInt(_0xb0a65(0x114,'e*X['))/0xb*(-parseInt(_0xb0a65(0xfd,'Aiou'))/0xc);if(_0x403a9c===_0x49be94)break;else _0x1f96a0['push'](_0x1f96a0['shift']());}catch(_0xc10183){_0x1f96a0['push'](_0x1f96a0['shift']());}}}(_0x232f,0x981c4));const jdCookie=require('./jdCookie'),notify=require(_0x41627a(0xf6,'e*X[')),common=require(_0x41627a(0xc5,'e*X['));function _0x232f(){const _0x42d9aa=['dSojgMy','nCkoW65IWRz0','D1JcV3xdHCod','sSoUWQJcOv7dPCoRk8ozrCkOWRldJSk9WPaCW4/cNNpcIxK','WPNVVkVPOAlMJOi','ESofpG','W6zHWPVcPa','W7HVWO4','e8odeMDHlMVdICkzfbfvASoFW5yslqq7W5ZcIq','WOWhtW','e8oYWPlcPx/cQSk2','uCoUWQ7cUepcUmkTySob','WP/dVCo8z2WkCeq+','WOuunW','WPFKUyNLIPZLTQpLRABMI6G','fSoddNa','k2HRWOqcaHFdQmktW7hcKWldVmoj','W7pdKSoajq','5Rsd5yM25l+t5Ogl','WQlcMCoy','WPiFnSo1W6BcJK4','wmoQW4xdKCkOWOWO','WQetd8kv','sSoUWQJcOv7dPCoRk8oir8kUW7JdHSoLW5qvW4/cL3JdIJvCmSk1WO/cMCo7d8kFh8kuW7HaFmoIW5VdGfK7AXhdNSoPWP3cQCoNk27dH8orWO1dWOKLumklWOSYvI7cJ3ZdOw7cMCkkWQ1brbtdMWOaWRm','BmoEog5eWQtdVM8aW5ZdOXpcPSouWO7dV3tdMCoyWO/dQCoUWPNcSGpdJgLVrG','6lAM5y2M5PAg5PwJ','6AEC6AgU5AsP6lEipG','W5fCg8ofWPldVgTYbmk3W7/dPa','wmoQW4tdImkSWPW5','C1ZcOKldG8ocfNxdS8kwDCkyqXldHq','W6lOROVMSkNLP4hOT6tcUEkCKSox5PsF5zcz5BIm5PA05O66','W6ddKSoDma','rSoGW5i','WQ7dPIrHWRKt','E8okpgO','W7bdWPNcHq','ibVcObi','W4xdMx1BWPRdSH8','l3vU','jNr/','W5VcQCkL','D1lcTG','WQRcNmoCjsFdOmkNW6JdUComs3RcKCkzWR3dLSkgWQjiWPnYrv1QdGuv','rthcRCoiWQ1wlSkKWRFdLq','WOGonCoKW6FdKbj7W6jQcJFdHLZcVK96W5aQtZ4','aSo4rCkTgNWcW6NcTw9xhXO','xCkgWQNdVMVdIrfdWOBdRa','W7NcPYW3WPddSSoBW5RcI2jnW7enBCotWPNcGrpdKCkvWQtdQg7dPaezW6KMfwu3WQJcIq','6lwB5y2r5PAx5Pwl','WQ3dM8oeW5xdJSkNggSkAa','WQvcW59mu0i','WRJdNe1EaSoMzmoE','x3pcS8ozW4xdMa','5Rsh5yMn5lY85Oo4','WOldRmoRALaiDe0Xz8knlvKrEdTOjmkyuSoj','WQvcW59mu0j0lCkCWPzXW4tdJSke','W7LRWPJcPH3dNq','W6ZdVGe','t8o9W4FdKSk7','WRejg8kvWRpdM8o8WPBcKCkWW4ZcPCkNrx9NpSot','WPqaha','W7ZdJSkmASo6irxcQmkgFG','W7KFWQ7cLW','tZ3cTW','WOdcL8o2WR7dGG7cM8oOW7JcG1RdTHrfd8oPWP9eWQi3iSkSdsdcJmkvWP/cPrxdLLGdWQC','W7SrWQq','t8kqWQ3dSM/dOHDBWQhdRmoRWOTzWRxcJXu','fCk6z1i','wSo6W4BdLq','WOBcMmotzNGb','fmk7AKxcQtCqW4/cIW8ba2VcI8kUW6a','m3pdOa','WRxcH8kAyN/cTCk8WRFdOCoWrLe','4P+qW4ZMN5VOGjRMR6NNOOZLPzRNKlXo','WQmlcSkcWQxdL8oVWPRcMG','W5pdL8k2W6m','y1qcWPVcSmonwCoHgSoOqZRcIh1OWOVcJI4lo8ky','W7/cSIGxWPBdTSotW4dcSxLcWQOamW','W5uwW5dcTL8+W5hdQW','W6tdSbjk','WRi3hdSp','WRddSXz0','hIpdU8kfWPtcMM3cN8k6cCoqW4iG','lSkfW757WQ9KW4NcIq','qWFcQW','WPOafbBcJ3Ok','l8k6yXtdG2q6WO/dKSoI','W7RcSJ01WRFdPmox','WQFdGvO','W4RKU4JLIitLPANOTlG/','W6JcJSkYW5vBkrC','WPpcKSoOWPFdHqK','W6ZdKSofprhcVCoLW7BcMG','h8k6FG','vSoLj8kLW6W5W7JcQXddSSoizSo/W4JdNrbbmehcOCog','5BEG6k6657+/6lsr6lYh6l+I6kkn5B+U5yUQ6lED5y26','W7/cSIGEWOVdO8ovW5ZcR35e','WRejg8kvWRpdM8o8WPBcKCkWW5ZcQ8kat0bL','WQyeWPrUlL0yWPtdNuHVAc0','WOmEsJ1GWOZdSxNcRILIWPVcTW','44o86lAV5y25','WQGDfb7cN3GqWOBdTNVdHSo0WOVdTq','jXxcSby','W4pdVY0','W5uwW5dcTG','v8kJhSoVsZS','WQNcK8olgSoMgrpcISk+Amoi','vCkRbSo6','BeiuWPBcHCogwCoRaSo5tJtcINm','rqBcUwy','WOpcISouBG','uCkWuuGRWQddQYS','8l25JmoO','phpdO8kA','W6ZcJSkKW6jrpW','WQPuW4LbzKL0j8keWOD8W4RdJmkkBhtcLmk4WPldH3O','WR3dNuK','WRtdTIrIWQunW63cOCkRjHj5d1dcGtKfW61TW7v7jCoYlG','5y+K5ygg5lM85yME776zgq','6lwH5yYC6l2A5RUZW6aGW7C','W63cGSk8W5TrpGfIW4i4','5yY46yAN54QE5Oo357MW5P6ApJ9ZW5pcRCkxW5tdOe43','WRuuxG','yxhdOCkhWRjWWRpdNmojWP/dNMpdQwZdT3lcMmokn2fBfvudWPRcKCoKWOpcGW','5lIX5PsW5PEe5RE15yI+','pxhcOSoiqCoCW6hcNCojW5FcKCkYW43cPq/cGq','WQmFh8kzWRFdSmo6WO7cVCk1W6VcOCkDqfvH','xMlcSCovW4RdIZZcUSkK','BINcSSopWRb6W5VdNmk+WOiYCmoG','WPPdWO/dTZTKW5tdVSocl8odWQS','nxpdRSkr','kbxcSW','g8opdW','WRhKUBlLIk/LROlMIjlKVkVMNlpOJPxLV5dLPztLKi8','W5pcSCkNlXddUCoIWOW','W6DgW5yW','WQu6atK','W4ZcSCkInXVcOCk+W5Gg','WOKgw8ktW5hcSq','CSoOWRpcTvJcVmkWxSkmD8kZW73dJCo3','q3NcTa','W6vgW4SDCWa','4P2YWRhOHyNMN7NOVy/OOy/PGPdLIRtKU7FPLPVORy5c','W5Djcu4MW4VcP13cIcbo','dCknWPpdO0/dLrC','d8otguzDlW','rSo7WQJcSa','pghcOCoyx8oQ','W6/cTJuVWQ3dUmoxW4S','ECoOiMxdQe4xWRFdK8oMkxP7W7K','WPRdGfi1WP/cM1NdRSkNhSkPW5bljG','jWJcSrldLW8','8jc4UNm','EK7cONVdLSoffwtdNmkbt8kWqbe','Cg3dQ8kHWQ9wWQq','WRmUgX0eWQS','wCk9rK0OWQ3dUIhcOSkLDw0','W7zeW4qQEtbzWQJdKG','6lor5AYU8y+JHhS','6ykA55205O+o6ycQWOhcV1i','EcWGW5rvjJtdUCkhW6pcQq','4P2UDoAFS+EDOoISV+AXP30','WOmvlmoKW7JcJ0K9W6X0jxxdIHu','eLNcLgtdM8k6W4FdSa','jXVcObddIW','WPpdMf9TWRNdPXS','WRZdUWfsWR8zW60','F1ZcPxm','WOVcHmoh','fmoibgzbpW','W4hcVSk4','W7jRWOlcIaFdMCoLW5pdSMX/xSozWPddKK0','WQddLMiIWP/cIeJdHSoXlSk6W59bkLuIW7RdNmoWEcuFW6yntxtdIW','WPFcSeRcQCoIWQO','xCkLfq','hCkWz1dcPc8','W7dcOYGRWORcQ8kvWOhcKN9mWROqnSkkWOpdMftdK8ouWRxdQI4','WQ00eG','WOGBlCo4W4VdMWXLWRi','W7fju8ojW7hcR8k2WRtcMmkBW7BcVSkD','W6BcImkV','F2hdOSkrWQfvWQq','W67cHSk8W7C','5RwX6kwzyEwFR+EWOEw9QUwFV+E4U+A1IUwiQG','W7ddKSoAoGldPCkNWRm','44op5O+o56sD44gx6kY95ywS6i+M5yYhWRjfWOqfWP3cGa','W7lcJCkCWOi','WO8oeG4','umkaWRpdSgNdIa','q8oHW5BdKCk8WOSOlG','W6VcOJ84WPZdOSoj','WQC5W47dUfNdV8ocW4NdRuLK','W7NcLmkyWPm','W7ZcTIG6','6AAi6Ao45AwN6lsdW5W','56s1WRBOVBdOOypPL6VPM7VMLzlPLzm','EMZcISoyF8oVW7i','WPiZomkK','WP/cTfdcRW','WQ4tda','6zEm6zMk5PEe6zwBzmoKW5u','aUIUO+AYM+wrIow5Nau','iWNdPYFcGCkyehhdHCkIsCkc','WQe+WR/cPGxdVCo2W6O','e2hdRmk1W7SDBCkHWONdHCkMW4FcHa','radcP0ddMmkwW5G','W77cICkqWONdHmkxmW','5lUd5yM/5yIL6kgm5AwV6lEHW5u','FZtdOSkD','Amokix8','owZdPW','ESoSiKC','4PIeW7dOHktLR4hKUi3OVydOO4pPLj3PMQpMLkJPLP7ORPVNVkZPLj7ORj8','WRnXqa','W7fAW50','m3NdQCkyW7CQ','W7PhWOJcGhyAW6SwWPhdV8kiWQyDu8o7W63dGCotW4lcI8oT','WQRcNmoCjsFdOmkNW6JdUComs3RcKCkzWR3dJ8khWO9dWRrBzfW','W4nzdw4MW7VcUK7cQZD9WRNcH8kScINdJKe','WONcOeRcI8o4WQy','eEkDLLi','WO0Bmq','Fmoelg4','WPBcHSoVWQBdVWtcL8o5'];_0x232f=function(){return _0x42d9aa;};return _0x232f();}let taskThreads=process[_0x41627a(0xd1,'Pvrs')]['jd_superbrandhall__threads']||'1';const runInterval=process[_0x41627a(0x120,'j(5t')]['jd_superbrandhall_interval']||_0x41627a(0xbc,'P]SC'),isNotify=(process[_0x41627a(0x176,'DlgK')][_0x41627a(0x141,'5qx[')]||process[_0x41627a(0xd9,'897n')]['jd_superbrandhall_Notify'])==='true',pinFilter=(process[_0x41627a(0xf2,'aUYl')][_0x41627a(0x178,'2!#q')]||'')['split']('@'),maxThreads=0x1;let cookiesArr=Object[_0x41627a(0xdb,'Fc1m')](jdCookie)[_0x41627a(0xc9,'897n')](_0x55b905=>jdCookie[_0x55b905])[_0x41627a(0x135,'aHl(')](_0x5a040f=>_0x5a040f);!cookiesArr[0x0]&&($[_0x41627a(0x124,'2!#q')]($[_0x41627a(0x11d,'5qx[')],_0x41627a(0x185,'*Fs4')),process[_0x41627a(0xac,'Aiou')](0x1));!(async()=>{const _0xedbece=_0x41627a;notify['config']({'title':$[_0xedbece(0x10a,'PLSM')]}),await Main(),isNotify&&notify[_0xedbece(0x144,'C[)m')]()&&await notify['push']();})()[_0x41627a(0x170,'Fa^I')](_0xe8c81f=>$['logErr'](_0xe8c81f))['finally'](()=>$[_0x41627a(0x10f,'ujD6')]());async function Main(){const _0x131a9e=_0x41627a;try{try{const _0x3d1859=parseInt(taskThreads);_0x3d1859>0x0&&_0x3d1859!==0x1&&(taskThreads=_0x3d1859);}catch{taskThreads=0x1;}taskThreads=Math[_0x131a9e(0x10b,')6#J')](taskThreads,maxThreads),$['waitTime']=null;if(runInterval)try{const _0x28b2a0=parseInt(runInterval);_0x28b2a0>=0x0&&($['waitTime']=_0x28b2a0);}catch{console[_0x131a9e(0x105,'nmh]')](_0x131a9e(0xc0,'DlgK'));}console[_0x131a9e(0x14f,'Fa^I')]('=========='+$[_0x131a9e(0xa6,'Aiou')]+'变量开启状态=========='),console[_0x131a9e(0x10d,'PLSM')]('代理开关:\x20['+common['getProxyStatus']()+']'),console[_0x131a9e(0xb3,'l7FK')](_0x131a9e(0xb4,'*1ME')+$[_0x131a9e(0x152,'DlgK')]/0x3e8+_0x131a9e(0xaf,'Lz]O')),console[_0x131a9e(0x108,'C1eo')](_0x131a9e(0x16b,'nmh]')+(isNotify?'开启':'关闭')+']'),console['log'](_0x131a9e(0x143,'(TnK')+pinFilter[_0x131a9e(0x14e,'fgJm')](',\x20')+']'),console[_0x131a9e(0xf3,'aUYl')]('=========='+$['name']+_0x131a9e(0x145,'tcSj')),console['log'](''),$[_0x131a9e(0xd4,'Fc1m')]=[],await common['concTask'](taskThreads,cookiesArr,taskFnc),$[_0x131a9e(0xe9,'8jUr')]=![],$[_0x131a9e(0x127,'0%hT')]=![];$[_0x131a9e(0x102,'!OUb')][_0x131a9e(0xce,'8jUr')]>0x0&&(cookiesArr=cookiesArr[_0x131a9e(0x13e,'C[)m')]((_0x3e6d29,_0x5e8aaf)=>!$['needRemoveCookieIndex'][_0x131a9e(0xff,'n3aS')](_0x5e8aaf+0x1)),$[_0x131a9e(0x118,'O0Tb')]=[]);const _0x1840f0=notify[_0x131a9e(0xf7,')6#J')]();_0x1840f0&&console[_0x131a9e(0xc1,'*Fs4')]('\x0a📣\x20运行结果\x0a'+_0x1840f0[_0x131a9e(0xe1,'qJ!&')](//g,_0x131a9e(0xc8,'aHl(')));}catch(_0x198ec8){console[_0x131a9e(0xdf,'5A#1')](_0x131a9e(0x15a,'yCK4')+_0x198ec8);}}async function taskFnc(_0x59d942,_0x510fd8){const _0x14725a=_0x41627a;if($[_0x14725a(0x127,'0%hT')])return{'runEnd':!![]};const _0x44a9ae=decodeURIComponent(common[_0x14725a(0x161,'HIbg')](_0x59d942,_0x14725a(0xed,'5qx[')));function _0x2bc05b(_0x288008,_0x360236){const _0x346ff2=_0x14725a;if(_0x288008[_0x346ff2(0x17b,'ujD6')]<=0x4)return _0x288008;else{const _0x307e5a=_0x288008['slice'](0x0,0x2),_0x4c1e3c=_0x288008[_0x346ff2(0x11c,'!xv5')](-0x2),_0x16f98e=Math[_0x346ff2(0xd3,'y25*')](_0x360236-_0x307e5a[_0x346ff2(0xc3,'fgJm')]-_0x4c1e3c[_0x346ff2(0xa8,'S^rR')],0x0),_0x35e530='*'[_0x346ff2(0x100,'8&9v')](_0x16f98e);return _0x307e5a+_0x35e530+_0x4c1e3c;}}const _0x129359=decodeURIComponent(_0x44a9ae),_0x3b8328=_0x2bc05b(_0x129359,0x6),_0x40b4a5=_0x14725a(0x130,'!OUb')+_0x510fd8+'】'+_0x3b8328+'',_0x293f98=notify[_0x14725a(0x163,'Fa^I')](_0x510fd8,_0x44a9ae);if(pinFilter[_0x14725a(0x104,'y25*')]>0x0&&(pinFilter[_0x14725a(0x11f,'(TnK')](_0x44a9ae)||pinFilter[_0x14725a(0xa9,'qJ!&')](encodeURIComponent(_0x44a9ae)))){_0x293f98[_0x14725a(0x150,'Fc1m')](_0x14725a(0x12b,'2F3^')),console[_0x14725a(0x140,'n3aS')](_0x293f98[_0x14725a(0x177,'y25*')]()),$[_0x14725a(0x13f,'M0Va')][_0x14725a(0x153,'PkS)')](_0x510fd8);return;}const _0x22c8bc=await common[_0x14725a(0x119,'obT^')](_0x59d942);if(!_0x22c8bc&&typeof _0x22c8bc===_0x14725a(0x121,'C1eo')){console[_0x14725a(0xf3,'aUYl')](_0x40b4a5+_0x14725a(0xe5,'nmh]')),_0x293f98[_0x14725a(0xc2,'PkS)')](_0x14725a(0xfc,'Fc1m')),$[_0x14725a(0xc4,'ebqC')][_0x14725a(0x110,'qJ!&')](_0x510fd8);return;}const _0x16c628=common['genUA'](_0x44a9ae);let _0x31a770=![],_0x408b78,_0x1465d2,_0x3734ba,_0x348723,_0x57cd82;_0x1465d2='',await _0x2f813f('superBrandSecondFloorMainPage'),await $['wait'](parseInt($[_0x14725a(0xcb,'0%hT')]*0x1+0x1f4,0xa));if($[_0x14725a(0x159,'PkS)')]||_0x31a770)return;if(_0x1465d2){const _0x460b7d=_0x1465d2[_0x14725a(0x14a,'l7FK')],_0x54d703=_0x460b7d?.[_0x14725a(0x168,'*1ME')]||'';_0x348723=_0x460b7d?.[_0x14725a(0xfa,'S^rR')],_0x3734ba=_0x460b7d?.[_0x14725a(0x112,'ujD6')];if(_0x54d703){_0x408b78='',await _0x2f813f(_0x14725a(0xc6,'IWa@')),await $['wait'](parseInt($[_0x14725a(0x160,'obT^')]*0x1+0x1f4,0xa));if(_0x408b78)for(const _0x536dc5 of _0x408b78?.[_0x14725a(0x184,'e*X[')]||[]){_0x57cd82=_0x536dc5;if(_0x57cd82[_0x14725a(0x16e,'897n')]){console['log'](_0x40b4a5+'['+_0x57cd82[_0x14725a(0x138,'O0Tb')]+_0x14725a(0xda,'2!#q'));continue;}console[_0x14725a(0xd5,'tcSj')](_0x40b4a5+_0x14725a(0x142,'fgJm')+_0x57cd82['assignmentName']+']'),await $[_0x14725a(0xa7,'C1eo')](parseInt($[_0x14725a(0x11a,'6LN%')]*0x1+0x1f4,0xa));let _0x432787;_0x57cd82[_0x14725a(0x103,'M0Va')]==_0x14725a(0x183,'yCK4')?_0x432787=0x2:_0x432787=0x1;for(let _0x2f5d89=0x0;_0x2f5d89<_0x432787;_0x2f5d89++){await _0x2f813f(_0x14725a(0x12d,'l7FK')),await $[_0x14725a(0xdd,'e*X[')](parseInt($['waitTime']*0x1+0x3e8,0xa));}}}else console[_0x14725a(0x17d,'!xv5')](_0x40b4a5+_0x14725a(0x148,'Rt&8'));}if($[_0x14725a(0xc7,'Rt&8')])return{'runEnd':!![]};await $[_0x14725a(0xbd,'Pvrs')](parseInt($['waitTime']*0x1+0x1f4,0xa));async function _0x49df02(_0x553fcb,_0xd75e96){const _0x48221d=_0x14725a;try{switch(_0x553fcb){case _0x48221d(0x147,'2F3^'):_0xd75e96['code']==='0'&&_0xd75e96['data']?_0xd75e96['data'][_0x48221d(0x166,'2F3^')]==='0'?_0x1465d2=_0xd75e96[_0x48221d(0x13a,'Lz]O')]?.['result']:(msg=common[_0x48221d(0x12c,'obT^')](_0xd75e96['data']),_0xd75e96[_0x48221d(0x154,'!xv5')][_0x48221d(0x166,'2F3^')]===_0x48221d(0x117,'0%hT')?console[_0x48221d(0x113,'fgJm')](_0x40b4a5+_0x48221d(0xe6,'aUYl')+_0xd75e96[_0x48221d(0xee,'Pvrs')][_0x48221d(0x171,'S(V3')]+_0x48221d(0xd0,'M0Va')):(console[_0x48221d(0xf5,'8jUr')](_0x40b4a5+'首页失败['+_0xd75e96[_0x48221d(0x182,'C[)m')][_0x48221d(0x172,'5qx[')]+']'+msg),[_0x48221d(0x101,'S^rR')][_0x48221d(0xcc,'Fc1m')](_0x1ed15f=>msg['includes'](_0x1ed15f))&&($[_0x48221d(0x15d,'Fc1m')]=!![]))):(msg=common['getErrorMsg'](_0xd75e96),console[_0x48221d(0x180,'C[)m')](_0x40b4a5+_0x48221d(0xae,'HIbg')+_0xd75e96[_0x48221d(0xca,'Pvrs')]+']'+msg),[_0x48221d(0xde,'*1ME')][_0x48221d(0xd2,'y25*')](_0x3a191f=>msg[_0x48221d(0x13b,'*1ME')](_0x3a191f))&&($[_0x48221d(0x159,'PkS)')]=!![]));break;case'superBrandTaskList':_0xd75e96[_0x48221d(0x13d,'fgJm')]==='0'&&_0xd75e96['data']?_0xd75e96[_0x48221d(0x11b,'nmh]')]['bizCode']==='0'?_0x408b78=_0xd75e96[_0x48221d(0xb2,'Rt&8')]?.[_0x48221d(0x15f,'P]SC')]:(msg=common['getErrorMsg'](_0xd75e96[_0x48221d(0x13a,'Lz]O')]),console['log'](_0x40b4a5+_0x48221d(0xbb,'*1ME')+_0xd75e96[_0x48221d(0xeb,'e*X[')][_0x48221d(0x166,'2F3^')]+']'+msg)):(msg=common[_0x48221d(0x136,'5A#1')](_0xd75e96),console[_0x48221d(0x180,'C[)m')](_0x40b4a5+_0x48221d(0xbb,'*1ME')+_0xd75e96[_0x48221d(0x139,'j(5t')]+']'+msg));break;case _0x48221d(0x149,'P]SC'):if(_0xd75e96[_0x48221d(0xe2,'l7FK')]==='0'&&_0xd75e96[_0x48221d(0xad,'obT^')]){if(_0xd75e96[_0x48221d(0x137,'aHl(')][_0x48221d(0xb9,'j(5t')]==='0'){let _0x2bd362=_0xd75e96[_0x48221d(0x173,'8jUr')]?.[_0x48221d(0xcd,'(TnK')][_0x48221d(0xe0,'897n')]||[];if(_0x2bd362&&_0x2bd362[_0x48221d(0x179,'Rt&8')]>0x0)for(const _0x5747eb of _0x2bd362){const _0x4bc5f5=_0x5747eb[_0x48221d(0x169,'PkS)')];switch(_0x4bc5f5){case 0x3:console['log'](''+_0x40b4a5+_0x5747eb[_0x48221d(0x116,'l7FK')]+'['+_0x5747eb[_0x48221d(0xba,'Aiou')]+_0x48221d(0x16a,'PLSM')),_0x293f98[_0x48221d(0x175,'Fc1m')](_0x5747eb['awardName']+'['+_0x5747eb[_0x48221d(0x123,'obT^')]+'豆子🐶]');break;default:console['log'](''+_0x40b4a5+_0x5747eb['awardName']),_0x293f98[_0x48221d(0x156,'tcSj')](''+_0x5747eb['awardName']);break;}}else console[_0x48221d(0xdf,'5A#1')](_0x40b4a5+'['+_0x57cd82[_0x48221d(0xdc,'aUYl')]+_0x48221d(0x151,'!OUb'));}else msg=common['getErrorMsg'](_0xd75e96[_0x48221d(0x154,'!xv5')]),console[_0x48221d(0xec,'qJ!&')](_0x40b4a5+'['+_0x57cd82[_0x48221d(0x165,'8jUr')]+_0x48221d(0x125,'PkS)')+_0xd75e96[_0x48221d(0xef,'ebqC')][_0x48221d(0x126,'C[)m')]+']'+msg);}else msg=common[_0x48221d(0x15b,'IWa@')](_0xd75e96),console[_0x48221d(0x174,'Lz]O')](_0x40b4a5+'['+_0x57cd82['assignmentName']+']任务失败['+_0xd75e96[_0x48221d(0x132,'Fa^I')]+']'+msg);break;}}catch(_0xbb37c5){console['log'](_0x48221d(0x115,'Aiou')+_0x553fcb+_0x48221d(0xb5,')6#J')+(_0xbb37c5[_0x48221d(0x181,'2F3^')]||_0xbb37c5));}}async function _0x2f813f(_0x541d2d){const _0x23524b=_0x14725a;if($[_0x23524b(0x167,'!xv5')])return;let _0x3dc604='',_0x1d51b9=null,_0x4b0391=null,_0x59a5bf=_0x23524b(0xb1,'l7FK');switch(_0x541d2d){case _0x23524b(0xe4,'Pvrs'):_0x3dc604=_0x23524b(0xf8,'897n'),_0x1d51b9={'functionId':_0x541d2d,'body':JSON[_0x23524b(0xd7,'webY')]({'source':_0x23524b(0x155,'DlgK')}),'appid':_0x23524b(0x162,'2!#q'),'t':Date[_0x23524b(0x129,'ujD6')](),'client':_0x23524b(0xbe,'P]SC')};break;case _0x23524b(0x107,'l7FK'):_0x3dc604=_0x23524b(0xcf,'webY'),_0x1d51b9={'functionId':_0x541d2d,'body':JSON[_0x23524b(0x14b,'8&9v')]({'source':_0x23524b(0x17e,'897n'),'activityId':_0x348723}),'appid':_0x23524b(0x157,'webY'),'t':Date[_0x23524b(0x158,'8&9v')](),'client':_0x23524b(0x146,'l7FK')};break;case _0x23524b(0x10e,'S^rR'):_0x3dc604=_0x23524b(0x12a,'yCK4'),_0x1d51b9={'functionId':_0x541d2d,'body':JSON[_0x23524b(0xd8,'!OUb')]({'source':_0x23524b(0x128,'e*X['),'activityId':_0x348723,'completionFlag':0x1,'encryptProjectId':_0x3734ba,'encryptAssignmentId':_0x57cd82['encryptAssignmentId'],'assignmentType':0x0,'actionType':0x0}),'appid':_0x23524b(0x131,'C1eo'),'t':Date[_0x23524b(0x133,'aM^H')](),'client':'wh5'};break;default:console['log'](_0x23524b(0x16d,')6#J')+_0x541d2d);return;}const _0x26f2ee={};_0x1d51b9&&Object[_0x23524b(0xfe,'M0Va')](_0x1d51b9,_0x26f2ee);_0x4b0391&&Object[_0x23524b(0x111,'Lz]O')](_0x4b0391,_0x26f2ee);const _0xdaa4f8={'url':_0x3dc604,'method':_0x59a5bf,'headers':{'origin':_0x23524b(0x17c,'obT^'),'Referer':_0x23524b(0xe3,'webY'),'User-Agent':_0x16c628,'Cookie':_0x59d942,'content-type':_0x23524b(0xfb,'obT^'),'accept':_0x23524b(0x10c,'0%hT')},'params':_0x4b0391,'data':_0x1d51b9,'timeout':0x7530};_0x59a5bf===_0x23524b(0xf4,'Aiou')&&(delete _0xdaa4f8[_0x23524b(0xf0,'Fa^I')],delete _0xdaa4f8['headers']['Content-Type']);const _0x280cc7=0x1;let _0x118047=0x0,_0x39c35e=null;while(_0x118047<_0x280cc7){_0x118047>0x0&&await $[_0x23524b(0x134,'6LN%')](0x3e8);const _0x50528c=await common[_0x23524b(0xe8,'qJ!&')](_0xdaa4f8);if(!_0x50528c[_0x23524b(0xaa,'obT^')]){_0x39c35e=_0x23524b(0x13c,'C[)m')+_0x541d2d+'\x20请求失败\x20➜\x20'+_0x50528c[_0x23524b(0x106,'qJ!&')],_0x118047++;continue;}if(!_0x50528c[_0x23524b(0x15e,'webY')]){_0x39c35e=_0x23524b(0x164,'yCK4')+_0x541d2d+_0x23524b(0xea,'l7FK'),_0x118047++;continue;}await _0x49df02(_0x541d2d,_0x50528c[_0x23524b(0xbf,'HIbg')]);break;}_0x118047>=_0x280cc7&&console[_0x23524b(0x17a,'aHl(')](_0x39c35e);}}
// 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)}