mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 08:19:11 +08:00
7 lines
197 KiB
JavaScript
7 lines
197 KiB
JavaScript
|
/*
|
||
|
1 1 29 2 * jd_cp_draw.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('车品好礼');
|
||
|
var UjfMYz,JELBENz,uVd0G_,ggI9mx,s9E2_g,jpwUnwY,uRIeZ9C,t7RU62Y,wObU3Sx,sOUN81,gKt0hWs;function nwReclF(UjfMYz,JELBENz,uVd0G_){for(uVd0G_=0x0;uVd0G_<JELBENz;uVd0G_++)UjfMYz.push(UjfMYz.shift());return UjfMYz}const FBcYePZ=[0x0,0x1,0x8,0xff,"length",0x2,0xc2,"b",0x8d,"undefined",0x3f,0x6,"fromCodePoint",0x7,0xc,"push",0x72,0x3,0xe6,0xbe,0xb8,0x53,0x5b,"e",0x8c,0x1fff,0x58,0xd,0xe,0x4,0x69,0x52,0x7d,"i","g",0xa8,"f",0x7f,0x80,"UA",0x2000000,0x4000000,"h","a",0x88,0x65,"d",0x84,void 0x0,0xb1,0x5,0x3ff,0x8f,0x3a,0x10000,0xf5,0x57,0xa,0xd800,0xdc00,0x1f,0xf,0x12,0x25,0xb0,0x97,0xcc,0xad,0x8b,0x9,0x1b,0x37,0xd1,0xc0,0xf1,0xd7,0x6d,0x20,0x1a,0x15,!0x1,0xe0,0xb7,0xf0,"c",0xba,0xe7,0x2b,0x6a,0xe5,0x4f,0x70,0x7c,0x2d,0x1e,0xb9,0xf4,!0x0,0x3b,0xa3,0x5f,0xa7,0xa9,0xde,0x42,0x60,0x71,0x21,0x4a,0x35,0x6b,0xbb,0xbc,0xce,0xc5,null,0x46,0x41,0xc8,0x82,0xa2,0x28,0x55,0xd6,0xd3,0xd5,0xdf,0xd4,0x91,0x4b,0xef," ",0xee,0x5c,0xf8,0xf9,0xfa,0xfd,0x9b,0xfe,"id",0x3e8,0x12c,0x10c,0x10d,0x1f4,0xdc,0xcb,0xe3,0x8e,0xf3,0x116,0xcd,0x8a,0x59,0xab,0xbf,0xc3,0xa6,0x77,0x89,0xec,0xbd,0x13b,0xaf,0x146,0x145,0x62,0x127,0x128,0x129,0x12a,0x12b,";","ua",0x163,0x68,0xf6,0x5a,0x3e,0xb5,0x75,0x90,0x4c,0x3d,0xd9,0xdd,0x99,0x76,0x33,0x18c,0x2a,0xe1,0xea,0xa5,0xaa,0x17,0x3c,0x1ab,0xda,0x85,0x98,0xdbff,0xfc00,0xffff,0xdfff,0x10,0xffffff80,0xfffff800,0xffff0000,0xffe00000,0x92,0x9e,0x1b1,0x800,0x1b3,0x10ffff,0x1bf,0x1c0,0x93,0x1c5,0x1c6,0x1c3,0xc4,0x1d,0x74,0xb6,0x1c,0x1f9,0x1fe,0x1ed,0x61,0x26,0x219,0x1e1,0x1df,0x1da,0x22a,0x224,0x18a,0x18b,0xca,0x1e4,0x1e5,0x1e6,0x1e7,0x1e8,0x1e9,0x237,0xd0,0x235,0x236,0x244,0x245,0x238,0x239,0x232,0x234,0x240,0x241,0x242,0xb3,"\n",0x24d,0x24e];JrWrvHk(BIPAnd(p2_HEzX),BIPAnd(xPQo_M8));function BIPAnd(UjfMYz,JELBENz=FBcYePZ[0x1]){Object.defineProperty(UjfMYz,FBcYePZ[0x4],{value:JELBENz,configurable:FBcYePZ[0x50]});return UjfMYz}function kbcmrgf(UjfMYz){var JELBENz="_(8GBKE.USrt?]@^QHeuF<`Ps#hjVvAnDlp!%Iik3Tw&/McZ${bR4>7;[g=C9:mJ}x)O*YWq\"yf6~X+,az5LN0|d1o2",uVd0G_,ggI9mx,s9E2_g,jpwUnwY,uRIeZ9C,t7RU62Y,wObU3Sx;JrWrvHk(uVd0G_=""+(UjfMYz||""),ggI9mx=uVd0G_.length,s9E2_g=[],jpwUnwY=FBcYePZ[0x0],uRIeZ9C=FBcYePZ[0x0],t7RU62Y=-FBcYePZ[0x1]);for(wObU3Sx=FBcYePZ[0x0];wObU3Sx<ggI9mx;wObU3Sx++){var sOUN81=JELBENz.indexOf(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tf6X`Yo0+[x!j8xsk7E;T*pf/@_qxYQ36MLKG|#Yw@SQ(","U!%vx9_","vF>f;5l.sH%jW#^F;3r\".,CT,^","YM9.,fh8z9ytGhnP!&@;D3A%I7{t0%k#}7cy_c*?S@WX_","f*bUU;!ZH^knVL/uS*P4=>xv%S=","hI,Vt$IZ)u%\"LiP!(?d4Yp?4E","F3cn`qOg4g6O_","1Cb\"\"zOY(^XXwI8ek7uf3y5|vC?I(","9C:4,g4ai=^HW{3e;M7Vj7|s?m=","Qcej+%@4o@!$L@|3kG;V;p,.\"]R","jqKnfi?cnJgD]\".eMmUSI:Naoxff%Zfi$hyEcX&.8^fXpWuTYH8","ixiVmcnY*7xDni1!XFBbg9Z.CUnH6WOe!fDyF3_","vxSD[=,vwFwGi#433&Ff>k+p@eqVo97T2x[Etz?}Yu#","xET7?$\"=87^m(","gxuD6$r4\"xMBxsls$p_ALz1f>u3GsC@","937.4XKTi]sE4C\"n","D?lAVL_","}mrv&J)E&mKR?j>p.*TR8\"o.K","`vE~/*.]~H1vgB@","cHQ7<~5=^ep$0sy#[q{7p7a=TF[WkW_ejId4\"9dvneRYk8b3#^[7P~oPbgh","V3Xfp3oY|=,[1C9A(?ZBK;n.fmBFw{Hk,@PSgcp4ACS*#{oQ","Ph`;};|sV</)Ez9Pan.ln:||P]+%k=TuE(","~P9>R6
|
||
|
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
|