2023-10-09 20:36:03 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const l11IiIIi=lIl11li1;(function(il1IiIii,IIIili1,llIiIIil,IiIii1il,lIiI1ill,lI1II1Il,ilIIIl1i){return il1IiIii=il1IiIii>>0x7,lI1II1Il='hs',ilIIIl1i='hs',function(ilI1Il1l,Il1lIll,lil1II,II11lll,ilIIll1i){const IiIiiIll=lIl11li1;II11lll='tfi',lI1II1Il=II11lll+lI1II1Il,ilIIll1i='up',ilIIIl1i+=ilIIll1i,lI1II1Il=lil1II(lI1II1Il),ilIIIl1i=lil1II(ilIIIl1i),lil1II=0x0;const iI1iI1l=ilI1Il1l();while(!![]&&--IiIii1il+Il1lIll){try{II11lll=parseInt(IiIiiIll(0x319,'hCV*'))/0x1*(-parseInt(IiIiiIll(0x561,'(nK$'))/0x2)+-parseInt(IiIiiIll(0x3ec,'CB[8'))/0x3+-parseInt(IiIiiIll(0x302,'hCV*'))/0x4+-parseInt(IiIiiIll(0x49f,'B)Cv'))/0x5+parseInt(IiIiiIll(0x3e4,'suAv'))/0x6*(-parseInt(IiIiiIll(0x421,'CB[8'))/0x7)+-parseInt(IiIiiIll(0x490,'DSqV'))/0x8+parseInt(IiIiiIll(0x58b,'wI%['))/0x9*(parseInt(IiIiiIll(0x519,'6eLC'))/0xa);}catch(IIiillIi){II11lll=lil1II;}finally{ilIIll1i=iI1iI1l[lI1II1Il]();if(il1IiIii<=IiIii1il)lil1II?lIiI1ill?II11lll=ilIIll1i:lIiI1ill=ilIIll1i:lil1II=ilIIll1i;else{if(lil1II==lIiI1ill['replace'](/[tWYrPlULTSDgpyEnJ=]/g,'')){if(II11lll===Il1lIll){iI1iI1l['un'+lI1II1Il](ilIIll1i);break;}iI1iI1l[ilIIIl1i](ilIIll1i);}}}}}(llIiIIil,IIIili1,function(li1Il,lIilil,lIlIII1,iIIllii1,iI1iiiIl,l1lIiIiI,iilIIlI){return lIilil='\x73\x70\x6c\x69\x74',li1Il=arguments[0x0],li1Il=li1Il[lIilil](''),lIlIII1=`\x72\x65\x76\x65\x72\x73\x65`,li1Il=li1Il[lIlIII1]('\x76'),iIIllii1=`\x6a\x6f\x69\x6e`,(0x141830,li1Il[iIIllii1](''));});}(0x6100,0xeedf7,llilIilI,0xc4),llilIilI)&&(version_=llilIilI);const li11i1Il=$[l11IiIIi(0x4e7,'J3pw')]()?require('./jdCookie'):'',IlIIiil=require(l11IiIIi(0x340,'0XIZ')),i11ii11i=require(l11IiIIi(0x2c8,'B)Cv')),Iiiiil1l=require(l11IiIIi(0x5a8,'$WiG')),{loreal_savePrize:iillIi1}=require(l11IiIIi(0x575,'yIQW')),iIlIlIi1=require(l11IiIIi(0x1ac,'6eLC'));let lil1Iil1=[];const lilIIIlI=process[l11IiIIi(0x405,'yIQW')]['jd_lzkj_loreal_draw_url']||'',iIllIili=process[l11IiIIi(0x3c4,')k*L')]['jd_lzkj_loreal_draw_opencard']===l11IiIIi(0x3e8,'(nK$'),llli1=process[l11IiIIi(0x372,'CB[8')]['jd_lzkj_loreal_draw_Notify']===l11IiIIi(0x4f7,'VBqh'),IliIiIii=process[l11IiIIi(0x405,'yIQW')][l11IiIIi(0x2de,'Ae(e')]==='true',i1IiIill=process['env'][l11IiIIi(0x5e0,'4cyF')]||'';function llilIilI(){const iilllii=(function(){return[...[version_,'yPYjrsjiYpaPDpmJgip.LcolTSmtEW.UDvt7ryyn==','mSocoSkWW73cJmo9WQVdMCk3ESkS','W7GGgmo8W73cPe3dQq','W5jOWRO2W6r3W4bxgmkXxwNcJCobW40r','8k2XUrZNQP7MSPm','yCoxWPygWQO','AG/dPSkcqSkaoSofWPa','W5RdJxHDf8kGWRKZba/dG8obgq','i8k/t8kbW7xcHW','W6myWRLH','WRjIvmoxBq','nY3dTmklW5VcQ08','yv8kdv4xWPe','8k6xSCkq','WPmmWRbMW7NcGG3cKCozW6y','oSo0b8kpW7G','pINdS8kz','WPNcGSkTF8o4','cCochmk8W5K','r3NcUq','smomWROZWRy','ECkdWPeQW5S','bb/dR8okCq','BMpdKXxcMmkbW7LOW7C','umopW5VcRSkF','W4VdRCkZW7NdIsxcM8k+WPy','W6NcLCkUW7Tx','uCkHW5SPwq','WP1TDbpcLq','WQPIbdxcQW','C8oMWP0r','bmoDp8kMWQ4','WRHSrs7dUmoFW73dP8opcmol','ALGQnKWcWPO','euRcJmkYF2C','cowSV+EiP8ke','W5L0WRa/WPzxW74D','AaNdQmkWAa','rSonWRG3WQq','amoGp8klW6a','wCkcAa','t3FcQSkn','5AAq5zon5zgB56Ai772B','nmoIWP8kDCojfhJdLa','WPjRW67cQq','v8kmFmoXW4RdPSk3','C8k8A8ohW6O','acxdJCoUBCktW7fnqSoDo3OXDuCB','4PQRg+IUQEwGIEwgRoAHJUw/SoAVGoEIG+EBOEMtJoAmUq','iGtcVWf9WQiW','B3iYo0W','wCoNW6pcMq','cCk+u8kpW67cLMKV','rCkFzSoUW7RdGmkIWQ89','eI7dMmopFmkNW7zDqW','W7ZcSmkmW5r1WPO','W6CGbCkseMHkWPXlWOO','lCkKEmkVW40','WP0OW7m','WQJcSaNcKSo6WP8','CSksWOJdOSkLWP0oW7G','5lQo5AYk5z2m','WPZcGSk5','56Er5yI65lUB6lAO','FrJdOCkTzG','W50VWOL1W7G','W67cG8oZsXO','oqWVWQW','WRrBka','tvdcV3JcQG','DSosvCkmW6uRBbOQqGy+y8oWW5iH','WOzvW5HEWQCtwCodW4ldMa','WPbQEbBdUG','CwiWk1e','W5ZdQ8kPW47dMdBcPSkV','WOrHW7pcVgVdI8kUW6K','zmk/WRNdGSk6','W6qEWR5TW6xdGwVdJbi','ite8W7Lg','ju5eW6ZdRg9ZrmkG','W5GIW4VdR1O','yvq3dhyDWPVdHG','W5WqW5BdJKNcUq','yLu6b00','W5ldVmkcW47dUW','htuNW5rg','5BQP6zog5zoB56ER77+v','WOiOW7NcSa','kGRcPqPHWR46nW','tCoZW6tcKa','umoJW6tcI8kncCkZ','bYZdTCo1tW','WR3cHHRcImoR','xVcUJkS','uSoKW73cNCkpgG','DbZdOSkD','jJNdISkK','fYZdMmo9','WQTlW4vfsfTNW6f6bmkFjW','WO5ZAIldIW','W6mDWQfoW5m','k1VcPmkqrq','Et/dTCkOCq','WPaKW6dcVmodoSoPW6qOW6u','DSo6eG','qmkNWPJdHSk9','W6ifeSkoba
|
2023-09-08 09:56:36 +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
|