@halibegic/react-video-player 0.0.43 → 0.0.44

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 (69) hide show
  1. package/dist/index.d.ts +2 -4
  2. package/dist/react-video-player.es.js +430 -423
  3. package/dist/react-video-player.es.js.map +1 -1
  4. package/dist/react-video-player.umd.js +8 -8
  5. package/dist/react-video-player.umd.js.map +1 -1
  6. package/dist/src/index.d.ts +4 -0
  7. package/package.json +1 -1
  8. /package/dist/{app.d.ts → src/app.d.ts} +0 -0
  9. /package/dist/{components → src/components}/icons/check-icon.d.ts +0 -0
  10. /package/dist/{components → src/components}/icons/fullscreen-enter-icon.d.ts +0 -0
  11. /package/dist/{components → src/components}/icons/fullscreen-exit-icon.d.ts +0 -0
  12. /package/dist/{components → src/components}/icons/hd-icon.d.ts +0 -0
  13. /package/dist/{components → src/components}/icons/pause-icon.d.ts +0 -0
  14. /package/dist/{components → src/components}/icons/play-icon.d.ts +0 -0
  15. /package/dist/{components → src/components}/icons/start-over-icon.d.ts +0 -0
  16. /package/dist/{components → src/components}/icons/volume-max-icon.d.ts +0 -0
  17. /package/dist/{components → src/components}/icons/volume-min-icon.d.ts +0 -0
  18. /package/dist/{components → src/components}/icons/volume-mute-icon.d.ts +0 -0
  19. /package/dist/{components → src/components}/live-player/live-player-event-check.d.ts +0 -0
  20. /package/dist/{components → src/components}/live-player/live-player-event-listener.d.ts +0 -0
  21. /package/dist/{components → src/components}/live-player/live-player-keyboard.d.ts +0 -0
  22. /package/dist/{components → src/components}/live-player/live-player-provider.d.ts +0 -0
  23. /package/dist/{components → src/components}/live-player/live-player-tech.d.ts +0 -0
  24. /package/dist/{components → src/components}/live-player/live-player-viewer-count.d.ts +0 -0
  25. /package/dist/{components → src/components}/live-player/ui/live-player-gestures.d.ts +0 -0
  26. /package/dist/{components → src/components}/live-player/ui/live-player-go-live.d.ts +0 -0
  27. /package/dist/{components → src/components}/live-player/ui/live-player-playback.d.ts +0 -0
  28. /package/dist/{components → src/components}/live-player/ui/live-player-progress.d.ts +0 -0
  29. /package/dist/{components → src/components}/live-player/ui/live-player-start-over.d.ts +0 -0
  30. /package/dist/{components → src/components}/live-player/ui/live-player-viewers.d.ts +0 -0
  31. /package/dist/{components → src/components}/live-player.d.ts +0 -0
  32. /package/dist/{components → src/components}/player/player-error-check.d.ts +0 -0
  33. /package/dist/{components → src/components}/player/player-event-listener.d.ts +0 -0
  34. /package/dist/{components → src/components}/player/player-hls-engine.d.ts +0 -0
  35. /package/dist/{components → src/components}/player/player-keyboard.d.ts +0 -0
  36. /package/dist/{components → src/components}/player/player-provider.d.ts +0 -0
  37. /package/dist/{components → src/components}/player/player-tech.d.ts +0 -0
  38. /package/dist/{components → src/components}/player/ui/player-button.d.ts +0 -0
  39. /package/dist/{components → src/components}/player/ui/player-fullscreen.d.ts +0 -0
  40. /package/dist/{components → src/components}/player/ui/player-gestures.d.ts +0 -0
  41. /package/dist/{components → src/components}/player/ui/player-idle-check.d.ts +0 -0
  42. /package/dist/{components → src/components}/player/ui/player-loading.d.ts +0 -0
  43. /package/dist/{components → src/components}/player/ui/player-menu.d.ts +0 -0
  44. /package/dist/{components → src/components}/player/ui/player-quality-control.d.ts +0 -0
  45. /package/dist/{components → src/components}/player/ui/player-slider.d.ts +0 -0
  46. /package/dist/{components → src/components}/player/ui/player-spinner.d.ts +0 -0
  47. /package/dist/{components → src/components}/player/ui/player-volume.d.ts +0 -0
  48. /package/dist/{components → src/components}/vod-player/ui/vod-player-gestures.d.ts +0 -0
  49. /package/dist/{components → src/components}/vod-player/ui/vod-player-playback.d.ts +0 -0
  50. /package/dist/{components → src/components}/vod-player/ui/vod-player-progress.d.ts +0 -0
  51. /package/dist/{components → src/components}/vod-player/ui/vod-player-remaining-time.d.ts +0 -0
  52. /package/dist/{components → src/components}/vod-player/vod-player-event-listener.d.ts +0 -0
  53. /package/dist/{components → src/components}/vod-player/vod-player-keyboard.d.ts +0 -0
  54. /package/dist/{components → src/components}/vod-player.d.ts +0 -0
  55. /package/dist/{hooks → src/hooks}/use-debounce.d.ts +0 -0
  56. /package/dist/{hooks → src/hooks}/use-interval.d.ts +0 -0
  57. /package/dist/{hooks → src/hooks}/use-isomorphic-layout-effect.d.ts +0 -0
  58. /package/dist/{hooks → src/hooks}/use-media-query.d.ts +0 -0
  59. /package/dist/{hooks → src/hooks}/use-state-refresh.d.ts +0 -0
  60. /package/dist/{stores → src/stores}/live-player-store.d.ts +0 -0
  61. /package/dist/{stores → src/stores}/player-store.d.ts +0 -0
  62. /package/dist/{types → src/types}/player.d.ts +0 -0
  63. /package/dist/{utils → src/utils}/date-time.d.ts +0 -0
  64. /package/dist/{utils → src/utils}/device.d.ts +0 -0
  65. /package/dist/{utils → src/utils}/dom.d.ts +0 -0
  66. /package/dist/{utils → src/utils}/fullscreen.d.ts +0 -0
  67. /package/dist/{utils → src/utils}/hls-parser.d.ts +0 -0
  68. /package/dist/{utils → src/utils}/player-events.d.ts +0 -0
  69. /package/dist/{utils → src/utils}/player.d.ts +0 -0
@@ -1,15 +1,15 @@
1
- var Mn = Object.defineProperty, Nn = Object.defineProperties;
2
- var Vn = Object.getOwnPropertyDescriptors;
1
+ var Nn = Object.defineProperty, Vn = Object.defineProperties;
2
+ var An = Object.getOwnPropertyDescriptors;
3
3
  var Se = Object.getOwnPropertySymbols;
4
4
  var vt = Object.prototype.hasOwnProperty, yt = Object.prototype.propertyIsEnumerable;
