@kalamba/sdk 0.16.0 → 0.23.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/plugins.js CHANGED
@@ -2,34 +2,35 @@
2
2
  * BSD 3-Clause License
3
3
  * Copyright (c) 2025, Kalamba Games Limited
4
4
  */
5
- var jt = Object.defineProperty;
6
- var ct = (s) => {
7
- throw TypeError(s);
5
+ var as = Object.defineProperty;
6
+ var wt = (i) => {
7
+ throw TypeError(i);
8
8
  };
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";
14
- function O(s, t) {
15
- return (e, ...i) => {
16
- console.log(`[%c${s}\x1B[m] %s`, t, e, ...i);
9
+ var ns = (i, t, e) => t in i ? as(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
10
+ var b = (i, t, e) => ns(i, typeof t != "symbol" ? t + "" : t, e), mt = (i, t, e) => t.has(i) || wt("Cannot " + e);
11
+ var k = (i, t, e) => (mt(i, t, "read from private field"), e ? e.call(i) : t.get(i)), M = (i, t, e) => t.has(i) ? wt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), v = (i, t, e, s) => (mt(i, t, "write to private field"), s ? s.call(i, e) : t.set(i, e), e);
12
+ import { a as He } from "./errors-NnLrKjTz.js";
13
+ import { d as bt, e as os } from "./encoders-BDr7fjKQ.js";
14
+ import { r as rs, g as cs, v as ds } from "./v4-BfzDHJEo.js";
15
+ function P(i, t) {
16
+ return (e, ...s) => {
17
+ console.log(`[%c${i}\x1B[m] %s`, t, e, ...s);
17
18
  };
18
19
  }
19
- function _t(s, t) {
20
- return Math.round(s * 100 / t);
20
+ function jt(i, t) {
21
+ return Math.round(i * 100 / t);
21
22
  }
22
- class V {
23
+ class B {
23
24
  constructor(t, e) {
24
- m(this, "config");
25
- m(this, "sdkConfig");
25
+ b(this, "config");
26
+ b(this, "sdkConfig");
26
27
  this.config = t, this.sdkConfig = e;
27
28
  }
28
- on(t, e, i) {
29
- const a = function(n) {
30
- n.data.message !== `kalamba:wrapper-casino:${t}` && n.data.message !== `kalamba:wrapper:${t}` || e(n.data.payload);
29
+ on(t, e, s) {
30
+ const a = function(c) {
31
+ c.data.message !== `kalamba:wrapper-casino:${t}` && c.data.message !== `kalamba:wrapper:${t}` || e(c.data.payload);
31
32
  };
32
- window.addEventListener("message", a, i);
33
+ window.addEventListener("message", a, s);
33
34
  }
34
35
  send(t, ...[e]) {
35
36
  window.postMessage({
@@ -38,22 +39,22 @@ class V {
38
39
  });
39
40
  }
40
41
  }
41
- const Yt = O("BasicPlugin", "color:#000000;font-weight:bold;");
42
- class Ni extends V {
42
+ const ls = P("BasicPlugin", "color:#000000;font-weight:bold;");
43
+ class Xs extends B {
43
44
  constructor(...t) {
44
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Yt("configured");
45
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ls("configured");
45
46
  }
46
47
  registerToSdkEvents() {
47
48
  window.addEventListener("message", (t) => {
48
49
  try {
49
- const { type: e, payload: i } = t.data;
50
+ const { type: e, payload: s } = t.data;
50
51
  switch (e) {
51
52
  case "doAudioSettings":
52
- this.send("settings", { music: i == null ? void 0 : i.musicEnabled, sounds: i == null ? void 0 : i.soundEnabled });
53
+ this.send("settings", { music: s == null ? void 0 : s.musicEnabled, sounds: s == null ? void 0 : s.soundEnabled });
53
54
  return;
54
55
  case "doBalanceUpdate":
55
56
  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 }));
57
+ s.currency === a && typeof s.balanceInCurrency == "number" ? this.send("balance", { balance: jt(s.balanceInCurrency, r) }) : (s.balanceInCoins, this.send("balance", { balance: s.balanceInCoins }));
57
58
  return;
58
59
  case "doGamePause":
59
60
  this.send("freeze");
@@ -88,8 +89,8 @@ class Ni extends V {
88
89
  });
89
90
  }
90
91
  }
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 {
92
+ const E = P("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), us = P("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
93
+ class Js extends B {
93
94
  constructor(...t) {
94
95
  super(...t), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
95
96
  }
@@ -110,22 +111,20 @@ class Di extends V {
110
111
  };
111
112
  }
112
113
  registerSdkToDebugEvents() {
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));
114
+ this.on("autoplay", (t) => E("autoplay", t)), this.on("balance", (t) => E("balance", t)), this.on("bet", (t) => E("bet", t)), this.on("cashier", (t) => E("cashier", t)), this.on("choice", (t) => E("choice", t)), this.on("close", (t) => E("close", t)), this.on("error", (t) => E("error", t)), this.on("loadEnd", (t) => E("loadEnd", t)), this.on("loadProgress", (t) => E("loadProgress", t)), this.on("loadStart", (t) => E("loadStart", t)), this.on("playCycleStart", (t) => E("playCycleStart", t)), this.on("playCycleEnd", (t) => E("playCycleEnd", t)), this.on("playEnd", (t) => E("playEnd", t)), this.on("playError", (t) => E("playError", t)), this.on("playReady", (t) => E("playReady", t)), this.on("playStart", (t) => E("playStart", t)), this.on("settings", (t) => E("settings", t));
114
115
  }
115
116
  _send(...t) {
116
- Zt(...t), this.send(...t);
117
+ us.apply(null, t), this.send.apply(this, t);
117
118
  }
118
119
  }
119
- const ei = O("GigPlugin", "color:#000000;font-weight:bold;");
120
- class Gi extends V {
120
+ const ft = P("GigPlugin", "color:#000000;font-weight:bold;");
121
+ class Ys extends B {
121
122
  constructor(...t) {
122
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ei("configured");
123
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ft("configured");
123
124
  }
124
125
  postMessage(t) {
125
- const e = {
126
- event: t
127
- };
128
- window.top.postMessage(e, "*");
126
+ const e = { event: t };
127
+ ft("postMessage", e), window.top.postMessage(e, "*");
129
128
  }
130
129
  registerToSdkEvents() {
131
130
  window.addEventListener("message", (t) => {
@@ -167,18 +166,18 @@ class Gi extends V {
167
166
  });
168
167
  }
169
168
  }
170
- const ti = O("OryxPlugin", "color:#000000;font-weight:bold;");
171
- class Hi extends V {
169
+ const hs = P("OryxPlugin", "color:#000000;font-weight:bold;");
170
+ class Zs extends B {
172
171
  constructor(...t) {
173
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ti("configured");
172
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), hs("configured");
174
173
  }
175
174
  registerToSdkEvents() {
176
175
  window.addEventListener("message", (t) => {
177
176
  try {
178
- const { type: e, param: i } = t.data;
177
+ const { type: e, param: s } = t.data;
179
178
  switch (e) {
180
179
  case "doBalanceUpdate":
181
- this.send("balance", { balance: i });
180
+ this.send("balance", { balance: s });
182
181
  return;
183
182
  case "doGamePause":
184
183
  this.send("freeze");
@@ -222,81 +221,81 @@ class Hi extends V {
222
221
  });
223
222
  }
224
223
  }
225
- const Ge = O("PariplayPlugin", "color:#000000;font-weight:bold;");
226
- function He(s) {
224
+ const qe = P("PariplayPlugin", "color:#000000;font-weight:bold;");
225
+ function We(i) {
227
226
  try {
228
- window.top.location = s;
227
+ window.top.location = i;
229
228
  } catch {
230
- window.location = s;
229
+ window.location = i;
231
230
  }
232
231
  }
233
- function Ve(s, t) {
234
- return new Promise(function(i, a) {
232
+ function je(i, t) {
233
+ return new Promise(function(s, a) {
235
234
  const r = new XMLHttpRequest();
236
235
  r.onload = function() {
237
- r.status >= 200 && r.status < 300 ? i(r.responseText) : a(r.responseText);
238
- }, r.open(s, t), r.send();
236
+ r.status >= 200 && r.status < 300 ? s(r.responseText) : a(r.responseText);
237
+ }, r.open(i, t), r.send();
239
238
  });
240
239
  }
241
- function ze() {
240
+ function $e() {
242
241
  }
243
- function ii(s) {
244
- return s.filter(function(e) {
242
+ function gs(i) {
243
+ return i.filter(function(e) {
245
244
  return e.messageType.toUpperCase() === "DATA";
246
245
  });
247
246
  }
248
- function qe(s) {
249
- return s.filter(function(e) {
247
+ function Ke(i) {
248
+ return i.filter(function(e) {
250
249
  return ["NOTIFICATION", "POPUP"].includes(e.messageType.toUpperCase());
251
250
  });
252
251
  }
253
- function Bt(s) {
252
+ function $t(i) {
254
253
  try {
255
- return JSON.parse(s.text);
254
+ return JSON.parse(i.text);
256
255
  } catch {
257
256
  return {};
258
257
  }
259
258
  }
260
- function si(s) {
261
- return s.map(Bt).filter(Boolean).find(function(e) {
259
+ function ps(i) {
260
+ return i.map($t).filter(Boolean).find(function(e) {
262
261
  return e.betId != null && e.winId != null;
263
262
  }) || {};
264
263
  }
265
- function ai(s) {
266
- return s.map(Bt).filter(Boolean).find(function(e) {
264
+ function ws(i) {
265
+ return i.map($t).filter(Boolean).find(function(e) {
267
266
  return e.TotalBet != null && e.TotalWin != null;
268
267
  }) || {};
269
268
  }
270
- class Vi extends V {
269
+ class ei extends B {
271
270
  constructor(...t) {
272
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Ge("configured");
271
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), qe("configured");
273
272
  }
274
273
  postMessage(t, e) {
275
- const i = {
274
+ const s = {
276
275
  lang: this.sdkConfig.ui.language,
277
276
  sender: this.sdkConfig.api.game,
278
277
  type: t
279
278
  };
280
- e != null && (i.data = e), Ge("postMessage", i), window.parent.postMessage(i, "*");
279
+ e != null && (s.data = e), qe("postMessage", s), window.parent.postMessage(s, "*");
281
280
  }
282
281
  coinsToCurrency(t) {
283
282
  return t * this.sdkConfig.api.coinValueInCents / 100;
284
283
  }
285
284
  handleContinueButton(t, e) {
286
- t.link && Ve("GET", t.link), e();
285
+ t.link && je("GET", t.link), e();
287
286
  }
288
287
  handleLinkButton(t, e) {
289
288
  switch (t.linkType.toUpperCase()) {
290
289
  case "AJAX":
291
- Ve("GET", t.link), e();
290
+ je("GET", t.link), e();
292
291
  return;
293
292
  case "AJAXRESPONSE":
294
- Ve("GET", t.link).then(() => {
293
+ je("GET", t.link).then(() => {
295
294
  e();
296
295
  });
297
296
  return;
298
297
  case "REDIRECT":
299
- He(t.link), e();
298
+ We(t.link), e();
300
299
  return;
301
300
  }
302
301
  }
@@ -319,18 +318,18 @@ class Vi extends V {
319
318
  };
320
319
  }
321
320
  processInfoUiMessages(t) {
322
- return t.reduce((e, i) => e.then(() => new Promise((a) => {
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, {
321
+ return t.reduce((e, s) => e.then(() => new Promise((a) => {
322
+ const r = Object.assign({}, s, {
323
+ buttons: s.buttons.filter((c) => c.action.toUpperCase() === "CASHIER" ? !!this.sdkConfig.api.cashierUrl : !0).map((c) => Object.assign({}, c, {
325
324
  onRelease: () => {
326
- const h = i.messageType.toUpperCase() === "POPUP" ? ze : a, p = this.buttonActions[n.action.toUpperCase()];
327
- p ? p(n, h) : h();
325
+ const g = s.messageType.toUpperCase() === "POPUP" ? $e : a, h = this.buttonActions[c.action.toUpperCase()];
326
+ h ? h(c, g) : g();
328
327
  }
329
328
  }))
330
329
  });
331
- Ge("showMessage", r);
332
- }).catch(ze)), Promise.resolve()).then(() => {
333
- }).catch(ze);
330
+ qe("showMessage", r);
331
+ }).catch($e)), Promise.resolve()).then(() => {
332
+ }).catch($e);
334
333
  }
335
334
  registerToSdkEvents() {
336
335
  window.addEventListener("message", (t) => {
@@ -358,26 +357,26 @@ class Vi extends V {
358
357
  registerFromSdkEvents() {
359
358
  let t = 0;
360
359
  this.on("openGameResponse", (e) => {
361
- let i;
360
+ let s;
362
361
  try {
363
362
  const a = JSON.parse(
364
363
  JSON.parse(atob(this.sdkConfig.api.integrationData.token.split(".")[1])).token
365
364
  ), r = JSON.parse(a.integrationSpecificAttributes.sessionData || "{}");
366
- i = {
365
+ s = {
367
366
  ClientToken: a.integrationSpecificAttributes.clientToken,
368
367
  CurrencyCode: a.currency,
369
368
  PlayerTokenId: a.user,
370
369
  SessionData: r
371
370
  };
372
371
  } catch {
373
- i = void 0;
372
+ s = void 0;
374
373
  }
375
374
  this.postMessage("gameDataLoaded", {
376
- LoadGameData: i,
375
+ LoadGameData: s,
377
376
  success: !0
378
377
  });
379
378
  try {
380
- const a = qe(e.contract.uiMessages);
379
+ const a = Ke(e.contract.uiMessages);
381
380
  this.processInfoUiMessages(a);
382
381
  } catch {
383
382
  }
@@ -393,25 +392,24 @@ class Vi extends V {
393
392
  } catch {
394
393
  window.history.back();
395
394
  }
396
- else this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") : He(this.sdkConfig.api.homeUrl);
395
+ else this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") : We(this.sdkConfig.api.homeUrl);
397
396
  }), this.on("playEnd", (e) => {
398
397
  this.postMessage("roundEnded", {
399
398
  balanceAfter: this.coinsToCurrency(e.contract.balance.coins),
400
399
  win: this.coinsToCurrency(e.contract.win.round)
401
400
  });
402
401
  try {
403
- const i = qe(e.contract.uiMessages);
404
- this.processInfoUiMessages(i);
402
+ const s = Ke(e.contract.uiMessages);
403
+ this.processInfoUiMessages(s);
405
404
  } catch {
406
405
  }
407
406
  }), this.on("playError", (e) => {
408
- var i, a;
409
407
  this.postMessage("ticketReceived", {
410
408
  // TODO: Operator specific error code and message
411
- ErrorCode: (i = e.data) == null ? void 0 : i.code,
409
+ ErrorCode: e.type === "error" ? e.data.code : "TIMEOUT",
412
410
  ErrorMessage: "ERROR",
413
411
  Status: {
414
- ErrCode: (a = e.data) == null ? void 0 : a.code
412
+ ErrCode: e.type === "error" ? e.data.code : "TIMEOUT"
415
413
  }
416
414
  });
417
415
  }), this.on("playResponse", (e) => {
@@ -420,14 +418,14 @@ class Vi extends V {
420
418
  e.contract.balance.coins + e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier
421
419
  )
422
420
  });
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);
421
+ const s = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a = gs(e.contract.uiMessages), r = Ke(e.contract.uiMessages), c = ps(a), g = ws(a);
424
422
  this.postMessage("ticketReceived", {
425
423
  Balance: this.coinsToCurrency(e.contract.balance.coins),
426
- BetAmount: i ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
427
- CreditTransactionId: n.betId,
428
- DebitTransactionId: n.winId,
424
+ BetAmount: s ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
425
+ CreditTransactionId: c.betId,
426
+ DebitTransactionId: c.winId,
429
427
  Message: r,
430
- SessionData: h,
428
+ SessionData: g,
431
429
  Status: {
432
430
  ErrCode: 0
433
431
  },
@@ -442,18 +440,18 @@ class Vi extends V {
442
440
  }), this.on("loadStart", () => {
443
441
  this.postMessage("onAppFrameReady");
444
442
  }), this.on("cashier", () => {
445
- this.sdkConfig.api.cashierUrl && (this.sdkConfig.api.cashierUrl === "(api)" ? this.postMessage("cashier") : He(this.sdkConfig.api.cashierUrl));
443
+ this.sdkConfig.api.cashierUrl && (this.sdkConfig.api.cashierUrl === "(api)" ? this.postMessage("cashier") : We(this.sdkConfig.api.cashierUrl));
446
444
  });
447
445
  }
448
446
  }
449
- const ue = O("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
450
- class zi extends V {
447
+ const we = P("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
448
+ class ti extends B {
451
449
  constructor(...e) {
452
450
  super(...e);
453
- m(this, "VERSION", "1.17.0");
454
- const i = document.createElement("script");
455
- i.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, i.onload = () => {
456
- ue("loaded"), window.FEIM.configure({
451
+ b(this, "VERSION", "1.17.0");
452
+ const s = document.createElement("script");
453
+ s.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, s.onload = () => {
454
+ we("loaded"), window.FEIM.configure({
457
455
  p2pConfig: {
458
456
  currency: this.sdkConfig.api.currency,
459
457
  launchParams: {
@@ -461,14 +459,14 @@ class zi extends V {
461
459
  homeurl: "homeUrl"
462
460
  }
463
461
  }
464
- }), ue("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
465
- }, document.body.appendChild(i);
462
+ }), we("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
463
+ }, document.body.appendChild(s);
466
464
  }
467
465
  registerToSdkEvents() {
468
- window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() => ue("!!! NOT IMPLEMENTED: exitingGame !!!")), window.FEIM.on.freeze(() => this.send("freeze")), window.FEIM.on.initialized(() => ue("!!! NOT IMPLEMENTED: initialized !!!")), window.FEIM.on.pauseAutoPlay(() => this.send("suspend")), window.FEIM.on.refreshBalance(() => ue("!!! NOT IMPLEMENTED: refreshBalance !!!")), window.FEIM.on.toggleGameHelp(() => {
469
- this.send("help", {});
466
+ window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() => we("!!! NOT IMPLEMENTED: exitingGame !!!")), window.FEIM.on.freeze(() => this.send("freeze")), window.FEIM.on.initialized(() => we("!!! NOT IMPLEMENTED: initialized !!!")), window.FEIM.on.pauseAutoPlay(() => this.send("suspend")), window.FEIM.on.refreshBalance(() => we("!!! NOT IMPLEMENTED: refreshBalance !!!")), window.FEIM.on.toggleGameHelp(() => {
467
+ this.send("help");
470
468
  }), window.FEIM.on.togglePaytable(() => {
471
- this.send("paytable", {});
469
+ this.send("paytable");
472
470
  }), window.FEIM.on.unfreeze(() => this.send("unfreeze")), window.FEIM.on.updateSettings(
473
471
  ({ payload: [e] }) => this.send("settings", { sounds: e.sounds, fastPlay: e.fastPlay })
474
472
  );
@@ -485,10 +483,11 @@ class zi extends V {
485
483
  }
486
484
  }), this.on("balance", ({ balance: e }) => {
487
485
  window.FEIM.send.balanceUpdate(e);
488
- }), this.on("bet", ({ base: e, multiplier: i }) => {
489
- window.FEIM.send.betUpdate(e * i);
490
- }), this.on("error", ({ message: e }) => {
491
- window.FEIM.send.errorMessage(e);
486
+ }), this.on("bet", ({ base: e, multiplier: s }) => {
487
+ window.FEIM.send.betUpdate(e * s);
488
+ }), this.on("error", (e) => {
489
+ const s = "message" in e ? e.message : "Unknown error";
490
+ window.FEIM.send.errorMessage(s);
492
491
  }), this.on("close", () => {
493
492
  window.FEIM.send.exitGame();
494
493
  }), this.on("loadEnd", () => {
@@ -500,20 +499,20 @@ class zi extends V {
500
499
  }), this.on("cashier", () => {
501
500
  window.FEIM.send.openQuickDeposit();
502
501
  }), this.on("playCycleEnd", (e) => {
503
- const i = {
502
+ const s = {
504
503
  balance: e.contract.balance.coins,
505
504
  bet: e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier,
506
505
  win: {
507
506
  win: e.contract.win.total
508
507
  }
509
508
  };
510
- window.FEIM.send.roundFinished(i);
509
+ window.FEIM.send.roundFinished(s);
511
510
  }), this.on("playResponse", (e) => {
512
- const i = {
511
+ const s = {
513
512
  balance: e.contract.balance.coins,
514
513
  playResponse: e.data
515
514
  };
516
- window.FEIM.send.roundStarted(i);
515
+ window.FEIM.send.roundStarted(s);
517
516
  }), this.on("history", () => {
518
517
  window.FEIM.send.showHistory();
519
518
  }), this.on("settings", (e) => {
@@ -521,33 +520,33 @@ class zi extends V {
521
520
  });
522
521
  }
523
522
  }
524
- const We = O("TukoPlugin", "color:#000000;font-weight:bold;");
525
- class qi extends V {
523
+ const Qe = P("TukoPlugin", "color:#000000;font-weight:bold;");
524
+ class si extends B {
526
525
  constructor(...e) {
527
526
  super(...e);
528
- m(this, "PING_INTERVAL", 1e4);
527
+ b(this, "PING_INTERVAL", 1e4);
529
528
  const a = new URLSearchParams(window.location.search).get("pingCallbackUrl");
530
529
  a && window.setInterval(() => {
531
530
  this.ping(a);
532
- }, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), We("configured");
531
+ }, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), Qe("configured");
533
532
  }
534
533
  ping(e) {
535
- const i = new XMLHttpRequest();
536
- i.onreadystatechange = function() {
537
- i.readyState === XMLHttpRequest.DONE && (i.status === 0 || i.status >= 200 && i.status < 400 ? We("ping ok", i) : We("ping error", i));
538
- }, i.open("GET", e), i.send();
534
+ const s = new XMLHttpRequest();
535
+ s.onreadystatechange = function() {
536
+ s.readyState === XMLHttpRequest.DONE && (s.status === 0 || s.status >= 200 && s.status < 400 ? Qe("ping ok", s) : Qe("ping error", s));
537
+ }, s.open("GET", e), s.send();
539
538
  }
540
539
  registerToSdkEvents() {
541
540
  window.addEventListener("message", (e) => {
542
541
  try {
543
- const { type: i, payload: a } = e.data;
544
- switch (i) {
542
+ const { type: s, payload: a } = e.data;
543
+ switch (s) {
545
544
  case "doAudioSettings":
546
545
  this.send("settings", { music: a == null ? void 0 : a.musicEnabled, sounds: a == null ? void 0 : a.soundEnabled });
547
546
  return;
548
547
  case "doBalanceUpdate":
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 }));
548
+ const { currency: r, coinValueInCents: c } = this.sdkConfig.api;
549
+ a.currency === r && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: jt(a.balanceInCurrency, c) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
551
550
  return;
552
551
  case "doGamePause":
553
552
  this.send("freeze");
@@ -582,14 +581,14 @@ class qi extends V {
582
581
  });
583
582
  }
584
583
  }
585
- const lt = O("QuantaPlugin", "color:#000000;font-weight:bold;");
586
- class Wi extends V {
584
+ const yt = P("QuantaPlugin", "color:#000000;font-weight:bold;");
585
+ class ii extends B {
587
586
  constructor(...t) {
588
- super(...t), this.registerFromSdkEvents(), lt("configured");
587
+ super(...t), this.registerFromSdkEvents(), yt("configured");
589
588
  }
590
589
  postMessage(t) {
591
590
  const e = { event: t };
592
- lt("QuantaPlugin::postMessage", e), window.parent.postMessage(e, "*");
591
+ yt("postMessage", e), window.parent.postMessage(e, "*");
593
592
  }
594
593
  registerFromSdkEvents() {
595
594
  this.on("close", () => {
@@ -605,80 +604,168 @@ class Wi extends V {
605
604
  });
606
605
  }
607
606
  }
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) {
609
- var e = {}, i = t;
610
- if (!xe(t)) {
611
- i = {};
607
+ const kt = P("SoftSwissPlugin", "color:#000000;font-weight:bold;");
608
+ class ai extends B {
609
+ constructor(...t) {
610
+ super(...t), this.registerFromSdkEvents(), kt("configured");
611
+ }
612
+ postMessage(t, e) {
613
+ const s = { event: t, payload: e };
614
+ kt("postMessage", s), window.top.postMessage(s, "*");
615
+ }
616
+ registerFromSdkEvents() {
617
+ this.on("loadStart", () => {
618
+ this.postMessage("gameLoadStarted");
619
+ }), this.on("loadProgress", ({ progress: t }) => {
620
+ this.postMessage("gameLoadProgress", { progress: t });
621
+ }), this.on("loadEnd", () => {
622
+ this.postMessage("gameLoadCompleted");
623
+ }), this.on("playCycleStart", () => {
624
+ this.postMessage("gameAnimationStart");
625
+ }), this.on("playCycleEnd", (t) => {
626
+ this.postMessage("winUpdate", { win: t.contract.win.total }), this.postMessage("gameAnimationCompleted");
627
+ }), this.on("playError", () => {
628
+ this.postMessage("gameAnimationCompleted");
629
+ }), this.on("balance", ({ balance: t }) => {
630
+ this.postMessage("balanceUpdate", { balance: t });
631
+ }), this.on("bet", (t) => {
632
+ this.postMessage("stakeUpdate", { bet: t });
633
+ });
634
+ }
635
+ }
636
+ const vt = P("EveryMatrixPlugin", "color:#000000;font-weight:bold;");
637
+ class ni extends B {
638
+ constructor(...t) {
639
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), vt("configured");
640
+ }
641
+ postMessage(t, e) {
642
+ const s = { name: t, sender: "game", data: e };
643
+ vt("postMessage", s), window.top.postMessage(s, "*");
644
+ }
645
+ registerToSdkEvents() {
646
+ window.addEventListener("message", (t) => {
647
+ try {
648
+ const { name: e, sender: s } = t.data;
649
+ if (s !== "emwindow")
650
+ return;
651
+ switch (e) {
652
+ // TODO: add setAudio handle once everymatrix will
653
+ // let us know what will be coming in the payload
654
+ case "updateBalance":
655
+ this.send("getBalance");
656
+ return;
657
+ case "togglePaytable":
658
+ this.send("paytable");
659
+ return;
660
+ case "stopAutoplay":
661
+ this.send("suspend");
662
+ return;
663
+ case "showHelp":
664
+ this.send("help", { show: !0 });
665
+ return;
666
+ default:
667
+ return;
668
+ }
669
+ } catch {
670
+ }
671
+ });
672
+ }
673
+ registerFromSdkEvents() {
674
+ this.on("loadProgress", ({ progress: t }) => {
675
+ this.postMessage("loadProgress", { progress: t });
676
+ }), this.on("loadEnd", () => {
677
+ this.postMessage("loadCompleted");
678
+ }), this.on("settings", (t) => {
679
+ (t != null && t.music || t != null && t.sounds) && this.postMessage("audioToggle");
680
+ }), this.on("playCycleStart", () => {
681
+ this.postMessage("roundStart");
682
+ }), this.on("playCycleEnd", () => {
683
+ this.postMessage("roundEnd");
684
+ }), this.on("playError", () => {
685
+ this.postMessage("errorMessage");
686
+ }), this.on("error", () => {
687
+ this.postMessage("errorMessage");
688
+ }), this.on("close", () => {
689
+ this.postMessage("close");
690
+ }), this.on("bet", () => {
691
+ this.postMessage("stakeUpdate");
692
+ });
693
+ }
694
+ }
695
+ var ms = "2.0.3", ct = 500, Et = "user-agent", le = "", Ct = "?", Be = "function", j = "undefined", ue = "object", dt = "string", S = "browser", F = "cpu", R = "device", x = "engine", O = "os", te = "result", l = "name", n = "type", d = "vendor", u = "version", T = "architecture", Se = "major", o = "model", Ce = "console", w = "mobile", f = "tablet", y = "smarttv", U = "wearable", Xe = "xr", Me = "embedded", me = "inapp", ht = "brands", Y = "formFactors", gt = "fullVersionList", se = "platform", pt = "platformVersion", Ve = "bitness", $ = "sec-ch-ua", bs = $ + "-full-version-list", fs = $ + "-arch", ys = $ + "-" + Ve, ks = $ + "-form-factors", vs = $ + "-" + w, Es = $ + "-" + o, Kt = $ + "-" + se, Cs = Kt + "-version", Qt = [ht, gt, w, o, se, pt, T, Y, Ve], xe = "Amazon", Z = "Apple", Mt = "ASUS", St = "BlackBerry", J = "Google", Tt = "Huawei", It = "Lenovo", At = "Honor", Ue = "LG", Je = "Microsoft", Ye = "Motorola", Ze = "Nvidia", Pt = "OnePlus", et = "OPPO", be = "Samsung", Ot = "Sharp", fe = "Sony", tt = "Xiaomi", st = "Zebra", xt = "Chrome", Ut = "Chromium", V = "Chromecast", Ms = "Edge", ye = "Firefox", ke = "Opera", it = "Facebook", Rt = "Sogou", ee = "Mobile ", ve = " Browser", lt = "Windows", Ss = typeof window !== j, I = Ss && window.navigator ? window.navigator : void 0, z = I && I.userAgentData ? I.userAgentData : void 0, Ts = function(i, t) {
696
+ var e = {}, s = t;
697
+ if (!_e(t)) {
698
+ s = {};
612
699
  for (var a in t)
613
700
  for (var r in t[a])
614
- i[r] = t[a][r].concat(i[r] ? i[r] : []);
701
+ s[r] = t[a][r].concat(s[r] ? s[r] : []);
615
702
  }
616
- for (var n in s)
617
- e[n] = i[n] && i[n].length % 2 === 0 ? i[n].concat(s[n]) : s[n];
703
+ for (var c in i)
704
+ e[c] = s[c] && s[c].length % 2 === 0 ? s[c].concat(i[c]) : i[c];
618
705
  return e;
619
- }, De = function(s) {
620
- for (var t = {}, e = 0; e < s.length; e++)
621
- t[s[e].toUpperCase()] = s[e];
706
+ }, ze = function(i) {
707
+ for (var t = {}, e = 0; e < i.length; e++)
708
+ t[i[e].toUpperCase()] = i[e];
622
709
  return t;
623
- }, st = function(s, t) {
624
- if (typeof s === ce && s.length > 0) {
625
- for (var e in s)
626
- if (H(s[e]) == H(t)) return !0;
710
+ }, ut = function(i, t) {
711
+ if (typeof i === ue && i.length > 0) {
712
+ for (var e in i)
713
+ if (N(i[e]) == N(t)) return !0;
627
714
  return !1;
628
715
  }
629
- return de(s) ? H(t).indexOf(H(s)) !== -1 : !1;
630
- }, xe = function(s, t) {
631
- for (var e in s)
632
- return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? xe(s[e]) : !1);
633
- }, de = function(s) {
634
- return typeof s === Ze;
635
- }, Qe = function(s) {
636
- if (s) {
637
- for (var t = [], e = $(/\\?\"/g, s).split(","), i = 0; i < e.length; i++)
638
- if (e[i].indexOf(";") > -1) {
639
- var a = be(e[i]).split(";v=");
640
- t[i] = { brand: a[0], version: a[1] };
716
+ return ge(i) ? N(t).indexOf(N(i)) !== -1 : !1;
717
+ }, _e = function(i, t) {
718
+ for (var e in i)
719
+ return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? _e(i[e]) : !1);
720
+ }, ge = function(i) {
721
+ return typeof i === dt;
722
+ }, at = function(i) {
723
+ if (i) {
724
+ for (var t = [], e = he(/\\?\"/g, i).split(","), s = 0; s < e.length; s++)
725
+ if (e[s].indexOf(";") > -1) {
726
+ var a = Te(e[s]).split(";v=");
727
+ t[s] = { brand: a[0], version: a[1] };
641
728
  } else
642
- t[i] = be(e[i]);
729
+ t[s] = Te(e[s]);
643
730
  return t;
644
731
  }
645
- }, H = function(s) {
646
- return de(s) ? s.toLowerCase() : s;
647
- }, Xe = function(s) {
648
- return de(s) ? $(/[^\d\.]/g, s).split(".")[0] : void 0;
649
- }, B = function(s) {
650
- for (var t in s) {
651
- var e = s[t];
652
- typeof e == ce && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
732
+ }, N = function(i) {
733
+ return ge(i) ? i.toLowerCase() : i;
734
+ }, nt = function(i) {
735
+ return ge(i) ? he(/[^\d\.]/g, i).split(".")[0] : void 0;
736
+ }, D = function(i) {
737
+ for (var t in i) {
738
+ var e = i[t];
739
+ typeof e == ue && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
653
740
  }
654
741
  return this;
655
- }, $ = function(s, t) {
656
- return de(t) ? t.replace(s, re) : t;
657
- }, me = function(s) {
658
- return $(/\\?\"/g, s);
659
- }, be = function(s, t) {
660
- if (de(s))
661
- return s = $(/^\s\s*/, s), typeof t === G ? s : s.substring(0, tt);
662
- }, vt = function(s, t) {
663
- if (!(!s || !t))
664
- for (var e = 0, i, a, r, n, h, p; e < t.length && !h; ) {
665
- var w = t[e], g = t[e + 1];
666
- for (i = a = 0; i < w.length && !h && w[i]; )
667
- if (h = w[i++].exec(s), h)
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;
742
+ }, he = function(i, t) {
743
+ return ge(t) ? t.replace(i, le) : t;
744
+ }, Ee = function(i) {
745
+ return he(/\\?\"/g, i);
746
+ }, Te = function(i, t) {
747
+ if (ge(i))
748
+ return i = he(/^\s\s*/, i), typeof t === j ? i : i.substring(0, ct);
749
+ }, ot = function(i, t) {
750
+ if (!(!i || !t))
751
+ for (var e = 0, s, a, r, c, g, h; e < t.length && !g; ) {
752
+ var p = t[e], m = t[e + 1];
753
+ for (s = a = 0; s < p.length && !g && p[s]; )
754
+ if (g = p[s++].exec(i), g)
755
+ for (r = 0; r < m.length; r++)
756
+ h = g[++a], c = m[r], typeof c === ue && c.length > 0 ? c.length === 2 ? typeof c[1] == Be ? this[c[0]] = c[1].call(this, h) : this[c[0]] = c[1] : c.length === 3 ? typeof c[1] === Be && !(c[1].exec && c[1].test) ? this[c[0]] = h ? c[1].call(this, h, c[2]) : void 0 : this[c[0]] = h ? h.replace(c[1], c[2]) : void 0 : c.length === 4 && (this[c[0]] = h ? c[3].call(this, h.replace(c[1], c[2])) : void 0) : this[c] = h || void 0;
670
757
  e += 2;
671
758
  }
672
- }, Re = function(s, t) {
759
+ }, q = function(i, t) {
673
760
  for (var e in t)
674
- if (typeof t[e] === ce && t[e].length > 0) {
675
- for (var i = 0; i < t[e].length; i++)
676
- if (st(t[e][i], s))
677
- return e === ut ? void 0 : e;
678
- } else if (st(t[e], s))
679
- return e === ut ? void 0 : e;
680
- return t.hasOwnProperty("*") ? t["*"] : s;
681
- }, Ct = {
761
+ if (typeof t[e] === ue && t[e].length > 0) {
762
+ for (var s = 0; s < t[e].length; s++)
763
+ if (ut(t[e][s], i))
764
+ return e === Ct ? void 0 : e;
765
+ } else if (ut(t[e], i))
766
+ return e === Ct ? void 0 : e;
767
+ return t.hasOwnProperty("*") ? t["*"] : i;
768
+ }, Lt = {
682
769
  ME: "4.90",
683
770
  "NT 3.11": "NT3.51",
684
771
  "NT 4.0": "NT4.0",
@@ -690,7 +777,7 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
690
777
  "8.1": "NT 6.3",
691
778
  10: ["NT 6.4", "NT 10.0"],
692
779
  RT: "ARM"
693
- }, Mt = {
780
+ }, Bt = {
694
781
  embedded: "Automotive",
695
782
  mobile: "Mobile",
696
783
  tablet: ["Tablet", "EInk"],
@@ -699,19 +786,19 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
699
786
  xr: ["VR", "XR"],
700
787
  "?": ["Desktop", "Unknown"],
701
788
  "*": void 0
702
- }, St = {
789
+ }, _t = {
703
790
  browser: [
704
791
  [
705
792
  // Most common regardless engine
706
793
  /\b(?:crmo|crios)\/([\w\.]+)/i
707
794
  // Chrome for Android/iOS
708
795
  ],
709
- [c, [o, Q + "Chrome"]],
796
+ [u, [l, ee + "Chrome"]],
710
797
  [
711
798
  /edg(?:e|ios|a)?\/([\w\.]+)/i
712
799
  // Microsoft Edge
713
800
  ],
714
- [c, [o, "Edge"]],
801
+ [u, [l, "Edge"]],
715
802
  [
716
803
  // Presto based
717
804
  /(opera mini)\/([-\w\.]+)/i,
@@ -721,57 +808,67 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
721
808
  /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
722
809
  // Opera
723
810
  ],
724
- [o, c],
811
+ [l, u],
725
812
  [
726
813
  /opios[\/ ]+([\w\.]+)/i
727
814
  // Opera mini on iphone >= 8.0
728
815
  ],
729
- [c, [o, ge + " Mini"]],
816
+ [u, [l, ke + " Mini"]],
730
817
  [
731
818
  /\bop(?:rg)?x\/([\w\.]+)/i
732
819
  // Opera GX
733
820
  ],
734
- [c, [o, ge + " GX"]],
821
+ [u, [l, ke + " GX"]],
735
822
  [
736
823
  /\bopr\/([\w\.]+)/i
737
824
  // Opera Webkit
738
825
  ],
739
- [c, [o, ge]],
826
+ [u, [l, ke]],
740
827
  [
741
828
  // Mixed
742
829
  /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
743
830
  // Baidu
744
831
  ],
745
- [c, [o, "Baidu"]],
832
+ [u, [l, "Baidu"]],
833
+ [
834
+ /\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i
835
+ // Maxthon
836
+ ],
837
+ [u, [l, "Maxthon"]],
746
838
  [
747
839
  /(kindle)\/([\w\.]+)/i,
748
840
  // Kindle
749
841
  /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,
750
842
  // Lunascape/Maxthon/Netfront/Jasmine/Blazer/Sleipnir
751
843
  // Trident based
752
- /(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,
753
- // Avant/IEMobile/SlimBrowser
844
+ /(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,
845
+ // Avant/IEMobile/SlimBrowser/SlimBoat/Slimjet
754
846
  /(?:ms|\()(ie) ([\w\.]+)/i,
755
847
  // Internet Explorer
756
- // Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
757
- /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar)\/([-\w\.]+)/i,
758
- // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar
759
- /(heytap|ovi)browser\/([\d\.]+)/i,
760
- // HeyTap/Ovi
761
- /(weibo)__([\d\.]+)/i
762
- // Weibo
848
+ // Blink/Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon/LG Browser/Otter/qutebrowser/Dooble
849
+ /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,
850
+ // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon
851
+ /(heytap|ovi|115|surf)browser\/([\d\.]+)/i,
852
+ // HeyTap/Ovi/115/Surf
853
+ /(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i
854
+ // Ecosia/Weibo
855
+ ],
856
+ [l, u],
857
+ [
858
+ /quark(?:pc)?\/([-\w\.]+)/i
859
+ // Quark
763
860
  ],
764
- [o, c],
861
+ [u, [l, "Quark"]],
765
862
  [
766
863
  /\bddg\/([\w\.]+)/i
767
864
  // DuckDuckGo
768
865
  ],
769
- [c, [o, "DuckDuckGo"]],
866
+ [u, [l, "DuckDuckGo"]],
770
867
  [
771
868
  /(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
772
869
  // UCBrowser
773
870
  ],
774
- [c, [o, "UCBrowser"]],
871
+ [u, [l, "UCBrowser"]],
775
872
  [
776
873
  /microm.+\bqbcore\/([\w\.]+)/i,
777
874
  // WeChat Desktop for Windows Built-in Browser
@@ -779,124 +876,124 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
779
876
  /micromessenger\/([\w\.]+)/i
780
877
  // WeChat
781
878
  ],
782
- [c, [o, "WeChat"]],
879
+ [u, [l, "WeChat"]],
783
880
  [
784
881
  /konqueror\/([\w\.]+)/i
785
882
  // Konqueror
786
883
  ],
787
- [c, [o, "Konqueror"]],
884
+ [u, [l, "Konqueror"]],
788
885
  [
789
886
  /trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
790
887
  // IE11
791
888
  ],
792
- [c, [o, "IE"]],
889
+ [u, [l, "IE"]],
793
890
  [
794
891
  /ya(?:search)?browser\/([\w\.]+)/i
795
892
  // Yandex
796
893
  ],
797
- [c, [o, "Yandex"]],
894
+ [u, [l, "Yandex"]],
798
895
  [
799
896
  /slbrowser\/([\w\.]+)/i
800
897
  // Smart Lenovo Browser
801
898
  ],
802
- [c, [o, "Smart " + bt + X]],
899
+ [u, [l, "Smart " + It + ve]],
803
900
  [
804
901
  /(avast|avg)\/([\w\.]+)/i
805
902
  // Avast/AVG Secure Browser
806
903
  ],
807
- [[o, /(.+)/, "$1 Secure" + X], c],
904
+ [[l, /(.+)/, "$1 Secure" + ve], u],
808
905
  [
809
906
  /\bfocus\/([\w\.]+)/i
810
907
  // Firefox Focus
811
908
  ],
812
- [c, [o, pe + " Focus"]],
909
+ [u, [l, ye + " Focus"]],
813
910
  [
814
911
  /\bopt\/([\w\.]+)/i
815
912
  // Opera Touch
816
913
  ],
817
- [c, [o, ge + " Touch"]],
914
+ [u, [l, ke + " Touch"]],
818
915
  [
819
916
  /coc_coc\w+\/([\w\.]+)/i
820
917
  // Coc Coc Browser
821
918
  ],
822
- [c, [o, "Coc Coc"]],
919
+ [u, [l, "Coc Coc"]],
823
920
  [
824
921
  /dolfin\/([\w\.]+)/i
825
922
  // Dolphin
826
923
  ],
827
- [c, [o, "Dolphin"]],
924
+ [u, [l, "Dolphin"]],
828
925
  [
829
926
  /coast\/([\w\.]+)/i
830
927
  // Opera Coast
831
928
  ],
832
- [c, [o, ge + " Coast"]],
929
+ [u, [l, ke + " Coast"]],
833
930
  [
834
931
  /miuibrowser\/([\w\.]+)/i
835
932
  // MIUI Browser
836
933
  ],
837
- [c, [o, "MIUI" + X]],
934
+ [u, [l, "MIUI" + ve]],
838
935
  [
839
936
  /fxios\/([\w\.-]+)/i
840
937
  // Firefox for iOS
841
938
  ],
842
- [c, [o, Q + pe]],
939
+ [u, [l, ee + ye]],
843
940
  [
844
- /\bqihu|(qi?ho?o?|360)browser/i
941
+ /\bqihoobrowser\/?([\w\.]*)/i
845
942
  // 360
846
943
  ],
847
- [[o, "360" + X]],
944
+ [u, [l, "360"]],
848
945
  [
849
946
  /\b(qq)\/([\w\.]+)/i
850
947
  // QQ
851
948
  ],
852
- [[o, /(.+)/, "$1Browser"], c],
949
+ [[l, /(.+)/, "$1Browser"], u],
853
950
  [
854
951
  /(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i
855
952
  ],
856
- [[o, /(.+)/, "$1" + X], c],
953
+ [[l, /(.+)/, "$1" + ve], u],
857
954
  [
858
955
  // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
859
956
  /samsungbrowser\/([\w\.]+)/i
860
957
  // Samsung Internet
861
958
  ],
862
- [c, [o, Me + " Internet"]],
863
- [
864
- /(comodo_dragon)\/([\w\.]+)/i
865
- // Comodo Dragon
866
- ],
867
- [[o, /_/g, " "], c],
959
+ [u, [l, be + " Internet"]],
868
960
  [
869
961
  /metasr[\/ ]?([\d\.]+)/i
870
962
  // Sogou Explorer
871
963
  ],
872
- [c, [o, Et + " Explorer"]],
964
+ [u, [l, Rt + " Explorer"]],
873
965
  [
874
966
  /(sogou)mo\w+\/([\d\.]+)/i
875
967
  // Sogou Mobile
876
968
  ],
877
- [[o, Et + " Mobile"], c],
969
+ [[l, Rt + " Mobile"], u],
878
970
  [
879
971
  /(electron)\/([\w\.]+) safari/i,
880
972
  // Electron-based App
881
973
  /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
882
974
  // Tesla
883
- /m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i
884
- // QQBrowser/2345 Browser
975
+ /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i
976
+ // QQ/2345
885
977
  ],
886
- [o, c],
978
+ [l, u],
887
979
  [
888
- /(lbbrowser|rekonq)/i,
980
+ /(lbbrowser|rekonq)/i
889
981
  // LieBao Browser/Rekonq
890
- /\[(linkedin)app\]/i
891
- // LinkedIn App for iOS & Android
892
982
  ],
893
- [o],
983
+ [l],
984
+ [
985
+ /ome\/([\w\.]+) \w* ?(iron) saf/i,
986
+ // Iron
987
+ /ome\/([\w\.]+).+qihu (360)[es]e/i
988
+ // 360
989
+ ],
990
+ [u, l],
894
991
  [
895
992
  // WebView
896
993
  /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
897
994
  // Facebook App for iOS & Android
898
995
  ],
899
- [[o, kt], c],
996
+ [[l, it], u, [n, me]],
900
997
  [
901
998
  /(Klarna)\/([\w\.]+)/i,
902
999
  // Klarna Shopping Browser for iOS & Android
@@ -904,6 +1001,8 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
904
1001
  // Kakao App
905
1002
  /(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
906
1003
  // Naver InApp
1004
+ /(daum)apps[\/ ]([\w\.]+)/i,
1005
+ // Daum App
907
1006
  /safari (line)\/([\w\.]+)/i,
908
1007
  // Line App for iOS
909
1008
  /\b(line)\/([\w\.]+)\/iab/i,
@@ -912,89 +1011,99 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
912
1011
  // Alipay
913
1012
  /(twitter)(?:and| f.+e\/([\w\.]+))/i,
914
1013
  // Twitter
915
- /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
916
- // Chromium/Instagram/Snapchat
1014
+ /(instagram|snapchat)[\/ ]([-\w\.]+)/i
1015
+ // Instagram/Snapchat
917
1016
  ],
918
- [o, c],
1017
+ [l, u, [n, me]],
919
1018
  [
920
1019
  /\bgsa\/([\w\.]+) .*safari\//i
921
1020
  // Google Search Appliance on iOS
922
1021
  ],
923
- [c, [o, "GSA"]],
1022
+ [u, [l, "GSA"], [n, me]],
924
1023
  [
925
1024
  /musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
926
1025
  // TikTok
927
1026
  ],
928
- [c, [o, "TikTok"]],
1027
+ [u, [l, "TikTok"], [n, me]],
1028
+ [
1029
+ /\[(linkedin)app\]/i
1030
+ // LinkedIn App for iOS & Android
1031
+ ],
1032
+ [l, [n, me]],
1033
+ [
1034
+ /(chromium)[\/ ]([-\w\.]+)/i
1035
+ // Chromium
1036
+ ],
1037
+ [l, u],
929
1038
  [
930
1039
  /headlesschrome(?:\/([\w\.]+)| )/i
931
1040
  // Chrome Headless
932
1041
  ],
933
- [c, [o, Ie + " Headless"]],
1042
+ [u, [l, xt + " Headless"]],
934
1043
  [
935
1044
  / wv\).+(chrome)\/([\w\.]+)/i
936
1045
  // Chrome WebView
937
1046
  ],
938
- [[o, Ie + " WebView"], c],
1047
+ [[l, xt + " WebView"], u],
939
1048
  [
940
1049
  /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
941
1050
  // Android Browser
942
1051
  ],
943
- [c, [o, "Android" + X]],
1052
+ [u, [l, "Android" + ve]],
944
1053
  [
945
1054
  /chrome\/([\w\.]+) mobile/i
946
1055
  // Chrome Mobile
947
1056
  ],
948
- [c, [o, Q + "Chrome"]],
1057
+ [u, [l, ee + "Chrome"]],
949
1058
  [
950
1059
  /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
951
1060
  // Chrome/OmniWeb/Arora/Tizen/Nokia
952
1061
  ],
953
- [o, c],
1062
+ [l, u],
954
1063
  [
955
1064
  /version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i
956
1065
  // Safari Mobile
957
1066
  ],
958
- [c, [o, Q + "Safari"]],
1067
+ [u, [l, ee + "Safari"]],
959
1068
  [
960
1069
  /iphone .*mobile(?:\/\w+ | ?)safari/i
961
1070
  ],
962
- [[o, Q + "Safari"]],
1071
+ [[l, ee + "Safari"]],
963
1072
  [
964
1073
  /version\/([\w\.\,]+) .*(safari)/i
965
1074
  // Safari
966
1075
  ],
967
- [c, o],
1076
+ [u, l],
968
1077
  [
969
1078
  /webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
970
1079
  // Safari < 3.0
971
1080
  ],
972
- [o, [c, "1"]],
1081
+ [l, [u, "1"]],
973
1082
  [
974
1083
  /(webkit|khtml)\/([\w\.]+)/i
975
1084
  ],
976
- [o, c],
1085
+ [l, u],
977
1086
  [
978
1087
  // Gecko based
979
1088
  /(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
980
1089
  // Firefox Mobile
981
1090
  ],
982
- [[o, Q + pe], c],
1091
+ [[l, ee + ye], u],
983
1092
  [
984
1093
  /(navigator|netscape\d?)\/([-\w\.]+)/i
985
1094
  // Netscape
986
1095
  ],
987
- [[o, "Netscape"], c],
1096
+ [[l, "Netscape"], u],
988
1097
  [
989
- /(wolvic)\/([\w\.]+)/i
990
- // Wolvic
1098
+ /(wolvic|librewolf)\/([\w\.]+)/i
1099
+ // Wolvic/LibreWolf
991
1100
  ],
992
- [o, c],
1101
+ [l, u],
993
1102
  [
994
1103
  /mobile vr; rv:([\w\.]+)\).+firefox/i
995
1104
  // Firefox Reality
996
1105
  ],
997
- [c, [o, pe + " Reality"]],
1106
+ [u, [l, ye + " Reality"]],
998
1107
  [
999
1108
  /ekiohf.+(flow)\/([\w\.]+)/i,
1000
1109
  // Flow
@@ -1009,61 +1118,61 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1009
1118
  /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,
1010
1119
  // Mozilla
1011
1120
  // Other
1012
- /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
1013
- // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser
1014
- /(links) \(([\w\.]+)/i
1121
+ /(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
1122
+ // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser/Ladybird
1123
+ /\b(links) \(([\w\.]+)/i
1015
1124
  // Links
1016
1125
  ],
1017
- [o, [c, /_/g, "."]],
1126
+ [l, [u, /_/g, "."]],
1018
1127
  [
1019
1128
  /(cobalt)\/([\w\.]+)/i
1020
1129
  // Cobalt
1021
1130
  ],
1022
- [o, [c, /[^\d\.]+./, re]]
1131
+ [l, [u, /[^\d\.]+./, le]]
1023
1132
  ],
1024
1133
  cpu: [
1025
1134
  [
1026
- /\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i
1135
+ /\b((amd|x|x86[-_]?|wow|win)64)\b/i
1027
1136
  // AMD64 (x64)
1028
1137
  ],
1029
- [[M, "amd64"]],
1138
+ [[T, "amd64"]],
1030
1139
  [
1031
1140
  /(ia32(?=;))/i,
1032
1141
  // IA32 (quicktime)
1033
- /((?:i[346]|x)86)[;\)]/i
1142
+ /\b((i[346]|x)86)(pc)?\b/i
1034
1143
  // IA32 (x86)
1035
1144
  ],
1036
- [[M, "ia32"]],
1145
+ [[T, "ia32"]],
1037
1146
  [
1038
- /\b(aarch64|arm(v?8e?l?|_?64))\b/i
1147
+ /\b(aarch64|arm(v?[89]e?l?|_?64))\b/i
1039
1148
  // ARM64
1040
1149
  ],
1041
- [[M, "arm64"]],
1150
+ [[T, "arm64"]],
1042
1151
  [
1043
- /\b(arm(?:v[67])?ht?n?[fl]p?)\b/i
1152
+ /\b(arm(v[67])?ht?n?[fl]p?)\b/i
1044
1153
  // ARMHF
1045
1154
  ],
1046
- [[M, "armhf"]],
1155
+ [[T, "armhf"]],
1047
1156
  [
1048
1157
  // PocketPC mistakenly identified as PowerPC
1049
- /windows (ce|mobile); ppc;/i
1158
+ /( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i
1050
1159
  ],
1051
- [[M, "arm"]],
1160
+ [[T, "arm"]],
1052
1161
  [
1053
- /((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
1162
+ /((ppc|powerpc)(64)?)( mac|;|\))/i
1054
1163
  // PowerPC
1055
1164
  ],
1056
- [[M, /ower/, re, H]],
1165
+ [[T, /ower/, le, N]],
1057
1166
  [
1058
- /(sun4\w)[;\)]/i
1167
+ / sun4\w[;\)]/i
1059
1168
  // SPARC
1060
1169
  ],
1061
- [[M, "sparc"]],
1170
+ [[T, "sparc"]],
1062
1171
  [
1063
- /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
1172
+ /\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i
1064
1173
  // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
1065
1174
  ],
1066
- [[M, H]]
1175
+ [[T, N]]
1067
1176
  ],
1068
1177
  device: [
1069
1178
  [
@@ -1073,47 +1182,62 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1073
1182
  // Samsung
1074
1183
  /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
1075
1184
  ],
1076
- [l, [u, Me], [d, f]],
1185
+ [o, [d, be], [n, f]],
1077
1186
  [
1078
- /\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
1079
- /samsung[- ]([-\w]+)/i,
1187
+ /\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
1188
+ /samsung[- ]((?!sm-[lr])[-\w]+)/i,
1080
1189
  /sec-(sgh\w+)/i
1081
1190
  ],
1082
- [l, [u, Me], [d, b]],
1191
+ [o, [d, be], [n, w]],
1083
1192
  [
1084
1193
  // Apple
1085
1194
  /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
1086
1195
  // iPod/iPhone
1087
1196
  ],
1088
- [l, [u, he], [d, b]],
1197
+ [o, [d, Z], [n, w]],
1089
1198
  [
1090
1199
  /\((ipad);[-\w\),; ]+apple/i,
1091
1200
  // iPad
1092
1201
  /applecoremedia\/[\w\.]+ \((ipad)/i,
1093
1202
  /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
1094
1203
  ],
1095
- [l, [u, he], [d, f]],
1204
+ [o, [d, Z], [n, f]],
1096
1205
  [
1097
1206
  /(macintosh);/i
1098
1207
  ],
1099
- [l, [u, he]],
1208
+ [o, [d, Z]],
1100
1209
  [
1101
1210
  // Sharp
1102
1211
  /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
1103
1212
  ],
1104
- [l, [u, yt], [d, b]],
1213
+ [o, [d, Ot], [n, w]],
1214
+ [
1215
+ // Honor
1216
+ /\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i
1217
+ ],
1218
+ [o, [d, At], [n, f]],
1219
+ [
1220
+ /honor([-\w ]+)[;\)]/i
1221
+ ],
1222
+ [o, [d, At], [n, w]],
1105
1223
  [
1106
1224
  // Huawei
1107
- /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
1225
+ /\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i
1108
1226
  ],
1109
- [l, [u, wt], [d, f]],
1227
+ [o, [d, Tt], [n, f]],
1110
1228
  [
1111
- /(?:huawei|honor)([-\w ]+)[;\)]/i,
1229
+ /(?:huawei)([-\w ]+)[;\)]/i,
1112
1230
  /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
1113
1231
  ],
1114
- [l, [u, wt], [d, b]],
1232
+ [o, [d, Tt], [n, w]],
1115
1233
  [
1116
1234
  // Xiaomi
1235
+ /oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
1236
+ /\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i
1237
+ // Mi Pad tablets
1238
+ ],
1239
+ [[o, /_/g, " "], [d, tt], [n, f]],
1240
+ [
1117
1241
  /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
1118
1242
  // Xiaomi POCO
1119
1243
  /\b; (\w+) build\/hm\1/i,
@@ -1124,140 +1248,143 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1124
1248
  // Xiaomi Redmi
1125
1249
  /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,
1126
1250
  // Xiaomi Redmi 'numeric' models
1127
- /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
1251
+ /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,
1128
1252
  // Xiaomi Mi
1253
+ / ([\w ]+) miui\/v?\d/i
1129
1254
  ],
1130
- [[l, /_/g, " "], [u, je], [d, b]],
1131
- [
1132
- /oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
1133
- // Redmi Pad
1134
- /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
1135
- // Mi Pad tablets
1136
- ],
1137
- [[l, /_/g, " "], [u, je], [d, f]],
1255
+ [[o, /_/g, " "], [d, tt], [n, w]],
1138
1256
  [
1139
1257
  // OPPO
1140
1258
  /; (\w+) bui.+ oppo/i,
1141
1259
  /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
1142
1260
  ],
1143
- [l, [u, "OPPO"], [d, b]],
1261
+ [o, [d, et], [n, w]],
1144
1262
  [
1145
- /\b(opd2\d{3}a?) bui/i
1263
+ /\b(opd2(\d{3}a?))(?: bui|\))/i
1146
1264
  ],
1147
- [l, [u, "OPPO"], [d, f]],
1265
+ [o, [d, q, { OnePlus: ["304", "403", "203"], "*": et }], [n, f]],
1266
+ [
1267
+ // BLU Vivo Series
1268
+ /(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i
1269
+ ],
1270
+ [o, [d, "BLU"], [n, w]],
1148
1271
  [
1149
1272
  // Vivo
1150
- /vivo (\w+)(?: bui|\))/i,
1273
+ /; vivo (\w+)(?: bui|\))/i,
1151
1274
  /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
1152
1275
  ],
1153
- [l, [u, "Vivo"], [d, b]],
1276
+ [o, [d, "Vivo"], [n, w]],
1154
1277
  [
1155
1278
  // Realme
1156
1279
  /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
1157
1280
  ],
1158
- [l, [u, "Realme"], [d, b]],
1281
+ [o, [d, "Realme"], [n, w]],
1159
1282
  [
1160
1283
  // Motorola
1161
1284
  /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
1162
1285
  /\bmot(?:orola)?[- ](\w*)/i,
1163
- /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
1286
+ /((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
1164
1287
  ],
1165
- [l, [u, ft], [d, b]],
1288
+ [o, [d, Ye], [n, w]],
1166
1289
  [
1167
1290
  /\b(mz60\d|xoom[2 ]{0,2}) build\//i
1168
1291
  ],
1169
- [l, [u, ft], [d, f]],
1292
+ [o, [d, Ye], [n, f]],
1170
1293
  [
1171
1294
  // LG
1172
1295
  /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
1173
1296
  ],
1174
- [l, [u, $e], [d, f]],
1297
+ [o, [d, Ue], [n, f]],
1175
1298
  [
1176
1299
  /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
1177
- /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
1300
+ /\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,
1178
1301
  /\blg-?([\d\w]+) bui/i
1179
1302
  ],
1180
- [l, [u, $e], [d, b]],
1303
+ [o, [d, Ue], [n, w]],
1181
1304
  [
1182
1305
  // Lenovo
1183
- /(ideatab[-\w ]+)/i,
1184
- /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
1306
+ /(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
1307
+ /lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
1185
1308
  ],
1186
- [l, [u, bt], [d, f]],
1309
+ [o, [d, It], [n, f]],
1187
1310
  [
1188
1311
  // Nokia
1189
- /(?:maemo|nokia).*(n900|lumia \d+)/i,
1190
- /nokia[-_ ]?([-\w\.]*)/i
1312
+ /(nokia) (t[12][01])/i
1191
1313
  ],
1192
- [[l, /_/g, " "], [u, "Nokia"], [d, b]],
1314
+ [d, o, [n, f]],
1315
+ [
1316
+ /(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,
1317
+ /nokia[-_ ]?(([-\w\. ]*))/i
1318
+ ],
1319
+ [[o, /_/g, " "], [n, w], [d, "Nokia"]],
1193
1320
  [
1194
1321
  // Google
1195
- /(pixel c)\b/i
1196
- // Google Pixel C
1322
+ /(pixel (c|tablet))\b/i
1323
+ // Google Pixel C/Tablet
1197
1324
  ],
1198
- [l, [u, Ce], [d, f]],
1325
+ [o, [d, J], [n, f]],
1199
1326
  [
1200
1327
  /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
1201
1328
  // Google Pixel
1202
1329
  ],
1203
- [l, [u, Ce], [d, b]],
1330
+ [o, [d, J], [n, w]],
1204
1331
  [
1205
1332
  // Sony
1206
- /droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
1333
+ /droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
1207
1334
  ],
1208
- [l, [u, Se], [d, b]],
1335
+ [o, [d, fe], [n, w]],
1209
1336
  [
1210
1337
  /sony tablet [ps]/i,
1211
1338
  /\b(?:sony)?sgp\w+(?: bui|\))/i
1212
1339
  ],
1213
- [[l, "Xperia Tablet"], [u, Se], [d, f]],
1340
+ [[o, "Xperia Tablet"], [d, fe], [n, f]],
1214
1341
  [
1215
1342
  // OnePlus
1216
1343
  / (kb2005|in20[12]5|be20[12][59])\b/i,
1217
1344
  /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
1218
1345
  ],
1219
- [l, [u, "OnePlus"], [d, b]],
1346
+ [o, [d, Pt], [n, w]],
1220
1347
  [
1221
1348
  // Amazon
1222
1349
  /(alexa)webm/i,
1223
- /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,
1350
+ /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,
1224
1351
  // Kindle Fire without Silk / Echo Show
1225
1352
  /(kf[a-z]+)( bui|\)).+silk\//i
1226
1353
  // Kindle Fire HD
1227
1354
  ],
1228
- [l, [u, ve], [d, f]],
1355
+ [o, [d, xe], [n, f]],
1229
1356
  [
1230
1357
  /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
1231
1358
  // Fire Phone
1232
1359
  ],
1233
- [[l, /(.+)/g, "Fire Phone $1"], [u, ve], [d, b]],
1360
+ [[o, /(.+)/g, "Fire Phone $1"], [d, xe], [n, w]],
1234
1361
  [
1235
1362
  // BlackBerry
1236
1363
  /(playbook);[-\w\),; ]+(rim)/i
1237
1364
  // BlackBerry PlayBook
1238
1365
  ],
1239
- [l, u, [d, f]],
1366
+ [o, d, [n, f]],
1240
1367
  [
1241
1368
  /\b((?:bb[a-f]|st[hv])100-\d)/i,
1242
1369
  /\(bb10; (\w+)/i
1243
1370
  // BlackBerry 10
1244
1371
  ],
1245
- [l, [u, mt], [d, b]],
1372
+ [o, [d, St], [n, w]],
1246
1373
  [
1247
1374
  // Asus
1248
1375
  /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
1249
1376
  ],
1250
- [l, [u, gt], [d, f]],
1377
+ [o, [d, Mt], [n, f]],
1251
1378
  [
1252
1379
  / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
1253
1380
  ],
1254
- [l, [u, gt], [d, b]],
1381
+ [o, [d, Mt], [n, w]],
1255
1382
  [
1256
1383
  // HTC
1257
1384
  /(nexus 9)/i
1258
1385
  // HTC Nexus 9
1259
1386
  ],
1260
- [l, [u, "HTC"], [d, f]],
1387
+ [o, [d, "HTC"], [n, f]],
1261
1388
  [
1262
1389
  /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
1263
1390
  // HTC
@@ -1266,86 +1393,137 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1266
1393
  /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
1267
1394
  // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
1268
1395
  ],
1269
- [u, [l, /_/g, " "], [d, b]],
1396
+ [d, [o, /_/g, " "], [n, w]],
1397
+ [
1398
+ // TCL
1399
+ /tcl (xess p17aa)/i,
1400
+ /droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i
1401
+ ],
1402
+ [o, [d, "TCL"], [n, f]],
1403
+ [
1404
+ /droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i
1405
+ ],
1406
+ [o, [d, "TCL"], [n, w]],
1407
+ [
1408
+ // itel
1409
+ /(itel) ((\w+))/i
1410
+ ],
1411
+ [[d, N], o, [n, q, { tablet: ["p10001l", "w7001"], "*": "mobile" }]],
1270
1412
  [
1271
1413
  // Acer
1272
1414
  /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
1273
1415
  ],
1274
- [l, [u, "Acer"], [d, f]],
1416
+ [o, [d, "Acer"], [n, f]],
1275
1417
  [
1276
1418
  // Meizu
1277
1419
  /droid.+; (m[1-5] note) bui/i,
1278
1420
  /\bmz-([-\w]{2,})/i
1279
1421
  ],
1280
- [l, [u, "Meizu"], [d, b]],
1422
+ [o, [d, "Meizu"], [n, w]],
1281
1423
  [
1282
1424
  // Ulefone
1283
1425
  /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
1284
1426
  ],
1285
- [l, [u, "Ulefone"], [d, b]],
1427
+ [o, [d, "Ulefone"], [n, w]],
1428
+ [
1429
+ // Energizer
1430
+ /; (energy ?\w+)(?: bui|\))/i,
1431
+ /; energizer ([\w ]+)(?: bui|\))/i
1432
+ ],
1433
+ [o, [d, "Energizer"], [n, w]],
1434
+ [
1435
+ // Cat
1436
+ /; cat (b35);/i,
1437
+ /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i
1438
+ ],
1439
+ [o, [d, "Cat"], [n, w]],
1440
+ [
1441
+ // Smartfren
1442
+ /((?:new )?andromax[\w- ]+)(?: bui|\))/i
1443
+ ],
1444
+ [o, [d, "Smartfren"], [n, w]],
1445
+ [
1446
+ // Nothing
1447
+ /droid.+; (a(?:015|06[35]|142p?))/i
1448
+ ],
1449
+ [o, [d, "Nothing"], [n, w]],
1450
+ [
1451
+ // Archos
1452
+ /; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,
1453
+ /archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i
1454
+ ],
1455
+ [o, [d, "Archos"], [n, f]],
1456
+ [
1457
+ /archos ([\w ]+)( b|\))/i,
1458
+ /; (ac[3-6]\d\w{2,8})( b|\))/i
1459
+ ],
1460
+ [o, [d, "Archos"], [n, w]],
1286
1461
  [
1287
1462
  // MIXED
1288
- /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
1289
- // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron
1463
+ /(imo) (tab \w+)/i,
1464
+ // IMO
1465
+ /(infinix) (x1101b?)/i
1466
+ // Infinix XPad
1467
+ ],
1468
+ [d, o, [n, f]],
1469
+ [
1470
+ /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
1471
+ // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan
1472
+ /; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,
1473
+ // BLU/HMD/IMO/TCL
1290
1474
  /(hp) ([\w ]+\w)/i,
1291
1475
  // HP iPAQ
1292
- /(asus)-?(\w+)/i,
1293
- // Asus
1294
1476
  /(microsoft); (lumia[\w ]+)/i,
1295
1477
  // Microsoft Lumia
1296
- /(lenovo)[-_ ]?([-\w]+)/i,
1478
+ /(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,
1297
1479
  // Lenovo
1298
- /(jolla)/i,
1299
- // Jolla
1300
1480
  /(oppo) ?([\w ]+) bui/i
1301
1481
  // OPPO
1302
1482
  ],
1303
- [u, l, [d, b]],
1483
+ [d, o, [n, w]],
1304
1484
  [
1305
1485
  /(kobo)\s(ereader|touch)/i,
1306
1486
  // Kobo
1307
- /(archos) (gamepad2?)/i,
1308
- // Archos
1309
1487
  /(hp).+(touchpad(?!.+tablet)|tablet)/i,
1310
1488
  // HP TouchPad
1311
1489
  /(kindle)\/([\w\.]+)/i
1312
1490
  // Kindle
1313
1491
  ],
1314
- [u, l, [d, f]],
1492
+ [d, o, [n, f]],
1315
1493
  [
1316
1494
  /(surface duo)/i
1317
1495
  // Surface Duo
1318
1496
  ],
1319
- [l, [u, Oe], [d, f]],
1497
+ [o, [d, Je], [n, f]],
1320
1498
  [
1321
1499
  /droid [\d\.]+; (fp\du?)(?: b|\))/i
1322
1500
  // Fairphone
1323
1501
  ],
1324
- [l, [u, "Fairphone"], [d, b]],
1502
+ [o, [d, "Fairphone"], [n, w]],
1325
1503
  [
1326
- /(shield[\w ]+) b/i
1327
- // Nvidia Shield Tablets
1504
+ /((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i
1505
+ // Nvidia Tablets
1328
1506
  ],
1329
- [l, [u, "Nvidia"], [d, f]],
1507
+ [o, [d, Ze], [n, f]],
1330
1508
  [
1331
1509
  /(sprint) (\w+)/i
1332
1510
  // Sprint Phones
1333
1511
  ],
1334
- [u, l, [d, b]],
1512
+ [d, o, [n, w]],
1335
1513
  [
1336
1514
  /(kin\.[onetw]{3})/i
1337
1515
  // Microsoft Kin
1338
1516
  ],
1339
- [[l, /\./g, " "], [u, Oe], [d, b]],
1517
+ [[o, /\./g, " "], [d, Je], [n, w]],
1340
1518
  [
1341
1519
  /droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
1342
1520
  // Zebra
1343
1521
  ],
1344
- [l, [u, Ke], [d, f]],
1522
+ [o, [d, st], [n, f]],
1345
1523
  [
1346
1524
  /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
1347
1525
  ],
1348
- [l, [u, Ke], [d, b]],
1526
+ [o, [d, st], [n, w]],
1349
1527
  [
1350
1528
  ///////////////////
1351
1529
  // SMARTTVS
@@ -1353,64 +1531,97 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1353
1531
  /smart-tv.+(samsung)/i
1354
1532
  // Samsung
1355
1533
  ],
1356
- [u, [d, I]],
1534
+ [d, [n, y]],
1357
1535
  [
1358
1536
  /hbbtv.+maple;(\d+)/i
1359
1537
  ],
1360
- [[l, /^/, "SmartTV"], [u, Me], [d, I]],
1538
+ [[o, /^/, "SmartTV"], [d, be], [n, y]],
1361
1539
  [
1362
- /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
1540
+ /tcast.+(lg)e?. ([-\w]+)/i
1363
1541
  // LG SmartTV
1364
1542
  ],
1365
- [[u, $e], [d, I]],
1543
+ [d, o, [n, y]],
1544
+ [
1545
+ /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
1546
+ ],
1547
+ [[d, Ue], [n, y]],
1366
1548
  [
1367
1549
  /(apple) ?tv/i
1368
1550
  // Apple TV
1369
1551
  ],
1370
- [u, [l, he + " TV"], [d, I]],
1552
+ [d, [o, Z + " TV"], [n, y]],
1553
+ [
1554
+ /crkey.*devicetype\/chromecast/i
1555
+ // Google Chromecast Third Generation
1556
+ ],
1557
+ [[o, V + " Third Generation"], [d, J], [n, y]],
1558
+ [
1559
+ /crkey.*devicetype\/([^/]*)/i
1560
+ // Google Chromecast with specific device type
1561
+ ],
1562
+ [[o, /^/, "Chromecast "], [d, J], [n, y]],
1563
+ [
1564
+ /fuchsia.*crkey/i
1565
+ // Google Chromecast Nest Hub
1566
+ ],
1567
+ [[o, V + " Nest Hub"], [d, J], [n, y]],
1371
1568
  [
1372
1569
  /crkey/i
1373
- // Google Chromecast
1570
+ // Google Chromecast, Linux-based or unknown
1374
1571
  ],
1375
- [[l, Ie + "cast"], [u, Ce], [d, I]],
1572
+ [[o, V], [d, J], [n, y]],
1573
+ [
1574
+ /(portaltv)/i
1575
+ // Facebook Portal TV
1576
+ ],
1577
+ [o, [d, it], [n, y]],
1376
1578
  [
1377
1579
  /droid.+aft(\w+)( bui|\))/i
1378
1580
  // Fire TV
1379
1581
  ],
1380
- [l, [u, ve], [d, I]],
1582
+ [o, [d, xe], [n, y]],
1583
+ [
1584
+ /(shield \w+ tv)/i
1585
+ // Nvidia Shield TV
1586
+ ],
1587
+ [o, [d, Ze], [n, y]],
1381
1588
  [
1382
1589
  /\(dtv[\);].+(aquos)/i,
1383
1590
  /(aquos-tv[\w ]+)\)/i
1384
1591
  // Sharp
1385
1592
  ],
1386
- [l, [u, yt], [d, I]],
1593
+ [o, [d, Ot], [n, y]],
1387
1594
  [
1388
1595
  /(bravia[\w ]+)( bui|\))/i
1389
1596
  // Sony
1390
1597
  ],
1391
- [l, [u, Se], [d, I]],
1598
+ [o, [d, fe], [n, y]],
1392
1599
  [
1393
- /(mitv-\w{5}) bui/i
1600
+ /(mi(tv|box)-?\w+) bui/i
1394
1601
  // Xiaomi
1395
1602
  ],
1396
- [l, [u, je], [d, I]],
1603
+ [o, [d, tt], [n, y]],
1397
1604
  [
1398
1605
  /Hbbtv.*(technisat) (.*);/i
1399
1606
  // TechniSAT
1400
1607
  ],
1401
- [u, l, [d, I]],
1608
+ [d, o, [n, y]],
1402
1609
  [
1403
1610
  /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
1404
1611
  // Roku
1405
1612
  /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
1406
1613
  // HbbTV devices
1407
1614
  ],
1408
- [[u, be], [l, be], [d, I]],
1615
+ [[d, Te], [o, Te], [n, y]],
1409
1616
  [
1410
- /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
1411
1617
  // SmartTV from Unidentified Vendors
1618
+ /droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i
1412
1619
  ],
1413
- [[d, I]],
1620
+ [o, [n, y]],
1621
+ [
1622
+ /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
1623
+ ],
1624
+ [[n, y]],
1414
1625
  [
1415
1626
  ///////////////////
1416
1627
  // CONSOLES
@@ -1420,39 +1631,71 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1420
1631
  /(nintendo) (\w+)/i
1421
1632
  // Nintendo
1422
1633
  ],
1423
- [u, l, [d, J]],
1634
+ [d, o, [n, Ce]],
1424
1635
  [
1425
- /droid.+; (shield) bui/i
1426
- // Nvidia
1636
+ /droid.+; (shield)( bui|\))/i
1637
+ // Nvidia Portable
1427
1638
  ],
1428
- [l, [u, "Nvidia"], [d, J]],
1639
+ [o, [d, Ze], [n, Ce]],
1429
1640
  [
1430
1641
  /(playstation \w+)/i
1431
1642
  // Playstation
1432
1643
  ],
1433
- [l, [u, Se], [d, J]],
1644
+ [o, [d, fe], [n, Ce]],
1434
1645
  [
1435
1646
  /\b(xbox(?: one)?(?!; xbox))[\); ]/i
1436
1647
  // Microsoft Xbox
1437
1648
  ],
1438
- [l, [u, Oe], [d, J]],
1649
+ [o, [d, Je], [n, Ce]],
1439
1650
  [
1440
1651
  ///////////////////
1441
1652
  // WEARABLES
1442
1653
  ///////////////////
1443
- /((pebble))app/i
1654
+ /\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i
1655
+ // Samsung Galaxy Watch
1656
+ ],
1657
+ [o, [d, be], [n, U]],
1658
+ [
1659
+ /((pebble))app/i,
1444
1660
  // Pebble
1661
+ /(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i
1662
+ // Asus ZenWatch / LG Watch / Pixel Watch
1663
+ ],
1664
+ [d, o, [n, U]],
1665
+ [
1666
+ /(ow(?:19|20)?we?[1-3]{1,3})/i
1667
+ // Oppo Watch
1445
1668
  ],
1446
- [u, l, [d, Pe]],
1669
+ [o, [d, et], [n, U]],
1447
1670
  [
1448
1671
  /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
1449
1672
  // Apple Watch
1450
1673
  ],
1451
- [l, [u, he], [d, Pe]],
1674
+ [o, [d, Z], [n, U]],
1675
+ [
1676
+ /(opwwe\d{3})/i
1677
+ // OnePlus Watch
1678
+ ],
1679
+ [o, [d, Pt], [n, U]],
1680
+ [
1681
+ /(moto 360)/i
1682
+ // Motorola 360
1683
+ ],
1684
+ [o, [d, Ye], [n, U]],
1685
+ [
1686
+ /(smartwatch 3)/i
1687
+ // Sony SmartWatch
1688
+ ],
1689
+ [o, [d, fe], [n, U]],
1690
+ [
1691
+ /(g watch r)/i
1692
+ // LG G Watch R
1693
+ ],
1694
+ [o, [d, Ue], [n, U]],
1452
1695
  [
1453
1696
  /droid.+; (wt63?0{2,3})\)/i
1454
1697
  ],
1455
- [l, [u, Ke], [d, Pe]],
1698
+ [o, [d, st], [n, U]],
1456
1699
  [
1457
1700
  ///////////////////
1458
1701
  // XR
@@ -1460,12 +1703,17 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1460
1703
  /droid.+; (glass) \d/i
1461
1704
  // Google Glass
1462
1705
  ],
1463
- [l, [u, Ce], [d, ht]],
1706
+ [o, [d, J], [n, Xe]],
1707
+ [
1708
+ /(pico) (4|neo3(?: link|pro)?)/i
1709
+ // Pico
1710
+ ],
1711
+ [d, o, [n, Xe]],
1464
1712
  [
1465
- /(quest( \d| pro)?)/i
1466
- // Oculus Quest
1713
+ /(quest( \d| pro)?s?).+vr/i
1714
+ // Meta Quest
1467
1715
  ],
1468
- [l, [u, kt], [d, ht]],
1716
+ [o, [d, it], [n, Xe]],
1469
1717
  [
1470
1718
  ///////////////////
1471
1719
  // EMBEDDED
@@ -1473,57 +1721,65 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1473
1721
  /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
1474
1722
  // Tesla
1475
1723
  ],
1476
- [u, [d, et]],
1724
+ [d, [n, Me]],
1477
1725
  [
1478
1726
  /(aeobc)\b/i
1479
1727
  // Echo Dot
1480
1728
  ],
1481
- [l, [u, ve], [d, et]],
1729
+ [o, [d, xe], [n, Me]],
1730
+ [
1731
+ /(homepod).+mac os/i
1732
+ // Apple HomePod
1733
+ ],
1734
+ [o, [d, Z], [n, Me]],
1735
+ [
1736
+ /windows iot/i
1737
+ ],
1738
+ [[n, Me]],
1482
1739
  [
1483
1740
  ////////////////////
1484
1741
  // MIXED (GENERIC)
1485
1742
  ///////////////////
1486
- /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
1487
- // Android Phones from Unidentified Vendors
1743
+ /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i
1488
1744
  ],
1489
- [l, [d, b]],
1490
- [
1491
- /droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
1492
- // Android Tablets from Unidentified Vendors
1493
- ],
1494
- [l, [d, f]],
1745
+ [o, [n, q, { mobile: "Mobile", xr: "VR", "*": f }]],
1495
1746
  [
1496
1747
  /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
1497
1748
  // Unidentifiable Tablet
1498
1749
  ],
1499
- [[d, f]],
1750
+ [[n, f]],
1500
1751
  [
1501
1752
  /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
1502
1753
  // Unidentifiable Mobile
1503
1754
  ],
1504
- [[d, b]],
1755
+ [[n, w]],
1505
1756
  [
1506
- /(android[-\w\. ]{0,9});.+buil/i
1757
+ /droid .+?; ([\w\. -]+)( bui|\))/i
1507
1758
  // Generic Android Device
1508
1759
  ],
1509
- [l, [u, "Generic"]]
1760
+ [o, [d, "Generic"]]
1510
1761
  ],
1511
1762
  engine: [
1512
1763
  [
1513
1764
  /windows.+ edge\/([\w\.]+)/i
1514
1765
  // EdgeHTML
1515
1766
  ],
1516
- [c, [o, pi + "HTML"]],
1767
+ [u, [l, Ms + "HTML"]],
1768
+ [
1769
+ /(arkweb)\/([\w\.]+)/i
1770
+ // ArkWeb
1771
+ ],
1772
+ [l, u],
1517
1773
  [
1518
1774
  /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
1519
1775
  // Blink
1520
1776
  ],
1521
- [c, [o, "Blink"]],
1777
+ [u, [l, "Blink"]],
1522
1778
  [
1523
1779
  /(presto)\/([\w\.]+)/i,
1524
1780
  // Presto
1525
- /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,
1526
- // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna
1781
+ /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,
1782
+ // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna/Servo
1527
1783
  /ekioh(flow)\/([\w\.]+)/i,
1528
1784
  // Flow
1529
1785
  /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,
@@ -1531,13 +1787,18 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1531
1787
  /(icab)[\/ ]([23]\.[\d\.]+)/i,
1532
1788
  // iCab
1533
1789
  /\b(libweb)/i
1790
+ // LibWeb
1791
+ ],
1792
+ [l, u],
1793
+ [
1794
+ /ladybird\//i
1534
1795
  ],
1535
- [o, c],
1796
+ [[l, "LibWeb"]],
1536
1797
  [
1537
1798
  /rv\:([\w\.]{1,9})\b.+(gecko)/i
1538
1799
  // Gecko
1539
1800
  ],
1540
- [c, o]
1801
+ [u, l]
1541
1802
  ],
1542
1803
  os: [
1543
1804
  [
@@ -1545,87 +1806,107 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1545
1806
  /microsoft (windows) (vista|xp)/i
1546
1807
  // Windows (iTunes)
1547
1808
  ],
1548
- [o, c],
1809
+ [l, u],
1549
1810
  [
1550
- /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
1811
+ /(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i
1551
1812
  // Windows Phone
1552
1813
  ],
1553
- [o, [c, Re, Ct]],
1814
+ [l, [u, q, Lt]],
1554
1815
  [
1555
1816
  /windows nt 6\.2; (arm)/i,
1556
1817
  // Windows RT
1557
- /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
1818
+ /windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,
1558
1819
  /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
1559
1820
  ],
1560
- [[c, Re, Ct], [o, it]],
1821
+ [[u, q, Lt], [l, lt]],
1561
1822
  [
1562
1823
  // iOS/macOS
1563
- /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
1824
+ /[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,
1564
1825
  // iOS
1565
1826
  /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
1566
1827
  /cfnetwork\/.+darwin/i
1567
1828
  ],
1568
- [[c, /_/g, "."], [o, "iOS"]],
1829
+ [[u, /_/g, "."], [l, "iOS"]],
1569
1830
  [
1570
1831
  /(mac os x) ?([\w\. ]*)/i,
1571
1832
  /(macintosh|mac_powerpc\b)(?!.+haiku)/i
1572
1833
  // Mac OS
1573
1834
  ],
1574
- [[o, "macOS"], [c, /_/g, "."]],
1835
+ [[l, "macOS"], [u, /_/g, "."]],
1836
+ [
1837
+ // Google Chromecast
1838
+ /android ([\d\.]+).*crkey/i
1839
+ // Google Chromecast, Android-based
1840
+ ],
1841
+ [u, [l, V + " Android"]],
1842
+ [
1843
+ /fuchsia.*crkey\/([\d\.]+)/i
1844
+ // Google Chromecast, Fuchsia-based
1845
+ ],
1846
+ [u, [l, V + " Fuchsia"]],
1847
+ [
1848
+ /crkey\/([\d\.]+).*devicetype\/smartspeaker/i
1849
+ // Google Chromecast, Linux-based Smart Speaker
1850
+ ],
1851
+ [u, [l, V + " SmartSpeaker"]],
1852
+ [
1853
+ /linux.*crkey\/([\d\.]+)/i
1854
+ // Google Chromecast, Legacy Linux-based
1855
+ ],
1856
+ [u, [l, V + " Linux"]],
1857
+ [
1858
+ /crkey\/([\d\.]+)/i
1859
+ // Google Chromecast, unknown
1860
+ ],
1861
+ [u, [l, V]],
1575
1862
  [
1576
1863
  // Mobile OSes
1577
1864
  /droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
1578
1865
  // Android-x86/HarmonyOS
1579
1866
  ],
1580
- [c, o],
1867
+ [u, l],
1868
+ [
1869
+ /(ubuntu) ([\w\.]+) like android/i
1870
+ // Ubuntu Touch
1871
+ ],
1872
+ [[l, /(.+)/, "$1 Touch"], u],
1581
1873
  [
1582
- // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
1583
- /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
1584
- /(blackberry)\w*\/([\w\.]*)/i,
1585
- // Blackberry
1586
- /(tizen|kaios)[\/ ]([\w\.]+)/i,
1587
- // Tizen/KaiOS
1588
- /\((series40);/i
1589
- // Series 40
1874
+ // Android/Blackberry/WebOS/QNX/Bada/RIM/KaiOS/Maemo/MeeGo/S40/Sailfish OS/OpenHarmony/Tizen
1875
+ /(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i
1590
1876
  ],
1591
- [o, c],
1877
+ [l, u],
1592
1878
  [
1593
1879
  /\(bb(10);/i
1594
1880
  // BlackBerry 10
1595
1881
  ],
1596
- [c, [o, mt]],
1882
+ [u, [l, St]],
1597
1883
  [
1598
- /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
1884
+ /(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i
1599
1885
  // Symbian
1600
1886
  ],
1601
- [c, [o, "Symbian"]],
1887
+ [u, [l, "Symbian"]],
1602
1888
  [
1603
1889
  /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
1604
1890
  // Firefox OS
1605
1891
  ],
1606
- [c, [o, pe + " OS"]],
1892
+ [u, [l, ye + " OS"]],
1607
1893
  [
1608
1894
  /web0s;.+rt(tv)/i,
1609
1895
  /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
1610
1896
  // WebOS
1611
1897
  ],
1612
- [c, [o, "webOS"]],
1898
+ [u, [l, "webOS"]],
1613
1899
  [
1614
1900
  /watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
1615
1901
  // watchOS
1616
1902
  ],
1617
- [c, [o, "watchOS"]],
1618
- [
1619
- // Google Chromecast
1620
- /crkey\/([\d\.]+)/i
1621
- // Google Chromecast
1622
- ],
1623
- [c, [o, Ie + "cast"]],
1903
+ [u, [l, "watchOS"]],
1624
1904
  [
1905
+ // Google ChromeOS
1625
1906
  /(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
1626
1907
  // Chromium OS
1627
1908
  ],
1628
- [[o, "Chrome OS"], c],
1909
+ [[l, "Chrome OS"], u],
1629
1910
  [
1630
1911
  // Smart TVs
1631
1912
  /panasonic;(viera)/i,
@@ -1639,6 +1920,8 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1639
1920
  // Nintendo/Playstation
1640
1921
  /(xbox); +xbox ([^\);]+)/i,
1641
1922
  // Microsoft Xbox (360, One, X, S, Series X, Series S)
1923
+ /(pico) .+os([\w\.]+)/i,
1924
+ // Pico
1642
1925
  // Other
1643
1926
  /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
1644
1927
  // Joli/Palm
@@ -1648,7 +1931,7 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1648
1931
  // Mageia/VectorLinux
1649
1932
  /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
1650
1933
  // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
1651
- /(hurd|linux) ?([\w\.]*)/i,
1934
+ /(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,
1652
1935
  // Hurd/Linux
1653
1936
  /(gnu) ?([\w\.]*)/i,
1654
1937
  // GNU
@@ -1657,12 +1940,12 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1657
1940
  /(haiku) (\w+)/i
1658
1941
  // Haiku
1659
1942
  ],
1660
- [o, c],
1943
+ [l, u],
1661
1944
  [
1662
1945
  /(sunos) ?([\w\.\d]*)/i
1663
1946
  // Solaris
1664
1947
  ],
1665
- [[o, "Solaris"], c],
1948
+ [[l, "Solaris"], u],
1666
1949
  [
1667
1950
  /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
1668
1951
  // Solaris
@@ -1673,89 +1956,89 @@ var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce
1673
1956
  /(unix) ?([\w\.]*)/i
1674
1957
  // UNIX
1675
1958
  ],
1676
- [o, c]
1959
+ [l, u]
1677
1960
  ]
1678
- }, Te = function() {
1679
- var s = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
1680
- return B.call(s.init, [
1681
- [T, [o, c, we, d]],
1682
- [L, [M]],
1683
- [x, [d, l, u]],
1684
- [_, [o, c]],
1685
- [A, [o, c]]
1686
- ]), B.call(s.isIgnore, [
1687
- [T, [c, we]],
1688
- [_, [c]],
1689
- [A, [c]]
1690
- ]), B.call(s.isIgnoreRgx, [
1691
- [T, / ?browser$/i],
1692
- [A, / ?os$/i]
1693
- ]), B.call(s.toString, [
1694
- [T, [o, c]],
1695
- [L, [M]],
1696
- [x, [u, l]],
1697
- [_, [o, c]],
1698
- [A, [o, c]]
1699
- ]), s;
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;
1702
- function n() {
1703
- B.call(this, e);
1704
- }
1705
- return n.prototype.getItem = function() {
1706
- return s;
1707
- }, n.prototype.withClientHints = function() {
1708
- return N ? N.getHighEntropyValues(Nt).then(function(h) {
1709
- return s.setCH(new Dt(h, !1)).parseCH().get();
1710
- }) : s.parseCH().get();
1711
- }, n.prototype.withFeatureCheck = function() {
1712
- return s.detectFeature().get();
1713
- }, t != Z && (n.prototype.is = function(h) {
1714
- var p = !1;
1715
- for (var w in this)
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;
1718
- } else if (h == G && p) {
1719
- p = !p;
1961
+ }, Re = function() {
1962
+ var i = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
1963
+ return D.call(i.init, [
1964
+ [S, [l, u, Se, n]],
1965
+ [F, [T]],
1966
+ [R, [n, o, d]],
1967
+ [x, [l, u]],
1968
+ [O, [l, u]]
1969
+ ]), D.call(i.isIgnore, [
1970
+ [S, [u, Se]],
1971
+ [x, [u]],
1972
+ [O, [u]]
1973
+ ]), D.call(i.isIgnoreRgx, [
1974
+ [S, / ?browser$/i],
1975
+ [O, / ?os$/i]
1976
+ ]), D.call(i.toString, [
1977
+ [S, [l, u]],
1978
+ [F, [T]],
1979
+ [R, [d, o]],
1980
+ [x, [l, u]],
1981
+ [O, [l, u]]
1982
+ ]), i;
1983
+ }(), Is = function(i, t) {
1984
+ var e = Re.init[t], s = Re.isIgnore[t] || 0, a = Re.isIgnoreRgx[t] || 0, r = Re.toString[t] || 0;
1985
+ function c() {
1986
+ D.call(this, e);
1987
+ }
1988
+ return c.prototype.getItem = function() {
1989
+ return i;
1990
+ }, c.prototype.withClientHints = function() {
1991
+ return z ? z.getHighEntropyValues(Qt).then(function(g) {
1992
+ return i.setCH(new Xt(g, !1)).parseCH().get();
1993
+ }) : i.parseCH().get();
1994
+ }, c.prototype.withFeatureCheck = function() {
1995
+ return i.detectFeature().get();
1996
+ }, t != te && (c.prototype.is = function(g) {
1997
+ var h = !1;
1998
+ for (var p in this)
1999
+ if (this.hasOwnProperty(p) && !ut(s, p) && N(a ? he(a, this[p]) : this[p]) == N(a ? he(a, g) : g)) {
2000
+ if (h = !0, g != j) break;
2001
+ } else if (g == j && h) {
2002
+ h = !h;
1720
2003
  break;
1721
2004
  }
1722
- return p;
1723
- }, n.prototype.toString = function() {
1724
- var h = re;
1725
- for (var p in r)
1726
- typeof this[r[p]] !== G && (h += (h ? " " : re) + this[r[p]]);
1727
- return h || G;
1728
- }), N || (n.prototype.then = function(h) {
1729
- var p = this, w = function() {
1730
- for (var k in p)
1731
- p.hasOwnProperty(k) && (this[k] = p[k]);
2005
+ return h;
2006
+ }, c.prototype.toString = function() {
2007
+ var g = le;
2008
+ for (var h in r)
2009
+ typeof this[r[h]] !== j && (g += (g ? " " : le) + this[r[h]]);
2010
+ return g || j;
2011
+ }), z || (c.prototype.then = function(g) {
2012
+ var h = this, p = function() {
2013
+ for (var C in h)
2014
+ h.hasOwnProperty(C) && (this[C] = h[C]);
1732
2015
  };
1733
- w.prototype = {
1734
- is: n.prototype.is,
1735
- toString: n.prototype.toString
2016
+ p.prototype = {
2017
+ is: c.prototype.is,
2018
+ toString: c.prototype.toString
1736
2019
  };
1737
- var g = new w();
1738
- return h(g), g;
1739
- }), new n();
2020
+ var m = new p();
2021
+ return g(m), m;
2022
+ }), new c();
1740
2023
  };
1741
- function Dt(s, t) {
1742
- if (s = s || {}, B.call(this, Nt), t)
1743
- B.call(this, [
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])]
2024
+ function Xt(i, t) {
2025
+ if (i = i || {}, D.call(this, Qt), t)
2026
+ D.call(this, [
2027
+ [ht, at(i[$])],
2028
+ [gt, at(i[bs])],
2029
+ [w, /\?1/.test(i[vs])],
2030
+ [o, Ee(i[Es])],
2031
+ [se, Ee(i[Kt])],
2032
+ [pt, Ee(i[Cs])],
2033
+ [T, Ee(i[fs])],
2034
+ [Y, at(i[ks])],
2035
+ [Ve, Ee(i[ys])]
1753
2036
  ]);
1754
2037
  else
1755
- for (var e in s)
1756
- this.hasOwnProperty(e) && typeof s[e] !== G && (this[e] = s[e]);
2038
+ for (var e in i)
2039
+ this.hasOwnProperty(e) && typeof i[e] !== j && (this[e] = i[e]);
1757
2040
  }
1758
- function It(s, t, e, i) {
2041
+ function Ft(i, t, e, s) {
1759
2042
  return this.get = function(a) {
1760
2043
  return a ? this.data.hasOwnProperty(a) ? this.data[a] : void 0 : this.data;
1761
2044
  }, this.set = function(a, r) {
@@ -1763,125 +2046,145 @@ function It(s, t, e, i) {
1763
2046
  }, this.setCH = function(a) {
1764
2047
  return this.uaCH = a, this;
1765
2048
  }, this.detectFeature = function() {
1766
- if (S && S.userAgent == this.ua)
2049
+ if (I && I.userAgent == this.ua)
1767
2050
  switch (this.itemType) {
1768
- case T:
1769
- S.brave && typeof S.brave.isBrave == Ye && this.set(o, "Brave");
2051
+ case S:
2052
+ I.brave && typeof I.brave.isBrave == Be && this.set(l, "Brave");
1770
2053
  break;
1771
- case x:
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);
2054
+ case R:
2055
+ !this.get(n) && z && z[w] && this.set(n, w), this.get(o) == "Macintosh" && I && typeof I.standalone !== j && I.maxTouchPoints && I.maxTouchPoints > 2 && this.set(o, "iPad").set(n, f);
1773
2056
  break;
1774
- case A:
1775
- !this.get(o) && N && N[Y] && this.set(o, N[Y]);
2057
+ case O:
2058
+ !this.get(l) && z && z[se] && this.set(l, z[se]);
1776
2059
  break;
1777
- case Z:
1778
- var a = this.data, r = function(n) {
1779
- return a[n].getItem().detectFeature().get();
2060
+ case te:
2061
+ var a = this.data, r = function(c) {
2062
+ return a[c].getItem().detectFeature().get();
1780
2063
  };
1781
- this.set(T, r(T)).set(L, r(L)).set(x, r(x)).set(_, r(_)).set(A, r(A));
2064
+ this.set(S, r(S)).set(F, r(F)).set(R, r(R)).set(x, r(x)).set(O, r(O));
1782
2065
  }
1783
2066
  return this;
1784
2067
  }, this.parseUA = function() {
1785
- return this.itemType != Z && vt.call(this.data, this.ua, this.rgxMap), this.itemType == T && this.set(we, Xe(this.get(c))), this;
2068
+ return this.itemType != te && ot.call(this.data, this.ua, this.rgxMap), this.itemType == S && this.set(Se, nt(this.get(u))), this;
1786
2069
  }, this.parseCH = function() {
1787
2070
  var a = this.uaCH, r = this.rgxMap;
1788
2071
  switch (this.itemType) {
1789
- case T:
1790
- var n = a[nt] || a[at], h;
1791
- if (n)
1792
- for (var p in n) {
1793
- var w = $(/(Google|Microsoft) /, n[p].brand || n[p]), g = n[p].version;
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);
2072
+ case S:
2073
+ case x:
2074
+ var c = a[gt] || a[ht], g;
2075
+ if (c)
2076
+ for (var h in c) {
2077
+ var p = c[h].brand || c[h], m = c[h].version;
2078
+ this.itemType == S && !/not.a.brand/i.test(p) && (!g || /chrom/i.test(g) && p != Ut) && (p = q(p, {
2079
+ Chrome: "Google Chrome",
2080
+ Edge: "Microsoft Edge",
2081
+ "Chrome WebView": "Android WebView",
2082
+ "Chrome Headless": "HeadlessChrome",
2083
+ "Huawei Browser": "HuaweiBrowser",
2084
+ "MIUI Browser": "Miui Browser",
2085
+ "Opera Mobi": "OperaMobile",
2086
+ Yandex: "YaBrowser"
2087
+ }), this.set(l, p).set(u, m).set(Se, nt(m)), g = p), this.itemType == x && p == Ut && this.set(u, m);
1795
2088
  }
1796
2089
  break;
1797
- case L:
1798
- var k = a[M];
1799
- k && (k && a[Ne] == "64" && (k += "64"), vt.call(this.data, k + ";", r));
2090
+ case F:
2091
+ var C = a[T];
2092
+ C && (C && a[Ve] == "64" && (C += "64"), ot.call(this.data, C + ";", r));
1800
2093
  break;
1801
- case x:
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]) {
1803
- var F;
1804
- if (typeof a[W] != "string")
1805
- for (var j = 0; !F && j < a[W].length; )
1806
- F = Re(a[W][j++], Mt);
2094
+ case R:
2095
+ if (a[w] && this.set(n, w), a[o] && (this.set(o, a[o]), !this.get(n) || !this.get(d))) {
2096
+ var A = {};
2097
+ ot.call(A, "droid 9; " + a[o] + ")", r), !this.get(n) && A.type && this.set(n, A.type), !this.get(d) && A.vendor && this.set(d, A.vendor);
2098
+ }
2099
+ if (a[Y]) {
2100
+ var G;
2101
+ if (typeof a[Y] != "string")
2102
+ for (var pe = 0; !G && pe < a[Y].length; )
2103
+ G = q(a[Y][pe++], Bt);
1807
2104
  else
1808
- F = Re(a[W], Mt);
1809
- this.set(d, F);
2105
+ G = q(a[Y], Bt);
2106
+ this.set(n, G);
1810
2107
  }
1811
2108
  break;
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);
2109
+ case O:
2110
+ var _ = a[se];
2111
+ if (_) {
2112
+ var K = a[pt];
2113
+ _ == lt && (K = parseInt(nt(K), 10) >= 13 ? "11" : "10"), this.set(l, _).set(u, K);
1817
2114
  }
1818
- this.get(o) == it && a[l] == "Xbox" && this.set(o, "Xbox").set(c, void 0);
2115
+ this.get(l) == lt && a[o] == "Xbox" && this.set(l, "Xbox").set(u, void 0);
1819
2116
  break;
1820
- case Z:
1821
- var le = this.data, P = function(Ee) {
1822
- return le[Ee].getItem().setCH(a).parseCH().get();
2117
+ case te:
2118
+ var Q = this.data, H = function(Oe) {
2119
+ return Q[Oe].getItem().setCH(a).parseCH().get();
1823
2120
  };
1824
- this.set(T, P(T)).set(L, P(L)).set(x, P(x)).set(_, P(_)).set(A, P(A));
2121
+ this.set(S, H(S)).set(F, H(F)).set(R, H(R)).set(x, H(x)).set(O, H(O));
1825
2122
  }
1826
2123
  return this;
1827
- }, B.call(this, [
1828
- ["itemType", s],
2124
+ }, D.call(this, [
2125
+ ["itemType", i],
1829
2126
  ["ua", t],
1830
- ["uaCH", i],
2127
+ ["uaCH", s],
1831
2128
  ["rgxMap", e],
1832
- ["data", wi(this, s)]
2129
+ ["data", Is(this, i)]
1833
2130
  ]), this;
1834
2131
  }
1835
- function R(s, t, e) {
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))
1837
- return new R(s, t, e).getResult();
1838
- var i = typeof s === Ze ? s : (
2132
+ function L(i, t, e) {
2133
+ if (typeof i === ue ? (_e(i, !0) ? (typeof t === ue && (e = t), t = i) : (e = i, t = void 0), i = void 0) : typeof i === dt && !_e(t, !0) && (e = t, t = void 0), e && typeof e.append === Be) {
2134
+ var s = {};
2135
+ e.forEach(function(h, p) {
2136
+ s[p] = h;
2137
+ }), e = s;
2138
+ }
2139
+ if (!(this instanceof L))
2140
+ return new L(i, t, e).getResult();
2141
+ var a = typeof i === dt ? i : (
1839
2142
  // Passed user-agent string
1840
- S && S.userAgent ? S.userAgent : (
1841
- // navigator.userAgent
1842
- e && e[pt] ? e[pt] : (
1843
- // User-Agent from passed headers
1844
- re
2143
+ e && e[Et] ? e[Et] : (
2144
+ // User-Agent from passed headers
2145
+ I && I.userAgent ? I.userAgent : (
2146
+ // navigator.userAgent
2147
+ le
1845
2148
  )
1846
2149
  )
1847
- ), a = new Dt(e, !0), r = t ? mi(St, t) : St, n = function(h) {
1848
- return h == Z ? function() {
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();
2150
+ ), r = new Xt(e, !0), c = t ? Ts(_t, t) : _t, g = function(h) {
2151
+ return h == te ? function() {
2152
+ return new Ft(h, a, c, r).set("ua", a).set(S, this.getBrowser()).set(F, this.getCPU()).set(R, this.getDevice()).set(x, this.getEngine()).set(O, this.getOS()).get();
1850
2153
  } : function() {
1851
- return new It(h, i, r[h], a).parseUA().get();
2154
+ return new Ft(h, a, c[h], r).parseUA().get();
1852
2155
  };
1853
2156
  };
1854
- return B.call(this, [
1855
- ["getBrowser", n(T)],
1856
- ["getCPU", n(L)],
1857
- ["getDevice", n(x)],
1858
- ["getEngine", n(_)],
1859
- ["getOS", n(A)],
1860
- ["getResult", n(Z)],
2157
+ return D.call(this, [
2158
+ ["getBrowser", g(S)],
2159
+ ["getCPU", g(F)],
2160
+ ["getDevice", g(R)],
2161
+ ["getEngine", g(x)],
2162
+ ["getOS", g(O)],
2163
+ ["getResult", g(te)],
1861
2164
  ["getUA", function() {
1862
- return i;
2165
+ return a;
1863
2166
  }],
1864
2167
  ["setUA", function(h) {
1865
- return de(h) && (i = h.length > tt ? be(h, tt) : h), this;
2168
+ return ge(h) && (a = h.length > ct ? Te(h, ct) : h), this;
1866
2169
  }]
1867
- ]).setUA(i), this;
2170
+ ]).setUA(a), this;
1868
2171
  }
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 {
2172
+ L.VERSION = ms;
2173
+ L.BROWSER = ze([l, u, Se, n]);
2174
+ L.CPU = ze([T]);
2175
+ L.DEVICE = ze([o, d, n, Ce, w, y, f, U, Me]);
2176
+ L.ENGINE = L.OS = ze([l, u]);
2177
+ class As {
1875
2178
  constructor(t, e) {
1876
- m(this, "config");
1877
- m(this, "sdkConfig");
2179
+ b(this, "config");
2180
+ b(this, "sdkConfig");
1878
2181
  this.config = t, this.sdkConfig = e;
1879
2182
  }
1880
- on(t, e, i) {
1881
- const a = function(n) {
1882
- n.data.message !== `kalamba:wrapper-rgs:${t}` && n.data.message !== `kalamba:wrapper:${t}` || e(n.data.payload);
2183
+ on(t, e, s) {
2184
+ const a = function(c) {
2185
+ c.data.message !== `kalamba:wrapper-rgs:${t}` && c.data.message !== `kalamba:wrapper:${t}` || e(c.data.payload);
1883
2186
  };
1884
- window.addEventListener("message", a, i);
2187
+ window.addEventListener("message", a, s);
1885
2188
  }
1886
2189
  send(t, ...[e]) {
1887
2190
  window.postMessage({
@@ -1890,53 +2193,53 @@ class bi {
1890
2193
  });
1891
2194
  }
1892
2195
  }
1893
- class fi {
2196
+ class Ps {
1894
2197
  constructor(t) {
1895
- m(this, "socket", null);
1896
- m(this, "webSocketUrl");
1897
- m(this, "eventListeners", {
2198
+ b(this, "socket", null);
2199
+ b(this, "webSocketUrl");
2200
+ b(this, "eventListeners", {
1898
2201
  close: [],
1899
2202
  error: [],
1900
2203
  message: []
1901
2204
  });
1902
- m(this, "connect", async () => {
2205
+ b(this, "connect", async () => {
1903
2206
  const t = new WebSocket(this.webSocketUrl);
1904
2207
  return t.addEventListener("message", this.handleMessage), new Promise((e) => {
1905
2208
  t.addEventListener(
1906
2209
  "open",
1907
- (i) => {
1908
- this.handleOpen(i), e(this.socket);
2210
+ (s) => {
2211
+ this.handleOpen(s), e(this.socket);
1909
2212
  },
1910
2213
  { once: !0 }
1911
2214
  );
1912
2215
  });
1913
2216
  });
1914
- m(this, "send", (t) => {
2217
+ b(this, "send", (t) => {
1915
2218
  if (this.socket == null)
1916
2219
  throw new Error("Cannot send message, the WebSocket connection is not open");
1917
2220
  this.socket.send(t);
1918
2221
  });
1919
- m(this, "close", () => {
2222
+ b(this, "close", () => {
1920
2223
  if (this.socket == null)
1921
2224
  throw new Error("Cannot close the WebSocket connection that is not open");
1922
2225
  this.socket.close();
1923
2226
  });
1924
- m(this, "handleClose", (t) => {
2227
+ b(this, "handleClose", (t) => {
1925
2228
  this.eventListeners.close.forEach((e) => {
1926
2229
  e(t);
1927
2230
  }), this.socket.removeEventListener("message", this.handleMessage), this.socket.removeEventListener("close", this.handleClose), this.socket.removeEventListener("error", this.handleError), this.socket = null;
1928
2231
  });
1929
- m(this, "handleError", (t) => {
2232
+ b(this, "handleError", (t) => {
1930
2233
  this.eventListeners.error.forEach((e) => {
1931
2234
  e(t);
1932
2235
  });
1933
2236
  });
1934
- m(this, "handleMessage", (t) => {
2237
+ b(this, "handleMessage", (t) => {
1935
2238
  this.eventListeners.message.forEach((e) => {
1936
2239
  e(t);
1937
2240
  });
1938
2241
  });
1939
- m(this, "handleOpen", (t) => {
2242
+ b(this, "handleOpen", (t) => {
1940
2243
  const e = t.target;
1941
2244
  e.addEventListener("close", this.handleClose), e.addEventListener("error", this.handleError), this.socket = e;
1942
2245
  });
@@ -1946,36 +2249,36 @@ class fi {
1946
2249
  this.eventListeners[t].push(e);
1947
2250
  }
1948
2251
  removeEventListener(t, e) {
1949
- const i = this.eventListeners[t].indexOf(e);
1950
- i !== -1 && this.eventListeners[t].splice(i, 1);
2252
+ const s = this.eventListeners[t].indexOf(e);
2253
+ s !== -1 && this.eventListeners[t].splice(s, 1);
1951
2254
  }
1952
2255
  }
1953
- function Ae(s) {
1954
- return JSON.parse(s == null ? void 0 : s.data);
2256
+ function Le(i) {
2257
+ return JSON.parse(i == null ? void 0 : i.data);
1955
2258
  }
1956
- function yi(s) {
2259
+ function Os(i) {
1957
2260
  var t;
1958
- return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "Ping";
2261
+ return ((t = i == null ? void 0 : i.header) == null ? void 0 : t.name) === "Ping";
1959
2262
  }
1960
- function Tt(s) {
2263
+ function Nt(i) {
1961
2264
  var t;
1962
- return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "RealityCheck";
2265
+ return ((t = i == null ? void 0 : i.header) == null ? void 0 : t.name) === "RealityCheck";
1963
2266
  }
1964
- function Ue(s) {
1965
- return s.header.name === "GameEvent";
2267
+ function Fe(i) {
2268
+ return i.header.name === "GameEvent";
1966
2269
  }
1967
- function ki(s) {
1968
- return Ue(s) && s.body.event === "OPEN_GAME";
2270
+ function xs(i) {
2271
+ return Fe(i) && i.body.event === "OPEN_GAME";
1969
2272
  }
1970
- function At(s) {
1971
- return s.header.code !== 1;
2273
+ function Dt(i) {
2274
+ return i.header.code !== 1;
1972
2275
  }
1973
- function Ei(s) {
1974
- return Ue(s) && s.body.event.includes("_RESULT");
2276
+ function Us(i) {
2277
+ return Fe(i) && i.body.event.includes("_RESULT");
1975
2278
  }
1976
- var ee, fe;
1977
- class vi extends fi {
1978
- constructor(e, i) {
2279
+ var ie, Ie;
2280
+ class Rs extends Ps {
2281
+ constructor(e, s) {
1979
2282
  const a = new URL(e.apiUrl);
1980
2283
  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);
1981
2284
  super(a.toString());
@@ -1989,7 +2292,7 @@ class vi extends fi {
1989
2292
  * request sent. Client and server independently maintain their own
1990
2293
  * correlation id counter.
1991
2294
  */
1992
- m(this, "cId", 0);
2295
+ b(this, "cId", 0);
1993
2296
  // Initial values for header
1994
2297
  /*
1995
2298
  * Increasing message ID
@@ -2001,45 +2304,45 @@ class vi extends fi {
2001
2304
  * received out of sync).
2002
2305
  */
2003
2306
  // TODO make sure messages are processed in order
2004
- m(this, "mId", 0);
2307
+ b(this, "mId", 0);
2005
2308
  // Initial values for body
2006
2309
  /*
2007
2310
  * Sequence ID. Action/Event correlation.
2008
2311
  */
2009
- m(this, "seqId", 0);
2010
- m(this, "gameCode");
2011
- C(this, ee);
2012
- C(this, fe);
2013
- m(this, "onMessage", (e) => {
2014
- const i = Ae(e);
2015
- (Ue(i) || yi(i) || Tt(i)) && this.sendAcknowledgement(i), Tt(i) && this.handleRealityCheck(i);
2312
+ b(this, "seqId", 0);
2313
+ b(this, "gameCode");
2314
+ M(this, ie);
2315
+ M(this, Ie);
2316
+ b(this, "onMessage", (e) => {
2317
+ const s = Le(e);
2318
+ (Fe(s) || Os(s) || Nt(s)) && this.sendAcknowledgement(s), Nt(s) && this.handleRealityCheck(s);
2016
2319
  });
2017
- this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, E(this, ee, i.requestTimeoutMs), E(this, fe, i.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
2320
+ this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, v(this, ie, s.requestTimeoutMs), v(this, Ie, s.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
2018
2321
  }
2019
2322
  handleRealityCheck(e) {
2020
- this.eventListeners.realityCheck.forEach((i) => {
2021
- i(e.body);
2323
+ this.eventListeners.realityCheck.forEach((s) => {
2324
+ s(e.body);
2022
2325
  });
2023
2326
  }
2024
- addEventListener(e, i) {
2025
- super.addEventListener(e, i);
2327
+ addEventListener(e, s) {
2328
+ super.addEventListener(e, s);
2026
2329
  }
2027
- removeEventListener(e, i) {
2028
- super.removeEventListener(e, i);
2330
+ removeEventListener(e, s) {
2331
+ super.removeEventListener(e, s);
2029
2332
  }
2030
- buildHeader(e, i = null) {
2333
+ buildHeader(e, s = null) {
2031
2334
  return {
2032
2335
  // Assign new cId if it is not provided
2033
- cId: i ?? ++this.cId,
2034
- code: i !== null ? 1 : void 0,
2336
+ cId: s ?? ++this.cId,
2337
+ code: s !== null ? 1 : void 0,
2035
2338
  mId: ++this.mId,
2036
2339
  name: e
2037
2340
  };
2038
2341
  }
2039
2342
  // TODO infer body from header
2040
- buildPayload(e, i) {
2343
+ buildPayload(e, s) {
2041
2344
  return JSON.stringify({
2042
- body: i,
2345
+ body: s,
2043
2346
  header: e
2044
2347
  });
2045
2348
  }
@@ -2049,84 +2352,91 @@ class vi extends fi {
2049
2352
  seqId: ++this.seqId
2050
2353
  };
2051
2354
  }
2052
- request(e, i) {
2053
- const a = this.buildPayload(e, i);
2054
- return new Promise((r, n) => {
2055
- setTimeout(() => n({ type: "timeout" }), y(this, ee));
2056
- const h = (p) => {
2057
- const w = Ae(p);
2355
+ request(e, s) {
2356
+ const a = this.buildPayload(e, s);
2357
+ return new Promise((r, c) => {
2358
+ setTimeout(() => c({ type: "timeout" }), k(this, ie));
2359
+ const g = (h) => {
2360
+ const p = Le(h);
2058
2361
  try {
2059
- e.cId === w.header.cId && (this.removeEventListener("message", h), w.header.code === 1 ? r(w) : n({ message: w, type: "error" }));
2362
+ e.cId === p.header.cId && (this.removeEventListener("message", g), p.header.code === 1 ? r(p) : c({ message: p, type: "error" }));
2060
2363
  } catch {
2061
- n({ message: w, type: "error" });
2364
+ c({ message: p, type: "error" });
2062
2365
  }
2063
2366
  };
2064
- this.addEventListener("message", h), this.send(a);
2367
+ this.addEventListener("message", g), this.send(a);
2065
2368
  });
2066
2369
  }
2067
2370
  freeRounds(e) {
2068
- const i = this.buildHeader("ActivateFreeRound");
2069
- return this.request(i, e).then((a) => a.body).catch((a) => {
2371
+ const s = this.buildHeader("ActivateFreeRound");
2372
+ return this.request(s, e).then((a) => a.body).catch((a) => {
2070
2373
  var r;
2071
2374
  throw { data: (r = a == null ? void 0 : a.message) == null ? void 0 : r.body, type: a.type };
2072
2375
  });
2073
2376
  }
2074
2377
  async authenticate(e = !1) {
2075
- const i = this.buildHeader("Authenticate"), a = {
2378
+ const s = this.buildHeader("Authenticate"), a = {
2076
2379
  clientType: 3,
2077
- version: y(this, fe),
2380
+ version: k(this, Ie),
2078
2381
  reconnect: e
2079
2382
  };
2080
- return this.request(i, a).then((r) => r.body).catch((r) => {
2081
- var n;
2082
- throw { data: (n = r == null ? void 0 : r.message) == null ? void 0 : n.body, type: r.type };
2383
+ return this.request(s, a).then((r) => r.body).catch((r) => {
2384
+ var c;
2385
+ throw { data: (c = r == null ? void 0 : r.message) == null ? void 0 : c.body, type: r.type };
2386
+ });
2387
+ }
2388
+ async getBalance() {
2389
+ const e = this.buildHeader("GetBalance"), s = {};
2390
+ return this.request(e, s).then((a) => a.body).catch((a) => {
2391
+ var r;
2392
+ throw { data: (r = a == null ? void 0 : a.message) == null ? void 0 : r.body, type: a.type };
2083
2393
  });
2084
2394
  }
2085
2395
  async openGame() {
2086
- const e = this.buildHeader("OpenGame"), i = {
2396
+ const e = this.buildHeader("OpenGame"), s = {
2087
2397
  gameCode: this.gameCode
2088
2398
  };
2089
2399
  return new Promise((a, r) => {
2090
- const n = (h) => {
2091
- const p = Ae(h);
2092
- ki(p) ? (this.removeEventListener("message", n), a(p.body)) : At(p) && r({ data: p.body, type: "error" });
2400
+ const c = (g) => {
2401
+ const h = Le(g);
2402
+ xs(h) ? (this.removeEventListener("message", c), a(h.body)) : Dt(h) && r({ data: h.body, type: "error" });
2093
2403
  };
2094
- this.addEventListener("message", n), this.request(e, i).catch(
2095
- (h) => {
2096
- var p;
2097
- return r({ data: (p = h == null ? void 0 : h.message) == null ? void 0 : p.body, type: h.type });
2404
+ this.addEventListener("message", c), this.request(e, s).catch(
2405
+ (g) => {
2406
+ var h;
2407
+ return r({ data: (h = g == null ? void 0 : g.message) == null ? void 0 : h.body, type: g.type });
2098
2408
  }
2099
2409
  );
2100
2410
  });
2101
2411
  }
2102
2412
  sendAcknowledgement(e) {
2103
- const { name: i, cId: a } = e.header, r = this.buildHeader(i, a), n = this.buildPayload(r, {});
2104
- this.send(n);
2413
+ const { name: s, cId: a } = e.header, r = this.buildHeader(s, a), c = this.buildPayload(r, {});
2414
+ this.send(c);
2105
2415
  }
2106
- sendAction(e, i) {
2416
+ sendAction(e, s) {
2107
2417
  const a = this.buildHeader("GameAction"), r = {
2108
2418
  ...this.getBodyExtras(e),
2109
- data: i
2419
+ data: s
2110
2420
  };
2111
- return new Promise((n, h) => {
2112
- const p = (w) => {
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" }));
2421
+ return new Promise((c, g) => {
2422
+ const h = (p) => {
2423
+ const m = Le(p);
2424
+ Fe(m) && r.seqId === m.body.correlationSeqId && (this.removeEventListener("message", h), Us(m) ? c(m.body) : Dt(m) && g({ data: m.body, type: "error" }));
2115
2425
  };
2116
- this.addEventListener("message", p), this.request(a, r).catch(
2117
- (w) => {
2118
- var g;
2119
- return h({ data: (g = w == null ? void 0 : w.message) == null ? void 0 : g.body, type: w.type });
2426
+ this.addEventListener("message", h), this.request(a, r).catch(
2427
+ (p) => {
2428
+ var m;
2429
+ return g({ data: (m = p == null ? void 0 : p.message) == null ? void 0 : m.body, type: p.type });
2120
2430
  }
2121
2431
  );
2122
2432
  });
2123
2433
  }
2124
2434
  setRequestTimeoutMs(e) {
2125
- E(this, ee, e);
2435
+ v(this, ie, e);
2126
2436
  }
2127
2437
  }
2128
- ee = new WeakMap(), fe = new WeakMap();
2129
- const Ci = {
2438
+ ie = new WeakMap(), Ie = new WeakMap();
2439
+ const Ls = {
2130
2440
  CA_BC: "CA",
2131
2441
  CA_ON: "CA",
2132
2442
  GER: "DE",
@@ -2135,11 +2445,11 @@ const Ci = {
2135
2445
  US_NJ: "US",
2136
2446
  USA: "US"
2137
2447
  };
2138
- function Pt(s) {
2139
- return !s || s === "NOT_APPLICABLE" ? null : Ci[s] ?? s;
2448
+ function Gt(i) {
2449
+ return !i || i === "NOT_APPLICABLE" ? null : Ls[i] ?? i;
2140
2450
  }
2141
- function Gt(s) {
2142
- const t = s.contract;
2451
+ function Jt(i) {
2452
+ const t = i.contract;
2143
2453
  return t ? {
2144
2454
  contract: {
2145
2455
  balance: {
@@ -2149,277 +2459,278 @@ function Gt(s) {
2149
2459
  coinValueInCents: t.coinValueInCents,
2150
2460
  country: t.countryCode,
2151
2461
  currency: t.currencyCode,
2152
- jurisdiction: Pt(t.jurisdictionCode),
2462
+ jurisdiction: Gt(t.jurisdictionCode),
2153
2463
  uiMessages: t.uiMessages,
2154
2464
  username: t.username
2155
2465
  }
2156
2466
  } : {
2157
2467
  contract: {
2158
2468
  balance: {
2159
- coins: s.balance,
2160
- version: s.balanceVersion
2469
+ coins: i.balance,
2470
+ version: i.balanceVersion
2161
2471
  },
2162
- coinValueInCents: s.coinValueInCents,
2163
- country: s.countryCode,
2164
- currency: s.currencyCode,
2165
- jurisdiction: Pt(s.jurisdictionCode),
2166
- uiMessages: s.uiMessages,
2167
- username: s.username
2472
+ coinValueInCents: i.coinValueInCents,
2473
+ country: i.countryCode,
2474
+ currency: i.currencyCode,
2475
+ jurisdiction: Gt(i.jurisdictionCode),
2476
+ uiMessages: i.uiMessages,
2477
+ username: i.username
2168
2478
  }
2169
2479
  };
2170
2480
  }
2171
- function Ht(s) {
2481
+ function Yt(i) {
2172
2482
  var t, e;
2173
2483
  return {
2174
2484
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2175
- code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
2176
- details: (e = s.data) == null ? void 0 : e.details
2485
+ code: ((t = i.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2486
+ details: (e = i.data) == null ? void 0 : e.details
2177
2487
  };
2178
2488
  }
2179
- function Vt(s, t) {
2180
- const e = t.contract;
2181
- if (!e) {
2182
- const i = t.data;
2489
+ function Zt(i, t, e) {
2490
+ const s = t.contract;
2491
+ if (!s) {
2492
+ const a = t.data;
2183
2493
  return {
2184
2494
  contract: {
2185
2495
  bet: {
2186
- available: i.additionalConfigData.availableMultipliersPerBaseBet,
2496
+ available: a.additionalConfigData.availableMultipliersPerBaseBet,
2187
2497
  default: {
2188
- base: i.additionalConfigData.defaultBet.baseBet,
2189
- multiplier: i.additionalConfigData.defaultBet.betMultiplier
2498
+ base: a.additionalConfigData.defaultBet.baseBet,
2499
+ multiplier: a.additionalConfigData.defaultBet.betMultiplier
2190
2500
  },
2191
- max: i.additionalConfigData.maxAllowedOverallBetInCoins ?? null,
2192
- last: i.gameState.betFromCurrentRound ? {
2193
- base: i.gameState.betFromCurrentRound.baseBet,
2194
- multiplier: i.gameState.betFromCurrentRound.betMultiplier
2501
+ max: a.additionalConfigData.maxAllowedOverallBetInCoins ?? null,
2502
+ last: a.gameState.betFromCurrentRound ? {
2503
+ base: a.gameState.betFromCurrentRound.baseBet,
2504
+ multiplier: a.gameState.betFromCurrentRound.betMultiplier
2195
2505
  } : null,
2196
- lastPaid: i.gameState.lastPlacedMainGameBet ? {
2197
- base: i.gameState.lastPlacedMainGameBet.baseBet,
2198
- multiplier: i.gameState.lastPlacedMainGameBet.betMultiplier
2506
+ lastPaid: a.gameState.lastPlacedMainGameBet ? {
2507
+ base: a.gameState.lastPlacedMainGameBet.baseBet,
2508
+ multiplier: a.gameState.lastPlacedMainGameBet.betMultiplier
2199
2509
  } : null
2200
2510
  },
2201
2511
  balance: {
2202
2512
  coins: t.balance,
2203
2513
  version: t.balanceVersion
2204
2514
  },
2205
- freeRounds: (i.FREE_ROUNDS ?? []).map((a) => ({
2515
+ freeRounds: (a.FREE_ROUNDS ?? []).map((r) => ({
2206
2516
  conf: {
2207
- base: a.conf.baseBet,
2208
- multiplier: a.conf.betMultiplier,
2209
- numAwarded: a.conf.numAwarded
2517
+ base: r.conf.baseBet,
2518
+ multiplier: r.conf.betMultiplier,
2519
+ numAwarded: r.conf.numAwarded
2210
2520
  },
2211
2521
  data: {
2212
- numPlayed: a.data.numPlayed,
2213
- win: a.data.winAmount,
2214
- numLeft: a.data.numLeft
2522
+ numPlayed: r.data.numPlayed,
2523
+ win: r.data.winAmount,
2524
+ numLeft: r.data.numLeft
2215
2525
  },
2216
- id: a.id,
2217
- rejectable: a.rejectable,
2218
- skippable: a.skippable,
2219
- status: a.status,
2220
- type: a.type
2526
+ id: r.id,
2527
+ rejectable: r.rejectable,
2528
+ skippable: r.skippable,
2529
+ status: r.status,
2530
+ type: r.type
2221
2531
  })),
2222
- gameModel: i.additionalConfigData.gameModelFile,
2223
- metaData: i.gameConfigData.metaData,
2224
- roundId: i.gameState.cycleId,
2532
+ gameModel: a.additionalConfigData.gameModelFile,
2533
+ metaData: a.gameConfigData.metaData,
2534
+ roundId: a.gameState.cycleId,
2225
2535
  serverTime: t.balanceVersion,
2226
- sessionId: i.gameState.sessionId,
2536
+ sessionId: a.gameState.sessionId,
2227
2537
  stateType: {
2228
- thisRound: i.gameState.stateTypeThisRound,
2229
- nextRound: i.gameState.stateTypeNextRound
2538
+ thisRound: a.gameState.stateTypeThisRound,
2539
+ nextRound: a.gameState.stateTypeNextRound
2230
2540
  },
2231
- uiMessages: s.uiMessages,
2541
+ uiMessages: i.uiMessages,
2232
2542
  win: {
2233
- max: i.maxWin ?? null,
2234
- round: i.gameState.totalWinFromCurrentRound,
2235
- total: i.gameState.totalWinFromCurrentGameCycle
2543
+ max: a.maxWin ?? null,
2544
+ round: a.gameState.totalWinFromCurrentRound,
2545
+ total: a.gameState.totalWinFromCurrentGameCycle
2236
2546
  }
2237
2547
  },
2238
- data: i
2548
+ data: a
2239
2549
  };
2240
2550
  }
2241
2551
  return {
2242
2552
  contract: {
2243
2553
  bet: {
2244
- available: e.availableMultipliersPerBaseBet,
2554
+ available: s.availableMultipliersPerBaseBet,
2245
2555
  default: {
2246
- base: e.defaultBet.baseBet,
2247
- multiplier: e.defaultBet.betMultiplier
2556
+ base: s.defaultBet.baseBet,
2557
+ multiplier: s.defaultBet.betMultiplier
2248
2558
  },
2249
- max: e.maxBetInCoins ?? null,
2250
- last: e.lastBet ? {
2251
- base: e.lastBet.baseBet,
2252
- multiplier: e.lastBet.betMultiplier
2559
+ max: s.maxBetInCoins ?? null,
2560
+ last: s.lastBet ? {
2561
+ base: s.lastBet.baseBet,
2562
+ multiplier: s.lastBet.betMultiplier
2253
2563
  } : null,
2254
- lastPaid: e.lastMainGameBet ? {
2255
- base: e.lastMainGameBet.baseBet,
2256
- multiplier: e.lastMainGameBet.betMultiplier
2564
+ lastPaid: s.lastMainGameBet ? {
2565
+ base: s.lastMainGameBet.baseBet,
2566
+ multiplier: s.lastMainGameBet.betMultiplier
2257
2567
  } : null
2258
2568
  },
2259
2569
  balance: {
2260
- coins: e.balanceInCoins,
2261
- version: e.balanceVersion
2570
+ coins: s.balanceInCoins,
2571
+ version: s.balanceVersion
2262
2572
  },
2263
- freeRounds: (e.freeRounds ?? []).map((i) => ({
2573
+ freeRounds: (s.freeRounds ?? []).map((a) => ({
2264
2574
  conf: {
2265
- base: i.conf.baseBet,
2266
- multiplier: i.conf.betMultiplier,
2267
- numAwarded: i.conf.numAwarded
2575
+ base: a.conf.baseBet,
2576
+ multiplier: a.conf.betMultiplier,
2577
+ numAwarded: a.conf.numAwarded
2268
2578
  },
2269
2579
  data: {
2270
- numPlayed: i.data.numPlayed,
2271
- win: i.data.winAmount,
2272
- numLeft: i.data.numLeft
2580
+ numPlayed: a.data.numPlayed,
2581
+ win: a.data.winAmount,
2582
+ numLeft: a.data.numLeft
2273
2583
  },
2274
- id: i.id,
2275
- rejectable: i.rejectable,
2276
- skippable: i.skippable,
2277
- status: i.status,
2278
- type: i.type
2584
+ id: a.id,
2585
+ rejectable: a.rejectable,
2586
+ skippable: a.skippable,
2587
+ status: a.status,
2588
+ type: a.type
2279
2589
  })),
2280
- gameModel: e.gameModelFile,
2281
- metaData: e.metaData,
2282
- roundId: e.roundId,
2283
- serverTime: e.serverTime,
2284
- sessionId: e.sessionId,
2590
+ gameModel: s.gameModelFile,
2591
+ metaData: s.metaData,
2592
+ roundId: s.roundId,
2593
+ serverTime: s.serverTime,
2594
+ sessionId: s.sessionId,
2285
2595
  stateType: {
2286
- thisRound: e.stateTypeThisRound,
2287
- nextRound: e.stateTypeNextRound
2596
+ thisRound: s.stateTypeThisRound,
2597
+ nextRound: s.stateTypeNextRound
2288
2598
  },
2289
- uiMessages: s.contract.uiMessages.concat(e.uiMessages),
2599
+ uiMessages: i.contract.uiMessages.concat(s.uiMessages),
2290
2600
  win: {
2291
- max: e.maxWinInCoins ?? null,
2292
- round: e.roundWin,
2293
- total: e.totalWin
2601
+ max: s.maxWinInCoins ?? null,
2602
+ round: s.roundWin,
2603
+ total: s.totalWin
2294
2604
  }
2295
2605
  },
2296
- data: t.opaqueGameServerToUi
2606
+ data: e ? e(t.opaqueGameServerToUi) : t.opaqueGameServerToUi
2297
2607
  };
2298
2608
  }
2299
- function zt(s) {
2609
+ function es(i) {
2300
2610
  var t, e;
2301
2611
  return {
2302
2612
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2303
- code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
2304
- details: (e = s.data) == null ? void 0 : e.details
2613
+ code: ((t = i.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2614
+ details: (e = i.data) == null ? void 0 : e.details
2305
2615
  };
2306
2616
  }
2307
- function qt(s) {
2308
- const t = s.contract;
2309
- if (!t) {
2310
- const e = s.data;
2617
+ function ts(i, t) {
2618
+ const e = i.contract;
2619
+ if (!e) {
2620
+ const s = i.data;
2311
2621
  return {
2312
2622
  contract: {
2313
2623
  bet: {
2314
- last: e.gameState.betFromCurrentRound ? {
2315
- base: e.gameState.betFromCurrentRound.baseBet,
2316
- multiplier: e.gameState.betFromCurrentRound.betMultiplier
2624
+ last: s.gameState.betFromCurrentRound ? {
2625
+ base: s.gameState.betFromCurrentRound.baseBet,
2626
+ multiplier: s.gameState.betFromCurrentRound.betMultiplier
2317
2627
  } : null,
2318
2628
  lastPaid: {
2319
- base: (e.gameState.lastPlacedMainGameBet ?? e.gameState.betFromCurrentRound).baseBet,
2320
- multiplier: (e.gameState.lastPlacedMainGameBet ?? e.gameState.betFromCurrentRound).betMultiplier
2629
+ base: (s.gameState.lastPlacedMainGameBet ?? s.gameState.betFromCurrentRound).baseBet,
2630
+ multiplier: (s.gameState.lastPlacedMainGameBet ?? s.gameState.betFromCurrentRound).betMultiplier
2321
2631
  }
2322
2632
  },
2323
2633
  balance: {
2324
- coins: s.balance,
2325
- version: s.balanceVersion
2634
+ coins: i.balance,
2635
+ version: i.balanceVersion
2326
2636
  },
2327
- freeRounds: (e.FREE_ROUNDS ?? []).map((i) => ({
2637
+ freeRounds: (s.FREE_ROUNDS ?? []).map((a) => ({
2328
2638
  conf: {
2329
- base: i.conf.baseBet,
2330
- multiplier: i.conf.betMultiplier,
2331
- numAwarded: i.conf.numAwarded
2639
+ base: a.conf.baseBet,
2640
+ multiplier: a.conf.betMultiplier,
2641
+ numAwarded: a.conf.numAwarded
2332
2642
  },
2333
2643
  data: {
2334
- numPlayed: i.data.numPlayed,
2335
- win: i.data.winAmount,
2336
- numLeft: i.data.numLeft
2644
+ numPlayed: a.data.numPlayed,
2645
+ win: a.data.winAmount,
2646
+ numLeft: a.data.numLeft
2337
2647
  },
2338
- id: i.id,
2339
- rejectable: i.rejectable,
2340
- skippable: i.skippable,
2341
- status: i.status,
2342
- type: i.type
2648
+ id: a.id,
2649
+ rejectable: a.rejectable,
2650
+ skippable: a.skippable,
2651
+ status: a.status,
2652
+ type: a.type
2343
2653
  })),
2344
- serverTime: s.balanceVersion,
2345
- roundId: e.gameState.cycleId,
2654
+ serverTime: i.balanceVersion,
2655
+ roundId: s.gameState.cycleId,
2346
2656
  stateType: {
2347
- thisRound: e.gameState.stateTypeThisRound,
2348
- nextRound: e.gameState.stateTypeNextRound
2657
+ thisRound: s.gameState.stateTypeThisRound,
2658
+ nextRound: s.gameState.stateTypeNextRound
2349
2659
  },
2350
- uiMessages: e.uiMessages,
2660
+ uiMessages: s.uiMessages,
2351
2661
  win: {
2352
- round: e.gameState.totalWinFromCurrentRound,
2353
- total: e.gameState.totalWinFromCurrentGameCycle
2662
+ round: s.gameState.totalWinFromCurrentRound,
2663
+ total: s.gameState.totalWinFromCurrentGameCycle
2354
2664
  }
2355
2665
  },
2356
- data: e
2666
+ data: s
2357
2667
  };
2358
2668
  }
2359
2669
  return {
2360
2670
  contract: {
2361
2671
  bet: {
2362
- last: t.lastBet ? {
2363
- base: t.lastBet.baseBet,
2364
- multiplier: t.lastBet.betMultiplier
2672
+ last: e.lastBet ? {
2673
+ base: e.lastBet.baseBet,
2674
+ multiplier: e.lastBet.betMultiplier
2365
2675
  } : null,
2366
2676
  lastPaid: {
2367
- base: t.lastMainGameBet.baseBet,
2368
- multiplier: t.lastMainGameBet.betMultiplier
2677
+ base: e.lastMainGameBet.baseBet,
2678
+ multiplier: e.lastMainGameBet.betMultiplier
2369
2679
  }
2370
2680
  },
2371
2681
  balance: {
2372
- coins: t.balanceInCoins,
2373
- version: t.balanceVersion
2682
+ coins: e.balanceInCoins,
2683
+ version: e.balanceVersion
2374
2684
  },
2375
- freeRounds: (t.freeRounds ?? []).map((e) => ({
2685
+ freeRounds: (e.freeRounds ?? []).map((s) => ({
2376
2686
  conf: {
2377
- base: e.conf.baseBet,
2378
- multiplier: e.conf.betMultiplier,
2379
- numAwarded: e.conf.numAwarded
2687
+ base: s.conf.baseBet,
2688
+ multiplier: s.conf.betMultiplier,
2689
+ numAwarded: s.conf.numAwarded
2380
2690
  },
2381
2691
  data: {
2382
- numPlayed: e.data.numPlayed,
2383
- win: e.data.winAmount,
2384
- numLeft: e.data.numLeft
2692
+ numPlayed: s.data.numPlayed,
2693
+ win: s.data.winAmount,
2694
+ numLeft: s.data.numLeft
2385
2695
  },
2386
- id: e.id,
2387
- rejectable: e.rejectable,
2388
- skippable: e.skippable,
2389
- status: e.status,
2390
- type: e.type
2696
+ id: s.id,
2697
+ rejectable: s.rejectable,
2698
+ skippable: s.skippable,
2699
+ status: s.status,
2700
+ type: s.type
2391
2701
  })),
2392
- serverTime: t.serverTime,
2393
- roundId: t.roundId,
2702
+ serverTime: e.serverTime,
2703
+ roundId: e.roundId,
2394
2704
  stateType: {
2395
- thisRound: t.stateTypeThisRound,
2396
- nextRound: t.stateTypeNextRound
2705
+ thisRound: e.stateTypeThisRound,
2706
+ nextRound: e.stateTypeNextRound
2397
2707
  },
2398
- uiMessages: t.uiMessages,
2708
+ uiMessages: e.uiMessages,
2399
2709
  win: {
2400
- round: t.roundWin,
2401
- total: t.totalWin
2710
+ round: e.roundWin,
2711
+ total: e.totalWin
2402
2712
  }
2403
2713
  },
2404
- data: s.opaqueGameServerToUi
2714
+ data: t ? t(i.opaqueGameServerToUi) : i.opaqueGameServerToUi
2405
2715
  };
2406
2716
  }
2407
- function Wt(s) {
2717
+ function ss(i) {
2408
2718
  var t, e;
2409
2719
  return {
2410
2720
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2411
- code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
2412
- details: (e = s.data) == null ? void 0 : e.details
2721
+ code: ((t = i.data) == null ? void 0 : t.code) ?? He.UNKNOWN,
2722
+ details: (e = i.data) == null ? void 0 : e.details
2413
2723
  };
2414
2724
  }
2415
- const $i = {
2416
- parseAuthenticateResponse: Gt,
2417
- parseAuthenticateError: Ht,
2418
- parseOpenGameResponse: Vt,
2419
- parseOpenGameError: zt,
2420
- parsePlayResponse: qt,
2421
- parsePlayError: Wt
2422
- }, Mi = {
2725
+ const oi = {
2726
+ parseAuthenticateResponse: Jt,
2727
+ parseAuthenticateError: Yt,
2728
+ parseOpenGameResponse: Zt,
2729
+ parseOpenGameError: es,
2730
+ parsePlayResponse: ts,
2731
+ parsePlayError: ss
2732
+ }, Bs = {
2733
+ aze: "az",
2423
2734
  bul: "bg",
2424
2735
  chi: "zh",
2425
2736
  zho: "zh",
@@ -2451,54 +2762,61 @@ const $i = {
2451
2762
  tur: "tr",
2452
2763
  ukr: "uk",
2453
2764
  vie: "vi"
2454
- }, { device: Si } = R(navigator.userAgent), Ii = O("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
2455
- class ji extends bi {
2765
+ }, { device: _s } = L(navigator.userAgent), Fs = P("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
2766
+ class ri extends As {
2456
2767
  constructor(...e) {
2457
2768
  super(...e);
2458
2769
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2459
2770
  // @ts-ignore
2460
- m(this, "socket");
2461
- m(this, "error");
2771
+ b(this, "socket");
2772
+ b(this, "error");
2462
2773
  this.on("openGame", async () => {
2463
2774
  try {
2464
2775
  this.error = void 0;
2465
- const i = await this.openGame();
2466
- this.send("openGameResponse", i);
2467
- } catch (i) {
2468
- this.error = i, this.send("openGameError", i);
2776
+ const s = await this.openGame();
2777
+ this.send("openGameResponse", s);
2778
+ } catch (s) {
2779
+ this.error = s, this.send("openGameError", s);
2469
2780
  }
2470
- }), this.on("play", async (i) => {
2781
+ }), this.on("play", async (s) => {
2471
2782
  try {
2472
2783
  this.error = void 0;
2473
- const a = await this.play(i);
2784
+ const a = await this.play(s);
2474
2785
  this.send("playResponse", a);
2475
2786
  } catch (a) {
2476
2787
  this.error = a, this.send("playError", a);
2477
2788
  }
2478
- }), this.on("freeRounds", async (i) => {
2789
+ }), this.on("freeRounds", async (s) => {
2479
2790
  try {
2480
- this.error = void 0, await this.socket.freeRounds(i), this.send("freeRoundsResponse", i);
2791
+ this.error = void 0, await this.socket.freeRounds(s), this.send("freeRoundsResponse", s);
2481
2792
  } catch (a) {
2482
2793
  this.error = a, this.send("freeRoundsError", a);
2483
2794
  }
2484
- }), this.on("configured", (i) => {
2485
- this.socket.setRequestTimeoutMs(i.ui.requestTimeoutMs);
2795
+ }), this.on("getBalance", async () => {
2796
+ try {
2797
+ this.error = void 0;
2798
+ const s = await this.socket.getBalance();
2799
+ this.send("balance", { balance: s.balance });
2800
+ } catch {
2801
+ }
2802
+ }), this.on("configured", (s) => {
2803
+ this.socket.setRequestTimeoutMs(s.ui.requestTimeoutMs);
2486
2804
  }), this.registerFromSdkEvents();
2487
2805
  }
2488
2806
  initialize(e) {
2489
- this.socket = new vi(e, {
2807
+ this.socket = new Rs(e, {
2490
2808
  gameVersion: this.config.gameVersion,
2491
2809
  requestTimeoutMs: this.sdkConfig.ui.requestTimeoutMs
2492
- }), ["fireboltroulette"].includes(e.gameCode) || (this.socket.addEventListener("close", (i) => {
2493
- i.code === 1008 ? this.error || this.send("error", {
2810
+ }), ["fireboltroulette"].includes(e.gameCode) || (this.socket.addEventListener("close", (s) => {
2811
+ s.code === 1008 ? this.error || this.send("error", {
2494
2812
  type: "CLOSE",
2495
2813
  messageCode: "TOO_MANY_OPEN_GAMES",
2496
2814
  messageKey: "RgsError.TOO_MANY_OPEN_GAMES"
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 () => {
2815
+ }) : s.code === 1011 ? this.error || this.send("error", { type: "CLOSE", messageCode: "UNKNOWN", messageKey: "RgsError.UNKNOWN" }) : this.reconnect();
2816
+ }), ["mobile", "tablet"].includes(_s.type ?? "") && document.addEventListener("visibilitychange", async () => {
2499
2817
  document.hidden || (this.socket.socket ? this.socket.socket && [WebSocket.CONNECTING, WebSocket.OPEN].includes(this.socket.socket.readyState) && this.socket.close() : this.reconnect());
2500
- })), this.socket.addEventListener("error", (i) => Ii("error", i)), this.socket.addEventListener("realityCheck", (i) => {
2501
- this.send("realityCheck", i);
2818
+ })), this.socket.addEventListener("error", (s) => Fs("error", s)), this.socket.addEventListener("realityCheck", (s) => {
2819
+ this.send("realityCheck", s);
2502
2820
  });
2503
2821
  }
2504
2822
  async reconnect() {
@@ -2509,143 +2827,147 @@ class ji extends bi {
2509
2827
  }
2510
2828
  }
2511
2829
  async openGame() {
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 });
2830
+ var H, Oe;
2831
+ const e = new URLSearchParams(window.location.search), s = e.get("apiUrl"), a = e.get("cageCode"), r = e.get("gameCode"), c = e.get("operatorCode"), g = e.get("playMode"), h = e.get("token"), p = e.get("username"), m = e.get("gameHistoryUrl"), C = e.get("homeUrl") ?? void 0, A = e.get("cashierUrl") ?? void 0;
2832
+ this.initialize({ apiUrl: s, cageCode: a, gameCode: r, operatorCode: c, playMode: g, token: h, username: p });
2515
2833
  try {
2516
2834
  await this.socket.connect();
2517
2835
  } catch {
2518
- throw { type: "error", data: { code: Fe.CONNECTION_ERROR } };
2836
+ throw { type: "error", data: { code: He.CONNECTION_ERROR } };
2519
2837
  }
2520
- let j;
2838
+ let G;
2521
2839
  try {
2522
- j = await this.socket.authenticate();
2523
- } catch (q) {
2524
- throw { type: q.type, data: q.type === "error" ? Ht(q.data) : void 0 };
2840
+ G = await this.socket.authenticate();
2841
+ } catch (X) {
2842
+ throw { type: X.type, data: X.type === "error" ? Yt(X.data) : void 0 };
2525
2843
  }
2526
- let K;
2844
+ let pe;
2527
2845
  try {
2528
- K = await this.socket.openGame();
2529
- } catch (q) {
2530
- throw { type: q.type, data: q.type === "error" ? zt(q.data) : void 0 };
2846
+ pe = await this.socket.openGame();
2847
+ } catch (X) {
2848
+ throw { type: X.type, data: X.type === "error" ? es(X.data) : void 0 };
2531
2849
  }
2532
- const U = Gt(j), le = Vt(j, K);
2850
+ const _ = Jt(G), K = Zt(
2851
+ G,
2852
+ pe,
2853
+ this.config.dataDecoder && bt[this.config.dataDecoder]
2854
+ );
2533
2855
  this.sdkConfig.api = {
2534
2856
  ...this.sdkConfig.api,
2535
2857
  brand: a,
2536
2858
  game: r,
2537
- integration: n,
2538
- jurisdiction: U.contract.jurisdiction,
2539
- playMode: h,
2540
- user: U.contract.username,
2859
+ integration: c,
2860
+ jurisdiction: _.contract.jurisdiction,
2861
+ playMode: g,
2862
+ user: _.contract.username,
2541
2863
  integrationData: {
2542
- token: p
2864
+ token: h
2543
2865
  },
2544
- country: U.contract.country,
2545
- currency: U.contract.currency,
2546
- coinValueInCents: U.contract.coinValueInCents,
2547
- gameHistoryUrl: g,
2548
- homeUrl: k,
2549
- cashierUrl: F,
2550
- backendSessionId: le.contract.sessionId,
2551
- lastRoundId: le.contract.roundId
2866
+ country: _.contract.country,
2867
+ currency: _.contract.currency,
2868
+ coinValueInCents: _.contract.coinValueInCents,
2869
+ gameHistoryUrl: m,
2870
+ homeUrl: C,
2871
+ cashierUrl: A,
2872
+ backendSessionId: K.contract.sessionId,
2873
+ lastRoundId: K.contract.roundId
2552
2874
  };
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;
2875
+ const Q = (Oe = (H = e.get("languageCode")) == null ? void 0 : H.split("_")) == null ? void 0 : Oe[0];
2876
+ return Q && (this.sdkConfig.ui.language = Q.length === 3 ? Bs[Q] ?? Q : Q), K;
2555
2877
  }
2556
2878
  async play(e) {
2557
2879
  for (; !this.socket.socket; )
2558
- await new Promise((k) => setTimeout(() => k(), 500));
2880
+ await new Promise((A) => setTimeout(() => A(), 500));
2559
2881
  const {
2560
- contract: { bet: i, forcedOutcomes: a, ...r },
2561
- extra: n,
2562
- payloadToInject: h,
2563
- actionType: p
2564
- } = e, w = {
2565
- bet: i ? { baseBet: i.base, betMultiplier: i.multiplier } : void 0,
2882
+ contract: { bet: s, forcedOutcomes: a, ...r },
2883
+ extra: c,
2884
+ payloadToInject: g,
2885
+ actionType: h
2886
+ } = e, p = this.config.dataEncoder && os[this.config.dataEncoder], m = {
2887
+ bet: s ? { baseBet: s.base, betMultiplier: s.multiplier } : void 0,
2566
2888
  forcedOutcomes: a,
2567
2889
  // TODO: get rid of contractRest - it' a legacy from old RGS
2568
2890
  ...r,
2569
- ...h,
2570
- opaqueUiToGameServer: n
2891
+ ...g,
2892
+ opaqueUiToGameServer: p ? p(c) : c
2571
2893
  };
2572
- let g;
2894
+ let C;
2573
2895
  try {
2574
- g = await this.socket.sendAction(p, w);
2575
- } catch (k) {
2576
- throw { type: k.type, data: k.type === "error" ? Wt(k.data) : void 0 };
2896
+ C = await this.socket.sendAction(h, m);
2897
+ } catch (A) {
2898
+ throw { type: A.type, data: A.type === "error" ? ss(A.data) : void 0 };
2577
2899
  }
2578
- return qt(g);
2900
+ return ts(C, this.config.dataDecoder && bt[this.config.dataDecoder]);
2579
2901
  }
2580
2902
  registerFromSdkEvents() {
2581
2903
  this.on("history", () => {
2582
2904
  const {
2583
- api: { game: e, integration: i, integrationData: a, jurisdiction: r, user: n, gameHistoryUrl: h },
2584
- ui: { language: p }
2585
- } = this.sdkConfig, w = n.replace(/^user_/, "").replace(new RegExp(`_${i}$`), ""), g = new URL(window.location.href);
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");
2905
+ api: { game: e, integration: s, integrationData: a, jurisdiction: r, user: c, gameHistoryUrl: g },
2906
+ ui: { language: h }
2907
+ } = this.sdkConfig, p = c.replace(/^user_/, "").replace(new RegExp(`_${s}$`), ""), m = new URL(window.location.href);
2908
+ m.hostname = m.hostname.replace(/^v\./, "").replace(/^play\./, "history."), m.pathname = m.pathname.replace(/(\/[0-9]+\.[0-9]+\.[0-9]+)?\/wrapper\.html/, "/list/index.html"), m.search = "", m.searchParams.set("apiUrl", new URL(g).origin), m.searchParams.set("gameCode", e), r && m.searchParams.set("jurisdiction", r), m.searchParams.set("operatorCode", s), m.searchParams.set("token", a.token), m.searchParams.set("username", p), m.searchParams.set("languageCode", h), this.config.gameHistoryUrl && m.searchParams.set("gameHistoryUrl", this.config.gameHistoryUrl), window.open(m.toString(), "_blank");
2587
2909
  });
2588
2910
  }
2589
2911
  }
2590
- class Ti {
2591
- constructor(t, e, i) {
2592
- m(this, "trackers");
2593
- m(this, "config");
2594
- m(this, "sdkConfig");
2595
- this.trackers = t, this.config = e, this.sdkConfig = i;
2596
- }
2597
- on(t, e, i) {
2598
- const a = function(n) {
2599
- n.data.message !== `kalamba:wrapper-telemetry:${t}` && n.data.message !== `kalamba:wrapper:${t}` || e(n.data.payload);
2912
+ class Ns {
2913
+ constructor(t, e, s) {
2914
+ b(this, "trackers");
2915
+ b(this, "config");
2916
+ b(this, "sdkConfig");
2917
+ this.trackers = t, this.config = e, this.sdkConfig = s;
2918
+ }
2919
+ on(t, e, s) {
2920
+ const a = function(c) {
2921
+ c.data.message !== `kalamba:wrapper-telemetry:${t}` && c.data.message !== `kalamba:wrapper:${t}` || e(c.data.payload);
2600
2922
  };
2601
- window.addEventListener("message", a, i);
2923
+ window.addEventListener("message", a, s);
2602
2924
  }
2603
2925
  track(t, e) {
2604
- this.trackers.forEach((i) => i.track(t, e));
2926
+ this.trackers.forEach((s) => s.track(t, e));
2605
2927
  }
2606
2928
  }
2607
- function Ot(s) {
2608
- return s.reduce((t, e) => t + e, 0);
2929
+ function Ht(i) {
2930
+ return i.reduce((t, e) => t + e, 0);
2609
2931
  }
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;
2932
+ function Ds(i) {
2933
+ const t = i.length, e = Ht(i) / t, s = i.map((r) => Math.pow(r - e, 2)), a = Ht(s) / t;
2612
2934
  return Math.sqrt(a);
2613
2935
  }
2614
- class xt {
2936
+ class Vt {
2615
2937
  constructor() {
2616
- m(this, "rafId", -1);
2617
- m(this, "startTime", 0);
2618
- m(this, "stopTime", 0);
2619
- m(this, "frames", []);
2620
- m(this, "calculateFPS", () => {
2938
+ b(this, "rafId", -1);
2939
+ b(this, "startTime", 0);
2940
+ b(this, "stopTime", 0);
2941
+ b(this, "frames", []);
2942
+ b(this, "calculateFPS", () => {
2621
2943
  const t = Math.floor((this.stopTime - this.startTime) / 1e3);
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);
2944
+ return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, s, a, r) => (r[a] !== r[a - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
2623
2945
  });
2624
- m(this, "getReport", () => {
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 };
2946
+ b(this, "getReport", () => {
2947
+ const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), s = t.length > 0 ? Math.max(...t) : e, a = t.length > 0 ? Math.min(...t) : e, r = t.length > 0 ? Ds(t) : 0;
2948
+ return { fpsAvg: e, fpsMax: s, fpsMin: a, fpsStdDev: r };
2627
2949
  });
2628
- m(this, "start", () => {
2950
+ b(this, "start", () => {
2629
2951
  this.startTime = Date.now(), this.frames = [], this.trackFrames();
2630
2952
  });
2631
- m(this, "stop", () => {
2953
+ b(this, "stop", () => {
2632
2954
  cancelAnimationFrame(this.rafId), this.stopTime = Date.now();
2633
2955
  });
2634
- m(this, "trackFrames", () => {
2956
+ b(this, "trackFrames", () => {
2635
2957
  this.frames.push(Date.now()), this.rafId = requestAnimationFrame(this.trackFrames);
2636
2958
  });
2637
2959
  }
2638
2960
  }
2639
- const Pi = "landscape", Oi = "portrait";
2640
- function xi() {
2961
+ const Gs = "landscape", Hs = "portrait";
2962
+ function Vs() {
2641
2963
  try {
2642
- const s = document.createElement("canvas");
2643
- return !!window.WebGLRenderingContext && (s.getContext("webgl") || s.getContext("experimental-webgl")) instanceof WebGLRenderingContext;
2964
+ const i = document.createElement("canvas");
2965
+ return !!window.WebGLRenderingContext && (i.getContext("webgl") || i.getContext("experimental-webgl")) instanceof WebGLRenderingContext;
2644
2966
  } catch {
2645
2967
  return !1;
2646
2968
  }
2647
2969
  }
2648
- async function Ri() {
2970
+ async function zs() {
2649
2971
  if (!window.createImageBitmap)
2650
2972
  return !1;
2651
2973
  const e = await (await fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=")).blob();
@@ -2655,33 +2977,33 @@ async function Ri() {
2655
2977
  return !1;
2656
2978
  }
2657
2979
  }
2658
- function Je() {
2659
- return window.innerWidth >= window.innerHeight ? Pi : Oi;
2980
+ function rt() {
2981
+ return window.innerWidth >= window.innerHeight ? Gs : Hs;
2660
2982
  }
2661
- var Le, te, ie, se, ye, _e, ke, Be;
2662
- class Ki extends Ti {
2983
+ var Ne, ae, ne, oe, Ae, De, Pe, Ge;
2984
+ class ci extends Ns {
2663
2985
  constructor(...e) {
2664
2986
  super(...e);
2665
- m(this, "FPS_SAMPLE_INTERVAL", 1e4);
2987
+ b(this, "FPS_SAMPLE_INTERVAL", 1e4);
2666
2988
  // wrapper state
2667
- C(this, Le, 0);
2668
- C(this, te);
2669
- C(this, ie);
2670
- C(this, se);
2671
- C(this, ye, !1);
2672
- C(this, _e, !1);
2673
- C(this, ke, "");
2674
- C(this, Be, []);
2675
- E(this, ie, {}), E(this, se, this.deviceInfo()), E(this, te, this.config.gameVersion), this.on("state", ({ balance: i }) => {
2676
- E(this, Le, i);
2677
- }), this.on("autoplay", ({ action: i }) => {
2678
- ["start", "resume"].includes(i) ? E(this, ye, !0) : E(this, ye, !1);
2679
- }), this.on("settings", ({ fastPlay: i }) => {
2680
- i !== void 0 && E(this, _e, i);
2989
+ M(this, Ne, 0);
2990
+ M(this, ae);
2991
+ M(this, ne);
2992
+ M(this, oe);
2993
+ M(this, Ae, !1);
2994
+ M(this, De, !1);
2995
+ M(this, Pe, "");
2996
+ M(this, Ge, []);
2997
+ v(this, ne, {}), v(this, oe, this.deviceInfo()), v(this, ae, this.config.gameVersion), this.on("state", ({ balance: s }) => {
2998
+ v(this, Ne, s);
2999
+ }), this.on("autoplay", ({ action: s }) => {
3000
+ ["start", "resume"].includes(s) ? v(this, Ae, !0) : v(this, Ae, !1);
3001
+ }), this.on("settings", ({ fastPlay: s }) => {
3002
+ s !== void 0 && v(this, De, s);
2681
3003
  }), this.registerEvents();
2682
3004
  }
2683
3005
  async registerEvents() {
2684
- y(this, se).then((e) => {
3006
+ k(this, oe).then((e) => {
2685
3007
  this.track("Device Information", e);
2686
3008
  }), this.on("loadStart", () => {
2687
3009
  this.track("Game Loading", { progress: 0, step: "initial" });
@@ -2695,9 +3017,9 @@ class Ki extends Ti {
2695
3017
  systemMessageType: e.type
2696
3018
  });
2697
3019
  }), this.on("openGameResponse", async (e) => {
2698
- E(this, ke, e.contract.stateType.nextRound), E(this, ie, {
3020
+ v(this, Pe, e.contract.stateType.nextRound), v(this, ne, {
2699
3021
  balanceInCoins: e.contract.balance.coins,
2700
- clientVersion: y(this, te),
3022
+ clientVersion: k(this, ae),
2701
3023
  coinValueInCents: this.sdkConfig.api.coinValueInCents,
2702
3024
  coinValueInCentsFloat: this.sdkConfig.api.coinValueInCents,
2703
3025
  currency: this.sdkConfig.api.currency,
@@ -2720,38 +3042,38 @@ class Ki extends Ti {
2720
3042
  // rtpVariant: 'unknown',
2721
3043
  serverVersion: e.contract.metaData.version
2722
3044
  // testVariants: '',
2723
- }), this.track("Game Open", y(this, ie));
3045
+ }), this.track("Game Open", k(this, ne));
2724
3046
  }), this.on("playCycleEnd", async (e) => {
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;
3047
+ const s = await k(this, oe), { base: a, multiplier: r } = e.contract.bet.lastPaid ?? {}, c = e.contract.balance.coins, g = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, h = e.contract.win.total, p = h - g, m = "spin", C = e.contract.roundId;
2726
3048
  this.track("Betting Activity", {
2727
- balance: h - g,
2728
- balanceAfter: h,
3049
+ balance: c - p,
3050
+ balanceAfter: c,
2729
3051
  baseBet: a,
2730
3052
  // baseBetIndex,
2731
3053
  betMultiplier: r,
2732
- betType: k,
2733
- gameVersion: y(this, te),
3054
+ betType: m,
3055
+ gameVersion: k(this, ae),
2734
3056
  coinValueInCents: this.sdkConfig.api.coinValueInCents,
2735
3057
  coinValueInCentsFloat: this.sdkConfig.api.coinValueInCents,
2736
3058
  currency: this.sdkConfig.api.currency,
2737
3059
  environment: "release",
2738
3060
  gameCode: this.sdkConfig.api.game,
2739
3061
  gameCodeServer: this.sdkConfig.api.game,
2740
- isMobile: i.isMobile,
2741
- netResult: g,
3062
+ isMobile: s.isMobile,
3063
+ netResult: p,
2742
3064
  operatorName: "kalamba",
2743
- orientation: Je(),
3065
+ orientation: rt(),
2744
3066
  partnerId: this.sdkConfig.api.brand,
2745
3067
  partnerParentId: this.sdkConfig.api.integration,
2746
3068
  platform: "WEB",
2747
3069
  playMode: this.sdkConfig.api.playMode,
2748
- roundId: F,
3070
+ roundId: C,
2749
3071
  // TODO: uncomment when tracking TrackingEvent.GameSpin is implemented
2750
3072
  // roundTypes: [...this.#roundTypes],
2751
3073
  roundTypes: ["BaseGame"],
2752
- totalBet: p,
2753
- totalWin: w
2754
- }), E(this, Be, []);
3074
+ totalBet: g,
3075
+ totalWin: h
3076
+ }), v(this, Ge, []);
2755
3077
  }), this.on("telemetry.click", (e) => {
2756
3078
  this.track("UI Interaction", {
2757
3079
  action: "click",
@@ -2766,47 +3088,47 @@ class Ki extends Ti {
2766
3088
  }), this.reportFpsSample(), this.reportFpsRound();
2767
3089
  }
2768
3090
  reportFpsSample() {
2769
- const e = new xt(), i = () => {
3091
+ const e = new Vt(), s = () => {
2770
3092
  e.stop();
2771
3093
  const r = e.getReport();
2772
3094
  this.track("FPS Performance", { ...r, fpsType: "sample" }), a();
2773
3095
  }, a = async () => {
2774
- e.start(), setTimeout(i, this.FPS_SAMPLE_INTERVAL);
3096
+ e.start(), setTimeout(s, this.FPS_SAMPLE_INTERVAL);
2775
3097
  };
2776
3098
  a();
2777
3099
  }
2778
3100
  reportFpsRound() {
2779
- const e = new xt();
3101
+ const e = new Vt();
2780
3102
  this.on("playCycleStart", () => {
2781
3103
  e.start();
2782
3104
  }), this.on("playCycleEnd", () => {
2783
3105
  e.stop();
2784
- const i = e.getReport();
2785
- this.track("FPS Performance", { ...i, fpsType: "playCycleStart->playCycleEnd" });
3106
+ const s = e.getReport();
3107
+ this.track("FPS Performance", { ...s, fpsType: "playCycleStart->playCycleEnd" });
2786
3108
  });
2787
3109
  }
2788
3110
  getExtraUiInteractionData() {
2789
3111
  return {
2790
- orientation: Je(),
2791
- stateType: y(this, ke)
3112
+ orientation: rt(),
3113
+ stateType: k(this, Pe)
2792
3114
  };
2793
3115
  }
2794
3116
  async deviceInfo() {
2795
- var h;
2796
- const { browser: e, device: i, os: a } = R(navigator.userAgent), r = xi(), n = await Ri();
3117
+ var g;
3118
+ const { browser: e, device: s, os: a } = L(navigator.userAgent), r = Vs(), c = await zs();
2797
3119
  return {
2798
3120
  browserName: e.name,
2799
3121
  browserVersion: e.version,
2800
- connection: (h = navigator.connection) == null ? void 0 : h.effectiveType,
2801
- deviceName: i.model,
2802
- deviceType: i.type,
2803
- isMobile: ["mobile", "tablet"].includes(i.type ?? ""),
3122
+ connection: (g = navigator.connection) == null ? void 0 : g.effectiveType,
3123
+ deviceName: s.model,
3124
+ deviceType: s.type,
3125
+ isMobile: ["mobile", "tablet"].includes(s.type ?? ""),
2804
3126
  isWebGLSupported: r,
2805
- isWebPSupported: n,
2806
- manufacturer: i.vendor,
3127
+ isWebPSupported: c,
3128
+ manufacturer: s.vendor,
2807
3129
  operatingSystem: a.name,
2808
3130
  operatingSystemVersion: a.version,
2809
- orientation: Je(),
3131
+ orientation: rt(),
2810
3132
  pixelRatio: window.devicePixelRatio,
2811
3133
  screenHeight: window.screen.height,
2812
3134
  screenSize: `${window.screen.width}x${window.screen.height}`,
@@ -2818,98 +3140,100 @@ class Ki extends Ti {
2818
3140
  };
2819
3141
  }
2820
3142
  }
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 {
3143
+ Ne = new WeakMap(), ae = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), Ae = new WeakMap(), De = new WeakMap(), Pe = new WeakMap(), Ge = new WeakMap();
3144
+ var qs = rs();
3145
+ const zt = /* @__PURE__ */ cs(qs);
3146
+ class is {
2825
3147
  constructor(t, e) {
2826
- m(this, "config");
2827
- m(this, "sdkConfig");
3148
+ b(this, "config");
3149
+ b(this, "sdkConfig");
2828
3150
  this.config = t, this.sdkConfig = e;
2829
3151
  }
2830
3152
  }
2831
- const Ut = 25, Lt = 1e4;
2832
- var ae, ne, oe, D;
2833
- class Qi extends $t {
3153
+ const qt = 25, Wt = 1e4;
3154
+ var re, ce, de, W;
3155
+ class di extends is {
2834
3156
  constructor(...e) {
2835
3157
  super(...e);
2836
- C(this, ae, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
2837
- C(this, ne);
2838
- C(this, oe);
2839
- C(this, D, []);
2840
- m(this, "processQueueForced");
2841
- E(this, ne, (/* @__PURE__ */ new Date()).getTime()), E(this, D, []), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, ae), {
3158
+ M(this, re, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
3159
+ M(this, ce);
3160
+ M(this, de);
3161
+ M(this, W, []);
3162
+ b(this, "processQueueForced");
3163
+ v(this, ce, (/* @__PURE__ */ new Date()).getTime()), v(this, W, []), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(k(this, re), {
2842
3164
  method: "OPTIONS"
2843
- }).catch(Rt), this.subscribe();
3165
+ }).catch(zt), this.subscribe();
2844
3166
  }
2845
3167
  subscribe() {
2846
3168
  window.addEventListener("beforeunload", this.processQueueForced, !1), window.addEventListener("pagehide", this.processQueueForced, !1), window.addEventListener("visibilitychange", this.processQueueForced, !1);
2847
3169
  }
2848
3170
  schedule() {
2849
- y(this, oe) && clearTimeout(y(this, oe)), E(this, oe, window.setTimeout(() => this.processQueue(), Lt));
3171
+ k(this, de) && clearTimeout(k(this, de)), v(this, de, window.setTimeout(() => this.processQueue(), Wt));
2850
3172
  }
2851
3173
  send(e) {
2852
- E(this, ne, (/* @__PURE__ */ new Date()).getTime());
3174
+ v(this, ce, (/* @__PURE__ */ new Date()).getTime());
2853
3175
  try {
2854
- navigator.sendBeacon(y(this, ae), JSON.stringify(e));
3176
+ navigator.sendBeacon(k(this, re), JSON.stringify(e));
2855
3177
  } catch {
2856
- fetch(y(this, ae), {
3178
+ fetch(k(this, re), {
2857
3179
  body: JSON.stringify(e),
2858
3180
  method: "POST",
2859
3181
  headers: {
2860
3182
  "Content-Type": "application/json"
2861
3183
  },
2862
3184
  keepalive: !0
2863
- }).catch(Rt);
3185
+ }).catch(zt);
2864
3186
  }
2865
3187
  this.schedule();
2866
3188
  }
2867
3189
  addToQueue(e) {
2868
- y(this, D).push(e), this.processQueue();
3190
+ k(this, W).push(e), this.processQueue();
2869
3191
  }
2870
3192
  processQueue(e = !1) {
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) => ({
3193
+ if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && k(this, W).length < qt && (/* @__PURE__ */ new Date()).getTime() - k(this, ce) < Wt))
3194
+ for (; k(this, W).length; ) {
3195
+ const s = k(this, W).splice(0, qt).map((a) => ({
2874
3196
  ...a,
2875
3197
  sessionID: this.sdkConfig.api.sessionId,
2876
3198
  userID: this.sdkConfig.api.user
2877
3199
  }));
2878
- this.send(i);
3200
+ this.send(s);
2879
3201
  }
2880
3202
  }
2881
- track(e, i) {
3203
+ track(e, s) {
2882
3204
  this.addToQueue({
2883
3205
  eventName: e,
2884
- eventParams: i,
3206
+ eventParams: s,
2885
3207
  eventTimestamp: (/* @__PURE__ */ new Date()).getTime(),
2886
- eventUUID: Jt()
3208
+ eventUUID: ds()
2887
3209
  });
2888
3210
  }
2889
3211
  }
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 {
3212
+ re = new WeakMap(), ce = new WeakMap(), de = new WeakMap(), W = new WeakMap();
3213
+ const Ws = P("LoggingTracker", "color:#000000;font-weight:bold;");
3214
+ class li extends is {
2893
3215
  track(t, e) {
2894
- Li(`@${this.sdkConfig.api.user}`, `[${t}]`, e);
3216
+ Ws(`@${this.sdkConfig.api.user}`, `[${t}]`, e);
2895
3217
  }
2896
3218
  }
2897
3219
  export {
2898
- Ni as BasicPlugin,
2899
- V as CasinoPlugin,
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
3220
+ Xs as BasicPlugin,
3221
+ B as CasinoPlugin,
3222
+ Js as DebuggingPlugin,
3223
+ ni as EveryMatrixPlugin,
3224
+ Ys as GigPlugin,
3225
+ oi as KalambaBullseyeParsers,
3226
+ ri as KalambaBullseyePlugin,
3227
+ ci as KalambaStargazerPlugin,
3228
+ di as KalambaStargazerTracker,
3229
+ li as LoggingTracker,
3230
+ Zs as OryxPlugin,
3231
+ ei as PariplayPlugin,
3232
+ ii as QuantaPlugin,
3233
+ ti as RelaxFEIMPlugin,
3234
+ As as RgsPlugin,
3235
+ ai as SoftSwissPlugin,
3236
+ Ns as TelemetryPlugin,
3237
+ is as Tracker,
3238
+ si as TukoPlugin
2915
3239
  };