2024-10-29 20:28:54 +08:00
|
|
|
|
function fakerv78pe9(){}var faker36kxe=Object['defineProperty'],fakerob3rmm,fakerrqh6z7,faker6od9rc,fakeravkkai,fakerxpta8g,fakerhnczzh,fakertwofpp,faker8um59j,fakersijz1,fakerdth95g,faker80cae4,faker2dwthl,faker9dr6r,fakerslirs,fakerhmi9io,fakerxh3qf3,fakerolno9v,faker7236k;function fakerg3k5rk(fakerv78pe9){return fakerob3rmm[fakerv78pe9>0xcb?fakerv78pe9-0xb:fakerv78pe9<0x12?fakerv78pe9-0x3d:fakerv78pe9<0x12?fakerv78pe9-0xb:fakerv78pe9-0x13]}fakerob3rmm=faker5zig6.call(this);var faker2gdzkk=[],fakerc8th58=['ax{SGLzc','luJ=IT|L6i.SL_','luJ=IT>f?bGL&','luJ=IT1X>$^ktc','luJ=IT55ePF3&','{&znQ4Y"','P>Qy?xeB','^ODWW@*','e._j~oT#f_W,B9f','vvKe0|~[,H@WGZ8VR$','u0@,Y','5C}lZ',')VF,','J9{RCd`%W6oM=]','J9{RCd`%W6_>%4','TK&Eu{#','$](w','h>MeP','VZmwESK[','J9{RCd`%BzL5Z6jd7C&','J9{RCd`%W6THd6~V,]mw','>)3]9','J9{RCd`%BzHqQz$aR$','J9{RCd`%BzsqQz$aR$','h>^ET','J9{RCd`%BzZ*Qt$FincyO','jv?AO','0C"w','[]@ET',')[Hnz@>p.ON7hzS{nq!p.4(hT|EjdV@UvEMeT','nWrwY','!~V6;S~eVz','N9:z+t{[dVfu,]','(?*u9t4mQVfu,]','!~nLFSdGEVfu,]','%vgXutXypz','KNyJaSOvQ}?f,]','Z;HC@lr[','CZ3,RS#','[]@ET',fakerg3k5rk(0x13),'OX1,Z','L&W|F/#','g;CeQ(K[','VZ_E~b$yx','P;_ET','fZ`w','@]rwa0i^^?','g;"w','n^,+3/j0dVmFP3Um=IH9|Nqy`ZX*l>x{7!];HD(hmA%Gc<Qk?rIL;',';=K/PsM`H','F;),','[j&UI','ZkG!u75sdPi.E(EI4;Oe',fakerg3k5rk(0x14),'<vHCVWcrC`YP5PxFL~&','EmcS`acd`wD(MZ8dvvfbJ/k*(<{!5hmU(>1,:LIi?qjL$','<v_E8)#','7yz/Y','U;(w','MNTCA{#','xy>#bljA','g;"w','$5=6;,Me;Ti*VYi{892p0z:tOluI@?}5O1r6?U+Ac=7`U}tX^$','g;"w','WD0JbNLeqWZCaii{+idH3&$jKQG~Tx','Nv~|A{Z[',';+3/il1n<,|DZymv@+E7m5;n<Wm)fk:yda>#P6%6_>1^(G)g1vx5ZU*6h"JoLo9Qmq#5@bEA','1X3,EAg_>_Ck$','xy>#bljA','}&8ei(g_zqQ0$','1X3,EAg_>_Ck$','L)ly7W|nX@^|G*x','Yvby:d,<y_Ck$','1X3,EAg_>_Ck$','Yvby:dn}n~f2$','kpG@','Q=Ve',fakerg3k5rk(0x17),'Z;~|e0$_{<','`Z4Uc#TA',fakerg3k5rk(0x15),fakerg3k5rk(0x16),fakerg3k5rk(0x13),fakerg3k5rk(0x1d),'I4o1}j#',fakerg3k5rk(0x14),'RX_E7|<[','<vW|jAR`s!)eZsZi,$',')ng"+lJ[','h&BEJC$_L!THs]','u>TC({7k0?L5$','q>Je|{~[',fakerg3k5rk(0x15),fakerg3k5rk(0x16),'VZy,','~B`v.Ek;gQ~nbi^{t3GGM@B,B=4GW2Dm4rhXDSsp@',fakerg3k5rk(0x14),'<vBE>|$yJ`M]Ft}V)V3,',fakerg3k5rk(0x17),fakerg3k5rk(0x18),'<v3,TALkJ`C/ZsPir$','T;twRSL(%','g;"w',fakerg3k5rk(0x17),fakerg3k5rk(0x18),'<v_E8)#','];rQjb#"ey.`,[,+vK2bX|,`67ujW&oagN/CRSw}*+w=1{E?2>^[1lDR`7bKQ]^P}.@vO@q)(wRS]RO2x*(h]_:0>ZDE_YX4!v?m?PCd^[1lDR`7Uk@JzU;.]X~VyZ/CEQbd9yT)+L:dhdUbydPYX"4uvg~d}&>EeQ?$zwz=#','YvRe8=~[','CNkyUf8rb2)/$',fakerg3k5rk(0x1f),fakerg3k5rk(0x1e),'w92]',';;Rx)(x{z<','J90"','J9B"','J9F,','MN1,v{]aM`m','jeh9)[3$e','^%xbhb_y0?','!8<9)[Khh','!8<9)[vCkLpNKZ','Fn3,?{6}Z"8MFtgJ*ObyW=y^ey$fMs6zKwBETh58."&LuJnil5Yl0M~ac`1*3z.jxleON0b8#q;q9tOgnWx]u{h=%','Yvby:dn}n~f2$','$]W|F/#','084v',fakerg3k5rk(0x14),fakerg3k5rk(0x21),'?"P@!QtFU=xy/l<','<vW|jAk[C_et$','EZ$v:',':;5^S`%:eC|bQi{nz{d}Rc:hqC','iY"c>l~16CQ2>P)','iYsT$','<Xmw@m9"#q2saP6g','=|iT![vCt?L~_','Q;TC+:H^%','M>PE"ud($!:','g;"w','Kx4v7z&JIVA@>QD<;Ylv','MNkyeS*(s!OHq{ZiU;`w','>5#fc"1IITJBd4.','"]X|Q0g1<!!/NZ9J','4W8wu&4f','mn>":Lm[',fakerg3k5rk(0x19),fakerg3k5rk(0x23),'"]k|OS88n~f2$','80v[fmRPai6pQ#%','6Kl6Cd90XN;&$`rn','G&X|LhJ[,H@WGZ8VR$','80v[fmRPai6pQ#%','57ZsrNZ8Y4',fakerg3k5rk(0x19),'G1Bp8Kc8','G1BpaD|{YyjQ9','=tJYZsYK[4=B9','TgA^{Y,{sy>xn<vf(~ZsT','.WCss%dSlx','Y9p>&tV[','ZXnCPSK[','h&?AQ(kRM_tKQz9','g;~|_7L8*~j%Zsrd',fakerg3k5rk(0x22),'?;4vE4)woNp=/y%,','sVhEu{w_f<Hk$','>UA}]uLje','68yTw!*l_gu','WEDb1<W^','g;"w','qD*n/zaFN=|kD?~','"]X|Q0X[b?','4W8wu&4f',fakerg3k5rk(0x14),'TF^S;hzR;Bh^H3NlR=F','EZ$v/xnjj"','}M~^f2zf',':DUTT0YAh','c>mw','rv3,EA<[','K]Sh','_v>"OSg_x','`.kK)3Vf',fakerg3k5rk(0x1a),fakerg3k5rk(0x26),'DD]RqQo',fakerg3k5rk(0x27),'iYsT$','1DsT#q9J[g(~_','I+BEjfb8{!5k$',fakerg3k5rk(0x1b),fakerg3k5rk(0x1c),':Dlvt#k1e',fakerg3k5rk(0x24),'c>mw','$]C:NSbk@HSsuJ+','$D7bTc?f','K]Sh','CD8wk0,Ch','}pO|9l~[',fakerg3k5rk(0x1a),'o+Kei(;1x','!8Qv<`o','DD]RqQo','}{ETRchAh',',UBRK[dJSC',fakerg3k5rk(0x20),'1DsT#q9J[g(~_','a]sTBt9J[g(~_',fakerg3k5rk(0x1b),fakerg3k5rk(0x1c),fakerg3k5rk(0x1d),'R;D9[[2f','>UA}y','1D7b$cj@yV','?D7bh341e','R;D9[[@^+d8','P8GZ','SUGb',fakerg3k5rk(0x1e),'Q;TCP','+{8T&qzf','F;_ET','bWy,qc0f?q$uZ
|
|
|
|
|
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"])
|