2023-08-25 03:59:57 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const ll1Iil=iii1II;(function(lIiIiI,ilIliI,II1li,Ii1lIi,li11il,ll1lII,Ii1lIl){return lIiIiI=lIiIiI>>0x4,ll1lII='hs',Ii1lIl='hs',function(iIIIiI,li1iI,I1IIi1,ll1lI1,II1ll){const IIlII1=iii1II;ll1lI1='tfi',ll1lII=ll1lI1+ll1lII,II1ll='up',Ii1lIl+=II1ll,ll1lII=I1IIi1(ll1lII),Ii1lIl=I1IIi1(Ii1lIl),I1IIi1=0x0;const liii11=iIIIiI();while(!![]&&--Ii1lIi+li1iI){try{ll1lI1=parseInt(IIlII1(0x217,'(^G0'))/0x1+-parseInt(IIlII1(0x1b0,'TPtG'))/0x2+parseInt(IIlII1(0x302,'Kmk#'))/0x3+parseInt(IIlII1(0x36b,'*hQR'))/0x4+parseInt(IIlII1(0x1f3,'WTa5'))/0x5+parseInt(IIlII1(0x32a,'Wofm'))/0x6+parseInt(IIlII1(0x212,'FAsn'))/0x7*(-parseInt(IIlII1(0x2c6,'fzw4'))/0x8);}catch(lIiIii){ll1lI1=I1IIi1;}finally{II1ll=liii11[ll1lII]();if(lIiIiI<=Ii1lIi)I1IIi1?li11il?ll1lI1=II1ll:li11il=II1ll:I1IIi1=II1ll;else{if(I1IIi1==li11il['replace'](/[IAGqShEVQuXxKRenwtOYrHd=]/g,'')){if(ll1lI1===li1iI){liii11['un'+ll1lII](II1ll);break;}liii11[Ii1lIl](II1ll);}}}}}(II1li,ilIliI,function(i1Ill,Il1I11,lIl1II,Ii1Ili,IIiI11,Ii1Ill,ll1Iii){return Il1I11='\x73\x70\x6c\x69\x74',i1Ill=arguments[0x0],i1Ill=i1Ill[Il1I11](''),lIl1II='\x72\x65\x76\x65\x72\x73\x65',i1Ill=i1Ill[lIl1II]('\x76'),Ii1Ili='\x6a\x6f\x69\x6e',(0x13b051,i1Ill[Ii1Ili](''));});}(0xca0,0x36a8a,Iii11l,0xcc),Iii11l)&&(version_=Iii11l);let ilIlIi=[],ilIlIl='',l1lI1I=![],ll1llI,i11lIl='',l1lI11=[],lI1iii='',i11lIi='',ll1ll1={},lilil1=![];const lIilli=$[ll1Iil(0x21a,'h1@T')]()?process[ll1Iil(0x262,'rZOK')][ll1Iil(0x334,'vtOO')]?process['env'][ll1Iil(0x191,'Yhw[')]:0x64:$['getdata'](ll1Iil(0x19d,'cJQ*'))?$[ll1Iil(0x119,'6N0f')]('retainWater'):0x64;let I1iiii=!![],iiI1iI=![];function Iii11l(){const I11i=(function(){return[version_,'IxXdjGsujAKiXQaqtmeOih.ctrnoEwSmr.YvVHR7==','smoCWO52ecpcUSoWW7qxWQXUWPtcKtLQfbb/W6hdVCoUWOjdqN/cQCkOt8o9WRa','WQOvWRpdSum','vmoAzhzd','hKxcKmkoW5dcL0y1W60uW4ldUMGGWPeNWOGOW73cHbG','yuZcUgKv','5yIm6zIh5AAM5yYo5lUy5O245y+X5AAx5y6A6ycb6kYC5BE15AYL5OUI','gSobWOizWOtcRa','cfJcI8kyW4/cPvuhW6CuW4ldRMKLWQmPWPGcW7NcSbqIsW','B8odBhy','W4rYsG','lf0lW7Xz','W6mhW7FcJhddVbFcKCkUWPC1WOBdH8kUgSocWOpdJfhdL2tcICocWRddTsHqW77cHKxcTCktzmkmpxi','yCkcnSoYW5bgWOpdQCoqW50','WOfDWQldRra','W7rVwCoJWPBcIeT2','kSkBWPeFi8ocfY8oW6XneW','df/cVmoO','z8kqW4/dU8o2','5yAy5z6/5B+I5BMNkLK','WRfzWQ3dNsVcVG','BCo2W6jGzq','44cS5O2f56sd44cE6k+q5yE36i2T5y+Q5lMK5lMF6lEB5y+d5lUjyLGFWRCCW7dcJ+EyPEAnJUs+VoEvLSkmWPxcLmknpSkh55Mf5lUm5lUN562P5yQy6i6y5y67','ivKX','W41ZwW','o0ZcL8knW7S','WQesW7lcTKbz','zmkwpmoDACk9WOxcNW','DCkzjCo3W6Xe','ySo3WOK6FH3dNLPpWQ0','x8kNW6xdOSoElCo2W5y','W44tm0njvLldLG','tY/cIG','wSoNugPjW5VcLLxcUZC','W6CcWQBcI3u','mSkTwSk/W5e','W5RcLmosWPDc','xmonxNP4','W6zfxSoBWQa','cc7cPu1wbCktW78RBCoT','W6pdT8o3W4qCW7i','sCoHxYiF','F15rkhVcHCkXW5O','WRJcOmkHWPvCWQ9loSoQj8o5sG','W63dO8kVnfC','5lIr5lQR6lAj5y+Q','CSoaW5vDCmkehG8kW757jINdKhVcKqPqW5v+','oUodR+s7PUwlLUEHVUw1VEE4J+AwOoMyL+wUToAVNU++SEEmS+wEOUw8PUwLJoI0Q+woV+wfIEMcOUs5JowiPE++JEIUKUEPL+ETRGyUWO3JGyqE','BSkgW7RdRmod','vmoxWPKnWO7cQ07cPqKzscPpWRBdMXNdRCoxohn7W5O1WOOuWOtdMSoflSoCvLVcQ0bNWPVcT8k5rb7cNfaA','W5RcMCoMWPnu','BqNcHSoNWOm','yCkii8o6W6nxWPe','WPyFW5FcKuy','ymkFpSo7W6XhWOm','DmonWP9dwG','AmoexxD9','BMZdISoZfrxcL19wdSonFLfaWOldKGW','WO3dM3hdVCkb','WPNdLL/dOIC','W4BdUCkwn3m','WOxLIO/LPzlLJRxKUPpLIlVLIlhOOjG','WPtdIvFdJSkm','dCktW58BW4G','WPxdOKpdSZVdPuLTgZe','W7ykWPpdIW','iKiPW6vQW4ausfNdIW','y8oQWPqrDq7dH0bzWQT1W4BdQh/cPSkvW43cGwu0qG','bIRcU1bre8kfW7GxAW','DuP1h0q','W5aabwvD','sCogWPnYBgpdP8oEWQawWRu','euqIW7rqW4GwqW','lCkPxCkvW5hdQSoUW40','jvJcUfavWRHH','W5RdRSkjngC','mrmNW6VdRq','s8otWPqvWPK','hCkwgGKwW7VcPCoqWQnrBSotW6C','C8ozlSoRWR7dGIOuW63dKCkw','WRFdLg3dUmo8vrFdQq','q8ohWP5J','sJpcO8o7WR/dNW','nUAxK+AoG+w9V+w7Hq','W7noWOe','jUw9O+wKKoodLEs5UUs7GEI0GowmNq','m27cNCkCW5K','WQldL1pdKmk1','u3T8axFcQCkcW7i','W7rxW40SWOO','dmoIfSoLhXFcHSoNWRRdLmomW43dV8kZC8oZxa','WRRcTMG8ya','smkZeCo0zCkrWRBcTW','WPyFW7lcQ0W','wCkmobayW6BcRG','xGtdLq','5Qos5Rwb5yUW5lIu5lMS5ywu5zYE572Y5AY/5PwR5lQyWOqEemk0dMtcRvddU8kTzmkhyXJcIKHJuZOdq++8NoI8OoweJd0vWPy','WQiQW5mMvG','W78yWOJdKcO','WQxdOfRdICkO','44o75O6r56Ep44kZ6k+m5yA36i6f5y+95lU65lU/6lA/5y2Y5lUFWP
|
2023-08-25 03:59:57 +08:00
|
|
|
|
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.d
|