jdpro/jd_dplhbshop.js

5 lines
152 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-11-02 23:51:47 +00:00
function jkhItp(){}var FHBcGA=Object['defineProperty'],GsBoFq,XtVteNz,lw4hfL7,fcNqB4,NekXUfU,NjZqVsH,JFgTKP,cSXrLL8,vLwZA4,yfvQFmT,COGTGI,mSFdnLX,Wbq4qK,jgrV6nr,JsIPd9,OdOWl7k,msA2g9,xMY6VOU,K8TuzWm,Gy7qJJ,SgwGDW,ADWjkJ,sD4VmAu,y7Q1Js,y_Klbl,o1IPak_,sftD7h;function B40W8Et(jkhItp){return GsBoFq[jkhItp>0x18c?jkhItp+0x5f:jkhItp<0x18c?jkhItp>-0x13?jkhItp<-0x13?jkhItp-0xb:jkhItp+0x12:jkhItp-0x2f:jkhItp-0x58]}GsBoFq=yOpLAc();function yKFGDD(jkhItp,FHBcGA){var lw4hfL7=rF07zB(jkhItp=>{return GsBoFq[jkhItp>0x1ef?jkhItp-0xc:jkhItp-0x51]},0x1);return XtVteNz(jkhItp,lw4hfL7(0x7b),{value:FHBcGA,configurable:B40W8Et(0x41)})}jkhItp(XtVteNz=Object.defineProperty,lw4hfL7=rF07zB((jkhItp,FHBcGA)=>{return FHBcGA(jkhItp())},0x2)(MTaZdMl,PB8fjZ));var pdimLSa=[],vsqk7bO=[h8FIZk(0x0),h8FIZk(0x1),h8FIZk(0x2),'K|yJ{?+p',h8FIZk(B40W8Et(0x2a)),h8FIZk(B40W8Et(0x1b)),h8FIZk(B40W8Et(0x19)),h8FIZk(0x6),'_kI|=L#~',h8FIZk(B40W8Et(0x22)),h8FIZk(B40W8Et(0x31)),h8FIZk(0x9),h8FIZk(B40W8Et(0x6a)),h8FIZk(0xb),'005|F=#~','TkBz|o5~',h8FIZk(0xc),h8FIZk(0xd),h8FIZk(B40W8Et(0x30)),h8FIZk(0xf),h8FIZk(0x10),h8FIZk(0x11),h8FIZk(B40W8Et(0x42)),h8FIZk(0x13),'"4gf9]fOd<I|0A',h8FIZk(0x14),h8FIZk(0x15),h8FIZk(B40W8Et(0x44)),h8FIZk(0x17),B40W8Et(-0x12),h8FIZk(B40W8Et(-0x10)),h8FIZk(B40W8Et(0x45)),h8FIZk(0x1a),h8FIZk(0x1b),h8FIZk(B40W8Et(0x52)),h8FIZk(0x1d),h8FIZk(B40W8Et(0x0)),h8FIZk(B40W8Et(0x20)),h8FIZk(B40W8Et(0x50)),B40W8Et(-0x12),h8FIZk(B40W8Et(0x51)),h8FIZk(B40W8Et(0x38)),h8FIZk(0x23),h8FIZk(0x24),h8FIZk(0x25),h8FIZk(B40W8Et(0x53)),h8FIZk(0x27),'c0P/JmTJ`&2>!PF@US[=|@$K%',h8FIZk(0x28),h8FIZk(B40W8Et(0x54)),h8FIZk(B40W8Et(0x26)),h8FIZk(B40W8Et(0x55)),h8FIZk(B40W8Et(0x27)),h8FIZk(0x2d),h8FIZk(0x2e),h8FIZk(0x2f),h8FIZk(0x30),h8FIZk(B40W8Et(0x25)),h8FIZk(0x32),h8FIZk(0x33),h8FIZk(B40W8Et(0x56)),h8FIZk(B40W8Et(0x59)),h8FIZk(B40W8Et(0x57)),h8FIZk(B40W8Et(0x39)),h8FIZk(B40W8Et(0x28)),h8FIZk(0x39),h8FIZk(0x3a),h8FIZk(0x3b),h8FIZk(0x3c),h8FIZk(B40W8Et(0x58)),h8FIZk(0x3e),';8wzNIU4t&fZj%HD?5|f0I,Tb8im9F_DY]o8*b`qqh<`HN>+n.s`vZpWxz~}|^?$c*?dvqTM4:b$"%z',h8FIZk(B40W8Et(0x24)),h8FIZk(0x40),h8FIZk(0x8),h8FIZk(0x41),h8FIZk(B40W8Et(0x129)),h8FIZk(0x43),h8FIZk(B40W8Et(0x4b)),h8FIZk(B40W8Et(0x17d)),h8FIZk(0x46),h8FIZk(0x18),'9{*F||Sq8B+8o4SLRKo(@I!vp[:r0M)_I+5PEfhE/WqV~td.Ur6)3l$DM114{+7m+_[.0qu',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oVML_eS:_!2MDKU}|$26u',h8FIZk(B40W8Et(-0xc)),h8FIZk(B40W8Et(0x6c)),'DSr|~Bpm*','DSs|{x,gl',h8FIZk(0x6f),h8FIZk(B40W8Et(0x70)),h8FIZk(B40W8Et(0x1e)),h8FIZk(0x72),h8FIZk(B40W8Et(0x75)),h8FIZk(0x74),h8FIZk(B40W8Et(0x139)),h8FIZk(0x72),h8FIZk(B40W8Et(-0xb)),h8FIZk(0x58),'*!jz|rb~',h8FIZk(B40W8Et(-0xe)),'*!jz|rb~',h8FIZk(B40W8Et(-0x10)),h8FIZk(0x77),'29K=ro^RDgx_Ons[n[#=bxuXU#O_~I"W!hwzIMCx8j0kCLE){WL}<2z@+j|yjo*D%/bv',h8FIZk(0x62),h8FIZk(B40W8Et(0x76)),h8FIZk(B40W8Et(0x7c)),h8FIZk(B40W8Et(0xa7)),'9SR|:=6',h8FIZk(B40W8Et(0x3a)),h8FIZk(B40W8Et(0x77)),h8FIZk(B40W8Et(0x4)),h8FIZk(B40W8Et(0x78)),h8FIZk(B40W8Et(-0xd)),h8FIZk(B40W8Et(0x1a)),h8FIZk(0x80),h8FIZk(0x81),h8FIZk(0x82),h8FIZk(B40W8Et(0x69)),
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