2023-08-14 18:06:24 +08:00
|
|
|
|
var version_='jsjiami.com.v7';function _0x2313(){const _0x3db0a7=(function(){return[version_,'JejGMNspkRjieOaDmyWiKB.ScOHonRLmS.GvQw7B==','y1ZcStCV','BNXlWP9N','z8kPWPpcLY5U','wCkoWPBdLSo1','sGZdPLWuWPtdRCk0WPhdQmkeBCoVfWS','WQH4WO5xW5q','W7q9W7bpB8oB','AMbYWQHs','dSkTW6mhW5BdHG','W5Xwv8o2W6RcM8kGgSoiW4tcUNNcHtDllSk2W6VdMComWOK','kSkiW5a5W6O','hmoNWQFdQmkSiSkiW70OW7PFWQC','W5f4C8oqomou','WRLGW7uVWQFcKa','W7DxrWrf','hGpdGLeWWQm','WQP/WQrfW5W','vLldO8kzDG','b8o3EexcNgW','dcaJgmov','jCoEWPG4W7hdVtS','WOPxWPnyW6/dGa','W67ORBhPHQZMLB/NM7RLVzJOJRZLJPjwb8k3W4GdWOu','WQdPH5xLU5lcQmkH','w8ktWO7cRJC','FhzJWP9LW7WgW5HsWOtdUW','W5nhF8kwk8kvamorWQrf','a8oQW7FcTSkXrCokpZy1vfJcRq','y+wpIEIaIUI+I+AoM+s5IEs4RoAoSEwpO++9KUISGoAJG+AFUEE+LEE5Ka','6lwV5lUlWOyZW6NcQtBcMSo2W4aHW7aA','nmkiWRlcStRdKa','W4pcUcVdOb0','bSkxcmofFG','z8owvCkCbG','W7uoW7pdV8oG','rCkRWPFcRIu','FNldG8ktEaq','ymk4W40lybK','WO/dH8kknmoNWO/dSCkGw8kr','eCkFWQ/cKG','y8k4WPxcSYTGWRmFWP/cL8ozmZDmW7u','Bmo3t8kofa','g8kHdmoutG','zmkuWR0Lpa','iJtdJu0T','cSk4W6Sh','W6ddLaBcSmoV','W5KNW6b6wa','uGVdGgaiWR7dGSokWQxdMdpdPCobnNfkW5mapUITH+AYK+wMM+I2IU+/V+ISKUAHVoAFTEE9LUI0LoMhRoISLG','l3VdLdddU0TmESkHjh3dTqitWQuPBoIUUUAYGUwLLUI1No+9Q+ITL+AJGEADUoE/LEI1LoMhPUIURG','ECkhW44ruW','WRhdQdVdJmoE','nv3cVqubF8kOe8kqcxRdQSkWW4ewiwlORjxMS6ZLP6hOTyVVVyRORydMORJMN6RNV4xOTQNPHkBORRu','W7f/FtTd','uu7cScab','WO/dQqZcNmor','ac/dTNuv','FmkJWONcTc4','WQRdM8kakSoRWO/dR8kG','WPFdG8ktdmo2','lCkjWRNcMYVdIq','W4pdSWxcQmoKkCklx03dP3KgWOSjFNnQWRlcH3mKW6f6WQ/cGwSGW4aHWPLoWOizv8ktWOGWaCowWOhdIclcQI/dNsldUComWRtdQYhdRSoIud8Wb8oAW6NdHmoKW5aybSorW7j0WP04dCoHW5Hwf3NdVKtdVrv4WPjdWP0uWQZcGCkiW5hcSCoSW4NdGJGyWRVdJb/cU8oSW4pcHmoWlsjfWQBdTCkrjSkizNVdHCklC8oLaSkYWPVdLWJcJmk4WOn9W7/cImo3ySk2WO4/n2aorJfvWONcUKNcN3pcJvrhka','W4K3W69bzq','pmk8W5a','zNddIa','W7SBW4TOrG','tCkHWQBcKrW','dmo4WQGSW6a','5lI05z2F5A+s5OUi5lUy776n','W5JdSHlcU8oYymox','dLH7aCo8','sCktWRpcMCo1','WOhdRJtdOCoC','xSkcWOdcGsq','WPjcWOpcG8kN','dSocxCkVbmktiSkjidldT3ldImodeMldQuVcQEITSEAWLUwNHoI0Ko++OEITTEAHL+ACKEE/PEI2SoMhSoIURa','WORdPWZcQG','WPXPW4WbWPC','W4ndsSoY','ACk8WPBcHtrNWRepWQhcNCoWfJa','AcK/WPuO','dCo4WQhcQSkdBCkrW7XpW70','W7BcLrW','WQH2WQFcOa','W5Hnra','quJdQbtdOW','vSk/WOlcSSoNr0OKtaddQmkqmhe5z00','ACkJWO0','WRL2WQhdN8oYsG','W4xdPHZcVq','qwNcVrCS','A8kFWQNcHSoUz3OJFsVdHSkeee8e','D8kTWOqej8oi','WPv+WQBdMSox','WQX2WRRdQmoKEwLakW','WPpdIGJcNmoj','W7ynW7FdTmoS','WRHvW5KlWOHwvCkjW45EFCkaWQtcImkf','Cmk6WO/cVJjK','WO/dMSkmiSoaWRRdU8k1D8kJWR4','bSkuW7pcKeH3WODmrSomg8oisSkJWQ7cRtalEK4BFa','WOmNoCke','W6RcRqJdHZ4','WPhdGCkgm8oRWO/dR8kG','WQ3dGrpdR8ol','gfH6bSoBqSojW5lcGfldIMW','xmkDWRxcNXX5','W5naWOhcH1HWW7NdGmk5','q8kAW40wFa','q8k4WRK3lq','WQGjo34qW4hdJCo5pmoFrq','gJfWWRy','c8kmWQBcNcC','WRxdIbNdJSoR','rmk4WO8laW','pqmuamoL','bYWRpSonCa','dmk4W5RdPhO','W6PWsSkwdW','wW4QWRK','eCk8W7qwW48','fSoUWOmtW4G','W4FdOH/cV8oJEW','hJVcJmkMW63cJSolEc4dxI8eaSoR','mmksemocwsy','fCkeWP/cLZa','W5nXEmkFpq','WQH2W451w8o3wmkC','ht9QWRy','W61FWP/cSSkxW4lcHq','WO1RWOddUCoB','5Awy6lwX5Q+F5PA95AA977+T6yon5yw85QY75B+p546E772V6lAE5yAl776E','rCk4WORdP8oI','e8kBWQZcKb/dUq','W77cMW/dKq','fCkVemkRhq','W63dKIPZkCkLW47dG8oGA3G5sJKEW67dICkinG','WPeQpmkgEW','xGGUWO0v','ww5fWRXP','lSouWOS','htKXkSorjYHDW5ZdQHtcVCoEkJXCWR0moxZdQ8otwbJcLdBcOSk3nSoyj27cOYjErdRcJdFdGCk5WQ83W6j/lW','g8kuj8ktca','ySouuSowsSk9W4tdRmozWRZdJG','sCo1EKq','rvVdOYNdVa','mCkOWOJcOWO','uWOOWR0Y','wbVdOfWmWPRdSmkRWQi','5O+f546j542I6yAE77205As36lEFta','WQ8Ycmkgxa','W6bWEanQ','nSkkW64EW5y','vaONWQS','CvJcPI4','DsSbWPirW5vBCrlcULu','jGdcUmk7W6i','oSkVWQ/dKa','hIv6WQeJWRZcOG','hCkhWRJcGG0','yCk/W7CuD0yGtSous8o7CwZdTGnAW7JcNuRcKSobsIzkW7NdUxJdMN/cHZ3dG8o4W4VdSCkiiCk6W7lcM2JcNCoA','ySkPWP4','ECkeWO5PWQC','W5HjAmk5','F8oCAmk6bq','wMpdV8k4Dq','W5FcGG/dQdG','uWa5','fCkrWRVcSZ/dNG','ESkYW6OqDa','WPpdQrpcPmolyNinwW7cT8oVa8ktW68','bCogW7RdQ3WoDcSDuu5Z','dSkSW6eqW4BdHSkF','W7jLw8o+W5a','k8kjWQFcMG3dTa','xL1Momo2tSoYW6VcNatdRLdcOoIVLoAZKUwKR+I3MU+8QoISJUAGGUADToE+R+I3NoMeToIVMa','WQRdPsJdU8oG','WOvHWPFcOCkt','lCkIW4RdLh4','D8k6WQ/cMsW','dcOJp8oy','W4bgtmodW5G','vCkFWPK2iW','wMtdPmk2Eq','W5xdOGDsmq','WQv0WQhcL8kp','WORdPSkpimoq','WPx
|
|
|
|
|
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
|