@streamlayer/react 1.24.6 → 1.24.8

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.
Files changed (155) hide show
  1. package/lib/cjs/advertisement.js +19606 -203
  2. package/lib/cjs/auth.js +4459 -1
  3. package/lib/cjs/bet-pack.js +15690 -1
  4. package/lib/cjs/index.js +19410 -1
  5. package/lib/cjs/insight.js +13508 -1
  6. package/lib/cjs/masters.js +20695 -1
  7. package/lib/cjs/notification.js +13086 -1
  8. package/lib/cjs/package.json +1 -0
  9. package/lib/cjs/pause-ad.js +8390 -1
  10. package/lib/cjs/points.js +7188 -1
  11. package/lib/cjs/polyfills.js +69 -0
  12. package/lib/cjs/polymarket.js +16394 -14
  13. package/lib/cjs/style.css +1 -0
  14. package/lib/cjs/useStreamLayerApp.js +4711 -1
  15. package/lib/dist/cjs/index.js +20695 -1
  16. package/lib/dist/es/index.js +20668 -10
  17. package/lib/dist/es/polyfills.js +92 -0
  18. package/lib/es/advertisement.js +2821 -2746
  19. package/lib/es/analytics.js +1 -1
  20. package/lib/es/feature.js +60 -56
  21. package/lib/es/index10.js +181 -7
  22. package/lib/es/index11.js +371 -181
  23. package/lib/es/index12.js +19 -19
  24. package/lib/es/index13.js +44 -44
  25. package/lib/es/index14.js +30 -30
  26. package/lib/es/index15.js +384 -414
  27. package/lib/es/index16.js +66 -67
  28. package/lib/es/index2.js +35 -38
  29. package/lib/es/index3.js +34 -4
  30. package/lib/es/index4.js +3 -3
  31. package/lib/es/index5.js +270 -16
  32. package/lib/es/index6.js +0 -1
  33. package/lib/es/index8.js +236 -281
  34. package/lib/es/index9.js +8 -179
  35. package/lib/es/masters2.js +33 -34
  36. package/lib/es/notification.js +25 -25
  37. package/lib/es/points.js +10 -10
  38. package/lib/es/storage.js +14 -14
  39. package/lib/es/style.css +1 -0
  40. package/lib/es/useStreamLayerApp2.js +5654 -4604
  41. package/lib/source.css +1 -120
  42. package/package.json +99 -83
  43. package/lib/cjs/Question.js +0 -1
  44. package/lib/cjs/analytics.js +0 -1
  45. package/lib/cjs/feature.js +0 -1
  46. package/lib/cjs/gamification-feature.js +0 -1
  47. package/lib/cjs/gamification-feature2.js +0 -1
  48. package/lib/cjs/hooks-n9ax4LRT.js +0 -1
  49. package/lib/cjs/index-CfSdnrfA.js +0 -5
  50. package/lib/cjs/index10.js +0 -1
  51. package/lib/cjs/index11.js +0 -1
  52. package/lib/cjs/index12.js +0 -1
  53. package/lib/cjs/index13.js +0 -4
  54. package/lib/cjs/index14.js +0 -1
  55. package/lib/cjs/index15.js +0 -1
  56. package/lib/cjs/index16.js +0 -5
  57. package/lib/cjs/index2.js +0 -1
  58. package/lib/cjs/index3.js +0 -1
  59. package/lib/cjs/index4.js +0 -5
  60. package/lib/cjs/index5.js +0 -1
  61. package/lib/cjs/index6.js +0 -1
  62. package/lib/cjs/index7.js +0 -1
  63. package/lib/cjs/index8.js +0 -1
  64. package/lib/cjs/index9.js +0 -7
  65. package/lib/cjs/masters2.js +0 -8
  66. package/lib/cjs/storage.js +0 -1
  67. package/lib/cjs/theme.js +0 -1
  68. package/lib/cjs/useStreamLayerApp2.js +0 -17
  69. package/lib/cjs/utils.js +0 -47
  70. package/lib/classic/app/advertisement.d.ts +0 -19
  71. package/lib/classic/app/app.d.ts +0 -23
  72. package/lib/classic/app/auth.d.ts +0 -4
  73. package/lib/classic/app/bet-pack.d.ts +0 -10
  74. package/lib/classic/app/insight.d.ts +0 -13
  75. package/lib/classic/app/masters.d.ts +0 -19
  76. package/lib/classic/app/notification.d.ts +0 -5
  77. package/lib/classic/app/pause-ad.d.ts +0 -27
  78. package/lib/classic/app/points.d.ts +0 -3
  79. package/lib/classic/app/polymarket.d.ts +0 -7
  80. package/lib/classic/app/useStreamLayerApp.d.ts +0 -1
  81. package/lib/classic/cjs/Question.js +0 -1
  82. package/lib/classic/cjs/advertisement.js +0 -203
  83. package/lib/classic/cjs/analytics.js +0 -1
  84. package/lib/classic/cjs/auth.js +0 -1
  85. package/lib/classic/cjs/bet-pack.js +0 -5
  86. package/lib/classic/cjs/feature.js +0 -1
  87. package/lib/classic/cjs/gamification-feature.js +0 -1
  88. package/lib/classic/cjs/hooks-n9ax4LRT.js +0 -1
  89. package/lib/classic/cjs/index-CfSdnrfA.js +0 -5
  90. package/lib/classic/cjs/index.js +0 -1
  91. package/lib/classic/cjs/index10.js +0 -1
  92. package/lib/classic/cjs/index11.js +0 -1
  93. package/lib/classic/cjs/index12.js +0 -1
  94. package/lib/classic/cjs/index13.js +0 -4
  95. package/lib/classic/cjs/index2.js +0 -5
  96. package/lib/classic/cjs/index3.js +0 -1
  97. package/lib/classic/cjs/index4.js +0 -1
  98. package/lib/classic/cjs/index5.js +0 -1
  99. package/lib/classic/cjs/index6.js +0 -1
  100. package/lib/classic/cjs/index7.js +0 -7
  101. package/lib/classic/cjs/index8.js +0 -1
  102. package/lib/classic/cjs/index9.js +0 -1
  103. package/lib/classic/cjs/insight.js +0 -1
  104. package/lib/classic/cjs/notification.js +0 -1
  105. package/lib/classic/cjs/notification2.js +0 -1
  106. package/lib/classic/cjs/pause-ad.js +0 -1
  107. package/lib/classic/cjs/points.js +0 -1
  108. package/lib/classic/cjs/polymarket.js +0 -14
  109. package/lib/classic/cjs/useStreamLayerApp.js +0 -1
  110. package/lib/classic/cjs/useStreamLayerApp2.js +0 -17
  111. package/lib/classic/cjs/utils.js +0 -47
  112. package/lib/classic/es/Question.js +0 -503
  113. package/lib/classic/es/advertisement.js +0 -38792
  114. package/lib/classic/es/analytics.js +0 -84
  115. package/lib/classic/es/auth.js +0 -11
  116. package/lib/classic/es/bet-pack.js +0 -3418
  117. package/lib/classic/es/feature.js +0 -210
  118. package/lib/classic/es/gamification-feature.js +0 -4
  119. package/lib/classic/es/hooks-n9ax4LRT.js +0 -97
  120. package/lib/classic/es/index.js +0 -15
  121. package/lib/classic/es/index10.js +0 -321
  122. package/lib/classic/es/index11.js +0 -2592
  123. package/lib/classic/es/index12.js +0 -185
  124. package/lib/classic/es/index13.js +0 -820
  125. package/lib/classic/es/index2.js +0 -2605
  126. package/lib/classic/es/index3.js +0 -19
  127. package/lib/classic/es/index4.js +0 -6
  128. package/lib/classic/es/index5.js +0 -4
  129. package/lib/classic/es/index6.js +0 -285
  130. package/lib/classic/es/index7.js +0 -181
  131. package/lib/classic/es/index8.js +0 -7
  132. package/lib/classic/es/index9.js +0 -11
  133. package/lib/classic/es/insight.js +0 -79
  134. package/lib/classic/es/notification.js +0 -9
  135. package/lib/classic/es/notification2.js +0 -1126
  136. package/lib/classic/es/pause-ad.js +0 -232
  137. package/lib/classic/es/points.js +0 -76
  138. package/lib/classic/es/polymarket.js +0 -6617
  139. package/lib/classic/es/useStreamLayerApp.js +0 -4
  140. package/lib/classic/es/useStreamLayerApp2.js +0 -11627
  141. package/lib/classic/es/utils.js +0 -76
  142. package/lib/classic/index.d.ts +0 -6
  143. package/lib/classic/masters.d.ts +0 -8
  144. package/lib/classic/source.css +0 -110
  145. package/lib/dist/cjs/gamification-feature.js +0 -1
  146. package/lib/dist/cjs/index-CfSdnrfA.js +0 -5
  147. package/lib/dist/cjs/masters.js +0 -69
  148. package/lib/dist/es/gamification-feature.js +0 -4
  149. package/lib/dist/es/index-CfSdnrfA.js +0 -3775
  150. package/lib/dist/es/masters.js +0 -22387
  151. package/lib/dist/index.d.ts +0 -1357
  152. package/lib/dist/source.css +0 -64
  153. package/lib/es/index-CfSdnrfA.js +0 -3775
  154. package/lib/style.css +0 -1
  155. /package/lib/{classic/es/index-CfSdnrfA.js → es/index-D8wyDNJD.js} +0 -0
