mirror of
https://github.com/6dylan6/jdpro.git
synced 2026-11-06 06:06:43 +08:00
1
This commit is contained in:
1 parent
33f5903873
commit
72cc19a641
3 files changed
+1
-17
No files matched your search
+1
-1
@@ -7,5 +7,5 @@
|
||||
|
||||
*/
|
||||
const $ = new Env('新农场任务');
|
||||
var aUSANQ,yjFX40v,B_e3Xsr,upYUGL5,gUfIyT,oMIVZN,jlQPOAO,RsyYVMY,X3_oQV3,_KLYoh7,yjqjAIe;const I4KHvKv=[0x0,null,0x20,0x2,0x1,0x100,0x6,0x3,0x8,0x10,0x4,"undefined","LZString",0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x33d,0x80,0x7f,0xdf,0x1f,0x3f,0xef,0xc,0x343,0x12,0x339,0x1fff,0x79,0x7a,0x7b,0x7c,0x7d,0xc8,!0x1,0x7e,0x81,0x82,0x83,0x84,0x85,0x86,!0x0,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd," ",0xde,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,"\u8D26\u53F7",0xe6,0xe7,0xe8,"UA",0xe9,0xea,0xeb,0xec,0xed,0x1f4,0xa,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,"\u274C ",0xf9,0xfa,"!",0xfb,0xfc,0xfd,0xfe,0x101,0x102,0x103,0x104,0x105,0x106,0x107,0x108,0x5,0x109,0x10a,0x10b,0x10c,0x10d,0x10e,0x10f,0x110,0x111,"\u3011",0x112,0x113,0x114,0x115,0x116,0x117,0x118,0x119,0x11a,0x11b,0x11c,0x11d,0x11e,0x11f,0x120,0x121,0x122,0x123,0x124,0x125,0x126,0x127,0x128,0x129,0x12a,0x12b,0x12c,0x12d,0x12e,0x12f,0x130,0x131,0x132,0x133,0x134,0x135,0x136,0x137,0x138,0x139,0x13a,0x13b,0x13c,0x13d,0x13e,0x13f,0x140,0x141,0x142,0x143,0x144,0x145,0x146,0x147,0x148,0x149,0x14a,0x14b,0x14c,0x14d,0x14e,0x14f,0x150,0x151,0x152,0x153,0x154,0x155,0x156,0x157,0x158,0x159,0x15a,0x15b,0x15c,"\n",0x15d,0x15e,0x15f,0x160,0x161,0x162,0x163,0x164,0x165,0x166,0x167,0x168,"\u7EA7]",0x169,0x16a,0x16b,0x16c,0x16d,0x16e,0x16f,0x170,0x171,0x172,0x173,0x174,0x175,0x176,0x177,0x178,0x179,0x17a,0x17b,0x17c,0x17d,0x17e,0x17f,0x180,0x181,0x29,0x182,0x183,0x184,0x185,0x186,0x187,0x188,0x189,0x18a,0x18b,0x18c,0x18d,0x18e,0x18f,0x190,0x191,0x192,0x193,"%",0x194,0x195,0x196,0x197,0x198,0x199,0x19a,0x19b,0x19c,0x19d,0x19e,0x19f,0x1a0,0x1a1,0x1a2,0x1a3,0x1a4,0x1a5,0x1a6,0x1a7,0x1a8,0x1a9,0x2000000,0x4000000,0x1aa,0x1ab,0x1ac,0x1ad,0x1ae,0x1af,0x1b0,0x1b1,0x1b2,0x1b3,0x1b4,0x1b5,0x1b6,0x1b7,0x1b8,0x1b9,0x1ba,0x1bb,0x1bc,0x1bd,0x1be,0x1bf,0x1c0,0x1c1,0x3e8,0x1c2,0x1c3,0x1c4,0x1c5,0x1c6,0x1c7,0x1c8,0x1c9,0x1ca,0x1cb,0x1cc,0x1cd,0x1ce,0x1cf,0x1d0,0x1d1,0x1d2,0x1d3,0x1d4,0x1d5,0x1d6,0x1d7,0x1d8,0x1d9,0x1da,0x1db,0x1dc,0x1dd,0x1de,0x1df,0x1e0,0x1e1,0x1e2,0x1e3,0x1e4,0x1e5,0x1e6,0x1e7,0x1e8,0x1e9,0x1ea,0x1eb,void 0x0,0x1ec,0x1ed,0x1ee,0x1ef,0x1f0,0x1f1,0x1f2,0x1f3,0x1f5,0x1f6,0x1f7,0x1f8,0x1f9,0x1fa,0x1fb,0x1fc,0x1fd,0x1fe,0x1ff,0x200,0x201,0x202,0x203,0x204,0x205,0x206,"\u6B21",0x207,0x208,0x209,0x20a,0x20b,0x20c,0x20d,0x20e,0x20f,0x210,0x211,0x212,0x213,0x32,0x214,0x215,0x216,0x217,0x218,0x219,0x21a,0x21b,0x21c,0x21d,0x21e,0x21f,0x220,0x221,0x222,0x223,0x224,0x225,0x226,0x227,0x228,0x229,0x22a,0x22b,0x22c,0x22d,0x22e,0x22f,0x230,0x231,0x232,0x233,0x234,0x235,0x236,0x237,0x238,0x239,0x23a,0x23b,0x23c,0x23d,0x23e,0x23f,0x240,0x241,0x242,0x243,0x244,0x245,0x246,0x247,0x248,0x64,0x249,0x24a,0x24b,0x24c,0x24d,0x24e,0x24f,0x250,0x251,0x252,0x253,0x254,0x255,0x256,0x257,0x258,0x259,0x25a,0x25b,0x25c,0x25d,0x25e,0x25f,0x260,0x261,"\u6D47\u6C34",0x262,0x263,0x264,"g\uFF0C",0x265,0x266,0x267,0x268,0x269,0x26a,0x26b,0x26c,0x26d,0x26e,0x26f,0x270,0x271,0x272,0x273,0x274,0x275,0x276,0x277,0x278,0x279,0x27a,0x27b,0x27c,0x27d,0x27e,0x27f,0x280,0x281,0x282,0x283,0x284,0x285,0x286,0x287,0x288,0x289,0x28a,0x28b,0x28c,0x28d,0x28e,0x28f,0x290,0x291,0x292,0x293,0x294,0x295,0x296,0x297,0x298,0x299,0x29a,0x29b,0x29c,0x29d,0x29e,0x29f,0x2a0,0x2a1,0x2a2,0x2a3,0x2a4,0x2a5,0x2a6,0x2a7,0x2a8,0x2a9,0x2aa,"0",0x2ab,0x2ac,"/",0x2ad,0x2ae,0x2af,":",0x2b0,0x2b1,0x2b2,0x2b3,0x2b4,0x2b5,0x2b6,0x2b7,0x2b8,0x2b9,0x2ba,0x2bb,0x2bc,0x2bd,0x2be,0x2bf,0x2c0,0x2c1,0x2c2,0x2c3,0x2c4,0x2c5,0x2c6,0x2c7,0x2c8,0x2c9,0x2ca,0x2cb,",",0x2cc,0x2cd,0x2ce,"-",0x2cf,0x2d0,0x2d1,"\u3010",0x2d2,0x2d3,0x2d4,0x2d5,0x2d6,0x2d7,0x2d8,0x2d9,0x2da,0x2db,0x2dc,0x2dd,0x2de,0x14,0x2df,0x2e0,0x2e1,"1",0x2e2,0x2e3,0x2e4,0x2e5,0x2e6,0x2e7,0x2e8,0x2e9,0x2ea,0x2eb,0x2ec,"=",0x2ed,0x2ee,0x2ef,0x2f0,0x2f1,0x2f2,0x2f3,0x2f4,0x2f5,0x2f6,0x2f7,0x2f8,0x2f9,0x2fa,0x2fb,0x2fc,0x2fd,0x2fe,0x2ff,0x300,0x301,0x302,0x303,0x304,0x305,0x306,0x307,0x308,0x309,"\u83B7\u5F97",0x30a,0x30b,0x30c,0x30d,0x30e,0x30f,0x310,0x311,0x312,0x313,0x314,0x315,0x316,0x317,0x318,0x319,0x31a,0x31b,0x31c,0x31d,0x31e,0x31f,0x320,0x321,0x322,0x323,0x324,0x325,0x326,0x327,0x328,0x329,0x32a,0x32b,0x32c,0x32d,0x32e,0x32f,0x330,0x331,0x332,0x333,0x334,0x335,0x336,0x337,0x338,0x33a,0x33b,0x33c,0x33e,0x33f,0x340,0x341,0x342,0x344,0x345,0x346,0x347,0x348,0x349,0x34a,0x35a,0x350,0x352,0x353,0x354,0x355,0x356,0x357,";",0x35d,0x35e,0x2710,0x360,0x364,0x362,0x36b,0x36c,0x36d,0x381,0x359,0x36e,"fn",0x36f,0x387,0x373,0x374,"ua",0x375,0x378,0x379,0x3ff,0x10000,0xd800,0xdc00,0x390,0x391,0x37c,"2",0x389,0x38a,0x372,"fg",0x37b,0x39b,0x39c,0x7530,0x38b,0x39f,0x3a0,0x3a1,0x3a2,0x3a3,0x395,0x3af,0x3b0,0x3b1,0x3b2,0x3bd,"fp",0x3Line truncated
|
||||
var wYdiTJS,gY11gX,SuVphA,ZaR8pEJ,ZiOp353,A25mkZy,b5pVz7,xYu112W,XTOUZx,q0X3kX1,F7PgSVY,UaJIiM,ychURc;const WtKAiO=[0x0,null,0x20,0x2,0x1,0x100,0x6,0x3,0x8,0x10,0x4,"undefined","LZString",0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x340,0x80,0x7f,0xdf,0x1f,0x3f,0xef,0xc,0x346,0x12,0x33c,0x7a,0x7b,0x1fff,0x7c,0x7d,0x7e,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,!0x1,0xc8,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,!0x0,0x9c,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,"UA",0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5," ",0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,"\u8D26\u53F7",0xfe,0x101,0x102,0x103,0x104,0x105,0x1f4,0xa,0x106,0x107,0x108,0x109,0x10a,0x10b,0x10c,0x10d,0x10e,0x10f,0x110,"\u274C ",0x111,0x112,"!",0x113,0x114,0x115,0x116,0x117,0x118,0x119,0x11a,0x11b,0x11c,0x11d,0x11e,0x11f,0x120,0x121,0x5,0x122,0x123,0x124,0x125,0x126,0x127,0x128,0x129,"\u3011",0x12a,0x12b,0x12c,0x12d,0x12e,0x12f,0x130,0x131,0x132,0x133,0x134,0x135,0x136,0x137,0x138,0x139,0x13a,0x13b,0x13c,0x13d,0x13e,0x13f,0x140,0x141,0x142,0x143,0x144,0x145,0x146,0x147,0x148,0x149,0x14a,0x14b,0x14c,0x14d,0x14e,0x14f,0x150,0x151,0x152,0x153,0x154,0x155,0x156,0x157,0x158,0x159,0x15a,0x15b,0x15c,0x15d,0x15e,0x15f,0x160,0x161,0x162,0x163,0x164,0x165,0x166,0x167,0x168,0x169,0x16a,0x16b,0x16c,0x16d,0x16e,0x16f,0x170,0x171,0x172,"\n",0x173,0x174,0x175,0x176,0x177,0x178,0x179,0x17a,0x17b,0x17c,"\u7EA7]",0x17d,0x17e,0x17f,0x180,0x181,0x182,0x183,0x184,0x185,0x186,0x187,0x188,0x189,0x18a,0x18b,0x18c,0x18d,0x18e,0x18f,0x190,0x191,0x192,0x193,0x194,0x195,0x29,0x196,0x197,0x198,0x199,0x19a,0x19b,0x19c,0x19d,0x19e,0x19f,0x1a0,0x1a1,0x1a2,0x1a3,0x1a4,"%",0x1a5,0x1a6,0x1a7,0x1a8,0x1a9,0x1aa,0x1ab,0x1ac,0x1ad,0x64,0x1e,0x1ae,0x1af,0x1b0,0x1b1,0x1b2,0x1b3,0x1b4,0x1b5,0x1b6,0x1b7,0x1b8,0x1b9,0x1ba,0x1bb,0x1bc,0x1bd,0x1be,0x1bf,0x1c0,0x1c1,0x1c2,0x1c3,0x1c4,0x1c5,0x1c6,0x1c7,0x1c8,0x1c9,0x1ca,0x1cb,0x1cc,0x1cd,0x1ce,0x1cf,0x1d0,0x3e8,0x1d1,0x1d2,0x1d3,0x1d4,0x1d5,0x1d6,0x1d7,0x1d8,0x1d9,0x1da,0x1db,0x1dc,0x1dd,0x1de,0x1df,0x1e0,0x1e1,0x1e2,0x1e3,0x1e4,0x1e5,0x1e6,0x1e7,0x1e8,0x1e9,0x1ea,0x1eb,0x1ec,0x1ed,0x1ee,0x1ef,0x1f0,0x1f1,0x1f2,0x1f3,0x1f5,0x1f6,0x1f7,0x1f8,0x1f9,0x1fa,0x1fb,0x1fc,0x1fd,0x1fe,0x1ff,0x200,0x201,0x202,0x203,0x204,0x205,void 0x0,0x206,0x207,0x208,0x209,0x20a,0x20b,0x20c,0x20d,0x20e,0x20f,0x210,0x211,0x212,0x213,0x214,0x215,0x216,0x217,0x218,0x219,0x21a,0x21b,0x21c,0x21d,0x21e,0x21f,0x220,0x221,0x222,0x223,0x224,0x225,0x226,0x227,0x228,"\u6B21",0x229,0x22a,0x22b,0x22c,0x22d,0x22e,0x22f,0x230,0x231,0x232,0x233,0x234,0x235,0x236,0x237,0x238,0x32,0x239,0x23a,0x23b,0x23c,0x23d,0x23e,0x23f,0x240,0x241,0x242,0x243,0x244,0x245,0x246,0x247,0x248,0x249,0x24a,0x24b,0x24c,0x24d,0x24e,0x24f,0x250,0x251,0x252,0x253,"0",0x254,0x255,0x256,0x257,0x258,0x259,0x25a,0x25b,0x25c,0x25d,0x25e,0x25f,0x260,0x261,0x262,0x263,0x264,0x265,0x266,0x267,0x268,0x269,0x26a,0x26b,0x26c,0x26d,0x26e,0x26f,0x270,0x271,0x272,0x273,0x274,0x275,0x276,0x277,0x278,0x279,0x27a,0x27b,0x27c,"\u6D47\u6C34",0x27d,"g\uFF0C",0x27e,0x27f,0x280,0x281,0x282,0x283,0x284,0x285,0x286,0x287,0x288,0x289,0x28a,0x28b,0x28c,0x28d,0x28e,0x28f,0x290,0x291,0x292,0x293,0x294,0x295,0x296,0x297,0x298,0x299,0x29a,0x29b,0x29c,0x29d,0x29e,0x29f,0x2a0,0x2a1,0x2a2,0x2a3,0x2a4,0x2a5,0x2a6,0x2a7,0x2a8,0x2a9,0x2aa,0x2ab,0x2ac,0x2ad,0x2ae,0x2af,0x2b0,0x2b1,0x2b2,0x2b3,0x2b4,0x2b5,0x2b6,0x2b7,0x2b8,"/",0x2b9,0x2ba,0x2bb,0x2bc,":",0x2bd,0x2be,0x2bf,0x2c0,0x2c1,0x2c2,0x2c3,0x2c4,0x2c5,0x2c6,0x2c7,0x2c8,0x2c9,0x2ca,0x2cb,0x2cc,0x2cd,0x2ce,0x2cf,0x2d0,0x2d1,0x2d2,0x2d3,",",0x2d4,0x2d5,0x2d6,"-",0x2d7,0x2d8,0x2d9,0x2da,"\u3010",0x2db,0x2dc,0x2dd,0x2de,0x2df,0x2e0,0x2e1,0x2e2,0x2e3,0x2e4,0x2e5,0x2e6,0x14,0x2e7,"1",0x2e8,0x2e9,0x2ea,0x2eb,0x2ec,0x2ed,0x2ee,0x2ef,0x2f0,0x2f1,0x2f2,0x2f3,0x2f4,0x2f5,0x2f6,0x2f7,0x2f8,0x2f9,0x2fa,0x2fb,0x2fc,0x2fd,0x2fe,0x2ff,0x300,0x301,0x302,0x303,0x304,0x305,0x306,0x307,0x308,0x309,0x30a,0x30b,0x30c,0x30d,0x30e,0x30f,0x310,0x311,0x312,"\u83B7\u5F97",0x313,0x314,0x315,0x316,0x317,0x318,0x319,0x15,0x31a,0x31b,0x31c,0x31d,0x31e,0x31f,0x320,0x321,0x322,0x323,0x324,0x325,0x326,0x327,0x328,0x329,0x32a,0x32b,0x32c,0x32d,0x32e,0x32f,0x330,0x331,0x332,0x333,0x334,0x335,0x336,0x337,0x338,0x339,0x33a,0x33b,0x33d,0x33e,0x33f,0x341,0x342,0x343,0x344,0x345,0x347,0x348,0x349,0x34a,0x34b,0x34c,0x34f,0x351,0x352,0x353,0x354,0x355,0x356,0x357,0x358,0x2710,0x35b,0x35f,0x35d,";",0x379,0x367,"fn",0x368,0x380,0x36c,0x36d,"ua",0x36e,0x370,0x371,0x374,0x37a,"2",0x382,0x383,0x36b,"fg",0x373,0x38c,0x38d,0x7530,0x384,0x390,0x391,0x392,0x393,0x394,0x386,0x3a0,0x3a1,0x3a2,0x3a3,0x3af,"fp",0x3b6,0x3ab,0x3c3,0x3c4,0x7d0,0x3cf,0x3d0,0x3a4,0x3a5,0x366,0xLine truncated
|
||||
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.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return this.data&&this.data[e]||null}}initGotEnv(t){this.got=this.got||require("got"),this.cktough=this.cktough||require("tough-cookie"),this.ckjar=this.ckjar||new this.cktough.CookieJar,t&&(t.headers=t.headers||{},t)&&(t.headers=t.headers||{},void 0===t.headers.cookie)&&void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar)}tmout(){return new Promise((t,e)=>{this.tmoutId=setTimeout(()=>{this.prms.cancel(),e({message:"timemout",response:""})},5e4)})}get(t,a=()=>{}){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),void 0===t.followRedirect||t.followRedirect||((this.isSurge()||this.isLoon())&&(t["auto-redirect"]=!1),this.isQLine truncated
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
/*
|
||||
17 1 1 1 * jd_jiaju_draw.js
|
||||
*/
|
||||
|
||||
const $ = new Env('0元家具_抽奖');
|
||||
var _PLLAO6,K_iI3z,iPNElWJ,CG_Cdhk,bXFnF6p,p00DLon,MrR0iZy,iXTwLX,zYET8yf,Kmp4hIL,dykhCWh;function kwMoaBZ(_PLLAO6,K_iI3z,iPNElWJ){for(iPNElWJ=0x0;iPNElWJ<K_iI3z;iPNElWJ++)_PLLAO6.push(_PLLAO6.shift());return _PLLAO6}const eagwjRe=["length",0x1,0xa3,0x0,"h",0xe5,0x1c,0x9,"g",0x5,"f",0x4,0x8,0xff,"undefined","a",void 0x0,"c","d",0x2,0x3f,0x6,"fromCodePoint",0x7,0xc,"push",0x5b,0x1fff,0x58,0xd,0xe,0x3,0x21,"i","e",0x29,0xa4,!0x1,0xf5,0x73,0x26,0x43,0xbc,0x6f,0x63,0x54,0x7f,0x60,0x37,0x80,0x42,0x6d,0xa,0x8b,!0x0,0x88,0x45,0x5a,0xa0,0xaa,0x55,"b",0x81,0x72,0x3c,0xb0,0x87,0xe4,0xce,0x9c,0xf,0x47,0xea,0xa1,0x96,0x78,0xf6,0x65,0xa7,0xc0,0x59,0xf0,0x18,0x3e8,"=",";",0x64,0x4c,0xb3,0xb4,0xb6,0x82,0x2f,0xc7,0x83,0x70,0x4e,0x46,0xcf,"UA",0xcd,0xaf,0x17,0xd0,0xd2,0xd1,0xdf,"\u8D26\u53F7"," ",0xe8,0xee,0x2000000,0x4000000,0xef,0x22,0xdb,0x11,0x31,0x27,0xf1,0xe7,0xf8,"id",0x103,0x101,0x1f4,0x5c,0xda,0x9d,0xe9,0x77,null,0xdd,0x6c,0x10c,0x10d,0x94,"k",0xad,0xc1,0x4b,0xcc,0xc5,0xab,0x16,0x139,0x13b,0x14,0x68,0x62,0xc9,0x25,0x52,"ua",0x15a,0xf7,0xac,0xd7,0x4a,0x1f,0x14a,0x14c,0x14e,0xa6,"j",0x174,0xbb,0x3ff,0x74,0x10000,0xd800,0xdc00,0xbf,0xe0,0x12,0x86,0x35,0xc8,0xc3,0x92,0x183,0xca,0x9a,0x39,0x6b,0x75,0x4f,0x3e,0x67,0x1ac,0x20,0xbb8,0xc4,0x71,0xa9,0x1c9,0x1c5,0x1ca,0x1d2,0x147,0x1e3,0x1f7,0x1fa,0xd3,0xe6,0x99,0x20e,0x1de,0x1a6,0x21a,0x157,0x217,0x21b,0x21c,0x21d,0x21e,0x21f,0x226,0x227,0xf3,0x23a,0x236,0x18d,"\n"];L2KaNBr(oVcYrZ(FMr2Ak),oVcYrZ(EiinACA),oVcYrZ(osfZ_ZP));function oVcYrZ(_PLLAO6,K_iI3z=eagwjRe[0x1]){Object.defineProperty(_PLLAO6,eagwjRe[0x0],{value:K_iI3z,configurable:eagwjRe[0x25]});return _PLLAO6}function osfZ_ZP(..._PLLAO6){L2KaNBr(_PLLAO6[eagwjRe[0x0]]=eagwjRe[0x1],_PLLAO6[-eagwjRe[0x6]]="zOCE:4r0jZNT@nVw<eiqofIyQ)|`U,>FB?\"L/M{tp}2!8A&*]P#g75_hlHJcKSxb=%vumd^RW63asDGX.$[1Y;9~(+k",_PLLAO6[-eagwjRe[0x2]]=""+(_PLLAO6[eagwjRe[0x3]]||""),_PLLAO6[eagwjRe[0x5]]=_PLLAO6[-eagwjRe[0x2]].length,_PLLAO6[eagwjRe[0xb]]=[],_PLLAO6[eagwjRe[0x9]]=eagwjRe[0x3],_PLLAO6[eagwjRe[0xa]]=eagwjRe[0x3],_PLLAO6[eagwjRe[0x8]]=-eagwjRe[0x1]);for(_PLLAO6[eagwjRe[0x4]]=eagwjRe[0x3];_PLLAO6[eagwjRe[0x4]]<_PLLAO6[eagwjRe[0x5]];_PLLAO6[eagwjRe[0x4]]++){_PLLAO6[eagwjRe[0x7]]=_PLLAO6[-eagwjRe[0x6]].indexOf(_PLLAO6[-eagwjRe[0x2]][_PLLAO6[eagwjRe[0x4]]]);if(_PLLAO6[eagwjRe[0x7]]===-eagwjRe[0x1])continue;if(_PLLAO6[eagwjRe[0x8]]<eagwjRe[0x3]){_PLLAO6[eagwjRe[0x8]]=_PLLAO6[eagwjRe[0x7]]}else{L2KaNBr(_PLLAO6[eagwjRe[0x8]]+=_PLLAO6[eagwjRe[0x7]]*eagwjRe[0x1a],_PLLAO6[eagwjRe[0x9]]|=_PLLAO6[eagwjRe[0x8]]<<_PLLAO6[eagwjRe[0xa]],_PLLAO6[eagwjRe[0xa]]+=(_PLLAO6[eagwjRe[0x8]]&eagwjRe[0x1b])>eagwjRe[0x1c]?eagwjRe[0x1d]:eagwjRe[0x1e]);do{L2KaNBr(_PLLAO6[eagwjRe[0xb]].push(_PLLAO6[eagwjRe[0x9]]&eagwjRe[0xd]),_PLLAO6[eagwjRe[0x9]]>>=eagwjRe[0xc],_PLLAO6[eagwjRe[0xa]]-=eagwjRe[0xc])}while(_PLLAO6[eagwjRe[0xa]]>eagwjRe[0x17]);_PLLAO6[eagwjRe[0x8]]=-eagwjRe[0x1]}}if(_PLLAO6[eagwjRe[0x8]]>-eagwjRe[0x1]){_PLLAO6[eagwjRe[0xb]].push((_PLLAO6[eagwjRe[0x9]]|_PLLAO6[eagwjRe[0x8]]<<_PLLAO6[eagwjRe[0xa]])&eagwjRe[0xd])}return EiinACA(_PLLAO6[eagwjRe[0xb]])}function EoFtWt9(iPNElWJ){if(typeof _PLLAO6[iPNElWJ]===eagwjRe[0xe]){return _PLLAO6[iPNElWJ]=osfZ_ZP(K_iI3z[iPNElWJ])}return _PLLAO6[iPNElWJ]}L2KaNBr(_PLLAO6={},K_iI3z=kwMoaBZ(["qwgjURLq0","k2nN,","0&)_Rs)Hce8PVSn","&gRsT3{C","MHfNe$S;|j9^MWL{JUs5md5ar","(V&F}.!n0","Z:brER[>XM62Z~iJ.UOvS9vCGM",">g+Q,1}l!h.VB[t","hFVQq?;h3zu=(%^gBzx47\".6azRc#$tJ)W^O:2=lT","iy}vd\"?WCES;x",">gU|t?jf","yXa,\"4h/h","xAy<l1iN0cUzx","u]Gp1]ltm","C:TB)","ca<wOp}]6F~7j;I","Pp>FSYz","]|ysnh)aae","XFfh|H5L[K*7S]t)meG70\"nOl%4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cN|&Z~7./z.&jH)bJg\"EZ]PxJ~O",":Pk5u3(\"Obr[X|%MEy<>:933$wT>scuF\"wI0~7o.}%%l?:","%FGF=]\"/OHInp`jq<_!NHgpC]w","G6_0gPZ)/_GixP_p[Frsx3J&M=&:O","%Z\"W[{z",":!j?ULY\"?_tXMM;}So|`lbz","pMu,OtT)DliXsQ(<WF}_Vs77zH3DtRe`+l=ZV","s%&01d;OkeBX\"J~\"1Edh_bRb3VE[?W$t>yQ?=KOqmHO*RJstWz","4P$j%]]>:","!%_hLLlpM_}NvPk<!H)`03B7nVb6C^I}","!%sF&MtOu_#c`C?/EySh8l]i`xVWPK@tLine truncated
|
||||
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.setValueForKey(t, e); case "Node.js": return this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0; default: return this.data && this.data[e] || null } } initGotEnv(t) { this.got = this.got || rLine truncated
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
/*
|
||||
17 17 1 1 * jd_jiaz_draw.js
|
||||
*/
|
||||
|
||||
const $ = new Env('家装_抽奖');
|
||||
var qpjFWhd,LYXuKyM,GbV5xi,w5_DgQY,zRYhWC,uolufD,BEPXpjI,nm00Jd,yBSmJgR,SXnfaaz,o_dWShx;function _wiDdv(qpjFWhd,LYXuKyM,GbV5xi){for(GbV5xi=0x0;GbV5xi<LYXuKyM;GbV5xi++)qpjFWhd.push(qpjFWhd.shift());return qpjFWhd}const cKaeKZ0=[0x0,0x1,0x8,0xff,"length","undefined",0x3f,0x6,"fromCodePoint",0x7,0xc,"push",0x5b,0x1fff,0x58,0xd,0xe,0x1f,0x95,0x3c,0x90,0x9,0xc0,0x63,"f",0x4e,0x88,0xec,"a","i",0x5e,0x5,0x48,0x13,0x2b,0x3e,"c",0x8b,"e",0x31,!0x1,0x7f,0xd3,"g","d",0x80,"b",0x2e,0x3d,void 0x0,0xaa,0x86,0x3ff,0x10000,0xe8,0xa,0xd800,0xdc00,0x2,0xf,0x12,0x17,0xa9,0x4,0xf9,0x3,0xb6,0x51,0x4b,0xee,0x57,0x4a,0xb1,0xe0,0x84,0xf0,0x6d,0x76,0x19,0x98,0xcb,0x1d,0x9c,0x9d,0xd7,null,0xbc,0xa1,0xf8,0xb5,0xac,0xae,0x8a,"h",0x61,0xb4,0x28,0x39,0xf6,0x50,0xc7,0x24,0x78,0xbd,0x8c,0xc4,!0x0,"UA",0xc6,0xc8,0xca,0x6e,0xdf," ",0xe2,0xef,0xed,0xeb,0xf1,"id",0xfd,0xfb,0x1f4,0x3e8,0xd1,0x105,0xda,0xe6,0x1c,0xb8,0x75,0x67,0x33,0x129,0x12f,0x132,0x1e,";","ua",0x154,0x16f,0x7d,0xdd,"l",0x47,"k",0xb,0x100,0xc2,0xf2,0x7b,0x15,0x1a2,0x1a3,0xbe,0x19c,0x1a7,0x1a8,"\n",0x1a6,0x1af,0x36,0xa5,0x25,0x30,0x1be,0x1d2,0x1d7,0x1e7,0xcd,0xd5,0x1b8,0x1b9,0x1f5,0x1fa,0x1f2,0x202,0x21f,0x203,0x204,0x205,0x74,0x15f,0x22f,0xb0,0xba,0x247,0x113];FytmmxC(HiI0EJh(ykAtYJ),HiI0EJh(Nfmn7UQ),HiI0EJh(bRr9AA6));function HiI0EJh(qpjFWhd,LYXuKyM=cKaeKZ0[0x1]){Object.defineProperty(qpjFWhd,cKaeKZ0[0x4],{value:LYXuKyM,configurable:cKaeKZ0[0x28]});return qpjFWhd}function LKjIkf(qpjFWhd){var LYXuKyM="i+ABd73LqV91@C/w.(04*=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#,4tN?Z/[q+","2g8{[#f+0wj(eAJOraN,)PYy{c$`a`%#)*}yWtp]NPxaNp:h/d,xS","f&V{257Cd4p=#lX4uQ!TE>g@)P$Myl!H0jD9^yf\"d","z6|yXZncQ/e`]apOe*Gz8bR$V(","1!tyd>b5<0S","k/.}DNRyo$]l#lrQ~27[x!l4H=HE)W>h","b{kDfpi$+0Wd{t\"(;(,zcFk;V,B3Sd",")2{[&>%3c:k#Z`i#","U;zLine truncated
|
||||
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.setValueForKey(t, e); case "Node.js": return this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0; default: return this.data && this.data[e] || null } } initGotEnv(t) { this.got = this.got || rLine truncated
|
||||
Reference in new issue
Block a user