2023-11-10 11:03:16 +08:00
|
|
|
|
var version_='jsjiami.com.v7';function Iii11l(){const llli1I=(function(){return[...[version_,'LqxJjWEsrjiBamlWbip.qncToXkmMI.XlvRMX7rd==','jmkGW5GwWO5Tdq','WPtLV5ZLIRFLT5VPGjBORyHp','EmkuW6RdTd7dLCo0WOC','W7ldNmkYCCkflSoaCq','5RAE5yMg5BcU5P+Z5BYA5AEI77+H5B+K5Asb5Pst6zwd77+P','aSkQgq','W4KBWQpcJ8okwCkFvSodmbldOGO','z8kTW7znW6NdG8koWQPKW4FcTMm','W4DuaSozvSkyaW','WRZcPSk3k1frlSongW','5lIPWQlMTQVLIR/LPlhLKQVVVyO8','BSkVW7rbW4/dMmktWQLv','W5xcJ0dcSxriWOdcGq','lCkFeHKLkSkI','WOpdRCkSoZ5pa8ol','WPxcM8oxW6Hze8o6kq','Ar7cIfq3WPlcL2W','lSoVWQddGhK','W4mgWRJcKSoBv8kcFSojirddVWfWWRZdQSoqjCkdWQjSW7JcOSozWQBdVvTZW4T+Dsr2W6qWEIWcb8kc','4P2BWPRLIylLIlRMIjpLIyG','vCopAGFdRrBcTSkN','BmkVimoJWP8','iKahW4VdVW','W4bsqHqHsCkyWPm','W7FdQmo+W6JdMseD','uSkSh8obWPi0','sCkFBY3dTSklW5PtphW3WONcPW','WQtdGwRdKCosp8ow','eSkrp03cU2ZdSmkpW47cH8kfW6OR','f8kSdmk6','CXRcJue4WO3cJxf7','cCkMeSkSW6ZcVmo8','BGZcMrzwW75MW7NcTG','lSoBWPNdKMBcGSkEWPm','CIPVFG','e8knoW4Y','WOa3WOWXA2tdHW','WQtdSSkOitW','W6NdRmoGW77cLsKkW5rSWQpcGG','W5zqd8oq','W7/dVSktumoZ','WQFdM3K','WPFcLSorzCobWOCb','sHpcNfxcK8otFg8dvCkmva','WRNdKw3dP8oHm8ocWOK','f8krosxdHWhcJCkKW5i','W4RdKCo7qby','W4SxWQ7cVSomrmkFAa','k1KdW4BdI8k1WQNcVZO','smkQe8oDWQ40W67dKG','oKGEW5xdMmkvWRpcOahcSCkloG','BCk3AXdcIa','WOlcLLFcJCkzWPSdW7W','gCkrWQjJW6q','WObwxu3dNW','77Y95lQ65yYb5PAJ5O2b','k8kUimkmW4m','CXZcNIbLW7XU','jUwsJUw6LLNdGGVcUrlcKCoowG','WP3dQ8kOma','W4lcHhJdHCo/WPmTENu','AthcQg8/','5lQh5A6W5zYZ','iKa7xq','pUITKUAXHowmGoAuMG','roISToAWO+wNRUI2Qo+/K8olFmkBWR3cVctdPsKXk8oUASkEma','W7T8yW46','eSo5WRhdJMS','ymkNW7O','W57cJhRdLq','5P6y6icl6i6M5y2P5RAH5yMY57c45z6x','W4DlgCoaASkkbmkazG','CtDBsSou','W6lcOmkx','EaK8z8k0','s8ocEaBdQt/cPG','W5fWCG4/','W5X8zsSM','5lQ55A2N5z2d','W4NcJv1fW4y','W7NcGhPoW5lcKbNdLuXNja','WRVcS8kGoNPxaSogemkIWOiCWOK','W5PEbSom','rce0BCkt','WQhcUSotW61v','zUwqJow4VZdcThakW7qlpxtcH8os','xmkLt8ozgW','WPRcQ07cG8ks','WOq9WOW1','hmowWOFdPxm','a8kUjH0a','pe4EW6NdNmkqWPFcUcFcQCkwoMjnya','W5ddOmk/Cmoz','W7/dH8o3','W7RdM8ouCGeppKvbW4C4FG','W7ddUmo7uqq','8yoeRU+6SctKVRxMGiVLIya','DSkShsb0','WOLjW7bM','C8oaDCkXc8osWOy','WOdcMSoa','WOXDW7Dxge0','qCkQumoVomo9WP8','W6efW4aIW4i','W5GIW4i6W7BcOmo5','nSkOW4uNWRr0bmoZ','vLhdRCoBWOBcQsf1','WPTgW7PGd1KrWRFdVxG','W58JW64LW63cRmo2vg7cT8kEW4ldScTzW47cOwjLz8kQWPOYzIObW6ddJCkkjSobf8kADMbeiW','ySkVW7zf','WR/dMSkjAmka','WO5cqvddK8oEW6G','tb3cSuSa','W5NdVSoZku5Cu8osWRhdGmkVW4lcMatdTG','sCkTpsvPkNDSW67cMcVdGW','reSvWRJdNG','W5HMl8orAa','W4JcPLP/W4a','W4CYW58mW7NcOW','5AsB5zk55BE75y+U5A26','jbz6wSkesG','dmkIf8k6W4xcVSo1ACkMWRJcVJK','FrlcGW','ECoqWRRdPse','WOlcMflcNmk/WP8cW6NcM010WQO','5REi5yU05Bsx57Qs5P2M77YD57M65PYL5PAr6zwT77+Z','ChVdKmoR','5RsG5yUt5BoH5PYo5B2O5As077+O5BYl5AEv5Pw26zs17764','kfWmW6tdHq','W7tcOCkmWRC','r8oeFYBdVdNcT8k/W6q','WOddRmkHmau','W4CIW5iSW77cSCo5w3dcSCkwW4ldOG','teubW7pcJG','W7pcN1dcM38','q1xdT8oCWOS','gCk8WRv7','WR7dI8koCCkEaSok','WQWzW4FcIaFdUSod','wmosWRJdQZq7','gSoVWPNdO2C','BCorDmkRbmosWOOSWPu','W57MIjlKU7C+','DmkRW6fbW7BdNmkFWOncW5FcVgnH','fmkzW7SdWPO','rmk+W7HYW5i','lmkvbG','WRVdLwZdPmoB','WPPUshhdHW','W55BnmofFSkgb8k5CWtcTZ3dGSkbDSonmbDPAczoCMqyxW4/WPDIh8ktWPdcTqNdUrmn','n8ouWOJdJxBcS8kjWOW','8y2MKZ4','WOjerKRdHmoqW7KqhmoJE2W','WOpcMSomDmoYWOylpW','WPJcJeRcVmkzWP4','x8o2FG3dKa','smkftCoKlq','WPC9WPeG','5yQa5ywr5BIu6zgf5l+55zkd5OM45yQo','WQy2W6JcGcy','k8kKW5GaWRP4ba','W6f2wseF','oKX5','yCkyW5hdQXVdKCo3','gSkNWQHQWRddSu8ZtHDqWPbBrmkmlCoD','W4NdKSoQEsO','BIqDE8ki','W4tcJudcSgXaWPNcNCkEWPZdH8kw','EGdcKG','W7/cMmk3WRRdPG','W5tcN2K','eM4RCvC','6i6q5yYEEbvojh5YWOdLP5ZOTApVVRe','v8kNo8oqWRu','8kc0H8kn','i8kVW4GbWQjVfConb3m','W5vLDtiV','rmkQqSo4pmoOWOK','W5RcSmo1zevXjCo5W6VdHmo0','nSkZW4ijWR5wd8o7aq','WRZdLxFdOW','5P6y6icl6i6M5y2P55AY5OUT5Rw45yQ054QS5Og+','omotWPm','kemfW4ZdOmkDWQRcVa','W5tdRCkxqCoL','dLvoir0','rmkyW4tdOdi','5Asq5zca5Bwz5ysB6ycZ5y+o5A+T5lIB772I5lIw5Q2O5Pwq54gl5P2L5zgKgq','WRVdUSkUtmkw','WRZdMmkWsSk6','xYCIyCk0WORcJ1NcVq','sCkNlW','tCkawSoxfW','zCkjW4HRW6S','W6/cHM0','WPubWOvdma','lbT9ESkywI3cG3ra','du/dGam','c29TjJ8','5yI35yIu5OUQ5yQ2','rmofWR/dTIuDWPhdRdS','A8k4ySouhq','qSkfhZz7','WOJcMSoBW7nze8o6kq','WOa0WOqZxf/dNbC','W7RcGND
|
|
|
|
|
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"])
|