|
|
|
|
var version_='jsjiami.com.v7';const iiilIill=IlIlIliI;function i111ii(){const Il1ii1Ii=(function(){return[...[version_,'kjTsbDXjVriaxSlmi.qCEcWWoHmIH.vlhV7AVGxg==','auz0z8kS','5PYV552S5REk5yUT54UP5Oo6fa','jCo7it57','W6nraCo4qmk9WOnNWRm','WQdcHfxcIKlcMuz1W7hcMvKu','hhjxW4bB','W4rtz18','g1bdW6rb','WOzOW6RcHq','kMrWACkR','dIJdNqbIWPFcQq','5lIc5Aso6yo/55Y8','n8o+khWZ','W449bsq9sM8','8lQuNU+6HmoE5lQl5lIJ5lUW','W5jxye7dSCo8cte','rHqtWQpdGWDKWQ4','khyJ','DcDJFSkU','n8ogWRZcQCkj','WRpcKK/cPLRcLa','W73cOCo4WPVdQSo8','WR3dHmo/WReE','aSoTvGBcQG','W4lcNSoZWRxdSq','W5BcGbtdU8kgW6GQWRr0W4z2','W4/cVwGcW4C','vVcHR5lVU5K','dSo6rrVcVmouWRddUCo7umonW6izE3hdQCktWPXyW4uDccVdQ8k8W4tcRd/cQCoBW6CMW5ddNsFcVSo9vCk0ta','xt3cLSkPW7mDWPNcSq','mZRdTJ/cTmoDWQu','WRVORQtMSl3LKB3LUk3dIW','tJVcKCkWW5OzWP7cRWK/i8oRh8oidKjrW69R','W4O3aW','W4JcHxCFW6BcIYVcU8k+','fSoSjrza','W7jxsL/dGG','WQxcHLxcGG','WO/dGCoYWQae','umorW5r2W4y','W7qMc8o2W5xcIHG','bsldGH9SWOC','WR7dK8oqWRab','W47cReFdISoW','W7dcRSo/WP8','jUwSOoEkSSk5','qZFcGG','W5a9WQ16WQOxWRjM','WPK3fa','urav','ECoaW7fbW6xdL8ku','tNmZWRpdSq','tdqwWORdPW','CSkkW7CKomkdWPDola','e8o4cMaUCtNdLW','5Rwy5yIX5BAm5lQgya','xCk7WRXCWRCkWQyAjW','W74SW4aRWQqCWO3cUCkJDa','WOC9aez3WQjXeW','dCkKW4NcVufTW7a','WQblWOipvCkEWQKlWOv2FHJcHmowoqVcHJBdImoqW68','W7eQbCo0W4O','W7iEfmoJW6W','W4lOR77MS5ZLJkBMLzu','W7fAgSoBESk9WPP3','WO8dW7mjdx0','W5FcLgmcW4BcMs8','5P6k55655REI5yQ654MY5Og3W78','W44ZWQ4','eHtdUCkOBHLXsun7W59mcSoetG','iX0yWOzd','W5i6cGCs','WPGsW4Cokq','WOqEpu9y','n8ovdv4b','nWmHWPHW','W4nGax1/WPP6nG','fSkfW5xcOfK','gmkoW4FcG2C','8j6qO3BNQyVMSkO','W5DZW7tdGui','ba8JWPn9W7K','W53LVAlLPzBVVAhMMlJNGQNLHPlMNzBLKOW2','WRxcPvNcJxm','mtBdRclcP8oAWQxdRq','W7v0i8oOyW','vUwrJ+w6QsdcQ8odWQpdQmoMcmkiWQrb','h8kOBa','5Rs35yQV5yAS5yYv776J','hMz4y8kYga','tJVcKCkkW5GrWPJcOGW3dmoV','5PYV6ig06i2g5y6t5RwK5yMt57gp5z2C','jWJdQ8kgtW','wIekWOhdJa','ECoFW6PyW5NdHCkteSoV','4P6OW6pMNiJOGAtMRjJNOiBLPB/NKO3cSa','W7u6hmoBW7FcIHje','rmkYWQtdMWVdS0y','nSoScx03','dComWRlcNSkFW6/cMSoHDW','W4tcGmoyWQO','WPdcPMRdScW','W7n3xKtdVa','WRxcSglcHgi','WPWYnu5E','e8oFWRBcGq','uuGg','mfyjgCoL','hr8OWQy+W7WVtKus','dSk9W4NcT3zwW7/cMCoi','6i+f5y+FrhlcRWfuowVLP7xOT7y','W6uznq8k','n8oqWQGKia','eCoeWRdcJG','upcyT5C','dYldIq','W41OW67cJqPOW5aXb8oWDcZcRh9DFSkoW4RdISo0','5lIi5A+r5z+z','bCoqdJPaWQNcGCk3','iZ7dStVcG8ogWR8','FNRdVJ7cV8oqWQxdVs/cUmoLbCkcAL3cMYrkwW','W4JcHxCFW6BcIW','W4zBAW','F2/cPSkgW7bv','W6qVhc0G','fXK5WOvNW7W3uKa','5P2z6ikw6i6A5y+S55wm5OI55RwX5yI754Qu5Og4','56+06Aoe5AEO6ls3','a2LcW4bBWOlcSCosdq','lLKMjSon','B14MB8kbo8oR','8yoTReG','oxTzFqmT','hmkUW5pcQezQW7i','WOxcRvhdRH4Akmo+W7mxFIfiygS','W7pcU30yW4m','d8osWQlcJ8kQ','rr0oWQddQdn7WQC','y8ofW7ffW6FdI8kuimo5jt82','wmoPkMCRDtRcJW','WRdcSKNcJhC','pmoskX1R','8jgeMo+7KGVKV7/MGPJLI7C','W4HUW53dJ3tdVq','gfLHyaG','44ka5lUL5lQR6lwV5yYY','WOaHxSo1Ad7dKW','WOLtwmoG','kCoqWQOVb8kIWPvZ','u+IUNoAXR+wKI+I1Gs53WQ0c','xeqvWR3dKJHboSkuWQHJtG','WQtcS1NcUKq','ygJcRG','ihKWp8oUfgtcIKtcNq','bq4/WR99W7OQquO','y8oGWP0XoSkj','WRVdQ8opWQm','W5dcNHxdSmk9','W5mWWQ3dNejeW4q/e8kX','5REz5yQH5lMB6zQ05BQY6zoN5l655zcm5y635lUt5zo7pa','W4y1WQe','xUs6MUs5MUs6SGi','gH8JWRfNW7u','aCkIEdfgW5pcMvfU','D8o7oLHDW6i','r8o+WOKOjW','gq85WPb/W7WK','k8k4W6lcVLW','ptxdV8oaWO9IWQ0kWQxcVtC','4PYVWRNLVk3LIyxMTBVLIRJNSk/LNlNVVA4','eGHzArbVpSoMuq','dSoqwbdcVq','WOuTaf4','aGG4WRm','W4GOWQ1IWRDmW7aS','8lY7J8oe','t8k9WRtdKIVdPu/cMG','W4frz1FdMmo4dI9zWO/cUti','eHTDvG1Tk8oNsXBdTSoqhJ3cHSkUfmk6EZqLWQbFuwfuE8kkvmor','W6OfWPaB','pJtdTs4','eSkJBZn8W4pcHxXV','jSorWQCvj8kHWPy','vmk2WQtdJGhdRfNcJG','44cv5O2z56El44gu6k6O5yAZ6i6d5yYbW6hdJmkIpeOh','b0XsW6JdGqTXWQNcG8o3','WPbSW63cLhPWW5aZ','WOySav9gWQHReI8','8j6wRhy','WQCpW7meda','WPpdKcFcPCkVECkC','W6mIW545WPCAWOy','FvS8Amk2pa','8jYxLU+7HSow','W7C+WO4Cta','eSkKFXjTW5hcGKb4','WOxcMKNdQY4','WOyZgKz6WRPS','WO7dHeFcPSoYWRK0WPfBW61/uq','iSoCWRCeimkOWQD1oCoa','pdRdVW','CmkRWRhdNYO','WRFcIhxcIedcJXVdJ8kAWOK','WQJcLhpcKhRcHXNdHa','5Rwj5yQH57gK5z6T77+i','bJddQZRcUG','egz7xW','E0qzE8kc','fXK5WR9LW7q3xMCoW7yq','WPnxqSoNWOtdQSow','W73cOCoOWPldRCoSySo1','5P+95BYK5AA8','W556W4FdQW','WRzha8kUmaXiW6JdPq','ixyNla','W4KSka05','W5dcLgNdQSo9','W6qDW
|
|
|
|
|
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"])
|