package/lib/es/index14.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsxs as T, jsx as e, Fragment as le } from "react/jsx-runtime";
2
2
  import { s as n, c as Z } from "./feature.js";
3
- import { useState as I, useEffect as b, useCallback as v, forwardRef as ce, useRef as B } from "react";
4
- import { B as f } from "./index8.js";
5
- import { G as ue, d as ie, b as de } from "./index9.js";
3
+ import { useState as I, useEffect as b, useCallback as v, forwardRef as ce, useRef as R } from "react";
4
+ import { H as f } from "./index5.js";
5
+ import { G as ue, d as ie, b as de } from "./index8.js";
6
6
  import { C as pe } from "./useStreamLayerApp2.js";
7
7
  const me = /* @__PURE__ */ n("div")({
8
8
  name: "CloseIconWrap",
@@ -66,7 +66,7 @@ const me = /* @__PURE__ */ n("div")({
66
66
  name: "Poster",
67
67
  class: "p12ow7zo",
68
68
  propsAsIs: !1
69
- }), R = /* @__PURE__ */ n("div")({
69
+ }), H = /* @__PURE__ */ n("div")({
70
70
  name: "Control",
71
71
  class: "cdpal9o",
72
72
  propsAsIs: !1
@@ -94,34 +94,34 @@ const me = /* @__PURE__ */ n("div")({
94
94
  name: "WebOSIconButton",
95
95
  class: "w1q3u7py",
96
96
  propsAsIs: !1
97
- }), Ee = () => Y, L = /* @__PURE__ */ n(Ee())({
97
+ }), Ee = () => Y, B = /* @__PURE__ */ n(Ee())({
98
98
  name: "WebOSIconButtonAnimation",
99
99
  class: "wdlqvum",
100
100
  propsAsIs: !0
101
- }), Ne = () => L, Oe = /* @__PURE__ */ n(Ne())({
101
+ }), Ne = () => B, Oe = /* @__PURE__ */ n(Ne())({
102
102
  name: "WebOSIconButtonPlay",
103
103
  class: "w1ylz9ea",
104
104
  propsAsIs: !0
105
- }), Se = () => L, We = /* @__PURE__ */ n(Se())({
105
+ }), Se = () => B, We = /* @__PURE__ */ n(Se())({
106
106
  name: "WebOSIconButtonPause",
107
107
  class: "w1iylt55",
108
108
  propsAsIs: !0
109
- }), Be = () => L, Re = /* @__PURE__ */ n(Be())({
109
+ }), Re = () => B, He = /* @__PURE__ */ n(Re())({
110
110
  name: "WebOSIconButtonMute",
111
111
  class: "w8h4h7",
112
112
  propsAsIs: !0
113
- }), Te = () => L, Le = /* @__PURE__ */ n(Te())({
113
+ }), Te = () => B, Be = /* @__PURE__ */ n(Te())({
114
114
  name: "WebOSIconButtonUnmute",
115
115
  class: "w12l12kt",
116
116
  propsAsIs: !0
117
- }), Ue = (t) => {
117
+ }), Le = (t) => {
118
118
  for (const a of t)
119
119
  a.isIntersecting ? a.target instanceof HTMLVideoElement && a.target.autoplay && a.target.play() : a.target instanceof HTMLVideoElement && !a.target.paused && a.target.pause();
120
- }, ee = new IntersectionObserver(Ue, { threshold: 0.5 }), F = /* @__PURE__ */ new Set(), je = (t) => {
120
+ }, ee = new IntersectionObserver(Le, { threshold: 0.5 }), F = /* @__PURE__ */ new Set(), Ue = (t) => {
121
121
  ee.observe(t), F.add(t);
122
- }, ze = (t) => {
122
+ }, je = (t) => {
123
123
  ee.unobserve(t), F.delete(t);
124
- }, He = () => {
124
+ }, ze = () => {
125
125
  for (const t of F)
126
126
  t instanceof HTMLVideoElement && !t.paused && t.pause();
127
127
  };
@@ -137,7 +137,7 @@ function qe(...t) {
137
137
  [...t]
138
138
  );
139
139
  }
140
- const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMuted: i, unmute: c, mute: d, togglePlaying: p }) => !t && !a && !o ? /* @__PURE__ */ e(R, { children: l ? /* @__PURE__ */ e(f, { name: "icon-pause" }) : /* @__PURE__ */ e(f, { name: "icon-play" }) }) : o ? /* @__PURE__ */ T(ve, { children: [
140
+ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMuted: i, unmute: c, mute: d, togglePlaying: p }) => !t && !a && !o ? /* @__PURE__ */ e(H, { children: l ? /* @__PURE__ */ e(f, { name: "icon-pause" }) : /* @__PURE__ */ e(f, { name: "icon-play" }) }) : o ? /* @__PURE__ */ T(ve, { children: [
141
141
  l ? /* @__PURE__ */ e(we, { onClick: p }) : /* @__PURE__ */ e(xe, { onClick: p }),
142
142
  /* @__PURE__ */ e(Me, { className: Z(!i && "muted"), onClick: i ? c : d })
143
143
  ] }) : null, Fe = ({
@@ -152,8 +152,8 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
152
152
  hasNotPausedVideo: y,
153
153
  hasInteractedWithAudio: C
154
154
  }) => /* @__PURE__ */ T(le, { children: [
155
- !t && !(a && o) && /* @__PURE__ */ e(R, { "data-control-btn": "true", children: l ? y ? null : /* @__PURE__ */ e(Oe, { children: /* @__PURE__ */ e(f, { name: "icon-play" }) }) : i ? /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(f, { name: "icon-pause" }) }) : /* @__PURE__ */ e(Y, { "data-control-icon": "true", children: /* @__PURE__ */ e(f, { name: "icon-play" }) }) }),
156
- !t && a && o && C && /* @__PURE__ */ e(R, { children: p ? /* @__PURE__ */ e(Re, { onClick: c, children: /* @__PURE__ */ e(f, { name: "iconMute" }) }) : /* @__PURE__ */ e(Le, { onClick: d, children: /* @__PURE__ */ e(f, { name: "iconUnMute" }) }) })
155
+ !t && !(a && o) && /* @__PURE__ */ e(H, { "data-control-btn": "true", children: l ? y ? null : /* @__PURE__ */ e(Oe, { children: /* @__PURE__ */ e(f, { name: "icon-play" }) }) : i ? /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(f, { name: "icon-pause" }) }) : /* @__PURE__ */ e(Y, { "data-control-icon": "true", children: /* @__PURE__ */ e(f, { name: "icon-play" }) }) }),
156
+ !t && a && o && C && /* @__PURE__ */ e(H, { children: p ? /* @__PURE__ */ e(He, { onClick: c, children: /* @__PURE__ */ e(f, { name: "iconMute" }) }) : /* @__PURE__ */ e(Be, { onClick: d, children: /* @__PURE__ */ e(f, { name: "iconUnMute" }) }) })
157
157
  ] }), Ye = ce(
158
158
  ({
159
159
  poster: t,
@@ -167,7 +167,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
167
167
  onRender: y,
168
168
  onMute: C,
169
169
  onMuteClick: x,
170
- onQuartile: U,
170
+ onQuartile: L,
171
171
  autoPlay: M,
172
172
  playMuted: k,
173
173
  className: te,
@@ -175,7 +175,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
175
175
  webos: E,
176
176
  hasNotPausedVideo: ae
177
177
  }, se) => {
178
- const u = B(null), ne = qe(u, se), j = B(!1), z = B(!1), m = B(/* @__PURE__ */ new Set()), [G, K] = I(!1), [N, O] = I(!1), [H, _] = I(!1), [J, S] = I(!0), [q, W] = I(k), [$, oe] = I(!1);
178
+ const u = R(null), ne = qe(u, se), U = R(!1), j = R(!1), m = R(/* @__PURE__ */ new Set()), [G, K] = I(!1), [N, O] = I(!1), [z, _] = I(!1), [J, S] = I(!0), [q, W] = I(k), [$, oe] = I(!1);
179
179
  b(() => {
180
180
  a && (W(k), K(!1));
181
181
  }, [a]);
@@ -207,7 +207,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
207
207
  const g = u?.current;
208
208
  if (!g)
209
209
  return;
210
- He(), g.play().catch((h) => console.log(h)), S(!1);
210
+ ze(), g.play().catch((h) => console.log(h)), S(!1);
211
211
  }
212
212
  }, re = () => {
213
213
  u?.current?.load(), S(!0);
@@ -216,14 +216,14 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
216
216
  P();
217
217
  }, [P]), b(() => {
218
218
  const s = u.current;
219
- return s ? (z.current = s.muted, W(s.muted), je(s), () => {
220
- ze(s);
219
+ return s ? (j.current = s.muted, W(s.muted), Ue(s), () => {
220
+ je(s);
221
221
  }) : () => {
222
222
  };
223
223
  }, []), b(() => {
224
224
  y?.();
225
225
  }, [y]), b(() => {
226
- m.current.clear(), j.current = !1;
226
+ m.current.clear(), U.current = !1;
227
227
  }, [a]), /* @__PURE__ */ T(
228
228
  $e,
229
229
  {
@@ -242,18 +242,18 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
242
242
  src: a,
243
243
  autoPlay: M,
244
244
  onPlay: () => {
245
- K(!0), j.current && (i?.(), m.current.clear()), O(!0), S(!1), c?.(), k ? A() : Q();
245
+ K(!0), U.current && (i?.(), m.current.clear()), O(!0), S(!1), c?.(), k ? A() : Q();
246
246
  },
247
247
  onTimeUpdate: (s) => {
248
248
  const r = s.target.duration, g = s.target.currentTime;
249
249
  if (r && g) {
250
250
  const h = Math.floor(g / r * 100);
251
- h >= 25 && h < 50 && !m.current.has(25) ? (U?.(25), m.current.add(25)) : h >= 50 && h < 75 && !m.current.has(50) ? (U?.(50), m.current.add(50)) : h >= 75 && !m.current.has(75) && (U?.(75), m.current.add(75));
251
+ h >= 25 && h < 50 && !m.current.has(25) ? (L?.(25), m.current.add(25)) : h >= 50 && h < 75 && !m.current.has(50) ? (L?.(50), m.current.add(50)) : h >= 75 && !m.current.has(75) && (L?.(75), m.current.add(75));
252
252
  }
253
253
  },
254
254
  onVolumeChange: (s) => {
255
255
  const r = s.target.muted;
256
- z.current !== r && (C?.(r), z.current = r, (r !== w || w === void 0) && (r ? P() : Q()));
256
+ j.current !== r && (C?.(r), j.current = r, (r !== w || w === void 0) && (r ? P() : Q()));
257
257
  },
258
258
  onError: async (s) => {
259
259
  try {
@@ -272,7 +272,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
272
272
  O(!1), d?.(), P();
273
273
  },
274
274
  onEnded: () => {
275
- O(!1), j.current = !0, re(), p?.(), P();
275
+ O(!1), U.current = !0, re(), p?.(), P();
276
276
  },
277
277
  style: { visibility: J ? "hidden" : "visible" },
278
278
  controls: !1,
@@ -283,7 +283,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
283
283
  !E && /* @__PURE__ */ e(
284
284
  De,
285
285
  {
286
- loading: H,
286
+ loading: z,
287
287
  autoPlay: M,
288
288
  played: G,
289
289
  playing: N,
@@ -296,7 +296,7 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
296
296
  E && /* @__PURE__ */ e(
297
297
  Fe,
298
298
  {
299
- loading: H,
299
+ loading: z,
300
300
  autoPlay: M,
301
301
  playMuted: k,
302
302
  playing: N,
@@ -308,14 +308,14 @@ const $e = de(he), De = ({ loading: t, autoPlay: a, played: o, playing: l, isMut
308
308
  hasInteractedWithAudio: $
309
309
  }
310
310
  ),
311
- H && /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(ie, {}) })
311
+ z && /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(ie, {}) })
312
312
  ]
313
313
  }
314
314
  );
315
315
  }
316
316
  );
317
317
  export {
318
- He as O,
318
+ ze as O,
319
319
  Ye as V,
320
320
  Ze as y
321
321
  };