efront 3.33.3 → 3.34.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/kugou/icons/kugo.ico +0 -0
- package/apps/kugou/icons/kuwo.png +0 -0
- package/apps/kugou/icons/qqjt.ico +0 -0
- package/apps/kugou/icons/yyyy.ico +0 -0
- package/apps/kugou/index.html +2 -1
- package/apps/kugou/main.js +4 -0
- package/apps/kugou/search/search.html +3 -4
- package/apps/kugou/search/search.js +55 -5
- package/apps/kugou/search/search.less +3 -0
- package/coms/basic/cross_.js +13 -1
- package/coms/basic/parseURL.js +2 -2
- package/coms/basic/parseURL_test.js +1 -0
- package/coms/basic/seek.js +42 -4
- package/coms/kugou/api.js +30 -2
- package/coms/kugou/buildList.html +1 -1
- package/coms/kugou/buildList.js +2 -2
- package/coms/kugou/buildScroll.js +1 -1
- package/coms/kugou/getSandbox.js +1 -1
- package/coms/kugou/krc.js +80 -34
- package/coms/kugou/musicList.js +37 -2
- package/coms/kugou/page.js +6 -6
- package/coms/kugou/playList.html +1 -1
- package/coms/kugou/playList.js +0 -1
- package/coms/kugou/playList.less +9 -2
- package/coms/kugou/player.html +3 -3
- package/coms/kugou/player.js +76 -30
- package/coms/kugou/qqjc.js +172 -0
- package/coms/kugou/song.html +8 -3
- package/coms/kugou/song.js +29 -7
- package/coms/kugou/song.less +78 -16
- package/coms/kugou/yyyc.js +535 -0
- package/coms/reptile/colored_console.js +1 -1
- package/coms/third-party/crypto.js +6166 -0
- package/coms/third-party//344/273/243/347/240/201/346/235/245/346/272/220.txt +1 -0
- package/coms/zimoli/Canvas.js +7 -7
- package/coms/zimoli/anchor.js +2 -2
- package/coms/zimoli/anniu.js +6 -6
- package/coms/zimoli/button.js +9 -6
- package/coms/zimoli/cloneVisible.js +2 -3
- package/coms/zimoli/createElement.js +1 -1
- package/coms/zimoli/data.js +8 -5
- package/coms/zimoli/dateslider.js +8 -8
- package/coms/zimoli/download.js +1 -1
- package/coms/zimoli/editor.js +2 -2
- package/coms/zimoli/gallery.js +2 -2
- package/coms/zimoli/gallery.less +1 -1
- package/coms/zimoli/getGenerator.js +1 -6
- package/coms/zimoli/group.js +2 -2
- package/coms/zimoli/hline.js +1 -1
- package/coms/zimoli/icon.js +3 -3
- package/coms/zimoli/input.js +2 -2
- package/coms/zimoli/label.js +3 -3
- package/coms/zimoli/list.js +17 -28
- package/coms/zimoli/mask.js +2 -2
- package/coms/zimoli/option.js +7 -7
- package/coms/zimoli/render.js +1 -0
- package/coms/zimoli/selectDate.js +2 -2
- package/coms/zimoli/space.js +1 -1
- package/coms/zimoli/swap.js +1 -1
- package/coms/zimoli/titlebar.js +4 -4
- package/coms/zimoli/vbox.js +1 -1
- package/coms/zimoli/video.js +1 -1
- package/coms/zimoli/zimoli.js +1 -1
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/kugou/player.js
CHANGED
|
@@ -3,8 +3,55 @@ var playState = kugou$playState;
|
|
|
3
3
|
var playModes = kugou$playModes;
|
|
4
4
|
var playModeData = data.getInstance("play-mode");
|
|
5
5
|
var playList = kugou$playList();
|
|
6
|
-
var
|
|
7
|
-
|
|
6
|
+
var patchMusicInfo = async function (info) {
|
|
7
|
+
var res = null, krc;
|
|
8
|
+
switch (info.type) {
|
|
9
|
+
case "qqjt":
|
|
10
|
+
info.lrc = (await cross("get", info.lyric)).response;
|
|
11
|
+
console.log(info)
|
|
12
|
+
res = await data.from("qqjt-url", qqjc({
|
|
13
|
+
TSID: info.id
|
|
14
|
+
}))
|
|
15
|
+
break;
|
|
16
|
+
case "yyyy":
|
|
17
|
+
res = await data.from("yyyy-url", yyyc.encode({
|
|
18
|
+
ids: JSON.stringify([info.id]),
|
|
19
|
+
csrf_token: '',
|
|
20
|
+
level: "standard",
|
|
21
|
+
encodeType: "aac"
|
|
22
|
+
}));
|
|
23
|
+
info.lrc = await data.from('yyyy-lrc', yyyc.encode({
|
|
24
|
+
id: info.id,
|
|
25
|
+
lv: 0,
|
|
26
|
+
// tv: 0,
|
|
27
|
+
}));
|
|
28
|
+
info.singerName = info.singername;
|
|
29
|
+
info.songName = info.songname;
|
|
30
|
+
break;
|
|
31
|
+
case "kuwo":
|
|
32
|
+
res = await data.from("play-url", info);
|
|
33
|
+
info.lrc = await data.from("kuwo-lrc", info, function (lrc) {
|
|
34
|
+
return lrc.map(l => `[${l.time}]${l.lineLyric}`).join('\r\n');
|
|
35
|
+
});
|
|
36
|
+
info.avatar = info.pic;
|
|
37
|
+
info.singerName = info.singername;
|
|
38
|
+
info.songName = info.songname;
|
|
39
|
+
break;
|
|
40
|
+
case "kugo":
|
|
41
|
+
default:
|
|
42
|
+
res = await data.from("song-info", info);
|
|
43
|
+
krc = await data.from("search-krc", res);
|
|
44
|
+
krc = await data.from("download-krc", krc);
|
|
45
|
+
info.krc = fromBase64(krc);
|
|
46
|
+
if (res.fail_process === 12) res.priced = true;
|
|
47
|
+
if (res.imgUrl) {
|
|
48
|
+
res.avatar = res.imgUrl.replace(/\{size\}/ig, 200);
|
|
49
|
+
}
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
Object.assign(info, res);
|
|
53
|
+
if (info.avatar) info.avatarUrl = `url('${info.avatar}')`;
|
|
54
|
+
return info;
|
|
8
55
|
};
|
|
9
56
|
var getLrc = function () {
|
|
10
57
|
return `https://m.kugou.com/app/i/krc.php?cmd=100&keyword=%E9%99%88%E6%98%9F%E3%80%81%E5%BC%A0%E7%BF%94%E8%BD%A9%20-%20%E5%86%B3%E4%B8%8D%E5%9B%9E%E5%A4%B4&hash=77AFF2715498A86AA28AC2DAA29C3FEB&timelength=280000&d=0.2984004589282503`;
|
|
@@ -18,7 +65,7 @@ on("keydown")(window, function (event) {
|
|
|
18
65
|
var { target } = event;
|
|
19
66
|
if (/^(input|select|textarea)$/i.test(target.tagName)) return;
|
|
20
67
|
var $scope = player.$scope;
|
|
21
|
-
if (!$scope.audio && !kugou$musicList.
|
|
68
|
+
if (!$scope.audio && !kugou$musicList.getActived()) return;
|
|
22
69
|
switch (event.keyCode || event.which) {
|
|
23
70
|
case 32:
|
|
24
71
|
if (event.repeat) break;
|
|
@@ -69,7 +116,6 @@ var filterTime = function (a, t) {
|
|
|
69
116
|
}
|
|
70
117
|
return res.map(fixTime).join(":");
|
|
71
118
|
};
|
|
72
|
-
|
|
73
119
|
var backer = document.createElement("back");
|
|
74
120
|
onremove(backer, function () {
|
|
75
121
|
$scope.page = false;
|
|
@@ -91,6 +137,12 @@ var $scope = {
|
|
|
91
137
|
canvas: kugou$dance,
|
|
92
138
|
activeList: playList,
|
|
93
139
|
index: 0,
|
|
140
|
+
get songName() {
|
|
141
|
+
return this.info.singername || this.info.singerName;
|
|
142
|
+
},
|
|
143
|
+
get singerName() {
|
|
144
|
+
return this.info.songname || this.info.songName;
|
|
145
|
+
},
|
|
94
146
|
update() {
|
|
95
147
|
if (touching) return;
|
|
96
148
|
let _audio = $scope.audio;
|
|
@@ -131,7 +183,8 @@ var $scope = {
|
|
|
131
183
|
rootElements.unmount(backer);
|
|
132
184
|
}
|
|
133
185
|
},
|
|
134
|
-
pause() {
|
|
186
|
+
pause(inc) {
|
|
187
|
+
if (inc !== false) ++this.playid;
|
|
135
188
|
$scope.playing = false;
|
|
136
189
|
let _audio = $scope.audio;
|
|
137
190
|
ns.disable();
|
|
@@ -181,22 +234,22 @@ var $scope = {
|
|
|
181
234
|
}
|
|
182
235
|
},
|
|
183
236
|
playid: 0,
|
|
184
|
-
play(
|
|
237
|
+
play(music = musicList.getActived()) {
|
|
238
|
+
var playid = ++this.playid;
|
|
185
239
|
render.refresh();
|
|
186
|
-
var isPlayback = typeof
|
|
240
|
+
var isPlayback = typeof music === "number";
|
|
187
241
|
if (isPlayback) {
|
|
188
|
-
if (
|
|
189
|
-
|
|
242
|
+
if (music < 0) {
|
|
243
|
+
music = music + musicList.length;
|
|
190
244
|
}
|
|
191
245
|
if (!musicList.length) return;
|
|
192
|
-
if (
|
|
193
|
-
|
|
246
|
+
if (music >= musicList.length) {
|
|
247
|
+
music = music % musicList.length;
|
|
194
248
|
}
|
|
195
|
-
|
|
196
|
-
if (!
|
|
197
|
-
hash = hash.hash;
|
|
249
|
+
music = musicList[music];
|
|
250
|
+
if (!music) return;
|
|
198
251
|
}
|
|
199
|
-
if (
|
|
252
|
+
if (musicList.isActived(music) && $scope.audio) {
|
|
200
253
|
if ($scope.playing) return $scope.pause();
|
|
201
254
|
$scope.playing = true;
|
|
202
255
|
let _audio = $scope.audio;
|
|
@@ -206,15 +259,13 @@ var $scope = {
|
|
|
206
259
|
}
|
|
207
260
|
return;
|
|
208
261
|
}
|
|
209
|
-
if (!isPlayback)
|
|
210
|
-
if (musicList[cx].hash === hash) musicList.splice(cx, 1);
|
|
211
|
-
}
|
|
262
|
+
if (!isPlayback) musicList.remove(music);
|
|
212
263
|
|
|
213
|
-
$scope.pause();
|
|
264
|
+
$scope.pause(false);
|
|
214
265
|
|
|
215
266
|
/**
|
|
216
267
|
* ios 只能由用户创建audio,所以请在用户触发的事件中调用play方法
|
|
217
|
-
|
|
268
|
+
*/
|
|
218
269
|
$scope.playing = false;
|
|
219
270
|
/**
|
|
220
271
|
* @type {HTMLAudioElement}
|
|
@@ -245,17 +296,14 @@ var $scope = {
|
|
|
245
296
|
_audio.autostart = true;
|
|
246
297
|
return alert("暂不支持在您的浏览器中播放!");
|
|
247
298
|
}
|
|
248
|
-
musicList.
|
|
299
|
+
musicList.setActive(music);
|
|
249
300
|
$scope.playing = true;
|
|
250
301
|
playState.width = 0;
|
|
251
|
-
|
|
302
|
+
patchMusicInfo(music).then((response) => {
|
|
303
|
+
if (playid !== this.playid) return;
|
|
252
304
|
if (!this.playing) return;
|
|
253
|
-
if (
|
|
254
|
-
|
|
255
|
-
response.avatar = response.imgUrl.replace(/\{size\}/ig, 200);
|
|
256
|
-
response.avatarUrl = `url('${response.avatar}')`;
|
|
257
|
-
}
|
|
258
|
-
var index = kugou$musicList.map(a => a.hash).indexOf(hash);
|
|
305
|
+
if (!musicList.isActived(music)) return;
|
|
306
|
+
var index = kugou$musicList.indexOf(music);
|
|
259
307
|
var distlist = kugou$musicList.slice(0);
|
|
260
308
|
distlist.forEach(function (info) {
|
|
261
309
|
delete info.activate;
|
|
@@ -267,9 +315,7 @@ var $scope = {
|
|
|
267
315
|
$scope.index = 0;
|
|
268
316
|
distlist.unshift(response);
|
|
269
317
|
}
|
|
270
|
-
response.hash = hash;
|
|
271
318
|
response.activate = true;
|
|
272
|
-
distlist.active_hash = hash;
|
|
273
319
|
extend($scope.info, response);
|
|
274
320
|
cast($scope.krcpad, response);
|
|
275
321
|
_audio.onerror = e => {
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
var md5 = function () {
|
|
2
|
+
var ERROR = "input is invalid type"
|
|
3
|
+
var HEX_CHARS = "0123456789abcdef".split("");
|
|
4
|
+
var EXTRA = [128, 32768, 8388608, -2147483648],
|
|
5
|
+
SHIFT = [0, 8, 16, 24],
|
|
6
|
+
OUTPUT_TYPES = ["hex", "array", "digest", "buffer", "arrayBuffer", "base64"],
|
|
7
|
+
BASE64_ENCODE_CHAR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),
|
|
8
|
+
blocks = [], buffer8;
|
|
9
|
+
var createOutputMethod = function (e) {
|
|
10
|
+
return function (t) {
|
|
11
|
+
return new Md5(!0).update(t)[e]()
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function Md5(e) {
|
|
15
|
+
if (e)
|
|
16
|
+
blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0,
|
|
17
|
+
this.blocks = blocks,
|
|
18
|
+
this.buffer8 = buffer8;
|
|
19
|
+
else
|
|
20
|
+
this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
21
|
+
this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0,
|
|
22
|
+
this.finalized = this.hashed = !1,
|
|
23
|
+
this.first = !0
|
|
24
|
+
}
|
|
25
|
+
Md5.prototype.update = function (e) {
|
|
26
|
+
if (!this.finalized) {
|
|
27
|
+
var t, n = typeof e;
|
|
28
|
+
if ("string" != n) {
|
|
29
|
+
if ("object" != n)
|
|
30
|
+
throw ERROR;
|
|
31
|
+
if (null === e)
|
|
32
|
+
throw ERROR;
|
|
33
|
+
else if (!Array.isArray(e))
|
|
34
|
+
throw ERROR;
|
|
35
|
+
t = !0
|
|
36
|
+
}
|
|
37
|
+
for (var r, i, s = 0, o = e.length, a = this.blocks, l = this.buffer8; s < o;) {
|
|
38
|
+
if (this.hashed && (this.hashed = !1,
|
|
39
|
+
a[0] = a[16],
|
|
40
|
+
a[16] = a[1] = a[2] = a[3] = a[4] = a[5] = a[6] = a[7] = a[8] = a[9] = a[10] = a[11] = a[12] = a[13] = a[14] = a[15] = 0),
|
|
41
|
+
t)
|
|
42
|
+
for (i = this.start; s < o && i < 64; ++s)
|
|
43
|
+
a[i >> 2] |= e[s] << SHIFT[3 & i++];
|
|
44
|
+
else
|
|
45
|
+
for (i = this.start; s < o && i < 64; ++s)
|
|
46
|
+
(r = e.charCodeAt(s)) < 128 ? a[i >> 2] |= r << SHIFT[3 & i++] : (r < 2048 ? a[i >> 2] |= (192 | r >> 6) << SHIFT[3 & i++] : (r < 55296 || 57344 <= r ? a[i >> 2] |= (224 | r >> 12) << SHIFT[3 & i++] : (r = 65536 + ((1023 & r) << 10 | 1023 & e.charCodeAt(++s)),
|
|
47
|
+
a[i >> 2] |= (240 | r >> 18) << SHIFT[3 & i++],
|
|
48
|
+
a[i >> 2] |= (128 | r >> 12 & 63) << SHIFT[3 & i++]),
|
|
49
|
+
a[i >> 2] |= (128 | r >> 6 & 63) << SHIFT[3 & i++]),
|
|
50
|
+
a[i >> 2] |= (128 | 63 & r) << SHIFT[3 & i++]);
|
|
51
|
+
this.lastByteIndex = i,
|
|
52
|
+
this.bytes += i - this.start,
|
|
53
|
+
64 <= i ? (this.start = i - 64,
|
|
54
|
+
this.hash(),
|
|
55
|
+
this.hashed = !0) : this.start = i
|
|
56
|
+
}
|
|
57
|
+
return 4294967295 < this.bytes && (this.hBytes += this.bytes / 4294967296 << 0,
|
|
58
|
+
this.bytes = this.bytes % 4294967296),
|
|
59
|
+
this
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
Md5.prototype.finalize = function () {
|
|
64
|
+
if (!this.finalized) {
|
|
65
|
+
this.finalized = !0;
|
|
66
|
+
var e = this.blocks
|
|
67
|
+
, t = this.lastByteIndex;
|
|
68
|
+
e[t >> 2] |= EXTRA[3 & t],
|
|
69
|
+
56 <= t && (this.hashed || this.hash(),
|
|
70
|
+
e[0] = e[16],
|
|
71
|
+
e[16] = e[1] = e[2] = e[3] = e[4] = e[5] = e[6] = e[7] = e[8] = e[9] = e[10] = e[11] = e[12] = e[13] = e[14] = e[15] = 0),
|
|
72
|
+
e[14] = this.bytes << 3,
|
|
73
|
+
e[15] = this.hBytes << 3 | this.bytes >>> 29,
|
|
74
|
+
this.hash()
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
Md5.prototype.hash = function () {
|
|
79
|
+
var e, t, n, r, i, s, o = this.blocks;
|
|
80
|
+
t = this.first ? ((t = ((e = ((e = o[0] - 680876937) << 7 | e >>> 25) - 271733879 << 0) ^ (n = ((n = (-271733879 ^ (r = ((r = (-1732584194 ^ 2004318071 & e) + o[1] - 117830708) << 12 | r >>> 20) + e << 0) & (-271733879 ^ e)) + o[2] - 1126478375) << 17 | n >>> 15) + r << 0) & (r ^ e)) + o[3] - 1316259209) << 22 | t >>> 10) + n << 0 : (e = this.h0,
|
|
81
|
+
t = this.h1,
|
|
82
|
+
n = this.h2,
|
|
83
|
+
((t += ((e = ((e += ((r = this.h3) ^ t & (n ^ r)) + o[0] - 680876936) << 7 | e >>> 25) + t << 0) ^ (n = ((n += (t ^ (r = ((r += (n ^ e & (t ^ n)) + o[1] - 389564586) << 12 | r >>> 20) + e << 0) & (e ^ t)) + o[2] + 606105819) << 17 | n >>> 15) + r << 0) & (r ^ e)) + o[3] - 1044525330) << 22 | t >>> 10) + n << 0),
|
|
84
|
+
t = ((t += ((e = ((e += (r ^ t & (n ^ r)) + o[4] - 176418897) << 7 | e >>> 25) + t << 0) ^ (n = ((n += (t ^ (r = ((r += (n ^ e & (t ^ n)) + o[5] + 1200080426) << 12 | r >>> 20) + e << 0) & (e ^ t)) + o[6] - 1473231341) << 17 | n >>> 15) + r << 0) & (r ^ e)) + o[7] - 45705983) << 22 | t >>> 10) + n << 0,
|
|
85
|
+
t = ((t += ((e = ((e += (r ^ t & (n ^ r)) + o[8] + 1770035416) << 7 | e >>> 25) + t << 0) ^ (n = ((n += (t ^ (r = ((r += (n ^ e & (t ^ n)) + o[9] - 1958414417) << 12 | r >>> 20) + e << 0) & (e ^ t)) + o[10] - 42063) << 17 | n >>> 15) + r << 0) & (r ^ e)) + o[11] - 1990404162) << 22 | t >>> 10) + n << 0,
|
|
86
|
+
t = ((t += ((e = ((e += (r ^ t & (n ^ r)) + o[12] + 1804603682) << 7 | e >>> 25) + t << 0) ^ (n = ((n += (t ^ (r = ((r += (n ^ e & (t ^ n)) + o[13] - 40341101) << 12 | r >>> 20) + e << 0) & (e ^ t)) + o[14] - 1502002290) << 17 | n >>> 15) + r << 0) & (r ^ e)) + o[15] + 1236535329) << 22 | t >>> 10) + n << 0,
|
|
87
|
+
t = ((t += ((r = ((r += (t ^ n & ((e = ((e += (n ^ r & (t ^ n)) + o[1] - 165796510) << 5 | e >>> 27) + t << 0) ^ t)) + o[6] - 1069501632) << 9 | r >>> 23) + e << 0) ^ e & ((n = ((n += (e ^ t & (r ^ e)) + o[11] + 643717713) << 14 | n >>> 18) + r << 0) ^ r)) + o[0] - 373897302) << 20 | t >>> 12) + n << 0,
|
|
88
|
+
t = ((t += ((r = ((r += (t ^ n & ((e = ((e += (n ^ r & (t ^ n)) + o[5] - 701558691) << 5 | e >>> 27) + t << 0) ^ t)) + o[10] + 38016083) << 9 | r >>> 23) + e << 0) ^ e & ((n = ((n += (e ^ t & (r ^ e)) + o[15] - 660478335) << 14 | n >>> 18) + r << 0) ^ r)) + o[4] - 405537848) << 20 | t >>> 12) + n << 0,
|
|
89
|
+
t = ((t += ((r = ((r += (t ^ n & ((e = ((e += (n ^ r & (t ^ n)) + o[9] + 568446438) << 5 | e >>> 27) + t << 0) ^ t)) + o[14] - 1019803690) << 9 | r >>> 23) + e << 0) ^ e & ((n = ((n += (e ^ t & (r ^ e)) + o[3] - 187363961) << 14 | n >>> 18) + r << 0) ^ r)) + o[8] + 1163531501) << 20 | t >>> 12) + n << 0,
|
|
90
|
+
t = ((t += ((r = ((r += (t ^ n & ((e = ((e += (n ^ r & (t ^ n)) + o[13] - 1444681467) << 5 | e >>> 27) + t << 0) ^ t)) + o[2] - 51403784) << 9 | r >>> 23) + e << 0) ^ e & ((n = ((n += (e ^ t & (r ^ e)) + o[7] + 1735328473) << 14 | n >>> 18) + r << 0) ^ r)) + o[12] - 1926607734) << 20 | t >>> 12) + n << 0,
|
|
91
|
+
t = ((t += ((s = (r = ((r += ((i = t ^ n) ^ (e = ((e += (i ^ r) + o[5] - 378558) << 4 | e >>> 28) + t << 0)) + o[8] - 2022574463) << 11 | r >>> 21) + e << 0) ^ e) ^ (n = ((n += (s ^ t) + o[11] + 1839030562) << 16 | n >>> 16) + r << 0)) + o[14] - 35309556) << 23 | t >>> 9) + n << 0,
|
|
92
|
+
t = ((t += ((s = (r = ((r += ((i = t ^ n) ^ (e = ((e += (i ^ r) + o[1] - 1530992060) << 4 | e >>> 28) + t << 0)) + o[4] + 1272893353) << 11 | r >>> 21) + e << 0) ^ e) ^ (n = ((n += (s ^ t) + o[7] - 155497632) << 16 | n >>> 16) + r << 0)) + o[10] - 1094730640) << 23 | t >>> 9) + n << 0,
|
|
93
|
+
t = ((t += ((s = (r = ((r += ((i = t ^ n) ^ (e = ((e += (i ^ r) + o[13] + 681279174) << 4 | e >>> 28) + t << 0)) + o[0] - 358537222) << 11 | r >>> 21) + e << 0) ^ e) ^ (n = ((n += (s ^ t) + o[3] - 722521979) << 16 | n >>> 16) + r << 0)) + o[6] + 76029189) << 23 | t >>> 9) + n << 0,
|
|
94
|
+
t = ((t += ((s = (r = ((r += ((i = t ^ n) ^ (e = ((e += (i ^ r) + o[9] - 640364487) << 4 | e >>> 28) + t << 0)) + o[12] - 421815835) << 11 | r >>> 21) + e << 0) ^ e) ^ (n = ((n += (s ^ t) + o[15] + 530742520) << 16 | n >>> 16) + r << 0)) + o[2] - 995338651) << 23 | t >>> 9) + n << 0,
|
|
95
|
+
t = ((t += ((r = ((r += (t ^ ((e = ((e += (n ^ (t | ~r)) + o[0] - 198630844) << 6 | e >>> 26) + t << 0) | ~n)) + o[7] + 1126891415) << 10 | r >>> 22) + e << 0) ^ ((n = ((n += (e ^ (r | ~t)) + o[14] - 1416354905) << 15 | n >>> 17) + r << 0) | ~e)) + o[5] - 57434055) << 21 | t >>> 11) + n << 0,
|
|
96
|
+
t = ((t += ((r = ((r += (t ^ ((e = ((e += (n ^ (t | ~r)) + o[12] + 1700485571) << 6 | e >>> 26) + t << 0) | ~n)) + o[3] - 1894986606) << 10 | r >>> 22) + e << 0) ^ ((n = ((n += (e ^ (r | ~t)) + o[10] - 1051523) << 15 | n >>> 17) + r << 0) | ~e)) + o[1] - 2054922799) << 21 | t >>> 11) + n << 0,
|
|
97
|
+
t = ((t += ((r = ((r += (t ^ ((e = ((e += (n ^ (t | ~r)) + o[8] + 1873313359) << 6 | e >>> 26) + t << 0) | ~n)) + o[15] - 30611744) << 10 | r >>> 22) + e << 0) ^ ((n = ((n += (e ^ (r | ~t)) + o[6] - 1560198380) << 15 | n >>> 17) + r << 0) | ~e)) + o[13] + 1309151649) << 21 | t >>> 11) + n << 0,
|
|
98
|
+
t = ((t += ((r = ((r += (t ^ ((e = ((e += (n ^ (t | ~r)) + o[4] - 145523070) << 6 | e >>> 26) + t << 0) | ~n)) + o[11] - 1120210379) << 10 | r >>> 22) + e << 0) ^ ((n = ((n += (e ^ (r | ~t)) + o[2] + 718787259) << 15 | n >>> 17) + r << 0) | ~e)) + o[9] - 343485551) << 21 | t >>> 11) + n << 0,
|
|
99
|
+
this.first ? (this.h0 = e + 1732584193 << 0,
|
|
100
|
+
this.h1 = t - 271733879 << 0,
|
|
101
|
+
this.h2 = n - 1732584194 << 0,
|
|
102
|
+
this.h3 = r + 271733878 << 0,
|
|
103
|
+
this.first = !1) : (this.h0 = this.h0 + e << 0,
|
|
104
|
+
this.h1 = this.h1 + t << 0,
|
|
105
|
+
this.h2 = this.h2 + n << 0,
|
|
106
|
+
this.h3 = this.h3 + r << 0)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
Md5.prototype.hex = function () {
|
|
110
|
+
this.finalize();
|
|
111
|
+
var e = this.h0
|
|
112
|
+
, t = this.h1
|
|
113
|
+
, n = this.h2
|
|
114
|
+
, r = this.h3;
|
|
115
|
+
return HEX_CHARS[e >> 4 & 15] + HEX_CHARS[15 & e] + HEX_CHARS[e >> 12 & 15] + HEX_CHARS[e >> 8 & 15] + HEX_CHARS[e >> 20 & 15] + HEX_CHARS[e >> 16 & 15] + HEX_CHARS[e >> 28 & 15] + HEX_CHARS[e >> 24 & 15] + HEX_CHARS[t >> 4 & 15] + HEX_CHARS[15 & t] + HEX_CHARS[t >> 12 & 15] + HEX_CHARS[t >> 8 & 15] + HEX_CHARS[t >> 20 & 15] + HEX_CHARS[t >> 16 & 15] + HEX_CHARS[t >> 28 & 15] + HEX_CHARS[t >> 24 & 15] + HEX_CHARS[n >> 4 & 15] + HEX_CHARS[15 & n] + HEX_CHARS[n >> 12 & 15] + HEX_CHARS[n >> 8 & 15] + HEX_CHARS[n >> 20 & 15] + HEX_CHARS[n >> 16 & 15] + HEX_CHARS[n >> 28 & 15] + HEX_CHARS[n >> 24 & 15] + HEX_CHARS[r >> 4 & 15] + HEX_CHARS[15 & r] + HEX_CHARS[r >> 12 & 15] + HEX_CHARS[r >> 8 & 15] + HEX_CHARS[r >> 20 & 15] + HEX_CHARS[r >> 16 & 15] + HEX_CHARS[r >> 28 & 15] + HEX_CHARS[r >> 24 & 15]
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
Md5.prototype.toString = Md5.prototype.hex,
|
|
119
|
+
Md5.prototype.digest = function () {
|
|
120
|
+
this.finalize();
|
|
121
|
+
var e = this.h0
|
|
122
|
+
, t = this.h1
|
|
123
|
+
, n = this.h2
|
|
124
|
+
, r = this.h3;
|
|
125
|
+
return [255 & e, e >> 8 & 255, e >> 16 & 255, e >> 24 & 255, 255 & t, t >> 8 & 255, t >> 16 & 255, t >> 24 & 255, 255 & n, n >> 8 & 255, n >> 16 & 255, n >> 24 & 255, 255 & r, r >> 8 & 255, r >> 16 & 255, r >> 24 & 255]
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
Md5.prototype.array = Md5.prototype.digest
|
|
129
|
+
Md5.prototype.arrayBuffer = function () {
|
|
130
|
+
this.finalize();
|
|
131
|
+
var e = new ArrayBuffer(16)
|
|
132
|
+
, t = new Uint32Array(e);
|
|
133
|
+
return t[0] = this.h0,
|
|
134
|
+
t[1] = this.h1,
|
|
135
|
+
t[2] = this.h2,
|
|
136
|
+
t[3] = this.h3,
|
|
137
|
+
e
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
Md5.prototype.buffer = Md5.prototype.arrayBuffer
|
|
141
|
+
Md5.prototype.base64 = function () {
|
|
142
|
+
for (var e, t, n, r = "", i = this.array(), s = 0; s < 15;)
|
|
143
|
+
e = i[s++],
|
|
144
|
+
t = i[s++],
|
|
145
|
+
n = i[s++],
|
|
146
|
+
r += BASE64_ENCODE_CHAR[e >>> 2] + BASE64_ENCODE_CHAR[63 & (e << 4 | t >>> 4)] + BASE64_ENCODE_CHAR[63 & (t << 2 | n >>> 6)] + BASE64_ENCODE_CHAR[63 & n];
|
|
147
|
+
return e = i[s],
|
|
148
|
+
r + (BASE64_ENCODE_CHAR[e >>> 2] + BASE64_ENCODE_CHAR[e << 4 & 63] + "==")
|
|
149
|
+
};
|
|
150
|
+
return createOutputMethod("hex");
|
|
151
|
+
}();
|
|
152
|
+
var secret = "0b50b02fd0d73a9c4c8c3a781c30845f";
|
|
153
|
+
function createSign(e) {
|
|
154
|
+
if ("[object Object]" !== Object.prototype.toString.call(e))
|
|
155
|
+
throw new Error("The parameter of query must be a Object.");
|
|
156
|
+
var t = Math.floor(Date.now() / 1e3);
|
|
157
|
+
extend(e, {
|
|
158
|
+
timestamp: t,
|
|
159
|
+
appid: 16073360
|
|
160
|
+
});
|
|
161
|
+
var n = Object.keys(e);
|
|
162
|
+
n.sort();
|
|
163
|
+
for (var r = "", i = 0; i < n.length; i++) {
|
|
164
|
+
var s = n[i];
|
|
165
|
+
r += (0 == i ? "" : "&") + s + "=" + e[s]
|
|
166
|
+
}
|
|
167
|
+
return extend(e, {
|
|
168
|
+
sign: md5(r += secret),
|
|
169
|
+
timestamp: t,
|
|
170
|
+
})
|
|
171
|
+
}
|
|
172
|
+
return createSign;
|
package/coms/kugou/song.html
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
<bg></bg>
|
|
2
2
|
<png class="logo" ng-if="song.imgurl" ng-src=song.imgurl></png>
|
|
3
|
-
<div class="singer" ng-if="song.singer" ng-
|
|
4
|
-
<div class="song"
|
|
3
|
+
<div class="singer" ng-if="song.singer" ng-html=song.singerMarked></div>
|
|
4
|
+
<div class="song" style:="{whiteSpace:song.items?'normal':'nowrap'}">
|
|
5
|
+
<span ng-html=song.songMarked></span>
|
|
6
|
+
<span class="types" -if="song.items" refresh>
|
|
7
|
+
<i type_="s.type" ng-class="{actived:musicList.isActived(s)}" priced_="!!s.priced" @click="event.stopPropagation(),play(s)" -repeat="s in song.items"></i>
|
|
8
|
+
</span>
|
|
9
|
+
</div>
|
|
5
10
|
<div class="filterTime(song.timeLength)"></div>
|
|
6
|
-
<div refresh class="play-state"
|
|
11
|
+
<div refresh class="play-state" -if="isActived()" ng-class={error:playState.error}>
|
|
7
12
|
<div ng-style="{width:playState.width}"></div>
|
|
8
13
|
</div>
|
package/coms/kugou/song.js
CHANGED
|
@@ -1,32 +1,54 @@
|
|
|
1
|
+
function dplay() {
|
|
2
|
+
this.firstChild.$scope.play();
|
|
3
|
+
}
|
|
1
4
|
function main(elem) {
|
|
2
5
|
elem = elem || document.createElement("song");
|
|
3
|
-
elem.renderid = 9;
|
|
4
6
|
var $scope = {
|
|
5
7
|
filterTime,
|
|
6
8
|
png: img,
|
|
7
9
|
bg,
|
|
10
|
+
play(s) {
|
|
11
|
+
if (!s) s = this.song.items ? this.song.items[0] : this.song;
|
|
12
|
+
dispatch(elem, 'play', s);
|
|
13
|
+
},
|
|
14
|
+
isActived() {
|
|
15
|
+
if (this.song.items) {
|
|
16
|
+
for (var s of this.song.items) {
|
|
17
|
+
if (this.musicList.isActived(s)) return true;
|
|
18
|
+
}
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
return this.musicList.isActived(this.song);
|
|
22
|
+
},
|
|
8
23
|
playState: kugou$playState,
|
|
9
24
|
song: {},
|
|
10
25
|
musicList: kugou$musicList,
|
|
11
26
|
};
|
|
12
27
|
care(elem, function (item) {
|
|
13
28
|
if (!elem.innerHTML) elem.innerHTML = song;
|
|
14
|
-
var songName = String(item.
|
|
15
|
-
var singerName = String(item.
|
|
29
|
+
var songName = String(item.songname || item.song || item.songName || item.songname_original || item.name || '');
|
|
30
|
+
var singerName = String(item.singername || item.singer || item.singerName || '');
|
|
16
31
|
if (~songName.indexOf(singerName)) {
|
|
17
32
|
if (/\s*\-\s*/.test(songName)) {
|
|
18
33
|
singerName = songName.replace(/^([\s\S]*?)\s*\-\s*[\s\S]*$/, '$1');
|
|
19
34
|
songName = songName.replace(/^[\s\S]*?\s*\-\s*/, '');
|
|
20
35
|
}
|
|
21
36
|
}
|
|
22
|
-
$scope.song = {
|
|
23
|
-
|
|
24
|
-
imgurl: item.imgurl,
|
|
37
|
+
$scope.song = extendIfNeeded(Object.create(item), {
|
|
38
|
+
imgurl: item.imgurl || item.avatar,
|
|
25
39
|
singer: singerName,
|
|
40
|
+
items: item instanceof Array ? item : null,
|
|
26
41
|
songMarked: mark(songName, elem.mark),
|
|
27
42
|
singerMarked: mark(singerName, elem.mark)
|
|
28
|
-
};
|
|
43
|
+
});
|
|
44
|
+
if ($scope.song.items) {
|
|
45
|
+
attr(elem, 'group', true);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
attr(elem, 'group', null);
|
|
49
|
+
}
|
|
29
50
|
render(elem.children, $scope, 0);
|
|
30
51
|
});
|
|
52
|
+
onclick(elem, dplay);
|
|
31
53
|
return block(elem);
|
|
32
54
|
}
|
package/coms/kugou/song.less
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
& {
|
|
2
|
-
height:
|
|
2
|
+
height: auto;
|
|
3
3
|
line-height: 40px;
|
|
4
|
-
padding: 10px;
|
|
4
|
+
padding: 10px 10px 0 10px;
|
|
5
5
|
font-size: 16px;
|
|
6
6
|
white-space: nowrap;
|
|
7
7
|
overflow: hidden;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
>.logo {
|
|
24
24
|
height: 40px;
|
|
25
25
|
width: 40px;
|
|
26
|
-
margin: -
|
|
26
|
+
margin: -4px -2px;
|
|
27
27
|
|
|
28
28
|
&+.singer+.song,
|
|
29
29
|
&+.song {
|
|
@@ -39,16 +39,19 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
|
|
43
|
+
&.imgonly {
|
|
43
44
|
padding: 0;
|
|
44
45
|
line-height: 0;
|
|
45
46
|
font-size: 0;
|
|
46
47
|
padding-bottom: 76%;
|
|
47
48
|
height: auto;
|
|
48
|
-
|
|
49
|
+
|
|
50
|
+
>:not(png) {
|
|
49
51
|
display: none;
|
|
50
52
|
}
|
|
51
|
-
|
|
53
|
+
|
|
54
|
+
>.logo {
|
|
52
55
|
position: absolute;
|
|
53
56
|
height: 100%;
|
|
54
57
|
width: 100%;
|
|
@@ -56,11 +59,68 @@
|
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
|
|
62
|
+
.types {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
padding: 0 6px;
|
|
65
|
+
margin: 0 -6px;
|
|
66
|
+
|
|
67
|
+
>i {
|
|
68
|
+
display: inline-block;
|
|
69
|
+
width: 1em;
|
|
70
|
+
height: 1em;
|
|
71
|
+
background-size: contain;
|
|
72
|
+
background-repeat: no-repeat;
|
|
73
|
+
background-position: center;
|
|
74
|
+
margin-right: 6px;
|
|
75
|
+
z-index: 1;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
vertical-align: middle;
|
|
78
|
+
position: relative;
|
|
79
|
+
font-style: normal;
|
|
80
|
+
|
|
81
|
+
&[priced] {
|
|
82
|
+
filter: grayscale(.9);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.actived {
|
|
86
|
+
outline-offset: 2px;
|
|
87
|
+
outline: 1px solid;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[type=kugo] {
|
|
93
|
+
background-image: url("icons/kugo.ico");
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[type=kuwo] {
|
|
97
|
+
background-image: url("icons/kuwo.png");
|
|
98
|
+
}
|
|
99
|
+
[type=yyyy] {
|
|
100
|
+
background-image: url("icons/yyyy.ico");
|
|
101
|
+
}
|
|
102
|
+
[type=qqjt] {
|
|
103
|
+
background-image: url("icons/qqjt.ico");
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&[group]>.song {
|
|
108
|
+
white-space: normal;
|
|
109
|
+
}
|
|
110
|
+
|
|
59
111
|
>.song {
|
|
60
|
-
line-height:
|
|
112
|
+
line-height: 28px;
|
|
113
|
+
padding-top: 2px;
|
|
114
|
+
padding-bottom: 12px;
|
|
61
115
|
width: 100%;
|
|
62
|
-
|
|
63
|
-
|
|
116
|
+
|
|
117
|
+
>span {
|
|
118
|
+
margin-right: 6px;
|
|
119
|
+
vertical-align: top;
|
|
120
|
+
display: inline-block;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
}
|
|
64
124
|
}
|
|
65
125
|
|
|
66
126
|
b {
|
|
@@ -72,8 +132,8 @@ b {
|
|
|
72
132
|
|
|
73
133
|
>.singer {
|
|
74
134
|
position: absolute;
|
|
75
|
-
left:
|
|
76
|
-
top:
|
|
135
|
+
left: 8px;
|
|
136
|
+
top: 6px;
|
|
77
137
|
// right: 10px;
|
|
78
138
|
text-align: center;
|
|
79
139
|
line-height: 12px;
|
|
@@ -81,18 +141,20 @@ b {
|
|
|
81
141
|
color: #fff9;
|
|
82
142
|
|
|
83
143
|
&+.song {
|
|
84
|
-
padding-top:
|
|
144
|
+
padding-top: 12px;
|
|
145
|
+
padding-bottom: 6px;
|
|
85
146
|
}
|
|
86
147
|
}
|
|
87
|
-
|
|
148
|
+
|
|
149
|
+
png {
|
|
88
150
|
filter: brightness(.7) contrast(.9);
|
|
89
151
|
}
|
|
90
152
|
|
|
91
153
|
>.play-state {
|
|
92
154
|
position: absolute;
|
|
93
|
-
bottom:
|
|
94
|
-
right:
|
|
95
|
-
left:
|
|
155
|
+
bottom: 0;
|
|
156
|
+
right: 2px;
|
|
157
|
+
left: 2px;
|
|
96
158
|
display: block;
|
|
97
159
|
background: #2c7bb522;
|
|
98
160
|
height: 2px;
|