@halibegic/react-video-player 0.0.49 → 0.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +1,32 @@
1
- var Vn = Object.defineProperty, Nn = Object.defineProperties;
2
- var An = Object.getOwnPropertyDescriptors;
3
- var Se = Object.getOwnPropertySymbols;
4
- var vt = Object.prototype.hasOwnProperty, yt = Object.prototype.propertyIsEnumerable;
5
- var pt = (e, t, n) => t in e ? Vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, j = (e, t) => {
1
+ var $n = Object.defineProperty, Un = Object.defineProperties;
2
+ var Bn = Object.getOwnPropertyDescriptors;
3
+ var Pe = Object.getOwnPropertySymbols;
4
+ var wt = Object.prototype.hasOwnProperty, _t = Object.prototype.propertyIsEnumerable;
5
+ var gt = (e, t, n) => t in e ? $n(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, M = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
- vt.call(t, n) && pt(e, n, t[n]);
8
- if (Se)
9
- for (var n of Se(t))
10
- yt.call(t, n) && pt(e, n, t[n]);
7
+ wt.call(t, n) && gt(e, n, t[n]);
8
+ if (Pe)
9
+ for (var n of Pe(t))
10
+ _t.call(t, n) && gt(e, n, t[n]);
11
11
  return e;
12
- }, he = (e, t) => Nn(e, An(t));
13
- var ne = (e, t) => {
12
+ }, he = (e, t) => Un(e, Bn(t));
13
+ var re = (e, t) => {
14
14
  var n = {};
15
- for (var o in e)
16
- vt.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
17
- if (e != null && Se)
18
- for (var o of Se(e))
19
- t.indexOf(o) < 0 && yt.call(e, o) && (n[o] = e[o]);
15
+ for (var r in e)
16
+ wt.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
17
+ if (e != null && Pe)
18
+ for (var r of Pe(e))
19
+ t.indexOf(r) < 0 && _t.call(e, r) && (n[r] = e[r]);
20
20
  return n;
21
21
  };
22
- import St, { useLayoutEffect as On, useEffect as D, useRef as N, useState as G, createContext as jt, useContext as Pt, useCallback as W, forwardRef as Ve } from "react";
23
- import { create as Lt, useStore as It } from "zustand";
24
- import Hn from "mitt";
25
- import re from "hls.js";
26
- import * as je from "@radix-ui/react-slider";
27
- import * as _e from "@radix-ui/react-popover";
28
- import * as Pe from "@radix-ui/react-scroll-area";
29
- function kt(e) {
22
+ import jt, { useLayoutEffect as Wn, useEffect as N, useRef as F, createContext as It, useContext as kt, useState as G, useCallback as O, forwardRef as Ve } from "react";
23
+ import { useStore as Dt, create as Mt } from "zustand";
24
+ import zn from "mitt";
25
+ import ee from "hls.js";
26
+ import * as Le from "@radix-ui/react-slider";
27
+ import * as xe from "@radix-ui/react-popover";
28
+ import * as je from "@radix-ui/react-scroll-area";
29
+ function Nt(e) {
30
30
  var t = this.constructor;
31
31
  return this.then(
32
32
  function(n) {
@@ -41,170 +41,170 @@ function kt(e) {
41
41
  }
42
42
  );
43
43
  }
44
- function Dt(e) {
44
+ function Ft(e) {
45
45
  var t = this;
46
- return new t(function(n, o) {
46
+ return new t(function(n, r) {
47
47
  if (!(e && typeof e.length != "undefined"))
48
- return o(
48
+ return r(
49
49
  new TypeError(
50
50
  typeof e + " " + e + " is not iterable(cannot read property Symbol(Symbol.iterator))"
51
51
  )
52
52
  );
53
- var a = Array.prototype.slice.call(e);
54
- if (a.length === 0) return n([]);
55
- var l = a.length;
53
+ var s = Array.prototype.slice.call(e);
54
+ if (s.length === 0) return n([]);
55
+ var l = s.length;
56
56
  function u(c, d) {
57
57
  if (d && (typeof d == "object" || typeof d == "function")) {
58
- var v = d.then;
59
- if (typeof v == "function") {
60
- v.call(
58
+ var g = d.then;
59
+ if (typeof g == "function") {
60
+ g.call(
61
61
  d,
62
- function(y) {
63
- u(c, y);
62
+ function(T) {
63
+ u(c, T);
64
64
  },
65
- function(y) {
66
- a[c] = { status: "rejected", reason: y }, --l === 0 && n(a);
65
+ function(T) {
66
+ s[c] = { status: "rejected", reason: T }, --l === 0 && n(s);
67
67
  }
68
68
  );
69
69
  return;
70
70
  }
71
71
  }
72
- a[c] = { status: "fulfilled", value: d }, --l === 0 && n(a);
72
+ s[c] = { status: "fulfilled", value: d }, --l === 0 && n(s);
73
73
  }
74
- for (var i = 0; i < a.length; i++)
75
- u(i, a[i]);
74
+ for (var i = 0; i < s.length; i++)
75
+ u(i, s[i]);
76
76
  });
77
77
  }
78
- function Mt(e, t) {
78
+ function Vt(e, t) {
79
79
  this.name = "AggregateError", this.errors = e, this.message = t || "";
80
80
  }
81
- Mt.prototype = Error.prototype;
82
- function Ft(e) {
81
+ Vt.prototype = Error.prototype;
82
+ function At(e) {
83
83
  var t = this;
84
- return new t(function(n, o) {
84
+ return new t(function(n, r) {
85
85
  if (!(e && typeof e.length != "undefined"))
86
- return o(new TypeError("Promise.any accepts an array"));
87
- var a = Array.prototype.slice.call(e);
88
- if (a.length === 0) return o();
89
- for (var l = [], u = 0; u < a.length; u++)
86
+ return r(new TypeError("Promise.any accepts an array"));
87
+ var s = Array.prototype.slice.call(e);
88
+ if (s.length === 0) return r();
89
+ for (var l = [], u = 0; u < s.length; u++)
90
90
  try {
91
- t.resolve(a[u]).then(n).catch(function(i) {
92
- l.push(i), l.length === a.length && o(
93
- new Mt(
91
+ t.resolve(s[u]).then(n).catch(function(i) {
92
+ l.push(i), l.length === s.length && r(
93
+ new Vt(
94
94
  l,
95
95
  "All promises were rejected"
96
96
  )
97
97
  );
98
98
  });
99
99
  } catch (i) {
100
- o(i);
100
+ r(i);
101
101
  }
102
102
  });
103
103
  }
104
- var $n = setTimeout;
105
- function Vt(e) {
104
+ var qn = setTimeout;
105
+ function Ot(e) {
106
106
  return !!(e && typeof e.length != "undefined");
107
107
  }
108
- function Un() {
108
+ function Yn() {
109
109
  }
110
- function Bn(e, t) {
110
+ function Zn(e, t) {
111
111
  return function() {
112
112
  e.apply(t, arguments);
113
113
  };
114
114
  }
115
- function F(e) {
116
- if (!(this instanceof F))
115
+ function H(e) {
116
+ if (!(this instanceof H))
117
117
  throw new TypeError("Promises must be constructed via new");
118
118
  if (typeof e != "function") throw new TypeError("not a function");
119
- this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], At(e, this);
119
+ this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], $t(e, this);
120
120
  }
121
- function Nt(e, t) {
121
+ function Ht(e, t) {
122
122
  for (; e._state === 3; )
123
123
  e = e._value;
124
124
  if (e._state === 0) {
125
125
  e._deferreds.push(t);
126
126
  return;
127
127
  }
128
- e._handled = !0, F._immediateFn(function() {
128
+ e._handled = !0, H._immediateFn(function() {
129
129
  var n = e._state === 1 ? t.onFulfilled : t.onRejected;
130
130
  if (n === null) {
131
- (e._state === 1 ? Ke : xe)(t.promise, e._value);
131
+ (e._state === 1 ? Ge : _e)(t.promise, e._value);
132
132
  return;
133
133
  }
134
- var o;
134
+ var r;
135
135
  try {
136
- o = n(e._value);
137
- } catch (a) {
138
- xe(t.promise, a);
136
+ r = n(e._value);
137
+ } catch (s) {
138
+ _e(t.promise, s);
139
139
  return;
140
140
  }
141
- Ke(t.promise, o);
141
+ Ge(t.promise, r);
142
142
  });
143
143
  }
144
- function Ke(e, t) {
144
+ function Ge(e, t) {
145
145
  try {
146
146
  if (t === e)
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 F) {
151
- e._state = 3, e._value = t, Ye(e);
150
+ if (t instanceof H) {
151
+ e._state = 3, e._value = t, Xe(e);
152
152
  return;
153
153
  } else if (typeof n == "function") {
154
- At(Bn(n, t), e);
154
+ $t(Zn(n, t), e);
155
155
  return;
156
156
  }
157
157
  }
158
- e._state = 1, e._value = t, Ye(e);
159
- } catch (o) {
160
- xe(e, o);
158
+ e._state = 1, e._value = t, Xe(e);
159
+ } catch (r) {
160
+ _e(e, r);
161
161
  }
162
162
  }
163
- function xe(e, t) {
164
- e._state = 2, e._value = t, Ye(e);
163
+ function _e(e, t) {
164
+ e._state = 2, e._value = t, Xe(e);
165
165
  }
166
- function Ye(e) {
167
- e._state === 2 && e._deferreds.length === 0 && F._immediateFn(function() {
168
- e._handled || F._unhandledRejectionFn(e._value);
166
+ function Xe(e) {
167
+ e._state === 2 && e._deferreds.length === 0 && H._immediateFn(function() {
168
+ e._handled || H._unhandledRejectionFn(e._value);
169
169
  });
170
170
  for (var t = 0, n = e._deferreds.length; t < n; t++)
171
- Nt(e, e._deferreds[t]);
171
+ Ht(e, e._deferreds[t]);
172
172
  e._deferreds = null;
173
173
  }
174
- function zn(e, t, n) {
174
+ function Kn(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
- function At(e, t) {
177
+ function $t(e, t) {
178
178
  var n = !1;
179
179
  try {
180
180
  e(
181
- function(o) {
182
- n || (n = !0, Ke(t, o));
181
+ function(r) {
182
+ n || (n = !0, Ge(t, r));
183
183
  },
184
- function(o) {
185
- n || (n = !0, xe(t, o));
184
+ function(r) {
185
+ n || (n = !0, _e(t, r));
186
186
  }
187
187
  );
188
- } catch (o) {
188
+ } catch (r) {
189
189
  if (n) return;
190
- n = !0, xe(t, o);
190
+ n = !0, _e(t, r);
191
191
  }
192
192
  }
193
- F.prototype.catch = function(e) {
193
+ H.prototype.catch = function(e) {
194
194
  return this.then(null, e);
195
195
  };
196
- F.prototype.then = function(e, t) {
197
- var n = new this.constructor(Un);
198
- return Nt(this, new zn(e, t, n)), n;
196
+ H.prototype.then = function(e, t) {
197
+ var n = new this.constructor(Yn);
198
+ return Ht(this, new Kn(e, t, n)), n;
199
199
  };
200
- F.prototype.finally = kt;
201
- F.all = function(e) {
202
- return new F(function(t, n) {
203
- if (!Vt(e))
200
+ H.prototype.finally = Nt;
201
+ H.all = function(e) {
202
+ return new H(function(t, n) {
203
+ if (!Ot(e))
204
204
  return n(new TypeError("Promise.all accepts an array"));
205
- var o = Array.prototype.slice.call(e);
206
- if (o.length === 0) return t([]);
207
- var a = o.length;
205
+ var r = Array.prototype.slice.call(e);
206
+ if (r.length === 0) return t([]);
207
+ var s = r.length;
208
208
  function l(i, c) {
209
209
  try {
210
210
  if (c && (typeof c == "object" || typeof c == "function")) {
@@ -212,50 +212,50 @@ F.all = function(e) {
212
212
  if (typeof d == "function") {
213
213
  d.call(
214
214
  c,
215
- function(v) {
216
- l(i, v);
215
+ function(g) {
216
+ l(i, g);
217
217
  },
218
218
  n
219
219
  );
220
220
  return;
221
221
  }
222
222
  }
223
- o[i] = c, --a === 0 && t(o);
224
- } catch (v) {
225
- n(v);
223
+ r[i] = c, --s === 0 && t(r);
224
+ } catch (g) {
225
+ n(g);
226
226
  }
227
227
  }
228
- for (var u = 0; u < o.length; u++)
229
- l(u, o[u]);
228
+ for (var u = 0; u < r.length; u++)
229
+ l(u, r[u]);
230
230
  });
231
231
  };
232
- F.any = Ft;
233
- F.allSettled = Dt;
234
- F.resolve = function(e) {
235
- return e && typeof e == "object" && e.constructor === F ? e : new F(function(t) {
232
+ H.any = At;
233
+ H.allSettled = Ft;
234
+ H.resolve = function(e) {
235
+ return e && typeof e == "object" && e.constructor === H ? e : new H(function(t) {
236
236
  t(e);
237
237
  });
238
238
  };
239
- F.reject = function(e) {
240
- return new F(function(t, n) {
239
+ H.reject = function(e) {
240
+ return new H(function(t, n) {
241
241
  n(e);
242
242
  });
243
243
  };
244
- F.race = function(e) {
245
- return new F(function(t, n) {
246
- if (!Vt(e))
244
+ H.race = function(e) {
245
+ return new H(function(t, n) {
246
+ if (!Ot(e))
247
247
  return n(new TypeError("Promise.race accepts an array"));
248
- for (var o = 0, a = e.length; o < a; o++)
249
- F.resolve(e[o]).then(t, n);
248
+ for (var r = 0, s = e.length; r < s; r++)
249
+ H.resolve(e[r]).then(t, n);
250
250
  });
251
251
  };
252
- F._immediateFn = // @ts-ignore
252
+ H._immediateFn = // @ts-ignore
253
253
  typeof setImmediate == "function" && function(e) {
254
254
  setImmediate(e);
255
255
  } || function(e) {
256
- $n(e, 0);
256
+ qn(e, 0);
257
257
  };
258
- F._unhandledRejectionFn = function(t) {
258
+ H._unhandledRejectionFn = function(t) {
259
259
  typeof console != "undefined" && console && console.warn("Possible Unhandled Promise Rejection:", t);
260
260
  };
261
261
  var ae = (function() {
@@ -267,683 +267,636 @@ 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 = F : (ae.Promise.prototype.finally || (ae.Promise.prototype.finally = kt), ae.Promise.allSettled || (ae.Promise.allSettled = Dt), ae.Promise.any || (ae.Promise.any = Ft));
271
- var Le = { exports: {} }, ge = {};
272
- var gt;
273
- function Wn() {
274
- if (gt) return ge;
275
- gt = 1;
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 };
270
+ typeof ae.Promise != "function" ? ae.Promise = H : (ae.Promise.prototype.finally || (ae.Promise.prototype.finally = Nt), ae.Promise.allSettled || (ae.Promise.allSettled = Ft), ae.Promise.any || (ae.Promise.any = At));
271
+ var Ie = { exports: {} }, ge = {};
272
+ var Tt;
273
+ function Gn() {
274
+ if (Tt) return ge;
275
+ Tt = 1;
276
+ var e = jt, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
277
277
  function u(i, c, d) {
278
- var v, y = {}, g = null, P = null;
279
- d !== void 0 && (g = "" + d), c.key !== void 0 && (g = "" + c.key), c.ref !== void 0 && (P = c.ref);
280
- for (v in c) o.call(c, v) && !l.hasOwnProperty(v) && (y[v] = c[v]);
281
- if (i && i.defaultProps) for (v in c = i.defaultProps, c) y[v] === void 0 && (y[v] = c[v]);
282
- return { $$typeof: t, type: i, key: g, ref: P, props: y, _owner: a.current };
278
+ var g, T = {}, y = null, x = null;
279
+ d !== void 0 && (y = "" + d), c.key !== void 0 && (y = "" + c.key), c.ref !== void 0 && (x = c.ref);
280
+ for (g in c) r.call(c, g) && !l.hasOwnProperty(g) && (T[g] = c[g]);
281
+ if (i && i.defaultProps) for (g in c = i.defaultProps, c) T[g] === void 0 && (T[g] = c[g]);
282
+ return { $$typeof: t, type: i, key: y, ref: x, props: T, _owner: s.current };
283
283
  }
284
284
  return ge.Fragment = n, ge.jsx = u, ge.jsxs = u, ge;
285
285
  }
286
286
  var we = {};
287
- var wt;
288
- function Zn() {
289
- return wt || (wt = 1, process.env.NODE_ENV !== "production" && (function() {
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"), P = Symbol.for("react.offscreen"), k = Symbol.iterator, T = "@@iterator";
291
- function S(r) {
292
- if (r === null || typeof r != "object")
287
+ var xt;
288
+ function Xn() {
289
+ return xt || (xt = 1, process.env.NODE_ENV !== "production" && (function() {
290
+ var e = jt, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = 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"), g = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), L = Symbol.iterator, C = "@@iterator";
291
+ function w(o) {
292
+ if (o === null || typeof o != "object")
293
293
  return null;
294
- var h = k && r[k] || r[T];
294
+ var h = L && o[L] || o[C];
295
295
  return typeof h == "function" ? h : null;
296
296
  }
297
- var V = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
298
- function R(r) {
297
+ var S = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
298
+ function P(o) {
299
299
  {
300
- for (var h = arguments.length, m = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
301
- m[w - 1] = arguments[w];
302
- L("error", r, m);
300
+ for (var h = arguments.length, p = new Array(h > 1 ? h - 1 : 0), _ = 1; _ < h; _++)
301
+ p[_ - 1] = arguments[_];
302
+ R("error", o, p);
303
303
  }
304
304
  }
305
- function L(r, h, m) {
305
+ function R(o, h, p) {
306
306
  {
307
- var w = V.ReactDebugCurrentFrame, E = w.getStackAddendum();
308
- E !== "" && (h += "%s", m = m.concat([E]));
309
- var b = m.map(function(C) {
310
- return String(C);
307
+ var _ = S.ReactDebugCurrentFrame, j = _.getStackAddendum();
308
+ j !== "" && (h += "%s", p = p.concat([j]));
309
+ var D = p.map(function(b) {
310
+ return String(b);
311
311
  });
312
- b.unshift("Warning: " + h), Function.prototype.apply.call(console[r], console, b);
312
+ D.unshift("Warning: " + h), Function.prototype.apply.call(console[o], console, D);
313
313
  }
314
314
  }
315
- var x = !1, M = !1, p = !1, U = !1, Y = !1, z;
316
- z = Symbol.for("react.module.reference");
317
- function O(r) {
318
- return !!(typeof r == "string" || typeof r == "function" || r === o || r === l || Y || r === a || r === d || r === v || U || r === P || x || M || 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
315
+ var B = !1, V = !1, m = !1, v = !1, U = !1, I;
316
+ I = Symbol.for("react.module.reference");
317
+ function A(o) {
318
+ return !!(typeof o == "string" || typeof o == "function" || o === r || o === l || U || o === s || o === d || o === g || v || o === x || B || V || m || typeof o == "object" && o !== null && (o.$$typeof === y || o.$$typeof === T || o.$$typeof === u || o.$$typeof === i || o.$$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
- r.$$typeof === z || r.getModuleId !== void 0));
322
+ o.$$typeof === I || o.getModuleId !== void 0));
323
323
  }
324
- function I(r, h, m) {
325
- var w = r.displayName;
326
- if (w)
327
- return w;
328
- var E = h.displayName || h.name || "";
329
- return E !== "" ? m + "(" + E + ")" : m;
324
+ function k(o, h, p) {
325
+ var _ = o.displayName;
326
+ if (_)
327
+ return _;
328
+ var j = h.displayName || h.name || "";
329
+ return j !== "" ? p + "(" + j + ")" : p;
330
330
  }
331
- function Q(r) {
332
- return r.displayName || "Context";
331
+ function J(o) {
332
+ return o.displayName || "Context";
333
333
  }
334
- function K(r) {
335
- if (r == null)
334
+ function Y(o) {
335
+ if (o == null)
336
336
  return null;
337
- if (typeof r.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
338
- return r.displayName || r.name || null;
339
- if (typeof r == "string")
340
- return r;
341
- switch (r) {
342
- case o:
337
+ if (typeof o.tag == "number" && P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
338
+ return o.displayName || o.name || null;
339
+ if (typeof o == "string")
340
+ return o;
341
+ switch (o) {
342
+ case r:
343
343
  return "Fragment";
344
344
  case n:
345
345
  return "Portal";
346
346
  case l:
347
347
  return "Profiler";
348
- case a:
348
+ case s:
349
349
  return "StrictMode";
350
350
  case d:
351
351
  return "Suspense";
352
- case v:
352
+ case g:
353
353
  return "SuspenseList";
354
354
  }
355
- if (typeof r == "object")
356
- switch (r.$$typeof) {
355
+ if (typeof o == "object")
356
+ switch (o.$$typeof) {
357
357
  case i:
358
- var h = r;
359
- return Q(h) + ".Consumer";
358
+ var h = o;
359
+ return J(h) + ".Consumer";
360
360
  case u:
361
- var m = r;
362
- return Q(m._context) + ".Provider";
361
+ var p = o;
362
+ return J(p._context) + ".Provider";
363
363
  case c:
364
- return I(r, r.render, "ForwardRef");
365
- case y:
366
- var w = r.displayName || null;
367
- return w !== null ? w : K(r.type) || "Memo";
368
- case g: {
369
- var E = r, b = E._payload, C = E._init;
364
+ return k(o, o.render, "ForwardRef");
365
+ case T:
366
+ var _ = o.displayName || null;
367
+ return _ !== null ? _ : Y(o.type) || "Memo";
368
+ case y: {
369
+ var j = o, D = j._payload, b = j._init;
370
370
  try {
371
- return K(C(b));
372
- } catch (_) {
371
+ return Y(b(D));
372
+ } catch (E) {
373
373
  return null;
374
374
  }
375
375
  }
376
376
  }
377
377
  return null;
378
378
  }
379
- var Z = Object.assign, oe = 0, ue, te, q, ve, Xe, Ge, Je;
380
- function Qe() {
379
+ var Z = Object.assign, oe = 0, ue, ne, K, pe, Qe, et, tt;
380
+ function nt() {
381
381
  }
382
- Qe.__reactDisabledLog = !0;
383
- function cn() {
382
+ nt.__reactDisabledLog = !0;
383
+ function mn() {
384
384
  {
385
385
  if (oe === 0) {
386
- ue = console.log, te = console.info, q = console.warn, ve = console.error, Xe = console.group, Ge = console.groupCollapsed, Je = console.groupEnd;
387
- var r = {
386
+ ue = console.log, ne = console.info, K = console.warn, pe = console.error, Qe = console.group, et = console.groupCollapsed, tt = console.groupEnd;
387
+ var o = {
388
388
  configurable: !0,
389
389
  enumerable: !0,
390
- value: Qe,
390
+ value: nt,
391
391
  writable: !0
392
392
  };
393
393
  Object.defineProperties(console, {
394
- info: r,
395
- log: r,
396
- warn: r,
397
- error: r,
398
- group: r,
399
- groupCollapsed: r,
400
- groupEnd: r
394
+ info: o,
395
+ log: o,
396
+ warn: o,
397
+ error: o,
398
+ group: o,
399
+ groupCollapsed: o,
400
+ groupEnd: o
401
401
  });
402
402
  }
403
403
  oe++;
404
404
  }
405
405
  }
406
- function un() {
406
+ function vn() {
407
407
  {
408
408
  if (oe--, oe === 0) {
409
- var r = {
409
+ var o = {
410
410
  configurable: !0,
411
411
  enumerable: !0,
412
412
  writable: !0
413
413
  };
414
414
  Object.defineProperties(console, {
415
- log: Z({}, r, {
415
+ log: Z({}, o, {
416
416
  value: ue
417
417
  }),
418
- info: Z({}, r, {
419
- value: te
418
+ info: Z({}, o, {
419
+ value: ne
420
420
  }),
421
- warn: Z({}, r, {
422
- value: q
421
+ warn: Z({}, o, {
422
+ value: K
423
423
  }),
424
- error: Z({}, r, {
425
- value: ve
424
+ error: Z({}, o, {
425
+ value: pe
426
426
  }),
427
- group: Z({}, r, {
428
- value: Xe
427
+ group: Z({}, o, {
428
+ value: Qe
429
429
  }),
430
- groupCollapsed: Z({}, r, {
431
- value: Ge
430
+ groupCollapsed: Z({}, o, {
431
+ value: et
432
432
  }),
433
- groupEnd: Z({}, r, {
434
- value: Je
433
+ groupEnd: Z({}, o, {
434
+ value: tt
435
435
  })
436
436
  });
437
437
  }
438
- oe < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
438
+ oe < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
439
439
  }
440
440
  }
441
- var Oe = V.ReactCurrentDispatcher, He;
442
- function Ce(r, h, m) {
441
+ var Oe = S.ReactCurrentDispatcher, He;
442
+ function Ee(o, h, p) {
443
443
  {
444
444
  if (He === void 0)
445
445
  try {
446
446
  throw Error();
447
- } catch (E) {
448
- var w = E.stack.trim().match(/\n( *(at )?)/);
449
- He = w && w[1] || "";
447
+ } catch (j) {
448
+ var _ = j.stack.trim().match(/\n( *(at )?)/);
449
+ He = _ && _[1] || "";
450
450
  }
451
451
  return `
452
- ` + He + r;
452
+ ` + He + o;
453
453
  }
454
454
  }
455
- var $e = !1, Ee;
455
+ var $e = !1, Se;
456
456
  {
457
- var dn = typeof WeakMap == "function" ? WeakMap : Map;
458
- Ee = new dn();
457
+ var pn = typeof WeakMap == "function" ? WeakMap : Map;
458
+ Se = new pn();
459
459
  }
460
- function et(r, h) {
461
- if (!r || $e)
460
+ function rt(o, h) {
461
+ if (!o || $e)
462
462
  return "";
463
463
  {
464
- var m = Ee.get(r);
465
- if (m !== void 0)
466
- return m;
464
+ var p = Se.get(o);
465
+ if (p !== void 0)
466
+ return p;
467
467
  }
468
- var w;
468
+ var _;
469
469
  $e = !0;
470
- var E = Error.prepareStackTrace;
470
+ var j = Error.prepareStackTrace;
471
471
  Error.prepareStackTrace = void 0;
472
- var b;
473
- b = Oe.current, Oe.current = null, cn();
472
+ var D;
473
+ D = Oe.current, Oe.current = null, mn();
474
474
  try {
475
475
  if (h) {
476
- var C = function() {
476
+ var b = function() {
477
477
  throw Error();
478
478
  };
479
- if (Object.defineProperty(C.prototype, "props", {
479
+ if (Object.defineProperty(b.prototype, "props", {
480
480
  set: function() {
481
481
  throw Error();
482
482
  }
483
483
  }), typeof Reflect == "object" && Reflect.construct) {
484
484
  try {
485
- Reflect.construct(C, []);
486
- } catch (J) {
487
- w = J;
485
+ Reflect.construct(b, []);
486
+ } catch (Q) {
487
+ _ = Q;
488
488
  }
489
- Reflect.construct(r, [], C);
489
+ Reflect.construct(o, [], b);
490
490
  } else {
491
491
  try {
492
- C.call();
493
- } catch (J) {
494
- w = J;
492
+ b.call();
493
+ } catch (Q) {
494
+ _ = Q;
495
495
  }
496
- r.call(C.prototype);
496
+ o.call(b.prototype);
497
497
  }
498
498
  } else {
499
499
  try {
500
500
  throw Error();
501
- } catch (J) {
502
- w = J;
501
+ } catch (Q) {
502
+ _ = Q;
503
503
  }
504
- r();
504
+ o();
505
505
  }
506
- } catch (J) {
507
- if (J && w && typeof J.stack == "string") {
508
- for (var _ = J.stack.split(`
509
- `), X = w.stack.split(`
510
- `), H = _.length - 1, $ = X.length - 1; H >= 1 && $ >= 0 && _[H] !== X[$]; )
511
- $--;
512
- for (; H >= 1 && $ >= 0; H--, $--)
513
- if (_[H] !== X[$]) {
514
- if (H !== 1 || $ !== 1)
506
+ } catch (Q) {
507
+ if (Q && _ && typeof Q.stack == "string") {
508
+ for (var E = Q.stack.split(`
509
+ `), X = _.stack.split(`
510
+ `), W = E.length - 1, z = X.length - 1; W >= 1 && z >= 0 && E[W] !== X[z]; )
511
+ z--;
512
+ for (; W >= 1 && z >= 0; W--, z--)
513
+ if (E[W] !== X[z]) {
514
+ if (W !== 1 || z !== 1)
515
515
  do
516
- if (H--, $--, $ < 0 || _[H] !== X[$]) {
517
- var ee = `
518
- ` + _[H].replace(" at new ", " at ");
519
- return r.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", r.displayName)), typeof r == "function" && Ee.set(r, ee), ee;
516
+ if (W--, z--, z < 0 || E[W] !== X[z]) {
517
+ var te = `
518
+ ` + E[W].replace(" at new ", " at ");
519
+ return o.displayName && te.includes("<anonymous>") && (te = te.replace("<anonymous>", o.displayName)), typeof o == "function" && Se.set(o, te), te;
520
520
  }
521
- while (H >= 1 && $ >= 0);
521
+ while (W >= 1 && z >= 0);
522
522
  break;
523
523
  }
524
524
  }
525
525
  } finally {
526
- $e = !1, Oe.current = b, un(), Error.prepareStackTrace = E;
526
+ $e = !1, Oe.current = D, vn(), Error.prepareStackTrace = j;
527
527
  }
528
- var fe = r ? r.displayName || r.name : "", ce = fe ? Ce(fe) : "";
529
- return typeof r == "function" && Ee.set(r, ce), ce;
528
+ var fe = o ? o.displayName || o.name : "", ce = fe ? Ee(fe) : "";
529
+ return typeof o == "function" && Se.set(o, ce), ce;
530
530
  }
531
- function fn(r, h, m) {
532
- return et(r, !1);
531
+ function yn(o, h, p) {
532
+ return rt(o, !1);
533
533
  }
534
- function hn(r) {
535
- var h = r.prototype;
534
+ function gn(o) {
535
+ var h = o.prototype;
536
536
  return !!(h && h.isReactComponent);
537
537
  }
538
- function Re(r, h, m) {
539
- if (r == null)
538
+ function Re(o, h, p) {
539
+ if (o == null)
540
540
  return "";
541
- if (typeof r == "function")
542
- return et(r, hn(r));
543
- if (typeof r == "string")
544
- return Ce(r);
545
- switch (r) {
541
+ if (typeof o == "function")
542
+ return rt(o, gn(o));
543
+ if (typeof o == "string")
544
+ return Ee(o);
545
+ switch (o) {
546
546
  case d:
547
- return Ce("Suspense");
548
- case v:
549
- return Ce("SuspenseList");
547
+ return Ee("Suspense");
548
+ case g:
549
+ return Ee("SuspenseList");
550
550
  }
551
- if (typeof r == "object")
552
- switch (r.$$typeof) {
551
+ if (typeof o == "object")
552
+ switch (o.$$typeof) {
553
553
  case c:
554
- return fn(r.render);
555
- case y:
556
- return Re(r.type, h, m);
557
- case g: {
558
- var w = r, E = w._payload, b = w._init;
554
+ return yn(o.render);
555
+ case T:
556
+ return Re(o.type, h, p);
557
+ case y: {
558
+ var _ = o, j = _._payload, D = _._init;
559
559
  try {
560
- return Re(b(E), h, m);
561
- } catch (C) {
560
+ return Re(D(j), h, p);
561
+ } catch (b) {
562
562
  }
563
563
  }
564
564
  }
565
565
  return "";
566
566
  }
567
- var ye = Object.prototype.hasOwnProperty, tt = {}, nt = V.ReactDebugCurrentFrame;
568
- function be(r) {
569
- if (r) {
570
- var h = r._owner, m = Re(r.type, r._source, h ? h.type : null);
571
- nt.setExtraStackFrame(m);
567
+ var ye = Object.prototype.hasOwnProperty, ot = {}, it = S.ReactDebugCurrentFrame;
568
+ function be(o) {
569
+ if (o) {
570
+ var h = o._owner, p = Re(o.type, o._source, h ? h.type : null);
571
+ it.setExtraStackFrame(p);
572
572
  } else
573
- nt.setExtraStackFrame(null);
573
+ it.setExtraStackFrame(null);
574
574
  }
575
- function mn(r, h, m, w, E) {
575
+ function wn(o, h, p, _, j) {
576
576
  {
577
- var b = Function.call.bind(ye);
578
- for (var C in r)
579
- if (b(r, C)) {
580
- var _ = void 0;
577
+ var D = Function.call.bind(ye);
578
+ for (var b in o)
579
+ if (D(o, b)) {
580
+ var E = void 0;
581
581
  try {
582
- if (typeof r[C] != "function") {
583
- var X = Error((w || "React class") + ": " + m + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
582
+ if (typeof o[b] != "function") {
583
+ var X = Error((_ || "React class") + ": " + p + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
584
584
  throw X.name = "Invariant Violation", X;
585
585
  }
586
- _ = r[C](h, C, w, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
587
- } catch (H) {
588
- _ = H;
586
+ E = o[b](h, b, _, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
587
+ } catch (W) {
588
+ E = W;
589
589
  }
590
- _ && !(_ instanceof Error) && (be(E), R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", w || "React class", m, C, typeof _), be(null)), _ instanceof Error && !(_.message in tt) && (tt[_.message] = !0, be(E), R("Failed %s type: %s", m, _.message), be(null));
590
+ E && !(E instanceof Error) && (be(j), P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", _ || "React class", p, b, typeof E), be(null)), E instanceof Error && !(E.message in ot) && (ot[E.message] = !0, be(j), P("Failed %s type: %s", p, E.message), be(null));
591
591
  }
592
592
  }
593
593
  }
594
- var pn = Array.isArray;
595
- function Ue(r) {
596
- return pn(r);
594
+ var _n = Array.isArray;
595
+ function Ue(o) {
596
+ return _n(o);
597
597
  }
598
- function vn(r) {
598
+ function Tn(o) {
599
599
  {
600
- var h = typeof Symbol == "function" && Symbol.toStringTag, m = h && r[Symbol.toStringTag] || r.constructor.name || "Object";
601
- return m;
600
+ var h = typeof Symbol == "function" && Symbol.toStringTag, p = h && o[Symbol.toStringTag] || o.constructor.name || "Object";
601
+ return p;
602
602
  }
603
603
  }
604
- function yn(r) {
604
+ function xn(o) {
605
605
  try {
606
- return rt(r), !1;
606
+ return st(o), !1;
607
607
  } catch (h) {
608
608
  return !0;
609
609
  }
610
610
  }
611
- function rt(r) {
612
- return "" + r;
611
+ function st(o) {
612
+ return "" + o;
613
613
  }
614
- function ot(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);
614
+ function at(o) {
615
+ if (xn(o))
616
+ return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Tn(o)), st(o);
617
617
  }
618
- var it = V.ReactCurrentOwner, gn = {
618
+ var lt = S.ReactCurrentOwner, Cn = {
619
619
  key: !0,
620
620
  ref: !0,
621
621
  __self: !0,
622
622
  __source: !0
623
- }, st, at;
624
- function wn(r) {
625
- if (ye.call(r, "ref")) {
626
- var h = Object.getOwnPropertyDescriptor(r, "ref").get;
623
+ }, ct, ut;
624
+ function En(o) {
625
+ if (ye.call(o, "ref")) {
626
+ var h = Object.getOwnPropertyDescriptor(o, "ref").get;
627
627
  if (h && h.isReactWarning)
628
628
  return !1;
629
629
  }
630
- return r.ref !== void 0;
630
+ return o.ref !== void 0;
631
631
  }
632
- function xn(r) {
633
- if (ye.call(r, "key")) {
634
- var h = Object.getOwnPropertyDescriptor(r, "key").get;
632
+ function Sn(o) {
633
+ if (ye.call(o, "key")) {
634
+ var h = Object.getOwnPropertyDescriptor(o, "key").get;
635
635
  if (h && h.isReactWarning)
636
636
  return !1;
637
637
  }
638
- return r.key !== void 0;
638
+ return o.key !== void 0;
639
639
  }
640
- function Tn(r, h) {
641
- typeof r.ref == "string" && it.current;
640
+ function Rn(o, h) {
641
+ typeof o.ref == "string" && lt.current;
642
642
  }
643
- function _n(r, h) {
643
+ function bn(o, h) {
644
644
  {
645
- var m = function() {
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));
645
+ var p = function() {
646
+ ct || (ct = !0, P("%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));
647
647
  };
648
- m.isReactWarning = !0, Object.defineProperty(r, "key", {
649
- get: m,
648
+ p.isReactWarning = !0, Object.defineProperty(o, "key", {
649
+ get: p,
650
650
  configurable: !0
651
651
  });
652
652
  }
653
653
  }
654
- function Cn(r, h) {
654
+ function Pn(o, h) {
655
655
  {
656
- var m = function() {
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));
656
+ var p = function() {
657
+ ut || (ut = !0, P("%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));
658
658
  };
659
- m.isReactWarning = !0, Object.defineProperty(r, "ref", {
660
- get: m,
659
+ p.isReactWarning = !0, Object.defineProperty(o, "ref", {
660
+ get: p,
661
661
  configurable: !0
662
662
  });
663
663
  }
664
664
  }
665
- var En = function(r, h, m, w, E, b, C) {
666
- var _ = {
665
+ var Ln = function(o, h, p, _, j, D, b) {
666
+ var E = {
667
667
  // This tag allows us to uniquely identify this as a React Element
668
668
  $$typeof: t,
669
669
  // Built-in properties that belong on the element
670
- type: r,
670
+ type: o,
671
671
  key: h,
672
- ref: m,
673
- props: C,
672
+ ref: p,
673
+ props: b,
674
674
  // Record the component responsible for creating this element.
675
- _owner: b
675
+ _owner: D
676
676
  };
677
- return _._store = {}, Object.defineProperty(_._store, "validated", {
677
+ return E._store = {}, Object.defineProperty(E._store, "validated", {
678
678
  configurable: !1,
679
679
  enumerable: !1,
680
680
  writable: !0,
681
681
  value: !1
682
- }), Object.defineProperty(_, "_self", {
682
+ }), Object.defineProperty(E, "_self", {
683
683
  configurable: !1,
684
684
  enumerable: !1,
685
685
  writable: !1,
686
- value: w
687
- }), Object.defineProperty(_, "_source", {
686
+ value: _
687
+ }), Object.defineProperty(E, "_source", {
688
688
  configurable: !1,
689
689
  enumerable: !1,
690
690
  writable: !1,
691
- value: E
692
- }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
691
+ value: j
692
+ }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
693
693
  };
694
- function Rn(r, h, m, w, E) {
694
+ function jn(o, h, p, _, j) {
695
695
  {
696
- var b, C = {}, _ = null, X = null;
697
- m !== void 0 && (ot(m), _ = "" + m), xn(h) && (ot(h.key), _ = "" + h.key), wn(h) && (X = h.ref, Tn(h, E));
698
- for (b in h)
699
- ye.call(h, b) && !gn.hasOwnProperty(b) && (C[b] = h[b]);
700
- if (r && r.defaultProps) {
701
- var H = r.defaultProps;
702
- for (b in H)
703
- C[b] === void 0 && (C[b] = H[b]);
696
+ var D, b = {}, E = null, X = null;
697
+ p !== void 0 && (at(p), E = "" + p), Sn(h) && (at(h.key), E = "" + h.key), En(h) && (X = h.ref, Rn(h, j));
698
+ for (D in h)
699
+ ye.call(h, D) && !Cn.hasOwnProperty(D) && (b[D] = h[D]);
700
+ if (o && o.defaultProps) {
701
+ var W = o.defaultProps;
702
+ for (D in W)
703
+ b[D] === void 0 && (b[D] = W[D]);
704
704
  }
705
- if (_ || X) {
706
- var $ = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
707
- _ && _n(C, $), X && Cn(C, $);
705
+ if (E || X) {
706
+ var z = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
707
+ E && bn(b, z), X && Pn(b, z);
708
708
  }
709
- return En(r, _, X, E, w, it.current, C);
709
+ return Ln(o, E, X, j, _, lt.current, b);
710
710
  }
711
711
  }
712
- var Be = V.ReactCurrentOwner, lt = V.ReactDebugCurrentFrame;
713
- function de(r) {
714
- if (r) {
715
- var h = r._owner, m = Re(r.type, r._source, h ? h.type : null);
716
- lt.setExtraStackFrame(m);
712
+ var Be = S.ReactCurrentOwner, dt = S.ReactDebugCurrentFrame;
713
+ function de(o) {
714
+ if (o) {
715
+ var h = o._owner, p = Re(o.type, o._source, h ? h.type : null);
716
+ dt.setExtraStackFrame(p);
717
717
  } else
718
- lt.setExtraStackFrame(null);
718
+ dt.setExtraStackFrame(null);
719
719
  }
720
- var ze;
721
- ze = !1;
722
- function We(r) {
723
- return typeof r == "object" && r !== null && r.$$typeof === t;
720
+ var We;
721
+ We = !1;
722
+ function ze(o) {
723
+ return typeof o == "object" && o !== null && o.$$typeof === t;
724
724
  }
725
- function ct() {
725
+ function ft() {
726
726
  {
727
727
  if (Be.current) {
728
- var r = K(Be.current.type);
729
- if (r)
728
+ var o = Y(Be.current.type);
729
+ if (o)
730
730
  return `
731
731
 
732
- Check the render method of \`` + r + "`.";
732
+ Check the render method of \`` + o + "`.";
733
733
  }
734
734
  return "";
735
735
  }
736
736
  }
737
- function bn(r) {
737
+ function In(o) {
738
738
  return "";
739
739
  }
740
- var ut = {};
741
- function Sn(r) {
740
+ var ht = {};
741
+ function kn(o) {
742
742
  {
743
- var h = ct();
743
+ var h = ft();
744
744
  if (!h) {
745
- var m = typeof r == "string" ? r : r.displayName || r.name;
746
- m && (h = `
745
+ var p = typeof o == "string" ? o : o.displayName || o.name;
746
+ p && (h = `
747
747
 
748
- Check the top-level render call using <` + m + ">.");
748
+ Check the top-level render call using <` + p + ">.");
749
749
  }
750
750
  return h;
751
751
  }
752
752
  }
753
- function dt(r, h) {
753
+ function mt(o, h) {
754
754
  {
755
- if (!r._store || r._store.validated || r.key != null)
755
+ if (!o._store || o._store.validated || o.key != null)
756
756
  return;
757
- r._store.validated = !0;
758
- var m = Sn(h);
759
- if (ut[m])
757
+ o._store.validated = !0;
758
+ var p = kn(h);
759
+ if (ht[p])
760
760
  return;
761
- ut[m] = !0;
762
- var w = "";
763
- r && r._owner && r._owner !== Be.current && (w = " It was passed a child from " + K(r._owner.type) + "."), de(r), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, w), de(null);
761
+ ht[p] = !0;
762
+ var _ = "";
763
+ o && o._owner && o._owner !== Be.current && (_ = " It was passed a child from " + Y(o._owner.type) + "."), de(o), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, _), de(null);
764
764
  }
765
765
  }
766
- function ft(r, h) {
766
+ function vt(o, h) {
767
767
  {
768
- if (typeof r != "object")
768
+ if (typeof o != "object")
769
769
  return;
770
- if (Ue(r))
771
- for (var m = 0; m < r.length; m++) {
772
- var w = r[m];
773
- We(w) && dt(w, h);
770
+ if (Ue(o))
771
+ for (var p = 0; p < o.length; p++) {
772
+ var _ = o[p];
773
+ ze(_) && mt(_, h);
774
774
  }
775
- else if (We(r))
776
- r._store && (r._store.validated = !0);
777
- else if (r) {
778
- var E = S(r);
779
- if (typeof E == "function" && E !== r.entries)
780
- for (var b = E.call(r), C; !(C = b.next()).done; )
781
- We(C.value) && dt(C.value, h);
775
+ else if (ze(o))
776
+ o._store && (o._store.validated = !0);
777
+ else if (o) {
778
+ var j = w(o);
779
+ if (typeof j == "function" && j !== o.entries)
780
+ for (var D = j.call(o), b; !(b = D.next()).done; )
781
+ ze(b.value) && mt(b.value, h);
782
782
  }
783
783
  }
784
784
  }
785
- function jn(r) {
785
+ function Dn(o) {
786
786
  {
787
- var h = r.type;
787
+ var h = o.type;
788
788
  if (h == null || typeof h == "string")
789
789
  return;
790
- var m;
790
+ var p;
791
791
  if (typeof h == "function")
792
- m = h.propTypes;
792
+ p = h.propTypes;
793
793
  else if (typeof h == "object" && (h.$$typeof === c || // Note: Memo only checks outer props here.
794
794
  // Inner props are checked in the reconciler.
795
- h.$$typeof === y))
796
- m = h.propTypes;
795
+ h.$$typeof === T))
796
+ p = h.propTypes;
797
797
  else
798
798
  return;
799
- if (m) {
800
- var w = K(h);
801
- mn(m, r.props, "prop", w, r);
802
- } else if (h.PropTypes !== void 0 && !ze) {
803
- ze = !0;
804
- var E = K(h);
805
- R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
799
+ if (p) {
800
+ var _ = Y(h);
801
+ wn(p, o.props, "prop", _, o);
802
+ } else if (h.PropTypes !== void 0 && !We) {
803
+ We = !0;
804
+ var j = Y(h);
805
+ P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
806
806
  }
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.");
807
+ typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
808
808
  }
809
809
  }
810
- function Pn(r) {
810
+ function Mn(o) {
811
811
  {
812
- for (var h = Object.keys(r.props), m = 0; m < h.length; m++) {
813
- var w = h[m];
814
- if (w !== "children" && w !== "key") {
815
- de(r), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), de(null);
812
+ for (var h = Object.keys(o.props), p = 0; p < h.length; p++) {
813
+ var _ = h[p];
814
+ if (_ !== "children" && _ !== "key") {
815
+ de(o), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), de(null);
816
816
  break;
817
817
  }
818
818
  }
819
- r.ref !== null && (de(r), R("Invalid attribute `ref` supplied to `React.Fragment`."), de(null));
819
+ o.ref !== null && (de(o), P("Invalid attribute `ref` supplied to `React.Fragment`."), de(null));
820
820
  }
821
821
  }
822
- var ht = {};
823
- function mt(r, h, m, w, E, b) {
822
+ var pt = {};
823
+ function yt(o, h, p, _, j, D) {
824
824
  {
825
- var C = O(r);
826
- if (!C) {
827
- var _ = "";
828
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (_ += " 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 = bn();
830
- X ? _ += X : _ += ct();
831
- var H;
832
- r === null ? H = "null" : Ue(r) ? H = "array" : r !== void 0 && r.$$typeof === t ? (H = "<" + (K(r.type) || "Unknown") + " />", _ = " 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, _);
825
+ var b = A(o);
826
+ if (!b) {
827
+ var E = "";
828
+ (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (E += " 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 = In();
830
+ X ? E += X : E += ft();
831
+ var W;
832
+ o === null ? W = "null" : Ue(o) ? W = "array" : o !== void 0 && o.$$typeof === t ? (W = "<" + (Y(o.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : W = typeof o, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, E);
833
833
  }
834
- var $ = Rn(r, h, m, E, b);
835
- if ($ == null)
836
- return $;
837
- if (C) {
838
- var ee = h.children;
839
- if (ee !== void 0)
840
- if (w)
841
- if (Ue(ee)) {
842
- for (var fe = 0; fe < ee.length; fe++)
843
- ft(ee[fe], r);
844
- Object.freeze && Object.freeze(ee);
834
+ var z = jn(o, h, p, j, D);
835
+ if (z == null)
836
+ return z;
837
+ if (b) {
838
+ var te = h.children;
839
+ if (te !== void 0)
840
+ if (_)
841
+ if (Ue(te)) {
842
+ for (var fe = 0; fe < te.length; fe++)
843
+ vt(te[fe], o);
844
+ Object.freeze && Object.freeze(te);
845
845
  } else
846
- R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
846
+ P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
847
847
  else
848
- ft(ee, r);
848
+ vt(te, o);
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";
853
- }), Ze = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
854
- if (!ht[ce + Ze]) {
855
- var Mn = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
856
- R(`A props object containing a "key" prop is being spread into JSX:
851
+ var ce = Y(o), Q = Object.keys(h).filter(function(Hn) {
852
+ return Hn !== "key";
853
+ }), qe = Q.length > 0 ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}";
854
+ if (!pt[ce + qe]) {
855
+ var On = Q.length > 0 ? "{" + Q.join(": ..., ") + ": ...}" : "{}";
856
+ P(`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, Mn, ce), ht[ce + Ze] = !0;
861
+ <%s key={someKey} {...props} />`, qe, ce, On, ce), pt[ce + qe] = !0;
862
862
  }
863
863
  }
864
- return r === o ? Pn($) : jn($), $;
864
+ return o === r ? Mn(z) : Dn(z), z;
865
865
  }
866
866
  }
867
- function Ln(r, h, m) {
868
- return mt(r, h, m, !0);
867
+ function Nn(o, h, p) {
868
+ return yt(o, h, p, !0);
869
869
  }
870
- function In(r, h, m) {
871
- return mt(r, h, m, !1);
870
+ function Fn(o, h, p) {
871
+ return yt(o, h, p, !1);
872
872
  }
873
- var kn = In, Dn = Ln;
874
- we.Fragment = o, we.jsx = kn, we.jsxs = Dn;
873
+ var Vn = Fn, An = Nn;
874
+ we.Fragment = r, we.jsx = Vn, we.jsxs = An;
875
875
  })()), we;
876
876
  }
877
- var xt;
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 : D;
888
- function Ne(e, t) {
889
- const n = N(e);
890
- Ot(() => {
877
+ var Ct;
878
+ function Jn() {
879
+ return Ct || (Ct = 1, process.env.NODE_ENV === "production" ? Ie.exports = Gn() : Ie.exports = Xn()), Ie.exports;
880
+ }
881
+ var a = Jn();
882
+ const Ut = typeof window != "undefined" ? Wn : N;
883
+ function Ce(e, t) {
884
+ const n = F(e);
885
+ Ut(() => {
891
886
  n.current = e;
892
- }, [e]), D(() => {
887
+ }, [e]), N(() => {
893
888
  if (t === null)
894
889
  return;
895
- const o = setInterval(() => {
890
+ const r = setInterval(() => {
896
891
  n.current();
897
892
  }, t);
898
893
  return () => {
899
- clearInterval(o);
894
+ clearInterval(r);
900
895
  };
901
896
  }, [t]);
902
897
  }
903
- function Jn(e) {
904
- const [, t] = G(0);
905
- Ne(() => t((n) => n + 1), e);
906
- }
907
- const Qn = () => Lt((e) => ({
908
- delay: 0,
909
- startDate: null,
910
- viewerCount: null,
911
- setDelay: (t) => e({ delay: t }),
912
- setStartDate: (t) => e({ startDate: t }),
913
- setViewerCount: (t) => e({ viewerCount: t })
914
- })), Ht = jt(
915
- null
916
- ), er = ({ children: e }) => {
917
- const t = N(
918
- null
919
- );
920
- return t.current || (t.current = Qn()), /* @__PURE__ */ s.jsx(Ht.Provider, { value: t.current, children: e });
921
- }, A = (e) => {
922
- const t = Pt(Ht);
923
- if (!t)
924
- throw new Error("usePlayerStore must be used within PlayerStoreProvider");
925
- return It(t, e);
926
- };
927
- function tr(e, t, n) {
928
- const o = {
929
- days: 86400,
930
- hours: 3600,
931
- minutes: 60,
932
- seconds: 1,
933
- milliseconds: 1e-3
934
- };
935
- return e * (o[t] / o[n]);
936
- }
937
- function nr(e) {
938
- return tr(e, "milliseconds", "seconds");
939
- }
940
- const Te = (e) => {
941
- if (isNaN(e) || e === 1 / 0) return "0:00";
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
- return n === 0 ? `${o}:${t(a)}` : `${n}:${t(o)}:${t(a)}`;
944
- };
945
- function rr(e, t) {
946
- var n, o, a, l, u, i;
898
+ function Qn(e, t) {
899
+ var n, r, s, l, u, i;
947
900
  if (typeof Intl != "undefined" && Intl.DateTimeFormat)
948
901
  try {
949
902
  const d = new Intl.DateTimeFormat("en-US", {
@@ -955,26 +908,26 @@ function rr(e, t) {
955
908
  minute: "2-digit",
956
909
  second: "2-digit",
957
910
  hour12: !1
958
- }).formatToParts(e), v = parseInt(
959
- ((n = d.find((S) => S.type === "year")) == null ? void 0 : n.value) || "0",
911
+ }).formatToParts(e), g = parseInt(
912
+ ((n = d.find((w) => w.type === "year")) == null ? void 0 : n.value) || "0",
960
913
  10
961
- ), y = parseInt(
962
- ((o = d.find((S) => S.type === "month")) == null ? void 0 : o.value) || "0",
914
+ ), T = parseInt(
915
+ ((r = d.find((w) => w.type === "month")) == null ? void 0 : r.value) || "0",
963
916
  10
964
- ) - 1, g = parseInt(
965
- ((a = d.find((S) => S.type === "day")) == null ? void 0 : a.value) || "0",
917
+ ) - 1, y = parseInt(
918
+ ((s = d.find((w) => w.type === "day")) == null ? void 0 : s.value) || "0",
966
919
  10
967
- ), P = parseInt(
968
- ((l = d.find((S) => S.type === "hour")) == null ? void 0 : l.value) || "0",
920
+ ), x = parseInt(
921
+ ((l = d.find((w) => w.type === "hour")) == null ? void 0 : l.value) || "0",
969
922
  10
970
- ), k = parseInt(
971
- ((u = d.find((S) => S.type === "minute")) == null ? void 0 : u.value) || "0",
923
+ ), L = parseInt(
924
+ ((u = d.find((w) => w.type === "minute")) == null ? void 0 : u.value) || "0",
972
925
  10
973
- ), T = parseInt(
974
- ((i = d.find((S) => S.type === "second")) == null ? void 0 : i.value) || "0",
926
+ ), C = parseInt(
927
+ ((i = d.find((w) => w.type === "second")) == null ? void 0 : i.value) || "0",
975
928
  10
976
929
  );
977
- return new Date(v, y, g, P, k, T);
930
+ return new Date(g, T, y, x, L, C);
978
931
  } catch (c) {
979
932
  return console.warn(
980
933
  `Failed to convert date to timezone ${t}, returning original date:`,
@@ -985,12 +938,62 @@ function rr(e, t) {
985
938
  "Intl.DateTimeFormat not available, timezone conversion may be inaccurate"
986
939
  ), e;
987
940
  }
988
- function $t(e) {
941
+ function er(e, t, n) {
942
+ return Bt(
943
+ t.getTime() - e.getTime(),
944
+ n,
945
+ "milliseconds"
946
+ );
947
+ }
948
+ function tr() {
949
+ const e = /* @__PURE__ */ new Date(), t = "YYYY-MM-DD HH:mm:ss.SSSSSS", n = (s, l = 2) => String(s).padStart(l, "0"), r = {
950
+ YYYY: String(e.getFullYear()),
951
+ MM: n(e.getMonth() + 1),
952
+ DD: n(e.getDate()),
953
+ HH: n(e.getHours()),
954
+ mm: n(e.getMinutes()),
955
+ ss: n(e.getSeconds()),
956
+ SSSSSS: n(e.getMilliseconds(), 3) + "000"
957
+ };
958
+ return Object.entries(r).reduce(
959
+ (s, [l, u]) => s.replace(l, u),
960
+ t
961
+ );
962
+ }
963
+ const Te = (e) => {
964
+ if (isNaN(e) || e === 1 / 0) return "0:00";
965
+ const t = (l) => (l < 10 ? "0" : "") + l, n = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), s = Math.floor(e % 60);
966
+ return n === 0 ? `${r}:${t(s)}` : `${n}:${t(r)}:${t(s)}`;
967
+ };
968
+ function nr() {
969
+ try {
970
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
971
+ } catch (e) {
972
+ return console.warn(
973
+ "Failed to get time zone, returning default time zone:",
974
+ e
975
+ ), "Europe/Sarajevo";
976
+ }
977
+ }
978
+ function rr(e) {
979
+ return Bt(e, "milliseconds", "seconds");
980
+ }
981
+ function Bt(e, t, n) {
982
+ const r = {
983
+ days: 86400,
984
+ hours: 3600,
985
+ minutes: 60,
986
+ seconds: 1,
987
+ milliseconds: 1e-3
988
+ };
989
+ return e * (r[t] / r[n]);
990
+ }
991
+ function Wt(e) {
989
992
  var n;
990
993
  const t = typeof window != "undefined" && ((n = window.navigator) == null ? void 0 : n.userAgent) || "";
991
994
  return e.test(t);
992
995
  }
993
- const Ut = $t(/iPhone|iPad|iPod/i), or = $t(/Tizen/i);
996
+ const zt = Wt(/iPhone|iPad|iPod/i), or = Wt(/Tizen/i);
994
997
  function ir() {
995
998
  const e = document;
996
999
  return !!(e.fullscreenElement || e.mozFullScreenElement || e.webkitFullscreenElement || e.msFullscreenElement);
@@ -1006,7 +1009,7 @@ function lr(e, t) {
1006
1009
  e.removeEventListener("fullscreenchange", t), e.removeEventListener("webkitfullscreenchange", t), e.removeEventListener("mozfullscreenchange", t), e.removeEventListener("MSFullscreenChange", t);
1007
1010
  };
1008
1011
  }
1009
- const cr = () => Hn(), ur = (e, t) => ({
1012
+ const cr = () => zn(), ur = (e, t) => ({
1010
1013
  currentTime: 0,
1011
1014
  duration: 0,
1012
1015
  isEnded: !1,
@@ -1021,6 +1024,7 @@ const cr = () => Hn(), ur = (e, t) => ({
1021
1024
  startTime: -1,
1022
1025
  volume: 100,
1023
1026
  destroy: () => {
1027
+ t().isStarted && t().eventEmitter.emit("ended");
1024
1028
  },
1025
1029
  handleDurationChange: () => {
1026
1030
  const n = t().techRef.current;
@@ -1072,7 +1076,9 @@ const cr = () => Hn(), ur = (e, t) => ({
1072
1076
  }));
1073
1077
  },
1074
1078
  handlePlay: () => {
1075
- t().techRef.current && (t().eventEmitter.emit("play"), e({
1079
+ t().techRef.current && (t().eventEmitter.emit(
1080
+ t().isStarted && !t().isEnded ? "resume" : "play"
1081
+ ), e({
1076
1082
  isPlaying: !0,
1077
1083
  pauseTime: 0
1078
1084
  }));
@@ -1101,12 +1107,12 @@ const cr = () => Hn(), ur = (e, t) => ({
1101
1107
  n && t().eventEmitter.emit("volumeChange", { volume: n.volume });
1102
1108
  },
1103
1109
  handleError: (n) => {
1104
- const o = t().techRef.current;
1105
- if (!o) return;
1110
+ const r = t().techRef.current;
1111
+ if (!r) return;
1106
1112
  t().eventEmitter.emit("error", n);
1107
- const a = o.error;
1108
- if (!a) return;
1109
- const l = `${a.code}`, u = a.message || "Unknown error occurred";
1113
+ const s = r.error;
1114
+ if (!s) return;
1115
+ const l = `${s.code}`, u = s.message || "Unknown error occurred";
1110
1116
  e({ error: { message: u, code: l, tech: "native" } });
1111
1117
  },
1112
1118
  pause: () => {
@@ -1118,7 +1124,7 @@ const cr = () => Hn(), ur = (e, t) => ({
1118
1124
  }));
1119
1125
  },
1120
1126
  getPauseTimeDiff: () => !t().isStarted || !t().pauseTime ? 0 : parseInt(
1121
- nr(Date.now() - t().pauseTime).toFixed(0)
1127
+ rr(Date.now() - t().pauseTime).toFixed(0)
1122
1128
  ),
1123
1129
  play: () => {
1124
1130
  const n = t().techRef.current;
@@ -1139,9 +1145,12 @@ const cr = () => Hn(), ur = (e, t) => ({
1139
1145
  });
1140
1146
  });
1141
1147
  },
1148
+ restart: () => {
1149
+ t().eventEmitter.emit("restart");
1150
+ },
1142
1151
  seek: (n) => {
1143
- const o = t().techRef.current;
1144
- o && (o.currentTime = n, (o.paused || o.ended) && o.play(), e({
1152
+ const r = t().techRef.current;
1153
+ r && (r.currentTime = n, (r.paused || r.ended) && r.play(), e({
1145
1154
  seekTime: -1,
1146
1155
  currentTime: n,
1147
1156
  isStarted: !0,
@@ -1151,13 +1160,13 @@ const cr = () => Hn(), ur = (e, t) => ({
1151
1160
  },
1152
1161
  setIsLoading: (n) => e({ isLoading: n }),
1153
1162
  setIsLoop: (n) => {
1154
- const o = t().techRef.current;
1155
- o && (o.loop = n, e({ isLoop: n }));
1163
+ const r = t().techRef.current;
1164
+ r && (r.loop = n, e({ isLoop: n }));
1156
1165
  },
1157
1166
  setStartTime: (n) => e({ startTime: n }),
1158
1167
  setVolume: (n) => {
1159
- const o = t().techRef.current;
1160
- o && (o.muted = n === 0, o.volume = n / 100, e({ volume: n }));
1168
+ const r = t().techRef.current;
1169
+ r && (r.muted = n === 0, r.volume = n / 100, e({ volume: n }));
1161
1170
  },
1162
1171
  stop: () => {
1163
1172
  t().techRef.current && e({
@@ -1175,15 +1184,16 @@ const cr = () => Hn(), ur = (e, t) => ({
1175
1184
  idleLocks: new Set(n.idleLocks).add(t)
1176
1185
  })),
1177
1186
  removeIdleLock: (t) => e((n) => {
1178
- const o = new Set(n.idleLocks);
1179
- return o.delete(t), { idleLocks: o };
1187
+ const r = new Set(n.idleLocks);
1188
+ return r.delete(t), { idleLocks: r };
1180
1189
  })
1181
1190
  }), hr = (e, t) => ({
1182
1191
  level: null,
1183
1192
  levels: null,
1184
1193
  setLevels: (n) => e({ levels: n }),
1185
- setLevel: (n) => {
1186
- n && t().eventEmitter.emit("qualityChange", { level: n }), e({ level: n });
1194
+ setLevel: (n) => e({ level: n }),
1195
+ logLevel: (n) => {
1196
+ n && t().eventEmitter.emit("qualityChange", { level: n });
1187
1197
  }
1188
1198
  }), mr = (e, t) => ({
1189
1199
  isFullscreen: !1,
@@ -1192,57 +1202,199 @@ const cr = () => Hn(), ur = (e, t) => ({
1192
1202
  t().eventEmitter.emit("fullscreenChange", { isFullscreen: !1 }), ar(document), e({ isFullscreen: !1 });
1193
1203
  },
1194
1204
  requestFullscreen: () => {
1195
- const n = t().techRef.current, o = t().containerRef.current;
1196
- if (!n || !o) return;
1205
+ const n = t().techRef.current, r = t().containerRef.current;
1206
+ if (!n || !r) return;
1197
1207
  t().eventEmitter.emit("fullscreenChange", { isFullscreen: !0 });
1198
- const a = Ut ? n : o;
1199
- a && sr(a), e({ isFullscreen: !0 });
1208
+ const s = zt ? n : r;
1209
+ s && sr(s), e({ isFullscreen: !0 });
1200
1210
  },
1201
1211
  setIsFullscreen: (n) => e({ isFullscreen: n }),
1202
1212
  setIsFullscreenReady: (n) => e({ isFullscreenReady: n })
1203
- }), pr = (e) => ({
1213
+ }), vr = (e) => ({
1204
1214
  error: null,
1205
1215
  setError: (t) => e({ error: t })
1206
- }), vr = () => ({
1216
+ }), pr = () => ({
1207
1217
  eventEmitter: cr()
1208
- }), yr = (e) => () => j({}, e), gr = (e, t) => Lt()((...n) => j(j(j(j(j(j(j(j({}, ur(...n)), dr(...n)), fr(...n)), mr(...n)), hr(...n)), pr(...n)), vr(...n)), yr({
1218
+ }), yr = (e) => () => M({}, e), gr = (e, t) => Mt()((...n) => M(M(M(M(M(M(M(M({}, ur(...n)), dr(...n)), fr(...n)), mr(...n)), hr(...n)), vr(...n)), pr(...n)), yr({
1209
1219
  techRef: e,
1210
1220
  containerRef: t
1211
- })(...n))), Bt = jt(null);
1221
+ })(...n))), qt = It(null);
1212
1222
  function wr({ children: e }) {
1213
- const t = N(null), n = N(null), o = N(null);
1214
- return t.current || (t.current = gr(n, o)), /* @__PURE__ */ s.jsx(Bt.Provider, { value: t.current, children: e });
1223
+ const t = F(null), n = F(null), r = F(null);
1224
+ return t.current || (t.current = gr(n, r)), /* @__PURE__ */ a.jsx(qt.Provider, { value: t.current, children: e });
1215
1225
  }
1216
1226
  const f = (e) => {
1217
- const t = Pt(Bt);
1227
+ const t = kt(qt);
1218
1228
  if (!t)
1219
1229
  throw new Error("usePlayerStore must be used within PlayerStoreProvider");
1220
- return It(t, e);
1230
+ return Dt(t, e);
1231
+ }, _r = "0.0.51", Je = {
1232
+ version: _r
1233
+ }, Ye = 11e3, Ze = {
1234
+ DEBUG: 2,
1235
+ INFO: 3,
1236
+ WARNING: 4
1237
+ };
1238
+ function Yt({
1239
+ title: e,
1240
+ id: t,
1241
+ kind: n,
1242
+ delay: r,
1243
+ url: s
1244
+ }) {
1245
+ const l = F(null), u = F(!1), [i, c] = G(null), d = f((w) => w.eventEmitter), g = f((w) => w.isPlaying), y = (s.includes("staging") ? "stg" : "prd") === "stg" ? "https://collector-staging.spectar.tv/ingest" : "https://collector.spectar.tv/ingest";
1246
+ u.current = g;
1247
+ const x = O(
1248
+ async ({
1249
+ type: w,
1250
+ message: S,
1251
+ level: P = Ze.INFO,
1252
+ duration: R,
1253
+ valueStr1: B,
1254
+ valueStr2: V
1255
+ }) => {
1256
+ const m = {
1257
+ content_kind: n,
1258
+ datetime: {
1259
+ date: tr(),
1260
+ timezone: nr()
1261
+ },
1262
+ level_num: P,
1263
+ log_source: "fitnessanny_player",
1264
+ capp_version: Je.version,
1265
+ message: S,
1266
+ target_index: w === "client" ? "client_log" : "watching_activity_log"
1267
+ };
1268
+ e && (m.title = e), t && (m.value_int1 = t), B && (m.value_str1 = B), V && (m.value_str2 = V), w === "watch" && (R && (m.interval_duration = R), r && (m.catchup_time = r));
1269
+ const v = await fetch(y, {
1270
+ method: "POST",
1271
+ body: JSON.stringify(m)
1272
+ });
1273
+ if (!v.ok)
1274
+ throw new Error(`HTTP error! status: ${v.status}`);
1275
+ },
1276
+ [y, r, t, n, e]
1277
+ ), L = O((w) => {
1278
+ l.current = w != null ? w : /* @__PURE__ */ new Date();
1279
+ }, []), C = O(
1280
+ async (w) => {
1281
+ !w && l.current && (w = er(l.current, /* @__PURE__ */ new Date(), "milliseconds")), console.log("[Player][Activity]", "Watching", w), await x({ type: "watch", message: "WATCHING", duration: w });
1282
+ },
1283
+ [x]
1284
+ );
1285
+ return Ce(() => {
1286
+ C(i), L();
1287
+ }, i), N(() => {
1288
+ const w = () => {
1289
+ c(Ye), x({ type: "watch", message: "PLAY" }), L();
1290
+ }, S = () => {
1291
+ c(null), x({ type: "watch", message: "PAUSE" }), C(), L();
1292
+ }, P = () => {
1293
+ c(Ye), x({ type: "watch", message: "RESUME" }), L();
1294
+ }, R = () => {
1295
+ c(null), u.current && (x({ type: "watch", message: "STOP" }), C()), c(Ye), x({ type: "watch", message: "PLAY" }), L();
1296
+ }, B = () => {
1297
+ c(null), x({ type: "watch", message: "STOP" }), u.current && C(), L();
1298
+ }, V = ({ level: v }) => {
1299
+ v && x({
1300
+ type: "client",
1301
+ message: "QUALITY_CHANGE",
1302
+ level: Ze.DEBUG,
1303
+ valueStr1: v
1304
+ });
1305
+ }, m = (v) => {
1306
+ let U = "UNKNOWN_ERROR", I = "Unknown error occurred";
1307
+ v instanceof MediaError && (v.code && (U = `${v.code}`), v.message && (I = `${v.message}`)), x({
1308
+ type: "client",
1309
+ message: "ERROR",
1310
+ level: Ze.WARNING,
1311
+ valueStr1: U,
1312
+ valueStr2: I
1313
+ });
1314
+ };
1315
+ return d.on("play", w), d.on("pause", S), d.on("resume", P), d.on("restart", R), d.on("ended", B), d.on("qualityChange", V), d.on("error", m), () => {
1316
+ d.off("play", w), d.off("pause", S), d.off("resume", P), d.off("restart", R), d.off("ended", B), d.off("qualityChange", V), d.off("error", m);
1317
+ };
1318
+ }, [d, x, L, C]), null;
1319
+ }
1320
+ const Tr = () => Mt((e) => ({
1321
+ delay: 0,
1322
+ startDate: null,
1323
+ viewerCount: null,
1324
+ setDelay: (t) => e({ delay: t }),
1325
+ setStartDate: (t) => e({ startDate: t }),
1326
+ setViewerCount: (t) => e({ viewerCount: t })
1327
+ })), Zt = It(
1328
+ null
1329
+ ), xr = ({ children: e }) => {
1330
+ const t = F(
1331
+ null
1332
+ );
1333
+ return t.current || (t.current = Tr()), /* @__PURE__ */ a.jsx(Zt.Provider, { value: t.current, children: e });
1334
+ }, $ = (e) => {
1335
+ const t = kt(Zt);
1336
+ if (!t)
1337
+ throw new Error(
1338
+ "useLivePlayerStore must be used within PlayerStoreProvider"
1339
+ );
1340
+ return Dt(t, e);
1341
+ };
1342
+ function Kt(e) {
1343
+ try {
1344
+ const n = new URL(e).searchParams, r = {};
1345
+ return n.forEach((s, l) => {
1346
+ r[l] = s;
1347
+ }), r;
1348
+ } catch (t) {
1349
+ return console.error("Invalid URL:", t), {};
1350
+ }
1351
+ }
1352
+ function Cr({ url: e }) {
1353
+ const { video_id: t } = Kt(e), n = $((r) => r.delay);
1354
+ return /* @__PURE__ */ a.jsx(
1355
+ Yt,
1356
+ {
1357
+ kind: n ? "catchup" : "live",
1358
+ delay: n,
1359
+ url: e,
1360
+ id: t ? Number(t) : void 0
1361
+ }
1362
+ );
1363
+ }
1364
+ const Er = "_playerNotice_x3acc_1", Sr = "_playerNoticeTitle_x3acc_19", Rr = "_playerNoticeText_x3acc_28", br = "_playerNoticeLowZIndex_x3acc_37", ie = {
1365
+ playerNotice: Er,
1366
+ playerNoticeTitle: Sr,
1367
+ playerNoticeText: Rr,
1368
+ playerNoticeLowZIndex: br
1221
1369
  };
1222
- function xr(e) {
1370
+ function Pr(e) {
1371
+ const [, t] = G(0);
1372
+ Ce(() => t((n) => n + 1), e);
1373
+ }
1374
+ function Lr(e) {
1223
1375
  const t = e.split(`
1224
1376
  `);
1225
1377
  for (const n of t) {
1226
- const o = n.trim();
1227
- if (o.startsWith("#EXT-X-PROGRAM-DATE-TIME:")) {
1228
- const a = o.replace("#EXT-X-PROGRAM-DATE-TIME:", "").trim(), l = new Date(a);
1378
+ const r = n.trim();
1379
+ if (r.startsWith("#EXT-X-PROGRAM-DATE-TIME:")) {
1380
+ const s = r.replace("#EXT-X-PROGRAM-DATE-TIME:", "").trim(), l = new Date(s);
1229
1381
  if (!isNaN(l.getTime()))
1230
- return rr(l, "Europe/Sarajevo");
1382
+ return Qn(l, "Europe/Sarajevo");
1231
1383
  }
1232
1384
  }
1233
1385
  return null;
1234
1386
  }
1235
- function Tr(e, t) {
1387
+ function jr(e, t) {
1236
1388
  const n = e.split(`
1237
1389
  `);
1238
- let o = !1;
1239
- for (const a of n) {
1240
- const l = a.trim();
1390
+ let r = !1;
1391
+ for (const s of n) {
1392
+ const l = s.trim();
1241
1393
  if (l.startsWith("#EXT-X-STREAM-INF:")) {
1242
- o = !0;
1394
+ r = !0;
1243
1395
  continue;
1244
1396
  }
1245
- if (o && !l.startsWith("#")) {
1397
+ if (r && !l.startsWith("#")) {
1246
1398
  if (l.startsWith("http"))
1247
1399
  return l;
1248
1400
  {
@@ -1259,98 +1411,97 @@ function Tr(e, t) {
1259
1411
  }
1260
1412
  return null;
1261
1413
  }
1262
- function _r(e) {
1414
+ function Ir(e) {
1263
1415
  return e.replace("playlist.m3u8", "playlist_fmp4_dvr.m3u8");
1264
1416
  }
1265
- async function Cr(e) {
1417
+ async function kr(e) {
1266
1418
  try {
1267
- const t = _r(e);
1419
+ const t = Ir(e);
1268
1420
  console.log("Converting to DVR URL:", t);
1269
1421
  const n = await fetch(t);
1270
1422
  if (!n.ok)
1271
1423
  throw new Error(
1272
1424
  `Failed to fetch master playlist: ${n.status} ${n.statusText}`
1273
1425
  );
1274
- const o = await n.text(), a = Tr(
1275
- o,
1426
+ const r = await n.text(), s = jr(
1427
+ r,
1276
1428
  t
1277
1429
  );
1278
- if (!a)
1430
+ if (!s)
1279
1431
  throw new Error("No chunklist URL found in master playlist");
1280
- console.log("Found chunklist URL:", a);
1281
- const l = await fetch(a);
1432
+ console.log("Found chunklist URL:", s);
1433
+ const l = await fetch(s);
1282
1434
  if (!l.ok)
1283
1435
  throw new Error(
1284
1436
  `Failed to fetch chunklist: ${l.status} ${l.statusText}`
1285
1437
  );
1286
- const u = await l.text(), i = xr(u);
1438
+ const u = await l.text(), i = Lr(u);
1287
1439
  return i ? console.log("Successfully detected start time:", i.toISOString()) : console.log(" No start time found in chunklist"), i;
1288
1440
  } catch (t) {
1289
1441
  return console.error("Error getting start time from HLS URL:", t), null;
1290
1442
  }
1291
1443
  }
1292
- function Er(n) {
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 Cr(e);
1444
+ function Dr(n) {
1445
+ var r = n, { url: e } = r, t = re(r, ["url"]);
1446
+ const [s, l] = G(!0), u = $((d) => d.startDate), i = $((d) => d.setStartDate), c = O(async () => {
1447
+ const d = await kr(e);
1296
1448
  d && i(d);
1297
1449
  }, [e, i]);
1298
- return D(() => {
1450
+ return N(() => {
1299
1451
  (async () => {
1300
1452
  l(!0), await c(), l(!1);
1301
1453
  })();
1302
- }, [c]), Ne(c, u ? null : 5e3), a ? null : /* @__PURE__ */ s.jsx(Rr, j({}, t));
1454
+ }, [c]), Ce(c, u ? null : 5e3), s ? null : /* @__PURE__ */ a.jsx(Mr, M({}, t));
1303
1455
  }
1304
- function Rr({
1456
+ function Mr({
1305
1457
  children: e,
1306
- messages: t = {}
1458
+ messages: t
1307
1459
  }) {
1308
- var u, i, c;
1309
- const n = A((d) => d.startDate), o = f((d) => d.isStarted);
1310
- return Jn(o ? null : 5e3), n ? Date.now() < n.getTime() ? /* @__PURE__ */ s.jsx(
1311
- br,
1460
+ const n = $((u) => u.startDate), r = f((u) => u.isStarted);
1461
+ return Pr(r ? null : 5e3), n ? Date.now() < n.getTime() ? /* @__PURE__ */ a.jsx(
1462
+ Nr,
1312
1463
  {
1313
1464
  startDate: n,
1314
- title: (i = t == null ? void 0 : t.eventNotStarted) != null ? i : "Event has not started yet.",
1315
- message: (c = t == null ? void 0 : t.eventStartingSoon) != null ? c : "Starting in few seconds..."
1465
+ title: t.eventNotStarted,
1466
+ message: t.eventStartingSoon
1316
1467
  }
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.unableToPlay) != null ? u : "Unable to play the video. Please try again later." }) });
1468
+ ) : /* @__PURE__ */ a.jsx(a.Fragment, { children: e }) : /* @__PURE__ */ a.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ a.jsx("h3", { className: ie.playerNoticeTitle, children: t.unableToPlay }) });
1318
1469
  }
1319
- function br({ startDate: e, title: t, message: n }) {
1320
- const o = e.getTime() - Date.now(), a = Math.floor(o / (1e3 * 60 * 60)), l = Math.floor(
1321
- o % (1e3 * 60 * 60) / (1e3 * 60)
1470
+ function Nr({ startDate: e, title: t, message: n }) {
1471
+ const r = e.getTime() - Date.now(), s = Math.floor(r / (1e3 * 60 * 60)), l = Math.floor(
1472
+ r % (1e3 * 60 * 60) / (1e3 * 60)
1322
1473
  );
1323
- return a || l ? /* @__PURE__ */ s.jsxs("div", { className: ie.playerNotice, children: [
1324
- /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: t }),
1325
- /* @__PURE__ */ s.jsxs("p", { className: ie.playerNoticeText, children: [
1474
+ return s || l ? /* @__PURE__ */ a.jsxs("div", { className: ie.playerNotice, children: [
1475
+ /* @__PURE__ */ a.jsx("h3", { className: ie.playerNoticeTitle, children: t }),
1476
+ /* @__PURE__ */ a.jsxs("p", { className: ie.playerNoticeText, children: [
1326
1477
  "(",
1327
- a > 0 ? `${a}h ${l}m` : `${l}m`,
1478
+ s > 0 ? `${s}h ${l}m` : `${l}m`,
1328
1479
  ")"
1329
1480
  ] })
1330
- ] }) : /* @__PURE__ */ s.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: n }) });
1481
+ ] }) : /* @__PURE__ */ a.jsx("div", { className: ie.playerNotice, children: /* @__PURE__ */ a.jsx("h3", { className: ie.playerNoticeTitle, children: n }) });
1331
1482
  }
1332
- function zt({ callback: e }) {
1483
+ function Gt({ callback: e }) {
1333
1484
  const t = f((n) => n.eventEmitter);
1334
- return D(() => {
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 = (T) => e("volumeChange", T), c = (T) => e("fullscreenChange", T), d = (T) => e("qualityChange", T), v = (T) => e("loadedMetadata", T), y = () => e("loadStart", void 0), g = () => e("playing", void 0), P = () => e("waiting", void 0), k = () => e("error", void 0);
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", P), t.on("error", k), () => {
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", P), t.off("error", k);
1485
+ return N(() => {
1486
+ const n = () => e("play", void 0), r = () => e("pause", void 0), s = () => e("resume", void 0), l = () => e("restart", void 0), u = () => e("ended", void 0), i = () => e("seeking", void 0), c = () => e("seeked", void 0), d = (S) => e("volumeChange", S), g = (S) => e("fullscreenChange", S), T = (S) => e("qualityChange", S), y = (S) => e("loadedMetadata", S), x = () => e("loadStart", void 0), L = () => e("playing", void 0), C = () => e("waiting", void 0), w = () => e("error", void 0);
1487
+ return t.on("play", n), t.on("pause", r), t.on("resume", s), t.on("restart", l), t.on("ended", u), t.on("seeking", i), t.on("seeked", c), t.on("volumeChange", d), t.on("fullscreenChange", g), t.on("qualityChange", T), t.on("loadedMetadata", y), t.on("loadStart", x), t.on("playing", L), t.on("waiting", C), t.on("error", w), () => {
1488
+ t.off("play", n), t.off("pause", r), t.off("resume", s), t.off("restart", l), t.off("ended", u), t.off("seeking", i), t.off("seeked", c), t.off("volumeChange", d), t.off("fullscreenChange", g), t.off("qualityChange", T), t.off("loadedMetadata", y), t.off("loadStart", x), t.off("playing", L), t.off("waiting", C), t.off("error", w);
1338
1489
  };
1339
1490
  }, [e, t]), null;
1340
1491
  }
1341
- const Wt = (e, t = 0) => parseInt(
1492
+ const Xt = (e, t = 0) => parseInt(
1342
1493
  Math.max(0, (Date.now() - (e + t * 1e3)) / 1e3).toFixed(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
- 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
- return `${parseFloat((e / Math.pow(1024, l)).toFixed(o))}${a[l]}`;
1494
+ ), Jt = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3), Fr = (e, t) => Math.max(0, (t - e) / 1e3), Vr = (e, t = 0) => {
1495
+ const r = t < 0 ? 0 : t, s = ["bytes", "kb", "mb", "gb", "tb", "pb", "eb", "zb", "yb"], l = Math.floor(Math.log(e) / Math.log(1024));
1496
+ return `${parseFloat((e / Math.pow(1024, l)).toFixed(r))}${s[l]}`;
1346
1497
  };
1347
- function Pr({
1498
+ function Ar({
1348
1499
  isAuto: e,
1349
1500
  level: t,
1350
1501
  levels: n
1351
1502
  }) {
1352
- const o = n.length, a = [];
1353
- return o > 1 && a.push({
1503
+ const r = n.length, s = [];
1504
+ return r > 1 && s.push({
1354
1505
  sid: "quality-level-auto",
1355
1506
  label: "Auto",
1356
1507
  value: -1,
@@ -1360,43 +1511,43 @@ function Pr({
1360
1511
  return i === c ? 0 : i > c ? 1 : -1;
1361
1512
  }), n.map((l) => {
1362
1513
  const { bitrate: u, height: i, index: c } = l;
1363
- a.push({
1514
+ s.push({
1364
1515
  sid: `quality-level-${c}`,
1365
- label: i ? `${i}p` : jr(u),
1516
+ label: i ? `${i}p` : Vr(u),
1366
1517
  value: c,
1367
- selected: o === 1 || !e && c === t
1518
+ selected: r === 1 || !e && c === t
1368
1519
  });
1369
- }), a;
1520
+ }), s;
1370
1521
  }
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 D(() => {
1522
+ function Or({ callback: e }) {
1523
+ const t = $((l) => l.delay), n = $((l) => l.startDate), r = n ? n.getTime() : 0, s = f((l) => l.eventEmitter);
1524
+ return N(() => {
1374
1525
  const l = () => e("timeUpdate", {
1375
- currentTime: Zt(o, t),
1526
+ currentTime: Jt(r, t),
1376
1527
  duration: -1
1377
1528
  });
1378
- return a.on("timeUpdate", l), () => {
1379
- a.off("timeUpdate", l);
1529
+ return s.on("timeUpdate", l), () => {
1530
+ s.off("timeUpdate", l);
1380
1531
  };
1381
- }, [e, a]), /* @__PURE__ */ s.jsx(zt, { callback: e });
1532
+ }, [e, t, s, r]), /* @__PURE__ */ a.jsx(Gt, { callback: e });
1382
1533
  }
1383
- function qt() {
1384
- const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), o = f((i) => i.requestFullscreen), a = f((i) => i.setVolume), l = f((i) => i.volume), u = W(
1534
+ function Qt() {
1535
+ const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), r = f((i) => i.requestFullscreen), s = f((i) => i.setVolume), l = f((i) => i.volume), u = O(
1385
1536
  (i) => {
1386
1537
  let c = !1;
1387
1538
  if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
1388
1539
  switch (i.code) {
1389
1540
  case "ArrowUp":
1390
- a(l + 10 < 100 ? l + 10 : 100), c = !0;
1541
+ s(l + 10 < 100 ? l + 10 : 100), c = !0;
1391
1542
  break;
1392
1543
  case "ArrowDown":
1393
- a(l - 10 > 0 ? l - 10 : 0), c = !0;
1544
+ s(l - 10 > 0 ? l - 10 : 0), c = !0;
1394
1545
  break;
1395
1546
  case "KeyM":
1396
- a(l === 0 ? 100 : 0), c = !0;
1547
+ s(l === 0 ? 100 : 0), c = !0;
1397
1548
  break;
1398
1549
  case "KeyF":
1399
- n && (t ? e() : o(), c = !0);
1550
+ n && (t ? e() : r(), c = !0);
1400
1551
  break;
1401
1552
  }
1402
1553
  c && i.preventDefault();
@@ -1406,17 +1557,17 @@ function qt() {
1406
1557
  e,
1407
1558
  t,
1408
1559
  n,
1409
- o,
1410
- a,
1560
+ r,
1561
+ s,
1411
1562
  l
1412
1563
  ]
1413
1564
  );
1414
- return D(() => (document.addEventListener("keydown", u), () => {
1565
+ return N(() => (document.addEventListener("keydown", u), () => {
1415
1566
  document.removeEventListener("keydown", u);
1416
1567
  }), [u]), null;
1417
1568
  }
1418
- function Ir() {
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(
1569
+ function Hr() {
1570
+ const e = $((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), r = f((i) => i.getPauseTimeDiff), s = f((i) => i.play), l = $((i) => i.setDelay), u = O(
1420
1571
  (i) => {
1421
1572
  let c = !1;
1422
1573
  if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
@@ -1431,8 +1582,8 @@ function Ir() {
1431
1582
  if (t)
1432
1583
  n();
1433
1584
  else {
1434
- const d = o();
1435
- d && l(e + d), a();
1585
+ const d = r();
1586
+ d && l(e + d), s();
1436
1587
  }
1437
1588
  c = !0;
1438
1589
  break;
@@ -1440,169 +1591,186 @@ function Ir() {
1440
1591
  c && i.preventDefault();
1441
1592
  }
1442
1593
  },
1443
- [e, o, t, n, a, l]
1594
+ [e, r, t, n, s, l]
1444
1595
  );
1445
- return D(() => (document.addEventListener("keydown", u), () => {
1596
+ return N(() => (document.addEventListener("keydown", u), () => {
1446
1597
  document.removeEventListener("keydown", u);
1447
- }), [u]), /* @__PURE__ */ s.jsx(qt, {});
1598
+ }), [u]), /* @__PURE__ */ a.jsx(Qt, {});
1448
1599
  }
1449
- function Kt({ children: e }) {
1450
- return /* @__PURE__ */ s.jsx(wr, { children: e });
1600
+ function en({ children: e }) {
1601
+ return /* @__PURE__ */ a.jsx(wr, { children: e });
1451
1602
  }
1452
- function kr({ children: e }) {
1453
- return /* @__PURE__ */ s.jsx(er, { children: /* @__PURE__ */ s.jsx(Kt, { children: e }) });
1603
+ function $r({ children: e }) {
1604
+ return /* @__PURE__ */ a.jsx(xr, { children: /* @__PURE__ */ a.jsx(en, { children: e }) });
1454
1605
  }
1455
- function Dr({ url: e, isLive: t, messages: n }) {
1456
- const o = N(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 = N(0), y = N(null), g = 50, P = 1e4, k = W(
1457
- (x) => {
1458
- if (o.current && (o.current.nextLevel = x, u(null), l)) {
1459
- const M = l.map((p) => he(j({}, p), {
1460
- selected: p.value === x
1606
+ function Ur({ url: e, isLive: t, messages: n }) {
1607
+ const r = F(null), s = f((m) => m.level), l = f((m) => m.levels), u = f((m) => m.setLevel), i = f((m) => m.setLevels), c = f((m) => m.logLevel), d = f((m) => m.techRef), g = f((m) => m.setError), T = F(0), y = F(null), x = 50, L = 1e4, C = O(
1608
+ (m) => {
1609
+ if (r.current && (r.current.nextLevel = m, u(null), l)) {
1610
+ const v = l.map((U) => he(M({}, U), {
1611
+ selected: U.value === m
1461
1612
  }));
1462
- i(M);
1613
+ i(v);
1463
1614
  }
1464
1615
  },
1465
- [l, u, i, o]
1466
- ), T = W(() => {
1467
- o.current && (console.log("[Player][HLS] MEDIA_ATTACHED"), o.current.loadSource(e));
1468
- }, [e]), S = W(() => {
1469
- if (!o.current) return;
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, M = o.current.currentLevel, p = o.current.autoLevelEnabled;
1616
+ [l, u, i]
1617
+ ), w = O(() => {
1618
+ r.current && (console.log("[Player][HLS] MEDIA_ATTACHED"), r.current.loadSource(e));
1619
+ }, [e]), S = O(() => {
1620
+ if (!r.current) return;
1621
+ console.log("[Player][HLS] MANIFEST_LOADED"), g(null), y.current && (clearTimeout(y.current), y.current = null), T.current = 0;
1622
+ const m = r.current.levels, v = r.current.currentLevel, U = r.current.autoLevelEnabled;
1472
1623
  i(
1473
- Pr({
1474
- levels: x.map((U, Y) => {
1475
- const { bitrate: z, height: O, width: I } = U;
1624
+ Ar({
1625
+ levels: m.map((I, A) => {
1626
+ const { bitrate: k, height: J, width: Y } = I;
1476
1627
  return {
1477
- bitrate: z,
1478
- height: O,
1479
- index: Y,
1480
- width: I
1628
+ bitrate: k,
1629
+ height: J,
1630
+ index: A,
1631
+ width: Y
1481
1632
  };
1482
1633
  }),
1483
- level: M,
1484
- isAuto: p
1634
+ level: v,
1635
+ isAuto: U
1485
1636
  })
1486
1637
  );
1487
- }, [d, i]), V = W(
1638
+ }, [g, i]), P = O(() => {
1639
+ if (!r.current) return;
1640
+ console.log("[Player][HLS] LEVEL_SWITCHED");
1641
+ const m = r.current.levels, v = r.current.currentLevel;
1642
+ if (m[v] ? JSON.stringify(m[v]) : null) {
1643
+ let I = "";
1644
+ m[v].height ? I = `${m[v].height}p` : m[v].bitrate && (I = `${m[v].bitrate}bps`), c(I);
1645
+ }
1646
+ }, [c]), R = O(
1488
1647
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1489
- (x, M) => {
1490
- var p;
1491
- if (o.current && M.fatal)
1492
- switch (M.type) {
1493
- case re.ErrorTypes.NETWORK_ERROR:
1494
- let U = (p = n == null ? void 0 : n.unableToPlay) != null ? p : "Unable to play the video. Please try again later.", Y = "NETWORK_ERROR";
1495
- console.log("[Player][HLS] NETWORK_ERROR", M), t ? (v.current < g && (y.current && clearTimeout(y.current), v.current += 1, y.current = setTimeout(() => {
1496
- if (o.current)
1648
+ (m, v) => {
1649
+ if (r.current && v.fatal) {
1650
+ let U, I = "UNKNOWN_ERROR";
1651
+ switch (v.type) {
1652
+ case ee.ErrorTypes.NETWORK_ERROR:
1653
+ U = n.unableToPlay, console.log("[Player][HLS] NETWORK_ERROR", v), t ? (T.current < x && (y.current && clearTimeout(y.current), T.current += 1, y.current = setTimeout(() => {
1654
+ if (r.current)
1497
1655
  try {
1498
- console.log("[Player][HLS] Retrying stream..."), o.current.loadSource(e);
1499
- } catch (z) {
1500
- console.error("[Player][HLS] Retry failed:", z);
1656
+ console.log("[Player][HLS] Retrying stream..."), r.current.loadSource(e);
1657
+ } catch (A) {
1658
+ console.error("[Player][HLS] Retry failed:", A);
1501
1659
  }
1502
- }, P)), Y = "LIVE_MANIFEST_LOAD_ERROR") : o.current.startLoad(), d({ message: U, code: Y, tech: "hls" });
1660
+ }, L)), I = "LIVE_MANIFEST_LOAD_ERROR") : (r.current.startLoad(), I = "NETWORK_ERROR"), g({ message: U, code: I, tech: "hls" });
1503
1661
  break;
1504
- case re.ErrorTypes.MEDIA_ERROR:
1505
- o.current.recoverMediaError();
1662
+ case ee.ErrorTypes.MEDIA_ERROR:
1663
+ r.current.recoverMediaError();
1506
1664
  break;
1507
1665
  }
1666
+ }
1508
1667
  },
1509
- [t, e, d]
1510
- ), R = W(() => {
1511
- if (!c.current) return;
1512
- let x = {
1668
+ [t, e, g, n]
1669
+ ), B = O(() => {
1670
+ if (!d.current) return;
1671
+ const m = {
1513
1672
  startLevel: -1,
1514
1673
  maxBufferSize: 30 * 1024 * 1024
1515
1674
  // 30MB
1516
1675
  };
1517
- or ? (x.backBufferLength = -1, x.enableWorker = !1) : t ? x.backBufferLength = 10 : x.backBufferLength = 60;
1676
+ or ? (m.backBufferLength = -1, m.enableWorker = !1) : t ? m.backBufferLength = 10 : m.backBufferLength = 60;
1518
1677
  try {
1519
- 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, T), o.current.on(re.Events.MANIFEST_LOADED, S), o.current.on(re.Events.ERROR, V);
1520
- } catch (M) {
1521
- throw new Error(`Error initializing Hls: ${M}`);
1678
+ console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(m)), console.log("[Player][HLS] Version", ee.version), r.current = new ee(m), r.current.attachMedia(d.current), r.current.on(ee.Events.MEDIA_ATTACHED, w), r.current.on(ee.Events.MANIFEST_LOADED, S), r.current.on(ee.Events.LEVEL_SWITCHED, P), r.current.on(ee.Events.ERROR, R);
1679
+ } catch (v) {
1680
+ throw new Error(`Error initializing Hls: ${v}`);
1522
1681
  }
1523
1682
  }, [
1524
1683
  S,
1525
- T,
1526
- V,
1684
+ w,
1685
+ P,
1686
+ R,
1527
1687
  t,
1528
- c,
1688
+ d,
1529
1689
  e
1530
- ]), L = W(() => {
1531
- o.current && (o.current.off(re.Events.MEDIA_ATTACHED, T), 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;
1532
- }, [S, T, V]);
1533
- return D(() => {
1534
- a !== null && k(a);
1535
- }, [a, k]), D(() => (re.isSupported() && R(), L), [L, R]), null;
1536
- }
1537
- const Mr = "_playerVideo_wc0sm_1", Fr = {
1538
- playerVideo: Mr
1690
+ ]), V = O(() => {
1691
+ r.current && (r.current.off(ee.Events.MEDIA_ATTACHED, w), r.current.off(ee.Events.MANIFEST_LOADED, S), r.current.off(ee.Events.LEVEL_SWITCHED, P), r.current.off(ee.Events.ERROR, R), r.current.destroy(), r.current = null), y.current && (clearTimeout(y.current), y.current = null), T.current = 0;
1692
+ }, [
1693
+ P,
1694
+ S,
1695
+ w,
1696
+ R
1697
+ ]);
1698
+ return N(() => {
1699
+ s !== null && C(s);
1700
+ }, [s, C]), N(() => (ee.isSupported() && B(), V), [V, B]), null;
1701
+ }
1702
+ const Br = "_playerVideo_wc0sm_1", Wr = {
1703
+ playerVideo: Br
1539
1704
  };
1540
- function Yt({
1705
+ function tn({
1541
1706
  url: e,
1542
1707
  isLive: t,
1543
1708
  isMuted: n = !1,
1544
- messages: o = {}
1709
+ messages: r
1545
1710
  }) {
1546
- 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), P = f((p) => p.handleTimeUpdate), k = f((p) => p.handleWaiting), T = f((p) => p.handleVolumeChange), S = f((p) => p.handleError), V = f((p) => p.techRef), R = N(null), L = () => t ? {
1547
- onTimeUpdate: x
1711
+ const s = f((v) => v.destroy), l = f((v) => v.handleDurationChange), u = f((v) => v.handleEnd), i = f((v) => v.handleLoadedMetadata), c = f((v) => v.handleLoadStart), d = f((v) => v.handlePause), g = f((v) => v.handlePlay), T = f((v) => v.handlePlaying), y = f((v) => v.handleSeeked), x = f((v) => v.handleSeeking), L = f((v) => v.handleTimeUpdate), C = f((v) => v.handleWaiting), w = f((v) => v.handleVolumeChange), S = f((v) => v.handleError), P = f((v) => v.techRef), R = F(null), B = () => t ? {
1712
+ onTimeUpdate: V
1548
1713
  } : {
1549
- onDurationChange: a,
1714
+ onDurationChange: l,
1550
1715
  onSeeked: y,
1551
- onSeeking: g,
1552
- onTimeUpdate: x
1553
- }, x = () => {
1554
- (!R.current || Date.now() - R.current >= 1e3) && (P(), R.current = Date.now());
1555
- }, M = L();
1556
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1557
- /* @__PURE__ */ s.jsx(Dr, { isLive: t, url: e, messages: o }),
1558
- /* @__PURE__ */ s.jsx(
1716
+ onSeeking: x,
1717
+ onTimeUpdate: V
1718
+ }, V = () => {
1719
+ (!R.current || Date.now() - R.current >= 1e3) && (L(), R.current = Date.now());
1720
+ }, m = B();
1721
+ return N(() => () => {
1722
+ s();
1723
+ }, [s]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1724
+ /* @__PURE__ */ a.jsx(Ur, { isLive: t, url: e, messages: r }),
1725
+ /* @__PURE__ */ a.jsx(
1559
1726
  "video",
1560
- j({
1561
- ref: V,
1562
- className: Fr.playerVideo,
1727
+ M({
1728
+ ref: P,
1729
+ className: Wr.playerVideo,
1563
1730
  playsInline: !0,
1564
1731
  autoPlay: !0,
1565
1732
  controls: !1,
1566
1733
  muted: n,
1567
1734
  preload: "auto",
1568
1735
  crossOrigin: "anonymous",
1569
- onEnded: l,
1736
+ onEnded: u,
1570
1737
  onError: S,
1571
- onLoadedMetadata: u,
1572
- onLoadStart: i,
1573
- onPause: c,
1574
- onPlay: d,
1575
- onPlaying: v,
1576
- onWaiting: k,
1577
- onVolumeChange: T,
1738
+ onLoadedMetadata: i,
1739
+ onLoadStart: c,
1740
+ onPause: d,
1741
+ onPlay: g,
1742
+ onPlaying: T,
1743
+ onWaiting: C,
1744
+ onVolumeChange: w,
1578
1745
  tabIndex: -1
1579
- }, M)
1746
+ }, m)
1580
1747
  )
1581
1748
  ] });
1582
1749
  }
1583
- function Vr({ url: e, messages: t = {} }) {
1584
- const [n, o] = G(null), a = A((u) => u.delay), l = W(async () => {
1585
- o(
1586
- a ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${a}.m3u8`) : e
1750
+ function zr({ url: e, messages: t }) {
1751
+ const [n, r] = G(null), s = $((u) => u.delay), l = O(async () => {
1752
+ r(
1753
+ s ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${s}.m3u8`) : e
1587
1754
  );
1588
- }, [a, e]);
1589
- return D(() => {
1590
- l();
1591
- }, [l]), n ? /* @__PURE__ */ s.jsx(Yt, { url: n, isLive: !0, messages: t }) : null;
1755
+ }, [s, e]);
1756
+ return N(() => {
1757
+ const u = requestAnimationFrame(() => l());
1758
+ return () => cancelAnimationFrame(u);
1759
+ }, [l]), n ? /* @__PURE__ */ a.jsx(tn, { url: n, isLive: !0, messages: t }) : null;
1592
1760
  }
1593
- function Nr({ url: e }) {
1594
- return f((n) => n.isStarted) ? /* @__PURE__ */ s.jsx(Ar, { url: e }) : null;
1761
+ function qr({ url: e }) {
1762
+ return f((n) => n.isStarted) ? /* @__PURE__ */ a.jsx(Yr, { url: e }) : null;
1595
1763
  }
1596
- function Ar({ url: e }) {
1597
- const t = A((l) => l.setViewerCount), n = N(null), o = (l) => {
1764
+ function Yr({ url: e }) {
1765
+ const t = $((l) => l.setViewerCount), n = F(null), r = (l) => {
1598
1766
  try {
1599
1767
  return new URL(l).pathname.split("/").filter((d) => d.length > 0)[0] || null;
1600
1768
  } catch (u) {
1601
1769
  return console.error("Failed to extract URI from player URL:", u), null;
1602
1770
  }
1603
- }, a = async () => {
1771
+ }, s = O(async () => {
1604
1772
  var c;
1605
- const l = o(e);
1773
+ const l = r(e);
1606
1774
  if (!l) {
1607
1775
  console.error("Could not extract URI from URL:", e);
1608
1776
  return;
@@ -1615,51 +1783,51 @@ function Ar({ url: e }) {
1615
1783
  });
1616
1784
  if (!d.ok)
1617
1785
  throw new Error(`HTTP error! status: ${d.status}`);
1618
- const y = (c = (await d.json()).count) != null ? c : 0;
1619
- t(y);
1786
+ const T = (c = (await d.json()).count) != null ? c : 0;
1787
+ t(T);
1620
1788
  } catch (d) {
1621
1789
  if (d.name === "AbortError")
1622
1790
  return;
1623
1791
  console.error("Failed to fetch viewer count:", d), t(null);
1624
1792
  }
1625
- };
1626
- return D(() => (a(), () => {
1793
+ }, [t, e]);
1794
+ return N(() => (s(), () => {
1627
1795
  n.current && n.current.abort();
1628
- }), [e]), Ne(a, 15e3), null;
1796
+ }), [s, e]), Ce(s, 15e3), null;
1629
1797
  }
1630
- function Or(e, {
1798
+ function Zr(e, {
1631
1799
  defaultValue: t = !1,
1632
1800
  initializeWithValue: n = !0
1633
1801
  } = {}) {
1634
- const o = (i) => typeof window == "undefined" ? t : window.matchMedia(i).matches, [a, l] = G(() => n ? o(e) : t);
1802
+ const r = (i) => typeof window == "undefined" ? t : window.matchMedia(i).matches, [s, l] = G(() => n ? r(e) : t);
1635
1803
  function u() {
1636
- l(o(e));
1804
+ l(r(e));
1637
1805
  }
1638
- return Ot(() => {
1806
+ return Ut(() => {
1639
1807
  if (typeof window == "undefined")
1640
1808
  return;
1641
1809
  const i = window.matchMedia(e);
1642
1810
  return u(), i.addListener ? i.addListener(u) : i.addEventListener("change", u), () => {
1643
1811
  i.removeListener ? i.removeListener(u) : i.removeEventListener("change", u);
1644
1812
  };
1645
- }, [e]), a;
1646
- }
1647
- const Hr = "_playbackButton_lgsgw_1", $r = "_seekIndicator_lgsgw_23", Ur = "_seekIndicatorLeft_lgsgw_49", Br = "_seekIndicatorRight_lgsgw_53", zr = "_seekIndicatorVisible_lgsgw_57", me = {
1648
- playbackButton: Hr,
1649
- seekIndicator: $r,
1650
- seekIndicatorLeft: Ur,
1651
- seekIndicatorRight: Br,
1652
- seekIndicatorVisible: zr
1653
- }, Wr = 10;
1654
- function Xt(i) {
1813
+ }, [e]), s;
1814
+ }
1815
+ const Kr = "_playbackButton_lgsgw_1", Gr = "_seekIndicator_lgsgw_23", Xr = "_seekIndicatorLeft_lgsgw_49", Jr = "_seekIndicatorRight_lgsgw_53", Qr = "_seekIndicatorVisible_lgsgw_57", me = {
1816
+ playbackButton: Kr,
1817
+ seekIndicator: Gr,
1818
+ seekIndicatorLeft: Xr,
1819
+ seekIndicatorRight: Jr,
1820
+ seekIndicatorVisible: Qr
1821
+ }, eo = 10;
1822
+ function nn(i) {
1655
1823
  var c = i, {
1656
1824
  className: e,
1657
1825
  onClick: t,
1658
1826
  onForwardSeek: n,
1659
- onBackwardSeek: o,
1660
- maxForwardTime: a,
1827
+ onBackwardSeek: r,
1828
+ maxForwardTime: s,
1661
1829
  maxBackwardTime: l
1662
- } = c, u = ne(c, [
1830
+ } = c, u = re(c, [
1663
1831
  "className",
1664
1832
  "onClick",
1665
1833
  "onForwardSeek",
@@ -1667,236 +1835,239 @@ function Xt(i) {
1667
1835
  "maxForwardTime",
1668
1836
  "maxBackwardTime"
1669
1837
  ]);
1670
- return Or("(pointer: coarse)") ? /* @__PURE__ */ s.jsx(
1671
- qr,
1672
- j({
1838
+ return Zr("(pointer: coarse)") ? /* @__PURE__ */ a.jsx(
1839
+ no,
1840
+ M({
1673
1841
  className: e,
1674
- maxForwardTime: a,
1842
+ maxForwardTime: s,
1675
1843
  maxBackwardTime: l,
1676
1844
  onForwardSeek: n,
1677
- onBackwardSeek: o
1845
+ onBackwardSeek: r
1678
1846
  }, u)
1679
- ) : /* @__PURE__ */ s.jsx(Zr, j({ className: e, onClick: t }, u));
1847
+ ) : /* @__PURE__ */ a.jsx(to, M({ className: e, onClick: t }, u));
1680
1848
  }
1681
- function Zr(o) {
1682
- var a = o, { className: e, onClick: t } = a, n = ne(a, ["className", "onClick"]);
1683
- const l = N(null), u = f((T) => T.exitFullscreen), i = f((T) => T.isFullscreen), c = f((T) => T.requestFullscreen), d = f((T) => T.resetIdle), v = (T) => {
1684
- P() ? (g(), i ? u() : c()) : y(T);
1685
- }, y = (T) => {
1849
+ function to(r) {
1850
+ var s = r, { className: e, onClick: t } = s, n = re(s, ["className", "onClick"]);
1851
+ const l = F(null), u = f((C) => C.exitFullscreen), i = f((C) => C.isFullscreen), c = f((C) => C.requestFullscreen), d = f((C) => C.resetIdle), g = (C) => {
1852
+ x() ? (y(), i ? u() : c()) : T(C);
1853
+ }, T = (C) => {
1686
1854
  l.current = window.setTimeout(() => {
1687
- t == null || t(T), g();
1855
+ t == null || t(C), y();
1688
1856
  }, 200);
1689
- }, g = () => {
1857
+ }, y = () => {
1690
1858
  l.current !== null && (window.clearTimeout(l.current), l.current = null);
1691
- }, P = () => l.current !== null, k = () => {
1859
+ }, x = () => l.current !== null, L = () => {
1692
1860
  d();
1693
1861
  };
1694
- return D(() => () => {
1695
- g();
1696
- }, []), /* @__PURE__ */ s.jsx(
1862
+ return N(() => () => {
1863
+ y();
1864
+ }, []), /* @__PURE__ */ a.jsx(
1697
1865
  "button",
1698
- j({
1699
- onClick: v,
1700
- onMouseMove: k,
1866
+ M({
1867
+ onClick: g,
1868
+ onMouseMove: L,
1701
1869
  className: [me.playbackButton, e].filter(Boolean).join(" "),
1702
1870
  "aria-label": "Player gestures"
1703
1871
  }, n)
1704
1872
  );
1705
1873
  }
1706
- function qr(u) {
1874
+ function no(u) {
1707
1875
  var i = u, {
1708
1876
  className: e,
1709
1877
  maxForwardTime: t,
1710
1878
  maxBackwardTime: n,
1711
- onForwardSeek: o,
1712
- onBackwardSeek: a
1713
- } = i, l = ne(i, [
1879
+ onForwardSeek: r,
1880
+ onBackwardSeek: s
1881
+ } = i, l = re(i, [
1714
1882
  "className",
1715
1883
  "maxForwardTime",
1716
1884
  "maxBackwardTime",
1717
1885
  "onForwardSeek",
1718
1886
  "onBackwardSeek"
1719
1887
  ]);
1720
- const c = N(null), d = N({
1888
+ const c = F(null), d = F({
1721
1889
  single: null,
1722
1890
  indicator: null,
1723
1891
  accumulate: null
1724
- }), v = N(null), y = N(0), g = N(null), [P, k] = G({ visible: !1, direction: null, time: 0 }), T = f((p) => p.isIdle), S = f((p) => p.setIsIdle), V = f((p) => p.resetIdle), R = (p, U) => p < U / 2 ? "backward" : "forward", L = (p) => {
1725
- if (!v.current) return;
1726
- const U = p.changedTouches[0];
1727
- if (!U) return;
1728
- const Y = Date.now(), z = v.current.getBoundingClientRect(), O = U.clientX - z.left, I = U.clientY - z.top;
1729
- if (O < 0 || O > z.width || I < 0 || I > z.height)
1892
+ }), g = F(null), T = F(0), y = F(null), [x, L] = G({ visible: !1, direction: null, time: 0 }), C = f((m) => m.isIdle), w = f((m) => m.setIsIdle), S = f((m) => m.resetIdle), P = (m, v) => m < v / 2 ? "backward" : "forward", R = (m) => {
1893
+ if (!g.current) return;
1894
+ const v = m.changedTouches[0];
1895
+ if (!v) return;
1896
+ const U = Date.now(), I = g.current.getBoundingClientRect(), A = v.clientX - I.left, k = v.clientY - I.top;
1897
+ if (A < 0 || A > I.width || k < 0 || k > I.height)
1730
1898
  return;
1731
- const Q = c.current, K = Q ? Y - Q.time : 1 / 0, Z = R(O, z.width), oe = g.current !== null && g.current === Z && Q !== null && K < 700 && Math.abs(O - Q.x) < 100;
1732
- if (Q !== null && g.current === null && K < 300 && Math.abs(O - Q.x) < 50 || oe) {
1733
- 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);
1734
- const te = Z === "backward" ? n : t;
1735
- y.current = Math.min(
1736
- y.current + Wr,
1737
- te != null ? te : 1 / 0
1738
- ), x(Z, y.current), d.current.accumulate && window.clearTimeout(d.current.accumulate), d.current.accumulate = window.setTimeout(() => {
1739
- const q = y.current;
1740
- q > 0 && (g.current === "backward" ? a == null || a(q) : o == null || o(q), V()), y.current = 0, g.current = null, c.current = null, M(), d.current.accumulate = null;
1741
- }, 500), c.current = { time: Y, x: O };
1899
+ const J = c.current, Y = J ? U - J.time : 1 / 0, Z = P(A, I.width), oe = y.current !== null && y.current === Z && J !== null && Y < 700 && Math.abs(A - J.x) < 100;
1900
+ if (J !== null && y.current === null && Y < 300 && Math.abs(A - J.x) < 50 || oe) {
1901
+ m.preventDefault(), m.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null), S(), (y.current === null || y.current !== Z) && (T.current = 0, y.current = Z);
1902
+ const ne = Z === "backward" ? n : t;
1903
+ T.current = Math.min(
1904
+ T.current + eo,
1905
+ ne != null ? ne : 1 / 0
1906
+ ), B(Z, T.current), d.current.accumulate && window.clearTimeout(d.current.accumulate), d.current.accumulate = window.setTimeout(() => {
1907
+ const K = T.current;
1908
+ K > 0 && (y.current === "backward" ? s == null || s(K) : r == null || r(K), S()), T.current = 0, y.current = null, c.current = null, V(), d.current.accumulate = null;
1909
+ }, 500), c.current = { time: U, x: A };
1742
1910
  } else {
1743
- c.current = { time: Y, x: O }, d.current.single && window.clearTimeout(d.current.single);
1744
- const te = g.current !== null ? 700 : 350;
1911
+ c.current = { time: U, x: A }, d.current.single && window.clearTimeout(d.current.single);
1912
+ const ne = y.current !== null ? 700 : 350;
1745
1913
  d.current.single = window.setTimeout(() => {
1746
- if (g.current === null) {
1914
+ if (y.current === null) {
1747
1915
  d.current.single = null;
1748
- const q = T;
1749
- S(!q), q && V();
1916
+ const K = C;
1917
+ w(!K), K && S();
1750
1918
  }
1751
1919
  c.current = null;
1752
- }, te);
1920
+ }, ne);
1753
1921
  }
1754
- }, x = (p, U) => {
1755
- U !== 0 && (k({ visible: !0, direction: p, time: U }), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.indicator = window.setTimeout(() => {
1756
- M();
1922
+ }, B = (m, v) => {
1923
+ v !== 0 && (L({ visible: !0, direction: m, time: v }), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.indicator = window.setTimeout(() => {
1924
+ V();
1757
1925
  }, 700));
1758
- }, M = () => {
1759
- k({ visible: !1, direction: null, time: 0 }), d.current.indicator && (window.clearTimeout(d.current.indicator), d.current.indicator = null);
1926
+ }, V = () => {
1927
+ L({ visible: !1, direction: null, time: 0 }), d.current.indicator && (window.clearTimeout(d.current.indicator), d.current.indicator = null);
1760
1928
  };
1761
- return D(() => () => {
1762
- d.current.single && window.clearTimeout(d.current.single), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.accumulate && window.clearTimeout(d.current.accumulate);
1763
- }, []), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1764
- /* @__PURE__ */ s.jsx(
1929
+ return N(() => {
1930
+ const m = d.current;
1931
+ return () => {
1932
+ m != null && m.single && window.clearTimeout(m.single), m != null && m.indicator && window.clearTimeout(m.indicator), m != null && m.accumulate && window.clearTimeout(m.accumulate);
1933
+ };
1934
+ }, []), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1935
+ /* @__PURE__ */ a.jsx(
1765
1936
  "button",
1766
- j({
1767
- ref: v,
1768
- onTouchEnd: L,
1937
+ M({
1938
+ ref: g,
1939
+ onTouchEnd: R,
1769
1940
  className: [me.playbackButton, e].filter(Boolean).join(" "),
1770
1941
  "aria-label": "Player gestures"
1771
1942
  }, l)
1772
1943
  ),
1773
- P.visible && /* @__PURE__ */ s.jsxs(
1944
+ x.visible && /* @__PURE__ */ a.jsxs(
1774
1945
  "div",
1775
1946
  {
1776
- className: `${me.seekIndicator} ${me.seekIndicatorVisible} ${P.direction === "backward" ? me.seekIndicatorLeft : me.seekIndicatorRight}`,
1947
+ className: `${me.seekIndicator} ${me.seekIndicatorVisible} ${x.direction === "backward" ? me.seekIndicatorLeft : me.seekIndicatorRight}`,
1777
1948
  children: [
1778
- P.direction === "backward" ? "-" : "+",
1779
- Te(P.time)
1949
+ x.direction === "backward" ? "-" : "+",
1950
+ Te(x.time)
1780
1951
  ]
1781
1952
  }
1782
1953
  )
1783
1954
  ] });
1784
1955
  }
1785
- function Kr() {
1786
- 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;
1787
- return /* @__PURE__ */ s.jsx(
1788
- Xt,
1956
+ function ro() {
1957
+ const e = f((c) => c.isPlaying), t = f((c) => c.pause), n = f((c) => c.getPauseTimeDiff), r = f((c) => c.play), s = $((c) => c.delay), l = $((c) => c.setDelay), u = $((c) => c.startDate), i = u ? u.getTime() : 0;
1958
+ return /* @__PURE__ */ a.jsx(
1959
+ nn,
1789
1960
  {
1790
1961
  onClick: () => {
1791
1962
  if (e)
1792
1963
  t();
1793
1964
  else {
1794
1965
  const c = n();
1795
- c && l(a + c), o();
1966
+ c && l(s + c), r();
1796
1967
  }
1797
1968
  },
1798
1969
  onBackwardSeek: (c) => {
1799
- const d = a + c;
1970
+ const d = s + c;
1800
1971
  l(d);
1801
1972
  },
1802
1973
  onForwardSeek: (c) => {
1803
- const d = Math.max(0, a - c);
1974
+ const d = Math.max(0, s - c);
1804
1975
  l(d);
1805
1976
  },
1806
1977
  maxBackwardTime: Math.floor(i),
1807
- maxForwardTime: Math.floor(a)
1978
+ maxForwardTime: Math.floor(s)
1808
1979
  }
1809
1980
  );
1810
1981
  }
1811
- const Yr = "_playerButton_izwqq_1", Xr = "_playerButtonCircle_izwqq_42", Tt = {
1812
- playerButton: Yr,
1813
- playerButtonCircle: Xr
1982
+ const oo = "_playerButton_izwqq_1", io = "_playerButtonCircle_izwqq_42", Et = {
1983
+ playerButton: oo,
1984
+ playerButtonCircle: io
1814
1985
  }, le = Ve(
1815
- (a, o) => {
1816
- var l = a, { shape: e = "circle", className: t } = l, n = ne(l, ["shape", "className"]);
1817
- const u = e === "circle" ? Tt.playerButtonCircle : "", i = [Tt.playerButton, u, t].filter(Boolean).join(" ");
1818
- return /* @__PURE__ */ s.jsx("button", j({ ref: o, className: i }, n));
1986
+ (s, r) => {
1987
+ var l = s, { shape: e = "circle", className: t } = l, n = re(l, ["shape", "className"]);
1988
+ const u = e === "circle" ? Et.playerButtonCircle : "", i = [Et.playerButton, u, t].filter(Boolean).join(" ");
1989
+ return /* @__PURE__ */ a.jsx("button", M({ ref: r, className: i }, n));
1819
1990
  }
1820
1991
  );
1821
1992
  le.displayName = "PlayerButton";
1822
- const Gr = "_liveIndicator_1jczn_1", Jr = "_liveIndicatorHasDelay_1jczn_9", Qr = "_liveIndicatorNoDelay_1jczn_13", Ie = {
1823
- liveIndicator: Gr,
1824
- liveIndicatorHasDelay: Jr,
1825
- liveIndicatorNoDelay: Qr
1993
+ const so = "_liveIndicator_1jczn_1", ao = "_liveIndicatorHasDelay_1jczn_9", lo = "_liveIndicatorNoDelay_1jczn_13", ke = {
1994
+ liveIndicator: so,
1995
+ liveIndicatorHasDelay: ao,
1996
+ liveIndicatorNoDelay: lo
1826
1997
  };
1827
- function eo(n) {
1828
- var o = n, { message: e } = o, t = ne(o, ["message"]);
1829
- const a = A((c) => c.delay), l = A((c) => c.setDelay), u = () => {
1830
- a && l(0);
1831
- }, i = a ? `${Ie.liveIndicator} ${Ie.liveIndicatorHasDelay}` : `${Ie.liveIndicator} ${Ie.liveIndicatorNoDelay}`;
1832
- return /* @__PURE__ */ s.jsxs(le, he(j({ onClick: u, shape: "square" }, t), { children: [
1833
- /* @__PURE__ */ s.jsx("div", { className: i }),
1998
+ function co(n) {
1999
+ var r = n, { message: e } = r, t = re(r, ["message"]);
2000
+ const s = f((d) => d.restart), l = $((d) => d.delay), u = $((d) => d.setDelay), i = () => {
2001
+ l && (s(), u(0));
2002
+ }, c = l ? `${ke.liveIndicator} ${ke.liveIndicatorHasDelay}` : `${ke.liveIndicator} ${ke.liveIndicatorNoDelay}`;
2003
+ return /* @__PURE__ */ a.jsxs(le, he(M({ onClick: i, shape: "square" }, t), { children: [
2004
+ /* @__PURE__ */ a.jsx("div", { className: c }),
1834
2005
  e || "Live"
1835
2006
  ] }));
1836
2007
  }
1837
- function Gt() {
1838
- return /* @__PURE__ */ s.jsx(
2008
+ function rn() {
2009
+ return /* @__PURE__ */ a.jsx(
1839
2010
  "svg",
1840
2011
  {
1841
2012
  xmlns: "http://www.w3.org/2000/svg",
1842
2013
  viewBox: "0 0 24 24",
1843
2014
  fill: "currentColor",
1844
- children: /* @__PURE__ */ s.jsx("path", { d: "M6 5H8V19H6V5ZM16 5H18V19H16V5Z" })
2015
+ children: /* @__PURE__ */ a.jsx("path", { d: "M6 5H8V19H6V5ZM16 5H18V19H16V5Z" })
1845
2016
  }
1846
2017
  );
1847
2018
  }
1848
- function Jt() {
1849
- return /* @__PURE__ */ s.jsx(
2019
+ function on() {
2020
+ return /* @__PURE__ */ a.jsx(
1850
2021
  "svg",
1851
2022
  {
1852
2023
  xmlns: "http://www.w3.org/2000/svg",
1853
2024
  viewBox: "0 0 24 24",
1854
2025
  fill: "currentColor",
1855
- children: /* @__PURE__ */ s.jsx("path", { d: "M19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z" })
2026
+ children: /* @__PURE__ */ a.jsx("path", { d: "M19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z" })
1856
2027
  }
1857
2028
  );
1858
2029
  }
1859
- function to() {
1860
- 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 = () => {
2030
+ function uo() {
2031
+ const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), r = f((i) => i.play), s = $((i) => i.delay), l = $((i) => i.setDelay), u = () => {
1861
2032
  if (e)
1862
2033
  t();
1863
2034
  else {
1864
2035
  const i = n();
1865
- i && l(a + i), o();
2036
+ i && l(s + i), r();
1866
2037
  }
1867
2038
  };
1868
- return /* @__PURE__ */ s.jsx(le, { onClick: u, children: e ? /* @__PURE__ */ s.jsx(Gt, {}) : /* @__PURE__ */ s.jsx(Jt, {}) });
1869
- }
1870
- const no = "_progressSlider_hwzgf_1", ro = "_tipContainer_hwzgf_7", oo = "_tipContainerVisible_hwzgf_17", io = "_tipContainerHidden_hwzgf_22", so = "_tipContent_hwzgf_27", se = {
1871
- progressSlider: no,
1872
- tipContainer: ro,
1873
- tipContainerVisible: oo,
1874
- tipContainerHidden: io,
1875
- tipContent: so
1876
- }, ao = "_sliderRoot_aeak6_1", lo = "_sliderTrack_aeak6_18", co = "_sliderRange_aeak6_28", uo = "_sliderThumb_aeak6_37", ke = {
1877
- sliderRoot: ao,
1878
- sliderTrack: lo,
1879
- sliderRange: co,
1880
- sliderThumb: uo
1881
- }, Ae = Ve((l, a) => {
1882
- var u = l, { max: e = 100, min: t = 0, className: n } = u, o = ne(u, ["max", "min", "className"]);
1883
- return /* @__PURE__ */ s.jsxs(
1884
- je.Root,
1885
- he(j({
1886
- ref: a,
2039
+ return /* @__PURE__ */ a.jsx(le, { onClick: u, children: e ? /* @__PURE__ */ a.jsx(rn, {}) : /* @__PURE__ */ a.jsx(on, {}) });
2040
+ }
2041
+ const fo = "_progressSlider_hwzgf_1", ho = "_tipContainer_hwzgf_7", mo = "_tipContainerVisible_hwzgf_17", vo = "_tipContainerHidden_hwzgf_22", po = "_tipContent_hwzgf_27", se = {
2042
+ progressSlider: fo,
2043
+ tipContainer: ho,
2044
+ tipContainerVisible: mo,
2045
+ tipContainerHidden: vo,
2046
+ tipContent: po
2047
+ }, yo = "_sliderRoot_aeak6_1", go = "_sliderTrack_aeak6_18", wo = "_sliderRange_aeak6_28", _o = "_sliderThumb_aeak6_37", De = {
2048
+ sliderRoot: yo,
2049
+ sliderTrack: go,
2050
+ sliderRange: wo,
2051
+ sliderThumb: _o
2052
+ }, Ae = Ve((l, s) => {
2053
+ var u = l, { max: e = 100, min: t = 0, className: n } = u, r = re(u, ["max", "min", "className"]);
2054
+ return /* @__PURE__ */ a.jsxs(
2055
+ Le.Root,
2056
+ he(M({
2057
+ ref: s,
1887
2058
  min: t,
1888
2059
  max: e,
1889
2060
  "aria-label": "Player progress",
1890
- className: [ke.sliderRoot, n].filter(Boolean).join(" "),
2061
+ className: [De.sliderRoot, n].filter(Boolean).join(" "),
1891
2062
  onKeyDown: (i) => (
1892
2063
  // Prevent the slider from being controlled by the keyboard
1893
2064
  // when the slider is focused by a click
1894
2065
  i.preventDefault()
1895
2066
  )
1896
- }, o), {
2067
+ }, r), {
1897
2068
  children: [
1898
- /* @__PURE__ */ s.jsx(je.Track, { className: ke.sliderTrack, children: /* @__PURE__ */ s.jsx(je.Range, { className: ke.sliderRange }) }),
1899
- /* @__PURE__ */ s.jsx(je.Thumb, { className: ke.sliderThumb })
2069
+ /* @__PURE__ */ a.jsx(Le.Track, { className: De.sliderTrack, children: /* @__PURE__ */ a.jsx(Le.Range, { className: De.sliderRange }) }),
2070
+ /* @__PURE__ */ a.jsx(Le.Thumb, { className: De.sliderThumb })
1900
2071
  ]
1901
2072
  })
1902
2073
  );
@@ -1913,103 +2084,104 @@ function Fe(e) {
1913
2084
  height: t.height * 100
1914
2085
  } : t;
1915
2086
  }
1916
- const _t = "vod-player-progress-bar";
1917
- function fo() {
1918
- const e = N(null), t = N(null), [n, o] = G(0), [a, l] = G(0), [u, i] = G(!1), [c, d] = G(-1), [v, y] = G(-1), g = A((I) => I.delay), P = A((I) => I.startDate), k = P ? P.getTime() : 0, T = (/* @__PURE__ */ new Date()).getTime(), S = A((I) => I.setDelay), V = f((I) => I.isPlaying), R = f((I) => I.addIdleLock), L = f((I) => I.removeIdleLock), x = W(() => {
1919
- o(Zt(k, g)), l(Sr(k, T));
1920
- }, [g, T, k]), M = parseFloat(
1921
- (a ? (v !== -1 ? v : n) / a * 100 : 0).toFixed(1)
1922
- ), p = (I) => {
1923
- y(a * (I[0] / 100)), R(_t);
1924
- }, U = () => {
1925
- if (v !== -1) {
1926
- const I = Wt(k, v);
1927
- S(I), y(-1), L(_t);
1928
- }
1929
- }, Y = () => i(!0), z = () => i(!1), O = W(
1930
- (I) => {
1931
- const Q = e.current, K = t.current;
1932
- if (Q && K) {
1933
- const Z = Fe(Q), oe = Fe(K), ue = (I.pageX || I.clientX) - Z.left, te = ue / Z.width;
1934
- if (te < 0) return;
1935
- let q = ue - oe.width / 2;
1936
- 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";
1937
- const ve = a - te * a;
1938
- d(ve > 0 ? ve : 0);
2087
+ const St = "vod-player-progress-bar";
2088
+ function To() {
2089
+ const e = F(null), t = F(null), [n, r] = G(0), [s, l] = G(0), [u, i] = G(!1), [c, d] = G(-1), [g, T] = G(-1), y = $((k) => k.delay), x = $((k) => k.startDate), L = x ? x.getTime() : 0, C = (/* @__PURE__ */ new Date()).getTime(), w = $((k) => k.setDelay), S = f((k) => k.isPlaying), P = f((k) => k.addIdleLock), R = f((k) => k.removeIdleLock), B = O(() => {
2090
+ r(Jt(L, y)), l(Fr(L, C));
2091
+ }, [y, C, L]), V = parseFloat(
2092
+ (s ? (g !== -1 ? g : n) / s * 100 : 0).toFixed(1)
2093
+ ), m = (k) => {
2094
+ T(s * (k[0] / 100)), P(St);
2095
+ }, v = () => {
2096
+ if (g !== -1) {
2097
+ const k = Xt(L, g);
2098
+ w(k), T(-1), R(St);
2099
+ }
2100
+ }, U = () => i(!0), I = () => i(!1), A = O(
2101
+ (k) => {
2102
+ const J = e.current, Y = t.current;
2103
+ if (J && Y) {
2104
+ const Z = Fe(J), oe = Fe(Y), ue = (k.pageX || k.clientX) - Z.left, ne = ue / Z.width;
2105
+ if (ne < 0) return;
2106
+ let K = ue - oe.width / 2;
2107
+ K < 0 && (K = 0), K > Z.width - oe.width && (K = -1), Y.style.left = K > -1 ? `${K}px` : "auto", Y.style.right = K > -1 ? "auto" : "0px";
2108
+ const pe = s - ne * s;
2109
+ d(pe > 0 ? pe : 0);
1939
2110
  }
1940
- Y();
2111
+ U();
1941
2112
  },
1942
- [a]
2113
+ [s]
1943
2114
  );
1944
- return Ne(() => x(), V ? 1e3 : null), D(() => {
1945
- x();
1946
- }, [x]), /* @__PURE__ */ s.jsxs("div", { className: se.progressSlider, children: [
1947
- /* @__PURE__ */ s.jsx(
2115
+ return Ce(() => B(), S ? 1e3 : null), N(() => {
2116
+ const k = requestAnimationFrame(() => B());
2117
+ return () => cancelAnimationFrame(k);
2118
+ }, [B]), /* @__PURE__ */ a.jsxs("div", { className: se.progressSlider, children: [
2119
+ /* @__PURE__ */ a.jsx(
1948
2120
  Ae,
1949
2121
  {
1950
2122
  ref: e,
1951
- value: [M],
1952
- onPointerLeave: z,
1953
- onPointerDown: z,
1954
- onPointerMove: O,
1955
- onValueChange: p,
1956
- onValueCommit: U,
2123
+ value: [V],
2124
+ onPointerLeave: I,
2125
+ onPointerDown: I,
2126
+ onPointerMove: A,
2127
+ onValueChange: m,
2128
+ onValueCommit: v,
1957
2129
  step: 0.1
1958
2130
  }
1959
2131
  ),
1960
- /* @__PURE__ */ s.jsx(
2132
+ /* @__PURE__ */ a.jsx(
1961
2133
  "div",
1962
2134
  {
1963
2135
  ref: t,
1964
2136
  className: `${se.tipContainer} ${u ? se.tipContainerVisible : se.tipContainerHidden}`,
1965
- children: /* @__PURE__ */ s.jsx("p", { className: se.tipContent, children: `-${Te(c)}` })
2137
+ children: /* @__PURE__ */ a.jsx("p", { className: se.tipContent, children: `-${Te(c)}` })
1966
2138
  }
1967
2139
  )
1968
2140
  ] });
1969
2141
  }
1970
- function ho() {
1971
- return /* @__PURE__ */ s.jsx(
2142
+ function xo() {
2143
+ return /* @__PURE__ */ a.jsx(
1972
2144
  "svg",
1973
2145
  {
1974
2146
  xmlns: "http://www.w3.org/2000/svg",
1975
2147
  viewBox: "0 0 24 24",
1976
2148
  fill: "currentColor",
1977
- children: /* @__PURE__ */ s.jsx("path", { d: "M22 12C22 17.5228 17.5229 22 12 22C6.4772 22 2 17.5228 2 12C2 6.47715 6.4772 2 12 2V4C7.5817 4 4 7.58172 4 12C4 16.4183 7.5817 20 12 20C16.4183 20 20 16.4183 20 12C20 9.53614 18.8862 7.33243 17.1346 5.86492L15 8V2L21 2L18.5535 4.44656C20.6649 6.28002 22 8.9841 22 12Z" })
2149
+ children: /* @__PURE__ */ a.jsx("path", { d: "M22 12C22 17.5228 17.5229 22 12 22C6.4772 22 2 17.5228 2 12C2 6.47715 6.4772 2 12 2V4C7.5817 4 4 7.58172 4 12C4 16.4183 7.5817 20 12 20C16.4183 20 20 16.4183 20 12C20 9.53614 18.8862 7.33243 17.1346 5.86492L15 8V2L21 2L18.5535 4.44656C20.6649 6.28002 22 8.9841 22 12Z" })
1978
2150
  }
1979
2151
  );
1980
2152
  }
1981
- function mo() {
1982
- const e = A((a) => a.startDate), t = A((a) => a.setDelay), n = e ? e.getTime() : 0, o = () => t(Wt(n));
1983
- return /* @__PURE__ */ s.jsx(le, { onClick: o, children: /* @__PURE__ */ s.jsx(ho, {}) });
2153
+ function Co() {
2154
+ const e = $((s) => s.startDate), t = $((s) => s.setDelay), n = e ? e.getTime() : 0, r = () => t(Xt(n));
2155
+ return /* @__PURE__ */ a.jsx(le, { onClick: r, children: /* @__PURE__ */ a.jsx(xo, {}) });
1984
2156
  }
1985
- const po = "_viewersContainer_z1ihz_1", vo = "_viewersIndicator_z1ihz_16", yo = "_viewersIcon_z1ihz_24", go = "_viewersCount_z1ihz_28", De = {
1986
- viewersContainer: po,
1987
- viewersIndicator: vo,
1988
- viewersIcon: yo,
1989
- viewersCount: go
2157
+ const Eo = "_viewersContainer_z1ihz_1", So = "_viewersIndicator_z1ihz_16", Ro = "_viewersIcon_z1ihz_24", bo = "_viewersCount_z1ihz_28", Me = {
2158
+ viewersContainer: Eo,
2159
+ viewersIndicator: So,
2160
+ viewersIcon: Ro,
2161
+ viewersCount: bo
1990
2162
  };
1991
- function wo() {
1992
- const e = A((t) => t.viewerCount);
1993
- return e ? /* @__PURE__ */ s.jsxs("div", { className: De.viewersContainer, children: [
1994
- /* @__PURE__ */ s.jsx("span", { className: De.viewersIndicator }),
1995
- /* @__PURE__ */ s.jsxs(
2163
+ function Po() {
2164
+ const e = $((t) => t.viewerCount);
2165
+ return e ? /* @__PURE__ */ a.jsxs("div", { className: Me.viewersContainer, children: [
2166
+ /* @__PURE__ */ a.jsx("span", { className: Me.viewersIndicator }),
2167
+ /* @__PURE__ */ a.jsxs(
1996
2168
  "svg",
1997
2169
  {
1998
- className: De.viewersIcon,
2170
+ className: Me.viewersIcon,
1999
2171
  width: "16",
2000
2172
  height: "16",
2001
2173
  viewBox: "0 0 16 16",
2002
2174
  fill: "none",
2003
2175
  xmlns: "http://www.w3.org/2000/svg",
2004
2176
  children: [
2005
- /* @__PURE__ */ s.jsx(
2177
+ /* @__PURE__ */ a.jsx(
2006
2178
  "path",
2007
2179
  {
2008
2180
  d: "M8 7C9.10457 7 10 6.10457 10 5C10 3.89543 9.10457 3 8 3C6.89543 3 6 3.89543 6 5C6 6.10457 6.89543 7 8 7Z",
2009
2181
  fill: "currentColor"
2010
2182
  }
2011
2183
  ),
2012
- /* @__PURE__ */ s.jsx(
2184
+ /* @__PURE__ */ a.jsx(
2013
2185
  "path",
2014
2186
  {
2015
2187
  d: "M8 8C5.79086 8 4 9.79086 4 12V13H12V12C12 9.79086 10.2091 8 8 8Z",
@@ -2019,175 +2191,175 @@ function wo() {
2019
2191
  ]
2020
2192
  }
2021
2193
  ),
2022
- /* @__PURE__ */ s.jsx("span", { className: De.viewersCount, children: e.toLocaleString() })
2194
+ /* @__PURE__ */ a.jsx("span", { className: Me.viewersCount, children: e.toLocaleString() })
2023
2195
  ] }) : null;
2024
2196
  }
2025
- function Qt() {
2197
+ function sn() {
2026
2198
  const e = f((n) => n.error);
2027
2199
  if (!e) return null;
2028
2200
  const t = e.code === "LIVE_MANIFEST_LOAD_ERROR";
2029
- return /* @__PURE__ */ s.jsx(
2201
+ return /* @__PURE__ */ a.jsx(
2030
2202
  "div",
2031
2203
  {
2032
2204
  className: `${ie.playerNotice} ${t ? ie.playerNoticeLowZIndex : ""}`,
2033
- children: /* @__PURE__ */ s.jsx("h3", { className: ie.playerNoticeTitle, children: e.message })
2205
+ children: /* @__PURE__ */ a.jsx("h3", { className: ie.playerNoticeTitle, children: e.message })
2034
2206
  }
2035
2207
  );
2036
2208
  }
2037
- const xo = "_playerContainer_146tx_1", To = "_controlsTop_146tx_12", _o = "_controlsBottom_146tx_29", Co = "_controlsContainer_146tx_45", Eo = "_controlsRow_146tx_61", Ro = "_controlsSection_146tx_68", bo = "_controlsSectionStart_146tx_78", So = "_controlsSectionEnd_146tx_82", B = {
2038
- playerContainer: xo,
2039
- controlsTop: To,
2040
- controlsBottom: _o,
2041
- controlsContainer: Co,
2042
- controlsRow: Eo,
2043
- controlsSection: Ro,
2044
- controlsSectionStart: bo,
2045
- controlsSectionEnd: So
2209
+ const Lo = "_playerContainer_146tx_1", jo = "_controlsTop_146tx_12", Io = "_controlsBottom_146tx_29", ko = "_controlsContainer_146tx_45", Do = "_controlsRow_146tx_61", Mo = "_controlsSection_146tx_68", No = "_controlsSectionStart_146tx_78", Fo = "_controlsSectionEnd_146tx_82", q = {
2210
+ playerContainer: Lo,
2211
+ controlsTop: jo,
2212
+ controlsBottom: Io,
2213
+ controlsContainer: ko,
2214
+ controlsRow: Do,
2215
+ controlsSection: Mo,
2216
+ controlsSectionStart: No,
2217
+ controlsSectionEnd: Fo
2046
2218
  };
2047
- function jo() {
2048
- return /* @__PURE__ */ s.jsx(
2219
+ function Vo() {
2220
+ return /* @__PURE__ */ a.jsx(
2049
2221
  "svg",
2050
2222
  {
2051
2223
  xmlns: "http://www.w3.org/2000/svg",
2052
2224
  viewBox: "0 0 24 24",
2053
2225
  fill: "currentColor",
2054
- children: /* @__PURE__ */ s.jsx("path", { d: "M16 3H22V9H20V5H16V3ZM2 3H8V5H4V9H2V3ZM20 19V15H22V21H16V19H20ZM4 19H8V21H2V15H4V19Z" })
2226
+ children: /* @__PURE__ */ a.jsx("path", { d: "M16 3H22V9H20V5H16V3ZM2 3H8V5H4V9H2V3ZM20 19V15H22V21H16V19H20ZM4 19H8V21H2V15H4V19Z" })
2055
2227
  }
2056
2228
  );
2057
2229
  }
2058
- function Po() {
2059
- return /* @__PURE__ */ s.jsx(
2230
+ function Ao() {
2231
+ return /* @__PURE__ */ a.jsx(
2060
2232
  "svg",
2061
2233
  {
2062
2234
  xmlns: "http://www.w3.org/2000/svg",
2063
2235
  viewBox: "0 0 24 24",
2064
2236
  fill: "currentColor",
2065
- children: /* @__PURE__ */ s.jsx("path", { d: "M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z" })
2237
+ children: /* @__PURE__ */ a.jsx("path", { d: "M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z" })
2066
2238
  }
2067
2239
  );
2068
2240
  }
2069
- function en() {
2070
- 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(
2241
+ function an() {
2242
+ const e = f((d) => d.containerRef), t = f((d) => d.exitFullscreen), n = f((d) => d.isFullscreen), r = f((d) => d.requestFullscreen), s = f((d) => d.setIsFullscreen), l = f((d) => d.setIsFullscreenReady), u = f((d) => d.techRef), i = O(
2071
2243
  (d) => {
2072
- d.stopPropagation(), a(ir());
2244
+ d.stopPropagation(), s(ir());
2073
2245
  },
2074
- [a]
2246
+ [s]
2075
2247
  ), c = () => {
2076
- n ? t() : o();
2248
+ n ? t() : r();
2077
2249
  };
2078
- return D(() => {
2079
- const d = Ut ? u.current : e.current;
2250
+ return N(() => {
2251
+ const d = zt ? u.current : e.current;
2080
2252
  if (d)
2081
2253
  return lr(d, i);
2082
- }, [e, i, u]), D(() => {
2254
+ }, [e, i, u]), N(() => {
2083
2255
  l(!0);
2084
- }, [l]), /* @__PURE__ */ s.jsx(le, { onClick: c, children: n ? /* @__PURE__ */ s.jsx(Po, {}) : /* @__PURE__ */ s.jsx(jo, {}) });
2085
- }
2086
- const Lo = "_idleCheckContainer_crh2s_1", Io = "_idleCheckContainerIdle_crh2s_5", ko = "_idleCheckContainerActive_crh2s_11", qe = {
2087
- idleCheckContainer: Lo,
2088
- idleCheckContainerIdle: Io,
2089
- idleCheckContainerActive: ko
2090
- }, Do = 5 * 1e3;
2091
- function tn({ children: e }) {
2092
- const t = N(null), n = f((g) => g.isIdle), o = f((g) => g.setIsIdle), a = N(null), u = f((g) => g.idleLocks).size, i = f((g) => g.eventEmitter), c = W(() => {
2093
- a.current !== null && (window.clearTimeout(a.current), a.current = null);
2094
- }, []), d = W(() => {
2095
- c(), a.current = window.setTimeout(() => o(!0), Do);
2096
- }, [c]);
2097
- D(() => (o(!1), d(), () => {
2256
+ }, [l]), /* @__PURE__ */ a.jsx(le, { onClick: c, children: n ? /* @__PURE__ */ a.jsx(Ao, {}) : /* @__PURE__ */ a.jsx(Vo, {}) });
2257
+ }
2258
+ const Oo = "_idleCheckContainer_crh2s_1", Ho = "_idleCheckContainerIdle_crh2s_5", $o = "_idleCheckContainerActive_crh2s_11", Ke = {
2259
+ idleCheckContainer: Oo,
2260
+ idleCheckContainerIdle: Ho,
2261
+ idleCheckContainerActive: $o
2262
+ }, Uo = 5 * 1e3;
2263
+ function ln({ children: e }) {
2264
+ const t = F(null), n = f((y) => y.isIdle), r = f((y) => y.setIsIdle), s = F(null), u = f((y) => y.idleLocks).size, i = f((y) => y.eventEmitter), c = O(() => {
2265
+ s.current !== null && (window.clearTimeout(s.current), s.current = null);
2266
+ }, []), d = O(() => {
2267
+ c(), s.current = window.setTimeout(() => r(!0), Uo);
2268
+ }, [c, r]);
2269
+ N(() => (r(!1), d(), () => {
2098
2270
  c();
2099
- }), [c, d]), D(() => {
2100
- const g = () => {
2101
- o(!1), d();
2271
+ }), [c, r, d]), N(() => {
2272
+ const y = () => {
2273
+ r(!1), d();
2102
2274
  };
2103
- return i.on("resetIdle", g), () => {
2104
- i.off("resetIdle", g);
2275
+ return i.on("resetIdle", y), () => {
2276
+ i.off("resetIdle", y);
2105
2277
  };
2106
- }, [i, o, d]);
2107
- const v = n && !u, y = `${qe.idleCheckContainer} ${v ? qe.idleCheckContainerIdle : qe.idleCheckContainerActive}`;
2108
- return /* @__PURE__ */ s.jsx("div", { ref: t, className: y, children: e });
2278
+ }, [i, r, d]);
2279
+ const g = n && !u, T = `${Ke.idleCheckContainer} ${g ? Ke.idleCheckContainerIdle : Ke.idleCheckContainerActive}`;
2280
+ return /* @__PURE__ */ a.jsx("div", { ref: t, className: T, children: e });
2109
2281
  }
2110
- const Mo = "_spinner_oo4hi_10", Fo = {
2111
- spinner: Mo
2282
+ const Bo = "_spinner_oo4hi_10", Wo = {
2283
+ spinner: Bo
2112
2284
  };
2113
- function Vo(e) {
2114
- return /* @__PURE__ */ s.jsx("div", j({ className: Fo.spinner }, e));
2285
+ function zo(e) {
2286
+ return /* @__PURE__ */ a.jsx("div", M({ className: Wo.spinner }, e));
2115
2287
  }
2116
- function No(e, t = 500) {
2117
- const [n, o] = G(e);
2118
- return D(() => {
2119
- const a = window.setTimeout(() => o(e), t);
2288
+ function qo(e, t = 500) {
2289
+ const [n, r] = G(e);
2290
+ return N(() => {
2291
+ const s = window.setTimeout(() => r(e), t);
2120
2292
  return () => {
2121
- window.clearTimeout(a);
2293
+ window.clearTimeout(s);
2122
2294
  };
2123
2295
  }, [e, t]), n;
2124
2296
  }
2125
- const Ao = "_loadingContainer_v9v7r_1", Oo = {
2126
- loadingContainer: Ao
2297
+ const Yo = "_loadingContainer_v9v7r_1", Zo = {
2298
+ loadingContainer: Yo
2127
2299
  };
2128
- function nn(n) {
2129
- var o = n, { style: e } = o, t = ne(o, ["style"]);
2130
- const a = f((u) => u.isLoading);
2131
- return No(a, 100) ? /* @__PURE__ */ s.jsx("div", he(j({ className: Oo.loadingContainer, style: e }, t), { children: /* @__PURE__ */ s.jsx(Vo, {}) })) : null;
2300
+ function cn(n) {
2301
+ var r = n, { style: e } = r, t = re(r, ["style"]);
2302
+ const s = f((u) => u.isLoading);
2303
+ return qo(s, 100) ? /* @__PURE__ */ a.jsx("div", he(M({ className: Zo.loadingContainer, style: e }, t), { children: /* @__PURE__ */ a.jsx(zo, {}) })) : null;
2132
2304
  }
2133
- function Ho() {
2134
- return /* @__PURE__ */ s.jsx(
2305
+ function Ko() {
2306
+ return /* @__PURE__ */ a.jsx(
2135
2307
  "svg",
2136
2308
  {
2137
2309
  xmlns: "http://www.w3.org/2000/svg",
2138
2310
  viewBox: "0 0 24 24",
2139
2311
  fill: "currentColor",
2140
- children: /* @__PURE__ */ s.jsx("path", { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" })
2312
+ children: /* @__PURE__ */ a.jsx("path", { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" })
2141
2313
  }
2142
2314
  );
2143
2315
  }
2144
- function $o() {
2145
- return /* @__PURE__ */ s.jsx(
2316
+ function Go() {
2317
+ return /* @__PURE__ */ a.jsx(
2146
2318
  "svg",
2147
2319
  {
2148
2320
  xmlns: "http://www.w3.org/2000/svg",
2149
2321
  viewBox: "0 0 24 24",
2150
2322
  fill: "currentColor",
2151
- children: /* @__PURE__ */ s.jsx("path", { d: "M4 5V19H20V5H4ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM7.5 11.25H9.5V9H11V15H9.5V12.75H7.5V15H6V9H7.5V11.25ZM14.5 10.5V13.5H16C16.2761 13.5 16.5 13.2761 16.5 13V11C16.5 10.7239 16.2761 10.5 16 10.5H14.5ZM13 9H16C17.1046 9 18 9.89543 18 11V13C18 14.1046 17.1046 15 16 15H13V9Z" })
2323
+ children: /* @__PURE__ */ a.jsx("path", { d: "M4 5V19H20V5H4ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM7.5 11.25H9.5V9H11V15H9.5V12.75H7.5V15H6V9H7.5V11.25ZM14.5 10.5V13.5H16C16.2761 13.5 16.5 13.2761 16.5 13V11C16.5 10.7239 16.2761 10.5 16 10.5H14.5ZM13 9H16C17.1046 9 18 9.89543 18 11V13C18 14.1046 17.1046 15 16 15H13V9Z" })
2152
2324
  }
2153
2325
  );
2154
2326
  }
2155
- 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 = {
2156
- dropdownMenuContent: Uo,
2157
- dropdownMenuItem: Bo,
2158
- scrollAreaRoot: zo,
2159
- scrollAreaViewport: Wo,
2160
- scrollAreaScrollbar: Zo,
2161
- scrollAreaThumb: qo
2162
- }, Ko = _e.Root, Yo = _e.Trigger, Xo = _e.Portal, rn = Ve((l, a) => {
2163
- var u = l, { sideOffset: e = 4, className: t, children: n } = u, o = ne(u, ["sideOffset", "className", "children"]);
2164
- return /* @__PURE__ */ s.jsx(
2165
- _e.Content,
2166
- he(j({
2167
- ref: a,
2327
+ const Xo = "_dropdownMenuContent_b7j6b_1", Jo = "_dropdownMenuItem_b7j6b_83", Qo = "_scrollAreaRoot_b7j6b_125", ei = "_scrollAreaViewport_b7j6b_133", ti = "_scrollAreaScrollbar_b7j6b_141", ni = "_scrollAreaThumb_b7j6b_168", ve = {
2328
+ dropdownMenuContent: Xo,
2329
+ dropdownMenuItem: Jo,
2330
+ scrollAreaRoot: Qo,
2331
+ scrollAreaViewport: ei,
2332
+ scrollAreaScrollbar: ti,
2333
+ scrollAreaThumb: ni
2334
+ }, ri = xe.Root, oi = xe.Trigger, ii = xe.Portal, un = Ve((l, s) => {
2335
+ var u = l, { sideOffset: e = 4, className: t, children: n } = u, r = re(u, ["sideOffset", "className", "children"]);
2336
+ return /* @__PURE__ */ a.jsx(
2337
+ xe.Content,
2338
+ he(M({
2339
+ ref: s,
2168
2340
  sideOffset: e,
2169
- className: [pe.dropdownMenuContent, t].filter(Boolean).join(" "),
2341
+ className: [ve.dropdownMenuContent, t].filter(Boolean).join(" "),
2170
2342
  onOpenAutoFocus: (i) => {
2171
2343
  i.preventDefault();
2172
2344
  },
2173
2345
  onCloseAutoFocus: (i) => {
2174
2346
  i.preventDefault();
2175
2347
  }
2176
- }, o), {
2177
- children: /* @__PURE__ */ s.jsxs(
2178
- Pe.Root,
2348
+ }, r), {
2349
+ children: /* @__PURE__ */ a.jsxs(
2350
+ je.Root,
2179
2351
  {
2180
- className: pe.scrollAreaRoot,
2352
+ className: ve.scrollAreaRoot,
2181
2353
  type: "always",
2182
2354
  scrollHideDelay: 0,
2183
2355
  children: [
2184
- /* @__PURE__ */ s.jsx(Pe.Viewport, { className: pe.scrollAreaViewport, children: n }),
2185
- /* @__PURE__ */ s.jsx(
2186
- Pe.Scrollbar,
2356
+ /* @__PURE__ */ a.jsx(je.Viewport, { className: ve.scrollAreaViewport, children: n }),
2357
+ /* @__PURE__ */ a.jsx(
2358
+ je.Scrollbar,
2187
2359
  {
2188
- className: pe.scrollAreaScrollbar,
2360
+ className: ve.scrollAreaScrollbar,
2189
2361
  orientation: "vertical",
2190
- children: /* @__PURE__ */ s.jsx(Pe.Thumb, { className: pe.scrollAreaThumb })
2362
+ children: /* @__PURE__ */ a.jsx(je.Thumb, { className: ve.scrollAreaThumb })
2191
2363
  }
2192
2364
  )
2193
2365
  ]
@@ -2196,19 +2368,19 @@ const Uo = "_dropdownMenuContent_b7j6b_1", Bo = "_dropdownMenuItem_b7j6b_83", zo
2196
2368
  })
2197
2369
  );
2198
2370
  });
2199
- rn.displayName = "PlayerMenuContent";
2200
- const on = Ve((a, o) => {
2201
- var l = a, { className: e, onClick: t } = l, n = ne(l, ["className", "onClick"]);
2371
+ un.displayName = "PlayerMenuContent";
2372
+ const dn = Ve((s, r) => {
2373
+ var l = s, { className: e, onClick: t } = l, n = re(l, ["className", "onClick"]);
2202
2374
  const u = (c) => {
2203
2375
  t == null || t(c);
2204
2376
  }, i = (c) => {
2205
2377
  (c.key === "Enter" || c.key === " ") && (c.preventDefault(), t == null || t(c));
2206
2378
  };
2207
- return /* @__PURE__ */ s.jsx(_e.Close, { asChild: !0, children: /* @__PURE__ */ s.jsx(
2379
+ return /* @__PURE__ */ a.jsx(xe.Close, { asChild: !0, children: /* @__PURE__ */ a.jsx(
2208
2380
  "div",
2209
- j({
2210
- ref: o,
2211
- className: [pe.dropdownMenuItem, e].filter(Boolean).join(" "),
2381
+ M({
2382
+ ref: r,
2383
+ className: [ve.dropdownMenuItem, e].filter(Boolean).join(" "),
2212
2384
  role: "menuitem",
2213
2385
  tabIndex: 0,
2214
2386
  onClick: u,
@@ -2216,260 +2388,273 @@ const on = Ve((a, o) => {
2216
2388
  }, n)
2217
2389
  ) });
2218
2390
  });
2219
- on.displayName = "PlayerMenuItem";
2220
- const Ct = "settings";
2221
- function sn() {
2222
- const [e, t] = G(!1), n = f((c) => c.containerRef), o = f((c) => c.addIdleLock), a = f((c) => c.removeIdleLock), l = f((c) => c.levels), u = f((c) => c.setLevel), i = W(
2391
+ dn.displayName = "PlayerMenuItem";
2392
+ const Rt = "settings";
2393
+ function fn() {
2394
+ const [e, t] = G(!1), n = f((c) => c.containerRef), r = f((c) => c.addIdleLock), s = f((c) => c.removeIdleLock), l = f((c) => c.levels), u = f((c) => c.setLevel), i = O(
2223
2395
  (c) => {
2224
- t(c), c ? o(Ct) : a(Ct);
2396
+ t(c), c ? r(Rt) : s(Rt);
2225
2397
  },
2226
- [o, a]
2398
+ [r, s]
2227
2399
  );
2228
- return /* @__PURE__ */ s.jsxs(Ko, { open: e, onOpenChange: i, children: [
2229
- /* @__PURE__ */ s.jsx(Yo, { asChild: !0, children: /* @__PURE__ */ s.jsx(le, { children: /* @__PURE__ */ s.jsx($o, {}) }) }),
2230
- /* @__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(
2231
- on,
2400
+ return /* @__PURE__ */ a.jsxs(ri, { open: e, onOpenChange: i, children: [
2401
+ /* @__PURE__ */ a.jsx(oi, { asChild: !0, children: /* @__PURE__ */ a.jsx(le, { children: /* @__PURE__ */ a.jsx(Go, {}) }) }),
2402
+ /* @__PURE__ */ a.jsx(ii, { container: n.current, children: /* @__PURE__ */ a.jsx(un, { side: "top", align: "end", children: l == null ? void 0 : l.map((c) => /* @__PURE__ */ a.jsxs(
2403
+ dn,
2232
2404
  {
2233
2405
  onClick: () => u(c.value),
2234
2406
  children: [
2235
2407
  c.label,
2236
- c.selected && /* @__PURE__ */ s.jsx(Ho, {})
2408
+ c.selected && /* @__PURE__ */ a.jsx(Ko, {})
2237
2409
  ]
2238
2410
  },
2239
2411
  c.sid
2240
2412
  )) }) })
2241
2413
  ] });
2242
2414
  }
2243
- function Go() {
2244
- return /* @__PURE__ */ s.jsx(
2415
+ function si() {
2416
+ return /* @__PURE__ */ a.jsx(
2245
2417
  "svg",
2246
2418
  {
2247
2419
  xmlns: "http://www.w3.org/2000/svg",
2248
2420
  viewBox: "0 0 24 24",
2249
2421
  fill: "currentColor",
2250
- children: /* @__PURE__ */ s.jsx("path", { d: "M6.60282 10.0001L10 7.22056V16.7796L6.60282 14.0001H3V10.0001H6.60282ZM2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z" })
2422
+ children: /* @__PURE__ */ a.jsx("path", { d: "M6.60282 10.0001L10 7.22056V16.7796L6.60282 14.0001H3V10.0001H6.60282ZM2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z" })
2251
2423
  }
2252
2424
  );
2253
2425
  }
2254
- function Jo() {
2255
- return /* @__PURE__ */ s.jsx(
2426
+ function ai() {
2427
+ return /* @__PURE__ */ a.jsx(
2256
2428
  "svg",
2257
2429
  {
2258
2430
  xmlns: "http://www.w3.org/2000/svg",
2259
2431
  viewBox: "0 0 24 24",
2260
2432
  fill: "currentColor",
2261
- children: /* @__PURE__ */ s.jsx("path", { d: "M13 7.22056L9.60282 10.0001H6V14.0001H9.60282L13 16.7796V7.22056ZM8.88889 16.0001H5C4.44772 16.0001 4 15.5524 4 15.0001V9.00007C4 8.44778 4.44772 8.00007 5 8.00007H8.88889L14.1834 3.66821C14.3971 3.49335 14.7121 3.52485 14.887 3.73857C14.9601 3.8279 15 3.93977 15 4.05519V19.9449C15 20.2211 14.7761 20.4449 14.5 20.4449C14.3846 20.4449 14.2727 20.405 14.1834 20.3319L8.88889 16.0001ZM18.8631 16.5911L17.4411 15.1691C18.3892 14.4376 19 13.2902 19 12.0001C19 10.5697 18.2493 9.31476 17.1203 8.60766L18.5589 7.16906C20.0396 8.26166 21 10.0187 21 12.0001C21 13.8422 20.1698 15.4905 18.8631 16.5911Z" })
2433
+ children: /* @__PURE__ */ a.jsx("path", { d: "M13 7.22056L9.60282 10.0001H6V14.0001H9.60282L13 16.7796V7.22056ZM8.88889 16.0001H5C4.44772 16.0001 4 15.5524 4 15.0001V9.00007C4 8.44778 4.44772 8.00007 5 8.00007H8.88889L14.1834 3.66821C14.3971 3.49335 14.7121 3.52485 14.887 3.73857C14.9601 3.8279 15 3.93977 15 4.05519V19.9449C15 20.2211 14.7761 20.4449 14.5 20.4449C14.3846 20.4449 14.2727 20.405 14.1834 20.3319L8.88889 16.0001ZM18.8631 16.5911L17.4411 15.1691C18.3892 14.4376 19 13.2902 19 12.0001C19 10.5697 18.2493 9.31476 17.1203 8.60766L18.5589 7.16906C20.0396 8.26166 21 10.0187 21 12.0001C21 13.8422 20.1698 15.4905 18.8631 16.5911Z" })
2262
2434
  }
2263
2435
  );
2264
2436
  }
2265
- function Qo() {
2266
- return /* @__PURE__ */ s.jsx(
2437
+ function li() {
2438
+ return /* @__PURE__ */ a.jsx(
2267
2439
  "svg",
2268
2440
  {
2269
2441
  xmlns: "http://www.w3.org/2000/svg",
2270
2442
  viewBox: "0 0 24 24",
2271
2443
  fill: "currentColor",
2272
- children: /* @__PURE__ */ s.jsx("path", { d: "M10 7.22056L6.60282 10.0001H3V14.0001H6.60282L10 16.7796V7.22056ZM5.88889 16.0001H2C1.44772 16.0001 1 15.5524 1 15.0001V9.00007C1 8.44778 1.44772 8.00007 2 8.00007H5.88889L11.1834 3.66821C11.3971 3.49335 11.7121 3.52485 11.887 3.73857C11.9601 3.8279 12 3.93977 12 4.05519V19.9449C12 20.2211 11.7761 20.4449 11.5 20.4449C11.3846 20.4449 11.2727 20.405 11.1834 20.3319L5.88889 16.0001ZM20.4142 12.0001L23.9497 15.5356L22.5355 16.9498L19 13.4143L15.4645 16.9498L14.0503 15.5356L17.5858 12.0001L14.0503 8.46454L15.4645 7.05032L19 10.5859L22.5355 7.05032L23.9497 8.46454L20.4142 12.0001Z" })
2444
+ children: /* @__PURE__ */ a.jsx("path", { d: "M10 7.22056L6.60282 10.0001H3V14.0001H6.60282L10 16.7796V7.22056ZM5.88889 16.0001H2C1.44772 16.0001 1 15.5524 1 15.0001V9.00007C1 8.44778 1.44772 8.00007 2 8.00007H5.88889L11.1834 3.66821C11.3971 3.49335 11.7121 3.52485 11.887 3.73857C11.9601 3.8279 12 3.93977 12 4.05519V19.9449C12 20.2211 11.7761 20.4449 11.5 20.4449C11.3846 20.4449 11.2727 20.405 11.1834 20.3319L5.88889 16.0001ZM20.4142 12.0001L23.9497 15.5356L22.5355 16.9498L19 13.4143L15.4645 16.9498L14.0503 15.5356L17.5858 12.0001L14.0503 8.46454L15.4645 7.05032L19 10.5859L22.5355 7.05032L23.9497 8.46454L20.4142 12.0001Z" })
2273
2445
  }
2274
2446
  );
2275
2447
  }
2276
- const ei = "_volumeContainer_4d6jg_1", ti = "_volumeSlider_4d6jg_8", Et = {
2277
- volumeContainer: ei,
2278
- volumeSlider: ti
2279
- }, Rt = "volume";
2280
- function an() {
2281
- const e = f((i) => i.setVolume), t = f((i) => i.volume), n = f((i) => i.addIdleLock), o = f((i) => i.removeIdleLock), a = (i) => {
2282
- e(i[0]), n(Rt);
2448
+ const ci = "_volumeContainer_4d6jg_1", ui = "_volumeSlider_4d6jg_8", bt = {
2449
+ volumeContainer: ci,
2450
+ volumeSlider: ui
2451
+ }, Pt = "volume";
2452
+ function hn() {
2453
+ const e = f((i) => i.setVolume), t = f((i) => i.volume), n = f((i) => i.addIdleLock), r = f((i) => i.removeIdleLock), s = (i) => {
2454
+ e(i[0]), n(Pt);
2283
2455
  }, l = () => {
2284
- o(Rt);
2456
+ r(Pt);
2285
2457
  }, u = () => e(t ? 0 : 100);
2286
- return /* @__PURE__ */ s.jsxs("div", { className: Et.volumeContainer, children: [
2287
- /* @__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, {}) }),
2288
- /* @__PURE__ */ s.jsx("div", { className: Et.volumeSlider, children: /* @__PURE__ */ s.jsx(
2458
+ return /* @__PURE__ */ a.jsxs("div", { className: bt.volumeContainer, children: [
2459
+ /* @__PURE__ */ a.jsx(le, { onClick: u, className: "shrink-0", children: t ? t > 50 ? /* @__PURE__ */ a.jsx(si, {}) : /* @__PURE__ */ a.jsx(ai, {}) : /* @__PURE__ */ a.jsx(li, {}) }),
2460
+ /* @__PURE__ */ a.jsx("div", { className: bt.volumeSlider, children: /* @__PURE__ */ a.jsx(
2289
2461
  Ae,
2290
2462
  {
2291
2463
  value: [t],
2292
- onValueChange: a,
2464
+ onValueChange: s,
2293
2465
  onValueCommit: l
2294
2466
  }
2295
2467
  ) })
2296
2468
  ] });
2297
2469
  }
2298
- const ni = "0.0.49", ln = {
2299
- version: ni
2300
- };
2301
- function wi(e) {
2302
- return /* @__PURE__ */ s.jsx(kr, { children: /* @__PURE__ */ s.jsx(ri, j({}, e)) });
2303
- }
2304
- function ri({ url: e, messages: t, onEvent: n }) {
2305
- const o = f((a) => a.containerRef);
2306
- return D(() => {
2307
- console.log(`[Player][Live] Version: ${ln.version}`);
2308
- }, []), /* @__PURE__ */ s.jsxs(
2470
+ function Pi(e) {
2471
+ return /* @__PURE__ */ a.jsx($r, { children: /* @__PURE__ */ a.jsx(di, M({}, e)) });
2472
+ }
2473
+ function di({ url: e, messages: t = {}, onEvent: n }) {
2474
+ var l, u, i, c;
2475
+ const r = f((d) => d.containerRef), s = {
2476
+ eventNotStarted: "Event has not started yet.",
2477
+ eventStartingSoon: "Starting in few seconds...",
2478
+ unableToPlay: "Unable to play the live stream. Please try again later."
2479
+ };
2480
+ return N(() => {
2481
+ console.log(`[Player][Live] Version: ${Je.version}`);
2482
+ }, []), /* @__PURE__ */ a.jsxs(
2309
2483
  "div",
2310
2484
  {
2311
- ref: o,
2312
- className: B.playerContainer,
2485
+ ref: r,
2486
+ className: q.playerContainer,
2313
2487
  children: [
2314
- /* @__PURE__ */ s.jsxs(
2315
- Er,
2488
+ /* @__PURE__ */ a.jsxs(
2489
+ Dr,
2316
2490
  {
2317
2491
  url: e,
2318
2492
  messages: {
2319
- eventNotStarted: t == null ? void 0 : t.eventNotStarted,
2320
- eventStartingSoon: t == null ? void 0 : t.eventStartingSoon,
2321
- unableToPlay: t == null ? void 0 : t.unableToPlay
2493
+ eventNotStarted: (l = t == null ? void 0 : t.eventNotStarted) != null ? l : s.eventNotStarted,
2494
+ eventStartingSoon: (u = t == null ? void 0 : t.eventStartingSoon) != null ? u : s.eventStartingSoon,
2495
+ unableToPlay: (i = t == null ? void 0 : t.unableToPlay) != null ? i : s.unableToPlay
2322
2496
  },
2323
2497
  children: [
2324
- /* @__PURE__ */ s.jsx(
2325
- Vr,
2498
+ /* @__PURE__ */ a.jsx(
2499
+ zr,
2326
2500
  {
2327
2501
  url: e,
2328
2502
  messages: {
2329
- eventFinished: t == null ? void 0 : t.eventFinished,
2330
- unableToPlay: t == null ? void 0 : t.unableToPlay
2503
+ unableToPlay: (c = t == null ? void 0 : t.unableToPlay) != null ? c : s.unableToPlay
2331
2504
  }
2332
2505
  }
2333
2506
  ),
2334
- /* @__PURE__ */ s.jsx(Qt, {}),
2335
- /* @__PURE__ */ s.jsx(nn, {}),
2336
- /* @__PURE__ */ s.jsx(Kr, {}),
2337
- /* @__PURE__ */ s.jsxs(tn, { children: [
2338
- /* @__PURE__ */ s.jsx("div", { className: B.controlsTop, children: /* @__PURE__ */ s.jsx("div", { className: B.controlsContainer, children: /* @__PURE__ */ s.jsx("div", { className: B.controlsRow, children: /* @__PURE__ */ s.jsx(wo, {}) }) }) }),
2339
- /* @__PURE__ */ s.jsx("div", { className: B.controlsBottom, children: /* @__PURE__ */ s.jsxs("div", { className: B.controlsContainer, children: [
2340
- /* @__PURE__ */ s.jsx(fo, {}),
2341
- /* @__PURE__ */ s.jsxs("div", { className: B.controlsRow, children: [
2342
- /* @__PURE__ */ s.jsxs(
2507
+ /* @__PURE__ */ a.jsx(sn, {}),
2508
+ /* @__PURE__ */ a.jsx(cn, {}),
2509
+ /* @__PURE__ */ a.jsx(ro, {}),
2510
+ /* @__PURE__ */ a.jsxs(ln, { children: [
2511
+ /* @__PURE__ */ a.jsx("div", { className: q.controlsTop, children: /* @__PURE__ */ a.jsx("div", { className: q.controlsContainer, children: /* @__PURE__ */ a.jsx("div", { className: q.controlsRow, children: /* @__PURE__ */ a.jsx(Po, {}) }) }) }),
2512
+ /* @__PURE__ */ a.jsx("div", { className: q.controlsBottom, children: /* @__PURE__ */ a.jsxs("div", { className: q.controlsContainer, children: [
2513
+ /* @__PURE__ */ a.jsx(To, {}),
2514
+ /* @__PURE__ */ a.jsxs("div", { className: q.controlsRow, children: [
2515
+ /* @__PURE__ */ a.jsxs(
2343
2516
  "div",
2344
2517
  {
2345
- className: `${B.controlsSection} ${B.controlsSectionStart}`,
2518
+ className: `${q.controlsSection} ${q.controlsSectionStart}`,
2346
2519
  children: [
2347
- /* @__PURE__ */ s.jsx(to, {}),
2348
- /* @__PURE__ */ s.jsx(mo, {}),
2349
- /* @__PURE__ */ s.jsx(an, {})
2520
+ /* @__PURE__ */ a.jsx(uo, {}),
2521
+ /* @__PURE__ */ a.jsx(Co, {}),
2522
+ /* @__PURE__ */ a.jsx(hn, {})
2350
2523
  ]
2351
2524
  }
2352
2525
  ),
2353
- /* @__PURE__ */ s.jsxs(
2526
+ /* @__PURE__ */ a.jsxs(
2354
2527
  "div",
2355
2528
  {
2356
- className: `${B.controlsSection} ${B.controlsSectionEnd}`,
2529
+ className: `${q.controlsSection} ${q.controlsSectionEnd}`,
2357
2530
  children: [
2358
- /* @__PURE__ */ s.jsx(eo, { message: t == null ? void 0 : t.live }),
2359
- /* @__PURE__ */ s.jsx(sn, {}),
2360
- /* @__PURE__ */ s.jsx(en, {})
2531
+ /* @__PURE__ */ a.jsx(co, { message: t == null ? void 0 : t.live }),
2532
+ /* @__PURE__ */ a.jsx(fn, {}),
2533
+ /* @__PURE__ */ a.jsx(an, {})
2361
2534
  ]
2362
2535
  }
2363
2536
  )
2364
2537
  ] })
2365
2538
  ] }) })
2366
- ] })
2539
+ ] }),
2540
+ /* @__PURE__ */ a.jsx(Cr, { url: e }),
2541
+ /* @__PURE__ */ a.jsx(Hr, {}),
2542
+ /* @__PURE__ */ a.jsx(qr, { url: e })
2367
2543
  ]
2368
2544
  }
2369
2545
  ),
2370
- /* @__PURE__ */ s.jsx(Ir, {}),
2371
- /* @__PURE__ */ s.jsx(Nr, { url: e }),
2372
- n && /* @__PURE__ */ s.jsx(Lr, { callback: n })
2546
+ n && /* @__PURE__ */ a.jsx(Or, { callback: n })
2373
2547
  ]
2374
2548
  }
2375
2549
  );
2376
2550
  }
2377
- function oi() {
2378
- 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);
2379
- return /* @__PURE__ */ s.jsx(
2380
- Xt,
2551
+ function fi() {
2552
+ const e = f((u) => u.isPlaying), t = f((u) => u.pause), n = f((u) => u.play), r = f((u) => u.currentTime), s = f((u) => u.duration), l = f((u) => u.seek);
2553
+ return /* @__PURE__ */ a.jsx(
2554
+ nn,
2381
2555
  {
2382
2556
  onClick: () => {
2383
2557
  e ? t() : n();
2384
2558
  },
2385
2559
  onBackwardSeek: (u) => {
2386
- const i = Math.max(0, o - u);
2560
+ const i = Math.max(0, r - u);
2387
2561
  l(i);
2388
2562
  },
2389
2563
  onForwardSeek: (u) => {
2390
- const i = Math.min(o + u, a);
2564
+ const i = Math.min(r + u, s);
2391
2565
  l(i);
2392
2566
  },
2393
- maxBackwardTime: Math.floor(o),
2394
- maxForwardTime: Math.floor(a - o)
2567
+ maxBackwardTime: Math.floor(r),
2568
+ maxForwardTime: Math.floor(s - r)
2395
2569
  }
2396
2570
  );
2397
2571
  }
2398
- function ii() {
2399
- const e = f((a) => a.isPlaying), t = f((a) => a.pause), n = f((a) => a.play), o = () => {
2572
+ function hi() {
2573
+ const e = f((s) => s.isPlaying), t = f((s) => s.pause), n = f((s) => s.play), r = () => {
2400
2574
  e ? t() : n();
2401
2575
  };
2402
- return /* @__PURE__ */ s.jsx(le, { onClick: o, children: e ? /* @__PURE__ */ s.jsx(Gt, {}) : /* @__PURE__ */ s.jsx(Jt, {}) });
2576
+ return /* @__PURE__ */ a.jsx(le, { onClick: r, children: e ? /* @__PURE__ */ a.jsx(rn, {}) : /* @__PURE__ */ a.jsx(on, {}) });
2403
2577
  }
2404
- const bt = "vod-player-progress-bar";
2405
- function si() {
2406
- const e = N(null), t = N(null), [n, o] = G(!1), [a, l] = G(-1), [u, i] = G(-1), c = f((L) => L.currentTime), d = f((L) => L.duration), v = f((L) => L.seek), y = f((L) => L.addIdleLock), g = f((L) => L.removeIdleLock), P = parseFloat(
2578
+ const Lt = "vod-player-progress-bar";
2579
+ function mi() {
2580
+ const e = F(null), t = F(null), [n, r] = G(!1), [s, l] = G(-1), [u, i] = G(-1), c = f((R) => R.currentTime), d = f((R) => R.duration), g = f((R) => R.seek), T = f((R) => R.addIdleLock), y = f((R) => R.removeIdleLock), x = parseFloat(
2407
2581
  (d ? (u !== -1 ? u : c) / d * 100 : 0).toFixed(1)
2408
- ), k = (L) => {
2409
- i(d * (L[0] / 100)), y(bt);
2410
- }, T = () => {
2411
- u !== -1 && (v(u), i(-1), g(bt));
2412
- }, S = () => o(!0), V = () => o(!1), R = W(
2413
- (L) => {
2414
- const x = e.current, M = t.current;
2415
- if (x && M) {
2416
- const p = Fe(x), U = Fe(M), Y = (L.pageX || L.clientX) - p.left, z = Y / p.width;
2417
- if (z < 0) return;
2418
- let O = Y - U.width / 2;
2419
- O < 0 && (O = 0), O > p.width - U.width && (O = -1), M.style.left = O > -1 ? `${O}px` : "auto", M.style.right = O > -1 ? "auto" : "0px", l(z * d);
2582
+ ), L = (R) => {
2583
+ i(d * (R[0] / 100)), T(Lt);
2584
+ }, C = () => {
2585
+ u !== -1 && (g(u), i(-1), y(Lt));
2586
+ }, w = () => r(!0), S = () => r(!1), P = O(
2587
+ (R) => {
2588
+ const B = e.current, V = t.current;
2589
+ if (B && V) {
2590
+ const m = Fe(B), v = Fe(V), U = (R.pageX || R.clientX) - m.left, I = U / m.width;
2591
+ if (I < 0) return;
2592
+ let A = U - v.width / 2;
2593
+ A < 0 && (A = 0), A > m.width - v.width && (A = -1), V.style.left = A > -1 ? `${A}px` : "auto", V.style.right = A > -1 ? "auto" : "0px", l(I * d);
2420
2594
  }
2421
- S();
2595
+ w();
2422
2596
  },
2423
2597
  [d]
2424
2598
  );
2425
- return /* @__PURE__ */ s.jsxs("div", { className: se.progressSlider, children: [
2426
- /* @__PURE__ */ s.jsx(
2599
+ return /* @__PURE__ */ a.jsxs("div", { className: se.progressSlider, children: [
2600
+ /* @__PURE__ */ a.jsx(
2427
2601
  Ae,
2428
2602
  {
2429
2603
  ref: e,
2430
- value: [P],
2431
- onPointerLeave: V,
2432
- onPointerDown: V,
2433
- onPointerMove: R,
2434
- onValueChange: k,
2435
- onValueCommit: T,
2604
+ value: [x],
2605
+ onPointerLeave: S,
2606
+ onPointerDown: S,
2607
+ onPointerMove: P,
2608
+ onValueChange: L,
2609
+ onValueCommit: C,
2436
2610
  step: 0.1
2437
2611
  }
2438
2612
  ),
2439
- /* @__PURE__ */ s.jsx(
2613
+ /* @__PURE__ */ a.jsx(
2440
2614
  "div",
2441
2615
  {
2442
2616
  ref: t,
2443
2617
  className: `${se.tipContainer} ${n ? se.tipContainerVisible : se.tipContainerHidden}`,
2444
- children: /* @__PURE__ */ s.jsx("p", { className: se.tipContent, children: Te(a) })
2618
+ children: /* @__PURE__ */ a.jsx("p", { className: se.tipContent, children: Te(s) })
2445
2619
  }
2446
2620
  )
2447
2621
  ] });
2448
2622
  }
2449
- const ai = "_remainingTimeContainer_1yyhb_1", li = "_remainingTime_1yyhb_1", ci = "_remainingSeparator_1yyhb_17", Me = {
2450
- remainingTimeContainer: ai,
2451
- remainingTime: li,
2452
- remainingSeparator: ci
2623
+ const vi = "_remainingTimeContainer_1yyhb_1", pi = "_remainingTime_1yyhb_1", yi = "_remainingSeparator_1yyhb_17", Ne = {
2624
+ remainingTimeContainer: vi,
2625
+ remainingTime: pi,
2626
+ remainingSeparator: yi
2453
2627
  };
2454
- function ui() {
2628
+ function gi() {
2455
2629
  const e = f((n) => n.currentTime), t = f((n) => n.duration);
2456
- return /* @__PURE__ */ s.jsxs("div", { className: Me.remainingTimeContainer, children: [
2457
- /* @__PURE__ */ s.jsx("p", { className: Me.remainingTime, children: Te(e) }),
2458
- /* @__PURE__ */ s.jsx("p", { className: Me.remainingSeparator }),
2459
- /* @__PURE__ */ s.jsx("p", { className: Me.remainingTime, children: Te(t) })
2630
+ return /* @__PURE__ */ a.jsxs("div", { className: Ne.remainingTimeContainer, children: [
2631
+ /* @__PURE__ */ a.jsx("p", { className: Ne.remainingTime, children: Te(e) }),
2632
+ /* @__PURE__ */ a.jsx("p", { className: Ne.remainingSeparator }),
2633
+ /* @__PURE__ */ a.jsx("p", { className: Ne.remainingTime, children: Te(t) })
2460
2634
  ] });
2461
2635
  }
2462
- function di({ callback: e }) {
2636
+ function wi({ url: e }) {
2637
+ const { video_id: t } = Kt(e);
2638
+ return /* @__PURE__ */ a.jsx(
2639
+ Yt,
2640
+ {
2641
+ kind: "vod",
2642
+ url: e,
2643
+ id: t ? Number(t) : void 0
2644
+ }
2645
+ );
2646
+ }
2647
+ function _i({ callback: e }) {
2463
2648
  const t = f((n) => n.eventEmitter);
2464
- return D(() => {
2465
- const n = (o) => e("timeUpdate", o);
2649
+ return N(() => {
2650
+ const n = (r) => e("timeUpdate", r);
2466
2651
  return t.on("timeUpdate", n), () => {
2467
2652
  t.off("timeUpdate", n);
2468
2653
  };
2469
- }, [e, t]), /* @__PURE__ */ s.jsx(zt, { callback: e });
2654
+ }, [e, t]), /* @__PURE__ */ a.jsx(Gt, { callback: e });
2470
2655
  }
2471
- function fi() {
2472
- 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(
2656
+ function Ti() {
2657
+ const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), r = f((i) => i.pause), s = f((i) => i.play), l = f((i) => i.seek), u = O(
2473
2658
  (i) => {
2474
2659
  let c = !1;
2475
2660
  if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
@@ -2481,71 +2666,84 @@ function fi() {
2481
2666
  l(e + 10 < t ? e + 10 : t), c = !0;
2482
2667
  break;
2483
2668
  case "Space":
2484
- n ? o() : a(), c = !0;
2669
+ n ? r() : s(), c = !0;
2485
2670
  break;
2486
2671
  }
2487
2672
  c && i.preventDefault();
2488
2673
  }
2489
2674
  },
2490
- [e, t, n, o, a, l]
2675
+ [e, t, n, r, s, l]
2491
2676
  );
2492
- return D(() => (document.addEventListener("keydown", u), () => {
2677
+ return N(() => (document.addEventListener("keydown", u), () => {
2493
2678
  document.removeEventListener("keydown", u);
2494
- }), [u]), /* @__PURE__ */ s.jsx(qt, {});
2495
- }
2496
- function xi(e) {
2497
- return /* @__PURE__ */ s.jsx(Kt, { children: /* @__PURE__ */ s.jsx(hi, j({}, e)) });
2498
- }
2499
- function hi({ url: e, messages: t, onEvent: n, startTime: o }) {
2500
- const a = f((u) => u.setStartTime), l = f((u) => u.containerRef);
2501
- return D(() => {
2502
- o && a(o);
2503
- }, [o, a]), D(() => {
2504
- console.log(`[Player][VOD] Version: ${ln.version}`);
2505
- }, []), /* @__PURE__ */ s.jsxs(
2679
+ }), [u]), /* @__PURE__ */ a.jsx(Qt, {});
2680
+ }
2681
+ function Li(e) {
2682
+ return /* @__PURE__ */ a.jsx(en, { children: /* @__PURE__ */ a.jsx(xi, M({}, e)) });
2683
+ }
2684
+ function xi({ url: e, messages: t, onEvent: n, startTime: r }) {
2685
+ var i;
2686
+ const s = f((c) => c.setStartTime), l = f((c) => c.containerRef), u = {
2687
+ unableToPlay: "Unable to play the video. Please try again later."
2688
+ };
2689
+ return N(() => {
2690
+ r && s(r);
2691
+ }, [r, s]), N(() => {
2692
+ console.log(`[Player][VOD] Version: ${Je.version}`);
2693
+ }, []), /* @__PURE__ */ a.jsxs(
2506
2694
  "div",
2507
2695
  {
2508
2696
  ref: l,
2509
- className: B.playerContainer,
2697
+ className: q.playerContainer,
2510
2698
  children: [
2511
- /* @__PURE__ */ s.jsx(Yt, { url: e, isLive: !1, messages: t }),
2512
- /* @__PURE__ */ s.jsx(Qt, {}),
2513
- /* @__PURE__ */ s.jsx(nn, {}),
2514
- /* @__PURE__ */ s.jsx(oi, {}),
2515
- /* @__PURE__ */ s.jsx(tn, { children: /* @__PURE__ */ s.jsx("div", { className: B.controlsBottom, children: /* @__PURE__ */ s.jsxs("div", { className: B.controlsContainer, children: [
2516
- /* @__PURE__ */ s.jsx(si, {}),
2517
- /* @__PURE__ */ s.jsxs("div", { className: B.controlsRow, children: [
2518
- /* @__PURE__ */ s.jsxs(
2699
+ /* @__PURE__ */ a.jsx(
2700
+ tn,
2701
+ {
2702
+ url: e,
2703
+ isLive: !1,
2704
+ messages: {
2705
+ unableToPlay: (i = t == null ? void 0 : t.unableToPlay) != null ? i : u.unableToPlay
2706
+ }
2707
+ }
2708
+ ),
2709
+ /* @__PURE__ */ a.jsx(sn, {}),
2710
+ /* @__PURE__ */ a.jsx(cn, {}),
2711
+ /* @__PURE__ */ a.jsx(fi, {}),
2712
+ /* @__PURE__ */ a.jsx(ln, { children: /* @__PURE__ */ a.jsx("div", { className: q.controlsBottom, children: /* @__PURE__ */ a.jsxs("div", { className: q.controlsContainer, children: [
2713
+ /* @__PURE__ */ a.jsx(mi, {}),
2714
+ /* @__PURE__ */ a.jsxs("div", { className: q.controlsRow, children: [
2715
+ /* @__PURE__ */ a.jsxs(
2519
2716
  "div",
2520
2717
  {
2521
- className: `${B.controlsSection} ${B.controlsSectionStart}`,
2718
+ className: `${q.controlsSection} ${q.controlsSectionStart}`,
2522
2719
  children: [
2523
- /* @__PURE__ */ s.jsx(ii, {}),
2524
- /* @__PURE__ */ s.jsx(an, {}),
2525
- /* @__PURE__ */ s.jsx(ui, {})
2720
+ /* @__PURE__ */ a.jsx(hi, {}),
2721
+ /* @__PURE__ */ a.jsx(hn, {}),
2722
+ /* @__PURE__ */ a.jsx(gi, {})
2526
2723
  ]
2527
2724
  }
2528
2725
  ),
2529
- /* @__PURE__ */ s.jsxs(
2726
+ /* @__PURE__ */ a.jsxs(
2530
2727
  "div",
2531
2728
  {
2532
- className: `${B.controlsSection} ${B.controlsSectionEnd}`,
2729
+ className: `${q.controlsSection} ${q.controlsSectionEnd}`,
2533
2730
  children: [
2534
- /* @__PURE__ */ s.jsx(sn, {}),
2535
- /* @__PURE__ */ s.jsx(en, {})
2731
+ /* @__PURE__ */ a.jsx(fn, {}),
2732
+ /* @__PURE__ */ a.jsx(an, {})
2536
2733
  ]
2537
2734
  }
2538
2735
  )
2539
2736
  ] })
2540
2737
  ] }) }) }),
2541
- /* @__PURE__ */ s.jsx(fi, {}),
2542
- n && /* @__PURE__ */ s.jsx(di, { callback: n })
2738
+ /* @__PURE__ */ a.jsx(Ti, {}),
2739
+ /* @__PURE__ */ a.jsx(wi, { url: e }),
2740
+ n && /* @__PURE__ */ a.jsx(_i, { callback: n })
2543
2741
  ]
2544
2742
  }
2545
2743
  );
2546
2744
  }
2547
2745
  export {
2548
- wi as LivePlayer,
2549
- xi as VodPlayer
2746
+ Pi as LivePlayer,
2747
+ Li as VodPlayer
2550
2748
  };
2551
2749
  //# sourceMappingURL=react-video-player.es.js.map