【玩的嗨】VIP工具箱,全网VIP视频免费破解去广告,一站式音乐搜索下载,获取B站封面,下载B站视频,上学吧答案获取等众多功能聚合 长期更新,放心使用

功能介绍:1、Vip视频解析;2、一站式音乐搜索解决方案;3、bilibili视频封面获取;4、bilibili视频下载;5、上学吧答案查询(接口偶尔抽风);6、商品历史价格展示(一次性告别虚假降价);7、优惠券查询

От 02.07.2021. Виж последната версия.

  1. // ==UserScript==
  2. // @name 【玩的嗨】VIP工具箱,全网VIP视频免费破解去广告,一站式音乐搜索下载,获取B站封面,下载B站视频,上学吧答案获取等众多功能聚合 长期更新,放心使用
  3. // @namespace https://www.wandhi.com/
  4. // @version 4.2.32
  5. // @homepage https://tools.wandhi.com/scripts
  6. // @supportURL https://wiki.wandhi.com/
  7. // @description 功能介绍:1、Vip视频解析;2、一站式音乐搜索解决方案;3、bilibili视频封面获取;4、bilibili视频下载;5、上学吧答案查询(接口偶尔抽风);6、商品历史价格展示(一次性告别虚假降价);7、优惠券查询
  8. // @author MaxZhang
  9. // @icon https://www.wandhi.com//favicon.ico
  10. // @include *://m.youku.com/v*
  11. // @include *://m.youku.com/a*
  12. // @include *://v.youku.com/v_*
  13. // @include *://*.iqiyi.com/v_*
  14. // @include *://*.iqiyi.com/w_*
  15. // @include *://*.iqiyi.com/a_*
  16. // @include *://*.iqiyi.com/adv*
  17. // @include *.iq.com/play/*
  18. // @include *://*.le.com/ptv/vplay/*
  19. // @include *v.qq.com/x/cover/*
  20. // @include *v.qq.com/x/page/*
  21. // @include *v.qq.com/*play*
  22. // @include *v.qq.com/cover*
  23. // @include *://*.tudou.com/listplay/*
  24. // @include *://*.tudou.com/albumplay/*
  25. // @include *://*.tudou.com/programs/view/*
  26. // @include *://*.tudou.com/v*
  27. // @include *://*.mgtv.com/b/*
  28. // @include *://film.sohu.com/album/*
  29. // @include *://tv.sohu.com/v/*
  30. // @include *://*.acfun.cn/v/*
  31. // @include *://*.bilibili.com/video/*
  32. // @include *://*.bilibili.com/anime/*
  33. // @include *://*.bilibili.com/bangumi/play/*
  34. // @include *://*.pptv.com/show/*
  35. // @include *://*.baofeng.com/play/*
  36. // @include *://*.wasu.cn/Play/show*
  37. // @include *://v.yinyuetai.com/video/*
  38. // @include *://v.yinyuetai.com/playlist/*
  39. // @include *://*.wasu.cn/Play/show/*
  40. // @include *://music.taihe.com/song*
  41. // @include *://item.taobao.com/*
  42. // @include *://s.taobao.com/search*
  43. // @include *://list.tmall.com/search_product.htm*
  44. // @include *://detail.tmall.com/*
  45. // @include *://chaoshi.detail.tmall.com/*
  46. // @include *://detail.tmall.hk/*
  47. // @include *://item.jd.com/*
  48. // @include *://item.jd.hk/*
  49. // @include *://detail.vip.com/detail-*
  50. // @include *://product.suning.com/*
  51. // @include *://music.163.com/song*
  52. // @include *://music.163.com/m/song*
  53. // @include *://y.qq.com/*
  54. // @include *://*.kugou.com/*
  55. // @include *://*.kuwo.cn/*
  56. // @include *://*.xiami.com/*
  57. // @include *://music.taihe.com/*
  58. // @include *://*.1ting.com/player*
  59. // @include *://www.qingting.fm/*
  60. // @include *://www.lizhi.fm/*
  61. // @include *://music.migu.cn/*
  62. // @include *://www.shangxueba.com/ask/*.html
  63. // @include *://www.ximalaya.com/*
  64. // @include *://www.shangxueba.com/ask/*.html
  65. // @include *://pan.baidu.com/disk/home*
  66. // @include *://yun.baidu.com/disk/home*
  67. // @include *://pan.baidu.com/s/*
  68. // @include *://yun.baidu.com/s/*
  69. // @include *://pan.baidu.com/share/link*
  70. // @include *://yun.baidu.com/share/link*
  71. // @exclude *://*.wandhi.com/*
  72. // @require https://lib.baomitu.com/jquery/1.12.4/jquery.min.js
  73. // @require https://cdn.jsdelivr.net/npm/sweetalert2@11
  74. // @require https://lib.baomitu.com/echarts/4.6.0/echarts.min.js
  75. // @require https://lib.baomitu.com/layer/2.3/layer.js
  76. // @require https://lib.baomitu.com/reflect-metadata/0.1.13/Reflect.min.js
  77. // @require https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js
  78. // @require https://cdn.jsdelivr.net/npm/vuex@3.4.0/dist/vuex.min.js
  79. // @require https://cdn.jsdelivr.net/npm/qrcode@1.4.4/build/qrcode.min.js
  80. // @require https://cdn.jsdelivr.net/npm/crypto-js@4.0.0/crypto-js.js
  81. // @license MIT
  82. // @grant GM_setClipboard
  83. // @run-at document-end
  84. // @connect shangxueba365.com
  85. // @connect api.wandhi.com
  86. // @connect cdn.jsdelivr.net
  87. // @connect tool.manmanbuy.com
  88. // @connect xbeibeix.com
  89. // @connect gwdang.com
  90. // @grant unsafeWindow
  91. // @grant GM_xmlhttpRequest
  92. // @grant GM_info
  93. // @grant GM.addStyle
  94. // @grant GM_getValue
  95. // @grant GM_setValue
  96. // @grant GM_notification
  97. // @grant GM_openInTab
  98. // @grant GM_deleteValue
  99. // @grant GM_registerMenuCommand
  100. // @grant GM_unregisterMenuCommand
  101. // @antifeature referral-link 此提示为GreasyFork代码规范要求含有查券功能的脚本必须添加,实际使用无任何强制跳转,代码可查,请知悉。
  102. // ==/UserScript==
  103.  
  104. !function(global, factory) {
  105. "object" == typeof exports && "undefined" != typeof module ? factory(require("vue"), require("reflect-metadata"), require("sweetalert2"), require("crypto-js")) : "function" == typeof define && define.amd ? define([ "vue", "reflect-metadata", "sweetalert2", "crypto-js" ], factory) : factory((global = "undefined" != typeof globalThis ? globalThis : global || self).Vue, null, global.Swal, global.CryptoJS);
  106. }(this, (function(Vue, reflectMetadata, Swal, CryptoJS) {
  107. "use strict";
  108. function _interopDefaultLegacy(e) {
  109. return e && "object" == typeof e && "default" in e ? e : {
  110. default: e
  111. };
  112. }
  113. var Vue__default = _interopDefaultLegacy(Vue), Swal__default = _interopDefaultLegacy(Swal), CryptoJS__default = _interopDefaultLegacy(CryptoJS), extendStatics = function(d, b) {
  114. return (extendStatics = Object.setPrototypeOf || {
  115. __proto__: []
  116. } instanceof Array && function(d, b) {
  117. d.__proto__ = b;
  118. } || function(d, b) {
  119. for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
  120. })(d, b);
  121. };
  122. function __extends(d, b) {
  123. function __() {
  124. this.constructor = d;
  125. }
  126. extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype,
  127. new __);
  128. }
  129. function __decorate(decorators, target, key, desc) {
  130. var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
  131. if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
  132. return c > 3 && r && Object.defineProperty(target, key, r), r;
  133. }
  134. function __metadata(metadataKey, metadataValue) {
  135. if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(metadataKey, metadataValue);
  136. }
  137. function __awaiter(thisArg, _arguments, P, generator) {
  138. return new (P || (P = Promise))((function(resolve, reject) {
  139. function fulfilled(value) {
  140. try {
  141. step(generator.next(value));
  142. } catch (e) {
  143. reject(e);
  144. }
  145. }
  146. function rejected(value) {
  147. try {
  148. step(generator.throw(value));
  149. } catch (e) {
  150. reject(e);
  151. }
  152. }
  153. function step(result) {
  154. result.done ? resolve(result.value) : function adopt(value) {
  155. return value instanceof P ? value : new P((function(resolve) {
  156. resolve(value);
  157. }));
  158. }(result.value).then(fulfilled, rejected);
  159. }
  160. step((generator = generator.apply(thisArg, _arguments || [])).next());
  161. }));
  162. }
  163. function __generator(thisArg, body) {
  164. var f, y, t, g, _ = {
  165. label: 0,
  166. sent: function() {
  167. if (1 & t[0]) throw t[1];
  168. return t[1];
  169. },
  170. trys: [],
  171. ops: []
  172. };
  173. return g = {
  174. next: verb(0),
  175. throw: verb(1),
  176. return: verb(2)
  177. }, "function" == typeof Symbol && (g[Symbol.iterator] = function() {
  178. return this;
  179. }), g;
  180. function verb(n) {
  181. return function(v) {
  182. return function step(op) {
  183. if (f) throw new TypeError("Generator is already executing.");
  184. for (;_; ) try {
  185. if (f = 1, y && (t = 2 & op[0] ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y),
  186. 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
  187. switch (y = 0, t && (op = [ 2 & op[0], t.value ]), op[0]) {
  188. case 0:
  189. case 1:
  190. t = op;
  191. break;
  192.  
  193. case 4:
  194. return _.label++, {
  195. value: op[1],
  196. done: !1
  197. };
  198.  
  199. case 5:
  200. _.label++, y = op[1], op = [ 0 ];
  201. continue;
  202.  
  203. case 7:
  204. op = _.ops.pop(), _.trys.pop();
  205. continue;
  206.  
  207. default:
  208. if (!(t = _.trys, (t = t.length > 0 && t[t.length - 1]) || 6 !== op[0] && 2 !== op[0])) {
  209. _ = 0;
  210. continue;
  211. }
  212. if (3 === op[0] && (!t || op[1] > t[0] && op[1] < t[3])) {
  213. _.label = op[1];
  214. break;
  215. }
  216. if (6 === op[0] && _.label < t[1]) {
  217. _.label = t[1], t = op;
  218. break;
  219. }
  220. if (t && _.label < t[2]) {
  221. _.label = t[2], _.ops.push(op);
  222. break;
  223. }
  224. t[2] && _.ops.pop(), _.trys.pop();
  225. continue;
  226. }
  227. op = body.call(thisArg, _);
  228. } catch (e) {
  229. op = [ 6, e ], y = 0;
  230. } finally {
  231. f = t = 0;
  232. }
  233. if (5 & op[0]) throw op[1];
  234. return {
  235. value: op[0] ? op[1] : void 0,
  236. done: !0
  237. };
  238. }([ n, v ]);
  239. };
  240. }
  241. }
  242. var LogLevel, Logger = function() {
  243. function Logger() {}
  244. return Logger.log = function(msg, level) {}, Logger.debug = function(msg) {
  245. this.log(msg, LogLevel.debug);
  246. }, Logger.info = function(msg) {
  247. this.log(msg, LogLevel.info);
  248. }, Logger.warn = function(msg) {
  249. this.log(msg, LogLevel.warn);
  250. }, Logger.error = function(msg) {
  251. this.log(msg, LogLevel.error);
  252. }, Logger;
  253. }();
  254. !function(LogLevel) {
  255. LogLevel[LogLevel.debug = 0] = "debug", LogLevel[LogLevel.info = 1] = "info", LogLevel[LogLevel.warn = 2] = "warn",
  256. LogLevel[LogLevel.error = 3] = "error";
  257. }(LogLevel || (LogLevel = {}));
  258. var BrowerType, Config = function() {
  259. function Config() {}
  260. return Object.defineProperty(Config, "env", {
  261. get: function() {
  262. return GM_info;
  263. },
  264. enumerable: !1,
  265. configurable: !0
  266. }), Config.get = function(key, defaultValue) {
  267. void 0 === defaultValue && (defaultValue = "");
  268. var objStr = GM_getValue(this.encode(key), defaultValue);
  269. if (objStr) {
  270. var obj = JSON.parse(objStr);
  271. if (-1 == obj.exp || obj.exp > (new Date).getTime()) return Logger.info("cache true"),
  272. obj.value;
  273. }
  274. return Logger.info("cache false"), defaultValue;
  275. }, Config.set = function(key, v, exp) {
  276. void 0 === exp && (exp = -1);
  277. var obj = {
  278. key: key,
  279. value: v,
  280. exp: -1 == exp ? exp : (new Date).getTime() + 1e3 * exp
  281. };
  282. GM_setValue(this.encode(key), JSON.stringify(obj));
  283. }, Config.clear = function(key) {
  284. this.set(key, null, -10);
  285. }, Config.decode = function(str) {
  286. return atob(str);
  287. }, Config.encode = function(str) {
  288. return btoa(str);
  289. }, Config;
  290. }(), History = function History() {
  291. this.max = 0, this.price_detail = [];
  292. }, PriceDetail = function PriceDetail() {}, ListPriceItem = function ListPriceItem() {};
  293. !function(BrowerType) {
  294. BrowerType[BrowerType.Edge = 0] = "Edge", BrowerType[BrowerType.Edg = 1] = "Edg",
  295. BrowerType[BrowerType.Chrome = 2] = "Chrome", BrowerType[BrowerType.Firefox = 3] = "Firefox",
  296. BrowerType[BrowerType.Safiri = 4] = "Safiri", BrowerType[BrowerType.Se360 = 5] = "Se360",
  297. BrowerType[BrowerType.Ie2345 = 6] = "Ie2345", BrowerType[BrowerType.Baidu = 7] = "Baidu",
  298. BrowerType[BrowerType.Liebao = 8] = "Liebao", BrowerType[BrowerType.UC = 9] = "UC",
  299. BrowerType[BrowerType.QQ = 10] = "QQ", BrowerType[BrowerType.Sogou = 11] = "Sogou",
  300. BrowerType[BrowerType.Opera = 12] = "Opera", BrowerType[BrowerType.Maxthon = 13] = "Maxthon";
  301. }(BrowerType || (BrowerType = {}));
  302. var Core = function() {
  303. function Core() {
  304. this.url = this.currentUrl();
  305. }
  306. return Core.appendTo = function(selecter, html) {
  307. $(selecter).append(html);
  308. }, Core.lazyload = function(callback, time) {
  309. void 0 === time && (time = 5), setTimeout((function() {
  310. callback();
  311. }), 1e3 * time);
  312. }, Core.autoLazyload = function(is_ok, callback, time) {
  313. void 0 === time && (time = 5), is_ok() ? callback() : setTimeout((function() {
  314. Core.autoLazyload(is_ok, callback, time);
  315. }), 1e3 * time);
  316. }, Core.prototype.background = function(callback, time) {
  317. void 0 === time && (time = 5), setInterval((function() {
  318. callback();
  319. }), 1e3 * time);
  320. }, Object.defineProperty(Core, "head", {
  321. get: function() {
  322. return unsafeWindow.window.document.head;
  323. },
  324. enumerable: !1,
  325. configurable: !0
  326. }), Core.isNumber = function(a) {
  327. return !Array.isArray(a) && a - parseFloat(a) >= 0;
  328. }, Core.addUrl = function(key, url) {
  329. GM_setValue(key, url);
  330. }, Core.openUrl = function(key) {
  331. this.open(GM_getValue(key));
  332. }, Core.prototype.getPar = function(option, url) {
  333. void 0 === url && (url = window.location.search);
  334. var v = url.match(new RegExp("[?&]" + option + "=([^&]+)", "i"));
  335. return null == v || v.length < 1 ? "" : v[1];
  336. }, Core.appendCss = function(url) {
  337. var linkCSS = document.createElement("link");
  338. linkCSS.type = "text/css", linkCSS.rel = "stylesheet", linkCSS.href = url, Core.head.appendChild(linkCSS);
  339. }, Core.appendCssContent = function(content) {
  340. var Style = document.createElement("style");
  341. Style.innerHTML = content, Core.head.appendChild(Style);
  342. }, Core.prototype.bodyAppendCss = function(url) {
  343. $("body").append($('<link rel="stylesheet" href="' + url + '">'));
  344. }, Core.bodyAppend = function(html) {
  345. $("body").append(html);
  346. }, Core.appendJs = function(url) {
  347. var linkScript = document.createElement("script");
  348. linkScript.type = "text/javascript", linkScript.src = url, this.head.appendChild(linkScript);
  349. }, Core.prototype.bodyAppendJs = function(url) {
  350. $("body").append($('<script type="text/javascript" src="' + url + '"><\/script>'));
  351. }, Core.prototype.currentUrl = function() {
  352. return window.location.href;
  353. }, Core.inIframe = function() {
  354. return !(!self.frameElement || "IFRAME" != self.frameElement.tagName) || (window.frames.length != parent.frames.length || self != top);
  355. }, Core.format = function(time, fmt) {
  356. void 0 === fmt && (fmt = "yyyy-MM-dd hh:mm:ss");
  357. var o = {
  358. "M+": time.getMonth() + 1,
  359. "d+": time.getDate(),
  360. "h+": time.getHours(),
  361. "m+": time.getMinutes(),
  362. "s+": time.getSeconds(),
  363. "q+": Math.floor((time.getMonth() + 3) / 3),
  364. S: time.getMilliseconds()
  365. };
  366. for (var k in /(y+)/.test(fmt) && (fmt = fmt.replace(RegExp.$1, (time.getFullYear() + "").substr(4 - RegExp.$1.length))),
  367. o) new RegExp("(" + k + ")").test(fmt) && (fmt = fmt.replace(RegExp.$1, 1 == RegExp.$1.length ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)));
  368. return fmt;
  369. }, Core.encode = function(str) {
  370. return window.btoa(str);
  371. }, Core.decode = function(str) {
  372. return window.atob(str);
  373. }, Core.prototype.Msg = function(msg) {
  374. return layer.msg(msg, {
  375. icon: 5
  376. });
  377. }, Core.prototype.showContent = function(title, content) {
  378. return layer.open({
  379. type: 1,
  380. title: title,
  381. shade: 0,
  382. content: content
  383. });
  384. }, Core.prototype.close = function(obj) {
  385. layer.close(obj);
  386. }, Core.prototype.closeAll = function() {
  387. layer.closeAll();
  388. }, Core.open = function(url, loadInBackGround) {
  389. void 0 === loadInBackGround && (loadInBackGround = !1), GM_openInTab(url, loadInBackGround);
  390. }, Core.click = function(selector, callback) {
  391. $(selector).on("click", callback);
  392. }, Core.uuid = function(len, split, radix) {
  393. void 0 === len && (len = 10), void 0 === split && (split = !1), void 0 === radix && (radix = 0);
  394. var i, chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), uuid = [];
  395. if (radix = 0 == radix ? radix || chars.length : radix, split) {
  396. var r = void 0;
  397. for (uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-", uuid[14] = "4", i = 0; i < 36; i++) uuid[i] || (r = 0 | 16 * Math.random(),
  398. uuid[i] = chars[19 == i ? 3 & r | 8 : r]);
  399. } else for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
  400. return uuid.join("");
  401. }, Core.getBrowser = function() {
  402. var browser = !1, userAgent = window.navigator.userAgent.toLowerCase();
  403. 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),
  404. browser;
  405. }, Core;
  406. }(), Runtime = function() {
  407. function Runtime() {}
  408. return Object.defineProperty(Runtime, "url", {
  409. get: function() {
  410. return window.location.href;
  411. },
  412. enumerable: !1,
  413. configurable: !0
  414. }), Runtime;
  415. }();
  416. !function() {
  417. function HttpRequest(option) {
  418. this.headers = new Map, this.url = option.url, this.method = option.methodType,
  419. this.dataType = option.dataType, this._option = option;
  420. }
  421. HttpRequest.prototype.onload = function(res) {
  422. this._option.onSuccess(res);
  423. }, HttpRequest.prototype.onerror = function() {
  424. this.onerror();
  425. }, HttpRequest.prototype.setQueryData = function(datas) {
  426. if (datas instanceof FormData) this.data = datas; else {
  427. var fd = new FormData;
  428. for (var i in datas) fd.append(i, datas[i]);
  429. this.data = fd;
  430. }
  431. }, Object.defineProperty(HttpRequest.prototype, "onLoad", {
  432. get: function() {
  433. return this.onSuccess;
  434. },
  435. enumerable: !1,
  436. configurable: !0
  437. });
  438. }();
  439. var AjaxOption = function() {
  440. function AjaxOption(_url, _methodType, _data, _success, _header, timeOut) {
  441. void 0 === _methodType && (_methodType = "GET"), void 0 === _header && (_header = new Map),
  442. void 0 === timeOut && (timeOut = 30), this.url = _url, this.methodType = _methodType,
  443. this.onSuccess = _success, this.onError = _success, this.data = _data, this.headers = _header,
  444. this.timeOut = timeOut;
  445. }
  446. return AjaxOption.prototype.getData = function() {
  447. if (this.data instanceof FormData) return this.data;
  448. if (this.data instanceof Map) {
  449. var fd_1 = new FormData;
  450. return this.data.forEach((function(v, k) {
  451. fd_1.append(k, v);
  452. })), fd_1;
  453. }
  454. var fd = new FormData;
  455. for (var i in this.data) fd.append(i, this.data[i]);
  456. return fd;
  457. }, AjaxOption;
  458. }(), Alert = function() {
  459. function Alert() {}
  460. return Alert.open = function(titls, content, area, shade, offset, maxmin) {
  461. return void 0 === area && (area = [ "400px", "300px" ]), void 0 === shade && (shade = 0),
  462. void 0 === offset && (offset = "lb"), void 0 === maxmin && (maxmin = !0), layer.open({
  463. type: 1,
  464. title: titls,
  465. area: area,
  466. shade: shade,
  467. offset: offset,
  468. maxmin: maxmin,
  469. content: content
  470. });
  471. }, Alert.info = function(msg) {
  472. return layer.msg(msg, {
  473. time: 2e3
  474. });
  475. }, Alert.error = function(msg) {
  476. return layer.msg(msg, {
  477. icon: 5,
  478. time: 2e3
  479. });
  480. }, Alert.confim = function(title, msg, buttons, callback, auto_close) {
  481. void 0 === auto_close && (auto_close = !1);
  482. var tid = layer.open({
  483. type: 1,
  484. title: title || !1,
  485. closeBtn: 1,
  486. shade: .8,
  487. id: "LAY_layuipro",
  488. resize: !1,
  489. btn: buttons,
  490. btnAlign: "c",
  491. moveType: 1,
  492. content: '<div style="padding: 20px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">' + msg + "</div>",
  493. yes: function(index) {
  494. callback(index), auto_close && Core.lazyload((function() {
  495. layer.close(tid);
  496. }));
  497. }
  498. });
  499. return tid;
  500. }, Alert.prompt = function(title, v, callback, size, type) {
  501. void 0 === type && (type = 0), layer.prompt({
  502. title: title,
  503. value: v,
  504. formType: type
  505. }, (function(v, i, ele) {
  506. callback(v), layer.close(i);
  507. }));
  508. }, Alert.close = function(index) {
  509. layer.close(index);
  510. }, Alert.closeAll = function() {
  511. layer.closeAll();
  512. }, Alert.loading = function(style, _time, _shade) {
  513. return void 0 === style && (style = 1), void 0 === _time && (_time = 10), void 0 === _shade && (_shade = .3),
  514. layer.load(style, {
  515. shade: _shade,
  516. time: 1e3 * _time
  517. });
  518. }, Alert;
  519. }(), Http = function() {
  520. function Http() {}
  521. return Http.ajax = function(option) {
  522. var _a, _b;
  523. option.headers.set("User-Agent", "Mozilla/4.0 (compatible) Greasemonkey"), option.headers.set("Accept", "application/atom+xml,application/xml,text/xml");
  524. var head = new HttpHeaders;
  525. head.version = Config.env.script.version, head.auth = null !== (_a = Config.env.script.author) && void 0 !== _a ? _a : "",
  526. head.namespace = null !== (_b = Config.env.script.namespace) && void 0 !== _b ? _b : "",
  527. option.headers.forEach((function(v, k) {
  528. head[k] = v;
  529. })), GM_xmlhttpRequest({
  530. url: option.url,
  531. method: option.methodType,
  532. headers: head,
  533. data: option.getData(),
  534. timeout: 1e3 * option.timeOut,
  535. onload: function(res) {
  536. var _a, _b;
  537. try {
  538. null === (_a = option.onSuccess) || void 0 === _a || _a.call(option, "POST" == option.methodType ? JSON.parse(res.responseText) : res.responseText);
  539. } catch (error) {
  540. Alert.confim("", ' \n <h1>\u54cd\u5e94\u5f02\u5e38\uff0c\u8bf7\u590d\u5236\u4e0b\u5217\u4fe1\u606f\u5411\u5f00\u53d1\u8005\u53cd\u9988\u95ee\u9898</h1><br>\n <span style="color:red;font-weight: bold;font-size: large;">\u9519\u8bef\u65e5\u5fd7\uff1a</span><br>\n <p>' + error + "(" + res.status + ')</p>\n <span style="color:red;font-weight: bold;font-size: large;">\u9519\u8bef\u8be6\u60c5\uff1a</span><br>\n <p>' + escape(res.responseText) + '</p> \n <span style="color:red;font-weight: bold;font-size: large;">\u73af\u5883\u4fe1\u606f\uff1a</span><br>\n <p>\u6cb9\u7334\u7248\u672c\uff1a' + Config.env.version + "</p>\n <p>\u811a\u672c\u7248\u672c\uff1a" + Config.env.script.version + "</p>\n <p>Url\uff1a" + Runtime.url + "</p>\n ", [ "\u53bb\u53cd\u9988", "\u5173\u95ed" ], (function() {
  541. Core.open("https://gitee.com/ixysy/OneKeyVip/issues");
  542. })), null === (_b = option.onSuccess) || void 0 === _b || _b.call(option, null);
  543. }
  544. },
  545. onerror: function(res) {
  546. var _a;
  547. Alert.confim("", ' \n <h1>\u8bf7\u6c42\u5931\u8d25\uff0c\u8bf7\u590d\u5236\u4e0b\u5217\u4fe1\u606f\u5411\u5f00\u53d1\u8005\u53cd\u9988\u95ee\u9898</h1><br>\n <span style="color:red;font-weight: bold;font-size: large;">\u9519\u8bef\u8be6\u60c5\uff1a</span><br>\n <p>' + escape(res.responseText) + "(" + res.status + ')</p>\n <span style="color:red;font-weight: bold;font-size: large;">\u73af\u5883\u4fe1\u606f\uff1a</span><br>\n <p>\u6cb9\u7334\u7248\u672c\uff1a' + Config.env.version + "</p>\n <p>\u811a\u672c\u7248\u672c\uff1a" + Config.env.script.version + "</p>\n <p>Url\uff1a" + Runtime.url + "</p> \n ", [ "\u53bb\u53cd\u9988", "\u5173\u95ed" ], (function() {
  548. Core.open("https://gitee.com/ixysy/OneKeyVip/issues");
  549. })), null === (_a = option.onError) || void 0 === _a || _a.call(option, res);
  550. }
  551. });
  552. }, Http.getData = function(url, callback) {
  553. $.getJSON(url, (function(d) {
  554. callback(d);
  555. }));
  556. }, Http.JqGet = function(url, callback) {
  557. Http.get(url, new Map).then((function(d) {
  558. callback(d);
  559. }));
  560. }, Http.post = function(url, data, timeOut) {
  561. void 0 === timeOut && (timeOut = 10);
  562. var index = Alert.loading();
  563. return new Promise((function(resolve) {
  564. Http.ajax(new AjaxOption(url, "POST", data, (function(data) {
  565. Alert.close(index), resolve(data);
  566. }), new Map, timeOut));
  567. }));
  568. }, Http.get = function(url, data, time_out) {
  569. return void 0 === data && (data = new Map), void 0 === time_out && (time_out = 10),
  570. Alert.loading(), new Promise((function(resolve, reject) {
  571. Http.ajax(new AjaxOption(url, "GET", data, (function(data) {
  572. var _a;
  573. try {
  574. var res = null !== (_a = JSON.parse(data)) && void 0 !== _a ? _a : data;
  575. resolve(res);
  576. } catch (error) {
  577. Logger.debug(error), reject();
  578. }
  579. }), new Map, time_out));
  580. }));
  581. }, Http.getWithHead = function(url, data, head, time_out) {
  582. return void 0 === data && (data = new Map), void 0 === head && (head = new Map),
  583. void 0 === time_out && (time_out = 10), Alert.loading(), new Promise((function(resolve, reject) {
  584. Http.ajax(new AjaxOption(url, "GET", data, (function(data) {
  585. var _a;
  586. try {
  587. var res = null !== (_a = JSON.parse(data)) && void 0 !== _a ? _a : data;
  588. resolve(res);
  589. } catch (error) {
  590. Logger.debug(error), reject();
  591. }
  592. }), head, time_out));
  593. }));
  594. }, Http.postWithHead = function(url, data, head, time_out) {
  595. return void 0 === data && (data = new Map), void 0 === head && (head = new Map),
  596. void 0 === time_out && (time_out = 10), Alert.loading(), new Promise((function(resolve, reject) {
  597. Http.ajax(new AjaxOption(url, "POST", data, (function(data) {
  598. try {
  599. resolve(data);
  600. } catch (error) {
  601. Logger.debug([ url, error ]), reject();
  602. }
  603. }), head, time_out));
  604. }));
  605. }, Http.get_text = function(url) {
  606. return new Promise((function(resolve) {
  607. Http.ajax(new AjaxOption(url, "GET", new Map, (function(data) {
  608. resolve(data);
  609. })));
  610. }));
  611. }, Http;
  612. }(), HttpHeaders = function HttpHeaders() {}, Convert = function() {
  613. function Convert() {}
  614. return Convert.genterData = function(data) {
  615. var _data = new History;
  616. if (_data.date = Core.format(new Date(Number.parseInt(data.lowerDate.match(/[0-9]{13}/)[0]) + 800), "yyyy-MM-dd"),
  617. _data.min = data.lowerPrice, _data.max = _data.min, _data.max_date = _data.date,
  618. _data.current = data.currentPrice.toString(), _data.mark = "" == data.changPriceRemark ? "\u6682\u65e0" : data.changPriceRemark,
  619. 0 == data.listPrice.length || !data.listPrice) {
  620. var temp_1 = [];
  621. data.datePrice.split("],[").forEach((function(v, n) {
  622. var t = new ListPriceItem, values = (v = v.replace(/\[|"|\]/g, "")).split(",");
  623. t.pr = Number.parseInt(values[1]), t.yh = 3 == values.length ? values[2] : v.substring(v.indexOf(values[2]), v.length),
  624. t.dt = values[0], temp_1.push(t);
  625. })), data.listPrice = temp_1;
  626. }
  627. return data.listPrice.forEach((function(v, n) {
  628. var detail = new PriceDetail;
  629. detail.timestamp = Number.parseInt(v.dt.match(/[0-9]{13}/)[0]) + 800, detail.time = Core.format(new Date(detail.timestamp), "yyyy-MM-dd"),
  630. detail.price = v.pr, detail.mark = v.yh, _data.max < v.pr && (_data.max = v.pr,
  631. _data.max_date = detail.time), _data.price_detail.push(detail);
  632. })), _data;
  633. }, Convert.genterDataV2 = function(data) {
  634. var _data = new History;
  635. _data.date = Core.format(new Date(data.lowerDate), "yyyy-MM-dd"), _data.min = data.lowerPrice,
  636. _data.max = _data.min, _data.max_date = _data.date, _data.current = data.currentPrice.toString(),
  637. _data.mark = "" == data.changPriceRemark ? "\u6682\u65e0" : data.changPriceRemark;
  638. var listPrice = [];
  639. if (0 != data.datePrice.length) {
  640. var temp_2 = [];
  641. data.datePrice.split("],[").forEach((function(v, n) {
  642. var t = new ListPriceItem, values = (v = v.replace(/\[|"|\]/g, "")).split(",");
  643. t.pr = Number.parseInt(values[1]), t.yh = 3 == values.length ? values[2] : v.substring(v.indexOf(values[2]), v.length),
  644. t.dt = values[0], temp_2.push(t);
  645. })), listPrice = temp_2;
  646. }
  647. return listPrice.forEach((function(v, n) {
  648. var detail = new PriceDetail;
  649. detail.timestamp = Number.parseInt(v.dt.match(/[0-9]{13}/)[0]) + 800, detail.time = Core.format(new Date(detail.timestamp), "yyyy-MM-dd"),
  650. detail.price = v.pr, detail.mark = v.yh, _data.max < v.pr && (_data.max = v.pr,
  651. _data.max_date = detail.time), _data.price_detail.push(detail);
  652. })), _data;
  653. }, Convert.genterAuth = function() {
  654. return __awaiter(this, void 0, Promise, (function() {
  655. var _auth;
  656. return __generator(this, (function(_a) {
  657. switch (_a.label) {
  658. case 0:
  659. return (_auth = Config.get("baseauth", "")) ? [ 4, _auth ] : [ 3, 2 ];
  660.  
  661. case 1:
  662. return [ 2, _a.sent() ];
  663.  
  664. case 2:
  665. return [ 4, Http.get_text(this.authApi).then((function(html) {
  666. var matchR = html.match(/id=\"ticket\" value=\"(.*)\"/i);
  667. return (_auth = null != matchR ? "" + matchR[1] : "").length > 4 && (_auth = "BasicAuth " + (_auth = _auth.substr(_auth.length - 4, 4) + _auth.substring(0, _auth.length - 4))),
  668. Config.set("baseauth", _auth, 60), _auth;
  669. })) ];
  670.  
  671. case 3:
  672. return [ 2, _auth = _a.sent() ];
  673. }
  674. }));
  675. }));
  676. }, Convert.authApi = "https://tool.manmanbuy.com/HistoryLowest.aspx", Convert;
  677. }(), Result = function() {
  678. function Result() {}
  679. return Result.prototype.constructorq = function() {}, Result;
  680. }();
  681. !function(_super) {
  682. function StuResult() {
  683. return null !== _super && _super.apply(this, arguments) || this;
  684. }
  685. __extends(StuResult, _super);
  686. }(Result), function(_super) {
  687. function StrResult() {
  688. return null !== _super && _super.apply(this, arguments) || this;
  689. }
  690. __extends(StrResult, _super);
  691. }(Result);
  692. var HistoryResult = function(_super) {
  693. function HistoryResult() {
  694. return null !== _super && _super.apply(this, arguments) || this;
  695. }
  696. return __extends(HistoryResult, _super), HistoryResult;
  697. }(Result);
  698. !function(_super) {
  699. function HistoryQueryResult() {
  700. return null !== _super && _super.apply(this, arguments) || this;
  701. }
  702. __extends(HistoryQueryResult, _super);
  703. }(Result), function(_super) {
  704. function HistoryV1Result() {
  705. return null !== _super && _super.apply(this, arguments) || this;
  706. }
  707. __extends(HistoryV1Result, _super);
  708. }(Result), function(_super) {
  709. function HistoryV2Result() {
  710. return null !== _super && _super.apply(this, arguments) || this;
  711. }
  712. __extends(HistoryV2Result, _super);
  713. }(Result);
  714. var ToastType, Route = function() {
  715. function Route() {
  716. this.queryTao = "";
  717. }
  718. return Object.defineProperty(Route, "apiRoot", {
  719. get: function() {
  720. return "https://api.wandhi.com/api";
  721. },
  722. enumerable: !1,
  723. configurable: !0
  724. }), Route.baseApi = function(api, data, callback, timeOut) {
  725. void 0 === timeOut && (timeOut = 10), Http.post(Route.apiRoot + api, data, timeOut).then((function(res) {
  726. callback(res);
  727. }));
  728. }, Route.querySbx = function(id, callback) {
  729. var _this = this;
  730. "" !== Config.get(this.sxb_key, "") ? this.query365(id, Config.get(this.sxb_key), callback) : this.queryValue("sxb_anhao", (function(res) {
  731. _this.query365(id, res.data, callback);
  732. }));
  733. }, Route.sbxFeedback = function(id, answer) {
  734. this.baseApi("/tools/record", new Map([ [ "id", id ], [ "data", answer ], [ "anhao", Config.get(this.sxb_key) ] ]), (function() {}));
  735. }, Route.query365 = function(id, anhao, callback) {
  736. var api = Config.get("sxb_api");
  737. api ? Http.post(api, new Map([ [ "docinfo", "https://www.shangxueba.com/ask/" + id + ".html" ], [ "anhao", anhao ] ])).then((function(res) {
  738. callback(res);
  739. })) : this.queryValue("sxb_api", (function(res) {
  740. Config.set("sxb_api", res.data, 864e5), Http.post(res.data, new Map([ [ "docinfo", "https://www.shangxueba.com/ask/" + id + ".html" ], [ "anhao", anhao ] ]));
  741. }));
  742. }, Route.queryValue = function(key, callback) {
  743. this.baseApi(Route.config, new Map([ [ "key", key ] ]), callback);
  744. }, Route.queryHistory = function(url, siteType, callback) {
  745. this.baseApi(this.history, new Map([ [ "url", url ], [ "type", siteType ] ]), callback);
  746. }, Route.queryHistoryv1 = function(url, siteType, callback) {
  747. var _this = this, that = this;
  748. this.baseApi(this.historyv1, new Map([ [ "url", url ] ]), (function(res) {
  749. Logger.debug(res), res.code ? Http.get(res.data).then((function(prices) {
  750. var _res = new HistoryResult;
  751. _res.code = 1, _res.data = Convert.genterData(prices), Logger.debug(_res), callback(_res);
  752. })).catch((function() {
  753. that.queryHistory(url, siteType, callback);
  754. })) : _this.queryHistory(url, siteType, callback);
  755. }), 60);
  756. }, Route.queryHistoryv2 = function(url, siteType, callback) {
  757. var _this = this, that = this;
  758. this.baseApi(this.historyv2, new Map([ [ "url", url ] ]), (function(res) {
  759. Logger.debug(res), res.code ? Http.getWithHead(res.data.url, new Map, new Map([ [ "Authorization", res.data.auth ] ])).then((function(prices) {
  760. var _res = new HistoryResult;
  761. 0 == prices.code ? _res.code = 1 : _res.code = -1, _res.code = 1, _res.data = Convert.genterDataV2(prices.data),
  762. Logger.debug(_res), callback(_res);
  763. })).catch((function() {
  764. that.queryHistory(url, siteType, callback);
  765. })) : _this.queryHistory(url, siteType, callback);
  766. }), 60);
  767. }, Route.queryHistoryv3 = function(url, siteType, callback) {
  768. var _this = this, that = this;
  769. this.baseApi(this.historyv3, new Map([ [ "url", url ] ]), (function(res) {
  770. Logger.debug(res), res.code ? Convert.genterAuth().then((function(auth) {
  771. Http.postWithHead(res.data.url, new Map([ [ "token", res.data.token ], [ "t", res.data.t ], [ "key", res.data.key ], [ "method", res.data.method ] ]), new Map([ [ "Authorization", null != auth ? auth : res.data.auth ] ])).then((function(prices) {
  772. var _res = new HistoryResult;
  773. 0 == prices.code ? _res.code = 1 : 2 == prices.code ? (Config.clear("baseauth"),
  774. _this.queryHistoryv3(url, siteType, callback)) : _res.code = -1, _res.code = 1,
  775. _res.data = Convert.genterDataV2(prices.data), Logger.debug(_res), callback(_res);
  776. })).catch((function() {
  777. that.queryHistory(url, siteType, callback);
  778. }));
  779. })) : _this.queryHistory(url, siteType, callback);
  780. }), 60);
  781. }, Route.queryHistoryV4 = function(url, siteType, fp, dfp, callback) {
  782. var root = "https://browser.gwdang.com/extension/price_towards?url=" + encodeURIComponent(url) + "&ver=1&format=json&fp=" + fp + "&dfp=" + dfp;
  783. Http.JqGet(root, callback);
  784. }, Route.queryBiliImg = function(aid, callback) {
  785. Http.getData(this.biliInfo + "?aid=" + aid, callback);
  786. }, Route.queryBiliDown = function(aid, cid, callback) {
  787. Http.getData(this.bilidown + "?cid=" + cid + "&avid=" + aid + "&qn=112", callback);
  788. }, Route.queryCoupons = function(itemId, callback) {
  789. this.baseApi(this.coupons, new Map([ [ "id", itemId ] ]), callback);
  790. }, Route.queryJdCoupons = function(itemId, callback) {
  791. Route.baseApi(Route.jd_coupons, new Map([ [ "item_id", itemId ] ]), callback);
  792. }, Route.querySnCoupons = function(url, callback) {
  793. Route.baseApi(Route.sn_coupons, new Map([ [ "url", url ] ]), callback);
  794. }, Route.queryVpCoupons = function(url, callback) {
  795. Route.baseApi(Route.vp_coupons, new Map([ [ "url", url ] ]), callback);
  796. }, Route.couponQuery = function(itemId, type, callback) {
  797. Route.baseApi("/coupons/info", new Map([ [ "id", itemId ], [ "type", type ] ]), callback);
  798. }, Route.update_api = "https://cdn.jsdelivr.net/gh/maxzhang666/OneKeyVip/OneKeyVip.user.js?t=" + Core.uuid(),
  799. Route.home_url = "https://wiki.wandhi.com", Route.install_url_one = "https://greasyfork.org/zh-CN/scripts/384538",
  800. Route.install_url_two = "https://tools.wandhi.com/scripts", Route.sxb_anhao = "http://www.lelunwen.com/e/action/ListInfo/?classid=45",
  801. Route.sxb_key = "sxb_anhao", Route.config = "/config/query", Route.history = "/history/",
  802. Route.historyv1 = "/history/v1", Route.historyv2 = "/history/v2", Route.historyv3 = "/history/v3",
  803. Route.bili = "/tools/bili", Route.biliInfo = "https://api.bilibili.com/x/web-interface/view",
  804. Route.bilidown = "https://api.bilibili.com/x/player/playurl", Route.coupons = "/tb/infos/",
  805. Route.like = "/tb/guesslike", Route.jd_coupons = "/jd/info", Route.sn_coupons = "/sn/info",
  806. Route.vp_coupons = "/vp/info", Route;
  807. }(), Toast = function() {
  808. function Toast(msg, title, type) {
  809. this.creationTime = new Date, this.message = msg, this.type = type, this.title = title,
  810. this.duration = 3e3, this.randomKey = Math.floor(Math.random() * (Number.MAX_SAFE_INTEGER + 1));
  811. }
  812. return Toast.prototype.show = function() {
  813. var _this = this;
  814. Toast.containerVM.cards.splice(0, 0, this), void 0 !== this.duration && -1 != this.duration && setTimeout((function() {
  815. return _this.dismiss();
  816. }), this.duration);
  817. }, Toast.prototype.dismiss = function() {
  818. Toast.containerVM.cards.includes(this) && Toast.containerVM.cards.splice(Toast.containerVM.cards.indexOf(this), 1);
  819. }, Object.defineProperty(Toast.prototype, "element", {
  820. get: function() {
  821. return $(".toast-card[data-key='" + this.key + "']");
  822. },
  823. enumerable: !1,
  824. configurable: !0
  825. }), Object.defineProperty(Toast.prototype, "key", {
  826. get: function() {
  827. return this.creationTime.toISOString() + "[" + this.randomKey + "]";
  828. },
  829. enumerable: !1,
  830. configurable: !0
  831. }), Object.defineProperty(Toast, "containerVM", {
  832. get: function() {
  833. return this.element || Toast.createToastContainer(), this.element;
  834. },
  835. enumerable: !1,
  836. configurable: !0
  837. }), Toast.createToastContainer = function() {
  838. document.querySelector(".toast-card-container") || (document.body.insertAdjacentHTML("beforeend", '<transition-group class="toast-card-container" name="toast-card-container" tag="div">\n <toast-card v-for="card of cards" :data-key="card.key" :key="card.key" :card="card"></toast-card>\n </transition-group>'),
  839. document.body.insertAdjacentHTML("afterend", '<style>.toast-card-container{--card-min-width:240px;--card-min-width-negative:-240px;position:fixed;left:0;bottom:0;display:flex;flex-direction:column-reverse;align-items:start;padding-left:16px;z-index:100001;pointer-events:none;overflow:hidden;width:100%;height:100%;transition:.2s ease-out}.toast-card-container *{pointer-events:initial;transition:.2s ease-out}.toast-card.toast-card-container-enter,.toast-card.toast-card-container-leave-to{opacity:0;transform:translateX(var(--card-min-width-negative))}.toast-card{background:#fff;min-width:var(--card-min-width);max-width:60vw;min-height:96px;margin:8px 0;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;transform-origin:left;overflow:hidden;display:flex;flex-direction:column;border-left-style:solid;transition:.3s cubic-bezier(.18,.89,.32,1.28);position:relative;border-left-width:0;padding-left:var(--corner-radius);border-radius:var(--corner-radius)}.toast-card.toast-card-container-leave-active{position:absolute;transition:.3s cubic-bezier(.6,-.28,.74,.05)}.toast-card-header{display:flex;align-items:center}.toast-card-title{font-size:18px;color:#000;opacity:.5;margin:16px;font-weight:700;flex:1 1 auto}.toast-card-dismiss{height:24px;width:24px;flex:0 0 auto;padding:16px;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:.2s ease-out;transform-origin:center;opacity:.5;box-sizing:content-box}.toast-card-dismiss:hover{transform:scale(1.2)}.toast-card-dismiss:active{transform:scale(1.1)}.toast-card-message{color:#000;font-size:14px;margin:0 16px 16px;white-space:pre-wrap;display:flex;align-items:center;line-height:1.5;flex-wrap:wrap;word-break:break-all;max-height:200px;overflow:auto}.toast-card.toast-default{border-left-color:#444}.toast-card.toast-error{border-left-color:#f44336}.toast-card.toast-info{border-left-color:#2196f3}.toast-card.toast-success{border-left-color:#8bc34a}.toast-card .toast-card-border{position:absolute;height:100%;width:4px;border-radius:var(--corner-radius);height:calc(100% - 10px);width:var(--corner-radius);top:5px;left:0}.toast-card.toast-default .toast-card-border{background-color:#444}.toast-card.toast-error .toast-card-border{background-color:#f44336}.toast-card.toast-info .toast-card-border{background-color:#2196f3}.toast-card.toast-success .toast-card-border{background-color:#8bc34a}.toast-card .link,.toast-card span{display:inline-block;padding:4px 6px;margin:0 2px;background-color:#8882;text-decoration:none;color:#000;transition:.2s ease-out;border-radius:var(--corner-radius)}.toast-card .link:hover{background-color:#8883}.toast-card .link:active{background-color:#8884}.toast-card .download-link{color:inherit!important;text-decoration:underline;word-break:break-all}@keyframes loading{0%,100%{top:0;left:50%}25%{top:50%;left:100%}50%{top:100%;left:50%}75%{top:50%;left:0}}.toast-card .loading{width:14px;height:14px;display:inline-block;margin-right:14px;position:relative}.toast-card .loading::after{content:"";width:10px;height:10px;background-color:#8884;border-radius:50%;display:block;transform:translateX(-50%) translateY(-50%);position:absolute;top:0;left:50%;animation:1s cubic-bezier(.22,.61,.36,1) infinite loading}</style>'),
  840. this.element = new Vue__default.default({
  841. el: ".toast-card-container",
  842. components: {
  843. "toast-card": {
  844. props: [ "card" ],
  845. template: '<div class="toast-card icons-enabled visible" :class="\'toast-\' + card.type">\n <div class="toast-card-border"></div>\n <div class="toast-card-header">\n <h1 class="toast-card-title">{{card.title}}</h1>\n <div class="toast-card-dismiss" @click="card.dismiss()">\n <svg style="width:22px;height:22px" viewBox="0 0 24 24">\n <path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" />\n </svg>\n </div>\n </div>\n <div class="toast-card-message" v-html="card.message"></div>\n </div>'
  846. }
  847. },
  848. data: {
  849. cards: []
  850. }
  851. }));
  852. }, Toast.internalShow = function(msg, title, time, e) {
  853. var n = new Toast(msg, title, e);
  854. return n.duration = time, n.show(), n;
  855. }, Toast.show = function(msg, title, time) {
  856. return void 0 === time && (time = -1), this.internalShow(msg, title, time, ToastType.Default);
  857. }, Toast.info = function(msg, title, time) {
  858. return void 0 === time && (time = -1), this.internalShow(msg, title, time, ToastType.Info);
  859. }, Toast.success = function(msg, title, time) {
  860. return void 0 === time && (time = -1), this.internalShow(msg, title, time, ToastType.Success);
  861. }, Toast.error = function(msg, title, time) {
  862. return void 0 === time && (time = -1), this.internalShow(msg, title, time, ToastType.Error);
  863. }, Toast;
  864. }();
  865. function styleInject(css, ref) {
  866. void 0 === ref && (ref = {});
  867. var insertAt = ref.insertAt;
  868. if (css && "undefined" != typeof document) {
  869. var head = document.head || document.getElementsByTagName("head")[0], style = document.createElement("style");
  870. style.type = "text/css", "top" === insertAt && head.firstChild ? head.insertBefore(style, head.firstChild) : head.appendChild(style),
  871. style.styleSheet ? style.styleSheet.cssText = css : style.appendChild(document.createTextNode(css));
  872. }
  873. }
  874. !function(ToastType) {
  875. ToastType.Default = "default", ToastType.Info = "info", ToastType.Success = "success",
  876. ToastType.Error = "error";
  877. }(ToastType || (ToastType = {}));
  878. var Common;
  879. styleInject('html .aside-nav{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;font-size:62.5%}body .aside-nav{font-family:"Helvetica Neue",Helvetica,"Microsoft YaHei",Arial,sans-serif;margin:0;font-size:1.6rem;color:#4e546b}.aside-nav{position:fixed;top:350px;width:260px;height:260px;-webkit-filter:url(#goo);filter:url(#goo);-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none;opacity:.75;z-index:20180817}.aside-nav.no-filter{-webkit-filter:none;filter:none}.aside-nav .aside-menu{position:absolute;width:70px;height:70px;-webkit-border-radius:50%;border-radius:50%;background:#f34444;left:0;top:0;right:0;bottom:0;margin:auto;text-align:center;line-height:70px;color:#fff;font-size:20px;z-index:1;cursor:move}.aside-nav .menu-item{position:absolute;width:60px;height:60px;background-color:#ff7676;left:0;top:0;right:0;bottom:0;margin:auto;line-height:60px;text-align:center;-webkit-border-radius:50%;border-radius:50%;text-decoration:none;color:#fff;-webkit-transition:background .5s,-webkit-transform .6s;transition:background .5s,-webkit-transform .6s;-moz-transition:transform .6s,background .5s,-moz-transform .6s;transition:transform .6s,background .5s;transition:transform .6s,background .5s,-webkit-transform .6s,-moz-transform .6s;font-size:14px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.aside-nav .menu-item:hover{background:#a9c734}.aside-nav .menu-line{line-height:20px;padding-top:10px}.aside-nav:hover{opacity:1}.aside-nav:hover .aside-menu{-webkit-animation:jello 1s;-moz-animation:jello 1s;animation:jello 1s}.aside-nav:hover .menu-first{-webkit-transform:translate3d(0,-135%,0);-moz-transform:translate3d(0,-135%,0);transform:translate3d(0,-135%,0)}.aside-nav:hover .menu-second{-webkit-transform:translate3d(120%,-70%,0);-moz-transform:translate3d(120%,-70%,0);transform:translate3d(120%,-70%,0)}.aside-nav:hover .menu-third{-webkit-transform:translate3d(120%,70%,0);-moz-transform:translate3d(120%,70%,0);transform:translate3d(120%,70%,0)}.aside-nav:hover .menu-fourth{-webkit-transform:translate3d(0,135%,0);-moz-transform:translate3d(0,135%,0);transform:translate3d(0,135%,0)}@-webkit-keyframes jello{from,11.1%,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(0.390625deg) skewY(0.390625deg);transform:skewX(0.390625deg) skewY(0.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@-moz-keyframes jello{from,11.1%,to{-moz-transform:none;transform:none}22.2%{-moz-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-moz-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-moz-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-moz-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-moz-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-moz-transform:skewX(0.390625deg) skewY(0.390625deg);transform:skewX(0.390625deg) skewY(0.390625deg)}88.8%{-moz-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{from,11.1%,to{-webkit-transform:none;-moz-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);-moz-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);-moz-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);-moz-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);-moz-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);-moz-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(0.390625deg) skewY(0.390625deg);-moz-transform:skewX(0.390625deg) skewY(0.390625deg);transform:skewX(0.390625deg) skewY(0.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);-moz-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.animated{-webkit-animation-duration:1s;-moz-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}\n@-webkit-keyframes bounceInUp{from,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(0.215,.61,.355,1);animation-timing-function:cubic-bezier(0.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,800px,0);transform:translate3d(0,800px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-moz-keyframes bounceInUp{from,60%,75%,90%,to{-moz-animation-timing-function:cubic-bezier(0.215,.61,.355,1);animation-timing-function:cubic-bezier(0.215,.61,.355,1)}from{opacity:0;-moz-transform:translate3d(0,800px,0);transform:translate3d(0,800px,0)}60%{opacity:1;-moz-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-moz-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-moz-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{from,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(0.215,.61,.355,1);-moz-animation-timing-function:cubic-bezier(0.215,.61,.355,1);animation-timing-function:cubic-bezier(0.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,800px,0);-moz-transform:translate3d(0,800px,0);transform:translate3d(0,800px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);-moz-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);-moz-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);-moz-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;-moz-animation-name:bounceInUp;animation-name:bounceInUp;-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s}@media screen and (max-width:640px){}@media screen and (min-width:641px) and (max-width:1367px){.aside-nav{top:50px}}'),
  880. function(Common) {
  881. var Menu = function() {
  882. function Menu() {
  883. this.core = new Core, this.site = /tv.wandhi.com/i, this.userAgent = navigator.userAgent,
  884. this.menusClass = [ "first", "second", "third", "fourth", "fifth" ], this.menuSelecter = "#Wandhi-nav";
  885. }
  886. return Menu.prototype.loader = function() {
  887. Core.appendCssContent(this.getCss());
  888. }, Menu.prototype.getBody = function(option) {
  889. 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>";
  890. }, Menu.prototype.getCss = function() {
  891. return 'html .aside-nav{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;font-size:62.5%}body .aside-nav{font-family:"Helvetica Neue",Helvetica,"Microsoft YaHei",Arial,sans-serif;margin:0;font-size:1.6rem;color:#4e546b}.aside-nav{position:fixed;top:350px;width:260px;height:260px;-webkit-filter:url(#goo);filter:url(#goo);-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none;opacity:.75;z-index:20180817}.aside-nav.no-filter{-webkit-filter:none;filter:none}.aside-nav .aside-menu{position:absolute;width:70px;height:70px;-webkit-border-radius:50%;border-radius:50%;background:#f34444;left:0;top:0;right:0;bottom:0;margin:auto;text-align:center;line-height:70px;color:#fff;font-size:20px;z-index:1;cursor:move}.aside-nav .menu-item{position:absolute;width:60px;height:60px;background-color:#ff7676;left:0;top:0;right:0;bottom:0;margin:auto;line-height:60px;text-align:center;-webkit-border-radius:50%;border-radius:50%;text-decoration:none;color:#fff;-webkit-transition:background .5s,-webkit-transform .6s;transition:background .5s,-webkit-transform .6s;-moz-transition:transform .6s,background .5s,-moz-transform .6s;transition:transform .6s,background .5s;transition:transform .6s,background .5s,-webkit-transform .6s,-moz-transform .6s;font-size:14px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.aside-nav .menu-item:hover{background:#a9c734}.aside-nav .menu-line{line-height:20px;padding-top:10px}.aside-nav:hover{opacity:1}.aside-nav:hover .aside-menu{-webkit-animation:jello 1s;-moz-animation:jello 1s;animation:jello 1s}.aside-nav:hover .menu-first{-webkit-transform:translate3d(0,-135%,0);-moz-transform:translate3d(0,-135%,0);transform:translate3d(0,-135%,0)}.aside-nav:hover .menu-second{-webkit-transform:translate3d(120%,-70%,0);-moz-transform:translate3d(120%,-70%,0);transform:translate3d(120%,-70%,0)}.aside-nav:hover .menu-third{-webkit-transform:translate3d(120%,70%,0);-moz-transform:translate3d(120%,70%,0);transform:translate3d(120%,70%,0)}.aside-nav:hover .menu-fourth{-webkit-transform:translate3d(0,135%,0);-moz-transform:translate3d(0,135%,0);transform:translate3d(0,135%,0)}@-webkit-keyframes jello{from,11.1%,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(0.390625deg) skewY(0.390625deg);transform:skewX(0.390625deg) skewY(0.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@-moz-keyframes jello{from,11.1%,to{-moz-transform:none;transform:none}22.2%{-moz-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-moz-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-moz-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-moz-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-moz-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-moz-transform:skewX(0.390625deg) skewY(0.390625deg);transform:skewX(0.390625deg) skewY(0.390625deg)}88.8%{-moz-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{from,11.1%,to{-webkit-transform:none;-moz-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);-moz-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);-moz-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);-moz-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);-moz-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);-moz-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(0.390625deg) skewY(0.390625deg);-moz-transform:skewX(0.390625deg) skewY(0.390625deg);transform:skewX(0.390625deg) skewY(0.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);-moz-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.animated{-webkit-animation-duration:1s;-moz-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;animation-fill-mode:both}\n@-webkit-keyframes bounceInUp{from,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(0.215,.61,.355,1);animation-timing-function:cubic-bezier(0.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,800px,0);transform:translate3d(0,800px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-moz-keyframes bounceInUp{from,60%,75%,90%,to{-moz-animation-timing-function:cubic-bezier(0.215,.61,.355,1);animation-timing-function:cubic-bezier(0.215,.61,.355,1)}from{opacity:0;-moz-transform:translate3d(0,800px,0);transform:translate3d(0,800px,0)}60%{opacity:1;-moz-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-moz-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-moz-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{from,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(0.215,.61,.355,1);-moz-animation-timing-function:cubic-bezier(0.215,.61,.355,1);animation-timing-function:cubic-bezier(0.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,800px,0);-moz-transform:translate3d(0,800px,0);transform:translate3d(0,800px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);-moz-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);-moz-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);-moz-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;-moz-animation-name:bounceInUp;animation-name:bounceInUp;-webkit-animation-delay:1s;-moz-animation-delay:1s;animation-delay:1s}@media screen and (max-width:640px){}@media screen and (min-width:641px) and (max-width:1367px){.aside-nav{top:50px}}';
  892. }, Menu.prototype.Init = function(menus, callback) {
  893. var _this = this;
  894. if (!Core.inIframe()) {
  895. this.loader();
  896. var str = "";
  897. menus.forEach((function(element, index) {
  898. 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>";
  899. })), Core.bodyAppend(this.getBody(str)), /Safari|iPhone/i.test(this.userAgent) && /chrome/i.test(this.userAgent) && $("#Wandhi-nav").addClass("no-filter");
  900. var drags = {
  901. down: !1,
  902. x: 0,
  903. y: 0,
  904. winWid: 0,
  905. winHei: 0,
  906. clientX: 0,
  907. clientY: 0
  908. }, asideNav = $(this.menuSelecter)[0];
  909. $("body").on("mousedown", "" + this.menuSelecter, (function(a) {
  910. var getCss = function(a, e) {
  911. var _a, _b, _c;
  912. 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];
  913. };
  914. drags.down = !0, drags.clientX = a.clientX, drags.clientY = a.clientY, drags.x = parseInt(getCss(this, "left")),
  915. drags.y = parseInt(getCss(this, "top")), drags.winHei = $(window).height(), drags.winWid = $(window).width(),
  916. $(document).on("mousemove", (function(a) {
  917. var e = a.clientX - drags.clientX, t = a.clientY - drags.clientY;
  918. (asideNav = asideNav || $("#Wandhi-nav")[0]).style.top = drags.y + t + "px", asideNav.style.left = drags.x + e + "px";
  919. }));
  920. })).on("mouseup", "" + this.menuSelecter, (function() {
  921. drags.down = !1, $(document).off("mousemove");
  922. })), callback.call(this);
  923. }
  924. }, Menu.close = function() {
  925. $("#" + Menu.mainId).hide();
  926. }, Menu.mainId = "Wandhi-nav", Menu;
  927. }();
  928. Common.Menu = Menu;
  929. }(Common || (Common = {}));
  930. var container = new Map, Container = function() {
  931. function Container() {}
  932. return Container.Registe = function(type, args) {
  933. var className = this.processName(type.name);
  934. return container.set(className, window.Reflect.construct(type, this.buildParams(args))),
  935. container.get(className);
  936. }, Container.buildParams = function(args) {
  937. var para = [];
  938. return null == args || args.map((function(item) {
  939. para.push(item);
  940. })), para;
  941. }, Container.processName = function(name) {
  942. return name.toLowerCase();
  943. }, Container.Require = function(type) {
  944. var _this = this, name = this.processName(type.name);
  945. if (container.has(name)) return container.get(name);
  946. var args, classParams = Reflect.getMetadata(METADATA_PARAMS, type);
  947. return (null == classParams ? void 0 : classParams.length) && (args = classParams.map((function(item) {
  948. return _this.Require(item);
  949. }))), this.Registe(type, args);
  950. }, Container.define = function(target, key) {
  951. var _a, classType = Reflect.getMetadata(METADATA_TYPE, target, key), desc = null !== (_a = Object.getOwnPropertyDescriptor(target, key)) && void 0 !== _a ? _a : {
  952. writable: !0,
  953. configurable: !0
  954. };
  955. desc.value = this.Require(classType), Object.defineProperty(target, key, desc);
  956. }, Container;
  957. }(), METADATA_TYPE = "design:type", METADATA_PARAMS = "design:paramtypes";
  958. function WandhiAuto(target, key) {
  959. Container.define(target, key);
  960. }
  961. var SiteEnum, PluginBase = function() {
  962. function PluginBase() {
  963. var _this = this;
  964. this._unique = !0, this.Process = function() {
  965. _this.loader(), _this.run();
  966. }, this._appName = "base";
  967. }
  968. var _a, _b;
  969. return PluginBase.prototype.unique = function() {
  970. return this._unique;
  971. }, PluginBase.prototype.linkTest = function(url) {
  972. var _this = this;
  973. url || (url = this.core.currentUrl());
  974. var flag = !1;
  975. return this.rules.forEach((function(v, k) {
  976. return !v.test(url) || (flag = !0, _this.site = k, !1);
  977. })), flag;
  978. }, PluginBase.prototype.appName = function() {
  979. return this._appName;
  980. }, __decorate([ WandhiAuto, __metadata("design:type", "function" == typeof (_a = void 0 !== Core && Core) ? _a : Object) ], PluginBase.prototype, "core", void 0),
  981. __decorate([ WandhiAuto, __metadata("design:type", "function" == typeof (_b = void 0 !== Common && Common.Menu) ? _b : Object) ], PluginBase.prototype, "menu", void 0),
  982. PluginBase;
  983. }();
  984. !function(SiteEnum) {
  985. SiteEnum.All = "All", SiteEnum.TaoBao = "TaoBao", SiteEnum.TMall = "TMall", SiteEnum.JingDong = "JingDong",
  986. SiteEnum.IQiYi = "IQiYi", SiteEnum.YouKu = "YouKu", SiteEnum.LeShi = "LeShi", SiteEnum.TuDou = "TuDou",
  987. SiteEnum.Tencent_V = "Tencent_V", SiteEnum.MangGuo = "MangGuo", SiteEnum.SoHu = "SoHu",
  988. SiteEnum.Acfun = "Acfun", SiteEnum.BiliBili = "BiliBili", SiteEnum.M1905 = "M1905",
  989. SiteEnum.PPTV = "PPTV", SiteEnum.YinYueTai = "YinYueTai", SiteEnum.WangYi = "WangYi",
  990. SiteEnum.Tencent_M = "Tencent_M", SiteEnum.KuGou = "KuGou", SiteEnum.KuWo = "KuWo",
  991. SiteEnum.XiaMi = "XiaMi", SiteEnum.TaiHe = "TaiHe", SiteEnum.QingTing = "QingTing",
  992. SiteEnum.LiZhi = "LiZhi", SiteEnum.MiGu = "MiGu", SiteEnum.XiMaLaYa = "XiMaLaYa",
  993. SiteEnum.SXB = "SXB", SiteEnum.BDY = "BDY", SiteEnum.BDY1 = "BDY1", SiteEnum.LZY = "LZY",
  994. SiteEnum.SuNing = "SuNing", SiteEnum.Vp = "Vp", SiteEnum.CSDN = "CSDN";
  995. }(SiteEnum || (SiteEnum = {}));
  996. var VersionResult, UpdateService = function(_super) {
  997. function UpdateService() {
  998. var _this = _super.call(this) || this;
  999. return _this.rules = new Map([ [ SiteEnum.All, /(.*)/i ] ]), _this._unique = !1,
  1000. _this._appName = "update", _this;
  1001. }
  1002. return __extends(UpdateService, _super), UpdateService.prototype.loader = function() {},
  1003. UpdateService.prototype.run = function() {
  1004. if (!Config.get("isUpdate", !1)) {
  1005. var current_1 = new VersionCompar(Config.env.script.version);
  1006. Http.get_text(Route.update_api).then((function(res) {
  1007. var version = new VersionCompar(res.match(/@version[ ]*([\d\.]+)/)[1]);
  1008. if (version.compareTo(current_1) === VersionResult.greater) {
  1009. var msg = "\u65b0\u7248\u672c<span>" + version.versionString + '</span>\u5df2\u53d1\u5e03.<a id="new-version-link" class="link" href="' + Route.install_url_one + '">\u5b89\u88c5(\u7ebf\u8def\u4e00)</a><a id="new-version-link" class="link" href="' + Route.install_url_two + '">\u5b89\u88c5(\u7ebf\u8def\u4e8c)</a><a class="link" target="_blank" href="' + Route.home_url + '">\u67e5\u770b</a>';
  1010. Toast.info(msg, "\u68c0\u67e5\u66f4\u65b0"), Config.set("isUpdate", !0, 3600);
  1011. }
  1012. }));
  1013. }
  1014. }, UpdateService;
  1015. }(PluginBase), VersionCompar = function() {
  1016. function VersionCompar(e) {
  1017. if (!/^[\d\.]+$/.test(e)) throw new Error("Invalid version string");
  1018. this.parts = e.split(".").map((function(e) {
  1019. return parseInt(e);
  1020. })), this.versionString = e;
  1021. }
  1022. return VersionCompar.prototype.compareTo = function(e) {
  1023. for (var t = 0; t < this.parts.length; ++t) {
  1024. if (e.parts.length === t) return VersionResult.greater;
  1025. if (this.parts[t] !== e.parts[t]) return this.parts[t] > e.parts[t] ? VersionResult.greater : VersionResult.less;
  1026. }
  1027. return this.parts.length !== e.parts.length ? VersionResult.less : VersionResult.equal;
  1028. }, VersionCompar.prototype.greaterThan = function(e) {
  1029. return this.compareTo(e) === VersionResult.greater;
  1030. }, VersionCompar.prototype.lessThan = function(e) {
  1031. return this.compareTo(e) === VersionResult.less;
  1032. }, VersionCompar.prototype.equals = function(e) {
  1033. return this.compareTo(e) === VersionResult.equal;
  1034. }, VersionCompar;
  1035. }();
  1036. !function(VersionResult) {
  1037. VersionResult[VersionResult.less = -1] = "less", VersionResult[VersionResult.equal = 0] = "equal",
  1038. VersionResult[VersionResult.greater = 1] = "greater", VersionResult[VersionResult.incomparable = NaN] = "incomparable";
  1039. }(VersionResult || (VersionResult = {}));
  1040. var EventHelper = function() {
  1041. function EventHelper() {}
  1042. return EventHelper.bind_click = function(query, act) {
  1043. var _a;
  1044. null === (_a = document.querySelector(query)) || void 0 === _a || _a.addEventListener("click", (function(e) {
  1045. act();
  1046. }));
  1047. }, EventHelper;
  1048. }(), BaseCoupon = function() {
  1049. function BaseCoupon() {}
  1050. return BaseCoupon.prototype.init_qrcode = function(url) {
  1051. return new Promise((function(resolve) {
  1052. QRCode.toCanvas(document.getElementById("vip-plugin-outside-coupons-qrcode-img"), url, {
  1053. errorCorrectionLevel: "H",
  1054. type: "image/jpeg",
  1055. quality: .3,
  1056. margin: 1,
  1057. width: 150
  1058. }, (function(err) {
  1059. err || resolve(!0);
  1060. }));
  1061. }));
  1062. }, BaseCoupon.prototype.init_coupon_info = function(after, price, time, q_url) {
  1063. void 0 === q_url && (q_url = "");
  1064. var coup_info = "<p>\u79fb\u52a8\u7aef<span>\u5feb\u6377</span>\u8d2d\u4e70</p>", act = '<a class="vip-plugin-outside-coupons-button quan-none" href="javascript:void(0)">\u6253\u5f00\u624b\u673a\u626b\u4e00\u626b</a>', url = Runtime.url;
  1065. if (q_url) {
  1066. var now = new Date;
  1067. coup_info = "<p>\u5238\u540e\u4ef7 <span>" + after + '</span> \u5143</p><p class="vip-plugin-outside-coupons-date">\uff08' + Core.format(now, "yyyy-MM-dd") + " ~ " + time + "\uff09</p>",
  1068. act = '<a class="vip-plugin-outside-coupons-button quan-exits">\u626b\u7801\u9886' + price + "\u5143\u4f18\u60e0\u5238</a>",
  1069. url = q_url;
  1070. }
  1071. new Promise((function(resolve) {
  1072. $(".vip-plugin-outside-coupons-title").html(coup_info), $(".vip-plugin-outside-coupons-action").html(act),
  1073. resolve();
  1074. })).then((function() {
  1075. q_url && EventHelper.bind_click(".vip-plugin-outside-coupons-button", (function() {
  1076. Core.open(url);
  1077. }));
  1078. }));
  1079. }, BaseCoupon.prototype.default = function(url) {
  1080. var _this = this;
  1081. void 0 === url && (url = ""), Logger.debug(url), this.init_qrcode("" == url ? Runtime.url : url).then((function(res) {
  1082. _this.init_coupon_info(0, 0, "");
  1083. }));
  1084. }, BaseCoupon;
  1085. }(), VpCoupon = function(_super) {
  1086. function VpCoupon() {
  1087. return null !== _super && _super.apply(this, arguments) || this;
  1088. }
  1089. return __extends(VpCoupon, _super), VpCoupon.prototype.init_html = function(html) {
  1090. var _this = this;
  1091. return new Promise((function(resolve) {
  1092. if ($(".FW-product.clearfix").length) Core.appendTo(".FW-product.clearfix", html),
  1093. resolve(!0); else {
  1094. var that_1 = _this;
  1095. Core.lazyload((function() {
  1096. return that_1.init_html(html);
  1097. }), 1);
  1098. }
  1099. }));
  1100. }, VpCoupon.prototype.init_coupons = function() {
  1101. var _this = this;
  1102. Route.queryVpCoupons(Runtime.url, (function(res) {
  1103. if (Logger.debug(res), res.code) if (res.data.has_coupon) {
  1104. var q = res.data, exp = new Date(q.quan_time);
  1105. _this.init_qrcode(decodeURIComponent(q.quan_link)).then((function(res) {
  1106. _this.init_coupon_info(q.after_price, q.quan_price, "" + Core.format(exp, "yyyy-MM-dd"), decodeURIComponent(q.quan_link));
  1107. }));
  1108. } else res.data.quan_link ? (_this.default(res.data.quan_link), EventHelper.bind_click("#vip-plugin-outside-coupons-qrcode-img", (function() {
  1109. Core.open(res.data.quan_link);
  1110. }))) : _this.default(); else _this.default();
  1111. }));
  1112. }, VpCoupon;
  1113. }(BaseCoupon), SuningCoupon = function(_super) {
  1114. function SuningCoupon() {
  1115. return null !== _super && _super.apply(this, arguments) || this;
  1116. }
  1117. return __extends(SuningCoupon, _super), SuningCoupon.prototype.init_html = function(html) {
  1118. var _this = this;
  1119. return new Promise((function(resolve) {
  1120. if ($(".proinfo-container").length) Core.appendTo(".proinfo-container", html), resolve(!0); else {
  1121. var that_1 = _this;
  1122. Core.lazyload((function() {
  1123. return that_1.init_html(html);
  1124. }), 1);
  1125. }
  1126. }));
  1127. }, SuningCoupon.prototype.init_coupons = function() {
  1128. var _this = this;
  1129. Route.querySnCoupons(Runtime.url, (function(res) {
  1130. if (Logger.debug(res), res.code) if (res.data.has_coupon) {
  1131. var q = res.data, exp = new Date(q.quan_time);
  1132. _this.init_qrcode(decodeURIComponent(q.quan_link)).then((function(res) {
  1133. _this.init_coupon_info(q.after_price, q.quan_price, "" + Core.format(exp, "yyyy-MM-dd"), decodeURIComponent(q.quan_link));
  1134. }));
  1135. } else res.data.quan_link ? (_this.default(res.data.quan_link), EventHelper.bind_click("#vip-plugin-outside-coupons-qrcode-img", (function() {
  1136. Core.open(res.data.quan_link);
  1137. }))) : _this.default(); else _this.default();
  1138. }));
  1139. }, SuningCoupon;
  1140. }(BaseCoupon), JdCoupon = function(_super) {
  1141. function JdCoupon() {
  1142. return null !== _super && _super.apply(this, arguments) || this;
  1143. }
  1144. return __extends(JdCoupon, _super), JdCoupon.prototype.init_html = function(html) {
  1145. var _this = this;
  1146. return new Promise((function(resolve) {
  1147. $(".product-intro").length ? (Core.appendTo(".product-intro", html), resolve(!0)) : setTimeout(_this.init_html, 2e3);
  1148. }));
  1149. }, JdCoupon.prototype.init_coupons = function() {
  1150. var _a, _b, _this = this, item_id = null === (_b = null === (_a = unsafeWindow.pageConfig) || void 0 === _a ? void 0 : _a.product) || void 0 === _b ? void 0 : _b.skuid;
  1151. item_id ? Route.queryJdCoupons(item_id, (function(res) {
  1152. if (Logger.debug(res), res.code) if (res.data.has_coupon) {
  1153. var q = res.data, exp = new Date(q.quan_time);
  1154. _this.init_qrcode(decodeURIComponent(q.quan_link)).then((function(res) {
  1155. _this.init_coupon_info(q.after_price, q.quan_price, "" + Core.format(exp, "yyyy-MM-dd"), decodeURIComponent(q.quan_link));
  1156. }));
  1157. } else res.data.quan_link ? _this.default(res.data.quan_link) : _this.default(); else _this.default();
  1158. })) : this.default();
  1159. }, JdCoupon;
  1160. }(BaseCoupon), TaoCoupon = function(_super) {
  1161. function TaoCoupon() {
  1162. return null !== _super && _super.apply(this, arguments) || this;
  1163. }
  1164. var _a;
  1165. return __extends(TaoCoupon, _super), TaoCoupon.prototype.init_html = function(html) {
  1166. return new Promise((function(resolve) {
  1167. $("#J_DetailMeta").length ? Core.appendTo("#J_DetailMeta", html) : Core.appendTo("#detail", html + "<br/>"),
  1168. resolve(!0);
  1169. }));
  1170. }, TaoCoupon.prototype.init_coupons = function() {
  1171. var _this = this;
  1172. Route.queryCoupons(this.core.getPar("id"), (function(data) {
  1173. var _a;
  1174. if (data.code && (null === (_a = data.data) || void 0 === _a ? void 0 : _a.length) > 0) {
  1175. var q = data.data[0], exp = new Date(q.quan_time);
  1176. _this.init_qrcode(decodeURIComponent(q.quan_link)).then((function(res) {
  1177. _this.init_coupon_info(q.after_price, q.quan_price, "" + Core.format(exp, "yyyy-MM-dd"), decodeURIComponent(q.quan_link));
  1178. }));
  1179. } else _this.init_qrcode(Runtime.url).then((function(res) {
  1180. _this.init_coupon_info(0, 0, "");
  1181. }));
  1182. }));
  1183. }, __decorate([ WandhiAuto, __metadata("design:type", "function" == typeof (_a = void 0 !== Core && Core) ? _a : Object) ], TaoCoupon.prototype, "core", void 0),
  1184. TaoCoupon;
  1185. }(BaseCoupon), DefCoupon = function(_super) {
  1186. function DefCoupon() {
  1187. return null !== _super && _super.apply(this, arguments) || this;
  1188. }
  1189. return __extends(DefCoupon, _super), DefCoupon.prototype.init_html = function(html) {
  1190. return new Promise((function(resolve) {
  1191. resolve(!1);
  1192. }));
  1193. }, DefCoupon.prototype.init_coupons = function() {}, DefCoupon;
  1194. }(BaseCoupon), LinesOption = function LinesOption() {};
  1195. styleInject("#vip-plugin-outside {\n border: 1px solid #eee;\n margin: 0 auto;\n position: relative;\n clear: both;\n display: none\n}\n\n#vip-plugin-outside .vip-plugin-outside-coupons {\n width: 240px;\n float: left\n}\n\n#vip-plugin-outside .vip-plugin-outside-coupons .vip-plugin-outside-coupons-qrcode {\n text-align: center;\n min-height: 150px;\n margin-top: 30px\n}\n\n#vip-plugin-outside .vip-plugin-outside-coupons .vip-plugin-outside-coupons-qrcode canvas,\n#vip-plugin-outside .vip-plugin-outside-coupons .vip-plugin-outside-coupons-qrcode img {\n margin: 0 auto\n}\n\n#vip-plugin-outside .vip-plugin-outside-coupons .vip-plugin-outside-coupons-title {\n margin-top: 20px;\n color: #000;\n font-size: 14px;\n font-weight: 700;\n text-align: center\n}\n\n#vip-plugin-outside .vip-plugin-outside-coupons .vip-plugin-outside-coupons-title span {\n color: #ff0036;\n font-weight: 700\n}\n\n#vip-plugin-outside .vip-plugin-outside-coupons .vip-plugin-outside-coupons-action {\n margin-top: 10px;\n text-align: center\n}\n\n#vip-plugin-outside .vip-plugin-outside-coupons .vip-plugin-outside-coupons-action a {\n text-decoration: none\n}\n\n#vip-plugin-outside .vip-plugin-outside-coupons .vip-plugin-outside-coupons-action .vip-plugin-outside-coupons-button {\n min-width: 135px;\n padding: 0 8px;\n line-height: 35px;\n color: #fff;\n background: #ff0036;\n font-size: 13px;\n font-weight: 700;\n letter-spacing: 1.5px;\n margin: 0 auto;\n text-align: center;\n border-radius: 15px;\n display: inline-block;\n cursor: pointer\n}\n\n#vip-plugin-outside .vip-plugin-outside-coupons .vip-plugin-outside-coupons-action .vip-plugin-outside-coupons-button.quan-none {\n color: #000;\n background: #bec5c5\n}\n\n.vip-plugin-outside-coupons-date {\n color: #233b3d;\n font-weight: normal;\n font-size: 12px;\n}\n\n#vip-plugin-outside .vip-plugin-outside-history .vip-plugin-outside-history-tip {\n position: absolute;\n margin: 0;\n top: 50%;\n left: 50%;\n letter-spacing: 1px;\n font-size: 15px;\n transform: translateX(-50%) translateY(-50%)\n}\n\n#vip-plugin-outside .vip-plugin-outside-history, #vip-plugin-outside-chart-body {\n height: 300px;\n overflow: hidden;\n position: relative\n}\n\n#vip-plugin-outside .vip-plugin-outside-history .vip-plugin-outside-chart-container,\n#vip-plugin-outside-chart-container-line {\n width: 100%;\n height: 100%\n}\n\n#vip-plugin-outside-similar {\n width: 100%;\n background: #fff;\n z-index: 99999999;\n height: 268px;\n overflow: hidden;\n left: -1px;\n top: 36px;\n border: 1px solid #edf1f2!important\n}\n\n.vip-plugin-outside-similar-buy-list {\n width: 303px;\n border-right: 1px solid rgb(237, 241, 242);\n height: 270px;\n padding: 0px;\n overflow: hidden;\n float: left;\n margin: 0px;\n}\n.vip-plugin-outside-similar-buy-list-li-store{\n float: left;\n overflow: hidden;\n margin: 8px 7px 4px 14px;\n width: 16px;\n height: 16px\n}\n.vip-plugin-outside-similar-buy-list li {\n border-bottom: 1px solid #edf1f2;\n overflow: hidden;\n width: 100%;\n height: 33px;\n line-height: 33px\n}\n.vip-plugin-outside-similar-buy-list li:first-child b {\n font-style: normal;\n font-size: 14px;\n margin-left: 14px;\n font-weight: 700\n}\n.vip-plugin-outside-similar-buy-list-li-first {\n top: 15px;\n width: auto;\n right: 51px;\n padding: 0;\n text-align: center;\n font-size: 12px;\n margin: 0;\n height: auto\n}\n.vip-plugin-outside-similar-buy-list-li-title {\n height: 33px;\n margin: 0;\n display: inline-block;\n float: left;\n font-size: 14px;\n font-weight: 700;\n padding: 0;\n background: 0 0;\n line-height: 33px;\n max-width: 170px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: auto\n}\n.vip-plugin-outside-similar-buy-list-li-price {\n color: #E4393C;\n font-weight: 700;\n line-height: 33px;\n height: 33px;\n width: auto;\n float: right;\n font-size: 14px;\n margin-right: 14px;\n}\n");
  1196. var ItemType, MsgInfo = function MsgInfo() {}, PromoInfo = function PromoInfo() {
  1197. this.price = 0, this.time = 0;
  1198. }, HistoryService = function(_super) {
  1199. function HistoryService() {
  1200. var _this = null !== _super && _super.apply(this, arguments) || this;
  1201. return _this.rules = new Map([ [ SiteEnum.TMall, /detail.tmall.com\/item.htm/i ], [ SiteEnum.TaoBao, /item.taobao.com/i ], [ SiteEnum.JingDong, /item.jd.(com|hk)\/[0-9]*.html/i ], [ SiteEnum.SuNing, /product.suning.com/i ], [ SiteEnum.Vp, /detail.vip.com/i ] ]),
  1202. _this.factory = new DefCoupon, _this;
  1203. }
  1204. return __extends(HistoryService, _super), HistoryService.prototype.loader = function() {},
  1205. HistoryService.prototype.run = function() {
  1206. this.injectHistory();
  1207. }, HistoryService.prototype.injectHistory = function() {
  1208. var _this = this;
  1209. switch (Logger.debug(this.site), this.site) {
  1210. case SiteEnum.TaoBao:
  1211. case SiteEnum.TMall:
  1212. this.factory = new TaoCoupon;
  1213. break;
  1214.  
  1215. case SiteEnum.JingDong:
  1216. this.factory = new JdCoupon;
  1217. break;
  1218.  
  1219. case SiteEnum.SuNing:
  1220. this.factory = new SuningCoupon;
  1221. break;
  1222.  
  1223. case SiteEnum.Vp:
  1224. this.factory = new VpCoupon;
  1225. break;
  1226.  
  1227. default:
  1228. this.factory = new DefCoupon;
  1229. }
  1230. this.factory.init_html(this.getHistoryHtml()).then((function(res) {
  1231. res && _this.InitPriceHistory(), _this.factory.init_coupons && _this.factory.init_coupons();
  1232. }));
  1233. }, HistoryService.prototype.InitPriceHistory = function() {
  1234. var _this = this;
  1235. $("#vip-plugin-outside").show(), this.theme(), this.chartMsg("\u5386\u53f2\u4ef7\u683c\u67e5\u8be2\u4e2d"),
  1236. Route.queryHistoryv3(Runtime.url, this.site.toString(), (function(data) {
  1237. var msg = "";
  1238. data.code ? ($(".vip-plugin-outside-chart-container").html('<div id="vip-plugin-outside-chart-container-line"></div>'),
  1239. echarts.init(document.getElementById("vip-plugin-outside-chart-container-line"), _this.theme()).setOption(_this.getChartOption(data.data))) : msg = "\u672a\u67e5\u5230\u5386\u53f2\u6570\u636e",
  1240. _this.chartMsg(msg);
  1241. }));
  1242. }, HistoryService.prototype.getHistoryHtml = function() {
  1243. return '<div id="vip-plugin-outside">\n <div class="vip-plugin-outside-coupons">\n <div class="vip-plugin-outside-coupons-qrcode"><canvas id="vip-plugin-outside-coupons-qrcode-img"></canvas></div>\n <div class="vip-plugin-outside-coupons-title"></div>\n <div class="vip-plugin-outside-coupons-action"></div>\n </div>\n <div id="vip-plugin-outside-history" class="vip-plugin-outside-history">\n <div class="vip-plugin-outside-chart-container"></div>\n <p class="vip-plugin-outside-history-tip"></p>\n </div> \n </div>';
  1244. }, HistoryService.prototype.chartMsg = function(msg) {
  1245. $(".vip-plugin-outside-history-tip").html(msg);
  1246. }, HistoryService.prototype.getChartOption = function(data) {
  1247. var _a, _b, text = "\u5386\u53f2\u4f4e\u4ef7\uff1a{red|\uffe5" + data.min + "} ( {red|" + data.date + "} ) \u5206\u6790\uff1a" + data.mark, chartOption = new LinesOption;
  1248. (chartOption = {
  1249. title: {
  1250. left: "center",
  1251. subtext: text,
  1252. subtextStyle: {
  1253. color: "#000",
  1254. rich: {
  1255. red: {
  1256. color: "red"
  1257. }
  1258. }
  1259. }
  1260. },
  1261. tooltip: {
  1262. trigger: "axis",
  1263. axisPointer: {
  1264. type: "cross"
  1265. },
  1266. formatter: function(params) {
  1267. params = params[0];
  1268. var date = new Date(params.name), year = date.getFullYear(), month = date.getMonth() + 1, day = date.getDate(), monthStr = month.toString(), dayStr = day.toString();
  1269. return month < 10 && (monthStr = "0" + month), day < 10 && (dayStr = "0" + day),
  1270. "\u65e5\u671f\uff1a" + year + "-" + monthStr + "-" + dayStr + "<br/>\u4ef7\u683c\uff1a\uffe5" + params.value[1].toFixed(2) + ("" == params.value[2] ? "" : "<br/>" + params.value[2]);
  1271. }
  1272. },
  1273. grid: {
  1274. left: 0,
  1275. right: 20,
  1276. top: 50,
  1277. bottom: 10,
  1278. containLabel: !0
  1279. },
  1280. xAxis: {
  1281. type: "time"
  1282. },
  1283. yAxis: {
  1284. type: "value"
  1285. },
  1286. series: [ {
  1287. type: "line",
  1288. step: "end",
  1289. data: function(data) {
  1290. var l = [];
  1291. return data.price_detail.forEach((function(v) {
  1292. var p = {
  1293. name: v.time,
  1294. value: [ v.timestamp, v.price, v.mark ]
  1295. };
  1296. l.push(p);
  1297. })), l;
  1298. }(data),
  1299. showSymbol: !1,
  1300. symbolSize: 3,
  1301. lineStyle: {
  1302. width: 1.5,
  1303. color: "#ff0036"
  1304. }
  1305. } ]
  1306. }).yAxis = {
  1307. min: 10 * Math.floor(.9 * data.min / 10),
  1308. max: 10 * Math.ceil(1.1 * data.max / 10)
  1309. };
  1310. var line = null === (_a = chartOption.series) || void 0 === _a ? void 0 : _a.pop();
  1311. return line.markPoint = {
  1312. data: [ {
  1313. value: data.min,
  1314. coord: [ data.date, data.min ],
  1315. name: "\u6700\u5c0f\u503c",
  1316. itemStyle: {
  1317. color: "green"
  1318. }
  1319. }, {
  1320. value: data.max,
  1321. coord: [ data.max_date, data.max ],
  1322. name: "\u6700\u5927\u503c",
  1323. itemStyle: {
  1324. color: "red"
  1325. }
  1326. } ]
  1327. }, null === (_b = chartOption.series) || void 0 === _b || _b.push(line), chartOption.dataZoom = [ {
  1328. type: "inside",
  1329. start: 0,
  1330. end: 100
  1331. } ], chartOption;
  1332. }, HistoryService.prototype.theme = function() {
  1333. return {
  1334. color: [ "#2ec7c9", "#b6a2de", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d", "#dc69aa", "#07a2a4", "#9a7fd1", "#588dd5", "#f5994e", "#c05050", "#59678c", "#c9ab00", "#7eb00a", "#6f5553", "#c14089" ],
  1335. title: {
  1336. itemGap: 8,
  1337. textStyle: {
  1338. fontWeight: "normal",
  1339. color: "#008acd"
  1340. }
  1341. },
  1342. legend: {
  1343. itemGap: 8
  1344. },
  1345. dataRange: {
  1346. itemWidth: 15,
  1347. color: [ "#2ec7c9", "#b6a2de" ]
  1348. },
  1349. toolbox: {
  1350. color: [ "#1e90ff", "#1e90ff", "#1e90ff", "#1e90ff" ],
  1351. effectiveColor: "#ff4500",
  1352. itemGap: 8
  1353. },
  1354. tooltip: {
  1355. backgroundColor: "rgba(50,50,50,0.5)",
  1356. axisPointer: {
  1357. type: "line",
  1358. lineStyle: {
  1359. color: "#008acd"
  1360. },
  1361. crossStyle: {
  1362. color: "#008acd"
  1363. },
  1364. shadowStyle: {
  1365. color: "rgba(200,200,200,0.2)"
  1366. }
  1367. }
  1368. },
  1369. dataZoom: {
  1370. dataBackgroundColor: "#efefff",
  1371. fillerColor: "rgba(182,162,222,0.2)",
  1372. handleColor: "#008acd"
  1373. },
  1374. grid: {
  1375. borderColor: "#eee"
  1376. },
  1377. categoryAxis: {
  1378. axisLine: {
  1379. lineStyle: {
  1380. color: "#008acd"
  1381. }
  1382. },
  1383. splitLine: {
  1384. lineStyle: {
  1385. color: [ "#eee" ]
  1386. }
  1387. }
  1388. },
  1389. valueAxis: {
  1390. axisLine: {
  1391. lineStyle: {
  1392. color: "#008acd"
  1393. }
  1394. },
  1395. splitArea: {
  1396. show: !0,
  1397. areaStyle: {
  1398. color: [ "rgba(250,250,250,0.1)", "rgba(200,200,200,0.1)" ]
  1399. }
  1400. },
  1401. splitLine: {
  1402. lineStyle: {
  1403. color: [ "#eee" ]
  1404. }
  1405. }
  1406. },
  1407. polar: {
  1408. axisLine: {
  1409. lineStyle: {
  1410. color: "#ddd"
  1411. }
  1412. },
  1413. splitArea: {
  1414. show: !0,
  1415. areaStyle: {
  1416. color: [ "rgba(250,250,250,0.2)", "rgba(200,200,200,0.2)" ]
  1417. }
  1418. },
  1419. splitLine: {
  1420. lineStyle: {
  1421. color: "#ddd"
  1422. }
  1423. }
  1424. },
  1425. timeline: {
  1426. lineStyle: {
  1427. color: "#008acd"
  1428. },
  1429. controlStyle: {
  1430. normal: {
  1431. color: "#008acd"
  1432. },
  1433. emphasis: {
  1434. color: "#008acd"
  1435. }
  1436. },
  1437. symbol: "emptyCircle",
  1438. symbolSize: 3
  1439. },
  1440. bar: {
  1441. itemStyle: {
  1442. normal: {
  1443. borderRadius: 5
  1444. },
  1445. emphasis: {
  1446. borderRadius: 5
  1447. }
  1448. }
  1449. },
  1450. line: {
  1451. smooth: !0,
  1452. symbol: "emptyCircle",
  1453. symbolSize: 3
  1454. },
  1455. k: {
  1456. itemStyle: {
  1457. normal: {
  1458. color: "#d87a80",
  1459. color0: "#2ec7c9",
  1460. lineStyle: {
  1461. width: 1,
  1462. color: "#d87a80",
  1463. color0: "#2ec7c9"
  1464. }
  1465. }
  1466. }
  1467. },
  1468. scatter: {
  1469. symbol: "circle",
  1470. symbolSize: 4
  1471. },
  1472. radar: {
  1473. symbol: "emptyCircle",
  1474. symbolSize: 3
  1475. },
  1476. map: {
  1477. itemStyle: {
  1478. normal: {
  1479. areaStyle: {
  1480. color: "#ddd"
  1481. },
  1482. label: {
  1483. textStyle: {
  1484. color: "#d87a80"
  1485. }
  1486. }
  1487. },
  1488. emphasis: {
  1489. areaStyle: {
  1490. color: "#fe994e"
  1491. },
  1492. label: {
  1493. textStyle: {
  1494. color: "rgb(100,0,0)"
  1495. }
  1496. }
  1497. }
  1498. }
  1499. },
  1500. force: {
  1501. itemStyle: {
  1502. normal: {
  1503. linkStyle: {
  1504. strokeColor: "#1e90ff"
  1505. }
  1506. }
  1507. }
  1508. },
  1509. chord: {
  1510. padding: 4,
  1511. itemStyle: {
  1512. normal: {
  1513. lineStyle: {
  1514. width: 1,
  1515. color: "rgba(128, 128, 128, 0.5)"
  1516. },
  1517. chordStyle: {
  1518. lineStyle: {
  1519. width: 1,
  1520. color: "rgba(128, 128, 128, 0.5)"
  1521. }
  1522. }
  1523. },
  1524. emphasis: {
  1525. lineStyle: {
  1526. width: 1,
  1527. color: "rgba(128, 128, 128, 0.5)"
  1528. },
  1529. chordStyle: {
  1530. lineStyle: {
  1531. width: 1,
  1532. color: "rgba(128, 128, 128, 0.5)"
  1533. }
  1534. }
  1535. }
  1536. }
  1537. },
  1538. gauge: {
  1539. startAngle: 225,
  1540. endAngle: -45,
  1541. axisLine: {
  1542. show: !0,
  1543. lineStyle: {
  1544. color: [ [ .2, "#2ec7c9" ], [ .8, "#5ab1ef" ], [ 1, "#d87a80" ] ],
  1545. width: 10
  1546. }
  1547. },
  1548. axisTick: {
  1549. splitNumber: 10,
  1550. length: 15,
  1551. lineStyle: {
  1552. color: "auto"
  1553. }
  1554. },
  1555. axisLabel: {
  1556. textStyle: {
  1557. color: "auto"
  1558. }
  1559. },
  1560. splitLine: {
  1561. length: 22,
  1562. lineStyle: {
  1563. color: "auto"
  1564. }
  1565. },
  1566. pointer: {
  1567. width: 5,
  1568. color: "auto"
  1569. },
  1570. title: {
  1571. textStyle: {
  1572. color: "#333"
  1573. }
  1574. },
  1575. detail: {
  1576. textStyle: {
  1577. color: "auto"
  1578. }
  1579. }
  1580. },
  1581. textStyle: {
  1582. fontFamily: "\u5fae\u8f6f\u96c5\u9ed1, Arial, Verdana, sans-serif"
  1583. }
  1584. };
  1585. }, HistoryService;
  1586. }(PluginBase), GwdService = function(_super) {
  1587. function GwdService() {
  1588. var _this = null !== _super && _super.apply(this, arguments) || this;
  1589. return _this.rules = new Map([ [ SiteEnum.TMall, /detail.tmall.com\/item.htm/i ], [ SiteEnum.TaoBao, /item.taobao.com/i ], [ SiteEnum.JingDong, /item.jd.(com|hk)\/[0-9]*.html/i ], [ SiteEnum.SuNing, /product.suning.com/i ], [ SiteEnum.Vp, /detail.vip.com/i ] ]),
  1590. _this._appName = "GwdService", _this.factory = new DefCoupon, _this.dfp = "0H88kUZe0CP80DtM0C0VkUc20z88kUZM6UTM0UMikUc26z82kUPe0H88kUP80H88EV3+0UZi0DZ2",
  1591. _this.fp = "378437f5078442c878e99f78720278c4", _this;
  1592. }
  1593. var _a;
  1594. return __extends(GwdService, _super), GwdService.prototype.loader = function() {},
  1595. GwdService.prototype.run = function() {
  1596. this.injectHistory();
  1597. }, GwdService.prototype.injectHistory = function() {
  1598. var _this = this;
  1599. switch (Logger.debug(this.site), this.site) {
  1600. case SiteEnum.TaoBao:
  1601. case SiteEnum.TMall:
  1602. this.factory = new TaoCoupon;
  1603. break;
  1604.  
  1605. case SiteEnum.JingDong:
  1606. this.factory = new JdCoupon;
  1607. break;
  1608.  
  1609. case SiteEnum.SuNing:
  1610. this.factory = new SuningCoupon;
  1611. break;
  1612.  
  1613. case SiteEnum.Vp:
  1614. this.factory = new VpCoupon;
  1615. break;
  1616.  
  1617. default:
  1618. this.factory = new DefCoupon;
  1619. }
  1620. this.factory.init_html(this.getHistoryHtml()).then((function(res) {
  1621. res && _this.InitPriceHistory(), _this.factory.init_coupons && _this.factory.init_coupons();
  1622. }));
  1623. }, GwdService.prototype.InitPriceHistory = function() {
  1624. var _this = this;
  1625. $("#vip-plugin-outside").show(), this.theme(), this.chartMsg("\u5386\u53f2\u4ef7\u683c\u67e5\u8be2\u4e2d");
  1626. var that = this;
  1627. Route.queryHistoryV4(Runtime.url, this.site.toString(), that.fp, that.dfp, (function(data) {
  1628. if (Logger.debug(data), "price_status" in data) $(".vip-plugin-outside-chart-container").html('<div id="vip-plugin-outside-chart-container-line"></div>'),
  1629. echarts.init(document.getElementById("vip-plugin-outside-chart-container-line"), _this.theme()).setOption(_this.getChartOption(data)),
  1630. _this.chartMsg(""); else {
  1631. if ("is_ban" in data && 1 == data.is_ban) {
  1632. Swal__default.default.fire({
  1633. icon: "info",
  1634. html: "\u5386\u53f2\u4ef7\u683c\u67e5\u8be2\u5f02\u5e38,\u662f\u5426\u6253\u5f00\u9a8c\u8bc1\u9875\u9762\u8fdb\u884c\u9a8c\u8bc1?",
  1635. showCloseButton: !0,
  1636. showCancelButton: !0,
  1637. focusConfirm: !1,
  1638. confirmButtonText: "\u9a8c\u8bc1\u8d70\u8d77",
  1639. cancelButtonText: "\u8001\u5b50\u4e0d\u770b"
  1640. }).then((function(res) {
  1641. res.isConfirmed && Core.open("https://browser.gwdang.com/slider/verify.html?fromUrl=" + encodeURIComponent(Runtime.url)),
  1642. Swal__default.default.close(res);
  1643. }));
  1644. var browser = Core.getBrowser();
  1645. if (Logger.debug(browser), browser == BrowerType.Edge || browser == BrowerType.Edg) {
  1646. "99999999999" != $(".swal2-container").css("z-index") && $(".swal2-container").css("z-index", "99999999999");
  1647. }
  1648. }
  1649. that.historyService.Process();
  1650. }
  1651. }));
  1652. }, GwdService.prototype.getHistoryHtml = function() {
  1653. return '<div id="vip-plugin-outside">\n <div class="vip-plugin-outside-coupons">\n <div class="vip-plugin-outside-coupons-qrcode"><canvas id="vip-plugin-outside-coupons-qrcode-img"></canvas></div>\n <div class="vip-plugin-outside-coupons-title"></div>\n <div class="vip-plugin-outside-coupons-action"></div>\n </div>\n <div id="vip-plugin-outside-history" class="vip-plugin-outside-history">\n <div class="vip-plugin-outside-chart-container"></div>\n <p class="vip-plugin-outside-history-tip"></p>\n </div> \n \n </div>';
  1654. }, GwdService.prototype.chartMsg = function(msg) {
  1655. $(".vip-plugin-outside-history-tip").html(msg);
  1656. }, GwdService.prototype.getChartOption = function(data) {
  1657. var _a, _b, analysisTxt = data.analysis.tip, min = data.analysis.promo_days[data.analysis.promo_days.length - 1], text = analysisTxt + "\uff1a{red|\uffe5" + min.price + "} ( {red|" + min.date + "} )", maxData = new PromoInfo, minData = new PromoInfo;
  1658. minData.price = Number.MAX_SAFE_INTEGER, minData.humanPrice = Number.MAX_SAFE_INTEGER,
  1659. maxData.humanPrice = Number.MIN_SAFE_INTEGER;
  1660. var chartOption = new LinesOption;
  1661. (chartOption = {
  1662. title: {
  1663. left: "center",
  1664. subtext: text,
  1665. subtextStyle: {
  1666. color: "#000",
  1667. rich: {
  1668. red: {
  1669. color: "red"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. tooltip: {
  1675. trigger: "axis",
  1676. axisPointer: {
  1677. type: "cross"
  1678. },
  1679. formatter: function(params) {
  1680. params = params[0];
  1681. var date = new Date(params.name), year = date.getFullYear(), month = date.getMonth() + 1, day = date.getDate(), monthStr = month.toString(), dayStr = day.toString();
  1682. return month < 10 && (monthStr = "0" + month), day < 10 && (dayStr = "0" + day),
  1683. "\u65e5\u671f\uff1a" + year + "-" + monthStr + "-" + dayStr + "<br/>\u4ef7\u683c\uff1a\uffe5" + params.value[1].toFixed(2) + ("" == params.value[2] ? "" : "<br/>" + params.value[2]);
  1684. }
  1685. },
  1686. grid: {
  1687. left: 0,
  1688. right: 20,
  1689. top: 50,
  1690. bottom: 10,
  1691. containLabel: !0
  1692. },
  1693. xAxis: {
  1694. type: "time"
  1695. },
  1696. yAxis: {
  1697. type: "value"
  1698. },
  1699. series: [ {
  1700. type: "line",
  1701. step: "end",
  1702. data: function(data) {
  1703. var _a, l = [];
  1704. if (data.store.length > 0) {
  1705. var storeData = data.store[0];
  1706. data.store.length > 1 && (storeData = data.store[1]);
  1707. var couponsMap_1 = {};
  1708. (null === (_a = data.promo) || void 0 === _a ? void 0 : _a.length) > 0 && data.promo.forEach((function(v) {
  1709. couponsMap_1.hasOwnProperty(1e3 * v.time) || (couponsMap_1[1e3 * v.time] = v);
  1710. }));
  1711. var now_1 = storeData.all_line_begin_time;
  1712. storeData.all_line.forEach((function(v) {
  1713. v > maxData.humanPrice && (maxData.humanPrice = v, maxData.time = now_1 / 1e3),
  1714. v < minData.humanPrice && (minData.humanPrice = v, minData.time = now_1 / 1e3);
  1715. var promo = new PromoInfo;
  1716. promo.msg = new MsgInfo, couponsMap_1.hasOwnProperty(now_1) && (Logger.debug("yes"),
  1717. promo = couponsMap_1[now_1]);
  1718. var p = {
  1719. name: now_1,
  1720. value: [ now_1, v, couponsMap_1.hasOwnProperty(now_1) ? promo.msg.coupon ? promo.msg.promotion : promo.msg.coupon : "" ]
  1721. };
  1722. l.push(p), now_1 += 864e5;
  1723. })), Logger.debug(couponsMap_1);
  1724. }
  1725. return Logger.debug(maxData), Logger.debug(minData), l;
  1726. }(data),
  1727. showSymbol: !1,
  1728. symbolSize: 3,
  1729. lineStyle: {
  1730. width: 1.5,
  1731. color: "#ff0036"
  1732. }
  1733. } ]
  1734. }).yAxis = {
  1735. min: 10 * Math.floor(.9 * minData.humanPrice / 10),
  1736. max: 10 * Math.ceil(1.1 * maxData.humanPrice / 10)
  1737. };
  1738. var line = null === (_a = chartOption.series) || void 0 === _a ? void 0 : _a.pop();
  1739. return line.markPoint = {
  1740. data: [ {
  1741. value: minData.humanPrice,
  1742. coord: [ 1e3 * minData.time, minData.humanPrice ],
  1743. name: "\u6700\u5c0f\u503c",
  1744. itemStyle: {
  1745. color: "green"
  1746. }
  1747. }, {
  1748. value: maxData.humanPrice,
  1749. coord: [ 1e3 * maxData.time, maxData.humanPrice ],
  1750. name: "\u6700\u5927\u503c",
  1751. itemStyle: {
  1752. color: "red"
  1753. }
  1754. } ]
  1755. }, null === (_b = chartOption.series) || void 0 === _b || _b.push(line), chartOption.dataZoom = [ {
  1756. type: "inside",
  1757. start: 0,
  1758. end: 100
  1759. } ], chartOption;
  1760. }, GwdService.prototype.theme = function() {
  1761. return {
  1762. color: [ "#2ec7c9", "#b6a2de", "#5ab1ef", "#ffb980", "#d87a80", "#8d98b3", "#e5cf0d", "#97b552", "#95706d", "#dc69aa", "#07a2a4", "#9a7fd1", "#588dd5", "#f5994e", "#c05050", "#59678c", "#c9ab00", "#7eb00a", "#6f5553", "#c14089" ],
  1763. title: {
  1764. itemGap: 8,
  1765. textStyle: {
  1766. fontWeight: "normal",
  1767. color: "#008acd"
  1768. }
  1769. },
  1770. legend: {
  1771. itemGap: 8
  1772. },
  1773. dataRange: {
  1774. itemWidth: 15,
  1775. color: [ "#2ec7c9", "#b6a2de" ]
  1776. },
  1777. toolbox: {
  1778. color: [ "#1e90ff", "#1e90ff", "#1e90ff", "#1e90ff" ],
  1779. effectiveColor: "#ff4500",
  1780. itemGap: 8
  1781. },
  1782. tooltip: {
  1783. backgroundColor: "rgba(50,50,50,0.5)",
  1784. axisPointer: {
  1785. type: "line",
  1786. lineStyle: {
  1787. color: "#008acd"
  1788. },
  1789. crossStyle: {
  1790. color: "#008acd"
  1791. },
  1792. shadowStyle: {
  1793. color: "rgba(200,200,200,0.2)"
  1794. }
  1795. }
  1796. },
  1797. dataZoom: {
  1798. dataBackgroundColor: "#efefff",
  1799. fillerColor: "rgba(182,162,222,0.2)",
  1800. handleColor: "#008acd"
  1801. },
  1802. grid: {
  1803. borderColor: "#eee"
  1804. },
  1805. categoryAxis: {
  1806. axisLine: {
  1807. lineStyle: {
  1808. color: "#008acd"
  1809. }
  1810. },
  1811. splitLine: {
  1812. lineStyle: {
  1813. color: [ "#eee" ]
  1814. }
  1815. }
  1816. },
  1817. valueAxis: {
  1818. axisLine: {
  1819. lineStyle: {
  1820. color: "#008acd"
  1821. }
  1822. },
  1823. splitArea: {
  1824. show: !0,
  1825. areaStyle: {
  1826. color: [ "rgba(250,250,250,0.1)", "rgba(200,200,200,0.1)" ]
  1827. }
  1828. },
  1829. splitLine: {
  1830. lineStyle: {
  1831. color: [ "#eee" ]
  1832. }
  1833. }
  1834. },
  1835. polar: {
  1836. axisLine: {
  1837. lineStyle: {
  1838. color: "#ddd"
  1839. }
  1840. },
  1841. splitArea: {
  1842. show: !0,
  1843. areaStyle: {
  1844. color: [ "rgba(250,250,250,0.2)", "rgba(200,200,200,0.2)" ]
  1845. }
  1846. },
  1847. splitLine: {
  1848. lineStyle: {
  1849. color: "#ddd"
  1850. }
  1851. }
  1852. },
  1853. timeline: {
  1854. lineStyle: {
  1855. color: "#008acd"
  1856. },
  1857. controlStyle: {
  1858. normal: {
  1859. color: "#008acd"
  1860. },
  1861. emphasis: {
  1862. color: "#008acd"
  1863. }
  1864. },
  1865. symbol: "emptyCircle",
  1866. symbolSize: 3
  1867. },
  1868. bar: {
  1869. itemStyle: {
  1870. normal: {
  1871. borderRadius: 5
  1872. },
  1873. emphasis: {
  1874. borderRadius: 5
  1875. }
  1876. }
  1877. },
  1878. line: {
  1879. smooth: !0,
  1880. symbol: "emptyCircle",
  1881. symbolSize: 3
  1882. },
  1883. k: {
  1884. itemStyle: {
  1885. normal: {
  1886. color: "#d87a80",
  1887. color0: "#2ec7c9",
  1888. lineStyle: {
  1889. width: 1,
  1890. color: "#d87a80",
  1891. color0: "#2ec7c9"
  1892. }
  1893. }
  1894. }
  1895. },
  1896. scatter: {
  1897. symbol: "circle",
  1898. symbolSize: 4
  1899. },
  1900. radar: {
  1901. symbol: "emptyCircle",
  1902. symbolSize: 3
  1903. },
  1904. map: {
  1905. itemStyle: {
  1906. normal: {
  1907. areaStyle: {
  1908. color: "#ddd"
  1909. },
  1910. label: {
  1911. textStyle: {
  1912. color: "#d87a80"
  1913. }
  1914. }
  1915. },
  1916. emphasis: {
  1917. areaStyle: {
  1918. color: "#fe994e"
  1919. },
  1920. label: {
  1921. textStyle: {
  1922. color: "rgb(100,0,0)"
  1923. }
  1924. }
  1925. }
  1926. }
  1927. },
  1928. force: {
  1929. itemStyle: {
  1930. normal: {
  1931. linkStyle: {
  1932. strokeColor: "#1e90ff"
  1933. }
  1934. }
  1935. }
  1936. },
  1937. chord: {
  1938. padding: 4,
  1939. itemStyle: {
  1940. normal: {
  1941. lineStyle: {
  1942. width: 1,
  1943. color: "rgba(128, 128, 128, 0.5)"
  1944. },
  1945. chordStyle: {
  1946. lineStyle: {
  1947. width: 1,
  1948. color: "rgba(128, 128, 128, 0.5)"
  1949. }
  1950. }
  1951. },
  1952. emphasis: {
  1953. lineStyle: {
  1954. width: 1,
  1955. color: "rgba(128, 128, 128, 0.5)"
  1956. },
  1957. chordStyle: {
  1958. lineStyle: {
  1959. width: 1,
  1960. color: "rgba(128, 128, 128, 0.5)"
  1961. }
  1962. }
  1963. }
  1964. }
  1965. },
  1966. gauge: {
  1967. startAngle: 225,
  1968. endAngle: -45,
  1969. axisLine: {
  1970. show: !0,
  1971. lineStyle: {
  1972. color: [ [ .2, "#2ec7c9" ], [ .8, "#5ab1ef" ], [ 1, "#d87a80" ] ],
  1973. width: 10
  1974. }
  1975. },
  1976. axisTick: {
  1977. splitNumber: 10,
  1978. length: 15,
  1979. lineStyle: {
  1980. color: "auto"
  1981. }
  1982. },
  1983. axisLabel: {
  1984. textStyle: {
  1985. color: "auto"
  1986. }
  1987. },
  1988. splitLine: {
  1989. length: 22,
  1990. lineStyle: {
  1991. color: "auto"
  1992. }
  1993. },
  1994. pointer: {
  1995. width: 5,
  1996. color: "auto"
  1997. },
  1998. title: {
  1999. textStyle: {
  2000. color: "#333"
  2001. }
  2002. },
  2003. detail: {
  2004. textStyle: {
  2005. color: "auto"
  2006. }
  2007. }
  2008. },
  2009. textStyle: {
  2010. fontFamily: "\u5fae\u8f6f\u96c5\u9ed1, Arial, Verdana, sans-serif"
  2011. }
  2012. };
  2013. }, __decorate([ WandhiAuto, __metadata("design:type", "function" == typeof (_a = void 0 !== HistoryService && HistoryService) ? _a : Object) ], GwdService.prototype, "historyService", void 0),
  2014. GwdService;
  2015. }(PluginBase), TaoBaoService = function(_super) {
  2016. function TaoBaoService() {
  2017. var _this = null !== _super && _super.apply(this, arguments) || this;
  2018. return _this.rules = new Map([ [ SiteEnum.TaoBao, /taobao.com/i ], [ SiteEnum.TMall, /tmall/i ] ]),
  2019. _this.UrlTag = "Wandhi_qLink", _this;
  2020. }
  2021. var _a;
  2022. return __extends(TaoBaoService, _super), TaoBaoService.prototype.getRules = function() {
  2023. throw new Error("Method not implemented.");
  2024. }, TaoBaoService.prototype.loader = function() {
  2025. Core.appendCss("//cdn.wandhi.com/style/extenstion/hui.style.css");
  2026. }, TaoBaoService.prototype.run = function() {
  2027. this.init(), this.historyService.linkTest() && this.historyService.Process();
  2028. }, TaoBaoService.prototype.init = function() {
  2029. var _a, _this = this, init = "<div id='wandhi_div'><table class='wandhi_tab' id='wandhi_table'><thead><tr><th><b style='cursor:pointer'>\u4f18\u60e0\u5238</b></th><th>\u5238\u540e</th><th>\u6709 \u6548 \u671f</th><th>\u64cd\u4f5c</th></tr></thead><tr><td colspan='4'>\u6b63\u5728\u67e5\u8be2\u4f18\u60e0\u4fe1\u606f\uff0c\u8bf7\u7a0d\u5019...</td></tr></table></div>";
  2030. $("#J_LinkBasket").parent().parent().prepend(init), $(".J_LinkAdd").parent().parent().prepend(init),
  2031. (null === (_a = this.rules.get(SiteEnum.TaoBao)) || void 0 === _a ? void 0 : _a.test(this.core.currentUrl())) ? $("#wandhi_table").addClass("wandhi_tab_taobao") : $("#wandhi_table").addClass("wandhi_tab_tmall"),
  2032. Route.queryCoupons(this.core.getPar("id"), (function(data) {
  2033. return _this.initElement(data);
  2034. }));
  2035. }, TaoBaoService.prototype.initElement = function(data) {
  2036. var _a;
  2037. $("#wandhi_table tbody tr").remove();
  2038. var row = "";
  2039. data.code && (null === (_a = data.data) || void 0 === _a ? void 0 : _a.length) > 0 ? data.data.forEach((function(e) {
  2040. row += "<tr><td>" + e.quan_context + "</td><td>" + e.after_price + "</td><td>" + e.quan_time + "</td><td><b onclick=window.open(decodeURIComponent('" + e.quan_link + "')) style='cursor:pointer'>\u9886\u53d6</b></td></tr>";
  2041. })) : row = "<tr><td colspan='4'>\u8fd9\u4e2a\u5546\u54c1\u6ca1\u6709\u8d85\u503c\u4f18\u60e0\u5238</td></tr>",
  2042. $("#wandhi_table tbody").append(row);
  2043. }, __decorate([ WandhiAuto, __metadata("design:type", "function" == typeof (_a = void 0 !== GwdService && GwdService) ? _a : Object) ], TaoBaoService.prototype, "historyService", void 0),
  2044. TaoBaoService;
  2045. }(PluginBase), BiliImgService = function(_super) {
  2046. function BiliImgService() {
  2047. var _this = _super.call(this) || this;
  2048. return _this.rules = new Map([ [ SiteEnum.BiliBili, /bilibili.com\/video\/[av|bv]*/i ] ]),
  2049. _this._appName = "bilibili", _this;
  2050. }
  2051. return __extends(BiliImgService, _super), BiliImgService.prototype.loader = function() {
  2052. Core.appendCss("//lib.baomitu.com/layer/3.1.1/theme/default/layer.css");
  2053. }, BiliImgService.prototype.run = function() {
  2054. this.init();
  2055. }, BiliImgService.prototype.init = function() {
  2056. Core.autoLazyload((function() {
  2057. return !!($(".video-data").length && $(".bilibili-player-video-info-people-number").length && $.isNumeric($(".coin").text().replace("\u4e07", "").trim()));
  2058. }), (function() {
  2059. BiliImgService.add_img_btn(), BiliImgService.add_down_btn(), BiliImgService.add_triple_btn();
  2060. }), 1);
  2061. }, BiliImgService.add_img_btn = function() {
  2062. $(".video-data").last().append(BiliImgService.btn), $("body").on("click", "#findimg", (function() {
  2063. var aid = unsafeWindow.__INITIAL_STATE__.videoData.aid;
  2064. Route.queryBiliImg(aid, (function(res) {
  2065. 0 === res.code ? Alert.open("\u5c01\u9762\u9171", '<img src="' + res.data.pic + '" style="width: 705px;height: 400px;" alt="\u5c01\u9762">', [ "725px", "400px" ]) : Alert.error("\u54ce\u54df\u6ca1\u627e\u5230\u5c01\u9762\u54e6\uff0c\u8981\u4e0d\u8ddf\u4f5c\u8005\u62a5\u544a\u4e00\u4e0b\uff1f");
  2066. }));
  2067. }));
  2068. }, BiliImgService.add_down_btn = function() {
  2069. $(".video-data").last().append(BiliImgService.down), $("body").on("click", "#downvideo", (function() {
  2070. var _a, _b, aid = unsafeWindow.__INITIAL_STATE__.videoData.aid, cid = null !== (_b = null === (_a = unsafeWindow.__INITIAL_STATE__.cidMap[aid]) || void 0 === _a ? void 0 : _a.cid) && void 0 !== _b ? _b : unsafeWindow.__INITIAL_STATE__.videoData.cid, key = aid.toString() + cid.toString() + "MDD";
  2071. if (Logger.debug([ aid, cid ]), aid && cid) {
  2072. var v_1 = Config.get(key, !1);
  2073. v_1 ? (v_1 = v_1, Alert.confim("\u4e0b\u8f7d\u5730\u5740", "\u67e5\u8be2\u5230[" + v_1.data.accept_description[v_1.data.durl[0].order] + "]\uff0c\u662f\u5426\u4e0b\u8f7d\uff1f", [ "\u597d\u7684\u8d70\u8d77", "\u8fd8\u662f\u7b97\u4e86" ], (function(data) {
  2074. window.open(v_1.data.durl[0].url);
  2075. }), !0)) : Route.queryBiliDown(aid, cid, (function(res) {
  2076. var _a;
  2077. "" != (null === (_a = res.data) || void 0 === _a ? void 0 : _a.durl[0].url) ? (Config.set(key, res, 60),
  2078. Alert.confim("\u4e0b\u8f7d\u5730\u5740", "\u67e5\u8be2\u5230[" + res.data.accept_description[res.data.durl[0].order] + "]\uff0c\u662f\u5426\u4e0b\u8f7d\uff1f", [ "\u597d\u7684\u8d70\u8d77", "\u8fd8\u662f\u7b97\u4e86" ], (function(data) {
  2079. window.open(res.data.durl[0].url);
  2080. }), !0)) : Alert.error("\u5565\u4e5f\u6ca1\u67e5\u7740,\u5e26\u7740\u89c6\u9891\u5730\u5740\u7ed9\u4f5c\u8005\u62a5\u544a\u4e00\u4e0b\u5427~");
  2081. }));
  2082. } else Alert.error("\u6682\u4e0d\u652f\u6301\u5f53\u524d\u89c6\u9891\uff0c\u5982\u6709\u7591\u95ee\u8bf7\u5e26\u4e0a\u94fe\u63a5\u8be2\u95ee\u4f5c\u8005");
  2083. }));
  2084. }, BiliImgService.add_triple_btn = function() {
  2085. $(".video-data").last().append(BiliImgService.tripleClick), $("body").on("click", "#tripleClick", (function() {
  2086. [ ".like", ".coin", ".collect" ].forEach((function(item) {
  2087. $(item).trigger("click");
  2088. }));
  2089. }));
  2090. }, BiliImgService.decrypt = function(str) {
  2091. return CryptoJS__default.default.AES.decrypt(str, CryptoJS__default.default.enc.Latin1.parse(Core.decode("YmVpYmVpZG91eXUxMjM0NQ==")), {
  2092. iv: CryptoJS__default.default.enc.Latin1.parse(Core.decode("YmVpYmVpMTIzNDU2Nzg5MA==")),
  2093. mode: CryptoJS__default.default.mode.CBC,
  2094. adding: CryptoJS__default.default.pad.ZeroPadding
  2095. }).toString(CryptoJS__default.default.enc.Utf8);
  2096. }, BiliImgService.btn = '\n <span id="findimg" style="\n background-color: #fb7199;\n color: white;\n font-size: 1rem;\n text-align: center;\n margin-left: 1rem;\n padding:0.5rem;\n cursor: pointer;\n border-radius: 1rem;\n ">\n \u83b7\u53d6\u5c01\u9762\n </span>',
  2097. BiliImgService.down = '\n <span id="downvideo" style="\n background-color: #fb7199;\n color: white;\n font-size: 1rem;\n text-align: center;\n margin-left: 1rem;\n padding:0.5rem;\n cursor: pointer;\n border-radius: 1rem;\n ">\n \u4e0b\u8f7d\u89c6\u9891\n </span>',
  2098. BiliImgService.tripleClick = '\n <span id="tripleClick" style="\n background-color: #fb7199;\n color: white;\n font-size: 1rem;\n text-align: center;\n margin-left: 1rem;\n padding:0.5rem;\n cursor: pointer;\n border-radius: 1rem;\n ">\n \u4e00\u952e\u4e09\u8fde\n </span>',
  2099. BiliImgService;
  2100. }(PluginBase), Menu = Common.Menu, MovieService = function(_super) {
  2101. function MovieService() {
  2102. var _this = _super.call(this) || this;
  2103. return _this.rules = new Map([ [ SiteEnum.YouKu, /youku/i ], [ SiteEnum.IQiYi, /iqiyi|iq\.com/i ], [ SiteEnum.LeShi, /le.com/i ], [ SiteEnum.Tencent_V, /v.qq/i ], [ SiteEnum.TuDou, /tudou/i ], [ SiteEnum.MangGuo, /mgtv/i ], [ SiteEnum.SoHu, /sohu/i ], [ SiteEnum.Acfun, /acfun/i ], [ SiteEnum.BiliBili, /bilibili/i ], [ SiteEnum.M1905, /1905.com/i ], [ SiteEnum.PPTV, /pptv.com/i ], [ SiteEnum.YinYueTai, /yinyuetai/ ] ]),
  2104. _this.menu = new Common.Menu, _this._unique = !1, _this;
  2105. }
  2106. return __extends(MovieService, _super), MovieService.prototype.loader = function() {
  2107. "undefined" == typeof $ && Core.appendJs("//lib.baomitu.com/jquery/1.12.4/jquery.min.js");
  2108. }, MovieService.prototype.run = function() {
  2109. this.menu.Init([ {
  2110. title: "\u7535\u5f71\u641c\u7d22",
  2111. show: "\u672c\u6b21<br>\u5173\u95ed",
  2112. type: "search"
  2113. }, {
  2114. title: "\u89c6\u9891\u89e3\u6790",
  2115. show: "\u89c6\u9891<br>\u89e3\u6790",
  2116. type: "process"
  2117. }, {
  2118. title: "\u7edd\u4e16\u597d\u5238",
  2119. show: "\u7edd\u4e16<br>\u597d\u5238",
  2120. type: "tb"
  2121. }, {
  2122. title: "\u4eac\u4e1c\u597d\u5238",
  2123. show: "\u4eac\u4e1c<br>\u597d\u5238",
  2124. type: "jd"
  2125. } ], this._onClick);
  2126. }, MovieService.prototype._onClick = function() {
  2127. $("body").on("click", "[data-cat=process]", (function() {
  2128. Core.open("http://tv.wandhi.com/go.html?url=" + encodeURIComponent(window.location.href));
  2129. })), $("body").on("click", "[data-cat=search]", (function() {
  2130. Menu.close();
  2131. })), $("body").on("click", "[data-cat=tb]", (function() {
  2132. Core.open("http://shop.huizhek.com");
  2133. })), $("body").on("click", "[data-cat=jd]", (function() {
  2134. Core.open("http://jd.huizhek.com");
  2135. }));
  2136. }, MovieService;
  2137. }(PluginBase), JdService = function(_super) {
  2138. function JdService() {
  2139. var _this = _super.call(this) || this;
  2140. return _this._appName = "JdService", _this.rules = new Map([ [ SiteEnum.JingDong, /item.jd/i ] ]),
  2141. _this;
  2142. }
  2143. var _a;
  2144. return __extends(JdService, _super), JdService.prototype.loader = function() {
  2145. this.historyService.linkTest() && this.historyService.Process();
  2146. }, JdService.prototype.run = function() {
  2147. var keywords = $(".sku-name").text().trim();
  2148. $("#choose-btns").prepend('<a href="javascript:;" class="btn-special1 btn-lg btn-yhj"><span class="">\u67e5\u8be2\u4f18\u60e0\u5238</span></a>'),
  2149. $(".btn-yhj").on("click", (function() {
  2150. Core.open("http://jd.huizhek.com/?ah=total&kw=" + encodeURIComponent(keywords));
  2151. }));
  2152. }, __decorate([ WandhiAuto, __metadata("design:type", "function" == typeof (_a = void 0 !== GwdService && GwdService) ? _a : Object) ], JdService.prototype, "historyService", void 0),
  2153. JdService;
  2154. }(PluginBase), UrlHelper = function() {
  2155. function UrlHelper() {}
  2156. return UrlHelper.Bind = function(CssSelector, method, doc) {
  2157. $(CssSelector).click((function() {
  2158. Core.openUrl($(this).data("key"));
  2159. }));
  2160. }, UrlHelper.urlEncode = function(url) {
  2161. return encodeURIComponent(url);
  2162. }, UrlHelper.urlDecode = function(url) {
  2163. return decodeURIComponent(url);
  2164. }, UrlHelper;
  2165. }(), MusicService = function(_super) {
  2166. function MusicService() {
  2167. var _this = _super.call(this) || this;
  2168. return _this.rules = new Map([ [ SiteEnum.WangYi, /163(.*)song/i ], [ SiteEnum.Tencent_M, /y.QQ(.*)song/i ], [ SiteEnum.KuGou, /kugou.com\/song\/*/i ], [ SiteEnum.KuWo, /kuwo(.*)yinyue/i ], [ SiteEnum.XiaMi, /xiami/i ], [ SiteEnum.TaiHe, /taihe.com/i ], [ SiteEnum.QingTing, /qingting/i ], [ SiteEnum.LiZhi, /lizhi/i ], [ SiteEnum.MiGu, /migu/i ], [ SiteEnum.XiMaLaYa, /ximalaya/i ] ]),
  2169. _this.menu = new Common.Menu, _this;
  2170. }
  2171. return __extends(MusicService, _super), MusicService.prototype.loader = function() {
  2172. Core.appendCss("//lib.baomitu.com/layer/3.1.1/theme/default/layer.css");
  2173. }, MusicService.prototype.run = function() {
  2174. this.menu.Init([ {
  2175. title: "\u7535\u5f71\u641c\u7d22",
  2176. show: "\u7535\u5f71<br>\u641c\u7d22",
  2177. type: "search"
  2178. }, {
  2179. title: "\u97f3\u4e50\u4e0b\u8f7d",
  2180. show: "\u97f3\u4e50<br>\u4e0b\u8f7d",
  2181. type: "process"
  2182. }, {
  2183. title: "\u7edd\u4e16\u597d\u5238",
  2184. show: "\u7edd\u4e16<br>\u597d\u5238",
  2185. type: "tb"
  2186. }, {
  2187. title: "\u4eac\u4e1c\u597d\u5238",
  2188. show: "\u4eac\u4e1c<br>\u597d\u5238",
  2189. type: "jd"
  2190. } ], this._OnClick);
  2191. }, MusicService.prototype._OnClick = function() {
  2192. this.rules, $("body").on("click", "[data-cat=process]", (function() {
  2193. if (/ximalaya/i.test(Runtime.url)) if (__INITIAL_STATE__ && null != __INITIAL_STATE__.SoundDetailPage) Core.open("http://music.wandhi.com/?id=" + __INITIAL_STATE__.SoundDetailPage.trackId + "&type=ximalaya"); else {
  2194. layer.closeAll();
  2195. var html = '<div style="padding:0px 50px 0px 50px;"><ul class="sound-list dOi2">';
  2196. $.each(__INITIAL_STATE__.AlbumDetailTrackList.tracksInfo.tracks, (function(index, item) {
  2197. html += '<li class="dOi2"><a href="http://music.wandhi.com/?id=' + item.trackId + '&type=ximalaya" target="_blank">' + item.title + "</a></li>";
  2198. })), html += "</ul></div>", layer.open({
  2199. type: 1,
  2200. area: [ "auto", "30%" ],
  2201. title: "\u4e3a\u4f60\u627e\u5230\u4e86\u8fd9\u4e9b\u66f2\u76ee\u89e3\u6790\u2026\u2026\u4ec0\u4e48\uff1f\u6211\u4e11\uff1f\u4ee5\u540e\u518d\u8bf4\u5427",
  2202. shade: .6,
  2203. maxmin: !1,
  2204. anim: 2,
  2205. content: html
  2206. });
  2207. } else /taihe.com/i.test(Runtime.url) ? Core.open("http://music.wandhi.com/?url=" + UrlHelper.urlEncode(Runtime.url.replace("taihe", "baidu"))) : Core.open("http://music.wandhi.com/?url=" + UrlHelper.urlEncode(Runtime.url));
  2208. })), $("body").on("click", "[data-cat=search]", (function() {
  2209. Core.open("http://tv.wandhi.com/");
  2210. })), $("body").on("click", "[data-cat=tb]", (function() {
  2211. Core.open("https://t.cn/A6LoYknW");
  2212. })), $("body").on("click", "[data-cat=jd]", (function() {
  2213. Core.open("https://t.cn/A6LoYnHT");
  2214. }));
  2215. }, MusicService;
  2216. }(PluginBase), StuService = function(_super) {
  2217. function StuService() {
  2218. var _this = _super.call(this) || this;
  2219. return _this.rules = new Map([ [ SiteEnum.SXB, /shangxueba.com\/ask\/.*html/i ] ]),
  2220. _this;
  2221. }
  2222. return __extends(StuService, _super), StuService.prototype.loader = function() {
  2223. "undefined" == typeof $ && Core.appendJs("//lib.baomitu.com/jquery/1.12.4/jquery.min.js"),
  2224. Core.appendCss("//lib.baomitu.com/layer/3.1.1/theme/default/layer.css");
  2225. }, StuService.prototype.run = function() {
  2226. this.menu.Init([ {
  2227. title: "\u67e5\u770b\u7b54\u6848",
  2228. show: "\u67e5\u770b<br>\u7b54\u6848",
  2229. type: "search"
  2230. }, {
  2231. title: "\u6253\u8d4f\u4f5c\u8005",
  2232. show: "\u6253\u8d4f<br>\u4f5c\u8005",
  2233. type: "process"
  2234. }, {
  2235. title: "\u7edd\u4e16\u597d\u5238",
  2236. show: "\u7edd\u4e16<br>\u597d\u5238",
  2237. type: "tb"
  2238. }, {
  2239. title: "\u4eac\u4e1c\u597d\u5238",
  2240. show: "\u4eac\u4e1c<br>\u597d\u5238",
  2241. type: "jd"
  2242. } ], this._onClick);
  2243. }, StuService.prototype._onClick = function() {
  2244. $("body").on("click", "[data-cat=process]", (function() {
  2245. layer.open({
  2246. type: 1,
  2247. title: "\u8bf7\u6211\u559d\u4e00\u676f",
  2248. shadeClose: !0,
  2249. area: "800px",
  2250. content: '<img src="https://i.loli.net/2019/05/14/5cda672add6f594934.jpg">'
  2251. });
  2252. })), $("body").on("click", "[data-cat=search]", (function() {
  2253. Route.querySbx($("#Hidd_id").val(), (function(data) {
  2254. data.status ? (Alert.open("\u7b54\u6848", data.msg), Route.sbxFeedback(dataid, data.msg)) : "wronganhao" == data.msg ? (Alert.prompt("\u53e3\u4ee4\u9519\u8bef\uff0c\u8bf7\u5c06\u5f39\u51fa\u7684\u9875\u9762\u4e2d\u7684\u53e3\u4ee4\u586b\u5165\u540e\u91cd\u8bd5\uff01", Config.get("sxb_anhao", ""), (function(v) {
  2255. Config.set("sxb_anhao", v), Alert.info("\u8bf7\u518d\u6b21\u70b9\u51fb\u67e5\u770b\u7b54\u6848\u6309\u94ae");
  2256. }), 4), Core.open("http://www.lelunwen.com/e/action/ListInfo/?classid=45")) : Alert.confim("\u6ca1\u67e5\u5230\u7b54\u6848", "\u8981\u4e0d\u8981\u8df3\u8f6c\u5230\u67e5\u8be2\u9875\u770b\u770b\uff1f", [ "\u597d\u7684\u8d70\u8d77", "\u8fd8\u662f\u7b97\u4e86" ], (function() {
  2257. Core.open(Runtime.url.replace("shangxueba", "shangxueba365"));
  2258. }));
  2259. }));
  2260. })), $("body").on("click", "[data-cat=tb]", (function() {
  2261. Core.open("https://t.cn/A6LoYknW");
  2262. })), $("body").on("click", "[data-cat=jd]", (function() {
  2263. Core.open("https://t.cn/A6LoYnHT");
  2264. }));
  2265. }, StuService;
  2266. }(PluginBase);
  2267. !function(ItemType) {
  2268. ItemType.TaoBao = "tb", ItemType.TMall = "tm", ItemType.JingDong = "jd", ItemType.JingDongChaoshi = "jdcs";
  2269. }(ItemType || (ItemType = {}));
  2270. var Tao = function() {
  2271. function Tao() {}
  2272. return Tao.isVailidItemId = function(itemId) {
  2273. if (!itemId) return !1;
  2274. var itemIdInt = parseInt(itemId);
  2275. return itemIdInt.toString() == itemId && itemIdInt > 1e4;
  2276. }, Tao.isValidTaoId = function(itemId) {
  2277. return !!itemId && (!!Core.isNumber(itemId) || (!(itemId.indexOf("http") >= 0) || !(!this.isTaoBaoDetailPage(itemId) && !itemId.includes("//detail.ju.taobao.com/home.htm"))));
  2278. }, Tao.isTaoBaoDetailPage = function(url) {
  2279. return url.includes("//item.taobao.com/item.htm") || url.includes("//detail.tmall.com/item.htm") || url.includes("//chaoshi.detail.tmall.com/item.htm") || url.includes("//detail.tmall.hk/hk/item.htm");
  2280. }, Tao;
  2281. }(), ListService = function(_super) {
  2282. function ListService() {
  2283. var _this = _super.call(this) || this;
  2284. return _this.rules = new Map([ [ SiteEnum.TaoBao, /s.taobao.com\/search/i ], [ SiteEnum.TMall, /list.tmall.com\/search_product.htm/i ] ]),
  2285. _this.selectorList = [], _this.selectora = [], _this.atrack = [], _this.key = "list_service_",
  2286. _this._appName = "TaoList", _this;
  2287. }
  2288. return __extends(ListService, _super), ListService.prototype.loader = function() {},
  2289. Object.defineProperty(ListService, "style", {
  2290. get: function() {
  2291. return " \n .onekeyvip-tb-box-area {position: absolute;top: 10px;right: 5px;z-index: 9999;}\n .onekeyvip-jd-box-area {position: absolute;top: 235px;left: 10px;z-index: 9999;} \n .onekeyvip-jdcs-box-area {position: absolute;top: 5px;right: 0px;z-index: 9999;}\n .onekeyvip-box-info-translucent{opacity: .33;}\n .onekeyvip-box-info, .onekeyvip-box-info:hover, .onekeyvip-box-info:visited {text-decoration: none!important;}\n .onekeyvip-box-wait{cursor:pointer}\n .onekeyvip-box-info {width: auto!important;height: auto!important;padding: 6px 8px!important;font-size: 12px;color: #fff!important;border-radius: 15px;cursor: pointer;}\n .onekeyvip-jd-box-info-default, .onekeyvip-tb-box-info-default, .onekeyvip-jdcs-box-info-default{background: #3186fd!important;}\n .onekeyvip-box-info-empty {color: #000!important;background: #ccc!important;}\n .onekeyvip-box-info-find {background: #ff0036!important;}\n .onekeyvip-box-done{position:relative}\n ";
  2292. },
  2293. enumerable: !1,
  2294. configurable: !0
  2295. }), ListService.prototype.run = function() {
  2296. switch (this.site) {
  2297. case SiteEnum.TaoBao:
  2298. this.selectorList.push(".items .item"), this.atrack.push(".pic a", ".title a"),
  2299. this.itemType = ItemType.TaoBao;
  2300. break;
  2301.  
  2302. case SiteEnum.TMall:
  2303. this.selectorList.push(".product"), this.atrack.push(".productImg-wrap a", ".productTitle a"),
  2304. this.itemType = ItemType.TaoBao;
  2305. }
  2306. var that = this;
  2307. this.initStyle(), Core.autoLazyload((function() {
  2308. try {
  2309. return null != $ && null != jQuery;
  2310. } catch (e) {
  2311. return !1;
  2312. }
  2313. }), (function() {
  2314. return that.initSearchEvent();
  2315. }), 3), this.core.background((function() {
  2316. return that.initSearch(that);
  2317. }), 3), this.core.background((function() {
  2318. return that.initQuery();
  2319. }), 4);
  2320. }, ListService.prototype.initStyle = function() {
  2321. Core.appendCssContent(ListService.style);
  2322. }, ListService.prototype.initSearchEvent = function() {
  2323. var that = this;
  2324. try {
  2325. $(document).on("click", ".onekeyvip-" + that.itemType + "-box-area", (function() {
  2326. var $this = $(this);
  2327. $this.hasClass("onekeyvip-box-wait") ? that.queryInfo(this) : $this.hasClass("onekeyvip-box-info-translucent") ? $this.removeClass("onekeyvip-box-info-translucent") : $this.addClass("onekeyvip-box-info-translucent");
  2328. }));
  2329. } catch (e) {
  2330. this.core.background((function() {
  2331. $(".onekeyvip-" + that.itemType + "-box-area").click((function() {
  2332. var $this = $(this);
  2333. $this.hasClass("onekeyvip-box-wait") ? that.queryInfo(this) : $this.hasClass("onekeyvip-box-info-translucent") ? $this.removeClass("onekeyvip-box-info-translucent") : $this.addClass("onekeyvip-box-info-translucent");
  2334. }));
  2335. }));
  2336. }
  2337. }, ListService.prototype.initSearch = function(that) {
  2338. that.selectorList.forEach((function(e, i) {
  2339. $(e).each((function(index, ele) {
  2340. that.initSearchItem(ele);
  2341. }));
  2342. }));
  2343. }, ListService.prototype.initSearchItem = function(selector) {
  2344. var _a, _b, _c, _d, _e, _f, $dom = $(selector);
  2345. if (!$dom.hasClass("onekeyvip-box-done")) {
  2346. $dom.addClass("onekeyvip-box-done");
  2347. var itemId = null !== (_b = null !== (_a = $dom.attr("data-id")) && void 0 !== _a ? _a : $dom.data("sku")) && void 0 !== _b ? _b : "";
  2348. if (Tao.isVailidItemId(itemId) || (itemId = null !== (_d = null !== (_c = $dom.attr("data-itemid")) && void 0 !== _c ? _c : $dom.data("spu")) && void 0 !== _d ? _d : ""),
  2349. !Tao.isVailidItemId(itemId)) if ($dom.attr("href")) itemId = location.protocol + $dom.attr("href"); else {
  2350. var $a = $dom.find("a");
  2351. if (!$a.length) return;
  2352. itemId = null !== (_e = $a.attr("data-nid")) && void 0 !== _e ? _e : "", Tao.isVailidItemId(itemId) || (itemId = $a.hasClass("j_ReceiveCoupon") && $a.length > 1 ? location.protocol + $($a[1]).attr("href") : location.protocol + $a.attr("href"));
  2353. }
  2354. if (!Tao.isVailidItemId(itemId) && itemId.indexOf("http") > -1) {
  2355. var res = null !== (_f = /item.jd.com\/(.*?).html/i.exec(itemId)) && void 0 !== _f ? _f : [];
  2356. itemId = res.length > 0 ? res[1] : "";
  2357. }
  2358. Tao.isValidTaoId(itemId) && (this.initBoxHtml($dom, itemId), this.initTagClass($dom, itemId));
  2359. }
  2360. }, ListService.prototype.initTagClass = function(target, itemId) {
  2361. this.atrack.forEach((function(e) {
  2362. target.find(e).hasClass("onekeyvip-item-" + itemId) || target.find(e).addClass("onekeyvip-item-" + itemId);
  2363. }));
  2364. }, ListService.prototype.initBoxHtml = function(target, itemId) {
  2365. target.append('<div class="onekeyvip-' + this.itemType + '-box-area onekeyvip-box-wait" data-itemid="' + itemId + '"><a class="onekeyvip-box-info onekeyvip-' + this.itemType + '-box-info-default" title="\u70b9\u51fb\u67e5\u8be2">\u5f85\u67e5\u8be2</a></div>');
  2366. }, ListService.prototype.initQuery = function() {
  2367. var _this = this;
  2368. $(".onekeyvip-box-wait").each((function(index, ele) {
  2369. _this.queryInfo(ele);
  2370. }));
  2371. }, ListService.prototype.queryInfo = function(target) {
  2372. return __awaiter(this, void 0, Promise, (function() {
  2373. var that, $this, itemId, couponInfo;
  2374. return __generator(this, (function(_a) {
  2375. switch (_a.label) {
  2376. case 0:
  2377. return that = this, ($this = $(target)).removeClass("onekeyvip-box-wait"), itemId = $this.data("itemid"),
  2378. (couponInfo = Config.get("" + that.key + itemId)) ? (that.initCouponInfo(itemId, couponInfo, target),
  2379. [ 3, 3 ]) : [ 3, 1 ];
  2380.  
  2381. case 1:
  2382. return [ 4, Route.couponQuery(itemId, that.itemType, (function(couponInfoResult) {
  2383. if (0 != couponInfoResult.code) {
  2384. var couponInfo_1 = couponInfoResult.data;
  2385. Config.set("" + that.key + itemId, couponInfo_1, 14400), that.initCouponInfo(itemId, couponInfo_1, target);
  2386. } else that.showQueryEmpty($this);
  2387. })) ];
  2388.  
  2389. case 2:
  2390. _a.sent(), _a.label = 3;
  2391.  
  2392. case 3:
  2393. return [ 2 ];
  2394. }
  2395. }));
  2396. }));
  2397. }, ListService.prototype.initCouponInfo = function(itemId, couponInfo, target) {
  2398. var _a, $this = $(target);
  2399. if ((null === (_a = null == couponInfo ? void 0 : couponInfo.coupons) || void 0 === _a ? void 0 : _a.length) > 0) {
  2400. var coupon = couponInfo.coupons[0];
  2401. this.showQueryFind($this, coupon.coupon_price);
  2402. } else this.showQueryEmpty($this);
  2403. this.showItemUrl(itemId, null == couponInfo ? void 0 : couponInfo.item_url);
  2404. }, ListService.prototype.showItemUrl = function(itemId, itemUrl) {
  2405. Core.click(".onekeyvip-item-" + itemId, (function() {
  2406. return Core.open(itemUrl), !1;
  2407. }));
  2408. }, ListService.prototype.showQueryFind = function(selector, couponMoney) {
  2409. selector.html('<a target="_blank" class="onekeyvip-box-info onekeyvip-box-info-find" title="\u5207\u6362\u900f\u660e\u5ea6">' + couponMoney + "\u5143\u5238</a>");
  2410. }, ListService.prototype.showQueryEmpty = function(selector) {
  2411. selector.addClass("onekeyvip-box-info-translucent"), selector.html('<a href="javascript:void(0);" class="onekeyvip-box-info onekeyvip-box-info-empty" title="\u5207\u6362\u900f\u660e\u5ea6">\u6682\u65e0\u4f18\u60e0</a>');
  2412. }, ListService;
  2413. }(PluginBase), CsdnAdService = function(_super) {
  2414. function CsdnAdService() {
  2415. var _this = _super.call(this) || this;
  2416. return _this.rules = new Map([ [ SiteEnum.CSDN, /blog.csdn.net/i ] ]), _this._appName = "csdn",
  2417. _this._unique = !1, _this;
  2418. }
  2419. return __extends(CsdnAdService, _super), CsdnAdService.prototype.loader = function() {},
  2420. CsdnAdService.prototype.run = function() {
  2421. this.core.background(this.removeAds, 3), this.commentClean();
  2422. }, CsdnAdService.prototype.removeAds = function() {
  2423. CsdnAdService.adSelectors.forEach((function(selector) {
  2424. $(selector).remove();
  2425. }));
  2426. }, CsdnAdService.prototype.commentClean = function() {
  2427. Core.lazyload((function() {
  2428. Logger.info("\u8bc4\u8bba\u533a\u6e05\u7406"), $(".comment-list-box").css("overflow", "").css("max-height", ""),
  2429. $("#commentPage").removeClass("d-none"), $("#btnMoreComment").remove();
  2430. }), 3);
  2431. }, CsdnAdService.adSelectors = [ "#footerRightAds", ".side-question-box", "div[id^='dmp_ad']", "div[class^='ad_']", "div[id^='floor-ad_']", ".adsbygoogle" ],
  2432. CsdnAdService;
  2433. }(PluginBase), OneKeyVipInjection = function() {
  2434. function OneKeyVipInjection() {
  2435. this.plugins = new Array, this.plugins = [ Container.Require(UpdateService), Container.Require(BiliImgService), Container.Require(MovieService), Container.Require(ListService), Container.Require(TaoBaoService), Container.Require(JdService), Container.Require(MusicService), Container.Require(StuService), Container.Require(GwdService), Container.Require(CsdnAdService) ],
  2436. Logger.info("container loaded");
  2437. }
  2438. return OneKeyVipInjection.prototype.Init = function() {
  2439. this.plugins.every((function(element) {
  2440. return !element.linkTest() || (new Promise((function(resolve) {
  2441. resolve(1);
  2442. })).then(element.Process), Logger.debug("element [" + element.appName() + "];unique:[" + element.unique() + "]"),
  2443. !element.unique());
  2444. }));
  2445. }, OneKeyVipInjection;
  2446. }();
  2447. Logger.level = LogLevel.info, Container.Require(OneKeyVipInjection).Init();
  2448. }));