🚀 支持 91短视频、海角社区、SWAG、19JTV、糖心、海角APP、萝莉巴士等十几个站点哦~ 🚀
// ==UserScript==
// @name AkWebMaster
// @namespace https://ak-sky.com
// @version v2.2.6
// @author ak-sky
// @description 🚀 支持 91短视频、海角社区、SWAG、19JTV、糖心、海角APP、萝莉巴士等十几个站点哦~ 🚀
// @license MIT
// @homepage https://ak-sky.com
// @supportURL https://ak-sky.com
// @icon https://store.ak-sky.com/akWebMaster/akwm.ico
// @include https://*.h.*j*.*/home
// @include https://*h*j*.*/home
// @include https://hai*.top/*
// @include *://www.loibox*.top/*
// @include *://www.loibus*.top/*
// @include *://www.loibus*.xyz/*
// @include *://www.loibus.com/*
// @include *://www.loiraft.com/*
// @include *://www.loiship.com/*
// @include *://www.loix.org/*
// @include *://loix.org/*
// @include https://*txh*.com/*
// @match https://haijiao.com/*
// @match https://www.haijiao.com/*
// @match *://*/post/details*
// @match https://p1.lsqykbvl.com/*
// @match https://p5.tyhytqs.xyz/*
// @match https://19jtv.com/*
// @match https://javhd.com/*
// @match https://www.mdav.live/*
// @match https://5ktmi048.com/*
// @match https://p2.lxrzwdq.xyz/*
// @match https://www.loiship.com/*
// @match https://51fengliu.com/*
// @match https://51fengliu3.com/*
// @match https://pwa2.lxmebhpm.xyz/*
// @match https://pwa1.oyqwgpzi.xyz/*
// @match https://www.laikanluping.top/*
// @match https://laikanluping.top/*
// @match https://moso.monster/*
// ==/UserScript==
var __defProp = Object.defineProperty;
var __defNormalProp = (t, e, n) => e in t ? __defProp(t, e, {
enumerable: true,
configurable: true,
writable: true,
value: n
}) : t[e] = n;
var __publicField = (t, e, n) => __defNormalProp(t, typeof e !== "symbol" ? e + "" : e, n);
(function() {
"use strict";
function t() {
return new Promise(t => {
const e = new URL(window.location.href);
const n = e.pathname;
if (!/category\/.*?\/\d+/.test(n)) {
t({
analyzeURL: "",
failReason: "请在视频播放页使用"
});
return;
}
t({
analyzeURL: e.href,
failReason: ""
});
});
}
const e = {
ApiURL: "https://webmaster.ak-sky.com",
ServerAPI: "https://ak-sky.com/api"
};
function n(t) {
const n = `${e.ServerAPI}/v1/phoenix/analyze`;
return fetch(n, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(t)
}).then(async t => {
const e = await t.json();
if (t.status !== 200) {
throw e;
}
return e;
});
}
class o {
static set(t, e) {
window.localStorage.setItem(t, JSON.stringify(e));
}
static get(t) {
const e = window.localStorage.getItem(t);
if (!e) {
return null;
}
try {
return JSON.parse(e);
} catch {
return e;
}
}
static remove(t) {
window.localStorage.removeItem(t);
}
}
class r {
static set(t, e) {
window.sessionStorage.setItem(t, JSON.stringify(e));
}
static get(t) {
const e = window.sessionStorage.getItem(t);
if (!e) {
return null;
}
try {
return JSON.parse(e);
} catch {
return e;
}
}
static remove(t) {
window.sessionStorage.removeItem(t);
}
}
const i = {
qq: "QQ",
wechat: "微信",
telegram: "电报",
yuNi: "与你号",
phone: "电话",
address: "地址",
textConcat: "内容",
description: "简介"
};
function a() {
return new Promise(t => {
const e = new URL(window.location.href);
const r = e.pathname;
if (!/\/show|guide|merchant|info|\/\d+\.html/.test(r)) {
t({
analyzeURL: "",
failReason: "请在详情页面中解析"
});
return;
}
const a = o.get("akSkyUserToken");
if (!a) {
t({
openActivateToken: true
});
return;
}
let s = window.location.href;
if (window.location.host === "51fengliu3.com") {
const t = e.searchParams.get("id");
const n = e.searchParams.get("type");
switch (n) {
case "INFO":
s = `https://51fengliu.com/show/${t}.html`;
break;
case "STREET":
s = `https://51fengliu.com/guide/${t}.html`;
break;
case "MERCHANT":
s = `https://51fengliu.com/merchant/${t}.html`;
break;
}
}
console.log(s);
n({
token: a,
targetURL: s
}).then(e => {
const n = Object.keys(e).filter(t => e[t]);
const o = n.map(t => i[t]);
const r = n.reduce((t, n) => {
t[i[n]] = e[n];
return t;
}, {});
t({
segmented: {
options: o,
data: r
},
remindMsg: "⚠️ 请注意甄别信息真伪 ⚠️"
});
}).catch(e => {
t({
failReason: e.msg
});
});
});
}
function s() {
return new Promise(t => {
const e = new URL(window.location.href);
const n = e.pathname;
if (!n.includes("/movie/detail/")) {
t({
analyzeURL: "",
failReason: "请在视频播放页使用"
});
return;
}
t({
analyzeURL: e.href,
failReason: ""
});
});
}
var c = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function l(t) {
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t["default"] : t;
}
function d(t) {
if (t.__esModule) return t;
var e = t.default;
if (typeof e == "function") {
var n = function t() {
if (this instanceof t) {
return Reflect.construct(e, arguments, this.constructor);
}
return e.apply(this, arguments);
};
n.prototype = e.prototype;
} else n = {};
Object.defineProperty(n, "__esModule", {
value: true
});
Object.keys(t).forEach(function(e) {
var o = Object.getOwnPropertyDescriptor(t, e);
Object.defineProperty(n, e, o.get ? o : {
enumerable: true,
get: function() {
return t[e];
}
});
});
return n;
}
var p = {
exports: {}
};
function u(t) {
throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var f = {
exports: {}
};
const h = {};
const m = Object.freeze(Object.defineProperty({
__proto__: null,
default: h
}, Symbol.toStringTag, {
value: "Module"
}));
const v = d(m);
var g;
function y() {
if (g) return f.exports;
g = 1;
(function(t, e) {
(function(e, n) {
{
t.exports = n();
}
})(c, function() {
var t = t || function(t, e) {
var n;
if (typeof window !== "undefined" && window.crypto) {
n = window.crypto;
}
if (typeof self !== "undefined" && self.crypto) {
n = self.crypto;
}
if (typeof globalThis !== "undefined" && globalThis.crypto) {
n = globalThis.crypto;
}
if (!n && typeof window !== "undefined" && window.msCrypto) {
n = window.msCrypto;
}
if (!n && typeof c !== "undefined" && c.crypto) {
n = c.crypto;
}
if (!n && typeof u === "function") {
try {
n = v;
} catch (y) {}
}
var o = function() {
if (n) {
if (typeof n.getRandomValues === "function") {
try {
return n.getRandomValues(new Uint32Array(1))[0];
} catch (y) {}
}
if (typeof n.randomBytes === "function") {
try {
return n.randomBytes(4).readInt32LE();
} catch (y) {}
}
}
throw new Error("Native crypto module could not be used to get secure random number.");
};
var r = Object.create || function() {
function t() {}
return function(e) {
var n;
t.prototype = e;
n = new t;
t.prototype = null;
return n;
};
}();
var i = {};
var a = i.lib = {};
var s = a.Base = function() {
return {
extend: function(t) {
var e = r(this);
if (t) {
e.mixIn(t);
}
if (!e.hasOwnProperty("init") || this.init === e.init) {
e.init = function() {
e.$super.init.apply(this, arguments);
};
}
e.init.prototype = e;
e.$super = this;
return e;
},
create: function() {
var t = this.extend();
t.init.apply(t, arguments);
return t;
},
init: function() {},
mixIn: function(t) {
for (var e in t) {
if (t.hasOwnProperty(e)) {
this[e] = t[e];
}
}
if (t.hasOwnProperty("toString")) {
this.toString = t.toString;
}
},
clone: function() {
return this.init.prototype.extend(this);
}
};
}();
var l = a.WordArray = s.extend({
init: function(t, n) {
t = this.words = t || [];
if (n != e) {
this.sigBytes = n;
} else {
this.sigBytes = t.length * 4;
}
},
toString: function(t) {
return (t || p).stringify(this);
},
concat: function(t) {
var e = this.words;
var n = t.words;
var o = this.sigBytes;
var r = t.sigBytes;
this.clamp();
if (o % 4) {
for (var i = 0; i < r; i++) {
var a = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
e[o + i >>> 2] |= a << 24 - (o + i) % 4 * 8;
}
} else {
for (var s = 0; s < r; s += 4) {
e[o + s >>> 2] = n[s >>> 2];
}
}
this.sigBytes += r;
return this;
},
clamp: function() {
var e = this.words;
var n = this.sigBytes;
e[n >>> 2] &= 4294967295 << 32 - n % 4 * 8;
e.length = t.ceil(n / 4);
},
clone: function() {
var t = s.clone.call(this);
t.words = this.words.slice(0);
return t;
},
random: function(t) {
var e = [];
for (var n = 0; n < t; n += 4) {
e.push(o());
}
return new l.init(e, t);
}
});
var d = i.enc = {};
var p = d.Hex = {
stringify: function(t) {
var e = t.words;
var n = t.sigBytes;
var o = [];
for (var r = 0; r < n; r++) {
var i = e[r >>> 2] >>> 24 - r % 4 * 8 & 255;
o.push((i >>> 4).toString(16));
o.push((i & 15).toString(16));
}
return o.join("");
},
parse: function(t) {
var e = t.length;
var n = [];
for (var o = 0; o < e; o += 2) {
n[o >>> 3] |= parseInt(t.substr(o, 2), 16) << 24 - o % 8 * 4;
}
return new l.init(n, e / 2);
}
};
var f = d.Latin1 = {
stringify: function(t) {
var e = t.words;
var n = t.sigBytes;
var o = [];
for (var r = 0; r < n; r++) {
var i = e[r >>> 2] >>> 24 - r % 4 * 8 & 255;
o.push(String.fromCharCode(i));
}
return o.join("");
},
parse: function(t) {
var e = t.length;
var n = [];
for (var o = 0; o < e; o++) {
n[o >>> 2] |= (t.charCodeAt(o) & 255) << 24 - o % 4 * 8;
}
return new l.init(n, e);
}
};
var h = d.Utf8 = {
stringify: function(t) {
try {
return decodeURIComponent(escape(f.stringify(t)));
} catch (e) {
throw new Error("Malformed UTF-8 data");
}
},
parse: function(t) {
return f.parse(unescape(encodeURIComponent(t)));
}
};
var m = a.BufferedBlockAlgorithm = s.extend({
reset: function() {
this._data = new l.init;
this._nDataBytes = 0;
},
_append: function(t) {
if (typeof t == "string") {
t = h.parse(t);
}
this._data.concat(t);
this._nDataBytes += t.sigBytes;
},
_process: function(e) {
var n;
var o = this._data;
var r = o.words;
var i = o.sigBytes;
var a = this.blockSize;
var s = a * 4;
var c = i / s;
if (e) {
c = t.ceil(c);
} else {
c = t.max((c | 0) - this._minBufferSize, 0);
}
var d = c * a;
var p = t.min(d * 4, i);
if (d) {
for (var u = 0; u < d; u += a) {
this._doProcessBlock(r, u);
}
n = r.splice(0, d);
o.sigBytes -= p;
}
return new l.init(n, p);
},
clone: function() {
var t = s.clone.call(this);
t._data = this._data.clone();
return t;
},
_minBufferSize: 0
});
a.Hasher = m.extend({
cfg: s.extend(),
init: function(t) {
this.cfg = this.cfg.extend(t);
this.reset();
},
reset: function() {
m.reset.call(this);
this._doReset();
},
update: function(t) {
this._append(t);
this._process();
return this;
},
finalize: function(t) {
if (t) {
this._append(t);
}
var e = this._doFinalize();
return e;
},
blockSize: 512 / 32,
_createHelper: function(t) {
return function(e, n) {
return new t.init(n).finalize(e);
};
},
_createHmacHelper: function(t) {
return function(e, n) {
return new g.HMAC.init(t, n).finalize(e);
};
}
});
var g = i.algo = {};
return i;
}(Math);
return t;
});
})(f);
return f.exports;
}
var w = {
exports: {}
};
var k;
function x() {
if (k) return w.exports;
k = 1;
(function(t, e) {
(function(e, n) {
{
t.exports = n(y());
}
})(c, function(t) {
(function() {
var e = t;
var n = e.lib;
var o = n.WordArray;
var r = e.enc;
r.Base64 = {
stringify: function(t) {
var e = t.words;
var n = t.sigBytes;
var o = this._map;
t.clamp();
var r = [];
for (var i = 0; i < n; i += 3) {
var a = e[i >>> 2] >>> 24 - i % 4 * 8 & 255;
var s = e[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
var c = e[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
var l = a << 16 | s << 8 | c;
for (var d = 0; d < 4 && i + d * .75 < n; d++) {
r.push(o.charAt(l >>> 6 * (3 - d) & 63));
}
}
var p = o.charAt(64);
if (p) {
while (r.length % 4) {
r.push(p);
}
}
return r.join("");
},
parse: function(t) {
var e = t.length;
var n = this._map;
var o = this._reverseMap;
if (!o) {
o = this._reverseMap = [];
for (var r = 0; r < n.length; r++) {
o[n.charCodeAt(r)] = r;
}
}
var a = n.charAt(64);
if (a) {
var s = t.indexOf(a);
if (s !== -1) {
e = s;
}
}
return i(t, e, o);
},
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
};
function i(t, e, n) {
var r = [];
var i = 0;
for (var a = 0; a < e; a++) {
if (a % 4) {
var s = n[t.charCodeAt(a - 1)] << a % 4 * 2;
var c = n[t.charCodeAt(a)] >>> 6 - a % 4 * 2;
var l = s | c;
r[i >>> 2] |= l << 24 - i % 4 * 8;
i++;
}
}
return o.create(r, i);
}
})();
return t.enc.Base64;
});
})(w);
return w.exports;
}
var b = {
exports: {}
};
(function(t, e) {
(function(e, n) {
{
t.exports = n(y());
}
})(c, function(t) {
(function(e) {
var n = t;
var o = n.lib;
var r = o.WordArray;
var i = o.Hasher;
var a = n.algo;
var s = [];
(function() {
for (var t = 0; t < 64; t++) {
s[t] = e.abs(e.sin(t + 1)) * 4294967296 | 0;
}
})();
var c = a.MD5 = i.extend({
_doReset: function() {
this._hash = new r.init([ 1732584193, 4023233417, 2562383102, 271733878 ]);
},
_doProcessBlock: function(t, e) {
for (var n = 0; n < 16; n++) {
var o = e + n;
var r = t[o];
t[o] = (r << 8 | r >>> 24) & 16711935 | (r << 24 | r >>> 8) & 4278255360;
}
var i = this._hash.words;
var a = t[e + 0];
var c = t[e + 1];
var f = t[e + 2];
var h = t[e + 3];
var m = t[e + 4];
var v = t[e + 5];
var g = t[e + 6];
var y = t[e + 7];
var w = t[e + 8];
var k = t[e + 9];
var x = t[e + 10];
var b = t[e + 11];
var _ = t[e + 12];
var R = t[e + 13];
var B = t[e + 14];
var L = t[e + 15];
var S = i[0];
var C = i[1];
var E = i[2];
var z = i[3];
S = l(S, C, E, z, a, 7, s[0]);
z = l(z, S, C, E, c, 12, s[1]);
E = l(E, z, S, C, f, 17, s[2]);
C = l(C, E, z, S, h, 22, s[3]);
S = l(S, C, E, z, m, 7, s[4]);
z = l(z, S, C, E, v, 12, s[5]);
E = l(E, z, S, C, g, 17, s[6]);
C = l(C, E, z, S, y, 22, s[7]);
S = l(S, C, E, z, w, 7, s[8]);
z = l(z, S, C, E, k, 12, s[9]);
E = l(E, z, S, C, x, 17, s[10]);
C = l(C, E, z, S, b, 22, s[11]);
S = l(S, C, E, z, _, 7, s[12]);
z = l(z, S, C, E, R, 12, s[13]);
E = l(E, z, S, C, B, 17, s[14]);
C = l(C, E, z, S, L, 22, s[15]);
S = d(S, C, E, z, c, 5, s[16]);
z = d(z, S, C, E, g, 9, s[17]);
E = d(E, z, S, C, b, 14, s[18]);
C = d(C, E, z, S, a, 20, s[19]);
S = d(S, C, E, z, v, 5, s[20]);
z = d(z, S, C, E, x, 9, s[21]);
E = d(E, z, S, C, L, 14, s[22]);
C = d(C, E, z, S, m, 20, s[23]);
S = d(S, C, E, z, k, 5, s[24]);
z = d(z, S, C, E, B, 9, s[25]);
E = d(E, z, S, C, h, 14, s[26]);
C = d(C, E, z, S, w, 20, s[27]);
S = d(S, C, E, z, R, 5, s[28]);
z = d(z, S, C, E, f, 9, s[29]);
E = d(E, z, S, C, y, 14, s[30]);
C = d(C, E, z, S, _, 20, s[31]);
S = p(S, C, E, z, v, 4, s[32]);
z = p(z, S, C, E, w, 11, s[33]);
E = p(E, z, S, C, b, 16, s[34]);
C = p(C, E, z, S, B, 23, s[35]);
S = p(S, C, E, z, c, 4, s[36]);
z = p(z, S, C, E, m, 11, s[37]);
E = p(E, z, S, C, y, 16, s[38]);
C = p(C, E, z, S, x, 23, s[39]);
S = p(S, C, E, z, R, 4, s[40]);
z = p(z, S, C, E, a, 11, s[41]);
E = p(E, z, S, C, h, 16, s[42]);
C = p(C, E, z, S, g, 23, s[43]);
S = p(S, C, E, z, k, 4, s[44]);
z = p(z, S, C, E, _, 11, s[45]);
E = p(E, z, S, C, L, 16, s[46]);
C = p(C, E, z, S, f, 23, s[47]);
S = u(S, C, E, z, a, 6, s[48]);
z = u(z, S, C, E, y, 10, s[49]);
E = u(E, z, S, C, B, 15, s[50]);
C = u(C, E, z, S, v, 21, s[51]);
S = u(S, C, E, z, _, 6, s[52]);
z = u(z, S, C, E, h, 10, s[53]);
E = u(E, z, S, C, x, 15, s[54]);
C = u(C, E, z, S, c, 21, s[55]);
S = u(S, C, E, z, w, 6, s[56]);
z = u(z, S, C, E, L, 10, s[57]);
E = u(E, z, S, C, g, 15, s[58]);
C = u(C, E, z, S, R, 21, s[59]);
S = u(S, C, E, z, m, 6, s[60]);
z = u(z, S, C, E, b, 10, s[61]);
E = u(E, z, S, C, f, 15, s[62]);
C = u(C, E, z, S, k, 21, s[63]);
i[0] = i[0] + S | 0;
i[1] = i[1] + C | 0;
i[2] = i[2] + E | 0;
i[3] = i[3] + z | 0;
},
_doFinalize: function() {
var t = this._data;
var n = t.words;
var o = this._nDataBytes * 8;
var r = t.sigBytes * 8;
n[r >>> 5] |= 128 << 24 - r % 32;
var i = e.floor(o / 4294967296);
var a = o;
n[(r + 64 >>> 9 << 4) + 15] = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360;
n[(r + 64 >>> 9 << 4) + 14] = (a << 8 | a >>> 24) & 16711935 | (a << 24 | a >>> 8) & 4278255360;
t.sigBytes = (n.length + 1) * 4;
this._process();
var s = this._hash;
var c = s.words;
for (var l = 0; l < 4; l++) {
var d = c[l];
c[l] = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360;
}
return s;
},
clone: function() {
var t = i.clone.call(this);
t._hash = this._hash.clone();
return t;
}
});
function l(t, e, n, o, r, i, a) {
var s = t + (e & n | ~e & o) + r + a;
return (s << i | s >>> 32 - i) + e;
}
function d(t, e, n, o, r, i, a) {
var s = t + (e & o | n & ~o) + r + a;
return (s << i | s >>> 32 - i) + e;
}
function p(t, e, n, o, r, i, a) {
var s = t + (e ^ n ^ o) + r + a;
return (s << i | s >>> 32 - i) + e;
}
function u(t, e, n, o, r, i, a) {
var s = t + (n ^ (e | ~o)) + r + a;
return (s << i | s >>> 32 - i) + e;
}
n.MD5 = i._createHelper(c);
n.HmacMD5 = i._createHmacHelper(c);
})(Math);
return t.MD5;
});
})(b);
var _ = b.exports;
const R = l(_);
var B = {
exports: {}
};
var L = {
exports: {}
};
var S;
function C() {
if (S) return L.exports;
S = 1;
(function(t, e) {
(function(e, n) {
{
t.exports = n(y());
}
})(c, function(t) {
(function() {
var e = t;
var n = e.lib;
var o = n.WordArray;
var r = n.Hasher;
var i = e.algo;
var a = [];
var s = i.SHA1 = r.extend({
_doReset: function() {
this._hash = new o.init([ 1732584193, 4023233417, 2562383102, 271733878, 3285377520 ]);
},
_doProcessBlock: function(t, e) {
var n = this._hash.words;
var o = n[0];
var r = n[1];
var i = n[2];
var s = n[3];
var c = n[4];
for (var l = 0; l < 80; l++) {
if (l < 16) {
a[l] = t[e + l] | 0;
} else {
var d = a[l - 3] ^ a[l - 8] ^ a[l - 14] ^ a[l - 16];
a[l] = d << 1 | d >>> 31;
}
var p = (o << 5 | o >>> 27) + c + a[l];
if (l < 20) {
p += (r & i | ~r & s) + 1518500249;
} else if (l < 40) {
p += (r ^ i ^ s) + 1859775393;
} else if (l < 60) {
p += (r & i | r & s | i & s) - 1894007588;
} else {
p += (r ^ i ^ s) - 899497514;
}
c = s;
s = i;
i = r << 30 | r >>> 2;
r = o;
o = p;
}
n[0] = n[0] + o | 0;
n[1] = n[1] + r | 0;
n[2] = n[2] + i | 0;
n[3] = n[3] + s | 0;
n[4] = n[4] + c | 0;
},
_doFinalize: function() {
var t = this._data;
var e = t.words;
var n = this._nDataBytes * 8;
var o = t.sigBytes * 8;
e[o >>> 5] |= 128 << 24 - o % 32;
e[(o + 64 >>> 9 << 4) + 14] = Math.floor(n / 4294967296);
e[(o + 64 >>> 9 << 4) + 15] = n;
t.sigBytes = e.length * 4;
this._process();
return this._hash;
},
clone: function() {
var t = r.clone.call(this);
t._hash = this._hash.clone();
return t;
}
});
e.SHA1 = r._createHelper(s);
e.HmacSHA1 = r._createHmacHelper(s);
})();
return t.SHA1;
});
})(L);
return L.exports;
}
var E = {
exports: {}
};
var z;
function U() {
if (z) return E.exports;
z = 1;
(function(t, e) {
(function(e, n) {
{
t.exports = n(y());
}
})(c, function(t) {
(function() {
var e = t;
var n = e.lib;
var o = n.Base;
var r = e.enc;
var i = r.Utf8;
var a = e.algo;
a.HMAC = o.extend({
init: function(t, e) {
t = this._hasher = new t.init;
if (typeof e == "string") {
e = i.parse(e);
}
var n = t.blockSize;
var o = n * 4;
if (e.sigBytes > o) {
e = t.finalize(e);
}
e.clamp();
var r = this._oKey = e.clone();
var a = this._iKey = e.clone();
var s = r.words;
var c = a.words;
for (var l = 0; l < n; l++) {
s[l] ^= 1549556828;
c[l] ^= 909522486;
}
r.sigBytes = a.sigBytes = o;
this.reset();
},
reset: function() {
var t = this._hasher;
t.reset();
t.update(this._iKey);
},
update: function(t) {
this._hasher.update(t);
return this;
},
finalize: function(t) {
var e = this._hasher;
var n = e.finalize(t);
e.reset();
var o = e.finalize(this._oKey.clone().concat(n));
return o;
}
});
})();
});
})(E);
return E.exports;
}
var M;
function P() {
if (M) return B.exports;
M = 1;
(function(t, e) {
(function(e, n, o) {
{
t.exports = n(y(), C(), U());
}
})(c, function(t) {
(function() {
var e = t;
var n = e.lib;
var o = n.Base;
var r = n.WordArray;
var i = e.algo;
var a = i.MD5;
var s = i.EvpKDF = o.extend({
cfg: o.extend({
keySize: 128 / 32,
hasher: a,
iterations: 1
}),
init: function(t) {
this.cfg = this.cfg.extend(t);
},
compute: function(t, e) {
var n;
var o = this.cfg;
var i = o.hasher.create();
var a = r.create();
var s = a.words;
var c = o.keySize;
var l = o.iterations;
while (s.length < c) {
if (n) {
i.update(n);
}
n = i.update(t).finalize(e);
i.reset();
for (var d = 1; d < l; d++) {
n = i.finalize(n);
i.reset();
}
a.concat(n);
}
a.sigBytes = c * 4;
return a;
}
});
e.EvpKDF = function(t, e, n) {
return s.create(n).compute(t, e);
};
})();
return t.EvpKDF;
});
})(B);
return B.exports;
}
var O = {
exports: {}
};
var N;
function D() {
if (N) return O.exports;
N = 1;
(function(t, e) {
(function(e, n, o) {
{
t.exports = n(y(), P());
}
})(c, function(t) {
t.lib.Cipher || function(e) {
var n = t;
var o = n.lib;
var r = o.Base;
var i = o.WordArray;
var a = o.BufferedBlockAlgorithm;
var s = n.enc;
var c = s.Base64;
var l = n.algo;
var d = l.EvpKDF;
var p = o.Cipher = a.extend({
cfg: r.extend(),
createEncryptor: function(t, e) {
return this.create(this._ENC_XFORM_MODE, t, e);
},
createDecryptor: function(t, e) {
return this.create(this._DEC_XFORM_MODE, t, e);
},
init: function(t, e, n) {
this.cfg = this.cfg.extend(n);
this._xformMode = t;
this._key = e;
this.reset();
},
reset: function() {
a.reset.call(this);
this._doReset();
},
process: function(t) {
this._append(t);
return this._process();
},
finalize: function(t) {
if (t) {
this._append(t);
}
var e = this._doFinalize();
return e;
},
keySize: 128 / 32,
ivSize: 128 / 32,
_ENC_XFORM_MODE: 1,
_DEC_XFORM_MODE: 2,
_createHelper: function() {
function t(t) {
if (typeof t == "string") {
return _;
} else {
return k;
}
}
return function(e) {
return {
encrypt: function(n, o, r) {
return t(o).encrypt(e, n, o, r);
},
decrypt: function(n, o, r) {
return t(o).decrypt(e, n, o, r);
}
};
};
}()
});
o.StreamCipher = p.extend({
_doFinalize: function() {
var t = this._process(true);
return t;
},
blockSize: 1
});
var u = n.mode = {};
var f = o.BlockCipherMode = r.extend({
createEncryptor: function(t, e) {
return this.Encryptor.create(t, e);
},
createDecryptor: function(t, e) {
return this.Decryptor.create(t, e);
},
init: function(t, e) {
this._cipher = t;
this._iv = e;
}
});
var h = u.CBC = function() {
var t = f.extend();
t.Encryptor = t.extend({
processBlock: function(t, e) {
var o = this._cipher;
var r = o.blockSize;
n.call(this, t, e, r);
o.encryptBlock(t, e);
this._prevBlock = t.slice(e, e + r);
}
});
t.Decryptor = t.extend({
processBlock: function(t, e) {
var o = this._cipher;
var r = o.blockSize;
var i = t.slice(e, e + r);
o.decryptBlock(t, e);
n.call(this, t, e, r);
this._prevBlock = i;
}
});
function n(t, n, o) {
var r;
var i = this._iv;
if (i) {
r = i;
this._iv = e;
} else {
r = this._prevBlock;
}
for (var a = 0; a < o; a++) {
t[n + a] ^= r[a];
}
}
return t;
}();
var m = n.pad = {};
var v = m.Pkcs7 = {
pad: function(t, e) {
var n = e * 4;
var o = n - t.sigBytes % n;
var r = o << 24 | o << 16 | o << 8 | o;
var a = [];
for (var s = 0; s < o; s += 4) {
a.push(r);
}
var c = i.create(a, o);
t.concat(c);
},
unpad: function(t) {
var e = t.words[t.sigBytes - 1 >>> 2] & 255;
t.sigBytes -= e;
}
};
o.BlockCipher = p.extend({
cfg: p.cfg.extend({
mode: h,
padding: v
}),
reset: function() {
var t;
p.reset.call(this);
var e = this.cfg;
var n = e.iv;
var o = e.mode;
if (this._xformMode == this._ENC_XFORM_MODE) {
t = o.createEncryptor;
} else {
t = o.createDecryptor;
this._minBufferSize = 1;
}
if (this._mode && this._mode.__creator == t) {
this._mode.init(this, n && n.words);
} else {
this._mode = t.call(o, this, n && n.words);
this._mode.__creator = t;
}
},
_doProcessBlock: function(t, e) {
this._mode.processBlock(t, e);
},
_doFinalize: function() {
var t;
var e = this.cfg.padding;
if (this._xformMode == this._ENC_XFORM_MODE) {
e.pad(this._data, this.blockSize);
t = this._process(true);
} else {
t = this._process(true);
e.unpad(t);
}
return t;
},
blockSize: 128 / 32
});
var g = o.CipherParams = r.extend({
init: function(t) {
this.mixIn(t);
},
toString: function(t) {
return (t || this.formatter).stringify(this);
}
});
var y = n.format = {};
var w = y.OpenSSL = {
stringify: function(t) {
var e;
var n = t.ciphertext;
var o = t.salt;
if (o) {
e = i.create([ 1398893684, 1701076831 ]).concat(o).concat(n);
} else {
e = n;
}
return e.toString(c);
},
parse: function(t) {
var e;
var n = c.parse(t);
var o = n.words;
if (o[0] == 1398893684 && o[1] == 1701076831) {
e = i.create(o.slice(2, 4));
o.splice(0, 4);
n.sigBytes -= 16;
}
return g.create({
ciphertext: n,
salt: e
});
}
};
var k = o.SerializableCipher = r.extend({
cfg: r.extend({
format: w
}),
encrypt: function(t, e, n, o) {
o = this.cfg.extend(o);
var r = t.createEncryptor(n, o);
var i = r.finalize(e);
var a = r.cfg;
return g.create({
ciphertext: i,
key: n,
iv: a.iv,
algorithm: t,
mode: a.mode,
padding: a.padding,
blockSize: t.blockSize,
formatter: o.format
});
},
decrypt: function(t, e, n, o) {
o = this.cfg.extend(o);
e = this._parse(e, o.format);
var r = t.createDecryptor(n, o).finalize(e.ciphertext);
return r;
},
_parse: function(t, e) {
if (typeof t == "string") {
return e.parse(t, this);
} else {
return t;
}
}
});
var x = n.kdf = {};
var b = x.OpenSSL = {
execute: function(t, e, n, o, r) {
if (!o) {
o = i.random(64 / 8);
}
if (!r) {
var a = d.create({
keySize: e + n
}).compute(t, o);
} else {
var a = d.create({
keySize: e + n,
hasher: r
}).compute(t, o);
}
var s = i.create(a.words.slice(e), n * 4);
a.sigBytes = e * 4;
return g.create({
key: a,
iv: s,
salt: o
});
}
};
var _ = o.PasswordBasedCipher = k.extend({
cfg: k.cfg.extend({
kdf: b
}),
encrypt: function(t, e, n, o) {
o = this.cfg.extend(o);
var r = o.kdf.execute(n, t.keySize, t.ivSize, o.salt, o.hasher);
o.iv = r.iv;
var i = k.encrypt.call(this, t, e, r.key, o);
i.mixIn(r);
return i;
},
decrypt: function(t, e, n, o) {
o = this.cfg.extend(o);
e = this._parse(e, o.format);
var r = o.kdf.execute(n, t.keySize, t.ivSize, e.salt, o.hasher);
o.iv = r.iv;
var i = k.decrypt.call(this, t, e, r.key, o);
return i;
}
});
}();
});
})(O);
return O.exports;
}
(function(t, e) {
(function(e, n, o) {
{
t.exports = n(y(), x(), _, P(), D());
}
})(c, function(t) {
(function() {
var e = t;
var n = e.lib;
var o = n.BlockCipher;
var r = e.algo;
var i = [];
var a = [];
var s = [];
var c = [];
var l = [];
var d = [];
var p = [];
var u = [];
var f = [];
var h = [];
(function() {
var t = [];
for (var e = 0; e < 256; e++) {
if (e < 128) {
t[e] = e << 1;
} else {
t[e] = e << 1 ^ 283;
}
}
var n = 0;
var o = 0;
for (var e = 0; e < 256; e++) {
var r = o ^ o << 1 ^ o << 2 ^ o << 3 ^ o << 4;
r = r >>> 8 ^ r & 255 ^ 99;
i[n] = r;
a[r] = n;
var m = t[n];
var v = t[m];
var g = t[v];
var y = t[r] * 257 ^ r * 16843008;
s[n] = y << 24 | y >>> 8;
c[n] = y << 16 | y >>> 16;
l[n] = y << 8 | y >>> 24;
d[n] = y;
var y = g * 16843009 ^ v * 65537 ^ m * 257 ^ n * 16843008;
p[r] = y << 24 | y >>> 8;
u[r] = y << 16 | y >>> 16;
f[r] = y << 8 | y >>> 24;
h[r] = y;
if (!n) {
n = o = 1;
} else {
n = m ^ t[t[t[g ^ m]]];
o ^= t[t[o]];
}
}
})();
var m = [ 0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54 ];
var v = r.AES = o.extend({
_doReset: function() {
var t;
if (this._nRounds && this._keyPriorReset === this._key) {
return;
}
var e = this._keyPriorReset = this._key;
var n = e.words;
var o = e.sigBytes / 4;
var r = this._nRounds = o + 6;
var a = (r + 1) * 4;
var s = this._keySchedule = [];
for (var c = 0; c < a; c++) {
if (c < o) {
s[c] = n[c];
} else {
t = s[c - 1];
if (!(c % o)) {
t = t << 8 | t >>> 24;
t = i[t >>> 24] << 24 | i[t >>> 16 & 255] << 16 | i[t >>> 8 & 255] << 8 | i[t & 255];
t ^= m[c / o | 0] << 24;
} else if (o > 6 && c % o == 4) {
t = i[t >>> 24] << 24 | i[t >>> 16 & 255] << 16 | i[t >>> 8 & 255] << 8 | i[t & 255];
}
s[c] = s[c - o] ^ t;
}
}
var l = this._invKeySchedule = [];
for (var d = 0; d < a; d++) {
var c = a - d;
if (d % 4) {
var t = s[c];
} else {
var t = s[c - 4];
}
if (d < 4 || c <= 4) {
l[d] = t;
} else {
l[d] = p[i[t >>> 24]] ^ u[i[t >>> 16 & 255]] ^ f[i[t >>> 8 & 255]] ^ h[i[t & 255]];
}
}
},
encryptBlock: function(t, e) {
this._doCryptBlock(t, e, this._keySchedule, s, c, l, d, i);
},
decryptBlock: function(t, e) {
var n = t[e + 1];
t[e + 1] = t[e + 3];
t[e + 3] = n;
this._doCryptBlock(t, e, this._invKeySchedule, p, u, f, h, a);
var n = t[e + 1];
t[e + 1] = t[e + 3];
t[e + 3] = n;
},
_doCryptBlock: function(t, e, n, o, r, i, a, s) {
var c = this._nRounds;
var l = t[e] ^ n[0];
var d = t[e + 1] ^ n[1];
var p = t[e + 2] ^ n[2];
var u = t[e + 3] ^ n[3];
var f = 4;
for (var h = 1; h < c; h++) {
var m = o[l >>> 24] ^ r[d >>> 16 & 255] ^ i[p >>> 8 & 255] ^ a[u & 255] ^ n[f++];
var v = o[d >>> 24] ^ r[p >>> 16 & 255] ^ i[u >>> 8 & 255] ^ a[l & 255] ^ n[f++];
var g = o[p >>> 24] ^ r[u >>> 16 & 255] ^ i[l >>> 8 & 255] ^ a[d & 255] ^ n[f++];
var y = o[u >>> 24] ^ r[l >>> 16 & 255] ^ i[d >>> 8 & 255] ^ a[p & 255] ^ n[f++];
l = m;
d = v;
p = g;
u = y;
}
var m = (s[l >>> 24] << 24 | s[d >>> 16 & 255] << 16 | s[p >>> 8 & 255] << 8 | s[u & 255]) ^ n[f++];
var v = (s[d >>> 24] << 24 | s[p >>> 16 & 255] << 16 | s[u >>> 8 & 255] << 8 | s[l & 255]) ^ n[f++];
var g = (s[p >>> 24] << 24 | s[u >>> 16 & 255] << 16 | s[l >>> 8 & 255] << 8 | s[d & 255]) ^ n[f++];
var y = (s[u >>> 24] << 24 | s[l >>> 16 & 255] << 16 | s[d >>> 8 & 255] << 8 | s[p & 255]) ^ n[f++];
t[e] = m;
t[e + 1] = v;
t[e + 2] = g;
t[e + 3] = y;
},
keySize: 256 / 32
});
e.AES = o._createHelper(v);
})();
return t.AES;
});
})(p);
var A = p.exports;
const T = l(A);
var j = x();
const F = l(j);
var H = {
exports: {}
};
(function(t, e) {
(function(e, n) {
{
t.exports = n(y());
}
})(c, function(t) {
return t.enc.Hex;
});
})(H);
var $ = H.exports;
const I = l($);
var J = {
exports: {}
};
(function(t, e) {
(function(e, n) {
{
t.exports = n(y());
}
})(c, function(t) {
return t.enc.Utf8;
});
})(J);
var q = J.exports;
const X = l(q);
var K = y();
const V = l(K);
var W = {
exports: {}
};
(function(t, e) {
(function(e, n, o) {
{
t.exports = n(y(), D());
}
})(c, function(t) {
t.mode.CFB = function() {
var e = t.lib.BlockCipherMode.extend();
e.Encryptor = e.extend({
processBlock: function(t, e) {
var o = this._cipher;
var r = o.blockSize;
n.call(this, t, e, r, o);
this._prevBlock = t.slice(e, e + r);
}
});
e.Decryptor = e.extend({
processBlock: function(t, e) {
var o = this._cipher;
var r = o.blockSize;
var i = t.slice(e, e + r);
n.call(this, t, e, r, o);
this._prevBlock = i;
}
});
function n(t, e, n, o) {
var r;
var i = this._iv;
if (i) {
r = i.slice(0);
this._iv = void 0;
} else {
r = this._prevBlock;
}
o.encryptBlock(r, 0);
for (var a = 0; a < n; a++) {
t[e + a] ^= r[a];
}
}
return e;
}();
return t.mode.CFB;
});
})(W);
var Y = W.exports;
const G = l(Y);
var Q = {
exports: {}
};
(function(t, e) {
(function(e, n, o) {
{
t.exports = n(y(), D());
}
})(c, function(t) {
t.mode.ECB = function() {
var e = t.lib.BlockCipherMode.extend();
e.Encryptor = e.extend({
processBlock: function(t, e) {
this._cipher.encryptBlock(t, e);
}
});
e.Decryptor = e.extend({
processBlock: function(t, e) {
this._cipher.decryptBlock(t, e);
}
});
return e;
}();
return t.mode.ECB;
});
})(Q);
var Z = Q.exports;
const tt = l(Z);
var et = {
exports: {}
};
(function(t, e) {
(function(e, n, o) {
{
t.exports = n(y(), D());
}
})(c, function(t) {
t.pad.NoPadding = {
pad: function() {},
unpad: function() {}
};
return t.pad.NoPadding;
});
})(et);
var nt = et.exports;
const ot = l(nt);
var rt = {
exports: {}
};
(function(t, e) {
(function(e, n, o) {
{
t.exports = n(y(), D());
}
})(c, function(t) {
return t.pad.Pkcs7;
});
})(rt);
var it = rt.exports;
const at = l(it);
function st(t, e, n) {
const o = X.parse(e);
const r = X.parse(n);
const i = T.decrypt(t, o, {
iv: r,
padding: at
});
return i.toString(X);
}
class ct {
constructor(t, e) {
__publicField(this, "key");
__publicField(this, "iv");
this.key = I.parse(t);
this.iv = I.parse(e);
}
decrypt(t) {
const e = V.lib.CipherParams.create({
ciphertext: I.parse(t)
});
const n = T.decrypt(e, this.key, {
iv: this.iv,
mode: G,
padding: ot
});
return n.toString(X);
}
}
class lt {
constructor(t) {
__publicField(this, "key");
const e = X.parse(t);
const n = e.sigBytes;
if (n !== 16 && n !== 24 && n !== 32) {
throw new Error(`ECBPkcs7 key length must be 16/24/32 bytes, got ${n}`);
}
this.key = e;
}
encrypt(t) {
const e = X.parse(t);
const n = T.encrypt(e, this.key, {
mode: tt,
padding: at
});
return n.ciphertext.toString(F);
}
decrypt(t) {
const e = V.lib.CipherParams.create({
ciphertext: F.parse(t)
});
const n = T.decrypt(e, this.key, {
mode: tt,
padding: at
});
return n.toString(X);
}
}
const dt = "6363383864646339333537666634363165303866303437616564656536393262";
const pt = "65383932323563666262696d676b6375";
const ut = new ct(dt, pt);
function ft(t) {
const e = t.match(/data=([^&]+)/);
const n = e ? e[1] : null;
if (!n) {
return null;
}
const o = ut.decrypt(n);
return JSON.parse(o);
}
function ht(t) {
const e = JSON.parse(t);
const n = ut.decrypt(e.data);
return JSON.parse(n);
}
function mt(t, e) {
const n = ft(t);
const o = n.code;
const i = n.mod;
let a = false;
if (i == "system" && o == "index") {
a = true;
}
if (i == "index" && o == "home") {
a = true;
}
if (i == "index" && o == "auth") {
a = true;
}
if (!a) {
return;
}
const s = ht(e);
let c = [];
if (i == "system") {
c = s.data.recommendedData;
} else {
c = s.data;
}
const l = r.get("ak91ShortPornPlayItems") || {};
c.forEach(t => {
if (t.type == 1) {
const e = R(t.playUrl).toString();
l[e] = {
id: `short_${t.id}`,
title: t.title,
playURL: t.playUrl
};
}
});
r.set("ak91ShortPornPlayItems", l);
}
function vt(t) {
const e = R(t).toString();
r.set("ak91ShortPornPlayMD5", e);
}
function gt() {
const t = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.send = function(e) {
this.addEventListener("load", function() {
if (this.responseURL.includes("/pwa.php")) {
mt(e, this.response);
}
if (this.responseURL.includes(".m3u8")) {
vt(this.responseURL);
}
});
return t.apply(this, arguments);
};
}
function yt() {
const t = r.get("ak91ShortPornPlayMD5");
if (t) {
const e = r.get("ak91ShortPornPlayItems") || {};
const n = e[t];
if (n) {
return {
id: n.id,
title: n.title
};
}
return null;
}
return null;
}
function wt() {
return new Promise(t => {
var e, n, o;
let r = "https://short91Porn.com/";
let i = "";
let a = false;
let s = "";
if (window.location.pathname == "/home") {
const t = yt();
if (t) {
r += t.id;
i = t.title;
a = true;
}
}
if (/\/video\/(\d+)/.test(window.location.href)) {
const t = (e = window.location.href.match(/\/video\/(\d+)/)) == null ? void 0 : e[1];
if (t) {
r += `video_${t}`;
a = true;
}
}
if (/\/short\?id=(\d+)/.test(window.location.href)) {
const t = (n = window.location.href.match(/\/short\?id=(\d+)/)) == null ? void 0 : n[1];
if (t) {
r += `short_${t}`;
a = true;
}
}
if (/\/cartoonDetail\/(\d+)/.test(window.location.href)) {
const t = (o = window.location.href.match(/\/cartoonDetail\/(\d+)/)) == null ? void 0 : o[1];
if (t) {
r += `cartoonDetail_${t}`;
a = true;
}
}
if (!a) {
t({
analyzeURL: "",
failReason: "未捕获到视频信息",
remindMsg: ""
});
return;
}
if (i) {
s = '<p style="color: rgb(190,24,93);">请核对标题</p>';
s += `<p style="color: rgb(190,24,93);">${i}</p>`;
}
t({
analyzeURL: r,
failReason: "",
remindMsg: s
});
});
}
function kt(t) {
if (t instanceof Uint8Array || t instanceof ArrayBuffer) {
return new TextDecoder("utf-8").decode(t);
}
if (typeof t === "object") {
return JSON.stringify(t);
}
return t;
}
const xt = "91_short_app";
const bt = "7f21f0eb260e396e";
const _t = "6cbe8a2b687e0ffb";
const Rt = {
mv: /https:\/\/.*\/mv\/detail/,
community: /https:\/\/.*\/community\/post_detail/
};
function Bt(t) {
const e = t.match(/data=([^&]+)/);
const n = e ? e[1] : null;
if (!n) {
return null;
}
const o = st(n, bt, _t);
return JSON.parse(o);
}
function Lt(t) {
const e = st(t, bt, _t);
return JSON.parse(e);
}
function St(t, e) {
const n = kt(t);
const o = kt(e);
const i = Bt(n);
const a = Lt(JSON.parse(o).data);
if (!a || !a) {
return;
}
console.log("respData: ", a);
const s = {
title: a.data.row.title,
id: i.id,
anaURL: "https://91short.com/mv?id=" + i.id,
haveVideo: true
};
r.set(xt, s);
}
function Ct(t, e) {
const n = kt(t);
const o = kt(e);
const i = Bt(n);
const a = Lt(JSON.parse(o).data);
if (!a || !a) {
return;
}
let s = false;
console.log(a);
a.data.detail.medias.forEach(t => {
if (t.type === 2) {
s = true;
}
});
const c = {
title: a.data.detail.title,
id: i.id,
anaURL: "https://91short.com/community?id=" + i.id,
haveVideo: s
};
r.set(xt, c);
}
function Et() {
r.remove(xt);
const t = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.send = function(e) {
this.addEventListener("load", function() {
for (const [t, n] of Object.entries(Rt)) {
if (n.test(this.responseURL)) {
console.log("Request URL:", this.responseURL);
if (t === "mv") {
St(e, this.response);
} else if (t === "community") {
Ct(e, this.response);
}
}
}
});
return t.apply(this, arguments);
};
}
function zt() {
return new Promise(t => {
const e = r.get(xt);
if (!e) {
t({
analyzeURL: "",
failReason: "抱歉:未检测到任何视频或暂不支持该类型"
});
return;
}
r.remove(xt);
if (!e.haveVideo) {
t({
analyzeURL: "",
failReason: "您好: 当前页面不存在视频"
});
}
let n = '<p style="color: rgb(190,24,93);">请核对标题</p>';
n += `<p style="color: rgb(190,24,93);">${e.title}</p>`;
n += '<p style="color: rgb(190,24,93);">若点击取消需要重新回到当前页面哦~</p>';
t({
analyzeURL: e.anaURL,
failReason: "",
remindMsg: n
});
});
}
const Ut = "hj_short_video";
function Mt(t) {
const e = atob(t);
const n = atob(e);
const o = atob(n);
return JSON.parse(o);
}
function Pt(t, e) {
console.log("response Data,", t);
const n = new URL(e).searchParams.get("video_id");
const o = Mt(JSON.parse(t).data);
const i = {
videoId: n,
amount: o.amount,
anaURL: "https://v-short.haijiao.com?video_id=" + n
};
r.set(Ut, i);
}
function Ot() {
r.remove(Ut);
const t = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.send = function(e) {
this.addEventListener("load", function() {
if (this.responseURL.includes("checkVideoCanPlay")) {
Pt(this.response, this.responseURL);
}
});
return t.apply(this, arguments);
};
}
function Nt() {
return new Promise(t => {
const e = new URL(window.location.href);
if (e.pathname !== "/post/details" && e.pathname !== "/videoplay") {
t({
analyzeURL: "",
failReason: "请在视频播放页或短视频播放页面使用"
});
return;
}
if (e.pathname === "/post/details") {
const n = document.getElementsByClassName("buypost-btn");
const o = document.getElementsByClassName("sell-btn");
if (n.length === 0 && o.length === 0) {
t({
analyzeURL: "",
failReason: "当前页面不包含付费视频或您已购买"
});
return;
}
const r = e.searchParams.get("pid");
if (!r) {
t({
analyzeURL: "",
failReason: "获取视频ID失败"
});
return;
}
t({
analyzeURL: "https://haijiao.com/post/details?pid=" + r,
failReason: ""
});
return;
}
if (e.pathname === "/videoplay") {
const e = r.get(Ut);
let n = "";
if (e.amount === 0) {
t({
analyzeURL: "",
failReason: "当前短视频免费, 无需解析"
});
return;
}
t({
analyzeURL: e.anaURL,
failReason: "",
remindMsg: n
});
}
});
}
function Dt(t) {
return btoa(t).replace(/=/g, "~").replace(/\+/g, "-").replace(/\//g, "_");
}
function At(t, e = "") {
const n = `https://ak-sky.com/${e}#searchURL=${Dt(t)}`;
window.open(n, "_blank");
}
const Tt = "ak_hj_app";
const jt = "ak_hj_app_cache_p";
const Ft = "ak_hj_app_cache_v";
const Ht = "b78ce48964cffd68";
const $t = "d82e851b5811f3a7";
const It = {
community_post_detail: /api\.php\/api\/community\/post_detail$/,
mv_get_detail: /\/api\.php\/api\/mv\/getDetail$/,
origin_topic: /\/api\.php\/api\/api\/original\/topic/,
community_construct: /\/api\.php\/api\/community\/construct$/,
vlog_list_sort: /api.php\/api\/vlog\/list_sort$/,
vlog_list_peer: /\/api\.php\/api\/vlog\/list_peer/,
vlog_list_discover: /\/api\.php\/api\/vlog\/list_discover/,
vlog_play: /api.php\/api\/vlog\/play$/,
peer_center_post: /\/api\.php\/api\/community\/peer_center_post/
};
function Jt(t) {
const e = t.match(/data=([^&]+)/);
const n = e ? e[1] : null;
if (!n) {
return null;
}
const o = st(n, Ht, $t);
return JSON.parse(o);
}
function qt(t) {
const e = st(t, Ht, $t);
return JSON.parse(e);
}
function Xt(t, e) {
var n;
const o = kt(t);
const i = kt(e);
const a = Jt(o);
const s = qt(JSON.parse(i).data);
if (!a || !s) {
return;
}
const c = s.data.medias;
const l = r.get(jt + "_" + a.id);
if (!l) {
return;
}
const d = {
title: s.data.title,
id: a.id,
duration: (n = c.find(t => t.type == 2)) == null ? void 0 : n.duration,
videoNum: s.data.video_num,
anaURL: `https://app-hai-jiao.fun/detail?id=${s.data.id}&p=${l}`
};
r.set(Tt, d);
}
function Kt(t, e) {
const n = kt(t);
const o = kt(e);
const i = Jt(n);
const a = qt(JSON.parse(o).data);
if (!i || !a) {
return;
}
const s = {
title: a.data.detail.title,
id: i.id,
duration: a.data.detail.duration,
videoNum: 1,
anaURL: `https://mv-app-hai-jiao.fun/detail?id=${i.id}`
};
r.set(Tt, s);
}
function Vt(t, e) {
var n;
const o = kt(e);
const i = qt(JSON.parse(o).data);
if (!i) {
return;
}
const a = i.data.posts;
for (const s of a) {
const t = (n = s.medias.find(t => t.type == 2)) == null ? void 0 : n.media_url;
if (t) {
const e = jt + "_" + s.id;
r.set(e, Dt(t));
}
}
}
function Wt(t) {
var e;
const n = kt(t);
const o = qt(JSON.parse(n).data);
if (!o) {
return;
}
const i = o.data;
for (const a of i) {
const t = (e = a.medias.find(t => t.type == 2)) == null ? void 0 : e.media_url;
if (t) {
const e = jt + "_" + a.id;
r.set(e, Dt(t));
}
}
}
function Yt(t) {
const e = kt(t);
const n = qt(JSON.parse(e).data);
if (!n) {
return;
}
const o = n.data;
for (const i of o) {
const t = i.preview_url;
if (t) {
const e = Ft + "_" + i.id;
r.set(e, {
v: Dt(t),
title: i.title
});
}
}
}
function Gt(t) {
const e = kt(t);
const n = Jt(e);
if (!n) {
return;
}
if (!n.id) {
return;
}
const o = r.get(Ft + "_" + n.id);
if (!o) {
return;
}
const i = {
title: o.title,
id: n.id,
duration: 0,
videoNum: 1,
anaURL: `https://vlog-app-hai-jiao.fun/detail?id=${n.id}&p=${o.v}&title=${encodeURIComponent(o.title)}`
};
r.set(Tt, i);
}
function Qt() {
r.remove(Tt);
const t = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.send = function(e) {
this.addEventListener("load", function() {
for (const [t, n] of Object.entries(It)) {
if (n.test(this.responseURL)) {
console.log("Request URL:", this.responseURL);
if (t === "community_post_detail") {
Xt(e, this.response);
} else if (t === "mv_get_detail") {
Kt(e, this.response);
} else if (t === "origin_topic") {
Vt(e, this.response);
} else if (t === "community_construct") {
Vt(e, this.response);
} else if (t === "vlog_list_sort") {
Yt(this.response);
} else if (t === "vlog_play") {
Gt(e);
} else if (t === "peer_center_post") {
Wt(this.response);
} else if (t === "vlog_list_peer") {
Yt(this.response);
} else if (t === "vlog_list_discover") {
Yt(this.response);
}
}
}
});
return t.apply(this, arguments);
};
}
function Zt() {
return new Promise(t => {
const e = r.get(Tt);
if (!e) {
t({
analyzeURL: "",
failReason: "抱歉:未检测到任何视频"
});
return;
}
r.remove(Tt);
let n = '<p style="color: rgb(190,24,93);">若点击取消需要重新回到该视频哦~</p>';
if (e.title) {
n += `<p style="color: rgb(46, 24, 190);">${e.title.substring(0, 20) + "..."}</p>`;
}
t({
analyzeURL: e.anaURL,
failReason: "",
remindMsg: n
});
});
}
function te() {
return new Promise(t => {
const e = new URL(window.location.href);
const n = e.pathname;
if (!n.includes("/video/")) {
t({
analyzeURL: "",
failReason: "请在视频播放页使用"
});
return;
}
t({
analyzeURL: e.href,
failReason: ""
});
});
}
function ee() {
return new Promise(t => {
const e = new URL(window.location.href);
const n = e.pathname;
if (!/\/\d+\.html/.test(n)) {
t({
analyzeURL: "",
failReason: "请在视频播放页使用"
});
return;
}
const o = n.includes("free");
if (o) {
t({
analyzeURL: "",
failReason: "该视频免费, 无需解析"
});
return;
}
t({
analyzeURL: e.href,
failReason: ""
});
});
}
function ne() {
return new Promise(t => {
const e = new URL(window.location.href);
const n = e.pathname;
if (!/\/lois\/\d+/.test(n)) {
t({
analyzeURL: "",
failReason: "请点击任意视频"
});
return;
}
const o = n.split("/");
const r = o[o.length - 1];
fetch(`https://api.moegoat.com/api/lois/${r}`, {
body: null,
method: "GET"
}).then(e => {
if (!e.ok) {
t({
failReason: `获取失败, 请重试或联系客服\nerr: response status not ok`
});
return;
}
return e.json();
}).then(e => {
const n = e.data.video_count;
if (n <= 0) {
t({
failReason: `当前内容不包含视频`
});
return;
}
const o = e.data.vip_requirement;
if (o == 4) {
t({
failReason: `抱歉, 当前等级视频即将支持, 先换个视频吧~`
});
}
if (e.data.online_play !== 1) {
t({
failReason: `视频在该站只支持下载,不支持在线播放, 换个视频吧~`
});
}
const i = [ ...Array(n).keys() ].map(t => ({
title: `第${t + 1}部`,
url: `https://www.loiship.com/lois/${r}?index=${t}`
}));
t({
playlist: i,
failReason: ""
});
return;
}).catch(e => {
t({
failReason: `获取失败, 请重试或联系客服\nerr:${e}`
});
});
});
}
function oe() {
return new Promise(t => {
const e = new URL(window.location.href);
const n = e.pathname;
if (!n.includes("/videos/")) {
t({
analyzeURL: "",
failReason: "请在视频播放页使用"
});
return;
}
t({
analyzeURL: e.href,
failReason: "",
gotoPage: "modelmediaasia"
});
});
}
function re() {
return new Promise(t => {
const e = new URL(window.location.href);
const n = e.pathname;
if (!n.includes("/video/")) {
t({
analyzeURL: "",
failReason: "请在视频播放页使用"
});
return;
}
t({
analyzeURL: e.href,
failReason: "",
gotoPage: "moso"
});
});
}
function ie() {
return new Promise(t => {
const e = new URL(window.location.href);
const n = e.pathname;
if (!n.includes("/scenes/")) {
t({
analyzeURL: "",
failReason: "请在视频播放页使用"
});
return;
}
t({
analyzeURL: e.href,
failReason: ""
});
});
}
const ae = "ak_tx_vlog_app";
const se = {
doLove: /\/h5\/movie\/doLove/,
detail: /\/h5\/movie\/detail/
};
const ce = "fd14f9f8e38808fa";
const le = new lt(ce);
function de(t) {
const e = JSON.parse(le.decrypt(t));
r.set(ae, {
id: e.data.id
});
}
function pe() {
r.remove(ae);
const t = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.send = function(e) {
this.addEventListener("load", function() {
const t = new URL(window.location.href);
const n = t.pathname;
for (const [o, i] of Object.entries(se)) {
if (i.test(this.responseURL)) {
r.remove(ae);
console.log("Request URL:", this.responseURL);
if (o === "doLove" && n.includes("/vlog")) {
de(e);
}
if (o === "detail" && n.includes("/movie/detail/")) {
de(e);
}
}
}
});
return t.apply(this, arguments);
};
}
function ue() {
return new Promise(t => {
const e = new URL(window.location.href);
const n = e.pathname;
if (!n.includes("/movie/detail/") && !n.includes("/vlog")) {
t({
analyzeURL: "",
failReason: "请在视频播放页/VLog专区使用"
});
return;
}
const o = r.get(ae);
if (!o && n.includes("/vlog")) {
t({
analyzeURL: "",
failReason: "当前 vlog 右侧点个 “赞” 即可获取视频解析地址"
});
return;
}
if (!o) {
t({
analyzeURL: "",
failReason: "抱歉:未检测到任何视频或暂不支持该类型"
});
return;
}
const i = `https://txh067.com/movie/detail/${o.id}`;
r.remove(ae);
console.log("remove session success");
t({
analyzeURL: i,
failReason: "",
remindMsg: "若点击取消需要重新操作哦~"
});
});
}
const fe = {
"海角社区": [ /(http|https):\/\/hj.*\./, /(http|https):\/\/.*?\.hj.*\./, /(http|https):\/\/.*?\.hai.*\./, /(http|https):\/\/hai.*\./, /(http|https):\/\/hj.*\/.*/, /(http|https):\/\/.*\.hj.*/, /(http|https):\/\/.*h.*j.*\/home/, /.*:\/\/.*\/post\/details*/, /.*:\/\/.*\/user\/userinfo\?=*/, /.*:\/\/.*\/videoplay$/ ],
"海角APP": [ /https:\/\/p1\.lsqykbvl\.com\/.*/, /https:\/\/p5\.tyhytqs\.xyz\/.*/ ],
"19JTV": [ /https:\/\/19jtv\.com\/*/ ],
JAVHD: [ /https:\/\/javhd\.com\/*/ ],
"麻豆传媒映画": [ /https:\/\/modelmediaasia\.com\/*/, /https:\/\/www\.mdav\.live\/*/ ],
"糖心VLOG": [ /https:\/\/txh\d+\.com\/.*/, /https:\/\/.*txh\d+\.com\/.*/ ],
"天美传媒": [ /https:\/\/5ktmi048\.com\/*/ ],
"91短视频": [ /https:\/\/p2.lxrzwdq.xyz\/*/ ],
sexLikeReal: [ /https:\/\/.*sexlikereal.com\/*/ ],
"萝莉巴士": [ /https:\/\/www\.loi(?:box\d+|bus(?:\d+)?|raft|ship)\.(?:top|xyz|com)\/.*/, /https:\/\/loix.org\/.*/ ],
"51风流": [ /https:\/\/.*51fengliu.com\/*/, /https:\/\/.*51fengliu3.com\/*/ ],
"91Porn短视频": [ /https:\/\/pwa2\.lxmebhpm\.xyz\/*/, /https:\/\/pwa1\.oyqwgpzi\.xyz\/*/ ],
"来看录屏": [ /https:\/\/www\.laikanluping\.top\/*/, /https:\/\/laikanluping\.top\/*/ ],
"兔子先生": [ /https:\/\/moso\.monster\/*/ ]
};
function he(t) {
for (const [e, n] of Object.entries(fe)) {
const o = n.some(e => e.test(t));
if (o) {
return e;
}
}
return "";
}
function me() {
const e = window.location.href;
const n = he(e);
if (n === "") {
return {
ok: false,
platform: "",
func: () => Promise.reject()
};
}
if (n === "海角社区") {
Ot();
return {
ok: true,
platform: n,
func: Nt,
platformMsg: "支持板块: 视频播放页面、短视频页面"
};
}
if (n === "海角APP") {
Qt();
return {
ok: true,
platform: n,
func: Zt,
platformMsg: "支持板块: 首页、原创、短视频、社区(不包括ASMR、种子下载)"
};
}
if (n === "19JTV") {
return {
ok: true,
platform: n,
func: t,
platformMsg: "支持板块: 视频播放页面"
};
}
if (n === "JAVHD") {
return {
ok: true,
platform: n,
func: te,
platformMsg: "支持板块: 视频播放页面"
};
}
if (n === "麻豆传媒映画") {
return {
ok: true,
platform: n,
func: oe,
platformMsg: "支持板块: 视频播放页面"
};
}
if (n === "糖心VLOG") {
pe();
return {
ok: true,
platform: n,
func: ue,
platformMsg: "支持板块: 视频详情页以及VLOG专区"
};
}
if (n === "天美传媒") {
return {
ok: true,
platform: n,
func: s,
platformMsg: "支持板块: 视频播放页面"
};
}
if (n === "91短视频") {
Et();
return {
ok: true,
platform: n,
func: zt,
platformMsg: "支持板块: 首页、PORN、原创、社区"
};
}
if (n === "sexLikeReal") {
return {
ok: true,
platform: n,
func: ie,
platformMsg: "支持板块: 视频播放页面"
};
}
if (n === "萝莉巴士") {
return {
ok: true,
platform: n,
func: ne,
platformMsg: "支持板块: 视频详情弹窗"
};
}
if (n === "51风流") {
return {
ok: true,
platform: n,
func: a,
platformMsg: "支持板块: 信息、暗巷、商家",
supportUserToken: true
};
}
if (n === "91Porn短视频") {
gt();
return {
ok: true,
platform: n,
func: wt,
platformMsg: "支持板块: 首页、热点、资源(动漫视频)、原创。该站点存在特殊性, 首页板块前 20个左右 视频可能不能正常捕获, 请见谅!",
platformMsgDuration: 0
};
}
if (n === "来看录屏") {
return {
ok: true,
platform: n,
func: ee,
platformMsg: "支持板块: 视频播放页"
};
}
if (n === "兔子先生") {
return {
ok: true,
platform: n,
func: re,
platformMsg: "支持板块: 视频播放页"
};
}
return {
ok: false,
platform: "",
func: () => Promise.reject()
};
}
function ve() {
const t = `${e.ApiURL}/version`;
return fetch(t, {
method: "POST",
headers: {
"Content-Type": "application/json"
}
}).then(t => t.json());
}
const ge = class t {
constructor(t, e, n) {
__publicField(this, "group");
__publicField(this, "updateButton");
__publicField(this, "mainButton");
__publicField(this, "dragState");
this.group = document.createElement("div");
this.group.className = "akwm-fab-group";
this.group.dataset.open = "false";
this.applyStoredPosition();
const o = document.createElement("div");
o.className = "akwm-fab-actions";
this.updateButton = this.createButton(be(), "检查更新", n.onUpdate);
o.appendChild(this.updateButton);
o.appendChild(this.createButton(_e(), "获取解析地址", n.onAnalyze));
if (e) {
o.appendChild(this.createButton(Re(), "身份验证", n.onActivateToken));
}
this.mainButton = this.createButton("AK", "Ak Web Master", () => this.toggleOpen());
this.mainButton.classList.add("akwm-fab-main");
this.bindDrag();
this.group.append(o, this.mainButton);
t.appendChild(this.group);
}
setNeedUpdate(t) {
this.updateButton.classList.toggle("akwm-fab-badge", t);
}
toggleOpen() {
this.group.dataset.open = this.group.dataset.open === "true" ? "false" : "true";
}
createButton(t, e, n) {
const o = document.createElement("button");
o.className = "akwm-fab";
o.type = "button";
if (t.trim().startsWith("<svg")) {
o.innerHTML = t;
} else {
o.textContent = t;
}
o.title = e;
o.setAttribute("aria-label", e);
o.addEventListener("click", n);
return o;
}
bindDrag() {
this.mainButton.addEventListener("pointerdown", t => {
if (t.button !== 0) {
return;
}
const e = this.group.getBoundingClientRect();
this.dragState = {
pointerId: t.pointerId,
startX: t.clientX,
startY: t.clientY,
startLeft: e.left,
startTop: e.top,
moved: false
};
this.mainButton.setPointerCapture(t.pointerId);
this.group.classList.add("akwm-fab-dragging");
});
this.mainButton.addEventListener("pointermove", t => {
const e = this.dragState;
if (!e || e.pointerId !== t.pointerId) {
return;
}
const n = t.clientX - e.startX;
const o = t.clientY - e.startY;
if (Math.abs(n) + Math.abs(o) > 4) {
e.moved = true;
}
this.setPosition(e.startLeft + n, e.startTop + o);
});
this.mainButton.addEventListener("pointerup", t => this.finishDrag(t));
this.mainButton.addEventListener("pointercancel", t => this.finishDrag(t));
this.mainButton.addEventListener("click", t => {
if (this.group.dataset.justDragged === "true") {
t.stopImmediatePropagation();
this.group.dataset.justDragged = "false";
}
}, true);
window.addEventListener("resize", () => {
const t = this.group.getBoundingClientRect();
this.setPosition(t.left, t.top, true);
});
}
finishDrag(t) {
const e = this.dragState;
if (!e || e.pointerId !== t.pointerId) {
return;
}
this.mainButton.releasePointerCapture(t.pointerId);
this.group.classList.remove("akwm-fab-dragging");
this.dragState = void 0;
const n = this.group.getBoundingClientRect();
this.savePosition(n.left, n.top);
if (e.moved) {
this.group.dataset.justDragged = "true";
}
}
applyStoredPosition() {
const t = we();
if (!t) {
return;
}
this.setPosition(t.left, t.top);
}
setPosition(t, e, n = false) {
const o = Math.max(8, window.innerWidth - this.group.offsetWidth - 8);
const r = Math.max(8, window.innerHeight - this.group.offsetHeight - 8);
const i = ke(t, 8, o);
const a = ke(e, 8, r);
this.group.style.left = `${i}px`;
this.group.style.top = `${a}px`;
this.group.style.right = "auto";
if (!n) {
this.savePosition(i, a);
}
}
savePosition(e, n) {
localStorage.setItem(t.positionKey, JSON.stringify({
left: e,
top: n
}));
}
};
__publicField(ge, "positionKey", "akwmFloatingPosition");
let ye = ge;
function we() {
const t = localStorage.getItem(ye.positionKey);
if (!t) {
return null;
}
try {
const e = JSON.parse(t);
if (typeof e.left === "number" && typeof e.top === "number") {
return e;
}
} catch {
return null;
}
return null;
}
function ke(t, e, n) {
return Math.min(Math.max(t, e), n);
}
function xe(t) {
return `<svg class="akwm-fab-icon" viewBox="0 0 24 24" aria-hidden="true">${t}</svg>`;
}
function be() {
return xe('<path d="M21 12a9 9 0 0 0-15.4-6.4L3 8"></path><path d="M3 3v5h5"></path><path d="M3 12a9 9 0 0 0 15.4 6.4L21 16"></path><path d="M21 21v-5h-5"></path>');
}
function _e() {
return xe('<path d="M10 13a5 5 0 0 0 7.1 0l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1"></path><path d="M14 11a5 5 0 0 0-7.1 0l-2 2a5 5 0 0 0 7.1 7.1l1.1-1.1"></path>');
}
function Re() {
return xe('<path d="M20 6 9 17l-5-5"></path>');
}
class Be {
constructor(t, e) {
__publicField(this, "overlay");
__publicField(this, "body");
__publicField(this, "okButton");
__publicField(this, "cancelButton");
__publicField(this, "okLabel", "");
this.root = t;
this.overlay = document.createElement("div");
this.overlay.className = "akwm-modal-overlay";
const n = document.createElement("section");
n.className = "akwm-modal";
n.setAttribute("role", "dialog");
n.setAttribute("aria-modal", "true");
const o = document.createElement("header");
o.className = "akwm-modal-header";
o.textContent = e.title;
this.body = document.createElement("div");
this.body.className = "akwm-modal-body";
this.setBody(e.body || "");
const r = document.createElement("footer");
r.className = "akwm-modal-footer";
const i = e.showCancel !== false;
if (i) {
this.cancelButton = document.createElement("button");
this.cancelButton.className = "akwm-btn";
this.cancelButton.type = "button";
this.cancelButton.textContent = e.cancelText || "取消";
this.cancelButton.addEventListener("click", () => {
var t;
(t = e.onCancel) == null ? void 0 : t.call(e);
this.close();
});
r.appendChild(this.cancelButton);
}
const a = e.showOk !== false;
if (a) {
this.okButton = document.createElement("button");
this.okButton.className = "akwm-btn akwm-btn-primary";
this.okButton.type = "button";
this.okLabel = e.okText || "确定";
this.okButton.textContent = this.okLabel;
this.okButton.disabled = Boolean(e.okDisabled);
this.okButton.addEventListener("click", () => {
var t;
void ((t = e.onOk) == null ? void 0 : t.call(e));
});
r.appendChild(this.okButton);
}
n.append(o, this.body, r);
this.overlay.appendChild(n);
this.root.appendChild(this.overlay);
}
setBody(t) {
this.body.replaceChildren();
if (typeof t === "string") {
const e = document.createElement("span");
e.textContent = t;
this.body.appendChild(e);
return;
}
this.body.appendChild(t);
}
setOkText(t) {
this.okLabel = t;
if (this.okButton) {
this.okButton.textContent = t;
}
}
setOkDisabled(t) {
if (this.okButton) {
this.okButton.disabled = t;
}
}
setLoading(t) {
if (this.okButton) {
this.okButton.disabled = t;
this.okButton.textContent = t ? "请稍等..." : this.okLabel;
}
if (this.cancelButton) {
this.cancelButton.disabled = t;
}
}
close() {
this.overlay.remove();
}
}
const Le = `\n:host {\n all: initial;\n}\n\n.akwm-root,\n.akwm-root * {\n box-sizing: border-box;\n letter-spacing: 0;\n}\n\n.akwm-root {\n position: fixed;\n inset: 0;\n z-index: 2147483647;\n pointer-events: none;\n color: #172033;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;\n font-size: 14px;\n line-height: 1.5;\n}\n\n.akwm-root button,\n.akwm-root input {\n font: inherit;\n}\n\n.akwm-fab-group {\n position: fixed;\n right: 20px;\n top: 47vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n pointer-events: auto;\n touch-action: none;\n}\n\n.akwm-fab-actions {\n display: flex;\n flex-direction: column;\n gap: 8px;\n transform: translateY(6px);\n opacity: 0;\n pointer-events: none;\n transition: opacity 160ms ease, transform 160ms ease;\n}\n\n.akwm-fab-group[data-open="true"] .akwm-fab-actions {\n transform: translateY(0);\n opacity: 1;\n pointer-events: auto;\n}\n\n.akwm-fab {\n position: relative;\n width: 38px;\n height: 38px;\n border: 0;\n border-radius: 999px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n background: #2563eb;\n box-shadow: 0 8px 20px rgba(31, 41, 55, 0.22);\n cursor: pointer;\n user-select: none;\n transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;\n}\n\n.akwm-fab:hover {\n transform: translateY(-1px);\n background: #1d4ed8;\n box-shadow: 0 10px 24px rgba(31, 41, 55, 0.28);\n}\n\n.akwm-fab:active {\n transform: translateY(0);\n}\n\n.akwm-fab-main {\n width: 44px;\n height: 44px;\n font-size: 13px;\n font-weight: 800;\n cursor: grab;\n}\n\n.akwm-fab-dragging .akwm-fab-main {\n cursor: grabbing;\n}\n\n.akwm-fab-icon {\n width: 18px;\n height: 18px;\n fill: none;\n stroke: currentColor;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.akwm-fab-badge::after {\n content: "";\n position: absolute;\n top: 2px;\n right: 3px;\n width: 8px;\n height: 8px;\n border: 2px solid #fff;\n border-radius: 999px;\n background: #ef4444;\n}\n\n.akwm-toast-wrap {\n position: fixed;\n top: 22px;\n right: 22px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: min(340px, calc(100vw - 44px));\n pointer-events: auto;\n}\n\n.akwm-toast {\n border: 1px solid rgba(148, 163, 184, 0.28);\n border-radius: 8px;\n background: #fff;\n box-shadow: 0 14px 38px rgba(15, 23, 42, 0.18);\n padding: 12px 14px;\n color: #172033;\n overflow: hidden;\n}\n\n.akwm-toast-title {\n margin: 0;\n font-size: 14px;\n font-weight: 700;\n}\n\n.akwm-toast-desc {\n margin: 4px 0 0;\n color: #5b6475;\n font-size: 13px;\n word-break: break-word;\n}\n\n.akwm-toast-success {\n border-left: 4px solid #16a34a;\n}\n\n.akwm-toast-error {\n border-left: 4px solid #dc2626;\n}\n\n.akwm-toast-info {\n border-left: 4px solid #2563eb;\n}\n\n.akwm-modal-overlay {\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 22px;\n background: rgba(15, 23, 42, 0.36);\n pointer-events: auto;\n}\n\n.akwm-modal {\n width: min(520px, 100%);\n max-height: min(680px, calc(100vh - 44px));\n display: flex;\n flex-direction: column;\n border: 1px solid rgba(148, 163, 184, 0.24);\n border-radius: 8px;\n background: #fff;\n box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);\n overflow: hidden;\n}\n\n.akwm-modal-header {\n padding: 18px 20px 10px;\n color: #101828;\n font-size: 16px;\n font-weight: 760;\n}\n\n.akwm-modal-body {\n padding: 10px 20px 18px;\n color: #273244;\n overflow: auto;\n word-break: break-word;\n}\n\n.akwm-modal-footer {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n padding: 12px 20px 16px;\n border-top: 1px solid #edf1f7;\n}\n\n.akwm-btn {\n min-width: 74px;\n height: 34px;\n border: 1px solid #d6dce8;\n border-radius: 6px;\n padding: 0 14px;\n background: #fff;\n color: #273244;\n cursor: pointer;\n text-align: center;\n user-select: none;\n}\n\n.akwm-btn:hover {\n border-color: #9fb0c8;\n color: #111827;\n}\n\n.akwm-btn-primary {\n border-color: #2563eb;\n background: #2563eb;\n color: #fff;\n}\n\n.akwm-btn-primary:hover {\n border-color: #1d4ed8;\n background: #1d4ed8;\n color: #fff;\n}\n\n.akwm-btn-link {\n border-color: transparent;\n background: transparent;\n color: #2563eb;\n min-width: auto;\n padding: 0 2px;\n}\n\n.akwm-btn-dashed {\n border-style: dashed;\n min-width: 92px;\n}\n\n.akwm-btn:disabled {\n cursor: not-allowed;\n opacity: 0.55;\n}\n\n.akwm-input {\n width: 100%;\n height: 40px;\n border: 1px solid #d6dce8;\n border-radius: 6px;\n padding: 0 12px;\n outline: none;\n color: #172033;\n background: #f8fafc;\n}\n\n.akwm-input:focus {\n border-color: #2563eb;\n background: #fff;\n box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);\n}\n\n.akwm-tag {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 30px;\n border-radius: 6px;\n padding: 5px 10px;\n color: #5b21b6;\n background: #f3e8ff;\n overflow: hidden;\n}\n\n.akwm-ellipsis {\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.akwm-center {\n text-align: center;\n}\n\n.akwm-stack {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n}\n\n.akwm-row {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 8px;\n}\n\n.akwm-segmented {\n display: inline-flex;\n gap: 4px;\n padding: 4px;\n border-radius: 8px;\n background: #eef2f7;\n}\n\n.akwm-segmented button {\n min-width: 54px;\n height: 30px;\n border: 0;\n border-radius: 6px;\n padding: 0 12px;\n color: #475569;\n background: transparent;\n cursor: pointer;\n}\n\n.akwm-segmented button[data-active="true"] {\n color: #172033;\n background: #fff;\n box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);\n}\n\n.akwm-remind {\n text-align: center;\n}\n\n.akwm-remind p {\n margin: 6px 0;\n}\n\n.akwm-danger {\n color: #be185d;\n}\n\n.akwm-muted {\n color: #667085;\n}\n\n@media (max-width: 520px) {\n .akwm-fab-group {\n right: 14px;\n }\n\n .akwm-modal-overlay {\n padding: 14px;\n }\n\n .akwm-modal-header {\n padding: 16px 16px 8px;\n }\n\n .akwm-modal-body {\n padding: 8px 16px 16px;\n }\n\n .akwm-modal-footer {\n padding: 12px 16px 14px;\n }\n}\n`;
class Se {
constructor(t) {
__publicField(this, "wrap");
this.wrap = document.createElement("div");
this.wrap.className = "akwm-toast-wrap";
t.appendChild(this.wrap);
}
info(t, e, n = 5) {
this.show("info", t, e, n);
}
success(t, e, n = 2.4) {
this.show("success", t, e, n);
}
error(t, e, n = 4) {
this.show("error", t, e, n);
}
show(t, e, n, o = 5) {
const r = document.createElement("div");
r.className = `akwm-toast akwm-toast-${t}`;
const i = document.createElement("p");
i.className = "akwm-toast-title";
i.textContent = e;
r.appendChild(i);
if (n) {
const t = document.createElement("p");
t.className = "akwm-toast-desc";
t.textContent = n;
r.appendChild(t);
}
r.addEventListener("click", () => r.remove());
this.wrap.appendChild(r);
if (o > 0) {
window.setTimeout(() => r.remove(), o * 1e3);
}
}
}
async function Ce(t, e, n, o) {
try {
await navigator.clipboard.writeText(t);
n.success(e);
} catch {
n.error("复制解析地址失败, 请开启浏览器复制权限");
}
}
const Ee = "https://sleazyfork.org/zh-CN/scripts/505090-%E6%B5%B7%E8%A7%92%E7%A4%BE%E5%8C%BA%E8%A7%A3%E6%9E%90";
const ze = async () => ({
analyzeURL: "",
failReason: "Default function - no operation",
remindMsg: "",
gotoPage: ""
});
class Ue {
constructor(t) {
__publicField(this, "root");
__publicField(this, "toast");
__publicField(this, "injectFunction", ze);
__publicField(this, "actions");
__publicField(this, "initialized", false);
this.shadowRoot = t;
const e = document.createElement("style");
e.textContent = Le;
this.shadowRoot.appendChild(e);
this.root = document.createElement("div");
this.root.className = "akwm-root";
this.shadowRoot.appendChild(this.root);
this.toast = new Se(this.root);
}
init() {
if (this.initialized) {
return;
}
this.initialized = true;
const t = me();
if (!t.ok) {
this.toast.info("Ak Web Master", "加载失败, 请联系客服");
return;
}
this.injectFunction = t.func;
this.actions = new ye(this.root, Boolean(t.supportUserToken), {
onUpdate: () => this.openUpdateDialog(),
onAnalyze: () => this.openAnalyzeDialog(),
onActivateToken: () => this.openActivateDialog()
});
this.refreshUpdateBadge();
this.toast.info(`${t.platform} 加载成功`, t.platformMsg, t.platformMsgDuration ?? 5);
}
refreshUpdateBadge() {
ve().then(t => {
var e;
if (t.code !== 200) {
return;
}
(e = this.actions) == null ? void 0 : e.setNeedUpdate(t.data.version !== Pe());
}).catch(() => {
var t;
(t = this.actions) == null ? void 0 : t.setNeedUpdate(false);
});
}
openAnalyzeDialog() {
let t;
t = new Be(this.root, {
title: "您 好",
body: "是否尝试获解析地址",
okText: "获 取",
cancelText: "取 消",
onOk: async () => {
t.setOkText("获取中");
t.setBody("请稍等...");
t.setLoading(true);
try {
const e = await this.injectFunction();
if (e.openActivateToken) {
t.close();
this.openActivateDialog();
return;
}
if (e.failReason) {
t.setBody(e.failReason);
t.setOkText("重 试");
return;
}
this.handleAnalyzeSuccess(e);
t.close();
} catch {
t.setBody("获取失败, 请重试");
t.setOkText("获 取");
} finally {
t.setLoading(false);
}
}
});
}
handleAnalyzeSuccess(t) {
var e;
if (t.analyzeURL) {
this.openRedirectDialog(t.analyzeURL, t.remindMsg, t.gotoPage);
}
if ((e = t.playlist) == null ? void 0 : e.length) {
this.openPlaylistDialog(t.playlist, t.remindMsg, t.playlistSubTitle);
}
if (t.segmented) {
this.openSegmentedDialog(t.segmented, t.remindMsg);
}
}
openRedirectDialog(t, e, n) {
const o = document.createElement("div");
const r = document.createElement("div");
r.className = "akwm-tag";
const i = document.createElement("span");
i.className = "akwm-ellipsis";
i.textContent = t;
r.appendChild(i);
o.appendChild(r);
Me(o, e);
let a;
a = new Be(this.root, {
title: "获取成功",
body: o,
okText: "前往Ak-Sky",
cancelText: "取消",
onOk: () => {
At(t, n);
a.close();
}
});
}
openPlaylistDialog(t, e, n) {
const o = document.createElement("div");
o.className = "akwm-stack";
const r = document.createElement("div");
r.className = "akwm-center akwm-muted";
r.textContent = n || `本内容含有 ${t.length} 个视频, 请选择`;
o.appendChild(r);
const i = document.createElement("div");
i.className = "akwm-row";
t.forEach(t => {
const e = document.createElement("button");
e.className = "akwm-btn akwm-btn-dashed";
e.type = "button";
e.textContent = t.title;
e.addEventListener("click", () => At(t.url));
i.appendChild(e);
});
o.appendChild(i);
Me(o, e);
new Be(this.root, {
title: "获取成功",
body: o,
cancelText: "取消",
showOk: false
});
}
openSegmentedDialog(t, e) {
let n = t.options[0] || "";
const o = document.createElement("div");
o.className = "akwm-stack akwm-center";
const r = document.createElement("div");
r.className = "akwm-danger";
r.textContent = e || "";
o.appendChild(r);
const i = document.createElement("div");
i.className = "akwm-segmented";
const a = document.createElement("p");
a.textContent = t.data[n] || "";
const s = () => {
i.replaceChildren();
t.options.forEach(e => {
const o = document.createElement("button");
o.type = "button";
o.textContent = e;
o.dataset.active = String(e === n);
o.addEventListener("click", () => {
n = e;
a.textContent = t.data[n] || "";
s();
});
i.appendChild(o);
});
};
s();
const c = document.createElement("button");
c.className = "akwm-btn akwm-btn-primary";
c.type = "button";
c.textContent = "复 制";
c.addEventListener("click", () => Ce(t.data[n] || "", "复制成功", this.toast));
o.append(i, a, c);
new Be(this.root, {
title: "获取成功",
body: o,
cancelText: "关 闭",
showOk: false
});
}
openActivateDialog() {
const t = document.createElement("div");
const e = document.createElement("input");
e.className = "akwm-input";
e.placeholder = "请输入您的激活码";
e.value = o.get("akSkyUserToken") || "";
t.appendChild(e);
const n = document.createElement("div");
n.style.display = "flex";
n.style.justifyContent = "flex-end";
n.style.marginTop = "10px";
const r = document.createElement("button");
r.className = "akwm-btn akwm-btn-link";
r.type = "button";
r.textContent = "获取激活码";
r.addEventListener("click", () => window.open("https://ak-sky.com/phoenix", "_blank"));
n.appendChild(r);
t.appendChild(n);
let i;
i = new Be(this.root, {
title: "身份验证",
body: t,
okText: "确 认",
cancelText: "取 消",
okDisabled: !e.value,
onOk: () => {
const t = e.value.trim();
if (!t) {
i.setOkDisabled(true);
return;
}
o.set("akSkyUserToken", t);
i.close();
}
});
e.addEventListener("input", () => i.setOkDisabled(!e.value.trim()));
window.setTimeout(() => e.focus(), 0);
}
openUpdateDialog() {
let t = "检查";
let e;
e = new Be(this.root, {
title: "Ak-WebMaster",
body: "是否检查新版本?",
okText: t,
cancelText: "取消",
onOk: async () => {
var n, o;
if (t === "前往更新") {
window.open(Ee, "_blank");
e.close();
return;
}
e.setLoading(true);
try {
const r = await ve();
if (r.code !== 200) {
e.setBody("检查失败");
return;
}
if (r.data.version !== Pe()) {
e.setBody(`发现新版本: ${r.data.version}`);
t = "前往更新";
e.setOkText(t);
(n = this.actions) == null ? void 0 : n.setNeedUpdate(true);
} else {
e.setBody("当前版本为最新版本");
(o = this.actions) == null ? void 0 : o.setNeedUpdate(false);
}
} catch {
e.setBody("检查失败");
} finally {
e.setLoading(false);
}
}
});
}
}
function Me(t, e) {
if (!e) {
return;
}
const n = document.createElement("div");
n.className = "akwm-remind";
n.innerHTML = e;
t.appendChild(n);
}
function Pe() {
if (typeof GM_info !== "undefined") {
return GM_info.script.version;
}
return "v2.2.5";
}
function Oe(...t) {
console.log("%cAkWebMaster:", "color: #7c3aed; font-weight: 700", ...t);
}
function Ne(t) {
window.setTimeout(t, 0);
const e = () => {
let e = window.location.href;
const n = new MutationObserver(() => {
if (e !== window.location.href) {
e = window.location.href;
t();
}
});
n.observe(document.body, {
childList: true,
subtree: true
});
return n;
};
if (document.body) {
return e();
}
document.addEventListener("DOMContentLoaded", e, {
once: true
});
return void 0;
}
Oe("script has successfully started");
function De() {
if (!document.body) {
window.setTimeout(De, 50);
return;
}
if (document.getElementById("akwm")) {
return;
}
const t = document.createElement("div");
t.id = "akwm";
document.body.appendChild(t);
const e = t.attachShadow({
mode: "open"
});
const n = new Ue(e);
window.__AKWM_APP__ = n;
n.init();
}
Ne(() => {
try {
De();
} catch (t) {
Oe(t);
}
});
})();