@streamlayer/react 1.21.2 → 1.21.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  import { jsx as Y, jsxs as pe, Fragment as to } from "react/jsx-runtime";
2
2
  import { useEffect as It, useState as Lo, useRef as wi, useCallback as nn } from "react";
3
- import "nanostores";
4
3
  import { n as ai, s as J, i as Ht, O as Fr, B as gm, q as fm, k as mm, e as bs, y as io, E as ym, r as _m, t as bm, u as Tm, c as vm, d as Sm, a as Ni, h as Em } from "./provider.js";
4
+ import "nanostores";
5
5
  import "lodash.throttle";
6
6
  import "react-dom";
7
7
  import "react-countup";
8
- import { A as Gh, N as vi, a as Xh, b as Kh, C as no, c as Yh, P as rs, d as Jt, e as wm, f as km, g as Cm, S as Im } from "./useStreamLayerApp2.js";
8
+ import { A as Gh, N as vi, b as Xh, c as Kh, d as no, e as Yh, P as rs, f as Jt, g as wm, h as km, i as Cm, S as Im } from "./useStreamLayerApp2.js";
9
9
  import { c as xm, u as Am } from "./vast-client.min-B0NUra1B.js";
10
10
  import { D as Pm } from "./index-l-eyvmpL.js";
11
11
  import { v4 as fu, validate as Lm, v5 as mu } from "uuid";
@@ -1,9 +1,8 @@
1
1
  import { jsx as P, jsxs as F } from "react/jsx-runtime";
2
2
  import { s as _, B as te, o as vt, p as gt, e as Se, j as wt, n as Ee, u as bt, i as yt } from "./provider.js";
3
3
  import $, { forwardRef as Ae, useState as W, useRef as D, useEffect as Y, useLayoutEffect as St, createContext as He, useMemo as Re, useCallback as qe, memo as Et } from "react";
4
- import { ConnectError as xt, Code as Tt } from "@connectrpc/connect";
5
- import Ct from "lodash.throttle";
6
- import { S as We } from "./useStreamLayerApp2.js";
4
+ import xt from "lodash.throttle";
5
+ import { C as Tt, a as Ct, S as We } from "./useStreamLayerApp2.js";
7
6
  function _e(t) {
8
7
  return t !== null && typeof t == "object" && "constructor" in t && t.constructor === Object;
9
8
  }
@@ -3239,7 +3238,7 @@ const Tr = ({ data: t, gamification: e, onEvent: s, swipeable: r, autoplay: n })
3239
3238
  e.closeQuestion();
3240
3239
  }, [u, f] = W(1.1);
