jdpro/jd_jzfl_draw.js

7 lines
109 KiB
JavaScript
Raw Permalink Normal View History

2024-10-02 12:37:22 +00:00
/*
12 6 * * * jd_jzfl_draw.js
*/
const $ = new Env('家装福利抽奖');
2024-11-16 12:13:00 +00:00
function YVxC8I1(){}var RJDi3e3=Object['defineProperty'],PbY5gP,pIQy6S,p4rtsc,_k2HwS,dgUUnPg,ONHlkM,FrY_CQV,PRm9fn,kZd8Wl,S9Gbq2T,Sn3fyLu,FBSsrC,CNeIur,PLzByO8,tS25gE,Lbrj6l,I9O9B3w;function D9iaCeP(YVxC8I1){return PbY5gP[YVxC8I1>0x163?YVxC8I1+0x39:YVxC8I1>0x41?YVxC8I1<0x41?YVxC8I1+0x31:YVxC8I1-0x42:YVxC8I1-0xd]}PbY5gP=B4PkeQD();function S_TB8rb(YVxC8I1,RJDi3e3){var p4rtsc=Co2Lwq(YVxC8I1=>{return PbY5gP[YVxC8I1<0x2e?YVxC8I1+0x17:YVxC8I1<0x150?YVxC8I1-0x2f:YVxC8I1-0x16]},0x1);pIQy6S(YVxC8I1,p4rtsc(0x5b),{value:RJDi3e3,configurable:!0x0});return YVxC8I1}YVxC8I1(pIQy6S=Object.defineProperty,p4rtsc=S_TB8rb(Co2Lwq((...RJDi3e3)=>{YVxC8I1(RJDi3e3.length=0x2,RJDi3e3.pNxq0z=RJDi3e3[0x0]);return RJDi3e3[D9iaCeP(0x63)](RJDi3e3.pNxq0z())}),D9iaCeP(0x42))(z2mXIUV,S7QyOr));var krVbrM=[],VEh1NDa=[ex2ToA(0x0),ex2ToA(0x1),ex2ToA(D9iaCeP(0x42)),ex2ToA(D9iaCeP(0x6c)),ex2ToA(D9iaCeP(0x72)),ex2ToA(0x5),ex2ToA(D9iaCeP(0x68)),ex2ToA(D9iaCeP(0x78)),ex2ToA(D9iaCeP(0x74)),ex2ToA(0x9),ex2ToA(D9iaCeP(0x8c)),ex2ToA(0xb),ex2ToA(D9iaCeP(0x69)),ex2ToA(0xd),ex2ToA(D9ia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eP(0x9a)),ex2ToA(D9iaCeP(0xb7)),ex2ToA(0x72),ex2ToA(0x73),ex2ToA(D9iaCeP(0xfe)),ex2ToA(0x75),'k!5H<p6b|IlDui%He=s[,">Mat8`0BZN:0~@E)PW8t((0BX?7UBVZr&~qUBOqQckSE;xBS8SsU%MTK[J)uh[<@#LZ(C1DRfHA=m4!fo8jc|CHjh?Q1+*f.gM8eGqYR{#p0h[<@B@w9zv!L{#u0J*^_Q+fFzvtfi#j)z*f.)JPcz>]oX?k`cQ|rA',ex2ToA(D9iaCeP(0x49)),'%nO7|f;q',ex2ToA(D9iaCeP(0xff)),ex2ToA(0x77),ex2ToA(0x78),ex2ToA(D9iaCeP(0x56)),ex2ToA(0x7a),ex2ToA(D9iaCeP(0x76)),ex2ToA(D9iaCeP(0x49)),'MBE|dPFRucCrq','%nO7|f;q',ex2ToA(D9iaCeP(0x102)),ex2ToA(D9iaCeP(0xaa)),ex2ToA(D9iaCeP(0xac)),ex2ToA(0x7f),ex2ToA(D9iaCeP(0x66)),ex2ToA(0x2c),'|EIp',ex2ToA(D9iaCeP(0x58)),ex2ToA(0x82),ex2ToA(0x83),ex2ToA(0x84),ex2ToA(0x62),ex2ToA(0x85),ex2ToA(D9iaCeP(0x4a)),ex2ToA(0x86),ex2ToA(D9iaCeP(0x52)),ex2ToA(D9iaCeP(0x104)),ex2ToA(D9iaCeP(0x4b)),ex2ToA(D9iaCeP(0x4f)),ex2
2024-10-02 12:37:22 +00: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