@kalamba/sdk 0.13.2 → 0.16.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/errors-BXO3dlhS.cjs +5 -0
- package/dist/{errors-7cbbda8a.js → errors-NnLrKjTz.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +6 -14
- package/dist/index.js +67 -65
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.d.ts +8 -15
- package/dist/plugins.js +397 -386
- package/dist/v4-BL_nLifx.js +45 -0
- package/dist/v4-C9_uc0A9.cjs +5 -0
- package/dist/wrapper.cjs +1 -1
- package/dist/wrapper.d.ts +6 -14
- package/dist/wrapper.js +2348 -1348
- package/package.json +3 -3
- package/dist/errors-db453887.cjs +0 -5
- package/dist/v4-58efbfa1.js +0 -48
- package/dist/v4-bada56b0.cjs +0 -5
package/dist/plugins.js
CHANGED
|
@@ -2,25 +2,21 @@
|
|
|
2
2
|
* BSD 3-Clause License
|
|
3
3
|
* Copyright (c) 2025, Kalamba Games Limited
|
|
4
4
|
*/
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
if (!t.has(s))
|
|
9
|
-
throw TypeError("Cannot " + e);
|
|
5
|
+
var jt = Object.defineProperty;
|
|
6
|
+
var ct = (s) => {
|
|
7
|
+
throw TypeError(s);
|
|
10
8
|
};
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import { a as Fe } from "./errors-7cbbda8a.js";
|
|
17
|
-
import { a as ct, v as jt } from "./v4-58efbfa1.js";
|
|
9
|
+
var Kt = (s, t, e) => t in s ? jt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
10
|
+
var m = (s, t, e) => Kt(s, typeof t != "symbol" ? t + "" : t, e), dt = (s, t, e) => t.has(s) || ct("Cannot " + e);
|
|
11
|
+
var y = (s, t, e) => (dt(s, t, "read from private field"), e ? e.call(s) : t.get(s)), C = (s, t, e) => t.has(s) ? ct("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e), E = (s, t, e, i) => (dt(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e);
|
|
12
|
+
import { a as Fe } from "./errors-NnLrKjTz.js";
|
|
13
|
+
import { r as Qt, g as Xt, v as Jt } from "./v4-BL_nLifx.js";
|
|
18
14
|
function O(s, t) {
|
|
19
15
|
return (e, ...i) => {
|
|
20
16
|
console.log(`[%c${s}\x1B[m] %s`, t, e, ...i);
|
|
21
17
|
};
|
|
22
18
|
}
|
|
23
|
-
function
|
|
19
|
+
function _t(s, t) {
|
|
24
20
|
return Math.round(s * 100 / t);
|
|
25
21
|
}
|
|
26
22
|
class V {
|
|
@@ -42,10 +38,10 @@ class V {
|
|
|
42
38
|
});
|
|
43
39
|
}
|
|
44
40
|
}
|
|
45
|
-
const
|
|
46
|
-
class
|
|
41
|
+
const Yt = O("BasicPlugin", "color:#000000;font-weight:bold;");
|
|
42
|
+
class Ni extends V {
|
|
47
43
|
constructor(...t) {
|
|
48
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
44
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Yt("configured");
|
|
49
45
|
}
|
|
50
46
|
registerToSdkEvents() {
|
|
51
47
|
window.addEventListener("message", (t) => {
|
|
@@ -56,8 +52,8 @@ class Ri extends V {
|
|
|
56
52
|
this.send("settings", { music: i == null ? void 0 : i.musicEnabled, sounds: i == null ? void 0 : i.soundEnabled });
|
|
57
53
|
return;
|
|
58
54
|
case "doBalanceUpdate":
|
|
59
|
-
const { currency: a, coinValueInCents:
|
|
60
|
-
i.currency === a && typeof i.balanceInCurrency == "number" ? this.send("balance", { balance:
|
|
55
|
+
const { currency: a, coinValueInCents: r } = this.sdkConfig.api;
|
|
56
|
+
i.currency === a && typeof i.balanceInCurrency == "number" ? this.send("balance", { balance: _t(i.balanceInCurrency, r) }) : (i.balanceInCoins, this.send("balance", { balance: i.balanceInCoins }));
|
|
61
57
|
return;
|
|
62
58
|
case "doGamePause":
|
|
63
59
|
this.send("freeze");
|
|
@@ -92,8 +88,8 @@ class Ri extends V {
|
|
|
92
88
|
});
|
|
93
89
|
}
|
|
94
90
|
}
|
|
95
|
-
const v = O("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"),
|
|
96
|
-
class
|
|
91
|
+
const v = O("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), Zt = O("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
|
|
92
|
+
class Di extends V {
|
|
97
93
|
constructor(...t) {
|
|
98
94
|
super(...t), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
|
|
99
95
|
}
|
|
@@ -117,13 +113,13 @@ class Li extends V {
|
|
|
117
113
|
this.on("autoplay", (t) => v("autoplay", t)), this.on("balance", (t) => v("balance", t)), this.on("bet", (t) => v("bet", t)), this.on("cashier", (t) => v("cashier", t)), this.on("choice", (t) => v("choice", t)), this.on("close", (t) => v("close", t)), this.on("error", (t) => v("error", t)), this.on("loadEnd", (t) => v("loadEnd", t)), this.on("loadProgress", (t) => v("loadProgress", t)), this.on("loadStart", (t) => v("loadStart", t)), this.on("playCycleStart", (t) => v("playCycleStart", t)), this.on("playCycleEnd", (t) => v("playCycleEnd", t)), this.on("playEnd", (t) => v("playEnd", t)), this.on("playError", (t) => v("playError", t)), this.on("playReady", (t) => v("playReady", t)), this.on("playStart", (t) => v("playStart", t)), this.on("settings", (t) => v("settings", t));
|
|
118
114
|
}
|
|
119
115
|
_send(...t) {
|
|
120
|
-
|
|
116
|
+
Zt(...t), this.send(...t);
|
|
121
117
|
}
|
|
122
118
|
}
|
|
123
|
-
const
|
|
124
|
-
class
|
|
119
|
+
const ei = O("GigPlugin", "color:#000000;font-weight:bold;");
|
|
120
|
+
class Gi extends V {
|
|
125
121
|
constructor(...t) {
|
|
126
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
122
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ei("configured");
|
|
127
123
|
}
|
|
128
124
|
postMessage(t) {
|
|
129
125
|
const e = {
|
|
@@ -171,10 +167,10 @@ class Ui extends V {
|
|
|
171
167
|
});
|
|
172
168
|
}
|
|
173
169
|
}
|
|
174
|
-
const
|
|
175
|
-
class
|
|
170
|
+
const ti = O("OryxPlugin", "color:#000000;font-weight:bold;");
|
|
171
|
+
class Hi extends V {
|
|
176
172
|
constructor(...t) {
|
|
177
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
173
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ti("configured");
|
|
178
174
|
}
|
|
179
175
|
registerToSdkEvents() {
|
|
180
176
|
window.addEventListener("message", (t) => {
|
|
@@ -226,54 +222,54 @@ class _i extends V {
|
|
|
226
222
|
});
|
|
227
223
|
}
|
|
228
224
|
}
|
|
229
|
-
const
|
|
230
|
-
function
|
|
225
|
+
const Ge = O("PariplayPlugin", "color:#000000;font-weight:bold;");
|
|
226
|
+
function He(s) {
|
|
231
227
|
try {
|
|
232
228
|
window.top.location = s;
|
|
233
229
|
} catch {
|
|
234
230
|
window.location = s;
|
|
235
231
|
}
|
|
236
232
|
}
|
|
237
|
-
function
|
|
233
|
+
function Ve(s, t) {
|
|
238
234
|
return new Promise(function(i, a) {
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
},
|
|
235
|
+
const r = new XMLHttpRequest();
|
|
236
|
+
r.onload = function() {
|
|
237
|
+
r.status >= 200 && r.status < 300 ? i(r.responseText) : a(r.responseText);
|
|
238
|
+
}, r.open(s, t), r.send();
|
|
243
239
|
});
|
|
244
240
|
}
|
|
245
|
-
function
|
|
241
|
+
function ze() {
|
|
246
242
|
}
|
|
247
|
-
function
|
|
243
|
+
function ii(s) {
|
|
248
244
|
return s.filter(function(e) {
|
|
249
245
|
return e.messageType.toUpperCase() === "DATA";
|
|
250
246
|
});
|
|
251
247
|
}
|
|
252
|
-
function
|
|
248
|
+
function qe(s) {
|
|
253
249
|
return s.filter(function(e) {
|
|
254
250
|
return ["NOTIFICATION", "POPUP"].includes(e.messageType.toUpperCase());
|
|
255
251
|
});
|
|
256
252
|
}
|
|
257
|
-
function
|
|
253
|
+
function Bt(s) {
|
|
258
254
|
try {
|
|
259
255
|
return JSON.parse(s.text);
|
|
260
256
|
} catch {
|
|
261
257
|
return {};
|
|
262
258
|
}
|
|
263
259
|
}
|
|
264
|
-
function
|
|
265
|
-
return s.map(
|
|
260
|
+
function si(s) {
|
|
261
|
+
return s.map(Bt).filter(Boolean).find(function(e) {
|
|
266
262
|
return e.betId != null && e.winId != null;
|
|
267
263
|
}) || {};
|
|
268
264
|
}
|
|
269
|
-
function
|
|
270
|
-
return s.map(
|
|
265
|
+
function ai(s) {
|
|
266
|
+
return s.map(Bt).filter(Boolean).find(function(e) {
|
|
271
267
|
return e.TotalBet != null && e.TotalWin != null;
|
|
272
268
|
}) || {};
|
|
273
269
|
}
|
|
274
|
-
class
|
|
270
|
+
class Vi extends V {
|
|
275
271
|
constructor(...t) {
|
|
276
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
272
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Ge("configured");
|
|
277
273
|
}
|
|
278
274
|
postMessage(t, e) {
|
|
279
275
|
const i = {
|
|
@@ -281,26 +277,26 @@ class Bi extends V {
|
|
|
281
277
|
sender: this.sdkConfig.api.game,
|
|
282
278
|
type: t
|
|
283
279
|
};
|
|
284
|
-
e != null && (i.data = e),
|
|
280
|
+
e != null && (i.data = e), Ge("postMessage", i), window.parent.postMessage(i, "*");
|
|
285
281
|
}
|
|
286
282
|
coinsToCurrency(t) {
|
|
287
283
|
return t * this.sdkConfig.api.coinValueInCents / 100;
|
|
288
284
|
}
|
|
289
285
|
handleContinueButton(t, e) {
|
|
290
|
-
t.link &&
|
|
286
|
+
t.link && Ve("GET", t.link), e();
|
|
291
287
|
}
|
|
292
288
|
handleLinkButton(t, e) {
|
|
293
289
|
switch (t.linkType.toUpperCase()) {
|
|
294
290
|
case "AJAX":
|
|
295
|
-
|
|
291
|
+
Ve("GET", t.link), e();
|
|
296
292
|
return;
|
|
297
293
|
case "AJAXRESPONSE":
|
|
298
|
-
|
|
294
|
+
Ve("GET", t.link).then(() => {
|
|
299
295
|
e();
|
|
300
296
|
});
|
|
301
297
|
return;
|
|
302
298
|
case "REDIRECT":
|
|
303
|
-
|
|
299
|
+
He(t.link), e();
|
|
304
300
|
return;
|
|
305
301
|
}
|
|
306
302
|
}
|
|
@@ -324,16 +320,17 @@ class Bi extends V {
|
|
|
324
320
|
}
|
|
325
321
|
processInfoUiMessages(t) {
|
|
326
322
|
return t.reduce((e, i) => e.then(() => new Promise((a) => {
|
|
327
|
-
Object.assign({}, i, {
|
|
328
|
-
buttons: i.buttons.filter((
|
|
323
|
+
const r = Object.assign({}, i, {
|
|
324
|
+
buttons: i.buttons.filter((n) => n.action.toUpperCase() === "CASHIER" ? !!this.sdkConfig.api.cashierUrl : !0).map((n) => Object.assign({}, n, {
|
|
329
325
|
onRelease: () => {
|
|
330
|
-
const
|
|
331
|
-
|
|
326
|
+
const h = i.messageType.toUpperCase() === "POPUP" ? ze : a, p = this.buttonActions[n.action.toUpperCase()];
|
|
327
|
+
p ? p(n, h) : h();
|
|
332
328
|
}
|
|
333
329
|
}))
|
|
334
330
|
});
|
|
335
|
-
|
|
336
|
-
}).catch(
|
|
331
|
+
Ge("showMessage", r);
|
|
332
|
+
}).catch(ze)), Promise.resolve()).then(() => {
|
|
333
|
+
}).catch(ze);
|
|
337
334
|
}
|
|
338
335
|
registerToSdkEvents() {
|
|
339
336
|
window.addEventListener("message", (t) => {
|
|
@@ -365,12 +362,12 @@ class Bi extends V {
|
|
|
365
362
|
try {
|
|
366
363
|
const a = JSON.parse(
|
|
367
364
|
JSON.parse(atob(this.sdkConfig.api.integrationData.token.split(".")[1])).token
|
|
368
|
-
),
|
|
365
|
+
), r = JSON.parse(a.integrationSpecificAttributes.sessionData || "{}");
|
|
369
366
|
i = {
|
|
370
367
|
ClientToken: a.integrationSpecificAttributes.clientToken,
|
|
371
368
|
CurrencyCode: a.currency,
|
|
372
369
|
PlayerTokenId: a.user,
|
|
373
|
-
SessionData:
|
|
370
|
+
SessionData: r
|
|
374
371
|
};
|
|
375
372
|
} catch {
|
|
376
373
|
i = void 0;
|
|
@@ -380,7 +377,7 @@ class Bi extends V {
|
|
|
380
377
|
success: !0
|
|
381
378
|
});
|
|
382
379
|
try {
|
|
383
|
-
const a =
|
|
380
|
+
const a = qe(e.contract.uiMessages);
|
|
384
381
|
this.processInfoUiMessages(a);
|
|
385
382
|
} catch {
|
|
386
383
|
}
|
|
@@ -396,15 +393,14 @@ class Bi extends V {
|
|
|
396
393
|
} catch {
|
|
397
394
|
window.history.back();
|
|
398
395
|
}
|
|
399
|
-
else
|
|
400
|
-
this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") : Ge(this.sdkConfig.api.homeUrl);
|
|
396
|
+
else this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") : He(this.sdkConfig.api.homeUrl);
|
|
401
397
|
}), this.on("playEnd", (e) => {
|
|
402
398
|
this.postMessage("roundEnded", {
|
|
403
399
|
balanceAfter: this.coinsToCurrency(e.contract.balance.coins),
|
|
404
400
|
win: this.coinsToCurrency(e.contract.win.round)
|
|
405
401
|
});
|
|
406
402
|
try {
|
|
407
|
-
const i =
|
|
403
|
+
const i = qe(e.contract.uiMessages);
|
|
408
404
|
this.processInfoUiMessages(i);
|
|
409
405
|
} catch {
|
|
410
406
|
}
|
|
@@ -424,13 +420,13 @@ class Bi extends V {
|
|
|
424
420
|
e.contract.balance.coins + e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier
|
|
425
421
|
)
|
|
426
422
|
});
|
|
427
|
-
const i = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a =
|
|
423
|
+
const i = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a = ii(e.contract.uiMessages), r = qe(e.contract.uiMessages), n = si(a), h = ai(a);
|
|
428
424
|
this.postMessage("ticketReceived", {
|
|
429
425
|
Balance: this.coinsToCurrency(e.contract.balance.coins),
|
|
430
426
|
BetAmount: i ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
|
|
431
427
|
CreditTransactionId: n.betId,
|
|
432
428
|
DebitTransactionId: n.winId,
|
|
433
|
-
Message:
|
|
429
|
+
Message: r,
|
|
434
430
|
SessionData: h,
|
|
435
431
|
Status: {
|
|
436
432
|
ErrCode: 0
|
|
@@ -446,12 +442,12 @@ class Bi extends V {
|
|
|
446
442
|
}), this.on("loadStart", () => {
|
|
447
443
|
this.postMessage("onAppFrameReady");
|
|
448
444
|
}), this.on("cashier", () => {
|
|
449
|
-
this.sdkConfig.api.cashierUrl && (this.sdkConfig.api.cashierUrl === "(api)" ? this.postMessage("cashier") :
|
|
445
|
+
this.sdkConfig.api.cashierUrl && (this.sdkConfig.api.cashierUrl === "(api)" ? this.postMessage("cashier") : He(this.sdkConfig.api.cashierUrl));
|
|
450
446
|
});
|
|
451
447
|
}
|
|
452
448
|
}
|
|
453
449
|
const ue = O("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
|
|
454
|
-
class
|
|
450
|
+
class zi extends V {
|
|
455
451
|
constructor(...e) {
|
|
456
452
|
super(...e);
|
|
457
453
|
m(this, "VERSION", "1.17.0");
|
|
@@ -525,20 +521,20 @@ class Fi extends V {
|
|
|
525
521
|
});
|
|
526
522
|
}
|
|
527
523
|
}
|
|
528
|
-
const
|
|
529
|
-
class
|
|
524
|
+
const We = O("TukoPlugin", "color:#000000;font-weight:bold;");
|
|
525
|
+
class qi extends V {
|
|
530
526
|
constructor(...e) {
|
|
531
527
|
super(...e);
|
|
532
528
|
m(this, "PING_INTERVAL", 1e4);
|
|
533
529
|
const a = new URLSearchParams(window.location.search).get("pingCallbackUrl");
|
|
534
530
|
a && window.setInterval(() => {
|
|
535
531
|
this.ping(a);
|
|
536
|
-
}, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
532
|
+
}, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), We("configured");
|
|
537
533
|
}
|
|
538
534
|
ping(e) {
|
|
539
535
|
const i = new XMLHttpRequest();
|
|
540
536
|
i.onreadystatechange = function() {
|
|
541
|
-
i.readyState === XMLHttpRequest.DONE && (i.status === 0 || i.status >= 200 && i.status < 400 ?
|
|
537
|
+
i.readyState === XMLHttpRequest.DONE && (i.status === 0 || i.status >= 200 && i.status < 400 ? We("ping ok", i) : We("ping error", i));
|
|
542
538
|
}, i.open("GET", e), i.send();
|
|
543
539
|
}
|
|
544
540
|
registerToSdkEvents() {
|
|
@@ -550,8 +546,8 @@ class Di extends V {
|
|
|
550
546
|
this.send("settings", { music: a == null ? void 0 : a.musicEnabled, sounds: a == null ? void 0 : a.soundEnabled });
|
|
551
547
|
return;
|
|
552
548
|
case "doBalanceUpdate":
|
|
553
|
-
const { currency:
|
|
554
|
-
a.currency ===
|
|
549
|
+
const { currency: r, coinValueInCents: n } = this.sdkConfig.api;
|
|
550
|
+
a.currency === r && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: _t(a.balanceInCurrency, n) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
|
|
555
551
|
return;
|
|
556
552
|
case "doGamePause":
|
|
557
553
|
this.send("freeze");
|
|
@@ -587,7 +583,7 @@ class Di extends V {
|
|
|
587
583
|
}
|
|
588
584
|
}
|
|
589
585
|
const lt = O("QuantaPlugin", "color:#000000;font-weight:bold;");
|
|
590
|
-
class
|
|
586
|
+
class Wi extends V {
|
|
591
587
|
constructor(...t) {
|
|
592
588
|
super(...t), this.registerFromSdkEvents(), lt("configured");
|
|
593
589
|
}
|
|
@@ -609,26 +605,25 @@ class Ni extends V {
|
|
|
609
605
|
});
|
|
610
606
|
}
|
|
611
607
|
}
|
|
612
|
-
var
|
|
608
|
+
var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce = "object", Ze = "string", we = "major", l = "model", o = "name", d = "type", u = "vendor", c = "version", M = "architecture", J = "console", b = "mobile", f = "tablet", I = "smarttv", Pe = "wearable", ht = "xr", et = "embedded", pt = "user-agent", tt = 500, at = "brands", W = "formFactors", nt = "fullVersionList", Y = "platform", ot = "platformVersion", Ne = "bitness", z = "sec-ch-ua", oi = z + "-full-version-list", ri = z + "-arch", ci = z + "-" + Ne, di = z + "-form-factors", li = z + "-" + b, ui = z + "-" + l, Ft = z + "-" + Y, hi = Ft + "-version", Nt = [at, nt, b, l, Y, ot, M, W, Ne], T = "browser", L = "cpu", x = "device", _ = "engine", A = "os", Z = "result", ve = "Amazon", he = "Apple", gt = "ASUS", mt = "BlackBerry", Ce = "Google", wt = "Huawei", bt = "Lenovo", $e = "LG", Oe = "Microsoft", ft = "Motorola", Me = "Samsung", yt = "Sharp", Se = "Sony", je = "Xiaomi", Ke = "Zebra", Q = "Mobile ", X = " Browser", Ie = "Chrome", pi = "Edge", pe = "Firefox", ge = "Opera", kt = "Facebook", Et = "Sogou", it = "Windows", gi = typeof window !== G, S = gi && window.navigator ? window.navigator : void 0, N = S && S.userAgentData ? S.userAgentData : void 0, mi = function(s, t) {
|
|
613
609
|
var e = {}, i = t;
|
|
614
610
|
if (!xe(t)) {
|
|
615
611
|
i = {};
|
|
616
612
|
for (var a in t)
|
|
617
|
-
for (var
|
|
618
|
-
i[
|
|
613
|
+
for (var r in t[a])
|
|
614
|
+
i[r] = t[a][r].concat(i[r] ? i[r] : []);
|
|
619
615
|
}
|
|
620
616
|
for (var n in s)
|
|
621
617
|
e[n] = i[n] && i[n].length % 2 === 0 ? i[n].concat(s[n]) : s[n];
|
|
622
618
|
return e;
|
|
623
|
-
},
|
|
619
|
+
}, De = function(s) {
|
|
624
620
|
for (var t = {}, e = 0; e < s.length; e++)
|
|
625
621
|
t[s[e].toUpperCase()] = s[e];
|
|
626
622
|
return t;
|
|
627
|
-
},
|
|
623
|
+
}, st = function(s, t) {
|
|
628
624
|
if (typeof s === ce && s.length > 0) {
|
|
629
625
|
for (var e in s)
|
|
630
|
-
if (H(s[e]) == H(t))
|
|
631
|
-
return !0;
|
|
626
|
+
if (H(s[e]) == H(t)) return !0;
|
|
632
627
|
return !1;
|
|
633
628
|
}
|
|
634
629
|
return de(s) ? H(t).indexOf(H(s)) !== -1 : !1;
|
|
@@ -636,7 +631,7 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
636
631
|
for (var e in s)
|
|
637
632
|
return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? xe(s[e]) : !1);
|
|
638
633
|
}, de = function(s) {
|
|
639
|
-
return typeof s ===
|
|
634
|
+
return typeof s === Ze;
|
|
640
635
|
}, Qe = function(s) {
|
|
641
636
|
if (s) {
|
|
642
637
|
for (var t = [], e = $(/\\?\"/g, s).split(","), i = 0; i < e.length; i++)
|
|
@@ -663,24 +658,24 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
663
658
|
return $(/\\?\"/g, s);
|
|
664
659
|
}, be = function(s, t) {
|
|
665
660
|
if (de(s))
|
|
666
|
-
return s = $(/^\s\s*/, s), typeof t === G ? s : s.substring(0,
|
|
661
|
+
return s = $(/^\s\s*/, s), typeof t === G ? s : s.substring(0, tt);
|
|
667
662
|
}, vt = function(s, t) {
|
|
668
663
|
if (!(!s || !t))
|
|
669
|
-
for (var e = 0, i, a,
|
|
664
|
+
for (var e = 0, i, a, r, n, h, p; e < t.length && !h; ) {
|
|
670
665
|
var w = t[e], g = t[e + 1];
|
|
671
666
|
for (i = a = 0; i < w.length && !h && w[i]; )
|
|
672
667
|
if (h = w[i++].exec(s), h)
|
|
673
|
-
for (
|
|
674
|
-
p = h[++a], n = g[
|
|
668
|
+
for (r = 0; r < g.length; r++)
|
|
669
|
+
p = h[++a], n = g[r], typeof n === ce && n.length > 0 ? n.length === 2 ? typeof n[1] == Ye ? this[n[0]] = n[1].call(this, p) : this[n[0]] = n[1] : n.length === 3 ? typeof n[1] === Ye && !(n[1].exec && n[1].test) ? this[n[0]] = p ? n[1].call(this, p, n[2]) : void 0 : this[n[0]] = p ? p.replace(n[1], n[2]) : void 0 : n.length === 4 && (this[n[0]] = p ? n[3].call(this, p.replace(n[1], n[2])) : void 0) : this[n] = p || void 0;
|
|
675
670
|
e += 2;
|
|
676
671
|
}
|
|
677
672
|
}, Re = function(s, t) {
|
|
678
673
|
for (var e in t)
|
|
679
674
|
if (typeof t[e] === ce && t[e].length > 0) {
|
|
680
675
|
for (var i = 0; i < t[e].length; i++)
|
|
681
|
-
if (
|
|
676
|
+
if (st(t[e][i], s))
|
|
682
677
|
return e === ut ? void 0 : e;
|
|
683
|
-
} else if (
|
|
678
|
+
} else if (st(t[e], s))
|
|
684
679
|
return e === ut ? void 0 : e;
|
|
685
680
|
return t.hasOwnProperty("*") ? t["*"] : s;
|
|
686
681
|
}, Ct = {
|
|
@@ -711,12 +706,12 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
711
706
|
/\b(?:crmo|crios)\/([\w\.]+)/i
|
|
712
707
|
// Chrome for Android/iOS
|
|
713
708
|
],
|
|
714
|
-
[c, [
|
|
709
|
+
[c, [o, Q + "Chrome"]],
|
|
715
710
|
[
|
|
716
711
|
/edg(?:e|ios|a)?\/([\w\.]+)/i
|
|
717
712
|
// Microsoft Edge
|
|
718
713
|
],
|
|
719
|
-
[c, [
|
|
714
|
+
[c, [o, "Edge"]],
|
|
720
715
|
[
|
|
721
716
|
// Presto based
|
|
722
717
|
/(opera mini)\/([-\w\.]+)/i,
|
|
@@ -726,28 +721,28 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
726
721
|
/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
|
|
727
722
|
// Opera
|
|
728
723
|
],
|
|
729
|
-
[
|
|
724
|
+
[o, c],
|
|
730
725
|
[
|
|
731
726
|
/opios[\/ ]+([\w\.]+)/i
|
|
732
727
|
// Opera mini on iphone >= 8.0
|
|
733
728
|
],
|
|
734
|
-
[c, [
|
|
729
|
+
[c, [o, ge + " Mini"]],
|
|
735
730
|
[
|
|
736
731
|
/\bop(?:rg)?x\/([\w\.]+)/i
|
|
737
732
|
// Opera GX
|
|
738
733
|
],
|
|
739
|
-
[c, [
|
|
734
|
+
[c, [o, ge + " GX"]],
|
|
740
735
|
[
|
|
741
736
|
/\bopr\/([\w\.]+)/i
|
|
742
737
|
// Opera Webkit
|
|
743
738
|
],
|
|
744
|
-
[c, [
|
|
739
|
+
[c, [o, ge]],
|
|
745
740
|
[
|
|
746
741
|
// Mixed
|
|
747
742
|
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
|
|
748
743
|
// Baidu
|
|
749
744
|
],
|
|
750
|
-
[c, [
|
|
745
|
+
[c, [o, "Baidu"]],
|
|
751
746
|
[
|
|
752
747
|
/(kindle)\/([\w\.]+)/i,
|
|
753
748
|
// Kindle
|
|
@@ -766,17 +761,17 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
766
761
|
/(weibo)__([\d\.]+)/i
|
|
767
762
|
// Weibo
|
|
768
763
|
],
|
|
769
|
-
[
|
|
764
|
+
[o, c],
|
|
770
765
|
[
|
|
771
766
|
/\bddg\/([\w\.]+)/i
|
|
772
767
|
// DuckDuckGo
|
|
773
768
|
],
|
|
774
|
-
[c, [
|
|
769
|
+
[c, [o, "DuckDuckGo"]],
|
|
775
770
|
[
|
|
776
771
|
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
|
|
777
772
|
// UCBrowser
|
|
778
773
|
],
|
|
779
|
-
[c, [
|
|
774
|
+
[c, [o, "UCBrowser"]],
|
|
780
775
|
[
|
|
781
776
|
/microm.+\bqbcore\/([\w\.]+)/i,
|
|
782
777
|
// WeChat Desktop for Windows Built-in Browser
|
|
@@ -784,102 +779,102 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
784
779
|
/micromessenger\/([\w\.]+)/i
|
|
785
780
|
// WeChat
|
|
786
781
|
],
|
|
787
|
-
[c, [
|
|
782
|
+
[c, [o, "WeChat"]],
|
|
788
783
|
[
|
|
789
784
|
/konqueror\/([\w\.]+)/i
|
|
790
785
|
// Konqueror
|
|
791
786
|
],
|
|
792
|
-
[c, [
|
|
787
|
+
[c, [o, "Konqueror"]],
|
|
793
788
|
[
|
|
794
789
|
/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
|
|
795
790
|
// IE11
|
|
796
791
|
],
|
|
797
|
-
[c, [
|
|
792
|
+
[c, [o, "IE"]],
|
|
798
793
|
[
|
|
799
794
|
/ya(?:search)?browser\/([\w\.]+)/i
|
|
800
795
|
// Yandex
|
|
801
796
|
],
|
|
802
|
-
[c, [
|
|
797
|
+
[c, [o, "Yandex"]],
|
|
803
798
|
[
|
|
804
799
|
/slbrowser\/([\w\.]+)/i
|
|
805
800
|
// Smart Lenovo Browser
|
|
806
801
|
],
|
|
807
|
-
[c, [
|
|
802
|
+
[c, [o, "Smart " + bt + X]],
|
|
808
803
|
[
|
|
809
804
|
/(avast|avg)\/([\w\.]+)/i
|
|
810
805
|
// Avast/AVG Secure Browser
|
|
811
806
|
],
|
|
812
|
-
[[
|
|
807
|
+
[[o, /(.+)/, "$1 Secure" + X], c],
|
|
813
808
|
[
|
|
814
809
|
/\bfocus\/([\w\.]+)/i
|
|
815
810
|
// Firefox Focus
|
|
816
811
|
],
|
|
817
|
-
[c, [
|
|
812
|
+
[c, [o, pe + " Focus"]],
|
|
818
813
|
[
|
|
819
814
|
/\bopt\/([\w\.]+)/i
|
|
820
815
|
// Opera Touch
|
|
821
816
|
],
|
|
822
|
-
[c, [
|
|
817
|
+
[c, [o, ge + " Touch"]],
|
|
823
818
|
[
|
|
824
819
|
/coc_coc\w+\/([\w\.]+)/i
|
|
825
820
|
// Coc Coc Browser
|
|
826
821
|
],
|
|
827
|
-
[c, [
|
|
822
|
+
[c, [o, "Coc Coc"]],
|
|
828
823
|
[
|
|
829
824
|
/dolfin\/([\w\.]+)/i
|
|
830
825
|
// Dolphin
|
|
831
826
|
],
|
|
832
|
-
[c, [
|
|
827
|
+
[c, [o, "Dolphin"]],
|
|
833
828
|
[
|
|
834
829
|
/coast\/([\w\.]+)/i
|
|
835
830
|
// Opera Coast
|
|
836
831
|
],
|
|
837
|
-
[c, [
|
|
832
|
+
[c, [o, ge + " Coast"]],
|
|
838
833
|
[
|
|
839
834
|
/miuibrowser\/([\w\.]+)/i
|
|
840
835
|
// MIUI Browser
|
|
841
836
|
],
|
|
842
|
-
[c, [
|
|
837
|
+
[c, [o, "MIUI" + X]],
|
|
843
838
|
[
|
|
844
839
|
/fxios\/([\w\.-]+)/i
|
|
845
840
|
// Firefox for iOS
|
|
846
841
|
],
|
|
847
|
-
[c, [
|
|
842
|
+
[c, [o, Q + pe]],
|
|
848
843
|
[
|
|
849
844
|
/\bqihu|(qi?ho?o?|360)browser/i
|
|
850
845
|
// 360
|
|
851
846
|
],
|
|
852
|
-
[[
|
|
847
|
+
[[o, "360" + X]],
|
|
853
848
|
[
|
|
854
849
|
/\b(qq)\/([\w\.]+)/i
|
|
855
850
|
// QQ
|
|
856
851
|
],
|
|
857
|
-
[[
|
|
852
|
+
[[o, /(.+)/, "$1Browser"], c],
|
|
858
853
|
[
|
|
859
854
|
/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i
|
|
860
855
|
],
|
|
861
|
-
[[
|
|
856
|
+
[[o, /(.+)/, "$1" + X], c],
|
|
862
857
|
[
|
|
863
858
|
// Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
|
|
864
859
|
/samsungbrowser\/([\w\.]+)/i
|
|
865
860
|
// Samsung Internet
|
|
866
861
|
],
|
|
867
|
-
[c, [
|
|
862
|
+
[c, [o, Me + " Internet"]],
|
|
868
863
|
[
|
|
869
864
|
/(comodo_dragon)\/([\w\.]+)/i
|
|
870
865
|
// Comodo Dragon
|
|
871
866
|
],
|
|
872
|
-
[[
|
|
867
|
+
[[o, /_/g, " "], c],
|
|
873
868
|
[
|
|
874
869
|
/metasr[\/ ]?([\d\.]+)/i
|
|
875
870
|
// Sogou Explorer
|
|
876
871
|
],
|
|
877
|
-
[c, [
|
|
872
|
+
[c, [o, Et + " Explorer"]],
|
|
878
873
|
[
|
|
879
874
|
/(sogou)mo\w+\/([\d\.]+)/i
|
|
880
875
|
// Sogou Mobile
|
|
881
876
|
],
|
|
882
|
-
[[
|
|
877
|
+
[[o, Et + " Mobile"], c],
|
|
883
878
|
[
|
|
884
879
|
/(electron)\/([\w\.]+) safari/i,
|
|
885
880
|
// Electron-based App
|
|
@@ -888,20 +883,20 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
888
883
|
/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i
|
|
889
884
|
// QQBrowser/2345 Browser
|
|
890
885
|
],
|
|
891
|
-
[
|
|
886
|
+
[o, c],
|
|
892
887
|
[
|
|
893
888
|
/(lbbrowser|rekonq)/i,
|
|
894
889
|
// LieBao Browser/Rekonq
|
|
895
890
|
/\[(linkedin)app\]/i
|
|
896
891
|
// LinkedIn App for iOS & Android
|
|
897
892
|
],
|
|
898
|
-
[
|
|
893
|
+
[o],
|
|
899
894
|
[
|
|
900
895
|
// WebView
|
|
901
896
|
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
|
|
902
897
|
// Facebook App for iOS & Android
|
|
903
898
|
],
|
|
904
|
-
[[
|
|
899
|
+
[[o, kt], c],
|
|
905
900
|
[
|
|
906
901
|
/(Klarna)\/([\w\.]+)/i,
|
|
907
902
|
// Klarna Shopping Browser for iOS & Android
|
|
@@ -920,86 +915,86 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
920
915
|
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
|
|
921
916
|
// Chromium/Instagram/Snapchat
|
|
922
917
|
],
|
|
923
|
-
[
|
|
918
|
+
[o, c],
|
|
924
919
|
[
|
|
925
920
|
/\bgsa\/([\w\.]+) .*safari\//i
|
|
926
921
|
// Google Search Appliance on iOS
|
|
927
922
|
],
|
|
928
|
-
[c, [
|
|
923
|
+
[c, [o, "GSA"]],
|
|
929
924
|
[
|
|
930
925
|
/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
|
|
931
926
|
// TikTok
|
|
932
927
|
],
|
|
933
|
-
[c, [
|
|
928
|
+
[c, [o, "TikTok"]],
|
|
934
929
|
[
|
|
935
930
|
/headlesschrome(?:\/([\w\.]+)| )/i
|
|
936
931
|
// Chrome Headless
|
|
937
932
|
],
|
|
938
|
-
[c, [
|
|
933
|
+
[c, [o, Ie + " Headless"]],
|
|
939
934
|
[
|
|
940
935
|
/ wv\).+(chrome)\/([\w\.]+)/i
|
|
941
936
|
// Chrome WebView
|
|
942
937
|
],
|
|
943
|
-
[[
|
|
938
|
+
[[o, Ie + " WebView"], c],
|
|
944
939
|
[
|
|
945
940
|
/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
|
|
946
941
|
// Android Browser
|
|
947
942
|
],
|
|
948
|
-
[c, [
|
|
943
|
+
[c, [o, "Android" + X]],
|
|
949
944
|
[
|
|
950
945
|
/chrome\/([\w\.]+) mobile/i
|
|
951
946
|
// Chrome Mobile
|
|
952
947
|
],
|
|
953
|
-
[c, [
|
|
948
|
+
[c, [o, Q + "Chrome"]],
|
|
954
949
|
[
|
|
955
950
|
/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
|
|
956
951
|
// Chrome/OmniWeb/Arora/Tizen/Nokia
|
|
957
952
|
],
|
|
958
|
-
[
|
|
953
|
+
[o, c],
|
|
959
954
|
[
|
|
960
955
|
/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i
|
|
961
956
|
// Safari Mobile
|
|
962
957
|
],
|
|
963
|
-
[c, [
|
|
958
|
+
[c, [o, Q + "Safari"]],
|
|
964
959
|
[
|
|
965
960
|
/iphone .*mobile(?:\/\w+ | ?)safari/i
|
|
966
961
|
],
|
|
967
|
-
[[
|
|
962
|
+
[[o, Q + "Safari"]],
|
|
968
963
|
[
|
|
969
964
|
/version\/([\w\.\,]+) .*(safari)/i
|
|
970
965
|
// Safari
|
|
971
966
|
],
|
|
972
|
-
[c,
|
|
967
|
+
[c, o],
|
|
973
968
|
[
|
|
974
969
|
/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
|
|
975
970
|
// Safari < 3.0
|
|
976
971
|
],
|
|
977
|
-
[
|
|
972
|
+
[o, [c, "1"]],
|
|
978
973
|
[
|
|
979
974
|
/(webkit|khtml)\/([\w\.]+)/i
|
|
980
975
|
],
|
|
981
|
-
[
|
|
976
|
+
[o, c],
|
|
982
977
|
[
|
|
983
978
|
// Gecko based
|
|
984
979
|
/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
|
|
985
980
|
// Firefox Mobile
|
|
986
981
|
],
|
|
987
|
-
[[
|
|
982
|
+
[[o, Q + pe], c],
|
|
988
983
|
[
|
|
989
984
|
/(navigator|netscape\d?)\/([-\w\.]+)/i
|
|
990
985
|
// Netscape
|
|
991
986
|
],
|
|
992
|
-
[[
|
|
987
|
+
[[o, "Netscape"], c],
|
|
993
988
|
[
|
|
994
989
|
/(wolvic)\/([\w\.]+)/i
|
|
995
990
|
// Wolvic
|
|
996
991
|
],
|
|
997
|
-
[
|
|
992
|
+
[o, c],
|
|
998
993
|
[
|
|
999
994
|
/mobile vr; rv:([\w\.]+)\).+firefox/i
|
|
1000
995
|
// Firefox Reality
|
|
1001
996
|
],
|
|
1002
|
-
[c, [
|
|
997
|
+
[c, [o, pe + " Reality"]],
|
|
1003
998
|
[
|
|
1004
999
|
/ekiohf.+(flow)\/([\w\.]+)/i,
|
|
1005
1000
|
// Flow
|
|
@@ -1019,12 +1014,12 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1019
1014
|
/(links) \(([\w\.]+)/i
|
|
1020
1015
|
// Links
|
|
1021
1016
|
],
|
|
1022
|
-
[
|
|
1017
|
+
[o, [c, /_/g, "."]],
|
|
1023
1018
|
[
|
|
1024
1019
|
/(cobalt)\/([\w\.]+)/i
|
|
1025
1020
|
// Cobalt
|
|
1026
1021
|
],
|
|
1027
|
-
[
|
|
1022
|
+
[o, [c, /[^\d\.]+./, re]]
|
|
1028
1023
|
],
|
|
1029
1024
|
cpu: [
|
|
1030
1025
|
[
|
|
@@ -1132,14 +1127,14 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1132
1127
|
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
|
|
1133
1128
|
// Xiaomi Mi
|
|
1134
1129
|
],
|
|
1135
|
-
[[l, /_/g, " "], [u,
|
|
1130
|
+
[[l, /_/g, " "], [u, je], [d, b]],
|
|
1136
1131
|
[
|
|
1137
1132
|
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
|
|
1138
1133
|
// Redmi Pad
|
|
1139
1134
|
/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
|
|
1140
1135
|
// Mi Pad tablets
|
|
1141
1136
|
],
|
|
1142
|
-
[[l, /_/g, " "], [u,
|
|
1137
|
+
[[l, /_/g, " "], [u, je], [d, f]],
|
|
1143
1138
|
[
|
|
1144
1139
|
// OPPO
|
|
1145
1140
|
/; (\w+) bui.+ oppo/i,
|
|
@@ -1176,13 +1171,13 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1176
1171
|
// LG
|
|
1177
1172
|
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
|
|
1178
1173
|
],
|
|
1179
|
-
[l, [u,
|
|
1174
|
+
[l, [u, $e], [d, f]],
|
|
1180
1175
|
[
|
|
1181
1176
|
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
|
|
1182
1177
|
/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
|
|
1183
1178
|
/\blg-?([\d\w]+) bui/i
|
|
1184
1179
|
],
|
|
1185
|
-
[l, [u,
|
|
1180
|
+
[l, [u, $e], [d, b]],
|
|
1186
1181
|
[
|
|
1187
1182
|
// Lenovo
|
|
1188
1183
|
/(ideatab[-\w ]+)/i,
|
|
@@ -1346,11 +1341,11 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1346
1341
|
/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
|
|
1347
1342
|
// Zebra
|
|
1348
1343
|
],
|
|
1349
|
-
[l, [u,
|
|
1344
|
+
[l, [u, Ke], [d, f]],
|
|
1350
1345
|
[
|
|
1351
1346
|
/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
|
|
1352
1347
|
],
|
|
1353
|
-
[l, [u,
|
|
1348
|
+
[l, [u, Ke], [d, b]],
|
|
1354
1349
|
[
|
|
1355
1350
|
///////////////////
|
|
1356
1351
|
// SMARTTVS
|
|
@@ -1367,7 +1362,7 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1367
1362
|
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
|
|
1368
1363
|
// LG SmartTV
|
|
1369
1364
|
],
|
|
1370
|
-
[[u,
|
|
1365
|
+
[[u, $e], [d, I]],
|
|
1371
1366
|
[
|
|
1372
1367
|
/(apple) ?tv/i
|
|
1373
1368
|
// Apple TV
|
|
@@ -1398,7 +1393,7 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1398
1393
|
/(mitv-\w{5}) bui/i
|
|
1399
1394
|
// Xiaomi
|
|
1400
1395
|
],
|
|
1401
|
-
[l, [u,
|
|
1396
|
+
[l, [u, je], [d, I]],
|
|
1402
1397
|
[
|
|
1403
1398
|
/Hbbtv.*(technisat) (.*);/i
|
|
1404
1399
|
// TechniSAT
|
|
@@ -1448,16 +1443,16 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1448
1443
|
/((pebble))app/i
|
|
1449
1444
|
// Pebble
|
|
1450
1445
|
],
|
|
1451
|
-
[u, l, [d,
|
|
1446
|
+
[u, l, [d, Pe]],
|
|
1452
1447
|
[
|
|
1453
1448
|
/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
|
|
1454
1449
|
// Apple Watch
|
|
1455
1450
|
],
|
|
1456
|
-
[l, [u, he], [d,
|
|
1451
|
+
[l, [u, he], [d, Pe]],
|
|
1457
1452
|
[
|
|
1458
1453
|
/droid.+; (wt63?0{2,3})\)/i
|
|
1459
1454
|
],
|
|
1460
|
-
[l, [u,
|
|
1455
|
+
[l, [u, Ke], [d, Pe]],
|
|
1461
1456
|
[
|
|
1462
1457
|
///////////////////
|
|
1463
1458
|
// XR
|
|
@@ -1478,12 +1473,12 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1478
1473
|
/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
|
|
1479
1474
|
// Tesla
|
|
1480
1475
|
],
|
|
1481
|
-
[u, [d,
|
|
1476
|
+
[u, [d, et]],
|
|
1482
1477
|
[
|
|
1483
1478
|
/(aeobc)\b/i
|
|
1484
1479
|
// Echo Dot
|
|
1485
1480
|
],
|
|
1486
|
-
[l, [u, ve], [d,
|
|
1481
|
+
[l, [u, ve], [d, et]],
|
|
1487
1482
|
[
|
|
1488
1483
|
////////////////////
|
|
1489
1484
|
// MIXED (GENERIC)
|
|
@@ -1518,12 +1513,12 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1518
1513
|
/windows.+ edge\/([\w\.]+)/i
|
|
1519
1514
|
// EdgeHTML
|
|
1520
1515
|
],
|
|
1521
|
-
[c, [
|
|
1516
|
+
[c, [o, pi + "HTML"]],
|
|
1522
1517
|
[
|
|
1523
1518
|
/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
|
|
1524
1519
|
// Blink
|
|
1525
1520
|
],
|
|
1526
|
-
[c, [
|
|
1521
|
+
[c, [o, "Blink"]],
|
|
1527
1522
|
[
|
|
1528
1523
|
/(presto)\/([\w\.]+)/i,
|
|
1529
1524
|
// Presto
|
|
@@ -1537,12 +1532,12 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1537
1532
|
// iCab
|
|
1538
1533
|
/\b(libweb)/i
|
|
1539
1534
|
],
|
|
1540
|
-
[
|
|
1535
|
+
[o, c],
|
|
1541
1536
|
[
|
|
1542
1537
|
/rv\:([\w\.]{1,9})\b.+(gecko)/i
|
|
1543
1538
|
// Gecko
|
|
1544
1539
|
],
|
|
1545
|
-
[c,
|
|
1540
|
+
[c, o]
|
|
1546
1541
|
],
|
|
1547
1542
|
os: [
|
|
1548
1543
|
[
|
|
@@ -1550,19 +1545,19 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1550
1545
|
/microsoft (windows) (vista|xp)/i
|
|
1551
1546
|
// Windows (iTunes)
|
|
1552
1547
|
],
|
|
1553
|
-
[
|
|
1548
|
+
[o, c],
|
|
1554
1549
|
[
|
|
1555
1550
|
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
|
|
1556
1551
|
// Windows Phone
|
|
1557
1552
|
],
|
|
1558
|
-
[
|
|
1553
|
+
[o, [c, Re, Ct]],
|
|
1559
1554
|
[
|
|
1560
1555
|
/windows nt 6\.2; (arm)/i,
|
|
1561
1556
|
// Windows RT
|
|
1562
1557
|
/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
|
|
1563
1558
|
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
|
1564
1559
|
],
|
|
1565
|
-
[[c, Re, Ct], [
|
|
1560
|
+
[[c, Re, Ct], [o, it]],
|
|
1566
1561
|
[
|
|
1567
1562
|
// iOS/macOS
|
|
1568
1563
|
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
@@ -1570,19 +1565,19 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1570
1565
|
/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
|
|
1571
1566
|
/cfnetwork\/.+darwin/i
|
|
1572
1567
|
],
|
|
1573
|
-
[[c, /_/g, "."], [
|
|
1568
|
+
[[c, /_/g, "."], [o, "iOS"]],
|
|
1574
1569
|
[
|
|
1575
1570
|
/(mac os x) ?([\w\. ]*)/i,
|
|
1576
1571
|
/(macintosh|mac_powerpc\b)(?!.+haiku)/i
|
|
1577
1572
|
// Mac OS
|
|
1578
1573
|
],
|
|
1579
|
-
[[
|
|
1574
|
+
[[o, "macOS"], [c, /_/g, "."]],
|
|
1580
1575
|
[
|
|
1581
1576
|
// Mobile OSes
|
|
1582
1577
|
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
|
|
1583
1578
|
// Android-x86/HarmonyOS
|
|
1584
1579
|
],
|
|
1585
|
-
[c,
|
|
1580
|
+
[c, o],
|
|
1586
1581
|
[
|
|
1587
1582
|
// Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
|
|
1588
1583
|
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
|
|
@@ -1593,44 +1588,44 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1593
1588
|
/\((series40);/i
|
|
1594
1589
|
// Series 40
|
|
1595
1590
|
],
|
|
1596
|
-
[
|
|
1591
|
+
[o, c],
|
|
1597
1592
|
[
|
|
1598
1593
|
/\(bb(10);/i
|
|
1599
1594
|
// BlackBerry 10
|
|
1600
1595
|
],
|
|
1601
|
-
[c, [
|
|
1596
|
+
[c, [o, mt]],
|
|
1602
1597
|
[
|
|
1603
1598
|
/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
|
|
1604
1599
|
// Symbian
|
|
1605
1600
|
],
|
|
1606
|
-
[c, [
|
|
1601
|
+
[c, [o, "Symbian"]],
|
|
1607
1602
|
[
|
|
1608
1603
|
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
|
|
1609
1604
|
// Firefox OS
|
|
1610
1605
|
],
|
|
1611
|
-
[c, [
|
|
1606
|
+
[c, [o, pe + " OS"]],
|
|
1612
1607
|
[
|
|
1613
1608
|
/web0s;.+rt(tv)/i,
|
|
1614
1609
|
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
|
|
1615
1610
|
// WebOS
|
|
1616
1611
|
],
|
|
1617
|
-
[c, [
|
|
1612
|
+
[c, [o, "webOS"]],
|
|
1618
1613
|
[
|
|
1619
1614
|
/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
|
|
1620
1615
|
// watchOS
|
|
1621
1616
|
],
|
|
1622
|
-
[c, [
|
|
1617
|
+
[c, [o, "watchOS"]],
|
|
1623
1618
|
[
|
|
1624
1619
|
// Google Chromecast
|
|
1625
1620
|
/crkey\/([\d\.]+)/i
|
|
1626
1621
|
// Google Chromecast
|
|
1627
1622
|
],
|
|
1628
|
-
[c, [
|
|
1623
|
+
[c, [o, Ie + "cast"]],
|
|
1629
1624
|
[
|
|
1630
1625
|
/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
|
|
1631
1626
|
// Chromium OS
|
|
1632
1627
|
],
|
|
1633
|
-
[[
|
|
1628
|
+
[[o, "Chrome OS"], c],
|
|
1634
1629
|
[
|
|
1635
1630
|
// Smart TVs
|
|
1636
1631
|
/panasonic;(viera)/i,
|
|
@@ -1662,12 +1657,12 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1662
1657
|
/(haiku) (\w+)/i
|
|
1663
1658
|
// Haiku
|
|
1664
1659
|
],
|
|
1665
|
-
[
|
|
1660
|
+
[o, c],
|
|
1666
1661
|
[
|
|
1667
1662
|
/(sunos) ?([\w\.\d]*)/i
|
|
1668
1663
|
// Solaris
|
|
1669
1664
|
],
|
|
1670
|
-
[[
|
|
1665
|
+
[[o, "Solaris"], c],
|
|
1671
1666
|
[
|
|
1672
1667
|
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
|
|
1673
1668
|
// Solaris
|
|
@@ -1678,49 +1673,48 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1678
1673
|
/(unix) ?([\w\.]*)/i
|
|
1679
1674
|
// UNIX
|
|
1680
1675
|
],
|
|
1681
|
-
[
|
|
1676
|
+
[o, c]
|
|
1682
1677
|
]
|
|
1683
1678
|
}, Te = function() {
|
|
1684
1679
|
var s = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
|
|
1685
1680
|
return B.call(s.init, [
|
|
1686
|
-
[T, [
|
|
1687
|
-
[
|
|
1681
|
+
[T, [o, c, we, d]],
|
|
1682
|
+
[L, [M]],
|
|
1688
1683
|
[x, [d, l, u]],
|
|
1689
|
-
[_, [
|
|
1690
|
-
[
|
|
1684
|
+
[_, [o, c]],
|
|
1685
|
+
[A, [o, c]]
|
|
1691
1686
|
]), B.call(s.isIgnore, [
|
|
1692
1687
|
[T, [c, we]],
|
|
1693
1688
|
[_, [c]],
|
|
1694
|
-
[
|
|
1689
|
+
[A, [c]]
|
|
1695
1690
|
]), B.call(s.isIgnoreRgx, [
|
|
1696
1691
|
[T, / ?browser$/i],
|
|
1697
|
-
[
|
|
1692
|
+
[A, / ?os$/i]
|
|
1698
1693
|
]), B.call(s.toString, [
|
|
1699
|
-
[T, [
|
|
1700
|
-
[
|
|
1694
|
+
[T, [o, c]],
|
|
1695
|
+
[L, [M]],
|
|
1701
1696
|
[x, [u, l]],
|
|
1702
|
-
[_, [
|
|
1703
|
-
[
|
|
1697
|
+
[_, [o, c]],
|
|
1698
|
+
[A, [o, c]]
|
|
1704
1699
|
]), s;
|
|
1705
|
-
}(),
|
|
1706
|
-
var e = Te.init[t], i = Te.isIgnore[t] || 0, a = Te.isIgnoreRgx[t] || 0,
|
|
1700
|
+
}(), wi = function(s, t) {
|
|
1701
|
+
var e = Te.init[t], i = Te.isIgnore[t] || 0, a = Te.isIgnoreRgx[t] || 0, r = Te.toString[t] || 0;
|
|
1707
1702
|
function n() {
|
|
1708
1703
|
B.call(this, e);
|
|
1709
1704
|
}
|
|
1710
1705
|
return n.prototype.getItem = function() {
|
|
1711
1706
|
return s;
|
|
1712
1707
|
}, n.prototype.withClientHints = function() {
|
|
1713
|
-
return
|
|
1714
|
-
return s.setCH(new
|
|
1708
|
+
return N ? N.getHighEntropyValues(Nt).then(function(h) {
|
|
1709
|
+
return s.setCH(new Dt(h, !1)).parseCH().get();
|
|
1715
1710
|
}) : s.parseCH().get();
|
|
1716
1711
|
}, n.prototype.withFeatureCheck = function() {
|
|
1717
1712
|
return s.detectFeature().get();
|
|
1718
1713
|
}, t != Z && (n.prototype.is = function(h) {
|
|
1719
1714
|
var p = !1;
|
|
1720
1715
|
for (var w in this)
|
|
1721
|
-
if (this.hasOwnProperty(w) && !
|
|
1722
|
-
if (p = !0, h != G)
|
|
1723
|
-
break;
|
|
1716
|
+
if (this.hasOwnProperty(w) && !st(i, w) && H(a ? $(a, this[w]) : this[w]) == H(a ? $(a, h) : h)) {
|
|
1717
|
+
if (p = !0, h != G) break;
|
|
1724
1718
|
} else if (h == G && p) {
|
|
1725
1719
|
p = !p;
|
|
1726
1720
|
break;
|
|
@@ -1728,10 +1722,10 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1728
1722
|
return p;
|
|
1729
1723
|
}, n.prototype.toString = function() {
|
|
1730
1724
|
var h = re;
|
|
1731
|
-
for (var p in
|
|
1732
|
-
typeof this[
|
|
1725
|
+
for (var p in r)
|
|
1726
|
+
typeof this[r[p]] !== G && (h += (h ? " " : re) + this[r[p]]);
|
|
1733
1727
|
return h || G;
|
|
1734
|
-
}),
|
|
1728
|
+
}), N || (n.prototype.then = function(h) {
|
|
1735
1729
|
var p = this, w = function() {
|
|
1736
1730
|
for (var k in p)
|
|
1737
1731
|
p.hasOwnProperty(k) && (this[k] = p[k]);
|
|
@@ -1744,18 +1738,18 @@ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce
|
|
|
1744
1738
|
return h(g), g;
|
|
1745
1739
|
}), new n();
|
|
1746
1740
|
};
|
|
1747
|
-
function
|
|
1748
|
-
if (s = s || {}, B.call(this,
|
|
1741
|
+
function Dt(s, t) {
|
|
1742
|
+
if (s = s || {}, B.call(this, Nt), t)
|
|
1749
1743
|
B.call(this, [
|
|
1750
|
-
[
|
|
1751
|
-
[
|
|
1752
|
-
[b, /\?1/.test(s[
|
|
1753
|
-
[l, me(s[
|
|
1754
|
-
[Y, me(s[
|
|
1755
|
-
[
|
|
1756
|
-
[M, me(s[
|
|
1757
|
-
[W, Qe(s[
|
|
1758
|
-
[
|
|
1744
|
+
[at, Qe(s[z])],
|
|
1745
|
+
[nt, Qe(s[oi])],
|
|
1746
|
+
[b, /\?1/.test(s[li])],
|
|
1747
|
+
[l, me(s[ui])],
|
|
1748
|
+
[Y, me(s[Ft])],
|
|
1749
|
+
[ot, me(s[hi])],
|
|
1750
|
+
[M, me(s[ri])],
|
|
1751
|
+
[W, Qe(s[di])],
|
|
1752
|
+
[Ne, me(s[ci])]
|
|
1759
1753
|
]);
|
|
1760
1754
|
else
|
|
1761
1755
|
for (var e in s)
|
|
@@ -1764,45 +1758,45 @@ function Ft(s, t) {
|
|
|
1764
1758
|
function It(s, t, e, i) {
|
|
1765
1759
|
return this.get = function(a) {
|
|
1766
1760
|
return a ? this.data.hasOwnProperty(a) ? this.data[a] : void 0 : this.data;
|
|
1767
|
-
}, this.set = function(a,
|
|
1768
|
-
return this.data[a] =
|
|
1761
|
+
}, this.set = function(a, r) {
|
|
1762
|
+
return this.data[a] = r, this;
|
|
1769
1763
|
}, this.setCH = function(a) {
|
|
1770
1764
|
return this.uaCH = a, this;
|
|
1771
1765
|
}, this.detectFeature = function() {
|
|
1772
1766
|
if (S && S.userAgent == this.ua)
|
|
1773
1767
|
switch (this.itemType) {
|
|
1774
1768
|
case T:
|
|
1775
|
-
S.brave && typeof S.brave.isBrave ==
|
|
1769
|
+
S.brave && typeof S.brave.isBrave == Ye && this.set(o, "Brave");
|
|
1776
1770
|
break;
|
|
1777
1771
|
case x:
|
|
1778
|
-
!this.get(d) &&
|
|
1772
|
+
!this.get(d) && N && N[b] && this.set(d, b), this.get(l) == "Macintosh" && S && typeof S.standalone !== G && S.maxTouchPoints && S.maxTouchPoints > 2 && this.set(l, "iPad").set(d, f);
|
|
1779
1773
|
break;
|
|
1780
|
-
case
|
|
1781
|
-
!this.get(
|
|
1774
|
+
case A:
|
|
1775
|
+
!this.get(o) && N && N[Y] && this.set(o, N[Y]);
|
|
1782
1776
|
break;
|
|
1783
1777
|
case Z:
|
|
1784
|
-
var a = this.data,
|
|
1778
|
+
var a = this.data, r = function(n) {
|
|
1785
1779
|
return a[n].getItem().detectFeature().get();
|
|
1786
1780
|
};
|
|
1787
|
-
this.set(T,
|
|
1781
|
+
this.set(T, r(T)).set(L, r(L)).set(x, r(x)).set(_, r(_)).set(A, r(A));
|
|
1788
1782
|
}
|
|
1789
1783
|
return this;
|
|
1790
1784
|
}, this.parseUA = function() {
|
|
1791
1785
|
return this.itemType != Z && vt.call(this.data, this.ua, this.rgxMap), this.itemType == T && this.set(we, Xe(this.get(c))), this;
|
|
1792
1786
|
}, this.parseCH = function() {
|
|
1793
|
-
var a = this.uaCH,
|
|
1787
|
+
var a = this.uaCH, r = this.rgxMap;
|
|
1794
1788
|
switch (this.itemType) {
|
|
1795
1789
|
case T:
|
|
1796
|
-
var n = a[
|
|
1790
|
+
var n = a[nt] || a[at], h;
|
|
1797
1791
|
if (n)
|
|
1798
1792
|
for (var p in n) {
|
|
1799
1793
|
var w = $(/(Google|Microsoft) /, n[p].brand || n[p]), g = n[p].version;
|
|
1800
|
-
!/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(
|
|
1794
|
+
!/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(o, w).set(c, g).set(we, Xe(g)), h = w);
|
|
1801
1795
|
}
|
|
1802
1796
|
break;
|
|
1803
|
-
case
|
|
1797
|
+
case L:
|
|
1804
1798
|
var k = a[M];
|
|
1805
|
-
k && (k && a[
|
|
1799
|
+
k && (k && a[Ne] == "64" && (k += "64"), vt.call(this.data, k + ";", r));
|
|
1806
1800
|
break;
|
|
1807
1801
|
case x:
|
|
1808
1802
|
if (a[b] && this.set(d, b), a[l] && this.set(l, a[l]), a[l] == "Xbox" && this.set(d, J).set(u, Oe), a[W]) {
|
|
@@ -1815,19 +1809,19 @@ function It(s, t, e, i) {
|
|
|
1815
1809
|
this.set(d, F);
|
|
1816
1810
|
}
|
|
1817
1811
|
break;
|
|
1818
|
-
case
|
|
1819
|
-
var
|
|
1820
|
-
if (
|
|
1821
|
-
var
|
|
1822
|
-
|
|
1812
|
+
case A:
|
|
1813
|
+
var K = a[Y];
|
|
1814
|
+
if (K) {
|
|
1815
|
+
var U = a[ot];
|
|
1816
|
+
K == it && (U = parseInt(Xe(U), 10) >= 13 ? "11" : "10"), this.set(o, K).set(c, U);
|
|
1823
1817
|
}
|
|
1824
|
-
this.get(
|
|
1818
|
+
this.get(o) == it && a[l] == "Xbox" && this.set(o, "Xbox").set(c, void 0);
|
|
1825
1819
|
break;
|
|
1826
1820
|
case Z:
|
|
1827
|
-
var le = this.data,
|
|
1821
|
+
var le = this.data, P = function(Ee) {
|
|
1828
1822
|
return le[Ee].getItem().setCH(a).parseCH().get();
|
|
1829
1823
|
};
|
|
1830
|
-
this.set(T,
|
|
1824
|
+
this.set(T, P(T)).set(L, P(L)).set(x, P(x)).set(_, P(_)).set(A, P(A));
|
|
1831
1825
|
}
|
|
1832
1826
|
return this;
|
|
1833
1827
|
}, B.call(this, [
|
|
@@ -1835,13 +1829,13 @@ function It(s, t, e, i) {
|
|
|
1835
1829
|
["ua", t],
|
|
1836
1830
|
["uaCH", i],
|
|
1837
1831
|
["rgxMap", e],
|
|
1838
|
-
["data",
|
|
1832
|
+
["data", wi(this, s)]
|
|
1839
1833
|
]), this;
|
|
1840
1834
|
}
|
|
1841
1835
|
function R(s, t, e) {
|
|
1842
|
-
if (typeof s === ce ? (xe(s, !0) ? (typeof t === ce && (e = t), t = s) : (e = s, t = void 0), s = void 0) : typeof s ===
|
|
1836
|
+
if (typeof s === ce ? (xe(s, !0) ? (typeof t === ce && (e = t), t = s) : (e = s, t = void 0), s = void 0) : typeof s === Ze && !xe(t, !0) && (e = t, t = void 0), !(this instanceof R))
|
|
1843
1837
|
return new R(s, t, e).getResult();
|
|
1844
|
-
var i = typeof s ===
|
|
1838
|
+
var i = typeof s === Ze ? s : (
|
|
1845
1839
|
// Passed user-agent string
|
|
1846
1840
|
S && S.userAgent ? S.userAgent : (
|
|
1847
1841
|
// navigator.userAgent
|
|
@@ -1850,34 +1844,34 @@ function R(s, t, e) {
|
|
|
1850
1844
|
re
|
|
1851
1845
|
)
|
|
1852
1846
|
)
|
|
1853
|
-
), a = new
|
|
1847
|
+
), a = new Dt(e, !0), r = t ? mi(St, t) : St, n = function(h) {
|
|
1854
1848
|
return h == Z ? function() {
|
|
1855
|
-
return new It(h, i,
|
|
1849
|
+
return new It(h, i, r, a).set("ua", i).set(T, this.getBrowser()).set(L, this.getCPU()).set(x, this.getDevice()).set(_, this.getEngine()).set(A, this.getOS()).get();
|
|
1856
1850
|
} : function() {
|
|
1857
|
-
return new It(h, i,
|
|
1851
|
+
return new It(h, i, r[h], a).parseUA().get();
|
|
1858
1852
|
};
|
|
1859
1853
|
};
|
|
1860
1854
|
return B.call(this, [
|
|
1861
1855
|
["getBrowser", n(T)],
|
|
1862
|
-
["getCPU", n(
|
|
1856
|
+
["getCPU", n(L)],
|
|
1863
1857
|
["getDevice", n(x)],
|
|
1864
1858
|
["getEngine", n(_)],
|
|
1865
|
-
["getOS", n(
|
|
1859
|
+
["getOS", n(A)],
|
|
1866
1860
|
["getResult", n(Z)],
|
|
1867
1861
|
["getUA", function() {
|
|
1868
1862
|
return i;
|
|
1869
1863
|
}],
|
|
1870
1864
|
["setUA", function(h) {
|
|
1871
|
-
return de(h) && (i = h.length >
|
|
1865
|
+
return de(h) && (i = h.length > tt ? be(h, tt) : h), this;
|
|
1872
1866
|
}]
|
|
1873
1867
|
]).setUA(i), this;
|
|
1874
1868
|
}
|
|
1875
|
-
R.VERSION =
|
|
1876
|
-
R.BROWSER =
|
|
1877
|
-
R.CPU =
|
|
1878
|
-
R.DEVICE =
|
|
1879
|
-
R.ENGINE = R.OS =
|
|
1880
|
-
class
|
|
1869
|
+
R.VERSION = ni;
|
|
1870
|
+
R.BROWSER = De([o, c, we, d]);
|
|
1871
|
+
R.CPU = De([M]);
|
|
1872
|
+
R.DEVICE = De([l, u, d, J, b, I, f, Pe, et]);
|
|
1873
|
+
R.ENGINE = R.OS = De([o, c]);
|
|
1874
|
+
class bi {
|
|
1881
1875
|
constructor(t, e) {
|
|
1882
1876
|
m(this, "config");
|
|
1883
1877
|
m(this, "sdkConfig");
|
|
@@ -1896,7 +1890,7 @@ class pi {
|
|
|
1896
1890
|
});
|
|
1897
1891
|
}
|
|
1898
1892
|
}
|
|
1899
|
-
class
|
|
1893
|
+
class fi {
|
|
1900
1894
|
constructor(t) {
|
|
1901
1895
|
m(this, "socket", null);
|
|
1902
1896
|
m(this, "webSocketUrl");
|
|
@@ -1956,10 +1950,10 @@ class gi {
|
|
|
1956
1950
|
i !== -1 && this.eventListeners[t].splice(i, 1);
|
|
1957
1951
|
}
|
|
1958
1952
|
}
|
|
1959
|
-
function
|
|
1953
|
+
function Ae(s) {
|
|
1960
1954
|
return JSON.parse(s == null ? void 0 : s.data);
|
|
1961
1955
|
}
|
|
1962
|
-
function
|
|
1956
|
+
function yi(s) {
|
|
1963
1957
|
var t;
|
|
1964
1958
|
return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "Ping";
|
|
1965
1959
|
}
|
|
@@ -1967,20 +1961,20 @@ function Tt(s) {
|
|
|
1967
1961
|
var t;
|
|
1968
1962
|
return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "RealityCheck";
|
|
1969
1963
|
}
|
|
1970
|
-
function
|
|
1964
|
+
function Ue(s) {
|
|
1971
1965
|
return s.header.name === "GameEvent";
|
|
1972
1966
|
}
|
|
1973
|
-
function
|
|
1974
|
-
return
|
|
1967
|
+
function ki(s) {
|
|
1968
|
+
return Ue(s) && s.body.event === "OPEN_GAME";
|
|
1975
1969
|
}
|
|
1976
|
-
function
|
|
1970
|
+
function At(s) {
|
|
1977
1971
|
return s.header.code !== 1;
|
|
1978
1972
|
}
|
|
1979
|
-
function
|
|
1980
|
-
return
|
|
1973
|
+
function Ei(s) {
|
|
1974
|
+
return Ue(s) && s.body.event.includes("_RESULT");
|
|
1981
1975
|
}
|
|
1982
1976
|
var ee, fe;
|
|
1983
|
-
class
|
|
1977
|
+
class vi extends fi {
|
|
1984
1978
|
constructor(e, i) {
|
|
1985
1979
|
const a = new URL(e.apiUrl);
|
|
1986
1980
|
a.searchParams.set("cageCode", e.cageCode), a.searchParams.set("gameCode", e.gameCode), a.searchParams.set("operatorCode", e.operatorCode), a.searchParams.set("playMode", e.playMode), a.searchParams.set("token", e.token), a.searchParams.set("username", e.username);
|
|
@@ -2014,11 +2008,11 @@ class fi extends gi {
|
|
|
2014
2008
|
*/
|
|
2015
2009
|
m(this, "seqId", 0);
|
|
2016
2010
|
m(this, "gameCode");
|
|
2017
|
-
C(this, ee
|
|
2018
|
-
C(this, fe
|
|
2011
|
+
C(this, ee);
|
|
2012
|
+
C(this, fe);
|
|
2019
2013
|
m(this, "onMessage", (e) => {
|
|
2020
|
-
const i =
|
|
2021
|
-
(
|
|
2014
|
+
const i = Ae(e);
|
|
2015
|
+
(Ue(i) || yi(i) || Tt(i)) && this.sendAcknowledgement(i), Tt(i) && this.handleRealityCheck(i);
|
|
2022
2016
|
});
|
|
2023
2017
|
this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, E(this, ee, i.requestTimeoutMs), E(this, fe, i.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
|
|
2024
2018
|
}
|
|
@@ -2057,12 +2051,12 @@ class fi extends gi {
|
|
|
2057
2051
|
}
|
|
2058
2052
|
request(e, i) {
|
|
2059
2053
|
const a = this.buildPayload(e, i);
|
|
2060
|
-
return new Promise((
|
|
2054
|
+
return new Promise((r, n) => {
|
|
2061
2055
|
setTimeout(() => n({ type: "timeout" }), y(this, ee));
|
|
2062
2056
|
const h = (p) => {
|
|
2063
|
-
const w =
|
|
2057
|
+
const w = Ae(p);
|
|
2064
2058
|
try {
|
|
2065
|
-
e.cId === w.header.cId && (this.removeEventListener("message", h), w.header.code === 1 ?
|
|
2059
|
+
e.cId === w.header.cId && (this.removeEventListener("message", h), w.header.code === 1 ? r(w) : n({ message: w, type: "error" }));
|
|
2066
2060
|
} catch {
|
|
2067
2061
|
n({ message: w, type: "error" });
|
|
2068
2062
|
}
|
|
@@ -2073,8 +2067,8 @@ class fi extends gi {
|
|
|
2073
2067
|
freeRounds(e) {
|
|
2074
2068
|
const i = this.buildHeader("ActivateFreeRound");
|
|
2075
2069
|
return this.request(i, e).then((a) => a.body).catch((a) => {
|
|
2076
|
-
var
|
|
2077
|
-
throw { data: (
|
|
2070
|
+
var r;
|
|
2071
|
+
throw { data: (r = a == null ? void 0 : a.message) == null ? void 0 : r.body, type: a.type };
|
|
2078
2072
|
});
|
|
2079
2073
|
}
|
|
2080
2074
|
async authenticate(e = !1) {
|
|
@@ -2083,43 +2077,43 @@ class fi extends gi {
|
|
|
2083
2077
|
version: y(this, fe),
|
|
2084
2078
|
reconnect: e
|
|
2085
2079
|
};
|
|
2086
|
-
return this.request(i, a).then((
|
|
2080
|
+
return this.request(i, a).then((r) => r.body).catch((r) => {
|
|
2087
2081
|
var n;
|
|
2088
|
-
throw { data: (n =
|
|
2082
|
+
throw { data: (n = r == null ? void 0 : r.message) == null ? void 0 : n.body, type: r.type };
|
|
2089
2083
|
});
|
|
2090
2084
|
}
|
|
2091
2085
|
async openGame() {
|
|
2092
2086
|
const e = this.buildHeader("OpenGame"), i = {
|
|
2093
2087
|
gameCode: this.gameCode
|
|
2094
2088
|
};
|
|
2095
|
-
return new Promise((a,
|
|
2089
|
+
return new Promise((a, r) => {
|
|
2096
2090
|
const n = (h) => {
|
|
2097
|
-
const p =
|
|
2098
|
-
|
|
2091
|
+
const p = Ae(h);
|
|
2092
|
+
ki(p) ? (this.removeEventListener("message", n), a(p.body)) : At(p) && r({ data: p.body, type: "error" });
|
|
2099
2093
|
};
|
|
2100
2094
|
this.addEventListener("message", n), this.request(e, i).catch(
|
|
2101
2095
|
(h) => {
|
|
2102
2096
|
var p;
|
|
2103
|
-
return
|
|
2097
|
+
return r({ data: (p = h == null ? void 0 : h.message) == null ? void 0 : p.body, type: h.type });
|
|
2104
2098
|
}
|
|
2105
2099
|
);
|
|
2106
2100
|
});
|
|
2107
2101
|
}
|
|
2108
2102
|
sendAcknowledgement(e) {
|
|
2109
|
-
const { name: i, cId: a } = e.header,
|
|
2103
|
+
const { name: i, cId: a } = e.header, r = this.buildHeader(i, a), n = this.buildPayload(r, {});
|
|
2110
2104
|
this.send(n);
|
|
2111
2105
|
}
|
|
2112
2106
|
sendAction(e, i) {
|
|
2113
|
-
const a = this.buildHeader("GameAction"),
|
|
2107
|
+
const a = this.buildHeader("GameAction"), r = {
|
|
2114
2108
|
...this.getBodyExtras(e),
|
|
2115
2109
|
data: i
|
|
2116
2110
|
};
|
|
2117
2111
|
return new Promise((n, h) => {
|
|
2118
2112
|
const p = (w) => {
|
|
2119
|
-
const g =
|
|
2120
|
-
|
|
2113
|
+
const g = Ae(w);
|
|
2114
|
+
Ue(g) && r.seqId === g.body.correlationSeqId && (this.removeEventListener("message", p), Ei(g) ? n(g.body) : At(g) && h({ data: g.body, type: "error" }));
|
|
2121
2115
|
};
|
|
2122
|
-
this.addEventListener("message", p), this.request(a,
|
|
2116
|
+
this.addEventListener("message", p), this.request(a, r).catch(
|
|
2123
2117
|
(w) => {
|
|
2124
2118
|
var g;
|
|
2125
2119
|
return h({ data: (g = w == null ? void 0 : w.message) == null ? void 0 : g.body, type: w.type });
|
|
@@ -2132,7 +2126,19 @@ class fi extends gi {
|
|
|
2132
2126
|
}
|
|
2133
2127
|
}
|
|
2134
2128
|
ee = new WeakMap(), fe = new WeakMap();
|
|
2135
|
-
|
|
2129
|
+
const Ci = {
|
|
2130
|
+
CA_BC: "CA",
|
|
2131
|
+
CA_ON: "CA",
|
|
2132
|
+
GER: "DE",
|
|
2133
|
+
US_CT: "US",
|
|
2134
|
+
US_MI: "US",
|
|
2135
|
+
US_NJ: "US",
|
|
2136
|
+
USA: "US"
|
|
2137
|
+
};
|
|
2138
|
+
function Pt(s) {
|
|
2139
|
+
return !s || s === "NOT_APPLICABLE" ? null : Ci[s] ?? s;
|
|
2140
|
+
}
|
|
2141
|
+
function Gt(s) {
|
|
2136
2142
|
const t = s.contract;
|
|
2137
2143
|
return t ? {
|
|
2138
2144
|
contract: {
|
|
@@ -2143,7 +2149,7 @@ function Dt(s) {
|
|
|
2143
2149
|
coinValueInCents: t.coinValueInCents,
|
|
2144
2150
|
country: t.countryCode,
|
|
2145
2151
|
currency: t.currencyCode,
|
|
2146
|
-
jurisdiction: t.jurisdictionCode,
|
|
2152
|
+
jurisdiction: Pt(t.jurisdictionCode),
|
|
2147
2153
|
uiMessages: t.uiMessages,
|
|
2148
2154
|
username: t.username
|
|
2149
2155
|
}
|
|
@@ -2156,13 +2162,13 @@ function Dt(s) {
|
|
|
2156
2162
|
coinValueInCents: s.coinValueInCents,
|
|
2157
2163
|
country: s.countryCode,
|
|
2158
2164
|
currency: s.currencyCode,
|
|
2159
|
-
jurisdiction: s.jurisdictionCode,
|
|
2165
|
+
jurisdiction: Pt(s.jurisdictionCode),
|
|
2160
2166
|
uiMessages: s.uiMessages,
|
|
2161
2167
|
username: s.username
|
|
2162
2168
|
}
|
|
2163
2169
|
};
|
|
2164
2170
|
}
|
|
2165
|
-
function
|
|
2171
|
+
function Ht(s) {
|
|
2166
2172
|
var t, e;
|
|
2167
2173
|
return {
|
|
2168
2174
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
@@ -2170,7 +2176,7 @@ function Nt(s) {
|
|
|
2170
2176
|
details: (e = s.data) == null ? void 0 : e.details
|
|
2171
2177
|
};
|
|
2172
2178
|
}
|
|
2173
|
-
function
|
|
2179
|
+
function Vt(s, t) {
|
|
2174
2180
|
const e = t.contract;
|
|
2175
2181
|
if (!e) {
|
|
2176
2182
|
const i = t.data;
|
|
@@ -2290,7 +2296,7 @@ function Gt(s, t) {
|
|
|
2290
2296
|
data: t.opaqueGameServerToUi
|
|
2291
2297
|
};
|
|
2292
2298
|
}
|
|
2293
|
-
function
|
|
2299
|
+
function zt(s) {
|
|
2294
2300
|
var t, e;
|
|
2295
2301
|
return {
|
|
2296
2302
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
@@ -2298,7 +2304,7 @@ function Ht(s) {
|
|
|
2298
2304
|
details: (e = s.data) == null ? void 0 : e.details
|
|
2299
2305
|
};
|
|
2300
2306
|
}
|
|
2301
|
-
function
|
|
2307
|
+
function qt(s) {
|
|
2302
2308
|
const t = s.contract;
|
|
2303
2309
|
if (!t) {
|
|
2304
2310
|
const e = s.data;
|
|
@@ -2398,7 +2404,7 @@ function Vt(s) {
|
|
|
2398
2404
|
data: s.opaqueGameServerToUi
|
|
2399
2405
|
};
|
|
2400
2406
|
}
|
|
2401
|
-
function
|
|
2407
|
+
function Wt(s) {
|
|
2402
2408
|
var t, e;
|
|
2403
2409
|
return {
|
|
2404
2410
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
@@ -2406,14 +2412,14 @@ function zt(s) {
|
|
|
2406
2412
|
details: (e = s.data) == null ? void 0 : e.details
|
|
2407
2413
|
};
|
|
2408
2414
|
}
|
|
2409
|
-
const
|
|
2410
|
-
parseAuthenticateResponse:
|
|
2411
|
-
parseAuthenticateError:
|
|
2412
|
-
parseOpenGameResponse:
|
|
2413
|
-
parseOpenGameError:
|
|
2414
|
-
parsePlayResponse:
|
|
2415
|
-
parsePlayError:
|
|
2416
|
-
},
|
|
2415
|
+
const $i = {
|
|
2416
|
+
parseAuthenticateResponse: Gt,
|
|
2417
|
+
parseAuthenticateError: Ht,
|
|
2418
|
+
parseOpenGameResponse: Vt,
|
|
2419
|
+
parseOpenGameError: zt,
|
|
2420
|
+
parsePlayResponse: qt,
|
|
2421
|
+
parsePlayError: Wt
|
|
2422
|
+
}, Mi = {
|
|
2417
2423
|
bul: "bg",
|
|
2418
2424
|
chi: "zh",
|
|
2419
2425
|
zho: "zh",
|
|
@@ -2445,50 +2451,53 @@ const Gi = {
|
|
|
2445
2451
|
tur: "tr",
|
|
2446
2452
|
ukr: "uk",
|
|
2447
2453
|
vie: "vi"
|
|
2448
|
-
}, { device:
|
|
2449
|
-
class
|
|
2454
|
+
}, { device: Si } = R(navigator.userAgent), Ii = O("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
|
|
2455
|
+
class ji extends bi {
|
|
2450
2456
|
constructor(...e) {
|
|
2451
2457
|
super(...e);
|
|
2452
2458
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2453
2459
|
// @ts-ignore
|
|
2454
2460
|
m(this, "socket");
|
|
2461
|
+
m(this, "error");
|
|
2455
2462
|
this.on("openGame", async () => {
|
|
2456
2463
|
try {
|
|
2464
|
+
this.error = void 0;
|
|
2457
2465
|
const i = await this.openGame();
|
|
2458
2466
|
this.send("openGameResponse", i);
|
|
2459
2467
|
} catch (i) {
|
|
2460
|
-
this.send("openGameError", i);
|
|
2468
|
+
this.error = i, this.send("openGameError", i);
|
|
2461
2469
|
}
|
|
2462
2470
|
}), this.on("play", async (i) => {
|
|
2463
2471
|
try {
|
|
2472
|
+
this.error = void 0;
|
|
2464
2473
|
const a = await this.play(i);
|
|
2465
2474
|
this.send("playResponse", a);
|
|
2466
2475
|
} catch (a) {
|
|
2467
|
-
this.send("playError", a);
|
|
2476
|
+
this.error = a, this.send("playError", a);
|
|
2468
2477
|
}
|
|
2469
2478
|
}), this.on("freeRounds", async (i) => {
|
|
2470
2479
|
try {
|
|
2471
|
-
await this.socket.freeRounds(i), this.send("freeRoundsResponse", i);
|
|
2480
|
+
this.error = void 0, await this.socket.freeRounds(i), this.send("freeRoundsResponse", i);
|
|
2472
2481
|
} catch (a) {
|
|
2473
|
-
this.send("freeRoundsError", a);
|
|
2482
|
+
this.error = a, this.send("freeRoundsError", a);
|
|
2474
2483
|
}
|
|
2475
2484
|
}), this.on("configured", (i) => {
|
|
2476
2485
|
this.socket.setRequestTimeoutMs(i.ui.requestTimeoutMs);
|
|
2477
2486
|
}), this.registerFromSdkEvents();
|
|
2478
2487
|
}
|
|
2479
2488
|
initialize(e) {
|
|
2480
|
-
this.socket = new
|
|
2489
|
+
this.socket = new vi(e, {
|
|
2481
2490
|
gameVersion: this.config.gameVersion,
|
|
2482
2491
|
requestTimeoutMs: this.sdkConfig.ui.requestTimeoutMs
|
|
2483
2492
|
}), ["fireboltroulette"].includes(e.gameCode) || (this.socket.addEventListener("close", (i) => {
|
|
2484
|
-
i.code === 1008 ? this.send("error", {
|
|
2493
|
+
i.code === 1008 ? this.error || this.send("error", {
|
|
2485
2494
|
type: "CLOSE",
|
|
2486
2495
|
messageCode: "TOO_MANY_OPEN_GAMES",
|
|
2487
2496
|
messageKey: "RgsError.TOO_MANY_OPEN_GAMES"
|
|
2488
|
-
}) : i.code === 1011 || this.reconnect();
|
|
2489
|
-
}), ["mobile", "tablet"].includes(
|
|
2497
|
+
}) : i.code === 1011 ? this.error || this.send("error", { type: "CLOSE", messageCode: "UNKNOWN", messageKey: "RgsError.UNKNOWN" }) : this.reconnect();
|
|
2498
|
+
}), ["mobile", "tablet"].includes(Si.type ?? "") && document.addEventListener("visibilitychange", async () => {
|
|
2490
2499
|
document.hidden || (this.socket.socket ? this.socket.socket && [WebSocket.CONNECTING, WebSocket.OPEN].includes(this.socket.socket.readyState) && this.socket.close() : this.reconnect());
|
|
2491
|
-
})), this.socket.addEventListener("error", (i) =>
|
|
2500
|
+
})), this.socket.addEventListener("error", (i) => Ii("error", i)), this.socket.addEventListener("realityCheck", (i) => {
|
|
2492
2501
|
this.send("realityCheck", i);
|
|
2493
2502
|
});
|
|
2494
2503
|
}
|
|
@@ -2500,9 +2509,9 @@ class Hi extends pi {
|
|
|
2500
2509
|
}
|
|
2501
2510
|
}
|
|
2502
2511
|
async openGame() {
|
|
2503
|
-
var Ee,
|
|
2504
|
-
const e = new URLSearchParams(window.location.search), i = e.get("apiUrl"), a = e.get("cageCode"),
|
|
2505
|
-
this.initialize({ apiUrl: i, cageCode: a, gameCode:
|
|
2512
|
+
var Ee, rt;
|
|
2513
|
+
const e = new URLSearchParams(window.location.search), i = e.get("apiUrl"), a = e.get("cageCode"), r = e.get("gameCode"), n = e.get("operatorCode"), h = e.get("playMode"), p = e.get("token"), w = e.get("username"), g = e.get("gameHistoryUrl"), k = e.get("homeUrl") ?? void 0, F = e.get("cashierUrl") ?? void 0;
|
|
2514
|
+
this.initialize({ apiUrl: i, cageCode: a, gameCode: r, operatorCode: n, playMode: h, token: p, username: w });
|
|
2506
2515
|
try {
|
|
2507
2516
|
await this.socket.connect();
|
|
2508
2517
|
} catch {
|
|
@@ -2512,43 +2521,43 @@ class Hi extends pi {
|
|
|
2512
2521
|
try {
|
|
2513
2522
|
j = await this.socket.authenticate();
|
|
2514
2523
|
} catch (q) {
|
|
2515
|
-
throw { type: q.type, data: q.type === "error" ?
|
|
2524
|
+
throw { type: q.type, data: q.type === "error" ? Ht(q.data) : void 0 };
|
|
2516
2525
|
}
|
|
2517
|
-
let
|
|
2526
|
+
let K;
|
|
2518
2527
|
try {
|
|
2519
|
-
|
|
2528
|
+
K = await this.socket.openGame();
|
|
2520
2529
|
} catch (q) {
|
|
2521
|
-
throw { type: q.type, data: q.type === "error" ?
|
|
2530
|
+
throw { type: q.type, data: q.type === "error" ? zt(q.data) : void 0 };
|
|
2522
2531
|
}
|
|
2523
|
-
const
|
|
2532
|
+
const U = Gt(j), le = Vt(j, K);
|
|
2524
2533
|
this.sdkConfig.api = {
|
|
2525
2534
|
...this.sdkConfig.api,
|
|
2526
2535
|
brand: a,
|
|
2527
|
-
game:
|
|
2536
|
+
game: r,
|
|
2528
2537
|
integration: n,
|
|
2529
|
-
jurisdiction:
|
|
2538
|
+
jurisdiction: U.contract.jurisdiction,
|
|
2530
2539
|
playMode: h,
|
|
2531
|
-
user:
|
|
2540
|
+
user: U.contract.username,
|
|
2532
2541
|
integrationData: {
|
|
2533
2542
|
token: p
|
|
2534
2543
|
},
|
|
2535
|
-
country:
|
|
2536
|
-
currency:
|
|
2537
|
-
coinValueInCents:
|
|
2544
|
+
country: U.contract.country,
|
|
2545
|
+
currency: U.contract.currency,
|
|
2546
|
+
coinValueInCents: U.contract.coinValueInCents,
|
|
2538
2547
|
gameHistoryUrl: g,
|
|
2539
2548
|
homeUrl: k,
|
|
2540
2549
|
cashierUrl: F,
|
|
2541
2550
|
backendSessionId: le.contract.sessionId,
|
|
2542
2551
|
lastRoundId: le.contract.roundId
|
|
2543
2552
|
};
|
|
2544
|
-
const
|
|
2545
|
-
return
|
|
2553
|
+
const P = (rt = (Ee = e.get("languageCode")) == null ? void 0 : Ee.split("_")) == null ? void 0 : rt[0];
|
|
2554
|
+
return P && (this.sdkConfig.ui.language = P.length === 3 ? Mi[P] ?? P : P), le;
|
|
2546
2555
|
}
|
|
2547
2556
|
async play(e) {
|
|
2548
2557
|
for (; !this.socket.socket; )
|
|
2549
2558
|
await new Promise((k) => setTimeout(() => k(), 500));
|
|
2550
2559
|
const {
|
|
2551
|
-
contract: { bet: i, forcedOutcomes: a, ...
|
|
2560
|
+
contract: { bet: i, forcedOutcomes: a, ...r },
|
|
2552
2561
|
extra: n,
|
|
2553
2562
|
payloadToInject: h,
|
|
2554
2563
|
actionType: p
|
|
@@ -2556,7 +2565,7 @@ class Hi extends pi {
|
|
|
2556
2565
|
bet: i ? { baseBet: i.base, betMultiplier: i.multiplier } : void 0,
|
|
2557
2566
|
forcedOutcomes: a,
|
|
2558
2567
|
// TODO: get rid of contractRest - it' a legacy from old RGS
|
|
2559
|
-
...
|
|
2568
|
+
...r,
|
|
2560
2569
|
...h,
|
|
2561
2570
|
opaqueUiToGameServer: n
|
|
2562
2571
|
};
|
|
@@ -2564,21 +2573,21 @@ class Hi extends pi {
|
|
|
2564
2573
|
try {
|
|
2565
2574
|
g = await this.socket.sendAction(p, w);
|
|
2566
2575
|
} catch (k) {
|
|
2567
|
-
throw { type: k.type, data: k.type === "error" ?
|
|
2576
|
+
throw { type: k.type, data: k.type === "error" ? Wt(k.data) : void 0 };
|
|
2568
2577
|
}
|
|
2569
|
-
return
|
|
2578
|
+
return qt(g);
|
|
2570
2579
|
}
|
|
2571
2580
|
registerFromSdkEvents() {
|
|
2572
2581
|
this.on("history", () => {
|
|
2573
2582
|
const {
|
|
2574
|
-
api: { game: e, integration: i, integrationData: a, jurisdiction:
|
|
2583
|
+
api: { game: e, integration: i, integrationData: a, jurisdiction: r, user: n, gameHistoryUrl: h },
|
|
2575
2584
|
ui: { language: p }
|
|
2576
2585
|
} = this.sdkConfig, w = n.replace(/^user_/, "").replace(new RegExp(`_${i}$`), ""), g = new URL(window.location.href);
|
|
2577
|
-
g.hostname = g.hostname.replace(/^v\./, "").replace(/^play\./, "history."), g.pathname = g.pathname.replace(/(\/[0-9]+\.[0-9]+\.[0-9]+)?\/wrapper\.html/, "/list/index.html"), g.search = "", g.searchParams.set("apiUrl", new URL(h).origin), g.searchParams.set("gameCode", e), g.searchParams.set("jurisdiction",
|
|
2586
|
+
g.hostname = g.hostname.replace(/^v\./, "").replace(/^play\./, "history."), g.pathname = g.pathname.replace(/(\/[0-9]+\.[0-9]+\.[0-9]+)?\/wrapper\.html/, "/list/index.html"), g.search = "", g.searchParams.set("apiUrl", new URL(h).origin), g.searchParams.set("gameCode", e), g.searchParams.set("jurisdiction", r), g.searchParams.set("operatorCode", i), g.searchParams.set("token", a.token), g.searchParams.set("username", w), g.searchParams.set("languageCode", p), this.config.gameHistoryUrl && g.searchParams.set("gameHistoryUrl", this.config.gameHistoryUrl), window.open(g.toString(), "_blank");
|
|
2578
2587
|
});
|
|
2579
2588
|
}
|
|
2580
2589
|
}
|
|
2581
|
-
class
|
|
2590
|
+
class Ti {
|
|
2582
2591
|
constructor(t, e, i) {
|
|
2583
2592
|
m(this, "trackers");
|
|
2584
2593
|
m(this, "config");
|
|
@@ -2595,14 +2604,14 @@ class vi {
|
|
|
2595
2604
|
this.trackers.forEach((i) => i.track(t, e));
|
|
2596
2605
|
}
|
|
2597
2606
|
}
|
|
2598
|
-
function
|
|
2607
|
+
function Ot(s) {
|
|
2599
2608
|
return s.reduce((t, e) => t + e, 0);
|
|
2600
2609
|
}
|
|
2601
|
-
function
|
|
2602
|
-
const t = s.length, e =
|
|
2610
|
+
function Ai(s) {
|
|
2611
|
+
const t = s.length, e = Ot(s) / t, i = s.map((r) => Math.pow(r - e, 2)), a = Ot(i) / t;
|
|
2603
2612
|
return Math.sqrt(a);
|
|
2604
2613
|
}
|
|
2605
|
-
class
|
|
2614
|
+
class xt {
|
|
2606
2615
|
constructor() {
|
|
2607
2616
|
m(this, "rafId", -1);
|
|
2608
2617
|
m(this, "startTime", 0);
|
|
@@ -2610,11 +2619,11 @@ class Ot {
|
|
|
2610
2619
|
m(this, "frames", []);
|
|
2611
2620
|
m(this, "calculateFPS", () => {
|
|
2612
2621
|
const t = Math.floor((this.stopTime - this.startTime) / 1e3);
|
|
2613
|
-
return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, i, a,
|
|
2622
|
+
return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, i, a, r) => (r[a] !== r[a - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
|
|
2614
2623
|
});
|
|
2615
2624
|
m(this, "getReport", () => {
|
|
2616
|
-
const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), i = t.length > 0 ? Math.max(...t) : e, a = t.length > 0 ? Math.min(...t) : e,
|
|
2617
|
-
return { fpsAvg: e, fpsMax: i, fpsMin: a, fpsStdDev:
|
|
2625
|
+
const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), i = t.length > 0 ? Math.max(...t) : e, a = t.length > 0 ? Math.min(...t) : e, r = t.length > 0 ? Ai(t) : 0;
|
|
2626
|
+
return { fpsAvg: e, fpsMax: i, fpsMin: a, fpsStdDev: r };
|
|
2618
2627
|
});
|
|
2619
2628
|
m(this, "start", () => {
|
|
2620
2629
|
this.startTime = Date.now(), this.frames = [], this.trackFrames();
|
|
@@ -2627,8 +2636,8 @@ class Ot {
|
|
|
2627
2636
|
});
|
|
2628
2637
|
}
|
|
2629
2638
|
}
|
|
2630
|
-
const
|
|
2631
|
-
function
|
|
2639
|
+
const Pi = "landscape", Oi = "portrait";
|
|
2640
|
+
function xi() {
|
|
2632
2641
|
try {
|
|
2633
2642
|
const s = document.createElement("canvas");
|
|
2634
2643
|
return !!window.WebGLRenderingContext && (s.getContext("webgl") || s.getContext("experimental-webgl")) instanceof WebGLRenderingContext;
|
|
@@ -2636,7 +2645,7 @@ function Ii() {
|
|
|
2636
2645
|
return !1;
|
|
2637
2646
|
}
|
|
2638
2647
|
}
|
|
2639
|
-
async function
|
|
2648
|
+
async function Ri() {
|
|
2640
2649
|
if (!window.createImageBitmap)
|
|
2641
2650
|
return !1;
|
|
2642
2651
|
const e = await (await fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=")).blob();
|
|
@@ -2646,25 +2655,25 @@ async function Ti() {
|
|
|
2646
2655
|
return !1;
|
|
2647
2656
|
}
|
|
2648
2657
|
}
|
|
2649
|
-
function
|
|
2650
|
-
return window.innerWidth >= window.innerHeight ?
|
|
2658
|
+
function Je() {
|
|
2659
|
+
return window.innerWidth >= window.innerHeight ? Pi : Oi;
|
|
2651
2660
|
}
|
|
2652
|
-
var
|
|
2653
|
-
class
|
|
2661
|
+
var Le, te, ie, se, ye, _e, ke, Be;
|
|
2662
|
+
class Ki extends Ti {
|
|
2654
2663
|
constructor(...e) {
|
|
2655
2664
|
super(...e);
|
|
2656
2665
|
m(this, "FPS_SAMPLE_INTERVAL", 1e4);
|
|
2657
2666
|
// wrapper state
|
|
2658
|
-
C(this,
|
|
2659
|
-
C(this, te
|
|
2660
|
-
C(this, ie
|
|
2661
|
-
C(this, se
|
|
2667
|
+
C(this, Le, 0);
|
|
2668
|
+
C(this, te);
|
|
2669
|
+
C(this, ie);
|
|
2670
|
+
C(this, se);
|
|
2662
2671
|
C(this, ye, !1);
|
|
2663
2672
|
C(this, _e, !1);
|
|
2664
2673
|
C(this, ke, "");
|
|
2665
2674
|
C(this, Be, []);
|
|
2666
2675
|
E(this, ie, {}), E(this, se, this.deviceInfo()), E(this, te, this.config.gameVersion), this.on("state", ({ balance: i }) => {
|
|
2667
|
-
E(this,
|
|
2676
|
+
E(this, Le, i);
|
|
2668
2677
|
}), this.on("autoplay", ({ action: i }) => {
|
|
2669
2678
|
["start", "resume"].includes(i) ? E(this, ye, !0) : E(this, ye, !1);
|
|
2670
2679
|
}), this.on("settings", ({ fastPlay: i }) => {
|
|
@@ -2713,13 +2722,13 @@ class Vi extends vi {
|
|
|
2713
2722
|
// testVariants: '',
|
|
2714
2723
|
}), this.track("Game Open", y(this, ie));
|
|
2715
2724
|
}), this.on("playCycleEnd", async (e) => {
|
|
2716
|
-
const i = await y(this, se), { base: a, multiplier:
|
|
2725
|
+
const i = await y(this, se), { base: a, multiplier: r, specialAction: n } = e.contract.bet.lastPaid ?? {}, h = e.contract.balance.coins, p = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, w = e.contract.win.total, g = w - p, k = n || "spin", F = e.contract.roundId;
|
|
2717
2726
|
this.track("Betting Activity", {
|
|
2718
2727
|
balance: h - g,
|
|
2719
2728
|
balanceAfter: h,
|
|
2720
2729
|
baseBet: a,
|
|
2721
2730
|
// baseBetIndex,
|
|
2722
|
-
betMultiplier:
|
|
2731
|
+
betMultiplier: r,
|
|
2723
2732
|
betType: k,
|
|
2724
2733
|
gameVersion: y(this, te),
|
|
2725
2734
|
coinValueInCents: this.sdkConfig.api.coinValueInCents,
|
|
@@ -2731,7 +2740,7 @@ class Vi extends vi {
|
|
|
2731
2740
|
isMobile: i.isMobile,
|
|
2732
2741
|
netResult: g,
|
|
2733
2742
|
operatorName: "kalamba",
|
|
2734
|
-
orientation:
|
|
2743
|
+
orientation: Je(),
|
|
2735
2744
|
partnerId: this.sdkConfig.api.brand,
|
|
2736
2745
|
partnerParentId: this.sdkConfig.api.integration,
|
|
2737
2746
|
platform: "WEB",
|
|
@@ -2757,17 +2766,17 @@ class Vi extends vi {
|
|
|
2757
2766
|
}), this.reportFpsSample(), this.reportFpsRound();
|
|
2758
2767
|
}
|
|
2759
2768
|
reportFpsSample() {
|
|
2760
|
-
const e = new
|
|
2769
|
+
const e = new xt(), i = () => {
|
|
2761
2770
|
e.stop();
|
|
2762
|
-
const
|
|
2763
|
-
this.track("FPS Performance", { ...
|
|
2771
|
+
const r = e.getReport();
|
|
2772
|
+
this.track("FPS Performance", { ...r, fpsType: "sample" }), a();
|
|
2764
2773
|
}, a = async () => {
|
|
2765
2774
|
e.start(), setTimeout(i, this.FPS_SAMPLE_INTERVAL);
|
|
2766
2775
|
};
|
|
2767
2776
|
a();
|
|
2768
2777
|
}
|
|
2769
2778
|
reportFpsRound() {
|
|
2770
|
-
const e = new
|
|
2779
|
+
const e = new xt();
|
|
2771
2780
|
this.on("playCycleStart", () => {
|
|
2772
2781
|
e.start();
|
|
2773
2782
|
}), this.on("playCycleEnd", () => {
|
|
@@ -2778,13 +2787,13 @@ class Vi extends vi {
|
|
|
2778
2787
|
}
|
|
2779
2788
|
getExtraUiInteractionData() {
|
|
2780
2789
|
return {
|
|
2781
|
-
orientation:
|
|
2790
|
+
orientation: Je(),
|
|
2782
2791
|
stateType: y(this, ke)
|
|
2783
2792
|
};
|
|
2784
2793
|
}
|
|
2785
2794
|
async deviceInfo() {
|
|
2786
2795
|
var h;
|
|
2787
|
-
const { browser: e, device: i, os: a } = R(navigator.userAgent),
|
|
2796
|
+
const { browser: e, device: i, os: a } = R(navigator.userAgent), r = xi(), n = await Ri();
|
|
2788
2797
|
return {
|
|
2789
2798
|
browserName: e.name,
|
|
2790
2799
|
browserVersion: e.version,
|
|
@@ -2792,12 +2801,12 @@ class Vi extends vi {
|
|
|
2792
2801
|
deviceName: i.model,
|
|
2793
2802
|
deviceType: i.type,
|
|
2794
2803
|
isMobile: ["mobile", "tablet"].includes(i.type ?? ""),
|
|
2795
|
-
isWebGLSupported:
|
|
2804
|
+
isWebGLSupported: r,
|
|
2796
2805
|
isWebPSupported: n,
|
|
2797
2806
|
manufacturer: i.vendor,
|
|
2798
2807
|
operatingSystem: a.name,
|
|
2799
2808
|
operatingSystemVersion: a.version,
|
|
2800
|
-
orientation:
|
|
2809
|
+
orientation: Je(),
|
|
2801
2810
|
pixelRatio: window.devicePixelRatio,
|
|
2802
2811
|
screenHeight: window.screen.height,
|
|
2803
2812
|
screenSize: `${window.screen.width}x${window.screen.height}`,
|
|
@@ -2809,33 +2818,35 @@ class Vi extends vi {
|
|
|
2809
2818
|
};
|
|
2810
2819
|
}
|
|
2811
2820
|
}
|
|
2812
|
-
|
|
2813
|
-
|
|
2821
|
+
Le = new WeakMap(), te = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), ye = new WeakMap(), _e = new WeakMap(), ke = new WeakMap(), Be = new WeakMap();
|
|
2822
|
+
var Ui = Qt();
|
|
2823
|
+
const Rt = /* @__PURE__ */ Xt(Ui);
|
|
2824
|
+
class $t {
|
|
2814
2825
|
constructor(t, e) {
|
|
2815
2826
|
m(this, "config");
|
|
2816
2827
|
m(this, "sdkConfig");
|
|
2817
2828
|
this.config = t, this.sdkConfig = e;
|
|
2818
2829
|
}
|
|
2819
2830
|
}
|
|
2820
|
-
const
|
|
2821
|
-
var ae, ne, oe,
|
|
2822
|
-
class
|
|
2831
|
+
const Ut = 25, Lt = 1e4;
|
|
2832
|
+
var ae, ne, oe, D;
|
|
2833
|
+
class Qi extends $t {
|
|
2823
2834
|
constructor(...e) {
|
|
2824
2835
|
super(...e);
|
|
2825
2836
|
C(this, ae, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
|
|
2826
|
-
C(this, ne
|
|
2827
|
-
C(this, oe
|
|
2828
|
-
C(this,
|
|
2837
|
+
C(this, ne);
|
|
2838
|
+
C(this, oe);
|
|
2839
|
+
C(this, D, []);
|
|
2829
2840
|
m(this, "processQueueForced");
|
|
2830
|
-
E(this, ne, (/* @__PURE__ */ new Date()).getTime()), E(this,
|
|
2841
|
+
E(this, ne, (/* @__PURE__ */ new Date()).getTime()), E(this, D, []), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, ae), {
|
|
2831
2842
|
method: "OPTIONS"
|
|
2832
|
-
}).catch(
|
|
2843
|
+
}).catch(Rt), this.subscribe();
|
|
2833
2844
|
}
|
|
2834
2845
|
subscribe() {
|
|
2835
2846
|
window.addEventListener("beforeunload", this.processQueueForced, !1), window.addEventListener("pagehide", this.processQueueForced, !1), window.addEventListener("visibilitychange", this.processQueueForced, !1);
|
|
2836
2847
|
}
|
|
2837
2848
|
schedule() {
|
|
2838
|
-
y(this, oe) && clearTimeout(y(this, oe)), E(this, oe, window.setTimeout(() => this.processQueue(),
|
|
2849
|
+
y(this, oe) && clearTimeout(y(this, oe)), E(this, oe, window.setTimeout(() => this.processQueue(), Lt));
|
|
2839
2850
|
}
|
|
2840
2851
|
send(e) {
|
|
2841
2852
|
E(this, ne, (/* @__PURE__ */ new Date()).getTime());
|
|
@@ -2849,17 +2860,17 @@ class zi extends qt {
|
|
|
2849
2860
|
"Content-Type": "application/json"
|
|
2850
2861
|
},
|
|
2851
2862
|
keepalive: !0
|
|
2852
|
-
}).catch(
|
|
2863
|
+
}).catch(Rt);
|
|
2853
2864
|
}
|
|
2854
2865
|
this.schedule();
|
|
2855
2866
|
}
|
|
2856
2867
|
addToQueue(e) {
|
|
2857
|
-
y(this,
|
|
2868
|
+
y(this, D).push(e), this.processQueue();
|
|
2858
2869
|
}
|
|
2859
2870
|
processQueue(e = !1) {
|
|
2860
|
-
if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && y(this,
|
|
2861
|
-
for (; y(this,
|
|
2862
|
-
const i = y(this,
|
|
2871
|
+
if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && y(this, D).length < Ut && (/* @__PURE__ */ new Date()).getTime() - y(this, ne) < Lt))
|
|
2872
|
+
for (; y(this, D).length; ) {
|
|
2873
|
+
const i = y(this, D).splice(0, Ut).map((a) => ({
|
|
2863
2874
|
...a,
|
|
2864
2875
|
sessionID: this.sdkConfig.api.sessionId,
|
|
2865
2876
|
userID: this.sdkConfig.api.user
|
|
@@ -2872,33 +2883,33 @@ class zi extends qt {
|
|
|
2872
2883
|
eventName: e,
|
|
2873
2884
|
eventParams: i,
|
|
2874
2885
|
eventTimestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2875
|
-
eventUUID:
|
|
2886
|
+
eventUUID: Jt()
|
|
2876
2887
|
});
|
|
2877
2888
|
}
|
|
2878
2889
|
}
|
|
2879
|
-
ae = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(),
|
|
2880
|
-
const
|
|
2881
|
-
class
|
|
2890
|
+
ae = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), D = new WeakMap();
|
|
2891
|
+
const Li = O("LoggingTracker", "color:#000000;font-weight:bold;");
|
|
2892
|
+
class Xi extends $t {
|
|
2882
2893
|
track(t, e) {
|
|
2883
|
-
|
|
2894
|
+
Li(`@${this.sdkConfig.api.user}`, `[${t}]`, e);
|
|
2884
2895
|
}
|
|
2885
2896
|
}
|
|
2886
2897
|
export {
|
|
2887
|
-
|
|
2898
|
+
Ni as BasicPlugin,
|
|
2888
2899
|
V as CasinoPlugin,
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2900
|
+
Di as DebuggingPlugin,
|
|
2901
|
+
Gi as GigPlugin,
|
|
2902
|
+
$i as KalambaBullseyeParsers,
|
|
2903
|
+
ji as KalambaBullseyePlugin,
|
|
2904
|
+
Ki as KalambaStargazerPlugin,
|
|
2905
|
+
Qi as KalambaStargazerTracker,
|
|
2906
|
+
Xi as LoggingTracker,
|
|
2907
|
+
Hi as OryxPlugin,
|
|
2908
|
+
Vi as PariplayPlugin,
|
|
2909
|
+
Wi as QuantaPlugin,
|
|
2910
|
+
zi as RelaxFEIMPlugin,
|
|
2911
|
+
bi as RgsPlugin,
|
|
2912
|
+
Ti as TelemetryPlugin,
|
|
2913
|
+
$t as Tracker,
|
|
2914
|
+
qi as TukoPlugin
|
|
2904
2915
|
};
|