2024-01-10 06:17:47 +00:00
|
|
|
var _0xodd='jsjiami.com.v7';function _0x3f4a(){const _0x48da2a=(function(){return[...[_0xodd,'CtjuAsDjRJEiSKaffBmPi.AfcxyowmPK.KnTvIh7==','vSokWOygySkPjrFdKCkddG','W7fNWPq','W7nGWPasWOddU8o+zG','WOWDWONcTxC','c8oWW7a','fG7cImod','WRCHW7DnWPC','5REb5yIa57Ux5P6j776k772M77+6','vSowWOyaCSkiaXVdMSku','eaRcNComcW','W69Kt29Y','eSoKW6xcKmos','gCoLW57cRCo+','uqLpbCkWWONcR8kmquG1pCk4','W7nUWRanWRVdVmo2BG','W6KQW5pcPmk0','WQtcT8os','l8oDW6ZcQSop','WOuzWPhcMfS','CxRdOYxdVq','xhpcKxiEWQukWQK','W4VcHXXmWPS','WP4CWOXcW6W','sxtcJadcMW','W6ZdJSk5WRrf','zM7cMG','WPz+W7ldPmkmW5JcOmkZWPW','C2RcNbVcKmovFYq','WOKCWOhcQfGv','W4nNgCkBW6JcPr/cRaPe','W4yxW5q','W5ORW4lcV8kj','W7WBWQfmdq','rmkiWO5zW6JcOwddLmo0W4OfFmkP','FWWlWR4q','Emk1WRRcTd0','EfZdIvRdUCoBWRtcSCkjxSoFlSkI','W4e5WPD7kq','W43cO8oQW5O+','WRRcL07dOW','j8oqW5m','sNBcNG','x8kfWPpcKcK','cwBcM3m5WQWHW70tBvjEWPrr','bCoMW4NdLaG','WPLzwCoTk2jCWRJdGG','W6HaWRddUYK0l8kkdG','tM7dIWJdPb/dH8kEW5mre3e','W7nSWPzEywhdQLfN','fmocW4pcJmoOs8oJA8k1vSoDW442W7i','t8obWO4cDa','d1CLzCoR','5y+L6ioc5B+e5y206BUR5lU9WR/OTzVLHkK','pr/cN8ooha','WOLwxCokoG','jgpcOmkMkNm','AM0RWO7cVq','W5arW6JcHmk1','s3aSWPlcJW','pN/dO3pdVSoyW5G+','W5nzWQ0PWQa','W7m4W4pcMmkVWOa','bhJdHeVdVq','W5vJWPfJFW','kCk1ewpdGq','FG0CWOqw','WPiDWO7cGMm','W6aRW53dUSkV','W4WBWQLEoG','W47dI8kmWP16','eYddIJhcLq','WRldMSkw','r3RcJqdcQmoDzJGUWPdcSCoC','pYVcKmokmG','s2K3WPlcTq','qCosWOGhCW','W680W7xcJaS','WOKwWOpcNwK','W6mJW7hdUmkzdSoiWP0','rXtdGs7dMW','jwNdQG','W5TPdq','s07cGMRdJgj5dd/dMW','W5pcHdnVWRG','BNFdMb7dJa','WP/cLSonCsC','f8ocW6hdRIS','W5aLWPtdP3q','W74YW6tcObW','5Okr6k+z6iYe5B2Y','WPewW5BcKrpcVehdOLvsW6bgBq86W5lcUaJdGcXapqakktxdSCoVraldJCorm1VcGd1MWPHymgDrW4/cUbJcGfnKWPGmfNtdHhqcWPRcJK0yqSkhzCohs8klWP13mSoPo8oMWQqRW6f7wMu1otJdMfFdGmkKDhNdLSoBr8oWgmosWOv/W4v3pKpcT8o2k2ZdUSo4lLzBWQRdKCotW6VdHfb/W5RcISkIWPzKWOWWm8kSWQFcRSoYvWCpW4mDkmk0W7tdKmoOW6q8kcvVWRZdPNqqWRddNHaTmgdcU8k6E2FdVdlcICoWWRzJWQ95bCoFW6hcHeRcIJtcLwtcUGTdWRpdTmo6dCoVFX9avSo0WOb6WR4Co8opWOGtW5DMsZhdVSkkW7JdHSk8W7OZWPZcPCkwWPTpt2nzWOhcUG','5Q+4m8oz5Bsp6kgN6zQK5yU977+s6k2i6l6lWPNdKowkKoMsJowsQEwfJ+AjT+IGIoIhSEACQa','W4uIWRVdHvi','kXddOZhcGG','W6VdJW/dSWy','W4NcSb3dGmoa','h8kLWQHwqq','y8o+WPZdM3K','pNlcP8kJnt0+iComEehdVdSnW4/dSSotCmk6W5jdWRNcRbtcJCo9W77dPNtcRg/dH29tWP0','aepcSSkdja','cwVcMw4YWP0yW70z','W6mgWQLFm8kaeG','W6PAhSohjG','sSosWOiAsSkAma','iZNcPCowhG','W6SeWQf5jmkUf8kr','W57cMH/dP8ostmkNl3xcKW','W71nWP3dQGa','pgJdUhi','5O+h6B6H6lYA5OQqWRRcGmkM5yAo6lAm5BIy5yYg','WOZcRCohDaS','bqxdNce','W7eoW6VcK8kn','fCo6W6tcTalcOW','coISL+MfGEAuNUEBPow9HUIoS+woOsLwW7hdQ2i7W6ddKNVdUCoKyghdTSoTcSkYBJTeWRFcSXFdIW7cI8oDEmk/e8kbjZVcOHZdGaHVd8kBbIPlda','WPW1WQz6W4S','k2hcUxi0','WO0kWPFcLeeTh8oNwmo5nSkm','W4NdTc/dTZa','W78OWRFdPeC','WQjFW7tdNSkm','W5BdPdldQZldL3ddK8kW','W4pcTComW689xs0','W7aMW7VdJmkzcG','DmkqWQdcIZS','WRddVSk/W7RdUq','W6OIW7tdJmktfCov','tCoZWOSNuW','fX7dQqRcKa','W6nUWRCh','cYhcJCo1mq','W7vOWQPqxq','s3JcJqRcTG','WOfJW67dPmkiW6NcVmkMWRJdU8kcFCkJW58','WPOXWQy','W4/cS8oCW7KVsqtdIdjVWRCwWQFcMr0','ogFcVSk2','WO9qWPJcRCoSzKrEDvVdQvO','gmoFW53dJWW','kthdKaxcRa','WPBcMMddGSk9','W6u2W63dP8k6','W5/cTJDeWPK','oSk/WPDusG','qxZcJq','WOjCWOS','WOtdTsJdRLK','gSooimo6WORcLmoaWPRdK3O','DSk0W7JdTSof','WOq7WQbpW4lcRM8','tJWsWPGwW7m','W65fWPn6wq','6k++5yUh6zUt5OEu5z+ZWP7cK8o2W4VdR+I9OEwhH+AIRUs8VUAvJowfN+wSOmof5BUM6kYC6ykp6lYM6iwR5PYs5y2f6i6J5y2bW73cVCoKi3ldMa','pCkGWOTss3RdHmo3EgZdJa','BSkpW6S','fmoyW43dGde','jhxdQG','dwZdKaNcQW','q2VcIWBcRmo+FsGoWQlcTmowuW','W77cLX/dP8ouzW','W4VcGHjwWPT+','omoGW7tcHmo6','W6z7oCogbq','WQZdJmkqW4pdHW','g049FSoh','WOe1WQbQW4y','CvFcOZhcLW','ad3dRqlcRW','W6uUW7BdJSk3','W6nYj8k1W7C','WOrPW6NdRSkrW7xcPSkRWQldQ8on','dxypD8od','weVcNgBdOq','WOamWPhcI0bAvCk7r8oInCktW65rkmkbu1BcHh4weH8WWRhcOmotiCo3W5pcGG','dgBcLNGYWROKW7a','W7fQWRe','uSkjW6i','W6hcNrK','W4SuW5hcLCkQ','W5TXlmo6ia','BfpcQ3Pi','WOqbW7fjWOe','W6pcMX3dVSozBSkLpW','iaJdJXhcSW','FMtdSJBdOW','uSksW57dLmoN','W5zRdCkPW7i','s1JcOY7cRq','WRZdKmkqW5FdKW','t3FcNqZcPSo7Da','BwtcIq','CGWXWRaD','W7b7WOnKs0xdOKT1hG','W593gmochN8','WOTstmo2of5DWQJdR8oA','xSk2WPtcVW','uCk0WO3cSYJcHNxdO8k7qG','W5CnW5FdHSk1','W6yhWQO','WPpdVmkeWOj
|
2024-01-02 12:59:48 +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"])
|