@streamlayer/react 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  var Oc = Object.defineProperty;
2
2
  var Ac = (e, t, n) => t in e ? Oc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var d = (e, t, n) => Ac(e, typeof t != "symbol" ? t + "" : t, n);
3
+ var p = (e, t, n) => Ac(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { useState as wc, useEffect as Rc } from "react";
5
5
  function Lc(e) {
6
6
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
7
  }
8
- var No = { exports: {} }, ee = No.exports = {}, Oe, Ae;
8
+ var No = { exports: {} }, te = No.exports = {}, Oe, Ae;
9
9
  function Ra() {
10
10
  throw new Error("setTimeout has not been defined");
11
11
  }
@@ -70,7 +70,7 @@ function Oo() {
70
70
  lt = null, At = !1, Mc(e);
71
71
  }
72
72
  }
73
- ee.nextTick = function(e) {
73
+ te.nextTick = function(e) {
74
74
  var t = new Array(arguments.length - 1);
75
75
  if (arguments.length > 1)
76
76
  for (var n = 1; n < arguments.length; n++)
@@ -83,36 +83,36 @@ function Ao(e, t) {
83
83
  Ao.prototype.run = function() {
84
84
  this.fun.apply(null, this.array);
85
85
  };
86
- ee.title = "browser";
87
- ee.browser = !0;
88
- ee.env = {};
89
- ee.argv = [];
90
- ee.version = "";
91
- ee.versions = {};
86
+ te.title = "browser";
87
+ te.browser = !0;
88
+ te.env = {};
89
+ te.argv = [];
90
+ te.version = "";
91
+ te.versions = {};
92
92
  function $e() {
93
93
  }
94
- ee.on = $e;
95
- ee.addListener = $e;
96
- ee.once = $e;
97
- ee.off = $e;
98
- ee.removeListener = $e;
99
- ee.removeAllListeners = $e;
100
- ee.emit = $e;
101
- ee.prependListener = $e;
102
- ee.prependOnceListener = $e;
103
- ee.listeners = function(e) {
94
+ te.on = $e;
95
+ te.addListener = $e;
96
+ te.once = $e;
97
+ te.off = $e;
98
+ te.removeListener = $e;
99
+ te.removeAllListeners = $e;
100
+ te.emit = $e;
101
+ te.prependListener = $e;
102
+ te.prependOnceListener = $e;
103
+ te.listeners = function(e) {
104
104
  return [];
105
105
  };
106
- ee.binding = function(e) {
106
+ te.binding = function(e) {
107
107
  throw new Error("process.binding is not supported");
108
108
  };
109
- ee.cwd = function() {
109
+ te.cwd = function() {
110
110
  return "/";
111
111
  };
112
- ee.chdir = function(e) {
112
+ te.chdir = function(e) {
113
113
  throw new Error("process.chdir is not supported");
114
114
  };
115
- ee.umask = function() {
115
+ te.umask = function() {
116
116
  return 0;
117
117
  };
118
118
  var Dc = No.exports;
@@ -141,48 +141,48 @@ function Fc(e, t, n) {
141
141
  return e;
142
142
  var l = t.length;
143
143
  if (l === 0) return e;
144
- for (var m = "", u = 1 - s, p = -1, y = e && e.length || 0, T = 0; T < y; ) {
144
+ for (var m = "", u = 1 - s, d = -1, y = e && e.length || 0, T = 0; T < y; ) {
145
145
  if (e.charCodeAt(T) === 37 && T + 1 < y) {
146
- switch (p = p > -1 ? p : 0, e.charCodeAt(T + 1)) {
146
+ switch (d = d > -1 ? d : 0, e.charCodeAt(T + 1)) {
147
147
  case 100:
148
148
  case 102:
149
149
  if (u >= l || t[u] == null) break;
150
- p < T && (m += e.slice(p, T)), m += Number(t[u]), p = T + 2, T++;
150
+ d < T && (m += e.slice(d, T)), m += Number(t[u]), d = T + 2, T++;
151
151
  break;
152
152
  case 105:
153
153
  if (u >= l || t[u] == null) break;
154
- p < T && (m += e.slice(p, T)), m += Math.floor(Number(t[u])), p = T + 2, T++;
154
+ d < T && (m += e.slice(d, T)), m += Math.floor(Number(t[u])), d = T + 2, T++;
155
155
  break;
156
156
  case 79:
157
157
  case 111:
158
158
  case 106:
159
159
  if (u >= l || t[u] === void 0) break;
160
- p < T && (m += e.slice(p, T));
160
+ d < T && (m += e.slice(d, T));
161
161
  var f = typeof t[u];
162
162
  if (f === "string") {
163
- m += "'" + t[u] + "'", p = T + 2, T++;
163
+ m += "'" + t[u] + "'", d = T + 2, T++;
164
164
  break;
165
165
  }
166
166
  if (f === "function") {
167
- m += t[u].name || "<anonymous>", p = T + 2, T++;
167
+ m += t[u].name || "<anonymous>", d = T + 2, T++;
168
168
  break;
169
169
  }
170
- m += a(t[u]), p = T + 2, T++;
170
+ m += a(t[u]), d = T + 2, T++;
171
171
  break;
172
172
  case 115:
173
173
  if (u >= l)
174
174
  break;
175
- p < T && (m += e.slice(p, T)), m += String(t[u]), p = T + 2, T++;
175
+ d < T && (m += e.slice(d, T)), m += String(t[u]), d = T + 2, T++;
176
176
  break;
177
177
  case 37:
178
- p < T && (m += e.slice(p, T)), m += "%", p = T + 2, T++, u--;
178
+ d < T && (m += e.slice(d, T)), m += "%", d = T + 2, T++, u--;
179
179
  break;
180
180
  }
181
181
  ++u;
182
182
  }
183
183
  ++T;
184
184
  }
185
- return p === -1 ? e : (p < y && (m += e.slice(p)), m);
185
+ return d === -1 ? e : (d < y && (m += e.slice(d)), m);
186
186
  }
187
187
  const Gs = Uc;
188
188
  as.exports = Ke;
@@ -242,7 +242,7 @@ function Ke(e) {
242
242
  }), (e.enabled === !1 || e.browser.disabled) && (e.level = "silent");
243
243
  const l = e.level || "info", m = Object.create(n);
244
244
  m.log || (m.log = wt), Vc(m, c, n), Bs({}, m), Object.defineProperty(m, "levelVal", {
245
- get: p
245
+ get: d
246
246
  }), Object.defineProperty(m, "level", {
247
247
  get: y,
248
248
  set: T
@@ -260,7 +260,7 @@ function Ke(e) {
260
260
  m.levels = qc(e), m.level = l, m.setMaxListeners = m.getMaxListeners = m.emit = m.addListener = m.on = m.prependListener = m.once = m.prependOnceListener = m.removeListener = m.removeAllListeners = m.listeners = m.listenerCount = m.eventNames = m.write = m.flush = wt, m.serializers = a, m._serialize = s, m._stdErrSerialize = r, m.child = function(..._) {
261
261
  return f.call(this, u, ..._);
262
262
  }, t && (m._logEvent = Pa());
263
- function p() {
263
+ function d() {
264
264
  return An(this.level, this);
265
265
  }
266
266
  function y() {
@@ -363,13 +363,13 @@ function jc(e, t, n, a) {
363
363
  for (var m = 0; m < c.length; m++) c[m] = arguments[m];
364
364
  var u = !1;
365
365
  if (t.serialize && (rs(c, this._serialize, this.serializers, this._stdErrSerialize), u = !0), t.asObject || t.formatters ? s.call(l, Kc(this, a, c, o, t)) : s.apply(l, c), t.transmit) {
366
- const p = t.transmit.level || e._level, y = n.levels.values[p], T = n.levels.values[a];
366
+ const d = t.transmit.level || e._level, y = n.levels.values[d], T = n.levels.values[a];
367
367
  if (T < y) return;
368
368
  $c(this, {
369
369
  ts: o,
370
370
  methodLevel: a,
371
371
  methodValue: T,
372
- transmitLevel: p,
372
+ transmitLevel: d,
373
373
  transmitValue: n.levels.values[t.transmit.level || e._level],
374
374
  send: t.transmit.send,
375
375
  val: An(e._level, n)
@@ -475,7 +475,7 @@ function Xc() {
475
475
  }
476
476
  as.exports.default = Ke;
477
477
  var Zc = as.exports.pino = Ke;
478
- function J(e, t) {
478
+ function X(e, t) {
479
479
  if (!e)
480
480
  throw new Error(t);
481
481
  }
@@ -501,7 +501,7 @@ function Lo(e) {
501
501
  const Mo = Symbol("@bufbuild/protobuf/enum-type");
502
502
  function rl(e) {
503
503
  const t = e[Mo];
504
- return J(t, "missing enum type on enum object"), t;
504
+ return X(t, "missing enum type on enum object"), t;
505
505
  }
506
506
  function Po(e, t, n, a) {
507
507
  e[Mo] = Do(t, n.map((s) => ({
@@ -803,7 +803,7 @@ function dl() {
803
803
  }
804
804
  };
805
805
  }
806
- const n = (s) => J(/^-?[0-9]+$/.test(s), `int64 invalid: ${s}`), a = (s) => J(/^[0-9]+$/.test(s), `uint64 invalid: ${s}`);
806
+ const n = (s) => X(/^-?[0-9]+$/.test(s), `int64 invalid: ${s}`), a = (s) => X(/^[0-9]+$/.test(s), `uint64 invalid: ${s}`);
807
807
  return {
808
808
  zero: "0",
809
809
  supported: !1,
@@ -890,10 +890,10 @@ function Go(e, t) {
890
890
  return t == 0;
891
891
  }
892
892
  }
893
- var Z;
893
+ var ee;
894
894
  (function(e) {
895
895
  e[e.Varint = 0] = "Varint", e[e.Bit64 = 1] = "Bit64", e[e.LengthDelimited = 2] = "LengthDelimited", e[e.StartGroup = 3] = "StartGroup", e[e.EndGroup = 4] = "EndGroup", e[e.Bit32 = 5] = "Bit32";
896
- })(Z || (Z = {}));
896
+ })(ee || (ee = {}));
897
897
  class pl {
898
898
  constructor(t) {
899
899
  this.stack = [], this.textEncoder = t ?? new TextEncoder(), this.chunks = [], this.buf = [];
@@ -1074,23 +1074,23 @@ class Tl {
1074
1074
  skip(t, n) {
1075
1075
  let a = this.pos;
1076
1076
  switch (t) {
1077
- case Z.Varint:
1077
+ case ee.Varint:
1078
1078
  for (; this.buf[this.pos++] & 128; )
1079
1079
  ;
1080
1080
  break;
1081
- case Z.Bit64:
1081
+ case ee.Bit64:
1082
1082
  this.pos += 4;
1083
- case Z.Bit32:
1083
+ case ee.Bit32:
1084
1084
  this.pos += 4;
1085
1085
  break;
1086
- case Z.LengthDelimited:
1086
+ case ee.LengthDelimited:
1087
1087
  let s = this.uint32();
1088
1088
  this.pos += s;
1089
1089
  break;
1090
- case Z.StartGroup:
1090
+ case ee.StartGroup:
1091
1091
  for (; ; ) {
1092
1092
  const [r, o] = this.tag();
1093
- if (o === Z.EndGroup) {
1093
+ if (o === ee.EndGroup) {
1094
1094
  if (n !== void 0 && r !== n)
1095
1095
  throw new Error("invalid end group tag");
1096
1096
  break;
@@ -1340,8 +1340,8 @@ function hl(e, t, n, a) {
1340
1340
  !c.opt && !c.repeated && (c.kind == "enum" || c.kind == "scalar") && (c = Object.assign(Object.assign({}, t.field), { opt: !0 })), t.runtime.bin.writeField(c, n, o, r);
1341
1341
  const l = s.readerFactory(o.finish());
1342
1342
  for (; l.pos < l.len; ) {
1343
- const [m, u] = l.tag(), p = l.skip(u, m);
1344
- e.getType().runtime.bin.onUnknownField(e, m, u, p);
1343
+ const [m, u] = l.tag(), d = l.skip(u, m);
1344
+ e.getType().runtime.bin.onUnknownField(e, m, u, d);
1345
1345
  }
1346
1346
  }
1347
1347
  function Vo(e, t) {
@@ -1349,7 +1349,7 @@ function Vo(e, t) {
1349
1349
  return t.extendee.typeName === n.typeName && !!n.runtime.bin.listUnknownFields(e).find((a) => a.no == t.field.no);
1350
1350
  }
1351
1351
  function xo(e, t) {
1352
- J(e.extendee.typeName == t.getType().typeName, `extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`);
1352
+ X(e.extendee.typeName == t.getType().typeName, `extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`);
1353
1353
  }
1354
1354
  function qo(e, t) {
1355
1355
  const n = e.localName;
@@ -1441,8 +1441,8 @@ function El() {
1441
1441
  const u = r.findExtension(o.substring(1, o.length - 1));
1442
1442
  if (u && u.extendee.typeName == e.typeName) {
1443
1443
  m = !0;
1444
- const [p, y] = Bo(u);
1445
- Ks(p, c, u.field, n, u), hl(a, u, y(), n);
1444
+ const [d, y] = Bo(u);
1445
+ Ks(d, c, u.field, n, u), hl(a, u, y(), n);
1446
1446
  }
1447
1447
  }
1448
1448
  if (!m && !n.ignoreUnknownFields)
@@ -1505,7 +1505,7 @@ function we(e) {
1505
1505
  function Ks(e, t, n, a, s) {
1506
1506
  let r = n.localName;
1507
1507
  if (n.repeated) {
1508
- if (J(n.kind != "map"), t === null)
1508
+ if (X(n.kind != "map"), t === null)
1509
1509
  return;
1510
1510
  if (!Array.isArray(t))
1511
1511
  throw new Error(`cannot decode field ${s.typeName}.${n.name} from JSON: ${we(t)}`);
@@ -1544,8 +1544,8 @@ function Ks(e, t, n, a, s) {
1544
1544
  try {
1545
1545
  m = bl(n.K, c);
1546
1546
  } catch (u) {
1547
- let p = `cannot decode map key for field ${s.typeName}.${n.name} from JSON: ${we(t)}`;
1548
- throw u instanceof Error && u.message.length > 0 && (p += `: ${u.message}`), new Error(p);
1547
+ let d = `cannot decode map key for field ${s.typeName}.${n.name} from JSON: ${we(t)}`;
1548
+ throw u instanceof Error && u.message.length > 0 && (d += `: ${u.message}`), new Error(d);
1549
1549
  }
1550
1550
  switch (n.V.kind) {
1551
1551
  case "message":
@@ -1558,9 +1558,9 @@ function Ks(e, t, n, a, s) {
1558
1558
  case "scalar":
1559
1559
  try {
1560
1560
  o[m] = Kt(n.V.T, l, tt.BIGINT, !0);
1561
- } catch (p) {
1561
+ } catch (d) {
1562
1562
  let y = `cannot decode map value for field ${s.typeName}.${n.name} from JSON: ${we(t)}`;
1563
- throw p instanceof Error && p.message.length > 0 && (y += `: ${p.message}`), new Error(y);
1563
+ throw d instanceof Error && d.message.length > 0 && (y += `: ${d.message}`), new Error(y);
1564
1564
  }
1565
1565
  break;
1566
1566
  }
@@ -1702,7 +1702,7 @@ function Il(e) {
1702
1702
  }
1703
1703
  function $s(e, t, n) {
1704
1704
  if (e.kind == "map") {
1705
- J(typeof t == "object" && t != null);
1705
+ X(typeof t == "object" && t != null);
1706
1706
  const a = {}, s = Object.entries(t);
1707
1707
  switch (e.V.kind) {
1708
1708
  case "scalar":
@@ -1722,7 +1722,7 @@ function $s(e, t, n) {
1722
1722
  return n.emitDefaultValues || s.length > 0 ? a : void 0;
1723
1723
  }
1724
1724
  if (e.repeated) {
1725
- J(Array.isArray(t));
1725
+ X(Array.isArray(t));
1726
1726
  const a = [];
1727
1727
  switch (e.kind) {
1728
1728
  case "scalar":
@@ -1751,7 +1751,7 @@ function $s(e, t, n) {
1751
1751
  }
1752
1752
  function sa(e, t, n) {
1753
1753
  var a;
1754
- if (J(typeof t == "number"), e.typeName == "google.protobuf.NullValue")
1754
+ if (X(typeof t == "number"), e.typeName == "google.protobuf.NullValue")
1755
1755
  return null;
1756
1756
  if (n)
1757
1757
  return t;
@@ -1765,22 +1765,22 @@ function hn(e, t) {
1765
1765
  case h.SINT32:
1766
1766
  case h.FIXED32:
1767
1767
  case h.UINT32:
1768
- return J(typeof t == "number"), t;
1768
+ return X(typeof t == "number"), t;
1769
1769
  case h.FLOAT:
1770
1770
  case h.DOUBLE:
1771
- return J(typeof t == "number"), Number.isNaN(t) ? "NaN" : t === Number.POSITIVE_INFINITY ? "Infinity" : t === Number.NEGATIVE_INFINITY ? "-Infinity" : t;
1771
+ return X(typeof t == "number"), Number.isNaN(t) ? "NaN" : t === Number.POSITIVE_INFINITY ? "Infinity" : t === Number.NEGATIVE_INFINITY ? "-Infinity" : t;
1772
1772
  case h.STRING:
1773
- return J(typeof t == "string"), t;
1773
+ return X(typeof t == "string"), t;
1774
1774
  case h.BOOL:
1775
- return J(typeof t == "boolean"), t;
1775
+ return X(typeof t == "boolean"), t;
1776
1776
  case h.UINT64:
1777
1777
  case h.FIXED64:
1778
1778
  case h.INT64:
1779
1779
  case h.SFIXED64:
1780
1780
  case h.SINT64:
1781
- return J(typeof t == "bigint" || typeof t == "string" || typeof t == "number"), t.toString();
1781
+ return X(typeof t == "bigint" || typeof t == "string" || typeof t == "number"), t.toString();
1782
1782
  case h.BYTES:
1783
- return J(t instanceof Uint8Array), is.enc(t);
1783
+ return X(t instanceof Uint8Array), is.enc(t);
1784
1784
  }
1785
1785
  }
1786
1786
  const _t = Symbol("@bufbuild/protobuf/unknown-fields"), Ws = {
@@ -1820,7 +1820,7 @@ function Ol() {
1820
1820
  readMessage(e, t, n, a, s) {
1821
1821
  const r = e.getType(), o = s ? t.len : t.pos + n;
1822
1822
  let c, l;
1823
- for (; t.pos < o && ([c, l] = t.tag(), !(s === !0 && l == Z.EndGroup)); ) {
1823
+ for (; t.pos < o && ([c, l] = t.tag(), !(s === !0 && l == ee.EndGroup)); ) {
1824
1824
  const m = r.fields.find(c);
1825
1825
  if (!m) {
1826
1826
  const u = t.skip(l, c);
@@ -1830,7 +1830,7 @@ function Ol() {
1830
1830
  Js(e, t, m, l, a);
1831
1831
  }
1832
1832
  if (s && // eslint-disable-line @typescript-eslint/strict-boolean-expressions
1833
- (l != Z.EndGroup || c !== n))
1833
+ (l != ee.EndGroup || c !== n))
1834
1834
  throw new Error("invalid end group tag");
1835
1835
  },
1836
1836
  readField: Js,
@@ -1861,7 +1861,7 @@ function Js(e, t, n, a, s) {
1861
1861
  let l = Rn;
1862
1862
  if (n.kind == "scalar" && n.L > 0 && (l = wl), r) {
1863
1863
  let y = e[o];
1864
- if (a == Z.LengthDelimited && c != h.STRING && c != h.BYTES) {
1864
+ if (a == ee.LengthDelimited && c != h.STRING && c != h.BYTES) {
1865
1865
  let f = t.uint32() + t.pos;
1866
1866
  for (; t.pos < f; )
1867
1867
  y.push(l(t, c));
@@ -1875,8 +1875,8 @@ function Js(e, t, n, a, s) {
1875
1875
  r ? e[o].push(Sn(t, new m(), s, n)) : dt(e[o]) ? Sn(t, e[o], s, n) : (e[o] = Sn(t, new m(), s, n), m.fieldWrapper && !n.oneof && !n.repeated && (e[o] = m.fieldWrapper.unwrapField(e[o])));
1876
1876
  break;
1877
1877
  case "map":
1878
- let [u, p] = Al(n, t, s);
1879
- e[o][u] = p;
1878
+ let [u, d] = Al(n, t, s);
1879
+ e[o][u] = d;
1880
1880
  break;
1881
1881
  }
1882
1882
  }
@@ -1968,14 +1968,14 @@ function Rn(e, t) {
1968
1968
  }
1969
1969
  }
1970
1970
  function Xs(e, t, n, a) {
1971
- J(t !== void 0);
1971
+ X(t !== void 0);
1972
1972
  const s = e.repeated;
1973
1973
  switch (e.kind) {
1974
1974
  case "scalar":
1975
1975
  case "enum":
1976
1976
  let r = e.kind == "enum" ? h.INT32 : e.T;
1977
1977
  if (s)
1978
- if (J(Array.isArray(t)), e.packed)
1978
+ if (X(Array.isArray(t)), e.packed)
1979
1979
  Ll(n, r, e.no, t);
1980
1980
  else
1981
1981
  for (const o of t)
@@ -1985,21 +1985,21 @@ function Xs(e, t, n, a) {
1985
1985
  break;
1986
1986
  case "message":
1987
1987
  if (s) {
1988
- J(Array.isArray(t));
1988
+ X(Array.isArray(t));
1989
1989
  for (const o of t)
1990
1990
  Zs(n, a, e, o);
1991
1991
  } else
1992
1992
  Zs(n, a, e, t);
1993
1993
  break;
1994
1994
  case "map":
1995
- J(typeof t == "object" && t != null);
1995
+ X(typeof t == "object" && t != null);
1996
1996
  for (const [o, c] of Object.entries(t))
1997
1997
  Rl(n, a, e, o, c);
1998
1998
  break;
1999
1999
  }
2000
2000
  }
2001
2001
  function Rl(e, t, n, a, s) {
2002
- e.tag(n.no, Z.LengthDelimited), e.fork();
2002
+ e.tag(n.no, ee.LengthDelimited), e.fork();
2003
2003
  let r = a;
2004
2004
  switch (n.K) {
2005
2005
  case h.INT32:
@@ -2010,7 +2010,7 @@ function Rl(e, t, n, a, s) {
2010
2010
  r = Number.parseInt(a);
2011
2011
  break;
2012
2012
  case h.BOOL:
2013
- J(a == "true" || a == "false"), r = a == "true";
2013
+ X(a == "true" || a == "false"), r = a == "true";
2014
2014
  break;
2015
2015
  }
2016
2016
  switch ($t(e, n.K, 1, r), n.V.kind) {
@@ -2021,45 +2021,45 @@ function Rl(e, t, n, a, s) {
2021
2021
  $t(e, h.INT32, 2, s);
2022
2022
  break;
2023
2023
  case "message":
2024
- J(s !== void 0), e.tag(2, Z.LengthDelimited).bytes(s.toBinary(t));
2024
+ X(s !== void 0), e.tag(2, ee.LengthDelimited).bytes(s.toBinary(t));
2025
2025
  break;
2026
2026
  }
2027
2027
  e.join();
2028
2028
  }
2029
2029
  function Zs(e, t, n, a) {
2030
2030
  const s = Ho(n.T, a);
2031
- n.delimited ? e.tag(n.no, Z.StartGroup).raw(s.toBinary(t)).tag(n.no, Z.EndGroup) : e.tag(n.no, Z.LengthDelimited).bytes(s.toBinary(t));
2031
+ n.delimited ? e.tag(n.no, ee.StartGroup).raw(s.toBinary(t)).tag(n.no, ee.EndGroup) : e.tag(n.no, ee.LengthDelimited).bytes(s.toBinary(t));
2032
2032
  }
2033
2033
  function $t(e, t, n, a) {
2034
- J(a !== void 0);
2034
+ X(a !== void 0);
2035
2035
  let [s, r] = Qo(t);
2036
2036
  e.tag(n, s)[r](a);
2037
2037
  }
2038
2038
  function Ll(e, t, n, a) {
2039
2039
  if (!a.length)
2040
2040
  return;
2041
- e.tag(n, Z.LengthDelimited).fork();
2041
+ e.tag(n, ee.LengthDelimited).fork();
2042
2042
  let [, s] = Qo(t);
2043
2043
  for (let r = 0; r < a.length; r++)
2044
2044
  e[s](a[r]);
2045
2045
  e.join();
2046
2046
  }
2047
2047
  function Qo(e) {
2048
- let t = Z.Varint;
2048
+ let t = ee.Varint;
2049
2049
  switch (e) {
2050
2050
  case h.BYTES:
2051
2051
  case h.STRING:
2052
- t = Z.LengthDelimited;
2052
+ t = ee.LengthDelimited;
2053
2053
  break;
2054
2054
  case h.DOUBLE:
2055
2055
  case h.FIXED64:
2056
2056
  case h.SFIXED64:
2057
- t = Z.Bit64;
2057
+ t = ee.Bit64;
2058
2058
  break;
2059
2059
  case h.FIXED32:
2060
2060
  case h.SFIXED32:
2061
2061
  case h.FLOAT:
2062
- t = Z.Bit32;
2062
+ t = ee.Bit32;
2063
2063
  break;
2064
2064
  }
2065
2065
  const n = h[e].toLowerCase();
@@ -2109,12 +2109,12 @@ function Ml() {
2109
2109
  }
2110
2110
  break;
2111
2111
  case "message":
2112
- const p = a.T;
2112
+ const d = a.T;
2113
2113
  if (a.repeated)
2114
- r[s] = o[s].map((y) => dt(y, p) ? y : new p(y));
2114
+ r[s] = o[s].map((y) => dt(y, d) ? y : new d(y));
2115
2115
  else {
2116
2116
  const y = o[s];
2117
- p.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ p.typeName === "google.protobuf.BytesValue" ? r[s] = Ht(y) : r[s] = y : r[s] = dt(y, p) ? y : new p(y);
2117
+ d.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ d.typeName === "google.protobuf.BytesValue" ? r[s] = Ht(y) : r[s] = y : r[s] = dt(y, d) ? y : new d(y);
2118
2118
  }
2119
2119
  break;
2120
2120
  }
@@ -2330,7 +2330,7 @@ class xl {
2330
2330
  this.kind = "oneof", this.repeated = !1, this.packed = !1, this.opt = !1, this.req = !1, this.default = void 0, this.fields = [], this.name = t, this.localName = Cl(t);
2331
2331
  }
2332
2332
  addField(t) {
2333
- J(t.oneof === this, `field ${t.name} not one of ${this.name}`), this.fields.push(t);
2333
+ X(t.oneof === this, `field ${t.name} not one of ${this.name}`), this.fields.push(t);
2334
2334
  }
2335
2335
  findField(t) {
2336
2336
  if (!this._lookup) {
@@ -2346,12 +2346,12 @@ function ql(e, t) {
2346
2346
  const l = [];
2347
2347
  let m;
2348
2348
  for (const u of typeof e == "function" ? e() : e) {
2349
- const p = u;
2350
- if (p.localName = Yo(u.name, u.oneof !== void 0), p.jsonName = (n = u.jsonName) !== null && n !== void 0 ? n : Ul(u.name), p.repeated = (a = u.repeated) !== null && a !== void 0 ? a : !1, u.kind == "scalar" && (p.L = (s = u.L) !== null && s !== void 0 ? s : tt.BIGINT), p.delimited = (r = u.delimited) !== null && r !== void 0 ? r : !1, p.req = (o = u.req) !== null && o !== void 0 ? o : !1, p.opt = (c = u.opt) !== null && c !== void 0 ? c : !1, u.packed === void 0 && (p.packed = u.kind == "enum" || u.kind == "scalar" && u.T != h.BYTES && u.T != h.STRING), u.oneof !== void 0) {
2349
+ const d = u;
2350
+ if (d.localName = Yo(u.name, u.oneof !== void 0), d.jsonName = (n = u.jsonName) !== null && n !== void 0 ? n : Ul(u.name), d.repeated = (a = u.repeated) !== null && a !== void 0 ? a : !1, u.kind == "scalar" && (d.L = (s = u.L) !== null && s !== void 0 ? s : tt.BIGINT), d.delimited = (r = u.delimited) !== null && r !== void 0 ? r : !1, d.req = (o = u.req) !== null && o !== void 0 ? o : !1, d.opt = (c = u.opt) !== null && c !== void 0 ? c : !1, u.packed === void 0 && (d.packed = u.kind == "enum" || u.kind == "scalar" && u.T != h.BYTES && u.T != h.STRING), u.oneof !== void 0) {
2351
2351
  const y = typeof u.oneof == "string" ? u.oneof : u.oneof.name;
2352
- (!m || m.name != y) && (m = new xl(y)), p.oneof = m, m.addField(p);
2352
+ (!m || m.name != y) && (m = new xl(y)), d.oneof = m, m.addField(d);
2353
2353
  }
2354
- l.push(p);
2354
+ l.push(d);
2355
2355
  }
2356
2356
  return l;
2357
2357
  }
@@ -5668,7 +5668,7 @@ const Hl = /* @__PURE__ */ i.makeEnum(
5668
5668
  { no: 2, name: "notifications", kind: "message", T: fd },
5669
5669
  { no: 3, name: "sponsorships", kind: "message", T: kd }
5670
5670
  ]
5671
- ), Y = /* @__PURE__ */ i.makeEnum(
5671
+ ), j = /* @__PURE__ */ i.makeEnum(
5672
5672
  "streamlayer.sdkSettings.SdkOverlayType",
5673
5673
  [
5674
5674
  { no: 0, name: "SDK_OVERLAY_TYPE_UNSET", localName: "UNSET" },
@@ -6160,7 +6160,7 @@ const Hl = /* @__PURE__ */ i.makeEnum(
6160
6160
  ), di = /* @__PURE__ */ i.makeMessageType(
6161
6161
  "streamlayer.sdkSettings.SdkOverlay",
6162
6162
  () => [
6163
- { no: 1, name: "type", kind: "enum", T: i.getEnumType(Y) },
6163
+ { no: 1, name: "type", kind: "enum", T: i.getEnumType(j) },
6164
6164
  {
6165
6165
  no: 3,
6166
6166
  name: "position",
@@ -6296,7 +6296,7 @@ const Hl = /* @__PURE__ */ i.makeEnum(
6296
6296
  ), Vd = /* @__PURE__ */ i.makeMessageType(
6297
6297
  "streamlayer.sdkSettings.AdvertisingOverlaySettings",
6298
6298
  () => [
6299
- { no: 1, name: "overlay_type", kind: "enum", T: i.getEnumType(Y) },
6299
+ { no: 1, name: "overlay_type", kind: "enum", T: i.getEnumType(j) },
6300
6300
  { no: 2, name: "settings", kind: "map", K: 9, V: { kind: "message", T: Bd } },
6301
6301
  {
6302
6302
  no: 3,
@@ -6456,13 +6456,13 @@ let gs = (e, t, n, a) => (e.events = e.events || {}, e.events[n + dn] || (e.even
6456
6456
  Array.isArray(e) || (e = [e]);
6457
6457
  let a, s = 0, r = () => {
6458
6458
  let m = e.map((u) => u.get());
6459
- if (a === void 0 || m.some((u, p) => u !== a[p])) {
6459
+ if (a === void 0 || m.some((u, d) => u !== a[d])) {
6460
6460
  let u = ++s;
6461
6461
  a = m;
6462
- let p = t(...m);
6463
- p && p.then && p.t ? p.then((y) => {
6462
+ let d = t(...m);
6463
+ d && d.then && d.t ? d.then((y) => {
6464
6464
  u === s && o.set(y);
6465
- }) : o.set(p);
6465
+ }) : o.set(d);
6466
6466
  }
6467
6467
  }, o = at(void 0, Math.max(...e.map((m) => m.l)) + 1), c, l = n ? () => {
6468
6468
  clearTimeout(c), c = setTimeout(r);
@@ -6491,7 +6491,7 @@ function or(e) {
6491
6491
  const t = P[e];
6492
6492
  return typeof t != "string" ? e.toString() : t[0].toLowerCase() + t.substring(1).replace(/[A-Z]/g, (n) => "_" + n.toLowerCase());
6493
6493
  }
6494
- class H extends Error {
6494
+ class Q extends Error {
6495
6495
  /**
6496
6496
  * Create a new ConnectError.
6497
6497
  * If no code is provided, code "unknown" is used.
@@ -6515,10 +6515,10 @@ class H extends Error {
6515
6515
  * ConnectError.
6516
6516
  */
6517
6517
  static from(t, n = P.Unknown) {
6518
- return t instanceof H ? t : t instanceof Error ? t.name == "AbortError" ? new H(t.message, P.Canceled) : new H(t.message, n, void 0, void 0, t) : new H(String(t), n, void 0, void 0, t);
6518
+ return t instanceof Q ? t : t instanceof Error ? t.name == "AbortError" ? new Q(t.message, P.Canceled) : new Q(t.message, n, void 0, void 0, t) : new Q(String(t), n, void 0, void 0, t);
6519
6519
  }
6520
6520
  static [Symbol.hasInstance](t) {
6521
- return t instanceof Error ? Object.getPrototypeOf(t) === H.prototype ? !0 : t.name === "ConnectError" && "code" in t && typeof t.code == "number" && "metadata" in t && "details" in t && Array.isArray(t.details) && "rawMessage" in t && typeof t.rawMessage == "string" && "cause" in t : !1;
6521
+ return t instanceof Error ? Object.getPrototypeOf(t) === Q.prototype ? !0 : t.name === "ConnectError" && "code" in t && typeof t.code == "number" && "metadata" in t && "details" in t && Array.isArray(t.details) && "rawMessage" in t && typeof t.rawMessage == "string" && "cause" in t : !1;
6522
6522
  }
6523
6523
  findDetails(t) {
6524
6524
  const n = "typeName" in t ? {
@@ -6547,7 +6547,7 @@ function Jd(e, t, n) {
6547
6547
  const a = is.dec(e);
6548
6548
  return t ? t.fromBinary(a, n) : a;
6549
6549
  } catch (a) {
6550
- throw H.from(a, P.DataLoss);
6550
+ throw Q.from(a, P.DataLoss);
6551
6551
  }
6552
6552
  }
6553
6553
  function Xd(e, t) {
@@ -6593,7 +6593,7 @@ function cr(e) {
6593
6593
  s.close();
6594
6594
  return;
6595
6595
  }
6596
- s.error(new H("premature end of stream", P.DataLoss));
6596
+ s.error(new Q("premature end of stream", P.DataLoss));
6597
6597
  return;
6598
6598
  }
6599
6599
  const o = n.subarray(5, 5 + r.length);
@@ -6638,7 +6638,7 @@ var Zd = function(e) {
6638
6638
  }, s;
6639
6639
  function o(T) {
6640
6640
  return function(f) {
6641
- return Promise.resolve(f).then(T, p);
6641
+ return Promise.resolve(f).then(T, d);
6642
6642
  };
6643
6643
  }
6644
6644
  function c(T, f) {
@@ -6656,12 +6656,12 @@ var Zd = function(e) {
6656
6656
  }
6657
6657
  }
6658
6658
  function m(T) {
6659
- T.value instanceof Zt ? Promise.resolve(T.value.v).then(u, p) : y(r[0][2], T);
6659
+ T.value instanceof Zt ? Promise.resolve(T.value.v).then(u, d) : y(r[0][2], T);
6660
6660
  }
6661
6661
  function u(T) {
6662
6662
  l("next", T);
6663
6663
  }
6664
- function p(T) {
6664
+ function d(T) {
6665
6665
  l("throw", T);
6666
6666
  }
6667
6667
  function y(T, f) {
@@ -6725,7 +6725,7 @@ var Ti = function(e) {
6725
6725
  }, s;
6726
6726
  function o(T) {
6727
6727
  return function(f) {
6728
- return Promise.resolve(f).then(T, p);
6728
+ return Promise.resolve(f).then(T, d);
6729
6729
  };
6730
6730
  }
6731
6731
  function c(T, f) {
@@ -6743,12 +6743,12 @@ var Ti = function(e) {
6743
6743
  }
6744
6744
  }
6745
6745
  function m(T) {
6746
- T.value instanceof Dt ? Promise.resolve(T.value.v).then(u, p) : y(r[0][2], T);
6746
+ T.value instanceof Dt ? Promise.resolve(T.value.v).then(u, d) : y(r[0][2], T);
6747
6747
  }
6748
6748
  function u(T) {
6749
6749
  l("next", T);
6750
6750
  }
6751
- function p(T) {
6751
+ function d(T) {
6752
6752
  l("throw", T);
6753
6753
  }
6754
6754
  function y(T, f) {
@@ -6786,11 +6786,11 @@ function op(e, t, n) {
6786
6786
  function ip(e, t, n) {
6787
6787
  return async function(a, s) {
6788
6788
  var r, o, c, l, m, u;
6789
- const p = await e.stream(t, n, s == null ? void 0 : s.signal, s == null ? void 0 : s.timeoutMs, s == null ? void 0 : s.headers, a, s == null ? void 0 : s.contextValues);
6790
- (m = s == null ? void 0 : s.onHeader) === null || m === void 0 || m.call(s, p.header);
6789
+ const d = await e.stream(t, n, s == null ? void 0 : s.signal, s == null ? void 0 : s.timeoutMs, s == null ? void 0 : s.headers, a, s == null ? void 0 : s.contextValues);
6790
+ (m = s == null ? void 0 : s.onHeader) === null || m === void 0 || m.call(s, d.header);
6791
6791
  let y, T = 0;
6792
6792
  try {
6793
- for (var f = !0, _ = Ti(p.message), I; I = await _.next(), r = I.done, !r; f = !0)
6793
+ for (var f = !0, _ = Ti(d.message), I; I = await _.next(), r = I.done, !r; f = !0)
6794
6794
  l = I.value, f = !1, y = l, T++;
6795
6795
  } catch (b) {
6796
6796
  o = { error: b };
@@ -6802,10 +6802,10 @@ function ip(e, t, n) {
6802
6802
  }
6803
6803
  }
6804
6804
  if (!y)
6805
- throw new H("protocol error: missing response message", P.Unimplemented);
6805
+ throw new Q("protocol error: missing response message", P.Unimplemented);
6806
6806
  if (T > 1)
6807
- throw new H("protocol error: received extra messages for client streaming method", P.Unimplemented);
6808
- return (u = s == null ? void 0 : s.onTrailer) === null || u === void 0 || u.call(s, p.trailer), y;
6807
+ throw new Q("protocol error: received extra messages for client streaming method", P.Unimplemented);
6808
+ return (u = s == null ? void 0 : s.onTrailer) === null || u === void 0 || u.call(s, d.trailer), y;
6809
6809
  };
6810
6810
  }
6811
6811
  function cp(e, t, n) {
@@ -6845,7 +6845,7 @@ function lp(...e) {
6845
6845
  }
6846
6846
  function mp(e) {
6847
6847
  const t = new AbortController(), n = () => {
6848
- t.abort(new H("the operation timed out", P.DeadlineExceeded));
6848
+ t.abort(new Q("the operation timed out", P.DeadlineExceeded));
6849
6849
  };
6850
6850
  let a;
6851
6851
  return e !== void 0 && (e <= 0 ? n() : a = setTimeout(n, e)), {
@@ -6937,7 +6937,7 @@ function ki(e) {
6937
6937
  const s = Jd(n, Ye);
6938
6938
  if (s.code == 0)
6939
6939
  return;
6940
- const r = new H(s.message, s.code, e);
6940
+ const r = new Q(s.message, s.code, e);
6941
6941
  return r.details = s.details.map((o) => ({
6942
6942
  type: o.typeUrl.substring(o.typeUrl.lastIndexOf("/") + 1),
6943
6943
  value: o.value
@@ -6948,7 +6948,7 @@ function ki(e) {
6948
6948
  if (a === kp)
6949
6949
  return;
6950
6950
  const s = parseInt(a, 10);
6951
- return s in P ? new H(decodeURIComponent((t = e.get(fi)) !== null && t !== void 0 ? t : ""), s, e) : new H(`invalid grpc-status: ${a}`, P.Internal, e);
6951
+ return s in P ? new Q(decodeURIComponent((t = e.get(fi)) !== null && t !== void 0 ? t : ""), s, e) : new Q(`invalid grpc-status: ${a}`, P.Internal, e);
6952
6952
  }
6953
6953
  }
6954
6954
  function pr(e, t, n) {
@@ -6998,7 +6998,7 @@ function yr(e, t) {
6998
6998
  return e.fromBinary(n, t);
6999
6999
  } catch (a) {
7000
7000
  const s = a instanceof Error ? a.message : String(a);
7001
- throw new H(`parse binary: ${s}`, P.Internal);
7001
+ throw new Q(`parse binary: ${s}`, P.Internal);
7002
7002
  }
7003
7003
  },
7004
7004
  serialize(n) {
@@ -7006,7 +7006,7 @@ function yr(e, t) {
7006
7006
  return n.toBinary(t);
7007
7007
  } catch (a) {
7008
7008
  const s = a instanceof Error ? a.message : String(a);
7009
- throw new H(`serialize binary: ${s}`, P.Internal);
7009
+ throw new Q(`serialize binary: ${s}`, P.Internal);
7010
7010
  }
7011
7011
  }
7012
7012
  };
@@ -7020,7 +7020,7 @@ function gr(e, t) {
7020
7020
  const l = r.decode(c);
7021
7021
  return e.fromJsonString(l, o);
7022
7022
  } catch (l) {
7023
- throw H.from(l, P.InvalidArgument);
7023
+ throw Q.from(l, P.InvalidArgument);
7024
7024
  }
7025
7025
  },
7026
7026
  serialize(c) {
@@ -7028,7 +7028,7 @@ function gr(e, t) {
7028
7028
  const l = c.toJsonString(o);
7029
7029
  return s.encode(l);
7030
7030
  } catch (l) {
7031
- throw H.from(l, P.Internal);
7031
+ throw Q.from(l, P.Internal);
7032
7032
  }
7033
7033
  }
7034
7034
  };
@@ -7063,7 +7063,7 @@ function _i(e) {
7063
7063
  return [
7064
7064
  a.signal,
7065
7065
  function(r) {
7066
- const o = H.from(t.aborted ? gi(t) : r);
7066
+ const o = Q.from(t.aborted ? gi(t) : r);
7067
7067
  return a.abort(o), n(), Promise.reject(o);
7068
7068
  },
7069
7069
  function() {
@@ -7085,7 +7085,7 @@ function fr(e, t) {
7085
7085
  n.metadata.append(s, a);
7086
7086
  }), n;
7087
7087
  if (!t.has(Ct) && !e.has(Ct))
7088
- throw new H("protocol error: missing status", P.Internal);
7088
+ throw new Q("protocol error: missing status", P.Internal);
7089
7089
  }
7090
7090
  function kr(e, t, n, a) {
7091
7091
  const s = new Headers(n ?? {});
@@ -7120,7 +7120,7 @@ function hr(e, t) {
7120
7120
  foundStatus: t.has(Ct),
7121
7121
  headerError: ki(t)
7122
7122
  };
7123
- throw new H(decodeURIComponent((n = t.get(fi)) !== null && n !== void 0 ? n : `HTTP ${e}`), Ip(e), t);
7123
+ throw new Q(decodeURIComponent((n = t.get(fi)) !== null && n !== void 0 ? n : `HTTP ${e}`), Ip(e), t);
7124
7124
  }
7125
7125
  var mt = function(e) {
7126
7126
  return this instanceof mt ? (this.v = e, this) : new mt(e);
@@ -7132,7 +7132,7 @@ var mt = function(e) {
7132
7132
  }, s;
7133
7133
  function o(T) {
7134
7134
  return function(f) {
7135
- return Promise.resolve(f).then(T, p);
7135
+ return Promise.resolve(f).then(T, d);
7136
7136
  };
7137
7137
  }
7138
7138
  function c(T, f) {
@@ -7150,12 +7150,12 @@ var mt = function(e) {
7150
7150
  }
7151
7151
  }
7152
7152
  function m(T) {
7153
- T.value instanceof mt ? Promise.resolve(T.value.v).then(u, p) : y(r[0][2], T);
7153
+ T.value instanceof mt ? Promise.resolve(T.value.v).then(u, d) : y(r[0][2], T);
7154
7154
  }
7155
7155
  function u(T) {
7156
7156
  l("next", T);
7157
7157
  }
7158
- function p(T) {
7158
+ function d(T) {
7159
7159
  l("throw", T);
7160
7160
  }
7161
7161
  function y(T, f) {
@@ -7169,7 +7169,7 @@ function Sr(e) {
7169
7169
  return {
7170
7170
  async unary(a, s, r, o, c, l, m) {
7171
7171
  var u;
7172
- const { serialize: p, parse: y } = Tr(s, n, e.jsonOptions, e.binaryOptions);
7172
+ const { serialize: d, parse: y } = Tr(s, n, e.jsonOptions, e.binaryOptions);
7173
7173
  return o = o === void 0 ? e.defaultTimeoutMs : o <= 0 ? void 0 : o, await _p({
7174
7174
  interceptors: e.interceptors,
7175
7175
  signal: r,
@@ -7191,7 +7191,7 @@ function Sr(e) {
7191
7191
  },
7192
7192
  next: async (T) => {
7193
7193
  var f;
7194
- const I = await ((f = e.fetch) !== null && f !== void 0 ? f : globalThis.fetch)(T.url, Object.assign(Object.assign({}, T.init), { headers: T.header, signal: T.signal, body: lr(0, p(T.message)) })), { headerError: b } = hr(I.status, I.headers);
7194
+ const I = await ((f = e.fetch) !== null && f !== void 0 ? f : globalThis.fetch)(T.url, Object.assign(Object.assign({}, T.init), { headers: T.header, signal: T.signal, body: lr(0, d(T.message)) })), { headerError: b } = hr(I.status, I.headers);
7195
7195
  if (!I.body)
7196
7196
  throw b !== void 0 ? b : "missing response body";
7197
7197
  const E = cr(I.body).getReader();
@@ -7202,7 +7202,7 @@ function Sr(e) {
7202
7202
  break;
7203
7203
  const { flags: L, data: N } = A.value;
7204
7204
  if ((L & ir) === ir)
7205
- throw new H("protocol error: received unsupported compressed output", P.Internal);
7205
+ throw new Q("protocol error: received unsupported compressed output", P.Internal);
7206
7206
  if (L === oa) {
7207
7207
  if (w !== void 0)
7208
7208
  throw "extra trailer";
@@ -7210,13 +7210,13 @@ function Sr(e) {
7210
7210
  continue;
7211
7211
  }
7212
7212
  if (O !== void 0)
7213
- throw new H("extra message", P.Unimplemented);
7213
+ throw new Q("extra message", P.Unimplemented);
7214
7214
  O = y(N);
7215
7215
  }
7216
7216
  if (w === void 0)
7217
- throw b !== void 0 ? b : new H("missing trailer", I.headers.has(Ct) ? P.Unimplemented : P.Unknown);
7217
+ throw b !== void 0 ? b : new Q("missing trailer", I.headers.has(Ct) ? P.Unimplemented : P.Unknown);
7218
7218
  if (fr(w, I.headers), O === void 0)
7219
- throw new H("missing message", w.has(Ct) ? P.Unimplemented : P.Unknown);
7219
+ throw new Q("missing message", w.has(Ct) ? P.Unimplemented : P.Unknown);
7220
7220
  return {
7221
7221
  stream: !1,
7222
7222
  service: a,
@@ -7230,7 +7230,7 @@ function Sr(e) {
7230
7230
  },
7231
7231
  async stream(a, s, r, o, c, l, m) {
7232
7232
  var u;
7233
- const { serialize: p, parse: y } = Tr(s, n, e.jsonOptions, e.binaryOptions);
7233
+ const { serialize: d, parse: y } = Tr(s, n, e.jsonOptions, e.binaryOptions);
7234
7234
  function T(_, I, b, E, w, O) {
7235
7235
  return Np(this, arguments, function* () {
7236
7236
  const L = cr(_).getReader();
@@ -7244,18 +7244,18 @@ function Sr(e) {
7244
7244
  const C = yield mt(L.read());
7245
7245
  if (C.done)
7246
7246
  break;
7247
- const { flags: K, data: ne } = C.value;
7248
- if ((K & oa) === oa) {
7247
+ const { flags: H, data: J } = C.value;
7248
+ if ((H & oa) === oa) {
7249
7249
  if (N)
7250
7250
  throw "extra trailer";
7251
7251
  N = !0;
7252
- const $ = dr(ne);
7252
+ const $ = dr(J);
7253
7253
  fr($, E), $.forEach((W, B) => b.set(B, W));
7254
7254
  continue;
7255
7255
  }
7256
7256
  if (N)
7257
7257
  throw "extra message";
7258
- yield yield mt(y(ne));
7258
+ yield yield mt(y(J));
7259
7259
  }
7260
7260
  if ("throwIfAborted" in O && O.throwIfAborted(), !N)
7261
7261
  throw w || "missing trailer";
@@ -7267,7 +7267,7 @@ function Sr(e) {
7267
7267
  const I = await _[Symbol.asyncIterator]().next();
7268
7268
  if (I.done == !0)
7269
7269
  throw "missing request message";
7270
- return lr(0, p(I.value));
7270
+ return lr(0, d(I.value));
7271
7271
  }
7272
7272
  return o = o === void 0 ? e.defaultTimeoutMs : o <= 0 ? void 0 : o, Ep({
7273
7273
  interceptors: e.interceptors,
@@ -7339,7 +7339,7 @@ const _r = ({
7339
7339
  ...Ar,
7340
7340
  promise: c.get(b)
7341
7341
  });
7342
- }, { dedupeTime: K = 4e3, fetcher: ne } = {
7342
+ }, { dedupeTime: H = 4e3, fetcher: J } = {
7343
7343
  ...O,
7344
7344
  ...l
7345
7345
  }, $ = Or();
@@ -7351,12 +7351,12 @@ const _r = ({
7351
7351
  const B = e.get(b);
7352
7352
  B && w.value.data !== B && N({ data: B, ...Xe });
7353
7353
  const V = o.get(b);
7354
- if (V && V + K > $)
7354
+ if (V && V + H > $)
7355
7355
  return;
7356
7356
  }
7357
7357
  const W = qd();
7358
7358
  try {
7359
- const B = ne(...E);
7359
+ const B = J(...E);
7360
7360
  o.set(b, $), c.set(b, B), C();
7361
7361
  const V = await B;
7362
7362
  e.set(b, V), N({ data: V, ...Xe }), o.set(b, Or());
@@ -7376,21 +7376,21 @@ const _r = ({
7376
7376
  const { key: V } = O;
7377
7377
  V && T(V);
7378
7378
  }, O.mutate = (V) => {
7379
- const { key: X } = O;
7380
- X && f(X, V);
7379
+ const { key: Z } = O;
7380
+ Z && f(Z, V);
7381
7381
  };
7382
- let L, N, C, K, ne, $ = [];
7382
+ let L, N, C, H, J, $ = [];
7383
7383
  jd(O, () => {
7384
7384
  const V = !L;
7385
- [ne, L] = Op(b), K = ne.subscribe((fe) => {
7385
+ [J, L] = Op(b), H = J.subscribe((fe) => {
7386
7386
  if (fe) {
7387
7387
  const [ke, g] = fe;
7388
7388
  O.key = ke, m([ke, g], O, A), N = ke, C = g;
7389
7389
  } else
7390
7390
  O.key = N = C = void 0, O.set({ ...Xe });
7391
7391
  });
7392
- const X = ne.get();
7393
- X && ([N, C] = X, V && W());
7392
+ const Z = J.get();
7393
+ Z && ([N, C] = Z, V && W());
7394
7394
  const {
7395
7395
  refetchInterval: Ge = 0,
7396
7396
  refetchOnFocus: qt,
@@ -7416,21 +7416,21 @@ const _r = ({
7416
7416
  N && C && m([N, C], O, A);
7417
7417
  }, B = O.listen;
7418
7418
  return O.listen = (V) => {
7419
- const X = B(V);
7420
- return V(O.value), W(), X;
7419
+ const Z = B(V);
7420
+ return V(O.value), W(), Z;
7421
7421
  }, Kd(O, () => {
7422
- O.value = { ...Xe }, L == null || L(), $.forEach((V) => V()), $ = [], K == null || K(), clearInterval(r.get(b));
7422
+ O.value = { ...Xe }, L == null || L(), $.forEach((V) => V()), $ = [], H == null || H(), clearInterval(r.get(b));
7423
7423
  }), O;
7424
- }, p = (b) => {
7424
+ }, d = (b) => {
7425
7425
  e.delete(b), o.delete(b);
7426
7426
  }, y = (b, E) => {
7427
7427
  for (const w of e.keys())
7428
7428
  ca(w, b) && E(w);
7429
7429
  }, T = (b) => {
7430
- y(b, p), a.emit(Nr, b);
7430
+ y(b, d), a.emit(Nr, b);
7431
7431
  }, f = (b, E) => {
7432
7432
  y(b, (w) => {
7433
- E === void 0 ? p(w) : e.set(w, E);
7433
+ E === void 0 ? d(w) : e.set(w, E);
7434
7434
  }), a.emit(ia, b, E);
7435
7435
  };
7436
7436
  function _(b) {
@@ -7446,14 +7446,14 @@ const _r = ({
7446
7446
  });
7447
7447
  const C = await L({
7448
7448
  data: O,
7449
- invalidate: (K) => {
7450
- N.push(K);
7449
+ invalidate: (H) => {
7450
+ N.push(H);
7451
7451
  },
7452
- getCacheUpdater: (K, ne = !0) => [
7452
+ getCacheUpdater: (H, J = !0) => [
7453
7453
  ($) => {
7454
- f(K, $), ne && N.push(K);
7454
+ f(H, $), J && N.push(H);
7455
7455
  },
7456
- e.get(K)
7456
+ e.get(H)
7457
7457
  ]
7458
7458
  });
7459
7459
  return w.setKey("data", C), C;
@@ -12438,7 +12438,7 @@ const br = 1, Ir = 2, Nr = 3, ia = 4, vr = (e, t) => {
12438
12438
  function Uf(e) {
12439
12439
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
12440
12440
  }
12441
- var Ui = { exports: {} }, te = Ui.exports = {}, Me, Pe;
12441
+ var Ui = { exports: {} }, ne = Ui.exports = {}, Me, Pe;
12442
12442
  function Ha() {
12443
12443
  throw new Error("setTimeout has not been defined");
12444
12444
  }
@@ -12503,7 +12503,7 @@ function Gi() {
12503
12503
  ut = null, Rt = !1, Ff(e);
12504
12504
  }
12505
12505
  }
12506
- te.nextTick = function(e) {
12506
+ ne.nextTick = function(e) {
12507
12507
  var t = new Array(arguments.length - 1);
12508
12508
  if (arguments.length > 1)
12509
12509
  for (var n = 1; n < arguments.length; n++)
@@ -12516,36 +12516,36 @@ function Bi(e, t) {
12516
12516
  Bi.prototype.run = function() {
12517
12517
  this.fun.apply(null, this.array);
12518
12518
  };
12519
- te.title = "browser";
12520
- te.browser = !0;
12521
- te.env = {};
12522
- te.argv = [];
12523
- te.version = "";
12524
- te.versions = {};
12519
+ ne.title = "browser";
12520
+ ne.browser = !0;
12521
+ ne.env = {};
12522
+ ne.argv = [];
12523
+ ne.version = "";
12524
+ ne.versions = {};
12525
12525
  function We() {
12526
12526
  }
12527
- te.on = We;
12528
- te.addListener = We;
12529
- te.once = We;
12530
- te.off = We;
12531
- te.removeListener = We;
12532
- te.removeAllListeners = We;
12533
- te.emit = We;
12534
- te.prependListener = We;
12535
- te.prependOnceListener = We;
12536
- te.listeners = function(e) {
12527
+ ne.on = We;
12528
+ ne.addListener = We;
12529
+ ne.once = We;
12530
+ ne.off = We;
12531
+ ne.removeListener = We;
12532
+ ne.removeAllListeners = We;
12533
+ ne.emit = We;
12534
+ ne.prependListener = We;
12535
+ ne.prependOnceListener = We;
12536
+ ne.listeners = function(e) {
12537
12537
  return [];
12538
12538
  };
12539
- te.binding = function(e) {
12539
+ ne.binding = function(e) {
12540
12540
  throw new Error("process.binding is not supported");
12541
12541
  };
12542
- te.cwd = function() {
12542
+ ne.cwd = function() {
12543
12543
  return "/";
12544
12544
  };
12545
- te.chdir = function(e) {
12545
+ ne.chdir = function(e) {
12546
12546
  throw new Error("process.chdir is not supported");
12547
12547
  };
12548
- te.umask = function() {
12548
+ ne.umask = function() {
12549
12549
  return 0;
12550
12550
  };
12551
12551
  var Bf = Ui.exports;
@@ -12561,20 +12561,20 @@ const D = /* @__PURE__ */ Uf(Bf), Vf = Zc({
12561
12561
  class xf extends Event {
12562
12562
  constructor(n, a) {
12563
12563
  super(n);
12564
- d(this, "slEventBus");
12564
+ p(this, "slEventBus");
12565
12565
  this.slEventBus = a;
12566
12566
  }
12567
12567
  }
12568
12568
  const qf = Fe("event-bus");
12569
12569
  class Hf {
12570
12570
  constructor(t = "sl-event-bus") {
12571
- d(this, "name");
12572
- d(this, "listeners");
12573
- d(this, "emit", (t, n) => {
12571
+ p(this, "name");
12572
+ p(this, "listeners");
12573
+ p(this, "emit", (t, n) => {
12574
12574
  const a = new xf(this.name, { ...n, type: t });
12575
12575
  qf.debug(a, "Emitting event"), window.dispatchEvent(a);
12576
12576
  });
12577
- d(this, "destroy", () => {
12577
+ p(this, "destroy", () => {
12578
12578
  this.listeners.forEach((t) => {
12579
12579
  window.removeEventListener(this.name, t), this.listeners.delete(t);
12580
12580
  }), this.listeners.clear();
@@ -12598,8 +12598,8 @@ class Kn {
12598
12598
  /**
12599
12599
  * store instance (nanostores)
12600
12600
  */
12601
- d(this, "store");
12602
- d(this, "name");
12601
+ p(this, "store");
12602
+ p(this, "name");
12603
12603
  this.store = t, this.name = n;
12604
12604
  }
12605
12605
  /**
@@ -12616,11 +12616,11 @@ const Yf = (e) => {
12616
12616
  class pt extends Kn {
12617
12617
  constructor() {
12618
12618
  super(...arguments);
12619
- d(this, "getValues", () => this.getStore().get());
12620
- d(this, "getValue", (n) => this.getStore().get()[n]);
12621
- d(this, "setValue", (n, a) => this.getStore().setKey(n, a));
12622
- d(this, "subscribe", (...n) => this.getStore().subscribe(...n));
12623
- d(this, "unsubscribe", () => this.getStore().off());
12619
+ p(this, "getValues", () => this.getStore().get());
12620
+ p(this, "getValue", (n) => this.getStore().get()[n]);
12621
+ p(this, "setValue", (n, a) => this.getStore().setKey(n, a));
12622
+ p(this, "subscribe", (...n) => this.getStore().subscribe(...n));
12623
+ p(this, "unsubscribe", () => this.getStore().off());
12624
12624
  }
12625
12625
  }
12626
12626
  const Ie = (e) => Ga(e);
@@ -12629,10 +12629,10 @@ var xe;
12629
12629
  e.ORGANIZATION = "ORGANIZATION", e.STREAM = "STREAM";
12630
12630
  })(xe || (xe = {}));
12631
12631
  const jf = {
12632
- [Y.BETTING]: "betting",
12633
- [Y.GAMES]: "games",
12634
- [Y.PUBLIC_CHAT]: "publicChat",
12635
- [Y.TWITTER]: "twitter"
12632
+ [j.BETTING]: "betting",
12633
+ [j.GAMES]: "games",
12634
+ [j.PUBLIC_CHAT]: "publicChat",
12635
+ [j.TWITTER]: "twitter"
12636
12636
  };
12637
12637
  var Wt;
12638
12638
  (function(e) {
@@ -12640,19 +12640,19 @@ var Wt;
12640
12640
  })(Wt || (Wt = {}));
12641
12641
  class Vi {
12642
12642
  constructor({ settings: t, ...n }, a) {
12643
- d(this, "status");
12644
- d(this, "source");
12645
- d(this, "config");
12646
- d(this, "settings");
12647
- d(this, "listeners", /* @__PURE__ */ new Set());
12648
- d(this, "settingsKey");
12649
- d(this, "enable", () => {
12643
+ p(this, "status");
12644
+ p(this, "source");
12645
+ p(this, "config");
12646
+ p(this, "settings");
12647
+ p(this, "listeners", /* @__PURE__ */ new Set());
12648
+ p(this, "settingsKey");
12649
+ p(this, "enable", () => {
12650
12650
  this.status.set(Wt.Ready);
12651
12651
  });
12652
- d(this, "disable", () => {
12652
+ p(this, "disable", () => {
12653
12653
  this.status.set(Wt.Suspended);
12654
12654
  });
12655
- d(this, "setFeatureConfig", ({ settings: t, ...n }) => {
12655
+ p(this, "setFeatureConfig", ({ settings: t, ...n }) => {
12656
12656
  var s;
12657
12657
  let a;
12658
12658
  for (a in n)
@@ -12666,7 +12666,7 @@ class Vi {
12666
12666
  }
12667
12667
  }
12668
12668
  });
12669
- d(this, "update", (t, n) => {
12669
+ p(this, "update", (t, n) => {
12670
12670
  this.source === xe.STREAM && n === xe.ORGANIZATION || (this.setFeatureConfig(t), this.source = n);
12671
12671
  });
12672
12672
  this.settingsKey = jf[n.type], this.status = at(Wt.Suspended), this.config = new pt(Ie(n), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && (t == null ? void 0 : t.overlaySettings.case) === this.settingsKey ? this.settings = new pt(Ie(t.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new pt(Ie({}), `feature:settings:${this.settingsKey}`), this.source = a;
@@ -12692,10 +12692,10 @@ class Vi {
12692
12692
  class _e extends Kn {
12693
12693
  constructor() {
12694
12694
  super(...arguments);
12695
- d(this, "getValue", () => this.getStore().get());
12696
- d(this, "setValue", (n) => this.getStore().set(n));
12697
- d(this, "subscribe", (n) => this.getStore().subscribe(n));
12698
- d(this, "unsubscribe", () => this.getStore().off());
12695
+ p(this, "getValue", () => this.getStore().get());
12696
+ p(this, "setValue", (n) => this.getStore().set(n));
12697
+ p(this, "subscribe", (n) => this.getStore().subscribe(n));
12698
+ p(this, "unsubscribe", () => this.getStore().off());
12699
12699
  }
12700
12700
  getValues() {
12701
12701
  throw new Error("not implemented");
@@ -12711,26 +12711,26 @@ const ie = (e) => at(e);
12711
12711
  class Ue extends Kn {
12712
12712
  constructor(n, a, s) {
12713
12713
  super(n, `api:${a}`);
12714
- d(this, "atomStore");
12715
- d(this, "getAtomStore", () => this.atomStore);
12716
- d(this, "getValue", async () => {
12714
+ p(this, "atomStore");
12715
+ p(this, "getAtomStore", () => this.atomStore);
12716
+ p(this, "getValue", async () => {
12717
12717
  const n = this.getStore();
12718
12718
  if (n.value === void 0)
12719
12719
  throw new Error("no store");
12720
12720
  return await n.value.promise, n.get().data;
12721
12721
  });
12722
- d(this, "getValues", () => this.getStore().get());
12723
- d(this, "setValue", (n) => this.getStore().set({ loading: !1, data: n == null ? void 0 : n.data }));
12724
- d(this, "subscribe", (n) => this.getStore().subscribe(n));
12725
- d(this, "unsubscribe", () => {
12722
+ p(this, "getValues", () => this.getStore().get());
12723
+ p(this, "setValue", (n) => this.getStore().set({ loading: !1, data: n == null ? void 0 : n.data }));
12724
+ p(this, "subscribe", (n) => this.getStore().subscribe(n));
12725
+ p(this, "unsubscribe", () => {
12726
12726
  throw new Error("not implemented");
12727
12727
  });
12728
- d(this, "invalidate", () => {
12728
+ p(this, "invalidate", () => {
12729
12729
  this.store.invalidate();
12730
12730
  });
12731
- d(this, "listen", (n) => this.getStore().listen(n));
12732
- d(this, "key", () => this.getStore().key);
12733
- d(this, "off", () => this.getStore().off());
12731
+ p(this, "listen", (n) => this.getStore().listen(n));
12732
+ p(this, "key", () => this.getStore().key);
12733
+ p(this, "off", () => this.getStore().off());
12734
12734
  this.atomStore = at(), s && n.subscribe((r) => {
12735
12735
  const o = this.atomStore.get(), c = s(r, o);
12736
12736
  o !== c && this.atomStore.set(c);
@@ -12815,15 +12815,15 @@ function qi(e) {
12815
12815
  }
12816
12816
  class Vt {
12817
12817
  constructor(t = "main", n = window.localStorage) {
12818
- d(this, "delimiter", ":");
12819
- d(this, "prefix");
12820
- d(this, "storage");
12821
- d(this, "clear", () => {
12818
+ p(this, "delimiter", ":");
12819
+ p(this, "prefix");
12820
+ p(this, "storage");
12821
+ p(this, "clear", () => {
12822
12822
  for (const t in window.localStorage)
12823
12823
  t.startsWith(this.prefix) && this.storage.removeItem(t);
12824
12824
  });
12825
- d(this, "generateKey", (t) => `${this.prefix}${this.delimiter}${t.join(this.delimiter)}`);
12826
- d(this, "write", (...t) => {
12825
+ p(this, "generateKey", (t) => `${this.prefix}${this.delimiter}${t.join(this.delimiter)}`);
12826
+ p(this, "write", (...t) => {
12827
12827
  const n = t.pop() || "", a = this.generateKey(t);
12828
12828
  try {
12829
12829
  this.storage.setItem(a, n);
@@ -12831,11 +12831,11 @@ class Vt {
12831
12831
  qi(s) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(a, n));
12832
12832
  }
12833
12833
  });
12834
- d(this, "read", (...t) => {
12834
+ p(this, "read", (...t) => {
12835
12835
  const n = this.storage.getItem(this.generateKey(t));
12836
12836
  return n === null ? void 0 : n;
12837
12837
  });
12838
- d(this, "remove", (...t) => {
12838
+ p(this, "remove", (...t) => {
12839
12839
  this.storage.removeItem(this.generateKey(t));
12840
12840
  });
12841
12841
  this.prefix = `sl-sdk${this.delimiter}${t}`, this.storage = n;
@@ -12847,21 +12847,21 @@ var be;
12847
12847
  })(be || (be = {}));
12848
12848
  class Wf {
12849
12849
  constructor(t, n, a, s) {
12850
- d(this, "params");
12851
- d(this, "streamCancel");
12852
- d(this, "method");
12853
- d(this, "options");
12854
- d(this, "headers");
12855
- d(this, "listeners");
12856
- d(this, "state");
12857
- d(this, "store");
12858
- d(this, "paramsListener");
12859
- d(this, "reconnectTimeout");
12860
- d(this, "attempt", 0);
12861
- d(this, "updateState", (t) => {
12850
+ p(this, "params");
12851
+ p(this, "streamCancel");
12852
+ p(this, "method");
12853
+ p(this, "options");
12854
+ p(this, "headers");
12855
+ p(this, "listeners");
12856
+ p(this, "state");
12857
+ p(this, "store");
12858
+ p(this, "paramsListener");
12859
+ p(this, "reconnectTimeout");
12860
+ p(this, "attempt", 0);
12861
+ p(this, "updateState", (t) => {
12862
12862
  this.state.setValue("status", t), this.state.setValue("ts", /* @__PURE__ */ new Date()), this.addStateLog(`status => ${t}`);
12863
12863
  });
12864
- d(this, "addStateLog", (t) => {
12864
+ p(this, "addStateLog", (t) => {
12865
12865
  const n = this.state.getStore().get().log, a = `${this.options.name} ${(/* @__PURE__ */ new Date()).toISOString()}: ${t}`;
12866
12866
  if (n.push(a), this.state.setValue("log", n), localStorage.getItem("SL_DEBUG"))
12867
12867
  try {
@@ -12871,12 +12871,12 @@ class Wf {
12871
12871
  qi(s) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", a);
12872
12872
  }
12873
12873
  });
12874
- d(this, "addListener", (t, n) => this.listeners.has(t) ? (this.addStateLog(`listener '${t}' not added, already exists`), () => {
12874
+ p(this, "addListener", (t, n) => this.listeners.has(t) ? (this.addStateLog(`listener '${t}' not added, already exists`), () => {
12875
12875
  }) : (this.listeners.set(t, n), this.addStateLog(`listener '${t}' added`), () => this.removeListener(t)));
12876
- d(this, "removeListener", (t) => {
12876
+ p(this, "removeListener", (t) => {
12877
12877
  this.listeners.delete(t), this.addStateLog(`listener '${t}' removed`);
12878
12878
  });
12879
- d(this, "connect", () => {
12879
+ p(this, "connect", () => {
12880
12880
  this.updateState(be.Connecting), this.streamCancel && (this.addStateLog("disconnect prev connection"), this.streamCancel.abort(), this.streamCancel = void 0);
12881
12881
  const t = "get" in this.params && typeof this.params.get == "function" ? this.params.get() : this.params;
12882
12882
  (async () => {
@@ -12889,18 +12889,18 @@ class Wf {
12889
12889
  for await (const s of a)
12890
12890
  this.attempt = 0, this.onData(s);
12891
12891
  } catch (n) {
12892
- n instanceof H && n.code != P.Canceled && this.onStreamError(n);
12892
+ n instanceof Q && n.code != P.Canceled && this.onStreamError(n);
12893
12893
  }
12894
12894
  })(), this.updateState(be.Connected);
12895
12895
  });
12896
- d(this, "disconnect", () => {
12896
+ p(this, "disconnect", () => {
12897
12897
  var t;
12898
12898
  this.streamCancel && this.streamCancel.abort(), this.listeners.clear(), (t = this.paramsListener) == null || t.call(this), clearTimeout(this.reconnectTimeout), this.reconnectTimeout = void 0, this.updateState(be.Disconnected);
12899
12899
  });
12900
12900
  /**
12901
12901
  * Reconnect after delay, if not already reconnecting, otherwise do nothing
12902
12902
  */
12903
- d(this, "reconnect", () => {
12903
+ p(this, "reconnect", () => {
12904
12904
  if (this.reconnectTimeout)
12905
12905
  this.addStateLog("already reconnecting");
12906
12906
  else if (this.attempt < this.options.reconnectMaxAttempts) {
@@ -12912,11 +12912,11 @@ class Wf {
12912
12912
  } else
12913
12913
  this.addStateLog("max reconnect attempts reached"), this.disconnect();
12914
12914
  });
12915
- d(this, "getStore", () => {
12915
+ p(this, "getStore", () => {
12916
12916
  var t;
12917
12917
  return (t = this.store) == null ? void 0 : t.getStore();
12918
12918
  });
12919
- d(this, "onData", (t) => {
12919
+ p(this, "onData", (t) => {
12920
12920
  try {
12921
12921
  this.addStateLog(`received data => ${JSON.stringify(t)}`), this.store && this.store.setValue(t);
12922
12922
  for (const [, n] of this.listeners)
@@ -12931,9 +12931,9 @@ class Wf {
12931
12931
  * Reconnect in other cases
12932
12932
  * Do nothing if error is undefined
12933
12933
  */
12934
- d(this, "onStreamError", (t) => {
12934
+ p(this, "onStreamError", (t) => {
12935
12935
  if (this.addStateLog(`error => ${t ? JSON.stringify(t) : "undefined"}}`), t !== void 0) {
12936
- if (t instanceof H && t.code !== P.Canceled) {
12936
+ if (t instanceof Q && t.code !== P.Canceled) {
12937
12937
  this.updateState(be.Failed), this.state.setValue("error", t), this.reconnect();
12938
12938
  return;
12939
12939
  }
@@ -12974,8 +12974,8 @@ const zf = /* @__PURE__ */ new Set([
12974
12974
  return await e(t);
12975
12975
  } catch (o) {
12976
12976
  $r.trace({ attempt: r, error: o }, "retry attempt");
12977
- const c = H.from(o);
12978
- if (r >= n || !(c instanceof H) || !zf.has(c.code))
12977
+ const c = Q.from(o);
12978
+ if (r >= n || !(c instanceof Q) || !zf.has(c.code))
12979
12979
  throw o;
12980
12980
  const l = Math.min(s, Math.pow(2, r) * a), m = Math.round(l * (1 + Math.random()) / 2);
12981
12981
  await new Promise((u) => setTimeout(u, m));
@@ -12995,38 +12995,38 @@ const zf = /* @__PURE__ */ new Set([
12995
12995
  };
12996
12996
  class Wr {
12997
12997
  constructor(t, n) {
12998
- d(this, "toJsonOptions", {
12998
+ p(this, "toJsonOptions", {
12999
12999
  emitDefaultValues: !1,
13000
13000
  enumAsInteger: !0,
13001
13001
  useProtoFieldName: !1
13002
13002
  });
13003
13003
  // with timeout, using for unary requests
13004
- d(this, "transport");
13004
+ p(this, "transport");
13005
13005
  // without timeout, using for server streaming requests
13006
- d(this, "streamTransport");
13007
- d(this, "nanoquery");
13008
- d(this, "host");
13009
- d(this, "$headers");
13010
- d(this, "interceptors", []);
13011
- d(this, "clients");
13012
- d(this, "streamClients");
13013
- d(this, "subscriptions");
13014
- d(this, "opts");
13006
+ p(this, "streamTransport");
13007
+ p(this, "nanoquery");
13008
+ p(this, "host");
13009
+ p(this, "$headers");
13010
+ p(this, "interceptors", []);
13011
+ p(this, "clients");
13012
+ p(this, "streamClients");
13013
+ p(this, "subscriptions");
13014
+ p(this, "opts");
13015
13015
  // use shared request params, based on Atom, each new Atom will create new subscription
13016
13016
  // mutate Atom, subscription automatically reconnect with new params
13017
13017
  // if headers changed, reconnect subscription with new headers automatically
13018
- d(this, "addSubscription", (t, n, a) => {
13018
+ p(this, "addSubscription", (t, n, a) => {
13019
13019
  const s = this.subscriptions.get(n);
13020
13020
  if (s)
13021
13021
  return s;
13022
13022
  const r = new Wf(this.$headers, t, n, a);
13023
13023
  return this.subscriptions.set(n, r), r;
13024
13024
  });
13025
- d(this, "removeSubscription", (t) => {
13025
+ p(this, "removeSubscription", (t) => {
13026
13026
  t.disconnect(), this.subscriptions.delete(t.params);
13027
13027
  });
13028
13028
  // cleanup subscriptions
13029
- d(this, "disconnect", () => {
13029
+ p(this, "disconnect", () => {
13030
13030
  var s, r;
13031
13031
  for (const [o, c] of this.subscriptions)
13032
13032
  c.disconnect(), this.subscriptions.delete(o);
@@ -13037,20 +13037,20 @@ class Wr {
13037
13037
  });
13038
13038
  this.nanoquery = { createFetcherStore: t, createMutatorStore: n, utils: a };
13039
13039
  });
13040
- d(this, "registerInterceptor", (t) => {
13040
+ p(this, "registerInterceptor", (t) => {
13041
13041
  this.interceptors.push(t);
13042
13042
  });
13043
- d(this, "removeInterceptor", (t) => {
13043
+ p(this, "removeInterceptor", (t) => {
13044
13044
  this.interceptors = this.interceptors.filter((n) => n !== t);
13045
13045
  });
13046
- d(this, "getClient", (t) => {
13046
+ p(this, "getClient", (t) => {
13047
13047
  const n = t.typeName;
13048
13048
  if (this.clients.has(n))
13049
13049
  return this.clients.get(n);
13050
13050
  const a = mr(t, this.transport);
13051
13051
  return this.clients.set(n, a), a;
13052
13052
  });
13053
- d(this, "getStreamClient", (t) => {
13053
+ p(this, "getStreamClient", (t) => {
13054
13054
  const n = `stream-${t.typeName}`;
13055
13055
  if (this.clients.has(n))
13056
13056
  return this.clients.get(n);
@@ -13058,7 +13058,7 @@ class Wr {
13058
13058
  return this.clients.set(n, a), a;
13059
13059
  });
13060
13060
  // create unary client, used for query request
13061
- d(this, "createPromiseClient", (t, { params: n = [], method: a }) => {
13061
+ p(this, "createPromiseClient", (t, { params: n = [], method: a }) => {
13062
13062
  const s = this.getClient(t), r = t.methods[a].name, o = [
13063
13063
  t.typeName,
13064
13064
  r.charAt(0).toLowerCase() + r.slice(1),
@@ -13067,24 +13067,24 @@ class Wr {
13067
13067
  return { client: s, createRequestOptions: (l) => {
13068
13068
  const m = Va();
13069
13069
  for (const u in l) {
13070
- const p = Ya[u];
13071
- m.set(p, l[u]);
13070
+ const d = Ya[u];
13071
+ m.set(d, l[u]);
13072
13072
  }
13073
13073
  return m;
13074
13074
  }, queryKey: o, queryKeyStr: c.join("") };
13075
13075
  });
13076
13076
  // create promise client, used for server stream subscriptions
13077
- d(this, "createStreamClient", (t) => ({ client: this.getStreamClient(t) }));
13078
- d(this, "setSdkKey", (t) => {
13077
+ p(this, "createStreamClient", (t) => ({ client: this.getStreamClient(t) }));
13078
+ p(this, "setSdkKey", (t) => {
13079
13079
  this.$headers.setValue("sdk", t);
13080
13080
  });
13081
- d(this, "setAuth", (t, n) => {
13081
+ p(this, "setAuth", (t, n) => {
13082
13082
  this.$headers.setValue("authorization", t), this.$headers.setValue("sl-user-id", n);
13083
13083
  });
13084
- d(this, "setHeader", (t, n) => this.$headers.setValue(t, n));
13085
- d(this, "getHeader", (t) => this.$headers.getValue(t));
13086
- d(this, "getHeaders", () => this.$headers.getValues());
13087
- d(this, "initInterceptors", () => {
13084
+ p(this, "setHeader", (t, n) => this.$headers.setValue(t, n));
13085
+ p(this, "getHeader", (t) => this.$headers.getValue(t));
13086
+ p(this, "getHeaders", () => this.$headers.getValues());
13087
+ p(this, "initInterceptors", () => {
13088
13088
  var n;
13089
13089
  if (this.interceptors.length !== 0)
13090
13090
  return;
@@ -13206,21 +13206,21 @@ class Nt extends Vt {
13206
13206
  constructor() {
13207
13207
  super("user");
13208
13208
  // Schema
13209
- d(this, "setSchema", (n) => {
13209
+ p(this, "setSchema", (n) => {
13210
13210
  this.write(Be.SCHEMA, n);
13211
13211
  });
13212
- d(this, "getSchema", () => this.read(Be.SCHEMA));
13212
+ p(this, "getSchema", () => this.read(Be.SCHEMA));
13213
13213
  // Token
13214
- d(this, "setToken", (n) => {
13214
+ p(this, "setToken", (n) => {
13215
13215
  this.write(Be.TOKEN, n);
13216
13216
  });
13217
- d(this, "getToken", () => this.read(Be.TOKEN));
13217
+ p(this, "getToken", () => this.read(Be.TOKEN));
13218
13218
  // External Token
13219
- d(this, "setExternalToken", (n) => {
13219
+ p(this, "setExternalToken", (n) => {
13220
13220
  this.write(Be.EXTERNAL_TOKEN, n);
13221
13221
  });
13222
- d(this, "getExternalToken", () => this.read(Be.EXTERNAL_TOKEN));
13223
- d(this, "removeToken", () => {
13222
+ p(this, "getExternalToken", () => this.read(Be.EXTERNAL_TOKEN));
13223
+ p(this, "removeToken", () => {
13224
13224
  this.remove(Be.TOKEN);
13225
13225
  });
13226
13226
  }
@@ -13273,15 +13273,15 @@ class uk extends Kn {
13273
13273
  constructor(n) {
13274
13274
  const a = mk(n), s = Yf(a);
13275
13275
  super(s, "core");
13276
- d(this, "stores");
13277
- d(this, "subscribe", (n) => {
13276
+ p(this, "stores");
13277
+ p(this, "subscribe", (n) => {
13278
13278
  let a;
13279
13279
  for (a in this.stores) {
13280
13280
  const s = n[a];
13281
13281
  a in n && s !== void 0 && this.stores[a].subscribe(n[a]);
13282
13282
  }
13283
13283
  });
13284
- d(this, "unsubscribe", () => this.getStore().off());
13284
+ p(this, "unsubscribe", () => this.getStore().off());
13285
13285
  this.stores = a;
13286
13286
  }
13287
13287
  getValue() {
@@ -13372,13 +13372,13 @@ const dk = (e, t, n) => {
13372
13372
  dedupeTime: 1e3 * 60 * 5
13373
13373
  });
13374
13374
  }, Sk = async (e, t) => {
13375
- var s, r, o, c, l, m;
13375
+ var r, o, c, l, m, u, d, y;
13376
13376
  if (!e)
13377
13377
  return;
13378
13378
  const { client: n } = t.createPromiseClient(Ne, { method: "getQuestion", params: [e] }), a = await n.getQuestion({
13379
13379
  id: e
13380
- });
13381
- return ((o = (r = (s = a.data) == null ? void 0 : s.attributes) == null ? void 0 : r.options) == null ? void 0 : o.options.case) === "promotion" ? (m = (l = (c = a.data) == null ? void 0 : c.attributes) == null ? void 0 : l.options) == null ? void 0 : m.options.value : void 0;
13380
+ }), s = ((c = (o = (r = a.data) == null ? void 0 : r.attributes) == null ? void 0 : o.options) == null ? void 0 : c.options.case) === "promotion" ? (u = (m = (l = a.data) == null ? void 0 : l.attributes) == null ? void 0 : m.options) == null ? void 0 : u.options.value : void 0;
13381
+ return s ? { promotions: s, notification: (y = (d = a.data) == null ? void 0 : d.attributes) == null ? void 0 : y.notification } : void 0;
13382
13382
  }, _k = (e, t, n) => {
13383
13383
  const { client: a, queryKey: s } = n.createPromiseClient(Ne, {
13384
13384
  method: "list",
@@ -13423,23 +13423,23 @@ const dk = (e, t, n) => {
13423
13423
  const o = t.get();
13424
13424
  if (!o)
13425
13425
  return;
13426
- const c = (m = n.get().data) == null ? void 0 : m.find((p) => p.id === (o == null ? void 0 : o.questionId)), l = (u = o == null ? void 0 : o.question) == null ? void 0 : u.openedFrom;
13426
+ const c = (m = n.get().data) == null ? void 0 : m.find((d) => d.id === (o == null ? void 0 : o.questionId)), l = (u = o == null ? void 0 : o.question) == null ? void 0 : u.openedFrom;
13427
13427
  return c ? (c.openedFrom = l, c) : o.question;
13428
13428
  }), s = rr(a, (o) => o && o.type === "question" ? o.id : void 0), r = ja(s, e);
13429
13429
  return { $store: a, $extendedStore: r, updateExtendedQuestion: (o) => {
13430
13430
  const c = r.get().data, l = (m, u) => {
13431
13431
  if (!m || !u)
13432
13432
  return m || u || [];
13433
- const p = [];
13433
+ const d = [];
13434
13434
  for (let y = 0; y < m.length; y++)
13435
- p.push({
13435
+ d.push({
13436
13436
  ...m[y],
13437
13437
  ...u[y],
13438
13438
  correct: m[y].correct,
13439
13439
  youVoted: m[y].youVoted,
13440
13440
  pointsEarned: m[y].pointsEarned
13441
13441
  });
13442
- return p;
13442
+ return d;
13443
13443
  };
13444
13444
  r.mutate({
13445
13445
  ...o,
@@ -13457,22 +13457,22 @@ var Mn;
13457
13457
  class Ik extends Vt {
13458
13458
  constructor() {
13459
13459
  super("advertisement");
13460
- d(this, "setShowed", (n) => {
13460
+ p(this, "setShowed", (n) => {
13461
13461
  this.write(Mn.SHOWED, n, "true");
13462
13462
  });
13463
- d(this, "isShowed", (n) => this.read(Mn.SHOWED, n));
13463
+ p(this, "isShowed", (n) => this.read(Mn.SHOWED, n));
13464
13464
  }
13465
13465
  }
13466
13466
  class Nk {
13467
13467
  constructor(t) {
13468
- d(this, "advertisementList");
13469
- d(this, "store");
13470
- d(this, "timeouts");
13471
- d(this, "waitingQueue");
13472
- d(this, "activeQueue");
13473
- d(this, "options");
13474
- d(this, "logger");
13475
- d(this, "addToQueue", (t) => {
13468
+ p(this, "advertisementList");
13469
+ p(this, "store");
13470
+ p(this, "timeouts");
13471
+ p(this, "waitingQueue");
13472
+ p(this, "activeQueue");
13473
+ p(this, "options");
13474
+ p(this, "logger");
13475
+ p(this, "addToQueue", (t) => {
13476
13476
  if (this.store.has(t.id)) {
13477
13477
  this.logger.debug({ advertisement: t }, "skip existed advertisement: %o");
13478
13478
  return;
@@ -13492,7 +13492,7 @@ class Nk {
13492
13492
  } else
13493
13493
  this.tickWaitingQueue();
13494
13494
  });
13495
- d(this, "tickWaitingQueue", () => {
13495
+ p(this, "tickWaitingQueue", () => {
13496
13496
  if (this.activeQueue.size < this.options.concurrency) {
13497
13497
  const [t] = this.waitingQueue;
13498
13498
  if (!t)
@@ -13501,7 +13501,7 @@ class Nk {
13501
13501
  } else
13502
13502
  this.logger.debug({ queueSize: this.activeQueue.size, concurrency: this.options.concurrency }, "waiting queue tick skipped");
13503
13503
  });
13504
- d(this, "tickActiveQueue", (t) => {
13504
+ p(this, "tickActiveQueue", (t) => {
13505
13505
  if (!t)
13506
13506
  return;
13507
13507
  const n = this.store.get(t);
@@ -13521,11 +13521,11 @@ class Nk {
13521
13521
  }, n.delay || 0);
13522
13522
  this.timeouts.set(t, a), this.logger.debug({ advertisementId: t }, "active queue tick completed"), this.tickWaitingQueue();
13523
13523
  });
13524
- d(this, "removeFromList", (t) => {
13524
+ p(this, "removeFromList", (t) => {
13525
13525
  const n = new Map(this.advertisementList.get());
13526
13526
  n.delete(t), this.advertisementList.set(n), this.store.delete(t), this.activeQueue.delete(t), this.waitingQueue.delete(t), this.logger.debug({ advertisementId: t }, "advertisement removed from list");
13527
13527
  });
13528
- d(this, "closeAdvertisement", (t, { animateHiding: n = !0 } = {}) => {
13528
+ p(this, "closeAdvertisement", (t, { animateHiding: n = !0 } = {}) => {
13529
13529
  const a = new Map(this.advertisementList.get()), s = a.get(t);
13530
13530
  if (s) {
13531
13531
  s.hiding = !(this.waitingQueue.size >= this.options.concurrency) && n, this.advertisementList.set(a);
@@ -13539,7 +13539,7 @@ class Nk {
13539
13539
  }
13540
13540
  return this.store.delete(t), this.activeQueue.delete(t), this.waitingQueue.delete(t), this.tickWaitingQueue(), this.logger.debug({ advertisementId: t }, "advertisement hiding"), s;
13541
13541
  });
13542
- d(this, "drain", () => {
13542
+ p(this, "drain", () => {
13543
13543
  this.store.clear(), this.timeouts.clear(), this.waitingQueue.clear(), this.activeQueue.clear(), this.advertisementList.off(), this.advertisementList.set(/* @__PURE__ */ new Map());
13544
13544
  });
13545
13545
  this.options = t, this.logger = Fe("advertisement_queue"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.advertisementList = ie(/* @__PURE__ */ new Map());
@@ -13551,7 +13551,7 @@ const vk = (e, t, n) => {
13551
13551
  action: "received",
13552
13552
  payload: {
13553
13553
  advertisementId: y,
13554
- advertisementType: T == null ? void 0 : T.type
13554
+ advertisementType: T == null ? void 0 : T.promotions.type
13555
13555
  }
13556
13556
  }), r.addToQueue({
13557
13557
  id: y,
@@ -13577,17 +13577,17 @@ const vk = (e, t, n) => {
13577
13577
  stage: "deactivate",
13578
13578
  id: y
13579
13579
  });
13580
- }, p = (y) => {
13580
+ }, d = (y) => {
13581
13581
  var I;
13582
13582
  const T = r.advertisementList.get();
13583
13583
  if (!(T != null && T.size))
13584
13584
  return null;
13585
13585
  const f = T.values().next().value, _ = f.data.get();
13586
- return !y && o.isShowed(f.id) ? (r.removeFromList(f.id), p(y)) : (!_.data && !_.error && !_.loading && f.promise(), Ee.emit("advertisement", {
13586
+ return !y && o.isShowed(f.id) ? (r.removeFromList(f.id), d(y)) : (!_.data && !_.error && !_.loading && f.promise(), Ee.emit("advertisement", {
13587
13587
  action: "opened",
13588
13588
  payload: {
13589
13589
  advertisementId: f.id,
13590
- advertisementType: (I = _.data) == null ? void 0 : I.type
13590
+ advertisementType: (I = _.data) == null ? void 0 : I.promotions.type
13591
13591
  }
13592
13592
  }), f);
13593
13593
  };
@@ -13630,7 +13630,7 @@ const vk = (e, t, n) => {
13630
13630
  T && l(T.id);
13631
13631
  }
13632
13632
  }), t.addListener("promotion", (y) => {
13633
- var _, I, b, E, w, O, A, L, N;
13633
+ var _, I, b, E, w, O, A, L, N, C, H, J;
13634
13634
  const T = ((w = (E = (b = (I = (_ = y.data) == null ? void 0 : _.attributes) == null ? void 0 : I.feedItem) == null ? void 0 : b.attributes) == null ? void 0 : E.attributes) == null ? void 0 : w.case) === "promotion" ? y.data.attributes.feedItem.attributes : void 0, f = ((N = (L = (A = (O = y.data) == null ? void 0 : O.attributes) == null ? void 0 : A.question) == null ? void 0 : L.options) == null ? void 0 : N.options.case) === "promotion" ? y.data.attributes.question.options.options.value : void 0;
13635
13635
  if (T === void 0 || f === void 0) {
13636
13636
  s.debug("not promotion");
@@ -13641,12 +13641,15 @@ const vk = (e, t, n) => {
13641
13641
  return;
13642
13642
  }
13643
13643
  if (T.status === ae.ACTIVE) {
13644
- s.debug({ feedItem: T }, "active: %o"), l(T.id, f);
13644
+ s.debug({ feedItem: T }, "active: %o"), l(T.id, {
13645
+ promotions: f,
13646
+ notification: (J = (H = (C = y.data) == null ? void 0 : C.attributes) == null ? void 0 : H.question) == null ? void 0 : J.notification
13647
+ });
13645
13648
  return;
13646
13649
  }
13647
13650
  s.debug({ feedItem: T }, "skip: %o");
13648
13651
  });
13649
- }), { hide: u, show: l, $list: r.advertisementList, getActiveAdvertisement: p };
13652
+ }), { hide: u, show: l, $list: r.advertisementList, getActiveAdvertisement: d };
13650
13653
  };
13651
13654
  var Tt;
13652
13655
  (function(e) {
@@ -13655,36 +13658,36 @@ var Tt;
13655
13658
  class Ok {
13656
13659
  constructor(t) {
13657
13660
  /** sl event id */
13658
- d(this, "slStreamId");
13661
+ p(this, "slStreamId");
13659
13662
  /** organization id */
13660
- d(this, "organizationId");
13663
+ p(this, "organizationId");
13661
13664
  /** current user id */
13662
- d(this, "userId");
13665
+ p(this, "userId");
13663
13666
  /**
13664
13667
  * flag to allow interactive questions (polls, trivia, predictions)
13665
13668
  * controlled by opt-in and onboarding flags
13666
13669
  */
13667
- d(this, "interactiveAllowed");
13670
+ p(this, "interactiveAllowed");
13668
13671
  /** opened question, using to download statistics */
13669
- d(this, "openedQuestionId");
13672
+ p(this, "openedQuestionId");
13670
13673
  /** opened question statistics */
13671
- d(this, "openedQuestion");
13674
+ p(this, "openedQuestion");
13672
13675
  /** last active question in feed */
13673
- d(this, "activeQuestionId");
13674
- d(this, "feedList");
13676
+ p(this, "activeQuestionId");
13677
+ p(this, "feedList");
13675
13678
  /** moderation id */
13676
- d(this, "moderationId");
13679
+ p(this, "moderationId");
13677
13680
  /** moderation */
13678
- d(this, "moderation");
13681
+ p(this, "moderation");
13679
13682
  /** feed subscription to receive new active question, update last active question */
13680
- d(this, "feedSubscription");
13683
+ p(this, "feedSubscription");
13681
13684
  /** subscription to opened question (vote percentage) */
13682
- d(this, "questionSubscription");
13683
- d(this, "advertisement");
13684
- d(this, "notifications");
13685
- d(this, "log");
13686
- d(this, "transport");
13687
- d(this, "cancels", /* @__PURE__ */ new Set());
13685
+ p(this, "questionSubscription");
13686
+ p(this, "advertisement");
13687
+ p(this, "notifications");
13688
+ p(this, "log");
13689
+ p(this, "transport");
13690
+ p(this, "cancels", /* @__PURE__ */ new Set());
13688
13691
  /**
13689
13692
  * Get id for notifications and link with current session
13690
13693
  * @param opts.prefix - id prefix (onboarding, question, tweet, ...etc)
@@ -13693,24 +13696,24 @@ class Ok {
13693
13696
  * @param opts.organizationId - current organization id, if not presented get from sdk automatically
13694
13697
  * @param opts.entity - entity id (question id, tweet id, ...etc)
13695
13698
  */
13696
- d(this, "getCurrentSessionId", (t) => {
13699
+ p(this, "getCurrentSessionId", (t) => {
13697
13700
  const n = t.eventId || this.slStreamId.get() || "", a = t.userId || this.userId.get() || "", s = t.organizationId || this.organizationId.get() || "", r = t.entity || "", o = t.prefix || "";
13698
13701
  return [s, n, a, o, r].join(":");
13699
13702
  });
13700
- d(this, "disconnect", () => {
13703
+ p(this, "disconnect", () => {
13701
13704
  var t;
13702
13705
  (t = this.feedSubscription) == null || t.disconnect(), this.questionSubscription !== void 0 && (this.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0);
13703
13706
  });
13704
13707
  /**
13705
13708
  * Open question and mark notification for this question as viewed
13706
13709
  */
13707
- d(this, "openQuestion", (t, n) => {
13710
+ p(this, "openQuestion", (t, n) => {
13708
13711
  this.openedQuestionId.set({ questionId: t, question: n }), this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: t }));
13709
13712
  });
13710
13713
  /**
13711
13714
  * Close question and mark notification for this question as viewed
13712
13715
  */
13713
- d(this, "closeQuestion", (t) => {
13716
+ p(this, "closeQuestion", (t) => {
13714
13717
  this.openedQuestionId.set(void 0), t && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: t }));
13715
13718
  });
13716
13719
  this.transport = t.transport, this.log = Fe("gamification-background"), this.slStreamId = t.stores.slStreamId.getAtomStore(), this.organizationId = t.stores.organizationSettings.getAtomStore(), this.userId = t.stores.user.getAtomStore(), this.moderationId = new _e(ie(void 0), "moderationId").getStore(), this.interactiveAllowed = new _e(ie(Tt.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new _e(ie(void 0), "openedQuestionId").getStore(), this.notifications = t.notifications, this.moderation = new Ue(yk(this.slStreamId, t.transport), "gamification:moderation"), this.feedList = new Ue(_k(this.slStreamId, this.interactiveAllowed, t.transport), "gamification:feedList"), this.activeQuestionId = gk(this.slStreamId, t.transport), this.openedQuestion = bk(t.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
@@ -13740,14 +13743,14 @@ class Ok {
13740
13743
  }
13741
13744
  class Ak {
13742
13745
  constructor(t) {
13743
- d(this, "notificationsList");
13744
- d(this, "store");
13745
- d(this, "timeouts");
13746
- d(this, "waitingQueue");
13747
- d(this, "activeQueue");
13748
- d(this, "options");
13749
- d(this, "logger");
13750
- d(this, "addToQueue", (t) => {
13746
+ p(this, "notificationsList");
13747
+ p(this, "store");
13748
+ p(this, "timeouts");
13749
+ p(this, "waitingQueue");
13750
+ p(this, "activeQueue");
13751
+ p(this, "options");
13752
+ p(this, "logger");
13753
+ p(this, "addToQueue", (t) => {
13751
13754
  var s;
13752
13755
  if (this.store.has(t.id)) {
13753
13756
  this.logger.debug({ notification: t }, "skip existed notification: %o");
@@ -13773,7 +13776,7 @@ class Ak {
13773
13776
  } else
13774
13777
  this.tickWaitingQueue();
13775
13778
  });
13776
- d(this, "tickWaitingQueue", () => {
13779
+ p(this, "tickWaitingQueue", () => {
13777
13780
  if (this.activeQueue.size < this.options.concurrency) {
13778
13781
  const [t] = this.waitingQueue;
13779
13782
  if (!t)
@@ -13782,7 +13785,7 @@ class Ak {
13782
13785
  } else
13783
13786
  this.logger.debug({ queueSize: this.activeQueue.size, concurrency: this.options.concurrency }, "waiting queue tick skipped");
13784
13787
  });
13785
- d(this, "tickActiveQueue", (t) => {
13788
+ p(this, "tickActiveQueue", (t) => {
13786
13789
  if (!t)
13787
13790
  return;
13788
13791
  const n = this.store.get(t);
@@ -13800,7 +13803,7 @@ class Ak {
13800
13803
  }, n.delay || 0);
13801
13804
  this.timeouts.set(t, a), this.logger.debug({ notificationId: t }, "active queue tick completed"), this.tickWaitingQueue();
13802
13805
  });
13803
- d(this, "closeNotification", (t, { animateHiding: n = !0 } = {}) => {
13806
+ p(this, "closeNotification", (t, { animateHiding: n = !0 } = {}) => {
13804
13807
  const a = new Map(this.notificationsList.get()), s = a.get(t);
13805
13808
  if (s) {
13806
13809
  s.hiding = !(this.waitingQueue.size >= this.options.concurrency) && n, this.notificationsList.set(a);
@@ -13814,7 +13817,7 @@ class Ak {
13814
13817
  }
13815
13818
  return this.store.delete(t), this.activeQueue.delete(t), this.waitingQueue.delete(t), this.tickWaitingQueue(), this.logger.debug({ notificationId: t }, "notification hiding"), s;
13816
13819
  });
13817
- d(this, "drain", () => {
13820
+ p(this, "drain", () => {
13818
13821
  this.store.clear(), this.timeouts.clear(), this.waitingQueue.clear(), this.activeQueue.clear(), this.notificationsList.off(), this.notificationsList.set(/* @__PURE__ */ new Map());
13819
13822
  });
13820
13823
  this.options = t, this.logger = Fe("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = ie(/* @__PURE__ */ new Map());
@@ -13827,11 +13830,11 @@ var Pn;
13827
13830
  class wk extends Vt {
13828
13831
  constructor() {
13829
13832
  super("notification");
13830
- d(this, "setOpened", (n) => {
13833
+ p(this, "setOpened", (n) => {
13831
13834
  this.write(Pn.OPENED, n, "true");
13832
13835
  });
13833
- d(this, "isOpened", (n) => this.read(Pn.OPENED, n));
13834
- d(this, "clearNotification", () => {
13836
+ p(this, "isOpened", (n) => this.read(Pn.OPENED, n));
13837
+ p(this, "clearNotification", () => {
13835
13838
  this.clear();
13836
13839
  });
13837
13840
  }
@@ -13842,10 +13845,10 @@ var et;
13842
13845
  })(et || (et = {}));
13843
13846
  class Rk {
13844
13847
  constructor(t = {}) {
13845
- d(this, "queue");
13846
- d(this, "storage");
13847
- d(this, "isViewed", (t) => this.storage.isOpened(t));
13848
- d(this, "add", (t) => {
13848
+ p(this, "queue");
13849
+ p(this, "storage");
13850
+ p(this, "isViewed", (t) => this.storage.isOpened(t));
13851
+ p(this, "add", (t) => {
13849
13852
  if (!this.isViewed(t.id)) {
13850
13853
  if (t.data && t.emitEvent) {
13851
13854
  const n = t.action;
@@ -13862,10 +13865,10 @@ class Rk {
13862
13865
  this.queue.addToQueue(t);
13863
13866
  }
13864
13867
  });
13865
- d(this, "close", (t, { markAsViewed: n = !0, animateHiding: a } = {}) => {
13868
+ p(this, "close", (t, { markAsViewed: n = !0, animateHiding: a } = {}) => {
13866
13869
  this.queue.closeNotification(t, { animateHiding: a }), n && this.markAsViewed(t);
13867
13870
  });
13868
- d(this, "getActiveNotification", () => {
13871
+ p(this, "getActiveNotification", () => {
13869
13872
  const t = this.queue.notificationsList.get();
13870
13873
  if (!(t != null && t.size))
13871
13874
  return null;
@@ -13874,8 +13877,8 @@ class Rk {
13874
13877
  return n;
13875
13878
  return t.values().next().value;
13876
13879
  });
13877
- d(this, "getQueueStore", () => this.queue.notificationsList);
13878
- d(this, "markAsViewed", (t) => {
13880
+ p(this, "getQueueStore", () => this.queue.notificationsList);
13881
+ p(this, "markAsViewed", (t) => {
13879
13882
  this.storage.setOpened(t);
13880
13883
  });
13881
13884
  this.storage = new wk(), this.queue = new Ak({ concurrency: 1, animationDelay: 1600, ...t });
@@ -13896,7 +13899,7 @@ const Mk = async (e, t) => {
13896
13899
  try {
13897
13900
  return await n.submitAnswer({ data: t }, { contextValues: s });
13898
13901
  } catch (o) {
13899
- throw ((r = H.from(o)) == null ? void 0 : r.code) === P.AlreadyExists ? new Error(en.ALREADY_VOTED) : new Error(en.UNKNOWN);
13902
+ throw ((r = Q.from(o)) == null ? void 0 : r.code) === P.AlreadyExists ? new Error(en.ALREADY_VOTED) : new Error(en.UNKNOWN);
13900
13903
  }
13901
13904
  }, Pk = (e, t) => {
13902
13905
  const { client: n, createRequestOptions: a } = e.createPromiseClient(Ne, { method: "submitInplay" }), s = a({ retryAttempts: 0 });
@@ -13909,24 +13912,24 @@ var vt;
13909
13912
  class Dk extends Vt {
13910
13913
  constructor() {
13911
13914
  super("gamification-session", window.sessionStorage);
13912
- d(this, "writeValue", (n, a) => {
13915
+ p(this, "writeValue", (n, a) => {
13913
13916
  this.write(...n, a);
13914
13917
  });
13915
- d(this, "readValue", (n) => this.read(...n));
13918
+ p(this, "readValue", (n) => this.read(...n));
13916
13919
  }
13917
13920
  }
13918
13921
  class Qi extends Vt {
13919
13922
  constructor() {
13920
13923
  super("gamification");
13921
- d(this, "sessionStorage");
13922
- d(this, "saveOnboardingStatus", ({ userId: n, eventId: a, organizationId: s }, r) => {
13924
+ p(this, "sessionStorage");
13925
+ p(this, "saveOnboardingStatus", ({ userId: n, eventId: a, organizationId: s }, r) => {
13923
13926
  this.write(vt.ONBOARDING, s, n, a, r);
13924
13927
  });
13925
- d(this, "getOnboardingStatus", ({ userId: n, eventId: a, organizationId: s }) => this.read(vt.ONBOARDING, s, n, a));
13926
- d(this, "setOnboardingInstantOpen", ({ userId: n, eventId: a, organizationId: s }) => {
13928
+ p(this, "getOnboardingStatus", ({ userId: n, eventId: a, organizationId: s }) => this.read(vt.ONBOARDING, s, n, a));
13929
+ p(this, "setOnboardingInstantOpen", ({ userId: n, eventId: a, organizationId: s }) => {
13927
13930
  this.sessionStorage.writeValue([vt.ONBOARDING_IO, s, n, a], "1");
13928
13931
  });
13929
- d(this, "getOnboardingInstantOpen", ({ userId: n, eventId: a, organizationId: s }) => this.sessionStorage.readValue([vt.ONBOARDING_IO, s, n, a]));
13932
+ p(this, "getOnboardingInstantOpen", ({ userId: n, eventId: a, organizationId: s }) => this.sessionStorage.readValue([vt.ONBOARDING_IO, s, n, a]));
13930
13933
  this.sessionStorage = new Dk();
13931
13934
  }
13932
13935
  }
@@ -13962,7 +13965,7 @@ const Ck = {
13962
13965
  }
13963
13966
  }, u = () => {
13964
13967
  m();
13965
- }, p = (y) => {
13968
+ }, d = (y) => {
13966
13969
  const T = o.get(), f = y || T.page + 1;
13967
13970
  f <= r && o.set({ ...T, page: f });
13968
13971
  };
@@ -13971,14 +13974,14 @@ const Ck = {
13971
13974
  return () => {
13972
13975
  y(), T();
13973
13976
  };
13974
- }), { $store: c, fetchMore: p, invalidate: u };
13977
+ }), { $store: c, fetchMore: d, invalidate: u };
13975
13978
  };
13976
13979
  class Fk extends Vt {
13977
13980
  constructor() {
13978
13981
  super("deep-link-context", window.sessionStorage);
13979
- d(this, "get", this.read);
13980
- d(this, "set", this.write);
13981
- d(this, "del", this.remove);
13982
+ p(this, "get", this.read);
13983
+ p(this, "set", this.write);
13984
+ p(this, "del", this.remove);
13982
13985
  }
13983
13986
  }
13984
13987
  const zr = "sldl", $n = "sldl_uid", Yi = "sldl_eid", ji = "sldl_e_eid", Gk = /* @__PURE__ */ new Set([$n, Yi, ji]), Jr = (e) => {
@@ -14069,11 +14072,11 @@ const zr = "sldl", $n = "sldl_uid", Yi = "sldl_eid", ji = "sldl_e_eid", Gk = /*
14069
14072
  class Hk extends Qf {
14070
14073
  constructor(n, a, s) {
14071
14074
  super();
14072
- d(this, "$coreStore");
14073
- d(this, "deepLink");
14074
- d(this, "transport");
14075
- d(this, "bypassLogin");
14076
- d(this, "me", async () => {
14075
+ p(this, "$coreStore");
14076
+ p(this, "deepLink");
14077
+ p(this, "transport");
14078
+ p(this, "bypassLogin");
14079
+ p(this, "me", async () => {
14077
14080
  var n;
14078
14081
  return this.$coreStore.getValues().user.invalidate(), (n = await this.$coreStore.getValues().user.getValue()) == null ? void 0 : n.data;
14079
14082
  });
@@ -14083,8 +14086,8 @@ class Hk extends Qf {
14083
14086
  * @param schema - schema created by the host app and provided to the StreamLayer SDK.
14084
14087
  * @param userKey - user token received from the host app.
14085
14088
  */
14086
- d(this, "login", async (n, a) => {
14087
- var u, p, y;
14089
+ p(this, "login", async (n, a) => {
14090
+ var u, d, y;
14088
14091
  this.$coreStore.getValues().userKey.setValue(a);
14089
14092
  const { used: s, data: r } = this.deepLink.getDeepLinkData(), o = s ? "" : r == null ? void 0 : r[$n];
14090
14093
  qk.debug({ inviterKey: o }, "login with inviterKey");
@@ -14093,23 +14096,23 @@ class Hk extends Qf {
14093
14096
  userKey: a,
14094
14097
  inviterKey: o,
14095
14098
  init: !1
14096
- }), l = (u = c.meta) == null ? void 0 : u.jwt, m = (p = c.data) == null ? void 0 : p.id;
14099
+ }), l = (u = c.meta) == null ? void 0 : u.jwt, m = (d = c.data) == null ? void 0 : d.id;
14097
14100
  if (!l || !m)
14098
14101
  throw new Error("internal: token missing");
14099
14102
  return (y = c.meta) != null && y.inviterKey && this.deepLink.deepLinkUsed(c.meta.inviterKey), this.$coreStore.getValues().user.getStore().mutate({ data: c.data }), this.saveUser(l, m), l;
14100
14103
  });
14101
- d(this, "isAuthenticated", () => this.me());
14104
+ p(this, "isAuthenticated", () => this.me());
14102
14105
  /**
14103
14106
  * Logout user. Clears the all user data from the store.
14104
14107
  */
14105
- d(this, "logout", () => {
14108
+ p(this, "logout", () => {
14106
14109
  this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userKey.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth("", ""), new Nt().clear();
14107
14110
  });
14108
14111
  /**
14109
14112
  * Soft logout, only clears the StreamLayer user data from the store.
14110
14113
  * Does not clear the external token. And automatically tries to re-login by external token.
14111
14114
  */
14112
- d(this, "softLogout", () => {
14115
+ p(this, "softLogout", () => {
14113
14116
  const n = new Nt();
14114
14117
  this.transport.setAuth("", ""), n.setToken(""), this.reLogin();
14115
14118
  });
@@ -14120,7 +14123,7 @@ class Hk extends Qf {
14120
14123
  * -
14121
14124
  * - If no one of the above is true, then logout.
14122
14125
  */
14123
- d(this, "reLogin", () => {
14126
+ p(this, "reLogin", () => {
14124
14127
  const n = new Nt(), a = n.getToken(), s = n.getExternalToken();
14125
14128
  if (this.$coreStore.getValues().userKey.setValue(s), a)
14126
14129
  return this.saveUser(a, ""), this.me().then((r) => {
@@ -14139,14 +14142,14 @@ class Hk extends Qf {
14139
14142
  /**
14140
14143
  * Write token to the Transport and UserStore
14141
14144
  */
14142
- d(this, "saveUser", (n, a) => {
14145
+ p(this, "saveUser", (n, a) => {
14143
14146
  this.transport.setAuth(n, a), this.$coreStore.getValues().userToken.setValue(n), new Nt().setToken(n);
14144
14147
  });
14145
14148
  /**
14146
14149
  * Add interceptor to the Transport to handle 401 and 403 errors.
14147
14150
  * If the user is logged in (auth header is set), then make a soft logout.
14148
14151
  */
14149
- d(this, "connect", () => {
14152
+ p(this, "connect", () => {
14150
14153
  this.transport.registerInterceptor((n) => async (a) => {
14151
14154
  try {
14152
14155
  return await n(a);
@@ -14207,8 +14210,8 @@ const Qt = new Nt(), Qk = (e, t, n) => {
14207
14210
  e.sdk = /* @__PURE__ */ Object.create(null), e.sdk.onMount = ({ name: o, clear: c }, l) => {
14208
14211
  var m, u;
14209
14212
  if (s.has(o)) {
14210
- const p = r.get(o);
14211
- p && p(), s.delete(o), r.delete(o);
14213
+ const d = r.get(o);
14214
+ d && d(), s.delete(o), r.delete(o);
14212
14215
  }
14213
14216
  s.set(o, { cb: l, clear: c }), ((u = (m = e == null ? void 0 : e.stores) == null ? void 0 : m.enabled) == null ? void 0 : u.get()) === "on" && r.set(o, l());
14214
14217
  }, e.ready = () => {
@@ -14264,10 +14267,10 @@ const Qt = new Nt(), Qk = (e, t, n) => {
14264
14267
  const s = Ie({});
14265
14268
  return Bt(s, () => $k(e, [t, n]).subscribe(async ({ data: r, error: o, loading: c }) => {
14266
14269
  var T;
14267
- const l = o ? "https://masters.com" : r == null ? void 0 : r.url, m = a.get() || "", u = t.get() || "", p = n.get() || "", y = {
14270
+ const l = o ? "https://masters.com" : r == null ? void 0 : r.url, m = a.get() || "", u = t.get() || "", d = n.get() || "", y = {
14268
14271
  [$n]: m,
14269
14272
  [Yi]: u,
14270
- [ji]: p
14273
+ [ji]: d
14271
14274
  };
14272
14275
  if (!c && l) {
14273
14276
  s.setKey("loading", !0);
@@ -14332,10 +14335,10 @@ const Jk = (e, t, n, a) => {
14332
14335
  f();
14333
14336
  return;
14334
14337
  }
14335
- const u = (o = t.moderation.getStore().value) == null ? void 0 : o.data, p = n.featureSettings.get().inplayGame;
14336
- if (u === void 0 || p === void 0)
14338
+ const u = (o = t.moderation.getStore().value) == null ? void 0 : o.data, d = n.featureSettings.get().inplayGame;
14339
+ if (u === void 0 || d === void 0)
14337
14340
  return;
14338
- const y = (c = u == null ? void 0 : u.options) == null ? void 0 : c.onboardingEnabled, T = (l = p == null ? void 0 : p.titleCard) == null ? void 0 : l.optIn;
14341
+ const y = (c = u == null ? void 0 : u.options) == null ? void 0 : c.onboardingEnabled, T = (l = d == null ? void 0 : d.titleCard) == null ? void 0 : l.optIn;
14339
14342
  y ? T ? e.set(re.Required) : e.set(re.Optional) : (T ? e.set(re.Unavailable) : e.set(re.Disabled), a.close(t.getCurrentSessionId({ prefix: "onboarding" }), { markAsViewed: !1 }));
14340
14343
  } catch (m) {
14341
14344
  console.error(m);
@@ -14378,11 +14381,11 @@ const Jk = (e, t, n, a) => {
14378
14381
  const l = e.get(), m = t.get(), u = (T = n.getStore().get().data) == null ? void 0 : T.map((_) => _.slId);
14379
14382
  if (!u)
14380
14383
  return;
14381
- const p = {
14384
+ const d = {
14382
14385
  eventId: l,
14383
14386
  userId: m,
14384
14387
  usersIds: [...u, m]
14385
- }, y = await r(p);
14388
+ }, y = await r(d);
14386
14389
  s.set((f = y.data) == null ? void 0 : f.attributes);
14387
14390
  }, c = () => {
14388
14391
  o();
@@ -14394,77 +14397,77 @@ const Jk = (e, t, n, a) => {
14394
14397
  };
14395
14398
  }), { $store: s, invalidate: c };
14396
14399
  }, eh = async (e, t, n, a, s) => {
14397
- var u, p, y;
14400
+ var u, d, y;
14398
14401
  const r = Hi(s), o = e.get(), c = t.get(), l = ((u = n.getStore().get().data) == null ? void 0 : u.map((T) => T.slId)) || [], m = {
14399
14402
  eventId: o,
14400
14403
  userId: a,
14401
14404
  usersIds: [...l, c]
14402
14405
  };
14403
- return (y = (p = (await r(m)).data) == null ? void 0 : p.attributes) == null ? void 0 : y.summary;
14406
+ return (y = (d = (await r(m)).data) == null ? void 0 : d.attributes) == null ? void 0 : y.summary;
14404
14407
  }, th = /* @__PURE__ */ new Set([G.POLL, G.PREDICTION, G.TRIVIA]);
14405
14408
  class nh extends Vi {
14406
14409
  constructor(n, a, s) {
14407
14410
  super(n, a);
14408
14411
  /** user statistics (leaderboard panel) */
14409
- d(this, "userSummary");
14412
+ p(this, "userSummary");
14410
14413
  /** feed list (pick history) */
14411
- d(this, "feedList");
14414
+ p(this, "feedList");
14412
14415
  /** friends list */
14413
- d(this, "friends");
14416
+ p(this, "friends");
14414
14417
  /** pinned leaderboard id */
14415
- d(this, "leaderboardId");
14418
+ p(this, "leaderboardId");
14416
14419
  /** leaderboard list */
14417
- d(this, "leaderboardList");
14418
- d(this, "deepLink");
14420
+ p(this, "leaderboardList");
14421
+ p(this, "deepLink");
14419
14422
  /** onboarding status */
14420
- d(this, "onboardingStatus");
14423
+ p(this, "onboardingStatus");
14421
14424
  /** opened question */
14422
- d(this, "openedQuestion");
14425
+ p(this, "openedQuestion");
14423
14426
  /** current user id */
14424
- d(this, "currentUserId");
14427
+ p(this, "currentUserId");
14425
14428
  /** pinned leaderboard id */
14426
- d(this, "openedUser");
14427
- d(this, "closeFeature");
14428
- d(this, "openFeature");
14429
- d(this, "feedSubscription");
14430
- d(this, "activeQuestionId");
14431
- d(this, "openedQuestionId");
14432
- d(this, "advertisement");
14433
- d(this, "notifications");
14434
- d(this, "transport");
14429
+ p(this, "openedUser");
14430
+ p(this, "closeFeature");
14431
+ p(this, "openFeature");
14432
+ p(this, "feedSubscription");
14433
+ p(this, "activeQuestionId");
14434
+ p(this, "openedQuestionId");
14435
+ p(this, "advertisement");
14436
+ p(this, "notifications");
14437
+ p(this, "transport");
14435
14438
  /** gamification background class, handle subscriptions and notifications for closed overlay */
14436
- d(this, "background");
14439
+ p(this, "background");
14437
14440
  /** Browser cache */
14438
- d(this, "storage");
14439
- d(this, "submitAnswerTimeout");
14440
- d(this, "cancels", /* @__PURE__ */ new Set());
14441
- d(this, "checkInteractiveFlag", () => {
14442
- var c, l, m, u, p;
14443
- const n = this.onboardingStatus.$store.get(), a = (m = (l = (c = this.background.moderation.getStore().value) == null ? void 0 : c.data) == null ? void 0 : l.options) == null ? void 0 : m.onboardingEnabled, s = (p = (u = this.settings.getValues().inplayGame) == null ? void 0 : u.titleCard) == null ? void 0 : p.optIn, r = n === re.Completed, o = !a || r || s !== !0;
14441
+ p(this, "storage");
14442
+ p(this, "submitAnswerTimeout");
14443
+ p(this, "cancels", /* @__PURE__ */ new Set());
14444
+ p(this, "checkInteractiveFlag", () => {
14445
+ var c, l, m, u, d;
14446
+ const n = this.onboardingStatus.$store.get(), a = (m = (l = (c = this.background.moderation.getStore().value) == null ? void 0 : c.data) == null ? void 0 : l.options) == null ? void 0 : m.onboardingEnabled, s = (d = (u = this.settings.getValues().inplayGame) == null ? void 0 : u.titleCard) == null ? void 0 : d.optIn, r = n === re.Completed, o = !a || r || s !== !0;
14444
14447
  this.background.interactiveAllowed.set(o ? Tt.ALLOWED : Tt.DISALLOWED);
14445
14448
  });
14446
- d(this, "connect", () => {
14449
+ p(this, "connect", () => {
14447
14450
  this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-prediction-close", async (n) => {
14448
- var m, u, p, y, T, f, _, I, b, E, w;
14451
+ var m, u, d, y, T, f, _, I, b, E, w;
14449
14452
  if (!this.isInteractiveAllowed)
14450
14453
  return;
14451
- const a = (u = (m = n.data) == null ? void 0 : m.attributes) == null ? void 0 : u.question, s = (y = (p = n.data) == null ? void 0 : p.attributes) == null ? void 0 : y.feedItem;
14454
+ const a = (u = (m = n.data) == null ? void 0 : m.attributes) == null ? void 0 : u.question, s = (y = (d = n.data) == null ? void 0 : d.attributes) == null ? void 0 : y.feedItem;
14452
14455
  if (!a || !(s != null && s.attributes))
14453
14456
  return;
14454
14457
  const { status: r, type: o, id: c, answers: l } = a;
14455
14458
  if (r === ae.RESOLVED && o === G.PREDICTION) {
14456
14459
  const O = this.background.getCurrentSessionId({
14457
14460
  prefix: `notification-id:${c}`
14458
- }), A = [...this.feedList.getValues().data || []], L = A.findIndex((X) => X.id === c), N = A[L];
14461
+ }), A = [...this.feedList.getValues().data || []], L = A.findIndex((Z) => Z.id === c), N = A[L];
14459
14462
  let C = (_ = (f = (T = N == null ? void 0 : N.attributes) == null ? void 0 : T.attributes) == null ? void 0 : f.value) == null ? void 0 : _.answerId;
14460
- const K = ja(c, this.transport), ne = K.subscribe(() => {
14463
+ const H = ja(c, this.transport), J = H.subscribe(() => {
14461
14464
  });
14462
- await K.get().promise;
14463
- const $ = K.get().data;
14464
- ne(), window.requestAnimationFrame(() => {
14465
- K.invalidate();
14466
- }), C || (C = (I = $ == null ? void 0 : $.answers.find(({ youVoted: X }) => X)) == null ? void 0 : I.id);
14467
- const W = l.find(({ correct: X }) => X), B = C ? l.find(({ id: X }) => X === C) : void 0, V = !!(B != null && B.correct);
14465
+ await H.get().promise;
14466
+ const $ = H.get().data;
14467
+ J(), window.requestAnimationFrame(() => {
14468
+ H.invalidate();
14469
+ }), C || (C = (I = $ == null ? void 0 : $.answers.find(({ youVoted: Z }) => Z)) == null ? void 0 : I.id);
14470
+ const W = l.find(({ correct: Z }) => Z), B = C ? l.find(({ id: Z }) => Z === C) : void 0, V = !!(B != null && B.correct);
14468
14471
  if (N && ((E = (b = A[L]) == null ? void 0 : b.attributes) == null ? void 0 : E.attributes.case) === "question") {
14469
14472
  try {
14470
14473
  A[L].attributes.attributes.value.answerId = C, A[L].attributes.attributes.value.openForVoting = !1, C && (A[L].attributes.attributes.value.status = V ? Yt.WON : Yt.LOST);
@@ -14500,47 +14503,47 @@ class nh extends Vi {
14500
14503
  }
14501
14504
  })), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-questions-list", (n) => {
14502
14505
  var o, c, l, m, u;
14503
- const a = [...((o = this.feedList.getStore().value) == null ? void 0 : o.data) || []], s = (l = (c = n.data) == null ? void 0 : c.attributes) == null ? void 0 : l.feedItem, r = a.findIndex((p) => p.id === (s == null ? void 0 : s.id));
14506
+ const a = [...((o = this.feedList.getStore().value) == null ? void 0 : o.data) || []], s = (l = (c = n.data) == null ? void 0 : c.attributes) == null ? void 0 : l.feedItem, r = a.findIndex((d) => d.id === (s == null ? void 0 : s.id));
14504
14507
  if (s != null && s.attributes && s.attributes.attributes.case !== "promotion" && !(s.attributes.status !== ae.ACTIVE && s.attributes.status !== ae.RESOLVED)) {
14505
14508
  if (r !== -1)
14506
14509
  if (s.attributes.attributes.case === "question" && ((m = a[r].attributes) == null ? void 0 : m.attributes.case) === "question") {
14507
- const p = a[r];
14508
- p.attributes && (a[r] = {
14510
+ const d = a[r];
14511
+ d.attributes && (a[r] = {
14509
14512
  ...a[r],
14510
14513
  attributes: {
14511
- ...p.attributes,
14514
+ ...d.attributes,
14512
14515
  attributes: {
14513
- ...p.attributes.attributes,
14516
+ ...d.attributes.attributes,
14514
14517
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14515
14518
  // @ts-ignore
14516
14519
  value: {
14517
- ...p.attributes.attributes.value,
14520
+ ...d.attributes.attributes.value,
14518
14521
  ...s.attributes.attributes.value,
14519
14522
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14520
14523
  // @ts-ignore
14521
- answerId: p.attributes.attributes.value.answerId,
14524
+ answerId: d.attributes.attributes.value.answerId,
14522
14525
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14523
14526
  // @ts-ignore
14524
- status: p.attributes.attributes.value.status,
14527
+ status: d.attributes.attributes.value.status,
14525
14528
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14526
14529
  // @ts-ignore
14527
- openForVoting: p.attributes.attributes.value.openForVoting
14530
+ openForVoting: d.attributes.attributes.value.openForVoting
14528
14531
  }
14529
14532
  }
14530
14533
  }
14531
14534
  });
14532
14535
  } else {
14533
- const p = a[r];
14534
- p.attributes && s.attributes && (a[r] = {
14536
+ const d = a[r];
14537
+ d.attributes && s.attributes && (a[r] = {
14535
14538
  ...a[r],
14536
14539
  attributes: {
14537
- ...p.attributes,
14540
+ ...d.attributes,
14538
14541
  attributes: {
14539
- ...p.attributes.attributes,
14542
+ ...d.attributes.attributes,
14540
14543
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14541
14544
  // @ts-ignore
14542
14545
  value: {
14543
- ...p.attributes.attributes.value,
14546
+ ...d.attributes.attributes.value,
14544
14547
  ...s.attributes.attributes.value
14545
14548
  }
14546
14549
  }
@@ -14558,23 +14561,23 @@ class nh extends Vi {
14558
14561
  }));
14559
14562
  });
14560
14563
  // not used
14561
- d(this, "disconnect", () => {
14564
+ p(this, "disconnect", () => {
14562
14565
  this.background.feedSubscription.removeListener("feed-subscription-prediction-close"), this.background.feedSubscription.removeListener("feed-subscription-questions-list");
14563
14566
  });
14564
- d(this, "submitAnswer", async (n, a) => {
14567
+ p(this, "submitAnswer", async (n, a) => {
14565
14568
  const s = ja(n, this.transport), r = s.subscribe(() => {
14566
14569
  }), o = { ...s.get().data || {} }, c = () => {
14567
14570
  var y;
14568
14571
  const l = this.feedList.getValues().data;
14569
14572
  if (!l)
14570
14573
  return;
14571
- const m = l.findIndex((T) => T.id === n), u = l[m], p = ((y = u == null ? void 0 : u.attributes) == null ? void 0 : y.attributes.case) === "question" && u.attributes.attributes.value;
14572
- if (p) {
14574
+ const m = l.findIndex((T) => T.id === n), u = l[m], d = ((y = u == null ? void 0 : u.attributes) == null ? void 0 : y.attributes.case) === "question" && u.attributes.attributes.value;
14575
+ if (d) {
14573
14576
  Ee.emit("poll", {
14574
14577
  action: "voted",
14575
14578
  payload: {
14576
14579
  questionId: n,
14577
- questionType: p.questionType
14580
+ questionType: d.questionType
14578
14581
  }
14579
14582
  });
14580
14583
  const T = s.get().data;
@@ -14601,7 +14604,7 @@ class nh extends Vi {
14601
14604
  throw l;
14602
14605
  }
14603
14606
  });
14604
- d(this, "openQuestion", (n, a) => {
14607
+ p(this, "openQuestion", (n, a) => {
14605
14608
  var r, o, c, l;
14606
14609
  if (!n)
14607
14610
  return () => {
@@ -14622,10 +14625,10 @@ class nh extends Vi {
14622
14625
  }
14623
14626
  }), this.background.openQuestion(n, a);
14624
14627
  });
14625
- d(this, "getFeedItem", (n) => fk(n, this.transport));
14626
- d(this, "isOpenedQuestion", (n) => this.notifications.isViewed(n));
14627
- d(this, "closeQuestion", (n) => this.background.closeQuestion(n));
14628
- d(this, "openUser", async (n) => {
14628
+ p(this, "getFeedItem", (n) => fk(n, this.transport));
14629
+ p(this, "isOpenedQuestion", (n) => this.notifications.isViewed(n));
14630
+ p(this, "closeQuestion", (n) => this.background.closeQuestion(n));
14631
+ p(this, "openUser", async (n) => {
14629
14632
  var r, o;
14630
14633
  const a = (r = this.leaderboardList.$store.get().data) == null ? void 0 : r.find((c) => c.userId === n);
14631
14634
  if (!a) {
@@ -14645,7 +14648,7 @@ class nh extends Vi {
14645
14648
  }
14646
14649
  this.openedUser.set(s);
14647
14650
  });
14648
- d(this, "closeUser", () => {
14651
+ p(this, "closeUser", () => {
14649
14652
  this.openedUser.set(void 0);
14650
14653
  });
14651
14654
  /**
@@ -14654,8 +14657,8 @@ class nh extends Vi {
14654
14657
  * for factoid and tweet questions we show notification always
14655
14658
  * skipping questions with inAppSilence === ON
14656
14659
  */
14657
- d(this, "showInApp", (n) => {
14658
- var s, r, o, c, l, m, u, p, y, T, f, _, I, b;
14660
+ p(this, "showInApp", (n) => {
14661
+ var s, r, o, c, l, m, u, d, y, T, f, _, I, b;
14659
14662
  const a = this.onboardingStatus.$store.get();
14660
14663
  if (n && n.data && a && a !== re.Unset && ((s = n.data.question) == null ? void 0 : s.id) !== void 0 && n.data.question.notification !== void 0 && ((o = (r = n.data.question) == null ? void 0 : r.bypassNotifications) == null ? void 0 : o.inAppSilence) !== Jo.ON && n.data.question.status === ae.ACTIVE && !n.data.question.marketClosed) {
14661
14664
  if (th.has(n.data.question.type))
@@ -14719,7 +14722,7 @@ class nh extends Vi {
14719
14722
  }
14720
14723
  });
14721
14724
  } else if (n.data.question.type === G.TWEET) {
14722
- const E = (p = n.data.question.options) == null ? void 0 : p.options.value, w = {
14725
+ const E = (d = n.data.question.options) == null ? void 0 : d.options.value, w = {
14723
14726
  title: (y = n.data.question.notification) == null ? void 0 : y.title,
14724
14727
  body: (T = n.data.question.notification) == null ? void 0 : T.body,
14725
14728
  image: (f = n.data.question.notification) == null ? void 0 : f.image,
@@ -14750,7 +14753,7 @@ class nh extends Vi {
14750
14753
  }
14751
14754
  }
14752
14755
  });
14753
- this.background = new Ok(s), this.advertisement = this.background.advertisement, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Qi(), this.feedList = this.background.feedList, this.friends = new Ue(Tk(this.background.userId, s.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = ie(void 0), this.leaderboardId = new _e(ie(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Xk(this, this.background, s.transport, s.notifications), this.notifications = s.notifications, this.transport = s.transport, this.closeFeature = () => s.sdk.closeFeature(!0), this.openFeature = () => s.sdk.openFeature(Y.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = zk(this.transport, this.background.slStreamId, s.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Zk(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = Uk(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((r, o) => {
14756
+ this.background = new Ok(s), this.advertisement = this.background.advertisement, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Qi(), this.feedList = this.background.feedList, this.friends = new Ue(Tk(this.background.userId, s.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = ie(void 0), this.leaderboardId = new _e(ie(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Xk(this, this.background, s.transport, s.notifications), this.notifications = s.notifications, this.transport = s.transport, this.closeFeature = () => s.sdk.closeFeature(!0), this.openFeature = () => s.sdk.openFeature(j.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = zk(this.transport, this.background.slStreamId, s.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Zk(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = Uk(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((r, o) => {
14754
14757
  o != null && o.summary && (r != null && r.summary) && this.leaderboardList.invalidate();
14755
14758
  })), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), Bt(this.background.activeQuestionId, () => {
14756
14759
  this.background.activeQuestionId.listen(this.showInApp);
@@ -14764,19 +14767,19 @@ class nh extends Vi {
14764
14767
  }
14765
14768
  }
14766
14769
  const ah = {
14767
- [Y.GAMES]: !0
14770
+ [j.GAMES]: !0
14768
14771
  };
14769
14772
  class sh extends Vi {
14770
14773
  constructor(t, n) {
14771
14774
  super(t, n);
14772
14775
  }
14773
14776
  }
14774
- const rh = (e, t, n) => e.type === Y.GAMES ? new nh(e, t, n) : new sh(e, t), oh = (e, t, n) => {
14775
- e.features = /* @__PURE__ */ new Map(), e.sdk.featuresList = new _e(ie(/* @__PURE__ */ new Set()), "features-list"), e.activeFeature = new _e(ie(Y.UNSET), "activeFeature"), e.sdk.getFeatures = () => e.features, e.sdk.getFeature = (a) => e.features.get(a), e.sdk.getActiveFeature = () => e.activeFeature.getStore(), e.sdk.openFeature = (a) => {
14777
+ const rh = (e, t, n) => e.type === j.GAMES ? new nh(e, t, n) : new sh(e, t), oh = (e, t, n) => {
14778
+ e.features = /* @__PURE__ */ new Map(), e.sdk.featuresList = new _e(ie(/* @__PURE__ */ new Set()), "features-list"), e.activeFeature = new _e(ie(j.UNSET), "activeFeature"), e.sdk.getFeatures = () => e.features, e.sdk.getFeature = (a) => e.features.get(a), e.sdk.getActiveFeature = () => e.activeFeature.getStore(), e.sdk.openFeature = (a) => {
14776
14779
  e.activeFeature.setValue(a);
14777
14780
  }, e.sdk.closeFeature = (a = !1) => {
14778
14781
  const s = e.activeFeature.getValue();
14779
- if (e.activeFeature.setValue(Y.UNSET), a && s) {
14782
+ if (e.activeFeature.setValue(j.UNSET), a && s) {
14780
14783
  e.features.delete(s);
14781
14784
  const r = e.sdk.featuresList.getValue();
14782
14785
  r && r.delete(s), e.sdk.featuresList.setValue(r);
@@ -14840,8 +14843,8 @@ const rh = (e, t, n) => e.type === Y.GAMES ? new nh(e, t, n) : new sh(e, t), oh
14840
14843
  };
14841
14844
  class ih {
14842
14845
  constructor(t) {
14843
- d(this, "analytics");
14844
- d(this, "accepted", () => {
14846
+ p(this, "analytics");
14847
+ p(this, "accepted", () => {
14845
14848
  this.analytics.write("invitation", {
14846
14849
  common: {
14847
14850
  ...this.analytics.commonStore.getValues(),
@@ -14851,7 +14854,7 @@ class ih {
14851
14854
  from: Fa.UNSET
14852
14855
  });
14853
14856
  });
14854
- d(this, "sent", ({ from: t }) => {
14857
+ p(this, "sent", ({ from: t }) => {
14855
14858
  this.analytics.write("invitation", {
14856
14859
  common: {
14857
14860
  ...this.analytics.commonStore.getValues(),
@@ -14877,8 +14880,8 @@ class ih {
14877
14880
  }
14878
14881
  class ch {
14879
14882
  constructor(t) {
14880
- d(this, "analytics");
14881
- d(this, "tap", () => {
14883
+ p(this, "analytics");
14884
+ p(this, "tap", () => {
14882
14885
  this.analytics.write("interactions", {
14883
14886
  common: {
14884
14887
  ...this.analytics.commonStore.getValues(),
@@ -14887,7 +14890,7 @@ class ch {
14887
14890
  actionType: xa.TAP
14888
14891
  });
14889
14892
  });
14890
- d(this, "scroll", () => {
14893
+ p(this, "scroll", () => {
14891
14894
  this.analytics.write("interactions", {
14892
14895
  common: {
14893
14896
  ...this.analytics.commonStore.getValues(),
@@ -14924,8 +14927,8 @@ const lh = {
14924
14927
  };
14925
14928
  class mh {
14926
14929
  constructor(t) {
14927
- d(this, "analytics");
14928
- d(this, "received", ({ advertisementId: t }, { topicSubType: n }) => {
14930
+ p(this, "analytics");
14931
+ p(this, "received", ({ advertisementId: t }, { topicSubType: n }) => {
14929
14932
  this.analytics.write("games", {
14930
14933
  common: {
14931
14934
  ...this.analytics.commonStore.getValues(),
@@ -14937,7 +14940,7 @@ class mh {
14937
14940
  pollOpenedFrom: Se.UNSET
14938
14941
  });
14939
14942
  });
14940
- d(this, "opened", ({ advertisementId: t }, { topicSubType: n }) => {
14943
+ p(this, "opened", ({ advertisementId: t }, { topicSubType: n }) => {
14941
14944
  this.analytics.write("games", {
14942
14945
  common: {
14943
14946
  ...this.analytics.commonStore.getValues(),
@@ -14949,7 +14952,7 @@ class mh {
14949
14952
  pollOpenedFrom: Se.UNSET
14950
14953
  });
14951
14954
  });
14952
- d(this, "videoPlay", ({ advertisementId: t }, { topicSubType: n }) => {
14955
+ p(this, "videoPlay", ({ advertisementId: t }, { topicSubType: n }) => {
14953
14956
  this.analytics.write("games", {
14954
14957
  common: {
14955
14958
  ...this.analytics.commonStore.getValues(),
@@ -14960,7 +14963,7 @@ class mh {
14960
14963
  pollOpenedFrom: Se.UNSET
14961
14964
  });
14962
14965
  });
14963
- d(this, "buttonSelect", ({ advertisementId: t }, { topicSubType: n }) => {
14966
+ p(this, "buttonSelect", ({ advertisementId: t }, { topicSubType: n }) => {
14964
14967
  this.analytics.write("games", {
14965
14968
  common: {
14966
14969
  ...this.analytics.commonStore.getValues(),
@@ -14971,7 +14974,7 @@ class mh {
14971
14974
  pollOpenedFrom: Se.UNSET
14972
14975
  });
14973
14976
  });
14974
- d(this, "bannerSelect", ({ advertisementId: t }, { topicSubType: n }) => {
14977
+ p(this, "bannerSelect", ({ advertisementId: t }, { topicSubType: n }) => {
14975
14978
  this.analytics.write("games", {
14976
14979
  common: {
14977
14980
  ...this.analytics.commonStore.getValues(),
@@ -15021,29 +15024,29 @@ const zt = {
15021
15024
  };
15022
15025
  G.UNSET + "", Le.UNSET, G.FACTOID + "", Le.POLLS, G.POLL + "", Le.POLLS, G.PREDICTION + "", Le.POLLS, G.PROMOTION + "", Le.POLLS, G.TRIVIA + "", Le.POLLS, G.TWEET + "", Le.POLLS;
15023
15026
  const uh = {
15024
- [Y.UNSET]: me.UNSET,
15025
- [Y.INPLAY]: me.INPLAY,
15026
- [Y.MESSAGING]: me.MESSAGING,
15027
- [Y.STATISTICS]: me.STATS,
15028
- [Y.BETTING]: me.BETTING,
15029
- [Y.TWITTER]: me.TWITTER,
15030
- [Y.MERCHANDISE]: me.MERCHANDISE,
15031
- [Y.CONTESTS]: me.CONTESTS,
15032
- [Y.VOICE_CHAT]: me.CALLING,
15033
- [Y.TICKETS]: me.TICKETS,
15034
- [Y.WHOIS_WATCHING]: me.WHOISWATCHING,
15035
- [Y.PROFILE]: me.PROFILE,
15036
- [Y.GAMES]: me.POLLS,
15027
+ [j.UNSET]: me.UNSET,
15028
+ [j.INPLAY]: me.INPLAY,
15029
+ [j.MESSAGING]: me.MESSAGING,
15030
+ [j.STATISTICS]: me.STATS,
15031
+ [j.BETTING]: me.BETTING,
15032
+ [j.TWITTER]: me.TWITTER,
15033
+ [j.MERCHANDISE]: me.MERCHANDISE,
15034
+ [j.CONTESTS]: me.CONTESTS,
15035
+ [j.VOICE_CHAT]: me.CALLING,
15036
+ [j.TICKETS]: me.TICKETS,
15037
+ [j.WHOIS_WATCHING]: me.WHOISWATCHING,
15038
+ [j.PROFILE]: me.PROFILE,
15039
+ [j.GAMES]: me.POLLS,
15037
15040
  // ??
15038
- [Y.GOLF_STATISTICS]: me.STATS,
15041
+ [j.GOLF_STATISTICS]: me.STATS,
15039
15042
  // ??
15040
- [Y.HIGHLIGHTS]: me.HIGHLIGHTS,
15041
- [Y.PUBLIC_CHAT]: me.PUBLIC_CHAT
15043
+ [j.HIGHLIGHTS]: me.HIGHLIGHTS,
15044
+ [j.PUBLIC_CHAT]: me.PUBLIC_CHAT
15042
15045
  };
15043
15046
  class dh {
15044
15047
  constructor(t) {
15045
- d(this, "analytics");
15046
- d(this, "received", ({ questionId: t, questionType: n }) => {
15048
+ p(this, "analytics");
15049
+ p(this, "received", ({ questionId: t, questionType: n }) => {
15047
15050
  this.analytics.write("notification", {
15048
15051
  common: {
15049
15052
  ...this.analytics.commonStore.getValues(),
@@ -15055,7 +15058,7 @@ class dh {
15055
15058
  notificationType: qa.IN_APP
15056
15059
  });
15057
15060
  });
15058
- d(this, "opened", ({ questionId: t, questionType: n }) => {
15061
+ p(this, "opened", ({ questionId: t, questionType: n }) => {
15059
15062
  this.analytics.write("notification", {
15060
15063
  common: {
15061
15064
  ...this.analytics.commonStore.getValues(),
@@ -15086,9 +15089,9 @@ class dh {
15086
15089
  }
15087
15090
  class ph {
15088
15091
  constructor(t) {
15089
- d(this, "analytics");
15092
+ p(this, "analytics");
15090
15093
  // event when a poll is received from subscription or active question request
15091
- d(this, "received", ({ questionId: t, questionType: n }) => {
15094
+ p(this, "received", ({ questionId: t, questionType: n }) => {
15092
15095
  this.analytics.write("games", {
15093
15096
  common: {
15094
15097
  ...this.analytics.commonStore.getValues(),
@@ -15100,7 +15103,7 @@ class ph {
15100
15103
  });
15101
15104
  });
15102
15105
  // poll is opened from notification or list
15103
- d(this, "opened", ({ questionId: t, questionType: n, questionOpenedFrom: a }) => {
15106
+ p(this, "opened", ({ questionId: t, questionType: n, questionOpenedFrom: a }) => {
15104
15107
  this.analytics.write("games", {
15105
15108
  common: {
15106
15109
  ...this.analytics.commonStore.getValues(),
@@ -15112,7 +15115,7 @@ class ph {
15112
15115
  });
15113
15116
  });
15114
15117
  // poll is voted
15115
- d(this, "voted", ({ questionId: t, questionType: n }) => {
15118
+ p(this, "voted", ({ questionId: t, questionType: n }) => {
15116
15119
  this.analytics.write("games", {
15117
15120
  common: {
15118
15121
  ...this.analytics.commonStore.getValues(),
@@ -15124,7 +15127,7 @@ class ph {
15124
15127
  });
15125
15128
  });
15126
15129
  // onboarding passed, user is now able to vote
15127
- d(this, "onboardingPassed", () => {
15130
+ p(this, "onboardingPassed", () => {
15128
15131
  this.analytics.write("games", {
15129
15132
  common: {
15130
15133
  ...this.analytics.commonStore.getValues(),
@@ -15134,7 +15137,7 @@ class ph {
15134
15137
  });
15135
15138
  });
15136
15139
  // user clicked on link in poll and navigated to another page
15137
- d(this, "navigated", () => {
15140
+ p(this, "navigated", () => {
15138
15141
  this.analytics.write("games", {
15139
15142
  common: {
15140
15143
  ...this.analytics.commonStore.getValues(),
@@ -15176,14 +15179,14 @@ const Th = ({ transport: e, $commonStore: t }) => {
15176
15179
  params: [a]
15177
15180
  }), c = e.nanoquery.createFetcherStore(o, {
15178
15181
  fetcher: async () => {
15179
- const p = t.getStore().get();
15182
+ const d = t.getStore().get();
15180
15183
  try {
15181
15184
  await r.unary({
15182
15185
  message: {
15183
15186
  case: "heartbeat",
15184
15187
  value: {
15185
15188
  common: {
15186
- ...p,
15189
+ ...d,
15187
15190
  kind: oe.SESSION_HEARTBEAT
15188
15191
  }
15189
15192
  }
@@ -15209,42 +15212,42 @@ const Th = ({ transport: e, $commonStore: t }) => {
15209
15212
  }, He = Fe("analytics");
15210
15213
  class yh {
15211
15214
  constructor(t) {
15212
- d(this, "commonStore");
15213
- d(this, "notifications");
15214
- d(this, "polls");
15215
- d(this, "invitation");
15216
- d(this, "interactions");
15217
- d(this, "advertisement");
15218
- d(this, "heartbeat");
15219
- d(this, "analyticsClient");
15220
- d(this, "listeners");
15221
- d(this, "listenersCancels");
15222
- d(this, "connected", !1);
15223
- d(this, "connect", () => {
15215
+ p(this, "commonStore");
15216
+ p(this, "notifications");
15217
+ p(this, "polls");
15218
+ p(this, "invitation");
15219
+ p(this, "interactions");
15220
+ p(this, "advertisement");
15221
+ p(this, "heartbeat");
15222
+ p(this, "analyticsClient");
15223
+ p(this, "listeners");
15224
+ p(this, "listenersCancels");
15225
+ p(this, "connected", !1);
15226
+ p(this, "connect", () => {
15224
15227
  this.writeCommon("sessionId", Ba()), this.heartbeat.enable(), this.listeners.forEach((t) => this.listenersCancels.add(t())), this.connected = !0, He.debug("analytics connected");
15225
15228
  });
15226
- d(this, "disconnect", () => {
15229
+ p(this, "disconnect", () => {
15227
15230
  this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((t) => t()), this.connected = !1, He.debug("analytics disconnected");
15228
15231
  });
15229
- d(this, "write", (t, n) => {
15232
+ p(this, "write", (t, n) => {
15230
15233
  n && this.analyticsClient.unary({ message: { case: t, value: n } }).then(() => {
15231
15234
  He.trace("send analytics success", t, n);
15232
15235
  }).catch((a) => {
15233
15236
  He.error(a, "send analytics failed");
15234
15237
  });
15235
15238
  });
15236
- d(this, "writeCommon", (t, n) => {
15239
+ p(this, "writeCommon", (t, n) => {
15237
15240
  this.commonStore.setValue(t, n);
15238
15241
  });
15239
15242
  // calls the cb when connected/reconnected, callbacks return a cancel function to be called when disconnected
15240
- d(this, "onConnect", (t) => {
15243
+ p(this, "onConnect", (t) => {
15241
15244
  this.listeners.add(t), this.connected && this.listenersCancels.add(t());
15242
15245
  });
15243
- d(this, "connectToSDK", (t) => {
15246
+ p(this, "connectToSDK", (t) => {
15244
15247
  this.onConnect(() => t.stores.slStreamId.getAtomStore().subscribe((n) => {
15245
15248
  this.writeCommon("eventId", n);
15246
15249
  })), this.onConnect(() => t.sdk.getActiveFeature().subscribe((n) => {
15247
- n && this.writeCommon("category", uh[n]), n !== Y.UNSET ? this.writeCommon("overlaySessionId", Ba()) : this.writeCommon("overlaySessionId", "");
15250
+ n && this.writeCommon("category", uh[n]), n !== j.UNSET ? this.writeCommon("overlaySessionId", Ba()) : this.writeCommon("overlaySessionId", "");
15248
15251
  })), this.onConnect(() => {
15249
15252
  const n = window.matchMedia("(orientation: portrait)"), a = (s) => {
15250
15253
  this.writeCommon("screenOrientation", s.matches ? Ca.PORTRAIT : Ca.LANDSCAPE);
@@ -15310,7 +15313,7 @@ function Ki(e, t, n) {
15310
15313
  running: m,
15311
15314
  resume: T,
15312
15315
  idle: f,
15313
- length: p,
15316
+ length: d,
15314
15317
  getQueue: y,
15315
15318
  unshift: I,
15316
15319
  empty: he,
@@ -15325,7 +15328,7 @@ function Ki(e, t, n) {
15325
15328
  function u() {
15326
15329
  l.paused = !0;
15327
15330
  }
15328
- function p() {
15331
+ function d() {
15329
15332
  for (var A = s, L = 0; A; )
15330
15333
  A = A.next, L++;
15331
15334
  return L;
@@ -15383,15 +15386,15 @@ function _h() {
15383
15386
  }
15384
15387
  function Eh(e, t, n) {
15385
15388
  typeof e == "function" && (n = t, t = e, e = null);
15386
- function a(u, p) {
15389
+ function a(u, d) {
15387
15390
  t.call(this, u).then(function(y) {
15388
- p(null, y);
15389
- }, p);
15391
+ d(null, y);
15392
+ }, d);
15390
15393
  }
15391
15394
  var s = Ki(e, a, n), r = s.push, o = s.unshift;
15392
15395
  return s.push = c, s.unshift = l, s.drained = m, s;
15393
15396
  function c(u) {
15394
- var p = new Promise(function(y, T) {
15397
+ var d = new Promise(function(y, T) {
15395
15398
  r(u, function(f, _) {
15396
15399
  if (f) {
15397
15400
  T(f);
@@ -15400,10 +15403,10 @@ function Eh(e, t, n) {
15400
15403
  y(_);
15401
15404
  });
15402
15405
  });
15403
- return p.catch(he), p;
15406
+ return d.catch(he), d;
15404
15407
  }
15405
15408
  function l(u) {
15406
- var p = new Promise(function(y, T) {
15409
+ var d = new Promise(function(y, T) {
15407
15410
  o(u, function(f, _) {
15408
15411
  if (f) {
15409
15412
  T(f);
@@ -15412,19 +15415,19 @@ function Eh(e, t, n) {
15412
15415
  y(_);
15413
15416
  });
15414
15417
  });
15415
- return p.catch(he), p;
15418
+ return d.catch(he), d;
15416
15419
  }
15417
15420
  function m() {
15418
15421
  if (s.idle())
15419
15422
  return new Promise(function(y) {
15420
15423
  y();
15421
15424
  });
15422
- var u = s.drain, p = new Promise(function(y) {
15425
+ var u = s.drain, d = new Promise(function(y) {
15423
15426
  s.drain = function() {
15424
15427
  u(), y();
15425
15428
  };
15426
15429
  });
15427
- return p;
15430
+ return d;
15428
15431
  }
15429
15432
  }
15430
15433
  Is.exports = Ki;
@@ -15443,21 +15446,21 @@ function bh(e) {
15443
15446
  var Wi = Number.isNaN || function(e) {
15444
15447
  return e !== e;
15445
15448
  };
15446
- function j() {
15447
- j.init.call(this);
15449
+ function K() {
15450
+ K.init.call(this);
15448
15451
  }
15449
- Ns.exports = j;
15452
+ Ns.exports = K;
15450
15453
  Ns.exports.once = Oh;
15451
- j.EventEmitter = j;
15452
- j.prototype._events = void 0;
15453
- j.prototype._eventsCount = 0;
15454
- j.prototype._maxListeners = void 0;
15454
+ K.EventEmitter = K;
15455
+ K.prototype._events = void 0;
15456
+ K.prototype._eventsCount = 0;
15457
+ K.prototype._maxListeners = void 0;
15455
15458
  var no = 10;
15456
15459
  function Wn(e) {
15457
15460
  if (typeof e != "function")
15458
15461
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e);
15459
15462
  }
15460
- Object.defineProperty(j, "defaultMaxListeners", {
15463
+ Object.defineProperty(K, "defaultMaxListeners", {
15461
15464
  enumerable: !0,
15462
15465
  get: function() {
15463
15466
  return no;
@@ -15468,21 +15471,21 @@ Object.defineProperty(j, "defaultMaxListeners", {
15468
15471
  no = e;
15469
15472
  }
15470
15473
  });
15471
- j.init = function() {
15474
+ K.init = function() {
15472
15475
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
15473
15476
  };
15474
- j.prototype.setMaxListeners = function(e) {
15477
+ K.prototype.setMaxListeners = function(e) {
15475
15478
  if (typeof e != "number" || e < 0 || Wi(e))
15476
15479
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
15477
15480
  return this._maxListeners = e, this;
15478
15481
  };
15479
15482
  function zi(e) {
15480
- return e._maxListeners === void 0 ? j.defaultMaxListeners : e._maxListeners;
15483
+ return e._maxListeners === void 0 ? K.defaultMaxListeners : e._maxListeners;
15481
15484
  }
15482
- j.prototype.getMaxListeners = function() {
15485
+ K.prototype.getMaxListeners = function() {
15483
15486
  return zi(this);
15484
15487
  };
15485
- j.prototype.emit = function(e) {
15488
+ K.prototype.emit = function(e) {
15486
15489
  for (var t = [], n = 1; n < arguments.length; n++) t.push(arguments[n]);
15487
15490
  var a = e === "error", s = this._events;
15488
15491
  if (s !== void 0)
@@ -15521,11 +15524,11 @@ function Ji(e, t, n, a) {
15521
15524
  }
15522
15525
  return e;
15523
15526
  }
15524
- j.prototype.addListener = function(e, t) {
15527
+ K.prototype.addListener = function(e, t) {
15525
15528
  return Ji(this, e, t, !1);
15526
15529
  };
15527
- j.prototype.on = j.prototype.addListener;
15528
- j.prototype.prependListener = function(e, t) {
15530
+ K.prototype.on = K.prototype.addListener;
15531
+ K.prototype.prependListener = function(e, t) {
15529
15532
  return Ji(this, e, t, !0);
15530
15533
  };
15531
15534
  function Ih() {
@@ -15536,13 +15539,13 @@ function Xi(e, t, n) {
15536
15539
  var a = { fired: !1, wrapFn: void 0, target: e, type: t, listener: n }, s = Ih.bind(a);
15537
15540
  return s.listener = n, a.wrapFn = s, s;
15538
15541
  }
15539
- j.prototype.once = function(e, t) {
15542
+ K.prototype.once = function(e, t) {
15540
15543
  return Wn(t), this.on(e, Xi(this, e, t)), this;
15541
15544
  };
15542
- j.prototype.prependOnceListener = function(e, t) {
15545
+ K.prototype.prependOnceListener = function(e, t) {
15543
15546
  return Wn(t), this.prependListener(e, Xi(this, e, t)), this;
15544
15547
  };
15545
- j.prototype.removeListener = function(e, t) {
15548
+ K.prototype.removeListener = function(e, t) {
15546
15549
  var n, a, s, r, o;
15547
15550
  if (Wn(t), a = this._events, a === void 0)
15548
15551
  return this;
@@ -15562,8 +15565,8 @@ j.prototype.removeListener = function(e, t) {
15562
15565
  }
15563
15566
  return this;
15564
15567
  };
15565
- j.prototype.off = j.prototype.removeListener;
15566
- j.prototype.removeAllListeners = function(e) {
15568
+ K.prototype.off = K.prototype.removeListener;
15569
+ K.prototype.removeAllListeners = function(e) {
15567
15570
  var t, n, a;
15568
15571
  if (n = this._events, n === void 0)
15569
15572
  return this;
@@ -15589,16 +15592,16 @@ function Zi(e, t, n) {
15589
15592
  var s = a[t];
15590
15593
  return s === void 0 ? [] : typeof s == "function" ? n ? [s.listener || s] : [s] : n ? vh(s) : tc(s, s.length);
15591
15594
  }
15592
- j.prototype.listeners = function(e) {
15595
+ K.prototype.listeners = function(e) {
15593
15596
  return Zi(this, e, !0);
15594
15597
  };
15595
- j.prototype.rawListeners = function(e) {
15598
+ K.prototype.rawListeners = function(e) {
15596
15599
  return Zi(this, e, !1);
15597
15600
  };
15598
- j.listenerCount = function(e, t) {
15601
+ K.listenerCount = function(e, t) {
15599
15602
  return typeof e.listenerCount == "function" ? e.listenerCount(t) : ec.call(e, t);
15600
15603
  };
15601
- j.prototype.listenerCount = ec;
15604
+ K.prototype.listenerCount = ec;
15602
15605
  function ec(e) {
15603
15606
  var t = this._events;
15604
15607
  if (t !== void 0) {
@@ -15610,7 +15613,7 @@ function ec(e) {
15610
15613
  }
15611
15614
  return 0;
15612
15615
  }
15613
- j.prototype.eventNames = function() {
15616
+ K.prototype.eventNames = function() {
15614
15617
  return this._eventsCount > 0 ? En(this._events) : [];
15615
15618
  };
15616
15619
  function tc(e, t) {
@@ -15927,22 +15930,22 @@ var oS = function e(t) {
15927
15930
  var n = dS(e), a = n.length > 0 ? n[0] : "", s = pS("%" + a + "%", t), r = s.name, o = s.value, c = !1, l = s.alias;
15928
15931
  l && (a = l[0], cS(n, iS([0, 1], l)));
15929
15932
  for (var m = 1, u = !0; m < n.length; m += 1) {
15930
- var p = n[m], y = Cn(p, 0, 1), T = Cn(p, -1);
15933
+ var d = n[m], y = Cn(d, 0, 1), T = Cn(d, -1);
15931
15934
  if ((y === '"' || y === "'" || y === "`" || T === '"' || T === "'" || T === "`") && y !== T)
15932
15935
  throw new Ut("property names with quotes must have matching quotes");
15933
- if ((p === "constructor" || !u) && (c = !0), a += "." + p, r = "%" + a + "%", Dn(gt, r))
15936
+ if ((d === "constructor" || !u) && (c = !0), a += "." + d, r = "%" + a + "%", Dn(gt, r))
15934
15937
  o = gt[r];
15935
15938
  else if (o != null) {
15936
- if (!(p in o)) {
15939
+ if (!(d in o)) {
15937
15940
  if (!t)
15938
15941
  throw new Mt("base intrinsic for " + e + " exists, but the property is not available.");
15939
15942
  return;
15940
15943
  }
15941
15944
  if (yt && m + 1 >= n.length) {
15942
- var f = yt(o, p);
15943
- u = !!f, u && "get" in f && !("originalValue" in f.get) ? o = f.get : o = o[p];
15945
+ var f = yt(o, d);
15946
+ u = !!f, u && "get" in f && !("originalValue" in f.get) ? o = f.get : o = o[d];
15944
15947
  } else
15945
- u = Dn(o, p), o = o[p];
15948
+ u = Dn(o, d), o = o[d];
15946
15949
  u && !c && (gt[r] = o);
15947
15950
  }
15948
15951
  }
@@ -16030,13 +16033,13 @@ var fS = lc, kS = sn, mo = gS, hS = fS(), uo = Zn, po = Xn, SS = kS("%Math.floor
16030
16033
  };
16031
16034
  (function(e) {
16032
16035
  var t = vs, n = sn, a = _S, s = Xn, r = n("%Function.prototype.apply%"), o = n("%Function.prototype.call%"), c = n("%Reflect.apply%", !0) || t.call(o, r), l = Os(), m = n("%Math.max%");
16033
- e.exports = function(p) {
16034
- if (typeof p != "function")
16036
+ e.exports = function(d) {
16037
+ if (typeof d != "function")
16035
16038
  throw new s("a function is required");
16036
16039
  var y = c(t, o, arguments);
16037
16040
  return a(
16038
16041
  y,
16039
- 1 + m(0, p.length - (arguments.length - 1)),
16042
+ 1 + m(0, d.length - (arguments.length - 1)),
16040
16043
  !0
16041
16044
  );
16042
16045
  };
@@ -16289,7 +16292,7 @@ var o_ = function(e) {
16289
16292
  function r(S) {
16290
16293
  return S.call.bind(S);
16291
16294
  }
16292
- var o = typeof BigInt < "u", c = typeof Symbol < "u", l = r(Object.prototype.toString), m = r(Number.prototype.valueOf), u = r(String.prototype.valueOf), p = r(Boolean.prototype.valueOf);
16295
+ var o = typeof BigInt < "u", c = typeof Symbol < "u", l = r(Object.prototype.toString), m = r(Number.prototype.valueOf), u = r(String.prototype.valueOf), d = r(Boolean.prototype.valueOf);
16293
16296
  if (o)
16294
16297
  var y = r(BigInt.prototype.valueOf);
16295
16298
  if (c)
@@ -16344,14 +16347,14 @@ var o_ = function(e) {
16344
16347
  return a(S) === "Float32Array";
16345
16348
  }
16346
16349
  e.isFloat32Array = C;
16347
- function K(S) {
16350
+ function H(S) {
16348
16351
  return a(S) === "Float64Array";
16349
16352
  }
16350
- e.isFloat64Array = K;
16351
- function ne(S) {
16353
+ e.isFloat64Array = H;
16354
+ function J(S) {
16352
16355
  return a(S) === "BigInt64Array";
16353
16356
  }
16354
- e.isBigInt64Array = ne;
16357
+ e.isBigInt64Array = J;
16355
16358
  function $(S) {
16356
16359
  return a(S) === "BigUint64Array";
16357
16360
  }
@@ -16368,10 +16371,10 @@ var o_ = function(e) {
16368
16371
  return l(S) === "[object Set]";
16369
16372
  }
16370
16373
  V.working = typeof Set < "u" && V(/* @__PURE__ */ new Set());
16371
- function X(S) {
16374
+ function Z(S) {
16372
16375
  return typeof Set > "u" ? !1 : V.working ? V(S) : S instanceof Set;
16373
16376
  }
16374
- e.isSet = X;
16377
+ e.isSet = Z;
16375
16378
  function Ge(S) {
16376
16379
  return l(S) === "[object WeakMap]";
16377
16380
  }
@@ -16424,10 +16427,10 @@ var o_ = function(e) {
16424
16427
  return l(S) === "[object Set Iterator]";
16425
16428
  }
16426
16429
  e.isSetIterator = q;
16427
- function Q(S) {
16430
+ function Y(S) {
16428
16431
  return l(S) === "[object Generator]";
16429
16432
  }
16430
- e.isGeneratorObject = Q;
16433
+ e.isGeneratorObject = Y;
16431
16434
  function ve(S) {
16432
16435
  return l(S) === "[object WebAssembly.Module]";
16433
16436
  }
@@ -16441,7 +16444,7 @@ var o_ = function(e) {
16441
16444
  }
16442
16445
  e.isStringObject = rn;
16443
16446
  function St(S) {
16444
- return f(S, p);
16447
+ return f(S, d);
16445
16448
  }
16446
16449
  e.isBooleanObject = St;
16447
16450
  function on(S) {
@@ -16501,10 +16504,10 @@ var d_ = es.exports;
16501
16504
  k.push(o(arguments[v]));
16502
16505
  return k.join(" ");
16503
16506
  }
16504
- for (var v = 1, M = arguments, z = M.length, x = String(g).replace(n, function(Q) {
16505
- if (Q === "%%") return "%";
16506
- if (v >= z) return Q;
16507
- switch (Q) {
16507
+ for (var v = 1, M = arguments, z = M.length, x = String(g).replace(n, function(Y) {
16508
+ if (Y === "%%") return "%";
16509
+ if (v >= z) return Y;
16510
+ switch (Y) {
16508
16511
  case "%s":
16509
16512
  return String(M[v++]);
16510
16513
  case "%d":
@@ -16516,10 +16519,10 @@ var d_ = es.exports;
16516
16519
  return "[Circular]";
16517
16520
  }
16518
16521
  default:
16519
- return Q;
16522
+ return Y;
16520
16523
  }
16521
16524
  }), U = M[v]; v < z; U = M[++v])
16522
- E(U) || !K(U) ? x += " " + U : x += " " + o(U);
16525
+ E(U) || !H(U) ? x += " " + U : x += " " + o(U);
16523
16526
  return x;
16524
16527
  }, e.deprecate = function(g, k) {
16525
16528
  if (typeof D < "u" && D.noDeprecation === !0)
@@ -16609,7 +16612,7 @@ var d_ = es.exports;
16609
16612
  var M = k.inspect(v, g);
16610
16613
  return A(M) || (M = u(g, M, v)), M;
16611
16614
  }
16612
- var z = p(g, k);
16615
+ var z = d(g, k);
16613
16616
  if (z)
16614
16617
  return z;
16615
16618
  var x = Object.keys(k), U = m(x);
@@ -16622,27 +16625,27 @@ var d_ = es.exports;
16622
16625
  }
16623
16626
  if (C(k))
16624
16627
  return g.stylize(RegExp.prototype.toString.call(k), "regexp");
16625
- if (ne(k))
16628
+ if (J(k))
16626
16629
  return g.stylize(Date.prototype.toString.call(k), "date");
16627
16630
  if ($(k))
16628
16631
  return y(k);
16629
16632
  }
16630
- var Q = "", ve = !1, ot = ["{", "}"];
16633
+ var Y = "", ve = !1, ot = ["{", "}"];
16631
16634
  if (I(k) && (ve = !0, ot = ["[", "]"]), W(k)) {
16632
16635
  var rn = k.name ? ": " + k.name : "";
16633
- Q = " [Function" + rn + "]";
16636
+ Y = " [Function" + rn + "]";
16634
16637
  }
16635
- if (C(k) && (Q = " " + RegExp.prototype.toString.call(k)), ne(k) && (Q = " " + Date.prototype.toUTCString.call(k)), $(k) && (Q = " " + y(k)), x.length === 0 && (!ve || k.length == 0))
16636
- return ot[0] + Q + ot[1];
16638
+ if (C(k) && (Y = " " + RegExp.prototype.toString.call(k)), J(k) && (Y = " " + Date.prototype.toUTCString.call(k)), $(k) && (Y = " " + y(k)), x.length === 0 && (!ve || k.length == 0))
16639
+ return ot[0] + Y + ot[1];
16637
16640
  if (v < 0)
16638
16641
  return C(k) ? g.stylize(RegExp.prototype.toString.call(k), "regexp") : g.stylize("[Object]", "special");
16639
16642
  g.seen.push(k);
16640
16643
  var St;
16641
16644
  return ve ? St = T(g, k, v, U, x) : St = x.map(function(on) {
16642
16645
  return f(g, k, v, U, on, ve);
16643
- }), g.seen.pop(), _(St, Q, ot);
16646
+ }), g.seen.pop(), _(St, Y, ot);
16644
16647
  }
16645
- function p(g, k) {
16648
+ function d(g, k) {
16646
16649
  if (N(k))
16647
16650
  return g.stylize("undefined", "undefined");
16648
16651
  if (A(k)) {
@@ -16669,20 +16672,20 @@ var d_ = es.exports;
16669
16672
  String(U),
16670
16673
  !0
16671
16674
  )) : x.push("");
16672
- return z.forEach(function(Q) {
16673
- Q.match(/^\d+$/) || x.push(f(
16675
+ return z.forEach(function(Y) {
16676
+ Y.match(/^\d+$/) || x.push(f(
16674
16677
  g,
16675
16678
  k,
16676
16679
  v,
16677
16680
  M,
16678
- Q,
16681
+ Y,
16679
16682
  !0
16680
16683
  ));
16681
16684
  }), x;
16682
16685
  }
16683
16686
  function f(g, k, v, M, z, x) {
16684
- var U, q, Q;
16685
- if (Q = Object.getOwnPropertyDescriptor(k, z) || { value: k[z] }, Q.get ? Q.set ? q = g.stylize("[Getter/Setter]", "special") : q = g.stylize("[Getter]", "special") : Q.set && (q = g.stylize("[Setter]", "special")), ze(M, z) || (U = "[" + z + "]"), q || (g.seen.indexOf(Q.value) < 0 ? (E(v) ? q = u(g, Q.value, null) : q = u(g, Q.value, v - 1), q.indexOf(`
16687
+ var U, q, Y;
16688
+ if (Y = Object.getOwnPropertyDescriptor(k, z) || { value: k[z] }, Y.get ? Y.set ? q = g.stylize("[Getter/Setter]", "special") : q = g.stylize("[Getter]", "special") : Y.set && (q = g.stylize("[Setter]", "special")), ze(M, z) || (U = "[" + z + "]"), q || (g.seen.indexOf(Y.value) < 0 ? (E(v) ? q = u(g, Y.value, null) : q = u(g, Y.value, v - 1), q.indexOf(`
16686
16689
  `) > -1 && (x ? q = q.split(`
16687
16690
  `).map(function(ve) {
16688
16691
  return " " + ve;
@@ -16742,19 +16745,19 @@ var d_ = es.exports;
16742
16745
  }
16743
16746
  e.isUndefined = N;
16744
16747
  function C(g) {
16745
- return K(g) && V(g) === "[object RegExp]";
16748
+ return H(g) && V(g) === "[object RegExp]";
16746
16749
  }
16747
16750
  e.isRegExp = C, e.types.isRegExp = C;
16748
- function K(g) {
16751
+ function H(g) {
16749
16752
  return typeof g == "object" && g !== null;
16750
16753
  }
16751
- e.isObject = K;
16752
- function ne(g) {
16753
- return K(g) && V(g) === "[object Date]";
16754
+ e.isObject = H;
16755
+ function J(g) {
16756
+ return H(g) && V(g) === "[object Date]";
16754
16757
  }
16755
- e.isDate = ne, e.types.isDate = ne;
16758
+ e.isDate = J, e.types.isDate = J;
16756
16759
  function $(g) {
16757
- return K(g) && (V(g) === "[object Error]" || g instanceof Error);
16760
+ return H(g) && (V(g) === "[object Error]" || g instanceof Error);
16758
16761
  }
16759
16762
  e.isError = $, e.types.isNativeError = $;
16760
16763
  function W(g) {
@@ -16769,7 +16772,7 @@ var d_ = es.exports;
16769
16772
  function V(g) {
16770
16773
  return Object.prototype.toString.call(g);
16771
16774
  }
16772
- function X(g) {
16775
+ function Z(g) {
16773
16776
  return g < 10 ? "0" + g.toString(10) : g.toString(10);
16774
16777
  }
16775
16778
  var Ge = [
@@ -16788,16 +16791,16 @@ var d_ = es.exports;
16788
16791
  ];
16789
16792
  function qt() {
16790
16793
  var g = /* @__PURE__ */ new Date(), k = [
16791
- X(g.getHours()),
16792
- X(g.getMinutes()),
16793
- X(g.getSeconds())
16794
+ Z(g.getHours()),
16795
+ Z(g.getMinutes()),
16796
+ Z(g.getSeconds())
16794
16797
  ].join(":");
16795
16798
  return [g.getDate(), Ge[g.getMonth()], k].join(" ");
16796
16799
  }
16797
16800
  e.log = function() {
16798
16801
  console.log("%s - %s", qt(), e.format.apply(e, arguments));
16799
16802
  }, e.inherits = d_, e._extend = function(g, k) {
16800
- if (!k || !K(k)) return g;
16803
+ if (!k || !H(k)) return g;
16801
16804
  for (var v = Object.keys(k), M = v.length; M--; )
16802
16805
  g[v[M]] = k[v[M]];
16803
16806
  return g;
@@ -16821,12 +16824,12 @@ var d_ = es.exports;
16821
16824
  }), k;
16822
16825
  }
16823
16826
  function k() {
16824
- for (var v, M, z = new Promise(function(q, Q) {
16825
- v = q, M = Q;
16827
+ for (var v, M, z = new Promise(function(q, Y) {
16828
+ v = q, M = Y;
16826
16829
  }), x = [], U = 0; U < arguments.length; U++)
16827
16830
  x.push(arguments[U]);
16828
- x.push(function(q, Q) {
16829
- q ? M(q) : v(Q);
16831
+ x.push(function(q, Y) {
16832
+ q ? M(q) : v(Y);
16830
16833
  });
16831
16834
  try {
16832
16835
  g.apply(this, x);
@@ -16937,8 +16940,8 @@ var Sc = {
16937
16940
  ` + n + (r.length ? s("│") : " ") + " ";
16938
16941
  return n + o.join(c) + `
16939
16942
  ` + r.map(function(l, m) {
16940
- var u = m === r.length - 1, p = l.nodes && l.nodes.length, y = n + (u ? " " : s("│")) + " ";
16941
- return n + s(u ? "└" : "├") + s("─") + s(p ? "┬" : "─") + " " + e(l, y, a).slice(n.length + 2);
16943
+ var u = m === r.length - 1, d = l.nodes && l.nodes.length, y = n + (u ? " " : s("│")) + " ";
16944
+ return n + s(u ? "└" : "├") + s("─") + s(d ? "┬" : "─") + " " + e(l, y, a).slice(n.length + 2);
16942
16945
  }).join("");
16943
16946
  };
16944
16947
  const y_ = T_, ko = Symbol("avvio.TimeTree.untrackNode"), Ia = Symbol("avvio.TimeTree.trackNode"), ho = Symbol("avvio.TimeTree.getParent"), So = Symbol("avvio.TimeTree.getNode"), _o = Symbol("avvio.TimeTree.addNode");
@@ -17004,24 +17007,24 @@ function k_() {
17004
17007
  if (Eo) return Na;
17005
17008
  Eo = 1;
17006
17009
  var e = 1e3, t = e * 60, n = t * 60, a = n * 24, s = a * 7, r = a * 365.25;
17007
- Na = function(u, p) {
17008
- p = p || {};
17010
+ Na = function(u, d) {
17011
+ d = d || {};
17009
17012
  var y = typeof u;
17010
17013
  if (y === "string" && u.length > 0)
17011
17014
  return o(u);
17012
17015
  if (y === "number" && isFinite(u))
17013
- return p.long ? l(u) : c(u);
17016
+ return d.long ? l(u) : c(u);
17014
17017
  throw new Error(
17015
17018
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(u)
17016
17019
  );
17017
17020
  };
17018
17021
  function o(u) {
17019
17022
  if (u = String(u), !(u.length > 100)) {
17020
- var p = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
17023
+ var d = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
17021
17024
  u
17022
17025
  );
17023
- if (p) {
17024
- var y = parseFloat(p[1]), T = (p[2] || "ms").toLowerCase();
17026
+ if (d) {
17027
+ var y = parseFloat(d[1]), T = (d[2] || "ms").toLowerCase();
17025
17028
  switch (T) {
17026
17029
  case "years":
17027
17030
  case "year":
@@ -17068,15 +17071,15 @@ function k_() {
17068
17071
  }
17069
17072
  }
17070
17073
  function c(u) {
17071
- var p = Math.abs(u);
17072
- return p >= a ? Math.round(u / a) + "d" : p >= n ? Math.round(u / n) + "h" : p >= t ? Math.round(u / t) + "m" : p >= e ? Math.round(u / e) + "s" : u + "ms";
17074
+ var d = Math.abs(u);
17075
+ return d >= a ? Math.round(u / a) + "d" : d >= n ? Math.round(u / n) + "h" : d >= t ? Math.round(u / t) + "m" : d >= e ? Math.round(u / e) + "s" : u + "ms";
17073
17076
  }
17074
17077
  function l(u) {
17075
- var p = Math.abs(u);
17076
- return p >= a ? m(u, p, a, "day") : p >= n ? m(u, p, n, "hour") : p >= t ? m(u, p, t, "minute") : p >= e ? m(u, p, e, "second") : u + " ms";
17078
+ var d = Math.abs(u);
17079
+ return d >= a ? m(u, d, a, "day") : d >= n ? m(u, d, n, "hour") : d >= t ? m(u, d, t, "minute") : d >= e ? m(u, d, e, "second") : u + " ms";
17077
17080
  }
17078
- function m(u, p, y, T) {
17079
- var f = p >= y * 1.5;
17081
+ function m(u, d, y, T) {
17082
+ var f = d >= y * 1.5;
17080
17083
  return Math.round(u / y) + " " + T + (f ? "s" : "");
17081
17084
  }
17082
17085
  return Na;
@@ -17086,19 +17089,19 @@ function h_(e) {
17086
17089
  n[u] = e[u];
17087
17090
  }), n.names = [], n.skips = [], n.formatters = {};
17088
17091
  function t(u) {
17089
- let p = 0;
17092
+ let d = 0;
17090
17093
  for (let y = 0; y < u.length; y++)
17091
- p = (p << 5) - p + u.charCodeAt(y), p |= 0;
17092
- return n.colors[Math.abs(p) % n.colors.length];
17094
+ d = (d << 5) - d + u.charCodeAt(y), d |= 0;
17095
+ return n.colors[Math.abs(d) % n.colors.length];
17093
17096
  }
17094
17097
  n.selectColor = t;
17095
17098
  function n(u) {
17096
- let p, y = null, T, f;
17099
+ let d, y = null, T, f;
17097
17100
  function _(...I) {
17098
17101
  if (!_.enabled)
17099
17102
  return;
17100
- const b = _, E = Number(/* @__PURE__ */ new Date()), w = E - (p || E);
17101
- b.diff = w, b.prev = p, b.curr = E, p = E, I[0] = n.coerce(I[0]), typeof I[0] != "string" && I.unshift("%O");
17103
+ const b = _, E = Number(/* @__PURE__ */ new Date()), w = E - (d || E);
17104
+ b.diff = w, b.prev = d, b.curr = E, d = E, I[0] = n.coerce(I[0]), typeof I[0] != "string" && I.unshift("%O");
17102
17105
  let O = 0;
17103
17106
  I[0] = I[0].replace(/%([a-zA-Z%])/g, (A, L) => {
17104
17107
  if (A === "%%")
@@ -17121,33 +17124,33 @@ function h_(e) {
17121
17124
  }
17122
17125
  }), typeof n.init == "function" && n.init(_), _;
17123
17126
  }
17124
- function a(u, p) {
17125
- const y = n(this.namespace + (typeof p > "u" ? ":" : p) + u);
17127
+ function a(u, d) {
17128
+ const y = n(this.namespace + (typeof d > "u" ? ":" : d) + u);
17126
17129
  return y.log = this.log, y;
17127
17130
  }
17128
17131
  function s(u) {
17129
17132
  n.save(u), n.namespaces = u, n.names = [], n.skips = [];
17130
- let p;
17133
+ let d;
17131
17134
  const y = (typeof u == "string" ? u : "").split(/[\s,]+/), T = y.length;
17132
- for (p = 0; p < T; p++)
17133
- y[p] && (u = y[p].replace(/\*/g, ".*?"), u[0] === "-" ? n.skips.push(new RegExp("^" + u.slice(1) + "$")) : n.names.push(new RegExp("^" + u + "$")));
17135
+ for (d = 0; d < T; d++)
17136
+ y[d] && (u = y[d].replace(/\*/g, ".*?"), u[0] === "-" ? n.skips.push(new RegExp("^" + u.slice(1) + "$")) : n.names.push(new RegExp("^" + u + "$")));
17134
17137
  }
17135
17138
  function r() {
17136
17139
  const u = [
17137
17140
  ...n.names.map(c),
17138
- ...n.skips.map(c).map((p) => "-" + p)
17141
+ ...n.skips.map(c).map((d) => "-" + d)
17139
17142
  ].join(",");
17140
17143
  return n.enable(""), u;
17141
17144
  }
17142
17145
  function o(u) {
17143
17146
  if (u[u.length - 1] === "*")
17144
17147
  return !0;
17145
- let p, y;
17146
- for (p = 0, y = n.skips.length; p < y; p++)
17147
- if (n.skips[p].test(u))
17148
+ let d, y;
17149
+ for (d = 0, y = n.skips.length; d < y; d++)
17150
+ if (n.skips[d].test(u))
17148
17151
  return !1;
17149
- for (p = 0, y = n.names.length; p < y; p++)
17150
- if (n.names[p].test(u))
17152
+ for (d = 0, y = n.names.length; d < y; d++)
17153
+ if (n.names[d].test(u))
17151
17154
  return !0;
17152
17155
  return !1;
17153
17156
  }
@@ -17259,10 +17262,10 @@ var S_ = h_;
17259
17262
  return;
17260
17263
  const m = "color: " + this.color;
17261
17264
  l.splice(1, 0, m, "color: inherit");
17262
- let u = 0, p = 0;
17265
+ let u = 0, d = 0;
17263
17266
  l[0].replace(/%[a-zA-Z%]/g, (y) => {
17264
- y !== "%%" && (u++, y === "%c" && (p = u));
17265
- }), l.splice(p, 0, m);
17267
+ y !== "%%" && (u++, y === "%c" && (d = u));
17268
+ }), l.splice(d, 0, m);
17266
17269
  }
17267
17270
  t.log = console.debug || console.log || (() => {
17268
17271
  });
@@ -17502,8 +17505,8 @@ ce.prototype._addPlugin = function(e, t, n) {
17502
17505
  const a = this._current[0], s = new ns(this, e, t, n);
17503
17506
  if (s.once("start", (r, o, c) => {
17504
17507
  const l = this.pluginTree.start(a.name, o, c);
17505
- s.once("loaded", (m, u, p) => {
17506
- this.pluginTree.stop(l, p);
17508
+ s.once("loaded", (m, u, d) => {
17509
+ this.pluginTree.stop(l, d);
17507
17510
  });
17508
17511
  }), a.loaded)
17509
17512
  throw new Error(s.name, a.name);
@@ -17694,23 +17697,23 @@ const K_ = ({
17694
17697
  return Rc(() => {
17695
17698
  let m = !1;
17696
17699
  if (!e)
17697
- return console.error("streamlayer sdk key should be provided"), l((p) => (p !== null && typeof p.disableApp == "function" && p.disableApp(), null)), () => {
17700
+ return console.error("streamlayer sdk key should be provided"), l((d) => (d !== null && typeof d.disableApp == "function" && d.disableApp(), null)), () => {
17698
17701
  m = !0;
17699
17702
  };
17700
17703
  const u = Q_(e, n, a, {
17701
- version: "1.3.0",
17704
+ version: "1.3.2",
17702
17705
  onDeepLinkHandled: s,
17703
17706
  videoPlayerController: r,
17704
17707
  onContentActivate: o
17705
17708
  });
17706
17709
  if (t)
17707
- for (const p of t)
17708
- u.use(p);
17709
- return u.ready().then((p) => {
17710
- m || (l(p.sdk), typeof window < "u");
17711
- }).catch((p) => console.log(p)), () => {
17712
- m = !0, u.close(function(p) {
17713
- if (p) throw p;
17710
+ for (const d of t)
17711
+ u.use(d);
17712
+ return u.ready().then((d) => {
17713
+ m || (l(d.sdk), typeof window < "u");
17714
+ }).catch((d) => console.log(d)), () => {
17715
+ m = !0, u.close(function(d) {
17716
+ if (d) throw d;
17714
17717
  });
17715
17718
  };
17716
17719
  }, [e, n]), c;
@@ -17718,15 +17721,18 @@ const K_ = ({
17718
17721
  export {
17719
17722
  P as C,
17720
17723
  Fa as I,
17724
+ cm as N,
17721
17725
  Ze as P,
17722
17726
  G as Q,
17723
- Y as S,
17724
- pm as a,
17725
- ft as b,
17726
- ae as c,
17727
- Yt as d,
17728
- ur as e,
17727
+ j as S,
17728
+ Tm as a,
17729
+ lm as b,
17730
+ pm as c,
17731
+ ft as d,
17732
+ ae as e,
17733
+ Yt as f,
17729
17734
  Yr as g,
17735
+ ur as h,
17730
17736
  Zc as p,
17731
17737
  K_ as u
17732
17738
  };