@tidal-music/player-web-components 0.1.2 → 0.2.0
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/dist/{basePlayer-BcooVl9P-WesO1_17.js → basePlayer-C5QIyqfj-Dxhlf4BZ.js} +100 -161
- package/dist/{browserPlayer-B1V50MdI-D65N_aRN.js → browserPlayer-HE2uqs17-DJrIq6Jp.js} +61 -65
- package/dist/{index-DbGwqQeZ.js → index-vp_MoGvy.js} +1138 -1053
- package/dist/index.d.ts +3 -0
- package/dist/index.js +9 -8
- package/dist/{nativePlayer-DdpXKE9r-B14o92dS.js → nativePlayer-B3eHKegV-DdXsvi0F.js} +65 -104
- package/dist/output-devices-Jno8Kp5B-CAnEAv_Z.js +224 -0
- package/dist/shakaPlayer-CCJQsypf-DHT2kwDp.js +24411 -0
- package/package.json +14 -13
- package/dist/output-devices-BhcWYG6e-l4DCXneM.js +0 -236
- package/dist/shakaPlayer-Brgd4rob-DJ5uJTjr.js +0 -26243
- package/dist/worker-DrRlSx4a-BTanKBsS.js +0 -89
|
@@ -1,38 +1,31 @@
|
|
|
1
|
-
let
|
|
1
|
+
let A = Object.freeze({
|
|
2
2
|
apiUrl: "https://api.tidal.com/v1",
|
|
3
|
-
appVersion: "TIDAL Player",
|
|
4
|
-
clientPlatform: "web",
|
|
5
3
|
desiredVolumeLevel: 1,
|
|
6
|
-
eventUrl: "https://et.tidal.com/api/events",
|
|
7
4
|
gatherEvents: !0,
|
|
8
5
|
loudnessNormalizationMode: "ALBUM",
|
|
9
6
|
outputDevicesEnabled: !1,
|
|
10
7
|
streamingWifiAudioQuality: "LOW"
|
|
11
8
|
});
|
|
12
|
-
function
|
|
13
|
-
return
|
|
14
|
-
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
17
|
-
...
|
|
18
|
-
...
|
|
19
|
-
}), Object.keys(
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
}),
|
|
23
|
-
}
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
31
|
-
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
32
|
-
}, A = (t, e, r, s) => (Z(t, e, "write to private field"), e.set(t, r), r), P, _, N, D;
|
|
33
|
-
class be {
|
|
9
|
+
function _(r) {
|
|
10
|
+
return A[r];
|
|
11
|
+
}
|
|
12
|
+
function B(r) {
|
|
13
|
+
return A = Object.freeze({
|
|
14
|
+
...A,
|
|
15
|
+
...r
|
|
16
|
+
}), Object.keys(r).forEach((e) => {
|
|
17
|
+
const t = e;
|
|
18
|
+
oe.dispatchEvent(new CustomEvent(t, { detail: r[t] }));
|
|
19
|
+
}), A;
|
|
20
|
+
}
|
|
21
|
+
const oe = new EventTarget();
|
|
22
|
+
class ce {
|
|
23
|
+
#e;
|
|
24
|
+
#r = !1;
|
|
25
|
+
#s;
|
|
26
|
+
#t;
|
|
34
27
|
constructor(e) {
|
|
35
|
-
|
|
28
|
+
this.#t = new URL(e), this.synchronize();
|
|
36
29
|
}
|
|
37
30
|
/**
|
|
38
31
|
* Returns the current time adjusted to server-time.
|
|
@@ -42,7 +35,7 @@ class be {
|
|
|
42
35
|
*/
|
|
43
36
|
// eslint-disable-next-line no-restricted-syntax
|
|
44
37
|
now(e = Date.now()) {
|
|
45
|
-
return !
|
|
38
|
+
return !this.#s || !this.#e ? (console.warn("TrueTime is not yet synchronized"), e) : this.#s + (e - this.#e);
|
|
46
39
|
}
|
|
47
40
|
/**
|
|
48
41
|
* Synchronizes the client's time with the server's time.
|
|
@@ -51,16 +44,16 @@ class be {
|
|
|
51
44
|
* @returns {Promise<void>} A promise that resolves when the synchronization is complete.
|
|
52
45
|
*/
|
|
53
46
|
async synchronize() {
|
|
54
|
-
if (!(
|
|
55
|
-
Math.abs(Date.now() -
|
|
56
|
-
|
|
47
|
+
if (!(this.#e && // eslint-disable-next-line no-restricted-syntax
|
|
48
|
+
Math.abs(Date.now() - this.#e) < 36e5 || this.#r)) {
|
|
49
|
+
this.#r = !0;
|
|
57
50
|
try {
|
|
58
|
-
const e = await fetch(
|
|
59
|
-
e.ok && e.headers.has("date") && (
|
|
51
|
+
const e = await fetch(this.#t);
|
|
52
|
+
e.ok && e.headers.has("date") && (this.#s = new Date(e.headers.get("date")).getTime(), this.#e = Date.now());
|
|
60
53
|
} catch (e) {
|
|
61
54
|
console.error(e);
|
|
62
55
|
}
|
|
63
|
-
|
|
56
|
+
this.#r = !1;
|
|
64
57
|
}
|
|
65
58
|
}
|
|
66
59
|
/**
|
|
@@ -72,109 +65,116 @@ class be {
|
|
|
72
65
|
* @returns The timestamp of the performance mark, or undefined if not found.
|
|
73
66
|
* @throws ReferenceError if the performance mark is not found.
|
|
74
67
|
*/
|
|
75
|
-
timestamp(e,
|
|
68
|
+
timestamp(e, t) {
|
|
76
69
|
let s;
|
|
77
|
-
if (
|
|
78
|
-
if (s = performance.getEntriesByName(e).find((n) => "detail" in n && n.detail ===
|
|
70
|
+
if (t) {
|
|
71
|
+
if (s = performance.getEntriesByName(e).find((n) => "detail" in n && n.detail === t), !s)
|
|
79
72
|
throw new ReferenceError(
|
|
80
|
-
`There is no performance entry named "${e}" with detail "${
|
|
73
|
+
`There is no performance entry named "${e}" with detail "${t}"`
|
|
81
74
|
);
|
|
82
75
|
} else
|
|
83
76
|
s = performance.getEntriesByName(e).pop();
|
|
84
77
|
return s ? s.startTime : void 0;
|
|
85
78
|
}
|
|
86
79
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
for (const s of t) {
|
|
80
|
+
const y = new ce("https://api.tidal.com/v1/ping"), de = (r, e, t) => {
|
|
81
|
+
for (const s of r) {
|
|
90
82
|
const n = s.addedNodes[0];
|
|
91
|
-
s.type === "childList" && n.id === e &&
|
|
83
|
+
s.type === "childList" && n.id === e && t();
|
|
92
84
|
}
|
|
93
85
|
};
|
|
94
|
-
function
|
|
95
|
-
const
|
|
96
|
-
if (!
|
|
86
|
+
function le() {
|
|
87
|
+
const r = document.getElementById("tidal-player-root");
|
|
88
|
+
if (!r)
|
|
97
89
|
return Promise.reject("No player root");
|
|
98
|
-
if ("video-one" in
|
|
90
|
+
if ("video-one" in r.children)
|
|
99
91
|
return Promise.resolve();
|
|
100
92
|
const e = [];
|
|
101
|
-
return "video-one" in
|
|
102
|
-
new Promise((
|
|
103
|
-
new MutationObserver(
|
|
104
|
-
(s) => Q(s, "video-one", r)
|
|
105
|
-
).observe(t, { childList: !0 });
|
|
106
|
-
})
|
|
107
|
-
), "video-two" in t.children || e.push(
|
|
108
|
-
new Promise((r) => {
|
|
93
|
+
return "video-one" in r.children || e.push(
|
|
94
|
+
new Promise((t) => {
|
|
109
95
|
new MutationObserver(
|
|
110
|
-
(s) =>
|
|
111
|
-
).observe(
|
|
96
|
+
(s) => de(s, "video-one", t)
|
|
97
|
+
).observe(r, { childList: !0 });
|
|
112
98
|
})
|
|
113
99
|
), Promise.all(e);
|
|
114
100
|
}
|
|
115
|
-
const
|
|
116
|
-
|
|
101
|
+
const E = document.createElement("video"), ue = (r) => {
|
|
102
|
+
r.setAttribute("crossorigin", "anonymous"), r.setAttribute("playsinline", "playsinline");
|
|
117
103
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
let t = document.getElementById(W);
|
|
125
|
-
if (!t) {
|
|
104
|
+
ue(E);
|
|
105
|
+
E.id = "video-one";
|
|
106
|
+
const O = "tidal-player-root";
|
|
107
|
+
function he() {
|
|
108
|
+
let r = document.getElementById(O);
|
|
109
|
+
if (!r) {
|
|
126
110
|
const e = document.createElement("template");
|
|
127
|
-
e.id =
|
|
111
|
+
e.id = O, document.body.appendChild(e), r = document.getElementById(O);
|
|
128
112
|
}
|
|
129
|
-
return
|
|
113
|
+
return me();
|
|
130
114
|
}
|
|
131
|
-
function
|
|
132
|
-
const
|
|
133
|
-
|
|
115
|
+
function me() {
|
|
116
|
+
const r = document.getElementById(
|
|
117
|
+
O
|
|
134
118
|
);
|
|
135
|
-
return
|
|
119
|
+
return r && (E.id in r.children || r.appendChild(E)), le();
|
|
136
120
|
}
|
|
137
|
-
function
|
|
121
|
+
function pe() {
|
|
138
122
|
return new Promise(
|
|
139
|
-
(
|
|
123
|
+
(r) => document.addEventListener(
|
|
140
124
|
"click",
|
|
141
125
|
() => {
|
|
142
|
-
|
|
126
|
+
E.readyState === HTMLMediaElement.HAVE_NOTHING && !E.src && E.load(), r();
|
|
143
127
|
},
|
|
144
128
|
{ once: !0 }
|
|
145
129
|
)
|
|
146
130
|
);
|
|
147
131
|
}
|
|
148
|
-
function
|
|
149
|
-
return new Promise((e) => setTimeout(() => e(),
|
|
132
|
+
function fe(r) {
|
|
133
|
+
return new Promise((e) => setTimeout(() => e(), r));
|
|
150
134
|
}
|
|
151
|
-
function
|
|
152
|
-
return new Promise((
|
|
153
|
-
|
|
135
|
+
function ge(r, e) {
|
|
136
|
+
return new Promise((t) => {
|
|
137
|
+
r.addEventListener(e, (s) => t(s), !1);
|
|
154
138
|
});
|
|
155
139
|
}
|
|
156
|
-
class
|
|
140
|
+
class ye extends EventTarget {
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
142
|
+
// @ts-ignore - Setter
|
|
143
|
+
#e;
|
|
144
|
+
hasEventSender() {
|
|
145
|
+
return !!this.#e;
|
|
146
|
+
}
|
|
147
|
+
set eventSender(e) {
|
|
148
|
+
this.#e = e;
|
|
149
|
+
}
|
|
150
|
+
get eventSender() {
|
|
151
|
+
return this.#e;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
class we extends EventTarget {
|
|
157
155
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
158
156
|
// @ts-ignore - Setter
|
|
159
157
|
#e;
|
|
160
158
|
async dispatchAuthorized() {
|
|
161
159
|
const e = await this.#e.getCredentials();
|
|
162
|
-
e?.token
|
|
160
|
+
e?.token ? this.dispatchEvent(
|
|
163
161
|
new CustomEvent("authorized", {
|
|
164
162
|
detail: {
|
|
165
163
|
credentials: e
|
|
166
164
|
}
|
|
167
165
|
})
|
|
166
|
+
) : this.dispatchEvent(
|
|
167
|
+
new CustomEvent("unauthenticated", { detail: { credentials: e } })
|
|
168
168
|
);
|
|
169
169
|
}
|
|
170
170
|
set credentialsProvider(e) {
|
|
171
|
-
this.#e = e, this.dispatchAuthorized().catch(console.error), this.#e.bus((
|
|
172
|
-
switch (
|
|
173
|
-
case "
|
|
171
|
+
this.#e = e, this.dispatchAuthorized().catch(console.error), this.#e.bus((t) => {
|
|
172
|
+
switch (t.detail.type) {
|
|
173
|
+
case "CredentialsUpdatedMessage":
|
|
174
174
|
this.dispatchAuthorized().catch(console.error);
|
|
175
175
|
break;
|
|
176
176
|
default:
|
|
177
|
-
console.warn("Unhandled event from credentials provider: ",
|
|
177
|
+
console.warn("Unhandled event from credentials provider: ", t);
|
|
178
178
|
break;
|
|
179
179
|
}
|
|
180
180
|
});
|
|
@@ -183,12 +183,12 @@ class Te extends EventTarget {
|
|
|
183
183
|
return this.#e;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
class
|
|
186
|
+
class C extends Error {
|
|
187
187
|
errorCode = null;
|
|
188
188
|
errorId = null;
|
|
189
189
|
referenceId;
|
|
190
|
-
constructor(e,
|
|
191
|
-
super(`${e}: ${
|
|
190
|
+
constructor(e, t, s) {
|
|
191
|
+
super(`${e}: ${t} (${s})`), this.errorId = e, this.errorCode = t, this.referenceId = s;
|
|
192
192
|
}
|
|
193
193
|
toJSON() {
|
|
194
194
|
return {
|
|
@@ -201,40 +201,48 @@ class V extends Error {
|
|
|
201
201
|
return JSON.stringify(this.toJSON());
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
async function
|
|
204
|
+
async function P() {
|
|
205
205
|
if (v.credentialsProvider) {
|
|
206
|
-
const
|
|
207
|
-
return !!(
|
|
208
|
-
}
|
|
209
|
-
return await
|
|
210
|
-
}
|
|
211
|
-
const v = new
|
|
212
|
-
async function
|
|
213
|
-
const
|
|
214
|
-
const { Pushkin:
|
|
215
|
-
return
|
|
216
|
-
}
|
|
217
|
-
if (
|
|
218
|
-
|
|
206
|
+
const r = await v.credentialsProvider.getCredentials();
|
|
207
|
+
return !!(r.token && r.userId);
|
|
208
|
+
}
|
|
209
|
+
return await ge(v, "authorized"), P();
|
|
210
|
+
}
|
|
211
|
+
const v = new we(), D = new ye();
|
|
212
|
+
async function be() {
|
|
213
|
+
const r = await P(), e = async () => {
|
|
214
|
+
const { Pushkin: t } = await Promise.resolve().then(() => gt);
|
|
215
|
+
return t.refresh();
|
|
216
|
+
};
|
|
217
|
+
if (r) {
|
|
218
|
+
B({
|
|
219
219
|
gatherEvents: !0
|
|
220
220
|
});
|
|
221
221
|
try {
|
|
222
|
-
await Promise.all([e()
|
|
223
|
-
} catch (
|
|
224
|
-
console.error(
|
|
222
|
+
await Promise.all([e()]);
|
|
223
|
+
} catch (t) {
|
|
224
|
+
console.error(t);
|
|
225
225
|
}
|
|
226
226
|
} else
|
|
227
|
-
|
|
227
|
+
B({
|
|
228
228
|
gatherEvents: !1
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
|
+
function ve() {
|
|
232
|
+
B({
|
|
233
|
+
gatherEvents: !0
|
|
234
|
+
});
|
|
235
|
+
}
|
|
231
236
|
v.addEventListener("authorized", () => {
|
|
232
|
-
|
|
237
|
+
be().then().catch(console.error);
|
|
233
238
|
});
|
|
234
|
-
|
|
239
|
+
v.addEventListener("unauthenticated", () => {
|
|
240
|
+
ve();
|
|
241
|
+
});
|
|
242
|
+
async function V() {
|
|
235
243
|
return v.credentialsProvider ? (await v.credentialsProvider.getCredentials()).token ?? null : null;
|
|
236
244
|
}
|
|
237
|
-
class
|
|
245
|
+
class Se extends EventTarget {
|
|
238
246
|
dispatchError(e) {
|
|
239
247
|
this.dispatchEvent(
|
|
240
248
|
new CustomEvent("error", {
|
|
@@ -243,35 +251,36 @@ class Le extends EventTarget {
|
|
|
243
251
|
);
|
|
244
252
|
}
|
|
245
253
|
}
|
|
246
|
-
const
|
|
247
|
-
class
|
|
254
|
+
const m = new Se();
|
|
255
|
+
class Me {
|
|
248
256
|
#e = /* @__PURE__ */ new Map();
|
|
249
|
-
#
|
|
257
|
+
#r = /* @__PURE__ */ new Map();
|
|
250
258
|
#s = /* @__PURE__ */ new Map();
|
|
259
|
+
#t = /* @__PURE__ */ new Map();
|
|
251
260
|
/**
|
|
252
261
|
* Clones a session to re-use the media product and playback content for a new session.
|
|
253
262
|
*
|
|
254
263
|
* @param from - streamingSessionId to clone
|
|
255
264
|
* @param to - target streamingSessionId
|
|
256
265
|
*/
|
|
257
|
-
clone(e,
|
|
266
|
+
clone(e, t) {
|
|
258
267
|
const s = this.getMediaProductTransition(e), n = this.getStreamInfo(e), o = this.getPlaybackInfo(e);
|
|
259
268
|
if (!s || !n || !o)
|
|
260
269
|
throw new Error(
|
|
261
270
|
`Cannot clone ${e}. Missing mediaProductTransition or streamInfo.`
|
|
262
271
|
);
|
|
263
|
-
this.saveMediaProductTransition(
|
|
272
|
+
this.saveMediaProductTransition(t, {
|
|
264
273
|
...s,
|
|
265
274
|
playbackContext: {
|
|
266
275
|
...s.playbackContext,
|
|
267
|
-
playbackSessionId:
|
|
276
|
+
playbackSessionId: t
|
|
268
277
|
}
|
|
269
|
-
}), this.saveStreamInfo(
|
|
278
|
+
}), this.saveStreamInfo(t, {
|
|
270
279
|
...n,
|
|
271
|
-
streamingSessionId:
|
|
272
|
-
}), this.savePlaybackInfo(
|
|
280
|
+
streamingSessionId: t
|
|
281
|
+
}), this.savePlaybackInfo(t, {
|
|
273
282
|
...o,
|
|
274
|
-
streamingSessionId:
|
|
283
|
+
streamingSessionId: t
|
|
275
284
|
});
|
|
276
285
|
}
|
|
277
286
|
deleteMediaProductTransition(e) {
|
|
@@ -284,55 +293,64 @@ class Oe {
|
|
|
284
293
|
* @see {@link StreamingSessionStore.clone}
|
|
285
294
|
*/
|
|
286
295
|
deleteSession(e) {
|
|
287
|
-
this.deleteMediaProductTransition(e), this.#
|
|
296
|
+
this.deleteMediaProductTransition(e), this.#r.delete(e), this.#s.delete(e), this.deleteStreamInfo(e);
|
|
288
297
|
}
|
|
289
|
-
|
|
298
|
+
deleteStartedStreamInfo(e) {
|
|
290
299
|
this.#s.delete(e);
|
|
291
300
|
}
|
|
301
|
+
deleteStreamInfo(e) {
|
|
302
|
+
this.#t.delete(e);
|
|
303
|
+
}
|
|
292
304
|
getMediaProductTransition(e) {
|
|
293
305
|
return e ? this.#e.get(e) : void 0;
|
|
294
306
|
}
|
|
295
307
|
getPlaybackInfo(e) {
|
|
296
|
-
return e ? this.#
|
|
308
|
+
return e ? this.#r.get(e) : void 0;
|
|
297
309
|
}
|
|
298
310
|
getStreamInfo(e) {
|
|
299
|
-
return e ? this.#
|
|
311
|
+
return e ? this.#t.get(e) : void 0;
|
|
300
312
|
}
|
|
301
313
|
hasMediaProductTransition(e) {
|
|
302
314
|
return this.#e.has(e);
|
|
303
315
|
}
|
|
304
316
|
hasPlaybackInfo(e) {
|
|
305
|
-
return this.#
|
|
317
|
+
return this.#r.has(e);
|
|
306
318
|
}
|
|
307
|
-
|
|
319
|
+
hasStartedStreamInfo(e) {
|
|
308
320
|
return this.#s.has(e);
|
|
309
321
|
}
|
|
310
|
-
|
|
322
|
+
hasStreamInfo(e) {
|
|
323
|
+
return this.#t.has(e);
|
|
324
|
+
}
|
|
325
|
+
overwriteDuration(e, t) {
|
|
311
326
|
const s = this.#e.get(e);
|
|
312
327
|
s && (s.playbackContext = {
|
|
313
328
|
...s.playbackContext,
|
|
314
|
-
actualDuration:
|
|
329
|
+
actualDuration: t
|
|
315
330
|
}, this.saveMediaProductTransition(e, s));
|
|
316
331
|
}
|
|
317
|
-
saveMediaProductTransition(e,
|
|
332
|
+
saveMediaProductTransition(e, t) {
|
|
318
333
|
this.#e.set(
|
|
319
334
|
e,
|
|
320
|
-
|
|
335
|
+
t
|
|
321
336
|
);
|
|
322
337
|
}
|
|
323
|
-
savePlaybackInfo(e,
|
|
324
|
-
this.#
|
|
338
|
+
savePlaybackInfo(e, t) {
|
|
339
|
+
this.#r.set(e, t);
|
|
325
340
|
}
|
|
326
|
-
saveStreamInfo(e,
|
|
327
|
-
this.#
|
|
341
|
+
saveStreamInfo(e, t) {
|
|
342
|
+
this.#t.set(e, t);
|
|
343
|
+
}
|
|
344
|
+
setStartedStreamInfo(e) {
|
|
345
|
+
return this.#s.set(e, !0);
|
|
328
346
|
}
|
|
329
347
|
}
|
|
330
|
-
const
|
|
331
|
-
class
|
|
348
|
+
const H = new Me();
|
|
349
|
+
class Ee {
|
|
332
350
|
activePlayer;
|
|
333
351
|
preloadPlayer;
|
|
334
352
|
get preloadedMediaProduct() {
|
|
335
|
-
return
|
|
353
|
+
return H.getMediaProductTransition(
|
|
336
354
|
this.preloadedStreamingSessionId
|
|
337
355
|
)?.mediaProduct ?? void 0;
|
|
338
356
|
}
|
|
@@ -340,96 +358,96 @@ class Ae {
|
|
|
340
358
|
return this.preloadPlayer?.preloadedStreamingSessionId ?? void 0;
|
|
341
359
|
}
|
|
342
360
|
}
|
|
343
|
-
const p = new
|
|
344
|
-
let
|
|
345
|
-
const
|
|
361
|
+
const p = new Ee();
|
|
362
|
+
let ke;
|
|
363
|
+
const Pe = [
|
|
346
364
|
{
|
|
347
|
-
itemTypes: ["track", "video"],
|
|
365
|
+
itemTypes: ["track", "video", "demo"],
|
|
348
366
|
player: "shaka",
|
|
349
367
|
qualities: ["HIGH", "LOSSLESS", "LOW", "HI_RES_LOSSLESS"]
|
|
350
368
|
}
|
|
351
369
|
];
|
|
352
|
-
let
|
|
370
|
+
let x = Pe;
|
|
353
371
|
const w = {
|
|
354
372
|
browser: void 0,
|
|
355
373
|
native: void 0,
|
|
356
374
|
shaka: void 0
|
|
357
375
|
};
|
|
358
|
-
async function
|
|
376
|
+
async function Te() {
|
|
359
377
|
await Promise.all(
|
|
360
|
-
|
|
361
|
-
const e = w[
|
|
378
|
+
x.map((r) => {
|
|
379
|
+
const e = w[r.player];
|
|
362
380
|
return e ? e.reset() : Promise.resolve();
|
|
363
381
|
})
|
|
364
382
|
), p.activePlayer = void 0, p.preloadPlayer = void 0;
|
|
365
383
|
}
|
|
366
|
-
function
|
|
367
|
-
|
|
384
|
+
function Ie(r) {
|
|
385
|
+
r.name !== "nativePlayer" && w.native && w.native.abandon(), p.activePlayer = r;
|
|
368
386
|
}
|
|
369
|
-
function
|
|
370
|
-
|
|
387
|
+
function Le() {
|
|
388
|
+
m.removeEventListener("ended", ke);
|
|
371
389
|
}
|
|
372
|
-
async function
|
|
373
|
-
const { default:
|
|
374
|
-
return w.native || (w.native = new
|
|
390
|
+
async function Ae() {
|
|
391
|
+
const { default: r } = await import("./nativePlayer-B3eHKegV-DdXsvi0F.js");
|
|
392
|
+
return w.native || (w.native = new r()), w.native;
|
|
375
393
|
}
|
|
376
|
-
async function
|
|
377
|
-
const { default:
|
|
378
|
-
return w.browser || (w.browser = new
|
|
394
|
+
async function Oe() {
|
|
395
|
+
const { default: r } = await import("./browserPlayer-HE2uqs17-DJrIq6Jp.js");
|
|
396
|
+
return w.browser || (w.browser = new r()), w.browser;
|
|
379
397
|
}
|
|
380
|
-
async function
|
|
381
|
-
const { default:
|
|
382
|
-
return w.shaka || (w.shaka = new
|
|
398
|
+
async function Ce() {
|
|
399
|
+
const { default: r } = await import("./shakaPlayer-CCJQsypf-DHT2kwDp.js");
|
|
400
|
+
return w.shaka || (w.shaka = new r()), w.shaka;
|
|
383
401
|
}
|
|
384
|
-
async function
|
|
385
|
-
const
|
|
386
|
-
(n) =>
|
|
402
|
+
async function _e(r, e) {
|
|
403
|
+
const t = x.filter((n) => n.itemTypes.includes(r)).filter(
|
|
404
|
+
(n) => r === "track" && n.qualities && e ? n.qualities.includes(e) : !0
|
|
387
405
|
);
|
|
388
|
-
|
|
406
|
+
t.length === 0 && console.error(
|
|
389
407
|
`No player found to handle audio quality "${String(
|
|
390
408
|
e
|
|
391
|
-
)}" for product type "${
|
|
392
|
-
|
|
409
|
+
)}" for product type "${r}" in player config: `,
|
|
410
|
+
x
|
|
393
411
|
);
|
|
394
|
-
const { player: s } =
|
|
412
|
+
const { player: s } = t[0];
|
|
395
413
|
switch (s) {
|
|
396
|
-
case "shaka":
|
|
397
|
-
return De();
|
|
398
414
|
case "browser":
|
|
399
|
-
return
|
|
415
|
+
return Oe();
|
|
400
416
|
case "native":
|
|
401
|
-
return
|
|
417
|
+
return Ae();
|
|
418
|
+
case "shaka":
|
|
419
|
+
return Ce();
|
|
402
420
|
default:
|
|
403
421
|
throw new Error("No player found.");
|
|
404
422
|
}
|
|
405
423
|
}
|
|
406
|
-
function
|
|
424
|
+
function Fe() {
|
|
407
425
|
return p.activePlayer?.getPosition() ?? 0;
|
|
408
426
|
}
|
|
409
|
-
function
|
|
427
|
+
function Ne() {
|
|
410
428
|
return p.activePlayer?.currentMediaProduct ?? null;
|
|
411
429
|
}
|
|
412
|
-
function
|
|
413
|
-
const
|
|
414
|
-
if (
|
|
415
|
-
const e =
|
|
416
|
-
|
|
430
|
+
function Be() {
|
|
431
|
+
const r = p.activePlayer;
|
|
432
|
+
if (r) {
|
|
433
|
+
const e = H.getMediaProductTransition(
|
|
434
|
+
r.currentStreamingSessionId
|
|
417
435
|
);
|
|
418
436
|
if (e)
|
|
419
437
|
return e.playbackContext;
|
|
420
438
|
}
|
|
421
439
|
}
|
|
422
|
-
function
|
|
440
|
+
function Q() {
|
|
423
441
|
return p.activePlayer?.playbackState ?? "IDLE";
|
|
424
442
|
}
|
|
425
|
-
class
|
|
443
|
+
class xe {
|
|
426
444
|
#e;
|
|
427
445
|
constructor() {
|
|
428
446
|
this.#e = /* @__PURE__ */ new Map();
|
|
429
447
|
}
|
|
430
|
-
async #
|
|
448
|
+
async #r(e, t) {
|
|
431
449
|
const s = new TextEncoder().encode(
|
|
432
|
-
`${e}-${
|
|
450
|
+
`${e}-${t}`
|
|
433
451
|
), n = await crypto.subtle.digest("SHA-1", s);
|
|
434
452
|
return Array.from(new Uint8Array(n)).map((o) => o.toString(16).padStart(2, "0")).join("");
|
|
435
453
|
}
|
|
@@ -438,10 +456,10 @@ class He {
|
|
|
438
456
|
*/
|
|
439
457
|
async delete({
|
|
440
458
|
name: e,
|
|
441
|
-
streamingSessionId:
|
|
459
|
+
streamingSessionId: t
|
|
442
460
|
}) {
|
|
443
|
-
const s = await this.#
|
|
444
|
-
|
|
461
|
+
const s = await this.#r(
|
|
462
|
+
t,
|
|
445
463
|
e
|
|
446
464
|
);
|
|
447
465
|
this.#e.delete(s);
|
|
@@ -451,10 +469,10 @@ class He {
|
|
|
451
469
|
*/
|
|
452
470
|
async get({
|
|
453
471
|
name: e,
|
|
454
|
-
streamingSessionId:
|
|
472
|
+
streamingSessionId: t
|
|
455
473
|
}) {
|
|
456
|
-
const s = await this.#
|
|
457
|
-
|
|
474
|
+
const s = await this.#r(
|
|
475
|
+
t,
|
|
458
476
|
e
|
|
459
477
|
);
|
|
460
478
|
return this.#e.get(s);
|
|
@@ -463,99 +481,98 @@ class He {
|
|
|
463
481
|
* Adds or updates an event.
|
|
464
482
|
*/
|
|
465
483
|
async put(e) {
|
|
466
|
-
const
|
|
484
|
+
const t = await this.#r(
|
|
467
485
|
e.streamingSessionId,
|
|
468
486
|
e.name
|
|
469
487
|
);
|
|
470
|
-
this.#e.set(
|
|
488
|
+
this.#e.set(t, e);
|
|
471
489
|
}
|
|
472
490
|
}
|
|
473
|
-
const
|
|
474
|
-
async function
|
|
475
|
-
return
|
|
491
|
+
const R = new xe();
|
|
492
|
+
async function T(r, e) {
|
|
493
|
+
return _("gatherEvents") ? async (t) => {
|
|
476
494
|
try {
|
|
477
|
-
const s = await
|
|
478
|
-
name:
|
|
479
|
-
streamingSessionId:
|
|
495
|
+
const s = await R.get({
|
|
496
|
+
name: r,
|
|
497
|
+
streamingSessionId: t.streamingSessionId
|
|
480
498
|
}), n = Object.assign(
|
|
481
499
|
{},
|
|
482
500
|
e,
|
|
483
501
|
s ? s.payload : {},
|
|
484
|
-
|
|
502
|
+
t
|
|
485
503
|
);
|
|
486
|
-
for (const o of Object.keys(
|
|
504
|
+
for (const o of Object.keys(t)) {
|
|
487
505
|
const a = o;
|
|
488
|
-
Array.isArray(
|
|
506
|
+
Array.isArray(t[a]) && (n[a] = [
|
|
489
507
|
...e[a] || [],
|
|
490
508
|
...s && s.payload[a] || [],
|
|
491
|
-
...
|
|
509
|
+
...t[a] || []
|
|
492
510
|
]);
|
|
493
511
|
}
|
|
494
|
-
return await
|
|
495
|
-
name:
|
|
512
|
+
return await R.put({
|
|
513
|
+
name: r,
|
|
496
514
|
payload: n,
|
|
497
|
-
streamingSessionId:
|
|
515
|
+
streamingSessionId: t.streamingSessionId
|
|
498
516
|
}), {
|
|
499
|
-
name:
|
|
517
|
+
name: r,
|
|
500
518
|
payload: n,
|
|
501
|
-
streamingSessionId:
|
|
519
|
+
streamingSessionId: t.streamingSessionId
|
|
502
520
|
};
|
|
503
521
|
} catch (s) {
|
|
504
522
|
console.error(s);
|
|
505
523
|
}
|
|
506
|
-
} : (
|
|
524
|
+
} : (t) => Promise.resolve(void 0);
|
|
507
525
|
}
|
|
508
|
-
const
|
|
526
|
+
const Re = {
|
|
509
527
|
endReason: "COMPLETE",
|
|
510
528
|
endTimestamp: 0,
|
|
511
529
|
errorCode: null,
|
|
512
530
|
errorMessage: null,
|
|
513
531
|
startTimestamp: 0,
|
|
514
532
|
streamingSessionId: ""
|
|
515
|
-
},
|
|
533
|
+
}, De = await T(
|
|
516
534
|
"drm_license_fetch",
|
|
517
|
-
|
|
535
|
+
Re
|
|
518
536
|
);
|
|
519
|
-
function
|
|
520
|
-
return
|
|
537
|
+
function Dt(r) {
|
|
538
|
+
return De(r);
|
|
521
539
|
}
|
|
522
|
-
const
|
|
540
|
+
const He = {
|
|
523
541
|
endReason: "COMPLETE",
|
|
524
542
|
endTimestamp: 0,
|
|
525
543
|
errorCode: null,
|
|
526
544
|
errorMessage: null,
|
|
527
545
|
startTimestamp: 0,
|
|
528
546
|
streamingSessionId: ""
|
|
529
|
-
},
|
|
547
|
+
}, Ue = await T(
|
|
530
548
|
"playback_info_fetch",
|
|
531
|
-
|
|
549
|
+
He
|
|
532
550
|
);
|
|
533
|
-
function
|
|
534
|
-
return
|
|
551
|
+
function N(r) {
|
|
552
|
+
return Ue(r);
|
|
535
553
|
}
|
|
536
|
-
function
|
|
537
|
-
switch (
|
|
554
|
+
function Ht(r) {
|
|
555
|
+
switch (r) {
|
|
538
556
|
case "bluetooth":
|
|
539
557
|
return "BLUETOOTH";
|
|
540
|
-
case "displayPort":
|
|
541
|
-
return "DISPLAY_PORT";
|
|
542
|
-
case "mqa":
|
|
543
|
-
return "MQA";
|
|
544
558
|
case "builtIn":
|
|
545
559
|
return "BUILT_IN";
|
|
560
|
+
case "displayPort":
|
|
561
|
+
return "DISPLAY_PORT";
|
|
546
562
|
case "hdmi":
|
|
547
563
|
return "HDMI";
|
|
548
|
-
case "usb":
|
|
549
|
-
return "USB";
|
|
550
564
|
case "systemDefault":
|
|
551
565
|
return "SYSTEM_DEFAULT";
|
|
552
|
-
case "
|
|
566
|
+
case "usb":
|
|
567
|
+
return "USB";
|
|
568
|
+
// Never happens (cannot be chose by user)
|
|
553
569
|
case "airplay":
|
|
570
|
+
case "windowsCommunication":
|
|
554
571
|
default:
|
|
555
572
|
return;
|
|
556
573
|
}
|
|
557
574
|
}
|
|
558
|
-
const
|
|
575
|
+
const Ve = {
|
|
559
576
|
actualAssetPresentation: "FULL",
|
|
560
577
|
actualAudioMode: "STEREO",
|
|
561
578
|
actualProductId: null,
|
|
@@ -575,24 +592,24 @@ const Qe = {
|
|
|
575
592
|
productType: "TRACK",
|
|
576
593
|
stalls: [],
|
|
577
594
|
streamingSessionId: ""
|
|
578
|
-
},
|
|
595
|
+
}, ze = await T(
|
|
579
596
|
"playback_statistics",
|
|
580
|
-
|
|
597
|
+
Ve
|
|
581
598
|
);
|
|
582
|
-
function
|
|
583
|
-
return
|
|
599
|
+
function z(r) {
|
|
600
|
+
return ze(r);
|
|
584
601
|
}
|
|
585
|
-
const
|
|
602
|
+
const We = {
|
|
586
603
|
streamingSessionId: "",
|
|
587
604
|
timestamp: 0
|
|
588
|
-
},
|
|
605
|
+
}, $e = await T(
|
|
589
606
|
"streaming_session_end",
|
|
590
|
-
|
|
607
|
+
We
|
|
591
608
|
);
|
|
592
|
-
function
|
|
593
|
-
return
|
|
609
|
+
function Qe(r) {
|
|
610
|
+
return $e(r);
|
|
594
611
|
}
|
|
595
|
-
const
|
|
612
|
+
const Ge = {
|
|
596
613
|
"Amazon Silk": "amazon_silk",
|
|
597
614
|
"Android Browser": "android",
|
|
598
615
|
Bada: "bada",
|
|
@@ -614,6 +631,7 @@ const Ze = {
|
|
|
614
631
|
"NAVER Whale Browser": "naver",
|
|
615
632
|
Opera: "opera",
|
|
616
633
|
"Opera Coast": "opera_coast",
|
|
634
|
+
"Pale Moon": "pale_moon",
|
|
617
635
|
PhantomJS: "phantomjs",
|
|
618
636
|
Puffin: "puffin",
|
|
619
637
|
QupZilla: "qupzilla",
|
|
@@ -632,7 +650,7 @@ const Ze = {
|
|
|
632
650
|
WeChat: "wechat",
|
|
633
651
|
"Yandex Browser": "yandex",
|
|
634
652
|
Roku: "roku"
|
|
635
|
-
},
|
|
653
|
+
}, G = {
|
|
636
654
|
amazon_silk: "Amazon Silk",
|
|
637
655
|
android: "Android Browser",
|
|
638
656
|
bada: "Bada",
|
|
@@ -654,6 +672,7 @@ const Ze = {
|
|
|
654
672
|
naver: "NAVER Whale Browser",
|
|
655
673
|
opera: "Opera",
|
|
656
674
|
opera_coast: "Opera Coast",
|
|
675
|
+
pale_moon: "Pale Moon",
|
|
657
676
|
phantomjs: "PhantomJS",
|
|
658
677
|
puffin: "Puffin",
|
|
659
678
|
qupzilla: "QupZilla",
|
|
@@ -671,11 +690,12 @@ const Ze = {
|
|
|
671
690
|
webos: "WebOS Browser",
|
|
672
691
|
wechat: "WeChat",
|
|
673
692
|
yandex: "Yandex Browser"
|
|
674
|
-
},
|
|
693
|
+
}, h = {
|
|
675
694
|
tablet: "tablet",
|
|
676
695
|
mobile: "mobile",
|
|
677
696
|
desktop: "desktop",
|
|
678
|
-
tv: "tv"
|
|
697
|
+
tv: "tv",
|
|
698
|
+
bot: "bot"
|
|
679
699
|
}, g = {
|
|
680
700
|
WindowsPhone: "Windows Phone",
|
|
681
701
|
Windows: "Windows",
|
|
@@ -690,7 +710,7 @@ const Ze = {
|
|
|
690
710
|
ChromeOS: "Chrome OS",
|
|
691
711
|
PlayStation4: "PlayStation 4",
|
|
692
712
|
Roku: "Roku"
|
|
693
|
-
},
|
|
713
|
+
}, S = {
|
|
694
714
|
EdgeHTML: "EdgeHTML",
|
|
695
715
|
Blink: "Blink",
|
|
696
716
|
Trident: "Trident",
|
|
@@ -705,8 +725,8 @@ class i {
|
|
|
705
725
|
* @param {String} ua
|
|
706
726
|
* @return {Array|{index: number, input: string}|*|boolean|string}
|
|
707
727
|
*/
|
|
708
|
-
static getFirstMatch(e,
|
|
709
|
-
const s =
|
|
728
|
+
static getFirstMatch(e, t) {
|
|
729
|
+
const s = t.match(e);
|
|
710
730
|
return s && s.length > 0 && s[1] || "";
|
|
711
731
|
}
|
|
712
732
|
/**
|
|
@@ -715,8 +735,8 @@ class i {
|
|
|
715
735
|
* @param {String} ua
|
|
716
736
|
* @return {Array|{index: number, input: string}|*|boolean|string}
|
|
717
737
|
*/
|
|
718
|
-
static getSecondMatch(e,
|
|
719
|
-
const s =
|
|
738
|
+
static getSecondMatch(e, t) {
|
|
739
|
+
const s = t.match(e);
|
|
720
740
|
return s && s.length > 1 && s[2] || "";
|
|
721
741
|
}
|
|
722
742
|
/**
|
|
@@ -726,8 +746,8 @@ class i {
|
|
|
726
746
|
* @param {*} _const Any const that will be returned if regexp matches the string
|
|
727
747
|
* @return {*}
|
|
728
748
|
*/
|
|
729
|
-
static matchAndReturnConst(e,
|
|
730
|
-
if (e.test(
|
|
749
|
+
static matchAndReturnConst(e, t, s) {
|
|
750
|
+
if (e.test(t))
|
|
731
751
|
return s;
|
|
732
752
|
}
|
|
733
753
|
static getWindowsVersionName(e) {
|
|
@@ -777,9 +797,9 @@ class i {
|
|
|
777
797
|
* @return {string} versionName
|
|
778
798
|
*/
|
|
779
799
|
static getMacOSVersionName(e) {
|
|
780
|
-
const
|
|
781
|
-
if (
|
|
782
|
-
switch (
|
|
800
|
+
const t = e.split(".").splice(0, 2).map((s) => parseInt(s, 10) || 0);
|
|
801
|
+
if (t.push(0), t[0] === 10)
|
|
802
|
+
switch (t[1]) {
|
|
783
803
|
case 5:
|
|
784
804
|
return "Leopard";
|
|
785
805
|
case 6:
|
|
@@ -831,36 +851,22 @@ class i {
|
|
|
831
851
|
* @return {string} versionName
|
|
832
852
|
*/
|
|
833
853
|
static getAndroidVersionName(e) {
|
|
834
|
-
const
|
|
835
|
-
if (
|
|
836
|
-
if (
|
|
837
|
-
|
|
838
|
-
if (
|
|
839
|
-
|
|
840
|
-
if (
|
|
841
|
-
|
|
842
|
-
if (
|
|
843
|
-
|
|
844
|
-
if (
|
|
845
|
-
|
|
846
|
-
if (
|
|
847
|
-
|
|
848
|
-
if (
|
|
849
|
-
|
|
850
|
-
if (r[0] === 4 && r[1] < 4)
|
|
851
|
-
return "Jelly Bean";
|
|
852
|
-
if (r[0] === 4 && r[1] >= 4)
|
|
853
|
-
return "KitKat";
|
|
854
|
-
if (r[0] === 5)
|
|
855
|
-
return "Lollipop";
|
|
856
|
-
if (r[0] === 6)
|
|
857
|
-
return "Marshmallow";
|
|
858
|
-
if (r[0] === 7)
|
|
859
|
-
return "Nougat";
|
|
860
|
-
if (r[0] === 8)
|
|
861
|
-
return "Oreo";
|
|
862
|
-
if (r[0] === 9)
|
|
863
|
-
return "Pie";
|
|
854
|
+
const t = e.split(".").splice(0, 2).map((s) => parseInt(s, 10) || 0);
|
|
855
|
+
if (t.push(0), !(t[0] === 1 && t[1] < 5)) {
|
|
856
|
+
if (t[0] === 1 && t[1] < 6) return "Cupcake";
|
|
857
|
+
if (t[0] === 1 && t[1] >= 6) return "Donut";
|
|
858
|
+
if (t[0] === 2 && t[1] < 2) return "Eclair";
|
|
859
|
+
if (t[0] === 2 && t[1] === 2) return "Froyo";
|
|
860
|
+
if (t[0] === 2 && t[1] > 2) return "Gingerbread";
|
|
861
|
+
if (t[0] === 3) return "Honeycomb";
|
|
862
|
+
if (t[0] === 4 && t[1] < 1) return "Ice Cream Sandwich";
|
|
863
|
+
if (t[0] === 4 && t[1] < 4) return "Jelly Bean";
|
|
864
|
+
if (t[0] === 4 && t[1] >= 4) return "KitKat";
|
|
865
|
+
if (t[0] === 5) return "Lollipop";
|
|
866
|
+
if (t[0] === 6) return "Marshmallow";
|
|
867
|
+
if (t[0] === 7) return "Nougat";
|
|
868
|
+
if (t[0] === 8) return "Oreo";
|
|
869
|
+
if (t[0] === 9) return "Pie";
|
|
864
870
|
}
|
|
865
871
|
}
|
|
866
872
|
/**
|
|
@@ -892,21 +898,21 @@ class i {
|
|
|
892
898
|
* 1 when versionA is bigger, 0 when both equal
|
|
893
899
|
*/
|
|
894
900
|
/* eslint consistent-return: 1 */
|
|
895
|
-
static compareVersions(e,
|
|
896
|
-
const n = i.getVersionPrecision(e), o = i.getVersionPrecision(
|
|
901
|
+
static compareVersions(e, t, s = !1) {
|
|
902
|
+
const n = i.getVersionPrecision(e), o = i.getVersionPrecision(t);
|
|
897
903
|
let a = Math.max(n, o), c = 0;
|
|
898
|
-
const
|
|
899
|
-
const b = a - i.getVersionPrecision(d),
|
|
900
|
-
return i.map(
|
|
904
|
+
const u = i.map([e, t], (d) => {
|
|
905
|
+
const b = a - i.getVersionPrecision(d), M = d + new Array(b + 1).join(".0");
|
|
906
|
+
return i.map(M.split("."), (f) => new Array(20 - f.length).join("0") + f).reverse();
|
|
901
907
|
});
|
|
902
908
|
for (s && (c = a - Math.min(n, o)), a -= 1; a >= c; ) {
|
|
903
|
-
if (
|
|
909
|
+
if (u[0][a] > u[1][a])
|
|
904
910
|
return 1;
|
|
905
|
-
if (
|
|
911
|
+
if (u[0][a] === u[1][a]) {
|
|
906
912
|
if (a === c)
|
|
907
913
|
return 0;
|
|
908
914
|
a -= 1;
|
|
909
|
-
} else if (
|
|
915
|
+
} else if (u[0][a] < u[1][a])
|
|
910
916
|
return -1;
|
|
911
917
|
}
|
|
912
918
|
}
|
|
@@ -917,13 +923,13 @@ class i {
|
|
|
917
923
|
* @param {Function} iterator
|
|
918
924
|
* @return {Array}
|
|
919
925
|
*/
|
|
920
|
-
static map(e,
|
|
926
|
+
static map(e, t) {
|
|
921
927
|
const s = [];
|
|
922
928
|
let n;
|
|
923
929
|
if (Array.prototype.map)
|
|
924
|
-
return Array.prototype.map.call(e,
|
|
930
|
+
return Array.prototype.map.call(e, t);
|
|
925
931
|
for (n = 0; n < e.length; n += 1)
|
|
926
|
-
s.push(
|
|
932
|
+
s.push(t(e[n]));
|
|
927
933
|
return s;
|
|
928
934
|
}
|
|
929
935
|
/**
|
|
@@ -933,13 +939,13 @@ class i {
|
|
|
933
939
|
* @param {Function} predicate
|
|
934
940
|
* @return {Array}
|
|
935
941
|
*/
|
|
936
|
-
static find(e,
|
|
942
|
+
static find(e, t) {
|
|
937
943
|
let s, n;
|
|
938
944
|
if (Array.prototype.find)
|
|
939
|
-
return Array.prototype.find.call(e,
|
|
945
|
+
return Array.prototype.find.call(e, t);
|
|
940
946
|
for (s = 0, n = e.length; s < n; s += 1) {
|
|
941
947
|
const o = e[s];
|
|
942
|
-
if (
|
|
948
|
+
if (t(o, s))
|
|
943
949
|
return o;
|
|
944
950
|
}
|
|
945
951
|
}
|
|
@@ -950,13 +956,13 @@ class i {
|
|
|
950
956
|
* @param {Object} ...objs
|
|
951
957
|
* @return {Object}
|
|
952
958
|
*/
|
|
953
|
-
static assign(e, ...
|
|
959
|
+
static assign(e, ...t) {
|
|
954
960
|
const s = e;
|
|
955
961
|
let n, o;
|
|
956
962
|
if (Object.assign)
|
|
957
|
-
return Object.assign(e, ...
|
|
958
|
-
for (n = 0, o =
|
|
959
|
-
const a =
|
|
963
|
+
return Object.assign(e, ...t);
|
|
964
|
+
for (n = 0, o = t.length; n < o; n += 1) {
|
|
965
|
+
const a = t[n];
|
|
960
966
|
typeof a == "object" && a !== null && Object.keys(a).forEach((c) => {
|
|
961
967
|
s[c] = a[c];
|
|
962
968
|
});
|
|
@@ -973,426 +979,435 @@ class i {
|
|
|
973
979
|
* @return {string}
|
|
974
980
|
*/
|
|
975
981
|
static getBrowserAlias(e) {
|
|
976
|
-
return
|
|
982
|
+
return Ge[e];
|
|
977
983
|
}
|
|
978
984
|
/**
|
|
979
|
-
* Get
|
|
985
|
+
* Get browser name for a short version/alias
|
|
980
986
|
*
|
|
981
987
|
* @example
|
|
982
|
-
*
|
|
988
|
+
* getBrowserTypeByAlias('edge') // Microsoft Edge
|
|
983
989
|
*
|
|
984
990
|
* @param {string} browserAlias
|
|
985
991
|
* @return {string}
|
|
986
992
|
*/
|
|
987
993
|
static getBrowserTypeByAlias(e) {
|
|
988
|
-
return
|
|
994
|
+
return G[e] || "";
|
|
989
995
|
}
|
|
990
996
|
}
|
|
991
|
-
const
|
|
997
|
+
const l = /version\/(\d+(\.?_?\d+)+)/i, qe = [
|
|
992
998
|
/* Googlebot */
|
|
993
999
|
{
|
|
994
1000
|
test: [/googlebot/i],
|
|
995
|
-
describe(
|
|
1001
|
+
describe(r) {
|
|
996
1002
|
const e = {
|
|
997
1003
|
name: "Googlebot"
|
|
998
|
-
},
|
|
999
|
-
return
|
|
1004
|
+
}, t = i.getFirstMatch(/googlebot\/(\d+(\.\d+))/i, r) || i.getFirstMatch(l, r);
|
|
1005
|
+
return t && (e.version = t), e;
|
|
1000
1006
|
}
|
|
1001
1007
|
},
|
|
1002
1008
|
/* Opera < 13.0 */
|
|
1003
1009
|
{
|
|
1004
1010
|
test: [/opera/i],
|
|
1005
|
-
describe(
|
|
1011
|
+
describe(r) {
|
|
1006
1012
|
const e = {
|
|
1007
1013
|
name: "Opera"
|
|
1008
|
-
},
|
|
1009
|
-
return
|
|
1014
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i, r);
|
|
1015
|
+
return t && (e.version = t), e;
|
|
1010
1016
|
}
|
|
1011
1017
|
},
|
|
1012
1018
|
/* Opera > 13.0 */
|
|
1013
1019
|
{
|
|
1014
1020
|
test: [/opr\/|opios/i],
|
|
1015
|
-
describe(
|
|
1021
|
+
describe(r) {
|
|
1016
1022
|
const e = {
|
|
1017
1023
|
name: "Opera"
|
|
1018
|
-
},
|
|
1019
|
-
return
|
|
1024
|
+
}, t = i.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i, r) || i.getFirstMatch(l, r);
|
|
1025
|
+
return t && (e.version = t), e;
|
|
1020
1026
|
}
|
|
1021
1027
|
},
|
|
1022
1028
|
{
|
|
1023
1029
|
test: [/SamsungBrowser/i],
|
|
1024
|
-
describe(
|
|
1030
|
+
describe(r) {
|
|
1025
1031
|
const e = {
|
|
1026
1032
|
name: "Samsung Internet for Android"
|
|
1027
|
-
},
|
|
1028
|
-
return
|
|
1033
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i, r);
|
|
1034
|
+
return t && (e.version = t), e;
|
|
1029
1035
|
}
|
|
1030
1036
|
},
|
|
1031
1037
|
{
|
|
1032
1038
|
test: [/Whale/i],
|
|
1033
|
-
describe(
|
|
1039
|
+
describe(r) {
|
|
1034
1040
|
const e = {
|
|
1035
1041
|
name: "NAVER Whale Browser"
|
|
1036
|
-
},
|
|
1037
|
-
return
|
|
1042
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i, r);
|
|
1043
|
+
return t && (e.version = t), e;
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
test: [/PaleMoon/i],
|
|
1048
|
+
describe(r) {
|
|
1049
|
+
const e = {
|
|
1050
|
+
name: "Pale Moon"
|
|
1051
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i, r);
|
|
1052
|
+
return t && (e.version = t), e;
|
|
1038
1053
|
}
|
|
1039
1054
|
},
|
|
1040
1055
|
{
|
|
1041
1056
|
test: [/MZBrowser/i],
|
|
1042
|
-
describe(
|
|
1057
|
+
describe(r) {
|
|
1043
1058
|
const e = {
|
|
1044
1059
|
name: "MZ Browser"
|
|
1045
|
-
},
|
|
1046
|
-
return
|
|
1060
|
+
}, t = i.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i, r) || i.getFirstMatch(l, r);
|
|
1061
|
+
return t && (e.version = t), e;
|
|
1047
1062
|
}
|
|
1048
1063
|
},
|
|
1049
1064
|
{
|
|
1050
1065
|
test: [/focus/i],
|
|
1051
|
-
describe(
|
|
1066
|
+
describe(r) {
|
|
1052
1067
|
const e = {
|
|
1053
1068
|
name: "Focus"
|
|
1054
|
-
},
|
|
1055
|
-
return
|
|
1069
|
+
}, t = i.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i, r) || i.getFirstMatch(l, r);
|
|
1070
|
+
return t && (e.version = t), e;
|
|
1056
1071
|
}
|
|
1057
1072
|
},
|
|
1058
1073
|
{
|
|
1059
1074
|
test: [/swing/i],
|
|
1060
|
-
describe(
|
|
1075
|
+
describe(r) {
|
|
1061
1076
|
const e = {
|
|
1062
1077
|
name: "Swing"
|
|
1063
|
-
},
|
|
1064
|
-
return
|
|
1078
|
+
}, t = i.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i, r) || i.getFirstMatch(l, r);
|
|
1079
|
+
return t && (e.version = t), e;
|
|
1065
1080
|
}
|
|
1066
1081
|
},
|
|
1067
1082
|
{
|
|
1068
1083
|
test: [/coast/i],
|
|
1069
|
-
describe(
|
|
1084
|
+
describe(r) {
|
|
1070
1085
|
const e = {
|
|
1071
1086
|
name: "Opera Coast"
|
|
1072
|
-
},
|
|
1073
|
-
return
|
|
1087
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i, r);
|
|
1088
|
+
return t && (e.version = t), e;
|
|
1074
1089
|
}
|
|
1075
1090
|
},
|
|
1076
1091
|
{
|
|
1077
1092
|
test: [/opt\/\d+(?:.?_?\d+)+/i],
|
|
1078
|
-
describe(
|
|
1093
|
+
describe(r) {
|
|
1079
1094
|
const e = {
|
|
1080
1095
|
name: "Opera Touch"
|
|
1081
|
-
},
|
|
1082
|
-
return
|
|
1096
|
+
}, t = i.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i, r) || i.getFirstMatch(l, r);
|
|
1097
|
+
return t && (e.version = t), e;
|
|
1083
1098
|
}
|
|
1084
1099
|
},
|
|
1085
1100
|
{
|
|
1086
1101
|
test: [/yabrowser/i],
|
|
1087
|
-
describe(
|
|
1102
|
+
describe(r) {
|
|
1088
1103
|
const e = {
|
|
1089
1104
|
name: "Yandex Browser"
|
|
1090
|
-
},
|
|
1091
|
-
return
|
|
1105
|
+
}, t = i.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i, r) || i.getFirstMatch(l, r);
|
|
1106
|
+
return t && (e.version = t), e;
|
|
1092
1107
|
}
|
|
1093
1108
|
},
|
|
1094
1109
|
{
|
|
1095
1110
|
test: [/ucbrowser/i],
|
|
1096
|
-
describe(
|
|
1111
|
+
describe(r) {
|
|
1097
1112
|
const e = {
|
|
1098
1113
|
name: "UC Browser"
|
|
1099
|
-
},
|
|
1100
|
-
return
|
|
1114
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i, r);
|
|
1115
|
+
return t && (e.version = t), e;
|
|
1101
1116
|
}
|
|
1102
1117
|
},
|
|
1103
1118
|
{
|
|
1104
1119
|
test: [/Maxthon|mxios/i],
|
|
1105
|
-
describe(
|
|
1120
|
+
describe(r) {
|
|
1106
1121
|
const e = {
|
|
1107
1122
|
name: "Maxthon"
|
|
1108
|
-
},
|
|
1109
|
-
return
|
|
1123
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i, r);
|
|
1124
|
+
return t && (e.version = t), e;
|
|
1110
1125
|
}
|
|
1111
1126
|
},
|
|
1112
1127
|
{
|
|
1113
1128
|
test: [/epiphany/i],
|
|
1114
|
-
describe(
|
|
1129
|
+
describe(r) {
|
|
1115
1130
|
const e = {
|
|
1116
1131
|
name: "Epiphany"
|
|
1117
|
-
},
|
|
1118
|
-
return
|
|
1132
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i, r);
|
|
1133
|
+
return t && (e.version = t), e;
|
|
1119
1134
|
}
|
|
1120
1135
|
},
|
|
1121
1136
|
{
|
|
1122
1137
|
test: [/puffin/i],
|
|
1123
|
-
describe(
|
|
1138
|
+
describe(r) {
|
|
1124
1139
|
const e = {
|
|
1125
1140
|
name: "Puffin"
|
|
1126
|
-
},
|
|
1127
|
-
return
|
|
1141
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i, r);
|
|
1142
|
+
return t && (e.version = t), e;
|
|
1128
1143
|
}
|
|
1129
1144
|
},
|
|
1130
1145
|
{
|
|
1131
1146
|
test: [/sleipnir/i],
|
|
1132
|
-
describe(
|
|
1147
|
+
describe(r) {
|
|
1133
1148
|
const e = {
|
|
1134
1149
|
name: "Sleipnir"
|
|
1135
|
-
},
|
|
1136
|
-
return
|
|
1150
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i, r);
|
|
1151
|
+
return t && (e.version = t), e;
|
|
1137
1152
|
}
|
|
1138
1153
|
},
|
|
1139
1154
|
{
|
|
1140
1155
|
test: [/k-meleon/i],
|
|
1141
|
-
describe(
|
|
1156
|
+
describe(r) {
|
|
1142
1157
|
const e = {
|
|
1143
1158
|
name: "K-Meleon"
|
|
1144
|
-
},
|
|
1145
|
-
return
|
|
1159
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i, r);
|
|
1160
|
+
return t && (e.version = t), e;
|
|
1146
1161
|
}
|
|
1147
1162
|
},
|
|
1148
1163
|
{
|
|
1149
1164
|
test: [/micromessenger/i],
|
|
1150
|
-
describe(
|
|
1165
|
+
describe(r) {
|
|
1151
1166
|
const e = {
|
|
1152
1167
|
name: "WeChat"
|
|
1153
|
-
},
|
|
1154
|
-
return
|
|
1168
|
+
}, t = i.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i, r) || i.getFirstMatch(l, r);
|
|
1169
|
+
return t && (e.version = t), e;
|
|
1155
1170
|
}
|
|
1156
1171
|
},
|
|
1157
1172
|
{
|
|
1158
1173
|
test: [/qqbrowser/i],
|
|
1159
|
-
describe(
|
|
1174
|
+
describe(r) {
|
|
1160
1175
|
const e = {
|
|
1161
|
-
name: /qqbrowserlite/i.test(
|
|
1162
|
-
},
|
|
1163
|
-
return
|
|
1176
|
+
name: /qqbrowserlite/i.test(r) ? "QQ Browser Lite" : "QQ Browser"
|
|
1177
|
+
}, t = i.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i, r) || i.getFirstMatch(l, r);
|
|
1178
|
+
return t && (e.version = t), e;
|
|
1164
1179
|
}
|
|
1165
1180
|
},
|
|
1166
1181
|
{
|
|
1167
1182
|
test: [/msie|trident/i],
|
|
1168
|
-
describe(
|
|
1183
|
+
describe(r) {
|
|
1169
1184
|
const e = {
|
|
1170
1185
|
name: "Internet Explorer"
|
|
1171
|
-
},
|
|
1172
|
-
return
|
|
1186
|
+
}, t = i.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, r);
|
|
1187
|
+
return t && (e.version = t), e;
|
|
1173
1188
|
}
|
|
1174
1189
|
},
|
|
1175
1190
|
{
|
|
1176
1191
|
test: [/\sedg\//i],
|
|
1177
|
-
describe(
|
|
1192
|
+
describe(r) {
|
|
1178
1193
|
const e = {
|
|
1179
1194
|
name: "Microsoft Edge"
|
|
1180
|
-
},
|
|
1181
|
-
return
|
|
1195
|
+
}, t = i.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, r);
|
|
1196
|
+
return t && (e.version = t), e;
|
|
1182
1197
|
}
|
|
1183
1198
|
},
|
|
1184
1199
|
{
|
|
1185
1200
|
test: [/edg([ea]|ios)/i],
|
|
1186
|
-
describe(
|
|
1201
|
+
describe(r) {
|
|
1187
1202
|
const e = {
|
|
1188
1203
|
name: "Microsoft Edge"
|
|
1189
|
-
},
|
|
1190
|
-
return
|
|
1204
|
+
}, t = i.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, r);
|
|
1205
|
+
return t && (e.version = t), e;
|
|
1191
1206
|
}
|
|
1192
1207
|
},
|
|
1193
1208
|
{
|
|
1194
1209
|
test: [/vivaldi/i],
|
|
1195
|
-
describe(
|
|
1210
|
+
describe(r) {
|
|
1196
1211
|
const e = {
|
|
1197
1212
|
name: "Vivaldi"
|
|
1198
|
-
},
|
|
1199
|
-
return
|
|
1213
|
+
}, t = i.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i, r);
|
|
1214
|
+
return t && (e.version = t), e;
|
|
1200
1215
|
}
|
|
1201
1216
|
},
|
|
1202
1217
|
{
|
|
1203
1218
|
test: [/seamonkey/i],
|
|
1204
|
-
describe(
|
|
1219
|
+
describe(r) {
|
|
1205
1220
|
const e = {
|
|
1206
1221
|
name: "SeaMonkey"
|
|
1207
|
-
},
|
|
1208
|
-
return
|
|
1222
|
+
}, t = i.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i, r);
|
|
1223
|
+
return t && (e.version = t), e;
|
|
1209
1224
|
}
|
|
1210
1225
|
},
|
|
1211
1226
|
{
|
|
1212
1227
|
test: [/sailfish/i],
|
|
1213
|
-
describe(
|
|
1228
|
+
describe(r) {
|
|
1214
1229
|
const e = {
|
|
1215
1230
|
name: "Sailfish"
|
|
1216
|
-
},
|
|
1217
|
-
return
|
|
1231
|
+
}, t = i.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i, r);
|
|
1232
|
+
return t && (e.version = t), e;
|
|
1218
1233
|
}
|
|
1219
1234
|
},
|
|
1220
1235
|
{
|
|
1221
1236
|
test: [/silk/i],
|
|
1222
|
-
describe(
|
|
1237
|
+
describe(r) {
|
|
1223
1238
|
const e = {
|
|
1224
1239
|
name: "Amazon Silk"
|
|
1225
|
-
},
|
|
1226
|
-
return
|
|
1240
|
+
}, t = i.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i, r);
|
|
1241
|
+
return t && (e.version = t), e;
|
|
1227
1242
|
}
|
|
1228
1243
|
},
|
|
1229
1244
|
{
|
|
1230
1245
|
test: [/phantom/i],
|
|
1231
|
-
describe(
|
|
1246
|
+
describe(r) {
|
|
1232
1247
|
const e = {
|
|
1233
1248
|
name: "PhantomJS"
|
|
1234
|
-
},
|
|
1235
|
-
return
|
|
1249
|
+
}, t = i.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i, r);
|
|
1250
|
+
return t && (e.version = t), e;
|
|
1236
1251
|
}
|
|
1237
1252
|
},
|
|
1238
1253
|
{
|
|
1239
1254
|
test: [/slimerjs/i],
|
|
1240
|
-
describe(
|
|
1255
|
+
describe(r) {
|
|
1241
1256
|
const e = {
|
|
1242
1257
|
name: "SlimerJS"
|
|
1243
|
-
},
|
|
1244
|
-
return
|
|
1258
|
+
}, t = i.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i, r);
|
|
1259
|
+
return t && (e.version = t), e;
|
|
1245
1260
|
}
|
|
1246
1261
|
},
|
|
1247
1262
|
{
|
|
1248
1263
|
test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
|
|
1249
|
-
describe(
|
|
1264
|
+
describe(r) {
|
|
1250
1265
|
const e = {
|
|
1251
1266
|
name: "BlackBerry"
|
|
1252
|
-
},
|
|
1253
|
-
return
|
|
1267
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i, r);
|
|
1268
|
+
return t && (e.version = t), e;
|
|
1254
1269
|
}
|
|
1255
1270
|
},
|
|
1256
1271
|
{
|
|
1257
1272
|
test: [/(web|hpw)[o0]s/i],
|
|
1258
|
-
describe(
|
|
1273
|
+
describe(r) {
|
|
1259
1274
|
const e = {
|
|
1260
1275
|
name: "WebOS Browser"
|
|
1261
|
-
},
|
|
1262
|
-
return
|
|
1276
|
+
}, t = i.getFirstMatch(l, r) || i.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i, r);
|
|
1277
|
+
return t && (e.version = t), e;
|
|
1263
1278
|
}
|
|
1264
1279
|
},
|
|
1265
1280
|
{
|
|
1266
1281
|
test: [/bada/i],
|
|
1267
|
-
describe(
|
|
1282
|
+
describe(r) {
|
|
1268
1283
|
const e = {
|
|
1269
1284
|
name: "Bada"
|
|
1270
|
-
},
|
|
1271
|
-
return
|
|
1285
|
+
}, t = i.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i, r);
|
|
1286
|
+
return t && (e.version = t), e;
|
|
1272
1287
|
}
|
|
1273
1288
|
},
|
|
1274
1289
|
{
|
|
1275
1290
|
test: [/tizen/i],
|
|
1276
|
-
describe(
|
|
1291
|
+
describe(r) {
|
|
1277
1292
|
const e = {
|
|
1278
1293
|
name: "Tizen"
|
|
1279
|
-
},
|
|
1280
|
-
return
|
|
1294
|
+
}, t = i.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i, r) || i.getFirstMatch(l, r);
|
|
1295
|
+
return t && (e.version = t), e;
|
|
1281
1296
|
}
|
|
1282
1297
|
},
|
|
1283
1298
|
{
|
|
1284
1299
|
test: [/qupzilla/i],
|
|
1285
|
-
describe(
|
|
1300
|
+
describe(r) {
|
|
1286
1301
|
const e = {
|
|
1287
1302
|
name: "QupZilla"
|
|
1288
|
-
},
|
|
1289
|
-
return
|
|
1303
|
+
}, t = i.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i, r) || i.getFirstMatch(l, r);
|
|
1304
|
+
return t && (e.version = t), e;
|
|
1290
1305
|
}
|
|
1291
1306
|
},
|
|
1292
1307
|
{
|
|
1293
1308
|
test: [/firefox|iceweasel|fxios/i],
|
|
1294
|
-
describe(
|
|
1309
|
+
describe(r) {
|
|
1295
1310
|
const e = {
|
|
1296
1311
|
name: "Firefox"
|
|
1297
|
-
},
|
|
1298
|
-
return
|
|
1312
|
+
}, t = i.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i, r);
|
|
1313
|
+
return t && (e.version = t), e;
|
|
1299
1314
|
}
|
|
1300
1315
|
},
|
|
1301
1316
|
{
|
|
1302
1317
|
test: [/electron/i],
|
|
1303
|
-
describe(
|
|
1318
|
+
describe(r) {
|
|
1304
1319
|
const e = {
|
|
1305
1320
|
name: "Electron"
|
|
1306
|
-
},
|
|
1307
|
-
return
|
|
1321
|
+
}, t = i.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i, r);
|
|
1322
|
+
return t && (e.version = t), e;
|
|
1308
1323
|
}
|
|
1309
1324
|
},
|
|
1310
1325
|
{
|
|
1311
1326
|
test: [/MiuiBrowser/i],
|
|
1312
|
-
describe(
|
|
1327
|
+
describe(r) {
|
|
1313
1328
|
const e = {
|
|
1314
1329
|
name: "Miui"
|
|
1315
|
-
},
|
|
1316
|
-
return
|
|
1330
|
+
}, t = i.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i, r);
|
|
1331
|
+
return t && (e.version = t), e;
|
|
1317
1332
|
}
|
|
1318
1333
|
},
|
|
1319
1334
|
{
|
|
1320
1335
|
test: [/chromium/i],
|
|
1321
|
-
describe(
|
|
1336
|
+
describe(r) {
|
|
1322
1337
|
const e = {
|
|
1323
1338
|
name: "Chromium"
|
|
1324
|
-
},
|
|
1325
|
-
return
|
|
1339
|
+
}, t = i.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, r) || i.getFirstMatch(l, r);
|
|
1340
|
+
return t && (e.version = t), e;
|
|
1326
1341
|
}
|
|
1327
1342
|
},
|
|
1328
1343
|
{
|
|
1329
1344
|
test: [/chrome|crios|crmo/i],
|
|
1330
|
-
describe(
|
|
1345
|
+
describe(r) {
|
|
1331
1346
|
const e = {
|
|
1332
1347
|
name: "Chrome"
|
|
1333
|
-
},
|
|
1334
|
-
return
|
|
1348
|
+
}, t = i.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, r);
|
|
1349
|
+
return t && (e.version = t), e;
|
|
1335
1350
|
}
|
|
1336
1351
|
},
|
|
1337
1352
|
{
|
|
1338
1353
|
test: [/GSA/i],
|
|
1339
|
-
describe(
|
|
1354
|
+
describe(r) {
|
|
1340
1355
|
const e = {
|
|
1341
1356
|
name: "Google Search"
|
|
1342
|
-
},
|
|
1343
|
-
return
|
|
1357
|
+
}, t = i.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, r);
|
|
1358
|
+
return t && (e.version = t), e;
|
|
1344
1359
|
}
|
|
1345
1360
|
},
|
|
1346
1361
|
/* Android Browser */
|
|
1347
1362
|
{
|
|
1348
|
-
test(
|
|
1349
|
-
const e = !
|
|
1350
|
-
return e &&
|
|
1363
|
+
test(r) {
|
|
1364
|
+
const e = !r.test(/like android/i), t = r.test(/android/i);
|
|
1365
|
+
return e && t;
|
|
1351
1366
|
},
|
|
1352
|
-
describe(
|
|
1367
|
+
describe(r) {
|
|
1353
1368
|
const e = {
|
|
1354
1369
|
name: "Android Browser"
|
|
1355
|
-
},
|
|
1356
|
-
return
|
|
1370
|
+
}, t = i.getFirstMatch(l, r);
|
|
1371
|
+
return t && (e.version = t), e;
|
|
1357
1372
|
}
|
|
1358
1373
|
},
|
|
1359
1374
|
/* PlayStation 4 */
|
|
1360
1375
|
{
|
|
1361
1376
|
test: [/playstation 4/i],
|
|
1362
|
-
describe(
|
|
1377
|
+
describe(r) {
|
|
1363
1378
|
const e = {
|
|
1364
1379
|
name: "PlayStation 4"
|
|
1365
|
-
},
|
|
1366
|
-
return
|
|
1380
|
+
}, t = i.getFirstMatch(l, r);
|
|
1381
|
+
return t && (e.version = t), e;
|
|
1367
1382
|
}
|
|
1368
1383
|
},
|
|
1369
1384
|
/* Safari */
|
|
1370
1385
|
{
|
|
1371
1386
|
test: [/safari|applewebkit/i],
|
|
1372
|
-
describe(
|
|
1387
|
+
describe(r) {
|
|
1373
1388
|
const e = {
|
|
1374
1389
|
name: "Safari"
|
|
1375
|
-
},
|
|
1376
|
-
return
|
|
1390
|
+
}, t = i.getFirstMatch(l, r);
|
|
1391
|
+
return t && (e.version = t), e;
|
|
1377
1392
|
}
|
|
1378
1393
|
},
|
|
1379
1394
|
/* Something else */
|
|
1380
1395
|
{
|
|
1381
1396
|
test: [/.*/i],
|
|
1382
|
-
describe(
|
|
1383
|
-
const e = /^(.*)\/(.*) /,
|
|
1397
|
+
describe(r) {
|
|
1398
|
+
const e = /^(.*)\/(.*) /, t = /^(.*)\/(.*)[ \t]\((.*)/, s = r.search("\\(") !== -1 ? t : e;
|
|
1384
1399
|
return {
|
|
1385
|
-
name: i.getFirstMatch(s,
|
|
1386
|
-
version: i.getSecondMatch(s,
|
|
1400
|
+
name: i.getFirstMatch(s, r),
|
|
1401
|
+
version: i.getSecondMatch(s, r)
|
|
1387
1402
|
};
|
|
1388
1403
|
}
|
|
1389
1404
|
}
|
|
1390
|
-
],
|
|
1405
|
+
], je = [
|
|
1391
1406
|
/* Roku */
|
|
1392
1407
|
{
|
|
1393
1408
|
test: [/Roku\/DVP/],
|
|
1394
|
-
describe(
|
|
1395
|
-
const e = i.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,
|
|
1409
|
+
describe(r) {
|
|
1410
|
+
const e = i.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i, r);
|
|
1396
1411
|
return {
|
|
1397
1412
|
name: g.Roku,
|
|
1398
1413
|
version: e
|
|
@@ -1402,8 +1417,8 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1402
1417
|
/* Windows Phone */
|
|
1403
1418
|
{
|
|
1404
1419
|
test: [/windows phone/i],
|
|
1405
|
-
describe(
|
|
1406
|
-
const e = i.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,
|
|
1420
|
+
describe(r) {
|
|
1421
|
+
const e = i.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, r);
|
|
1407
1422
|
return {
|
|
1408
1423
|
name: g.WindowsPhone,
|
|
1409
1424
|
version: e
|
|
@@ -1413,41 +1428,41 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1413
1428
|
/* Windows */
|
|
1414
1429
|
{
|
|
1415
1430
|
test: [/windows /i],
|
|
1416
|
-
describe(
|
|
1417
|
-
const e = i.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,
|
|
1431
|
+
describe(r) {
|
|
1432
|
+
const e = i.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i, r), t = i.getWindowsVersionName(e);
|
|
1418
1433
|
return {
|
|
1419
1434
|
name: g.Windows,
|
|
1420
1435
|
version: e,
|
|
1421
|
-
versionName:
|
|
1436
|
+
versionName: t
|
|
1422
1437
|
};
|
|
1423
1438
|
}
|
|
1424
1439
|
},
|
|
1425
1440
|
/* Firefox on iPad */
|
|
1426
1441
|
{
|
|
1427
1442
|
test: [/Macintosh(.*?) FxiOS(.*?)\//],
|
|
1428
|
-
describe(
|
|
1443
|
+
describe(r) {
|
|
1429
1444
|
const e = {
|
|
1430
1445
|
name: g.iOS
|
|
1431
|
-
},
|
|
1432
|
-
return
|
|
1446
|
+
}, t = i.getSecondMatch(/(Version\/)(\d[\d.]+)/, r);
|
|
1447
|
+
return t && (e.version = t), e;
|
|
1433
1448
|
}
|
|
1434
1449
|
},
|
|
1435
1450
|
/* macOS */
|
|
1436
1451
|
{
|
|
1437
1452
|
test: [/macintosh/i],
|
|
1438
|
-
describe(
|
|
1439
|
-
const e = i.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,
|
|
1453
|
+
describe(r) {
|
|
1454
|
+
const e = i.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, r).replace(/[_\s]/g, "."), t = i.getMacOSVersionName(e), s = {
|
|
1440
1455
|
name: g.MacOS,
|
|
1441
1456
|
version: e
|
|
1442
1457
|
};
|
|
1443
|
-
return
|
|
1458
|
+
return t && (s.versionName = t), s;
|
|
1444
1459
|
}
|
|
1445
1460
|
},
|
|
1446
1461
|
/* iOS */
|
|
1447
1462
|
{
|
|
1448
1463
|
test: [/(ipod|iphone|ipad)/i],
|
|
1449
|
-
describe(
|
|
1450
|
-
const e = i.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,
|
|
1464
|
+
describe(r) {
|
|
1465
|
+
const e = i.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i, r).replace(/[_\s]/g, ".");
|
|
1451
1466
|
return {
|
|
1452
1467
|
name: g.iOS,
|
|
1453
1468
|
version: e
|
|
@@ -1456,33 +1471,33 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1456
1471
|
},
|
|
1457
1472
|
/* Android */
|
|
1458
1473
|
{
|
|
1459
|
-
test(
|
|
1460
|
-
const e = !
|
|
1461
|
-
return e &&
|
|
1474
|
+
test(r) {
|
|
1475
|
+
const e = !r.test(/like android/i), t = r.test(/android/i);
|
|
1476
|
+
return e && t;
|
|
1462
1477
|
},
|
|
1463
|
-
describe(
|
|
1464
|
-
const e = i.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,
|
|
1478
|
+
describe(r) {
|
|
1479
|
+
const e = i.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, r), t = i.getAndroidVersionName(e), s = {
|
|
1465
1480
|
name: g.Android,
|
|
1466
1481
|
version: e
|
|
1467
1482
|
};
|
|
1468
|
-
return
|
|
1483
|
+
return t && (s.versionName = t), s;
|
|
1469
1484
|
}
|
|
1470
1485
|
},
|
|
1471
1486
|
/* WebOS */
|
|
1472
1487
|
{
|
|
1473
1488
|
test: [/(web|hpw)[o0]s/i],
|
|
1474
|
-
describe(
|
|
1475
|
-
const e = i.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,
|
|
1489
|
+
describe(r) {
|
|
1490
|
+
const e = i.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i, r), t = {
|
|
1476
1491
|
name: g.WebOS
|
|
1477
1492
|
};
|
|
1478
|
-
return e && e.length && (
|
|
1493
|
+
return e && e.length && (t.version = e), t;
|
|
1479
1494
|
}
|
|
1480
1495
|
},
|
|
1481
1496
|
/* BlackBerry */
|
|
1482
1497
|
{
|
|
1483
1498
|
test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
|
|
1484
|
-
describe(
|
|
1485
|
-
const e = i.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,
|
|
1499
|
+
describe(r) {
|
|
1500
|
+
const e = i.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i, r) || i.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, r) || i.getFirstMatch(/\bbb(\d+)/i, r);
|
|
1486
1501
|
return {
|
|
1487
1502
|
name: g.BlackBerry,
|
|
1488
1503
|
version: e
|
|
@@ -1492,8 +1507,8 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1492
1507
|
/* Bada */
|
|
1493
1508
|
{
|
|
1494
1509
|
test: [/bada/i],
|
|
1495
|
-
describe(
|
|
1496
|
-
const e = i.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,
|
|
1510
|
+
describe(r) {
|
|
1511
|
+
const e = i.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, r);
|
|
1497
1512
|
return {
|
|
1498
1513
|
name: g.Bada,
|
|
1499
1514
|
version: e
|
|
@@ -1503,8 +1518,8 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1503
1518
|
/* Tizen */
|
|
1504
1519
|
{
|
|
1505
1520
|
test: [/tizen/i],
|
|
1506
|
-
describe(
|
|
1507
|
-
const e = i.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,
|
|
1521
|
+
describe(r) {
|
|
1522
|
+
const e = i.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, r);
|
|
1508
1523
|
return {
|
|
1509
1524
|
name: g.Tizen,
|
|
1510
1525
|
version: e
|
|
@@ -1532,21 +1547,21 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1532
1547
|
/* Playstation 4 */
|
|
1533
1548
|
{
|
|
1534
1549
|
test: [/PlayStation 4/],
|
|
1535
|
-
describe(
|
|
1536
|
-
const e = i.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,
|
|
1550
|
+
describe(r) {
|
|
1551
|
+
const e = i.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, r);
|
|
1537
1552
|
return {
|
|
1538
1553
|
name: g.PlayStation4,
|
|
1539
1554
|
version: e
|
|
1540
1555
|
};
|
|
1541
1556
|
}
|
|
1542
1557
|
}
|
|
1543
|
-
],
|
|
1558
|
+
], Ke = [
|
|
1544
1559
|
/* Googlebot */
|
|
1545
1560
|
{
|
|
1546
1561
|
test: [/googlebot/i],
|
|
1547
1562
|
describe() {
|
|
1548
1563
|
return {
|
|
1549
|
-
type:
|
|
1564
|
+
type: h.bot,
|
|
1550
1565
|
vendor: "Google"
|
|
1551
1566
|
};
|
|
1552
1567
|
}
|
|
@@ -1554,12 +1569,12 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1554
1569
|
/* Huawei */
|
|
1555
1570
|
{
|
|
1556
1571
|
test: [/huawei/i],
|
|
1557
|
-
describe(
|
|
1558
|
-
const e = i.getFirstMatch(/(can-l01)/i,
|
|
1559
|
-
type:
|
|
1572
|
+
describe(r) {
|
|
1573
|
+
const e = i.getFirstMatch(/(can-l01)/i, r) && "Nova", t = {
|
|
1574
|
+
type: h.mobile,
|
|
1560
1575
|
vendor: "Huawei"
|
|
1561
1576
|
};
|
|
1562
|
-
return e && (
|
|
1577
|
+
return e && (t.model = e), t;
|
|
1563
1578
|
}
|
|
1564
1579
|
},
|
|
1565
1580
|
/* Nexus Tablet */
|
|
@@ -1567,7 +1582,7 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1567
1582
|
test: [/nexus\s*(?:7|8|9|10).*/i],
|
|
1568
1583
|
describe() {
|
|
1569
1584
|
return {
|
|
1570
|
-
type:
|
|
1585
|
+
type: h.tablet,
|
|
1571
1586
|
vendor: "Nexus"
|
|
1572
1587
|
};
|
|
1573
1588
|
}
|
|
@@ -1577,7 +1592,7 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1577
1592
|
test: [/ipad/i],
|
|
1578
1593
|
describe() {
|
|
1579
1594
|
return {
|
|
1580
|
-
type:
|
|
1595
|
+
type: h.tablet,
|
|
1581
1596
|
vendor: "Apple",
|
|
1582
1597
|
model: "iPad"
|
|
1583
1598
|
};
|
|
@@ -1588,7 +1603,7 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1588
1603
|
test: [/Macintosh(.*?) FxiOS(.*?)\//],
|
|
1589
1604
|
describe() {
|
|
1590
1605
|
return {
|
|
1591
|
-
type:
|
|
1606
|
+
type: h.tablet,
|
|
1592
1607
|
vendor: "Apple",
|
|
1593
1608
|
model: "iPad"
|
|
1594
1609
|
};
|
|
@@ -1599,7 +1614,7 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1599
1614
|
test: [/kftt build/i],
|
|
1600
1615
|
describe() {
|
|
1601
1616
|
return {
|
|
1602
|
-
type:
|
|
1617
|
+
type: h.tablet,
|
|
1603
1618
|
vendor: "Amazon",
|
|
1604
1619
|
model: "Kindle Fire HD 7"
|
|
1605
1620
|
};
|
|
@@ -1610,7 +1625,7 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1610
1625
|
test: [/silk/i],
|
|
1611
1626
|
describe() {
|
|
1612
1627
|
return {
|
|
1613
|
-
type:
|
|
1628
|
+
type: h.tablet,
|
|
1614
1629
|
vendor: "Amazon"
|
|
1615
1630
|
};
|
|
1616
1631
|
}
|
|
@@ -1620,20 +1635,20 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1620
1635
|
test: [/tablet(?! pc)/i],
|
|
1621
1636
|
describe() {
|
|
1622
1637
|
return {
|
|
1623
|
-
type:
|
|
1638
|
+
type: h.tablet
|
|
1624
1639
|
};
|
|
1625
1640
|
}
|
|
1626
1641
|
},
|
|
1627
1642
|
/* iPod/iPhone */
|
|
1628
1643
|
{
|
|
1629
|
-
test(
|
|
1630
|
-
const e =
|
|
1631
|
-
return e && !
|
|
1644
|
+
test(r) {
|
|
1645
|
+
const e = r.test(/ipod|iphone/i), t = r.test(/like (ipod|iphone)/i);
|
|
1646
|
+
return e && !t;
|
|
1632
1647
|
},
|
|
1633
|
-
describe(
|
|
1634
|
-
const e = i.getFirstMatch(/(ipod|iphone)/i,
|
|
1648
|
+
describe(r) {
|
|
1649
|
+
const e = i.getFirstMatch(/(ipod|iphone)/i, r);
|
|
1635
1650
|
return {
|
|
1636
|
-
type:
|
|
1651
|
+
type: h.mobile,
|
|
1637
1652
|
vendor: "Apple",
|
|
1638
1653
|
model: e
|
|
1639
1654
|
};
|
|
@@ -1644,148 +1659,159 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1644
1659
|
test: [/nexus\s*[0-6].*/i, /galaxy nexus/i],
|
|
1645
1660
|
describe() {
|
|
1646
1661
|
return {
|
|
1647
|
-
type:
|
|
1662
|
+
type: h.mobile,
|
|
1648
1663
|
vendor: "Nexus"
|
|
1649
1664
|
};
|
|
1650
1665
|
}
|
|
1651
1666
|
},
|
|
1667
|
+
/* Nokia */
|
|
1668
|
+
{
|
|
1669
|
+
test: [/Nokia/i],
|
|
1670
|
+
describe(r) {
|
|
1671
|
+
const e = i.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i, r), t = {
|
|
1672
|
+
type: h.mobile,
|
|
1673
|
+
vendor: "Nokia"
|
|
1674
|
+
};
|
|
1675
|
+
return e && (t.model = e), t;
|
|
1676
|
+
}
|
|
1677
|
+
},
|
|
1652
1678
|
/* Mobile */
|
|
1653
1679
|
{
|
|
1654
1680
|
test: [/[^-]mobi/i],
|
|
1655
1681
|
describe() {
|
|
1656
1682
|
return {
|
|
1657
|
-
type:
|
|
1683
|
+
type: h.mobile
|
|
1658
1684
|
};
|
|
1659
1685
|
}
|
|
1660
1686
|
},
|
|
1661
1687
|
/* BlackBerry */
|
|
1662
1688
|
{
|
|
1663
|
-
test(
|
|
1664
|
-
return
|
|
1689
|
+
test(r) {
|
|
1690
|
+
return r.getBrowserName(!0) === "blackberry";
|
|
1665
1691
|
},
|
|
1666
1692
|
describe() {
|
|
1667
1693
|
return {
|
|
1668
|
-
type:
|
|
1694
|
+
type: h.mobile,
|
|
1669
1695
|
vendor: "BlackBerry"
|
|
1670
1696
|
};
|
|
1671
1697
|
}
|
|
1672
1698
|
},
|
|
1673
1699
|
/* Bada */
|
|
1674
1700
|
{
|
|
1675
|
-
test(
|
|
1676
|
-
return
|
|
1701
|
+
test(r) {
|
|
1702
|
+
return r.getBrowserName(!0) === "bada";
|
|
1677
1703
|
},
|
|
1678
1704
|
describe() {
|
|
1679
1705
|
return {
|
|
1680
|
-
type:
|
|
1706
|
+
type: h.mobile
|
|
1681
1707
|
};
|
|
1682
1708
|
}
|
|
1683
1709
|
},
|
|
1684
1710
|
/* Windows Phone */
|
|
1685
1711
|
{
|
|
1686
|
-
test(
|
|
1687
|
-
return
|
|
1712
|
+
test(r) {
|
|
1713
|
+
return r.getBrowserName() === "windows phone";
|
|
1688
1714
|
},
|
|
1689
1715
|
describe() {
|
|
1690
1716
|
return {
|
|
1691
|
-
type:
|
|
1717
|
+
type: h.mobile,
|
|
1692
1718
|
vendor: "Microsoft"
|
|
1693
1719
|
};
|
|
1694
1720
|
}
|
|
1695
1721
|
},
|
|
1696
1722
|
/* Android Tablet */
|
|
1697
1723
|
{
|
|
1698
|
-
test(
|
|
1699
|
-
const e = Number(String(
|
|
1700
|
-
return
|
|
1724
|
+
test(r) {
|
|
1725
|
+
const e = Number(String(r.getOSVersion()).split(".")[0]);
|
|
1726
|
+
return r.getOSName(!0) === "android" && e >= 3;
|
|
1701
1727
|
},
|
|
1702
1728
|
describe() {
|
|
1703
1729
|
return {
|
|
1704
|
-
type:
|
|
1730
|
+
type: h.tablet
|
|
1705
1731
|
};
|
|
1706
1732
|
}
|
|
1707
1733
|
},
|
|
1708
1734
|
/* Android Mobile */
|
|
1709
1735
|
{
|
|
1710
|
-
test(
|
|
1711
|
-
return
|
|
1736
|
+
test(r) {
|
|
1737
|
+
return r.getOSName(!0) === "android";
|
|
1712
1738
|
},
|
|
1713
1739
|
describe() {
|
|
1714
1740
|
return {
|
|
1715
|
-
type:
|
|
1741
|
+
type: h.mobile
|
|
1716
1742
|
};
|
|
1717
1743
|
}
|
|
1718
1744
|
},
|
|
1719
1745
|
/* desktop */
|
|
1720
1746
|
{
|
|
1721
|
-
test(
|
|
1722
|
-
return
|
|
1747
|
+
test(r) {
|
|
1748
|
+
return r.getOSName(!0) === "macos";
|
|
1723
1749
|
},
|
|
1724
1750
|
describe() {
|
|
1725
1751
|
return {
|
|
1726
|
-
type:
|
|
1752
|
+
type: h.desktop,
|
|
1727
1753
|
vendor: "Apple"
|
|
1728
1754
|
};
|
|
1729
1755
|
}
|
|
1730
1756
|
},
|
|
1731
1757
|
/* Windows */
|
|
1732
1758
|
{
|
|
1733
|
-
test(
|
|
1734
|
-
return
|
|
1759
|
+
test(r) {
|
|
1760
|
+
return r.getOSName(!0) === "windows";
|
|
1735
1761
|
},
|
|
1736
1762
|
describe() {
|
|
1737
1763
|
return {
|
|
1738
|
-
type:
|
|
1764
|
+
type: h.desktop
|
|
1739
1765
|
};
|
|
1740
1766
|
}
|
|
1741
1767
|
},
|
|
1742
1768
|
/* Linux */
|
|
1743
1769
|
{
|
|
1744
|
-
test(
|
|
1745
|
-
return
|
|
1770
|
+
test(r) {
|
|
1771
|
+
return r.getOSName(!0) === "linux";
|
|
1746
1772
|
},
|
|
1747
1773
|
describe() {
|
|
1748
1774
|
return {
|
|
1749
|
-
type:
|
|
1775
|
+
type: h.desktop
|
|
1750
1776
|
};
|
|
1751
1777
|
}
|
|
1752
1778
|
},
|
|
1753
1779
|
/* PlayStation 4 */
|
|
1754
1780
|
{
|
|
1755
|
-
test(
|
|
1756
|
-
return
|
|
1781
|
+
test(r) {
|
|
1782
|
+
return r.getOSName(!0) === "playstation 4";
|
|
1757
1783
|
},
|
|
1758
1784
|
describe() {
|
|
1759
1785
|
return {
|
|
1760
|
-
type:
|
|
1786
|
+
type: h.tv
|
|
1761
1787
|
};
|
|
1762
1788
|
}
|
|
1763
1789
|
},
|
|
1764
1790
|
/* Roku */
|
|
1765
1791
|
{
|
|
1766
|
-
test(
|
|
1767
|
-
return
|
|
1792
|
+
test(r) {
|
|
1793
|
+
return r.getOSName(!0) === "roku";
|
|
1768
1794
|
},
|
|
1769
1795
|
describe() {
|
|
1770
1796
|
return {
|
|
1771
|
-
type:
|
|
1797
|
+
type: h.tv
|
|
1772
1798
|
};
|
|
1773
1799
|
}
|
|
1774
1800
|
}
|
|
1775
|
-
],
|
|
1801
|
+
], Ye = [
|
|
1776
1802
|
/* EdgeHTML */
|
|
1777
1803
|
{
|
|
1778
|
-
test(
|
|
1779
|
-
return
|
|
1804
|
+
test(r) {
|
|
1805
|
+
return r.getBrowserName(!0) === "microsoft edge";
|
|
1780
1806
|
},
|
|
1781
|
-
describe(
|
|
1782
|
-
if (/\sedg\//i.test(
|
|
1807
|
+
describe(r) {
|
|
1808
|
+
if (/\sedg\//i.test(r))
|
|
1783
1809
|
return {
|
|
1784
|
-
name:
|
|
1810
|
+
name: S.Blink
|
|
1785
1811
|
};
|
|
1786
|
-
const e = i.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,
|
|
1812
|
+
const e = i.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, r);
|
|
1787
1813
|
return {
|
|
1788
|
-
name:
|
|
1814
|
+
name: S.EdgeHTML,
|
|
1789
1815
|
version: e
|
|
1790
1816
|
};
|
|
1791
1817
|
}
|
|
@@ -1793,36 +1819,36 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1793
1819
|
/* Trident */
|
|
1794
1820
|
{
|
|
1795
1821
|
test: [/trident/i],
|
|
1796
|
-
describe(
|
|
1822
|
+
describe(r) {
|
|
1797
1823
|
const e = {
|
|
1798
|
-
name:
|
|
1799
|
-
},
|
|
1800
|
-
return
|
|
1824
|
+
name: S.Trident
|
|
1825
|
+
}, t = i.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i, r);
|
|
1826
|
+
return t && (e.version = t), e;
|
|
1801
1827
|
}
|
|
1802
1828
|
},
|
|
1803
1829
|
/* Presto */
|
|
1804
1830
|
{
|
|
1805
|
-
test(
|
|
1806
|
-
return
|
|
1831
|
+
test(r) {
|
|
1832
|
+
return r.test(/presto/i);
|
|
1807
1833
|
},
|
|
1808
|
-
describe(
|
|
1834
|
+
describe(r) {
|
|
1809
1835
|
const e = {
|
|
1810
|
-
name:
|
|
1811
|
-
},
|
|
1812
|
-
return
|
|
1836
|
+
name: S.Presto
|
|
1837
|
+
}, t = i.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i, r);
|
|
1838
|
+
return t && (e.version = t), e;
|
|
1813
1839
|
}
|
|
1814
1840
|
},
|
|
1815
1841
|
/* Gecko */
|
|
1816
1842
|
{
|
|
1817
|
-
test(
|
|
1818
|
-
const e =
|
|
1819
|
-
return e && !
|
|
1843
|
+
test(r) {
|
|
1844
|
+
const e = r.test(/gecko/i), t = r.test(/like gecko/i);
|
|
1845
|
+
return e && !t;
|
|
1820
1846
|
},
|
|
1821
|
-
describe(
|
|
1847
|
+
describe(r) {
|
|
1822
1848
|
const e = {
|
|
1823
|
-
name:
|
|
1824
|
-
},
|
|
1825
|
-
return
|
|
1849
|
+
name: S.Gecko
|
|
1850
|
+
}, t = i.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i, r);
|
|
1851
|
+
return t && (e.version = t), e;
|
|
1826
1852
|
}
|
|
1827
1853
|
},
|
|
1828
1854
|
/* Blink */
|
|
@@ -1830,22 +1856,22 @@ const u = /version\/(\d+(\.?_?\d+)+)/i, et = [
|
|
|
1830
1856
|
test: [/(apple)?webkit\/537\.36/i],
|
|
1831
1857
|
describe() {
|
|
1832
1858
|
return {
|
|
1833
|
-
name:
|
|
1859
|
+
name: S.Blink
|
|
1834
1860
|
};
|
|
1835
1861
|
}
|
|
1836
1862
|
},
|
|
1837
1863
|
/* WebKit */
|
|
1838
1864
|
{
|
|
1839
1865
|
test: [/(apple)?webkit/i],
|
|
1840
|
-
describe(
|
|
1866
|
+
describe(r) {
|
|
1841
1867
|
const e = {
|
|
1842
|
-
name:
|
|
1843
|
-
},
|
|
1844
|
-
return
|
|
1868
|
+
name: S.WebKit
|
|
1869
|
+
}, t = i.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i, r);
|
|
1870
|
+
return t && (e.version = t), e;
|
|
1845
1871
|
}
|
|
1846
1872
|
}
|
|
1847
1873
|
];
|
|
1848
|
-
class
|
|
1874
|
+
class W {
|
|
1849
1875
|
/**
|
|
1850
1876
|
* Create instance of Parser
|
|
1851
1877
|
*
|
|
@@ -1858,10 +1884,10 @@ class Y {
|
|
|
1858
1884
|
*
|
|
1859
1885
|
* @constructor
|
|
1860
1886
|
*/
|
|
1861
|
-
constructor(e,
|
|
1887
|
+
constructor(e, t = !1) {
|
|
1862
1888
|
if (e == null || e === "")
|
|
1863
1889
|
throw new Error("UserAgent parameter can't be empty");
|
|
1864
|
-
this._ua = e, this.parsedResult = {},
|
|
1890
|
+
this._ua = e, this.parsedResult = {}, t !== !0 && this.parse();
|
|
1865
1891
|
}
|
|
1866
1892
|
/**
|
|
1867
1893
|
* Get UserAgent string of current Parser instance
|
|
@@ -1886,11 +1912,11 @@ class Y {
|
|
|
1886
1912
|
*/
|
|
1887
1913
|
parseBrowser() {
|
|
1888
1914
|
this.parsedResult.browser = {};
|
|
1889
|
-
const e = i.find(
|
|
1890
|
-
if (typeof
|
|
1891
|
-
return
|
|
1892
|
-
if (
|
|
1893
|
-
return
|
|
1915
|
+
const e = i.find(qe, (t) => {
|
|
1916
|
+
if (typeof t.test == "function")
|
|
1917
|
+
return t.test(this);
|
|
1918
|
+
if (Array.isArray(t.test))
|
|
1919
|
+
return t.test.some((s) => this.test(s));
|
|
1894
1920
|
throw new Error("Browser's test function is not valid");
|
|
1895
1921
|
});
|
|
1896
1922
|
return e && (this.parsedResult.browser = e.describe(this.getUA())), this.parsedResult.browser;
|
|
@@ -1942,11 +1968,11 @@ class Y {
|
|
|
1942
1968
|
*/
|
|
1943
1969
|
parseOS() {
|
|
1944
1970
|
this.parsedResult.os = {};
|
|
1945
|
-
const e = i.find(
|
|
1946
|
-
if (typeof
|
|
1947
|
-
return
|
|
1948
|
-
if (
|
|
1949
|
-
return
|
|
1971
|
+
const e = i.find(je, (t) => {
|
|
1972
|
+
if (typeof t.test == "function")
|
|
1973
|
+
return t.test(this);
|
|
1974
|
+
if (Array.isArray(t.test))
|
|
1975
|
+
return t.test.some((s) => this.test(s));
|
|
1950
1976
|
throw new Error("Browser's test function is not valid");
|
|
1951
1977
|
});
|
|
1952
1978
|
return e && (this.parsedResult.os = e.describe(this.getUA())), this.parsedResult.os;
|
|
@@ -1957,8 +1983,8 @@ class Y {
|
|
|
1957
1983
|
* @return {String} name of the OS — macOS, Windows, Linux, etc.
|
|
1958
1984
|
*/
|
|
1959
1985
|
getOSName(e) {
|
|
1960
|
-
const { name:
|
|
1961
|
-
return e ? String(
|
|
1986
|
+
const { name: t } = this.getOS();
|
|
1987
|
+
return e ? String(t).toLowerCase() || "" : t || "";
|
|
1962
1988
|
}
|
|
1963
1989
|
/**
|
|
1964
1990
|
* Get OS version
|
|
@@ -1980,8 +2006,8 @@ class Y {
|
|
|
1980
2006
|
* @return {*}
|
|
1981
2007
|
*/
|
|
1982
2008
|
getPlatformType(e = !1) {
|
|
1983
|
-
const { type:
|
|
1984
|
-
return e ? String(
|
|
2009
|
+
const { type: t } = this.getPlatform();
|
|
2010
|
+
return e ? String(t).toLowerCase() || "" : t || "";
|
|
1985
2011
|
}
|
|
1986
2012
|
/**
|
|
1987
2013
|
* Get parsed platform
|
|
@@ -1989,11 +2015,11 @@ class Y {
|
|
|
1989
2015
|
*/
|
|
1990
2016
|
parsePlatform() {
|
|
1991
2017
|
this.parsedResult.platform = {};
|
|
1992
|
-
const e = i.find(
|
|
1993
|
-
if (typeof
|
|
1994
|
-
return
|
|
1995
|
-
if (
|
|
1996
|
-
return
|
|
2018
|
+
const e = i.find(Ke, (t) => {
|
|
2019
|
+
if (typeof t.test == "function")
|
|
2020
|
+
return t.test(this);
|
|
2021
|
+
if (Array.isArray(t.test))
|
|
2022
|
+
return t.test.some((s) => this.test(s));
|
|
1997
2023
|
throw new Error("Browser's test function is not valid");
|
|
1998
2024
|
});
|
|
1999
2025
|
return e && (this.parsedResult.platform = e.describe(this.getUA())), this.parsedResult.platform;
|
|
@@ -2020,11 +2046,11 @@ class Y {
|
|
|
2020
2046
|
*/
|
|
2021
2047
|
parseEngine() {
|
|
2022
2048
|
this.parsedResult.engine = {};
|
|
2023
|
-
const e = i.find(
|
|
2024
|
-
if (typeof
|
|
2025
|
-
return
|
|
2026
|
-
if (
|
|
2027
|
-
return
|
|
2049
|
+
const e = i.find(Ye, (t) => {
|
|
2050
|
+
if (typeof t.test == "function")
|
|
2051
|
+
return t.test(this);
|
|
2052
|
+
if (Array.isArray(t.test))
|
|
2053
|
+
return t.test.some((s) => this.test(s));
|
|
2028
2054
|
throw new Error("Browser's test function is not valid");
|
|
2029
2055
|
});
|
|
2030
2056
|
return e && (this.parsedResult.engine = e.describe(this.getUA())), this.parsedResult.engine;
|
|
@@ -2062,62 +2088,77 @@ class Y {
|
|
|
2062
2088
|
* if (browser.satisfies({desktop: { chrome: '>118.01.1322' } }))
|
|
2063
2089
|
*/
|
|
2064
2090
|
satisfies(e) {
|
|
2065
|
-
const
|
|
2091
|
+
const t = {};
|
|
2066
2092
|
let s = 0;
|
|
2067
2093
|
const n = {};
|
|
2068
2094
|
let o = 0;
|
|
2069
2095
|
if (Object.keys(e).forEach((a) => {
|
|
2070
2096
|
const c = e[a];
|
|
2071
|
-
typeof c == "string" ? (n[a] = c, o += 1) : typeof c == "object" && (
|
|
2097
|
+
typeof c == "string" ? (n[a] = c, o += 1) : typeof c == "object" && (t[a] = c, s += 1);
|
|
2072
2098
|
}), s > 0) {
|
|
2073
|
-
const a = Object.keys(
|
|
2099
|
+
const a = Object.keys(t), c = i.find(a, (d) => this.isOS(d));
|
|
2074
2100
|
if (c) {
|
|
2075
|
-
const d = this.satisfies(
|
|
2101
|
+
const d = this.satisfies(t[c]);
|
|
2076
2102
|
if (d !== void 0)
|
|
2077
2103
|
return d;
|
|
2078
2104
|
}
|
|
2079
|
-
const
|
|
2105
|
+
const u = i.find(
|
|
2080
2106
|
a,
|
|
2081
2107
|
(d) => this.isPlatform(d)
|
|
2082
2108
|
);
|
|
2083
|
-
if (
|
|
2084
|
-
const d = this.satisfies(
|
|
2109
|
+
if (u) {
|
|
2110
|
+
const d = this.satisfies(t[u]);
|
|
2085
2111
|
if (d !== void 0)
|
|
2086
2112
|
return d;
|
|
2087
2113
|
}
|
|
2088
2114
|
}
|
|
2089
2115
|
if (o > 0) {
|
|
2090
|
-
const a = Object.keys(n), c = i.find(a, (
|
|
2116
|
+
const a = Object.keys(n), c = i.find(a, (u) => this.isBrowser(u, !0));
|
|
2091
2117
|
if (c !== void 0)
|
|
2092
2118
|
return this.compareVersion(n[c]);
|
|
2093
2119
|
}
|
|
2094
2120
|
}
|
|
2095
2121
|
/**
|
|
2096
2122
|
* Check if the browser name equals the passed string
|
|
2097
|
-
* @param browserName The string to compare with the browser name
|
|
2123
|
+
* @param {string} browserName The string to compare with the browser name
|
|
2098
2124
|
* @param [includingAlias=false] The flag showing whether alias will be included into comparison
|
|
2099
2125
|
* @returns {boolean}
|
|
2100
2126
|
*/
|
|
2101
|
-
isBrowser(e,
|
|
2127
|
+
isBrowser(e, t = !1) {
|
|
2102
2128
|
const s = this.getBrowserName().toLowerCase();
|
|
2103
2129
|
let n = e.toLowerCase();
|
|
2104
2130
|
const o = i.getBrowserTypeByAlias(n);
|
|
2105
|
-
return
|
|
2131
|
+
return t && o && (n = o.toLowerCase()), n === s;
|
|
2106
2132
|
}
|
|
2107
2133
|
compareVersion(e) {
|
|
2108
|
-
let
|
|
2134
|
+
let t = [0], s = e, n = !1;
|
|
2109
2135
|
const o = this.getBrowserVersion();
|
|
2110
2136
|
if (typeof o == "string")
|
|
2111
|
-
return e[0] === ">" || e[0] === "<" ? (s = e.substr(1), e[1] === "=" ? (n = !0, s = e.substr(2)) :
|
|
2137
|
+
return e[0] === ">" || e[0] === "<" ? (s = e.substr(1), e[1] === "=" ? (n = !0, s = e.substr(2)) : t = [], e[0] === ">" ? t.push(1) : t.push(-1)) : e[0] === "=" ? s = e.substr(1) : e[0] === "~" && (n = !0, s = e.substr(1)), t.indexOf(
|
|
2112
2138
|
i.compareVersions(o, s, n)
|
|
2113
2139
|
) > -1;
|
|
2114
2140
|
}
|
|
2141
|
+
/**
|
|
2142
|
+
* Check if the OS name equals the passed string
|
|
2143
|
+
* @param {string} osName The string to compare with the OS name
|
|
2144
|
+
* @returns {boolean}
|
|
2145
|
+
*/
|
|
2115
2146
|
isOS(e) {
|
|
2116
2147
|
return this.getOSName(!0) === String(e).toLowerCase();
|
|
2117
2148
|
}
|
|
2149
|
+
/**
|
|
2150
|
+
* Check if the platform type equals the passed string
|
|
2151
|
+
* @param {string} platformType The string to compare with the platform type
|
|
2152
|
+
* @returns {boolean}
|
|
2153
|
+
*/
|
|
2118
2154
|
isPlatform(e) {
|
|
2119
2155
|
return this.getPlatformType(!0) === String(e).toLowerCase();
|
|
2120
2156
|
}
|
|
2157
|
+
/**
|
|
2158
|
+
* Check if the engine name equals the passed string
|
|
2159
|
+
* @param {string} engineName The string to compare with the engine name
|
|
2160
|
+
* @returns {boolean}
|
|
2161
|
+
*/
|
|
2121
2162
|
isEngine(e) {
|
|
2122
2163
|
return this.getEngineName(!0) === String(e).toLowerCase();
|
|
2123
2164
|
}
|
|
@@ -2128,8 +2169,8 @@ class Y {
|
|
|
2128
2169
|
* @param [includingAlias=false] The flag showing whether alias will be included into comparison
|
|
2129
2170
|
* @returns {Boolean}
|
|
2130
2171
|
*/
|
|
2131
|
-
is(e,
|
|
2132
|
-
return this.isBrowser(e,
|
|
2172
|
+
is(e, t = !1) {
|
|
2173
|
+
return this.isBrowser(e, t) || this.isOS(e) || this.isPlatform(e);
|
|
2133
2174
|
}
|
|
2134
2175
|
/**
|
|
2135
2176
|
* Check if any of the given values satisfies this.is(anything)
|
|
@@ -2137,7 +2178,7 @@ class Y {
|
|
|
2137
2178
|
* @returns {Boolean}
|
|
2138
2179
|
*/
|
|
2139
2180
|
some(e = []) {
|
|
2140
|
-
return e.some((
|
|
2181
|
+
return e.some((t) => this.is(t));
|
|
2141
2182
|
}
|
|
2142
2183
|
}
|
|
2143
2184
|
/*!
|
|
@@ -2146,7 +2187,7 @@ class Y {
|
|
|
2146
2187
|
* MIT License | (c) Dustin Diaz 2012-2015
|
|
2147
2188
|
* MIT License | (c) Denis Demchenko 2015-2019
|
|
2148
2189
|
*/
|
|
2149
|
-
class
|
|
2190
|
+
class Je {
|
|
2150
2191
|
/**
|
|
2151
2192
|
* Creates a {@link Parser} instance
|
|
2152
2193
|
*
|
|
@@ -2160,10 +2201,10 @@ class it {
|
|
|
2160
2201
|
* const parser = Bowser.getParser(window.navigator.userAgent);
|
|
2161
2202
|
* const result = parser.getResult();
|
|
2162
2203
|
*/
|
|
2163
|
-
static getParser(e,
|
|
2204
|
+
static getParser(e, t = !1) {
|
|
2164
2205
|
if (typeof e != "string")
|
|
2165
2206
|
throw new Error("UserAgent should be a string");
|
|
2166
|
-
return new
|
|
2207
|
+
return new W(e, t);
|
|
2167
2208
|
}
|
|
2168
2209
|
/**
|
|
2169
2210
|
* Creates a {@link Parser} instance and runs {@link Parser.getResult} immediately
|
|
@@ -2175,32 +2216,32 @@ class it {
|
|
|
2175
2216
|
* const result = Bowser.parse(window.navigator.userAgent);
|
|
2176
2217
|
*/
|
|
2177
2218
|
static parse(e) {
|
|
2178
|
-
return new
|
|
2219
|
+
return new W(e).getResult();
|
|
2179
2220
|
}
|
|
2180
2221
|
static get BROWSER_MAP() {
|
|
2181
|
-
return
|
|
2222
|
+
return G;
|
|
2182
2223
|
}
|
|
2183
2224
|
static get ENGINE_MAP() {
|
|
2184
|
-
return
|
|
2225
|
+
return S;
|
|
2185
2226
|
}
|
|
2186
2227
|
static get OS_MAP() {
|
|
2187
2228
|
return g;
|
|
2188
2229
|
}
|
|
2189
2230
|
static get PLATFORMS_MAP() {
|
|
2190
|
-
return
|
|
2231
|
+
return h;
|
|
2191
2232
|
}
|
|
2192
2233
|
}
|
|
2193
|
-
const
|
|
2234
|
+
const I = Je.parse(navigator.userAgent), Xe = {
|
|
2194
2235
|
abTestGroup: null,
|
|
2195
2236
|
abTestName: null,
|
|
2196
|
-
browser:
|
|
2197
|
-
browserVersion:
|
|
2198
|
-
hardwarePlatform:
|
|
2237
|
+
browser: I.browser.name ?? null,
|
|
2238
|
+
browserVersion: I.browser.version ?? null,
|
|
2239
|
+
hardwarePlatform: I.browser.name === "Electron" ? "DESKTOP" : "WEB",
|
|
2199
2240
|
isOfflineModeStart: !1,
|
|
2200
2241
|
mobileNetworkType: null,
|
|
2201
2242
|
networkType: "WIFI",
|
|
2202
|
-
operatingSystem:
|
|
2203
|
-
operatingSystemVersion:
|
|
2243
|
+
operatingSystem: I.os.name ?? null,
|
|
2244
|
+
operatingSystemVersion: I.os.version ?? null,
|
|
2204
2245
|
screenHeight: window.screen.height,
|
|
2205
2246
|
screenWidth: window.screen.width,
|
|
2206
2247
|
sessionProductId: "",
|
|
@@ -2210,251 +2251,238 @@ const C = it.parse(navigator.userAgent), nt = {
|
|
|
2210
2251
|
startReason: "IMPLICIT",
|
|
2211
2252
|
streamingSessionId: "",
|
|
2212
2253
|
timestamp: 0
|
|
2213
|
-
},
|
|
2254
|
+
}, Ze = await T(
|
|
2214
2255
|
"streaming_session_start",
|
|
2215
|
-
|
|
2256
|
+
Xe
|
|
2216
2257
|
);
|
|
2217
|
-
function
|
|
2218
|
-
return
|
|
2219
|
-
}
|
|
2220
|
-
function
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2258
|
+
function et(r) {
|
|
2259
|
+
return Ze(r);
|
|
2260
|
+
}
|
|
2261
|
+
async function tt(r) {
|
|
2262
|
+
if (await P())
|
|
2263
|
+
return r();
|
|
2264
|
+
}
|
|
2265
|
+
async function q(r) {
|
|
2266
|
+
const e = {
|
|
2267
|
+
consentCategory: "NECESSARY",
|
|
2268
|
+
..."extras" in r && { extras: r.extras },
|
|
2269
|
+
group: r.group,
|
|
2270
|
+
name: r.name,
|
|
2271
|
+
payload: r.payload,
|
|
2272
|
+
version: r.version
|
|
2273
|
+
}, t = e.payload.streamingSessionId;
|
|
2274
|
+
e.name === "progress" && "streamingSessionId" in e.payload && delete e.payload.streamingSessionId, D.eventSender.sendEvent(e), t && await R.delete({
|
|
2275
|
+
name: e.name,
|
|
2276
|
+
streamingSessionId: t
|
|
2229
2277
|
});
|
|
2230
2278
|
}
|
|
2231
|
-
async function
|
|
2232
|
-
|
|
2233
|
-
const
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
const r = (await Promise.all(e.events)).filter(lt);
|
|
2245
|
-
e.events = r;
|
|
2246
|
-
const { clientId: s, token: n } = await v.credentialsProvider.getCredentials();
|
|
2247
|
-
if (!n)
|
|
2248
|
-
throw new Error("No accessToken");
|
|
2249
|
-
const o = {
|
|
2250
|
-
...e,
|
|
2251
|
-
accessToken: n,
|
|
2252
|
-
apiUrl: M("apiUrl"),
|
|
2253
|
-
appVersion: M("appVersion"),
|
|
2254
|
-
clientId: s,
|
|
2255
|
-
clientPlatform: M("clientPlatform"),
|
|
2256
|
-
eventUrl: M("eventUrl"),
|
|
2257
|
-
ts: y.now()
|
|
2258
|
-
};
|
|
2259
|
-
return t.postMessage(JSON.stringify(o)), o;
|
|
2260
|
-
} else
|
|
2261
|
-
console.warn("Event beacon is not running.");
|
|
2262
|
-
}
|
|
2263
|
-
const ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2264
|
-
__proto__: null,
|
|
2265
|
-
commit: ie,
|
|
2266
|
-
start: dt,
|
|
2267
|
-
get worker() {
|
|
2268
|
-
return F;
|
|
2269
|
-
},
|
|
2270
|
-
workerize: se
|
|
2271
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
2272
|
-
async function ht(t) {
|
|
2273
|
-
if (await B())
|
|
2274
|
-
return t();
|
|
2275
|
-
}
|
|
2276
|
-
function ne(t) {
|
|
2277
|
-
return ht(
|
|
2278
|
-
() => ie(F, {
|
|
2279
|
-
type: "streaming_metrics",
|
|
2280
|
-
...t
|
|
2281
|
-
})
|
|
2282
|
-
);
|
|
2279
|
+
async function j(r) {
|
|
2280
|
+
return tt(async () => {
|
|
2281
|
+
for (const e of r)
|
|
2282
|
+
if (e) {
|
|
2283
|
+
const t = await e;
|
|
2284
|
+
t && await q({
|
|
2285
|
+
group: "streaming_metrics",
|
|
2286
|
+
name: t.name,
|
|
2287
|
+
payload: t.payload,
|
|
2288
|
+
version: 2
|
|
2289
|
+
});
|
|
2290
|
+
}
|
|
2291
|
+
});
|
|
2283
2292
|
}
|
|
2284
|
-
function
|
|
2285
|
-
const e =
|
|
2286
|
-
return ("10000000-1000-4000-8000" + -1e11).replace(/[018]/g, (
|
|
2293
|
+
function rt(r = !0) {
|
|
2294
|
+
const e = r && "crypto" in window && "getRandomValues" in crypto;
|
|
2295
|
+
return ("10000000-1000-4000-8000" + -1e11).replace(/[018]/g, (t) => {
|
|
2287
2296
|
const s = e ? crypto.getRandomValues(new Uint8Array(1))[0] : Math.floor(256 * Math.random());
|
|
2288
|
-
return (
|
|
2297
|
+
return (t ^ (s ?? 0) & 15 >> t / 4).toString(16);
|
|
2289
2298
|
});
|
|
2290
2299
|
}
|
|
2291
|
-
|
|
2292
|
-
|
|
2300
|
+
const L = {
|
|
2301
|
+
BTS: "application/vnd.tidal.bts",
|
|
2302
|
+
DASH: "application/dash+xml",
|
|
2303
|
+
EMU: "application/vnd.tidal.emu",
|
|
2304
|
+
HLS: "application/vnd.apple.mpegurl"
|
|
2305
|
+
};
|
|
2306
|
+
function st(r) {
|
|
2307
|
+
return JSON.parse(atob(r));
|
|
2293
2308
|
}
|
|
2294
|
-
function
|
|
2295
|
-
if ("codecs" in
|
|
2296
|
-
switch (
|
|
2309
|
+
function it(r, e) {
|
|
2310
|
+
if ("codecs" in r)
|
|
2311
|
+
switch (r.codecs) {
|
|
2297
2312
|
case "aac":
|
|
2298
2313
|
return "aac";
|
|
2299
|
-
case "mp4a.40.2":
|
|
2300
|
-
return "mp4a.40.2";
|
|
2301
2314
|
case "aac+":
|
|
2302
2315
|
return "aac+";
|
|
2303
|
-
case "mp4a.40.5":
|
|
2304
|
-
return "mp4a.40.5";
|
|
2305
2316
|
case "flac":
|
|
2306
2317
|
return "flac";
|
|
2307
|
-
case "mqa":
|
|
2308
|
-
return "mqa";
|
|
2309
2318
|
case "mp3":
|
|
2310
2319
|
return "mp3";
|
|
2320
|
+
case "mp4a.40.2":
|
|
2321
|
+
return "mp4a.40.2";
|
|
2322
|
+
case "mp4a.40.5":
|
|
2323
|
+
return "mp4a.40.5";
|
|
2311
2324
|
}
|
|
2312
2325
|
else if (e)
|
|
2313
2326
|
switch (e) {
|
|
2314
|
-
case "LOW":
|
|
2315
|
-
return "mp4a.40.5";
|
|
2316
|
-
case "HIGH":
|
|
2317
|
-
return "mp4a.40.2";
|
|
2318
|
-
case "LOSSLESS":
|
|
2319
2327
|
case "HI_RES":
|
|
2320
2328
|
case "HI_RES_LOSSLESS":
|
|
2329
|
+
case "LOSSLESS":
|
|
2321
2330
|
return "flac";
|
|
2331
|
+
case "HIGH":
|
|
2332
|
+
return "mp4a.40.2";
|
|
2333
|
+
case "LOW":
|
|
2334
|
+
return "mp4a.40.5";
|
|
2322
2335
|
}
|
|
2323
2336
|
return "none";
|
|
2324
2337
|
}
|
|
2325
|
-
function
|
|
2326
|
-
switch (
|
|
2327
|
-
case "mp3":
|
|
2328
|
-
return "mp3";
|
|
2338
|
+
function nt(r) {
|
|
2339
|
+
switch (r) {
|
|
2329
2340
|
case "aac":
|
|
2330
2341
|
case "aac+":
|
|
2331
2342
|
case "mp4a.40.2":
|
|
2332
2343
|
case "mp4a.40.5":
|
|
2333
2344
|
return "aac";
|
|
2334
2345
|
case "flac":
|
|
2335
|
-
|
|
2336
|
-
|
|
2346
|
+
return r;
|
|
2347
|
+
case "mp3":
|
|
2348
|
+
return "mp3";
|
|
2337
2349
|
default:
|
|
2338
2350
|
return;
|
|
2339
2351
|
}
|
|
2340
2352
|
}
|
|
2341
|
-
function
|
|
2342
|
-
const e = /codecs=(["'])?((?:.(?!\1|>))*.?)\1?/.exec(
|
|
2353
|
+
function at(r) {
|
|
2354
|
+
const e = /codecs=(["'])?((?:.(?!\1|>))*.?)\1?/.exec(r);
|
|
2343
2355
|
if (e === null)
|
|
2344
2356
|
return;
|
|
2345
|
-
const
|
|
2346
|
-
if (
|
|
2357
|
+
const t = e[2] ?? "";
|
|
2358
|
+
if (t.includes("mp4a") || t.includes("aac"))
|
|
2347
2359
|
return "aac";
|
|
2348
|
-
if (
|
|
2349
|
-
return
|
|
2350
|
-
}
|
|
2351
|
-
function
|
|
2352
|
-
const
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2360
|
+
if (t === "flac")
|
|
2361
|
+
return t;
|
|
2362
|
+
}
|
|
2363
|
+
function ot(r) {
|
|
2364
|
+
const e = /PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?/.exec(r);
|
|
2365
|
+
if (!e)
|
|
2366
|
+
throw new Error("Invalid duration format");
|
|
2367
|
+
const t = parseFloat(e[1] || "0"), s = parseFloat(e[2] || "0"), n = parseFloat(e[3] || "0");
|
|
2368
|
+
return t * 3600 + s * 60 + n;
|
|
2369
|
+
}
|
|
2370
|
+
function ct(r) {
|
|
2371
|
+
const e = /mediaPresentationDuration="([^"]+)"/.exec(r);
|
|
2372
|
+
if (e) {
|
|
2373
|
+
const t = e[1];
|
|
2374
|
+
if (t)
|
|
2375
|
+
return ot(t);
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
function dt(r) {
|
|
2379
|
+
const { prefetched: e, streamingSessionId: t } = r, s = "albumReplayGain" in r ? {
|
|
2380
|
+
albumPeakAmplitude: r.albumPeakAmplitude,
|
|
2381
|
+
albumReplayGain: r.albumReplayGain,
|
|
2382
|
+
trackPeakAmplitude: r.trackPeakAmplitude,
|
|
2383
|
+
trackReplayGain: r.trackReplayGain
|
|
2384
|
+
} : {}, n = "audioQuality" in r ? r.audioQuality : r.videoQuality, o = {
|
|
2358
2385
|
id: String(
|
|
2359
|
-
"videoId" in
|
|
2386
|
+
"videoId" in r ? r.videoId : r.trackId
|
|
2360
2387
|
),
|
|
2361
|
-
type: "trackId" in
|
|
2388
|
+
type: "trackId" in r ? "track" : "video"
|
|
2362
2389
|
};
|
|
2363
|
-
if (
|
|
2364
|
-
const a =
|
|
2390
|
+
if (r.manifestMimeType === L.BTS || r.manifestMimeType === L.EMU) {
|
|
2391
|
+
const a = st(r.manifest), c = a.urls[0], u = it(
|
|
2365
2392
|
a,
|
|
2366
|
-
"audioQuality" in
|
|
2393
|
+
"audioQuality" in r ? r.audioQuality : null
|
|
2367
2394
|
);
|
|
2368
2395
|
let d;
|
|
2369
|
-
return "keyId" in a && (d = a.keyId), "licenseSecurityToken" in
|
|
2396
|
+
return "keyId" in a && (d = a.keyId), "licenseSecurityToken" in r && (d = r.licenseSecurityToken), {
|
|
2370
2397
|
...s,
|
|
2371
|
-
bitDepth: "bitDepth" in
|
|
2372
|
-
codec:
|
|
2398
|
+
bitDepth: "bitDepth" in r ? r.bitDepth ?? void 0 : void 0,
|
|
2399
|
+
codec: nt(u),
|
|
2373
2400
|
prefetched: e,
|
|
2374
2401
|
quality: n,
|
|
2375
|
-
sampleRate: "sampleRate" in
|
|
2402
|
+
sampleRate: "sampleRate" in r ? r.sampleRate ?? void 0 : void 0,
|
|
2376
2403
|
securityToken: d,
|
|
2377
|
-
streamFormat:
|
|
2404
|
+
streamFormat: u,
|
|
2378
2405
|
streamUrl: c,
|
|
2379
|
-
streamingSessionId:
|
|
2406
|
+
streamingSessionId: t,
|
|
2380
2407
|
...o,
|
|
2381
|
-
expires:
|
|
2408
|
+
expires: r.expires
|
|
2382
2409
|
};
|
|
2383
2410
|
}
|
|
2384
|
-
if (
|
|
2385
|
-
const a = `data:${
|
|
2411
|
+
if (r.manifestMimeType === L.DASH) {
|
|
2412
|
+
const a = `data:${r.manifestMimeType};base64,${r.manifest}`, c = atob(r.manifest);
|
|
2386
2413
|
return {
|
|
2387
2414
|
...s,
|
|
2388
|
-
bitDepth: "bitDepth" in
|
|
2389
|
-
codec:
|
|
2415
|
+
bitDepth: "bitDepth" in r ? r.bitDepth ?? void 0 : void 0,
|
|
2416
|
+
codec: at(c),
|
|
2417
|
+
duration: ct(c),
|
|
2390
2418
|
prefetched: e,
|
|
2391
2419
|
quality: n,
|
|
2392
|
-
sampleRate: "sampleRate" in
|
|
2393
|
-
securityToken:
|
|
2420
|
+
sampleRate: "sampleRate" in r ? r.sampleRate ?? void 0 : void 0,
|
|
2421
|
+
securityToken: r.licenseSecurityToken,
|
|
2394
2422
|
streamUrl: a,
|
|
2395
|
-
streamingSessionId:
|
|
2423
|
+
streamingSessionId: t,
|
|
2396
2424
|
...o,
|
|
2397
|
-
expires:
|
|
2425
|
+
expires: r.expires
|
|
2398
2426
|
};
|
|
2399
2427
|
}
|
|
2400
2428
|
throw new TypeError(
|
|
2401
|
-
`${
|
|
2429
|
+
`${r.manifestMimeType} not supported as playback info manifest mime type.`
|
|
2402
2430
|
);
|
|
2403
2431
|
}
|
|
2404
|
-
const
|
|
2432
|
+
const K = async (r, e = {}, t = 3) => {
|
|
2405
2433
|
let s, n;
|
|
2406
2434
|
try {
|
|
2407
|
-
s = await fetch(
|
|
2435
|
+
s = await fetch(r, e);
|
|
2408
2436
|
} catch (c) {
|
|
2409
|
-
if (
|
|
2437
|
+
if (t === 0)
|
|
2410
2438
|
throw c;
|
|
2411
2439
|
n = null;
|
|
2412
2440
|
}
|
|
2413
2441
|
if (s?.ok)
|
|
2414
2442
|
return s;
|
|
2415
2443
|
const o = s && s.status >= 500 && s.status <= 599, a = n === null || o || s?.status === 429;
|
|
2416
|
-
if (
|
|
2417
|
-
const c = 500 * Math.abs(4 -
|
|
2444
|
+
if (t > 0 && a) {
|
|
2445
|
+
const c = 500 * Math.abs(4 - t);
|
|
2418
2446
|
return console.debug(
|
|
2419
2447
|
`Retrying request for ${Math.abs(
|
|
2420
|
-
4 -
|
|
2448
|
+
4 - t
|
|
2421
2449
|
)}th time in ${c}ms`
|
|
2422
|
-
), await
|
|
2450
|
+
), await fe(c), K(r, e, t - 1);
|
|
2423
2451
|
}
|
|
2424
2452
|
if (!s)
|
|
2425
2453
|
throw new Error("Retries exchaused. Cannot fetch playbackinfo.");
|
|
2426
2454
|
return s;
|
|
2427
2455
|
};
|
|
2428
|
-
function
|
|
2456
|
+
function lt(r, e) {
|
|
2429
2457
|
switch (e) {
|
|
2458
|
+
case 4010:
|
|
2459
|
+
return "PEMonthlyStreamQuotaExceeded";
|
|
2430
2460
|
case 4032:
|
|
2431
2461
|
case 4035:
|
|
2432
2462
|
return "PEContentNotAvailableInLocation";
|
|
2433
2463
|
case 4033:
|
|
2434
2464
|
return "PEContentNotAvailableForSubscription";
|
|
2435
|
-
case 4010:
|
|
2436
|
-
return "PEMonthlyStreamQuotaExceeded";
|
|
2437
2465
|
}
|
|
2438
|
-
return
|
|
2466
|
+
return r >= 500 && r < 600 || r === 429 ? "PERetryable" : r >= 400 && r < 500 ? "PENotAllowed" : "EUnexpected";
|
|
2439
2467
|
}
|
|
2440
|
-
async function
|
|
2468
|
+
async function ut(r) {
|
|
2441
2469
|
const {
|
|
2442
2470
|
accessToken: e,
|
|
2443
|
-
audioQuality:
|
|
2471
|
+
audioQuality: t,
|
|
2444
2472
|
clientId: s,
|
|
2445
2473
|
mediaProduct: n,
|
|
2446
2474
|
prefetch: o,
|
|
2447
2475
|
streamingSessionId: a
|
|
2448
|
-
} =
|
|
2476
|
+
} = r, c = _("apiUrl"), u = new URL(
|
|
2449
2477
|
`${c}/${n.productType}s/${n.productId}/playbackinfo`
|
|
2450
|
-
), d =
|
|
2451
|
-
n.productType === "video" ? d.set("videoquality", "HIGH") : d.set("audioquality",
|
|
2478
|
+
), d = u.searchParams;
|
|
2479
|
+
n.productType === "video" ? d.set("videoquality", "HIGH") : d.set("audioquality", t), d.set("playbackmode", "STREAM"), d.set("assetpresentation", "FULL");
|
|
2452
2480
|
const b = new Headers();
|
|
2453
2481
|
o && b.set("x-tidal-prefetch", "true"), s && b.set("x-tidal-token", s), e && b.set("authorization", "Bearer " + e), a && b.set("x-tidal-streamingsessionid", a);
|
|
2454
|
-
let
|
|
2482
|
+
let M;
|
|
2455
2483
|
try {
|
|
2456
|
-
|
|
2457
|
-
|
|
2484
|
+
M = await K(
|
|
2485
|
+
u.toString(),
|
|
2458
2486
|
{
|
|
2459
2487
|
headers: b,
|
|
2460
2488
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -2464,37 +2492,62 @@ async function vt(t) {
|
|
|
2464
2492
|
3
|
|
2465
2493
|
);
|
|
2466
2494
|
} catch {
|
|
2467
|
-
throw new
|
|
2495
|
+
throw new C("PENetwork", "NPBI0");
|
|
2468
2496
|
}
|
|
2469
|
-
const f = await
|
|
2497
|
+
const f = await M.json();
|
|
2470
2498
|
if ("status" in f) {
|
|
2471
|
-
const
|
|
2472
|
-
throw new
|
|
2499
|
+
const ae = `A${f.subStatus}`;
|
|
2500
|
+
throw new C(lt(f.status, f.subStatus), ae);
|
|
2473
2501
|
}
|
|
2474
|
-
const
|
|
2475
|
-
if (!
|
|
2476
|
-
throw new
|
|
2502
|
+
const ie = "trackId" in f, ne = "videoId" in f;
|
|
2503
|
+
if (!ie && !ne)
|
|
2504
|
+
throw new C("EUnexpected", "B9999");
|
|
2477
2505
|
return {
|
|
2478
2506
|
...f,
|
|
2507
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
2508
|
+
expires: Date.now() + 36e5,
|
|
2479
2509
|
prefetched: o
|
|
2480
2510
|
};
|
|
2481
2511
|
}
|
|
2482
|
-
|
|
2483
|
-
const {
|
|
2512
|
+
function ht(r) {
|
|
2513
|
+
const { mediaProduct: e, streamingSessionId: t } = r;
|
|
2514
|
+
return {
|
|
2515
|
+
assetPresentation: "FULL",
|
|
2516
|
+
audioMode: "STEREO",
|
|
2517
|
+
audioQuality: "LOW",
|
|
2518
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
2519
|
+
expires: Date.now() + 36e5,
|
|
2520
|
+
manifest: btoa(
|
|
2521
|
+
JSON.stringify({
|
|
2522
|
+
mimeType: L.HLS,
|
|
2523
|
+
urls: [
|
|
2524
|
+
`https://fsu.fa.tidal.com/storage/${e.productId}.m3u8`
|
|
2525
|
+
]
|
|
2526
|
+
})
|
|
2527
|
+
),
|
|
2528
|
+
manifestMimeType: L.EMU,
|
|
2529
|
+
prefetched: !1,
|
|
2530
|
+
streamType: "ON_DEMAND",
|
|
2531
|
+
streamingSessionId: t,
|
|
2532
|
+
trackId: e.productId
|
|
2533
|
+
};
|
|
2534
|
+
}
|
|
2535
|
+
async function mt(r) {
|
|
2536
|
+
const { streamingSessionId: e } = r, t = [];
|
|
2484
2537
|
performance.mark("streaming_metrics:playback_info_fetch:startTimestamp", {
|
|
2485
2538
|
detail: e,
|
|
2486
2539
|
startTime: y.now()
|
|
2487
2540
|
});
|
|
2488
2541
|
try {
|
|
2489
|
-
|
|
2490
|
-
if (s === void 0)
|
|
2542
|
+
let s;
|
|
2543
|
+
if (r.mediaProduct.productType === "demo" ? s = ht(r) : s = await ut(r), s === void 0)
|
|
2491
2544
|
throw new Error("Playback info was fetched, but undefined.");
|
|
2492
|
-
|
|
2545
|
+
N({
|
|
2493
2546
|
endReason: "COMPLETE",
|
|
2494
2547
|
streamingSessionId: e
|
|
2495
|
-
}).catch(console.error)
|
|
2548
|
+
}).catch(console.error);
|
|
2496
2549
|
const n = "adInfo" in s;
|
|
2497
|
-
return "trackId" in s ?
|
|
2550
|
+
return "trackId" in s ? z({
|
|
2498
2551
|
actualAssetPresentation: s.assetPresentation,
|
|
2499
2552
|
actualAudioMode: s.audioMode,
|
|
2500
2553
|
actualProductId: String(s.trackId),
|
|
@@ -2503,7 +2556,7 @@ async function St(t) {
|
|
|
2503
2556
|
hasAds: n,
|
|
2504
2557
|
productType: "TRACK",
|
|
2505
2558
|
streamingSessionId: e
|
|
2506
|
-
}).catch(console.error) :
|
|
2559
|
+
}).catch(console.error) : z({
|
|
2507
2560
|
actualAssetPresentation: s.assetPresentation,
|
|
2508
2561
|
actualAudioMode: void 0,
|
|
2509
2562
|
actualProductId: String(s.videoId),
|
|
@@ -2520,13 +2573,13 @@ async function St(t) {
|
|
|
2520
2573
|
throw performance.mark("streaming_metrics:playback_info_fetch:endTimestamp", {
|
|
2521
2574
|
detail: e,
|
|
2522
2575
|
startTime: y.now()
|
|
2523
|
-
}),
|
|
2576
|
+
}), N({
|
|
2524
2577
|
endReason: "ERROR",
|
|
2525
2578
|
errorCode: s.message,
|
|
2526
2579
|
errorMessage: s.stack,
|
|
2527
2580
|
streamingSessionId: e
|
|
2528
|
-
}).catch(console.error),
|
|
2529
|
-
|
|
2581
|
+
}).catch(console.error), t.push(
|
|
2582
|
+
Qe({
|
|
2530
2583
|
streamingSessionId: e,
|
|
2531
2584
|
timestamp: y.timestamp(
|
|
2532
2585
|
"streaming_metrics:playback_info_fetch:endTimestamp"
|
|
@@ -2534,8 +2587,8 @@ async function St(t) {
|
|
|
2534
2587
|
})
|
|
2535
2588
|
), s;
|
|
2536
2589
|
} finally {
|
|
2537
|
-
|
|
2538
|
-
|
|
2590
|
+
t.push(
|
|
2591
|
+
N({
|
|
2539
2592
|
endTimestamp: y.timestamp(
|
|
2540
2593
|
"streaming_metrics:playback_info_fetch:endTimestamp"
|
|
2541
2594
|
),
|
|
@@ -2544,51 +2597,43 @@ async function St(t) {
|
|
|
2544
2597
|
),
|
|
2545
2598
|
streamingSessionId: e
|
|
2546
2599
|
})
|
|
2547
|
-
),
|
|
2548
|
-
events: r
|
|
2549
|
-
}).catch(console.error), performance.clearMarks(
|
|
2600
|
+
), j(t).catch(console.error), performance.clearMarks(
|
|
2550
2601
|
"streaming_metrics:playback_info_fetch:endTimestamp"
|
|
2551
2602
|
), performance.clearMarks(
|
|
2552
2603
|
"streaming_metrics:playback_info_fetch:startTimestamp"
|
|
2553
2604
|
);
|
|
2554
2605
|
}
|
|
2555
2606
|
}
|
|
2556
|
-
class
|
|
2607
|
+
class Y {
|
|
2557
2608
|
/**
|
|
2558
2609
|
* The current time position to restore playback from when connection is back online.
|
|
2559
2610
|
*/
|
|
2560
2611
|
static #e = 0;
|
|
2561
|
-
static #
|
|
2612
|
+
static #r = !1;
|
|
2562
2613
|
/**
|
|
2563
2614
|
* The media product to restore when connection is back online.
|
|
2564
2615
|
*/
|
|
2565
2616
|
static #s = null;
|
|
2566
|
-
static #
|
|
2617
|
+
static #t;
|
|
2567
2618
|
static #i;
|
|
2568
2619
|
static #n;
|
|
2569
|
-
static disable() {
|
|
2570
|
-
this.#t && (this.#r && window.removeEventListener("offline", this.#r, !1), this.#i && window.removeEventListener("online", this.#i, !1), this.#i = void 0, this.#r = void 0, this.#t = !1);
|
|
2571
|
-
}
|
|
2572
|
-
static enable() {
|
|
2573
|
-
this.#t || (this.#i = () => this.#o(), this.#r = () => this.#a(), window.addEventListener("offline", this.#r, !1), window.addEventListener("online", this.#i, !1), this.#t = !0);
|
|
2574
|
-
}
|
|
2575
2620
|
static #a() {
|
|
2576
2621
|
const { activePlayer: e } = p;
|
|
2577
|
-
|
|
2622
|
+
e?.hasStarted() && (this.#s = e.currentMediaProduct, this.#n = this.#d.bind(this), m.addEventListener(
|
|
2578
2623
|
"playback-state-change",
|
|
2579
2624
|
this.#n
|
|
2580
2625
|
));
|
|
2581
2626
|
}
|
|
2582
2627
|
static #o() {
|
|
2583
2628
|
const { activePlayer: e } = p;
|
|
2584
|
-
|
|
2629
|
+
e?.hasStarted() && (e.playbackState !== "PLAYING" && this.#s && (m.dispatchEvent(
|
|
2585
2630
|
new CustomEvent("load", {
|
|
2586
2631
|
detail: {
|
|
2587
2632
|
currentTime: this.#e,
|
|
2588
2633
|
mediaProduct: this.#s
|
|
2589
2634
|
}
|
|
2590
2635
|
})
|
|
2591
|
-
), this.#c()),
|
|
2636
|
+
), this.#c()), m.removeEventListener(
|
|
2592
2637
|
"playback-state-change",
|
|
2593
2638
|
this.#n
|
|
2594
2639
|
));
|
|
@@ -2600,36 +2645,42 @@ class oe {
|
|
|
2600
2645
|
const { activePlayer: e } = p;
|
|
2601
2646
|
e && (this.#e = e.currentTime);
|
|
2602
2647
|
}
|
|
2648
|
+
static disable() {
|
|
2649
|
+
this.#r && (this.#t && window.removeEventListener("offline", this.#t, !1), this.#i && window.removeEventListener("online", this.#i, !1), this.#i = void 0, this.#t = void 0, this.#r = !1);
|
|
2650
|
+
}
|
|
2651
|
+
static enable() {
|
|
2652
|
+
this.#r || (this.#i = () => this.#o(), this.#t = () => this.#a(), window.addEventListener("offline", this.#t, !1), window.addEventListener("online", this.#i, !1), this.#r = !0);
|
|
2653
|
+
}
|
|
2603
2654
|
}
|
|
2604
|
-
const
|
|
2605
|
-
function
|
|
2606
|
-
return new CustomEvent(
|
|
2607
|
-
detail:
|
|
2655
|
+
const pt = "streaming-privileges-revoked";
|
|
2656
|
+
function ft(r) {
|
|
2657
|
+
return new CustomEvent(pt, {
|
|
2658
|
+
detail: r
|
|
2608
2659
|
});
|
|
2609
2660
|
}
|
|
2610
|
-
let
|
|
2611
|
-
async function
|
|
2612
|
-
const e =
|
|
2661
|
+
let k;
|
|
2662
|
+
async function J(r) {
|
|
2663
|
+
const e = _("apiUrl"), t = await fetch(e + "/rt/connect", {
|
|
2613
2664
|
headers: new Headers({
|
|
2614
|
-
Authorization: "Bearer " +
|
|
2665
|
+
Authorization: "Bearer " + r,
|
|
2615
2666
|
"Content-Type": "application/json"
|
|
2616
2667
|
}),
|
|
2617
2668
|
method: "POST"
|
|
2618
|
-
}), { url: s } = await
|
|
2669
|
+
}), { url: s } = await t.json();
|
|
2619
2670
|
return s;
|
|
2620
2671
|
}
|
|
2621
|
-
function
|
|
2672
|
+
function X(r) {
|
|
2622
2673
|
return new Promise((e) => {
|
|
2623
|
-
|
|
2674
|
+
r.addEventListener("open", () => e(), { once: !0 });
|
|
2624
2675
|
});
|
|
2625
2676
|
}
|
|
2626
|
-
class
|
|
2677
|
+
class F {
|
|
2627
2678
|
#e;
|
|
2628
|
-
#t;
|
|
2629
|
-
#s;
|
|
2630
2679
|
#r;
|
|
2680
|
+
#s;
|
|
2681
|
+
#t;
|
|
2631
2682
|
constructor() {
|
|
2632
|
-
this.#
|
|
2683
|
+
this.#t = void 0, this.#r = this.#i(), m.addEventListener("user-action", () => {
|
|
2633
2684
|
this.connected && this.userAction().then().catch(console.error);
|
|
2634
2685
|
});
|
|
2635
2686
|
}
|
|
@@ -2637,43 +2688,43 @@ class z {
|
|
|
2637
2688
|
* Call this method to ensure pushkin is running.
|
|
2638
2689
|
*/
|
|
2639
2690
|
static async ensure() {
|
|
2640
|
-
await
|
|
2691
|
+
await P() && (k ? k.connected || await k.reconnect() : k = new F());
|
|
2641
2692
|
}
|
|
2642
2693
|
/**
|
|
2643
2694
|
* Call this method when credentials changes to re-setup pushkin with the new credentials
|
|
2644
2695
|
*/
|
|
2645
2696
|
static async refresh() {
|
|
2646
|
-
if (!await
|
|
2697
|
+
if (!await P())
|
|
2647
2698
|
return;
|
|
2648
|
-
const e = await
|
|
2649
|
-
|
|
2699
|
+
const e = await V();
|
|
2700
|
+
k && e && k.reconnect().catch(console.error);
|
|
2650
2701
|
}
|
|
2651
2702
|
async #i() {
|
|
2652
|
-
const e = await
|
|
2703
|
+
const e = await V();
|
|
2653
2704
|
if (!e)
|
|
2654
2705
|
throw new Error("No access token to connect to Pushkin.");
|
|
2655
|
-
const
|
|
2656
|
-
|
|
2706
|
+
const t = await J(e);
|
|
2707
|
+
t && (this.#t = new WebSocket(t), await X(this.#t), this.#s = (s) => this.#o(s.data), this.#e = () => this.#a(), this.#t.addEventListener("message", this.#s, !1), this.#t.addEventListener("closed", this.#e, !1), window.addEventListener("online", () => this.#a(), {
|
|
2657
2708
|
once: !0
|
|
2658
2709
|
}));
|
|
2659
2710
|
}
|
|
2660
2711
|
async #n(e) {
|
|
2661
|
-
if (!this.#
|
|
2712
|
+
if (!this.#t)
|
|
2662
2713
|
throw new Error(
|
|
2663
2714
|
"No socket connected. Did you forget to call connect method in Pushkin service first?"
|
|
2664
2715
|
);
|
|
2665
|
-
this.#
|
|
2716
|
+
this.#t.readyState !== WebSocket.OPEN && await this.#r, this.#t.send(JSON.stringify(e));
|
|
2666
2717
|
}
|
|
2667
2718
|
#a() {
|
|
2668
|
-
this.#
|
|
2719
|
+
this.#r = this.#i();
|
|
2669
2720
|
}
|
|
2670
2721
|
#o(e) {
|
|
2671
|
-
const
|
|
2672
|
-
switch (
|
|
2722
|
+
const t = JSON.parse(e);
|
|
2723
|
+
switch (t.type) {
|
|
2673
2724
|
case "PRIVILEGED_SESSION_NOTIFICATION": {
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
String(
|
|
2725
|
+
m.dispatchEvent(
|
|
2726
|
+
ft(
|
|
2727
|
+
String(t.payload.clientDisplayName)
|
|
2677
2728
|
)
|
|
2678
2729
|
), p.activePlayer?.pause();
|
|
2679
2730
|
break;
|
|
@@ -2682,12 +2733,12 @@ class z {
|
|
|
2682
2733
|
this.reconnect().catch(console.error);
|
|
2683
2734
|
break;
|
|
2684
2735
|
default:
|
|
2685
|
-
console.warn("Unhandled event from Pushkin: ",
|
|
2736
|
+
console.warn("Unhandled event from Pushkin: ", t);
|
|
2686
2737
|
break;
|
|
2687
2738
|
}
|
|
2688
2739
|
}
|
|
2689
2740
|
reconnect() {
|
|
2690
|
-
return this.#
|
|
2741
|
+
return this.#t ? (this.#s && this.#t.removeEventListener("message", this.#s), this.#e && this.#t.removeEventListener("closed", this.#e), this.#t.close(), this.#r = this.#i(), this.#r) : Promise.resolve();
|
|
2691
2742
|
}
|
|
2692
2743
|
/**
|
|
2693
2744
|
* Call this method to tell Pushkin a user action happened, so it can
|
|
@@ -2707,19 +2758,22 @@ class z {
|
|
|
2707
2758
|
}
|
|
2708
2759
|
}
|
|
2709
2760
|
get connected() {
|
|
2710
|
-
return this.#
|
|
2761
|
+
return this.#t && this.#t.readyState === WebSocket.OPEN;
|
|
2711
2762
|
}
|
|
2712
2763
|
}
|
|
2713
|
-
const
|
|
2764
|
+
const gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2714
2765
|
__proto__: null,
|
|
2715
|
-
Pushkin:
|
|
2716
|
-
fetchWebSocketURL:
|
|
2717
|
-
socketOpen:
|
|
2766
|
+
Pushkin: F,
|
|
2767
|
+
fetchWebSocketURL: J,
|
|
2768
|
+
socketOpen: X
|
|
2718
2769
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2719
|
-
async function
|
|
2720
|
-
|
|
2770
|
+
async function yt() {
|
|
2771
|
+
Le(), Y.disable(), await Te();
|
|
2772
|
+
}
|
|
2773
|
+
function Ut(r, e) {
|
|
2774
|
+
return r === "FULL" && e.sourceType !== "PRIVATE_LINK_SHARING";
|
|
2721
2775
|
}
|
|
2722
|
-
const
|
|
2776
|
+
const wt = {
|
|
2723
2777
|
actions: [],
|
|
2724
2778
|
actualAssetPresentation: "PREVIEW",
|
|
2725
2779
|
actualAudioMode: "STEREO",
|
|
@@ -2735,21 +2789,59 @@ const Tt = {
|
|
|
2735
2789
|
sourceType: "",
|
|
2736
2790
|
startAssetPosition: -1,
|
|
2737
2791
|
startTimestamp: -1
|
|
2738
|
-
},
|
|
2792
|
+
}, Z = await T(
|
|
2739
2793
|
"playback_session",
|
|
2740
|
-
|
|
2794
|
+
wt
|
|
2741
2795
|
);
|
|
2742
|
-
function
|
|
2743
|
-
|
|
2796
|
+
async function Vt(r) {
|
|
2797
|
+
const e = await Z(r);
|
|
2798
|
+
if (!e) {
|
|
2799
|
+
console.error("reducedData is undefined");
|
|
2800
|
+
return;
|
|
2801
|
+
}
|
|
2802
|
+
const { name: t, streamingSessionId: s } = e, { extras: n, ...o } = e.payload;
|
|
2803
|
+
return {
|
|
2804
|
+
extras: n,
|
|
2805
|
+
name: t,
|
|
2806
|
+
payload: o,
|
|
2807
|
+
streamingSessionId: s
|
|
2808
|
+
};
|
|
2744
2809
|
}
|
|
2745
|
-
function
|
|
2746
|
-
return
|
|
2810
|
+
function zt(r, e) {
|
|
2811
|
+
return Z({
|
|
2747
2812
|
actions: [e],
|
|
2748
|
-
streamingSessionId:
|
|
2813
|
+
streamingSessionId: r
|
|
2749
2814
|
});
|
|
2750
2815
|
}
|
|
2751
|
-
|
|
2752
|
-
|
|
2816
|
+
function Wt(r) {
|
|
2817
|
+
switch (r) {
|
|
2818
|
+
case "demo":
|
|
2819
|
+
return "UC";
|
|
2820
|
+
case "video":
|
|
2821
|
+
return "VIDEO";
|
|
2822
|
+
case "track":
|
|
2823
|
+
default:
|
|
2824
|
+
return "TRACK";
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
async function $t(r) {
|
|
2828
|
+
const e = await P();
|
|
2829
|
+
for (const t of r)
|
|
2830
|
+
if (t) {
|
|
2831
|
+
const s = await t;
|
|
2832
|
+
s && await q({
|
|
2833
|
+
..."extras" in s && { extras: s.extras },
|
|
2834
|
+
group: e ? "play_log" : "play_log_open",
|
|
2835
|
+
name: s.name,
|
|
2836
|
+
payload: s.payload,
|
|
2837
|
+
version: 2
|
|
2838
|
+
});
|
|
2839
|
+
}
|
|
2840
|
+
}
|
|
2841
|
+
async function ee(r, e = 0, t = !1) {
|
|
2842
|
+
if (!D.hasEventSender())
|
|
2843
|
+
throw new Error("Playback not allowed without an event sender.");
|
|
2844
|
+
if (await y.synchronize(), F.ensure().catch(console.error), p.activePlayer?.nextItem && p.activePlayer.nextItem.mediaProduct.productId === r.productId) {
|
|
2753
2845
|
const f = p.activePlayer;
|
|
2754
2846
|
return performance.mark(
|
|
2755
2847
|
"streaming_metrics:playback_statistics:idealStartTimestamp",
|
|
@@ -2757,148 +2849,143 @@ async function ue(t, e = 0, r = !1) {
|
|
|
2757
2849
|
detail: p.preloadedStreamingSessionId,
|
|
2758
2850
|
startTime: y.now()
|
|
2759
2851
|
}
|
|
2760
|
-
), await f.reset({ keepPreload: !0 }),
|
|
2852
|
+
), await f.reset({ keepPreload: !0 }), r.referenceId && p.preloadedStreamingSessionId && f.overwriteMediaProduct(
|
|
2761
2853
|
p.preloadedStreamingSessionId,
|
|
2762
|
-
|
|
2854
|
+
r
|
|
2763
2855
|
), f.skipToPreloadedMediaProduct();
|
|
2764
2856
|
}
|
|
2765
|
-
const s =
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
]
|
|
2777
|
-
}).catch(console.error), performance.mark(
|
|
2857
|
+
const s = yt(), n = rt();
|
|
2858
|
+
j([
|
|
2859
|
+
et({
|
|
2860
|
+
sessionProductId: r.productId,
|
|
2861
|
+
sessionProductType: r.productType === "track" ? "TRACK" : "VIDEO",
|
|
2862
|
+
sessionType: "PLAYBACK",
|
|
2863
|
+
startReason: "EXPLICIT",
|
|
2864
|
+
streamingSessionId: n,
|
|
2865
|
+
timestamp: y.now()
|
|
2866
|
+
})
|
|
2867
|
+
]).catch(console.error), performance.mark(
|
|
2778
2868
|
"streaming_metrics:playback_statistics:idealStartTimestamp",
|
|
2779
2869
|
{
|
|
2780
2870
|
detail: n,
|
|
2781
2871
|
startTime: y.now()
|
|
2782
2872
|
}
|
|
2783
2873
|
);
|
|
2784
|
-
const { clientId: o, token: a } = await v.credentialsProvider.getCredentials(), c =
|
|
2785
|
-
let
|
|
2874
|
+
const { clientId: o, token: a } = await v.credentialsProvider.getCredentials(), c = _("streamingWifiAudioQuality");
|
|
2875
|
+
let u = null;
|
|
2786
2876
|
try {
|
|
2787
|
-
|
|
2877
|
+
u = await mt({
|
|
2788
2878
|
accessToken: a,
|
|
2789
2879
|
audioQuality: c,
|
|
2790
2880
|
clientId: o,
|
|
2791
|
-
mediaProduct:
|
|
2792
|
-
prefetch:
|
|
2881
|
+
mediaProduct: r,
|
|
2882
|
+
prefetch: t,
|
|
2793
2883
|
streamingSessionId: n
|
|
2794
2884
|
});
|
|
2795
2885
|
} catch (f) {
|
|
2796
|
-
f instanceof
|
|
2886
|
+
f instanceof C && m.dispatchError(f), document.location.href.includes("localhost") && console.error(f);
|
|
2797
2887
|
}
|
|
2798
|
-
if (!
|
|
2888
|
+
if (!u)
|
|
2799
2889
|
return;
|
|
2800
|
-
const d =
|
|
2801
|
-
|
|
2890
|
+
const d = dt(u);
|
|
2891
|
+
H.saveStreamInfo(
|
|
2802
2892
|
d.streamingSessionId,
|
|
2803
2893
|
d
|
|
2804
|
-
), await s,
|
|
2805
|
-
const b = "trackId" in
|
|
2806
|
-
|
|
2894
|
+
), await s, Y.enable();
|
|
2895
|
+
const b = "trackId" in u ? u.audioQuality : void 0, M = await _e(
|
|
2896
|
+
r.productType,
|
|
2807
2897
|
b
|
|
2808
2898
|
);
|
|
2809
|
-
return
|
|
2899
|
+
return Ie(M), M.load(
|
|
2810
2900
|
{
|
|
2811
2901
|
assetPosition: e,
|
|
2812
|
-
mediaProduct:
|
|
2813
|
-
playbackInfo:
|
|
2902
|
+
mediaProduct: r,
|
|
2903
|
+
playbackInfo: u,
|
|
2814
2904
|
streamInfo: d
|
|
2815
2905
|
},
|
|
2816
2906
|
"explicit"
|
|
2817
2907
|
);
|
|
2818
2908
|
}
|
|
2819
|
-
|
|
2820
|
-
if (
|
|
2821
|
-
const { currentTime: e, mediaProduct:
|
|
2822
|
-
|
|
2909
|
+
m.addEventListener("load", (r) => {
|
|
2910
|
+
if (r instanceof CustomEvent) {
|
|
2911
|
+
const { currentTime: e, mediaProduct: t } = r.detail;
|
|
2912
|
+
ee(t, e).then().catch(console.error);
|
|
2823
2913
|
}
|
|
2824
2914
|
});
|
|
2825
|
-
function
|
|
2915
|
+
function bt() {
|
|
2826
2916
|
return p.activePlayer?.pause();
|
|
2827
2917
|
}
|
|
2828
|
-
async function
|
|
2918
|
+
async function vt() {
|
|
2829
2919
|
await y.synchronize();
|
|
2830
|
-
const { activePlayer:
|
|
2831
|
-
return
|
|
2920
|
+
const { activePlayer: r } = p;
|
|
2921
|
+
return r ? (m.dispatchEvent(new CustomEvent("user-action")), r.play()) : Promise.reject(new Error("No active player"));
|
|
2832
2922
|
}
|
|
2833
|
-
async function
|
|
2923
|
+
async function St(r) {
|
|
2834
2924
|
const { activePlayer: e } = p;
|
|
2835
|
-
return e?.seek(
|
|
2925
|
+
return e?.seek(r);
|
|
2836
2926
|
}
|
|
2837
|
-
function
|
|
2838
|
-
v.credentialsProvider =
|
|
2927
|
+
function Qt(r) {
|
|
2928
|
+
v.credentialsProvider = r;
|
|
2839
2929
|
}
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
return new CustomEvent(At, {
|
|
2843
|
-
detail: t
|
|
2844
|
-
});
|
|
2930
|
+
function Gt(r) {
|
|
2931
|
+
D.eventSender = r;
|
|
2845
2932
|
}
|
|
2846
|
-
const
|
|
2847
|
-
function
|
|
2848
|
-
return new CustomEvent(
|
|
2849
|
-
detail:
|
|
2933
|
+
const Mt = "active-device-changed";
|
|
2934
|
+
function qt(r) {
|
|
2935
|
+
return new CustomEvent(Mt, {
|
|
2936
|
+
detail: r
|
|
2850
2937
|
});
|
|
2851
2938
|
}
|
|
2852
|
-
const
|
|
2853
|
-
function
|
|
2854
|
-
return new CustomEvent(
|
|
2855
|
-
detail:
|
|
2939
|
+
const Et = "active-device-mode-changed";
|
|
2940
|
+
function jt(r) {
|
|
2941
|
+
return new CustomEvent(Et, {
|
|
2942
|
+
detail: r
|
|
2856
2943
|
});
|
|
2857
2944
|
}
|
|
2858
2945
|
y.synchronize().then().catch(console.error);
|
|
2859
|
-
function
|
|
2860
|
-
const { activePlayer:
|
|
2861
|
-
if (!
|
|
2946
|
+
function te() {
|
|
2947
|
+
const { activePlayer: r } = p;
|
|
2948
|
+
if (!r)
|
|
2862
2949
|
return null;
|
|
2863
|
-
switch (
|
|
2864
|
-
case "shakaPlayer":
|
|
2865
|
-
return t.mediaElement;
|
|
2950
|
+
switch (r.name) {
|
|
2866
2951
|
case "browserPlayer":
|
|
2867
|
-
return
|
|
2952
|
+
return r.mediaElement;
|
|
2953
|
+
case "shakaPlayer":
|
|
2954
|
+
return r.mediaElement;
|
|
2868
2955
|
default:
|
|
2869
2956
|
return null;
|
|
2870
2957
|
}
|
|
2871
2958
|
}
|
|
2872
|
-
function
|
|
2873
|
-
const
|
|
2959
|
+
function kt() {
|
|
2960
|
+
const r = localStorage.getItem("ssuid");
|
|
2874
2961
|
try {
|
|
2875
|
-
|
|
2962
|
+
r && indexedDB.deleteDatabase("streaming-sessions-" + r);
|
|
2876
2963
|
} catch (e) {
|
|
2877
|
-
console.warn(`DB streaming-sessions-${
|
|
2964
|
+
console.warn(`DB streaming-sessions-${r} could not be deleted`), console.error(e);
|
|
2878
2965
|
}
|
|
2879
2966
|
}
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
const
|
|
2884
|
-
function
|
|
2885
|
-
if (
|
|
2967
|
+
he().then().catch(console.error);
|
|
2968
|
+
pe().then().catch(console.error);
|
|
2969
|
+
kt();
|
|
2970
|
+
const U = String.raw, Pt = String.raw;
|
|
2971
|
+
function re(r) {
|
|
2972
|
+
if (r === void 0)
|
|
2886
2973
|
return "0:00";
|
|
2887
|
-
const e = parseInt(String(
|
|
2974
|
+
const e = parseInt(String(r), 10), t = Math.floor(e / 3600), s = Math.floor((e - t * 3600) / 60), n = e - t * 3600 - s * 60;
|
|
2888
2975
|
let o = "";
|
|
2889
|
-
if (
|
|
2976
|
+
if (t !== 0) {
|
|
2890
2977
|
const a = s < 10 ? `0${s}` : String(s);
|
|
2891
|
-
o = `${
|
|
2978
|
+
o = `${t}:${a}:`;
|
|
2892
2979
|
} else
|
|
2893
2980
|
o = `${s}:`;
|
|
2894
2981
|
return o += n < 10 ? `0${n}` : String(n), o;
|
|
2895
2982
|
}
|
|
2896
|
-
function
|
|
2897
|
-
const e = typeof
|
|
2898
|
-
if (c === 0 &&
|
|
2983
|
+
function se(r = 0) {
|
|
2984
|
+
const e = typeof r == "number" ? r : parseInt(r, 10), t = Math.floor(e / 3600) % 24, s = Math.floor(e / 60) % 60, n = e % 60, o = (c, u) => {
|
|
2985
|
+
if (c === 0 && u !== 1)
|
|
2899
2986
|
return "";
|
|
2900
2987
|
let d;
|
|
2901
|
-
switch (
|
|
2988
|
+
switch (u) {
|
|
2902
2989
|
case 0:
|
|
2903
2990
|
d = "H";
|
|
2904
2991
|
break;
|
|
@@ -2911,123 +2998,120 @@ function pe(t = 0) {
|
|
|
2911
2998
|
}
|
|
2912
2999
|
return `${d}${c}`;
|
|
2913
3000
|
};
|
|
2914
|
-
return `P${[
|
|
3001
|
+
return `P${[t, s, n].map(o).join("")}`;
|
|
2915
3002
|
}
|
|
2916
|
-
const
|
|
2917
|
-
class
|
|
3003
|
+
const Tt = "tidal-current-time";
|
|
3004
|
+
class It extends HTMLElement {
|
|
2918
3005
|
#e = void 0;
|
|
2919
|
-
#
|
|
3006
|
+
#r = /* @__PURE__ */ new Set();
|
|
2920
3007
|
#s;
|
|
2921
|
-
#
|
|
3008
|
+
#t;
|
|
2922
3009
|
#i;
|
|
2923
3010
|
constructor() {
|
|
2924
|
-
super(), this.#i = (e) => this.renderTime(e.target.currentTime), this.#
|
|
3011
|
+
super(), this.#i = (e) => this.renderTime(e.target.currentTime), this.#t = () => this.renderTime(0), this.#s = this.#n.bind(this);
|
|
2925
3012
|
}
|
|
2926
3013
|
#n() {
|
|
2927
|
-
const e =
|
|
2928
|
-
e && this.#e && !this.#
|
|
3014
|
+
const e = te();
|
|
3015
|
+
e && this.#e && !this.#r.has(e) && (e.addEventListener("timeupdate", this.#i, !1), this.#r.add(e));
|
|
2929
3016
|
}
|
|
2930
3017
|
connectedCallback() {
|
|
2931
3018
|
const e = this.attachShadow({ mode: "open" });
|
|
2932
3019
|
e.innerHTML = "<time></time>";
|
|
2933
|
-
const
|
|
2934
|
-
this.#e === void 0 &&
|
|
3020
|
+
const t = e.querySelector("time");
|
|
3021
|
+
this.#e === void 0 && t !== null && (this.#e = t), this.renderTime(Fe()), m.addEventListener(
|
|
2935
3022
|
"media-product-transition",
|
|
2936
3023
|
this.#s,
|
|
2937
3024
|
!1
|
|
2938
|
-
),
|
|
3025
|
+
), m.addEventListener("ended", this.#t, !1);
|
|
2939
3026
|
}
|
|
2940
3027
|
disconnectedCallback() {
|
|
2941
|
-
for (let e of this.#
|
|
3028
|
+
for (let e of this.#r)
|
|
2942
3029
|
e.removeEventListener(
|
|
2943
3030
|
"timeupdate",
|
|
2944
3031
|
this.#i,
|
|
2945
3032
|
!1
|
|
2946
3033
|
);
|
|
2947
|
-
|
|
3034
|
+
m.removeEventListener(
|
|
2948
3035
|
"media-product-transition",
|
|
2949
3036
|
this.#s,
|
|
2950
3037
|
!1
|
|
2951
|
-
),
|
|
3038
|
+
), m.removeEventListener("ended", this.#t, !1);
|
|
2952
3039
|
}
|
|
2953
3040
|
renderTime(e) {
|
|
2954
|
-
const
|
|
2955
|
-
this.#e && (this.#e.textContent =
|
|
3041
|
+
const t = Math.floor(e);
|
|
3042
|
+
this.#e && (this.#e.textContent = re(t), this.#e.setAttribute("datetime", se(t)));
|
|
2956
3043
|
}
|
|
2957
3044
|
}
|
|
2958
|
-
customElements.define(
|
|
2959
|
-
const
|
|
2960
|
-
class
|
|
3045
|
+
customElements.define(Tt, It);
|
|
3046
|
+
const Lt = "tidal-duration-time";
|
|
3047
|
+
class At extends HTMLElement {
|
|
2961
3048
|
#e;
|
|
2962
|
-
#
|
|
3049
|
+
#r = !1;
|
|
2963
3050
|
#s;
|
|
2964
3051
|
constructor() {
|
|
2965
3052
|
super(), this.#s = (e) => {
|
|
2966
|
-
const
|
|
2967
|
-
this.renderTime(
|
|
2968
|
-
}, this.#
|
|
3053
|
+
const t = e;
|
|
3054
|
+
this.renderTime(t.detail.playbackContext.actualDuration);
|
|
3055
|
+
}, this.#t();
|
|
2969
3056
|
}
|
|
2970
|
-
#
|
|
2971
|
-
this.#
|
|
3057
|
+
#t() {
|
|
3058
|
+
this.#r || (m.addEventListener(
|
|
2972
3059
|
"media-product-transition",
|
|
2973
3060
|
this.#s,
|
|
2974
3061
|
!1
|
|
2975
|
-
), this.#
|
|
3062
|
+
), this.#r = !0);
|
|
2976
3063
|
}
|
|
2977
3064
|
#i() {
|
|
2978
3065
|
const e = this.attachShadow({ mode: "open" });
|
|
2979
3066
|
this.#e = document.createElement("time"), e.appendChild(this.#e);
|
|
2980
3067
|
}
|
|
2981
3068
|
connectedCallback() {
|
|
2982
|
-
this.#
|
|
2983
|
-
const e = parseInt(String(this.textContent), 10),
|
|
2984
|
-
this.renderTime(
|
|
3069
|
+
this.#t(), this.#i();
|
|
3070
|
+
const e = parseInt(String(this.textContent), 10), t = Number.isNaN(e) ? 0 : e;
|
|
3071
|
+
this.renderTime(Be()?.actualDuration ?? t);
|
|
2985
3072
|
}
|
|
2986
3073
|
disconnectedCallback() {
|
|
2987
|
-
|
|
3074
|
+
m.removeEventListener(
|
|
2988
3075
|
"media-product-transition",
|
|
2989
3076
|
this.#s,
|
|
2990
3077
|
!1
|
|
2991
|
-
), this.#
|
|
3078
|
+
), this.#r = !1;
|
|
2992
3079
|
}
|
|
2993
3080
|
renderTime(e) {
|
|
2994
|
-
const
|
|
2995
|
-
this.#e && (this.#e.textContent =
|
|
3081
|
+
const t = parseInt(e.toFixed(0), 10);
|
|
3082
|
+
this.#e && (this.#e.textContent = re(t), this.#e.setAttribute("datetime", se(t)));
|
|
2996
3083
|
}
|
|
2997
3084
|
}
|
|
2998
|
-
customElements.define(
|
|
2999
|
-
const
|
|
3000
|
-
class
|
|
3085
|
+
customElements.define(Lt, At);
|
|
3086
|
+
const Ot = "tidal-play-trigger";
|
|
3087
|
+
class Ct extends HTMLElement {
|
|
3001
3088
|
#e;
|
|
3002
|
-
#
|
|
3089
|
+
#r = !1;
|
|
3003
3090
|
constructor() {
|
|
3004
|
-
super(), this.#e = (
|
|
3005
|
-
|
|
3091
|
+
super(), this.#e = () => {
|
|
3092
|
+
this.#s().catch(console.error);
|
|
3006
3093
|
}, this.#i();
|
|
3007
3094
|
}
|
|
3008
|
-
static get observedAttributes() {
|
|
3009
|
-
return ["product-id", "product-type"];
|
|
3010
|
-
}
|
|
3011
3095
|
async #s() {
|
|
3012
|
-
await this.#
|
|
3096
|
+
await this.#t(), Q() === "PLAYING" ? bt() : await vt();
|
|
3013
3097
|
}
|
|
3014
|
-
#
|
|
3015
|
-
const e =
|
|
3098
|
+
#t() {
|
|
3099
|
+
const e = Ne()?.productId ?? void 0;
|
|
3016
3100
|
if (this.mediaProduct && this.mediaProduct.productId !== e)
|
|
3017
|
-
return
|
|
3101
|
+
return ee(this.mediaProduct, 0);
|
|
3018
3102
|
}
|
|
3019
3103
|
#i() {
|
|
3020
|
-
this.#
|
|
3104
|
+
this.#r || this.addEventListener("click", this.#e, { passive: !0 });
|
|
3021
3105
|
}
|
|
3022
3106
|
#n() {
|
|
3023
|
-
const e = this.attachShadow({ mode: "closed" }),
|
|
3024
|
-
|
|
3107
|
+
const e = this.attachShadow({ mode: "closed" }), t = document.createElement("style");
|
|
3108
|
+
t.textContent = U`
|
|
3025
3109
|
:host {
|
|
3026
3110
|
display: contents;
|
|
3027
3111
|
}
|
|
3028
3112
|
`;
|
|
3029
3113
|
const s = document.createElement("slot");
|
|
3030
|
-
e.appendChild(
|
|
3114
|
+
e.appendChild(t), e.appendChild(s);
|
|
3031
3115
|
}
|
|
3032
3116
|
connectedCallback() {
|
|
3033
3117
|
this.#i(), this.#n();
|
|
@@ -3035,23 +3119,26 @@ class Vt extends HTMLElement {
|
|
|
3035
3119
|
disconnectedCallback() {
|
|
3036
3120
|
this.removeEventListener("click", this.#e, {
|
|
3037
3121
|
passive: !0
|
|
3038
|
-
}), this.#
|
|
3122
|
+
}), this.#r = !1;
|
|
3039
3123
|
}
|
|
3040
3124
|
get mediaProduct() {
|
|
3041
3125
|
const e = this.getAttribute("product-id");
|
|
3042
3126
|
if (!e)
|
|
3043
3127
|
return;
|
|
3044
|
-
const
|
|
3128
|
+
const t = this.getAttribute("product-type") === "video" ? "video" : "track";
|
|
3045
3129
|
return {
|
|
3046
3130
|
productId: e,
|
|
3047
|
-
productType:
|
|
3131
|
+
productType: t,
|
|
3048
3132
|
sourceId: "",
|
|
3049
3133
|
sourceType: ""
|
|
3050
3134
|
};
|
|
3051
3135
|
}
|
|
3136
|
+
static get observedAttributes() {
|
|
3137
|
+
return ["product-id", "product-type"];
|
|
3138
|
+
}
|
|
3052
3139
|
}
|
|
3053
|
-
customElements.define(
|
|
3054
|
-
const
|
|
3140
|
+
customElements.define(Ot, Ct);
|
|
3141
|
+
const _t = U`
|
|
3055
3142
|
:host {
|
|
3056
3143
|
display: inline-block;
|
|
3057
3144
|
}
|
|
@@ -3072,31 +3159,31 @@ const zt = j`
|
|
|
3072
3159
|
background-color: currentColor;
|
|
3073
3160
|
pointer-events: none;
|
|
3074
3161
|
}
|
|
3075
|
-
`,
|
|
3162
|
+
`, $ = {
|
|
3076
3163
|
NO_DURATION: "You need to set duration before you can start/stop the progress bar."
|
|
3077
3164
|
};
|
|
3078
|
-
class
|
|
3165
|
+
class Ft extends HTMLElement {
|
|
3079
3166
|
#e;
|
|
3080
|
-
#
|
|
3167
|
+
#r = 1;
|
|
3081
3168
|
#s = null;
|
|
3082
|
-
#
|
|
3169
|
+
#t;
|
|
3083
3170
|
#i;
|
|
3084
3171
|
#n = /* @__PURE__ */ new Set();
|
|
3085
3172
|
#a = null;
|
|
3086
3173
|
#o;
|
|
3087
3174
|
constructor() {
|
|
3088
|
-
super(), this.#
|
|
3089
|
-
const
|
|
3090
|
-
if (this.duration =
|
|
3175
|
+
super(), this.#t = (e) => {
|
|
3176
|
+
const t = e;
|
|
3177
|
+
if (this.duration = t.detail.playbackContext.actualDuration, Q() === "PLAYING")
|
|
3091
3178
|
try {
|
|
3092
3179
|
this.start();
|
|
3093
3180
|
} catch (s) {
|
|
3094
3181
|
console.warn(s);
|
|
3095
3182
|
}
|
|
3096
3183
|
}, this.#i = (e) => {
|
|
3097
|
-
const
|
|
3184
|
+
const t = e;
|
|
3098
3185
|
try {
|
|
3099
|
-
|
|
3186
|
+
t.detail.state === "PLAYING" ? this.start() : this.stop();
|
|
3100
3187
|
} catch (s) {
|
|
3101
3188
|
console.warn(s);
|
|
3102
3189
|
}
|
|
@@ -3105,20 +3192,20 @@ class Ut extends HTMLElement {
|
|
|
3105
3192
|
}, this.#c();
|
|
3106
3193
|
}
|
|
3107
3194
|
#c() {
|
|
3108
|
-
this.#n.has("media-product-transition") || (
|
|
3195
|
+
this.#n.has("media-product-transition") || (m.addEventListener(
|
|
3109
3196
|
"media-product-transition",
|
|
3110
|
-
this.#
|
|
3197
|
+
this.#t,
|
|
3111
3198
|
!1
|
|
3112
|
-
), this.#n.add("media-product-transition")), this.#n.has("playback-state-change") || (
|
|
3199
|
+
), this.#n.add("media-product-transition")), this.#n.has("playback-state-change") || (m.addEventListener(
|
|
3113
3200
|
"playback-state-change",
|
|
3114
3201
|
this.#i
|
|
3115
3202
|
), this.#n.add("playback-state-change")), this.#a && !this.#n.has("wrapper-click") && (this.#a.addEventListener("click", this.#o, !1), this.#n.add("wrapper-click"));
|
|
3116
3203
|
}
|
|
3117
3204
|
#d() {
|
|
3118
3205
|
const e = this.attachShadow({ mode: "closed" });
|
|
3119
|
-
e.innerHTML =
|
|
3206
|
+
e.innerHTML = Pt`
|
|
3120
3207
|
<style>
|
|
3121
|
-
${
|
|
3208
|
+
${_t}
|
|
3122
3209
|
</style>
|
|
3123
3210
|
<div id="wrapper">
|
|
3124
3211
|
<div id="indicator"></div>
|
|
@@ -3134,11 +3221,11 @@ class Ut extends HTMLElement {
|
|
|
3134
3221
|
this.#d(), this.#c();
|
|
3135
3222
|
}
|
|
3136
3223
|
disconnectedCallback() {
|
|
3137
|
-
|
|
3224
|
+
m.removeEventListener(
|
|
3138
3225
|
"media-product-transition",
|
|
3139
|
-
this.#
|
|
3226
|
+
this.#t,
|
|
3140
3227
|
!1
|
|
3141
|
-
),
|
|
3228
|
+
), m.removeEventListener(
|
|
3142
3229
|
"playback-state-change",
|
|
3143
3230
|
this.#i
|
|
3144
3231
|
), this.#a?.addEventListener("click", this.#o, !1), this.#n.clear();
|
|
@@ -3151,9 +3238,9 @@ class Ut extends HTMLElement {
|
|
|
3151
3238
|
*/
|
|
3152
3239
|
getMousePositionAsPercent(e) {
|
|
3153
3240
|
if (this.#a) {
|
|
3154
|
-
const
|
|
3155
|
-
left: Math.abs(
|
|
3156
|
-
width: Math.round(
|
|
3241
|
+
const t = this.#a.getBoundingClientRect(), s = {
|
|
3242
|
+
left: Math.abs(t.left + window.pageXOffset - e.pageX),
|
|
3243
|
+
width: Math.round(t.width)
|
|
3157
3244
|
};
|
|
3158
3245
|
return s.left / s.width;
|
|
3159
3246
|
}
|
|
@@ -3167,8 +3254,8 @@ class Ut extends HTMLElement {
|
|
|
3167
3254
|
* @param {MouseEvent | PointerEvent} event
|
|
3168
3255
|
*/
|
|
3169
3256
|
handleClick(e) {
|
|
3170
|
-
const
|
|
3171
|
-
this.currentTime = s,
|
|
3257
|
+
const t = this.getMousePositionAsPercent(e), s = this.#r * t;
|
|
3258
|
+
this.currentTime = s, St(s / 1e3);
|
|
3172
3259
|
}
|
|
3173
3260
|
/**
|
|
3174
3261
|
* Starts the animation if duration is defined.
|
|
@@ -3177,7 +3264,7 @@ class Ut extends HTMLElement {
|
|
|
3177
3264
|
*/
|
|
3178
3265
|
start() {
|
|
3179
3266
|
if (!this.#e)
|
|
3180
|
-
throw new Error(
|
|
3267
|
+
throw new Error($.NO_DURATION);
|
|
3181
3268
|
this.#e.play();
|
|
3182
3269
|
}
|
|
3183
3270
|
/**
|
|
@@ -3187,7 +3274,7 @@ class Ut extends HTMLElement {
|
|
|
3187
3274
|
*/
|
|
3188
3275
|
stop() {
|
|
3189
3276
|
if (!this.#e)
|
|
3190
|
-
throw new Error(
|
|
3277
|
+
throw new Error($.NO_DURATION);
|
|
3191
3278
|
this.#e.pause();
|
|
3192
3279
|
}
|
|
3193
3280
|
/**
|
|
@@ -3202,8 +3289,8 @@ class Ut extends HTMLElement {
|
|
|
3202
3289
|
* Setting this recrates the animation with the new duraton and pauses the animation.
|
|
3203
3290
|
*/
|
|
3204
3291
|
set duration(e) {
|
|
3205
|
-
this.#
|
|
3206
|
-
const
|
|
3292
|
+
this.#r = e * 1e3;
|
|
3293
|
+
const t = [
|
|
3207
3294
|
{
|
|
3208
3295
|
transform: "translateX(-100%)"
|
|
3209
3296
|
},
|
|
@@ -3211,8 +3298,8 @@ class Ut extends HTMLElement {
|
|
|
3211
3298
|
transform: "translateX(0%)"
|
|
3212
3299
|
}
|
|
3213
3300
|
];
|
|
3214
|
-
this.#e = this.#s?.animate(
|
|
3215
|
-
duration: this.#
|
|
3301
|
+
this.#e = this.#s?.animate(t, {
|
|
3302
|
+
duration: this.#r,
|
|
3216
3303
|
iterations: 1
|
|
3217
3304
|
}), this.#e?.pause();
|
|
3218
3305
|
}
|
|
@@ -3223,9 +3310,9 @@ class Ut extends HTMLElement {
|
|
|
3223
3310
|
this.stop(), this.#e && (this.#e.playbackRate = e), this.start();
|
|
3224
3311
|
}
|
|
3225
3312
|
}
|
|
3226
|
-
const
|
|
3227
|
-
customElements.define(
|
|
3228
|
-
const
|
|
3313
|
+
const Nt = "tidal-progress-bar";
|
|
3314
|
+
customElements.define(Nt, Ft);
|
|
3315
|
+
const Bt = U`
|
|
3229
3316
|
:host {
|
|
3230
3317
|
position: relative;
|
|
3231
3318
|
display: block;
|
|
@@ -3242,91 +3329,89 @@ const $t = j`
|
|
|
3242
3329
|
position: relative;
|
|
3243
3330
|
background-color: black;
|
|
3244
3331
|
}
|
|
3245
|
-
`,
|
|
3246
|
-
class
|
|
3332
|
+
`, xt = "tidal-video-view";
|
|
3333
|
+
class Rt extends HTMLElement {
|
|
3247
3334
|
#e = !1;
|
|
3248
|
-
#
|
|
3335
|
+
#r;
|
|
3249
3336
|
#s;
|
|
3250
3337
|
constructor() {
|
|
3251
|
-
super(), this.#
|
|
3338
|
+
super(), this.#r = (e) => {
|
|
3252
3339
|
e.detail.mediaProduct.productType === "video" && this.mountPlayer();
|
|
3253
3340
|
}, this.#s = (e) => {
|
|
3254
|
-
const
|
|
3341
|
+
const t = e;
|
|
3255
3342
|
this.setAttribute(
|
|
3256
3343
|
"playback-state",
|
|
3257
|
-
|
|
3344
|
+
t.detail.state.toLocaleLowerCase()
|
|
3258
3345
|
);
|
|
3259
|
-
}, this.#
|
|
3346
|
+
}, this.#t();
|
|
3260
3347
|
}
|
|
3261
|
-
#
|
|
3262
|
-
this.#e || (
|
|
3348
|
+
#t() {
|
|
3349
|
+
this.#e || (m.addEventListener(
|
|
3263
3350
|
"media-product-transition",
|
|
3264
|
-
this.#
|
|
3351
|
+
this.#r,
|
|
3265
3352
|
!1
|
|
3266
|
-
),
|
|
3353
|
+
), m.addEventListener(
|
|
3267
3354
|
"playback-state-change",
|
|
3268
3355
|
this.#s,
|
|
3269
3356
|
!1
|
|
3270
3357
|
));
|
|
3271
3358
|
}
|
|
3272
3359
|
connectedCallback() {
|
|
3273
|
-
this.#
|
|
3274
|
-
const e = this.attachShadow({ mode: "closed" }),
|
|
3275
|
-
|
|
3360
|
+
this.#t();
|
|
3361
|
+
const e = this.attachShadow({ mode: "closed" }), t = document.createElement("style");
|
|
3362
|
+
t.textContent = Bt;
|
|
3276
3363
|
const s = document.createElement("slot");
|
|
3277
|
-
e.appendChild(
|
|
3364
|
+
e.appendChild(t), e.appendChild(s);
|
|
3278
3365
|
}
|
|
3279
3366
|
disconnectedCallback() {
|
|
3280
|
-
|
|
3367
|
+
m.removeEventListener(
|
|
3281
3368
|
"media-product-transition",
|
|
3282
|
-
this.#
|
|
3369
|
+
this.#r,
|
|
3283
3370
|
!1
|
|
3284
|
-
),
|
|
3371
|
+
), m.removeEventListener(
|
|
3285
3372
|
"playback-state-change",
|
|
3286
3373
|
this.#s,
|
|
3287
3374
|
!1
|
|
3288
3375
|
), this.#e = !0;
|
|
3289
3376
|
}
|
|
3290
3377
|
mountPlayer() {
|
|
3291
|
-
const e =
|
|
3378
|
+
const e = te();
|
|
3292
3379
|
e && (this.innerHTML = "", this.appendChild(e));
|
|
3293
3380
|
}
|
|
3294
3381
|
}
|
|
3295
|
-
customElements.define(
|
|
3382
|
+
customElements.define(xt, Rt);
|
|
3296
3383
|
export {
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
v as
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
y as g,
|
|
3319
|
-
ie as h,
|
|
3320
|
-
it as i,
|
|
3321
|
-
Bt as j,
|
|
3322
|
-
xt as k,
|
|
3384
|
+
Ht as C,
|
|
3385
|
+
qt as G,
|
|
3386
|
+
Qt as H,
|
|
3387
|
+
E as I,
|
|
3388
|
+
Dt as L,
|
|
3389
|
+
H as P,
|
|
3390
|
+
Gt as Q,
|
|
3391
|
+
zt as R,
|
|
3392
|
+
v as S,
|
|
3393
|
+
j as W,
|
|
3394
|
+
me as a,
|
|
3395
|
+
m as b,
|
|
3396
|
+
fe as c,
|
|
3397
|
+
$t as d,
|
|
3398
|
+
Qe as e,
|
|
3399
|
+
oe as f,
|
|
3400
|
+
Wt as g,
|
|
3401
|
+
Ut as h,
|
|
3402
|
+
ee as i,
|
|
3403
|
+
jt as j,
|
|
3404
|
+
_ as k,
|
|
3323
3405
|
p as l,
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3406
|
+
Je as m,
|
|
3407
|
+
rt as n,
|
|
3408
|
+
Tt as o,
|
|
3409
|
+
Lt as p,
|
|
3410
|
+
z as q,
|
|
3411
|
+
Ot as r,
|
|
3412
|
+
Nt as s,
|
|
3413
|
+
xt as t,
|
|
3414
|
+
Vt as w,
|
|
3415
|
+
C as x,
|
|
3416
|
+
y
|
|
3332
3417
|
};
|