5
- var pt = (e, t, n) => t in e ? Mn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, j = (e, t) => {
5
+ var pt = (e, t, n) => t in e ? Nn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, P = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
7
  vt.call(t, n) && pt(e, n, t[n]);
8
8
  if (Se)
9
9
  for (var n of Se(t))
10
10
  yt.call(t, n) && pt(e, n, t[n]);
11
11
  return e;
12
- }, he = (e, t) => Nn(e, Vn(t));
12
+ }, he = (e, t) => Vn(e, An(t));
13
13
  var ne = (e, t) => {
14
14
  var n = {};
15
15
  for (var o in e)
@@ -19,14 +19,14 @@ var ne = (e, t) => {
19
19
  t.indexOf(o) < 0 && yt.call(e, o) && (n[o] = e[o]);
20
20
  return n;
21
21
  };
22
- import St, { useLayoutEffect as An, useEffect as O, useRef as V, useState as G, createContext as jt, useContext as Lt, useCallback as W, forwardRef as Ne } from "react";
23
- import { create as Pt, useStore as It } from "zustand";
24
- import On from "mitt";
22
+ import St, { useLayoutEffect as On, useEffect as F, useRef as A, useState as G, createContext as jt, useContext as Pt, useCallback as W, forwardRef as Ne } from "react";
23
+ import { create as Lt, useStore as kt } from "zustand";
24
+ import Hn from "mitt";
25
25
  import re from "hls.js";
26
26
  import * as je from "@radix-ui/react-slider";
27
27
  import * as Te from "@radix-ui/react-popover";
28
- import * as Le from "@radix-ui/react-scroll-area";
29
- function kt(e) {
28
+ import * as Pe from "@radix-ui/react-scroll-area";
29
+ function It(e) {
30
30
  var t = this.constructor;
31
31
  return this.then(
32
32
  function(n) {
@@ -101,19 +101,19 @@ function Mt(e) {
101
101
  }
102
102
  });
103
103
  }
104
- var Hn = setTimeout;
104
+ var $n = setTimeout;
105
105
  function Nt(e) {
106
106
  return !!(e && typeof e.length != "undefined");
107
107
  }
108
- function $n() {
108
+ function Un() {
109
109
  }
110
- function Un(e, t) {
110
+ function Bn(e, t) {
111
111
  return function() {
112
112
  e.apply(t, arguments);
113
113
  };
114
114
  }
115
- function M(e) {
116
- if (!(this instanceof M))
115
+ function N(e) {
116
+ if (!(this instanceof N))
117
117
  throw new TypeError("Promises must be constructed via new");
118
118
  if (typeof e != "function") throw new TypeError("not a function");
119
119
  this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], At(e, this);
@@ -125,7 +125,7 @@ function Vt(e, t) {
125
125
  e._deferreds.push(t);
126
126
  return;
127
127
  }
128
- e._handled = !0, M._immediateFn(function() {
128
+ e._handled = !0, N._immediateFn(function() {
129
129
  var n = e._state === 1 ? t.onFulfilled : t.onRejected;
130
130
  if (n === null) {
131
131
  (e._state === 1 ? Ke : xe)(t.promise, e._value);
@@ -147,11 +147,11 @@ function Ke(e, t) {
147
147
  throw new TypeError("A promise cannot be resolved with itself.");
148
148
  if (t && (typeof t == "object" || typeof t == "function")) {
149
149
  var n = t.then;
150
- if (t instanceof M) {
150
+ if (t instanceof N) {
151
151
  e._state = 3, e._value = t, Ye(e);
152
152
  return;
153
153
  } else if (typeof n == "function") {
154
- At(Un(n, t), e);
154
+ At(Bn(n, t), e);
155
155
  return;
156
156
  }
157
157
  }
@@ -164,14 +164,14 @@ function xe(e, t) {
164
164
  e._state = 2, e._value = t, Ye(e);
165
165
  }
166
166
  function Ye(e) {
167
- e._state === 2 && e._deferreds.length === 0 && M._immediateFn(function() {
168
- e._handled || M._unhandledRejectionFn(e._value);
167
+ e._state === 2 && e._deferreds.length === 0 && N._immediateFn(function() {
168
+ e._handled || N._unhandledRejectionFn(e._value);
169
169
  });
170
170
  for (var t = 0, n = e._deferreds.length; t < n; t++)
171
171
  Vt(e, e._deferreds[t]);
172
172
  e._deferreds = null;
173
173
  }
174
- function Bn(e, t, n) {
174
+ function zn(e, t, n) {
175
175
  this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof t == "function" ? t : null, this.promise = n;
176
176
  }
177
177
  function At(e, t) {
@@ -190,16 +190,16 @@ function At(e, t) {
190
190
  n = !0, xe(t, o);
191
191
  }
192
192
  }
193
- M.prototype.catch = function(e) {
193
+ N.prototype.catch = function(e) {
194
194
  return this.then(null, e);
195
195
  };
196
- M.prototype.then = function(e, t) {
197
- var n = new this.constructor($n);
198
- return Vt(this, new Bn(e, t, n)), n;
196
+ N.prototype.then = function(e, t) {
197
+ var n = new this.constructor(Un);
198
+ return Vt(this, new zn(e, t, n)), n;
199
199
  };
200
- M.prototype.finally = kt;
201
- M.all = function(e) {
202
- return new M(function(t, n) {
200
+ N.prototype.finally = It;
201
+ N.all = function(e) {
202
+ return new N(function(t, n) {
203
203
  if (!Nt(e))
204
204
  return n(new TypeError("Promise.all accepts an array"));
205
205
  var o = Array.prototype.slice.call(e);
@@ -229,33 +229,33 @@ M.all = function(e) {
229
229
  l(u, o[u]);
230
230
  });
231
231
  };
232
- M.any = Mt;
233
- M.allSettled = Dt;
234
- M.resolve = function(e) {
235
- return e && typeof e == "object" && e.constructor === M ? e : new M(function(t) {
232
+ N.any = Mt;
233
+ N.allSettled = Dt;
234
+ N.resolve = function(e) {
235
+ return e && typeof e == "object" && e.constructor === N ? e : new N(function(t) {
236
236
  t(e);
237
237
  });
238
238
  };
239
- M.reject = function(e) {
240
- return new M(function(t, n) {
239
+ N.reject = function(e) {
240
+ return new N(function(t, n) {
241
241
  n(e);
242
242
  });
243
243
  };
244
- M.race = function(e) {
245
- return new M(function(t, n) {
244
+ N.race = function(e) {
245
+ return new N(function(t, n) {
246
246
  if (!Nt(e))
247
247
  return n(new TypeError("Promise.race accepts an array"));
248
248
  for (var o = 0, a = e.length; o < a; o++)
249
- M.resolve(e[o]).then(t, n);
249
+ N.resolve(e[o]).then(t, n);
250
250
  });
251
251
  };
252
- M._immediateFn = // @ts-ignore
252
+ N._immediateFn = // @ts-ignore
253
253
  typeof setImmediate == "function" && function(e) {
254
254
  setImmediate(e);
255
255
  } || function(e) {
256
- Hn(e, 0);
256
+ $n(e, 0);
257
257
  };
258
- M._unhandledRejectionFn = function(t) {
258
+ N._unhandledRejectionFn = function(t) {
259
259
  typeof console != "undefined" && console && console.warn("Possible Unhandled Promise Rejection:", t);
260
260
  };
261
261
  var ae = (function() {
@@ -267,10 +267,10 @@ var ae = (function() {
267
267
  return global;
268
268
  throw new Error("unable to locate global object");
269
269
  })();
270
- typeof ae.Promise != "function" ? ae.Promise = M : (ae.Promise.prototype.finally || (ae.Promise.prototype.finally = kt), ae.Promise.allSettled || (ae.Promise.allSettled = Dt), ae.Promise.any || (ae.Promise.any = Mt));
271
- var Pe = { exports: {} }, ge = {};
270
+ typeof ae.Promise != "function" ? ae.Promise = N : (ae.Promise.prototype.finally || (ae.Promise.prototype.finally = It), ae.Promise.allSettled || (ae.Promise.allSettled = Dt), ae.Promise.any || (ae.Promise.any = Mt));
271
+ var Le = { exports: {} }, ge = {};
272
272
  var gt;
273
- function zn() {
273
+ function Wn() {
274
274
  if (gt) return ge;
275
275
  gt = 1;
276
276
  var e = St, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
@@ -285,7 +285,7 @@ function zn() {
285
285
  }
286
286
  var we = {};
287
287
  var wt;
288
- function Wn() {
288
+ function Zn() {
289
289
  return wt || (wt = 1, process.env.NODE_ENV !== "production" && (function() {
290
290
  var e = St, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), i = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), D = Symbol.iterator, _ = "@@iterator";
291
291
  function S(r) {
@@ -294,17 +294,17 @@ function Wn() {
294
294
  var h = D && r[D] || r[_];
295
295
  return typeof h == "function" ? h : null;
296
296
  }
297
- var N = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
297
+ var V = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
298
298
  function R(r) {
299
299
  {
300
300
  for (var h = arguments.length, m = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
301
301
  m[w - 1] = arguments[w];
302
- P("error", r, m);
302
+ k("error", r, m);
303
303
  }
304
304
  }
305
- function P(r, h, m) {
305
+ function k(r, h, m) {
306
306
  {
307
- var w = N.ReactDebugCurrentFrame, E = w.getStackAddendum();
307
+ var w = V.ReactDebugCurrentFrame, E = w.getStackAddendum();
308
308
  E !== "" && (h += "%s", m = m.concat([E]));
309
309
  var b = m.map(function(C) {
310
310
  return String(C);
@@ -312,16 +312,16 @@ function Wn() {
312
312
  b.unshift("Warning: " + h), Function.prototype.apply.call(console[r], console, b);
313
313
  }
314
314
  }
315
- var x = !1, I = !1, p = !1, $ = !1, Y = !1, B;
315
+ var x = !1, j = !1, p = !1, $ = !1, Y = !1, B;
316
316
  B = Symbol.for("react.module.reference");
317
- function F(r) {
318
- return !!(typeof r == "string" || typeof r == "function" || r === o || r === l || Y || r === a || r === d || r === v || $ || r === L || x || I || p || typeof r == "object" && r !== null && (r.$$typeof === g || r.$$typeof === y || r.$$typeof === u || r.$$typeof === i || r.$$typeof === c || // This needs to include all possible module reference object
317
+ function M(r) {
318
+ return !!(typeof r == "string" || typeof r == "function" || r === o || r === l || Y || r === a || r === d || r === v || $ || r === L || x || j || p || typeof r == "object" && r !== null && (r.$$typeof === g || r.$$typeof === y || r.$$typeof === u || r.$$typeof === i || r.$$typeof === c || // This needs to include all possible module reference object
319
319
  // types supported by any Flight configuration anywhere since
320
320
  // we don't know which Flight build this will end up being used
321
321
  // with.
322
322
  r.$$typeof === B || r.getModuleId !== void 0));
323
323
  }
324
- function k(r, h, m) {
324
+ function I(r, h, m) {
325
325
  var w = r.displayName;
326
326
  if (w)
327
327
  return w;
@@ -361,7 +361,7 @@ function Wn() {
361
361
  var m = r;
362
362
  return Q(m._context) + ".Provider";
363
363
  case c:
364
- return k(r, r.render, "ForwardRef");
364
+ return I(r, r.render, "ForwardRef");
365
365
  case y:
366
366
  var w = r.displayName || null;
367
367
  return w !== null ? w : K(r.type) || "Memo";
@@ -380,7 +380,7 @@ function Wn() {
380
380
  function Qe() {
381
381
  }
382
382
  Qe.__reactDisabledLog = !0;
383
- function ln() {
383
+ function cn() {
384
384
  {
385
385
  if (oe === 0) {
386
386
  ue = console.log, te = console.info, q = console.warn, ve = console.error, Xe = console.group, Ge = console.groupCollapsed, Je = console.groupEnd;
@@ -403,7 +403,7 @@ function Wn() {
403
403
  oe++;
404
404
  }
405
405
  }
406
- function cn() {
406
+ function un() {
407
407
  {
408
408
  if (oe--, oe === 0) {
409
409
  var r = {
@@ -438,7 +438,7 @@ function Wn() {
438
438
  oe < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
439
439
  }
440
440
  }
441
- var Oe = N.ReactCurrentDispatcher, He;
441
+ var Oe = V.ReactCurrentDispatcher, He;
442
442
  function Ce(r, h, m) {
443
443
  {
444
444
  if (He === void 0)
@@ -454,8 +454,8 @@ function Wn() {
454
454
  }
455
455
  var $e = !1, Ee;
456
456
  {
457
- var un = typeof WeakMap == "function" ? WeakMap : Map;
458
- Ee = new un();
457
+ var dn = typeof WeakMap == "function" ? WeakMap : Map;
458
+ Ee = new dn();
459
459
  }
460
460
  function et(r, h) {
461
461
  if (!r || $e)
@@ -470,7 +470,7 @@ function Wn() {
470
470
  var E = Error.prepareStackTrace;
471
471
  Error.prepareStackTrace = void 0;
472
472
  var b;
473
- b = Oe.current, Oe.current = null, ln();
473
+ b = Oe.current, Oe.current = null, cn();
474
474
  try {
475
475
  if (h) {
476
476
  var C = function() {
@@ -523,15 +523,15 @@ function Wn() {
523
523
  }
524
524
  }
525
525
  } finally {
526
- $e = !1, Oe.current = b, cn(), Error.prepareStackTrace = E;
526
+ $e = !1, Oe.current = b, un(), Error.prepareStackTrace = E;
527
527
  }
528
528
  var fe = r ? r.displayName || r.name : "", ce = fe ? Ce(fe) : "";
529
529
  return typeof r == "function" && Ee.set(r, ce), ce;
530
530
  }
531
- function dn(r, h, m) {
531
+ function fn(r, h, m) {
532
532
  return et(r, !1);
533
533
  }
534
- function fn(r) {
534
+ function hn(r) {
535
535
  var h = r.prototype;
536
536
  return !!(h && h.isReactComponent);
537
537
  }
@@ -539,7 +539,7 @@ function Wn() {
539
539
  if (r == null)
540
540
  return "";
541
541
  if (typeof r == "function")
542
- return et(r, fn(r));
542
+ return et(r, hn(r));
543
543
  if (typeof r == "string")
544
544
  return Ce(r);
545
545
  switch (r) {
@@ -551,7 +551,7 @@ function Wn() {
551
551
  if (typeof r == "object")
552
552
  switch (r.$$typeof) {
553
553
  case c:
554
- return dn(r.render);
554
+ return fn(r.render);
555
555
  case y:
556
556
  return Re(r.type, h, m);
557
557
  case g: {
@@ -564,7 +564,7 @@ function Wn() {
564
564
  }
565
565
  return "";
566
566
  }
567
- var ye = Object.prototype.hasOwnProperty, tt = {}, nt = N.ReactDebugCurrentFrame;
567
+ var ye = Object.prototype.hasOwnProperty, tt = {}, nt = V.ReactDebugCurrentFrame;
568
568
  function be(r) {
569
569
  if (r) {
570
570
  var h = r._owner, m = Re(r.type, r._source, h ? h.type : null);
@@ -572,7 +572,7 @@ function Wn() {
572
572
  } else
573
573
  nt.setExtraStackFrame(null);
574
574
  }
575
- function hn(r, h, m, w, E) {
575
+ function mn(r, h, m, w, E) {
576
576
  {
577
577
  var b = Function.call.bind(ye);
578
578
  for (var C in r)
@@ -591,17 +591,17 @@ function Wn() {
591
591
  }
592
592
  }
593
593
  }
594
- var mn = Array.isArray;
594
+ var pn = Array.isArray;
595
595
  function Ue(r) {
596
- return mn(r);
596
+ return pn(r);
597
597
  }
598
- function pn(r) {
598
+ function vn(r) {
599
599
  {
600
600
  var h = typeof Symbol == "function" && Symbol.toStringTag, m = h && r[Symbol.toStringTag] || r.constructor.name || "Object";
601
601
  return m;
602
602
  }
603
603
  }
604
- function vn(r) {
604
+ function yn(r) {
605
605
  try {
606
606
  return rt(r), !1;
607
607
  } catch (h) {
@@ -612,16 +612,16 @@ function Wn() {
612
612
  return "" + r;
613
613
  }
614
614
  function ot(r) {
615
- if (vn(r))
616
- return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", pn(r)), rt(r);
615
+ if (yn(r))
616
+ return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vn(r)), rt(r);
617
617
  }
618
- var it = N.ReactCurrentOwner, yn = {
618
+ var it = V.ReactCurrentOwner, gn = {
619
619
  key: !0,
620
620
  ref: !0,
621
621
  __self: !0,
622
622
  __source: !0
623
623
  }, st, at;
624
- function gn(r) {
624
+ function wn(r) {
625
625
  if (ye.call(r, "ref")) {
626
626
  var h = Object.getOwnPropertyDescriptor(r, "ref").get;
627
627
  if (h && h.isReactWarning)
@@ -629,7 +629,7 @@ function Wn() {
629
629
  }
630
630
  return r.ref !== void 0;
631
631
  }
632
- function wn(r) {
632
+ function xn(r) {
633
633
  if (ye.call(r, "key")) {
634
634
  var h = Object.getOwnPropertyDescriptor(r, "key").get;
635
635
  if (h && h.isReactWarning)
@@ -637,10 +637,10 @@ function Wn() {
637
637
  }
638
638
  return r.key !== void 0;
639
639
  }
640
- function xn(r, h) {
640
+ function _n(r, h) {
641
641
  typeof r.ref == "string" && it.current;
642
642
  }
643
- function _n(r, h) {
643
+ function Tn(r, h) {
644
644
  {
645
645
  var m = function() {
646
646
  st || (st = !0, R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
@@ -651,7 +651,7 @@ function Wn() {
651
651
  });
652
652
  }
653
653
  }
654
- function Tn(r, h) {
654
+ function Cn(r, h) {
655
655
  {
656
656
  var m = function() {
657
657
  at || (at = !0, R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
@@ -662,7 +662,7 @@ function Wn() {
662
662
  });
663
663
  }
664
664
  }
665
- var Cn = function(r, h, m, w, E, b, C) {
665
+ var En = function(r, h, m, w, E, b, C) {
666
666
  var T = {
667
667
  // This tag allows us to uniquely identify this as a React Element
668
668
  $$typeof: t,
@@ -691,12 +691,12 @@ function Wn() {
691
691
  value: E
692
692
  }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
693
693
  };
694
- function En(r, h, m, w, E) {
694
+ function Rn(r, h, m, w, E) {
695
695
  {
696
696
  var b, C = {}, T = null, X = null;
697
- m !== void 0 && (ot(m), T = "" + m), wn(h) && (ot(h.key), T = "" + h.key), gn(h) && (X = h.ref, xn(h, E));
697
+ m !== void 0 && (ot(m), T = "" + m), xn(h) && (ot(h.key), T = "" + h.key), wn(h) && (X = h.ref, _n(h, E));
698
698
  for (b in h)
699
- ye.call(h, b) && !yn.hasOwnProperty(b) && (C[b] = h[b]);
699
+ ye.call(h, b) && !gn.hasOwnProperty(b) && (C[b] = h[b]);
700
700
  if (r && r.defaultProps) {
701
701
  var H = r.defaultProps;
702
702
  for (b in H)
@@ -704,12 +704,12 @@ function Wn() {
704
704
  }
705
705
  if (T || X) {
706
706
  var U = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
707
- T && _n(C, U), X && Tn(C, U);
707
+ T && Tn(C, U), X && Cn(C, U);
708
708
  }
709
- return Cn(r, T, X, E, w, it.current, C);
709
+ return En(r, T, X, E, w, it.current, C);
710
710
  }
711
711
  }
712
- var Be = N.ReactCurrentOwner, lt = N.ReactDebugCurrentFrame;
712
+ var Be = V.ReactCurrentOwner, lt = V.ReactDebugCurrentFrame;
713
713
  function de(r) {
714
714
  if (r) {
715
715
  var h = r._owner, m = Re(r.type, r._source, h ? h.type : null);
@@ -734,11 +734,11 @@ Check the render method of \`` + r + "`.";
734
734
  return "";
735
735
  }
736
736
  }
737
- function Rn(r) {
737
+ function bn(r) {
738
738
  return "";
739
739
  }
740
740
  var ut = {};
741
- function bn(r) {
741
+ function Sn(r) {
742
742
  {
743
743
  var h = ct();
744
744
  if (!h) {
@@ -755,7 +755,7 @@ Check the top-level render call using <` + m + ">.");
755
755
  if (!r._store || r._store.validated || r.key != null)
756
756
  return;
757
757
  r._store.validated = !0;
758
- var m = bn(h);
758
+ var m = Sn(h);
759
759
  if (ut[m])
760
760
  return;
761
761
  ut[m] = !0;
@@ -782,7 +782,7 @@ Check the top-level render call using <` + m + ">.");
782
782
  }
783
783
  }
784
784
  }
785
- function Sn(r) {
785
+ function jn(r) {
786
786
  {
787
787
  var h = r.type;
788
788
  if (h == null || typeof h == "string")
@@ -798,7 +798,7 @@ Check the top-level render call using <` + m + ">.");
798
798
  return;
799
799
  if (m) {
800
800
  var w = K(h);
801
- hn(m, r.props, "prop", w, r);
801
+ mn(m, r.props, "prop", w, r);
802
802
  } else if (h.PropTypes !== void 0 && !ze) {
803
803
  ze = !0;
804
804
  var E = K(h);
@@ -807,7 +807,7 @@ Check the top-level render call using <` + m + ">.");
807
807
  typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
808
808
  }
809
809
  }
810
- function jn(r) {
810
+ function Pn(r) {
811
811
  {
812
812
  for (var h = Object.keys(r.props), m = 0; m < h.length; m++) {
813
813
  var w = h[m];
@@ -822,16 +822,16 @@ Check the top-level render call using <` + m + ">.");
822
822
  var ht = {};
823
823
  function mt(r, h, m, w, E, b) {
824
824
  {
825
- var C = F(r);
825
+ var C = M(r);
826
826
  if (!C) {
827
827
  var T = "";
828
828
  (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
829
- var X = Rn();
829
+ var X = bn();
830
830
  X ? T += X : T += ct();
831
831
  var H;
832
832
  r === null ? H = "null" : Ue(r) ? H = "array" : r !== void 0 && r.$$typeof === t ? (H = "<" + (K(r.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : H = typeof r, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", H, T);
833
833
  }
834
- var U = En(r, h, m, E, b);
834
+ var U = Rn(r, h, m, E, b);
835
835
  if (U == null)
836
836
  return U;
837
837
  if (C) {
@@ -848,48 +848,48 @@ Check the top-level render call using <` + m + ">.");
848
848
  ft(ee, r);
849
849
  }
850
850
  if (ye.call(h, "key")) {
851
- var ce = K(r), J = Object.keys(h).filter(function(Fn) {
852
- return Fn !== "key";
851
+ var ce = K(r), J = Object.keys(h).filter(function(Mn) {
852
+ return Mn !== "key";
853
853
  }), Ze = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
854
854
  if (!ht[ce + Ze]) {
855
- var Dn = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
855
+ var Fn = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
856
856
  R(`A props object containing a "key" prop is being spread into JSX:
857
857
  let props = %s;
858
858
  <%s {...props} />
859
859
  React keys must be passed directly to JSX without using spread:
860
860
  let props = %s;
861
- <%s key={someKey} {...props} />`, Ze, ce, Dn, ce), ht[ce + Ze] = !0;
861
+ <%s key={someKey} {...props} />`, Ze, ce, Fn, ce), ht[ce + Ze] = !0;
862
862
  }
863
863
  }
864
- return r === o ? jn(U) : Sn(U), U;
864
+ return r === o ? Pn(U) : jn(U), U;
865
865
  }
866
866
  }
867
867
  function Ln(r, h, m) {
868
868
  return mt(r, h, m, !0);
869
869
  }
870
- function Pn(r, h, m) {
870
+ function kn(r, h, m) {
871
871
  return mt(r, h, m, !1);
872
872
  }
873
- var In = Pn, kn = Ln;
874
- we.Fragment = o, we.jsx = In, we.jsxs = kn;
873
+ var In = kn, Dn = Ln;
874
+ we.Fragment = o, we.jsx = In, we.jsxs = Dn;
875
875
  })()), we;
876
876
  }
877
877
  var xt;
878
- function Zn() {
879
- return xt || (xt = 1, process.env.NODE_ENV === "production" ? Pe.exports = zn() : Pe.exports = Wn()), Pe.exports;
880
- }
881
- var s = Zn();
882
- const qn = "_playerNotice_x3acc_1", Kn = "_playerNoticeTitle_x3acc_19", Yn = "_playerNoticeText_x3acc_28", Xn = "_playerNoticeLowZIndex_x3acc_37", ie = {
883
- playerNotice: qn,
884
- playerNoticeTitle: Kn,
885
- playerNoticeText: Yn,
886
- playerNoticeLowZIndex: Xn
887
- }, Ot = typeof window != "undefined" ? An : O;
878
+ function qn() {
879
+ return xt || (xt = 1, process.env.NODE_ENV === "production" ? Le.exports = Wn() : Le.exports = Zn()), Le.exports;
880
+ }
881
+ var s = qn();
882
+ const Kn = "_playerNotice_x3acc_1", Yn = "_playerNoticeTitle_x3acc_19", Xn = "_playerNoticeText_x3acc_28", Gn = "_playerNoticeLowZIndex_x3acc_37", ie = {
883
+ playerNotice: Kn,
884
+ playerNoticeTitle: Yn,
885
+ playerNoticeText: Xn,
886
+ playerNoticeLowZIndex: Gn
887
+ }, Ot = typeof window != "undefined" ? On : F;
888
888
  function Ve(e, t) {
889
- const n = V(e);
889
+ const n = A(e);
890
890
  Ot(() => {
891
891
  n.current = e;
892
- }, [e]), O(() => {
892
+ }, [e]), F(() => {
893
893
  if (t === null)
894
894
  return;
895
895
  const o = setInterval(() => {
@@ -900,11 +900,11 @@ function Ve(e, t) {
900
900
  };
901
901
  }, [t]);
902
902
  }
903
- function Gn(e) {
903
+ function Jn(e) {
904
904
  const [, t] = G(0);
905
905
  Ve(() => t((n) => n + 1), e);
906
906
  }
907
- const Jn = () => Pt((e) => ({
907
+ const Qn = () => Lt((e) => ({
908
908
  delay: 0,
909
909
  startDate: null,
910
910
  viewerCount: null,
@@ -913,18 +913,18 @@ const Jn = () => Pt((e) => ({
913
913
  setViewerCount: (t) => e({ viewerCount: t })
914
914
  })), Ht = jt(
915
915
  null
916
- ), Qn = ({ children: e }) => {
917
- const t = V(
916
+ ), er = ({ children: e }) => {
917
+ const t = A(
918
918
  null
919
919
  );
920
- return t.current || (t.current = Jn()), /* @__PURE__ */ s.jsx(Ht.Provider, { value: t.current, children: e });
921
- }, A = (e) => {
922
- const t = Lt(Ht);
920
+ return t.current || (t.current = Qn()), /* @__PURE__ */ s.jsx(Ht.Provider, { value: t.current, children: e });
921
+ }, O = (e) => {
922
+ const t = Pt(Ht);
923
923
  if (!t)
924
924
  throw new Error("usePlayerStore must be used within PlayerStoreProvider");
925
- return It(t, e);
925
+ return kt(t, e);
926
926
  };
927
- function er(e, t, n) {
927
+ function tr(e, t, n) {
928
928
  const o = {
929
929
  days: 86400,
930
930
  hours: 3600,
@@ -934,15 +934,15 @@ function er(e, t, n) {
934
934
  };
935
935
  return e * (o[t] / o[n]);
936
936
  }
937
- function tr(e) {
938
- return er(e, "milliseconds", "seconds");
937
+ function nr(e) {
938
+ return tr(e, "milliseconds", "seconds");
939
939
  }
940
940
  const _e = (e) => {
941
941
  if (isNaN(e) || e === 1 / 0) return "0:00";
942
942
  const t = (l) => (l < 10 ? "0" : "") + l, n = Math.floor(e / 3600), o = Math.floor(e % 3600 / 60), a = Math.floor(e % 60);
943
943
  return n === 0 ? `${o}:${t(a)}` : `${n}:${t(o)}:${t(a)}`;
944
944
  };
945
- function nr(e, t) {
945
+ function rr(e, t) {
946
946
  var n, o, a, l, u, i;
947
947
  if (typeof Intl != "undefined" && Intl.DateTimeFormat)
948
948
  try {
@@ -990,23 +990,23 @@ function $t(e) {
990
990
  const t = typeof window != "undefined" && ((n = window.navigator) == null ? void 0 : n.userAgent) || "";
991
991
  return e.test(t);
992
992
  }
993
- const Ut = $t(/iPhone|iPad|iPod/i), rr = $t(/Tizen/i);
994
- function or() {
993
+ const Ut = $t(/iPhone|iPad|iPod/i), or = $t(/Tizen/i);
994
+ function ir() {
995
995
  const e = document;
996
996
  return !!(e.fullscreenElement || e.mozFullScreenElement || e.webkitFullscreenElement || e.msFullscreenElement);
997
997
  }
998
- function ir(e) {
998
+ function sr(e) {
999
999
  e.requestFullscreen ? e.requestFullscreen() : e.msRequestFullscreen ? e.msRequestFullscreen() : e.webkitRequestFullScreen ? e.webkitRequestFullScreen() : e.webkitEnterFullScreen ? e.webkitEnterFullScreen() : e.mozRequestFullScreen && e.mozRequestFullScreen();
1000
1000
  }
1001
- function sr(e) {
1001
+ function ar(e) {
1002
1002
  e.exitFullscreen ? e.exitFullscreen() : e.msExitFullscreen ? e.msExitFullscreen() : e.webkitExitFullscreen ? e.webkitExitFullscreen() : e.mozCancelFullScreen && e.mozCancelFullScreen();
1003
1003
  }
1004
- function ar(e, t) {
1004
+ function lr(e, t) {
1005
1005
  return e.addEventListener("fullscreenchange", t), e.addEventListener("webkitfullscreenchange", t), e.addEventListener("mozfullscreenchange", t), e.addEventListener("MSFullscreenChange", t), () => {
1006
1006
  e.removeEventListener("fullscreenchange", t), e.removeEventListener("webkitfullscreenchange", t), e.removeEventListener("mozfullscreenchange", t), e.removeEventListener("MSFullscreenChange", t);
1007
1007
  };
1008
1008
  }
1009
- const lr = () => On(), cr = (e, t) => ({
1009
+ const cr = () => Hn(), ur = (e, t) => ({
1010
1010
  currentTime: 0,
1011
1011
  duration: 0,
1012
1012
  isEnded: !1,
@@ -1118,7 +1118,7 @@ const lr = () => On(), cr = (e, t) => ({
1118
1118
  }));
1119
1119
  },
1120
1120
  getPauseTimeDiff: () => !t().isStarted || !t().pauseTime ? 0 : parseInt(
1121
- tr(Date.now() - t().pauseTime).toFixed(0)
1121
+ nr(Date.now() - t().pauseTime).toFixed(0)
1122
1122
  ),
1123
1123
  play: () => {
1124
1124
  const n = t().techRef.current;
@@ -1165,11 +1165,11 @@ const lr = () => On(), cr = (e, t) => ({
1165
1165
  isLoading: !1
1166
1166
  });
1167
1167
  }
1168
- }), ur = (e, t) => ({
1168
+ }), dr = (e, t) => ({
1169
1169
  isIdle: !1,
1170
1170
  setIsIdle: (n) => e({ isIdle: n }),
1171
1171
  resetIdle: () => t().eventEmitter.emit("resetIdle")
1172
- }), dr = (e) => ({
1172
+ }), fr = (e) => ({
1173
1173
  idleLocks: /* @__PURE__ */ new Set(),
1174
1174
  addIdleLock: (t) => e((n) => ({
1175
1175
  idleLocks: new Set(n.idleLocks).add(t)
@@ -1178,48 +1178,48 @@ const lr = () => On(), cr = (e, t) => ({
1178
1178
  const o = new Set(n.idleLocks);
1179
1179
  return o.delete(t), { idleLocks: o };
1180
1180
  })
1181
- }), fr = (e, t) => ({
1181
+ }), hr = (e, t) => ({
1182
1182
  level: null,
1183
1183
  levels: null,
1184
1184
  setLevels: (n) => e({ levels: n }),
1185
1185
  setLevel: (n) => {
1186
1186
  n && t().eventEmitter.emit("qualityChange", { level: n }), e({ level: n });
1187
1187
  }
1188
- }), hr = (e, t) => ({
1188
+ }), mr = (e, t) => ({
1189
1189
  isFullscreen: !1,
1190
1190
  isFullscreenReady: !1,
1191
1191
  exitFullscreen: () => {
1192
- t().eventEmitter.emit("fullscreenChange", { isFullscreen: !1 }), sr(document), e({ isFullscreen: !1 });
1192
+ t().eventEmitter.emit("fullscreenChange", { isFullscreen: !1 }), ar(document), e({ isFullscreen: !1 });
1193
1193
  },
1194
1194
  requestFullscreen: () => {
1195
1195
  const n = t().techRef.current, o = t().containerRef.current;
1196
1196
  if (!n || !o) return;
1197
1197
  t().eventEmitter.emit("fullscreenChange", { isFullscreen: !0 });
1198
1198
  const a = Ut ? n : o;
1199
- a && ir(a), e({ isFullscreen: !0 });
1199
+ a && sr(a), e({ isFullscreen: !0 });
1200
1200
  },
1201
1201
  setIsFullscreen: (n) => e({ isFullscreen: n }),
1202
1202
  setIsFullscreenReady: (n) => e({ isFullscreenReady: n })
1203
- }), mr = (e) => ({
1203
+ }), pr = (e) => ({
1204
1204
  error: null,
1205
1205
  setError: (t) => e({ error: t })
1206
- }), pr = () => ({
1207
- eventEmitter: lr()
1208
- }), vr = (e) => () => j({}, e), yr = (e, t) => Pt()((...n) => j(j(j(j(j(j(j(j({}, cr(...n)), ur(...n)), dr(...n)), hr(...n)), fr(...n)), mr(...n)), pr(...n)), vr({
1206
+ }), vr = () => ({
1207
+ eventEmitter: cr()
1208
+ }), yr = (e) => () => P({}, e), gr = (e, t) => Lt()((...n) => P(P(P(P(P(P(P(P({}, ur(...n)), dr(...n)), fr(...n)), mr(...n)), hr(...n)), pr(...n)), vr(...n)), yr({
1209
1209
  techRef: e,
1210
1210
  containerRef: t
1211
1211
  })(...n))), Bt = jt(null);
1212
- function gr({ children: e }) {
1213
- const t = V(null), n = V(null), o = V(null);
1214
- return t.current || (t.current = yr(n, o)), /* @__PURE__ */ s.jsx(Bt.Provider, { value: t.current, children: e });
1212
+ function wr({ children: e }) {
1213
+ const t = A(null), n = A(null), o = A(null);
1214
+ return t.current || (t.current = gr(n, o)), /* @__PURE__ */ s.jsx(Bt.Provider, { value: t.current, children: e });
1215
1215
  }
1216
1216
  const f = (e) => {
1217
- const t = Lt(Bt);
1217
+ const t = Pt(Bt);
1218
1218
  if (!t)
1219
1219
  throw new Error("usePlayerStore must be used within PlayerStoreProvider");
1220
- return It(t, e);
1220
+ return kt(t, e);
1221
1221
  };
1222
- function wr(e) {
1222
+ function xr(e) {
1223
1223
  const t = e.split(`
1224
1224
  `);
1225
1225
  for (const n of t) {
@@ -1227,12 +1227,12 @@ function wr(e) {
1227
1227
  if (o.startsWith("#EXT-X-PROGRAM-DATE-TIME:")) {
1228
1228
  const a = o.replace("#EXT-X-PROGRAM-DATE-TIME:", "").trim(), l = new Date(a);
1229
1229
  if (!isNaN(l.getTime()))
1230
- return nr(l, "Europe/Sarajevo");
1230
+ return rr(l, "Europe/Sarajevo");
1231
1231
  }
1232
1232
  }
1233
1233
  return null;
1234
1234
  }
1235
- function xr(e, t) {
1235
+ function _r(e, t) {
1236
1236
  const n = e.split(`
1237
1237
  `);
1238
1238
  let o = !1;
@@ -1259,19 +1259,19 @@ function xr(e, t) {
1259
1259
  }
1260
1260
  return null;
1261
1261
  }
1262
- function _r(e) {
1262
+ function Tr(e) {
1263
1263
  return e.replace("playlist.m3u8", "playlist_fmp4_dvr.m3u8");
1264
1264
  }
1265
- async function Tr(e) {
1265
+ async function Cr(e) {
1266
1266
  try {
1267
- const t = _r(e);
1267
+ const t = Tr(e);
1268
1268
  console.log("Converting to DVR URL:", t);
1269
1269
  const n = await fetch(t);
1270
1270
  if (!n.ok)
1271
1271
  throw new Error(
1272
1272
  `Failed to fetch master playlist: ${n.status} ${n.statusText}`
1273
1273
  );
1274
- const o = await n.text(), a = xr(
1274
+ const o = await n.text(), a = _r(
1275
1275
  o,
1276
1276
  t
1277
1277
  );
@@ -1283,32 +1283,32 @@ async function Tr(e) {
1283
1283
  throw new Error(
1284
1284
  `Failed to fetch chunklist: ${l.status} ${l.statusText}`
1285
1285
  );
1286
- const u = await l.text(), i = wr(u);
1286
+ const u = await l.text(), i = xr(u);
1287
1287
  return i ? console.log("Successfully detected start time:", i.toISOString()) : console.log(" No start time found in chunklist"), i;
1288
1288
  } catch (t) {
1289
1289
  return console.error("Error getting start time from HLS URL:", t), null;
1290
1290
  }
1291
1291
  }
1292
- function Cr(n) {
1292
+ function Er(n) {
1293
1293
  var o = n, { url: e } = o, t = ne(o, ["url"]);
1294
- const [a, l] = G(!0), u = A((d) => d.startDate), i = A((d) => d.setStartDate), c = W(async () => {
1295
- const d = await Tr(e);
1294
+ const [a, l] = G(!0), u = O((d) => d.startDate), i = O((d) => d.setStartDate), c = W(async () => {
1295
+ const d = await Cr(e);
1296
1296
  d && i(d);
1297
1297
  }, [e, i]);
1298
- return O(() => {
1298
+ return F(() => {
1299
1299
  (async () => {
1300
1300
  l(!0), await c(), l(!1);
1301
1301
  })();
1302
- }, [c]), Ve(c, u ? null : 5e3), a ? null : /* @__PURE__ */ s.jsx(Er, j({}, t));
1302
+ }, [c]), Ve(c, u ? null : 5e3), a ? null : /* @__PURE__ */ s.jsx(Rr, P({}, t));
1303
1303
  }
1304
- function Er({
1304
+ function Rr({
1305
1305
  children: e,
1306
1306
  messages: t = {}
1307
1307
  }) {
1308
1308
  var u, i, c;
1309
- const n = A((d) => d.startDate), o = f((d) => d.isStarted);
1310
- return Gn(o ? null : 5e3), n ? Date.now() < n.getTime() ? /* @__PURE__ */ s.jsx(
1311
- Rr,
1309
+ const n = O((d) => d.startDate), o = f((d) => d.isStarted);
1310
+ return Jn(o ? null : 5e3), n ? Date.now() < n.getTime() ? /* @__PURE__ */ s.jsx(
1311
+ br,
1312
1312
  {
1313
1313
  startDate: n,
1314
1314
  title: (i = t == null ? void 0 : t.eventNotStarted) != null ? i : "Event has not started yet.",
@@ -1316,7 +1316,7 @@ function Er({
1316
1316
  }
1317
1317
  ) : /* @__PURE__ */ s.jsx(s.Fragment, { children: e }) : /* @__PURE__ */ s.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: (u = t == null ? void 0 : t.eventNotStarted) != null ? u : "Event has not started yet." }) });
1318
1318
  }
1319
- function Rr({ startDate: e, title: t, message: n }) {
1319
+ function br({ startDate: e, title: t, message: n }) {
1320
1320
  const o = e.getTime() - Date.now(), a = Math.floor(o / (1e3 * 60 * 60)), l = Math.floor(
1321
1321
  o % (1e3 * 60 * 60) / (1e3 * 60)
1322
1322
  );
@@ -1331,7 +1331,7 @@ function Rr({ startDate: e, title: t, message: n }) {
1331
1331
  }
1332
1332
  function zt({ callback: e }) {
1333
1333
  const t = f((n) => n.eventEmitter);
1334
- return O(() => {
1334
+ return F(() => {
1335
1335
  const n = () => e("play", void 0), o = () => e("pause", void 0), a = () => e("ended", void 0), l = () => e("seeking", void 0), u = () => e("seeked", void 0), i = (_) => e("volumeChange", _), c = (_) => e("fullscreenChange", _), d = (_) => e("qualityChange", _), v = (_) => e("loadedMetadata", _), y = () => e("loadStart", void 0), g = () => e("playing", void 0), L = () => e("waiting", void 0), D = () => e("error", void 0);
1336
1336
  return t.on("play", n), t.on("pause", o), t.on("ended", a), t.on("seeking", l), t.on("seeked", u), t.on("volumeChange", i), t.on("fullscreenChange", c), t.on("qualityChange", d), t.on("loadedMetadata", v), t.on("loadStart", y), t.on("playing", g), t.on("waiting", L), t.on("error", D), () => {
1337
1337
  t.off("play", n), t.off("pause", o), t.off("ended", a), t.off("seeking", l), t.off("seeked", u), t.off("volumeChange", i), t.off("fullscreenChange", c), t.off("qualityChange", d), t.off("loadedMetadata", v), t.off("loadStart", y), t.off("playing", g), t.off("waiting", L), t.off("error", D);
@@ -1340,11 +1340,11 @@ function zt({ callback: e }) {
1340
1340
  }
1341
1341
  const Wt = (e, t = 0) => parseInt(
1342
1342
  Math.max(0, (Date.now() - (e + t * 1e3)) / 1e3).toFixed(0)
1343
- ), Zt = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3), br = (e, t) => Math.max(0, (t - e) / 1e3), Sr = (e, t = 0) => {
1343
+ ), Zt = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3), Sr = (e, t) => Math.max(0, (t - e) / 1e3), jr = (e, t = 0) => {
1344
1344
  const o = t < 0 ? 0 : t, a = ["bytes", "kb", "mb", "gb", "tb", "pb", "eb", "zb", "yb"], l = Math.floor(Math.log(e) / Math.log(1024));
1345
1345
  return `${parseFloat((e / Math.pow(1024, l)).toFixed(o))}${a[l]}`;
1346
1346
  };
1347
- function jr({
1347
+ function Pr({
1348
1348
  isAuto: e,
1349
1349
  level: t,
1350
1350
  levels: n
@@ -1362,15 +1362,15 @@ function jr({
1362
1362
  const { bitrate: u, height: i, index: c } = l;
1363
1363
  a.push({
1364
1364
  sid: `quality-level-${c}`,
1365
- label: i ? `${i}p` : Sr(u),
1365
+ label: i ? `${i}p` : jr(u),
1366
1366
  value: c,
1367
1367
  selected: o === 1 || !e && c === t
1368
1368
  });
1369
1369
  }), a;
1370
1370
  }
1371
1371
  function Lr({ callback: e }) {
1372
- const t = A((l) => l.delay), n = A((l) => l.startDate), o = n ? n.getTime() : 0, a = f((l) => l.eventEmitter);
1373
- return O(() => {
1372
+ const t = O((l) => l.delay), n = O((l) => l.startDate), o = n ? n.getTime() : 0, a = f((l) => l.eventEmitter);
1373
+ return F(() => {
1374
1374
  const l = () => e("timeUpdate", {
1375
1375
  currentTime: Zt(o, t),
1376
1376
  duration: -1
@@ -1411,12 +1411,12 @@ function qt() {
1411
1411
  l
1412
1412
  ]
1413
1413
  );
1414
- return O(() => (document.addEventListener("keydown", u), () => {
1414
+ return F(() => (document.addEventListener("keydown", u), () => {
1415
1415
  document.removeEventListener("keydown", u);
1416
1416
  }), [u]), null;
1417
1417
  }
1418
- function Pr() {
1419
- const e = A((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), o = f((i) => i.getPauseTimeDiff), a = f((i) => i.play), l = A((i) => i.setDelay), u = W(
1418
+ function kr() {
1419
+ const e = O((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), o = f((i) => i.getPauseTimeDiff), a = f((i) => i.play), l = O((i) => i.setDelay), u = W(
1420
1420
  (i) => {
1421
1421
  let c = !1;
1422
1422
  if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
@@ -1442,24 +1442,24 @@ function Pr() {
1442
1442
  },
1443
1443
  [e, o, t, n, a, l]
1444
1444
  );
1445
- return O(() => (document.addEventListener("keydown", u), () => {
1445
+ return F(() => (document.addEventListener("keydown", u), () => {
1446
1446
  document.removeEventListener("keydown", u);
1447
1447
  }), [u]), /* @__PURE__ */ s.jsx(qt, {});
1448
1448
  }
1449
1449
  function Kt({ children: e }) {
1450
- return /* @__PURE__ */ s.jsx(gr, { children: e });
1450
+ return /* @__PURE__ */ s.jsx(wr, { children: e });
1451
1451
  }
1452
1452
  function Ir({ children: e }) {
1453
- return /* @__PURE__ */ s.jsx(Qn, { children: /* @__PURE__ */ s.jsx(Kt, { children: e }) });
1453
+ return /* @__PURE__ */ s.jsx(er, { children: /* @__PURE__ */ s.jsx(Kt, { children: e }) });
1454
1454
  }
1455
- function kr({ url: e, isLive: t, messages: n }) {
1456
- const o = V(null), a = f((x) => x.level), l = f((x) => x.levels), u = f((x) => x.setLevel), i = f((x) => x.setLevels), c = f((x) => x.techRef), d = f((x) => x.setError), v = V(0), y = V(null), g = 50, L = 1e4, D = W(
1455
+ function Dr({ url: e, isLive: t, messages: n }) {
1456
+ const o = A(null), a = f((x) => x.level), l = f((x) => x.levels), u = f((x) => x.setLevel), i = f((x) => x.setLevels), c = f((x) => x.techRef), d = f((x) => x.setError), v = A(0), y = A(null), g = 50, L = 1e4, D = W(
1457
1457
  (x) => {
1458
1458
  if (o.current && (o.current.nextLevel = x, u(null), l)) {
1459
- const I = l.map((p) => he(j({}, p), {
1459
+ const j = l.map((p) => he(P({}, p), {
1460
1460
  selected: p.value === x
1461
1461
  }));
1462
- i(I);
1462
+ i(j);
1463
1463
  }
1464
1464
  },
1465
1465
  [l, u, i, o]
@@ -1468,39 +1468,39 @@ function kr({ url: e, isLive: t, messages: n }) {
1468
1468
  }, [e]), S = W(() => {
1469
1469
  if (!o.current) return;
1470
1470
  console.log("[Player][HLS] MANIFEST_LOADED"), d(null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
1471
- const x = o.current.levels, I = o.current.currentLevel, p = o.current.autoLevelEnabled;
1471
+ const x = o.current.levels, j = o.current.currentLevel, p = o.current.autoLevelEnabled;
1472
1472
  i(
1473
- jr({
1473
+ Pr({
1474
1474
  levels: x.map(($, Y) => {
1475
- const { bitrate: B, height: F, width: k } = $;
1475
+ const { bitrate: B, height: M, width: I } = $;
1476
1476
  return {
1477
1477
  bitrate: B,
1478
- height: F,
1478
+ height: M,
1479
1479
  index: Y,
1480
- width: k
1480
+ width: I
1481
1481
  };
1482
1482
  }),
1483
- level: I,
1483
+ level: j,
1484
1484
  isAuto: p
1485
1485
  })
1486
1486
  );
1487
- }, [d, i]), N = W(
1487
+ }, [d, i]), V = W(
1488
1488
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1489
- (x, I) => {
1489
+ (x, j) => {
1490
1490
  var p, $;
1491
- if (o.current && I.fatal)
1492
- switch (I.type) {
1491
+ if (o.current && j.fatal)
1492
+ switch (j.type) {
1493
1493
  case re.ErrorTypes.NETWORK_ERROR:
1494
1494
  let Y = (p = n == null ? void 0 : n.unableToPlay) != null ? p : "Unable to play the video. Please try again later.", B = "NETWORK_ERROR";
1495
- console.log("[Player][HLS] NETWORK_ERROR", I), t ? (
1495
+ console.log("[Player][HLS] NETWORK_ERROR", j), t ? (
1496
1496
  // Initial load failure
1497
- (I.details === "manifestLoadError" || // Level load failure during playback (e.g. OBS disconnect)
1498
- I.details === "levelLoadError") && (v.current < g && (y.current && clearTimeout(y.current), v.current += 1, y.current = setTimeout(() => {
1497
+ (j.details === "manifestLoadError" || j.details === "manifestParsingError" || // Level load failure during playback (e.g. OBS disconnect)
1498
+ j.details === "levelLoadError") && (v.current < g && (y.current && clearTimeout(y.current), v.current += 1, y.current = setTimeout(() => {
1499
1499
  if (o.current)
1500
1500
  try {
1501
1501
  console.log("[Player][HLS] Retrying stream..."), o.current.loadSource(e);
1502
- } catch (F) {
1503
- console.error("[Player][HLS] Retry failed:", F);
1502
+ } catch (M) {
1503
+ console.error("[Player][HLS] Retry failed:", M);
1504
1504
  }
1505
1505
  }, L)), Y = ($ = n == null ? void 0 : n.eventFinished) != null ? $ : "Live event will be back shortly.", B = "LIVE_MANIFEST_LOAD_ERROR")
1506
1506
  ) : o.current.startLoad(), d({ message: Y, code: B, tech: "hls" });
@@ -1518,28 +1518,28 @@ function kr({ url: e, isLive: t, messages: n }) {
1518
1518
  maxBufferSize: 30 * 1024 * 1024
1519
1519
  // 30MB
1520
1520
  };
1521
- rr ? (x.backBufferLength = -1, x.enableWorker = !1) : t ? x.backBufferLength = 10 : x.backBufferLength = 60;
1521
+ or ? (x.backBufferLength = -1, x.enableWorker = !1) : t ? x.backBufferLength = 10 : x.backBufferLength = 60;
1522
1522
  try {
1523
- console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(x)), console.log("[Player][HLS] Version", re.version), o.current = new re(x), o.current.attachMedia(c.current), o.current.on(re.Events.MEDIA_ATTACHED, _), o.current.on(re.Events.MANIFEST_LOADED, S), o.current.on(re.Events.ERROR, N);
1524
- } catch (I) {
1525
- throw new Error(`Error initializing Hls: ${I}`);
1523
+ console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(x)), console.log("[Player][HLS] Version", re.version), o.current = new re(x), o.current.attachMedia(c.current), o.current.on(re.Events.MEDIA_ATTACHED, _), o.current.on(re.Events.MANIFEST_LOADED, S), o.current.on(re.Events.ERROR, V);
1524
+ } catch (j) {
1525
+ throw new Error(`Error initializing Hls: ${j}`);
1526
1526
  }
1527
1527
  }, [
1528
1528
  S,
1529
1529
  _,
1530
- N,
1530
+ V,
1531
1531
  t,
1532
1532
  c,
1533
1533
  e
1534
- ]), P = W(() => {
1535
- o.current && (o.current.off(re.Events.MEDIA_ATTACHED, _), o.current.off(re.Events.MANIFEST_LOADED, S), o.current.off(re.Events.ERROR, N), o.current.destroy(), o.current = null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
1536
- }, [S, _, N]);
1537
- return O(() => {
1534
+ ]), k = W(() => {
1535
+ o.current && (o.current.off(re.Events.MEDIA_ATTACHED, _), o.current.off(re.Events.MANIFEST_LOADED, S), o.current.off(re.Events.ERROR, V), o.current.destroy(), o.current = null), y.current && (clearTimeout(y.current), y.current = null), v.current = 0;
1536
+ }, [S, _, V]);
1537
+ return F(() => {
1538
1538
  a !== null && D(a);
1539
- }, [a, D]), O(() => (re.isSupported() && R(), P), [P, R]), null;
1539
+ }, [a, D]), F(() => (re.isSupported() && R(), k), [k, R]), null;
1540
1540
  }
1541
- const Dr = "_playerVideo_wc0sm_1", Fr = {
1542
- playerVideo: Dr
1541
+ const Fr = "_playerVideo_wc0sm_1", Mr = {
1542
+ playerVideo: Fr
1543
1543
  };
1544
1544
  function Yt({
1545
1545
  url: e,
@@ -1547,7 +1547,7 @@ function Yt({
1547
1547
  isMuted: n = !1,
1548
1548
  messages: o = {}
1549
1549
  }) {
1550
- const a = f((p) => p.handleDurationChange), l = f((p) => p.handleEnd), u = f((p) => p.handleLoadedMetadata), i = f((p) => p.handleLoadStart), c = f((p) => p.handlePause), d = f((p) => p.handlePlay), v = f((p) => p.handlePlaying), y = f((p) => p.handleSeeked), g = f((p) => p.handleSeeking), L = f((p) => p.handleTimeUpdate), D = f((p) => p.handleWaiting), _ = f((p) => p.handleVolumeChange), S = f((p) => p.handleError), N = f((p) => p.techRef), R = V(null), P = () => t ? {
1550
+ const a = f((p) => p.handleDurationChange), l = f((p) => p.handleEnd), u = f((p) => p.handleLoadedMetadata), i = f((p) => p.handleLoadStart), c = f((p) => p.handlePause), d = f((p) => p.handlePlay), v = f((p) => p.handlePlaying), y = f((p) => p.handleSeeked), g = f((p) => p.handleSeeking), L = f((p) => p.handleTimeUpdate), D = f((p) => p.handleWaiting), _ = f((p) => p.handleVolumeChange), S = f((p) => p.handleError), V = f((p) => p.techRef), R = A(null), k = () => t ? {
1551
1551
  onTimeUpdate: x
1552
1552
  } : {
1553
1553
  onDurationChange: a,
@@ -1556,14 +1556,14 @@ function Yt({
1556
1556
  onTimeUpdate: x
1557
1557
  }, x = () => {
1558
1558
  (!R.current || Date.now() - R.current >= 1e3) && (L(), R.current = Date.now());
1559
- }, I = P();
1559
+ }, j = k();
1560
1560
  return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1561
- /* @__PURE__ */ s.jsx(kr, { isLive: t, url: e, messages: o }),
1561
+ /* @__PURE__ */ s.jsx(Dr, { isLive: t, url: e, messages: o }),
1562
1562
  /* @__PURE__ */ s.jsx(
1563
1563
  "video",
1564
- j({
1565
- ref: N,
1566
- className: Fr.playerVideo,
1564
+ P({
1565
+ ref: V,
1566
+ className: Mr.playerVideo,
1567
1567
  playsInline: !0,
1568
1568
  autoPlay: !0,
1569
1569
  controls: !1,
@@ -1580,25 +1580,25 @@ function Yt({
1580
1580
  onWaiting: D,
1581
1581
  onVolumeChange: _,
1582
1582
  tabIndex: -1
1583
- }, I)
1583
+ }, j)
1584
1584
  )
1585
1585
  ] });
1586
1586
  }
1587
- function Mr({ url: e, messages: t = {} }) {
1588
- const [n, o] = G(null), a = A((u) => u.delay), l = W(async () => {
1587
+ function Nr({ url: e, messages: t = {} }) {
1588
+ const [n, o] = G(null), a = O((u) => u.delay), l = W(async () => {
1589
1589
  o(
1590
1590
  a ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${a}.m3u8`) : e
1591
1591
  );
1592
1592
  }, [a, e]);
1593
- return O(() => {
1593
+ return F(() => {
1594
1594
  l();
1595
1595
  }, [l]), n ? /* @__PURE__ */ s.jsx(Yt, { url: n, isLive: !0, messages: t }) : null;
1596
1596
  }
1597
- function Nr({ url: e }) {
1598
- return f((n) => n.isStarted) ? /* @__PURE__ */ s.jsx(Vr, { url: e }) : null;
1599
- }
1600
1597
  function Vr({ url: e }) {
1601
- const t = A((l) => l.setViewerCount), n = V(null), o = (l) => {
1598
+ return f((n) => n.isStarted) ? /* @__PURE__ */ s.jsx(Ar, { url: e }) : null;
1599
+ }
1600
+ function Ar({ url: e }) {
1601
+ const t = O((l) => l.setViewerCount), n = A(null), o = (l) => {
1602
1602
  try {
1603
1603
  return new URL(l).pathname.split("/").filter((d) => d.length > 0)[0] || null;
1604
1604
  } catch (u) {
@@ -1627,11 +1627,11 @@ function Vr({ url: e }) {
1627
1627
  console.error("Failed to fetch viewer count:", d), t(null);
1628
1628
  }
1629
1629
  };
1630
- return O(() => (a(), () => {
1630
+ return F(() => (a(), () => {
1631
1631
  n.current && n.current.abort();
1632
1632
  }), [e]), Ve(a, 15e3), null;
1633
1633
  }
1634
- function Ar(e, {
1634
+ function Or(e, {
1635
1635
  defaultValue: t = !1,
1636
1636
  initializeWithValue: n = !0
1637
1637
  } = {}) {
@@ -1648,13 +1648,13 @@ function Ar(e, {
1648
1648
  };
1649
1649
  }, [e]), a;
1650
1650
  }
1651
- const Or = "_playbackButton_lgsgw_1", Hr = "_seekIndicator_lgsgw_23", $r = "_seekIndicatorLeft_lgsgw_49", Ur = "_seekIndicatorRight_lgsgw_53", Br = "_seekIndicatorVisible_lgsgw_57", me = {
1652
- playbackButton: Or,
1653
- seekIndicator: Hr,
1654
- seekIndicatorLeft: $r,
1655
- seekIndicatorRight: Ur,
1656
- seekIndicatorVisible: Br
1657
- }, zr = 10;
1651
+ const Hr = "_playbackButton_lgsgw_1", $r = "_seekIndicator_lgsgw_23", Ur = "_seekIndicatorLeft_lgsgw_49", Br = "_seekIndicatorRight_lgsgw_53", zr = "_seekIndicatorVisible_lgsgw_57", me = {
1652
+ playbackButton: Hr,
1653
+ seekIndicator: $r,
1654
+ seekIndicatorLeft: Ur,
1655
+ seekIndicatorRight: Br,
1656
+ seekIndicatorVisible: zr
1657
+ }, Wr = 10;
1658
1658
  function Xt(i) {
1659
1659
  var c = i, {
1660
1660
  className: e,
@@ -1671,9 +1671,9 @@ function Xt(i) {
1671
1671
  "maxForwardTime",
1672
1672
  "maxBackwardTime"
1673
1673
  ]);
1674
- return Ar("(min-width: 1024px)") ? /* @__PURE__ */ s.jsx(Wr, j({ className: e, onClick: t }, u)) : /* @__PURE__ */ s.jsx(
1675
- Zr,
1676
- j({
1674
+ return Or("(min-width: 1024px)") ? /* @__PURE__ */ s.jsx(Zr, P({ className: e, onClick: t }, u)) : /* @__PURE__ */ s.jsx(
1675
+ qr,
1676
+ P({
1677
1677
  className: e,
1678
1678
  maxForwardTime: a,
1679
1679
  maxBackwardTime: l,
@@ -1682,9 +1682,9 @@ function Xt(i) {
1682
1682
  }, u)
1683
1683
  );
1684
1684
  }
1685
- function Wr(o) {
1685
+ function Zr(o) {
1686
1686
  var a = o, { className: e, onClick: t } = a, n = ne(a, ["className", "onClick"]);
1687
- const l = V(null), u = f((_) => _.exitFullscreen), i = f((_) => _.isFullscreen), c = f((_) => _.requestFullscreen), d = f((_) => _.resetIdle), v = (_) => {
1687
+ const l = A(null), u = f((_) => _.exitFullscreen), i = f((_) => _.isFullscreen), c = f((_) => _.requestFullscreen), d = f((_) => _.resetIdle), v = (_) => {
1688
1688
  L() ? (g(), i ? u() : c()) : y(_);
1689
1689
  }, y = (_) => {
1690
1690
  l.current = window.setTimeout(() => {
@@ -1695,11 +1695,11 @@ function Wr(o) {
1695
1695
  }, L = () => l.current !== null, D = () => {
1696
1696
  d();
1697
1697
  };
1698
- return O(() => () => {
1698
+ return F(() => () => {
1699
1699
  g();
1700
1700
  }, []), /* @__PURE__ */ s.jsx(
1701
1701
  "button",
1702
- j({
1702
+ P({
1703
1703
  onClick: v,
1704
1704
  onMouseMove: D,
1705
1705
  className: [me.playbackButton, e].filter(Boolean).join(" "),
@@ -1707,7 +1707,7 @@ function Wr(o) {
1707
1707
  }, n)
1708
1708
  );
1709
1709
  }
1710
- function Zr(u) {
1710
+ function qr(u) {
1711
1711
  var i = u, {
1712
1712
  className: e,
1713
1713
  maxForwardTime: t,
@@ -1721,55 +1721,55 @@ function Zr(u) {
1721
1721
  "onForwardSeek",
1722
1722
  "onBackwardSeek"
1723
1723
  ]);
1724
- const c = V(null), d = V({
1724
+ const c = A(null), d = A({
1725
1725
  single: null,
1726
1726
  indicator: null,
1727
1727
  accumulate: null
1728
- }), v = V(null), y = V(0), g = V(null), [L, D] = G({ visible: !1, direction: null, time: 0 }), _ = f((p) => p.isIdle), S = f((p) => p.setIsIdle), N = f((p) => p.resetIdle), R = (p, $) => p < $ / 2 ? "backward" : "forward", P = (p) => {
1728
+ }), v = A(null), y = A(0), g = A(null), [L, D] = G({ visible: !1, direction: null, time: 0 }), _ = f((p) => p.isIdle), S = f((p) => p.setIsIdle), V = f((p) => p.resetIdle), R = (p, $) => p < $ / 2 ? "backward" : "forward", k = (p) => {
1729
1729
  if (!v.current) return;
1730
1730
  const $ = p.changedTouches[0];
1731
1731
  if (!$) return;
1732
- const Y = Date.now(), B = v.current.getBoundingClientRect(), F = $.clientX - B.left, k = $.clientY - B.top;
1733
- if (F < 0 || F > B.width || k < 0 || k > B.height)
1732
+ const Y = Date.now(), B = v.current.getBoundingClientRect(), M = $.clientX - B.left, I = $.clientY - B.top;
1733
+ if (M < 0 || M > B.width || I < 0 || I > B.height)
1734
1734
  return;
1735
- const Q = c.current, K = Q ? Y - Q.time : 1 / 0, Z = R(F, B.width), oe = g.current !== null && g.current === Z && Q !== null && K < 700 && Math.abs(F - Q.x) < 100;
1736
- if (Q !== null && g.current === null && K < 300 && Math.abs(F - Q.x) < 50 || oe) {
1737
- p.preventDefault(), p.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null), N(), (g.current === null || g.current !== Z) && (y.current = 0, g.current = Z);
1735
+ const Q = c.current, K = Q ? Y - Q.time : 1 / 0, Z = R(M, B.width), oe = g.current !== null && g.current === Z && Q !== null && K < 700 && Math.abs(M - Q.x) < 100;
1736
+ if (Q !== null && g.current === null && K < 300 && Math.abs(M - Q.x) < 50 || oe) {
1737
+ p.preventDefault(), p.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null), V(), (g.current === null || g.current !== Z) && (y.current = 0, g.current = Z);
1738
1738
  const te = Z === "backward" ? n : t;
1739
1739
  y.current = Math.min(
1740
- y.current + zr,
1740
+ y.current + Wr,
1741
1741
  te != null ? te : 1 / 0
1742
1742
  ), x(Z, y.current), d.current.accumulate && window.clearTimeout(d.current.accumulate), d.current.accumulate = window.setTimeout(() => {
1743
1743
  const q = y.current;
1744
- q > 0 && (g.current === "backward" ? a == null || a(q) : o == null || o(q), N()), y.current = 0, g.current = null, c.current = null, I(), d.current.accumulate = null;
1745
- }, 500), c.current = { time: Y, x: F };
1744
+ q > 0 && (g.current === "backward" ? a == null || a(q) : o == null || o(q), V()), y.current = 0, g.current = null, c.current = null, j(), d.current.accumulate = null;
1745
+ }, 500), c.current = { time: Y, x: M };
1746
1746
  } else {
1747
- c.current = { time: Y, x: F }, d.current.single && window.clearTimeout(d.current.single);
1747
+ c.current = { time: Y, x: M }, d.current.single && window.clearTimeout(d.current.single);
1748
1748
  const te = g.current !== null ? 700 : 350;
1749
1749
  d.current.single = window.setTimeout(() => {
1750
1750
  if (g.current === null) {
1751
1751
  d.current.single = null;
1752
1752
  const q = _;
1753
- S(!q), q && N();
1753
+ S(!q), q && V();
1754
1754
  }
1755
1755
  c.current = null;
1756
1756
  }, te);
1757
1757
  }
1758
1758
  }, x = (p, $) => {
1759
1759
  $ !== 0 && (D({ visible: !0, direction: p, time: $ }), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.indicator = window.setTimeout(() => {
1760
- I();
1760
+ j();
1761
1761
  }, 700));
1762
- }, I = () => {
1762
+ }, j = () => {
1763
1763
  D({ visible: !1, direction: null, time: 0 }), d.current.indicator && (window.clearTimeout(d.current.indicator), d.current.indicator = null);
1764
1764
  };
1765
- return O(() => () => {
1765
+ return F(() => () => {
1766
1766
  d.current.single && window.clearTimeout(d.current.single), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.accumulate && window.clearTimeout(d.current.accumulate);
1767
1767
  }, []), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1768
1768
  /* @__PURE__ */ s.jsx(
1769
1769
  "button",
1770
- j({
1770
+ P({
1771
1771
  ref: v,
1772
- onTouchEnd: P,
1772
+ onTouchEnd: k,
1773
1773
  className: [me.playbackButton, e].filter(Boolean).join(" "),
1774
1774
  "aria-label": "Player gestures"
1775
1775
  }, l)
@@ -1786,8 +1786,8 @@ function Zr(u) {
1786
1786
  )
1787
1787
  ] });
1788
1788
  }
1789
- function qr() {
1790
- const e = f((c) => c.isPlaying), t = f((c) => c.pause), n = f((c) => c.getPauseTimeDiff), o = f((c) => c.play), a = A((c) => c.delay), l = A((c) => c.setDelay), u = A((c) => c.startDate), i = u ? u.getTime() : 0;
1789
+ function Kr() {
1790
+ const e = f((c) => c.isPlaying), t = f((c) => c.pause), n = f((c) => c.getPauseTimeDiff), o = f((c) => c.play), a = O((c) => c.delay), l = O((c) => c.setDelay), u = O((c) => c.startDate), i = u ? u.getTime() : 0;
1791
1791
  return /* @__PURE__ */ s.jsx(
1792
1792
  Xt,
1793
1793
  {
@@ -1812,28 +1812,28 @@ function qr() {
1812
1812
  }
1813
1813
  );
1814
1814
  }
1815
- const Kr = "_playerButton_izwqq_1", Yr = "_playerButtonCircle_izwqq_42", _t = {
1816
- playerButton: Kr,
1817
- playerButtonCircle: Yr
1815
+ const Yr = "_playerButton_izwqq_1", Xr = "_playerButtonCircle_izwqq_42", _t = {
1816
+ playerButton: Yr,
1817
+ playerButtonCircle: Xr
1818
1818
  }, le = Ne(
1819
1819
  (a, o) => {
1820
1820
  var l = a, { shape: e = "circle", className: t } = l, n = ne(l, ["shape", "className"]);
1821
1821
  const u = e === "circle" ? _t.playerButtonCircle : "", i = [_t.playerButton, u, t].filter(Boolean).join(" ");
1822
- return /* @__PURE__ */ s.jsx("button", j({ ref: o, className: i }, n));
1822
+ return /* @__PURE__ */ s.jsx("button", P({ ref: o, className: i }, n));
1823
1823
  }
1824
1824
  );
1825
1825
  le.displayName = "PlayerButton";
1826
- const Xr = "_liveIndicator_1jczn_1", Gr = "_liveIndicatorHasDelay_1jczn_9", Jr = "_liveIndicatorNoDelay_1jczn_13", Ie = {
1827
- liveIndicator: Xr,
1828
- liveIndicatorHasDelay: Gr,
1829
- liveIndicatorNoDelay: Jr
1826
+ const Gr = "_liveIndicator_1jczn_1", Jr = "_liveIndicatorHasDelay_1jczn_9", Qr = "_liveIndicatorNoDelay_1jczn_13", ke = {
1827
+ liveIndicator: Gr,
1828
+ liveIndicatorHasDelay: Jr,
1829
+ liveIndicatorNoDelay: Qr
1830
1830
  };
1831
- function Qr(n) {
1831
+ function eo(n) {
1832
1832
  var o = n, { message: e } = o, t = ne(o, ["message"]);
1833
- const a = A((c) => c.delay), l = A((c) => c.setDelay), u = () => {
1833
+ const a = O((c) => c.delay), l = O((c) => c.setDelay), u = () => {
1834
1834
  a && l(0);
1835
- }, i = a ? `${Ie.liveIndicator} ${Ie.liveIndicatorHasDelay}` : `${Ie.liveIndicator} ${Ie.liveIndicatorNoDelay}`;
1836
- return /* @__PURE__ */ s.jsxs(le, he(j({ onClick: u, shape: "square" }, t), { children: [
1835
+ }, i = a ? `${ke.liveIndicator} ${ke.liveIndicatorHasDelay}` : `${ke.liveIndicator} ${ke.liveIndicatorNoDelay}`;
1836
+ return /* @__PURE__ */ s.jsxs(le, he(P({ onClick: u, shape: "square" }, t), { children: [
1837
1837
  /* @__PURE__ */ s.jsx("div", { className: i }),
1838
1838
  e || "Live"
1839
1839
  ] }));
@@ -1860,8 +1860,8 @@ function Jt() {
1860
1860
  }
1861
1861
  );
1862
1862
  }
1863
- function eo() {
1864
- const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), o = f((i) => i.play), a = A((i) => i.delay), l = A((i) => i.setDelay), u = () => {
1863
+ function to() {
1864
+ const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), o = f((i) => i.play), a = O((i) => i.delay), l = O((i) => i.setDelay), u = () => {
1865
1865
  if (e)
1866
1866
  t();
1867
1867
  else {
@@ -1871,27 +1871,27 @@ function eo() {
1871
1871
  };
1872
1872
  return /* @__PURE__ */ s.jsx(le, { onClick: u, children: e ? /* @__PURE__ */ s.jsx(Gt, {}) : /* @__PURE__ */ s.jsx(Jt, {}) });
1873
1873
  }
1874
- const to = "_progressSlider_hwzgf_1", no = "_tipContainer_hwzgf_7", ro = "_tipContainerVisible_hwzgf_17", oo = "_tipContainerHidden_hwzgf_22", io = "_tipContent_hwzgf_27", se = {
1875
- progressSlider: to,
1876
- tipContainer: no,
1877
- tipContainerVisible: ro,
1878
- tipContainerHidden: oo,
1879
- tipContent: io
1880
- }, so = "_sliderRoot_aeak6_1", ao = "_sliderTrack_aeak6_18", lo = "_sliderRange_aeak6_28", co = "_sliderThumb_aeak6_37", ke = {
1881
- sliderRoot: so,
1882
- sliderTrack: ao,
1883
- sliderRange: lo,
1884
- sliderThumb: co
1874
+ const no = "_progressSlider_hwzgf_1", ro = "_tipContainer_hwzgf_7", oo = "_tipContainerVisible_hwzgf_17", io = "_tipContainerHidden_hwzgf_22", so = "_tipContent_hwzgf_27", se = {
1875
+ progressSlider: no,
1876
+ tipContainer: ro,
1877
+ tipContainerVisible: oo,
1878
+ tipContainerHidden: io,
1879
+ tipContent: so
1880
+ }, ao = "_sliderRoot_aeak6_1", lo = "_sliderTrack_aeak6_18", co = "_sliderRange_aeak6_28", uo = "_sliderThumb_aeak6_37", Ie = {
1881
+ sliderRoot: ao,
1882
+ sliderTrack: lo,
1883
+ sliderRange: co,
1884
+ sliderThumb: uo
1885
1885
  }, Ae = Ne((l, a) => {
1886
1886
  var u = l, { max: e = 100, min: t = 0, className: n } = u, o = ne(u, ["max", "min", "className"]);
1887
1887
  return /* @__PURE__ */ s.jsxs(
1888
1888
  je.Root,
1889
- he(j({
1889
+ he(P({
1890
1890
  ref: a,
1891
1891
  min: t,
1892
1892
  max: e,
1893
1893
  "aria-label": "Player progress",
1894
- className: [ke.sliderRoot, n].filter(Boolean).join(" "),
1894
+ className: [Ie.sliderRoot, n].filter(Boolean).join(" "),
1895
1895
  onKeyDown: (i) => (
1896
1896
  // Prevent the slider from being controlled by the keyboard
1897
1897
  // when the slider is focused by a click
@@ -1899,8 +1899,8 @@ const to = "_progressSlider_hwzgf_1", no = "_tipContainer_hwzgf_7", ro = "_tipCo
1899
1899
  )
1900
1900
  }, o), {
1901
1901
  children: [
1902
- /* @__PURE__ */ s.jsx(je.Track, { className: ke.sliderTrack, children: /* @__PURE__ */ s.jsx(je.Range, { className: ke.sliderRange }) }),
1903
- /* @__PURE__ */ s.jsx(je.Thumb, { className: ke.sliderThumb })
1902
+ /* @__PURE__ */ s.jsx(je.Track, { className: Ie.sliderTrack, children: /* @__PURE__ */ s.jsx(je.Range, { className: Ie.sliderRange }) }),
1903
+ /* @__PURE__ */ s.jsx(je.Thumb, { className: Ie.sliderThumb })
1904
1904
  ]
1905
1905
  })
1906
1906
  );
@@ -1918,23 +1918,23 @@ function Me(e) {
1918
1918
  } : t;
1919
1919
  }
1920
1920
  const Tt = "vod-player-progress-bar";
1921
- function uo() {
1922
- const e = V(null), t = V(null), [n, o] = G(0), [a, l] = G(0), [u, i] = G(!1), [c, d] = G(-1), [v, y] = G(-1), g = A((k) => k.delay), L = A((k) => k.startDate), D = L ? L.getTime() : 0, _ = (/* @__PURE__ */ new Date()).getTime(), S = A((k) => k.setDelay), N = f((k) => k.isPlaying), R = f((k) => k.addIdleLock), P = f((k) => k.removeIdleLock), x = W(() => {
1923
- o(Zt(D, g)), l(br(D, _));
1924
- }, [g, _, D]), I = parseFloat(
1921
+ function fo() {
1922
+ const e = A(null), t = A(null), [n, o] = G(0), [a, l] = G(0), [u, i] = G(!1), [c, d] = G(-1), [v, y] = G(-1), g = O((I) => I.delay), L = O((I) => I.startDate), D = L ? L.getTime() : 0, _ = (/* @__PURE__ */ new Date()).getTime(), S = O((I) => I.setDelay), V = f((I) => I.isPlaying), R = f((I) => I.addIdleLock), k = f((I) => I.removeIdleLock), x = W(() => {
1923
+ o(Zt(D, g)), l(Sr(D, _));
1924
+ }, [g, _, D]), j = parseFloat(
1925
1925
  (a ? (v !== -1 ? v : n) / a * 100 : 0).toFixed(1)
1926
- ), p = (k) => {
1927
- y(a * (k[0] / 100)), R(Tt);
1926
+ ), p = (I) => {
1927
+ y(a * (I[0] / 100)), R(Tt);
1928
1928
  }, $ = () => {
1929
1929
  if (v !== -1) {
1930
- const k = Wt(D, v);
1931
- S(k), y(-1), P(Tt);
1930
+ const I = Wt(D, v);
1931
+ S(I), y(-1), k(Tt);
1932
1932
  }
1933
- }, Y = () => i(!0), B = () => i(!1), F = W(
1934
- (k) => {
1933
+ }, Y = () => i(!0), B = () => i(!1), M = W(
1934
+ (I) => {
1935
1935
  const Q = e.current, K = t.current;
1936
1936
  if (Q && K) {
1937
- const Z = Me(Q), oe = Me(K), ue = (k.pageX || k.clientX) - Z.left, te = ue / Z.width;
1937
+ const Z = Me(Q), oe = Me(K), ue = (I.pageX || I.clientX) - Z.left, te = ue / Z.width;
1938
1938
  if (te < 0) return;
1939
1939
  let q = ue - oe.width / 2;
1940
1940
  q < 0 && (q = 0), q > Z.width - oe.width && (q = -1), K.style.left = q > -1 ? `${q}px` : "auto", K.style.right = q > -1 ? "auto" : "0px";
@@ -1945,17 +1945,17 @@ function uo() {
1945
1945
  },
1946
1946
  [a]
1947
1947
  );
1948
- return Ve(() => x(), N ? 1e3 : null), O(() => {
1948
+ return Ve(() => x(), V ? 1e3 : null), F(() => {
1949
1949
  x();
1950
1950
  }, [x]), /* @__PURE__ */ s.jsxs("div", { className: se.progressSlider, children: [
1951
1951
  /* @__PURE__ */ s.jsx(
1952
1952
  Ae,
1953
1953
  {
1954
1954
  ref: e,
1955
- value: [I],
1955
+ value: [j],
1956
1956
  onPointerLeave: B,
1957
1957
  onPointerDown: B,
1958
- onPointerMove: F,
1958
+ onPointerMove: M,
1959
1959
  onValueChange: p,
1960
1960
  onValueCommit: $,
1961
1961
  step: 0.1
@@ -1971,7 +1971,7 @@ function uo() {
1971
1971
  )
1972
1972
  ] });
1973
1973
  }
1974
- function fo() {
1974
+ function ho() {
1975
1975
  return /* @__PURE__ */ s.jsx(
1976
1976
  "svg",
1977
1977
  {
@@ -1982,18 +1982,18 @@ function fo() {
1982
1982
  }
1983
1983
  );
1984
1984
  }
1985
- function ho() {
1986
- const e = A((a) => a.startDate), t = A((a) => a.setDelay), n = e ? e.getTime() : 0, o = () => t(Wt(n));
1987
- return /* @__PURE__ */ s.jsx(le, { onClick: o, children: /* @__PURE__ */ s.jsx(fo, {}) });
1988
- }
1989
- const mo = "_viewersContainer_z1ihz_1", po = "_viewersIndicator_z1ihz_16", vo = "_viewersIcon_z1ihz_24", yo = "_viewersCount_z1ihz_28", De = {
1990
- viewersContainer: mo,
1991
- viewersIndicator: po,
1992
- viewersIcon: vo,
1993
- viewersCount: yo
1985
+ function mo() {
1986
+ const e = O((a) => a.startDate), t = O((a) => a.setDelay), n = e ? e.getTime() : 0, o = () => t(Wt(n));
1987
+ return /* @__PURE__ */ s.jsx(le, { onClick: o, children: /* @__PURE__ */ s.jsx(ho, {}) });
1988
+ }
1989
+ const po = "_viewersContainer_z1ihz_1", vo = "_viewersIndicator_z1ihz_16", yo = "_viewersIcon_z1ihz_24", go = "_viewersCount_z1ihz_28", De = {
1990
+ viewersContainer: po,
1991
+ viewersIndicator: vo,
1992
+ viewersIcon: yo,
1993
+ viewersCount: go
1994
1994
  };
1995
- function go() {
1996
- const e = A((t) => t.viewerCount);
1995
+ function wo() {
1996
+ const e = O((t) => t.viewerCount);
1997
1997
  return e ? /* @__PURE__ */ s.jsxs("div", { className: De.viewersContainer, children: [
1998
1998
  /* @__PURE__ */ s.jsx("span", { className: De.viewersIndicator }),
1999
1999
  /* @__PURE__ */ s.jsxs(
@@ -2038,17 +2038,17 @@ function Qt() {
2038
2038
  }
2039
2039
  );
2040
2040
  }
2041
- const wo = "_playerContainer_146tx_1", xo = "_controlsTop_146tx_12", _o = "_controlsBottom_146tx_29", To = "_controlsContainer_146tx_45", Co = "_controlsRow_146tx_61", Eo = "_controlsSection_146tx_68", Ro = "_controlsSectionStart_146tx_78", bo = "_controlsSectionEnd_146tx_82", z = {
2042
- playerContainer: wo,
2043
- controlsTop: xo,
2044
- controlsBottom: _o,
2045
- controlsContainer: To,
2046
- controlsRow: Co,
2047
- controlsSection: Eo,
2048
- controlsSectionStart: Ro,
2049
- controlsSectionEnd: bo
2041
+ const xo = "_playerContainer_146tx_1", _o = "_controlsTop_146tx_12", To = "_controlsBottom_146tx_29", Co = "_controlsContainer_146tx_45", Eo = "_controlsRow_146tx_61", Ro = "_controlsSection_146tx_68", bo = "_controlsSectionStart_146tx_78", So = "_controlsSectionEnd_146tx_82", z = {
2042
+ playerContainer: xo,
2043
+ controlsTop: _o,
2044
+ controlsBottom: To,
2045
+ controlsContainer: Co,
2046
+ controlsRow: Eo,
2047
+ controlsSection: Ro,
2048
+ controlsSectionStart: bo,
2049
+ controlsSectionEnd: So
2050
2050
  };
2051
- function So() {
2051
+ function jo() {
2052
2052
  return /* @__PURE__ */ s.jsx(
2053
2053
  "svg",
2054
2054
  {
@@ -2059,7 +2059,7 @@ function So() {
2059
2059
  }
2060
2060
  );
2061
2061
  }
2062
- function jo() {
2062
+ function Po() {
2063
2063
  return /* @__PURE__ */ s.jsx(
2064
2064
  "svg",
2065
2065
  {
@@ -2073,34 +2073,34 @@ function jo() {
2073
2073
  function en() {
2074
2074
  const e = f((d) => d.containerRef), t = f((d) => d.exitFullscreen), n = f((d) => d.isFullscreen), o = f((d) => d.requestFullscreen), a = f((d) => d.setIsFullscreen), l = f((d) => d.setIsFullscreenReady), u = f((d) => d.techRef), i = W(
2075
2075
  (d) => {
2076
- d.stopPropagation(), a(or());
2076
+ d.stopPropagation(), a(ir());
2077
2077
  },
2078
2078
  [a]
2079
2079
  ), c = () => {
2080
2080
  n ? t() : o();
2081
2081
  };
2082
- return O(() => {
2082
+ return F(() => {
2083
2083
  const d = Ut ? u.current : e.current;
2084
2084
  if (d)
2085
- return ar(d, i);
2086
- }, [e, i, u]), O(() => {
2085
+ return lr(d, i);
2086
+ }, [e, i, u]), F(() => {
2087
2087
  l(!0);
2088
- }, [l]), /* @__PURE__ */ s.jsx(le, { onClick: c, children: n ? /* @__PURE__ */ s.jsx(jo, {}) : /* @__PURE__ */ s.jsx(So, {}) });
2088
+ }, [l]), /* @__PURE__ */ s.jsx(le, { onClick: c, children: n ? /* @__PURE__ */ s.jsx(Po, {}) : /* @__PURE__ */ s.jsx(jo, {}) });
2089
2089
  }
2090
- const Lo = "_idleCheckContainer_crh2s_1", Po = "_idleCheckContainerIdle_crh2s_5", Io = "_idleCheckContainerActive_crh2s_11", qe = {
2090
+ const Lo = "_idleCheckContainer_crh2s_1", ko = "_idleCheckContainerIdle_crh2s_5", Io = "_idleCheckContainerActive_crh2s_11", qe = {
2091
2091
  idleCheckContainer: Lo,
2092
- idleCheckContainerIdle: Po,
2092
+ idleCheckContainerIdle: ko,
2093
2093
  idleCheckContainerActive: Io
2094
- }, ko = 5 * 1e3;
2094
+ }, Do = 5 * 1e3;
2095
2095
  function tn({ children: e }) {
2096
- const t = V(null), n = f((g) => g.isIdle), o = f((g) => g.setIsIdle), a = V(null), u = f((g) => g.idleLocks).size, i = f((g) => g.eventEmitter), c = W(() => {
2096
+ const t = A(null), n = f((g) => g.isIdle), o = f((g) => g.setIsIdle), a = A(null), u = f((g) => g.idleLocks).size, i = f((g) => g.eventEmitter), c = W(() => {
2097
2097
  a.current !== null && (window.clearTimeout(a.current), a.current = null);
2098
2098
  }, []), d = W(() => {
2099
- c(), a.current = window.setTimeout(() => o(!0), ko);
2099
+ c(), a.current = window.setTimeout(() => o(!0), Do);
2100
2100
  }, [c]);
2101
- O(() => (o(!1), d(), () => {
2101
+ F(() => (o(!1), d(), () => {
2102
2102
  c();
2103
- }), [c, d]), O(() => {
2103
+ }), [c, d]), F(() => {
2104
2104
  const g = () => {
2105
2105
  o(!1), d();
2106
2106
  };
@@ -2111,30 +2111,30 @@ function tn({ children: e }) {
2111
2111
  const v = n && !u, y = `${qe.idleCheckContainer} ${v ? qe.idleCheckContainerIdle : qe.idleCheckContainerActive}`;
2112
2112
  return /* @__PURE__ */ s.jsx("div", { ref: t, className: y, children: e });
2113
2113
  }
2114
- const Do = "_spinner_oo4hi_10", Fo = {
2115
- spinner: Do
2114
+ const Fo = "_spinner_oo4hi_10", Mo = {
2115
+ spinner: Fo
2116
2116
  };
2117
- function Mo(e) {
2118
- return /* @__PURE__ */ s.jsx("div", j({ className: Fo.spinner }, e));
2117
+ function No(e) {
2118
+ return /* @__PURE__ */ s.jsx("div", P({ className: Mo.spinner }, e));
2119
2119
  }
2120
- function No(e, t = 500) {
2120
+ function Vo(e, t = 500) {
2121
2121
  const [n, o] = G(e);
2122
- return O(() => {
2122
+ return F(() => {
2123
2123
  const a = window.setTimeout(() => o(e), t);
2124
2124
  return () => {
2125
2125
  window.clearTimeout(a);
2126
2126
  };
2127
2127
  }, [e, t]), n;
2128
2128
  }
2129
- const Vo = "_loadingContainer_v9v7r_1", Ao = {
2130
- loadingContainer: Vo
2129
+ const Ao = "_loadingContainer_v9v7r_1", Oo = {
2130
+ loadingContainer: Ao
2131
2131
  };
2132
2132
  function nn(n) {
2133
2133
  var o = n, { style: e } = o, t = ne(o, ["style"]);
2134
2134
  const a = f((u) => u.isLoading);
2135
- return No(a, 100) ? /* @__PURE__ */ s.jsx("div", he(j({ className: Ao.loadingContainer, style: e }, t), { children: /* @__PURE__ */ s.jsx(Mo, {}) })) : null;
2135
+ return Vo(a, 100) ? /* @__PURE__ */ s.jsx("div", he(P({ className: Oo.loadingContainer, style: e }, t), { children: /* @__PURE__ */ s.jsx(No, {}) })) : null;
2136
2136
  }
2137
- function Oo() {
2137
+ function Ho() {
2138
2138
  return /* @__PURE__ */ s.jsx(
2139
2139
  "svg",
2140
2140
  {
@@ -2145,7 +2145,7 @@ function Oo() {
2145
2145
  }
2146
2146
  );
2147
2147
  }
2148
- function Ho() {
2148
+ function $o() {
2149
2149
  return /* @__PURE__ */ s.jsx(
2150
2150
  "svg",
2151
2151
  {
@@ -2156,18 +2156,18 @@ function Ho() {
2156
2156
  }
2157
2157
  );
2158
2158
  }
2159
- const $o = "_dropdownMenuContent_b7j6b_1", Uo = "_dropdownMenuItem_b7j6b_83", Bo = "_scrollAreaRoot_b7j6b_125", zo = "_scrollAreaViewport_b7j6b_133", Wo = "_scrollAreaScrollbar_b7j6b_141", Zo = "_scrollAreaThumb_b7j6b_168", pe = {
2160
- dropdownMenuContent: $o,
2161
- dropdownMenuItem: Uo,
2162
- scrollAreaRoot: Bo,
2163
- scrollAreaViewport: zo,
2164
- scrollAreaScrollbar: Wo,
2165
- scrollAreaThumb: Zo
2166
- }, qo = Te.Root, Ko = Te.Trigger, Yo = Te.Portal, rn = Ne((l, a) => {
2159
+ const Uo = "_dropdownMenuContent_b7j6b_1", Bo = "_dropdownMenuItem_b7j6b_83", zo = "_scrollAreaRoot_b7j6b_125", Wo = "_scrollAreaViewport_b7j6b_133", Zo = "_scrollAreaScrollbar_b7j6b_141", qo = "_scrollAreaThumb_b7j6b_168", pe = {
2160
+ dropdownMenuContent: Uo,
2161
+ dropdownMenuItem: Bo,
2162
+ scrollAreaRoot: zo,
2163
+ scrollAreaViewport: Wo,
2164
+ scrollAreaScrollbar: Zo,
2165
+ scrollAreaThumb: qo
2166
+ }, Ko = Te.Root, Yo = Te.Trigger, Xo = Te.Portal, rn = Ne((l, a) => {
2167
2167
  var u = l, { sideOffset: e = 4, className: t, children: n } = u, o = ne(u, ["sideOffset", "className", "children"]);
2168
2168
  return /* @__PURE__ */ s.jsx(
2169
2169
  Te.Content,
2170
- he(j({
2170
+ he(P({
2171
2171
  ref: a,
2172
2172
  sideOffset: e,
2173
2173
  className: [pe.dropdownMenuContent, t].filter(Boolean).join(" "),
@@ -2179,19 +2179,19 @@ const $o = "_dropdownMenuContent_b7j6b_1", Uo = "_dropdownMenuItem_b7j6b_83", Bo
2179
2179
  }
2180
2180
  }, o), {
2181
2181
  children: /* @__PURE__ */ s.jsxs(
2182
- Le.Root,
2182
+ Pe.Root,
2183
2183
  {
2184
2184
  className: pe.scrollAreaRoot,
2185
2185
  type: "always",
2186
2186
  scrollHideDelay: 0,
2187
2187
  children: [
2188
- /* @__PURE__ */ s.jsx(Le.Viewport, { className: pe.scrollAreaViewport, children: n }),
2188
+ /* @__PURE__ */ s.jsx(Pe.Viewport, { className: pe.scrollAreaViewport, children: n }),
2189
2189
  /* @__PURE__ */ s.jsx(
2190
- Le.Scrollbar,
2190
+ Pe.Scrollbar,
2191
2191
  {
2192
2192
  className: pe.scrollAreaScrollbar,
2193
2193
  orientation: "vertical",
2194
- children: /* @__PURE__ */ s.jsx(Le.Thumb, { className: pe.scrollAreaThumb })
2194
+ children: /* @__PURE__ */ s.jsx(Pe.Thumb, { className: pe.scrollAreaThumb })
2195
2195
  }
2196
2196
  )
2197
2197
  ]
@@ -2210,7 +2210,7 @@ const on = Ne((a, o) => {
2210
2210
  };
2211
2211
  return /* @__PURE__ */ s.jsx(Te.Close, { asChild: !0, children: /* @__PURE__ */ s.jsx(
2212
2212
  "div",
2213
- j({
2213
+ P({
2214
2214
  ref: o,
2215
2215
  className: [pe.dropdownMenuItem, e].filter(Boolean).join(" "),
2216
2216
  role: "menuitem",
@@ -2229,22 +2229,22 @@ function sn() {
2229
2229
  },
2230
2230
  [o, a]
2231
2231
  );
2232
- return /* @__PURE__ */ s.jsxs(qo, { open: e, onOpenChange: i, children: [
2233
- /* @__PURE__ */ s.jsx(Ko, { asChild: !0, children: /* @__PURE__ */ s.jsx(le, { children: /* @__PURE__ */ s.jsx(Ho, {}) }) }),
2234
- /* @__PURE__ */ s.jsx(Yo, { container: n.current, children: /* @__PURE__ */ s.jsx(rn, { side: "top", align: "end", children: l == null ? void 0 : l.map((c) => /* @__PURE__ */ s.jsxs(
2232
+ return /* @__PURE__ */ s.jsxs(Ko, { open: e, onOpenChange: i, children: [
2233
+ /* @__PURE__ */ s.jsx(Yo, { asChild: !0, children: /* @__PURE__ */ s.jsx(le, { children: /* @__PURE__ */ s.jsx($o, {}) }) }),
2234
+ /* @__PURE__ */ s.jsx(Xo, { container: n.current, children: /* @__PURE__ */ s.jsx(rn, { side: "top", align: "end", children: l == null ? void 0 : l.map((c) => /* @__PURE__ */ s.jsxs(
2235
2235
  on,
2236
2236
  {
2237
2237
  onClick: () => u(c.value),
2238
2238
  children: [
2239
2239
  c.label,
2240
- c.selected && /* @__PURE__ */ s.jsx(Oo, {})
2240
+ c.selected && /* @__PURE__ */ s.jsx(Ho, {})
2241
2241
  ]
2242
2242
  },
2243
2243
  c.sid
2244
2244
  )) }) })
2245
2245
  ] });
2246
2246
  }
2247
- function Xo() {
2247
+ function Go() {
2248
2248
  return /* @__PURE__ */ s.jsx(
2249
2249
  "svg",
2250
2250
  {
@@ -2255,7 +2255,7 @@ function Xo() {
2255
2255
  }
2256
2256
  );
2257
2257
  }
2258
- function Go() {
2258
+ function Jo() {
2259
2259
  return /* @__PURE__ */ s.jsx(
2260
2260
  "svg",
2261
2261
  {
@@ -2266,7 +2266,7 @@ function Go() {
2266
2266
  }
2267
2267
  );
2268
2268
  }
2269
- function Jo() {
2269
+ function Qo() {
2270
2270
  return /* @__PURE__ */ s.jsx(
2271
2271
  "svg",
2272
2272
  {
@@ -2277,9 +2277,9 @@ function Jo() {
2277
2277
  }
2278
2278
  );
2279
2279
  }
2280
- const Qo = "_volumeContainer_4d6jg_1", ei = "_volumeSlider_4d6jg_8", Et = {
2281
- volumeContainer: Qo,
2282
- volumeSlider: ei
2280
+ const ei = "_volumeContainer_4d6jg_1", ti = "_volumeSlider_4d6jg_8", Et = {
2281
+ volumeContainer: ei,
2282
+ volumeSlider: ti
2283
2283
  }, Rt = "volume";
2284
2284
  function an() {
2285
2285
  const e = f((i) => i.setVolume), t = f((i) => i.volume), n = f((i) => i.addIdleLock), o = f((i) => i.removeIdleLock), a = (i) => {
@@ -2288,7 +2288,7 @@ function an() {
2288
2288
  o(Rt);
2289
2289
  }, u = () => e(t ? 0 : 100);
2290
2290
  return /* @__PURE__ */ s.jsxs("div", { className: Et.volumeContainer, children: [
2291
- /* @__PURE__ */ s.jsx(le, { onClick: u, className: "shrink-0", children: t ? t > 50 ? /* @__PURE__ */ s.jsx(Xo, {}) : /* @__PURE__ */ s.jsx(Go, {}) : /* @__PURE__ */ s.jsx(Jo, {}) }),
2291
+ /* @__PURE__ */ s.jsx(le, { onClick: u, className: "shrink-0", children: t ? t > 50 ? /* @__PURE__ */ s.jsx(Go, {}) : /* @__PURE__ */ s.jsx(Jo, {}) : /* @__PURE__ */ s.jsx(Qo, {}) }),
2292
2292
  /* @__PURE__ */ s.jsx("div", { className: Et.volumeSlider, children: /* @__PURE__ */ s.jsx(
2293
2293
  Ae,
2294
2294
  {
@@ -2299,19 +2299,24 @@ function an() {
2299
2299
  ) })
2300
2300
  ] });
2301
2301
  }
2302
- function yi(e) {
2303
- return /* @__PURE__ */ s.jsx(Ir, { children: /* @__PURE__ */ s.jsx(ti, j({}, e)) });
2302
+ const ni = "0.0.44", ln = {
2303
+ version: ni
2304
+ };
2305
+ function wi(e) {
2306
+ return /* @__PURE__ */ s.jsx(Ir, { children: /* @__PURE__ */ s.jsx(ri, P({}, e)) });
2304
2307
  }
2305
- function ti({ url: e, messages: t, onEvent: n }) {
2308
+ function ri({ url: e, messages: t, onEvent: n }) {
2306
2309
  const o = f((a) => a.containerRef);
2307
- return /* @__PURE__ */ s.jsxs(
2310
+ return F(() => {
2311
+ console.log(`[Player][Live] Version: ${ln.version}`);
2312
+ }, []), /* @__PURE__ */ s.jsxs(
2308
2313
  "div",
2309
2314
  {
2310
2315
  ref: o,
2311
2316
  className: z.playerContainer,
2312
2317
  children: [
2313
2318
  /* @__PURE__ */ s.jsxs(
2314
- Cr,
2319
+ Er,
2315
2320
  {
2316
2321
  url: e,
2317
2322
  messages: {
@@ -2320,7 +2325,7 @@ function ti({ url: e, messages: t, onEvent: n }) {
2320
2325
  },
2321
2326
  children: [
2322
2327
  /* @__PURE__ */ s.jsx(
2323
- Mr,
2328
+ Nr,
2324
2329
  {
2325
2330
  url: e,
2326
2331
  messages: {
@@ -2331,19 +2336,19 @@ function ti({ url: e, messages: t, onEvent: n }) {
2331
2336
  ),
2332
2337
  /* @__PURE__ */ s.jsx(Qt, {}),
2333
2338
  /* @__PURE__ */ s.jsx(nn, {}),
2334
- /* @__PURE__ */ s.jsx(qr, {}),
2339
+ /* @__PURE__ */ s.jsx(Kr, {}),
2335
2340
  /* @__PURE__ */ s.jsxs(tn, { children: [
2336
- /* @__PURE__ */ s.jsx("div", { className: z.controlsTop, children: /* @__PURE__ */ s.jsx("div", { className: z.controlsContainer, children: /* @__PURE__ */ s.jsx("div", { className: z.controlsRow, children: /* @__PURE__ */ s.jsx(go, {}) }) }) }),
2341
+ /* @__PURE__ */ s.jsx("div", { className: z.controlsTop, children: /* @__PURE__ */ s.jsx("div", { className: z.controlsContainer, children: /* @__PURE__ */ s.jsx("div", { className: z.controlsRow, children: /* @__PURE__ */ s.jsx(wo, {}) }) }) }),
2337
2342
  /* @__PURE__ */ s.jsx("div", { className: z.controlsBottom, children: /* @__PURE__ */ s.jsxs("div", { className: z.controlsContainer, children: [
2338
- /* @__PURE__ */ s.jsx(uo, {}),
2343
+ /* @__PURE__ */ s.jsx(fo, {}),
2339
2344
  /* @__PURE__ */ s.jsxs("div", { className: z.controlsRow, children: [
2340
2345
  /* @__PURE__ */ s.jsxs(
2341
2346
  "div",
2342
2347
  {
2343
2348
  className: `${z.controlsSection} ${z.controlsSectionStart}`,
2344
2349
  children: [
2345
- /* @__PURE__ */ s.jsx(eo, {}),
2346
- /* @__PURE__ */ s.jsx(ho, {}),
2350
+ /* @__PURE__ */ s.jsx(to, {}),
2351
+ /* @__PURE__ */ s.jsx(mo, {}),
2347
2352
  /* @__PURE__ */ s.jsx(an, {})
2348
2353
  ]
2349
2354
  }
@@ -2353,7 +2358,7 @@ function ti({ url: e, messages: t, onEvent: n }) {
2353
2358
  {
2354
2359
  className: `${z.controlsSection} ${z.controlsSectionEnd}`,
2355
2360
  children: [
2356
- /* @__PURE__ */ s.jsx(Qr, { message: t == null ? void 0 : t.live }),
2361
+ /* @__PURE__ */ s.jsx(eo, { message: t == null ? void 0 : t.live }),
2357
2362
  /* @__PURE__ */ s.jsx(sn, {}),
2358
2363
  /* @__PURE__ */ s.jsx(en, {})
2359
2364
  ]
@@ -2365,14 +2370,14 @@ function ti({ url: e, messages: t, onEvent: n }) {
2365
2370
  ]
2366
2371
  }
2367
2372
  ),
2368
- /* @__PURE__ */ s.jsx(Pr, {}),
2369
- /* @__PURE__ */ s.jsx(Nr, { url: e }),
2373
+ /* @__PURE__ */ s.jsx(kr, {}),
2374
+ /* @__PURE__ */ s.jsx(Vr, { url: e }),
2370
2375
  n && /* @__PURE__ */ s.jsx(Lr, { callback: n })
2371
2376
  ]
2372
2377
  }
2373
2378
  );
2374
2379
  }
2375
- function ni() {
2380
+ function oi() {
2376
2381
  const e = f((u) => u.isPlaying), t = f((u) => u.pause), n = f((u) => u.play), o = f((u) => u.currentTime), a = f((u) => u.duration), l = f((u) => u.seek);
2377
2382
  return /* @__PURE__ */ s.jsx(
2378
2383
  Xt,
@@ -2393,28 +2398,28 @@ function ni() {
2393
2398
  }
2394
2399
  );
2395
2400
  }
2396
- function ri() {
2401
+ function ii() {
2397
2402
  const e = f((a) => a.isPlaying), t = f((a) => a.pause), n = f((a) => a.play), o = () => {
2398
2403
  e ? t() : n();
2399
2404
  };
2400
2405
  return /* @__PURE__ */ s.jsx(le, { onClick: o, children: e ? /* @__PURE__ */ s.jsx(Gt, {}) : /* @__PURE__ */ s.jsx(Jt, {}) });
2401
2406
  }
2402
2407
  const bt = "vod-player-progress-bar";
2403
- function oi() {
2404
- const e = V(null), t = V(null), [n, o] = G(!1), [a, l] = G(-1), [u, i] = G(-1), c = f((P) => P.currentTime), d = f((P) => P.duration), v = f((P) => P.seek), y = f((P) => P.addIdleLock), g = f((P) => P.removeIdleLock), L = parseFloat(
2408
+ function si() {
2409
+ const e = A(null), t = A(null), [n, o] = G(!1), [a, l] = G(-1), [u, i] = G(-1), c = f((k) => k.currentTime), d = f((k) => k.duration), v = f((k) => k.seek), y = f((k) => k.addIdleLock), g = f((k) => k.removeIdleLock), L = parseFloat(
2405
2410
  (d ? (u !== -1 ? u : c) / d * 100 : 0).toFixed(1)
2406
- ), D = (P) => {
2407
- i(d * (P[0] / 100)), y(bt);
2411
+ ), D = (k) => {
2412
+ i(d * (k[0] / 100)), y(bt);
2408
2413
  }, _ = () => {
2409
2414
  u !== -1 && (v(u), i(-1), g(bt));
2410
- }, S = () => o(!0), N = () => o(!1), R = W(
2411
- (P) => {
2412
- const x = e.current, I = t.current;
2413
- if (x && I) {
2414
- const p = Me(x), $ = Me(I), Y = (P.pageX || P.clientX) - p.left, B = Y / p.width;
2415
+ }, S = () => o(!0), V = () => o(!1), R = W(
2416
+ (k) => {
2417
+ const x = e.current, j = t.current;
2418
+ if (x && j) {
2419
+ const p = Me(x), $ = Me(j), Y = (k.pageX || k.clientX) - p.left, B = Y / p.width;
2415
2420
  if (B < 0) return;
2416
- let F = Y - $.width / 2;
2417
- F < 0 && (F = 0), F > p.width - $.width && (F = -1), I.style.left = F > -1 ? `${F}px` : "auto", I.style.right = F > -1 ? "auto" : "0px", l(B * d);
2421
+ let M = Y - $.width / 2;
2422
+ M < 0 && (M = 0), M > p.width - $.width && (M = -1), j.style.left = M > -1 ? `${M}px` : "auto", j.style.right = M > -1 ? "auto" : "0px", l(B * d);
2418
2423
  }
2419
2424
  S();
2420
2425
  },
@@ -2426,8 +2431,8 @@ function oi() {
2426
2431
  {
2427
2432
  ref: e,
2428
2433
  value: [L],
2429
- onPointerLeave: N,
2430
- onPointerDown: N,
2434
+ onPointerLeave: V,
2435
+ onPointerDown: V,
2431
2436
  onPointerMove: R,
2432
2437
  onValueChange: D,
2433
2438
  onValueCommit: _,
@@ -2444,12 +2449,12 @@ function oi() {
2444
2449
  )
2445
2450
  ] });
2446
2451
  }
2447
- const ii = "_remainingTimeContainer_1yyhb_1", si = "_remainingTime_1yyhb_1", ai = "_remainingSeparator_1yyhb_17", Fe = {
2448
- remainingTimeContainer: ii,
2449
- remainingTime: si,
2450
- remainingSeparator: ai
2452
+ const ai = "_remainingTimeContainer_1yyhb_1", li = "_remainingTime_1yyhb_1", ci = "_remainingSeparator_1yyhb_17", Fe = {
2453
+ remainingTimeContainer: ai,
2454
+ remainingTime: li,
2455
+ remainingSeparator: ci
2451
2456
  };
2452
- function li() {
2457
+ function ui() {
2453
2458
  const e = f((n) => n.currentTime), t = f((n) => n.duration);
2454
2459
  return /* @__PURE__ */ s.jsxs("div", { className: Fe.remainingTimeContainer, children: [
2455
2460
  /* @__PURE__ */ s.jsx("p", { className: Fe.remainingTime, children: _e(e) }),
@@ -2457,16 +2462,16 @@ function li() {
2457
2462
  /* @__PURE__ */ s.jsx("p", { className: Fe.remainingTime, children: _e(t) })
2458
2463
  ] });
2459
2464
  }
2460
- function ci({ callback: e }) {
2465
+ function di({ callback: e }) {
2461
2466
  const t = f((n) => n.eventEmitter);
2462
- return O(() => {
2467
+ return F(() => {
2463
2468
  const n = (o) => e("timeUpdate", o);
2464
2469
  return t.on("timeUpdate", n), () => {
2465
2470
  t.off("timeUpdate", n);
2466
2471
  };
2467
2472
  }, [e, t]), /* @__PURE__ */ s.jsx(zt, { callback: e });
2468
2473
  }
2469
- function ui() {
2474
+ function fi() {
2470
2475
  const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), o = f((i) => i.pause), a = f((i) => i.play), l = f((i) => i.seek), u = W(
2471
2476
  (i) => {
2472
2477
  let c = !1;
@@ -2487,18 +2492,20 @@ function ui() {
2487
2492
  },
2488
2493
  [e, t, n, o, a, l]
2489
2494
  );
2490
- return O(() => (document.addEventListener("keydown", u), () => {
2495
+ return F(() => (document.addEventListener("keydown", u), () => {
2491
2496
  document.removeEventListener("keydown", u);
2492
2497
  }), [u]), /* @__PURE__ */ s.jsx(qt, {});
2493
2498
  }
2494
- function gi(e) {
2495
- return /* @__PURE__ */ s.jsx(Kt, { children: /* @__PURE__ */ s.jsx(di, j({}, e)) });
2499
+ function xi(e) {
2500
+ return /* @__PURE__ */ s.jsx(Kt, { children: /* @__PURE__ */ s.jsx(hi, P({}, e)) });
2496
2501
  }
2497
- function di({ url: e, messages: t, onEvent: n, startTime: o }) {
2502
+ function hi({ url: e, messages: t, onEvent: n, startTime: o }) {
2498
2503
  const a = f((u) => u.setStartTime), l = f((u) => u.containerRef);
2499
- return O(() => {
2504
+ return F(() => {
2500
2505
  o && a(o);
2501
- }, [o, a]), /* @__PURE__ */ s.jsxs(
2506
+ }, [o, a]), F(() => {
2507
+ console.log(`[Player][VOD] Version: ${ln.version}`);
2508
+ }, []), /* @__PURE__ */ s.jsxs(
2502
2509
  "div",
2503
2510
  {
2504
2511
  ref: l,
@@ -2507,18 +2514,18 @@ function di({ url: e, messages: t, onEvent: n, startTime: o }) {
2507
2514
  /* @__PURE__ */ s.jsx(Yt, { url: e, isLive: !1, messages: t }),
2508
2515
  /* @__PURE__ */ s.jsx(Qt, {}),
2509
2516
  /* @__PURE__ */ s.jsx(nn, {}),
2510
- /* @__PURE__ */ s.jsx(ni, {}),
2517
+ /* @__PURE__ */ s.jsx(oi, {}),
2511
2518
  /* @__PURE__ */ s.jsx(tn, { children: /* @__PURE__ */ s.jsx("div", { className: z.controlsBottom, children: /* @__PURE__ */ s.jsxs("div", { className: z.controlsContainer, children: [
2512
- /* @__PURE__ */ s.jsx(oi, {}),
2519
+ /* @__PURE__ */ s.jsx(si, {}),
2513
2520
  /* @__PURE__ */ s.jsxs("div", { className: z.controlsRow, children: [
2514
2521
  /* @__PURE__ */ s.jsxs(
2515
2522
  "div",
2516
2523
  {
2517
2524
  className: `${z.controlsSection} ${z.controlsSectionStart}`,
2518
2525
  children: [
2519
- /* @__PURE__ */ s.jsx(ri, {}),
2526
+ /* @__PURE__ */ s.jsx(ii, {}),
2520
2527
  /* @__PURE__ */ s.jsx(an, {}),
2521
- /* @__PURE__ */ s.jsx(li, {})
2528
+ /* @__PURE__ */ s.jsx(ui, {})
2522
2529
  ]
2523
2530
  }
2524
2531
  ),
@@ -2534,14 +2541,14 @@ function di({ url: e, messages: t, onEvent: n, startTime: o }) {
2534
2541
  )
2535
2542
  ] })
2536
2543
  ] }) }) }),
2537
- /* @__PURE__ */ s.jsx(ui, {}),
2538
- n && /* @__PURE__ */ s.jsx(ci, { callback: n })
2544
+ /* @__PURE__ */ s.jsx(fi, {}),
2545
+ n && /* @__PURE__ */ s.jsx(di, { callback: n })
2539
2546
  ]
2540
2547
  }
2541
2548
  );
2542
2549
  }
2543
2550
  export {
2544
- yi as LivePlayer,
2545
- gi as VodPlayer
2551
+ wi as LivePlayer,
2552
+ xi as VodPlayer
2546
2553
  };
2547
2554
  //# sourceMappingURL=react-video-player.es.js.map