@streamlayer/react 1.8.5 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -141,8 +141,8 @@ function Hc(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, d = -1, y = e && e.length || 0, T = 0; T < y; ) {
145
- if (e.charCodeAt(T) === 37 && T + 1 < y) {
144
+ for (var m = "", u = 1 - s, d = -1, f = e && e.length || 0, T = 0; T < f; ) {
145
+ if (e.charCodeAt(T) === 37 && T + 1 < f) {
146
146
  switch (d = d > -1 ? d : 0, e.charCodeAt(T + 1)) {
147
147
  case 100:
148
148
  case 102:
@@ -158,12 +158,12 @@ function Hc(e, t, n) {
158
158
  case 106:
159
159
  if (u >= l || t[u] === void 0) break;
160
160
  d < T && (m += e.slice(d, T));
161
- var f = typeof t[u];
162
- if (f === "string") {
161
+ var y = typeof t[u];
162
+ if (y === "string") {
163
163
  m += "'" + t[u] + "'", d = T + 2, T++;
164
164
  break;
165
165
  }
166
- if (f === "function") {
166
+ if (y === "function") {
167
167
  m += t[u].name || "<anonymous>", d = T + 2, T++;
168
168
  break;
169
169
  }
@@ -182,7 +182,7 @@ function Hc(e, t, n) {
182
182
  }
183
183
  ++T;
184
184
  }
185
- return d === -1 ? e : (d < y && (m += e.slice(d)), m);
185
+ return d === -1 ? e : (d < f && (m += e.slice(d)), m);
186
186
  }
187
187
  const xs = xc;
188
188
  os.exports = $e;
@@ -244,7 +244,7 @@ function $e(e) {
244
244
  m.log || (m.log = wt), jc(m, c, n), Hs({}, m), Object.defineProperty(m, "levelVal", {
245
245
  get: d
246
246
  }), Object.defineProperty(m, "level", {
247
- get: y,
247
+ get: f,
248
248
  set: T
249
249
  });
250
250
  const u = {
@@ -258,12 +258,12 @@ function $e(e) {
258
258
  onChild: e.onChild || wt
259
259
  };
260
260
  m.levels = Kc(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 = o, m.child = function(..._) {
261
- return f.call(this, u, ..._);
261
+ return y.call(this, u, ..._);
262
262
  }, t && (m._logEvent = Da());
263
263
  function d() {
264
264
  return An(this.level, this);
265
265
  }
266
- function y() {
266
+ function f() {
267
267
  return this._level;
268
268
  }
269
269
  function T(_) {
@@ -273,7 +273,7 @@ function $e(e) {
273
273
  it(this, u, m, N);
274
274
  });
275
275
  }
276
- function f(_, N, E) {
276
+ function y(_, N, E) {
277
277
  if (!N)
278
278
  throw new Error("missing bindings for child Pino");
279
279
  E = E || {}, s && N.serializers && (E.serializers = N.serializers);
@@ -290,7 +290,7 @@ function $e(e) {
290
290
  A.prototype = this;
291
291
  const L = new A(this);
292
292
  return Hs(this, L), L.child = function(...v) {
293
- return f.call(this, _, ...v);
293
+ return y.call(this, _, ...v);
294
294
  }, L.level = E.level || this.level, _.onChild(L), L;
295
295
  }
296
296
  return m;
@@ -363,8 +363,8 @@ function Xc(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 && (is(c, this._serialize, this.serializers, this._stdErrSerialize), u = !0), t.asObject || t.formatters ? s.call(l, Zc(this, a, c, r, t)) : s.apply(l, c), t.transmit) {
366
- const d = t.transmit.level || e._level, y = n.levels.values[d], T = n.levels.values[a];
367
- if (T < y) return;
366
+ const d = t.transmit.level || e._level, f = n.levels.values[d], T = n.levels.values[a];
367
+ if (T < f) return;
368
368
  el(this, {
369
369
  ts: r,
370
370
  methodLevel: a,
@@ -381,13 +381,13 @@ function Xc(e, t, n, a) {
381
381
  function Zc(e, t, n, a, s) {
382
382
  const {
383
383
  level: o,
384
- log: r = (y) => y
384
+ log: r = (f) => f
385
385
  } = s.formatters || {}, c = n.slice();
386
386
  let l = c[0];
387
387
  const m = {};
388
388
  if (a && (m.time = a), o) {
389
- const y = o(t, e.levels.values[t]);
390
- Object.assign(m, y);
389
+ const f = o(t, e.levels.values[t]);
390
+ Object.assign(m, f);
391
391
  } else
392
392
  m.level = e.levels.values[t];
393
393
  let u = (e._childLevel | 0) + 1;
@@ -1441,8 +1441,8 @@ function Al() {
1441
1441
  const u = o.findExtension(r.substring(1, r.length - 1));
1442
1442
  if (u && u.extendee.typeName == e.typeName) {
1443
1443
  m = !0;
1444
- const [d, y] = Hr(u);
1445
- Js(d, c, u.field, n, u), Il(a, u, y(), n);
1444
+ const [d, f] = Hr(u);
1445
+ Js(d, c, u.field, n, u), Il(a, u, f(), n);
1446
1446
  }
1447
1447
  }
1448
1448
  if (!m && !n.ignoreUnknownFields)
@@ -1559,8 +1559,8 @@ function Js(e, t, n, a, s) {
1559
1559
  try {
1560
1560
  r[m] = jt(n.V.T, l, tt.BIGINT, !0);
1561
1561
  } catch (d) {
1562
- let y = `cannot decode map value for field ${s.typeName}.${n.name} from JSON: ${Re(t)}`;
1563
- throw d instanceof Error && d.message.length > 0 && (y += `: ${d.message}`), new Error(y);
1562
+ let f = `cannot decode map value for field ${s.typeName}.${n.name} from JSON: ${Re(t)}`;
1563
+ throw d instanceof Error && d.message.length > 0 && (f += `: ${d.message}`), new Error(f);
1564
1564
  }
1565
1565
  break;
1566
1566
  }
@@ -1860,13 +1860,13 @@ function to(e, t, n, a, s) {
1860
1860
  const c = n.kind == "enum" ? h.INT32 : n.T;
1861
1861
  let l = Rn;
1862
1862
  if (n.kind == "scalar" && n.L > 0 && (l = Cl), o) {
1863
- let y = e[r];
1863
+ let f = e[r];
1864
1864
  if (a == Z.LengthDelimited && c != h.STRING && c != h.BYTES) {
1865
- let f = t.uint32() + t.pos;
1866
- for (; t.pos < f; )
1867
- y.push(l(t, c));
1865
+ let y = t.uint32() + t.pos;
1866
+ for (; t.pos < y; )
1867
+ f.push(l(t, c));
1868
1868
  } else
1869
- y.push(l(t, c));
1869
+ f.push(l(t, c));
1870
1870
  } else
1871
1871
  e[r] = l(t, c);
1872
1872
  break;
@@ -2094,16 +2094,16 @@ function Gl() {
2094
2094
  case "scalar":
2095
2095
  case "enum":
2096
2096
  if (a.V.T === h.BYTES)
2097
- for (const [T, f] of Object.entries(r[s]))
2098
- o[s][T] = xt(f);
2097
+ for (const [T, y] of Object.entries(r[s]))
2098
+ o[s][T] = xt(y);
2099
2099
  else
2100
2100
  Object.assign(o[s], r[s]);
2101
2101
  break;
2102
2102
  case "message":
2103
- const y = a.V.T;
2103
+ const f = a.V.T;
2104
2104
  for (const T of Object.keys(r[s])) {
2105
- let f = r[s][T];
2106
- y.fieldWrapper || (f = new y(f)), o[s][T] = f;
2105
+ let y = r[s][T];
2106
+ f.fieldWrapper || (y = new f(y)), o[s][T] = y;
2107
2107
  }
2108
2108
  break;
2109
2109
  }
@@ -2111,10 +2111,10 @@ function Gl() {
2111
2111
  case "message":
2112
2112
  const d = a.T;
2113
2113
  if (a.repeated)
2114
- o[s] = r[s].map((y) => dt(y, d) ? y : new d(y));
2114
+ o[s] = r[s].map((f) => dt(f, d) ? f : new d(f));
2115
2115
  else {
2116
- const y = r[s];
2117
- d.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ d.typeName === "google.protobuf.BytesValue" ? o[s] = xt(y) : o[s] = y : o[s] = dt(y, d) ? y : new d(y);
2116
+ const f = r[s];
2117
+ d.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ d.typeName === "google.protobuf.BytesValue" ? o[s] = xt(f) : o[s] = f : o[s] = dt(f, d) ? f : new d(f);
2118
2118
  }
2119
2119
  break;
2120
2120
  }
@@ -2348,8 +2348,8 @@ function Kl(e, t) {
2348
2348
  for (const u of typeof e == "function" ? e() : e) {
2349
2349
  const d = u;
2350
2350
  if (d.localName = Wr(u.name, u.oneof !== void 0), d.jsonName = (n = u.jsonName) !== null && n !== void 0 ? n : xl(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 = (o = u.delimited) !== null && o !== void 0 ? o : !1, d.req = (r = u.req) !== null && r !== void 0 ? r : !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
- const y = typeof u.oneof == "string" ? u.oneof : u.oneof.name;
2352
- (!m || m.name != y) && (m = new $l(y)), d.oneof = m, m.addField(d);
2351
+ const f = typeof u.oneof == "string" ? u.oneof : u.oneof.name;
2352
+ (!m || m.name != f) && (m = new $l(f)), d.oneof = m, m.addField(d);
2353
2353
  }
2354
2354
  l.push(d);
2355
2355
  }
@@ -2575,7 +2575,7 @@ const Wl = /* @__PURE__ */ i.makeEnum(
2575
2575
  { no: 1, name: "RESULT_STATUS_OK", localName: "OK" },
2576
2576
  { no: 2, name: "RESULT_STATUS_ERROR", localName: "ERROR" }
2577
2577
  ]
2578
- ), re = /* @__PURE__ */ i.makeEnum(
2578
+ ), ie = /* @__PURE__ */ i.makeEnum(
2579
2579
  "streamlayer.analytics.v1.common.Kind",
2580
2580
  [
2581
2581
  { no: 0, name: "KIND_UNSET", localName: "UNSET" },
@@ -2689,7 +2689,7 @@ const Wl = /* @__PURE__ */ i.makeEnum(
2689
2689
  { no: 7, name: "TOPIC_SUB_TYPE_PROMOTION_INGAME_IAB11_LBAR_ADDITIONAL", localName: "PROMOTION_INGAME_IAB11_LBAR_ADDITIONAL" },
2690
2690
  { no: 8, name: "TOPIC_SUB_TYPE_PROMOTION_GAM", localName: "PROMOTION_GAM" }
2691
2691
  ]
2692
- ), Ee = /* @__PURE__ */ i.makeEnum(
2692
+ ), be = /* @__PURE__ */ i.makeEnum(
2693
2693
  "streamlayer.analytics.v1.common.PollOpenedFrom",
2694
2694
  [
2695
2695
  { no: 0, name: "POLL_OPENED_FROM_UNSET", localName: "UNSET" },
@@ -3275,7 +3275,7 @@ const Wl = /* @__PURE__ */ i.makeEnum(
3275
3275
  { no: 1, name: "IMAGE_POSITION_LEFT", localName: "LEFT" },
3276
3276
  { no: 2, name: "IMAGE_POSITION_RIGHT", localName: "RIGHT" }
3277
3277
  ]
3278
- ), Se = /* @__PURE__ */ i.makeEnum(
3278
+ ), _e = /* @__PURE__ */ i.makeEnum(
3279
3279
  "streamlayer.interactive.PromotionType",
3280
3280
  [
3281
3281
  { no: 0, name: "PROMOTION_TYPE_UNSET", localName: "UNSET" },
@@ -3902,7 +3902,7 @@ const Wl = /* @__PURE__ */ i.makeEnum(
3902
3902
  ), Fm = /* @__PURE__ */ i.makeMessageType(
3903
3903
  "streamlayer.interactive.QuestionOptions.PromotionOptions",
3904
3904
  () => [
3905
- { no: 1, name: "type", kind: "enum", T: i.getEnumType(Se) },
3905
+ { no: 1, name: "type", kind: "enum", T: i.getEnumType(_e) },
3906
3906
  { no: 2, name: "sponsor", kind: "message", T: Gt },
3907
3907
  { no: 3, name: "banner", kind: "message", T: oo },
3908
3908
  { no: 4, name: "enable_wallet", kind: "enum", T: i.getEnumType(gm) },
@@ -6495,8 +6495,8 @@ let Ss = (e, t, n, a) => (e.events = e.events || {}, e.events[n + un] || (e.even
6495
6495
  let u = ++s;
6496
6496
  a = m;
6497
6497
  let d = t(...m);
6498
- d && d.then && d.t ? d.then((y) => {
6499
- u === s && r.set(y);
6498
+ d && d.then && d.t ? d.then((f) => {
6499
+ u === s && r.set(f);
6500
6500
  }) : r.set(d);
6501
6501
  }
6502
6502
  }, r = at(void 0, Math.max(...e.map((m) => m.l)) + 1), c, l = n ? () => {
@@ -6672,26 +6672,26 @@ var op = function(e) {
6672
6672
  return this;
6673
6673
  }, s;
6674
6674
  function r(T) {
6675
- return function(f) {
6676
- return Promise.resolve(f).then(T, d);
6675
+ return function(y) {
6676
+ return Promise.resolve(y).then(T, d);
6677
6677
  };
6678
6678
  }
6679
- function c(T, f) {
6679
+ function c(T, y) {
6680
6680
  a[T] && (s[T] = function(_) {
6681
6681
  return new Promise(function(N, E) {
6682
6682
  o.push([T, _, N, E]) > 1 || l(T, _);
6683
6683
  });
6684
- }, f && (s[T] = f(s[T])));
6684
+ }, y && (s[T] = y(s[T])));
6685
6685
  }
6686
- function l(T, f) {
6686
+ function l(T, y) {
6687
6687
  try {
6688
- m(a[T](f));
6688
+ m(a[T](y));
6689
6689
  } catch (_) {
6690
- y(o[0][3], _);
6690
+ f(o[0][3], _);
6691
6691
  }
6692
6692
  }
6693
6693
  function m(T) {
6694
- T.value instanceof Xt ? Promise.resolve(T.value.v).then(u, d) : y(o[0][2], T);
6694
+ T.value instanceof Xt ? Promise.resolve(T.value.v).then(u, d) : f(o[0][2], T);
6695
6695
  }
6696
6696
  function u(T) {
6697
6697
  l("next", T);
@@ -6699,8 +6699,8 @@ var op = function(e) {
6699
6699
  function d(T) {
6700
6700
  l("throw", T);
6701
6701
  }
6702
- function y(T, f) {
6703
- T(f), o.shift(), o.length && l(o[0][0], o[0][1]);
6702
+ function f(T, y) {
6703
+ T(y), o.shift(), o.length && l(o[0][0], o[0][1]);
6704
6704
  }
6705
6705
  }, ip = function(e) {
6706
6706
  var t, n;
@@ -6759,26 +6759,26 @@ var ki = function(e) {
6759
6759
  return this;
6760
6760
  }, s;
6761
6761
  function r(T) {
6762
- return function(f) {
6763
- return Promise.resolve(f).then(T, d);
6762
+ return function(y) {
6763
+ return Promise.resolve(y).then(T, d);
6764
6764
  };
6765
6765
  }
6766
- function c(T, f) {
6766
+ function c(T, y) {
6767
6767
  a[T] && (s[T] = function(_) {
6768
6768
  return new Promise(function(N, E) {
6769
6769
  o.push([T, _, N, E]) > 1 || l(T, _);
6770
6770
  });
6771
- }, f && (s[T] = f(s[T])));
6771
+ }, y && (s[T] = y(s[T])));
6772
6772
  }
6773
- function l(T, f) {
6773
+ function l(T, y) {
6774
6774
  try {
6775
- m(a[T](f));
6775
+ m(a[T](y));
6776
6776
  } catch (_) {
6777
- y(o[0][3], _);
6777
+ f(o[0][3], _);
6778
6778
  }
6779
6779
  }
6780
6780
  function m(T) {
6781
- T.value instanceof Dt ? Promise.resolve(T.value.v).then(u, d) : y(o[0][2], T);
6781
+ T.value instanceof Dt ? Promise.resolve(T.value.v).then(u, d) : f(o[0][2], T);
6782
6782
  }
6783
6783
  function u(T) {
6784
6784
  l("next", T);
@@ -6786,8 +6786,8 @@ var ki = function(e) {
6786
6786
  function d(T) {
6787
6787
  l("throw", T);
6788
6788
  }
6789
- function y(T, f) {
6790
- T(f), o.shift(), o.length && l(o[0][0], o[0][1]);
6789
+ function f(T, y) {
6790
+ T(y), o.shift(), o.length && l(o[0][0], o[0][1]);
6791
6791
  }
6792
6792
  };
6793
6793
  function yo(e, t) {
@@ -6823,24 +6823,24 @@ function pp(e, t, n) {
6823
6823
  var o, r, c, l, m, u;
6824
6824
  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);
6825
6825
  (m = s == null ? void 0 : s.onHeader) === null || m === void 0 || m.call(s, d.header);
6826
- let y, T = 0;
6826
+ let f, T = 0;
6827
6827
  try {
6828
- for (var f = !0, _ = ki(d.message), N; N = await _.next(), o = N.done, !o; f = !0)
6829
- l = N.value, f = !1, y = l, T++;
6828
+ for (var y = !0, _ = ki(d.message), N; N = await _.next(), o = N.done, !o; y = !0)
6829
+ l = N.value, y = !1, f = l, T++;
6830
6830
  } catch (E) {
6831
6831
  r = { error: E };
6832
6832
  } finally {
6833
6833
  try {
6834
- !f && !o && (c = _.return) && await c.call(_);
6834
+ !y && !o && (c = _.return) && await c.call(_);
6835
6835
  } finally {
6836
6836
  if (r) throw r.error;
6837
6837
  }
6838
6838
  }
6839
- if (!y)
6839
+ if (!f)
6840
6840
  throw new H("protocol error: missing response message", P.Unimplemented);
6841
6841
  if (T > 1)
6842
6842
  throw new H("protocol error: received extra messages for client streaming method", P.Unimplemented);
6843
- return (u = s == null ? void 0 : s.onTrailer) === null || u === void 0 || u.call(s, d.trailer), y;
6843
+ return (u = s == null ? void 0 : s.onTrailer) === null || u === void 0 || u.call(s, d.trailer), f;
6844
6844
  };
6845
6845
  }
6846
6846
  function Tp(e, t, n) {
@@ -7166,26 +7166,26 @@ var mt = function(e) {
7166
7166
  return this;
7167
7167
  }, s;
7168
7168
  function r(T) {
7169
- return function(f) {
7170
- return Promise.resolve(f).then(T, d);
7169
+ return function(y) {
7170
+ return Promise.resolve(y).then(T, d);
7171
7171
  };
7172
7172
  }
7173
- function c(T, f) {
7173
+ function c(T, y) {
7174
7174
  a[T] && (s[T] = function(_) {
7175
7175
  return new Promise(function(N, E) {
7176
7176
  o.push([T, _, N, E]) > 1 || l(T, _);
7177
7177
  });
7178
- }, f && (s[T] = f(s[T])));
7178
+ }, y && (s[T] = y(s[T])));
7179
7179
  }
7180
- function l(T, f) {
7180
+ function l(T, y) {
7181
7181
  try {
7182
- m(a[T](f));
7182
+ m(a[T](y));
7183
7183
  } catch (_) {
7184
- y(o[0][3], _);
7184
+ f(o[0][3], _);
7185
7185
  }
7186
7186
  }
7187
7187
  function m(T) {
7188
- T.value instanceof mt ? Promise.resolve(T.value.v).then(u, d) : y(o[0][2], T);
7188
+ T.value instanceof mt ? Promise.resolve(T.value.v).then(u, d) : f(o[0][2], T);
7189
7189
  }
7190
7190
  function u(T) {
7191
7191
  l("next", T);
@@ -7193,8 +7193,8 @@ var mt = function(e) {
7193
7193
  function d(T) {
7194
7194
  l("throw", T);
7195
7195
  }
7196
- function y(T, f) {
7197
- T(f), o.shift(), o.length && l(o[0][0], o[0][1]);
7196
+ function f(T, y) {
7197
+ T(y), o.shift(), o.length && l(o[0][0], o[0][1]);
7198
7198
  }
7199
7199
  };
7200
7200
  function Io(e) {
@@ -7204,7 +7204,7 @@ function Io(e) {
7204
7204
  return {
7205
7205
  async unary(a, s, o, r, c, l, m) {
7206
7206
  var u;
7207
- const { serialize: d, parse: y } = ho(s, n, e.jsonOptions, e.binaryOptions);
7207
+ const { serialize: d, parse: f } = ho(s, n, e.jsonOptions, e.binaryOptions);
7208
7208
  return r = r === void 0 ? e.defaultTimeoutMs : r <= 0 ? void 0 : r, await vp({
7209
7209
  interceptors: e.interceptors,
7210
7210
  signal: o,
@@ -7225,8 +7225,8 @@ function Io(e) {
7225
7225
  message: l
7226
7226
  },
7227
7227
  next: async (T) => {
7228
- var f;
7229
- const N = 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: To(0, d(T.message)) })), { headerError: E } = No(N.status, N.headers);
7228
+ var y;
7229
+ const N = await ((y = e.fetch) !== null && y !== void 0 ? y : globalThis.fetch)(T.url, Object.assign(Object.assign({}, T.init), { headers: T.header, signal: T.signal, body: To(0, d(T.message)) })), { headerError: E } = No(N.status, N.headers);
7230
7230
  if (!N.body)
7231
7231
  throw E !== void 0 ? E : "missing response body";
7232
7232
  const b = po(N.body).getReader();
@@ -7246,7 +7246,7 @@ function Io(e) {
7246
7246
  }
7247
7247
  if (O !== void 0)
7248
7248
  throw new H("extra message", P.Unimplemented);
7249
- O = y(v);
7249
+ O = f(v);
7250
7250
  }
7251
7251
  if (w === void 0)
7252
7252
  throw E !== void 0 ? E : new H("missing trailer", N.headers.has(Ct) ? P.Unimplemented : P.Unknown);
@@ -7265,7 +7265,7 @@ function Io(e) {
7265
7265
  },
7266
7266
  async stream(a, s, o, r, c, l, m) {
7267
7267
  var u;
7268
- const { serialize: d, parse: y } = ho(s, n, e.jsonOptions, e.binaryOptions);
7268
+ const { serialize: d, parse: f } = ho(s, n, e.jsonOptions, e.binaryOptions);
7269
7269
  function T(_, N, E, b, w, O) {
7270
7270
  return Lp(this, arguments, function* () {
7271
7271
  const L = po(_).getReader();
@@ -7290,13 +7290,13 @@ function Io(e) {
7290
7290
  }
7291
7291
  if (v)
7292
7292
  throw "extra message";
7293
- yield yield mt(y(ne));
7293
+ yield yield mt(f(ne));
7294
7294
  }
7295
7295
  if ("throwIfAborted" in O && O.throwIfAborted(), !v)
7296
7296
  throw w || "missing trailer";
7297
7297
  });
7298
7298
  }
7299
- async function f(_) {
7299
+ async function y(_) {
7300
7300
  if (s.kind != R.ServerStreaming)
7301
7301
  throw "The fetch API does not support streaming request bodies";
7302
7302
  const N = await _[Symbol.asyncIterator]().next();
@@ -7325,7 +7325,7 @@ function Io(e) {
7325
7325
  },
7326
7326
  next: async (_) => {
7327
7327
  var N;
7328
- const b = await ((N = e.fetch) !== null && N !== void 0 ? N : globalThis.fetch)(_.url, Object.assign(Object.assign({}, _.init), { headers: _.header, signal: _.signal, body: await f(_.message) })), { foundStatus: w, headerError: O } = No(b.status, b.headers);
7328
+ const b = await ((N = e.fetch) !== null && N !== void 0 ? N : globalThis.fetch)(_.url, Object.assign(Object.assign({}, _.init), { headers: _.header, signal: _.signal, body: await y(_.message) })), { foundStatus: w, headerError: O } = No(b.status, b.headers);
7329
7329
  if (!b.body)
7330
7330
  throw O ?? "missing response body";
7331
7331
  const A = new Headers();
@@ -7412,7 +7412,7 @@ const Oo = ({
7412
7412
  V && T(V);
7413
7413
  }, O.mutate = (V) => {
7414
7414
  const { key: X } = O;
7415
- X && f(X, V);
7415
+ X && y(X, V);
7416
7416
  };
7417
7417
  let L, v, U, $, ne, K = [];
7418
7418
  Xd(O, () => {
@@ -7458,13 +7458,13 @@ const Oo = ({
7458
7458
  }), O;
7459
7459
  }, d = (E) => {
7460
7460
  e.delete(E), r.delete(E);
7461
- }, y = (E, b) => {
7461
+ }, f = (E, b) => {
7462
7462
  for (const w of e.keys())
7463
7463
  la(w, E) && b(w);
7464
7464
  }, T = (E) => {
7465
- y(E, d), a.emit(Ro, E);
7466
- }, f = (E, b) => {
7467
- y(E, (w) => {
7465
+ f(E, d), a.emit(Ro, E);
7466
+ }, y = (E, b) => {
7467
+ f(E, (w) => {
7468
7468
  b === void 0 ? d(w) : e.set(w, b);
7469
7469
  }), a.emit(ca, E, b);
7470
7470
  };
@@ -7486,7 +7486,7 @@ const Oo = ({
7486
7486
  },
7487
7487
  getCacheUpdater: ($, ne = !0) => [
7488
7488
  (K) => {
7489
- f($, K), ne && v.push($);
7489
+ y($, K), ne && v.push($);
7490
7490
  },
7491
7491
  e.get($)
7492
7492
  ]
@@ -7510,7 +7510,7 @@ const Oo = ({
7510
7510
  console.warn(
7511
7511
  "You should only use __unsafeOverruleSettings in test environment"
7512
7512
  ), l = E;
7513
- }, invalidateKeys: T, mutateCache: f }
7513
+ }, invalidateKeys: T, mutateCache: y }
7514
7514
  ];
7515
7515
  };
7516
7516
  function vo(e) {
@@ -12319,7 +12319,7 @@ const Ao = 1, wo = 2, Ro = 3, ca = 4, Lo = (e, t) => {
12319
12319
  () => [
12320
12320
  { no: 1, name: "event_id", kind: "scalar", T: 4, opt: !0 },
12321
12321
  { no: 2, name: "category", kind: "enum", T: i.getEnumType(me), opt: !0 },
12322
- { no: 3, name: "kind", kind: "enum", T: i.getEnumType(re), opt: !0 },
12322
+ { no: 3, name: "kind", kind: "enum", T: i.getEnumType(ie), opt: !0 },
12323
12323
  { no: 4, name: "screen_orientation", kind: "enum", T: i.getEnumType(Ua), opt: !0 },
12324
12324
  { no: 5, name: "session_id", kind: "scalar", T: 9, opt: !0 },
12325
12325
  { no: 6, name: "overlay_session_id", kind: "scalar", T: 9, opt: !0 },
@@ -12404,7 +12404,7 @@ const Ao = 1, wo = 2, Ro = 3, ca = 4, Lo = (e, t) => {
12404
12404
  "streamlayer.analytics.v2.streaming.GamesMessage",
12405
12405
  () => [
12406
12406
  { no: 1, name: "common", kind: "message", T: fe },
12407
- { no: 2, name: "poll_opened_from", kind: "enum", T: i.getEnumType(Ee) }
12407
+ { no: 2, name: "poll_opened_from", kind: "enum", T: i.getEnumType(be) }
12408
12408
  ]
12409
12409
  ), Bg = /* @__PURE__ */ i.makeMessageType(
12410
12410
  "streamlayer.analytics.v2.streaming.Login",
@@ -12658,7 +12658,7 @@ class pt extends Kn {
12658
12658
  p(this, "unsubscribe", () => this.getStore().off());
12659
12659
  }
12660
12660
  }
12661
- const be = (e) => Va(e);
12661
+ const Se = (e) => Va(e);
12662
12662
  var qe;
12663
12663
  (function(e) {
12664
12664
  e.ORGANIZATION = "ORGANIZATION", e.STREAM = "STREAM";
@@ -12704,7 +12704,7 @@ class Yi {
12704
12704
  p(this, "update", (t, n) => {
12705
12705
  this.source === qe.STREAM && n === qe.ORGANIZATION || (this.setFeatureConfig(t), this.source = n);
12706
12706
  });
12707
- this.settingsKey = Jg[n.type], this.status = at(Kt.Suspended), this.config = new pt(be(n), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && (t == null ? void 0 : t.overlaySettings.case) === this.settingsKey ? this.settings = new pt(be(t.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new pt(be({}), `feature:settings:${this.settingsKey}`), this.source = a;
12707
+ this.settingsKey = Jg[n.type], this.status = at(Kt.Suspended), this.config = new pt(Se(n), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && (t == null ? void 0 : t.overlaySettings.case) === this.settingsKey ? this.settings = new pt(Se(t.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new pt(Se({}), `feature:settings:${this.settingsKey}`), this.source = a;
12708
12708
  }
12709
12709
  get featureConfig() {
12710
12710
  return this.config.getStore();
@@ -12742,7 +12742,7 @@ class Ne extends Kn {
12742
12742
  return this.getStore().get();
12743
12743
  }
12744
12744
  }
12745
- const ie = (e) => at(e);
12745
+ const oe = (e) => at(e);
12746
12746
  class Fe extends Kn {
12747
12747
  constructor(n, a, s) {
12748
12748
  super(n, `api:${a}`);
@@ -12980,13 +12980,13 @@ class ek {
12980
12980
  ts: /* @__PURE__ */ new Date(),
12981
12981
  log: []
12982
12982
  };
12983
- this.state = new pt(be(o), `subscription:${s.name}:state`), this.options = {
12983
+ this.state = new pt(Se(o), `subscription:${s.name}:state`), this.options = {
12984
12984
  ...s,
12985
12985
  reconnectDelay: s.reconnectDelay ?? 1e3,
12986
12986
  reconnectMaxDelay: s.reconnectMaxDelay ?? 3e4,
12987
12987
  reconnectMaxAttempts: s.reconnectMaxAttempts ?? 10,
12988
12988
  withStore: s.withStore ?? !1
12989
- }, this.headers = t, this.listeners = /* @__PURE__ */ new Map(), this.params = a, this.method = n, s.withStore && (this.store = new Ne(ie(null), `subscription:${s.name}:store`)), "subscribe" in a && typeof a.subscribe == "function" && (this.paramsListener = a.subscribe((r) => {
12989
+ }, this.headers = t, this.listeners = /* @__PURE__ */ new Map(), this.params = a, this.method = n, s.withStore && (this.store = new Ne(oe(null), `subscription:${s.name}:store`)), "subscribe" in a && typeof a.subscribe == "function" && (this.paramsListener = a.subscribe((r) => {
12990
12990
  this.state.getValue("status") === Oe.Connected && (this.addStateLog(`params updated, reconnect => ${JSON.stringify(r)}`), this.reconnect());
12991
12991
  })), this.updateState(Oe.Ready);
12992
12992
  }
@@ -13131,7 +13131,7 @@ class er {
13131
13131
  };
13132
13132
  this.interceptors.push(t), this.interceptors.push(Zg()), (n = this.opts) != null && n.retryable && this.interceptors.push(nk);
13133
13133
  });
13134
- this.host = t, this.opts = n, this.$headers = new pt(be({
13134
+ this.host = t, this.opts = n, this.$headers = new pt(Se({
13135
13135
  "sl-device-id": ak(),
13136
13136
  "sl-device-os": sk()
13137
13137
  }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
@@ -13275,7 +13275,7 @@ var xe;
13275
13275
  e.DISABLED = "disabled", e.INITIALIZATION = "initialization", e.READY = "ready", e.FAILED = "failed", e.SUSPENDED = "suspended";
13276
13276
  })(xe || (xe = {}));
13277
13277
  const Tk = (e) => {
13278
- const t = new It(), n = new Ne(ie(t.getExternalToken()), "userKey"), a = new Ne(ie(t.getToken()), "userToken"), s = new Fe(ck(a.getStore(), e), "user", ({ data: r, error: c, loading: l }, m) => {
13278
+ const t = new It(), n = new Ne(oe(t.getExternalToken()), "userKey"), a = new Ne(oe(t.getToken()), "userToken"), s = new Fe(ck(a.getStore(), e), "user", ({ data: r, error: c, loading: l }, m) => {
13279
13279
  var u;
13280
13280
  if (!c)
13281
13281
  return (u = r == null ? void 0 : r.data) != null && u.id ? r.data.id : l === !1 ? void 0 : m;
@@ -13287,7 +13287,7 @@ const Tk = (e) => {
13287
13287
  userSettings: o
13288
13288
  };
13289
13289
  }, yk = (e) => {
13290
- const t = new Ne(ie(void 0), "providerStreamId"), n = new Fe(ok(t.getStore(), e), "slStreamId", (o) => o == null ? void 0 : o.data), a = new Fe(rk(n.getAtomStore(), e), "streamSettings"), s = new Fe(ik(n.getAtomStore(), e), "streamSettings");
13290
+ const t = new Ne(oe(void 0), "providerStreamId"), n = new Fe(ok(t.getStore(), e), "slStreamId", (o) => o == null ? void 0 : o.data), a = new Fe(rk(n.getAtomStore(), e), "streamSettings"), s = new Fe(ik(n.getAtomStore(), e), "streamSettings");
13291
13291
  return n.getAtomStore().listen((o) => {
13292
13292
  (o === "" || o === void 0) && (a.getStore().mutate(void 0), s.getStore().mutate(void 0));
13293
13293
  }), {
@@ -13297,7 +13297,7 @@ const Tk = (e) => {
13297
13297
  streamSummary: s
13298
13298
  };
13299
13299
  }, fk = (e) => {
13300
- const t = new Ne(ie(void 0), "enabled"), n = new Ne(ie(xe.DISABLED), "status"), a = new Fe(uk(t.getStore(), e), "organizationSettings", (c) => {
13300
+ const t = new Ne(oe(void 0), "enabled"), n = new Ne(oe(xe.DISABLED), "status"), a = new Fe(uk(t.getStore(), e), "organizationSettings", (c) => {
13301
13301
  var l;
13302
13302
  return (l = c == null ? void 0 : c.data) == null ? void 0 : l.id;
13303
13303
  }), s = new Fe(dk(a.getAtomStore(), e), "organizationAdvertising"), o = Tk(e), r = yk(e);
@@ -13496,13 +13496,13 @@ const kk = (e, t, n) => {
13496
13496
  if (!m || !u)
13497
13497
  return m || u || [];
13498
13498
  const d = [];
13499
- for (let y = 0; y < m.length; y++)
13499
+ for (let f = 0; f < m.length; f++)
13500
13500
  d.push({
13501
- ...m[y],
13502
- ...u[y],
13503
- correct: m[y].correct,
13504
- youVoted: m[y].youVoted,
13505
- pointsEarned: m[y].pointsEarned
13501
+ ...m[f],
13502
+ ...u[f],
13503
+ correct: m[f].correct,
13504
+ youVoted: m[f].youVoted,
13505
+ pointsEarned: m[f].pointsEarned
13506
13506
  });
13507
13507
  return d;
13508
13508
  };
@@ -13557,36 +13557,36 @@ const Lk = (e) => {
13557
13557
  return n + a.join("&");
13558
13558
  }, Pk = (e, t, n) => {
13559
13559
  let a = !1;
13560
- const s = n.transport, o = ze("advertisement"), r = new Rk(), c = be({}), l = Ak(e, s), m = () => {
13560
+ const s = n.transport, o = ze("advertisement"), r = new Rk(), c = Se({}), l = Ak(e, s), m = () => {
13561
13561
  var N, E, b;
13562
13562
  c.setKey("hasNotification", !1);
13563
- const T = c.get(), f = (N = T.data) == null ? void 0 : N.question.id, _ = (b = (E = T.data) == null ? void 0 : E.promotion) == null ? void 0 : b.type;
13564
- f && pe.emit("advertisement", {
13563
+ const T = c.get(), y = (N = T.data) == null ? void 0 : N.question.id, _ = (b = (E = T.data) == null ? void 0 : E.promotion) == null ? void 0 : b.type;
13564
+ y && pe.emit("advertisement", {
13565
13565
  action: "notification-opened",
13566
13566
  payload: {
13567
- id: f,
13567
+ id: y,
13568
13568
  type: _
13569
13569
  }
13570
13570
  });
13571
13571
  }, u = () => {
13572
13572
  var E, b, w, O;
13573
- const T = c.get(), f = (E = T.data) == null ? void 0 : E.question.id, _ = (w = (b = T.data) == null ? void 0 : b.promotion) == null ? void 0 : w.type, N = (O = c.get()) == null ? void 0 : O.isOpened;
13574
- f && !N && (o.debug({ id: f }, "markAsViewed: %o"), r.setShowed(f), c.setKey("isOpened", !0), pe.emit("advertisement", {
13573
+ const T = c.get(), y = (E = T.data) == null ? void 0 : E.question.id, _ = (w = (b = T.data) == null ? void 0 : b.promotion) == null ? void 0 : w.type, N = (O = c.get()) == null ? void 0 : O.isOpened;
13574
+ y && !N && (o.debug({ id: y }, "markAsViewed: %o"), r.setShowed(y), c.setKey("isOpened", !0), pe.emit("advertisement", {
13575
13575
  action: "opened",
13576
13576
  payload: {
13577
- id: f,
13577
+ id: y,
13578
13578
  type: _
13579
13579
  }
13580
13580
  }));
13581
- }, d = (T, f) => {
13581
+ }, d = (T, y) => {
13582
13582
  var _;
13583
- f ? c.set({
13583
+ y ? c.set({
13584
13584
  loading: !1,
13585
13585
  error: void 0,
13586
- data: f,
13587
- hasNotification: ((_ = f == null ? void 0 : f.notification) == null ? void 0 : _.enabled) === Fa.NOTIFICATION_ENABLED,
13588
- close: () => y(f.question.id),
13589
- isViewed: !!r.isViewed(f.question.id)
13586
+ data: y,
13587
+ hasNotification: ((_ = y == null ? void 0 : y.notification) == null ? void 0 : _.enabled) === Fa.NOTIFICATION_ENABLED,
13588
+ close: () => f(y.question.id),
13589
+ isViewed: !!r.isViewed(y.question.id)
13590
13590
  }) : (c.setKey("loading", !0), Wi(T, s).then((N) => {
13591
13591
  var E;
13592
13592
  return c.set({
@@ -13594,7 +13594,7 @@ const Lk = (e) => {
13594
13594
  error: void 0,
13595
13595
  data: N,
13596
13596
  hasNotification: ((E = N == null ? void 0 : N.notification) == null ? void 0 : E.enabled) === Fa.NOTIFICATION_ENABLED,
13597
- close: () => y(N == null ? void 0 : N.question.id),
13597
+ close: () => f(N == null ? void 0 : N.question.id),
13598
13598
  isViewed: N && !!r.isViewed(N.question.id)
13599
13599
  });
13600
13600
  }).catch((N) => c.set({
@@ -13603,9 +13603,9 @@ const Lk = (e) => {
13603
13603
  data: void 0
13604
13604
  })));
13605
13605
  };
13606
- c.subscribe((T, f) => {
13606
+ c.subscribe((T, y) => {
13607
13607
  var _, N, E, b, w, O, A;
13608
- if (((N = (_ = T.data) == null ? void 0 : _.promotion) == null ? void 0 : N.type) === Se.EXTERNAL_AD && !(T != null && T.externalAd) && ((E = T.data.promotion.adCampaigns) != null && E.gamOptions) && ((b = T.data.promotion.adCampaigns) != null && b.gamBaseUrl)) {
13608
+ if (((N = (_ = T.data) == null ? void 0 : _.promotion) == null ? void 0 : N.type) === _e.EXTERNAL_AD && !(T != null && T.externalAd) && ((E = T.data.promotion.adCampaigns) != null && E.gamOptions) && ((b = T.data.promotion.adCampaigns) != null && b.gamBaseUrl)) {
13609
13609
  const L = Mk(T.data.promotion.adCampaigns);
13610
13610
  c.setKey("externalAd", { type: "gam", url: L });
13611
13611
  }
@@ -13617,39 +13617,39 @@ const Lk = (e) => {
13617
13617
  hasNotification: !!T.hasNotification,
13618
13618
  isViewed: !!r.isViewed(T.data.question.id)
13619
13619
  },
13620
- skipAnalytics: T.data.question.id === ((O = f == null ? void 0 : f.data) == null ? void 0 : O.question.id)
13621
- }), !(T != null && T.data) && (f != null && f.data) && pe.emit("advertisement", {
13620
+ skipAnalytics: T.data.question.id === ((O = y == null ? void 0 : y.data) == null ? void 0 : O.question.id)
13621
+ }), !(T != null && T.data) && (y != null && y.data) && pe.emit("advertisement", {
13622
13622
  action: "closed",
13623
13623
  payload: {
13624
- id: f.data.question.id,
13625
- type: (A = f.data.promotion) == null ? void 0 : A.type,
13626
- hasNotification: !!f.hasNotification,
13627
- isViewed: !!r.isViewed(f.data.question.id)
13624
+ id: y.data.question.id,
13625
+ type: (A = y.data.promotion) == null ? void 0 : A.type,
13626
+ hasNotification: !!y.hasNotification,
13627
+ isViewed: !!r.isViewed(y.data.question.id)
13628
13628
  }
13629
13629
  });
13630
13630
  });
13631
- const y = (T) => {
13632
- var f, _;
13633
- (!T || ((_ = (f = c.get()) == null ? void 0 : f.data) == null ? void 0 : _.question.id) === T) && c.set({});
13631
+ const f = (T) => {
13632
+ var y, _;
13633
+ (!T || ((_ = (y = c.get()) == null ? void 0 : y.data) == null ? void 0 : _.question.id) === T) && c.set({});
13634
13634
  };
13635
13635
  return { connect: () => {
13636
- a || (a = !0, l.subscribe((T, f) => {
13637
- T.data && (!(f != null && f.data) || T.data.id !== f.data.id) && d(T.data.question.id, T.data);
13636
+ a || (a = !0, l.subscribe((T, y) => {
13637
+ T.data && (!(y != null && y.data) || T.data.id !== y.data.id) && d(T.data.question.id, T.data);
13638
13638
  }), t.addListener("promotion", (T) => {
13639
- const f = Lk(T);
13640
- if (f) {
13641
- if (f.question.status === de.RESOLVED) {
13642
- y(f.question.id), o.debug({ promotion: f }, "resolved: %o");
13639
+ const y = Lk(T);
13640
+ if (y) {
13641
+ if (y.question.status === de.RESOLVED) {
13642
+ f(y.question.id), o.debug({ promotion: y }, "resolved: %o");
13643
13643
  return;
13644
13644
  }
13645
- if (f.question.status === de.ACTIVE) {
13646
- o.debug({ promotion: f }, "active: %o"), d(f.question.id, f);
13645
+ if (y.question.status === de.ACTIVE) {
13646
+ o.debug({ promotion: y }, "active: %o"), d(y.question.id, y);
13647
13647
  return;
13648
13648
  }
13649
- o.debug({ promotion: f }, "skip: %o");
13649
+ o.debug({ promotion: y }, "skip: %o");
13650
13650
  }
13651
13651
  }));
13652
- }, hide: y, show: d, open: m, markAsViewed: u, $store: c };
13652
+ }, hide: f, show: d, open: m, markAsViewed: u, $store: c };
13653
13653
  };
13654
13654
  var Tt;
13655
13655
  (function(e) {
@@ -13716,7 +13716,7 @@ class Dk {
13716
13716
  p(this, "closeQuestion", (t) => {
13717
13717
  this.openedQuestionId.set(void 0), t && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: t }));
13718
13718
  });
13719
- this.transport = t.transport, this.log = ze("gamification-background"), this.slStreamId = t.stores.slStreamId.getAtomStore(), this.organizationId = t.stores.organizationSettings.getAtomStore(), this.userId = t.stores.user.getAtomStore(), this.moderationId = new Ne(ie(void 0), "moderationId").getStore(), this.interactiveAllowed = new Ne(ie(Tt.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new Ne(ie(void 0), "openedQuestionId").getStore(), this.notifications = t.notifications, this.moderation = new Fe(_k(this.slStreamId, t.transport), "gamification:moderation"), this.feedList = new Fe(vk(this.slStreamId, this.interactiveAllowed, t.transport), "gamification:feedList"), this.activeQuestionId = Ek(this.slStreamId, t.transport), this.openedQuestion = wk(t.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
13719
+ this.transport = t.transport, this.log = ze("gamification-background"), this.slStreamId = t.stores.slStreamId.getAtomStore(), this.organizationId = t.stores.organizationSettings.getAtomStore(), this.userId = t.stores.user.getAtomStore(), this.moderationId = new Ne(oe(void 0), "moderationId").getStore(), this.interactiveAllowed = new Ne(oe(Tt.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new Ne(oe(void 0), "openedQuestionId").getStore(), this.notifications = t.notifications, this.moderation = new Fe(_k(this.slStreamId, t.transport), "gamification:moderation"), this.feedList = new Fe(vk(this.slStreamId, this.interactiveAllowed, t.transport), "gamification:feedList"), this.activeQuestionId = Ek(this.slStreamId, t.transport), this.openedQuestion = wk(t.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
13720
13720
  this.log.debug({ item: n }, "received question"), n != null && n.questionId ? (this.questionSubscription = Ik(n.questionId, t.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (a) => {
13721
13721
  var s, o;
13722
13722
  this.openedQuestion.updateExtendedQuestion((o = (s = a.data) == null ? void 0 : s.attributes) == null ? void 0 : o.question);
@@ -13863,7 +13863,7 @@ class Ck {
13863
13863
  p(this, "drain", () => {
13864
13864
  this.store.clear(), this.timeouts.clear(), this.waitingQueue.clear(), this.activeQueue.clear(), this.notificationsList.off(), this.notificationsList.set(/* @__PURE__ */ new Map());
13865
13865
  });
13866
- this.options = t, this.logger = ze("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());
13866
+ this.options = t, this.logger = ze("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = oe(/* @__PURE__ */ new Map());
13867
13867
  }
13868
13868
  }
13869
13869
  var Pn;
@@ -13980,20 +13980,20 @@ const xk = {
13980
13980
  pageSize: 10
13981
13981
  }, Hk = (e, t, n, a, s) => {
13982
13982
  let o = 0;
13983
- const r = ie({ pageSize: xk.pageSize, page: 0 }), c = be({
13983
+ const r = oe({ pageSize: xk.pageSize, page: 0 }), c = Se({
13984
13984
  data: [],
13985
13985
  key: Date.now(),
13986
13986
  hasMore: !0,
13987
13987
  loading: void 0,
13988
13988
  error: void 0
13989
13989
  }), l = hk(e), m = async () => {
13990
- var f;
13991
- const y = t.get(), T = ((f = a.getStore().get().data) == null ? void 0 : f.map((_) => _.slId)) || [];
13992
- if (y && (T != null && T.length)) {
13990
+ var y;
13991
+ const f = t.get(), T = ((y = a.getStore().get().data) == null ? void 0 : y.map((_) => _.slId)) || [];
13992
+ if (f && (T != null && T.length)) {
13993
13993
  const _ = n.get();
13994
13994
  _ && T.push(_), c.setKey("loading", !0), c.setKey("data", []);
13995
13995
  const N = await l({
13996
- eventId: y,
13996
+ eventId: f,
13997
13997
  usersIds: T
13998
13998
  });
13999
13999
  c.set({
@@ -14008,14 +14008,14 @@ const xk = {
14008
14008
  }
14009
14009
  }, u = () => {
14010
14010
  m();
14011
- }, d = (y) => {
14012
- const T = r.get(), f = y || T.page + 1;
14013
- f <= o && r.set({ ...T, page: f });
14011
+ }, d = (f) => {
14012
+ const T = r.get(), y = f || T.page + 1;
14013
+ y <= o && r.set({ ...T, page: y });
14014
14014
  };
14015
14015
  return Qn(c, () => {
14016
- const y = t.listen(m), T = a.listen(m);
14016
+ const f = t.listen(m), T = a.listen(m);
14017
14017
  return () => {
14018
- y(), T();
14018
+ f(), T();
14019
14019
  };
14020
14020
  }), { $store: c, fetchMore: d, invalidate: u };
14021
14021
  };
@@ -14081,7 +14081,7 @@ const tr = "sldl", Wn = "sldl_uid", Ji = "sldl_eid", Xi = "sldl_e_eid", Yk = /*
14081
14081
  Ce.debug(c);
14082
14082
  }
14083
14083
  e.deepLink = {
14084
- $store: new pt(be(o), "deep-link-context"),
14084
+ $store: new pt(Se(o), "deep-link-context"),
14085
14085
  getDeepLinkData: () => {
14086
14086
  const { data: c, used: l } = e.deepLink.$store.getValues();
14087
14087
  return { data: c, used: l };
@@ -14130,7 +14130,7 @@ class zk extends Wg {
14130
14130
  * @param userKey - user token received from the host app.
14131
14131
  */
14132
14132
  p(this, "login", async (n, a) => {
14133
- var u, d, y;
14133
+ var u, d, f;
14134
14134
  this.$coreStore.getValues().userKey.setValue(a);
14135
14135
  const { used: s, data: o } = this.deepLink.getDeepLinkData(), r = s ? "" : o == null ? void 0 : o[Wn];
14136
14136
  Wk.debug({ inviterKey: r }, "login with inviterKey");
@@ -14142,7 +14142,7 @@ class zk extends Wg {
14142
14142
  }), l = (u = c.meta) == null ? void 0 : u.jwt, m = (d = c.data) == null ? void 0 : d.id;
14143
14143
  if (!l || !m)
14144
14144
  throw new Error("internal: token missing");
14145
- 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;
14145
+ return (f = c.meta) != null && f.inviterKey && this.deepLink.deepLinkUsed(c.meta.inviterKey), this.$coreStore.getValues().user.getStore().mutate({ data: c.data }), this.saveUser(l, m), l;
14146
14146
  });
14147
14147
  p(this, "isAuthenticated", () => this.me());
14148
14148
  /**
@@ -14249,7 +14249,7 @@ const Ht = new It(), Jk = (e, t, n) => {
14249
14249
  [C.PREDICTION]: "prediction",
14250
14250
  [C.TWEET]: "tweet"
14251
14251
  }, eh = (e, t, n) => {
14252
- e.sdk.uiState = be({}), e.ui = {
14252
+ e.sdk.uiState = Se({}), e.ui = {
14253
14253
  enableAppNotification: function() {
14254
14254
  e.sdk.uiState.setKey("appNotification", !0);
14255
14255
  },
@@ -14291,11 +14291,11 @@ const Ht = new It(), Jk = (e, t, n) => {
14291
14291
  break;
14292
14292
  }
14293
14293
  if (((m = c.slEventBus) == null ? void 0 : m.type) === "advertisement" && t.withAd) {
14294
- const u = c.slEventBus, { hasNotification: d, id: y, isViewed: T, type: f } = u.payload;
14294
+ const u = c.slEventBus, { hasNotification: d, id: f, isViewed: T, type: y } = u.payload;
14295
14295
  switch (u.action) {
14296
14296
  case "notification-opened":
14297
14297
  e.sdk.uiState.set({
14298
- promotionExternalAd: f === Se.EXTERNAL_AD,
14298
+ promotionExternalAd: y === _e.EXTERNAL_AD,
14299
14299
  promotionBanner: !0,
14300
14300
  promotionNotification: !1,
14301
14301
  promotionOverlay: !0,
@@ -14305,7 +14305,7 @@ const Ht = new It(), Jk = (e, t, n) => {
14305
14305
  case "received":
14306
14306
  if (e.sdk.closeFeature(), a({
14307
14307
  stage: "activate",
14308
- id: y,
14308
+ id: f,
14309
14309
  hasNotification: d,
14310
14310
  isViewed: T
14311
14311
  }), !t.withAdNotification) {
@@ -14313,7 +14313,7 @@ const Ht = new It(), Jk = (e, t, n) => {
14313
14313
  promotionBanner: !0,
14314
14314
  promotionOverlay: !0,
14315
14315
  promotionSidebar: !0,
14316
- promotionExternalAd: f === Se.EXTERNAL_AD
14316
+ promotionExternalAd: y === _e.EXTERNAL_AD
14317
14317
  });
14318
14318
  break;
14319
14319
  }
@@ -14323,7 +14323,7 @@ const Ht = new It(), Jk = (e, t, n) => {
14323
14323
  promotionBanner: !0,
14324
14324
  promotionOverlay: !0,
14325
14325
  promotionSidebar: !0,
14326
- promotionExternalAd: f === Se.EXTERNAL_AD
14326
+ promotionExternalAd: y === _e.EXTERNAL_AD
14327
14327
  });
14328
14328
  break;
14329
14329
  case "closed":
@@ -14336,7 +14336,7 @@ const Ht = new It(), Jk = (e, t, n) => {
14336
14336
  promotionSidebar: !1
14337
14337
  }), a({
14338
14338
  stage: "deactivate",
14339
- id: y,
14339
+ id: f,
14340
14340
  hasNotification: d,
14341
14341
  isViewed: T
14342
14342
  });
@@ -14352,7 +14352,7 @@ const Ht = new It(), Jk = (e, t, n) => {
14352
14352
  }), n();
14353
14353
  }, th = (e, t, n) => {
14354
14354
  const a = { onMountedFired: !1 }, s = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
14355
- e.sdk = /* @__PURE__ */ Object.create(null), e.sdk.withAuth = !1, e.sdk.onMount = ({ name: r, clear: c }, l) => {
14355
+ e.sdk = /* @__PURE__ */ Object.create(null), e.sdk.options = Se(t), e.sdk.withAuth = !1, e.sdk.onMount = ({ name: r, clear: c }, l) => {
14356
14356
  var m, u;
14357
14357
  if (s.has(r)) {
14358
14358
  const d = o.get(r);
@@ -14409,23 +14409,23 @@ const Ht = new It(), Jk = (e, t, n) => {
14409
14409
  n.append(a, s);
14410
14410
  return n.toString();
14411
14411
  }, sh = (e, t, n, a) => {
14412
- const s = be({});
14413
- return Qn(s, () => nh(e, [t, n]).subscribe(async ({ data: o, error: r, loading: c }) => {
14414
- var T;
14415
- const l = r ? "https://masters.com" : o == null ? void 0 : o.url, m = a.get() || "", u = t.get() || "", d = n.get() || "", y = {
14416
- [Wn]: m,
14417
- [Ji]: u,
14418
- [Xi]: d
14412
+ const s = Se({});
14413
+ return Qn(s, () => nh(e, [t, n]).subscribe(async ({ data: o, loading: r }) => {
14414
+ var f;
14415
+ const c = o === void 0 && r === !1 ? "https://streamlayer.io" : o == null ? void 0 : o.url, l = a.get() || "", m = t.get() || "", u = n.get() || "", d = {
14416
+ [Wn]: l,
14417
+ [Ji]: m,
14418
+ [Xi]: u
14419
14419
  };
14420
- if (!c && l) {
14420
+ if (!r && c) {
14421
14421
  s.setKey("loading", !0);
14422
- let f = window.location.search, _ = window.location.hash;
14423
- f && _ || _ ? f = `?${or(f, y)}` : _ = `#${or("", y)}`;
14424
- const N = window.location.origin + window.location.pathname + f + _;
14422
+ let T = window.location.search, y = window.location.hash;
14423
+ T && y || y ? T = `?${or(T, d)}` : y = `#${or("", d)}`;
14424
+ const _ = window.location.origin + window.location.pathname + T + y;
14425
14425
  try {
14426
- const E = await ah(e, { web: N, mobile: l });
14426
+ const N = await ah(e, { web: _, mobile: c });
14427
14427
  s.set({
14428
- data: (T = E.data) == null ? void 0 : T.link,
14428
+ data: (f = N.data) == null ? void 0 : f.link,
14429
14429
  loading: !1
14430
14430
  });
14431
14431
  } catch {
@@ -14479,21 +14479,21 @@ const oh = (e, t, n, a) => {
14479
14479
  eventId: t.slStreamId.get() || ""
14480
14480
  }) === ae.Completed) {
14481
14481
  e.set(ae.Completed);
14482
- for (const f of o)
14483
- f();
14482
+ for (const y of o)
14483
+ y();
14484
14484
  return;
14485
14485
  }
14486
14486
  const u = (r = t.moderation.getStore().value) == null ? void 0 : r.data, d = n.featureSettings.get().inplayGame;
14487
14487
  if (u === void 0 || d === void 0)
14488
14488
  return;
14489
- 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;
14490
- y ? T ? e.set(ae.Required) : e.set(ae.Optional) : (T ? e.set(ae.Unavailable) : e.set(ae.Disabled), a.close(t.getCurrentSessionId({ prefix: "onboarding" }), { markAsViewed: !1 }));
14489
+ const f = (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;
14490
+ f ? T ? e.set(ae.Required) : e.set(ae.Optional) : (T ? e.set(ae.Unavailable) : e.set(ae.Disabled), a.close(t.getCurrentSessionId({ prefix: "onboarding" }), { markAsViewed: !1 }));
14491
14491
  } catch (m) {
14492
14492
  console.error(m);
14493
14493
  }
14494
14494
  }, rh = (e, t, n, a) => {
14495
14495
  let s = !1;
14496
- const o = new zi(), r = ie(ae.Unset);
14496
+ const o = new zi(), r = oe(ae.Unset);
14497
14497
  r.subscribe((l) => {
14498
14498
  l !== ae.Unset && (l === ae.Optional || l === ae.Required ? s === !1 && (oh(e, t, a, o), s = !0) : e.onboardingProcessed.set(!0), l === ae.Completed && t.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
14499
14499
  userId: t.userId.get() || "",
@@ -14524,8 +14524,8 @@ const oh = (e, t, n, a) => {
14524
14524
  }
14525
14525
  } };
14526
14526
  }, ih = (e, t, n, a) => {
14527
- const s = be(void 0), o = Ki(a), r = async () => {
14528
- var T, f;
14527
+ const s = Se(void 0), o = Ki(a), r = async () => {
14528
+ var T, y;
14529
14529
  const l = e.get(), m = t.get(), u = (T = n.getStore().get().data) == null ? void 0 : T.map((_) => _.slId);
14530
14530
  if (!u)
14531
14531
  return;
@@ -14533,8 +14533,8 @@ const oh = (e, t, n, a) => {
14533
14533
  eventId: l,
14534
14534
  userId: m,
14535
14535
  usersIds: [...u, m]
14536
- }, y = await o(d);
14537
- s.set((f = y.data) == null ? void 0 : f.attributes);
14536
+ }, f = await o(d);
14537
+ s.set((y = f.data) == null ? void 0 : y.attributes);
14538
14538
  }, c = () => {
14539
14539
  r();
14540
14540
  };
@@ -14545,13 +14545,13 @@ const oh = (e, t, n, a) => {
14545
14545
  };
14546
14546
  }), { $store: s, invalidate: c };
14547
14547
  }, ch = async (e, t, n, a, s) => {
14548
- var u, d, y;
14548
+ var u, d, f;
14549
14549
  const o = Ki(s), r = e.get(), c = t.get(), l = ((u = n.getStore().get().data) == null ? void 0 : u.map((T) => T.slId)) || [], m = {
14550
14550
  eventId: r,
14551
14551
  userId: a,
14552
14552
  usersIds: [...l, c]
14553
14553
  };
14554
- return (y = (d = (await o(m)).data) == null ? void 0 : d.attributes) == null ? void 0 : y.summary;
14554
+ return (f = (d = (await o(m)).data) == null ? void 0 : d.attributes) == null ? void 0 : f.summary;
14555
14555
  }, lh = /* @__PURE__ */ new Set([C.POLL, C.PREDICTION, C.TRIVIA]);
14556
14556
  class mh extends Yi {
14557
14557
  constructor(n, a, s) {
@@ -14582,6 +14582,7 @@ class mh extends Yi {
14582
14582
  p(this, "openedQuestionId");
14583
14583
  p(this, "advertisement");
14584
14584
  p(this, "onboardingProcessed");
14585
+ p(this, "friendsTabEnabled");
14585
14586
  p(this, "notifications");
14586
14587
  p(this, "transport");
14587
14588
  /** gamification background class, handle subscriptions and notifications for closed overlay */
@@ -14600,10 +14601,10 @@ class mh extends Yi {
14600
14601
  this.onboardingProcessed.subscribe((n) => {
14601
14602
  n && this.advertisement.connect();
14602
14603
  }), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-prediction-close", async (n) => {
14603
- var m, u, d, y, T, f, _, N, E, b, w;
14604
+ var m, u, d, f, T, y, _, N, E, b, w;
14604
14605
  if (!this.isInteractiveAllowed)
14605
14606
  return;
14606
- 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;
14607
+ const a = (u = (m = n.data) == null ? void 0 : m.attributes) == null ? void 0 : u.question, s = (f = (d = n.data) == null ? void 0 : d.attributes) == null ? void 0 : f.feedItem;
14607
14608
  if (!a || !(s != null && s.attributes))
14608
14609
  return;
14609
14610
  const { status: o, type: r, id: c, answers: l } = a;
@@ -14611,7 +14612,7 @@ class mh extends Yi {
14611
14612
  const O = this.background.getCurrentSessionId({
14612
14613
  prefix: `notification-id:${c}`
14613
14614
  }), A = [...this.feedList.getValues().data || []], L = A.findIndex((X) => X.id === c), v = A[L];
14614
- let U = (_ = (f = (T = v == null ? void 0 : v.attributes) == null ? void 0 : T.attributes) == null ? void 0 : f.value) == null ? void 0 : _.answerId;
14615
+ let U = (_ = (y = (T = v == null ? void 0 : v.attributes) == null ? void 0 : T.attributes) == null ? void 0 : y.value) == null ? void 0 : _.answerId;
14615
14616
  const $ = Ka(c, this.transport), ne = $.subscribe(() => {
14616
14617
  });
14617
14618
  await $.get().promise;
@@ -14719,11 +14720,11 @@ class mh extends Yi {
14719
14720
  p(this, "submitAnswer", async (n, a) => {
14720
14721
  const s = Ka(n, this.transport), o = s.subscribe(() => {
14721
14722
  }), r = { ...s.get().data || {} }, c = () => {
14722
- var y;
14723
+ var f;
14723
14724
  const l = this.feedList.getValues().data;
14724
14725
  if (!l)
14725
14726
  return;
14726
- 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;
14727
+ const m = l.findIndex((T) => T.id === n), u = l[m], d = ((f = u == null ? void 0 : u.attributes) == null ? void 0 : f.attributes.case) === "question" && u.attributes.attributes.value;
14727
14728
  if (d) {
14728
14729
  pe.emit("poll", {
14729
14730
  action: "voted",
@@ -14734,10 +14735,10 @@ class mh extends Yi {
14734
14735
  });
14735
14736
  const T = s.get().data;
14736
14737
  if (o(), T) {
14737
- const f = T.answers.find((b) => b.correct === !0), _ = T.answers.findIndex((b) => b.id === a), N = T.answers[_], E = T.answers.every(({ percentageDecimal: b }, w) => b === (r == null ? void 0 : r.answers[w].percentageDecimal));
14738
- l[m].attributes.attributes.value.answerId = a, l[m].attributes.attributes.value.openForVoting = !1, l[m].attributes.attributes.value.text = (N == null ? void 0 : N.text) || "", f && (l[m].attributes.attributes.value.status = f.id === a ? Qt.WON : Qt.LOST), this.feedList.getStore().mutate([...l]), T.answers[_].correct = (f == null ? void 0 : f.id) === a, T.answers[_].youVoted = !0, E && T.answers.forEach((b) => {
14738
+ const y = T.answers.find((b) => b.correct === !0), _ = T.answers.findIndex((b) => b.id === a), N = T.answers[_], E = T.answers.every(({ percentageDecimal: b }, w) => b === (r == null ? void 0 : r.answers[w].percentageDecimal));
14739
+ l[m].attributes.attributes.value.answerId = a, l[m].attributes.attributes.value.openForVoting = !1, l[m].attributes.attributes.value.text = (N == null ? void 0 : N.text) || "", y && (l[m].attributes.attributes.value.status = y.id === a ? Qt.WON : Qt.LOST), this.feedList.getStore().mutate([...l]), T.answers[_].correct = (y == null ? void 0 : y.id) === a, T.answers[_].youVoted = !0, E && T.answers.forEach((b) => {
14739
14740
  b.percentageDecimal = 0;
14740
- }), (f == null ? void 0 : f.id) === a && (T.answers[_].pointsEarned = T.status === de.RESOLVED ? 0 : f.points), s.mutate({ ...T });
14741
+ }), (y == null ? void 0 : y.id) === a && (T.answers[_].pointsEarned = T.status === de.RESOLVED ? 0 : y.points), s.mutate({ ...T });
14741
14742
  }
14742
14743
  this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
14743
14744
  this.userSummary.invalidate();
@@ -14817,7 +14818,7 @@ class mh extends Yi {
14817
14818
  * skipping questions with inAppSilence === ON
14818
14819
  */
14819
14820
  p(this, "showInApp", (n) => {
14820
- var s, o, r, c, l, m, u, d, y, T, f, _, N, E;
14821
+ var s, o, r, c, l, m, u, d, f, T, y, _, N, E;
14821
14822
  const a = this.onboardingStatus.$store.get();
14822
14823
  if (n && n.data && a && a !== ae.Unset && ((s = n.data.question) == null ? void 0 : s.id) !== void 0 && n.data.question.notification !== void 0 && ((r = (o = n.data.question) == null ? void 0 : o.bypassNotifications) == null ? void 0 : r.inAppSilence) !== ti.ON && n.data.question.status === de.ACTIVE && !n.data.question.marketClosed) {
14823
14824
  if (lh.has(n.data.question.type))
@@ -14882,9 +14883,9 @@ class mh extends Yi {
14882
14883
  });
14883
14884
  } else if (n.data.question.type === C.TWEET) {
14884
14885
  const b = (d = n.data.question.options) == null ? void 0 : d.options.value, w = {
14885
- title: (y = n.data.question.notification) == null ? void 0 : y.title,
14886
+ title: (f = n.data.question.notification) == null ? void 0 : f.title,
14886
14887
  body: (T = n.data.question.notification) == null ? void 0 : T.body,
14887
- image: (f = n.data.question.notification) == null ? void 0 : f.image,
14888
+ image: (y = n.data.question.notification) == null ? void 0 : y.image,
14888
14889
  account: ((_ = b == null ? void 0 : b.tweetMeta) == null ? void 0 : _.account) || "",
14889
14890
  accountVerified: !!((N = b == null ? void 0 : b.tweetMeta) != null && N.accountVerified),
14890
14891
  tweet: (E = b == null ? void 0 : b.tweetMeta) == null ? void 0 : E.tweet,
@@ -14912,11 +14913,16 @@ class mh extends Yi {
14912
14913
  }
14913
14914
  }
14914
14915
  });
14915
- this.background = new Dk(s), this.advertisement = this.background.advertisement, this.onQuestionActivate = s.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new zi(), this.feedList = this.background.feedList, this.friends = new Fe(Sk(this.background.userId, s.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = ie(void 0), this.onboardingProcessed = ie(!s.sdk.withAuth), this.leaderboardId = new Ne(ie(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = rh(this, this.background, s.transport, s.notifications), this.notifications = s.notifications, this.transport = s.transport, this.closeFeature = (o = !0) => s.sdk.closeFeature(o), this.openFeature = () => s.sdk.openFeature(Y.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = sh(this.transport, this.background.slStreamId, s.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = ih(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = Hk(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((o, r) => {
14916
+ this.background = new Dk(s), this.advertisement = this.background.advertisement, this.onQuestionActivate = s.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new zi(), this.feedList = this.background.feedList, this.friends = new Fe(Sk(this.background.userId, s.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = oe(void 0), this.onboardingProcessed = oe(!s.sdk.withAuth), this.leaderboardId = new Ne(oe(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = rh(this, this.background, s.transport, s.notifications), this.notifications = s.notifications, this.transport = s.transport, this.closeFeature = (o = !0) => s.sdk.closeFeature(o), this.openFeature = () => s.sdk.openFeature(Y.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = sh(this.transport, this.background.slStreamId, s.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = ih(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = Hk(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((o, r) => {
14916
14917
  r != null && r.summary && (o != null && o.summary) && this.leaderboardList.invalidate();
14917
14918
  })), 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)), this.cancels.add(this.onboardingStatus.$store.listen((o, r) => {
14918
14919
  (r === void 0 || o !== ae.Unset) && this.background.activeQuestionId.invalidate();
14919
- })), this.background.activeQuestionId.listen(this.showInApp), s.sdk.onMount({ name: "gamification", clear: !0 }, () => () => {
14920
+ })), this.background.activeQuestionId.listen(this.showInApp), this.friendsTabEnabled = oe(!1), this.cancels.add(s.sdk.options.subscribe((o) => {
14921
+ o.friendsTab === "disabled" ? this.friendsTabEnabled.set(!1) : o.friendsTab === "enabled" && this.friendsTabEnabled.set(!0);
14922
+ })), this.cancels.add(this.settings.subscribe((o) => {
14923
+ var r, c;
14924
+ s.sdk.options.get().friendsTab === "activatedGame" && this.friendsTabEnabled.set(!!((c = (r = o.inplayGame) == null ? void 0 : r.titleCard) != null && c.optIn));
14925
+ })), s.sdk.onMount({ name: "gamification", clear: !0 }, () => () => {
14920
14926
  for (const o of this.cancels)
14921
14927
  o(), this.cancels.delete(o);
14922
14928
  });
@@ -14934,7 +14940,7 @@ class dh extends Yi {
14934
14940
  }
14935
14941
  }
14936
14942
  const ph = (e, t, n) => e.type === Y.GAMES ? new mh(e, t, n) : new dh(e, t), Th = (e, t, n) => {
14937
- e.features = /* @__PURE__ */ new Map(), e.sdk.featuresList = new Ne(ie(/* @__PURE__ */ new Set()), "features-list"), e.activeFeature = new Ne(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) => {
14943
+ e.features = /* @__PURE__ */ new Map(), e.sdk.featuresList = new Ne(oe(/* @__PURE__ */ new Set()), "features-list"), e.activeFeature = new Ne(oe(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) => {
14938
14944
  e.activeFeature.setValue(a);
14939
14945
  }, e.sdk.closeFeature = (a = !1) => {
14940
14946
  const s = e.activeFeature.getValue();
@@ -15007,7 +15013,7 @@ class yh {
15007
15013
  this.analytics.write("invitation", {
15008
15014
  common: {
15009
15015
  ...this.analytics.commonStore.getValues(),
15010
- kind: re.INVITATION_ACCEPTED
15016
+ kind: ie.INVITATION_ACCEPTED
15011
15017
  },
15012
15018
  category: Ga.GAMES,
15013
15019
  from: Ba.UNSET
@@ -15017,7 +15023,7 @@ class yh {
15017
15023
  this.analytics.write("invitation", {
15018
15024
  common: {
15019
15025
  ...this.analytics.commonStore.getValues(),
15020
- kind: re.INVITATION_SENT
15026
+ kind: ie.INVITATION_SENT
15021
15027
  },
15022
15028
  category: Ga.GAMES,
15023
15029
  from: t || Ba.UNSET
@@ -15044,7 +15050,7 @@ class fh {
15044
15050
  this.analytics.write("interactions", {
15045
15051
  common: {
15046
15052
  ...this.analytics.commonStore.getValues(),
15047
- kind: re.INTERACTIONS
15053
+ kind: ie.INTERACTIONS
15048
15054
  },
15049
15055
  actionType: Ha.TAP
15050
15056
  });
@@ -15053,7 +15059,7 @@ class fh {
15053
15059
  this.analytics.write("interactions", {
15054
15060
  common: {
15055
15061
  ...this.analytics.commonStore.getValues(),
15056
- kind: re.INTERACTIONS
15062
+ kind: ie.INTERACTIONS
15057
15063
  },
15058
15064
  actionType: Ha.SCROLL
15059
15065
  });
@@ -15076,13 +15082,13 @@ class fh {
15076
15082
  }
15077
15083
  }
15078
15084
  const gh = {
15079
- [Se.UNSET]: Le.UNSET,
15080
- [Se.INGAME_IAB21]: Le.PROMOTION_INGAME_IAB21,
15081
- [Se.INGAME_IAB11_LBAR]: Le.PROMOTION_INGAME_IAB11_LBAR,
15082
- [Se.INGAME_IAB11]: Le.PROMOTION_INGAME_IAB11,
15083
- [Se.INGAME_IAB21_LBAR]: Le.PROMOTION_INGAME_IAB21_LBAR,
15084
- [Se.INGAME_IAB61]: Le.PROMOTION_INGAME_IAB61,
15085
- [Se.EXTERNAL_AD]: Le.PROMOTION_GAM
15085
+ [_e.UNSET]: Le.UNSET,
15086
+ [_e.INGAME_IAB21]: Le.PROMOTION_INGAME_IAB21,
15087
+ [_e.INGAME_IAB11_LBAR]: Le.PROMOTION_INGAME_IAB11_LBAR,
15088
+ [_e.INGAME_IAB11]: Le.PROMOTION_INGAME_IAB11,
15089
+ [_e.INGAME_IAB21_LBAR]: Le.PROMOTION_INGAME_IAB21_LBAR,
15090
+ [_e.INGAME_IAB61]: Le.PROMOTION_INGAME_IAB61,
15091
+ [_e.EXTERNAL_AD]: Le.PROMOTION_GAM
15086
15092
  };
15087
15093
  class kh {
15088
15094
  constructor(t) {
@@ -15091,24 +15097,24 @@ class kh {
15091
15097
  this.analytics.write("games", {
15092
15098
  common: {
15093
15099
  ...this.analytics.commonStore.getValues(),
15094
- kind: re.POLLS_RECEIVED,
15100
+ kind: ie.POLLS_RECEIVED,
15095
15101
  topicId: t,
15096
15102
  topicType: se.POLLS_PROMOTION,
15097
15103
  topicSubType: n
15098
15104
  },
15099
- pollOpenedFrom: Ee.UNSET
15105
+ pollOpenedFrom: be.UNSET
15100
15106
  });
15101
15107
  });
15102
15108
  p(this, "opened", ({ id: t }, { topicSubType: n }) => {
15103
15109
  this.analytics.write("games", {
15104
15110
  common: {
15105
15111
  ...this.analytics.commonStore.getValues(),
15106
- kind: re.POLLS_OPENED,
15112
+ kind: ie.POLLS_OPENED,
15107
15113
  topicId: t,
15108
15114
  topicType: se.POLLS_PROMOTION,
15109
15115
  topicSubType: n
15110
15116
  },
15111
- pollOpenedFrom: Ee.UNSET
15117
+ pollOpenedFrom: be.UNSET
15112
15118
  });
15113
15119
  });
15114
15120
  p(this, "videoPlay", ({ id: t }, { topicSubType: n }) => {
@@ -15116,11 +15122,11 @@ class kh {
15116
15122
  common: {
15117
15123
  ...this.analytics.commonStore.getValues(),
15118
15124
  topicId: t,
15119
- kind: re.AD_VIDEO_PLAYED,
15125
+ kind: ie.AD_VIDEO_PLAYED,
15120
15126
  topicType: se.POLLS_PROMOTION,
15121
15127
  topicSubType: n
15122
15128
  },
15123
- pollOpenedFrom: Ee.UNSET
15129
+ pollOpenedFrom: be.UNSET
15124
15130
  });
15125
15131
  });
15126
15132
  p(this, "buttonSelect", ({ id: t }, { topicSubType: n }) => {
@@ -15128,11 +15134,11 @@ class kh {
15128
15134
  common: {
15129
15135
  ...this.analytics.commonStore.getValues(),
15130
15136
  topicId: t,
15131
- kind: re.AD_BUTTON_NAVIGATED,
15137
+ kind: ie.AD_BUTTON_NAVIGATED,
15132
15138
  topicType: se.POLLS_PROMOTION,
15133
15139
  topicSubType: n
15134
15140
  },
15135
- pollOpenedFrom: Ee.UNSET
15141
+ pollOpenedFrom: be.UNSET
15136
15142
  });
15137
15143
  });
15138
15144
  p(this, "bannerSelect", ({ id: t }, { topicSubType: n }) => {
@@ -15140,11 +15146,11 @@ class kh {
15140
15146
  common: {
15141
15147
  ...this.analytics.commonStore.getValues(),
15142
15148
  topicId: t,
15143
- kind: re.AD_BANNER_NAVIGATED,
15149
+ kind: ie.AD_BANNER_NAVIGATED,
15144
15150
  topicType: se.POLLS_PROMOTION,
15145
15151
  topicSubType: n
15146
15152
  },
15147
- pollOpenedFrom: Ee.UNSET
15153
+ pollOpenedFrom: be.UNSET
15148
15154
  });
15149
15155
  });
15150
15156
  this.analytics = t, this.analytics.onConnect(() => {
@@ -15212,7 +15218,7 @@ class Sh {
15212
15218
  this.analytics.write("notification", {
15213
15219
  common: {
15214
15220
  ...this.analytics.commonStore.getValues(),
15215
- kind: re.NOTIFICATION_RECEIVED,
15221
+ kind: ie.NOTIFICATION_RECEIVED,
15216
15222
  topicId: t,
15217
15223
  topicType: n ? Wt[n] : se.UNSET
15218
15224
  },
@@ -15224,7 +15230,7 @@ class Sh {
15224
15230
  this.analytics.write("notification", {
15225
15231
  common: {
15226
15232
  ...this.analytics.commonStore.getValues(),
15227
- kind: re.NOTIFICATION_OPENED,
15233
+ kind: ie.NOTIFICATION_OPENED,
15228
15234
  topicId: t,
15229
15235
  topicType: n ? Wt[n] : se.UNSET
15230
15236
  },
@@ -15257,11 +15263,11 @@ class _h {
15257
15263
  this.analytics.write("games", {
15258
15264
  common: {
15259
15265
  ...this.analytics.commonStore.getValues(),
15260
- kind: re.POLLS_RECEIVED,
15266
+ kind: ie.POLLS_RECEIVED,
15261
15267
  topicId: t,
15262
15268
  topicType: n ? Wt[n] : se.UNSET
15263
15269
  },
15264
- pollOpenedFrom: Ee.UNSET
15270
+ pollOpenedFrom: be.UNSET
15265
15271
  });
15266
15272
  });
15267
15273
  // poll is opened from notification or list
@@ -15269,11 +15275,11 @@ class _h {
15269
15275
  this.analytics.write("games", {
15270
15276
  common: {
15271
15277
  ...this.analytics.commonStore.getValues(),
15272
- kind: re.POLLS_OPENED,
15278
+ kind: ie.POLLS_OPENED,
15273
15279
  topicId: t,
15274
15280
  topicType: n ? Wt[n] : se.UNSET
15275
15281
  },
15276
- pollOpenedFrom: a === "list" ? Ee.PICK_HISTORY : Ee.IN_APP
15282
+ pollOpenedFrom: a === "list" ? be.PICK_HISTORY : be.IN_APP
15277
15283
  });
15278
15284
  });
15279
15285
  // poll is voted
@@ -15281,11 +15287,11 @@ class _h {
15281
15287
  this.analytics.write("games", {
15282
15288
  common: {
15283
15289
  ...this.analytics.commonStore.getValues(),
15284
- kind: re.POLLS_VOTE,
15290
+ kind: ie.POLLS_VOTE,
15285
15291
  topicId: t,
15286
15292
  topicType: n ? Wt[n] : se.UNSET
15287
15293
  },
15288
- pollOpenedFrom: Ee.UNSET
15294
+ pollOpenedFrom: be.UNSET
15289
15295
  });
15290
15296
  });
15291
15297
  // onboarding passed, user is now able to vote
@@ -15293,9 +15299,9 @@ class _h {
15293
15299
  this.analytics.write("games", {
15294
15300
  common: {
15295
15301
  ...this.analytics.commonStore.getValues(),
15296
- kind: re.GAMES_JOINED
15302
+ kind: ie.GAMES_JOINED
15297
15303
  },
15298
- pollOpenedFrom: Ee.UNSET
15304
+ pollOpenedFrom: be.UNSET
15299
15305
  });
15300
15306
  });
15301
15307
  // user clicked on link in poll and navigated to another page
@@ -15303,9 +15309,9 @@ class _h {
15303
15309
  this.analytics.write("games", {
15304
15310
  common: {
15305
15311
  ...this.analytics.commonStore.getValues(),
15306
- kind: re.POLLS_NAVIGATED
15312
+ kind: ie.POLLS_NAVIGATED
15307
15313
  },
15308
- pollOpenedFrom: Ee.UNSET
15314
+ pollOpenedFrom: be.UNSET
15309
15315
  });
15310
15316
  });
15311
15317
  this.analytics = t, this.analytics.onConnect(() => {
@@ -15336,7 +15342,7 @@ class _h {
15336
15342
  }
15337
15343
  const Eh = ({ transport: e, $commonStore: t }) => {
15338
15344
  let n;
15339
- const a = ie(!1), s = 5e3, { client: o, queryKey: r } = e.createPromiseClient(Vi, {
15345
+ const a = oe(!1), s = 5e3, { client: o, queryKey: r } = e.createPromiseClient(Vi, {
15340
15346
  method: "send",
15341
15347
  params: [a]
15342
15348
  }), c = e.nanoquery.createFetcherStore(r, {
@@ -15349,13 +15355,13 @@ const Eh = ({ transport: e, $commonStore: t }) => {
15349
15355
  value: {
15350
15356
  common: {
15351
15357
  ...d,
15352
- kind: re.SESSION_HEARTBEAT
15358
+ kind: ie.SESSION_HEARTBEAT
15353
15359
  }
15354
15360
  }
15355
15361
  }
15356
15362
  });
15357
- } catch (y) {
15358
- He.error(y, "send heartbeat failed");
15363
+ } catch (f) {
15364
+ He.error(f, "send heartbeat failed");
15359
15365
  }
15360
15366
  return Date.now();
15361
15367
  },
@@ -15421,7 +15427,7 @@ class bh {
15421
15427
  n != null && n.handled && this.invitation.accepted();
15422
15428
  }));
15423
15429
  });
15424
- this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new pt(be({}), "common-analytics"), this.connectToSDK(t), this.heartbeat = Eh({ transport: t.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Sh(this), this.polls = new _h(this), this.invitation = new yh(this), this.interactions = new fh(this), this.advertisement = new kh(this);
15430
+ this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new pt(Se({}), "common-analytics"), this.connectToSDK(t), this.heartbeat = Eh({ transport: t.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Sh(this), this.polls = new _h(this), this.invitation = new yh(this), this.interactions = new fh(this), this.advertisement = new kh(this);
15425
15431
  const { client: n } = t.analyticsTransport.createPromiseClient(Vi, {
15426
15432
  method: "send"
15427
15433
  });
@@ -15458,8 +15464,8 @@ function Zi(e, t, n) {
15458
15464
  throw new Error("fastqueue concurrency must be equal to or greater than 1");
15459
15465
  var a = Ah(wh), s = null, o = null, r = 0, c = null, l = {
15460
15466
  push: _,
15461
- drain: _e,
15462
- saturated: _e,
15467
+ drain: Ee,
15468
+ saturated: Ee,
15463
15469
  pause: u,
15464
15470
  paused: !1,
15465
15471
  get concurrency() {
@@ -15474,11 +15480,11 @@ function Zi(e, t, n) {
15474
15480
  },
15475
15481
  running: m,
15476
15482
  resume: T,
15477
- idle: f,
15483
+ idle: y,
15478
15484
  length: d,
15479
- getQueue: y,
15485
+ getQueue: f,
15480
15486
  unshift: N,
15481
- empty: _e,
15487
+ empty: Ee,
15482
15488
  kill: b,
15483
15489
  killAndDrain: w,
15484
15490
  error: O
@@ -15495,7 +15501,7 @@ function Zi(e, t, n) {
15495
15501
  A = A.next, L++;
15496
15502
  return L;
15497
15503
  }
15498
- function y() {
15504
+ function f() {
15499
15505
  for (var A = s, L = []; A; )
15500
15506
  L.push(A.value), A = A.next;
15501
15507
  return L;
@@ -15510,16 +15516,16 @@ function Zi(e, t, n) {
15510
15516
  r++, E();
15511
15517
  }
15512
15518
  }
15513
- function f() {
15519
+ function y() {
15514
15520
  return r === 0 && l.length() === 0;
15515
15521
  }
15516
15522
  function _(A, L) {
15517
15523
  var v = a.get();
15518
- v.context = e, v.release = E, v.value = A, v.callback = L || _e, v.errorHandler = c, r >= n || l.paused ? o ? (o.next = v, o = v) : (s = v, o = v, l.saturated()) : (r++, t.call(e, v.value, v.worked));
15524
+ v.context = e, v.release = E, v.value = A, v.callback = L || Ee, v.errorHandler = c, r >= n || l.paused ? o ? (o.next = v, o = v) : (s = v, o = v, l.saturated()) : (r++, t.call(e, v.value, v.worked));
15519
15525
  }
15520
15526
  function N(A, L) {
15521
15527
  var v = a.get();
15522
- v.context = e, v.release = E, v.value = A, v.callback = L || _e, v.errorHandler = c, r >= n || l.paused ? s ? (v.next = s, s = v) : (s = v, o = v, l.saturated()) : (r++, t.call(e, v.value, v.worked));
15528
+ v.context = e, v.release = E, v.value = A, v.callback = L || Ee, v.errorHandler = c, r >= n || l.paused ? s ? (v.next = s, s = v) : (s = v, o = v, l.saturated()) : (r++, t.call(e, v.value, v.worked));
15523
15529
  }
15524
15530
  function E(A) {
15525
15531
  A && a.release(A);
@@ -15527,66 +15533,66 @@ function Zi(e, t, n) {
15527
15533
  L && r <= n ? l.paused ? r-- : (o === s && (o = null), s = L.next, L.next = null, t.call(e, L.value, L.worked), o === null && l.empty()) : --r === 0 && l.drain();
15528
15534
  }
15529
15535
  function b() {
15530
- s = null, o = null, l.drain = _e;
15536
+ s = null, o = null, l.drain = Ee;
15531
15537
  }
15532
15538
  function w() {
15533
- s = null, o = null, l.drain(), l.drain = _e;
15539
+ s = null, o = null, l.drain(), l.drain = Ee;
15534
15540
  }
15535
15541
  function O(A) {
15536
15542
  c = A;
15537
15543
  }
15538
15544
  }
15539
- function _e() {
15545
+ function Ee() {
15540
15546
  }
15541
15547
  function wh() {
15542
- this.value = null, this.callback = _e, this.next = null, this.release = _e, this.context = null, this.errorHandler = null;
15548
+ this.value = null, this.callback = Ee, this.next = null, this.release = Ee, this.context = null, this.errorHandler = null;
15543
15549
  var e = this;
15544
15550
  this.worked = function(t, n) {
15545
15551
  var a = e.callback, s = e.errorHandler, o = e.value;
15546
- e.value = null, e.callback = _e, e.errorHandler && s(t, o), a.call(e.context, t, n), e.release(e);
15552
+ e.value = null, e.callback = Ee, e.errorHandler && s(t, o), a.call(e.context, t, n), e.release(e);
15547
15553
  };
15548
15554
  }
15549
15555
  function Rh(e, t, n) {
15550
15556
  typeof e == "function" && (n = t, t = e, e = null);
15551
15557
  function a(u, d) {
15552
- t.call(this, u).then(function(y) {
15553
- d(null, y);
15558
+ t.call(this, u).then(function(f) {
15559
+ d(null, f);
15554
15560
  }, d);
15555
15561
  }
15556
15562
  var s = Zi(e, a, n), o = s.push, r = s.unshift;
15557
15563
  return s.push = c, s.unshift = l, s.drained = m, s;
15558
15564
  function c(u) {
15559
- var d = new Promise(function(y, T) {
15560
- o(u, function(f, _) {
15561
- if (f) {
15562
- T(f);
15565
+ var d = new Promise(function(f, T) {
15566
+ o(u, function(y, _) {
15567
+ if (y) {
15568
+ T(y);
15563
15569
  return;
15564
15570
  }
15565
- y(_);
15571
+ f(_);
15566
15572
  });
15567
15573
  });
15568
- return d.catch(_e), d;
15574
+ return d.catch(Ee), d;
15569
15575
  }
15570
15576
  function l(u) {
15571
- var d = new Promise(function(y, T) {
15572
- r(u, function(f, _) {
15573
- if (f) {
15574
- T(f);
15577
+ var d = new Promise(function(f, T) {
15578
+ r(u, function(y, _) {
15579
+ if (y) {
15580
+ T(y);
15575
15581
  return;
15576
15582
  }
15577
- y(_);
15583
+ f(_);
15578
15584
  });
15579
15585
  });
15580
- return d.catch(_e), d;
15586
+ return d.catch(Ee), d;
15581
15587
  }
15582
15588
  function m() {
15583
15589
  if (s.idle())
15584
- return new Promise(function(y) {
15585
- y();
15590
+ return new Promise(function(f) {
15591
+ f();
15586
15592
  });
15587
- var u = s.drain, d = new Promise(function(y) {
15593
+ var u = s.drain, d = new Promise(function(f) {
15588
15594
  s.drain = function() {
15589
- u(), y();
15595
+ u(), f();
15590
15596
  };
15591
15597
  });
15592
15598
  return d;
@@ -15911,14 +15917,14 @@ var fa = function() {
15911
15917
  return fa;
15912
15918
  }
15913
15919
  }
15914
- }() : fa, Et = Qh(), uS = jh(), oe = Object.getPrototypeOf || (uS ? function(e) {
15920
+ }() : fa, Et = Qh(), uS = jh(), re = Object.getPrototypeOf || (uS ? function(e) {
15915
15921
  return e.__proto__;
15916
- } : null), Nt = {}, dS = typeof Uint8Array > "u" || !oe ? G : oe(Uint8Array), ft = {
15922
+ } : null), Nt = {}, dS = typeof Uint8Array > "u" || !re ? G : re(Uint8Array), ft = {
15917
15923
  __proto__: null,
15918
15924
  "%AggregateError%": typeof AggregateError > "u" ? G : AggregateError,
15919
15925
  "%Array%": Array,
15920
15926
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? G : ArrayBuffer,
15921
- "%ArrayIteratorPrototype%": Et && oe ? oe([][Symbol.iterator]()) : G,
15927
+ "%ArrayIteratorPrototype%": Et && re ? re([][Symbol.iterator]()) : G,
15922
15928
  "%AsyncFromSyncIteratorPrototype%": G,
15923
15929
  "%AsyncFunction%": Nt,
15924
15930
  "%AsyncGenerator%": Nt,
@@ -15949,10 +15955,10 @@ var fa = function() {
15949
15955
  "%Int32Array%": typeof Int32Array > "u" ? G : Int32Array,
15950
15956
  "%isFinite%": isFinite,
15951
15957
  "%isNaN%": isNaN,
15952
- "%IteratorPrototype%": Et && oe ? oe(oe([][Symbol.iterator]())) : G,
15958
+ "%IteratorPrototype%": Et && re ? re(re([][Symbol.iterator]())) : G,
15953
15959
  "%JSON%": typeof JSON == "object" ? JSON : G,
15954
15960
  "%Map%": typeof Map > "u" ? G : Map,
15955
- "%MapIteratorPrototype%": typeof Map > "u" || !Et || !oe ? G : oe((/* @__PURE__ */ new Map())[Symbol.iterator]()),
15961
+ "%MapIteratorPrototype%": typeof Map > "u" || !Et || !re ? G : re((/* @__PURE__ */ new Map())[Symbol.iterator]()),
15956
15962
  "%Math%": Math,
15957
15963
  "%Number%": Number,
15958
15964
  "%Object%": Object,
@@ -15965,10 +15971,10 @@ var fa = function() {
15965
15971
  "%Reflect%": typeof Reflect > "u" ? G : Reflect,
15966
15972
  "%RegExp%": RegExp,
15967
15973
  "%Set%": typeof Set > "u" ? G : Set,
15968
- "%SetIteratorPrototype%": typeof Set > "u" || !Et || !oe ? G : oe((/* @__PURE__ */ new Set())[Symbol.iterator]()),
15974
+ "%SetIteratorPrototype%": typeof Set > "u" || !Et || !re ? G : re((/* @__PURE__ */ new Set())[Symbol.iterator]()),
15969
15975
  "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? G : SharedArrayBuffer,
15970
15976
  "%String%": String,
15971
- "%StringIteratorPrototype%": Et && oe ? oe(""[Symbol.iterator]()) : G,
15977
+ "%StringIteratorPrototype%": Et && re ? re(""[Symbol.iterator]()) : G,
15972
15978
  "%Symbol%": Et ? Symbol : G,
15973
15979
  "%SyntaxError%": Ut,
15974
15980
  "%ThrowTypeError%": mS,
@@ -15983,11 +15989,11 @@ var fa = function() {
15983
15989
  "%WeakRef%": typeof WeakRef > "u" ? G : WeakRef,
15984
15990
  "%WeakSet%": typeof WeakSet > "u" ? G : WeakSet
15985
15991
  };
15986
- if (oe)
15992
+ if (re)
15987
15993
  try {
15988
15994
  null.error;
15989
15995
  } catch (e) {
15990
- var pS = oe(oe(e));
15996
+ var pS = re(re(e));
15991
15997
  ft["%Error.prototype%"] = pS;
15992
15998
  }
15993
15999
  var TS = function e(t) {
@@ -16003,7 +16009,7 @@ var TS = function e(t) {
16003
16009
  a && (n = a.prototype);
16004
16010
  } else if (t === "%AsyncIteratorPrototype%") {
16005
16011
  var s = e("%AsyncGenerator%");
16006
- s && oe && (n = oe(s.prototype));
16012
+ s && re && (n = re(s.prototype));
16007
16013
  }
16008
16014
  return ft[t] = n, n;
16009
16015
  }, mr = {
@@ -16092,8 +16098,8 @@ var TS = function e(t) {
16092
16098
  var n = SS(e), a = n.length > 0 ? n[0] : "", s = _S("%" + a + "%", t), o = s.name, r = s.value, c = !1, l = s.alias;
16093
16099
  l && (a = l[0], fS(n, yS([0, 1], l)));
16094
16100
  for (var m = 1, u = !0; m < n.length; m += 1) {
16095
- var d = n[m], y = Cn(d, 0, 1), T = Cn(d, -1);
16096
- if ((y === '"' || y === "'" || y === "`" || T === '"' || T === "'" || T === "`") && y !== T)
16101
+ var d = n[m], f = Cn(d, 0, 1), T = Cn(d, -1);
16102
+ if ((f === '"' || f === "'" || f === "`" || T === '"' || T === "'" || T === "`") && f !== T)
16097
16103
  throw new Ut("property names with quotes must have matching quotes");
16098
16104
  if ((d === "constructor" || !u) && (c = !0), a += "." + d, o = "%" + a + "%", Dn(ft, o))
16099
16105
  r = ft[o];
@@ -16104,8 +16110,8 @@ var TS = function e(t) {
16104
16110
  return;
16105
16111
  }
16106
16112
  if (yt && m + 1 >= n.length) {
16107
- var f = yt(r, d);
16108
- u = !!f, u && "get" in f && !("originalValue" in f.get) ? r = f.get : r = r[d];
16113
+ var y = yt(r, d);
16114
+ u = !!y, u && "get" in y && !("originalValue" in y.get) ? r = y.get : r = r[d];
16109
16115
  } else
16110
16116
  u = Dn(r, d), r = r[d];
16111
16117
  u && !c && (ft[o] = r);
@@ -16198,9 +16204,9 @@ var IS = yc, OS = an, yr = NS, vS = IS(), fr = ea, gr = Zn, AS = OS("%Math.floor
16198
16204
  e.exports = function(d) {
16199
16205
  if (typeof d != "function")
16200
16206
  throw new s("a function is required");
16201
- var y = c(t, r, arguments);
16207
+ var f = c(t, r, arguments);
16202
16208
  return a(
16203
- y,
16209
+ f,
16204
16210
  1 + m(0, d.length - (arguments.length - 1)),
16205
16211
  !0
16206
16212
  );
@@ -16456,10 +16462,10 @@ var T_ = function(e) {
16456
16462
  }
16457
16463
  var r = typeof BigInt < "u", c = typeof Symbol < "u", l = o(Object.prototype.toString), m = o(Number.prototype.valueOf), u = o(String.prototype.valueOf), d = o(Boolean.prototype.valueOf);
16458
16464
  if (r)
16459
- var y = o(BigInt.prototype.valueOf);
16465
+ var f = o(BigInt.prototype.valueOf);
16460
16466
  if (c)
16461
16467
  var T = o(Symbol.prototype.valueOf);
16462
- function f(S, Mc) {
16468
+ function y(S, Mc) {
16463
16469
  if (typeof S != "object")
16464
16470
  return !1;
16465
16471
  try {
@@ -16598,23 +16604,23 @@ var T_ = function(e) {
16598
16604
  }
16599
16605
  e.isWebAssemblyCompiledModule = ve;
16600
16606
  function rt(S) {
16601
- return f(S, m);
16607
+ return y(S, m);
16602
16608
  }
16603
16609
  e.isNumberObject = rt;
16604
16610
  function sn(S) {
16605
- return f(S, u);
16611
+ return y(S, u);
16606
16612
  }
16607
16613
  e.isStringObject = sn;
16608
16614
  function St(S) {
16609
- return f(S, d);
16615
+ return y(S, d);
16610
16616
  }
16611
16617
  e.isBooleanObject = St;
16612
16618
  function on(S) {
16613
- return r && f(S, y);
16619
+ return r && y(S, f);
16614
16620
  }
16615
16621
  e.isBigIntObject = on;
16616
16622
  function Vs(S) {
16617
- return c && f(S, T);
16623
+ return c && y(S, T);
16618
16624
  }
16619
16625
  e.isSymbolObject = Vs;
16620
16626
  function Rc(S) {
@@ -16779,7 +16785,7 @@ var S_ = ns.exports;
16779
16785
  return z;
16780
16786
  var q = Object.keys(k), F = m(q);
16781
16787
  if (g.showHidden && (q = Object.getOwnPropertyNames(k)), K(k) && (q.indexOf("message") >= 0 || q.indexOf("description") >= 0))
16782
- return y(k);
16788
+ return f(k);
16783
16789
  if (q.length === 0) {
16784
16790
  if (W(k)) {
16785
16791
  var x = k.name ? ": " + k.name : "";
@@ -16790,21 +16796,21 @@ var S_ = ns.exports;
16790
16796
  if (ne(k))
16791
16797
  return g.stylize(Date.prototype.toString.call(k), "date");
16792
16798
  if (K(k))
16793
- return y(k);
16799
+ return f(k);
16794
16800
  }
16795
16801
  var Q = "", ve = !1, rt = ["{", "}"];
16796
16802
  if (N(k) && (ve = !0, rt = ["[", "]"]), W(k)) {
16797
16803
  var sn = k.name ? ": " + k.name : "";
16798
16804
  Q = " [Function" + sn + "]";
16799
16805
  }
16800
- if (U(k) && (Q = " " + RegExp.prototype.toString.call(k)), ne(k) && (Q = " " + Date.prototype.toUTCString.call(k)), K(k) && (Q = " " + y(k)), q.length === 0 && (!ve || k.length == 0))
16806
+ if (U(k) && (Q = " " + RegExp.prototype.toString.call(k)), ne(k) && (Q = " " + Date.prototype.toUTCString.call(k)), K(k) && (Q = " " + f(k)), q.length === 0 && (!ve || k.length == 0))
16801
16807
  return rt[0] + Q + rt[1];
16802
16808
  if (I < 0)
16803
16809
  return U(k) ? g.stylize(RegExp.prototype.toString.call(k), "regexp") : g.stylize("[Object]", "special");
16804
16810
  g.seen.push(k);
16805
16811
  var St;
16806
16812
  return ve ? St = T(g, k, I, F, q) : St = q.map(function(on) {
16807
- return f(g, k, I, F, on, ve);
16813
+ return y(g, k, I, F, on, ve);
16808
16814
  }), g.seen.pop(), _(St, Q, rt);
16809
16815
  }
16810
16816
  function d(g, k) {
@@ -16821,12 +16827,12 @@ var S_ = ns.exports;
16821
16827
  if (b(k))
16822
16828
  return g.stylize("null", "null");
16823
16829
  }
16824
- function y(g) {
16830
+ function f(g) {
16825
16831
  return "[" + Error.prototype.toString.call(g) + "]";
16826
16832
  }
16827
16833
  function T(g, k, I, M, z) {
16828
16834
  for (var q = [], F = 0, x = k.length; F < x; ++F)
16829
- Je(k, String(F)) ? q.push(f(
16835
+ Je(k, String(F)) ? q.push(y(
16830
16836
  g,
16831
16837
  k,
16832
16838
  I,
@@ -16835,7 +16841,7 @@ var S_ = ns.exports;
16835
16841
  !0
16836
16842
  )) : q.push("");
16837
16843
  return z.forEach(function(Q) {
16838
- Q.match(/^\d+$/) || q.push(f(
16844
+ Q.match(/^\d+$/) || q.push(y(
16839
16845
  g,
16840
16846
  k,
16841
16847
  I,
@@ -16845,7 +16851,7 @@ var S_ = ns.exports;
16845
16851
  ));
16846
16852
  }), q;
16847
16853
  }
16848
- function f(g, k, I, M, z, q) {
16854
+ function y(g, k, I, M, z, q) {
16849
16855
  var F, x, Q;
16850
16856
  if (Q = Object.getOwnPropertyDescriptor(k, z) || { value: k[z] }, Q.get ? Q.set ? x = g.stylize("[Getter/Setter]", "special") : x = g.stylize("[Getter]", "special") : Q.set && (x = g.stylize("[Setter]", "special")), Je(M, z) || (F = "[" + z + "]"), x || (g.seen.indexOf(Q.value) < 0 ? (b(I) ? x = u(g, Q.value, null) : x = u(g, Q.value, I - 1), x.indexOf(`
16851
16857
  `) > -1 && (q ? x = x.split(`
@@ -17102,8 +17108,8 @@ var Oc = {
17102
17108
  ` + n + (o.length ? s("│") : " ") + " ";
17103
17109
  return n + r.join(c) + `
17104
17110
  ` + o.map(function(l, m) {
17105
- var u = m === o.length - 1, d = l.nodes && l.nodes.length, y = n + (u ? " " : s("│")) + " ";
17106
- return n + s(u ? "└" : "├") + s("─") + s(d ? "┬" : "─") + " " + e(l, y, a).slice(n.length + 2);
17111
+ var u = m === o.length - 1, d = l.nodes && l.nodes.length, f = n + (u ? " " : s("│")) + " ";
17112
+ return n + s(u ? "└" : "├") + s("─") + s(d ? "┬" : "─") + " " + e(l, f, a).slice(n.length + 2);
17107
17113
  }).join("");
17108
17114
  };
17109
17115
  const b_ = E_, Er = Symbol("avvio.TimeTree.untrackNode"), Ia = Symbol("avvio.TimeTree.trackNode"), br = Symbol("avvio.TimeTree.getParent"), Nr = Symbol("avvio.TimeTree.getNode"), Ir = Symbol("avvio.TimeTree.addNode");
@@ -17171,10 +17177,10 @@ function O_() {
17171
17177
  var e = 1e3, t = e * 60, n = t * 60, a = n * 24, s = a * 7, o = a * 365.25;
17172
17178
  Oa = function(u, d) {
17173
17179
  d = d || {};
17174
- var y = typeof u;
17175
- if (y === "string" && u.length > 0)
17180
+ var f = typeof u;
17181
+ if (f === "string" && u.length > 0)
17176
17182
  return r(u);
17177
- if (y === "number" && isFinite(u))
17183
+ if (f === "number" && isFinite(u))
17178
17184
  return d.long ? l(u) : c(u);
17179
17185
  throw new Error(
17180
17186
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(u)
@@ -17186,46 +17192,46 @@ function O_() {
17186
17192
  u
17187
17193
  );
17188
17194
  if (d) {
17189
- var y = parseFloat(d[1]), T = (d[2] || "ms").toLowerCase();
17195
+ var f = parseFloat(d[1]), T = (d[2] || "ms").toLowerCase();
17190
17196
  switch (T) {
17191
17197
  case "years":
17192
17198
  case "year":
17193
17199
  case "yrs":
17194
17200
  case "yr":
17195
17201
  case "y":
17196
- return y * o;
17202
+ return f * o;
17197
17203
  case "weeks":
17198
17204
  case "week":
17199
17205
  case "w":
17200
- return y * s;
17206
+ return f * s;
17201
17207
  case "days":
17202
17208
  case "day":
17203
17209
  case "d":
17204
- return y * a;
17210
+ return f * a;
17205
17211
  case "hours":
17206
17212
  case "hour":
17207
17213
  case "hrs":
17208
17214
  case "hr":
17209
17215
  case "h":
17210
- return y * n;
17216
+ return f * n;
17211
17217
  case "minutes":
17212
17218
  case "minute":
17213
17219
  case "mins":
17214
17220
  case "min":
17215
17221
  case "m":
17216
- return y * t;
17222
+ return f * t;
17217
17223
  case "seconds":
17218
17224
  case "second":
17219
17225
  case "secs":
17220
17226
  case "sec":
17221
17227
  case "s":
17222
- return y * e;
17228
+ return f * e;
17223
17229
  case "milliseconds":
17224
17230
  case "millisecond":
17225
17231
  case "msecs":
17226
17232
  case "msec":
17227
17233
  case "ms":
17228
- return y;
17234
+ return f;
17229
17235
  default:
17230
17236
  return;
17231
17237
  }
@@ -17240,9 +17246,9 @@ function O_() {
17240
17246
  var d = Math.abs(u);
17241
17247
  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";
17242
17248
  }
17243
- function m(u, d, y, T) {
17244
- var f = d >= y * 1.5;
17245
- return Math.round(u / y) + " " + T + (f ? "s" : "");
17249
+ function m(u, d, f, T) {
17250
+ var y = d >= f * 1.5;
17251
+ return Math.round(u / f) + " " + T + (y ? "s" : "");
17246
17252
  }
17247
17253
  return Oa;
17248
17254
  }
@@ -17252,13 +17258,13 @@ function v_(e) {
17252
17258
  }), n.names = [], n.skips = [], n.formatters = {};
17253
17259
  function t(u) {
17254
17260
  let d = 0;
17255
- for (let y = 0; y < u.length; y++)
17256
- d = (d << 5) - d + u.charCodeAt(y), d |= 0;
17261
+ for (let f = 0; f < u.length; f++)
17262
+ d = (d << 5) - d + u.charCodeAt(f), d |= 0;
17257
17263
  return n.colors[Math.abs(d) % n.colors.length];
17258
17264
  }
17259
17265
  n.selectColor = t;
17260
17266
  function n(u) {
17261
- let d, y = null, T, f;
17267
+ let d, f = null, T, y;
17262
17268
  function _(...N) {
17263
17269
  if (!_.enabled)
17264
17270
  return;
@@ -17280,22 +17286,22 @@ function v_(e) {
17280
17286
  return _.namespace = u, _.useColors = n.useColors(), _.color = n.selectColor(u), _.extend = a, _.destroy = n.destroy, Object.defineProperty(_, "enabled", {
17281
17287
  enumerable: !0,
17282
17288
  configurable: !1,
17283
- get: () => y !== null ? y : (T !== n.namespaces && (T = n.namespaces, f = n.enabled(u)), f),
17289
+ get: () => f !== null ? f : (T !== n.namespaces && (T = n.namespaces, y = n.enabled(u)), y),
17284
17290
  set: (N) => {
17285
- y = N;
17291
+ f = N;
17286
17292
  }
17287
17293
  }), typeof n.init == "function" && n.init(_), _;
17288
17294
  }
17289
17295
  function a(u, d) {
17290
- const y = n(this.namespace + (typeof d > "u" ? ":" : d) + u);
17291
- return y.log = this.log, y;
17296
+ const f = n(this.namespace + (typeof d > "u" ? ":" : d) + u);
17297
+ return f.log = this.log, f;
17292
17298
  }
17293
17299
  function s(u) {
17294
17300
  n.save(u), n.namespaces = u, n.names = [], n.skips = [];
17295
17301
  let d;
17296
- const y = (typeof u == "string" ? u : "").split(/[\s,]+/), T = y.length;
17302
+ const f = (typeof u == "string" ? u : "").split(/[\s,]+/), T = f.length;
17297
17303
  for (d = 0; d < T; d++)
17298
- y[d] && (u = y[d].replace(/\*/g, ".*?"), u[0] === "-" ? n.skips.push(new RegExp("^" + u.slice(1) + "$")) : n.names.push(new RegExp("^" + u + "$")));
17304
+ f[d] && (u = f[d].replace(/\*/g, ".*?"), u[0] === "-" ? n.skips.push(new RegExp("^" + u.slice(1) + "$")) : n.names.push(new RegExp("^" + u + "$")));
17299
17305
  }
17300
17306
  function o() {
17301
17307
  const u = [
@@ -17307,11 +17313,11 @@ function v_(e) {
17307
17313
  function r(u) {
17308
17314
  if (u[u.length - 1] === "*")
17309
17315
  return !0;
17310
- let d, y;
17311
- for (d = 0, y = n.skips.length; d < y; d++)
17316
+ let d, f;
17317
+ for (d = 0, f = n.skips.length; d < f; d++)
17312
17318
  if (n.skips[d].test(u))
17313
17319
  return !1;
17314
- for (d = 0, y = n.names.length; d < y; d++)
17320
+ for (d = 0, f = n.names.length; d < f; d++)
17315
17321
  if (n.names[d].test(u))
17316
17322
  return !0;
17317
17323
  return !1;
@@ -17425,8 +17431,8 @@ var A_ = v_;
17425
17431
  const m = "color: " + this.color;
17426
17432
  l.splice(1, 0, m, "color: inherit");
17427
17433
  let u = 0, d = 0;
17428
- l[0].replace(/%[a-zA-Z%]/g, (y) => {
17429
- y !== "%%" && (u++, y === "%c" && (d = u));
17434
+ l[0].replace(/%[a-zA-Z%]/g, (f) => {
17435
+ f !== "%%" && (u++, f === "%c" && (d = u));
17430
17436
  }), l.splice(d, 0, m);
17431
17437
  }
17432
17438
  t.log = console.debug || console.log || (() => {
@@ -17832,9 +17838,9 @@ const J_ = /* @__PURE__ */ Ih(z_);
17832
17838
  }, window.cancelAnimationFrame = clearTimeout;
17833
17839
  }
17834
17840
  })();
17835
- function X_(e, t = !0, n = !0, a) {
17841
+ function X_(e, t = !0, n = !0, a = { friendsTab: "enabled" }) {
17836
17842
  const s = t ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = t ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", r = J_(/* @__PURE__ */ Object.create({}), { autostart: !1 });
17837
- return r.use(th), r.use(Kk, { onDeepLinkHandled: a == null ? void 0 : a.onDeepLinkHandled }), r.use(Xk, { videoPlayerController: a == null ? void 0 : a.videoPlayerController }), r.use(eh, {
17843
+ return r.use(th, { friendsTab: a.friendsTab }), r.use(Kk, { onDeepLinkHandled: a == null ? void 0 : a.onDeepLinkHandled }), r.use(Xk, { videoPlayerController: a == null ? void 0 : a.videoPlayerController }), r.use(eh, {
17838
17844
  onContentActivate: a == null ? void 0 : a.onContentActivate,
17839
17845
  withAd: a == null ? void 0 : a.withAd,
17840
17846
  withAdNotification: a == null ? void 0 : a.withAdNotification
@@ -17859,34 +17865,36 @@ const tE = ({
17859
17865
  videoPlayerController: o,
17860
17866
  onContentActivate: r,
17861
17867
  withAdNotification: c,
17862
- withAd: l
17868
+ withAd: l,
17869
+ friendsTab: m
17863
17870
  }) => {
17864
- const [m, u] = Cc(null);
17871
+ const [u, d] = Cc(null);
17865
17872
  return Uc(() => {
17866
- let d = !1;
17873
+ let f = !1;
17867
17874
  if (!e)
17868
- return console.error("streamlayer sdk key should be provided"), u((T) => (T !== null && typeof T.disableApp == "function" && T.disableApp(), null)), () => {
17869
- d = !0;
17875
+ return console.error("streamlayer sdk key should be provided"), d((y) => (y !== null && typeof y.disableApp == "function" && y.disableApp(), null)), () => {
17876
+ f = !0;
17870
17877
  };
17871
- const y = X_(e, n, a, {
17872
- version: "1.8.5",
17878
+ const T = X_(e, n, a, {
17879
+ version: "1.9.0",
17873
17880
  onDeepLinkHandled: s,
17874
17881
  videoPlayerController: o,
17875
17882
  onContentActivate: r,
17876
17883
  withAdNotification: c,
17877
- withAd: l
17884
+ withAd: l,
17885
+ friendsTab: m
17878
17886
  });
17879
17887
  if (t)
17880
- for (const T of t)
17881
- y.use(T);
17882
- return y.ready().then((T) => {
17883
- d || (u(T.sdk), typeof window < "u");
17884
- }).catch((T) => console.log(T)), () => {
17885
- d = !0, y.close(function(T) {
17886
- if (T) throw T;
17888
+ for (const y of t)
17889
+ T.use(y);
17890
+ return T.ready().then((y) => {
17891
+ f || (d(y.sdk), typeof window < "u");
17892
+ }).catch((y) => console.log(y)), () => {
17893
+ f = !0, T.close(function(y) {
17894
+ if (y) throw y;
17887
17895
  });
17888
17896
  };
17889
- }, [e, n]), m;
17897
+ }, [e, n]), u;
17890
17898
  };
17891
17899
  export {
17892
17900
  us as A,
@@ -17899,7 +17907,7 @@ export {
17899
17907
  Fa as a,
17900
17908
  ym as b,
17901
17909
  pm as c,
17902
- Se as d,
17910
+ _e as d,
17903
17911
  km as e,
17904
17912
  P as f,
17905
17913
  fo as g,