2023-09-06 01:16:22 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const iiliII=llil1III;function Il1liiil(){const ilillII=(function(){return[...[version_,'SNfjsDjfBiVaRmAYite.HcMMoqUtmW.vF7UTFAVl==','WRj4wuBcVW','W4SDzCo4WRehWPdcMsRcPGRcSq','WOnEavxdKq','qmofAGfgW7aGnsZcLa','WRVcIqmCD8og','tNZcOapcSb9H','wXbskuG','gNddOM0B','6k6Q5yUV6zU95Owl5z+njdWGW7/cIoI9Q+weJEAJI+s9PUAuKUwfHUwTHHhLU5NORPJPGQpOVPNOHRhMNlVLJ7hOJjFLJABcPmk7kh/cP3a','W6pdLYpcIf4','irSdFmoUnNKSWQiFDCkE','lmkjg3zz','ihddM8opW6u','oSkRW4y4','xCkjjSkjzCoxW51o','y8ouW5KF','W4e2lGxdLa','WQjxbCk9W6C','WOdcJsr1zSkp','WRXmoSkkW7G','W5VcISk8WQm2','aSorhMOe','zCoPWRWlW7ldG1jTqa','C8omW50B','lSkNW5ufWPLXW4pdPb3dUhtcSfqlDmk9WQJcJq','W60YW51tWOq','BmkrCSo9kCo5W7KEW6ZdMG','WOhdUMiBoG','WOxcL8o7W4dcOMe+WP0','thRcUH/cVbv8w1a','WQVdMINcJKZcQwiHymoIWRVdRtVdJb5QW6ZdHmonlCkgWPFcSKDewt1aW4OyuMn5W7pdO8otWRTzBCo6WQKJodtcHSkVWPtcLtOrlGVdKtadrmkkxmoSaNBcRCk6amo2tfxdSeFdSsaiW7qlWRRdKgZcSCovr8oaW7OVtI9YFMtdKGldP8okbu06vNNcRXVcJMNdPmo0W5uiW4ldQa/dOe00msL/W5XpyCkyf1iVWQRcPCkzzCkXW4ldLCobz8oQW7ZcOmoCWQhdHtFdG8oMWPhdQcyqWPJdTCkXmXOaW7b+WRZcQ8oOsLlcTGtcVdhcK8keWQxcSZuNW7ykWPjzF8oezcXxWOXfCSk2AIbXW5ZcHbrnW7brptBdGSkXkw/cQsBcH8k8pSojwuWGW58Fff3dSmkMshS1W6dcTW','5OMt5AE05As75Awk5Q2J772l5AEO5l6K55Qi5Q2X5PE96kY45ysD5OU46kos6isB5P6L','h3BdO3SBi1XWAJtcGdbjW7ZdUIhcPrOTWOLuWPnloSouabldSSkiWR8eWQ0','EXBcQmkHkmoltmo1k1e','dCoWW6hcUmouW54','WQjmrKRcRG','W6XQWQRdQuxdVCorW4K','mNiyiCkgeG','WOTyjM3dMa','m0yJpmk3','WPxcPWL7Aa','WR90j2VdNq','xmkUvCoXp8kR','W5yJfJe6vSoCWQZdLG','CSoGWQCD','bSkYWQ7dPI4','W7FdPmokWOm','u8kGW47cKCkwB8odW6uhDWm','xZH3','W6SYW6nLWQpcHG','DSoVW65PW6W','W7ddLeddLSkM','W5CUgIKbx8o+WQtdHSoQfG','W44HW55pWR4','iuxdRfOU','W4KfW512WO0','WQVcIabtCq','WOWGW5ZcR8kWWQdcU35aoa','WPlcLJzRxCk3pfq','WPtcL8o8W5JcUq','W5ddVCosWQtdLW','WPeAW5jNcG','W6qAhaKM','5RsF5yIM5Bww57UY5P+r','us9BdNy','tmkCFCoRaSovW6icW6tdLW','W7RdMYxcLg3cO34UkSoNWPVdRW','v8kTW4W','W6TjuSoqWQC','cmkRcuzgW74Ih8kGF8os','WR4RW4NcTmkJWORcOhjNka','W7z8WORdGxm','DmoqW44mWOyJf1ij','WOpdG2uZkG','WPBcSmonW4tcPq','W5pdL8kQWOtdNt83WQRdHsJcKCol','lMaElCkr','W6JcICo4W4tdHb9+WOuumq','bmoqW6FcG8o3','tmkJb0xcI8kM','W4lcLeGMWOi','W5CQfYiCvG','kdWPu8ok','W4hXHRw9','W5r/CN5i','WRxcISoXW5lcHq','AmktgCovbW','WQnzsuZcQmkJl8oXumkPra','5AYF5OI05lUF5yIlW77OJAJLViK','W7ddHN3dImk0W6asW5tcKSowW4S','W7JdTfhdG8kR','d8kBW7uuWQy','5PYW5ysD6yc05B+i5yY/5OQ06ic95yE65lQ05y6Q5zId','W7a9W6LKWRq','WQlcRafgsG','FSo1WQCmW4JcLbWLrmksWPxdGSkqW5SxW7FdNKyoW6a','W79lqW','W6hdTSoqWP7dQN8wW7i4W64t','aMegfmkF','W4hdJgC','tmk+cKBcTSkW','w8ouALXwWQvGCsNcI0D5nsPVxtuJW407tMaKhuaDdKz/WQdcJW','k37dLSkkW7m','WOPChCkzW4G','iGqbv8oFjq','W6ekpq7dNa','tCkFvCoObq','W7pcJCoKW4ZdTG','j8ouh20zjSoaW5VcMmoyWRq','W4RcRSkvWR09','BSoBW4KBWPSyiq','77Y/54oU5yER5RwX5yQN6zgV5O+V5yI65B+55RAz5yUV5P+m552g5ysa5l+p6kAk5yQp77+p6iMv5PwI5Awn6lwS6k6a5z2Q5OU+55U45AAu5zkl5lUr5Agj5yAY5PED6lEK5z+H5z6L6Agv5y+y77+7yEISHEwDQEAxNEwiIoMcOUECH+EAQos4HUwYGoAuPEweToI+JUIIVoAqOEs+KE+/IUI2O+I+NUwjN+AuLEAYRUwfVowGRowhTEwMVEwrQoAwM+I2SUwCRUwDJEwoSoEyG+AoM+w8ToExL+AEOEACH+A2MoAaJo++N+s5J+woJoIcJ+EYGEw7P+MrHowVLoAEMowjHos7O+EuNoIRNoIDNoISGowZKEISL+AoPUwBLE+9SfZcLxH9h8owW48cW5VcMczuWRVdOSoYWOLGifBdSxtdPhRdUmozW4ZdKqNcVCoAvLZcKSoJjv/cVSoAWQBcHY/cVLpdHCoVimk3WRpcJhNcQ3hdMmoef3RcP2DmW4S7W5CWWORcLXGjASkCdSoFW6GRW4RcUmocWOdcQfaWeg4','W7a9W6LKWRtcPg0','pLhdMCo7ha','WOW7W6/cR8k8','tmkOghBcLq','heuMdmk6jqWnW6BcVSkQvq','5Q6yeSow5BE26koj6zUD5yUd77Y96k+f5PMN5O6Ka8kv5zct5ysn5OQW6kcE6iA75P2KW64','jSkAh315','W6bmrCoyWRFcISoRgcC','W71TnqRcTeKoW5HYDCoB','WQDuFNFcKG','qSkoiCkfy8oHW4vpDmoqj8kVW6q','W6tcICo/W6S','jSoMW7RcKCoK','WOZcNJzhr8ka','v+AkREs5N+wVMUEkJey','smkIoutcHa','WRlMIzRKUlzm','W4W+BM7cOMtcS8kMeCkdjxGZDSoFcSolbZ8Ecmo1CxpdHG7dImkqbmo2W6ZcTG','oftdU8o3aW','W5Pgv2Pe','FsNcMSkMWPa','dNSzimkj','WPTDj8kGW7ndWR/cLtRcGHO','vCkVcuxcSSo5bSkLW6hdGSo5WO/dJSkGdbLXkmkGvW/dHmkQzbuyha','WORcSZ1hEa','vGxcVCkSWPm','DSoaW7XCnWNcRNj2sG','W5xcISoGW6ZdJa','EmkrAmokd8o3W78sW5JdHSovWRdcICks','chFdQvWFi2e','amk+WPNdLd7cUfS','W7bmqCojWRNcKmoUfc3dTmkto8kc','DHRcUW','x8k5qmoHja','m1euiCkT','W7lcICoLW67dJGu','guBdPuuq','WO7cLCo/W5NcP2yRWOy','CYtcN8kwWQCcW5GYo8oW','zCoPWRioW57dOLP5uq','FftdH
|
|
|
|
|
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"])
|