jdpro/jd_yb_draw.js

7 lines
97 KiB
JavaScript
Raw Normal View History

2024-11-03 15:57:14 +00:00
/*
*/
const $ = new Env('延保抽奖');
2024-11-26 04:35:52 +00:00
function PAdzZX(){}var vbRtvq=Object['defineProperty'],YJZ88I0,m8n6PdJ,O5NQrMc,AYkaV0,uH7FXf,yjTg0Z,_0X2DlA,soNYHDD,k7S9HGw,SsgefE,a4Li9pU,XcbgIU,aqR_dG,XyCAv_c,v7eJHA;function OwICzT(PAdzZX){return YJZ88I0[PAdzZX>0x48?PAdzZX-0x1a:PAdzZX+0x34]}YJZ88I0=yRM5Ui();function VKnhFgY(PAdzZX,vbRtvq){return m8n6PdJ.call(null,PAdzZX,OwICzT(-0x8),{value:vbRtvq,configurable:!0x0})}PAdzZX(m8n6PdJ=Object.defineProperty,O5NQrMc=QQXDdU((PAdzZX,vbRtvq)=>{return vbRtvq(PAdzZX())},0x2)(ZjGRap,jWfmhd));var zuPlIiX=[],_eKp6b9=[eMYtJ9(0x0),eMYtJ9(0x1),eMYtJ9(0x2),eMYtJ9(OwICzT(-0x22)),eMYtJ9(0x4),eMYtJ9(OwICzT(-0x27)),eMYtJ9(0x6),eMYtJ9(0x7),eMYtJ9(OwICzT(-0x18)),eMYtJ9(0x9),eMYtJ9(0xa),eMYtJ9(OwICzT(-0x1d)),eMYtJ9(OwICzT(-0x34)),eMYtJ9(0xd),eMYtJ9(0xe),eMYtJ9(0xf),eMYtJ9(OwICzT(-0xe)),eMYtJ9(0x11),eMYtJ9(0x12),eMYtJ9(0x13),eMYtJ9(0x14),eMYtJ9(0x15),eMYtJ9(0x16),eMYtJ9(OwICzT(-0x34)),eMYtJ9(0x17),eMYtJ9(0x18),eMYtJ9(OwICzT(0xb)),eMYtJ9(0x1a),'igIZ|v6b',eMYtJ9(0x1b),eMYtJ9(0x1c),eMYtJ9(OwICzT(0x29)),eMYtJ9(OwICzT(-0x33)),'igIZ|vZY=w32pk',eMYtJ9(0x1f),eMYtJ9(OwICzT(-0xa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d),eMYtJ9(0x99),eMYtJ9(0x5b),eMYtJ9(0x7e),eMYtJ9(0x9a),eMYtJ9(OwICzT(-0x32)),eMYtJ9(0x89),eMYtJ9(0x9b),eMYtJ9(0x63),eMYtJ9(OwICzT(0x19)),eMYtJ9(0x9d),eMYtJ9(OwICzT(0x1c)),eMYtJ9(0x9f),eMYtJ9(0x26),eMYtJ9(OwICzT(-0x31)),eMYtJ9(0xa0),eMYtJ9(0xa1),eMYtJ9(0x74),eMYtJ9(OwICzT(-0x2d)),eMYtJ9(OwICzT(-0x2a)),eMYtJ9(0xa4),eMYtJ9(OwICzT(0x1b)),eMYtJ9(0xa6),eMYtJ9(0xa7),eMYtJ9(0xa8),'YLq`>UtY4w_n0Xe8]w<"|rflOw7:5RPQ+geEvSny?',eMYtJ9(0xa9),eMYtJ9(0x11),'JwI@|@nPk',eMYtJ9(0xaa),eMYtJ9(0x1f),eMYtJ9(0xf),eMYtJ9(0x89),eMYtJ9(OwICzT(-0x30)),eMYtJ9(OwICzT(-0x2f)),eMYtJ9(0x25),eMYtJ9(0x8d),eMYtJ9(0x1f),eMYtJ9(0xa2),eMYtJ9(OwICzT(-0x32)),eMYtJ9(0x7f),eMYtJ9(0x80),eMYtJ9(0x81),eMYtJ9(0x5b),eMYtJ9(0x83),eMYtJ9(0xf),eMYtJ9(0x26),eMYtJ9(0x8d),eMYtJ9(0x6e),eMYtJ9(0x6f),eMYtJ9(0xab),eMYtJ9(0xac),eMYtJ9(0x71),eMYtJ9(0x72),eMYtJ9(0xad),eMYtJ9(0x74),eMYtJ9(0x75),eMYtJ9(0x95),eMYtJ9(0x96),eMYtJ9
2024-11-03 15:57:14 +00:00
function Env(o,t){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((r,i)=>{s.call(this,t,(t,e,s)=>{t?i(t):r(e)})})}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.logLevels={debug:0,info:1,warn:2,error:3},this.logLevelPrefixs={debug:"[DEBUG] ",info:"[INFO] ",warn:"[WARN] ",error:"[ERROR] "},this.logLevel="info",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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null,...s){try{return JSON.stringify(t,...s)}catch{return e}}getjson(t,e){let s=e;if(this.getdata(t))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(r=>{this.get({url:t},(t,e,s)=>r(s))})}runScript(a,o){return new Promise(r=>{let t=this.getdata("@chavy_boxjs_userCfgs.httpapi");t=t&&t.replace(/\n/g,"").trim();var e=(e=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"))?+e:20,[s,i]=(e=o&&o.timeout?o.timeout:e,t.split("@"));this.post({url:`http://${i}/v1/scripting/evaluate`,body:{script_text:a,mock_type:"cron",timeout:e},headers:{"X-Key":s,Accept:"*/*"},timeout:e},(t,e,s)=>r(s))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};this.fs=this.fs||require("fs"),this.path=this.path||require("path");var t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),r=!s&&this.fs.existsSync(e);if(!s&&!r)return{};r=s?t:e;try{return JSON.parse(this.fs.readFileSync(r))}catch(t){return{}}}writedata(){var t,e,s,r,i;this.isNode()&&(this.fs=this.fs||require("fs"),this.path=this.path||require("path"),t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),r=!(s=this.fs.existsSync(t))&&this.fs.existsSync(e),i=JSON.stringify(this.data),!s&&r?this.fs.writeFileSync(e,i):this.fs.writeFileSync(t,i))}lodash_get(t,e,s){let r=t;for(const t of e.replace(/\[(\d+)\]/g,".$1").split("."))if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,r,e){return Object(t)===t&&((r=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g)||[]).slice(0,-1).reduce((t,e,s)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(r[s+1])>>0==+r[s+1]?[]:{},t)[r[r.length-1]]=e),t}getdata(t){let e=this.getval(t);if(/^@/.test(t)){var[,s,r]=/^@(.*?)\.(.*?)$/.exec(t);if(s=s?this.getval(s):"")try{const t=JSON.parse(s);e=t?this.lodash_get(t,r,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){var[,r,i]=/^@(.*?)\.(.*?)$/.exec(e),a=this.getval(r),a=r?"null"===a?null:a||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,i,t),s=this.setval(JSON.stringify(e),r)}catch(e){this.lodash_set(a={},i,t),s=this.setval(JSON.stringify(a),r)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueF