-
Notifications
You must be signed in to change notification settings - Fork 90
/
OneKeyVip.user.js
5185 lines (5078 loc) · 398 KB
/
OneKeyVip.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ==UserScript==
// @name 【玩的嗨】VIP工具箱,夸克网盘直链批量获取,全网VIP视频免费破解去广告,一站式音乐搜索下载,获取B站封面,下载B站视频等众多功能聚合 长期更新,放心食用
// @namespace https://www.wandhi.com/
// @description 🔥功能介绍🔥:🎉 1、Vip视频解析;🎉 2、一站式音乐搜索解决方案;🎉 3、bilibili视频封面获取;🎉 4、bilibili视频下载(已支持分P下载);🎉 5、夸克网盘直链批量获取;🎉 6、商品历史价格展示(一次性告别虚假降价);🎉 7、优惠券查询;🎉 8、CSDN页面、剪切板清理;🎉 9、页面自动展开(更多网站匹配中,欢迎提交想要支持的网站) 🎉 10、YouTube视频下载🎉 11、中间页自动跳转;🎉 12、搜索引擎快速跳转
// @license MIT
// @version 4.9.41
// @author MaxZhang
// @include *://item.taobao.com/*
// @include *://s.taobao.com/search*
// @include *://list.tmall.com/search_product.htm*
// @include *://detail.tmall.com/*
// @include *://chaoshi.detail.tmall.com/*
// @include *://detail.tmall.hk/*
// @include *://item.yiyaojd.com/*
// @include *://item.jd.com/*
// @include *://search.jd.com/*
// @include *://item.jd.hk/*
// @include *://search.kaola.com/*
// @include *://goods.kaola.com*
// @include *://detail.vip.com/detail-*
// @include *://product.suning.com/*
// @exclude *://vip.wandhi.com/*
// @match *://*blog.csdn.net/*
// @match *://*download.csdn.net/*
// @match *://*c.pc.qq.com/middlem*
// @match *://*pan.baidu.com/disk/main*
// @match *://link.csdn.net/*
// @match *://link.zhihu.com/*
// @match *://browser.gwdang.com/*
// @match *://*www.jianshu.com/go-wild*
// @match *://*gitee.com/link*
// @match *://*juejin.cn/?target*
// @match *://www.aliyundrive.com/drive*
// @match *://www.alipan.com/drive/*
// @match *://*.youtube.com/watch?v=*
// @match *://support.qq.com/products*
// @match *://weibo.cn/sinaurl*
// @match *://afdian.net/link*
// @match *://*oschina.net/action/GoToLink*
// @match *://jump2.bdimg.com/safecheck*
// @match *://www.douban.com/link2/?url*
// @match *://link.17173.com*
// @match *://search.suning.com/*
// @match *://pan.quark.cn/*
// @match *://docs.qq.com/scenario/link*
// @match *://mail.qq.com/cgi-bin/readtemplate*
// @match *://cloud.tencent.com/developer/tools/blog-entry*
// @match *://link.uisdc.com/*
// @match *://*.tudou.com/listplay/*
// @match *://*.tudou.com/albumplay/*
// @match *://*.tudou.com/programs/view/*
// @match *://*.tudou.com/v*
// @match *://*.mgtv.com/b/*
// @match *://film.sohu.com/album/*
// @match *://tv.sohu.com/v/*
// @match *://*.acfun.cn/v/*
// @match *://*.bilibili.com/video/*
// @match *://*.bilibili.com/anime/*
// @match *://*.bilibili.com/bangumi/play/*
// @match *://*.pptv.com/show/*
// @match *://*.baofeng.com/play/*
// @match *://*.wasu.cn/Play/show*
// @match *://v.yinyuetai.com/video/*
// @match *://v.yinyuetai.com/playlist/*
// @match *://*.wasu.cn/Play/show/*
// @match *://music.taihe.com/song*
// @match *://music.163.com/song*
// @match *://music.163.com/m/song*
// @match *://y.qq.com/*
// @match *://*.kugou.com/*
// @match *://*.kuwo.cn/*
// @match *://*.xiami.com/*
// @match *://music.taihe.com/*
// @match *://*.1ting.com/player*
// @match *://www.qingting.fm/*
// @match *://www.lizhi.fm/*
// @match *://music.migu.cn/*
// @match *://www.shangxueba.com/ask/*.html
// @match *://www.ximalaya.com/*
// @match *://www.shangxueba.com/ask/*.html
// @match *://pan.baidu.com/disk/home*
// @match *://yun.baidu.com/disk/home*
// @match *://pan.baidu.com/s/*
// @match *://yun.baidu.com/s/*
// @match *://pan.baidu.com/share/link*
// @match *://yun.baidu.com/share/link*
// @match *://wenku.baidu.com/view/*
// @match *://settings.wandhi.com/*
// @match *://m.youku.com/v*
// @match *://m.youku.com/a*
// @match *://v.youku.com/v_*
// @match *://v.youku.com/pad_show*
// @match *://*.iqiyi.com/v_*
// @match *://*.iqiyi.com/w_*
// @match *://*.iqiyi.com/a_*
// @match *://*.iqiyi.com/adv*
// @match *://*.iq.com/play/*
// @match *://*.le.com/ptv/vplay/*
// @match *://v.qq.com/x/cover/*
// @match *://v.qq.com/x/page/*
// @match *://v.qq.com/*play*
// @match *://v.qq.com/cover*
// @match *://c.pc.qq.com/ios*
// @match *://www.v2ex.com/t/*
// @match *://*.nodeseek.com/jump*
// @match *://*.zhihu.com/question*
// @match *://www.baidu.com/*
// @match *://www.google.com/*
// @match *://www.sogou.com/*
// @match *://www.so.com/s*
// @match *://cn.bing.com/search*
// @match *://sspai.com/link*
// @match *://*.kdocs.cn/office/link*
// @match *://ispacesoft.com/*.html
// @match *://tv.wandhi.com/go.html*
// @match *://tv.wandhi.com/check.html
// @match *://*.xiaohongshu.com/explore*
// @match *://www.yuque.com/r/goto*
// @match *://blog.51cto.com/transfer*
// @match *://r.wjx.com/redirect.aspx*
// @match *://www.infoq.cn/link*
// @match *://open.work.weixin.qq.com/wwopen/uriconfirm?uri=
// @require https://lib.baomitu.com/jquery/1.12.4/jquery.min.js
// @require https://lib.baomitu.com/limonte-sweetalert2/11.4.7/sweetalert2.all.min.js
// @require https://lib.baomitu.com/echarts/4.6.0/echarts.min.js
// @require https://lib.baomitu.com/layer/2.3/layer.js
// @require https://lib.baomitu.com/qrcode-generator/1.4.4/qrcode.min.js
// @require https://lib.baomitu.com/FileSaver.js/2.0.5/FileSaver.min.js
// @require https://lib.baomitu.com/viewerjs/1.11.3/viewer.min.js
// @require https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/react/18.2.0/umd/react.production.min.js
// @require https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/react-dom/18.2.0/umd/react-dom.production.min.js
// @require https://registry.npmmirror.com/@douyinfe/semi-ui/2.51.0/files/dist/umd/semi-ui.min.js
// @grant GM_setClipboard
// @grant unsafeWindow
// @grant GM_xmlhttpRequest
// @grant GM_info
// @grant GM_cookie
// @grant GM_addStyle
// @grant GM.addStyle
// @grant GM_getValue
// @grant GM_setValue
// @grant GM.getValue
// @grant GM.setValue
// @grant GM_notification
// @grant GM_openInTab
// @grant GM_deleteValue
// @grant GM_registerMenuCommand
// @grant GM_unregisterMenuCommand
// @grant GM_download
// @connect api.wandhi.com
// @connect api.huizhek.com
// @connect cdn.jsdelivr.net
// @connect tool.manmanbuy.com
// @connect gwdang.com
// @connect scriptcat.org
// @connect quark.cn
// @connect openapi.baidu.com
// @connect localhost
// @connect pan.baidu.com
// @connect api.bilibili.com
// @compatible firefox
// @compatible chrome
// @compatible opera safari edge
// @compatible safari
// @compatible edge
// @run-at document-end
// @antifeature referral-link 此提示为GreasyFork代码规范要求含有查券功能的脚本必须添加,实际使用无任何强制跳转,代码可查,请知悉。
// ==/UserScript==
(function(global, factory) {
"object" == typeof exports && "undefined" != typeof module ? factory(require("react-dom"), require("sweetalert2"), require("@douyinfe/semi-ui"), require("viewerjs"), require("react")) : "function" == typeof define && define.amd ? define([ "react-dom", "sweetalert2", "@douyinfe/semi-ui", "viewerjs", "react" ], factory) : factory((global = "undefined" != typeof globalThis ? globalThis : global || self).ReactDOM, global.Swal, global.SemiUI, global.Viewer, global.React);
})(this, (function(ReactDOM, Swal, semiUi, Viewer, React) {
"use strict";
var ReactDOM__default, Swal__default, Viewer__default, React__default, extendStatics, update_key, Min, Hour, Day, Week, BrowerType, Logger, LogLevel, VersionResult, Core, VersionCompar, Config, AjaxOption, Http, HttpHeaders, Route, css_248z$a, Common, PluginBase, SiteEnum, UpdateService, EventHelper, Runtime, BaseCoupon, VpCoupon, SuningCoupon, JdCoupon, TaoCoupon, DefCoupon, LinesOption, css_248z$9, MsgInfo, PromoInfo, HistoryService, KaolaCoupon, css_248z$8, sAlert, commonjsGlobal, fingerprint2, headStyle, isChrome, isIE, hasWeakMap, ua, isNativeObject, checkFunctions, DynamicDetails, SignInfo, Base64, GwdService, GwdHelper, css_248z$7, TaoBaoService, container, Container, css_248z$6, ConfigEnum, Toast, BiliImgService, Menu$2, jks, MovieService, JdService, UrlHelper, MusicService, ItemType, Tao, ListService, css_248z$5, CsdnAdService, Alert, Menu$1, WenKuService, LinkJumpService, css_248z$4, _GwdService, AutoExpandService, BIliTools, BiliMobileService, AliyunPanToken, css_248z$3, css_248z$2, MfbMenu, MfbModel, YoutubeService, SettingService, ControlMenuService, SearchService, QuarkFileResponse, Quark, NetDiskDirectService, AdClearService, css_248z$1, ImgViewService, css_248z, ZhihuService, Menu, XhsService, SettingUI, SettingUIService, OneKeyVipInjection;
function _interopDefaultLegacy(e) {
return e && "object" == typeof e && "default" in e ? e : {
default: e
};
}
function __extends(d, b) {
function __() {
this.constructor = d;
}
extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype,
new __);
}
function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))((function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : function adopt(value) {
return value instanceof P ? value : new P((function(resolve) {
resolve(value);
}));
}(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
}));
}
function __generator(thisArg, body) {
var f, y, t, g, _ = {
label: 0,
sent: function() {
if (1 & t[0]) throw t[1];
return t[1];
},
trys: [],
ops: []
};
return g = {
next: verb(0),
throw: verb(1),
return: verb(2)
}, "function" == typeof Symbol && (g[Symbol.iterator] = function() {
return this;
}), g;
function verb(n) {
return function(v) {
return function step(op) {
if (f) throw new TypeError("Generator is already executing.");
for (;_; ) try {
if (f = 1, y && (t = 2 & op[0] ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y),
0) : y.next) && !(t = t.call(y, op[1])).done) return t;
switch (y = 0, t && (op = [ 2 & op[0], t.value ]), op[0]) {
case 0:
case 1:
t = op;
break;
case 4:
return _.label++, {
value: op[1],
done: !1
};
case 5:
_.label++, y = op[1], op = [ 0 ];
continue;
case 7:
op = _.ops.pop(), _.trys.pop();
continue;
default:
if (!(t = _.trys, (t = t.length > 0 && t[t.length - 1]) || 6 !== op[0] && 2 !== op[0])) {
_ = 0;
continue;
}
if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) {
_.label = op[1];
break;
}
if (6 === op[0] && _.label < t[1]) {
_.label = t[1], t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2], _.ops.push(op);
break;
}
t[2] && _.ops.pop(), _.trys.pop();
continue;
}
op = body.call(thisArg, _);
} catch (e) {
op = [ 6, e ], y = 0;
} finally {
f = t = 0;
}
if (5 & op[0]) throw op[1];
return {
value: op[0] ? op[1] : void 0,
done: !0
};
}([ n, v ]);
};
}
}
function __read(o, n) {
var i, r, ar, e, m = "function" == typeof Symbol && o[Symbol.iterator];
if (!m) return o;
i = m.call(o), ar = [];
try {
for (;(void 0 === n || n-- > 0) && !(r = i.next()).done; ) ar.push(r.value);
} catch (error) {
e = {
error: error
};
} finally {
try {
r && !r.done && (m = i.return) && m.call(i);
} finally {
if (e) throw e.error;
}
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
}
function styleInject(css, ref) {
var insertAt, head, style;
void 0 === ref && (ref = {}), insertAt = ref.insertAt, css && "undefined" != typeof document && (head = document.head || document.getElementsByTagName("head")[0],
(style = document.createElement("style")).type = "text/css", "top" === insertAt && head.firstChild ? head.insertBefore(style, head.firstChild) : head.appendChild(style),
style.styleSheet ? style.styleSheet.cssText = css : style.appendChild(document.createTextNode(css)));
}
function createCommonjsModule(fn, module) {
return fn(module = {
exports: {}
}, module.exports), module.exports;
}
function isPhantomjs() {
var err = "";
try {
null[0]();
} catch (e) {
err = e;
}
return err.stack.indexOf("phantomjs") > -1;
}
function IsSupportLocalStorage() {
try {
return localStorage.a = "b", "b" === localStorage.a;
} catch (e) {
return !1;
}
}
function IsSupportWebGL() {
var webglContext, i;
try {
return (webglContext = document.createElement("canvas").getContext("webgl")) && (i = webglContext.getExtension("WEBGL_lose_context")) && i.loseContext(),
!!webglContext;
} catch (e) {
return !1;
}
}
ReactDOM__default = _interopDefaultLegacy(ReactDOM), Swal__default = _interopDefaultLegacy(Swal),
Viewer__default = _interopDefaultLegacy(Viewer), React__default = _interopDefaultLegacy(React),
extendStatics = function(d, b) {
return (extendStatics = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(d, b) {
d.__proto__ = b;
} || function(d, b) {
for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
})(d, b);
}, update_key = "isUpdate", Min = 60, Hour = 60 * Min, Day = 24 * Hour, Week = 7 * Day,
function(BrowerType) {
BrowerType[BrowerType.Edge = 0] = "Edge", BrowerType[BrowerType.Edg = 1] = "Edg",
BrowerType[BrowerType.Chrome = 2] = "Chrome", BrowerType[BrowerType.Firefox = 3] = "Firefox",
BrowerType[BrowerType.Safiri = 4] = "Safiri", BrowerType[BrowerType.Se360 = 5] = "Se360",
BrowerType[BrowerType.Ie2345 = 6] = "Ie2345", BrowerType[BrowerType.Baidu = 7] = "Baidu",
BrowerType[BrowerType.Liebao = 8] = "Liebao", BrowerType[BrowerType.UC = 9] = "UC",
BrowerType[BrowerType.QQ = 10] = "QQ", BrowerType[BrowerType.Sogou = 11] = "Sogou",
BrowerType[BrowerType.Opera = 12] = "Opera", BrowerType[BrowerType.Maxthon = 13] = "Maxthon";
}(BrowerType || (BrowerType = {})), Logger = function() {
function Logger() {}
return Logger.log = function(msg, group, level) {}, Logger.debug = function(msg, group) {
void 0 === group && (group = "debug"), this.log(msg, group, LogLevel.debug);
}, Logger.info = function(msg, group) {
void 0 === group && (group = "info"), this.log(msg, group, LogLevel.info);
}, Logger.warn = function(msg, group) {
void 0 === group && (group = "warning"), this.log(msg, group, LogLevel.warn);
}, Logger.error = function(msg, group) {
void 0 === group && (group = "error"), this.log(msg, group, LogLevel.error);
}, Logger;
}(), function(LogLevel) {
LogLevel[LogLevel.debug = 0] = "debug", LogLevel[LogLevel.info = 1] = "info", LogLevel[LogLevel.warn = 2] = "warn",
LogLevel[LogLevel.error = 3] = "error";
}(LogLevel || (LogLevel = {})), function(VersionResult) {
VersionResult[VersionResult.less = -1] = "less", VersionResult[VersionResult.equal = 0] = "equal",
VersionResult[VersionResult.greater = 1] = "greater", VersionResult[VersionResult.incomparable = NaN] = "incomparable";
}(VersionResult || (VersionResult = {})), Core = function() {
function Core() {
this.url = Core.currentUrl();
}
return Core.Render = function(element, id) {
var script, container = document.getElementById(id);
container || ((script = unsafeWindow.window.document.createElement("div")).id = id,
unsafeWindow.window.document.head.append(script), container = document.getElementById(id)),
ReactDOM__default.default.render(element, container);
}, Core.appendTo = function(selector, html) {
$(selector).append(html);
}, Core.prepend = function(selector, html) {
$(selector).prepend(html);
}, Core.lazyload = function(callback, time) {
return void 0 === time && (time = 5), __awaiter(this, void 0, Promise, (function() {
var _this = this;
return __generator(this, (function(_a) {
return [ 2, new Promise((function(resolve) {
setTimeout((function() {
return __awaiter(_this, void 0, void 0, (function() {
return __generator(this, (function(_a) {
switch (_a.label) {
case 0:
return [ 4, callback() ];
case 1:
return _a.sent(), resolve(), [ 2 ];
}
}));
}));
}), 1e3 * time);
})) ];
}));
}));
}, Core.autoLazyload = function(is_ok, callback, time) {
return void 0 === time && (time = 5), __awaiter(this, void 0, Promise, (function() {
var _this = this;
return __generator(this, (function(_a) {
return [ 2, new Promise((function(resolve) {
return __awaiter(_this, void 0, void 0, (function() {
return __generator(this, (function(_a) {
switch (_a.label) {
case 0:
return is_ok() ? [ 3, 1 ] : (setTimeout((function() {
Core.autoLazyload(is_ok, callback, time).then((function() {
return resolve();
}));
}), 1e3 * time), [ 3, 3 ]);
case 1:
return [ 4, callback() ];
case 2:
_a.sent(), Logger.debug("\u81ea\u52a8\u5ef6\u8fdf\u56de\u8c03\u6267\u884c\u5b8c\u6bd5,\u5ef6\u65f6\u65f6\u95f4:" + time),
resolve(), _a.label = 3;
case 3:
return [ 2 ];
}
}));
}));
})) ];
}));
}));
}, Core.sleep = function(time) {
return new Promise((function(resolve) {
setTimeout((function() {
resolve();
}), 1e3 * time);
}));
}, Core.random = function(min, max) {
var range = max - min, rand = Math.random();
return min + Math.round(rand * range);
}, Core.randStr = function(len) {
var $chars, maxPos, pwd, i;
for (void 0 === len && (len = 4), maxPos = ($chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789").length,
pwd = "", i = 0; i < len; i++) pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
return pwd;
}, Core.background = function(callback, time) {
void 0 === time && (time = 5), setInterval((function() {
callback();
}), 1e3 * time);
}, Object.defineProperty(Core, "head", {
get: function() {
return unsafeWindow.window.document.head;
},
enumerable: !1,
configurable: !0
}), Core.isNumber = function(a) {
return !Array.isArray(a) && a - parseFloat(a) >= 0;
}, Core.addUrl = function(key, url) {
GM_setValue(key, url);
}, Core.openUrl = function(key) {
this.open(GM_getValue(key));
}, Core.getPar = function(option, url) {
void 0 === url && (url = window.location.search);
var v = url.match(new RegExp("[?&]" + option + "=([^&]+)", "i"));
return null == v || v.length < 1 ? "" : v[1];
}, Core.appendCss = function(url) {
var linkCSS = document.createElement("link");
linkCSS.type = "text/css", linkCSS.rel = "stylesheet", linkCSS.href = url, Core.head.appendChild(linkCSS);
}, Core.appendCssContent = function(content) {
var Style = document.createElement("style");
Style.innerHTML = content, Core.head.appendChild(Style);
}, Core.prototype.bodyAppendCss = function(url) {
$("body").append($('<link rel="stylesheet" href="' + url + '">'));
}, Core.bodyAppend = function(html) {
$("body").append(html);
}, Core.bodyPrepend = function(html) {
$("body").prepend(html);
}, Core.appendJs = function(url) {
var linkScript = document.createElement("script");
linkScript.type = "text/javascript", linkScript.src = url, this.head.appendChild(linkScript);
}, Core.prototype.bodyAppendJs = function(url) {
$("body").append($('<script type="text/javascript" src="' + url + '"><\/script>'));
}, Core.currentUrl = function() {
return window.location.href;
}, Object.defineProperty(Core, "url", {
get: function() {
return window.location.href;
},
enumerable: !1,
configurable: !0
}), Core.inIframe = function() {
return !(!self.frameElement || "IFRAME" != self.frameElement.tagName) || (window.frames.length != parent.frames.length || self != top);
}, Core.format = function(time, fmt) {
var o, k;
for (k in void 0 === fmt && (fmt = "yyyy-MM-dd hh:mm:ss"), o = {
"M+": time.getMonth() + 1,
"d+": time.getDate(),
"h+": time.getHours(),
"m+": time.getMinutes(),
"s+": time.getSeconds(),
"q+": Math.floor((time.getMonth() + 3) / 3),
S: time.getMilliseconds()
}, /(y+)/.test(fmt) && (fmt = fmt.replace(RegExp.$1, (time.getFullYear() + "").substr(4 - RegExp.$1.length))),
o) new RegExp("(" + k + ")").test(fmt) && (fmt = fmt.replace(RegExp.$1, 1 == RegExp.$1.length ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
}, Core.sizeFormat = function(value) {
var unit, index;
return value === +value ? (unit = [ "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" ],
index = Math.floor(Math.log(value) / Math.log(1024)), "" + (value / Math.pow(1024, index)).toFixed(1) + unit[index]) : "";
}, Core.encode = function(str) {
return window.btoa(str);
}, Core.decode = function(str) {
return window.atob(str);
}, Core.open = function(url, loadInBackGround) {
if (void 0 === loadInBackGround && (loadInBackGround = !1), Core.getBrowser() == BrowerType.Safiri && "undefined" == typeof GM_openInTab) {
if (void 0 === (null === GM || void 0 === GM ? void 0 : GM.openInTab)) return void window.open(url, "_blank");
null === GM || void 0 === GM || GM.openInTab(url, loadInBackGround);
}
GM_openInTab(url, loadInBackGround);
}, Core.click = function(selector, callback) {
$(selector).on("click", callback);
}, Core.uuid = function(len, split, radix) {
var chars, uuid, i, r;
if (void 0 === len && (len = 10), void 0 === split && (split = !1), void 0 === radix && (radix = 0),
chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),
uuid = [], radix = 0 == radix ? radix || chars.length : radix, split) for (r = void 0,
uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-", uuid[14] = "4", i = 0; i < 36; i++) uuid[i] || (r = 0 | 16 * Math.random(),
uuid[i] = chars[19 == i ? 3 & r | 8 : r]); else for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
return uuid.join("");
}, Core.getBrowser = function() {
var browser = !1, userAgent = window.navigator.userAgent.toLowerCase();
return null != userAgent.match(/firefox/) ? browser = BrowerType.Firefox : null != userAgent.match(/edge/) ? browser = BrowerType.Edge : null != userAgent.match(/edg/) ? browser = BrowerType.Edg : null != userAgent.match(/bidubrowser/) ? browser = BrowerType.Baidu : null != userAgent.match(/lbbrowser/) ? browser = BrowerType.Liebao : null != userAgent.match(/ubrowser/) ? browser = BrowerType.UC : null != userAgent.match(/qqbrowse/) ? browser = BrowerType.QQ : null != userAgent.match(/metasr/) ? browser = BrowerType.Sogou : null != userAgent.match(/opr/) ? browser = BrowerType.Opera : null != userAgent.match(/maxthon/) ? browser = BrowerType.Maxthon : null != userAgent.match(/2345explorer/) ? browser = BrowerType.Ie2345 : null != userAgent.match(/chrome/) ? browser = navigator.mimeTypes.length > 10 ? BrowerType.Se360 : BrowerType.Chrome : null != userAgent.match(/safari/) && (browser = BrowerType.Safiri),
browser;
}, Core.getPercent = function(num, total) {
return num = parseFloat(String(num)), total = parseFloat(String(total)), isNaN(num) || isNaN(total) ? 0 : total <= 0 ? "0" : Math.round(num / total * 1e4) / 100;
}, Core.getReact = function(dom, traverseUp) {
var domFiber, compFiber_1, i, GetCompFiber, compFiber;
if (void 0 === traverseUp && (traverseUp = 0), null == (domFiber = dom[Object.keys(dom).find((function(key) {
return key.startsWith("__reactFiber$") || key.startsWith("__reactInternalInstance$");
}))])) return null;
if (domFiber._currentElement) {
for (compFiber_1 = domFiber._currentElement._owner, i = 0; i < traverseUp; i++) compFiber_1 = compFiber_1._currentElement._owner;
return compFiber_1._instance;
}
for (compFiber = (GetCompFiber = function(fiber) {
for (var parentFiber = fiber.return; "string" == typeof parentFiber.type; ) parentFiber = parentFiber.return;
return parentFiber;
})(domFiber), i = 0; i < traverseUp; i++) compFiber = GetCompFiber(compFiber);
return compFiber.stateNode || compFiber;
}, Core.copyText = function(text) {
var textArea = document.createElement("textarea");
return textArea.style.position = "fixed", textArea.style.visibility = "-10000px",
textArea.value = text, document.body.appendChild(textArea), textArea.focus(), textArea.select(),
document.execCommand("copy") ? (document.body.removeChild(textArea), !0) : (document.body.removeChild(textArea),
!1);
}, Core.getGmCookie = function(key, domain) {
return void 0 === domain && (domain = ""), new Promise((function(resolve, reject) {
if ("undefined" != typeof GM_cookie) {
var obj = {
name: key,
url: Core.url
};
domain && (obj.domain = domain), GM_cookie.list(obj, (function(cookies, error) {
(null == cookies ? void 0 : cookies.length) > 0 ? resolve(cookies[0].value) : (Logger.warn("get cookie [" + key + "] is error:" + error),
resolve(""));
}));
} else resolve("");
}));
}, Core.getCookie = function(key) {
var i, l, tempArr, arr = document.cookie.replace(/\s/g, "").split(";");
for (i = 0, l = arr.length; i < l; i++) if ((tempArr = arr[i].split("="))[0] == key) return decodeURIComponent(tempArr[1]);
return "";
}, Core;
}(), VersionCompar = function() {
function VersionCompar(e) {
/^[\d\.]+$/.test(e) || Logger.error("Invalid version string"), this.parts = e.split(".").map((function(e) {
return parseInt(e);
})), this.versionString = e;
}
return VersionCompar.prototype.compareTo = function(e) {
for (var t = 0; t < this.parts.length; ++t) {
if (e.parts.length === t) return VersionResult.greater;
if (this.parts[t] !== e.parts[t]) return this.parts[t] > e.parts[t] ? VersionResult.greater : VersionResult.less;
}
return this.parts.length !== e.parts.length ? VersionResult.less : VersionResult.equal;
}, VersionCompar.prototype.greaterThan = function(e) {
return this.compareTo(e) === VersionResult.greater;
}, VersionCompar.prototype.lessThan = function(e) {
return this.compareTo(e) === VersionResult.less;
}, VersionCompar.prototype.equals = function(e) {
return this.compareTo(e) === VersionResult.equal;
}, VersionCompar;
}(), Config = function() {
function Config() {}
return Object.defineProperty(Config, "env", {
get: function() {
return GM_info;
},
enumerable: !1,
configurable: !0
}), Config.get = function(key, defaultValue) {
var objStr, obj;
if (void 0 === defaultValue && (defaultValue = ""), objStr = GM_getValue(this.encode(key), null)) {
if (-1 == (obj = JSON.parse(objStr)).exp || obj.exp > (new Date).getTime()) return Logger.info("cache true:" + key + "," + obj.exp),
obj.value;
GM_deleteValue(key);
}
return Logger.info("cache false"), defaultValue;
}, Config.set = function(key, v, exp) {
void 0 === exp && (exp = -1);
var obj = {
key: key,
value: v,
exp: -1 == exp ? exp : (new Date).getTime() + 1e3 * exp
};
Logger.debug(obj), GM_setValue(this.encode(key), JSON.stringify(obj));
}, Config.remember = function(key, exp, callback) {
var _this = this;
return new Promise((function(reso, reject) {
var v = _this.get(key, null);
null == v || "" === v ? callback().then((function(res) {
_this.set(key, res, exp), reso(res);
})).catch((function(e) {
reject(e);
})) : (Logger.debug(v), reso(v));
}));
}, Config.clear = function(key) {
GM_deleteValue(key);
}, Config.decode = function(str) {
return atob(str);
}, Config.encode = function(str) {
return btoa(str);
}, Config.inc = function(s) {
var v = Config.get(s, 0);
v++, Config.set(s, v);
}, Config;
}(), AjaxOption = function() {
function AjaxOption(_url, _methodType, _data, _success, _header, timeOut) {
void 0 === _methodType && (_methodType = "GET"), void 0 === _header && (_header = new Map),
void 0 === timeOut && (timeOut = 60), this.url = _url, this.methodType = _methodType,
this.onSuccess = _success, this.onError = _success, this.data = _data, this.headers = _header,
this.timeOut = timeOut;
}
return AjaxOption.prototype.getData = function() {
var fd_1, fd, i;
if (this.data instanceof FormData) return this.data;
if (this.data instanceof Map) return fd_1 = new FormData, this.data.forEach((function(v, k) {
fd_1.append(k, v);
})), fd_1;
for (i in fd = new FormData, this.data) fd.append(i, this.data[i]);
return fd;
}, AjaxOption;
}(), Http = function() {
function Http() {}
return Http.ajax = function(option) {
var _a, _b, _c, head;
option.headers.set("User-Agent", null !== (_a = unsafeWindow.navigator.userAgent) && void 0 !== _a ? _a : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"),
0 == option.headers.has("Accept") && option.headers.set("Accept", "application/atom+xml,application/xml,text/xml"),
head = new HttpHeaders, option.url.indexOf("wandhi") > 0 && (head.version = Config.env.script.version,
head.auth = null !== (_b = Config.env.script.author) && void 0 !== _b ? _b : "",
head.namespace = null !== (_c = Config.env.script.namespace) && void 0 !== _c ? _c : ""),
option.headers.forEach((function(v, k) {
head[k] = v;
})), GM_xmlhttpRequest({
url: option.url,
method: option.methodType,
headers: head,
data: option.getData(),
timeout: 1e3 * option.timeOut,
onload: function(res) {
var _a, _b;
try {
null === (_a = option.onSuccess) || void 0 === _a || _a.call(option, "POST" == option.methodType ? JSON.parse(res.responseText) : res.responseText);
} catch (error) {
null === (_b = option.onSuccess) || void 0 === _b || _b.call(option, null);
}
},
onerror: function(res) {
var _a, _b, _c;
(null === (_a = res.finalUrl) || void 0 === _a ? void 0 : _a.indexOf("adguard.org")) > 0 || (null === (_b = option.url) || void 0 === _b ? void 0 : _b.indexOf("jsdelivr")) > 0 ? option.onError(null) : null === (_c = option.onError) || void 0 === _c || _c.call(option, res);
}
});
}, Http.ajaxNew = function(url, method, data, header, dataType) {
var _a, _b, head, _getData, _data;
return void 0 === header && (header = new Map), void 0 === dataType && (dataType = void 0),
head = new HttpHeaders, header.size > 0 && header.forEach((function(v, k) {
head[k] = v;
})), url.indexOf("wandhi") > 0 && (head.version = Config.env.script.version, head.auth = null !== (_a = Config.env.script.author) && void 0 !== _a ? _a : "",
head.namespace = null !== (_b = Config.env.script.namespace) && void 0 !== _b ? _b : ""),
_getData = function(_data) {
if (_data instanceof FormData) return data;
if (data instanceof Map) {
var fd_1 = new FormData;
return _data.forEach((function(v, k) {
var _v;
_v = "string" == typeof v ? v.toString() : JSON.stringify(v), fd_1.append(k, _v);
})), fd_1;
}
return JSON.stringify(_data);
}, _data = _getData(data), Logger.debug(_data), null != dataType ? "multipart/form-data" != dataType && (head["Content-Type"] = dataType) : data instanceof FormData || data instanceof Map ? head["Content-Type"] = "application/x-www-form-urlencoded; charset=utf-8" : head["Content-Type"] = "application/json; charset=utf-8",
new Promise((function(resolve, reject) {
GM_xmlhttpRequest({
url: url,
method: method,
headers: head,
data: _data,
onload: function(res) {
try {
resolve(JSON.parse(res.responseText));
} catch (error) {
Logger.debug(error), resolve(res.responseText);
}
},
onerror: function(err) {
Logger.debug(err), reject(err);
},
ontimeout: function() {
Logger.debug("\u8bf7\u6c42\u8d85\u65f6:" + url), reject("\u8bf7\u6c42\u8d85\u65f6");
}
});
}));
}, Http.getData = function(url, callback) {
$.getJSON(url, (function(d) {
callback(d);
}));
}, Http.JqGet = function(url, callback, head) {
void 0 === head && (head = new Map), Http.get(url, new Map, head).then((function(d) {
callback(d);
}));
}, Http.post = function(url, data, timeOut) {
return void 0 === timeOut && (timeOut = 10), new Promise((function(resolve) {
Http.ajax(new AjaxOption(url, "POST", data, (function(data) {
resolve(data);
}), new Map, timeOut));
}));
}, Http.get = function(url, data, head, loading, time_out) {
return void 0 === data && (data = new Map), void 0 === head && (head = new Map),
void 0 === time_out && (time_out = 10), new Promise((function(resolve, reject) {
Http.ajax(new AjaxOption(url, "GET", data, (function(data) {
var _a, res;
try {
res = null !== (_a = JSON.parse(data)) && void 0 !== _a ? _a : data, resolve(res);
} catch (error) {
Logger.debug(error), reject();
}
}), head, time_out));
}));
}, Http.getWithHead = function(url, data, head, time_out) {
return void 0 === data && (data = new Map), void 0 === head && (head = new Map),
void 0 === time_out && (time_out = 10), new Promise((function(resolve, reject) {
Http.ajax(new AjaxOption(url, "GET", data, (function(data) {
var _a, res;
try {
res = null !== (_a = JSON.parse(data)) && void 0 !== _a ? _a : data, resolve(res);
} catch (error) {
Logger.debug(error), reject();
}
}), head, time_out));
}));
}, Http.postWithHead = function(url, data, head, time_out) {
return void 0 === data && (data = new Map), void 0 === head && (head = new Map),
void 0 === time_out && (time_out = 10), new Promise((function(resolve, reject) {
Http.ajax(new AjaxOption(url, "POST", data, (function(data) {
try {
resolve(data);
} catch (error) {
Logger.debug([ url, error ]), reject();
}
}), head, time_out));
}));
}, Http.get_text = function(url) {
return new Promise((function(resolve) {
Http.ajax(new AjaxOption(url, "GET", new Map, (function(data) {
resolve(data);
})));
}));
}, Http.get302 = function(url) {
return new Promise((function(resolve) {
GM_xmlhttpRequest({
url: url,
onload: function(response) {
resolve(response.finalUrl);
},
onabort: function() {
resolve("");
},
method: "GET",
onerror: function(response) {
resolve("");
}
});
}));
}, Http;
}(), HttpHeaders = function HttpHeaders() {}, Route = function() {
function Route() {}
return Object.defineProperty(Route, "apiRoot", {
get: function() {
return "https://api.huizhek.com/api";
},
enumerable: !1,
configurable: !0
}), Route.baseApi = function(api, data, callback, timeOut) {
void 0 === timeOut && (timeOut = 10), Http.post(Route.apiRoot + api, data, timeOut).then((function(res) {
callback(res);
}));
}, Route.querySbx = function(id, callback) {
var _this = this;
"" !== Config.get(this.sxb_key, "") ? this.query365(id, Config.get(this.sxb_key), callback) : this.queryValue("sxb_anhao", (function(res) {
_this.query365(id, res.data, callback);
}));
}, Route.sbxFeedback = function(id, answer) {
this.baseApi("/tools/record", new Map([ [ "id", id ], [ "data", answer ], [ "anhao", Config.get(this.sxb_key) ] ]), (function() {}));
}, Route.query365 = function(id, anhao, callback) {
var api = Config.get("sxb_api");
api ? Http.post(api, new Map([ [ "docinfo", "https://www.shangxueba.com/ask/" + id + ".html" ], [ "anhao", anhao ] ])).then((function(res) {
callback(res);
})) : this.queryValue("sxb_api", (function(res) {
Config.set("sxb_api", res.data, 864e5), Http.post(res.data, new Map([ [ "docinfo", "https://www.shangxueba.com/ask/" + id + ".html" ], [ "anhao", anhao ] ]));
}));
}, Route.queryValue = function(key, callback) {
this.baseApi(Route.config, new Map([ [ "key", key ] ]), callback);
}, Route.queryHistory = function(url, siteType, callback) {
this.baseApi(this.history, new Map([ [ "url", url ], [ "type", siteType ] ]), callback);
}, Route.queryHistoryV5 = function(url) {
var _this = this;
return new Promise((function(reso, reje) {
_this.baseApi(_this.historyv3, new Map([ [ "url", url ] ]), (function(res) {
res.code ? reso(res) : reje(res);
}));
}));
}, Route.queryHistoryV4Pre = function(url) {
var _this = this;
return new Promise((function(reso, reje) {
_this.baseApi(url, new Map([]), (function(res) {
res.code ? reso(res) : reje(res);
}));
}));
}, Route.queryHistoryV4 = function(url, pre, callback) {
Http.JqGet(pre, (function(res) {
Http.JqGet(url, callback, new Map([ [ ":authority", "browser.gwdang.com" ], [ "referer", unsafeWindow.window.location.origin ] ]));
}));
}, Route.queryBiliImg = function(aid, callback) {
Http.getData(this.biliInfo + "?aid=" + aid, callback);
}, Route.queryBiliDown = function(aid, cid, callback) {
Http.get(this.bilidown + "?cid=" + cid + "&avid=" + aid + "&qn=112&fnval=4048&s=wandhi").then((function(res) {
callback(res);
}));
}, Route.queryBiliDownWeb = function(aid, cid) {
return Http.get("https://api.bilibili.com/x/player/wbi/playurl?avid=" + aid + "&cid=" + cid);
}, Route.queryCoupons = function(itemId, callback) {
this.baseApi(this.coupons, new Map([ [ "id", itemId ] ]), callback);
}, Route.queryJdCoupons = function(itemId, callback) {
Route.baseApi(Route.jd_coupons, new Map([ [ "item_id", itemId ] ]), callback);
}, Route.querySnCoupons = function(url, callback) {
Route.baseApi(Route.sn_coupons, new Map([ [ "url", url ] ]), callback);
}, Route.queryVpCoupons = function(url, callback) {
Route.baseApi(Route.vp_coupons, new Map([ [ "url", url ] ]), callback);
}, Route.queryKlCoupons = function(itemId) {
return new Promise((function(reso) {
Route.baseApi(Route.kl_coupons, new Map([ [ "itemId", itemId ] ]), (function(res) {
reso(res);
}));
}));
}, Route.couponQuery = function(itemId, type, callback) {
Route.baseApi("/coupons/info", new Map([ [ "id", itemId ], [ "type", type ] ]), callback);
}, Route._getSurl = function() {
var reg = /(?<=s\/|surl=)([a-zA-Z0-9_-]+)/g;
return reg.test(Core.url) ? Core.url.match(reg)[0] : "";
}, Route.baiduDriect = function(fids, accessToken) {
return __awaiter(this, void 0, Promise, (function() {
var url;
return __generator(this, (function(_a) {
return url = "https://pan.baidu.com/rest/2.0/xpan/multimedia?method=filemetas&dlink=1&fsids=" + fids + "&access_token=" + accessToken,
[ 2, Http.ajaxNew(url, "GET", null, new Map([ [ "User-Agent", "pan.baidu.com" ] ])) ];
}));
}));
}, Route.baiduAccessToken = function() {
return Http.get302("https://openapi.baidu.com/oauth/2.0/authorize?client_id=IlLqBbU3GjQ0t46TRwFateTprHWl39zF&response_type=token&redirect_uri=oob&scope=basic,netdisk");
}, Route.baiduAccessTokenAuth = function() {
var _a, _b;
return __awaiter(this, void 0, void 0, (function() {
var url, html, data;
return __generator(this, (function(_c) {
switch (_c.label) {
case 0:
return url = "https://openapi.baidu.com/oauth/2.0/authorize?client_id=IlLqBbU3GjQ0t46TRwFateTprHWl39zF&response_type=token&redirect_uri=oob&scope=basic,netdisk",
[ 4, Http.get_text(url) ];
case 1:
return html = _c.sent(), (data = new Map).set("grant_permissions_arr", "netdisk"),
data.set("bdstoken", null === (_a = null == html ? void 0 : html.match(/name="bdstoken"\s+value="([^"]+)"/)) || void 0 === _a ? void 0 : _a[1]),
data.set("client_id", null === (_b = null == html ? void 0 : html.match(/name="client_id"\s+value="([^"]+)"/)) || void 0 === _b ? void 0 : _b[1]),
data.set("response_type", "token"), data.set("display", "page"), data.set("grant_permissions", "basic,netdisk"),
[ 2, Http.ajaxNew(url, "POST", data, new Map, "multipart/form-data") ];
}
}));
}));
}, Route.quarkDriect = function(fids) {
return Http.ajaxNew("https://drive.quark.cn/1/clouddrive/file/download?pr=ucpro&fr=pc", "POST", {
fids: fids
}, new Map([ [ "User-Agent", "quark-cloud-drive" ] ]));
}, Route.RouteConfig = function() {
return new Promise((function(resolve) {
var config = Config.get("script_config", !1);
config ? resolve(config) : Route.baseApi("/config/script", new Map, (function(res) {
var config = JSON.parse(Core.decode(res.data));
Config.set("script_config", config, 2 * Hour), resolve(config);
}));
}));
}, Route.sxb_key = "sxb_anhao", Route.config = "/config/query", Route.history = "/history/",
Route.historyv1 = "/history/v1", Route.historyv2 = "/history/v2", Route.historyv3 = "/history/v3",
Route.bili = "/tools/bili", Route.biliInfo = "https://api.bilibili.com/x/web-interface/view",
Route.bilidown = "https://api.bilibili.com/x/player/wbi/playurl", Route.coupons = "/tb/infos/",
Route.like = "/tb/guesslike", Route.jd_coupons = "/jd/info", Route.sn_coupons = "/sn/info",
Route.vp_coupons = "/vp/info", Route.kl_coupons = "/kl/info", Route;
}(), css_248z$a = 'html .aside-nav {\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n font-size: 62.5%\n}\n\nbody .aside-nav {\n font-family: "Helvetica Neue", Helvetica, "Microsoft YaHei", Arial, sans-serif;\n margin: 0;\n font-size: 1.6rem;\n color: #4e546b\n}\n\n.aside-nav {\n position: fixed;\n bottom: 0;\n left: -47px;\n width: 260px;\n height: 260px;\n -webkit-filter: url(#goo);\n filter: url(#goo);\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n opacity: .75;\n z-index: 99999\n}\n\n.aside-nav.no-filter {\n -webkit-filter: none;\n filter: none\n}\n\n.aside-nav .aside-menu {\n position: absolute;\n width: 70px;\n height: 70px;\n -webkit-border-radius: 50%;\n border-radius: 50%;\n background: #f34444;\n left: -95px;\n top: 0;\n right: 0;\n bottom: 0;\n margin: auto;\n text-align: center;\n line-height: 70px;\n color: #fff;\n font-size: 20px;\n z-index: 1;\n cursor: move\n}\n\n.aside-nav .menu-item {\n position: absolute;\n width: 60px;\n height: 60px;\n background-color: #ff7676;\n left: -95px;\n top: 0;\n right: 0;\n bottom: 0;\n margin: auto;\n line-height: 60px;\n text-align: center;\n -webkit-border-radius: 50%;\n border-radius: 50%;\n text-decoration: none;\n color: #fff;\n -webkit-transition: background .5s, -webkit-transform .6s;\n transition: background .5s, -webkit-transform .6s;\n -moz-transition: transform .6s, background .5s, -moz-transform .6s;\n transition: transform .6s, background .5s;\n transition: transform .6s, background .5s, -webkit-transform .6s, -moz-transform .6s;\n font-size: 14px;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box\n}\n\n.aside-nav .menu-item:hover {\n background: #a9c734\n}\n\n.aside-nav .menu-line {\n line-height: 20px;\n padding-top: 10px\n}\n\n.aside-nav:hover {\n opacity: 1\n}\n\n.aside-nav:hover .aside-menu {\n -webkit-animation: jello 1s;\n -moz-animation: jello 1s;\n animation: jello 1s\n}\n\n.aside-nav:hover .menu-first {\n -webkit-transform: translate3d(0, -135%, 0);\n -moz-transform: translate3d(0, -135%, 0);\n transform: translate3d(0, -135%, 0)\n}\n\n.aside-nav:hover .menu-second {\n -webkit-transform: translate3d(120%, -70%, 0);\n -moz-transform: translate3d(120%, -70%, 0);\n transform: translate3d(120%, -70%, 0)\n}\n\n.aside-nav:hover .menu-third {\n -webkit-transform: translate3d(120%, 70%, 0);\n -moz-transform: translate3d(120%, 70%, 0);\n transform: translate3d(120%, 70%, 0)\n}\n\n.aside-nav:hover .menu-fourth {\n -webkit-transform: translate3d(0, 135%, 0);\n -moz-transform: translate3d(0, 135%, 0);\n transform: translate3d(0, 135%, 0)\n}\n\n@-webkit-keyframes jello {\n from, 11.1%, to {\n -webkit-transform: none;\n transform: none\n }\n 22.2% {\n -webkit-transform: skewX(-12.5deg) skewY(-12.5deg);\n transform: skewX(-12.5deg) skewY(-12.5deg)\n }\n 33.3% {\n -webkit-transform: skewX(6.25deg) skewY(6.25deg);\n transform: skewX(6.25deg) skewY(6.25deg)\n }\n 44.4% {\n -webkit-transform: skewX(-3.125deg) skewY(-3.125deg);\n transform: skewX(-3.125deg) skewY(-3.125deg)\n }\n 55.5% {\n -webkit-transform: skewX(1.5625deg) skewY(1.5625deg);\n transform: skewX(1.5625deg) skewY(1.5625deg)\n }\n 66.6% {\n -webkit-transform: skewX(-.78125deg) skewY(-.78125deg);\n transform: skewX(-.78125deg) skewY(-.78125deg)\n }\n 77.7% {\n -webkit-transform: skewX(0.390625deg) skewY(0.390625deg);\n transform: skewX(0.390625deg) skewY(0.390625deg)\n }\n 88.8% {\n -webkit-transform: skewX(-.1953125deg) skewY(-.1953125deg);\n transform: skewX(-.1953125deg) skewY(-.1953125deg)\n }\n}\n\n@-moz-keyframes jello {\n from, 11.1%, to {\n -moz-transform: none;\n transform: none\n }\n 22.2% {\n -moz-transform: skewX(-12.5deg) skewY(-12.5deg);\n transform: skewX(-12.5deg) skewY(-12.5deg)\n }\n 33.3% {\n -moz-transform: skewX(6.25deg) skewY(6.25deg);\n transform: skewX(6.25deg) skewY(6.25deg)\n }\n 44.4% {\n -moz-transform: skewX(-3.125deg) skewY(-3.125deg);\n transform: skewX(-3.125deg) skewY(-3.125deg)\n }\n 55.5% {\n -moz-transform: skewX(1.5625deg) skewY(1.5625deg);\n transform: skewX(1.5625deg) skewY(1.5625deg)\n }\n 66.6% {\n -moz-transform: skewX(-.78125deg) skewY(-.78125deg);\n transform: skewX(-.78125deg) skewY(-.78125deg)\n }\n 77.7% {\n -moz-transform: skewX(0.390625deg) skewY(0.390625deg);\n transform: skewX(0.390625deg) skewY(0.390625deg)\n }\n 88.8% {\n -moz-transform: skewX(-.1953125deg) skewY(-.1953125deg);\n transform: skewX(-.1953125deg) skewY(-.1953125deg)\n }\n}\n\n@keyframes jello {\n from, 11.1%, to {\n -webkit-transform: none;\n -moz-transform: none;\n transform: none\n }\n 22.2% {\n -webkit-transform: skewX(-12.5deg) skewY(-12.5deg);\n -moz-transform: skewX(-12.5deg) skewY(-12.5deg);\n transform: skewX(-12.5deg) skewY(-12.5deg)\n }\n 33.3% {\n -webkit-transform: skewX(6.25deg) skewY(6.25deg);\n -moz-transform: skewX(6.25deg) skewY(6.25deg);\n transform: skewX(6.25deg) skewY(6.25deg)\n }\n 44.4% {\n -webkit-transform: skewX(-3.125deg) skewY(-3.125deg);\n -moz-transform: skewX(-3.125deg) skewY(-3.125deg);\n transform: skewX(-3.125deg) skewY(-3.125deg)\n }\n 55.5% {\n -webkit-transform: skewX(1.5625deg) skewY(1.5625deg);\n -moz-transform: skewX(1.5625deg) skewY(1.5625deg);\n transform: skewX(1.5625deg) skewY(1.5625deg)\n }\n 66.6% {\n -webkit-transform: skewX(-.78125deg) skewY(-.78125deg);\n -moz-transform: skewX(-.78125deg) skewY(-.78125deg);\n transform: skewX(-.78125deg) skewY(-.78125deg)\n }\n 77.7% {\n -webkit-transform: skewX(0.390625deg) skewY(0.390625deg);\n -moz-transform: skewX(0.390625deg) skewY(0.390625deg);\n transform: skewX(0.390625deg) skewY(0.390625deg)\n }\n 88.8% {\n -webkit-transform: skewX(-.1953125deg) skewY(-.1953125deg);\n -moz-transform: skewX(-.1953125deg) skewY(-.1953125deg);\n transform: skewX(-.1953125deg) skewY(-.1953125deg)\n }\n}\n\n.animated {\n -webkit-animation-duration: 1s;\n -moz-animation-duration: 1s;\n animation-duration: 1s;\n -webkit-animation-fill-mode: both;\n -moz-animation-fill-mode: both;\n animation-fill-mode: both\n}\n\n@-webkit-keyframes bounceInUp {\n from, 60%, 75%, 90%, to {\n -webkit-animation-timing-function: cubic-bezier(0.215, .61, .355, 1);\n animation-timing-function: cubic-bezier(0.215, .61, .355, 1)\n }\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, 800px, 0);\n transform: translate3d(0, 800px, 0)\n }\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(0, -20px, 0);\n transform: translate3d(0, -20px, 0)\n }\n 75% {\n -webkit-transform: translate3d(0, 10px, 0);\n transform: translate3d(0, 10px, 0)\n }\n 90% {\n -webkit-transform: translate3d(0, -5px, 0);\n transform: translate3d(0, -5px, 0)\n }\n to {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0)\n }\n}\n\n@-moz-keyframes bounceInUp {\n from, 60%, 75%, 90%, to {\n -moz-animation-timing-function: cubic-bezier(0.215, .61, .355, 1);\n animation-timing-function: cubic-bezier(0.215, .61, .355, 1)\n }\n from {\n opacity: 0;\n -moz-transform: translate3d(0, 800px, 0);\n transform: translate3d(0, 800px, 0)\n }\n 60% {\n opacity: 1;\n -moz-transform: translate3d(0, -20px, 0);\n transform: translate3d(0, -20px, 0)\n }\n 75% {\n -moz-transform: translate3d(0, 10px, 0);\n transform: translate3d(0, 10px, 0)\n }\n 90% {\n -moz-transform: translate3d(0, -5px, 0);\n transform: translate3d(0, -5px, 0)\n }\n to {\n -moz-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0)\n }\n}\n\n@keyframes bounceInUp {\n from, 60%, 75%, 90%, to {\n -webkit-animation-timing-function: cubic-bezier(0.215, .61, .355, 1);\n -moz-animation-timing-function: cubic-bezier(0.215, .61, .355, 1);\n animation-timing-function: cubic-bezier(0.215, .61, .355, 1)\n }\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, 800px, 0);\n -moz-transform: translate3d(0, 800px, 0);\n transform: translate3d(0, 800px, 0)\n }\n 60% {\n opacity: 1;\n -webkit-transform: translate3d(0, -20px, 0);\n -moz-transform: translate3d(0, -20px, 0);\n transform: translate3d(0, -20px, 0)\n }\n 75% {\n -webkit-transform: translate3d(0, 10px, 0);\n -moz-transform: translate3d(0, 10px, 0);\n transform: translate3d(0, 10px, 0)\n }\n 90% {\n -webkit-transform: translate3d(0, -5px, 0);\n -moz-transform: translate3d(0, -5px, 0);\n transform: translate3d(0, -5px, 0)\n }\n to {\n -webkit-transform: translate3d(0, 0, 0);\n -moz-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0)\n }\n}\n\n.bounceInUp {\n -webkit-animation-name: bounceInUp;\n -moz-animation-name: bounceInUp;\n animation-name: bounceInUp;\n -webkit-animation-delay: 1s;\n -moz-animation-delay: 1s;\n animation-delay: 1s\n}\n',
styleInject(css_248z$a), function(Common) {
var Menu = function() {
function Menu() {
this.core = new Core, this.site = /tv.wandhi.com/i, this.userAgent = navigator.userAgent,
this.menusClass = [ "first", "second", "third", "fourth", "fifth" ], this.menuSelector = "#Wandhi-nav";
}
return Menu.prototype.loader = function() {}, Menu.prototype.getBody = function(option) {
return '<svg width="0" height="0"><defs><filter id="goo"><feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur"></feGaussianBlur><feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9" result="goo"></feColorMatrix><feComposite in="SourceGraphic" in2="goo" operator="atop"></feComposite></filter></defs></svg><div class="aside-nav bounceInUp animated" id="Wandhi-nav"><label for="" class="aside-menu" title="\u6309\u4f4f\u62d6\u52a8">VIP</label>' + option + "</div>";
}, Menu.prototype.Init = function(menus, callback, skipIframe) {
var that, str, drags, asideNav, _this = this;
void 0 === skipIframe && (skipIframe = !0), Core.inIframe() && skipIframe || (that = this,
this.loader(), str = "", menus.forEach((function(element, index) {
str += '<a href="javascript:void(0)" title="' + element.title + '" data-cat="' + element.type + '" class="menu-item menu-line menu-' + _this.menusClass[index] + '">' + element.show + "</a>";
})), Logger.info("\u8ffd\u52a0\u83dc\u5355"), Core.bodyAppend(this.getBody(str)),
/Safari|iPhone/i.test(this.userAgent) && /chrome/i.test(this.userAgent) && $("#Wandhi-nav").addClass("no-filter"),
drags = {
down: !1,
x: 0,
y: 0,
winWid: 0,
winHei: 0,
clientX: 0,
clientY: 0
}, asideNav = $(this.menuSelector)[0], $("body").on("mousedown", "" + that.menuSelector, (function(a) {
var getCss = function(a, e) {
var _a, _b, _c;
return null !== (_b = null === (_a = document.defaultView) || void 0 === _a ? void 0 : _a.getComputedStyle(a, null)[e]) && void 0 !== _b ? _b : null !== (_c = a.currentStyle) && void 0 !== _c ? _c : a.currentStyle[e];
};
drags.down = !0, drags.clientX = a.clientX, drags.clientY = a.clientY, drags.x = parseInt(getCss(this, "left")),
drags.y = parseInt(getCss(this, "top")), drags.winHei = $(window).height(), drags.winWid = $(window).width(),
$(document).on("mousemove", (function(a) {
var e = a.clientX - drags.clientX, t = a.clientY - drags.clientY;
(asideNav = asideNav || $("#Wandhi-nav")[0]).style.top = drags.y + t + "px", asideNav.style.left = drags.x + e + "px";
}));
})).on("mouseup", "" + that.menuSelector, (function() {
drags.down = !1, $(document).off("mousemove");
})), Menu.fullScreenMirror(), callback.call(this));
}, Menu.fullScreenMirror = function() {
unsafeWindow.document.onfullscreenchange = function(e) {
Logger.debug("fullElement:" + unsafeWindow.document.fullscreenElement), Menu.autoHide && (unsafeWindow.document.fullscreenElement ? $("#" + Menu.mainId).hide() : $("#" + Menu.mainId).show());
};
}, Menu.close = function() {
Menu.autoHide = !1, $("#" + Menu.mainId).hide();
}, Menu.mainId = "Wandhi-nav", Menu.autoHide = !0, Menu;
}();
Common.Menu = Menu;
}(Common || (Common = {})), PluginBase = function() {
function PluginBase() {
var _this = this;
this._unique = !0, this.semiui = !1, this.menu = new Common.Menu, this.Process = function() {
_this.semiui && Core.appendCss("https://registry.npmmirror.com/@douyinfe/semi-ui/2.51.0/files/dist/css/semi.min.css"),
_this.loader(), _this.run();
}, this._appName = "base";
}
return PluginBase.prototype.unique = function() {
return this._unique;
}, PluginBase.prototype.linkTest = function(url) {
var flag, _this = this;
return url || (url = Core.currentUrl()), flag = !1, this.rules.forEach((function(v, k) {
return !v.test(url) || (flag = !0, _this.site = k, !1);
})), flag;
}, PluginBase.prototype.appName = function() {
return this._appName;
}, PluginBase;
}(), function(SiteEnum) {