3241
3240
  return Y(() => {
3242
- const v = Ct(() => {
3241
+ const v = xt(() => {
3243
3242
  var h;
3244
3243
  const b = (h = l.current) == null ? void 0 : h.size;
3245
3244
  if (!b)
@@ -3283,7 +3282,7 @@ const Tr = ({ data: t, gamification: e, onEvent: s, swipeable: r, autoplay: n })
3283
3282
  {
3284
3283
  onEvent: n,
3285
3284
  actionFn: () => n({ type: "slHardRefresh" }),
3286
- description: l instanceof xt && l.code !== Tt.InvalidArgument ? `The event ID was not
3285
+ description: l instanceof Tt && l.code !== Ct.InvalidArgument ? `The event ID was not
3287
3286
  specified or is invalid.` : `The server is unable to
3288
3287
  handle this request.`
3289
3288
  }
@@ -3416,12 +3415,12 @@ view this resource.`
3416
3415
  action: "tap",
3417
3416
  payload: {}
3418
3417
  });
3419
- }, Wr = () => {
3418
+ }, qr = () => {
3420
3419
  const t = bt();
3421
3420
  return Y(() => (document == null || document.addEventListener("click", Ve), () => {
3422
3421
  document == null || document.removeEventListener("click", Ve);
3423
3422
  }), []), t ? /* @__PURE__ */ P(mt, { sdk: t }) : null;
3424
3423
  };
3425
3424
  export {
3426
- Wr as BetPackProvider
3425
+ qr as BetPackProvider
3427
3426
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as u, jsxs as p } from "react/jsx-runtime";
2
2
  import { useRef as l, useEffect as h } from "react";
3
- import "nanostores";
4
3
  import { e as m, s as f, T as S, u as I, d as g, h as v, a as k } from "./provider.js";
4
+ import "nanostores";
5
5
  import "lodash.throttle";
6
6
  import "react-dom";
7
7
  import "react-countup";
@@ -1,11 +1,11 @@
1
1
  import { jsxs as l, jsx as s } from "react/jsx-runtime";
2
- import { useState as w, useRef as _, useEffect as y, useCallback as As, useMemo as hs } from "react";
2
+ import { useState as w, useRef as _, useEffect as y, useCallback as As, useMemo as Is } from "react";
3
+ import { s as n, B as A, D as hs, v as $s, x as K, w as G, z as gs, E as ws, O as x, y as ys, f as Ts, e as bs, i as Cs, N as O, u as fs, d as ks, c as Ns, h as qs } from "./provider.js";
3
4
  import "nanostores";
4
- import { s as n, B as A, D as Is, v as $s, x as K, w as G, z as gs, E as ws, O as x, y as ys, f as Ts, e as bs, i as Cs, N as O, u as fs, d as ks, c as Ns, h as qs } from "./provider.js";
5
5
  import "lodash.throttle";
6
6
  import "react-dom";
7
7
  import "react-countup";
8
- import { Q as v, h as I, i as H, j as L, S as Es, A as R } from "./useStreamLayerApp2.js";
8
+ import { Q as v, j as h, k as H, l as L, S as Es, A as R } from "./useStreamLayerApp2.js";
9
9
  const b = /* @__PURE__ */ n("div")({
10
10
  name: "Media",
11
11
  class: "m1bcvojl",
@@ -105,7 +105,7 @@ const b = /* @__PURE__ */ n("div")({
105
105
  return /* @__PURE__ */ l(Hs, { children: [
106
106
  p && /* @__PURE__ */ s(_s, { children: /* @__PURE__ */ s(Ks, { children: p }) }),
107
107
  /* @__PURE__ */ s(
108
- Is,
108
+ hs,
109
109
  {
110
110
  image: e,
111
111
  name: (d = i == null ? void 0 : i.meta) == null ? void 0 : d.accountName,
@@ -133,13 +133,13 @@ const b = /* @__PURE__ */ n("div")({
133
133
  if (!d || !t || !t.notification)
134
134
  return null;
135
135
  const { title: m, image: u, imageMode: $ } = t.notification;
136
- let h = u;
137
- i === I.TWEET && a != null && a.tweetMedia && (h = a.tweetMedia.image), $ === v.NONE && (h = "");
138
- const g = t.useMediaFromContent && (o == null ? void 0 : o.image), c = i === I.TWEET && ((p = a == null ? void 0 : a.tweetMedia) == null ? void 0 : p.video) || i === I.FACTOID && (o == null ? void 0 : o.video);
139
- return /* @__PURE__ */ s(Vs, { "data-a": "intr", className: "SL_InApp", onClick: e, children: /* @__PURE__ */ l(Us, { style: h ? {} : { paddingLeft: "1.5rem" }, children: [
140
- h && !g && /* @__PURE__ */ s(j, { src: h, imageMode: $, withVideo: !!c }),
136
+ let I = u;
137
+ i === h.TWEET && a != null && a.tweetMedia && (I = a.tweetMedia.image), $ === v.NONE && (I = "");
138
+ const g = t.useMediaFromContent && (o == null ? void 0 : o.image), c = i === h.TWEET && ((p = a == null ? void 0 : a.tweetMedia) == null ? void 0 : p.video) || i === h.FACTOID && (o == null ? void 0 : o.video);
139
+ return /* @__PURE__ */ s(Vs, { "data-a": "intr", className: "SL_InApp", onClick: e, children: /* @__PURE__ */ l(Us, { style: I ? {} : { paddingLeft: "1.5rem" }, children: [
140
+ I && !g && /* @__PURE__ */ s(j, { src: I, imageMode: $, withVideo: !!c }),
141
141
  g && /* @__PURE__ */ s(j, { src: g, fromInsight: !0, withVideo: !!c }),
142
- i === I.TWEET ? /* @__PURE__ */ s(Zs, { tweet: a }) : /* @__PURE__ */ s(Xs, { questionTypeData: d, questionType: i, title: m }),
142
+ i === h.TWEET ? /* @__PURE__ */ s(Zs, { tweet: a }) : /* @__PURE__ */ s(Xs, { questionTypeData: d, questionType: i, title: m }),
143
143
  /* @__PURE__ */ s(Qs, { name: "inapp-button", children: r || "Open" }),
144
144
  /* @__PURE__ */ s(Ys, { name: "chevronRight" })
145
145
  ] }) });
@@ -184,7 +184,7 @@ const b = /* @__PURE__ */ n("div")({
184
184
  name: "MediaNone",
185
185
  class: "mqfzyyr",
186
186
  propsAsIs: !0
187
- }), Ae = "v170mtgf", he = {
187
+ }), Ae = "v170mtgf", Ie = {
188
188
  [v.UNSET]: S,
189
189
  [v.NONE]: S,
190
190
  [v.ROUNDED]: pe,
@@ -204,7 +204,7 @@ const b = /* @__PURE__ */ n("div")({
204
204
  color: o,
205
205
  children: /* @__PURE__ */ s(S, {})
206
206
  });
207
- const d = a === L.ENABLED ? re : he[i];
207
+ const d = a === L.ENABLED ? re : Ie[i];
208
208
  return /* @__PURE__ */ s(B, {
209
209
  color: o,
210
210
  children: t ? /* @__PURE__ */ s(te, {
@@ -220,14 +220,14 @@ const b = /* @__PURE__ */ n("div")({
220
220
  })
221
221
  })
222
222
  });
223
- }, Ie = () => ({
223
+ }, he = () => ({
224
224
  withoutPadding: e
225
225
  }) => e ? "0px" : "1rem", X = /* @__PURE__ */ n("div")({
226
226
  name: "NotificationContent",
227
227
  class: "n1p3bk1c",
228
228
  propsAsIs: !1,
229
229
  vars: {
230
- "n1p3bk1c-0": [Ie()]
230
+ "n1p3bk1c-0": [he()]
231
231
  }
232
232
  }), $e = /* @__PURE__ */ n("div")({
233
233
  name: "MainContent",
@@ -243,7 +243,7 @@ const b = /* @__PURE__ */ n("div")({
243
243
  propsAsIs: !1
244
244
  }), ye = () => ({
245
245
  questionType: e
246
- }) => e === I.FACTOID ? "7.3rem" : "4.5rem", Te = () => ({
246
+ }) => e === h.FACTOID ? "7.3rem" : "4.5rem", Te = () => ({
247
247
  webos: e
248
248
  }) => e ? "11px 0px 8px 0px" : "11px 0px", be = () => ({
249
249
  imageMode: e,
@@ -332,20 +332,20 @@ const b = /* @__PURE__ */ n("div")({
332
332
  webos: d
333
333
  }) => {
334
334
  var r, m, u;
335
- const [$, h] = w(!1), g = _();
336
- y(() => (o != null && o.sponsorLogo && (h(!0), g.current = setTimeout(() => {
337
- h(!1);
335
+ const [$, I] = w(!1), g = _();
336
+ y(() => (o != null && o.sponsorLogo && (I(!0), g.current = setTimeout(() => {
337
+ I(!1);
338
338
  }, 5e3)), () => clearTimeout(g.current)), [o == null ? void 0 : o.sponsorLogo]);
339
339
  const c = G[t];
340
340
  if (!c || !o || !o.notification)
341
341
  return null;
342
- const { title: ds, image: ps, imageMode: f, useContentMedia: k } = o.notification, ms = t === I.FACTOID ? a == null ? void 0 : a.heading : ds, us = t === I.FACTOID ? a == null ? void 0 : a.body : "", vs = ps, N = t === I.FACTOID && ((r = a == null ? void 0 : a.video) == null ? void 0 : r.url) && (o == null ? void 0 : o.isVideo) && k === L.ENABLED, q = k === L.ENABLED ? N ? (m = a == null ? void 0 : a.video) == null ? void 0 : m.url : a == null ? void 0 : a.image : "";
342
+ const { title: ds, image: ps, imageMode: f, useContentMedia: k } = o.notification, ms = t === h.FACTOID ? a == null ? void 0 : a.heading : ds, us = t === h.FACTOID ? a == null ? void 0 : a.body : "", vs = ps, N = t === h.FACTOID && ((r = a == null ? void 0 : a.video) == null ? void 0 : r.url) && (o == null ? void 0 : o.isVideo) && k === L.ENABLED, q = k === L.ENABLED ? N ? (m = a == null ? void 0 : a.video) == null ? void 0 : m.url : a == null ? void 0 : a.image : "";
343
343
  return o != null && o.sponsorLogo && $ ? /* @__PURE__ */ s(
344
344
  Fe,
345
345
  {
346
346
  sponsorLogo: o == null ? void 0 : o.sponsorLogo,
347
347
  webos: d,
348
- onClick: () => h(!1)
348
+ onClick: () => I(!1)
349
349
  }
350
350
  ) : /* @__PURE__ */ l(
351
351
  Z,
@@ -355,7 +355,7 @@ const b = /* @__PURE__ */ n("div")({
355
355
  onClick: (C) => {
356
356
  d || e == null || e(C);
357
357
  },
358
- "data-is-insight": t === I.FACTOID,
358
+ "data-is-insight": t === h.FACTOID,
359
359
  "data-webos": d,
360
360
  children: [
361
361
  (o == null ? void 0 : o.sponsorLogo) && /* @__PURE__ */ s(Se, { children: /* @__PURE__ */ s(ss, { src: o == null ? void 0 : o.sponsorLogo }) }),
@@ -563,7 +563,7 @@ const b = /* @__PURE__ */ n("div")({
563
563
  name: "Line1",
564
564
  class: "le78kvg",
565
565
  propsAsIs: !0
566
- }), hn = () => D, In = /* @__PURE__ */ n(hn())({
566
+ }), In = () => D, hn = /* @__PURE__ */ n(In())({
567
567
  name: "Line2",
568
568
  class: "l1o7966d",
569
569
  propsAsIs: !0
@@ -574,7 +574,7 @@ const b = /* @__PURE__ */ n("div")({
574
574
  }), wn = () => /* @__PURE__ */ l(un, {
575
575
  children: [/* @__PURE__ */ s(An, {
576
576
  children: /* @__PURE__ */ s("div", {})
577
- }), /* @__PURE__ */ s(In, {
577
+ }), /* @__PURE__ */ s(hn, {
578
578
  children: /* @__PURE__ */ s("div", {})
579
579
  }), /* @__PURE__ */ s(gn, {
580
580
  children: /* @__PURE__ */ s("div", {})
@@ -879,7 +879,7 @@ const b = /* @__PURE__ */ n("div")({
879
879
  1: 3e3,
880
880
  2: 4e3,
881
881
  3: 4e3
882
- }, ho = ({ close: e, action: i, setStep: t, votedAnswer: o, correct: a, correctAnswerTitle: p, questionTitle: d, step: r }) => {
882
+ }, Io = ({ close: e, action: i, setStep: t, votedAnswer: o, correct: a, correctAnswerTitle: p, questionTitle: d, step: r }) => {
883
883
  if (y(() => {
884
884
  if (t) {
885
885
  const u = setTimeout(() => {
@@ -902,10 +902,10 @@ const b = /* @__PURE__ */ n("div")({
902
902
  r === 3 && !a && /* @__PURE__ */ s(Ao, { title: p || "unknown", answer: (o == null ? void 0 : o.title) || "unknown" })
903
903
  ] })
904
904
  ] }) });
905
- }, Io = ({ close: e, action: i, votedAnswer: t, correct: o, correctAnswerTitle: a, questionTitle: p }) => {
905
+ }, ho = ({ close: e, action: i, votedAnswer: t, correct: o, correctAnswerTitle: a, questionTitle: p }) => {
906
906
  const [d, r] = w(1);
907
907
  return /* @__PURE__ */ s(
908
- ho,
908
+ Io,
909
909
  {
910
910
  close: e,
911
911
  action: i,
@@ -953,11 +953,11 @@ const b = /* @__PURE__ */ n("div")({
953
953
  }, 5e3)), () => clearTimeout(m.current);
954
954
  }, [(i = e == null ? void 0 : e.inApp) == null ? void 0 : i.sponsorLogo]), (t = e == null ? void 0 : e.inApp) != null && t.sponsorLogo && d ? /* @__PURE__ */ s(bo, { sponsorLogo: (o = e.inApp) == null ? void 0 : o.sponsorLogo, onClick: () => r(!1) }) : /* @__PURE__ */ s(cs, { children: /* @__PURE__ */ l("div", { children: [
955
955
  ((a = e == null ? void 0 : e.inApp) == null ? void 0 : a.sponsorLogo) && /* @__PURE__ */ s(To, { children: /* @__PURE__ */ s(ls, { src: (p = e == null ? void 0 : e.inApp) == null ? void 0 : p.sponsorLogo }) }),
956
- /* @__PURE__ */ s(Io, { ...e })
956
+ /* @__PURE__ */ s(ho, { ...e })
957
957
  ] }) });
958
958
  }, fo = ({ sdk: e, webos: i }) => {
959
959
  var t, o, a, p, d, r, m, u;
960
- const [$] = w(e.getNotificationsStore()), h = bs($), g = e.getFeature(Es.GAMES), c = hs(() => e.getActiveNotification(), [e, h]);
960
+ const [$] = w(e.getNotificationsStore()), I = bs($), g = e.getFeature(Es.GAMES), c = Is(() => e.getActiveNotification(), [e, I]);
961
961
  return y(() => {
962
962
  c && Cs.emit("notification", {
963
963
  action: "rendered",
@@ -966,7 +966,7 @@ const b = /* @__PURE__ */ n("div")({
966
966
  questionType: c.data.questionType
967
967
  }
968
968
  });
969
- }, [c]), c && c.type === O.QUESTION_RESOLVED ? c.data.question && c.data.questionType === I.PREDICTION ? c && ((t = c.data.inApp) == null ? void 0 : t.adUnit) === R.STANDART ? /* @__PURE__ */ s(
969
+ }, [c]), c && c.type === O.QUESTION_RESOLVED ? c.data.question && c.data.questionType === h.PREDICTION ? c && ((t = c.data.inApp) == null ? void 0 : t.adUnit) === R.STANDART ? /* @__PURE__ */ s(
970
970
  Co,
971
971
  {
972
972
  action: c.action,
@@ -1,7 +1,7 @@
1
1
  import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as u, useEffect as d } from "react";
3
- import "nanostores";
4
3
  import { s as a, B as y, m as h, f as S, e as f, F as c, i as r, u as v, d as g, h as k } from "./provider.js";
4
+ import "nanostores";
5
5
  import "lodash.throttle";
6
6
  import "react-dom";
7
7
  import "react-countup";
@@ -3,8 +3,8 @@ var M7 = (e, t, n) => t in e ? k7(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var p1 = (e, t, n) => M7(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as a, jsxs as g, Fragment as d1 } from "react/jsx-runtime";
5
5
  import * as d from "react";
6
- import O1, { useState as Z, useEffect as j, useRef as l1, createContext as E6, useContext as Q1, useCallback as o1, useMemo as f1, useLayoutEffect as A6, forwardRef as k3, memo as V7, Component as F7, createElement as O7, PureComponent as N7, lazy as H7, Suspense as D7 } from "react";
7
- import { S as E1, h as S, k as q7, Q as K1, i as r2, A as T6, f as B7, e as w3, I as R6, l as P7, m as A2, u as Z7 } from "./useStreamLayerApp2.js";
6
+ import F1, { useState as Z, useEffect as j, useRef as l1, createContext as E6, useContext as Q1, useCallback as o1, useMemo as f1, useLayoutEffect as A6, forwardRef as k3, memo as V7, Component as F7, createElement as O7, PureComponent as N7, lazy as H7, Suspense as D7 } from "react";
7
+ import { S as E1, a as U1, m as ot, j as S, n as q7, Q as K1, k as r2, A as T6, h as B7, g as w3, I as R6, o as P7, p as A2, u as Z7 } from "./useStreamLayerApp2.js";
8
8
  import { listenKeys as K7 } from "nanostores";
9
9
  import { pino as U7 } from "pino";
10
10
  import b3 from "lodash.throttle";
@@ -13,8 +13,6 @@ import { createPortal as F2 } from "react-dom";
13
13
  import j7 from "react-countup";
14
14
  import z7 from "react-infinite-scroller";
15
15
  import "uuid";
16
- import { Code as U1, createContextKey as ot } from "@connectrpc/connect";
17
- import "@connectrpc/connect-web";
18
16
  import "@nanostores/query";
19
17
  const G7 = U7({
20
18
  level: "trace",
@@ -247,8 +245,8 @@ function c5(e) {
247
245
  f[R] = y[R];
248
246
  }), C.style = f;
249
247
  }
250
- return e.__wyw_meta && e !== l ? (C.as = l, O1.createElement(e, C)) : O1.createElement(l, C);
251
- }, i = O1.forwardRef ? O1.forwardRef(r) : (
248
+ return e.__wyw_meta && e !== l ? (C.as = l, F1.createElement(e, C)) : F1.createElement(l, C);
249
+ }, i = F1.forwardRef ? F1.forwardRef(r) : (
252
250
  // React.forwardRef won't available on older React versions and in Preact
253
251
  // Fallback to a innerRef prop in that case
254
252
  (s) => {
@@ -310,7 +308,7 @@ var m2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
310
308
  * This source code is licensed under the MIT license found in the
311
309
  * LICENSE file in the root directory of this source tree.
312
310
  */
313
- var a2 = O1;
311
+ var a2 = F1;
314
312
  function w5(e, t) {
315
313
  return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
316
314
  }
@@ -352,17 +350,17 @@ const Y2 = (e, t) => (n) => {
352
350
  e.current !== n && (e.current = n, t());
353
351
  };
354
352
  function $5(e, { keys: t, deps: n = [e, t] } = {}) {
355
- const r = O1.useRef();
353
+ const r = F1.useRef();
356
354
  r.current = e.get();
357
- const i = O1.useCallback((o) => (Y2(r, o)(e.value), (t == null ? void 0 : t.length) > 0 ? K7(e, t, Y2(r, o)) : e.listen(Y2(r, o))), n), s = () => r.current;
358
- return O1.useSyncExternalStore ? O1.useSyncExternalStore(i, s, s) : x5.useSyncExternalStore(i, s, s);
355
+ const i = F1.useCallback((o) => (Y2(r, o)(e.value), (t == null ? void 0 : t.length) > 0 ? K7(e, t, Y2(r, o)) : e.listen(Y2(r, o))), n), s = () => r.current;
356
+ return F1.useSyncExternalStore ? F1.useSyncExternalStore(i, s, s) : x5.useSyncExternalStore(i, s, s);
359
357
  }
360
358
  const J = $5, S5 = () => [
361
359
  !1,
362
360
  (e) => {
363
361
  window.requestAnimationFrame(() => e());
364
362
  }
365
- ], k5 = d.useTransition || S5, M5 = (e) => {
363
+ ], k5 = F1.useTransition || S5, M5 = (e) => {
366
364
  const t = J(e.getActiveFeature()), n = J(e.streamStore()), [r, i] = Z(null);
367
365
  return j(() => {
368
366
  const s = e.getFeatures();
@@ -2519,7 +2517,7 @@ function ls() {
2519
2517
  }
2520
2518
  (function(e, t) {
2521
2519
  (function(n, r) {
2522
- e.exports = r(q6(), Or(), U9(), z9(), W9(), Y9(), X9(), J9(), as(), os(), ls(), O1);
2520
+ e.exports = r(q6(), Or(), U9(), z9(), W9(), Y9(), X9(), J9(), as(), os(), ls(), F1);
2523
2521
  })(m2, function(n, r, i, s, o, l, u, p, C, v, f, y) {
2524
2522
  return function() {
2525
2523
  var A = { 654: function(L, m, w) {
@@ -2593,8 +2591,8 @@ function ls() {
2593
2591
  return Math.abs(G - n1);
2594
2592
  }
2595
2593
  if (x === "edges") {
2596
- var b1 = Math.min(X, Q), c1 = Math.min(z, u1), $1 = Math.max(X, Q), B1 = Math.max(z, u1), F1 = Math.abs(b1 - c1), S1 = Math.abs($1 - B1);
2597
- return Math.min(F1, S1);
2594
+ var b1 = Math.min(X, Q), c1 = Math.min(z, u1), $1 = Math.max(X, Q), B1 = Math.max(z, u1), O1 = Math.abs(b1 - c1), S1 = Math.abs($1 - B1);
2595
+ return Math.min(O1, S1);
2598
2596
  }
2599
2597
  var C2 = [Math.abs(z - X), Math.abs(z - Q), Math.abs(u1 - X), Math.abs(u1 - Q)];
2600
2598
  return Math.min.apply(Math, C2);
@@ -2605,8 +2603,8 @@ function ls() {
2605
2603
  return F.log("smartNavigate", "distance (primary, secondary, total weighted) for ".concat(U.focusKey, " relative to ").concat(x, " is"), z, u1, G), F.log("smartNavigate", "priority for ".concat(U.focusKey, " relative to ").concat(x, " is"), n1), F.visualDebugger && (F.visualDebugger.drawPoint(t1.a.x, t1.a.y, "yellow", 6), F.visualDebugger.drawPoint(t1.b.x, t1.b.y, "yellow", 6)), n1;
2606
2604
  });
2607
2605
  }, T.prototype.init = function(h) {
2608
- var b = this, I = h === void 0 ? {} : h, x = I.debug, F = x !== void 0 && x, q = I.visualDebug, B = q !== void 0 && q, U = I.nativeMode, t1 = U !== void 0 && U, e1 = I.throttle, X = e1 === void 0 ? 0 : e1, Q = I.throttleKeypresses, z = Q !== void 0 && Q, u1 = I.useGetBoundingClientRect, G = u1 !== void 0 && u1, n1 = I.shouldFocusDOMNode, b1 = n1 !== void 0 && n1, c1 = I.domNodeFocusOptions, $1 = c1 === void 0 ? {} : c1, B1 = I.shouldUseNativeEvents, F1 = B1 !== void 0 && B1, S1 = I.rtl, C2 = S1 !== void 0 && S1, h1 = I.distanceCalculationMethod, _1 = h1 === void 0 ? "corners" : h1, it = I.customDistanceCalculationFunction, $7 = it === void 0 ? void 0 : it;
2609
- if (!this.enabled && (this.domNodeFocusOptions = $1, this.enabled = !0, this.nativeMode = t1, this.throttleKeypresses = z, this.useGetBoundingClientRect = G, this.shouldFocusDOMNode = b1 && !t1, this.shouldUseNativeEvents = F1, this.writingDirection = C2 ? C1.default.RTL : C1.default.LTR, this.distanceCalculationMethod = _1, this.customDistanceCalculationFunction = $7, this.debug = F, !this.nativeMode && (Number.isInteger(X) && X > 0 && (this.throttle = X), this.bindEventHandlers(), B))) {
2606
+ var b = this, I = h === void 0 ? {} : h, x = I.debug, F = x !== void 0 && x, q = I.visualDebug, B = q !== void 0 && q, U = I.nativeMode, t1 = U !== void 0 && U, e1 = I.throttle, X = e1 === void 0 ? 0 : e1, Q = I.throttleKeypresses, z = Q !== void 0 && Q, u1 = I.useGetBoundingClientRect, G = u1 !== void 0 && u1, n1 = I.shouldFocusDOMNode, b1 = n1 !== void 0 && n1, c1 = I.domNodeFocusOptions, $1 = c1 === void 0 ? {} : c1, B1 = I.shouldUseNativeEvents, O1 = B1 !== void 0 && B1, S1 = I.rtl, C2 = S1 !== void 0 && S1, h1 = I.distanceCalculationMethod, _1 = h1 === void 0 ? "corners" : h1, it = I.customDistanceCalculationFunction, $7 = it === void 0 ? void 0 : it;
2607
+ if (!this.enabled && (this.domNodeFocusOptions = $1, this.enabled = !0, this.nativeMode = t1, this.throttleKeypresses = z, this.useGetBoundingClientRect = G, this.shouldFocusDOMNode = b1 && !t1, this.shouldUseNativeEvents = O1, this.writingDirection = C2 ? C1.default.RTL : C1.default.LTR, this.distanceCalculationMethod = _1, this.customDistanceCalculationFunction = $7, this.debug = F, !this.nativeMode && (Number.isInteger(X) && X > 0 && (this.throttle = X), this.bindEventHandlers(), B))) {
2610
2608
  this.visualDebugger = new I1.default(this.writingDirection);
2611
2609
  var st = function() {
2612
2610
  requestAnimationFrame(function() {
@@ -2758,12 +2756,12 @@ function ls() {
2758
2756
  var b = h.focusKey, I = h.node, x = h.parentFocusKey, F = h.onEnterPress, q = h.onEnterRelease, B = h.onArrowPress, U = h.onArrowRelease, t1 = h.onFocus, e1 = h.onBlur, X = h.saveLastFocusedChild, Q = h.trackChildren, z = h.onUpdateFocus, u1 = h.onUpdateHasFocusedChild, G = h.preferredChildFocusKey, n1 = h.autoRestoreFocus, b1 = h.forceFocus, c1 = h.focusable, $1 = h.isFocusBoundary, B1 = h.focusBoundaryDirections;
2759
2757
  if (this.focusableComponents[b] = { focusKey: b, node: I, parentFocusKey: x, onEnterPress: F, onEnterRelease: q, onArrowPress: B, onArrowRelease: U, onFocus: t1, onBlur: e1, onUpdateFocus: z, onUpdateHasFocusedChild: u1, saveLastFocusedChild: X, trackChildren: Q, preferredChildFocusKey: G, focusable: c1, isFocusBoundary: $1, focusBoundaryDirections: B1, autoRestoreFocus: n1, forceFocus: b1, lastFocusedChildKey: null, layout: { x: 0, y: 0, width: 0, height: 0, left: 0, top: 0, right: 0, bottom: 0, node: I }, layoutUpdated: !1 }, I || console.warn('Component added without a node reference. This will result in its coordinates being empty and may cause lost focus. Check the "ref" passed to "useFocusable": ', this.focusableComponents[b]), !this.nativeMode) {
2760
2758
  this.updateLayout(b), this.log("addFocusable", "Component added: ", this.focusableComponents[b]), b === this.focusKey && this.setFocus(G || b);
2761
- for (var F1 = this.focusableComponents[this.focusKey]; F1; ) {
2762
- if (F1.parentFocusKey === b) {
2759
+ for (var O1 = this.focusableComponents[this.focusKey]; O1; ) {
2760
+ if (O1.parentFocusKey === b) {
2763
2761
  this.updateParentsHasFocusedChild(this.focusKey, {}), this.updateParentsLastFocusedChild(this.focusKey);
2764
2762
  break;
2765
2763
  }
2766
- F1 = this.focusableComponents[F1.parentFocusKey];
2764
+ O1 = this.focusableComponents[O1.parentFocusKey];
2767
2765
  }
2768
2766
  }
2769
2767
  }, T.prototype.removeFocusable = function(h) {
@@ -2970,14 +2968,14 @@ function ls() {
2970
2968
  x(h1, B, _1);
2971
2969
  }, [B, x]), z = (0, _.useCallback)(function(h1, _1) {
2972
2970
  q(h1, B, _1);
2973
- }, [B, q]), u1 = (0, _.useRef)(null), G = (0, _.useState)(!1), n1 = G[0], b1 = G[1], c1 = (0, _.useState)(!1), $1 = c1[0], B1 = c1[1], F1 = (0, H.useFocusContext)(), S1 = (0, _.useMemo)(function() {
2971
+ }, [B, q]), u1 = (0, _.useRef)(null), G = (0, _.useState)(!1), n1 = G[0], b1 = G[1], c1 = (0, _.useState)(!1), $1 = c1[0], B1 = c1[1], O1 = (0, H.useFocusContext)(), S1 = (0, _.useMemo)(function() {
2974
2972
  return x1 || (0, k.default)("sn:focusable-item-");
2975
2973
  }, [x1]), C2 = (0, _.useCallback)(function(h1) {
2976
2974
  h1 === void 0 && (h1 = {}), V.SpatialNavigation.setFocus(S1, h1);
2977
2975
  }, [S1]);
2978
2976
  return (0, _.useEffect)(function() {
2979
2977
  var h1 = u1.current;
2980
- return V.SpatialNavigation.addFocusable({ focusKey: S1, node: h1, parentFocusKey: F1, preferredChildFocusKey: Y, onEnterPress: U, onEnterRelease: t1, onArrowPress: e1, onArrowRelease: X, onFocus: Q, onBlur: z, onUpdateFocus: function(_1) {
2978
+ return V.SpatialNavigation.addFocusable({ focusKey: S1, node: h1, parentFocusKey: O1, preferredChildFocusKey: Y, onEnterPress: U, onEnterRelease: t1, onArrowPress: e1, onArrowRelease: X, onFocus: Q, onBlur: z, onUpdateFocus: function(_1) {
2981
2979
  return _1 === void 0 && (_1 = !1), b1(_1);
2982
2980
  }, onUpdateHasFocusedChild: function(_1) {
2983
2981
  return _1 === void 0 && (_1 = !1), B1(_1);
@@ -3435,7 +3433,7 @@ const us = (e) => /* @__PURE__ */ d.createElement("svg", { width: 24, height: 24
3435
3433
  [S.POLL]: { label: "Poll", iconName: "icon-poll" },
3436
3434
  [S.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
3437
3435
  [S.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
3438
- }, Ef = {
3436
+ }, If = {
3439
3437
  [S.TWEET]: "Learn more",
3440
3438
  [S.FACTOID]: "Learn more",
3441
3439
  [S.POLL]: "Answer",
@@ -6069,7 +6067,7 @@ const Pd = /* @__PURE__ */ c("div")({
6069
6067
  }) => {
6070
6068
  const n = e + t;
6071
6069
  return n === 0 ? 0 : Math.round(e / n * 100);
6072
- }, Af = ({
6070
+ }, _f = ({
6073
6071
  gamification: e,
6074
6072
  scrollStore: t,
6075
6073
  className: n,
@@ -7511,7 +7509,7 @@ const Pd = /* @__PURE__ */ c("div")({
7511
7509
  n({ ...r });
7512
7510
  }) : () => {
7513
7511
  }, [e == null ? void 0 : e.uiState]), t;
7514
- }, Tf = ({ event: e, topNavigation: t, theme: n, muted: r, withSidebarNotification: i = !0 }) => {
7512
+ }, Ef = ({ event: e, topNavigation: t, theme: n, muted: r, withSidebarNotification: i = !0 }) => {
7515
7513
  const { sdk: s, status: o } = Q1(Y1), l = af(), u = sf(), { event: p } = Q1(Y1);
7516
7514
  if (o === S3.UNSET)
7517
7515
  throw new Error("Wrap app in `StreamLayerProvider`");
@@ -7529,7 +7527,7 @@ var S3 = /* @__PURE__ */ ((e) => (e[e.UNSET = 0] = "UNSET", e[e.CONNECTED = 1] =
7529
7527
  const lf = {
7530
7528
  status: 0,
7531
7529
  sdk: null
7532
- }, Y1 = E6(lf), Rf = ({
7530
+ }, Y1 = E6(lf), Af = ({
7533
7531
  sdkKey: e,
7534
7532
  theme: t,
7535
7533
  themeMode: n,
@@ -7588,15 +7586,15 @@ export {
7588
7586
  s2 as F,
7589
7587
  i2 as N,
7590
7588
  Y3 as O,
7591
- Rf as S,
7589
+ Af as S,
7592
7590
  vd as T,
7593
7591
  of as a,
7594
- Tf as b,
7592
+ Ef as b,
7595
7593
  af as c,
7596
7594
  sf as d,
7597
7595
  J as e,
7598
7596
  J3 as f,
7599
- Af as g,
7597
+ _f as g,
7600
7598
  tf as h,
7601
7599
  w2 as i,
7602
7600
  o2 as j,
@@ -7615,5 +7613,5 @@ export {
7615
7613
  j2 as w,
7616
7614
  ku as x,
7617
7615
  Ma as y,
7618
- Ef as z
7616
+ If as z
7619
7617
  };