jdpro/jd_dplhbshop.js

5 lines
149 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-10-10 04:37:35 +00:00
function SFvdgLR(){}var lArJZf5=Object['defineProperty'],T9mtO1N,TKkbcA,X6KNzW,MNjRUe,Ihfa1Mj,cy_2pxa,Gl2VpL,qiToe3,pXvrsS,mnAiWb,Rrjk7PL,Wp8594,PFNyXq,WW2JAfu,XRd1k0l,Yosips,h_4GY0,Qet0f7,QZRCJDg,KNsDNM,Bi7y5L,h3ycVA,yCHQGhN;function yDEJ0W(SFvdgLR){return T9mtO1N[SFvdgLR>0x134?SFvdgLR-0x9:SFvdgLR<-0x49?SFvdgLR-0x59:SFvdgLR<0x134?SFvdgLR>0x134?SFvdgLR-0x55:SFvdgLR+0x48:SFvdgLR+0x4b]}T9mtO1N=d2Y5Kl();function K7FuiG(SFvdgLR,lArJZf5){var X6KNzW=jhtacy(SFvdgLR=>{return T9mtO1N[SFvdgLR<0x1bf?SFvdgLR<0x1bf?SFvdgLR<0x1bf?SFvdgLR-0x43:SFvdgLR-0x38:SFvdgLR+0x28:SFvdgLR+0xd]},0x1);TKkbcA(SFvdgLR,X6KNzW(0x43),{value:lArJZf5,configurable:!0x0});return SFvdgLR}SFvdgLR(TKkbcA=Object.defineProperty,X6KNzW=K7FuiG(jhtacy((...lArJZf5)=>{var TKkbcA=jhtacy(lArJZf5=>{return T9mtO1N[lArJZf5<-0x3a?lArJZf5-0x3e:lArJZf5+0x39]},0x1);SFvdgLR(lArJZf5[yDEJ0W(-0x48)]=TKkbcA(-0x37),lArJZf5[0x6c]=0x2d);return lArJZf5[lArJZf5[lArJZf5[0x6c]+0x3f]+TKkbcA(-0x16)]>lArJZf5[yDEJ0W(-0x47)]+0x7b?lArJZf5[0x17]:lArJZf5[lArJZf5[lArJZf5[yDEJ0W(-0x47)]+0x3f]-0x2c](lArJZf5[0x0]())}),yDEJ0W(-0x46))(gshoOT,Odylwr));var Jpa_N8j=[],GZK552f=[FVrM_46(0x0),'tt;7|l=7(','P/hIHj1^|','&K>|3jU5}',FVrM_46(0x1),FVrM_46(yDEJ0W(-0x46)),FVrM_46(yDEJ0W(-0x21)),FVrM_46(0x4),FVrM_46(0x5),FVrM_46(0x6),FVrM_46(yDEJ0W(-0x23)),FVrM_46(0x8),FVrM_46(yDEJ0W(0x0)),FVrM_46(0xa),'Q`TP)$|U',FVrM_46(0xb),FVrM_46(0xc),FVrM_46(0xd),FVrM_46(0xe),FVrM_46(0xf),FVrM_46(yDEJ0W(0xb)),FVrM_46(0x11),FVrM_46(0x12),FVrM_46(yDEJ0W(0xd)),FVrM_46(yDEJ0W(0x126)),FVrM_46(0x15),FVrM_46(yDEJ0W(0xf)),FVrM_46(0x17),FVrM_46(yDEJ0W(0xe)),FVrM_46(yDEJ0W(0x10)),FVrM_46(yDEJ0W(0x11)),FVrM_46(yDEJ0W(0x12)),FVrM_46(yDEJ0W(-0x45)),']cSkU|mLy$?eU',FVrM_46(0x14),']cSkU||U',FVrM_46(yDEJ0W(0x13)),FVrM_46(0x1e),']cSkU|AL}IT',FVrM_46(0x1f),FVrM_46(yDEJ0W(0x1)),FVrM_46(0x21),FVrM_46(yDEJ0W(0x17)),FVrM_46(yDEJ0W(0x18)),FVrM_46(yDEJ0W(0x19)),FVrM_46(yDEJ0W(-0x1c)),'g$Yjf)H?vPGZ#+a:c2Wl+]$%cFJ_vqJ2h8|P03QuCJry7+mgyk@Ja`IPfFoynna:6l=`bxWU%P&|TMip{,G_f3yIDPb&$]^nNWW37;UpD.N6Lu^n/fitS:%Qfl77i:.f+N?vGbCUfl*5vMipb=U',FVrM_46(0x26),FVrM_46(0x27),'/W|aE5A7vKZ',FVrM_46(0x28),FVrM_46(0x29),FVrM_46(yDEJ0W(-0x14)),FVrM_46(0x2b),'|l@Jr6LM',FVrM_46(0x2c),FVrM_46(yDEJ0W(-0x1f)),'8ldWnbV7;=&(SNPgY/4&CbBx:lJ}Oryge$`lk:_TTF#_Pn|LR.X_i("2,WMm41YAqkY{iTx?7Z:A@NW',FVrM_46(0x2e),FVrM_46(0x5),FVrM_46(yDEJ0W(0x59)),FVrM_46(yDEJ0W(0x1b)),FVrM_46(yDEJ0W(0x1c)),']cSkU|(2)IT',FVrM_46(0x32),FVrM_46(0x33),FVrM_46(yDEJ0W(-0x42)),FVrM_46(0x34),FVrM_46(0x35),FVrM_46(0x36),FVrM_46(0x37),FVrM_46(0x38),FVrM_46(yDEJ0W(-0x3c)),FVrM_46(yDEJ0W(-0x44)),FVrM_46(yDEJ0W(-0x43)),FVrM_46(yDEJ0W(0x1d)),FVrM_46(yDEJ0W(0x1e)),FVrM_46(yDEJ0W(-0x17)),FVrM_46(0x3f),FVrM_46(0x40),FVrM_46(yDEJ0W(0x20)),'/W|aE5HU',FVrM_46(0x42),FVrM_46(0x43),FVrM_46(0x44),FVrM_46(0x45),FVrM_46(0x46),FVrM_46(yDEJ0W(0x119)),FVrM_46(0x48),FVrM_46(yDEJ0W(0x22)),'EX{nw`7.!2pGta|oM55q',FVrM_46(yDEJ0W(0x93)),FVrM_46(yDEJ0W(-0x45)),'R2|PJ1LM',FVrM_46(0x4b),FVrM_46(0x4c),FVrM_46(yDEJ0W(0x2)),FVrM_46(yDEJ0W(-0x41)),FVrM_46(0x4f),FVrM_46(yDEJ0W(0x23)),FVrM_46(yDEJ0W(-0x44)),FVrM_46(yDEJ0W(-0x43)),FVrM_46(0x51),FVrM_46(yDEJ0W(0x24)),FVrM_46(0x53),FVrM_46(0x54),FVrM_46(yDEJ0W(-0xc)),FVrM_46(yDEJ0W(0x115)),FVrM_46(yDEJ0W(-0x42)),FVrM_46(0x57),FVrM_46(0x58),FVrM_46(0x59),FVrM_46(0x5a),FVrM_46(0x39),FVrM_46(0x15),FVrM_46(0x5b),FVrM_46(0x5c),FVrM_46(0x5d),FVrM_46(yDEJ0W(-0x3f)),FVrM_46(yDEJ0W(-0x3d)),FVrM_46(0x60),FVrM_46(0x61),FVrM_46(0x62),FVrM_46(0x63),FVrM_46(0x64),FVrM_46(yDEJ0W(-0x37)),FVrM_46(yDEJ0W(-0x22)),FVrM_46(0x66),FVrM_46(0x45),FVrM_46(yDEJ0W(-0x1a)),FVrM_46(0x68),FVrM_46(0x69),'dx+Q3`|}Hu:%6M!C+ohQ',FVrM_46(0x6a),FVrM_46(0x6b),FVrM_46(yDEJ0W(-0x47)),FVrM_46(0x6d),FVrM_46(yDEJ0W(0x38)),FVrM_46(0x6f),FVrM_46(0x70),FVrM_46(0x71),FVrM_46(0x72),FVrM_46(yDEJ0W(-0x41)),FVrM_46(yDEJ0W(-0x40)),FVrM_46(0x73),FVrM_46(0x74),FVrM_46(yDEJ0W(-0xe)),'s*BE1|cu',FVrM_46(yDEJ0W(0x31)),FVrM_46(yDEJ0W(-0x3e)),FVrM_46(yDEJ0W(0x3c)),FVrM_46(0x4e),FVrM_46(yDEJ0W(-0x40)),FVrM_46(0x15),'g$Yjf)H?vPGZ#+a:c2Wl+]$%cFJ_vqJ2h8|P03QuCJry&s',FVrM_46(yDEJ0W(0x6)),FVrM_46(0x78),FVrM_46(yDEJ0W(0x3e)),FVrM_46(0x7a),'#v|aw05^Oft','Aj?|J<,Ry`F'
2024-06-28 07:47:44 +00:00
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr