@streamlayer/react 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/app.js CHANGED
@@ -1,12 +1,12 @@
1
- var ge = Object.defineProperty;
2
- var me = (e, s, n) => s in e ? ge(e, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[s] = n;
3
- var g = (e, s, n) => me(e, typeof s != "symbol" ? s + "" : s, n);
4
- import { jsx as t, jsxs as m, Fragment as L } from "react/jsx-runtime";
5
- import { a4 as V, u, F as fe, s as h, T as re, i as ke, x as ye, b as Ne, N as be, k as Se, M as Ie, g as Ee, h as Ae, C as we, j as Ce, O as ae, m as P, l as $e, n as Le, o as De, p as le, q as Te, r as xe, t as Oe, v as M, w as Re, y as de, z as U, A as Ve, B as Pe, I as Q, c as ce, E as Qe, G as _e, H as qe, e as Fe, J as x, P as G, Q as Ke, R as Me, U as Ue, a as ze, W as Be, X as We, L as _, $ as Ge, f as q, a0 as He, a1 as je, Y as Xe, Z as Ye, _ as Ze, a5 as Je, a2 as pe, a3 as H } from "./index2.js";
6
- import { createContext as es, useContext as z, useRef as $, useState as E, useEffect as k, useTransition as ss, lazy as ns, useMemo as C, Suspense as ts, forwardRef as os, useLayoutEffect as is, useCallback as R } from "react";
7
- import { C as w, c as j, Q as O, S as D } from "./useStreamLayerApp2.js";
1
+ var fe = Object.defineProperty;
2
+ var ke = (e, s, n) => s in e ? fe(e, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[s] = n;
3
+ var m = (e, s, n) => ke(e, typeof s != "symbol" ? s + "" : s, n);
4
+ import { jsx as t, jsxs as g, Fragment as D } from "react/jsx-runtime";
5
+ import { a4 as P, u, F as ye, s as h, T as re, i as Ne, p as be, b as Se, N as Ie, k as Ee, M as Ae, g as Ce, h as we, C as $e, j as Le, O as le, m as q, l as De, n as Te, o as Oe, q as de, r as xe, t as Re, v as Ve, w as M, x as Pe, y as ce, z as U, A as qe, B as G, I as O, c as pe, E as _e, G as Fe, H as Qe, e as Ke, J as x, K as H, P as Me, R as Ue, U as ze, a as ue, W as Be, X as We, L as _, $ as Ge, f as F, a0 as He, a1 as je, Y as Xe, Z as Ye, _ as Ze, a5 as Je, a2 as he, a3 as j } from "./index2.js";
6
+ import { createContext as es, useContext as z, useRef as L, useState as E, useEffect as k, useTransition as ss, lazy as ns, useMemo as w, Suspense as ts, forwardRef as os, useLayoutEffect as is, useCallback as V } from "react";
7
+ import { C, c as X, Q as R, S as $ } from "./useStreamLayerApp2.js";
8
8
  window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
9
- function rs(e) {
9
+ function as(e) {
10
10
  return e instanceof DOMException && // everything except Firefox
11
11
  (e.code === 22 || // Firefox
12
12
  e.code === 1014 || // test name field too, because code might not be present
@@ -14,100 +14,100 @@ function rs(e) {
14
14
  e.name === "QuotaExceededError" || // Firefox
15
15
  e.name === "NS_ERROR_DOM_QUOTA_REACHED");
16
16
  }
17
- class as {
17
+ class rs {
18
18
  constructor(s = "main", n = window.localStorage) {
19
- g(this, "delimiter", ":");
20
- g(this, "prefix");
21
- g(this, "storage");
22
- g(this, "clear", () => {
19
+ m(this, "delimiter", ":");
20
+ m(this, "prefix");
21
+ m(this, "storage");
22
+ m(this, "clear", () => {
23
23
  for (const s in window.localStorage)
24
24
  s.startsWith(this.prefix) && this.storage.removeItem(s);
25
25
  });
26
- g(this, "generateKey", (s) => `${this.prefix}${this.delimiter}${s.join(this.delimiter)}`);
27
- g(this, "write", (...s) => {
26
+ m(this, "generateKey", (s) => `${this.prefix}${this.delimiter}${s.join(this.delimiter)}`);
27
+ m(this, "write", (...s) => {
28
28
  const n = s.pop() || "", o = this.generateKey(s);
29
29
  try {
30
30
  this.storage.setItem(o, n);
31
- } catch (i) {
32
- rs(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(o, n));
31
+ } catch (a) {
32
+ as(a) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(o, n));
33
33
  }
34
34
  });
35
- g(this, "read", (...s) => {
35
+ m(this, "read", (...s) => {
36
36
  const n = this.storage.getItem(this.generateKey(s));
37
37
  return n === null ? void 0 : n;
38
38
  });
39
- g(this, "remove", (...s) => {
39
+ m(this, "remove", (...s) => {
40
40
  this.storage.removeItem(this.generateKey(s));
41
41
  });
42
42
  this.prefix = `sl-sdk${this.delimiter}${s}`, this.storage = n;
43
43
  }
44
44
  }
45
- var X;
45
+ var Y;
46
46
  (function(e) {
47
47
  e.Init = "init", e.Ready = "ready", e.Connecting = "connecting", e.Connected = "connected", e.Disconnected = "disconnected", e.Failed = "failed", e.Reconnect = "reconnect", e.Reconnecting = "reconnecting";
48
- })(X || (X = {}));
49
- w.Unknown, w.Internal, w.DeadlineExceeded, w.ResourceExhausted, w.FailedPrecondition, w.Unavailable, w.DataLoss;
50
- V("grpc:retry");
51
- j(10, { description: "Number of attempts to retry" }), j(3e4, { description: "Max delay between retries in milliseconds" });
48
+ })(Y || (Y = {}));
49
+ C.Unknown, C.Internal, C.DeadlineExceeded, C.ResourceExhausted, C.FailedPrecondition, C.Unavailable, C.DataLoss;
50
+ P("grpc:retry");
51
+ X(10, { description: "Number of attempts to retry" }), X(3e4, { description: "Max delay between retries in milliseconds" });
52
52
  var I;
53
53
  (function(e) {
54
54
  e.SCHEMA = "schema", e.EXTERNAL_TOKEN = "eToken", e.TOKEN = "token";
55
55
  })(I || (I = {}));
56
- class ls extends as {
56
+ class ls extends rs {
57
57
  constructor() {
58
58
  super("user");
59
59
  // Schema
60
- g(this, "setSchema", (n) => {
60
+ m(this, "setSchema", (n) => {
61
61
  this.write(I.SCHEMA, n);
62
62
  });
63
- g(this, "getSchema", () => this.read(I.SCHEMA));
63
+ m(this, "getSchema", () => this.read(I.SCHEMA));
64
64
  // Token
65
- g(this, "setToken", (n) => {
65
+ m(this, "setToken", (n) => {
66
66
  this.write(I.TOKEN, n);
67
67
  });
68
- g(this, "getToken", () => this.read(I.TOKEN));
68
+ m(this, "getToken", () => this.read(I.TOKEN));
69
69
  // External Token
70
- g(this, "setExternalToken", (n) => {
70
+ m(this, "setExternalToken", (n) => {
71
71
  this.write(I.EXTERNAL_TOKEN, n);
72
72
  });
73
- g(this, "getExternalToken", () => this.read(I.EXTERNAL_TOKEN));
74
- g(this, "removeToken", () => {
73
+ m(this, "getExternalToken", () => this.read(I.EXTERNAL_TOKEN));
74
+ m(this, "removeToken", () => {
75
75
  this.remove(I.TOKEN);
76
76
  });
77
77
  }
78
78
  }
79
- var Y;
80
- (function(e) {
81
- e.DISABLED = "disabled", e.INITIALIZATION = "initialization", e.READY = "ready", e.FAILED = "failed", e.SUSPENDED = "suspended";
82
- })(Y || (Y = {}));
83
- V("deep_link");
84
- V("bypass");
85
- new ls();
86
- V("video_player");
87
79
  var Z;
88
80
  (function(e) {
89
- e.SHOWED = "showed";
81
+ e.DISABLED = "disabled", e.INITIALIZATION = "initialization", e.READY = "ready", e.FAILED = "failed", e.SUSPENDED = "suspended";
90
82
  })(Z || (Z = {}));
83
+ P("deep_link");
84
+ P("bypass");
85
+ new ls();
86
+ P("video_player");
91
87
  var J;
92
88
  (function(e) {
93
- e.ALLOWED = "allowed", e.DISALLOWED = "disallowed";
89
+ e.SHOWED = "showed";
94
90
  })(J || (J = {}));
95
91
  var ee;
96
92
  (function(e) {
97
- e.UNKNOWN = "unknown", e.ALREADY_VOTED = "already_voted";
93
+ e.ALLOWED = "allowed", e.DISALLOWED = "disallowed";
98
94
  })(ee || (ee = {}));
99
95
  var se;
100
96
  (function(e) {
101
- e.ONBOARDING = "onboarding", e.ONBOARDING_IO = "onboarding_io";
97
+ e.UNKNOWN = "unknown", e.ALREADY_VOTED = "already_voted";
102
98
  })(se || (se = {}));
103
99
  var ne;
104
100
  (function(e) {
105
- e.Unset = "unset", e.Required = "required", e.Optional = "optional", e.Completed = "completed", e.Disabled = "disabled", e.Unavailable = "unavailable";
101
+ e.ONBOARDING = "onboarding", e.ONBOARDING_IO = "onboarding_io";
106
102
  })(ne || (ne = {}));
107
- O.POLL, O.PREDICTION, O.TRIVIA;
103
+ var te;
104
+ (function(e) {
105
+ e.Unset = "unset", e.Required = "required", e.Optional = "optional", e.Completed = "completed", e.Disabled = "disabled", e.Unavailable = "unavailable";
106
+ })(te || (te = {}));
107
+ R.POLL, R.PREDICTION, R.TRIVIA;
108
108
  const ds = {
109
- [D.GAMES]: !0
110
- }, F = /* @__PURE__ */ h("div")({
109
+ [$.GAMES]: !0
110
+ }, Q = /* @__PURE__ */ h("div")({
111
111
  name: "LoadingContainer",
112
112
  class: "lclc0ej",
113
113
  propsAsIs: !1
@@ -116,30 +116,30 @@ const ds = {
116
116
  sdk: s,
117
117
  children: n,
118
118
  className: o,
119
- noWait: i
119
+ noWait: a
120
120
  }) => {
121
- const a = u(e.status), l = u(s.sdkStore.slStreamId);
122
- if (!i) {
121
+ const r = u(e.status), l = u(s.sdkStore.slStreamId);
122
+ if (!a) {
123
123
  if (l != null && l.loading && !l.data)
124
- return /* @__PURE__ */ t(F, {
124
+ return /* @__PURE__ */ t(Q, {
125
125
  className: o,
126
126
  children: "Event is loading..."
127
127
  });
128
128
  if (!(l != null && l.data))
129
- return /* @__PURE__ */ t(F, {
129
+ return /* @__PURE__ */ t(Q, {
130
130
  className: o,
131
131
  children: "Event is forbidden..."
132
132
  });
133
- if (a !== fe.Ready)
134
- return /* @__PURE__ */ t(F, {
133
+ if (r !== ye.Ready)
134
+ return /* @__PURE__ */ t(Q, {
135
135
  className: o,
136
136
  children: "Wait feature..."
137
137
  });
138
138
  }
139
139
  return n;
140
- }, ue = es({
140
+ }, ve = es({
141
141
  sdk: null
142
- }), B = () => z(ue), ps = /* @__PURE__ */ h("div")({
142
+ }), B = () => z(ve), ps = /* @__PURE__ */ h("div")({
143
143
  name: "QuestionContainer",
144
144
  class: "q14ckf9e",
145
145
  propsAsIs: !1
@@ -150,10 +150,10 @@ const ds = {
150
150
  const {
151
151
  sdk: o
152
152
  } = B();
153
- return ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "insight" ? /* @__PURE__ */ t(ye, {
153
+ return ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "insight" ? /* @__PURE__ */ t(be, {
154
154
  ...e.attributes.attributes.value,
155
155
  controlVideo: o == null ? void 0 : o.controlVideoPlayer
156
- }) : ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ t(Ne, {
156
+ }) : ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ t(Se, {
157
157
  ...e.attributes.attributes.value,
158
158
  controlVideo: o == null ? void 0 : o.controlVideoPlayer
159
159
  }) : null;
@@ -164,44 +164,48 @@ const ds = {
164
164
  }) => {
165
165
  const {
166
166
  loading: o,
167
- data: i
167
+ data: a
168
168
  } = e;
169
- return i ? /* @__PURE__ */ t(be, {
169
+ return a ? /* @__PURE__ */ t(Ie, {
170
170
  vote: s,
171
171
  close: n,
172
- openedQuestion: i,
172
+ openedQuestion: a,
173
173
  isLoading: !!o
174
- }) : /* @__PURE__ */ t(Se, {});
174
+ }) : /* @__PURE__ */ t(Ee, {});
175
175
  }, vs = ({
176
- gamification: e
176
+ gamification: e,
177
+ hideSponsor: s,
178
+ className: n,
179
+ hideHeader: o
177
180
  }) => {
178
- var s, n, o;
179
- const i = u(e.openedQuestion.$store), a = u(e.openedQuestion.$extendedStore);
180
- if (!i)
181
+ var a, r, l;
182
+ const d = u(e.openedQuestion.$store), i = u(e.openedQuestion.$extendedStore);
183
+ if (!d)
181
184
  return null;
182
- const l = i.type;
183
- return /* @__PURE__ */ m(ps, {
184
- children: [/* @__PURE__ */ t(re, {
185
+ const c = d.type;
186
+ return /* @__PURE__ */ g(ps, {
187
+ className: n,
188
+ children: [!o && /* @__PURE__ */ t(re, {
185
189
  close: e.closeQuestion,
186
- type: ((s = i.attributes) == null ? void 0 : s.type) || O.UNSET
187
- }), l === "question" && /* @__PURE__ */ t(hs, {
190
+ type: ((a = d.attributes) == null ? void 0 : a.type) || R.UNSET
191
+ }), c === "question" && /* @__PURE__ */ t(hs, {
188
192
  vote: e.submitAnswer,
189
193
  close: e.closeQuestion,
190
- extendedQuestion: a
191
- }), l !== "question" && /* @__PURE__ */ t(us, {
192
- openedQuestion: i
193
- }), /* @__PURE__ */ t(ke, {
194
- sponsorLogo: (o = (n = a.data) == null ? void 0 : n.sponsorship) == null ? void 0 : o.logo
194
+ extendedQuestion: i
195
+ }), c !== "question" && /* @__PURE__ */ t(us, {
196
+ openedQuestion: d
197
+ }), !s && /* @__PURE__ */ t(Ne, {
198
+ sponsorLogo: (l = (r = i.data) == null ? void 0 : r.sponsorship) == null ? void 0 : l.logo
195
199
  })]
196
200
  });
197
- }, gs = /* @__PURE__ */ h("div")({
201
+ }, ms = /* @__PURE__ */ h("div")({
198
202
  name: "InviteFriendsContainer",
199
203
  class: "i1c9dygq",
200
204
  propsAsIs: !1
201
- }), ms = ({
205
+ }), gs = ({
202
206
  deepLink: e
203
- }) => /* @__PURE__ */ t(gs, {
204
- children: /* @__PURE__ */ t(Ie, {
207
+ }) => /* @__PURE__ */ t(ms, {
208
+ children: /* @__PURE__ */ t(Ae, {
205
209
  inviteLink: e,
206
210
  inviteCardTitle: "It’s More Fun With Friends",
207
211
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
@@ -215,53 +219,53 @@ const ds = {
215
219
  scrollNode: s,
216
220
  scrollStore: n
217
221
  }) => {
218
- const o = $(null), {
219
- data: i,
220
- hasMore: a,
222
+ const o = L(null), {
223
+ data: a,
224
+ hasMore: r,
221
225
  loading: l,
222
226
  key: d
223
227
  } = u(e.leaderboardList.$store), {
224
- data: r
225
- } = u(e.deepLink.$store), [p, c] = Ee(o);
226
- return !i.length && !l ? /* @__PURE__ */ t(ms, {
227
- deepLink: r
228
- }) : /* @__PURE__ */ m(L, {
229
- children: [/* @__PURE__ */ t(Ae, {
230
- items: i,
228
+ data: i
229
+ } = u(e.deepLink.$store), [c, p] = Ce(o);
230
+ return !a.length && !l ? /* @__PURE__ */ t(gs, {
231
+ deepLink: i
232
+ }) : /* @__PURE__ */ g(D, {
233
+ children: [/* @__PURE__ */ t(we, {
234
+ items: a,
231
235
  scrollNode: s,
232
236
  scrollStore: n,
233
237
  fetchMore: e.leaderboardList.fetchMore,
234
- hasMore: a,
238
+ hasMore: r,
235
239
  openItemDetail: e.openUser,
236
240
  currentUserId: e.currentUserId.get()
237
- }, d), r && /* @__PURE__ */ t(fs, {
241
+ }, d), i && /* @__PURE__ */ t(fs, {
238
242
  ref: o,
239
- children: /* @__PURE__ */ t(we, {
240
- onClick: () => p(r),
243
+ children: /* @__PURE__ */ t($e, {
244
+ onClick: () => c(i),
241
245
  title: "Invite Friends",
242
246
  description: "Challenge them now!"
243
247
  })
244
- }), c]
248
+ }), p]
245
249
  });
246
250
  }, ys = ({ store: e, openQuestion: s }) => {
247
251
  const { sdk: n } = B(), o = u(e);
248
- return /* @__PURE__ */ t(Ce, { openQuestion: s, questions: o.data, controlVideo: n == null ? void 0 : n.controlVideoPlayer });
252
+ return /* @__PURE__ */ t(Le, { openQuestion: s, questions: o.data, controlVideo: n == null ? void 0 : n.controlVideoPlayer });
249
253
  }, Ns = ({ userSummary: e }) => {
250
254
  var s;
251
255
  const [n, o] = E(void 0);
252
256
  return k(() => {
253
- const i = e.$store.subscribe((a) => {
254
- a && o(a);
257
+ const a = e.$store.subscribe((r) => {
258
+ r && o(r);
255
259
  });
256
260
  return () => {
257
- i();
261
+ a();
258
262
  };
259
- }, [e]), /* @__PURE__ */ t(ae, { loading: !(n != null && n.summary), ...n == null ? void 0 : n.summary, successRate: (s = n == null ? void 0 : n.percentage) == null ? void 0 : s.correct });
260
- }, bs = ({ gamification: e, className: s, scrollStore: n, scrollNode: o, appNode: i, style: a, responsiveStore: l }) => {
261
- const { tabsShown: d } = u(n, { keys: ["tabsShown"] }), [r, p] = E(P.HOME), [, c] = ss(), { sdkInDesktopView: v, screen: f } = u(l, { keys: ["sdkInDesktopView"] }), N = (S) => {
262
- c(() => {
263
+ }, [e]), /* @__PURE__ */ t(le, { loading: !(n != null && n.summary), ...n == null ? void 0 : n.summary, successRate: (s = n == null ? void 0 : n.percentage) == null ? void 0 : s.correct });
264
+ }, bs = ({ gamification: e, className: s, scrollStore: n, scrollNode: o, appNode: a, style: r, responsiveStore: l }) => {
265
+ const { tabsShown: d } = u(n, { keys: ["tabsShown"] }), [i, c] = E(q.HOME), [, p] = ss(), { sdkInDesktopView: v, screen: f } = u(l, { keys: ["sdkInDesktopView"] }), N = (S) => {
266
+ p(() => {
263
267
  var y;
264
- p(S), v === !1 && (((y = i.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && M(i, f.size, { behavior: "instant" });
268
+ c(S), v === !1 && (((y = a.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && M(a, f.size, { behavior: "instant" });
265
269
  });
266
270
  };
267
271
  k(() => n.subscribe((S) => {
@@ -272,23 +276,23 @@ const ds = {
272
276
  l.get().sdkInDesktopView ? n.setKey("tabsShown", S.scrollDirection === "backward") : n.setKey("tabsShown", S.scrollDirection === "forward");
273
277
  }), [n, l]);
274
278
  let b = "0px";
275
- return v ? b = d ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : b = d ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */ m($e, { className: s, style: a, children: [
279
+ return v ? b = d ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : b = d ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */ g(De, { className: s, style: r, children: [
276
280
  /* @__PURE__ */ t(
277
- Le,
281
+ Te,
278
282
  {
279
283
  style: {
280
284
  top: b
281
285
  },
282
- children: /* @__PURE__ */ t(De, { activePage: r, toggleActivePage: N })
286
+ children: /* @__PURE__ */ t(Oe, { activePage: i, toggleActivePage: N })
283
287
  }
284
288
  ),
285
- r === P.HOME && /* @__PURE__ */ m(L, { children: [
286
- /* @__PURE__ */ t(le, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ t(Te, { children: /* @__PURE__ */ t(Ns, { userSummary: e.userSummary }) }) }),
287
- /* @__PURE__ */ t(xe, { style: { flex: 1 }, children: /* @__PURE__ */ t(ys, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
289
+ i === q.HOME && /* @__PURE__ */ g(D, { children: [
290
+ /* @__PURE__ */ t(de, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ t(xe, { children: /* @__PURE__ */ t(Ns, { userSummary: e.userSummary }) }) }),
291
+ /* @__PURE__ */ t(Re, { style: { flex: 1 }, children: /* @__PURE__ */ t(ys, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
288
292
  ] }),
289
- r === P.LEADERBOARD && /* @__PURE__ */ t(Oe, { children: /* @__PURE__ */ t(ks, { scrollStore: n, scrollNode: o, gamification: e }) })
293
+ i === q.LEADERBOARD && /* @__PURE__ */ t(Ve, { children: /* @__PURE__ */ t(ks, { scrollStore: n, scrollNode: o, gamification: e }) })
290
294
  ] });
291
- }, Ss = () => U, te = /* @__PURE__ */ h(Ss())({
295
+ }, Ss = () => U, oe = /* @__PURE__ */ h(Ss())({
292
296
  name: "OpenedContainer",
293
297
  class: "ouvguos",
294
298
  propsAsIs: !0
@@ -302,76 +306,76 @@ const ds = {
302
306
  }) => {
303
307
  const n = e + s;
304
308
  return n === 0 ? 0 : Math.round(e / n * 100);
305
- }, mn = ({
309
+ }, gn = ({
306
310
  gamification: e,
307
311
  scrollStore: s,
308
312
  className: n,
309
313
  appNode: o,
310
- scrollNode: i,
311
- responsiveStore: a
314
+ scrollNode: a,
315
+ responsiveStore: r
312
316
  }) => /* @__PURE__ */ t(bs, {
313
317
  appNode: o,
314
318
  scrollStore: s,
315
- scrollNode: i,
319
+ scrollNode: a,
316
320
  className: n,
317
321
  gamification: e,
318
- responsiveStore: a
322
+ responsiveStore: r
319
323
  }), As = ({
320
324
  gamification: e,
321
325
  className: s,
322
326
  appNode: n,
323
327
  responsiveStore: o
324
328
  }) => {
325
- const i = u(e.openedQuestion.$store), a = u(e.openedUser), {
329
+ const a = u(e.openedQuestion.$store), r = u(e.openedUser), {
326
330
  sdkInDesktopView: l
327
331
  } = u(o, {
328
332
  keys: ["sdkInDesktopView"]
329
333
  }), {
330
334
  hiding: d,
331
- onAnimationEnd: r
332
- } = Re();
333
- if (!n.current || !i && !a)
335
+ onAnimationEnd: i
336
+ } = Pe();
337
+ if (!n.current || !a && !r)
334
338
  return null;
335
- const p = i ? /* @__PURE__ */ t(te, {
339
+ const c = a ? /* @__PURE__ */ t(oe, {
336
340
  className: s,
337
341
  hiding: d,
338
- onAnimationEnd: r,
342
+ onAnimationEnd: i,
339
343
  children: /* @__PURE__ */ t(vs, {
340
344
  gamification: e
341
345
  })
342
- }) : a ? /* @__PURE__ */ t(te, {
346
+ }) : r ? /* @__PURE__ */ t(oe, {
343
347
  className: s,
344
348
  hiding: d,
345
- onAnimationEnd: r,
346
- children: /* @__PURE__ */ m(Is, {
349
+ onAnimationEnd: i,
350
+ children: /* @__PURE__ */ g(Is, {
347
351
  children: [/* @__PURE__ */ t(re, {
348
352
  label: "Friend's Rank",
349
353
  close: e.closeUser
350
- }), /* @__PURE__ */ t(le, {
351
- children: /* @__PURE__ */ t(ae, {
352
- ...a,
353
- successRate: Es(a)
354
+ }), /* @__PURE__ */ t(de, {
355
+ children: /* @__PURE__ */ t(le, {
356
+ ...r,
357
+ successRate: Es(r)
354
358
  })
355
359
  })]
356
360
  })
357
361
  }) : null;
358
- return /* @__PURE__ */ t(de, {
362
+ return /* @__PURE__ */ t(ce, {
359
363
  container: n,
360
364
  useContainer: !l,
361
- children: p
365
+ children: c
362
366
  });
363
- }, ws = ns(() => import("./gamification-feature.js")), Cs = ({ sdk: e, feature: s, className: n, scrollStore: o, appNode: i, scrollNode: a, responsiveStore: l }) => {
364
- const d = C(() => s && s.featureConfig.get().type === D.GAMES ? /* @__PURE__ */ t(cs, { className: n, sdk: e, feature: s, children: /* @__PURE__ */ t(
365
- ws,
367
+ }, Cs = ns(() => import("./gamification-feature.js")), ws = ({ sdk: e, feature: s, className: n, scrollStore: o, appNode: a, scrollNode: r, responsiveStore: l }) => {
368
+ const d = w(() => s && s.featureConfig.get().type === $.GAMES ? /* @__PURE__ */ t(cs, { className: n, sdk: e, feature: s, children: /* @__PURE__ */ t(
369
+ Cs,
366
370
  {
367
- appNode: i,
371
+ appNode: a,
368
372
  scrollStore: o,
369
- scrollNode: a,
373
+ scrollNode: r,
370
374
  className: n,
371
375
  responsiveStore: l,
372
376
  gamification: s
373
377
  }
374
- ) }) : null, [e, s, n, l, o, a, i]);
378
+ ) }) : null, [e, s, n, l, o, r, a]);
375
379
  return /* @__PURE__ */ t(
376
380
  ts,
377
381
  {
@@ -379,7 +383,7 @@ const ds = {
379
383
  children: d
380
384
  }
381
385
  );
382
- }, $s = ({ feature: e, className: s, appNode: n, responsiveStore: o }) => e && e.featureConfig.get().type === D.GAMES ? /* @__PURE__ */ t(
386
+ }, $s = ({ feature: e, className: s, appNode: n, responsiveStore: o }) => e && e.featureConfig.get().type === $.GAMES ? /* @__PURE__ */ t(
383
387
  As,
384
388
  {
385
389
  className: s,
@@ -387,7 +391,7 @@ const ds = {
387
391
  responsiveStore: o,
388
392
  gamification: e
389
393
  }
390
- ) : null, Ls = () => ce, Ds = /* @__PURE__ */ h(Ls())({
394
+ ) : null, Ls = () => pe, Ds = /* @__PURE__ */ h(Ls())({
391
395
  name: "ButtonIcon",
392
396
  class: "b11wpe79",
393
397
  propsAsIs: !0
@@ -395,58 +399,66 @@ const ds = {
395
399
  sdk: e,
396
400
  className: s
397
401
  }, n) => {
398
- const o = u(e.sdkStore.organizationSettings), i = u(e.sdkStore.streamSettings), a = u(e.getActiveFeature()), l = C(() => {
399
- const r = (i == null ? void 0 : i.data) || (o == null ? void 0 : o.data);
400
- return r != null && r.overlays ? r.overlays : [];
401
- }, [o, i]), d = C(() => [...l.filter(({
402
- enableSdkButton: r
403
- }) => r).map((r) => ({
404
- id: r.type,
405
- onClick: () => e.openFeature(r.type),
406
- disabled: !(r.type in ds),
407
- label: r.name,
402
+ const o = u(e.sdkStore.organizationSettings), a = u(e.sdkStore.streamSettings), r = u(e.getActiveFeature()), l = w(() => {
403
+ const i = (a == null ? void 0 : a.data) || (o == null ? void 0 : o.data);
404
+ return i != null && i.overlays ? i.overlays : [];
405
+ }, [o, a]), d = w(() => [...l.filter(({
406
+ enableSdkButton: i,
407
+ type: c
408
+ }) => c === $.GAMES || i).map((i) => ({
409
+ id: i.type,
410
+ onClick: () => e.openFeature(i.type),
411
+ disabled: !(i.type in ds),
412
+ label: i.name,
408
413
  icon: /* @__PURE__ */ t("img", {
409
- src: r.icon,
414
+ src: i.icon,
410
415
  alt: ""
411
416
  }),
412
417
  /** multiplied by 10 to add the ability to insert custom buttons between our buttons */
413
- position: r.position * 10
414
- }))].sort((r, p) => r.position - p.position), [l, e]);
415
- return /* @__PURE__ */ m(Ve, {
418
+ position: i.position * 10
419
+ }))].sort((i, c) => i.position - c.position), [l, e]);
420
+ return /* @__PURE__ */ g(qe, {
416
421
  className: s,
417
- children: [/* @__PURE__ */ t(Pe, {
418
- children: [/* @__PURE__ */ t(Q, {
422
+ children: [d.length !== 0 && /* @__PURE__ */ t(G, {
423
+ children: [/* @__PURE__ */ t(O, {
419
424
  id: "Channels",
420
425
  onClick: () => e.closeFeature(),
421
426
  label: "Channels",
422
- active: a === 0
423
- }, "Channels"), ...d.map((r) => r.id === D.GAMES ? /* @__PURE__ */ t(Q, {
424
- ...r,
425
- active: r.id === a,
427
+ active: r === 0
428
+ }, "Channels"), ...d.map((i) => i.id === $.GAMES ? /* @__PURE__ */ t(O, {
429
+ ...i,
430
+ active: i.id === r,
426
431
  label: "StreamLayer +",
427
432
  id: "featuredGroups",
428
433
  icon: /* @__PURE__ */ t(Ds, {
429
434
  name: "icon-btn-feature-groups",
430
- "data-selected": r.id === a
435
+ "data-selected": i.id === r
431
436
  })
432
- }, r.id) : /* @__PURE__ */ t(Q, {
433
- ...r,
437
+ }, i.id) : /* @__PURE__ */ t(O, {
438
+ ...i,
434
439
  icon: void 0,
435
- active: r.id === a
436
- }, r.id))]
440
+ active: i.id === r
441
+ }, i.id))]
442
+ }), !d.length && /* @__PURE__ */ t(G, {
443
+ children: [/* @__PURE__ */ t(O, {
444
+ id: "empty",
445
+ label: "No Features...",
446
+ active: !1,
447
+ disabled: !0
448
+ }, "empty")]
437
449
  }), /* @__PURE__ */ t("div", {
438
450
  ref: n
439
451
  })]
440
452
  });
441
- }), xs = /* @__PURE__ */ h("div")({
453
+ }), Os = /* @__PURE__ */ h("div")({
442
454
  name: "Container",
443
455
  class: "c1qjj4d4",
444
456
  propsAsIs: !1
445
- }), Os = /* @__PURE__ */ h("div")({
457
+ }), xs = /* @__PURE__ */ h("div")({
446
458
  name: "CloseIconWrap",
447
459
  class: "c1lg6b8a",
448
460
  propsAsIs: !1
449
- }), Rs = () => ce, Vs = /* @__PURE__ */ h(Rs())({
461
+ }), Rs = () => pe, Vs = /* @__PURE__ */ h(Rs())({
450
462
  name: "CloseIcon",
451
463
  class: "c159el66",
452
464
  propsAsIs: !0
@@ -454,7 +466,7 @@ const ds = {
454
466
  name: "Title",
455
467
  class: "t16xmufv",
456
468
  propsAsIs: !1
457
- }), Qs = /* @__PURE__ */ h("img")({
469
+ }), qs = /* @__PURE__ */ h("img")({
458
470
  name: "SponsorLogo",
459
471
  class: "s83lc21",
460
472
  propsAsIs: !1
@@ -462,11 +474,11 @@ const ds = {
462
474
  name: "PresentsTitle",
463
475
  class: "p1p7igia",
464
476
  propsAsIs: !1
465
- }), qs = /* @__PURE__ */ h("div")({
477
+ }), Fs = /* @__PURE__ */ h("div")({
466
478
  name: "Subtitle",
467
479
  class: "s1eftsbu",
468
480
  propsAsIs: !1
469
- }), Fs = /* @__PURE__ */ h("div")({
481
+ }), Qs = /* @__PURE__ */ h("div")({
470
482
  name: "Description",
471
483
  class: "d8uezec",
472
484
  propsAsIs: !1
@@ -474,22 +486,22 @@ const ds = {
474
486
  name: "ActionButton",
475
487
  class: "a1h1bk90",
476
488
  propsAsIs: !1
477
- }), oe = ({ close: e, action: s, onboarding: n }) => {
478
- var o, i, a, l, d, r, p, c;
479
- return /* @__PURE__ */ m(xs, { children: [
480
- /* @__PURE__ */ t(Os, { onClick: e, children: /* @__PURE__ */ t(Vs, { name: "icon-cross" }) }),
481
- ((i = (o = n == null ? void 0 : n.titleCard) == null ? void 0 : o.media) == null ? void 0 : i.sponsorLogo) && /* @__PURE__ */ m(Ps, { children: [
482
- /* @__PURE__ */ t(Qs, { alt: "sponsor-logo", src: (l = (a = n == null ? void 0 : n.titleCard) == null ? void 0 : a.media) == null ? void 0 : l.sponsorLogo }),
489
+ }), ie = ({ close: e, action: s, onboarding: n }) => {
490
+ var o, a, r, l, d, i, c, p;
491
+ return /* @__PURE__ */ g(Os, { children: [
492
+ /* @__PURE__ */ t(xs, { onClick: e, children: /* @__PURE__ */ t(Vs, { name: "icon-cross" }) }),
493
+ ((a = (o = n == null ? void 0 : n.titleCard) == null ? void 0 : o.media) == null ? void 0 : a.sponsorLogo) && /* @__PURE__ */ g(Ps, { children: [
494
+ /* @__PURE__ */ t(qs, { alt: "sponsor-logo", src: (l = (r = n == null ? void 0 : n.titleCard) == null ? void 0 : r.media) == null ? void 0 : l.sponsorLogo }),
483
495
  /* @__PURE__ */ t(_s, { children: "PRESENTS" })
484
496
  ] }),
485
- ((d = n == null ? void 0 : n.titleCard) == null ? void 0 : d.title) && /* @__PURE__ */ t(qs, { children: (r = n == null ? void 0 : n.titleCard) == null ? void 0 : r.title }),
486
- ((p = n == null ? void 0 : n.titleCard) == null ? void 0 : p.subtitle) && /* @__PURE__ */ t(Fs, { children: (c = n == null ? void 0 : n.titleCard) == null ? void 0 : c.subtitle }),
497
+ ((d = n == null ? void 0 : n.titleCard) == null ? void 0 : d.title) && /* @__PURE__ */ t(Fs, { children: (i = n == null ? void 0 : n.titleCard) == null ? void 0 : i.title }),
498
+ ((c = n == null ? void 0 : n.titleCard) == null ? void 0 : c.subtitle) && /* @__PURE__ */ t(Qs, { children: (p = n == null ? void 0 : n.titleCard) == null ? void 0 : p.subtitle }),
487
499
  /* @__PURE__ */ t(Ks, { onClick: s, children: "Play Now" })
488
500
  ] });
489
501
  }, K = [{
490
502
  graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_0.png",
491
503
  tagline: "",
492
- headline: /* @__PURE__ */ m(L, {
504
+ headline: /* @__PURE__ */ g(D, {
493
505
  children: ["Welcome to ", /* @__PURE__ */ t("br", {}), " StreamLayer +"]
494
506
  })
495
507
  }, {
@@ -512,7 +524,7 @@ const ds = {
512
524
  name: "OnboardingNotificationContainer",
513
525
  class: "o1vnouv7",
514
526
  propsAsIs: !0
515
- }), ie = /* @__PURE__ */ h("div")({
527
+ }), ae = /* @__PURE__ */ h("div")({
516
528
  name: "InnerContainer",
517
529
  class: "i59uefw",
518
530
  propsAsIs: !1
@@ -521,17 +533,17 @@ const ds = {
521
533
  onboardingOpts: s,
522
534
  notification: n,
523
535
  gamification: o,
524
- loading: i,
525
- sdk: a
536
+ loading: a,
537
+ sdk: r
526
538
  }) => {
527
- var l, d, r, p, c, v, f;
528
- const N = u(o.friends.getStore()), [b, S] = E(void 0), y = C(() => {
539
+ var l, d, i, c, p, v, f;
540
+ const N = u(o.friends.getStore()), [b, S] = E(void 0), y = w(() => {
529
541
  var A, T;
530
- const W = a.getInviter();
542
+ const W = r.getInviter();
531
543
  return W ? (T = (A = N.data) == null ? void 0 : A.find(({
532
- slId: ve
533
- }) => ve === W)) == null ? void 0 : T.name : "";
534
- }, [N.data, a]);
544
+ slId: ge
545
+ }) => ge === W)) == null ? void 0 : T.name : "";
546
+ }, [N.data, r]);
535
547
  return k(() => {
536
548
  const A = e.$store.subscribe((T) => {
537
549
  T && S(T.data);
@@ -540,8 +552,8 @@ const ds = {
540
552
  A();
541
553
  };
542
554
  }, [e.$store]), /* @__PURE__ */ t(Ms, {
543
- children: /* @__PURE__ */ t(_e, {
544
- loading: i,
555
+ children: /* @__PURE__ */ t(Fe, {
556
+ loading: a,
545
557
  rules: [{
546
558
  label: "Answer as many questions as you like.",
547
559
  icon: "icon-btn-feature-groups"
@@ -555,11 +567,11 @@ const ds = {
555
567
  rulesBtnLabel: (l = s.rules) == null ? void 0 : l.buttonLabel,
556
568
  rulesTitle: (d = s.rules) == null ? void 0 : d.heading,
557
569
  termsTitle: "Terms and Conditions",
558
- termsText: (r = s.rules) == null ? void 0 : r.terms,
570
+ termsText: (i = s.rules) == null ? void 0 : i.terms,
559
571
  steps: K,
560
- primaryColor: (p = s.inviteCard) == null ? void 0 : p.iconColor,
572
+ primaryColor: (c = s.inviteCard) == null ? void 0 : c.iconColor,
561
573
  inviteLink: b,
562
- inviteCardTitle: (c = s.inviteCard) == null ? void 0 : c.heading,
574
+ inviteCardTitle: (p = s.inviteCard) == null ? void 0 : p.heading,
563
575
  inviteCardSubtext: (v = s.inviteCard) == null ? void 0 : v.subtext,
564
576
  inviteCardBtnLabel: (f = s.inviteCard) == null ? void 0 : f.buttonLabel,
565
577
  onClose: () => {
@@ -567,7 +579,7 @@ const ds = {
567
579
  (A = n.close) == null || A.call(n);
568
580
  },
569
581
  gamification: o,
570
- sdk: a,
582
+ sdk: r,
571
583
  inviterName: y
572
584
  })
573
585
  });
@@ -576,11 +588,11 @@ const ds = {
576
588
  notification: s,
577
589
  saveHeight: n,
578
590
  style: o,
579
- appNode: i,
580
- sdkInDesktopView: a,
591
+ appNode: a,
592
+ sdkInDesktopView: r,
581
593
  responsiveStore: l
582
594
  }) => {
583
- const d = $(null), r = s.data.onboarding, [p, c] = E(r == null ? void 0 : r.instantOpen), v = e.getFeature(D.GAMES), f = C(() => K == null ? void 0 : K.map(({
595
+ const d = L(null), i = s.data.onboarding, [c, p] = E(i == null ? void 0 : i.instantOpen), v = e.getFeature($.GAMES), f = w(() => K == null ? void 0 : K.map(({
584
596
  graphicSrc: y
585
597
  }) => y), []), {
586
598
  screen: N
@@ -594,47 +606,47 @@ const ds = {
594
606
  const {
595
607
  loading: b,
596
608
  throttled: S
597
- } = Qe(f);
598
- return p && v && r && i.current && !S ? /* @__PURE__ */ t(de, {
599
- container: i,
600
- useContainer: !a,
609
+ } = _e(f);
610
+ return c && v && i && a.current && !S ? /* @__PURE__ */ t(ce, {
611
+ container: a,
612
+ useContainer: !r,
601
613
  children: /* @__PURE__ */ t(Bs, {
602
614
  notification: s,
603
- setOpened: c,
615
+ setOpened: p,
604
616
  gamification: v,
605
- onboardingOpts: r,
617
+ onboardingOpts: i,
606
618
  deepLink: v.deepLink,
607
619
  loading: b,
608
- renderToNode: i,
620
+ renderToNode: a,
609
621
  sdk: e
610
622
  })
611
- }) : /* @__PURE__ */ m(L, {
612
- children: [/* @__PURE__ */ t(ie, {
623
+ }) : /* @__PURE__ */ g(D, {
624
+ children: [/* @__PURE__ */ t(ae, {
613
625
  ref: d,
614
626
  style: {
615
627
  position: "absolute",
616
628
  visibility: "hidden"
617
629
  },
618
- children: /* @__PURE__ */ t(oe, {
630
+ children: /* @__PURE__ */ t(ie, {
619
631
  close: () => {
620
632
  },
621
633
  action: () => {
622
634
  },
623
- onboarding: r
635
+ onboarding: i
624
636
  })
625
637
  }), /* @__PURE__ */ t(zs, {
626
638
  style: o,
627
639
  hiding: s.hiding,
628
- children: /* @__PURE__ */ t(ie, {
629
- children: /* @__PURE__ */ t(oe, {
640
+ children: /* @__PURE__ */ t(ae, {
641
+ children: /* @__PURE__ */ t(ie, {
630
642
  close: s.close,
631
643
  action: () => {
632
644
  var y;
633
- c(!0), (((y = i.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && M(i, N.size, {
645
+ p(!0), (((y = a.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && M(a, N.size, {
634
646
  behavior: "smooth"
635
647
  });
636
648
  },
637
- onboarding: r
649
+ onboarding: i
638
650
  })
639
651
  })
640
652
  })]
@@ -643,11 +655,11 @@ const ds = {
643
655
  name: "Container",
644
656
  class: "c8ol1ve",
645
657
  propsAsIs: !0
646
- }), he = /* @__PURE__ */ h("div")({
658
+ }), me = /* @__PURE__ */ h("div")({
647
659
  name: "InnerContainer",
648
660
  class: "iqfywam",
649
661
  propsAsIs: !1
650
- }), js = () => he, Xs = /* @__PURE__ */ h(js())({
662
+ }), js = () => me, Xs = /* @__PURE__ */ h(js())({
651
663
  name: "HiddenContainer",
652
664
  class: "hokmtod",
653
665
  propsAsIs: !0
@@ -655,12 +667,12 @@ const ds = {
655
667
  name: "NotificationRefreshing",
656
668
  class: "n192d1q8",
657
669
  propsAsIs: !1
658
- }), Zs = () => qe, Js = /* @__PURE__ */ h(Zs())({
670
+ }), Zs = () => Qe, Js = /* @__PURE__ */ h(Zs())({
659
671
  name: "Pill",
660
672
  class: "p1lha68t",
661
673
  propsAsIs: !0
662
674
  }), en = (e) => {
663
- const [s, n] = E(0), o = $(null), i = R((l) => {
675
+ const [s, n] = E(0), o = L(null), a = V((l) => {
664
676
  o.current = l;
665
677
  }, []);
666
678
  k(() => {
@@ -668,58 +680,58 @@ const ds = {
668
680
  const d = (l = o.current) == null ? void 0 : l.getBoundingClientRect();
669
681
  d && n(d.height);
670
682
  }, [e]);
671
- const a = R((l) => {
683
+ const r = V((l) => {
672
684
  n(l);
673
685
  }, []);
674
- return [i, s, a];
686
+ return [a, s, r];
675
687
  }, sn = ({
676
688
  sdk: e,
677
689
  notification: s,
678
690
  appNode: n,
679
691
  responsiveStore: o
680
692
  }) => {
681
- var i, a;
693
+ var a, r;
682
694
  const {
683
695
  sdkInDesktopView: l
684
696
  } = u(o, {
685
697
  keys: ["sdkInDesktopView"]
686
698
  }), {
687
699
  sdk: d
688
- } = B(), [r, p, c] = en(s.id);
689
- return s.type === x.QUESTION ? /* @__PURE__ */ m(L, {
700
+ } = B(), [i, c, p] = en(s.id);
701
+ return s.type === x.QUESTION ? /* @__PURE__ */ g(D, {
690
702
  children: [/* @__PURE__ */ t(Xs, {
691
- ref: r,
692
- children: /* @__PURE__ */ t(G, {
703
+ ref: i,
704
+ children: /* @__PURE__ */ t(H, {
693
705
  ...s
694
706
  })
695
- }), /* @__PURE__ */ m(Hs, {
707
+ }), /* @__PURE__ */ g(Hs, {
696
708
  style: {
697
- height: s.hiding ? 0 : p
709
+ height: s.hiding ? 0 : c
698
710
  },
699
711
  hiding: s.hiding,
700
- children: [/* @__PURE__ */ t(he, {
712
+ children: [/* @__PURE__ */ t(me, {
701
713
  style: {
702
714
  height: "100%"
703
715
  },
704
- children: /* @__PURE__ */ t(G, {
716
+ children: /* @__PURE__ */ t(H, {
705
717
  ...s,
706
718
  controlVideo: d == null ? void 0 : d.controlVideoPlayer
707
719
  })
708
720
  }), /* @__PURE__ */ t(Ys, {}, s.id)]
709
721
  })]
710
- }) : s.type === x.QUESTION_RESOLVED && (a = (i = s.data) == null ? void 0 : i.question) != null && a.predictionResult ? /* @__PURE__ */ t(Ke, {
722
+ }) : s.type === x.QUESTION_RESOLVED && (r = (a = s.data) == null ? void 0 : a.question) != null && r.predictionResult ? /* @__PURE__ */ t(Me, {
711
723
  style: {
712
- height: s.hiding ? 0 : p
724
+ height: s.hiding ? 0 : c
713
725
  },
714
- saveHeight: c,
726
+ saveHeight: p,
715
727
  close: s.close,
716
728
  hiding: s.hiding,
717
729
  ...s.data.question
718
730
  }) : s.type === x.ONBOARDING ? /* @__PURE__ */ t(Ws, {
719
731
  style: {
720
- height: s.hiding ? 0 : p
732
+ height: s.hiding ? 0 : c
721
733
  },
722
- saveHeight: c,
734
+ saveHeight: p,
723
735
  sdk: e,
724
736
  notification: s,
725
737
  sdkInDesktopView: l,
@@ -731,86 +743,86 @@ const ds = {
731
743
  setPill: s,
732
744
  appNode: n,
733
745
  headerNode: o,
734
- scrollNode: i,
735
- responsiveStore: a,
746
+ scrollNode: a,
747
+ responsiveStore: r,
736
748
  scrollStore: l
737
749
  }) => {
738
- var d, r;
750
+ var d, i;
739
751
  const {
740
- screen: p
741
- } = u(a, {
752
+ screen: c
753
+ } = u(r, {
742
754
  keys: ["screen"]
743
755
  }), {
744
- tabsShown: c,
756
+ tabsShown: p,
745
757
  scrollPosition: v
746
758
  } = u(l, {
747
759
  keys: ["tabsShown", "scrollPosition"]
748
760
  });
749
761
  k(() => {
750
- a.get().sdkInDesktopView ? v < 50 && s(null) : v > -50 && s(null);
751
- }, [v, a, s]);
752
- const f = a.get().sdkInDesktopView ? n : o;
753
- return !e || !f.current ? null : Me.createPortal(/* @__PURE__ */ t(Js, {
754
- title: e.type === x.QUESTION_RESOLVED ? "Prediction result" : `New ${((r = Ue[(d = e.data) == null ? void 0 : d.questionType]) == null ? void 0 : r.label) || "notification"}`,
762
+ r.get().sdkInDesktopView ? v < 50 && s(null) : v > -50 && s(null);
763
+ }, [v, r, s]);
764
+ const f = r.get().sdkInDesktopView ? n : o;
765
+ return !e || !f.current ? null : Ue.createPortal(/* @__PURE__ */ t(Js, {
766
+ title: e.type === x.QUESTION_RESOLVED ? "Prediction result" : `New ${((i = ze[(d = e.data) == null ? void 0 : d.questionType]) == null ? void 0 : i.label) || "notification"}`,
755
767
  onClick: () => {
756
768
  var N;
757
- a.get().sdkInDesktopView ? (N = i.current) == null || N.scrollTo({
769
+ r.get().sdkInDesktopView ? (N = a.current) == null || N.scrollTo({
758
770
  top: 0,
759
771
  behavior: "smooth"
760
- }) : M(n, p.size, {
772
+ }) : M(n, c.size, {
761
773
  behavior: "smooth"
762
774
  }), s(null);
763
775
  },
764
- className: ze(c && nn, "sl-pill-button")
776
+ className: ue(p && nn, "sl-pill-button")
765
777
  }), f.current);
766
778
  }, on = ({
767
779
  sdk: e,
768
780
  headerNode: s,
769
781
  scrollNode: n,
770
782
  responsiveStore: o,
771
- appNode: i,
772
- scrollStore: a
783
+ appNode: a,
784
+ scrollStore: r
773
785
  }) => {
774
- const [l] = E(e.getNotificationsStore()), d = u(l), [r, p] = E(null), c = C(() => e.getActiveNotification(), [e, d]);
786
+ const [l] = E(e.getNotificationsStore()), d = u(l), [i, c] = E(null), p = w(() => e.getActiveNotification(), [e, d]);
775
787
  return k(() => {
776
- c && Fe.emit("notification", {
788
+ p && Ke.emit("notification", {
777
789
  action: "rendered",
778
790
  payload: {
779
- questionId: c.data.questionId,
780
- questionType: c.data.questionType
791
+ questionId: p.data.questionId,
792
+ questionType: p.data.questionType
781
793
  }
782
794
  });
783
- }, [c]), k(() => {
784
- c && (o.get().sdkInDesktopView || o.get().sdkInView) && (!o.get().sdkInDesktopView && o.get().sdkInView && p(c), o.get().sdkInDesktopView && window.requestAnimationFrame(() => {
785
- a.get().scrollPosition !== 0 && p(c);
795
+ }, [p]), k(() => {
796
+ p && (o.get().sdkInDesktopView || o.get().sdkInView) && (!o.get().sdkInDesktopView && o.get().sdkInView && c(p), o.get().sdkInDesktopView && window.requestAnimationFrame(() => {
797
+ r.get().scrollPosition !== 0 && c(p);
786
798
  }));
787
- }, [c]), k(() => {
788
- c || p(null);
789
- }, [c]), /* @__PURE__ */ m(L, {
790
- children: [!r && c && /* @__PURE__ */ t(sn, {
799
+ }, [p]), k(() => {
800
+ p || c(null);
801
+ }, [p]), /* @__PURE__ */ g(D, {
802
+ children: [!i && p && /* @__PURE__ */ t(sn, {
791
803
  headerNode: s,
792
- appNode: i,
804
+ appNode: a,
793
805
  sdk: e,
794
- notification: c,
806
+ notification: p,
795
807
  responsiveStore: o
796
- }), r && /* @__PURE__ */ t(tn, {
797
- pill: r,
798
- setPill: p,
799
- appNode: i,
800
- notification: c,
808
+ }), i && /* @__PURE__ */ t(tn, {
809
+ pill: i,
810
+ setPill: c,
811
+ appNode: a,
812
+ notification: p,
801
813
  headerNode: s,
802
814
  scrollNode: n,
803
- scrollStore: a,
815
+ scrollStore: r,
804
816
  responsiveStore: o
805
817
  })]
806
818
  });
807
- }, rn = (e) => {
808
- const s = $(""), [n, o] = E(!1), i = u(e.status), a = u(e.sdkStore.slStreamId), l = u(e.userId()), d = u(e.getActiveFeature()), r = i === "ready" && !!a.data;
819
+ }, an = (e) => {
820
+ const s = L(""), [n, o] = E(!1), a = u(e.status), r = u(e.sdkStore.slStreamId), l = u(e.userId()), d = u(e.getActiveFeature()), i = a === "ready" && !!r.data;
809
821
  k(() => {
810
- const v = e.getFeature(D.GAMES);
822
+ const v = e.getFeature($.GAMES);
811
823
  v && (v.closeQuestion(), v.closeUser());
812
824
  }, [d, e]);
813
- const p = R(
825
+ const c = V(
814
826
  (v) => {
815
827
  s.current = v, o(!0), e.initializeApp({ skipOrganizationSettings: !0 }).then(({ enabled: f, err: N }) => {
816
828
  if (!N && f) {
@@ -822,12 +834,12 @@ const ds = {
822
834
  });
823
835
  },
824
836
  [e]
825
- ), c = R(() => {
837
+ ), p = V(() => {
826
838
  o(!1), e.disableApp();
827
839
  }, [e]);
828
840
  return k(() => {
829
841
  if (!l) {
830
- r && e.disableApp();
842
+ i && e.disableApp();
831
843
  return;
832
844
  }
833
845
  if (l && s.current && n) {
@@ -840,29 +852,29 @@ const ds = {
840
852
  o(!1), e.disableApp();
841
853
  }, [o, e]), {
842
854
  sdkEnabled: n,
843
- sdkReady: r,
844
- activateEventWithId: p,
845
- deactivate: c,
855
+ sdkReady: i,
856
+ activateEventWithId: c,
857
+ deactivate: p,
846
858
  isLogged: !!l
847
859
  };
848
- }, an = ({ sdk: e, className: s, scrollStore: n, appNode: o, scrollNode: i, responsiveStore: a }) => {
860
+ }, rn = ({ sdk: e, className: s, scrollStore: n, appNode: o, scrollNode: a, responsiveStore: r }) => {
849
861
  const [, l] = je(e);
850
862
  return /* @__PURE__ */ t(
851
- Cs,
863
+ ws,
852
864
  {
853
865
  className: s,
854
- scrollNode: i,
866
+ scrollNode: a,
855
867
  appNode: o,
856
868
  scrollStore: n,
857
869
  feature: l,
858
- responsiveStore: a,
870
+ responsiveStore: r,
859
871
  sdk: e
860
872
  }
861
873
  );
862
874
  }, ln = ({ sdk: e, className: s, appNode: n, responsiveStore: o }) => {
863
- const i = u(e.featuresList.getStore());
864
- return i ? Array.from(i, (a) => {
865
- const l = e.getFeature(a);
875
+ const a = u(e.featuresList.getStore());
876
+ return a ? Array.from(a, (r) => {
877
+ const l = e.getFeature(r);
866
878
  return l ? /* @__PURE__ */ t(
867
879
  $s,
868
880
  {
@@ -872,53 +884,53 @@ const ds = {
872
884
  responsiveStore: o,
873
885
  sdk: e
874
886
  },
875
- a
887
+ r
876
888
  ) : null;
877
889
  }) : null;
878
890
  }, dn = ({ sdk: e, event: s }) => {
879
- const n = $(null), o = $(null), [i] = Be(n), [a, l] = We(n, i), { sdkEnabled: d, sdkReady: r, activateEventWithId: p, deactivate: c, isLogged: v } = rn(e);
891
+ const n = L(null), o = L(null), [a] = Be(n), [r, l] = We(n, a), { sdkEnabled: d, sdkReady: i, activateEventWithId: c, deactivate: p, isLogged: v } = an(e);
880
892
  k(() => {
881
- s ? (e.createEventSession(s), p(s)) : c();
882
- }, [s, p, c, e]), _(n, { enabled: d, event: "click", listener: Xe }), _(a, {
893
+ s ? (e.createEventSession(s), c(s)) : p();
894
+ }, [s, c, p, e]), _(n, { enabled: d, event: "click", listener: Xe }), _(r, {
883
895
  enabled: d,
884
896
  event: "scrollend",
885
897
  listener: Ye,
886
898
  useDomNode: !0
887
- }), _(a, {
899
+ }), _(r, {
888
900
  enabled: d,
889
901
  event: "click",
890
902
  listener: Ze,
891
903
  useDomNode: !0
892
904
  });
893
- const f = C(() => ({ sdk: e }), [e]);
905
+ const f = w(() => ({ sdk: e }), [e]);
894
906
  return k(() => {
895
907
  import("./gamification-feature.js");
896
- }, []), /* @__PURE__ */ t(ue.Provider, { value: f, children: /* @__PURE__ */ m(Ge, { ref: n, children: [
897
- d && /* @__PURE__ */ t(Ts, { className: q, sdk: e, ref: o }),
898
- /* @__PURE__ */ m(He, { className: "sl-hide-on-modal", ref: a, "data-nav": d.toString(), children: [
899
- r && /* @__PURE__ */ t(
908
+ }, []), /* @__PURE__ */ t(ve.Provider, { value: f, children: /* @__PURE__ */ g(Ge, { ref: n, children: [
909
+ d && /* @__PURE__ */ t(Ts, { className: F, sdk: e, ref: o }),
910
+ /* @__PURE__ */ g(He, { className: "sl-hide-on-modal", ref: r, "data-nav": d.toString(), children: [
911
+ i && /* @__PURE__ */ t(
900
912
  on,
901
913
  {
902
914
  sdk: e,
903
- scrollNode: a,
915
+ scrollNode: r,
904
916
  headerNode: o,
905
917
  appNode: n,
906
918
  scrollStore: l,
907
- responsiveStore: i
919
+ responsiveStore: a
908
920
  }
909
921
  ),
910
- r && /* @__PURE__ */ t(
911
- an,
922
+ i && /* @__PURE__ */ t(
923
+ rn,
912
924
  {
913
925
  scrollStore: l,
914
- responsiveStore: i,
915
- scrollNode: a,
926
+ responsiveStore: a,
927
+ scrollNode: r,
916
928
  appNode: n,
917
- className: q,
929
+ className: F,
918
930
  sdk: e
919
931
  }
920
932
  ),
921
- r && /* @__PURE__ */ t(ln, { responsiveStore: i, appNode: n, className: q, sdk: e })
933
+ i && /* @__PURE__ */ t(ln, { responsiveStore: a, appNode: n, className: F, sdk: e })
922
934
  ] }),
923
935
  d && !v && /* @__PURE__ */ t(
924
936
  "div",
@@ -928,19 +940,19 @@ const ds = {
928
940
  }
929
941
  )
930
942
  ] }) });
931
- }, cn = ({ children: e, style: s }) => /* @__PURE__ */ t("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ t("div", { className: Je, style: s, children: e }) }), fn = () => {
932
- const { sdk: e } = z(pe);
943
+ }, cn = ({ children: e, customTheme: s, style: n }) => /* @__PURE__ */ t("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ t("div", { className: ue(Je, s), style: n, children: e }) }), fn = () => {
944
+ const { sdk: e } = z(he);
933
945
  return e;
934
946
  }, kn = ({ event: e }) => {
935
- const { sdk: s, status: n } = z(pe);
936
- if (n === H.UNSET)
947
+ const { sdk: s, status: n } = z(he);
948
+ if (n === j.UNSET)
937
949
  throw new Error("Wrap app in `StreamLayerProvider`");
938
- return n === H.CONNECTED ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: "wait" }) : s === null ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: "sdk not initialized" }) : /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(cn, { children: /* @__PURE__ */ t(dn, { sdk: s, event: e }) }) });
950
+ return n === j.CONNECTED ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: "wait" }) : s === null ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: "sdk not initialized" }) : /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(cn, { children: /* @__PURE__ */ t(dn, { sdk: s, event: e }) }) });
939
951
  };
940
952
  export {
941
- mn as E,
942
- rn as F,
953
+ gn as E,
954
+ an as F,
943
955
  kn as S,
944
- cn as i,
956
+ cn as d,
945
957
  fn as u
946
958
  };