boss-web-player-sdk 1.1.19 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as e, t, u as n } from "./src-IKWezLNW.js";
1
+ import { c as e, t, u as n } from "./src-B8eoxemB.js";
2
2
  import { createContext as r, createElement as i, forwardRef as a, useCallback as o, useContext as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
3
3
  import { createPortal as ee } from "react-dom";
4
4
  import { Fragment as te, jsx as f, jsxs as p } from "react/jsx-runtime";
@@ -100,10 +100,10 @@ function re({ title: e = "Something Went Wrong", subtitle: t = "We encountered a
100
100
  }
101
101
  //#endregion
102
102
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
103
- var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ae = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), oe = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), se = (e) => {
104
- let t = oe(e);
103
+ var m = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ie = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), h = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), ae = (e) => {
104
+ let t = h(e);
105
105
  return t.charAt(0).toUpperCase() + t.slice(1);
106
- }, ce = {
106
+ }, oe = {
107
107
  xmlns: "http://www.w3.org/2000/svg",
108
108
  width: 24,
109
109
  height: 24,
@@ -113,37 +113,37 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
113
113
  strokeWidth: 2,
114
114
  strokeLinecap: "round",
115
115
  strokeLinejoin: "round"
116
- }, le = (e) => {
116
+ }, se = (e) => {
117
117
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
118
118
  return !1;
119
- }, ue = r({}), de = () => s(ue), fe = a(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: a = "", children: o, iconNode: s, ...c }, l) => {
120
- let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: ee = !1, color: te = "currentColor", className: f = "" } = de() ?? {}, p = r ?? ee ? Number(n ?? d) * 24 / Number(t ?? u) : n ?? d;
119
+ }, ce = r({}), le = () => s(ce), ue = a(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: a = "", children: o, iconNode: s, ...c }, l) => {
120
+ let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: ee = !1, color: te = "currentColor", className: f = "" } = le() ?? {}, p = r ?? ee ? Number(n ?? d) * 24 / Number(t ?? u) : n ?? d;
121
121
  return i("svg", {
122
122
  ref: l,
123
- ...ce,
124
- width: t ?? u ?? ce.width,
125
- height: t ?? u ?? ce.height,
123
+ ...oe,
124
+ width: t ?? u ?? oe.width,
125
+ height: t ?? u ?? oe.height,
126
126
  stroke: e ?? te,
127
127
  strokeWidth: p,
128
- className: ie("lucide", f, a),
129
- ...!o && !le(c) && { "aria-hidden": "true" },
128
+ className: m("lucide", f, a),
129
+ ...!o && !se(c) && { "aria-hidden": "true" },
130
130
  ...c
131
131
  }, [...s.map(([e, t]) => i(e, t)), ...Array.isArray(o) ? o : [o]]);
132
- }), m = (e, t) => {
133
- let n = a(({ className: n, ...r }, a) => i(fe, {
132
+ }), g = (e, t) => {
133
+ let n = a(({ className: n, ...r }, a) => i(ue, {
134
134
  ref: a,
135
135
  iconNode: t,
136
- className: ie(`lucide-${ae(se(e))}`, `lucide-${e}`, n),
136
+ className: m(`lucide-${ie(ae(e))}`, `lucide-${e}`, n),
137
137
  ...r
138
138
  }));
139
- return n.displayName = se(e), n;
140
- }, pe = m("airplay", [["path", {
139
+ return n.displayName = ae(e), n;
140
+ }, de = g("airplay", [["path", {
141
141
  d: "M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1",
142
142
  key: "ns4c3b"
143
143
  }], ["path", {
144
144
  d: "m12 15 5 6H7Z",
145
145
  key: "14qnn2"
146
- }]]), me = m("captions", [["rect", {
146
+ }]]), fe = g("captions", [["rect", {
147
147
  width: "18",
148
148
  height: "14",
149
149
  x: "3",
@@ -154,7 +154,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
154
154
  }], ["path", {
155
155
  d: "M7 15h4M15 15h2M7 11h2M13 11h4",
156
156
  key: "1ueiar"
157
- }]]), he = m("cast", [
157
+ }]]), pe = g("cast", [
158
158
  ["path", {
159
159
  d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6",
160
160
  key: "3zrzxg"
@@ -174,13 +174,13 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
174
174
  y2: "20",
175
175
  key: "xu2jvo"
176
176
  }]
177
- ]), h = m("check", [["path", {
177
+ ]), _ = g("check", [["path", {
178
178
  d: "M20 6 9 17l-5-5",
179
179
  key: "1gmf2c"
180
- }]]), ge = m("chevron-left", [["path", {
180
+ }]]), me = g("chevron-left", [["path", {
181
181
  d: "m15 18-6-6 6-6",
182
182
  key: "1wnfg3"
183
- }]]), _e = m("external-link", [
183
+ }]]), he = g("external-link", [
184
184
  ["path", {
185
185
  d: "M15 3h6v6",
186
186
  key: "1q9fwt"
@@ -193,13 +193,13 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
193
193
  d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",
194
194
  key: "a6xqqp"
195
195
  }]
196
- ]), ve = m("gauge", [["path", {
196
+ ]), ge = g("gauge", [["path", {
197
197
  d: "m12 14 4-4",
198
198
  key: "9kzdfg"
199
199
  }], ["path", {
200
200
  d: "M3.34 19a10 10 0 1 1 17.32 0",
201
201
  key: "19p75a"
202
- }]]), ye = m("languages", [
202
+ }]]), _e = g("languages", [
203
203
  ["path", {
204
204
  d: "m5 8 6 6",
205
205
  key: "1wu5hv"
@@ -224,7 +224,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
224
224
  d: "M14 18h6",
225
225
  key: "1m8k6r"
226
226
  }]
227
- ]), be = m("list-video", [
227
+ ]), ve = g("list-video", [
228
228
  ["path", {
229
229
  d: "M21 5H3",
230
230
  key: "1fi0y6"
@@ -241,7 +241,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
241
241
  d: "M15 12.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z",
242
242
  key: "ms4nik"
243
243
  }]
244
- ]), xe = m("maximize", [
244
+ ]), ye = g("maximize", [
245
245
  ["path", {
246
246
  d: "M8 3H5a2 2 0 0 0-2 2v3",
247
247
  key: "1dcmit"
@@ -258,7 +258,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
258
258
  d: "M16 21h3a2 2 0 0 0 2-2v-3",
259
259
  key: "18trek"
260
260
  }]
261
- ]), g = m("minimize", [
261
+ ]), be = g("minimize", [
262
262
  ["path", {
263
263
  d: "M8 3v3a2 2 0 0 1-2 2H3",
264
264
  key: "hohbtr"
@@ -275,7 +275,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
275
275
  d: "M16 21v-3a2 2 0 0 1 2-2h3",
276
276
  key: "ph8mxp"
277
277
  }]
278
- ]), Se = m("pause", [["rect", {
278
+ ]), v = g("pause", [["rect", {
279
279
  x: "14",
280
280
  y: "3",
281
281
  width: "5",
@@ -289,7 +289,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
289
289
  height: "18",
290
290
  rx: "1",
291
291
  key: "1wsw3u"
292
- }]]), Ce = m("picture-in-picture", [
292
+ }]]), xe = g("picture-in-picture", [
293
293
  ["path", {
294
294
  d: "M2 10h6V4",
295
295
  key: "zwrco"
@@ -314,28 +314,28 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
314
314
  rx: "1",
315
315
  key: "1wjs3o"
316
316
  }]
317
- ]), we = m("play", [["path", {
317
+ ]), Se = g("play", [["path", {
318
318
  d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
319
319
  key: "10ikf1"
320
- }]]), Te = m("rotate-ccw", [["path", {
320
+ }]]), Ce = g("rotate-ccw", [["path", {
321
321
  d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
322
322
  key: "1357e3"
323
323
  }], ["path", {
324
324
  d: "M3 3v5h5",
325
325
  key: "1xhq8a"
326
- }]]), Ee = m("rotate-cw", [["path", {
326
+ }]]), we = g("rotate-cw", [["path", {
327
327
  d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
328
328
  key: "1p45f6"
329
329
  }], ["path", {
330
330
  d: "M21 3v5h-5",
331
331
  key: "1q7to0"
332
- }]]), De = m("volume-1", [["path", {
332
+ }]]), Te = g("volume-1", [["path", {
333
333
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
334
334
  key: "uqj9uw"
335
335
  }], ["path", {
336
336
  d: "M16 9a5 5 0 0 1 0 6",
337
337
  key: "1q6k2b"
338
- }]]), Oe = m("volume-2", [
338
+ }]]), Ee = g("volume-2", [
339
339
  ["path", {
340
340
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
341
341
  key: "uqj9uw"
@@ -348,7 +348,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
348
348
  d: "M19.364 18.364a9 9 0 0 0 0-12.728",
349
349
  key: "ijwkga"
350
350
  }]
351
- ]), ke = m("volume-x", [
351
+ ]), De = g("volume-x", [
352
352
  ["path", {
353
353
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
354
354
  key: "uqj9uw"
@@ -367,15 +367,15 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
367
367
  y2: "15",
368
368
  key: "5ykzw1"
369
369
  }]
370
- ]), Ae = m("volume", [["path", {
370
+ ]), Oe = g("volume", [["path", {
371
371
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
372
372
  key: "uqj9uw"
373
- }]]), je = 1e4, Me = !1, Ne = "\n html, body { margin: 0; padding: 0; height: 100%; background: #000; overflow: hidden; }\n * { box-sizing: border-box; }\n .gb-pip-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }\n .gb-pip-overlay {\n position: absolute; inset: 0; z-index: 2;\n display: flex; flex-direction: column; justify-content: space-between;\n font-family: system-ui, -apple-system, sans-serif; color: #fff;\n opacity: 0; transition: opacity 0.15s ease;\n background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.55) 100%);\n }\n .gb-pip-overlay:hover, .gb-pip-overlay.gb-pip-paused { opacity: 1; }\n .gb-pip-center {\n flex: 1; display: flex; align-items: center; justify-content: center; gap: 28px;\n }\n .gb-pip-btn {\n background: rgba(0,0,0,0.35); border: none; color: #fff; border-radius: 50%;\n width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;\n cursor: pointer; padding: 0;\n }\n .gb-pip-btn:hover { background: rgba(0,0,0,0.55); }\n .gb-pip-btn.gb-pip-play { width: 56px; height: 56px; }\n .gb-pip-bottom { padding: 6px 10px 8px; display: flex; flex-direction: column; gap: 4px; }\n .gb-pip-progress { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.3); cursor: pointer; }\n .gb-pip-progress-fill { position: absolute; inset: 0; width: 0%; border-radius: 2px; background: #fff; }\n .gb-pip-time { font-size: 11px; font-variant-numeric: tabular-nums; opacity: 0.9; }\n", _ = (e) => {
373
+ }]]), ke = 1e4, Ae = !1, je = "\n html, body { margin: 0; padding: 0; height: 100%; background: #000; overflow: hidden; }\n * { box-sizing: border-box; }\n .gb-pip-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }\n .gb-pip-overlay {\n position: absolute; inset: 0; z-index: 2;\n display: flex; flex-direction: column; justify-content: space-between;\n font-family: system-ui, -apple-system, sans-serif; color: #fff;\n opacity: 0; transition: opacity 0.15s ease;\n background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.55) 100%);\n }\n .gb-pip-overlay:hover, .gb-pip-overlay.gb-pip-paused { opacity: 1; }\n .gb-pip-center {\n flex: 1; display: flex; align-items: center; justify-content: center; gap: 28px;\n }\n .gb-pip-btn {\n background: rgba(0,0,0,0.35); border: none; color: #fff; border-radius: 50%;\n width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;\n cursor: pointer; padding: 0;\n }\n .gb-pip-btn:hover { background: rgba(0,0,0,0.55); }\n .gb-pip-btn.gb-pip-play { width: 56px; height: 56px; }\n .gb-pip-bottom { padding: 6px 10px 8px; display: flex; flex-direction: column; gap: 4px; }\n .gb-pip-progress { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.3); cursor: pointer; }\n .gb-pip-progress-fill { position: absolute; inset: 0; width: 0%; border-radius: 2px; background: #fff; }\n .gb-pip-time { font-size: 11px; font-variant-numeric: tabular-nums; opacity: 0.9; }\n", Me = (e) => {
374
374
  let t = e.match(/#EXT-X-TITLE:(.+)/);
375
375
  if (t?.[1]?.trim()) return t[1].trim();
376
376
  let n = e.match(/#EXT-X-SESSION-DATA:[^\n]*DATA-ID="[^"]*title[^"]*"[^\n]*VALUE="([^"]+)"/i);
377
377
  return n?.[1]?.trim() ? n[1].trim() : null;
378
- }, Pe = (e) => {
378
+ }, y = (e) => {
379
379
  if (!e || e.length < 10 || e[0] !== 73 || e[1] !== 68 || e[2] !== 51) return null;
380
380
  let t = e[3], n = (e[6] & 127) << 21 | (e[7] & 127) << 14 | (e[8] & 127) << 7 | e[9] & 127, r = Math.min(10 + n, e.length), i = 10;
381
381
  for (; i + 10 <= r;) {
@@ -388,7 +388,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
388
388
  i += 10 + a;
389
389
  }
390
390
  return null;
391
- }, Fe = ({ size: e = 20 }) => /* @__PURE__ */ p("svg", {
391
+ }, Ne = ({ size: e = 20 }) => /* @__PURE__ */ p("svg", {
392
392
  width: e,
393
393
  height: e,
394
394
  viewBox: "0 0 24 24",
@@ -408,7 +408,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
408
408
  /* @__PURE__ */ f("path", { d: "M7 9v6M7 12h3M10 9v6" }),
409
409
  /* @__PURE__ */ f("path", { d: "M14 9h1.5a3 3 0 0 1 0 6H14z" })
410
410
  ]
411
- }), Ie = ({ size: e = 20 }) => /* @__PURE__ */ p("svg", {
411
+ }), Pe = ({ size: e = 20 }) => /* @__PURE__ */ p("svg", {
412
412
  width: e,
413
413
  height: e,
414
414
  viewBox: "0 0 24 24",
@@ -428,10 +428,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
428
428
  /* @__PURE__ */ f("path", { d: "M7 9v6M7 12h3M10 9v6" }),
429
429
  /* @__PURE__ */ f("path", { d: "M14 9h1.5a3 3 0 0 1 0 6H14z" })
430
430
  ]
431
- }), Le = (e) => {
431
+ }), Fe = (e) => {
432
432
  let t = e.replace("#", "");
433
433
  return t.length === 6 ? `${parseInt(t.substring(0, 2), 16)}, ${parseInt(t.substring(2, 4), 16)}, ${parseInt(t.substring(4, 6), 16)}` : t.length === 3 ? `${parseInt(t[0] + t[0], 16)}, ${parseInt(t[1] + t[1], 16)}, ${parseInt(t[2] + t[2], 16)}` : "99, 102, 241";
434
- }, v = {
434
+ }, Ie = {
435
435
  en: "English",
436
436
  eng: "English",
437
437
  fr: "French",
@@ -454,74 +454,118 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
454
454
  hi: "Hindi",
455
455
  ta: "Tamil",
456
456
  tam: "Tamil"
457
- }, Re = (e) => {
457
+ }, Le = (e) => {
458
458
  if (!e) return null;
459
459
  let t = e.trim().toLowerCase(), n = t.match(/^(en|eng|fr|fre|fra|es|spa|de|ger|deu|it|ita|pt|por|ja|zh|ko|ru|ar|hi|ta|tam)/);
460
- if (n && v[n[0]]) return v[n[0]];
461
- for (let [e, n] of Object.entries(v)) if (t.includes(e)) return n;
460
+ if (n && Ie[n[0]]) return Ie[n[0]];
461
+ for (let [e, n] of Object.entries(Ie)) if (t.includes(e)) return n;
462
462
  return /english|anglais|ingles/i.test(t) ? "English" : /french|français/i.test(t) ? "French" : /spanish|español/i.test(t) ? "Spanish" : /german|deutsch/i.test(t) ? "German" : /italian|italiano/i.test(t) ? "Italian" : /portuguese|português/i.test(t) ? "Portuguese" : /japanese|nihongo/i.test(t) ? "Japanese" : /chinese|中文/i.test(t) ? "Chinese" : /korean|한국어/i.test(t) ? "Korean" : /tamil|தமிழ்/i.test(t) ? "Tamil" : /russian|русский/i.test(t) ? "Russian" : /arabic|العربية/i.test(t) ? "Arabic" : /hindi|हिन्दी/i.test(t) ? "Hindi" : null;
463
- }, y = (e) => {
463
+ }, b = (e) => {
464
464
  if (e.lang) {
465
- let t = Re(e.lang);
465
+ let t = Le(e.lang);
466
466
  if (t) return t;
467
467
  }
468
468
  if (e.label) {
469
469
  let t = e.label.trim(), n = t.split(/[#\d\.\s\-_/|:]+/).filter(Boolean);
470
470
  for (let e = n.length - 1; e >= 0; --e) {
471
- let t = Re(n[e]);
471
+ let t = Le(n[e]);
472
472
  if (t) return t;
473
473
  }
474
474
  let r = t.replace(/^[#\d\.\s]+/, "").trim();
475
- return Re(r) || r;
475
+ return Le(r) || r;
476
476
  }
477
477
  return "Unknown";
478
- }, ze = (e) => {
478
+ }, Re = (e) => {
479
479
  let t = /* @__PURE__ */ new Set();
480
480
  return e.filter((e) => {
481
- let n = `${y(e).toLowerCase()}|${(e.lang || "").trim().toLowerCase()}`;
481
+ let n = `${b(e).toLowerCase()}|${(e.lang || "").trim().toLowerCase()}`;
482
482
  return t.has(n) ? !1 : (t.add(n), !0);
483
483
  });
484
- }, Be = (e) => {
484
+ }, ze = (e) => {
485
485
  let t = (e ?? "").split(":").map(Number);
486
486
  return (t[0] || 0) * 3600 + (t[1] || 0) * 60 + (t[2] || 0);
487
- }, Ve = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoments: ne, subtitles: ie = [], watermark: ae, themeColor: oe = "#6366f1", drmConfig: se, firebaseConfig: ce, onAnalyticsEvent: le, onAdBreakChange: ue, onKeyMomentsLoaded: de, enableControls: fe = !0, enableChromecast: m, enableKeyMoments: v, enableSubtitles: Re, enableQuality: Ve, enablePlaybackSpeed: He, enablePiP: Ue, enableFullscreen: We = !0, autoFullscreen: Ge = !1, watchProgressInterval: Ke = 30, subtitleStyle: qe = {}, resolvedEntitlement: Je, licenseKey: Ye, title: Xe, chaptersDisplayMode: Ze = "strip", volumeControlType: Qe = "slider", urlTransformer: $e, pauseAdOnTabSwitch: et = !0, enableSkipAd: tt = !1, skipAdAfterSeconds: nt = 5, overlayAdUrl: rt, adTrackingUrl: b, sources: x, activeSourceIndex: S = 0, onSourceChange: it, initialTime: at, onTimeUpdate: ot }) => {
488
- let st = $e ?? ((e) => e), C = u(null), ct = u(null), lt = u(!1), w = u(null), ut = u(0), dt = u(null), T = u(null), ft = u(null), pt = u(null), mt = u(!1), E = u(!1), D = u(null), O = u(null), k = u(null), ht = u(null), gt = u(() => {}), A = u(null), _t = u(null), vt = (e) => {
489
- !e || _t.current !== null || (_t.current = e.muted, e.muted = !0);
490
- }, yt = (e) => {
491
- _t.current !== null && (e && (e.muted = _t.current), _t.current = null);
492
- }, bt = u(null), xt = u(!1), St = u(null), Ct = u(null), wt = u(null), j = u(null), Tt = u(null), Et = u(x), Dt = u(it), Ot = u(!1), M = u(null), N = u(null), P = u(null), kt = u(0), At = u(null), [jt, Mt] = d(!1), Nt = u(!1), Pt = u(null), [Ft, It] = d(null);
487
+ }, Be = (e) => {
488
+ if (!e) return !1;
489
+ try {
490
+ let { protocol: t } = new URL(e, window.location.href);
491
+ return t === "http:" || t === "https:";
492
+ } catch {
493
+ return !1;
494
+ }
495
+ }, Ve = (e) => {
496
+ if (typeof e == "number") return Number.isFinite(e) && e >= 0 ? e : null;
497
+ if (typeof e != "string") return null;
498
+ let t = e.trim();
499
+ if (!t) return null;
500
+ if (/^\d+:\d{1,2}:\d{1,2}(\.\d+)?$/.test(t)) return ze(t);
501
+ let n = Number(t);
502
+ return Number.isFinite(n) && n >= 0 ? n : null;
503
+ }, He = [
504
+ 0,
505
+ 1e3,
506
+ 2e3,
507
+ 3e3,
508
+ 5e3,
509
+ 8e3
510
+ ];
511
+ function Ue(e, t, n) {
512
+ let r = !1, i, a = (o) => {
513
+ i = setTimeout(() => {
514
+ r || fetch(e).then((e) => e.json()).then((e) => {
515
+ if (r) return;
516
+ let i = t(e);
517
+ if (i !== null) {
518
+ n(i);
519
+ return;
520
+ }
521
+ o + 1 < He.length && a(o + 1);
522
+ }).catch(() => {
523
+ r || o + 1 < He.length && a(o + 1);
524
+ });
525
+ }, He[o]);
526
+ };
527
+ return a(0), () => {
528
+ r = !0, i && clearTimeout(i);
529
+ };
530
+ }
531
+ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoments: ne, subtitles: m = [], watermark: ie, themeColor: h = "#6366f1", drmConfig: ae, firebaseConfig: oe, videoId: se, onAnalyticsEvent: ce, onAdBreakChange: le, onKeyMomentsLoaded: ue, enableControls: g = !0, enableChromecast: Ie, enableKeyMoments: Le, enableSubtitles: He, enableQuality: We, enablePlaybackSpeed: Ge, enablePiP: Ke, enableFullscreen: qe = !0, autoFullscreen: Je = !1, watchProgressInterval: Ye = 30, subtitleStyle: Xe = {}, resolvedEntitlement: Ze, licenseKey: Qe, title: x, chaptersDisplayMode: $e = "strip", volumeControlType: et = "slider", urlTransformer: tt, pauseAdOnTabSwitch: nt = !0, enableSkipAd: rt = !1, skipAdAfterSeconds: it = 5, overlayAdUrl: at, adTrackingUrl: ot, sources: S, activeSourceIndex: st = 0, onSourceChange: ct, initialTime: lt, onTimeUpdate: ut }) => {
532
+ let dt = tt ?? ((e) => e), C = u(null), ft = u(null), pt = u(!1), w = u(null), mt = u(0), ht = u(null), T = u(null), gt = u(null), _t = u(null), vt = u(!1), E = u(!1), D = u(null), O = u(null), k = u(null), yt = u(null), bt = u(() => {}), A = u(null), xt = u(!1), St = u(null), Ct = (e) => {
533
+ !e || St.current !== null || (St.current = e.muted, e.muted = !0);
534
+ }, wt = (e) => {
535
+ St.current !== null && (e && (e.muted = St.current), St.current = null);
536
+ }, Tt = u(null), Et = u(!1), Dt = u(null), Ot = u(null), kt = u(null), j = u(null), At = u(null), jt = u(S), Mt = u(ct), Nt = u(!1), M = u(null), N = u(null), P = u(null), Pt = u(null), Ft = u(0), It = u(null), [Lt, Rt] = d(!1), zt = u(!1), Bt = u(null), [Vt, Ht] = d(null);
493
537
  c(() => {
494
- if (typeof window > "u" || Me) return;
538
+ if (typeof window > "u" || Ae) return;
495
539
  let e = window.requestAnimationFrame(() => {
496
540
  let e = C.current;
497
541
  if (!e) return;
498
542
  let t = window.getComputedStyle(e);
499
- t.overflow !== "hidden" && t.borderTopLeftRadius === "0px" && (Me = !0, console.warn("[boss-web-player-sdk] Player styles appear to be missing — the player will look broken/unstyled.\nImport the stylesheet once at your app entry point:\n import 'boss-web-player-sdk/css';"));
543
+ t.overflow !== "hidden" && t.borderTopLeftRadius === "0px" && (Ae = !0, console.warn("[boss-web-player-sdk] Player styles appear to be missing — the player will look broken/unstyled.\nImport the stylesheet once at your app entry point:\n import 'boss-web-player-sdk/css';"));
500
544
  });
501
545
  return () => window.cancelAnimationFrame(e);
502
546
  }, []), c(() => {
503
547
  let e = C.current;
504
548
  if (!e) return;
505
549
  let t = new ResizeObserver((e) => {
506
- for (let t of e) Mt(t.contentRect.width <= 768);
550
+ for (let t of e) Rt(t.contentRect.width <= 768);
507
551
  });
508
- return t.observe(e), Mt(e.getBoundingClientRect().width <= 768), () => t.disconnect();
552
+ return t.observe(e), Rt(e.getBoundingClientRect().width <= 768), () => t.disconnect();
509
553
  }, []);
510
- let [F, Lt] = d(null), [Rt, zt] = d(!1), Bt = Je ?? null, Vt = Bt != null, Ht = Bt?.features ?? {}, Ut = Vt ? !!(Ht.drm_protection && !Ye) : !1, I = {
511
- enableSubtitles: Vt ? !!Ht.subtitle_support : typeof Re == "boolean" ? Re : !0,
512
- enableChromecast: Vt ? !!Ht.chromecast : typeof m == "boolean" ? m : !0,
513
- enableKeyMoments: Vt ? !!Ht.key_moments : typeof v == "boolean" ? v : !0,
514
- enableQuality: Vt ? !!Ht.multiple_resolution : typeof Ve == "boolean" ? Ve : !0,
515
- enablePlaybackSpeed: Vt ? !!Ht.playback_speed : typeof He == "boolean" ? He : !0,
516
- enablePiP: Vt ? !!Ht.picture_in_picture : typeof Ue == "boolean" ? Ue : !0,
517
- allowAirplay: Vt ? !!Ht.airplay : !1,
518
- allowMultipleAudio: Vt ? !!Ht.multiple_audio : !0,
519
- m3u8_playback: Vt ? !!Ht.m3u8_playback : !0,
520
- drm_protection: Vt ? !!Ht.drm_protection : !1
521
- }, [Wt, Gt] = d(!1), [Kt, qt] = d(0), [Jt, Yt] = d(!1), [L, Xt] = d(0), [Zt, Qt] = d(0), [$t, en] = d(1), [tn, nn] = d(!1), [rn, an] = d(!1), [on, sn] = d(!1), [cn, ln] = d(!1), [un, dn] = d(!1), fn = jt || (on || cn) && un, [pn, mn] = d(!1), [hn, gn] = d(null), [_n, vn] = d(!1), [R, yn] = d([]), z = u([]), bn = u(/* @__PURE__ */ new Set()), xn = x && x.length > 0 ? x.map((e) => e.url).join("|") : r, [Sn, Cn] = d(/* @__PURE__ */ new Set()), [wn, Tn] = d(xn), En = u(null), Dn = u(!1), On = u(null);
522
- wn !== xn && (Tn(xn), Cn(/* @__PURE__ */ new Set()), bn.current = /* @__PURE__ */ new Set(), En.current = null, Dn.current = !1);
523
- let kn = u(null), An = u(!1), [jn, Mn] = d([]), [Nn, Pn] = d(null), Fn = u([]), In = u(null), Ln = u(/* @__PURE__ */ new Set()), [Rn, zn] = d([]), Bn = u([]), [Vn, Hn] = d([]), Un = (e) => {
524
- let t = Bn.current.find((t) => e >= t.startTimeSeconds && e < t.endTimeSeconds);
554
+ let [F, Ut] = d(null), [Wt, Gt] = d(!1), Kt = Ze ?? null, qt = Kt != null, Jt = Kt?.features ?? {}, Yt = qt ? !!(Jt.drm_protection && !Qe) : !1, I = {
555
+ enableSubtitles: qt ? !!Jt.subtitle_support : typeof He == "boolean" ? He : !0,
556
+ enableChromecast: qt ? !!Jt.chromecast : typeof Ie == "boolean" ? Ie : !0,
557
+ enableKeyMoments: qt ? !!Jt.key_moments : typeof Le == "boolean" ? Le : !0,
558
+ enableQuality: qt ? !!Jt.multiple_resolution : typeof We == "boolean" ? We : !0,
559
+ enablePlaybackSpeed: qt ? !!Jt.playback_speed : typeof Ge == "boolean" ? Ge : !0,
560
+ enablePiP: qt ? !!Jt.picture_in_picture : typeof Ke == "boolean" ? Ke : !0,
561
+ allowAirplay: qt ? !!Jt.airplay : !1,
562
+ allowMultipleAudio: qt ? !!Jt.multiple_audio : !0,
563
+ m3u8_playback: qt ? !!Jt.m3u8_playback : !0,
564
+ drm_protection: qt ? !!Jt.drm_protection : !1
565
+ }, [Xt, Zt] = d(!1), [Qt, $t] = d(0), [en, tn] = d(!1), [L, nn] = d(0), [rn, an] = d(0), [on, sn] = d(1), [cn, ln] = d(!1), [un, dn] = d(!1), [fn, pn] = d(!1), [mn, hn] = d(!1), [gn, _n] = d(!1), vn = Lt || (fn || mn) && gn, [yn, bn] = d(!1), [xn, Sn] = d(null), [Cn, wn] = d(!1), [R, Tn] = d([]), z = u([]), En = u(/* @__PURE__ */ new Set()), Dn = S && S.length > 0 ? S.map((e) => e.url).join("|") : r, [On, kn] = d(/* @__PURE__ */ new Set()), [An, jn] = d(Dn), Mn = u(null), Nn = u(!1), Pn = u(null);
566
+ An !== Dn && (jn(Dn), kn(/* @__PURE__ */ new Set()), En.current = /* @__PURE__ */ new Set(), Mn.current = null, Nn.current = !1);
567
+ let Fn = u(null), In = u(!1), [Ln, Rn] = d([]), [zn, Bn] = d(null), Vn = u([]), Hn = u(null), Un = u(/* @__PURE__ */ new Set()), [Wn, Gn] = d([]), Kn = u([]), [qn, Jn] = d([]), Yn = (e) => {
568
+ let t = Kn.current.find((t) => e >= t.startTimeSeconds && e < t.endTimeSeconds);
525
569
  if (t) return {
526
570
  start: t.startTimeSeconds,
527
571
  end: t.endTimeSeconds
@@ -531,7 +575,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
531
575
  start: n.startTime,
532
576
  end: n.endTime
533
577
  } : null;
534
- }, Wn = l(() => R.reduce((e, t) => e + (t.endTime - t.startTime), 0), [R]), Gn = Zt > 0 ? Math.max(0, Zt - Wn) : 0, B = R.length > 0 && Gn > 0 ? Gn : Zt, V = o((e) => {
578
+ }, Xn = l(() => R.reduce((e, t) => e + (t.endTime - t.startTime), 0), [R]), Zn = rn > 0 ? Math.max(0, rn - Xn) : 0, B = R.length > 0 && Zn > 0 ? Zn : rn, V = o((e) => {
535
579
  let t = e;
536
580
  for (let n of R) e >= n.endTime ? t -= n.endTime - n.startTime : e >= n.startTime && (t -= e - n.startTime);
537
581
  return Math.max(0, t);
@@ -539,31 +583,31 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
539
583
  let t = e;
540
584
  for (let e of R) t >= e.startTime && (t += e.endTime - e.startTime);
541
585
  return t;
542
- }, [R]), [Kn, qn] = d([]), [Jn, Yn] = d({
586
+ }, [R]), [Qn, $n] = d([]), [er, tr] = d({
543
587
  id: -1,
544
588
  height: 0,
545
589
  width: 0,
546
590
  bitrate: 0,
547
591
  label: "Auto"
548
- }), [Xn, Zn] = d(""), [U, Qn] = d("off"), [$n, er] = d(ze(ie)), [tr, nr] = d([]), [rr, ir] = d(0);
592
+ }), [nr, rr] = d(""), [U, ir] = d("off"), [ar, or] = d(Re(m)), [sr, cr] = d([]), [lr, ur] = d(0);
549
593
  c(() => {
550
594
  if (F) {
551
595
  let e = F.subtitles.getTracks();
552
- er(ze([...ie, ...e.filter((e) => !ie.some((t) => t.id === e.id))]));
553
- } else er(ze(ie));
554
- }, [ie.map((e) => e.id).join(","), F]);
555
- let [ar, or] = d({
596
+ or(Re([...m, ...e.filter((e) => !m.some((t) => t.id === e.id))]));
597
+ } else or(Re(m));
598
+ }, [m.map((e) => e.id).join(","), F]);
599
+ let [dr, fr] = d({
556
600
  chapter: null,
557
601
  index: -1
558
- }), [W, sr] = d(ne || s || []), [G, K] = d("none"), [cr, lr] = d(1), [ur, dr] = d(!1), [fr, pr] = d({}), [mr, hr] = d(""), [gr, _r] = d(null), vr = u(!1), yr = JSON.stringify(W.map((e) => ({
602
+ }), [W, pr] = d(ne || s || []), [G, K] = d("none"), [mr, hr] = d(1), [gr, _r] = d(!1), [vr, yr] = d({}), [br, xr] = d(""), [Sr, Cr] = d(null), wr = u(!1), Tr = JSON.stringify(W.map((e) => ({
559
603
  title: e.title,
560
604
  startTime: e.startTime
561
605
  })));
562
606
  c(() => {
563
- sr(ne || s || []);
607
+ pr(ne || s || []);
564
608
  }, [(ne || s || []).map((e) => `${e.startTime}:${e.title}`).join(",")]), c(() => {
565
609
  if (!r || !W || W.length === 0) return;
566
- pr({});
610
+ yr({});
567
611
  let e = document.createElement("video");
568
612
  e.muted = !0, e.preload = "metadata", e.crossOrigin = "anonymous", e.style.cssText = "position:fixed;top:0;left:0;width:10px;height:10px;opacity:0.01;pointer-events:none;z-index:-9999;", document.body.appendChild(e);
569
613
  let t = null, i = r.includes(".m3u8"), a = document.createElement("canvas");
@@ -579,7 +623,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
579
623
  if (o && e.readyState >= 2) {
580
624
  o.drawImage(e, 0, 0, a.width, a.height);
581
625
  let t = a.toDataURL("image/jpeg", .8);
582
- pr((e) => ({
626
+ yr((e) => ({
583
627
  ...e,
584
628
  [s]: t
585
629
  })), s++, l();
@@ -591,34 +635,34 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
591
635
  enableWorker: !1,
592
636
  maxBufferLength: 5,
593
637
  xhrSetup: (e, t) => {
594
- let n = se?.authToken;
638
+ let n = ae?.authToken;
595
639
  try {
596
- let r = st(t), i = new URL(r, window.location.origin);
640
+ let r = dt(t), i = new URL(r, window.location.origin);
597
641
  n && i.searchParams.set("token", n), e.open("GET", i.toString(), !0);
598
642
  } catch (e) {
599
643
  console.error("[WebVideoPlayer tempHls] xhrSetup error:", e);
600
644
  }
601
645
  }
602
- }), t.loadSource(st(r)), t.attachMedia(e)) : e.src = r, e.readyState >= 2 && d();
646
+ }), t.loadSource(dt(r)), t.attachMedia(e)) : e.src = r, e.readyState >= 2 && d();
603
647
  let ee = () => {
604
648
  e.removeEventListener("seeked", u), e.removeEventListener("canplay", d), t && t.destroy(), document.body.contains(e) && document.body.removeChild(e);
605
649
  };
606
650
  return ee;
607
- }, [r, yr]);
608
- let [q, br] = d(null), [xr, Sr] = d(null), Cr = u(!1), [wr, Tr] = d(!1), [Er, Dr] = d(!1), [Or, kr] = d(null), [Ar, jr] = d(null), [Mr, Nr] = d(0), [Pr, Fr] = d(0), [Ir, Lr] = d(null), [Rr, zr] = d(null), [J, Br] = d(null);
651
+ }, [r, Tr]);
652
+ let [q, Er] = d(null), [Dr, Or] = d(null), kr = u(!1), [Ar, jr] = d(!1), [Mr, Nr] = d(!1), [Pr, Fr] = d(null), [Ir, Lr] = d(null), [Rr, zr] = d(0), [Br, Vr] = d(0), [Hr, Ur] = d(null), [Wr, Gr] = d(null), [J, Kr] = d(null);
609
653
  c(() => {
610
- if (ht.current && !ht.current.querySelector("google-cast-launcher")) {
654
+ if (yt.current && !yt.current.querySelector("google-cast-launcher")) {
611
655
  let e = document.createElement("google-cast-launcher");
612
- e.style.cursor = "pointer", e.style.width = "100%", e.style.height = "100%", e.style.display = "block", ht.current.appendChild(e);
656
+ e.style.cursor = "pointer", e.style.width = "100%", e.style.height = "100%", e.style.display = "block", yt.current.appendChild(e);
613
657
  }
614
658
  }, []), c(() => {
615
659
  if (!F) {
616
- Tr(!1), Dr(!1), kr(null);
660
+ jr(!1), Nr(!1), Fr(null);
617
661
  return;
618
662
  }
619
- let e = (e) => Tr(e), t = () => {
663
+ let e = (e) => jr(e), t = () => {
620
664
  let e = F.getVideoElement(), t = !!e?.webkitCurrentPlaybackTargetIsWireless;
621
- Dr(t), kr(t ? e.webkitCurrentPlaybackTargetName || "AirPlay device" : null);
665
+ Nr(t), Fr(t ? e.webkitCurrentPlaybackTargetName || "AirPlay device" : null);
622
666
  };
623
667
  e(F.casting.isAirPlayAvailable()), t();
624
668
  let n = F.getVideoElement(), r = (t) => {
@@ -630,16 +674,16 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
630
674
  "webkitShowPlaybackTargetPicker" in n && (n.removeEventListener("webkitplaybacktargetavailabilitychanged", r), n.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged", i));
631
675
  };
632
676
  }, [F]);
633
- let [Vr, Hr] = d(""), [Ur, Wr] = d(!0), [Y, Gr] = d(!1), [Kr, qr] = d(!1), Jr = u(!1), Yr = u(null), Xr = u(!1), Zr = u(!1), Qr = u("none"), $r = u(ie), ei = () => {
634
- Wr(!0), Yr.current && window.clearTimeout(Yr.current);
635
- let e = Nt.current ? 3500 : 1e4;
636
- Yr.current = window.setTimeout(() => {
637
- Xr.current && Qr.current === "none" && Wr(!1);
677
+ let [qr, Jr] = d(""), [Yr, Xr] = d(!0), [Y, Zr] = d(!1), [Qr, $r] = d(!1), ei = u(!1), ti = u(null), ni = u(!1), ri = u(!1), ii = u("none"), ai = u(m), oi = () => {
678
+ Xr(!0), ti.current && window.clearTimeout(ti.current);
679
+ let e = zt.current ? 3500 : 1e4;
680
+ ti.current = window.setTimeout(() => {
681
+ ni.current && ii.current === "none" && Xr(!1);
638
682
  }, e);
639
- }, ti = o((e) => {
683
+ }, si = o((e) => {
640
684
  j.current &&= (clearTimeout(j.current), null);
641
- let t = Et.current, n = t?.[e]?.label ?? "This format", r = t?.[0]?.label ?? "default";
642
- Tt.current = null, _r(`${n} isn't supported on this device. Switched to ${r}.`), window.setTimeout(() => _r(null), 4e3), Dt.current?.(0);
685
+ let t = jt.current, n = t?.[e]?.label ?? "This format", r = t?.[0]?.label ?? "default";
686
+ At.current = null, Cr(`${n} isn't supported on this device. Switched to ${r}.`), window.setTimeout(() => Cr(null), 4e3), Mt.current?.(0);
643
687
  }, []);
644
688
  c(() => {
645
689
  if (!C.current) return;
@@ -651,99 +695,102 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
651
695
  enableWorker: !1,
652
696
  maxBufferLength: 5,
653
697
  xhrSetup: (e, t) => {
654
- let n = se?.authToken;
698
+ let n = ae?.authToken;
655
699
  try {
656
- let r = st(t), i = new URL(r, window.location.origin);
700
+ let r = dt(t), i = new URL(r, window.location.origin);
657
701
  n && i.searchParams.set("token", n), e.open("GET", i.toString(), !0);
658
702
  } catch (e) {
659
703
  console.error("[WebVideoPlayer hiddenHls] xhrSetup error:", e);
660
704
  }
661
705
  }
662
706
  });
663
- e.loadSource(st(r)), e.attachMedia(o), ft.current = e, e.on(n.Events.MANIFEST_LOADED, (e, t) => {
664
- if (Xe) return;
665
- let n = _(t?.networkDetails?.responseText ?? "");
666
- n && Hr(n);
707
+ e.loadSource(dt(r)), e.attachMedia(o), gt.current = e, e.on(n.Events.MANIFEST_LOADED, (e, t) => {
708
+ if (x) return;
709
+ let n = Me(t?.networkDetails?.responseText ?? "");
710
+ n && Jr(n);
667
711
  }), e.on(n.Events.FRAG_PARSING_METADATA, (e, t) => {
668
- if (!(Xe || Vr)) for (let e of t?.samples ?? []) {
669
- let t = Pe(e.data);
712
+ if (!(x || qr)) for (let e of t?.samples ?? []) {
713
+ let t = y(e.data);
670
714
  if (t) {
671
- Hr(t);
715
+ Jr(t);
672
716
  break;
673
717
  }
674
718
  }
675
719
  });
676
720
  } else s && o.canPlayType("application/vnd.apple.mpegurl"), o.src = r;
677
721
  o.addEventListener("seeked", () => {
678
- let e = dt.current;
722
+ let e = ht.current;
679
723
  if (!e) return;
680
724
  let t = e.getContext("2d");
681
- t && o.readyState >= 2 && (t.drawImage(o, 0, 0, e.width, e.height), Lr(e.toDataURL("image/jpeg", .82)));
725
+ t && o.readyState >= 2 && (t.drawImage(o, 0, 0, e.width, e.height), Ur(e.toDataURL("image/jpeg", .82)));
682
726
  });
683
727
  let c;
684
- if (ce) {
685
- let t = new e(ce);
686
- ct.current = t, c = t.createCallback();
728
+ if (oe) {
729
+ let t = new e(oe);
730
+ ft.current = t, c = t.createCallback();
687
731
  }
688
- if (Ut) return;
732
+ if (Yt) return;
689
733
  let l = new t({
690
734
  container: C.current,
691
735
  src: r,
736
+ videoId: se,
692
737
  autoplay: i,
693
738
  muted: a,
694
739
  keyMoments: W,
695
- subtitles: ie,
740
+ subtitles: m,
696
741
  drm: {
697
- watermarkText: ae,
742
+ watermarkText: ie,
698
743
  allowedDomains: [
699
744
  "localhost",
700
745
  "127.0.0.1",
701
746
  window.location.hostname
702
747
  ],
703
- ...se
748
+ ...ae
704
749
  },
705
750
  analyticsCallback: (e) => {
706
- if (e.sessionId && (En.current === null ? En.current = e.sessionId : e.sessionId !== En.current && (e = {
751
+ if (e.sessionId && (Mn.current === null ? Mn.current = e.sessionId : e.sessionId !== Mn.current && (e = {
707
752
  ...e,
708
- sessionId: En.current
753
+ sessionId: Mn.current
709
754
  })), e.eventType === "session_start") {
710
- if (Dn.current) return;
711
- Dn.current = !0;
755
+ if (Nn.current) return;
756
+ Nn.current = !0;
712
757
  }
713
- c?.(e), le && le(e);
758
+ c?.(e), ce && ce(e);
714
759
  },
715
- analyticsSessionSeed: On.current?.key === xn ? On.current.snapshot : void 0,
716
- watchProgressInterval: Ke * 1e3,
717
- themeColor: oe,
718
- urlTransformer: $e
760
+ analyticsSessionSeed: Pn.current?.key === Dn ? Pn.current.snapshot : void 0,
761
+ watchProgressInterval: Ye * 1e3,
762
+ themeColor: h,
763
+ urlTransformer: tt
719
764
  });
720
765
  l.on("keymomentsloaded", (e) => {
721
- sr(e), de && de(e);
766
+ pr(e), ue && ue(e);
722
767
  }), l.on("chaptersloaded", (e) => {
723
- sr(e), de && de(e);
768
+ pr(e), ue && ue(e);
724
769
  }), l.on("play", () => {
725
- Yt(!0), vn(!1), te(l.getCurrentTime(), !1);
770
+ tn(!0), wn(!1), te(l.getCurrentTime(), !1);
726
771
  }), l.on("pause", () => {
727
- Yt(!1), te(l.getCurrentTime(), !0);
772
+ tn(!1), te(l.getCurrentTime(), !0);
728
773
  }), l.on("ended", () => {
729
- Yt(!1), vn(!0);
774
+ tn(!1), wn(!0);
730
775
  });
731
776
  let u = () => {
732
- A.current && (A.current.style.opacity = "1"), vt(l.getVideoElement());
777
+ xt.current = !0, dn(!1), A.current && (A.current.style.opacity = "1"), Ct(l.getVideoElement());
733
778
  }, d = () => {
734
779
  requestAnimationFrame(() => {
735
780
  requestAnimationFrame(() => {
736
- A.current && (A.current.style.opacity = "0"), yt(l.getVideoElement());
781
+ xt.current = !1, A.current && (A.current.style.opacity = "0"), wt(l.getVideoElement());
782
+ let e = l.getVideoElement();
783
+ e && !e.paused && e.readyState < 3 && dn(!0);
737
784
  });
738
785
  });
739
786
  }, ee = (e, t = !1) => {
740
787
  E.current = !0;
741
- let n = t ? e + .5 : St.current ?? e + .5;
742
- t || (St.current = null), xt.current = t, D.current = n, O.current = l.getCurrentTime(), u(), l.seek(n), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
743
- E.current = !1, D.current = null, O.current = null, k.current = null, xt.current = !1, d();
788
+ let n = t ? e + .5 : Dt.current ?? e + .5;
789
+ t || (Dt.current = null), Et.current = t, D.current = n, O.current = l.getCurrentTime(), u(), l.seek(n), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
790
+ E.current = !1, D.current = null, O.current = null, k.current = null, Et.current = !1, d();
744
791
  }, 3e3);
745
792
  };
746
- bt.current = ee;
793
+ Tt.current = ee;
747
794
  let te = (e, t) => {
748
795
  if (!("mediaSession" in navigator) || !navigator.mediaSession.setPositionState) return;
749
796
  navigator.mediaSession.playbackState = t ? "paused" : "playing";
@@ -773,137 +820,146 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
773
820
  };
774
821
  if (l.on("timeupdate", (e) => {
775
822
  if (!E.current && N.current === null) {
776
- let t = z.current.find((t) => bn.current.has(t.startTime) && e >= t.startTime - .5 && e < t.endTime);
823
+ let t = z.current.find((t) => En.current.has(t.startTime) && e >= t.startTime - .5 && e < t.endTime);
777
824
  if (t) {
778
825
  ee(t.endTime);
779
826
  return;
780
827
  }
781
- St.current !== null && z.current.find((t) => e >= t.endTime - .5 && e < t.endTime) && u();
828
+ Dt.current !== null && z.current.find((t) => e >= t.endTime - .5 && e < t.endTime) && u();
782
829
  }
783
830
  if (E.current && D.current !== null) {
784
831
  let t = D.current;
785
832
  if (O.current !== null && t < O.current ? e <= t + 2 && e >= t - 2 : e >= t - 2) {
786
833
  E.current = !1, D.current = null, O.current = null, k.current &&= (window.clearTimeout(k.current), null);
787
- let t = z.current.some((t) => e >= t.startTime && e < t.endTime), n = xt.current;
788
- xt.current = !1, (n || !t && St.current === null) && d();
834
+ let t = z.current.some((t) => e >= t.startTime && e < t.endTime), n = Et.current;
835
+ Et.current = !1, (n || !t && Dt.current === null) && d();
789
836
  } else return;
790
837
  }
791
- Xt(e), kt.current = e;
838
+ nn(e), Ft.current = e;
792
839
  let t = l.getDuration();
793
- if (Qt(t), N.current !== null && e >= N.current - 2) {
840
+ if (an(t), N.current !== null && e >= N.current - 2) {
794
841
  N.current = null, P.current &&= (window.clearTimeout(P.current), null);
795
- let t = z.current.find((t) => bn.current.has(t.startTime) && e >= t.startTime && e < t.endTime);
842
+ let t = z.current.find((t) => En.current.has(t.startTime) && e >= t.startTime && e < t.endTime);
796
843
  t && ee(t.endTime), requestAnimationFrame(() => {
797
844
  requestAnimationFrame(() => {
798
845
  M.current && (M.current.style.opacity = "0");
799
846
  });
800
847
  });
801
848
  }
802
- if (!Ot.current && wt.current === null && at && at > 0 && t > 0 && at < t) {
803
- Ot.current = !0;
804
- let e = z.current.find((e) => at >= e.startTime && at < e.endTime), t = e ? e.startTime : at;
805
- N.current = t, l.seek(t), P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
849
+ if (!Nt.current && kt.current === null && lt && lt > 0 && t > 0 && lt < t) {
850
+ Nt.current = !0;
851
+ let e = z.current.find((e) => lt >= e.startTime && lt < e.endTime), t = e ? e.startTime : lt;
852
+ Pt.current = e ? null : lt, N.current = t, l.seek(t), P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
806
853
  N.current = null, P.current = null, M.current && (M.current.style.opacity = "0");
807
854
  }, 4e3);
808
855
  }
809
- if (ot?.(e), Fn.current.length > 0) if (In.current) {
810
- let t = In.current;
811
- (e >= t.startTimeSeconds + t.durationSeconds || e < t.startTimeSeconds) && (Pn(null), In.current = null);
856
+ if (ut?.(e), Vn.current.length > 0) if (Hn.current) {
857
+ let t = Hn.current;
858
+ (e >= t.startTimeSeconds + t.durationSeconds || e < t.startTimeSeconds) && (Bn(null), Hn.current = null);
812
859
  } else {
813
- let t = Fn.current.find((t) => e >= t.startTimeSeconds && e < t.startTimeSeconds + t.durationSeconds && !Ln.current.has(t.availId));
814
- t && (Pn(t), In.current = t, t.impressionBeacons.forEach((e) => {
860
+ let t = Vn.current.find((t) => e >= t.startTimeSeconds && e < t.startTimeSeconds + t.durationSeconds && !Un.current.has(t.availId));
861
+ t && (Bn(t), Hn.current = t, t.impressionBeacons.forEach((e) => {
815
862
  fetch(e, { mode: "no-cors" }).catch(() => {});
816
863
  }));
817
864
  }
818
865
  let n = l.keyMoments.getCurrentMoment(e);
819
- or({
866
+ fr({
820
867
  chapter: n.keyMoment,
821
868
  index: n.index
822
869
  }), te(e, l.getVideoElement().paused);
823
870
  }), l.on("qualitylevels", (e) => {
824
- qn(e);
871
+ $n(e);
825
872
  }), l.on("qualitychange", (e) => {
826
- Yn(e);
873
+ tr(e);
827
874
  }), l.on("buffering", (e) => {
828
- if (an(e), !e && (j.current &&= (clearTimeout(j.current), null), Tt.current = null, wt.current !== null)) {
829
- let e = wt.current;
830
- wt.current = null, Ot.current = !0, N.current = e, P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
875
+ if (dn(e && !xt.current), !e && (j.current &&= (clearTimeout(j.current), null), At.current = null, kt.current !== null)) {
876
+ let e = kt.current;
877
+ kt.current = null, Nt.current = !0, N.current = e, P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
831
878
  N.current = null, P.current = null, M.current && (M.current.style.opacity = "0");
832
879
  }, 4e3), l.seek(e);
833
880
  }
834
881
  }), l.on("adbreakchange", (e) => {
835
- if (l.analytics.setAdBreak(e, l.getVideoElement()), ue && ue(e), e) {
882
+ if (l.analytics.setAdBreak(e, l.getVideoElement()), le && le(e), e) {
836
883
  let e = l.getCurrentTime(), t = z.current.find((t) => e >= t.startTime && e < t.endTime);
837
- if (Jr.current = !1, qr(!1), t && bn.current.has(t.startTime)) {
884
+ if (ei.current = !1, $r(!1), t && En.current.has(t.startTime)) {
838
885
  u(), E.current || ee(t.endTime);
839
886
  return;
840
887
  }
841
- t && (kn.current = t.startTime), Gr(!0), K("none"), d();
842
- } else if (kn.current !== null && (bn.current.add(kn.current), Cn(new Set(bn.current)), kn.current = null), Gr(!1), St.current !== null) {
843
- let e = St.current;
844
- St.current = null, E.current = !0, D.current = e, O.current = l.getCurrentTime(), u(), l.seek(e), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
888
+ t && (Fn.current = t.startTime), Zr(!0), K("none"), d();
889
+ } else if (Fn.current !== null && (En.current.add(Fn.current), kn(new Set(En.current)), Fn.current = null), Zr(!1), Dt.current !== null) {
890
+ let e = Dt.current;
891
+ Dt.current = null, E.current = !0, D.current = e, O.current = l.getCurrentTime(), u(), l.seek(e), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
845
892
  E.current = !1, D.current = null, O.current = null, k.current = null, d();
846
893
  }, 3e3);
847
894
  }
848
895
  }), l.on("adbreaksloaded", (e) => {
849
- z.current = e, yn(e);
896
+ z.current = e, Tn(e);
897
+ let t = Pt.current;
898
+ if (t === null) return;
899
+ Pt.current = null;
900
+ let n = e.find((e) => t >= e.startTime && t < e.endTime);
901
+ if (!n || En.current.has(n.startTime)) return;
902
+ let r = l.getCurrentTime();
903
+ r < n.startTime || r >= n.endTime || (M.current && (M.current.style.opacity = "1"), N.current = n.startTime, P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
904
+ N.current = null, P.current = null, M.current && (M.current.style.opacity = "0");
905
+ }, 4e3), l.seek(n.startTime));
850
906
  }), l.on("volumechange", (e) => {
851
- en(e.volume), _t.current === null && nn(e.muted);
907
+ sn(e.volume), St.current === null && ln(e.muted);
852
908
  }), l.on("pipchange", (e) => {
853
- mn(e);
909
+ bn(e);
854
910
  }), l.on("error", () => {
855
- Gt(!0), an(!1), N.current = null, P.current &&= (window.clearTimeout(P.current), null), M.current && (M.current.style.opacity = "0");
911
+ Zt(!0), dn(!1), N.current = null, P.current &&= (window.clearTimeout(P.current), null), M.current && (M.current.style.opacity = "0");
856
912
  }), l.on("unsupportedcodec", () => {
857
- let e = Tt.current;
858
- e && e.targetIdx !== 0 && (Et.current?.length ?? 0) > 1 && ti(e.targetIdx);
913
+ let e = At.current;
914
+ e && e.targetIdx !== 0 && (jt.current?.length ?? 0) > 1 && si(e.targetIdx);
859
915
  }), l.subtitles.onSubtitleChange((e) => {
860
- Zn(e);
916
+ rr(e);
861
917
  }), l.on("subtitlesloaded", (e) => {
862
918
  if (!I.enableSubtitles) return;
863
- er(ze([...e]));
919
+ or(Re([...e]));
864
920
  let t = e.find((e) => e.isDefault);
865
- t && (l.subtitles.setActiveTrack(t.id), Qn(t.id));
921
+ t && (l.subtitles.setActiveTrack(t.id), ir(t.id));
866
922
  }), l.on("audiotracksloaded", (e) => {
867
- nr(e), ir(e[0]?.id ?? 0);
923
+ cr(e), ur(e[0]?.id ?? 0);
868
924
  }), l.on("audiotrackchange", (e) => {
869
- ir(e);
925
+ ur(e);
870
926
  }), l.casting.onCastStateChange((e, t) => {
871
927
  if (e) {
872
- Cr.current = l.isMuted(), l.pause();
928
+ kr.current = l.isMuted(), l.pause();
873
929
  let e = l.getVideoElement();
874
- e.muted = !0, br(t);
930
+ e.muted = !0, Er(t);
875
931
  } else {
876
932
  let e = l.casting.getRemoteState();
877
933
  e && e.currentTime > 0 && (E.current = !0, D.current = e.currentTime, O.current = l.getCurrentTime(), l.seek(e.currentTime), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
878
934
  E.current = !1, D.current = null, O.current = null, k.current = null;
879
935
  }, 3e3));
880
936
  let t = l.getVideoElement();
881
- t.muted = Cr.current, br(null), Sr(null);
937
+ t.muted = kr.current, Er(null), Or(null);
882
938
  }
883
939
  }), l.casting.onRemoteStateChange((e) => {
884
- Sr(e);
885
- }), en(l.getVolume()), nn(l.isMuted()), "mediaSession" in navigator) try {
940
+ Or(e);
941
+ }), sn(l.getVolume()), ln(l.isMuted()), "mediaSession" in navigator) try {
886
942
  navigator.mediaSession.setActionHandler("seekto", (e) => {
887
- if (e.seekTime == null || Zr.current || Jr.current) return;
943
+ if (e.seekTime == null || ri.current || ei.current) return;
888
944
  let t = e.seekTime;
889
945
  for (let e of z.current) t >= e.startTime && (t += e.endTime - e.startTime);
890
- Ct.current?.(t);
946
+ Ot.current?.(t);
891
947
  });
892
948
  let e = (e, t) => {
893
- if (Zr.current || Jr.current) return;
949
+ if (ri.current || ei.current) return;
894
950
  let n = t && t > 0 ? t : 10, r = l.getCurrentTime(), i = r;
895
951
  for (let e of z.current) r >= e.endTime ? i -= e.endTime - e.startTime : r >= e.startTime && (i -= r - e.startTime);
896
952
  if (e) {
897
953
  let e = z.current.reduce((e, t) => e + (t.endTime - t.startTime), 0), t = Math.max(0, l.getDuration() - e), r = Math.min(t, i + n);
898
954
  for (let e of z.current) r >= e.startTime && (r += e.endTime - e.startTime);
899
- Ct.current?.(r, {
955
+ Ot.current?.(r, {
900
956
  eventType: "fast_forward",
901
957
  skipSeconds: n
902
958
  });
903
959
  } else {
904
960
  let e = Math.max(0, i - n);
905
961
  for (let t of z.current) e >= t.startTime && (e += t.endTime - t.startTime);
906
- Ct.current?.(e, {
962
+ Ot.current?.(e, {
907
963
  eventType: "fast_backward",
908
964
  skipSeconds: n
909
965
  });
@@ -912,33 +968,33 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
912
968
  navigator.mediaSession.setActionHandler("seekforward", (t) => e(!0, t.seekOffset ?? void 0)), navigator.mediaSession.setActionHandler("seekbackward", (t) => e(!1, t.seekOffset ?? void 0));
913
969
  } catch {}
914
970
  let f = l.getVideoElement(), p = () => {
915
- if (!(document.pictureInPictureElement === f || f.webkitPresentationMode === "picture-in-picture") || E.current || N.current !== null || wt.current !== null) return;
916
- let e = f.currentTime, t = kt.current;
971
+ if (!(document.pictureInPictureElement === f || f.webkitPresentationMode === "picture-in-picture") || E.current || N.current !== null || kt.current !== null) return;
972
+ let e = f.currentTime, t = Ft.current;
917
973
  if (!(Math.abs(e - t) < .5)) {
918
- if (Zr.current) {
974
+ if (ri.current) {
919
975
  f.currentTime = t;
920
976
  return;
921
977
  }
922
- f.currentTime = t, Ct.current?.(e);
978
+ f.currentTime = t, Ot.current?.(e);
923
979
  }
924
980
  };
925
- f.addEventListener("seeking", p), Lt(l);
926
- let ne = Tt.current;
981
+ f.addEventListener("seeking", p), Ut(l);
982
+ let ne = At.current;
927
983
  ne && ne.targetIdx !== 0 && (j.current && clearTimeout(j.current), j.current = setTimeout(() => {
928
- j.current = null, !l.getBufferedRanges().some((e) => e.end > e.start) && ti(ne.targetIdx);
929
- }, je)), wt.current !== null && (P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
930
- P.current = null, N.current = null, M.current && (M.current.style.opacity = "0"), an(!1);
931
- }, 12e3)), Ge && C.current && (lt.current = !0, C.current.requestFullscreen().catch(() => {
932
- lt.current = !1;
984
+ j.current = null, !l.getBufferedRanges().some((e) => e.end > e.start) && si(ne.targetIdx);
985
+ }, ke)), kt.current !== null && (P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
986
+ P.current = null, N.current = null, M.current && (M.current.style.opacity = "0"), dn(!1);
987
+ }, 12e3)), Je && C.current && (pt.current = !0, C.current.requestFullscreen().catch(() => {
988
+ pt.current = !1;
933
989
  }));
934
990
  let re = () => {
935
991
  let e = document, t = !!(document.fullscreenElement || e.webkitFullscreenElement);
936
- sn(t), t || ln(!1);
992
+ pn(t), t || hn(!1);
937
993
  let n = l.getVideoElement();
938
994
  l.analytics.track(t ? "fullscreen_enter" : "fullscreen_exit", n);
939
995
  };
940
996
  document.addEventListener("fullscreenchange", re), document.addEventListener("webkitfullscreenchange", re);
941
- let fe = (e) => {
997
+ let g = (e) => {
942
998
  let t = document.activeElement;
943
999
  if (!(t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.getAttribute("contenteditable") === "true" || t.getAttribute("role") === "slider"))) {
944
1000
  switch (e.key.toLowerCase()) {
@@ -958,12 +1014,12 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
958
1014
  break;
959
1015
  case "arrowleft":
960
1016
  case "j":
961
- if (e.preventDefault(), !Zr.current) {
1017
+ if (e.preventDefault(), !ri.current) {
962
1018
  let e = l.getCurrentTime(), t = e;
963
1019
  for (let n of z.current) e >= n.endTime ? t -= n.endTime - n.startTime : e >= n.startTime && (t -= e - n.startTime);
964
1020
  let n = Math.max(0, t - 10);
965
1021
  for (let e of z.current) n >= e.startTime && (n += e.endTime - e.startTime);
966
- Ct.current?.(n, {
1022
+ Ot.current?.(n, {
967
1023
  eventType: "fast_backward",
968
1024
  skipSeconds: 10
969
1025
  });
@@ -971,12 +1027,12 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
971
1027
  break;
972
1028
  case "arrowright":
973
1029
  case "l":
974
- if (e.preventDefault(), !Zr.current) {
1030
+ if (e.preventDefault(), !ri.current) {
975
1031
  let e = l.getCurrentTime(), t = z.current.reduce((e, t) => e + (t.endTime - t.startTime), 0), n = Math.max(0, l.getDuration() - t), r = e;
976
1032
  for (let t of z.current) e >= t.endTime ? r -= t.endTime - t.startTime : e >= t.startTime && (r -= e - t.startTime);
977
1033
  let i = Math.min(n, r + 10);
978
1034
  for (let e of z.current) i >= e.startTime && (i += e.endTime - e.startTime);
979
- Ct.current?.(i, {
1035
+ Ot.current?.(i, {
980
1036
  eventType: "fast_forward",
981
1037
  skipSeconds: 10
982
1038
  });
@@ -992,32 +1048,32 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
992
1048
  e.preventDefault(), l.setMute(!l.isMuted());
993
1049
  break;
994
1050
  case "f":
995
- e.preventDefault(), gt.current();
1051
+ e.preventDefault(), bt.current();
996
1052
  break;
997
1053
  case "p":
998
- e.preventDefault(), Zr.current || l.togglePictureInPicture();
1054
+ e.preventDefault(), ri.current || l.togglePictureInPicture();
999
1055
  break;
1000
1056
  case "c":
1001
- if (e.preventDefault(), I.enableSubtitles && !Zr.current) if (l.subtitles.getActiveTrackId() !== "off") l.subtitles.setActiveTrack("off"), Qn("off");
1057
+ if (e.preventDefault(), I.enableSubtitles && !ri.current) if (l.subtitles.getActiveTrackId() !== "off") l.subtitles.setActiveTrack("off"), ir("off");
1002
1058
  else {
1003
- let e = $r.current;
1004
- e && e.length > 0 && (l.subtitles.setActiveTrack(e[0].id), Qn(e[0].id));
1059
+ let e = ai.current;
1060
+ e && e.length > 0 && (l.subtitles.setActiveTrack(e[0].id), ir(e[0].id));
1005
1061
  }
1006
1062
  break;
1007
1063
  default: return;
1008
1064
  }
1009
- ei();
1065
+ oi();
1010
1066
  }
1011
1067
  };
1012
- return document.addEventListener("keydown", fe), ei(), () => {
1013
- if (On.current = {
1014
- key: xn,
1068
+ return document.addEventListener("keydown", g), oi(), () => {
1069
+ if (Pn.current = {
1070
+ key: Dn,
1015
1071
  snapshot: l.analytics.getSessionSnapshot()
1016
- }, At.current) {
1017
- let e = At.current, t = l.getVideoElement();
1018
- C.current && t.ownerDocument !== document && (t.classList.remove("gb-pip-video"), C.current.insertBefore(t, C.current.firstChild)), At.current = null, gn(null), mn(!1), e.close();
1072
+ }, It.current) {
1073
+ let e = It.current, t = l.getVideoElement();
1074
+ C.current && t.ownerDocument !== document && (t.classList.remove("gb-pip-video"), C.current.insertBefore(t, C.current.firstChild)), It.current = null, Sn(null), bn(!1), e.close();
1019
1075
  }
1020
- if (l.destroy(), ct.current?.destroy(), ct.current = null, document.body.style.overflow = "", document.body.style.touchAction = "", document.removeEventListener("fullscreenchange", re), document.removeEventListener("webkitfullscreenchange", re), document.removeEventListener("keydown", fe), Yr.current && window.clearTimeout(Yr.current), k.current &&= (window.clearTimeout(k.current), null), j.current &&= (clearTimeout(j.current), null), A.current && (A.current.style.opacity = "0"), f.removeEventListener("seeking", p), "mediaSession" in navigator) {
1076
+ if (l.destroy(), ft.current?.destroy(), ft.current = null, document.body.style.overflow = "", document.body.style.touchAction = "", document.removeEventListener("fullscreenchange", re), document.removeEventListener("webkitfullscreenchange", re), document.removeEventListener("keydown", g), ti.current && window.clearTimeout(ti.current), k.current &&= (window.clearTimeout(k.current), null), j.current &&= (clearTimeout(j.current), null), xt.current = !1, A.current && (A.current.style.opacity = "0"), f.removeEventListener("seeking", p), "mediaSession" in navigator) {
1021
1077
  try {
1022
1078
  navigator.mediaSession.setActionHandler("seekto", null);
1023
1079
  } catch {}
@@ -1028,25 +1084,25 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1028
1084
  navigator.mediaSession.setActionHandler("seekbackward", null);
1029
1085
  } catch {}
1030
1086
  }
1031
- ft.current &&= (ft.current.destroy(), null), T.current &&= (document.body.removeChild(T.current), null), Ot.current = !1, N.current = null, P.current &&= (window.clearTimeout(P.current), null);
1087
+ gt.current &&= (gt.current.destroy(), null), T.current &&= (document.body.removeChild(T.current), null), Nt.current = !1, N.current = null, P.current &&= (window.clearTimeout(P.current), null);
1032
1088
  };
1033
1089
  }, [
1034
1090
  r,
1035
- ae,
1036
- Kt
1091
+ ie,
1092
+ Qt
1037
1093
  ]), c(() => {
1038
1094
  if (F) {
1039
1095
  F.keyMoments.setKeyMoments(W);
1040
1096
  let e = C.current?.querySelector("video");
1041
1097
  if (e) {
1042
1098
  let t = F.keyMoments.getCurrentMoment(e.currentTime);
1043
- or({
1099
+ fr({
1044
1100
  chapter: t.keyMoment,
1045
1101
  index: t.index
1046
1102
  });
1047
1103
  }
1048
1104
  }
1049
- }, [yr, F]), c(() => {
1105
+ }, [Tr, F]), c(() => {
1050
1106
  let e = (e) => {
1051
1107
  G !== "none" && (e.target.closest(".sdk-menu-container") || K("none"));
1052
1108
  };
@@ -1054,17 +1110,17 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1054
1110
  document.removeEventListener("click", e);
1055
1111
  };
1056
1112
  }, [G]), c(() => {
1057
- Xr.current = Jt;
1058
- }, [Jt]), c(() => {
1059
- Zr.current = Y;
1113
+ ni.current = en;
1114
+ }, [en]), c(() => {
1115
+ ri.current = Y;
1060
1116
  }, [Y]), c(() => {
1061
- Jr.current = Kr;
1062
- }, [Kr]);
1063
- let X = Y || Kr;
1117
+ ei.current = Qr;
1118
+ }, [Qr]);
1119
+ let X = Y || Qr;
1064
1120
  c(() => {
1065
- At.current = hn;
1066
- }, [hn]), c(() => {
1067
- Qr.current = G;
1121
+ It.current = xn;
1122
+ }, [xn]), c(() => {
1123
+ ii.current = G;
1068
1124
  }, [G]), c(() => {
1069
1125
  if (!Y || !F) return;
1070
1126
  let e = 0, t = F.getCurrentTime(), n = performance.now(), r = () => {
@@ -1074,7 +1130,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1074
1130
  let e = i.playbackRate || 1;
1075
1131
  s = t + (o - n) / 1e3 * e;
1076
1132
  } else s = t;
1077
- let c = Un(a);
1133
+ let c = Yn(a);
1078
1134
  if (c) {
1079
1135
  let e = Math.min(s, a + .4, c.end), t = Math.min(100, Math.max(0, (e - c.start) / (c.end - c.start) * 100));
1080
1136
  (C.current?.querySelectorAll(".sdk-ad-progress-fill"))?.forEach((e) => {
@@ -1085,38 +1141,38 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1085
1141
  };
1086
1142
  return e = requestAnimationFrame(r), () => cancelAnimationFrame(e);
1087
1143
  }, [Y, F]), c(() => {
1088
- $r.current = $n;
1089
- }, [$n]), c(() => {
1090
- Nt.current = jt;
1091
- }, [jt]), c(() => {
1144
+ ai.current = ar;
1145
+ }, [ar]), c(() => {
1146
+ zt.current = Lt;
1147
+ }, [Lt]), c(() => {
1092
1148
  z.current = R;
1093
1149
  }, [R]), c(() => {
1094
- Fn.current = jn;
1095
- }, [jn]), c(() => {
1096
- In.current = Nn;
1097
- }, [Nn]), c(() => {
1098
- Bn.current = Rn;
1099
- }, [Rn]), c(() => {
1100
- Et.current = x;
1101
- }, [x]), c(() => {
1102
- Dt.current = it;
1103
- }, [it]), c(() => {
1104
- kn.current = null, An.current = !1, St.current = null, Pn(null), In.current = null, Ln.current = /* @__PURE__ */ new Set(), Gt(!1);
1150
+ Vn.current = Ln;
1151
+ }, [Ln]), c(() => {
1152
+ Hn.current = zn;
1153
+ }, [zn]), c(() => {
1154
+ Kn.current = Wn;
1155
+ }, [Wn]), c(() => {
1156
+ jt.current = S;
1157
+ }, [S]), c(() => {
1158
+ Mt.current = ct;
1159
+ }, [ct]), c(() => {
1160
+ Fn.current = null, In.current = !1, Dt.current = null, Pt.current = null, Bn(null), Hn.current = null, Un.current = /* @__PURE__ */ new Set(), Zt(!1);
1105
1161
  }, [r]), c(() => {
1106
- zt(!1);
1162
+ Gt(!1);
1107
1163
  }, [r]), c(() => {
1108
1164
  if (!F) return;
1109
1165
  let e = F.getVideoElement();
1110
1166
  if (e && e.readyState >= 1) {
1111
- zt(!0);
1167
+ Gt(!0);
1112
1168
  return;
1113
1169
  }
1114
- let t = () => zt(!0);
1170
+ let t = () => Gt(!0);
1115
1171
  return F.on("qualitylevels", t), e?.addEventListener("loadedmetadata", t), () => {
1116
1172
  F.off("qualitylevels", t), e?.removeEventListener("loadedmetadata", t);
1117
1173
  };
1118
1174
  }, [F]), c(() => {
1119
- Mn([]), !(!rt || !Rt) && fetch(rt).then((e) => e.json()).then((e) => {
1175
+ if (Rn([]), !(!at || !Wt)) return Ue(at, (e) => {
1120
1176
  let t = /* @__PURE__ */ new Set(), n = [];
1121
1177
  for (let r of e.nonLinearAvails ?? []) {
1122
1178
  if (t.has(r.availId)) continue;
@@ -1130,39 +1186,41 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1130
1186
  let s = o.position ?? "bottom_center";
1131
1187
  n.push({
1132
1188
  availId: r.availId,
1133
- startTimeSeconds: Be(r.startTime ?? ""),
1134
- durationSeconds: Be(i.minSuggestedDuration ?? "00:00:15"),
1189
+ startTimeSeconds: ze(r.startTime ?? ""),
1190
+ durationSeconds: ze(i.minSuggestedDuration ?? "00:00:15"),
1135
1191
  imageUrl: i.staticResource,
1136
1192
  imageWidth: parseInt(i.width ?? "320", 10),
1137
1193
  imageHeight: parseInt(i.height ?? "50", 10),
1138
1194
  title: i.adTitle ?? "",
1139
- clickThrough: i.clickThrough ?? "",
1195
+ clickThrough: Be(i.clickThrough) ? i.clickThrough : "",
1140
1196
  clickTrackingUrl: i.clickTracking ?? "",
1141
1197
  impressionBeacons: a,
1142
1198
  position: s,
1143
1199
  dismissible: o.dismissible === !0
1144
1200
  });
1145
1201
  }
1146
- Mn(n);
1147
- }).catch(() => {});
1202
+ return n.length > 0 ? n : null;
1203
+ }, Rn);
1148
1204
  }, [
1149
- rt,
1205
+ at,
1150
1206
  r,
1151
- Rt
1207
+ Wt
1152
1208
  ]), c(() => {
1153
- zn([]), Hn([]), !(!b || !Rt) && fetch(b).then((e) => e.json()).then((e) => {
1209
+ if (Gn([]), Jn([]), !(!ot || !Wt)) return Ue(ot, (e) => {
1154
1210
  let t = [], n = [];
1155
1211
  for (let r of e.avails ?? []) {
1156
1212
  let e = r.ads ?? [];
1157
- e.length !== 0 && (n.push({
1158
- startTime: r.startTimeInSeconds ?? e[0].startTimeInSeconds ?? 0,
1159
- endTime: (r.startTimeInSeconds ?? 0) + (r.durationInSeconds ?? 0)
1213
+ if (e.length === 0) continue;
1214
+ let i = r.startTimeInSeconds ?? e[0].startTimeInSeconds ?? 0, a = e[e.length - 1], o = (a?.startTimeInSeconds ?? i) + (a?.durationInSeconds ?? 0);
1215
+ n.push({
1216
+ startTime: i,
1217
+ endTime: r.durationInSeconds == null ? Math.max(o, i) : i + r.durationInSeconds
1160
1218
  }), e.forEach((n, r) => {
1161
- let i = n?.skipOffset ?? null, a = !!i, o = {};
1219
+ let i = Ve(n?.skipOffset), a = i !== null, o = {};
1162
1220
  try {
1163
1221
  o = JSON.parse(n?.adParameters ?? "{}");
1164
1222
  } catch {}
1165
- let s = o.ctaText && o.redirectUrl ? {
1223
+ let s = o.ctaText && Be(o.redirectUrl) ? {
1166
1224
  text: o.ctaText,
1167
1225
  url: o.redirectUrl,
1168
1226
  title: o.title || void 0,
@@ -1173,42 +1231,47 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1173
1231
  endTimeSeconds: c + l,
1174
1232
  durationSeconds: l,
1175
1233
  skippable: a,
1176
- skipOffsetSeconds: a ? Be(i) : 0,
1234
+ skipOffsetSeconds: i ?? 0,
1177
1235
  cta: s,
1178
1236
  podIndex: r,
1179
1237
  podTotal: e.length
1180
1238
  });
1181
- }));
1239
+ });
1182
1240
  }
1183
- zn(t), Hn(n);
1184
- }).catch(() => {});
1241
+ return t.length > 0 ? {
1242
+ pods: t,
1243
+ breaks: n
1244
+ } : null;
1245
+ }, ({ pods: e, breaks: t }) => {
1246
+ Gn(e), Jn(t);
1247
+ });
1185
1248
  }, [
1186
- b,
1249
+ ot,
1187
1250
  r,
1188
- Rt
1251
+ Wt
1189
1252
  ]), c(() => {
1190
- !F || Vn.length === 0 || F.setAdBreaks(Vn);
1191
- }, [F, Vn]), c(() => {
1253
+ !F || qn.length === 0 || F.setAdBreaks(qn);
1254
+ }, [F, qn]), c(() => {
1192
1255
  if (!F) return;
1193
1256
  let e = () => {
1194
- document.hidden ? et && Zr.current && Xr.current && (F.pause(), An.current = !0) : An.current &&= (F.play(), !1);
1257
+ document.hidden ? nt && ri.current && ni.current && (F.pause(), In.current = !0) : In.current &&= (F.play(), !1);
1195
1258
  };
1196
1259
  return document.addEventListener("visibilitychange", e), () => {
1197
1260
  document.removeEventListener("visibilitychange", e);
1198
1261
  };
1199
- }, [F, et]);
1200
- let ni = () => {
1201
- ei();
1202
- }, ri = () => {
1203
- Ge && !lt.current && C.current && (lt.current = !0, C.current.requestFullscreen().catch(() => {}));
1204
- }, ii = () => {
1262
+ }, [F, nt]);
1263
+ let ci = () => {
1264
+ oi();
1265
+ }, li = () => {
1266
+ Je && !pt.current && C.current && (pt.current = !0, C.current.requestFullscreen().catch(() => {}));
1267
+ }, ui = () => {
1205
1268
  if (F) {
1206
1269
  if (q) {
1207
- F.casting.remotePlayPause(), ei();
1270
+ F.casting.remotePlayPause(), oi();
1208
1271
  return;
1209
1272
  }
1210
- if (_n) Z(0), ri(), F.play(), vn(!1);
1211
- else if (Jt) {
1273
+ if (Cn) Z(0), li(), F.play(), wn(!1);
1274
+ else if (en) {
1212
1275
  F.pause();
1213
1276
  try {
1214
1277
  let e = F.getVideoElement?.();
@@ -1221,100 +1284,100 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1221
1284
  }), T.current && !T.current.paused) try {
1222
1285
  T.current.pause();
1223
1286
  } catch {}
1224
- } else ri(), F.play();
1225
- ei();
1287
+ } else li(), F.play();
1288
+ oi();
1226
1289
  }
1227
- }, ai = (e) => {
1290
+ }, di = (e) => {
1228
1291
  if (!w.current || !F || B === 0) return 0;
1229
1292
  let t = w.current.getBoundingClientRect();
1230
1293
  return H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
1231
- }, oi = (e) => {
1232
- if (!F || Y || Kr) return;
1233
- mt.current = !0, Br(ai(e));
1294
+ }, fi = (e) => {
1295
+ if (!F || Y || Qr) return;
1296
+ vt.current = !0, Kr(di(e));
1234
1297
  let t = (e) => {
1235
- if (!mt.current || !w.current) return;
1298
+ if (!vt.current || !w.current) return;
1236
1299
  let t = w.current.getBoundingClientRect(), n = H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
1237
- Br(n), jr(e.clientX - t.left), Fr(n), T.current && (T.current.currentTime = n), ei();
1300
+ Kr(n), Lr(e.clientX - t.left), Vr(n), T.current && (T.current.currentTime = n), oi();
1238
1301
  }, n = (e) => {
1239
- if (mt.current = !1, w.current) {
1302
+ if (vt.current = !1, w.current) {
1240
1303
  let t = w.current.getBoundingClientRect();
1241
1304
  Z(H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B));
1242
1305
  }
1243
- Br(null), jr(null), Lr(null), zr(null), document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
1306
+ Kr(null), Lr(null), Ur(null), Gr(null), document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
1244
1307
  };
1245
1308
  document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
1246
1309
  }, Z = (e, t) => {
1247
1310
  if (!F) return;
1248
- if (q) {
1311
+ if (Pt.current = null, q) {
1249
1312
  F.casting.remoteSeek(e);
1250
1313
  return;
1251
1314
  }
1252
- let n = Math.max(0, Zt > 0 ? Math.min(e, Zt) : e);
1315
+ let n = Math.max(0, rn > 0 ? Math.min(e, rn) : e);
1253
1316
  if (t) {
1254
1317
  let { eventType: e, ...n } = t;
1255
1318
  F.attributeNextSeek(e, n);
1256
1319
  }
1257
1320
  let r = F.getCurrentTime();
1258
1321
  if (n > r && z.current.length > 0) {
1259
- let e = z.current.filter((e) => e.startTime < n && e.endTime > r && !bn.current.has(e.startTime)).sort((e, t) => e.startTime - t.startTime);
1322
+ let e = z.current.filter((e) => e.startTime < n && e.endTime > r && !En.current.has(e.startTime)).sort((e, t) => e.startTime - t.startTime);
1260
1323
  if (e.length > 0) {
1261
- St.current = n;
1324
+ Dt.current = n;
1262
1325
  let t = e[e.length - 1], i = Math.max(t.startTime, r);
1263
- E.current = !0, D.current = i, O.current = r, Xt(i), Jr.current = !0, qr(!0), A.current && (A.current.style.opacity = "1"), vt(F.getVideoElement()), F.seek(i), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
1264
- E.current = !1, Jr.current = !1, qr(!1), D.current = null, O.current = null, k.current = null, A.current && (A.current.style.opacity = "0"), yt(F.getVideoElement());
1326
+ E.current = !0, D.current = i, O.current = r, nn(i), ei.current = !0, $r(!0), A.current && (A.current.style.opacity = "1"), Ct(F.getVideoElement()), F.seek(i), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
1327
+ E.current = !1, ei.current = !1, $r(!1), D.current = null, O.current = null, k.current = null, xt.current = !1, A.current && (A.current.style.opacity = "0"), wt(F.getVideoElement());
1265
1328
  }, 3e3);
1266
1329
  return;
1267
1330
  }
1268
1331
  }
1269
- St.current = null;
1270
- let i = z.current.find((e) => bn.current.has(e.startTime) && n >= e.startTime - .5 && n < e.endTime + 2), a = i ? Math.max(n, i.endTime + .5) : n;
1271
- E.current = !0, D.current = a, O.current = r, Xt(a), A.current && (A.current.style.opacity = "0"), yt(F.getVideoElement()), F.seek(a), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
1272
- E.current = !1, D.current = null, O.current = null, k.current = null, A.current && (A.current.style.opacity = "0");
1332
+ Dt.current = null;
1333
+ let i = z.current.find((e) => En.current.has(e.startTime) && n >= e.startTime - .5 && n < e.endTime + 2), a = i ? Math.max(n, i.endTime + .5) : n;
1334
+ E.current = !0, D.current = a, O.current = r, nn(a), xt.current = !1, A.current && (A.current.style.opacity = "0"), wt(F.getVideoElement()), F.seek(a), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
1335
+ E.current = !1, D.current = null, O.current = null, k.current = null, xt.current = !1, A.current && (A.current.style.opacity = "0");
1273
1336
  }, 3e3);
1274
1337
  };
1275
- Ct.current = Z;
1276
- let si = () => {
1338
+ Ot.current = Z;
1339
+ let pi = () => {
1277
1340
  if (!F) return;
1278
1341
  if (q) {
1279
- F.casting.remoteSetMute(!(xr?.isMuted ?? !1));
1342
+ F.casting.remoteSetMute(!(Dr?.isMuted ?? !1));
1280
1343
  return;
1281
1344
  }
1282
- let e = !tn;
1283
- F.setMute(e), nn(e);
1284
- }, ci = (e) => {
1285
- F && (F.setPlaybackRate(e), lr(e), K("none"), hr(`Playback speed: ${e === 1 ? "Normal" : `${e}x`}`));
1286
- }, li = (e) => {
1345
+ let e = !cn;
1346
+ F.setMute(e), ln(e);
1347
+ }, mi = (e) => {
1348
+ F && (F.setPlaybackRate(e), hr(e), K("none"), xr(`Playback speed: ${e === 1 ? "Normal" : `${e}x`}`));
1349
+ }, hi = (e) => {
1287
1350
  if (!F) return;
1288
1351
  F.setQuality(e);
1289
- let t = Kn.find((t) => t.id === e);
1290
- t && (Yn(t), hr(`Quality: ${t.label}`)), K("none");
1291
- }, ui = (e) => {
1292
- if (F) if (F.subtitles.setActiveTrack(e), Qn(e), K("none"), e === "off") hr("Captions off");
1352
+ let t = Qn.find((t) => t.id === e);
1353
+ t && (tr(t), xr(`Quality: ${t.label}`)), K("none");
1354
+ }, gi = (e) => {
1355
+ if (F) if (F.subtitles.setActiveTrack(e), ir(e), K("none"), e === "off") xr("Captions off");
1293
1356
  else {
1294
- let t = $n.find((t) => t.id === e);
1295
- hr(`Captions: ${t ? y(t) : "on"}`);
1357
+ let t = ar.find((t) => t.id === e);
1358
+ xr(`Captions: ${t ? b(t) : "on"}`);
1296
1359
  }
1297
- }, di = (e) => {
1298
- F && (j.current &&= (clearTimeout(j.current), null), _r(null), M.current && (M.current.style.opacity = "1"), an(!0), Tt.current === null && (wt.current = F.getCurrentTime()), Tt.current = { targetIdx: e }, K("none"), hr(`Source: ${x?.[e]?.label ?? ""}`), it?.(e));
1299
- }, fi = (e, t) => {
1360
+ }, _i = (e) => {
1361
+ F && (j.current &&= (clearTimeout(j.current), null), Cr(null), M.current && (M.current.style.opacity = "1"), dn(!0), At.current === null && (kt.current = F.getCurrentTime()), At.current = { targetIdx: e }, K("none"), xr(`Source: ${S?.[e]?.label ?? ""}`), ct?.(e));
1362
+ }, vi = (e, t) => {
1300
1363
  Z(e, {
1301
1364
  eventType: "key_moments",
1302
1365
  momentTitle: t?.title ?? "",
1303
1366
  momentTime: e
1304
1367
  }), K("none");
1305
- }, pi = o(() => {
1306
- if (!At.current) return;
1368
+ }, yi = o(() => {
1369
+ if (!It.current) return;
1307
1370
  let e = F?.getVideoElement?.();
1308
- e && C.current && e.ownerDocument !== document && (e.classList.remove("gb-pip-video"), e.style.objectFit = "", C.current.insertBefore(e, C.current.firstChild)), At.current = null, gn(null), mn(!1);
1309
- }, [F]), mi = async () => {
1371
+ e && C.current && e.ownerDocument !== document && (e.classList.remove("gb-pip-video"), e.style.objectFit = "", C.current.insertBefore(e, C.current.firstChild)), It.current = null, Sn(null), bn(!1);
1372
+ }, [F]), bi = async () => {
1310
1373
  if (!F) return;
1311
1374
  let e = window.documentPictureInPicture;
1312
1375
  if (!e) {
1313
1376
  F.togglePictureInPicture();
1314
1377
  return;
1315
1378
  }
1316
- if (At.current) {
1317
- At.current.close();
1379
+ if (It.current) {
1380
+ It.current.close();
1318
1381
  return;
1319
1382
  }
1320
1383
  try {
@@ -1322,138 +1385,138 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1322
1385
  width: 360,
1323
1386
  height: Math.round(360 / n)
1324
1387
  }), i = r.document.createElement("style");
1325
- i.textContent = Ne, r.document.head.appendChild(i), t.classList.add("gb-pip-video"), r.document.body.appendChild(t), r.addEventListener("pagehide", () => pi(), { once: !0 }), At.current = r, gn(r), mn(!0);
1388
+ i.textContent = je, r.document.head.appendChild(i), t.classList.add("gb-pip-video"), r.document.body.appendChild(t), r.addEventListener("pagehide", () => yi(), { once: !0 }), It.current = r, Sn(r), bn(!0);
1326
1389
  } catch (e) {
1327
1390
  console.error("[PlayerSDK PiP] Failed to open custom Picture-in-Picture window:", e);
1328
1391
  }
1329
- }, hi = (e) => {
1330
- if (Y || Kr) return;
1392
+ }, xi = (e) => {
1393
+ if (Y || Qr) return;
1331
1394
  let t = e.currentTarget.getBoundingClientRect();
1332
1395
  Z(H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B));
1333
- }, gi = () => {
1396
+ }, Si = () => {
1334
1397
  if (!C.current) return;
1335
1398
  let e = C.current, t = document, n = e, r = !!(document.fullscreenElement || t.webkitFullscreenElement), i = () => {
1336
- ln(!0), sn(!0), document.body.style.overflow = "hidden", document.body.style.touchAction = "none", F?.analytics.track("fullscreen_enter", F.getVideoElement());
1399
+ hn(!0), pn(!0), document.body.style.overflow = "hidden", document.body.style.touchAction = "none", F?.analytics.track("fullscreen_enter", F.getVideoElement());
1337
1400
  }, a = () => {
1338
- ln(!1), sn(!1), document.body.style.overflow = "", document.body.style.touchAction = "", F?.analytics.track("fullscreen_exit", F.getVideoElement());
1401
+ hn(!1), pn(!1), document.body.style.overflow = "", document.body.style.touchAction = "", F?.analytics.track("fullscreen_exit", F.getVideoElement());
1339
1402
  };
1340
- if (r || cn) dn(!1), document.fullscreenElement ? document.exitFullscreen() : t.webkitFullscreenElement ? t.webkitExitFullscreen?.() : a();
1403
+ if (r || mn) _n(!1), document.fullscreenElement ? document.exitFullscreen() : t.webkitFullscreenElement ? t.webkitExitFullscreen?.() : a();
1341
1404
  else {
1342
- dn(Nt.current);
1405
+ _n(zt.current);
1343
1406
  let t = e.requestFullscreen?.bind(e) ?? n.webkitRequestFullscreen?.bind(n);
1344
1407
  t ? t().catch(i) : i();
1345
1408
  }
1346
1409
  };
1347
1410
  c(() => {
1348
- gt.current = gi;
1411
+ bt.current = Si;
1349
1412
  });
1350
- let _i = () => {
1413
+ let Ci = () => {
1351
1414
  if (!Y) return;
1352
- let e = R.find((e) => L >= e.startTime && L < e.endTime), t = Rn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds);
1415
+ let e = R.find((e) => L >= e.startTime && L < e.endTime), t = Wn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds);
1353
1416
  if (t) {
1354
1417
  let n = t.podIndex >= t.podTotal - 1;
1355
- bt.current?.(n ? e?.endTime ?? t.endTimeSeconds : t.endTimeSeconds, !n);
1418
+ Tt.current?.(n ? e?.endTime ?? t.endTimeSeconds : t.endTimeSeconds, !n);
1356
1419
  return;
1357
1420
  }
1358
- e && bt.current?.(e.endTime);
1359
- }, vi = () => {
1360
- In.current && Ln.current.add(In.current.availId), Pn(null), In.current = null;
1361
- }, yi = (e) => {
1421
+ e && Tt.current?.(e.endTime);
1422
+ }, wi = () => {
1423
+ Hn.current && Un.current.add(Hn.current.availId), Bn(null), Hn.current = null;
1424
+ }, Ti = (e) => {
1362
1425
  e.clickTrackingUrl && fetch(e.clickTrackingUrl, { mode: "no-cors" }).catch(() => {}), e.clickThrough && window.open(e.clickThrough, "_blank", "noopener,noreferrer");
1363
- }, bi = (e) => {
1426
+ }, Ei = (e) => {
1364
1427
  window.open(e.url, "_blank", "noopener,noreferrer");
1365
- }, xi = () => {
1428
+ }, Di = () => {
1366
1429
  F && (q ? F.casting.stopCasting() : F.casting.requestSession(r, L));
1367
- }, Si = () => {
1430
+ }, Oi = () => {
1368
1431
  if (!F) return;
1369
1432
  let e = F.getVideoElement();
1370
- if (Er) {
1433
+ if (Mr) {
1371
1434
  F.casting.stopAirPlay(e);
1372
1435
  return;
1373
1436
  }
1374
1437
  typeof e.webkitShowPlaybackTargetPicker == "function" || F.casting.isAirPlayAvailable() ? F.casting.requestAirPlaySession(e) : console.warn("[PlayerSDK AirPlay] AirPlay is not available on this device.");
1375
- }, Ci = (e) => {
1376
- if (!w.current || B === 0 || !F || Y || Kr) return;
1438
+ }, ki = (e) => {
1439
+ if (!w.current || B === 0 || !F || Y || Qr) return;
1377
1440
  let t = w.current.getBoundingClientRect();
1378
- ut.current = t.width, Nr(Math.max(192 / 2, Math.min(e.clientX - t.left, t.width - 192 / 2)));
1441
+ mt.current = t.width, zr(Math.max(192 / 2, Math.min(e.clientX - t.left, t.width - 192 / 2)));
1379
1442
  let n = H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
1380
- jr(e.clientX - t.left), Fr(n), pt.current && window.clearTimeout(pt.current), pt.current = window.setTimeout(() => {
1443
+ Lr(e.clientX - t.left), Vr(n), _t.current && window.clearTimeout(_t.current), _t.current = window.setTimeout(() => {
1381
1444
  T.current && (T.current.currentTime = n);
1382
- }, 100), zr(F.keyMoments.getCurrentMoment(n).keyMoment);
1383
- }, wi = (e) => {
1445
+ }, 100), Gr(F.keyMoments.getCurrentMoment(n).keyMoment);
1446
+ }, Ai = (e) => {
1384
1447
  if (!w.current || B === 0) return 0;
1385
1448
  let t = w.current.getBoundingClientRect();
1386
1449
  return H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
1387
- }, Ti = (e) => {
1388
- if (!F || Y || Kr || B === 0) return;
1389
- e.preventDefault(), mt.current = !0, Br(wi(e.touches[0]));
1450
+ }, ji = (e) => {
1451
+ if (!F || Y || Qr || B === 0) return;
1452
+ e.preventDefault(), vt.current = !0, Kr(Ai(e.touches[0]));
1390
1453
  let t = (e) => {
1391
- if (!mt.current || !w.current) return;
1454
+ if (!vt.current || !w.current) return;
1392
1455
  let t = e.touches[0], n = w.current.getBoundingClientRect(), r = H(Math.max(0, Math.min(1, (t.clientX - n.left) / n.width)) * B);
1393
- Br(r), Fr(r), ei();
1456
+ Kr(r), Vr(r), oi();
1394
1457
  }, n = (e) => {
1395
- if (mt.current = !1, w.current && e.changedTouches[0]) {
1458
+ if (vt.current = !1, w.current && e.changedTouches[0]) {
1396
1459
  let t = e.changedTouches[0], n = w.current.getBoundingClientRect();
1397
1460
  Z(H(Math.max(0, Math.min(1, (t.clientX - n.left) / n.width)) * B));
1398
1461
  }
1399
- Br(null), document.removeEventListener("touchmove", t), document.removeEventListener("touchend", n);
1462
+ Kr(null), document.removeEventListener("touchmove", t), document.removeEventListener("touchend", n);
1400
1463
  };
1401
1464
  document.addEventListener("touchmove", t, { passive: !1 }), document.addEventListener("touchend", n);
1402
- }, Ei = () => {
1403
- jr(null), Lr(null), zr(null), pt.current && window.clearTimeout(pt.current);
1465
+ }, Mi = () => {
1466
+ Lr(null), Ur(null), Gr(null), _t.current && window.clearTimeout(_t.current);
1404
1467
  }, Q = (e) => {
1405
1468
  if (isNaN(e) || e < 0) return "00:00";
1406
1469
  let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = (e) => String(e).padStart(2, "0");
1407
1470
  return n > 0 ? `${a(n)}:${a(r)}:${a(i)}` : `${a(r)}:${a(i)}`;
1408
1471
  };
1409
1472
  c(() => {
1410
- vr.current && hr(Jt ? "Playing" : "Paused");
1411
- }, [Jt]), c(() => {
1412
- vr.current && hr(tn ? "Muted" : "Unmuted");
1413
- }, [tn]), c(() => {
1414
- vr.current = !0;
1473
+ wr.current && xr(en ? "Playing" : "Paused");
1474
+ }, [en]), c(() => {
1475
+ wr.current && xr(cn ? "Muted" : "Unmuted");
1476
+ }, [cn]), c(() => {
1477
+ wr.current = !0;
1415
1478
  }, []), c(() => {
1416
1479
  let e = (e) => {
1417
- e.key === "Escape" && Qr.current !== "none" && (e.preventDefault(), K("none"));
1480
+ e.key === "Escape" && ii.current !== "none" && (e.preventDefault(), K("none"));
1418
1481
  };
1419
1482
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1420
1483
  }, []);
1421
- let Di = q ? !(xr?.isPaused ?? !0) : Jt, $ = q ? xr?.currentTime ?? 0 : L, Oi = q ? xr?.duration ?? 0 : B, ki = q ? xr?.volumeLevel ?? 1 : $t, Ai = q ? xr?.isMuted ?? !1 : tn, ji = o((e) => {
1422
- if (Y || Kr || e.target.closest(".sdk-mobile-ctrl")) return;
1423
- let t = Date.now(), n = C.current?.getBoundingClientRect(), r = e.clientX - (n?.left ?? 0), i = Pt.current;
1484
+ let Ni = q ? !(Dr?.isPaused ?? !0) : en, $ = q ? Dr?.currentTime ?? 0 : L, Pi = q ? Dr?.duration ?? 0 : B, Fi = q ? Dr?.volumeLevel ?? 1 : on, Ii = q ? Dr?.isMuted ?? !1 : cn, Li = o((e) => {
1485
+ if (Y || Qr || e.target.closest(".sdk-mobile-ctrl")) return;
1486
+ let t = Date.now(), n = C.current?.getBoundingClientRect(), r = e.clientX - (n?.left ?? 0), i = Bt.current;
1424
1487
  if (i && t - i.time < 300) {
1425
- Pt.current = null;
1488
+ Bt.current = null;
1426
1489
  let e = r < (n?.width ?? 0) / 2, t = e ? -10 : 10;
1427
1490
  Z(H(Math.max(0, Math.min(B, V($) + t))), {
1428
1491
  eventType: e ? "fast_backward" : "fast_forward",
1429
1492
  skipSeconds: 10
1430
- }), It(e ? "left" : "right"), window.setTimeout(() => It(null), 700), ei();
1431
- } else Pt.current = {
1493
+ }), Ht(e ? "left" : "right"), window.setTimeout(() => Ht(null), 700), oi();
1494
+ } else Bt.current = {
1432
1495
  time: t,
1433
1496
  x: r
1434
- }, Ur ? (Wr(!1), Yr.current && window.clearTimeout(Yr.current)) : ei();
1497
+ }, Yr ? (Xr(!1), ti.current && window.clearTimeout(ti.current)) : oi();
1435
1498
  }, [
1436
1499
  Y,
1437
- Kr,
1500
+ Qr,
1438
1501
  B,
1439
1502
  V,
1440
1503
  $,
1441
1504
  H,
1442
1505
  Z,
1443
- Ur
1444
- ]), Mi = () => f(Ai || ki === 0 ? ke : ki < .3 ? Ae : ki < .7 ? De : Oe, { size: 18 }), Ni = (e) => (t) => {
1506
+ Yr
1507
+ ]), Ri = () => f(Ii || Fi === 0 ? De : Fi < .3 ? Oe : Fi < .7 ? Te : Ee, { size: 18 }), zi = (e) => (t) => {
1445
1508
  t.key === "Enter" || t.key === " " ? (t.preventDefault(), e()) : t.key === "Escape" && (t.preventDefault(), K("none"));
1446
- }, Pi = (e) => (t) => {
1509
+ }, Bi = (e) => (t) => {
1447
1510
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), e());
1448
- }, Fi = (e) => {
1449
- if (!(Y || Kr)) if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
1511
+ }, Vi = (e) => {
1512
+ if (!(Y || Qr)) if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
1450
1513
  e.preventDefault();
1451
1514
  let t = e.key === "ArrowLeft" ? -5 : 5;
1452
1515
  Z(H(Math.max(0, Math.min(B, V($) + t))));
1453
1516
  } else e.key === "Home" ? (e.preventDefault(), Z(H(0))) : e.key === "End" && (e.preventDefault(), Z(H(B)));
1454
- }, Ii = (e) => {
1517
+ }, Hi = (e) => {
1455
1518
  K(G === e ? "none" : e);
1456
- }, Li = o((e) => {
1519
+ }, Ui = o((e) => {
1457
1520
  if (!e) return;
1458
1521
  e.style.left = "";
1459
1522
  let t = C.current;
@@ -1464,19 +1527,19 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1464
1527
  return /* @__PURE__ */ p("div", {
1465
1528
  ref: C,
1466
1529
  role: "region",
1467
- "aria-label": Xe || Vr ? `${Xe || Vr} video player` : "Video player",
1468
- className: `sdk-player-container ${Ur ? "controls-active" : ""} ${cn ? "sdk-fs-simulated" : ""}`,
1469
- onMouseMove: ni,
1470
- onTouchStart: fn ? void 0 : ei,
1530
+ "aria-label": x || qr ? `${x || qr} video player` : "Video player",
1531
+ className: `sdk-player-container ${Yr ? "controls-active" : ""} ${mn ? "sdk-fs-simulated" : ""}`,
1532
+ onMouseMove: ci,
1533
+ onTouchStart: vn ? void 0 : oi,
1471
1534
  onMouseLeave: () => {},
1472
1535
  style: {
1473
- border: cn ? "none" : "1px solid rgba(255, 255, 255, 0.08)",
1474
- "--sdk-theme-color": oe,
1475
- "--sdk-theme-color-rgb": Le(oe)
1536
+ border: mn ? "none" : "1px solid rgba(255, 255, 255, 0.08)",
1537
+ "--sdk-theme-color": h,
1538
+ "--sdk-theme-color-rgb": Fe(h)
1476
1539
  },
1477
1540
  children: [
1478
1541
  /* @__PURE__ */ f("canvas", {
1479
- ref: dt,
1542
+ ref: ht,
1480
1543
  width: 160,
1481
1544
  height: 90,
1482
1545
  style: {
@@ -1491,7 +1554,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1491
1554
  "aria-live": "polite",
1492
1555
  "aria-atomic": "true",
1493
1556
  className: "sdk-sr-only",
1494
- children: mr
1557
+ children: br
1495
1558
  }),
1496
1559
  /* @__PURE__ */ f("div", {
1497
1560
  ref: A,
@@ -1506,10 +1569,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1506
1569
  },
1507
1570
  "aria-hidden": "true"
1508
1571
  }),
1509
- hn && /* @__PURE__ */ p("div", {
1572
+ xn && /* @__PURE__ */ p("div", {
1510
1573
  className: "sdk-pip-placeholder",
1511
1574
  "aria-hidden": "true",
1512
- children: [/* @__PURE__ */ f(Ce, {
1575
+ children: [/* @__PURE__ */ f(xe, {
1513
1576
  size: 32,
1514
1577
  "aria-hidden": "true"
1515
1578
  }), /* @__PURE__ */ f("span", { children: "Playing in Picture-in-Picture" })]
@@ -1517,7 +1580,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1517
1580
  /* @__PURE__ */ f("div", {
1518
1581
  ref: M,
1519
1582
  style: {
1520
- opacity: at && at > 0 ? 1 : 0,
1583
+ opacity: lt && lt > 0 ? 1 : 0,
1521
1584
  position: "absolute",
1522
1585
  inset: 0,
1523
1586
  background: "#000",
@@ -1528,11 +1591,11 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1528
1591
  "aria-hidden": "true"
1529
1592
  }),
1530
1593
  /* @__PURE__ */ f("div", {
1531
- className: `sdk-spinner-overlay ${rn ? "active" : ""}`,
1594
+ className: `sdk-spinner-overlay ${un ? "active" : ""}`,
1532
1595
  "aria-hidden": "true",
1533
1596
  children: /* @__PURE__ */ f("div", { className: "sdk-spinner" })
1534
1597
  }),
1535
- Wt && /* @__PURE__ */ f("div", {
1598
+ Xt && /* @__PURE__ */ f("div", {
1536
1599
  style: {
1537
1600
  position: "absolute",
1538
1601
  inset: 0,
@@ -1546,10 +1609,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1546
1609
  padding: "0 24px"
1547
1610
  },
1548
1611
  children: /* @__PURE__ */ f(re, { onRetry: () => {
1549
- Gt(!1), qt((e) => e + 1);
1612
+ Zt(!1), $t((e) => e + 1);
1550
1613
  } })
1551
1614
  }),
1552
- gr && /* @__PURE__ */ f("div", {
1615
+ Sr && /* @__PURE__ */ f("div", {
1553
1616
  style: {
1554
1617
  position: "absolute",
1555
1618
  top: "50%",
@@ -1568,24 +1631,24 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1568
1631
  backdropFilter: "blur(8px)",
1569
1632
  border: "1px solid rgba(255,255,255,0.12)"
1570
1633
  },
1571
- children: gr
1634
+ children: Sr
1572
1635
  }),
1573
- I.enableSubtitles && !Y && Xn && U !== "off" && /* @__PURE__ */ f("div", {
1636
+ I.enableSubtitles && !Y && nr && U !== "off" && /* @__PURE__ */ f("div", {
1574
1637
  className: "sdk-subtitles-overlay",
1575
1638
  children: /* @__PURE__ */ f("span", {
1576
1639
  className: "sdk-subtitles-text",
1577
1640
  style: {
1578
- fontSize: qe.size === "small" ? "14px" : qe.size === "large" ? "24px" : "18px",
1579
- color: qe.color ?? "#ffffff",
1580
- background: qe.background === "none" ? "transparent" : qe.background === "solid" ? "rgba(0, 0, 0, 0.92)" : "rgba(15, 23, 42, 0.78)",
1581
- border: qe.background === "none" ? "none" : "1px solid rgba(255,255,255,0.08)",
1582
- backdropFilter: qe.background === "none" ? "none" : "blur(8px)"
1641
+ fontSize: Xe.size === "small" ? "14px" : Xe.size === "large" ? "24px" : "18px",
1642
+ color: Xe.color ?? "#ffffff",
1643
+ background: Xe.background === "none" ? "transparent" : Xe.background === "solid" ? "rgba(0, 0, 0, 0.92)" : "rgba(15, 23, 42, 0.78)",
1644
+ border: Xe.background === "none" ? "none" : "1px solid rgba(255,255,255,0.08)",
1645
+ backdropFilter: Xe.background === "none" ? "none" : "blur(8px)"
1583
1646
  },
1584
- dangerouslySetInnerHTML: { __html: Xn }
1647
+ dangerouslySetInnerHTML: { __html: nr }
1585
1648
  })
1586
1649
  }),
1587
- Nn && /* @__PURE__ */ p("div", {
1588
- className: `sdk-overlay-ad sdk-overlay-ad--${Nn.position}`,
1650
+ zn && /* @__PURE__ */ p("div", {
1651
+ className: `sdk-overlay-ad sdk-overlay-ad--${zn.position}`,
1589
1652
  role: "complementary",
1590
1653
  "aria-label": "Advertisement",
1591
1654
  children: [/* @__PURE__ */ p("div", {
@@ -1593,23 +1656,23 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1593
1656
  children: [/* @__PURE__ */ f("span", {
1594
1657
  className: "sdk-overlay-ad-label",
1595
1658
  children: "Ad"
1596
- }), Nn.dismissible && /* @__PURE__ */ f("button", {
1659
+ }), zn.dismissible && /* @__PURE__ */ f("button", {
1597
1660
  className: "sdk-overlay-ad-close",
1598
- onClick: vi,
1661
+ onClick: wi,
1599
1662
  "aria-label": "Close advertisement",
1600
1663
  children: "✕"
1601
1664
  })]
1602
1665
  }), /* @__PURE__ */ f("img", {
1603
- src: Nn.imageUrl,
1604
- width: Nn.imageWidth,
1605
- height: Nn.imageHeight,
1606
- alt: Nn.title || "Advertisement",
1666
+ src: zn.imageUrl,
1667
+ width: zn.imageWidth,
1668
+ height: zn.imageHeight,
1669
+ alt: zn.title || "Advertisement",
1607
1670
  className: "sdk-overlay-ad-img",
1608
- onClick: () => yi(Nn)
1671
+ onClick: () => Ti(zn)
1609
1672
  })]
1610
1673
  }),
1611
1674
  Y && (() => {
1612
- let e = Rn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds), t = R.find((e) => L >= e.startTime && L < e.endTime), n = e ? Math.max(0, e.endTimeSeconds - L) : t ? Math.max(0, t.endTime - L) : 0, r = e ? L - e.startTimeSeconds : t ? L - t.startTime : 0, i = !!e && e.podTotal > 1, a = e ? e.skippable : tt, o = e ? e.skipOffsetSeconds : nt, s = a && r >= o, c = Math.ceil(o - r);
1675
+ let e = Wn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds), t = R.find((e) => L >= e.startTime && L < e.endTime), n = e ? Math.max(0, e.endTimeSeconds - L) : t ? Math.max(0, t.endTime - L) : 0, r = e ? L - e.startTimeSeconds : t ? L - t.startTime : 0, i = !!e && e.podTotal > 1, a = e ? e.skippable : rt, o = e ? e.skipOffsetSeconds : it, s = a && r >= o, c = Math.ceil(o - r);
1613
1676
  return /* @__PURE__ */ p(te, { children: [
1614
1677
  /* @__PURE__ */ p("div", {
1615
1678
  className: "sdk-ad-countdown",
@@ -1636,7 +1699,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1636
1699
  }),
1637
1700
  a && /* @__PURE__ */ f("button", {
1638
1701
  className: `sdk-skip-ad-btn ${s ? "sdk-skip-ad-btn--ready" : ""}`,
1639
- onClick: s ? _i : void 0,
1702
+ onClick: s ? Ci : void 0,
1640
1703
  disabled: !s,
1641
1704
  "aria-label": s ? "Skip advertisement" : `Skip advertisement available in ${c} seconds`,
1642
1705
  "aria-disabled": !s,
@@ -1645,12 +1708,12 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1645
1708
  e?.cta && (() => {
1646
1709
  let t = e.cta, n = /* @__PURE__ */ p("button", {
1647
1710
  className: "sdk-ad-cta-btn",
1648
- onClick: () => bi(t),
1711
+ onClick: () => Ei(t),
1649
1712
  "aria-label": `${t.text} — opens advertiser site in a new tab`,
1650
1713
  children: [/* @__PURE__ */ f("span", {
1651
1714
  className: "sdk-ad-cta-btn-text",
1652
1715
  children: t.text
1653
- }), /* @__PURE__ */ f(_e, {
1716
+ }), /* @__PURE__ */ f(he, {
1654
1717
  size: 15,
1655
1718
  "aria-hidden": "true"
1656
1719
  })]
@@ -1676,7 +1739,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1676
1739
  })()
1677
1740
  ] });
1678
1741
  })(),
1679
- Ut && /* @__PURE__ */ f("div", {
1742
+ Yt && /* @__PURE__ */ f("div", {
1680
1743
  style: {
1681
1744
  position: "absolute",
1682
1745
  inset: 0,
@@ -1702,35 +1765,35 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1702
1765
  })]
1703
1766
  })
1704
1767
  }),
1705
- (q || Er) && /* @__PURE__ */ f("div", { className: "sdk-cast-bg" }),
1706
- fn && /* @__PURE__ */ p("div", {
1707
- className: `sdk-mobile-overlay ${Ur ? "active" : ""}`,
1708
- onClick: ji,
1709
- children: [Ft && /* @__PURE__ */ f("div", {
1710
- className: `sdk-mobile-doubletap ${Ft}`,
1768
+ (q || Mr) && /* @__PURE__ */ f("div", { className: "sdk-cast-bg" }),
1769
+ vn && /* @__PURE__ */ p("div", {
1770
+ className: `sdk-mobile-overlay ${Yr ? "active" : ""}`,
1771
+ onClick: Li,
1772
+ children: [Vt && /* @__PURE__ */ f("div", {
1773
+ className: `sdk-mobile-doubletap ${Vt}`,
1711
1774
  children: /* @__PURE__ */ p("div", {
1712
1775
  className: "sdk-mobile-doubletap-icon",
1713
- children: [f(Ft === "left" ? Te : Ee, { size: 26 }), /* @__PURE__ */ f("span", {
1776
+ children: [f(Vt === "left" ? Ce : we, { size: 26 }), /* @__PURE__ */ f("span", {
1714
1777
  className: "sdk-mobile-doubletap-label",
1715
1778
  children: "10s"
1716
1779
  })]
1717
1780
  })
1718
- }), fe && /* @__PURE__ */ p(te, { children: [
1781
+ }), g && /* @__PURE__ */ p(te, { children: [
1719
1782
  /* @__PURE__ */ p("div", {
1720
1783
  className: "sdk-mobile-header sdk-mobile-ctrl",
1721
1784
  children: [/* @__PURE__ */ p("div", {
1722
1785
  className: "sdk-mobile-header-left",
1723
- children: [(on || cn) && /* @__PURE__ */ f("button", {
1786
+ children: [(fn || mn) && /* @__PURE__ */ f("button", {
1724
1787
  className: "sdk-mobile-back-btn",
1725
- onClick: gi,
1788
+ onClick: Si,
1726
1789
  "aria-label": "Exit fullscreen",
1727
- children: /* @__PURE__ */ f(ge, {
1790
+ children: /* @__PURE__ */ f(me, {
1728
1791
  size: 22,
1729
1792
  "aria-hidden": "true"
1730
1793
  })
1731
- }), (Xe || Vr) && /* @__PURE__ */ f("div", {
1794
+ }), (x || qr) && /* @__PURE__ */ f("div", {
1732
1795
  className: "sdk-mobile-title",
1733
- children: Xe || Vr
1796
+ children: x || qr
1734
1797
  })]
1735
1798
  }), /* @__PURE__ */ p("div", {
1736
1799
  className: "sdk-mobile-header-actions",
@@ -1738,36 +1801,36 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1738
1801
  I.enablePiP && /* @__PURE__ */ f("button", {
1739
1802
  className: "sdk-mobile-hdr-btn",
1740
1803
  onClick: () => {
1741
- Y || mi();
1804
+ Y || bi();
1742
1805
  },
1743
- style: { color: pn ? oe : "" },
1744
- "aria-label": pn ? "Exit picture-in-picture" : "Enter picture-in-picture",
1745
- "aria-pressed": pn,
1746
- children: /* @__PURE__ */ f(Ce, {
1806
+ style: { color: yn ? h : "" },
1807
+ "aria-label": yn ? "Exit picture-in-picture" : "Enter picture-in-picture",
1808
+ "aria-pressed": yn,
1809
+ children: /* @__PURE__ */ f(xe, {
1747
1810
  size: 20,
1748
1811
  "aria-hidden": "true"
1749
1812
  })
1750
1813
  }),
1751
1814
  I.enableChromecast && !Y && /* @__PURE__ */ f("button", {
1752
1815
  className: "sdk-mobile-hdr-btn",
1753
- onClick: xi,
1816
+ onClick: Di,
1754
1817
  "data-tooltip": q ? `Casting to ${q} — tap to disconnect` : "Cast to device",
1755
1818
  "aria-label": q ? `Stop casting to ${q}` : "Cast to device",
1756
1819
  "aria-pressed": !!q,
1757
1820
  style: { color: q ? "#3b82f6" : "" },
1758
- children: /* @__PURE__ */ f(he, {
1821
+ children: /* @__PURE__ */ f(pe, {
1759
1822
  size: 20,
1760
1823
  fill: q ? "currentColor" : "none",
1761
1824
  "aria-hidden": "true"
1762
1825
  })
1763
1826
  }),
1764
- I.allowAirplay && wr && /* @__PURE__ */ f("button", {
1827
+ I.allowAirplay && Ar && /* @__PURE__ */ f("button", {
1765
1828
  className: "sdk-mobile-hdr-btn",
1766
- onClick: Si,
1767
- "aria-label": Er ? `Stop AirPlay to ${Or || "device"}` : "AirPlay to device",
1768
- "aria-pressed": Er,
1769
- style: { color: Er ? oe : "" },
1770
- children: /* @__PURE__ */ f(pe, {
1829
+ onClick: Oi,
1830
+ "aria-label": Mr ? `Stop AirPlay to ${Pr || "device"}` : "AirPlay to device",
1831
+ "aria-pressed": Mr,
1832
+ style: { color: Mr ? h : "" },
1833
+ children: /* @__PURE__ */ f(de, {
1771
1834
  size: 20,
1772
1835
  "aria-hidden": "true"
1773
1836
  })
@@ -1785,7 +1848,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1785
1848
  skipSeconds: 10
1786
1849
  }),
1787
1850
  "aria-label": "Rewind 10 seconds",
1788
- children: [/* @__PURE__ */ f(Te, {
1851
+ children: [/* @__PURE__ */ f(Ce, {
1789
1852
  size: 22,
1790
1853
  "aria-hidden": "true"
1791
1854
  }), /* @__PURE__ */ f("span", {
@@ -1796,16 +1859,16 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1796
1859
  }),
1797
1860
  /* @__PURE__ */ f("button", {
1798
1861
  className: "sdk-mobile-play-btn",
1799
- onClick: ii,
1800
- "aria-label": _n ? "Replay" : Di ? "Pause" : "Play",
1801
- children: _n ? /* @__PURE__ */ f(Te, {
1862
+ onClick: ui,
1863
+ "aria-label": Cn ? "Replay" : Ni ? "Pause" : "Play",
1864
+ children: Cn ? /* @__PURE__ */ f(Ce, {
1802
1865
  size: 38,
1803
1866
  "aria-hidden": "true"
1804
- }) : Di ? /* @__PURE__ */ f(Se, {
1867
+ }) : Ni ? /* @__PURE__ */ f(v, {
1805
1868
  size: 38,
1806
1869
  fill: "currentColor",
1807
1870
  "aria-hidden": "true"
1808
- }) : /* @__PURE__ */ f(we, {
1871
+ }) : /* @__PURE__ */ f(Se, {
1809
1872
  size: 38,
1810
1873
  fill: "currentColor",
1811
1874
  style: { marginLeft: "3px" },
@@ -1819,7 +1882,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1819
1882
  skipSeconds: 10
1820
1883
  }),
1821
1884
  "aria-label": "Skip forward 10 seconds",
1822
- children: [/* @__PURE__ */ f(Ee, {
1885
+ children: [/* @__PURE__ */ f(we, {
1823
1886
  size: 22,
1824
1887
  "aria-hidden": "true"
1825
1888
  }), /* @__PURE__ */ f("span", {
@@ -1833,25 +1896,25 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1833
1896
  /* @__PURE__ */ p("div", {
1834
1897
  className: "sdk-mobile-bottom-bar sdk-mobile-ctrl",
1835
1898
  children: [
1836
- I.enableKeyMoments && ur && W.length > 0 && /* @__PURE__ */ f("div", {
1899
+ I.enableKeyMoments && gr && W.length > 0 && /* @__PURE__ */ f("div", {
1837
1900
  className: "sdk-mobile-chapters-scroll",
1838
1901
  children: W.map((e, t) => {
1839
- let n = ar.index === t;
1902
+ let n = dr.index === t;
1840
1903
  return /* @__PURE__ */ p("div", {
1841
1904
  role: "button",
1842
1905
  tabIndex: 0,
1843
1906
  className: `sdk-mobile-chapter-card${n ? " active" : ""}`,
1844
- style: { borderColor: n ? oe : void 0 },
1907
+ style: { borderColor: n ? h : void 0 },
1845
1908
  "aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
1846
1909
  "aria-current": n ? "true" : void 0,
1847
1910
  onClick: () => {
1848
- fi(e.startTime, e);
1911
+ vi(e.startTime, e);
1849
1912
  },
1850
- onKeyDown: Pi(() => fi(e.startTime, e)),
1913
+ onKeyDown: Bi(() => vi(e.startTime, e)),
1851
1914
  children: [/* @__PURE__ */ p("div", {
1852
1915
  className: "sdk-mobile-chapter-thumb",
1853
- children: [fr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
1854
- src: fr[t] || e.thumbnail,
1916
+ children: [vr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
1917
+ src: vr[t] || e.thumbnail,
1855
1918
  alt: "",
1856
1919
  "aria-hidden": "true",
1857
1920
  style: {
@@ -1860,10 +1923,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1860
1923
  objectFit: "cover",
1861
1924
  display: "block"
1862
1925
  }
1863
- }) : /* @__PURE__ */ f(be, {
1926
+ }) : /* @__PURE__ */ f(ve, {
1864
1927
  size: 16,
1865
1928
  "aria-hidden": "true",
1866
- style: { color: n ? oe : "rgba(255,255,255,0.3)" }
1929
+ style: { color: n ? h : "rgba(255,255,255,0.3)" }
1867
1930
  }), /* @__PURE__ */ f("span", {
1868
1931
  className: "sdk-mobile-chapter-time-badge",
1869
1932
  "aria-hidden": "true",
@@ -1871,7 +1934,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1871
1934
  })]
1872
1935
  }), /* @__PURE__ */ f("div", {
1873
1936
  className: "sdk-mobile-chapter-title",
1874
- style: { color: n ? oe : void 0 },
1937
+ style: { color: n ? h : void 0 },
1875
1938
  children: e.title
1876
1939
  })]
1877
1940
  }, t);
@@ -1887,11 +1950,11 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1887
1950
  "aria-valuetext": X ? void 0 : `${Q(V(J === null ? L : J))} of ${Q(B)}`,
1888
1951
  tabIndex: X ? void 0 : 0,
1889
1952
  className: `sdk-seekbar-container sdk-mobile-seekbar${Y ? " sdk-ad-mode" : ""}`,
1890
- onMouseDown: X ? void 0 : oi,
1891
- onMouseMove: X ? void 0 : Ci,
1892
- onMouseLeave: X ? void 0 : Ei,
1893
- onTouchStart: X ? void 0 : Ti,
1894
- onKeyDown: X ? void 0 : Fi,
1953
+ onMouseDown: X ? void 0 : fi,
1954
+ onMouseMove: X ? void 0 : ki,
1955
+ onMouseLeave: X ? void 0 : Mi,
1956
+ onTouchStart: X ? void 0 : ji,
1957
+ onKeyDown: X ? void 0 : Vi,
1895
1958
  style: {
1896
1959
  pointerEvents: X ? "none" : void 0,
1897
1960
  touchAction: "none"
@@ -1899,15 +1962,15 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1899
1962
  children: Y ? /* @__PURE__ */ f("div", {
1900
1963
  className: "sdk-ad-progress-fill",
1901
1964
  style: { width: (() => {
1902
- let e = F ? F.getCurrentTime() : L, t = Un(e);
1965
+ let e = F ? F.getCurrentTime() : L, t = Yn(e);
1903
1966
  return t ? `${Math.min(100, Math.max(0, (e - t.start) / (t.end - t.start) * 100))}%` : "0%";
1904
1967
  })() }
1905
1968
  }) : /* @__PURE__ */ p(te, { children: [
1906
1969
  /* @__PURE__ */ f("div", {
1907
1970
  className: "sdk-seekbar-buffered",
1908
- style: { width: `${Zt ? (F && F.getBufferedRanges()[0]?.end || 0) / Zt * 100 : 0}%` }
1971
+ style: { width: `${rn ? (F && F.getBufferedRanges()[0]?.end || 0) / rn * 100 : 0}%` }
1909
1972
  }),
1910
- B > 0 && R.filter((e) => !Sn.has(e.startTime)).map((e, t) => /* @__PURE__ */ f("div", {
1973
+ B > 0 && R.filter((e) => !On.has(e.startTime)).map((e, t) => /* @__PURE__ */ f("div", {
1911
1974
  className: "sdk-seekbar-adbreak",
1912
1975
  style: {
1913
1976
  left: `${V(e.startTime) / B * 100}%`,
@@ -1917,7 +1980,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1917
1980
  /* @__PURE__ */ f("div", {
1918
1981
  className: "sdk-seekbar-progress",
1919
1982
  style: {
1920
- width: q ? `${Oi > 0 ? $ / Oi * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
1983
+ width: q ? `${Pi > 0 ? $ / Pi * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
1921
1984
  background: "#ffffff",
1922
1985
  boxShadow: "none"
1923
1986
  },
@@ -1939,38 +2002,38 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1939
2002
  className: "sdk-mobile-controls-row",
1940
2003
  children: [!Y && /* @__PURE__ */ f("span", {
1941
2004
  className: "sdk-time-display",
1942
- children: q ? `${Q($)} / ${Q(Oi)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
2005
+ children: q ? `${Q($)} / ${Q(Pi)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
1943
2006
  }), /* @__PURE__ */ p("div", {
1944
2007
  className: "sdk-mobile-bottom-icons",
1945
2008
  children: [
1946
2009
  I.enableKeyMoments && W.length > 0 && !Y && /* @__PURE__ */ f("button", {
1947
- className: `sdk-mobile-icon-btn${ur ? " active" : ""}`,
2010
+ className: `sdk-mobile-icon-btn${gr ? " active" : ""}`,
1948
2011
  onClick: () => {
1949
- dr(!ur);
2012
+ _r(!gr);
1950
2013
  },
1951
- "aria-label": ur ? "Hide chapters" : "Show chapters",
1952
- "aria-pressed": ur,
1953
- children: /* @__PURE__ */ f(be, {
2014
+ "aria-label": gr ? "Hide chapters" : "Show chapters",
2015
+ "aria-pressed": gr,
2016
+ children: /* @__PURE__ */ f(ve, {
1954
2017
  size: 18,
1955
2018
  "aria-hidden": "true"
1956
2019
  })
1957
2020
  }),
1958
- I.enableSubtitles && !Y && $n.some((e) => !e.isNative) && /* @__PURE__ */ p("div", {
2021
+ I.enableSubtitles && !Y && ar.some((e) => !e.isNative) && /* @__PURE__ */ p("div", {
1959
2022
  className: "sdk-menu-container",
1960
2023
  children: [/* @__PURE__ */ f("button", {
1961
2024
  className: `sdk-mobile-icon-btn${U === "off" ? "" : " active"}`,
1962
2025
  onClick: () => {
1963
- Ii("subtitles");
2026
+ Hi("subtitles");
1964
2027
  },
1965
2028
  "aria-label": "Captions",
1966
2029
  "aria-haspopup": "listbox",
1967
2030
  "aria-expanded": G === "subtitles",
1968
- children: /* @__PURE__ */ f(me, {
2031
+ children: /* @__PURE__ */ f(fe, {
1969
2032
  size: 18,
1970
2033
  "aria-hidden": "true"
1971
2034
  })
1972
2035
  }), G === "subtitles" && /* @__PURE__ */ p("div", {
1973
- ref: Li,
2036
+ ref: Ui,
1974
2037
  className: "sdk-dropup-menu",
1975
2038
  role: "listbox",
1976
2039
  "aria-label": "Captions",
@@ -1985,21 +2048,21 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1985
2048
  "aria-selected": U === "off",
1986
2049
  tabIndex: 0,
1987
2050
  className: `sdk-dropup-item ${U === "off" ? "active" : ""}`,
1988
- onClick: () => ui("off"),
1989
- onKeyDown: Ni(() => ui("off")),
1990
- children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(h, {
2051
+ onClick: () => gi("off"),
2052
+ onKeyDown: zi(() => gi("off")),
2053
+ children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(_, {
1991
2054
  size: 12,
1992
2055
  "aria-hidden": "true"
1993
2056
  })]
1994
2057
  }),
1995
- $n.map((e) => /* @__PURE__ */ p("div", {
2058
+ ar.map((e) => /* @__PURE__ */ p("div", {
1996
2059
  role: "option",
1997
2060
  "aria-selected": U === e.id,
1998
2061
  tabIndex: 0,
1999
2062
  className: `sdk-dropup-item ${U === e.id ? "active" : ""}`,
2000
- onClick: () => ui(e.id),
2001
- onKeyDown: Ni(() => ui(e.id)),
2002
- children: [/* @__PURE__ */ f("span", { children: y(e) }), U === e.id && /* @__PURE__ */ f(h, {
2063
+ onClick: () => gi(e.id),
2064
+ onKeyDown: zi(() => gi(e.id)),
2065
+ children: [/* @__PURE__ */ f("span", { children: b(e) }), U === e.id && /* @__PURE__ */ f(_, {
2003
2066
  size: 12,
2004
2067
  "aria-hidden": "true"
2005
2068
  })]
@@ -2007,22 +2070,22 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2007
2070
  ]
2008
2071
  })]
2009
2072
  }),
2010
- I.allowMultipleAudio && tr.length > 1 && !Y && /* @__PURE__ */ p("div", {
2073
+ I.allowMultipleAudio && sr.length > 1 && !Y && /* @__PURE__ */ p("div", {
2011
2074
  className: "sdk-menu-container",
2012
2075
  children: [/* @__PURE__ */ f("button", {
2013
2076
  className: `sdk-mobile-icon-btn${G === "audio" ? " active" : ""}`,
2014
2077
  onClick: () => {
2015
- Ii("audio");
2078
+ Hi("audio");
2016
2079
  },
2017
2080
  "aria-label": "Audio track",
2018
2081
  "aria-haspopup": "listbox",
2019
2082
  "aria-expanded": G === "audio",
2020
- children: /* @__PURE__ */ f(ye, {
2083
+ children: /* @__PURE__ */ f(_e, {
2021
2084
  size: 18,
2022
2085
  "aria-hidden": "true"
2023
2086
  })
2024
2087
  }), G === "audio" && /* @__PURE__ */ p("div", {
2025
- ref: Li,
2088
+ ref: Ui,
2026
2089
  className: "sdk-dropup-menu",
2027
2090
  role: "listbox",
2028
2091
  "aria-label": "Audio track",
@@ -2030,18 +2093,18 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2030
2093
  className: "sdk-dropup-header",
2031
2094
  "aria-hidden": "true",
2032
2095
  children: "Audio Track"
2033
- }), tr.map((e) => /* @__PURE__ */ p("div", {
2096
+ }), sr.map((e) => /* @__PURE__ */ p("div", {
2034
2097
  role: "option",
2035
- "aria-selected": rr === e.id,
2098
+ "aria-selected": lr === e.id,
2036
2099
  tabIndex: 0,
2037
- className: `sdk-dropup-item ${rr === e.id ? "active" : ""}`,
2100
+ className: `sdk-dropup-item ${lr === e.id ? "active" : ""}`,
2038
2101
  onClick: () => {
2039
- F?.setAudioTrack(e.id), ir(e.id), K("none"), hr(`Audio: ${y(e)}`);
2102
+ F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
2040
2103
  },
2041
- onKeyDown: Ni(() => {
2042
- F?.setAudioTrack(e.id), ir(e.id), K("none"), hr(`Audio: ${y(e)}`);
2104
+ onKeyDown: zi(() => {
2105
+ F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
2043
2106
  }),
2044
- children: [/* @__PURE__ */ f("span", { children: y(e) }), rr === e.id && /* @__PURE__ */ f(h, {
2107
+ children: [/* @__PURE__ */ f("span", { children: b(e) }), lr === e.id && /* @__PURE__ */ f(_, {
2045
2108
  size: 12,
2046
2109
  "aria-hidden": "true"
2047
2110
  })]
@@ -2053,17 +2116,17 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2053
2116
  children: [/* @__PURE__ */ f("button", {
2054
2117
  className: `sdk-mobile-icon-btn${G === "speed" ? " active" : ""}`,
2055
2118
  onClick: () => {
2056
- Ii("speed");
2119
+ Hi("speed");
2057
2120
  },
2058
2121
  "aria-label": "Playback speed",
2059
2122
  "aria-haspopup": "listbox",
2060
2123
  "aria-expanded": G === "speed",
2061
- children: /* @__PURE__ */ f(ve, {
2124
+ children: /* @__PURE__ */ f(ge, {
2062
2125
  size: 18,
2063
2126
  "aria-hidden": "true"
2064
2127
  })
2065
2128
  }), G === "speed" && /* @__PURE__ */ p("div", {
2066
- ref: Li,
2129
+ ref: Ui,
2067
2130
  className: "sdk-dropup-menu",
2068
2131
  role: "listbox",
2069
2132
  "aria-label": "Playback speed",
@@ -2080,12 +2143,12 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2080
2143
  2
2081
2144
  ].map((e) => /* @__PURE__ */ p("div", {
2082
2145
  role: "option",
2083
- "aria-selected": cr === e,
2146
+ "aria-selected": mr === e,
2084
2147
  tabIndex: 0,
2085
- className: `sdk-dropup-item ${cr === e ? "active" : ""}`,
2086
- onClick: () => ci(e),
2087
- onKeyDown: Ni(() => ci(e)),
2088
- children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }), cr === e && /* @__PURE__ */ f(h, {
2148
+ className: `sdk-dropup-item ${mr === e ? "active" : ""}`,
2149
+ onClick: () => mi(e),
2150
+ onKeyDown: zi(() => mi(e)),
2151
+ children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }), mr === e && /* @__PURE__ */ f(_, {
2089
2152
  size: 12,
2090
2153
  "aria-hidden": "true"
2091
2154
  })]
@@ -2095,19 +2158,19 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2095
2158
  I.enableQuality && !Y && /* @__PURE__ */ p("div", {
2096
2159
  className: "sdk-menu-container",
2097
2160
  children: [/* @__PURE__ */ f("button", {
2098
- className: `sdk-mobile-icon-btn${Jn.id === -1 ? "" : " active"}`,
2161
+ className: `sdk-mobile-icon-btn${er.id === -1 ? "" : " active"}`,
2099
2162
  onClick: () => {
2100
- Ii("quality");
2163
+ Hi("quality");
2101
2164
  },
2102
2165
  "aria-label": "Video quality",
2103
2166
  "aria-haspopup": "listbox",
2104
2167
  "aria-expanded": G === "quality",
2105
- children: /* @__PURE__ */ f(Fe, {
2168
+ children: /* @__PURE__ */ f(Ne, {
2106
2169
  size: 18,
2107
2170
  "aria-hidden": "true"
2108
2171
  })
2109
2172
  }), G === "quality" && /* @__PURE__ */ p("div", {
2110
- ref: Li,
2173
+ ref: Ui,
2111
2174
  className: "sdk-dropup-menu large",
2112
2175
  role: "listbox",
2113
2176
  "aria-label": "Video quality",
@@ -2115,36 +2178,36 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2115
2178
  className: "sdk-dropup-header",
2116
2179
  "aria-hidden": "true",
2117
2180
  children: "Quality"
2118
- }), Kn.map((e) => /* @__PURE__ */ p("div", {
2181
+ }), Qn.map((e) => /* @__PURE__ */ p("div", {
2119
2182
  role: "option",
2120
- "aria-selected": Jn.id === e.id,
2183
+ "aria-selected": er.id === e.id,
2121
2184
  tabIndex: 0,
2122
- className: `sdk-dropup-item ${Jn.id === e.id ? "active" : ""}`,
2123
- onClick: () => li(e.id),
2124
- onKeyDown: Ni(() => li(e.id)),
2125
- children: [/* @__PURE__ */ f("span", { children: e.label }), Jn.id === e.id && /* @__PURE__ */ f(h, {
2185
+ className: `sdk-dropup-item ${er.id === e.id ? "active" : ""}`,
2186
+ onClick: () => hi(e.id),
2187
+ onKeyDown: zi(() => hi(e.id)),
2188
+ children: [/* @__PURE__ */ f("span", { children: e.label }), er.id === e.id && /* @__PURE__ */ f(_, {
2126
2189
  size: 12,
2127
2190
  "aria-hidden": "true"
2128
2191
  })]
2129
2192
  }, e.id))]
2130
2193
  })]
2131
2194
  }),
2132
- x && x.length > 1 && !Y && /* @__PURE__ */ p("div", {
2195
+ S && S.length > 1 && !Y && /* @__PURE__ */ p("div", {
2133
2196
  className: "sdk-menu-container",
2134
2197
  children: [/* @__PURE__ */ f("button", {
2135
2198
  className: `sdk-mobile-icon-btn${G === "sources" ? " active" : ""}`,
2136
2199
  onClick: () => {
2137
- Ii("sources");
2200
+ Hi("sources");
2138
2201
  },
2139
2202
  "aria-label": "Select source",
2140
2203
  "aria-haspopup": "listbox",
2141
2204
  "aria-expanded": G === "sources",
2142
- children: /* @__PURE__ */ f(Ie, {
2205
+ children: /* @__PURE__ */ f(Pe, {
2143
2206
  size: 18,
2144
2207
  "aria-hidden": "true"
2145
2208
  })
2146
2209
  }), G === "sources" && /* @__PURE__ */ p("div", {
2147
- ref: Li,
2210
+ ref: Ui,
2148
2211
  className: "sdk-dropup-menu",
2149
2212
  role: "listbox",
2150
2213
  "aria-label": "Select source",
@@ -2152,14 +2215,14 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2152
2215
  className: "sdk-dropup-header",
2153
2216
  "aria-hidden": "true",
2154
2217
  children: "Source"
2155
- }), x.map((e, t) => /* @__PURE__ */ p("div", {
2218
+ }), S.map((e, t) => /* @__PURE__ */ p("div", {
2156
2219
  role: "option",
2157
- "aria-selected": S === t,
2220
+ "aria-selected": st === t,
2158
2221
  tabIndex: 0,
2159
- className: `sdk-dropup-item ${S === t ? "active" : ""}`,
2160
- onClick: () => di(t),
2161
- onKeyDown: Ni(() => di(t)),
2162
- children: [/* @__PURE__ */ f("span", { children: e.label }), S === t && /* @__PURE__ */ f(h, {
2222
+ className: `sdk-dropup-item ${st === t ? "active" : ""}`,
2223
+ onClick: () => _i(t),
2224
+ onKeyDown: zi(() => _i(t)),
2225
+ children: [/* @__PURE__ */ f("span", { children: e.label }), st === t && /* @__PURE__ */ f(_, {
2163
2226
  size: 12,
2164
2227
  "aria-hidden": "true"
2165
2228
  })]
@@ -2168,10 +2231,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2168
2231
  }),
2169
2232
  /* @__PURE__ */ f("button", {
2170
2233
  className: "sdk-mobile-icon-btn",
2171
- onClick: gi,
2172
- "aria-label": on || cn ? "Exit fullscreen" : "Enter fullscreen",
2173
- "aria-pressed": on || cn,
2174
- children: f(on ? g : xe, {
2234
+ onClick: Si,
2235
+ "aria-label": fn || mn ? "Exit fullscreen" : "Enter fullscreen",
2236
+ "aria-pressed": fn || mn,
2237
+ children: f(fn ? be : ye, {
2175
2238
  size: 18,
2176
2239
  "aria-hidden": "true"
2177
2240
  })
@@ -2183,28 +2246,28 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2183
2246
  })
2184
2247
  ] })]
2185
2248
  }),
2186
- !fn && /* @__PURE__ */ p("div", {
2249
+ !vn && /* @__PURE__ */ p("div", {
2187
2250
  className: "sdk-controls-overlay",
2188
2251
  onClick: (e) => {
2189
- Y || e.target.closest(".sdk-desktop-header") || e.target.closest(".sdk-desktop-center-controls") || e.target.closest(".sdk-desktop-bottom") || ii();
2252
+ Y || e.target.closest(".sdk-desktop-header") || e.target.closest(".sdk-desktop-center-controls") || e.target.closest(".sdk-desktop-bottom") || ui();
2190
2253
  },
2191
2254
  children: [/* @__PURE__ */ p("div", {
2192
2255
  className: "sdk-desktop-header",
2193
2256
  children: [/* @__PURE__ */ p("div", {
2194
2257
  className: "sdk-desktop-header-left",
2195
- children: [(on || cn) && /* @__PURE__ */ f("button", {
2258
+ children: [(fn || mn) && /* @__PURE__ */ f("button", {
2196
2259
  className: "sdk-desktop-back-btn",
2197
2260
  onClick: (e) => {
2198
- e.stopPropagation(), gi();
2261
+ e.stopPropagation(), Si();
2199
2262
  },
2200
2263
  "aria-label": "Exit fullscreen",
2201
- children: /* @__PURE__ */ f(ge, {
2264
+ children: /* @__PURE__ */ f(me, {
2202
2265
  size: 22,
2203
2266
  "aria-hidden": "true"
2204
2267
  })
2205
- }), (Xe || Vr) && /* @__PURE__ */ f("span", {
2268
+ }), (x || qr) && /* @__PURE__ */ f("span", {
2206
2269
  className: "sdk-desktop-title",
2207
- children: Xe || Vr
2270
+ children: x || qr
2208
2271
  })]
2209
2272
  }), /* @__PURE__ */ p("div", {
2210
2273
  className: "sdk-desktop-header-right",
@@ -2212,13 +2275,13 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2212
2275
  I.enableChromecast && !Y && /* @__PURE__ */ f("button", {
2213
2276
  className: "sdk-desktop-hdr-btn",
2214
2277
  onClick: (e) => {
2215
- e.stopPropagation(), xi();
2278
+ e.stopPropagation(), Di();
2216
2279
  },
2217
2280
  "data-tooltip": q ? `Casting to ${q} — click to disconnect` : "Cast to device",
2218
2281
  "aria-label": q ? `Stop casting to ${q}` : "Cast to device",
2219
2282
  "aria-pressed": !!q,
2220
2283
  style: { color: q ? "#3b82f6" : "" },
2221
- children: /* @__PURE__ */ f(he, {
2284
+ children: /* @__PURE__ */ f(pe, {
2222
2285
  size: 20,
2223
2286
  fill: q ? "currentColor" : "none",
2224
2287
  "aria-hidden": "true"
@@ -2227,29 +2290,29 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2227
2290
  q && /* @__PURE__ */ p("span", {
2228
2291
  className: "sdk-cast-indicator",
2229
2292
  "aria-hidden": "true",
2230
- children: [/* @__PURE__ */ f(he, {
2293
+ children: [/* @__PURE__ */ f(pe, {
2231
2294
  size: 10,
2232
2295
  fill: "currentColor",
2233
2296
  "aria-hidden": "true"
2234
2297
  }), q]
2235
2298
  }),
2236
- I.allowAirplay && wr && /* @__PURE__ */ f("button", {
2299
+ I.allowAirplay && Ar && /* @__PURE__ */ f("button", {
2237
2300
  className: "sdk-desktop-hdr-btn",
2238
2301
  onClick: (e) => {
2239
- e.stopPropagation(), Si();
2302
+ e.stopPropagation(), Oi();
2240
2303
  },
2241
- "data-tooltip": Er ? `AirPlay to ${Or || "device"} — click to disconnect` : "AirPlay to device",
2242
- "aria-label": Er ? `Stop AirPlay to ${Or || "device"}` : "AirPlay to device",
2243
- "aria-pressed": Er,
2244
- style: { color: Er ? oe : "" },
2245
- children: /* @__PURE__ */ f(pe, {
2304
+ "data-tooltip": Mr ? `AirPlay to ${Pr || "device"} — click to disconnect` : "AirPlay to device",
2305
+ "aria-label": Mr ? `Stop AirPlay to ${Pr || "device"}` : "AirPlay to device",
2306
+ "aria-pressed": Mr,
2307
+ style: { color: Mr ? h : "" },
2308
+ children: /* @__PURE__ */ f(de, {
2246
2309
  size: 20,
2247
2310
  "aria-hidden": "true"
2248
2311
  })
2249
2312
  })
2250
2313
  ]
2251
2314
  })]
2252
- }), fe && /* @__PURE__ */ p(te, { children: [
2315
+ }), g && /* @__PURE__ */ p(te, { children: [
2253
2316
  /* @__PURE__ */ p("div", {
2254
2317
  className: "sdk-desktop-center-controls",
2255
2318
  style: { pointerEvents: "none" },
@@ -2271,7 +2334,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2271
2334
  alignItems: "center",
2272
2335
  justifyContent: "center"
2273
2336
  },
2274
- children: [/* @__PURE__ */ f(Te, {
2337
+ children: [/* @__PURE__ */ f(Ce, {
2275
2338
  size: 30,
2276
2339
  "aria-hidden": "true"
2277
2340
  }), /* @__PURE__ */ f("span", {
@@ -2285,17 +2348,17 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2285
2348
  className: "sdk-desktop-play-btn",
2286
2349
  style: { pointerEvents: "auto" },
2287
2350
  onClick: (e) => {
2288
- e.stopPropagation(), ii();
2351
+ e.stopPropagation(), ui();
2289
2352
  },
2290
- "aria-label": _n ? "Replay" : Di ? "Pause" : "Play",
2291
- children: _n ? /* @__PURE__ */ f(Te, {
2353
+ "aria-label": Cn ? "Replay" : Ni ? "Pause" : "Play",
2354
+ children: Cn ? /* @__PURE__ */ f(Ce, {
2292
2355
  size: 38,
2293
2356
  "aria-hidden": "true"
2294
- }) : Di ? /* @__PURE__ */ f(Se, {
2357
+ }) : Ni ? /* @__PURE__ */ f(v, {
2295
2358
  size: 38,
2296
2359
  fill: "currentColor",
2297
2360
  "aria-hidden": "true"
2298
- }) : /* @__PURE__ */ f(we, {
2361
+ }) : /* @__PURE__ */ f(Se, {
2299
2362
  size: 38,
2300
2363
  fill: "currentColor",
2301
2364
  style: { marginLeft: "4px" },
@@ -2319,7 +2382,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2319
2382
  alignItems: "center",
2320
2383
  justifyContent: "center"
2321
2384
  },
2322
- children: [/* @__PURE__ */ f(Ee, {
2385
+ children: [/* @__PURE__ */ f(we, {
2323
2386
  size: 30,
2324
2387
  "aria-hidden": "true"
2325
2388
  }), /* @__PURE__ */ f("span", {
@@ -2331,7 +2394,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2331
2394
  })
2332
2395
  ]
2333
2396
  }),
2334
- I.enableKeyMoments && ur && W.length > 0 && Ze === "panel" && /* @__PURE__ */ p("div", {
2397
+ I.enableKeyMoments && gr && W.length > 0 && $e === "panel" && /* @__PURE__ */ p("div", {
2335
2398
  className: "sdk-chapters-panel",
2336
2399
  onClick: (e) => e.stopPropagation(),
2337
2400
  children: [/* @__PURE__ */ f("div", {
@@ -2343,19 +2406,19 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2343
2406
  }), /* @__PURE__ */ f("div", {
2344
2407
  className: "sdk-chapters-panel-list",
2345
2408
  children: W.map((e, t) => {
2346
- let n = ar.index === t;
2409
+ let n = dr.index === t;
2347
2410
  return /* @__PURE__ */ p("div", {
2348
2411
  role: "button",
2349
2412
  tabIndex: 0,
2350
2413
  className: `sdk-chapters-panel-item${n ? " active" : ""}`,
2351
2414
  "aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
2352
2415
  "aria-current": n ? "true" : void 0,
2353
- onClick: () => fi(e.startTime, e),
2354
- onKeyDown: Pi(() => fi(e.startTime, e)),
2416
+ onClick: () => vi(e.startTime, e),
2417
+ onKeyDown: Bi(() => vi(e.startTime, e)),
2355
2418
  children: [/* @__PURE__ */ f("div", {
2356
2419
  className: "sdk-chapters-panel-thumb",
2357
- children: fr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
2358
- src: fr[t] || e.thumbnail,
2420
+ children: vr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
2421
+ src: vr[t] || e.thumbnail,
2359
2422
  alt: "",
2360
2423
  "aria-hidden": "true",
2361
2424
  style: {
@@ -2364,7 +2427,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2364
2427
  objectFit: "cover",
2365
2428
  display: "block"
2366
2429
  }
2367
- }) : /* @__PURE__ */ f(be, {
2430
+ }) : /* @__PURE__ */ f(ve, {
2368
2431
  size: 18,
2369
2432
  "aria-hidden": "true",
2370
2433
  style: { color: "rgba(255,255,255,0.3)" }
@@ -2394,10 +2457,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2394
2457
  /* @__PURE__ */ p("div", {
2395
2458
  className: "sdk-desktop-bottom",
2396
2459
  children: [
2397
- I.enableKeyMoments && ur && W.length > 0 && Ze === "strip" && /* @__PURE__ */ f("div", {
2460
+ I.enableKeyMoments && gr && W.length > 0 && $e === "strip" && /* @__PURE__ */ f("div", {
2398
2461
  className: "sdk-desktop-chapters-strip",
2399
2462
  children: W.map((e, t) => {
2400
- let n = ar.index === t;
2463
+ let n = dr.index === t;
2401
2464
  return /* @__PURE__ */ p("div", {
2402
2465
  role: "button",
2403
2466
  tabIndex: 0,
@@ -2405,14 +2468,14 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2405
2468
  "aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
2406
2469
  "aria-current": n ? "true" : void 0,
2407
2470
  onClick: (t) => {
2408
- t.stopPropagation(), fi(e.startTime, e);
2471
+ t.stopPropagation(), vi(e.startTime, e);
2409
2472
  },
2410
- onKeyDown: Pi(() => fi(e.startTime, e)),
2473
+ onKeyDown: Bi(() => vi(e.startTime, e)),
2411
2474
  children: [
2412
2475
  /* @__PURE__ */ f("div", {
2413
2476
  className: "sdk-desktop-chapter-thumb",
2414
- children: fr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
2415
- src: fr[t] || e.thumbnail,
2477
+ children: vr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
2478
+ src: vr[t] || e.thumbnail,
2416
2479
  alt: "",
2417
2480
  "aria-hidden": "true",
2418
2481
  style: {
@@ -2421,7 +2484,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2421
2484
  objectFit: "cover",
2422
2485
  display: "block"
2423
2486
  }
2424
- }) : /* @__PURE__ */ f(be, {
2487
+ }) : /* @__PURE__ */ f(ve, {
2425
2488
  size: 18,
2426
2489
  "aria-hidden": "true",
2427
2490
  style: { color: "rgba(255,255,255,0.35)" }
@@ -2450,24 +2513,24 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2450
2513
  "aria-valuetext": X ? void 0 : `${Q(V(J === null ? L : J))} of ${Q(B)}`,
2451
2514
  tabIndex: X ? void 0 : 0,
2452
2515
  className: `sdk-seekbar-container sdk-desktop-seekbar${Y ? " sdk-ad-mode" : ""}`,
2453
- onMouseDown: X ? void 0 : oi,
2454
- onMouseMove: X ? void 0 : Ci,
2455
- onMouseLeave: X ? void 0 : Ei,
2456
- onTouchStart: X ? void 0 : Ti,
2457
- onKeyDown: X ? void 0 : Fi,
2516
+ onMouseDown: X ? void 0 : fi,
2517
+ onMouseMove: X ? void 0 : ki,
2518
+ onMouseLeave: X ? void 0 : Mi,
2519
+ onTouchStart: X ? void 0 : ji,
2520
+ onKeyDown: X ? void 0 : Vi,
2458
2521
  style: { pointerEvents: X ? "none" : void 0 },
2459
2522
  children: Y ? /* @__PURE__ */ f("div", {
2460
2523
  className: "sdk-ad-progress-fill",
2461
2524
  style: { width: (() => {
2462
- let e = F ? F.getCurrentTime() : L, t = Un(e);
2525
+ let e = F ? F.getCurrentTime() : L, t = Yn(e);
2463
2526
  return t ? `${Math.min(100, Math.max(0, (e - t.start) / (t.end - t.start) * 100))}%` : "0%";
2464
2527
  })() }
2465
2528
  }) : /* @__PURE__ */ p(te, { children: [
2466
2529
  /* @__PURE__ */ f("div", {
2467
2530
  className: "sdk-seekbar-buffered",
2468
- style: { width: `${Zt ? (F && F.getBufferedRanges()[0]?.end || 0) / Zt * 100 : 0}%` }
2531
+ style: { width: `${rn ? (F && F.getBufferedRanges()[0]?.end || 0) / rn * 100 : 0}%` }
2469
2532
  }),
2470
- B > 0 && R.filter((e) => !Sn.has(e.startTime)).map((e, t) => /* @__PURE__ */ f("div", {
2533
+ B > 0 && R.filter((e) => !On.has(e.startTime)).map((e, t) => /* @__PURE__ */ f("div", {
2471
2534
  className: "sdk-seekbar-adbreak",
2472
2535
  style: {
2473
2536
  left: `${V(e.startTime) / B * 100}%`,
@@ -2477,7 +2540,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2477
2540
  /* @__PURE__ */ f("div", {
2478
2541
  className: "sdk-seekbar-progress",
2479
2542
  style: {
2480
- width: q ? `${Oi > 0 ? $ / Oi * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
2543
+ width: q ? `${Pi > 0 ? $ / Pi * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
2481
2544
  background: "#ffffff",
2482
2545
  boxShadow: "none"
2483
2546
  },
@@ -2487,14 +2550,14 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2487
2550
  className: "sdk-seekbar-chapter-marker sdk-desktop-chapter-dot",
2488
2551
  style: { left: `${V(e.startTime) / B * 100}%` }
2489
2552
  }, t)),
2490
- Ar !== null && Ir && /* @__PURE__ */ p("div", {
2553
+ Ir !== null && Hr && /* @__PURE__ */ p("div", {
2491
2554
  className: "sdk-thumbnail-tooltip",
2492
- style: { left: `${Mr}px` },
2555
+ style: { left: `${Rr}px` },
2493
2556
  children: [
2494
2557
  /* @__PURE__ */ f("div", {
2495
2558
  className: "sdk-thumbnail-preview",
2496
2559
  children: /* @__PURE__ */ f("img", {
2497
- src: Ir,
2560
+ src: Hr,
2498
2561
  alt: "preview",
2499
2562
  style: {
2500
2563
  width: "100%",
@@ -2505,13 +2568,13 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2505
2568
  }
2506
2569
  })
2507
2570
  }),
2508
- Rr && /* @__PURE__ */ f("div", {
2571
+ Wr && /* @__PURE__ */ f("div", {
2509
2572
  className: "sdk-thumbnail-chapter-name",
2510
- children: Rr.title
2573
+ children: Wr.title
2511
2574
  }),
2512
2575
  /* @__PURE__ */ f("div", {
2513
2576
  className: "sdk-thumbnail-time-label",
2514
- children: Q(V(Pr))
2577
+ children: Q(V(Br))
2515
2578
  })
2516
2579
  ]
2517
2580
  })
@@ -2523,31 +2586,31 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2523
2586
  className: "sdk-desktop-left-controls",
2524
2587
  children: [!Y && /* @__PURE__ */ f("div", {
2525
2588
  className: "sdk-time-display",
2526
- children: q ? `${Q($)} / ${Q(Oi)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
2527
- }), Qe === "slider" && /* @__PURE__ */ p("div", {
2589
+ children: q ? `${Q($)} / ${Q(Pi)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
2590
+ }), et === "slider" && /* @__PURE__ */ p("div", {
2528
2591
  className: "sdk-volume-control",
2529
2592
  children: [/* @__PURE__ */ f("button", {
2530
2593
  className: "sdk-desktop-icon-btn",
2531
2594
  onClick: (e) => {
2532
- e.stopPropagation(), si();
2595
+ e.stopPropagation(), pi();
2533
2596
  },
2534
- "data-tooltip": Ai ? "Unmute" : "Mute",
2535
- "aria-label": Ai ? "Unmute" : "Mute",
2536
- "aria-pressed": Ai,
2537
- children: Mi()
2597
+ "data-tooltip": Ii ? "Unmute" : "Mute",
2598
+ "aria-label": Ii ? "Unmute" : "Mute",
2599
+ "aria-pressed": Ii,
2600
+ children: Ri()
2538
2601
  }), /* @__PURE__ */ f("input", {
2539
2602
  type: "range",
2540
2603
  className: "sdk-volume-slider",
2541
2604
  min: 0,
2542
2605
  max: 1,
2543
2606
  step: .02,
2544
- value: Ai ? 0 : ki,
2607
+ value: Ii ? 0 : Fi,
2545
2608
  "aria-label": "Volume",
2546
- "aria-valuetext": Ai ? "Muted" : `${Math.round(ki * 100)}%`,
2547
- style: { "--vol-pct": Math.round((Ai ? 0 : ki) * 100) },
2609
+ "aria-valuetext": Ii ? "Muted" : `${Math.round(Fi * 100)}%`,
2610
+ style: { "--vol-pct": Math.round((Ii ? 0 : Fi) * 100) },
2548
2611
  onChange: (e) => {
2549
2612
  let t = parseFloat(e.target.value);
2550
- q ? (F?.casting.remoteSetVolume(t), t > 0 && F?.casting.remoteSetMute(!1)) : (F?.setVolume(t), t > 0 && tn && F?.setMute(!1));
2613
+ q ? (F?.casting.remoteSetVolume(t), t > 0 && F?.casting.remoteSetMute(!1)) : (F?.setVolume(t), t > 0 && cn && F?.setMute(!1));
2551
2614
  },
2552
2615
  onClick: (e) => e.stopPropagation()
2553
2616
  })]
@@ -2556,35 +2619,35 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2556
2619
  className: "sdk-desktop-right-icons",
2557
2620
  children: [
2558
2621
  I.enableKeyMoments && W.length > 0 && !Y && /* @__PURE__ */ f("button", {
2559
- className: `sdk-desktop-icon-btn${ur ? " active" : ""}`,
2622
+ className: `sdk-desktop-icon-btn${gr ? " active" : ""}`,
2560
2623
  onClick: (e) => {
2561
- e.stopPropagation(), dr(!ur);
2624
+ e.stopPropagation(), _r(!gr);
2562
2625
  },
2563
2626
  "data-tooltip": "Key Moments",
2564
- "aria-label": ur ? "Hide chapters" : "Show chapters",
2565
- "aria-pressed": ur,
2566
- children: /* @__PURE__ */ f(be, {
2627
+ "aria-label": gr ? "Hide chapters" : "Show chapters",
2628
+ "aria-pressed": gr,
2629
+ children: /* @__PURE__ */ f(ve, {
2567
2630
  size: 20,
2568
2631
  "aria-hidden": "true"
2569
2632
  })
2570
2633
  }),
2571
- I.enableSubtitles && !Y && $n.some((e) => !e.isNative) && /* @__PURE__ */ p("div", {
2634
+ I.enableSubtitles && !Y && ar.some((e) => !e.isNative) && /* @__PURE__ */ p("div", {
2572
2635
  className: "sdk-menu-container",
2573
2636
  children: [/* @__PURE__ */ f("button", {
2574
2637
  className: `sdk-desktop-icon-btn${U === "off" ? "" : " active"}`,
2575
2638
  onClick: (e) => {
2576
- e.stopPropagation(), Ii("subtitles");
2639
+ e.stopPropagation(), Hi("subtitles");
2577
2640
  },
2578
2641
  "data-tooltip": "Captions",
2579
2642
  "aria-label": "Captions",
2580
2643
  "aria-haspopup": "listbox",
2581
2644
  "aria-expanded": G === "subtitles",
2582
- children: /* @__PURE__ */ f(me, {
2645
+ children: /* @__PURE__ */ f(fe, {
2583
2646
  size: 20,
2584
2647
  "aria-hidden": "true"
2585
2648
  })
2586
2649
  }), G === "subtitles" && /* @__PURE__ */ p("div", {
2587
- ref: Li,
2650
+ ref: Ui,
2588
2651
  className: "sdk-dropup-menu",
2589
2652
  role: "listbox",
2590
2653
  "aria-label": "Captions",
@@ -2599,21 +2662,21 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2599
2662
  "aria-selected": U === "off",
2600
2663
  tabIndex: 0,
2601
2664
  className: `sdk-dropup-item ${U === "off" ? "active" : ""}`,
2602
- onClick: () => ui("off"),
2603
- onKeyDown: Ni(() => ui("off")),
2604
- children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(h, {
2665
+ onClick: () => gi("off"),
2666
+ onKeyDown: zi(() => gi("off")),
2667
+ children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(_, {
2605
2668
  size: 12,
2606
2669
  "aria-hidden": "true"
2607
2670
  })]
2608
2671
  }),
2609
- $n.map((e) => /* @__PURE__ */ p("div", {
2672
+ ar.map((e) => /* @__PURE__ */ p("div", {
2610
2673
  role: "option",
2611
2674
  "aria-selected": U === e.id,
2612
2675
  tabIndex: 0,
2613
2676
  className: `sdk-dropup-item ${U === e.id ? "active" : ""}`,
2614
- onClick: () => ui(e.id),
2615
- onKeyDown: Ni(() => ui(e.id)),
2616
- children: [/* @__PURE__ */ f("span", { children: y(e) }), U === e.id && /* @__PURE__ */ f(h, {
2677
+ onClick: () => gi(e.id),
2678
+ onKeyDown: zi(() => gi(e.id)),
2679
+ children: [/* @__PURE__ */ f("span", { children: b(e) }), U === e.id && /* @__PURE__ */ f(_, {
2617
2680
  size: 12,
2618
2681
  "aria-hidden": "true"
2619
2682
  })]
@@ -2621,23 +2684,23 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2621
2684
  ]
2622
2685
  })]
2623
2686
  }),
2624
- I.allowMultipleAudio && tr.length > 1 && !Y && /* @__PURE__ */ p("div", {
2687
+ I.allowMultipleAudio && sr.length > 1 && !Y && /* @__PURE__ */ p("div", {
2625
2688
  className: "sdk-menu-container",
2626
2689
  children: [/* @__PURE__ */ f("button", {
2627
2690
  className: `sdk-desktop-icon-btn${G === "audio" ? " active" : ""}`,
2628
2691
  onClick: (e) => {
2629
- e.stopPropagation(), Ii("audio");
2692
+ e.stopPropagation(), Hi("audio");
2630
2693
  },
2631
2694
  "data-tooltip": "Audio Track",
2632
2695
  "aria-label": "Audio track",
2633
2696
  "aria-haspopup": "listbox",
2634
2697
  "aria-expanded": G === "audio",
2635
- children: /* @__PURE__ */ f(ye, {
2698
+ children: /* @__PURE__ */ f(_e, {
2636
2699
  size: 20,
2637
2700
  "aria-hidden": "true"
2638
2701
  })
2639
2702
  }), G === "audio" && /* @__PURE__ */ p("div", {
2640
- ref: Li,
2703
+ ref: Ui,
2641
2704
  className: "sdk-dropup-menu",
2642
2705
  role: "listbox",
2643
2706
  "aria-label": "Audio track",
@@ -2645,18 +2708,18 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2645
2708
  className: "sdk-dropup-header",
2646
2709
  "aria-hidden": "true",
2647
2710
  children: "Audio Track"
2648
- }), tr.map((e) => /* @__PURE__ */ p("div", {
2711
+ }), sr.map((e) => /* @__PURE__ */ p("div", {
2649
2712
  role: "option",
2650
- "aria-selected": rr === e.id,
2713
+ "aria-selected": lr === e.id,
2651
2714
  tabIndex: 0,
2652
- className: `sdk-dropup-item ${rr === e.id ? "active" : ""}`,
2715
+ className: `sdk-dropup-item ${lr === e.id ? "active" : ""}`,
2653
2716
  onClick: () => {
2654
- F?.setAudioTrack(e.id), ir(e.id), K("none"), hr(`Audio: ${y(e)}`);
2717
+ F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
2655
2718
  },
2656
- onKeyDown: Ni(() => {
2657
- F?.setAudioTrack(e.id), ir(e.id), K("none"), hr(`Audio: ${y(e)}`);
2719
+ onKeyDown: zi(() => {
2720
+ F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
2658
2721
  }),
2659
- children: [/* @__PURE__ */ f("span", { children: y(e) }), rr === e.id && /* @__PURE__ */ f(h, {
2722
+ children: [/* @__PURE__ */ f("span", { children: b(e) }), lr === e.id && /* @__PURE__ */ f(_, {
2660
2723
  size: 12,
2661
2724
  "aria-hidden": "true"
2662
2725
  })]
@@ -2668,18 +2731,18 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2668
2731
  children: [/* @__PURE__ */ f("button", {
2669
2732
  className: `sdk-desktop-icon-btn${G === "speed" ? " active" : ""}`,
2670
2733
  onClick: (e) => {
2671
- e.stopPropagation(), Ii("speed");
2734
+ e.stopPropagation(), Hi("speed");
2672
2735
  },
2673
2736
  "data-tooltip": "Playback Speed",
2674
2737
  "aria-label": "Playback speed",
2675
2738
  "aria-haspopup": "listbox",
2676
2739
  "aria-expanded": G === "speed",
2677
- children: /* @__PURE__ */ f(ve, {
2740
+ children: /* @__PURE__ */ f(ge, {
2678
2741
  size: 20,
2679
2742
  "aria-hidden": "true"
2680
2743
  })
2681
2744
  }), G === "speed" && /* @__PURE__ */ p("div", {
2682
- ref: Li,
2745
+ ref: Ui,
2683
2746
  className: "sdk-dropup-menu",
2684
2747
  role: "listbox",
2685
2748
  "aria-label": "Playback speed",
@@ -2696,12 +2759,12 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2696
2759
  2
2697
2760
  ].map((e) => /* @__PURE__ */ p("div", {
2698
2761
  role: "option",
2699
- "aria-selected": cr === e,
2762
+ "aria-selected": mr === e,
2700
2763
  tabIndex: 0,
2701
- className: `sdk-dropup-item ${cr === e ? "active" : ""}`,
2702
- onClick: () => ci(e),
2703
- onKeyDown: Ni(() => ci(e)),
2704
- children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }), cr === e && /* @__PURE__ */ f(h, {
2764
+ className: `sdk-dropup-item ${mr === e ? "active" : ""}`,
2765
+ onClick: () => mi(e),
2766
+ onKeyDown: zi(() => mi(e)),
2767
+ children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }), mr === e && /* @__PURE__ */ f(_, {
2705
2768
  size: 12,
2706
2769
  "aria-hidden": "true"
2707
2770
  })]
@@ -2711,20 +2774,20 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2711
2774
  I.enableQuality && !Y && /* @__PURE__ */ p("div", {
2712
2775
  className: "sdk-menu-container",
2713
2776
  children: [/* @__PURE__ */ f("button", {
2714
- className: `sdk-desktop-icon-btn${Jn.id === -1 ? "" : " active"}`,
2777
+ className: `sdk-desktop-icon-btn${er.id === -1 ? "" : " active"}`,
2715
2778
  onClick: (e) => {
2716
- e.stopPropagation(), Ii("quality");
2779
+ e.stopPropagation(), Hi("quality");
2717
2780
  },
2718
2781
  "data-tooltip": "Quality",
2719
2782
  "aria-label": "Video quality",
2720
2783
  "aria-haspopup": "listbox",
2721
2784
  "aria-expanded": G === "quality",
2722
- children: /* @__PURE__ */ f(Fe, {
2785
+ children: /* @__PURE__ */ f(Ne, {
2723
2786
  size: 20,
2724
2787
  "aria-hidden": "true"
2725
2788
  })
2726
2789
  }), G === "quality" && /* @__PURE__ */ p("div", {
2727
- ref: Li,
2790
+ ref: Ui,
2728
2791
  className: "sdk-dropup-menu large",
2729
2792
  role: "listbox",
2730
2793
  "aria-label": "Video quality",
@@ -2732,37 +2795,37 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2732
2795
  className: "sdk-dropup-header",
2733
2796
  "aria-hidden": "true",
2734
2797
  children: "Quality"
2735
- }), Kn.map((e) => /* @__PURE__ */ p("div", {
2798
+ }), Qn.map((e) => /* @__PURE__ */ p("div", {
2736
2799
  role: "option",
2737
- "aria-selected": Jn.id === e.id,
2800
+ "aria-selected": er.id === e.id,
2738
2801
  tabIndex: 0,
2739
- className: `sdk-dropup-item ${Jn.id === e.id ? "active" : ""}`,
2740
- onClick: () => li(e.id),
2741
- onKeyDown: Ni(() => li(e.id)),
2742
- children: [/* @__PURE__ */ f("span", { children: e.label }), Jn.id === e.id && /* @__PURE__ */ f(h, {
2802
+ className: `sdk-dropup-item ${er.id === e.id ? "active" : ""}`,
2803
+ onClick: () => hi(e.id),
2804
+ onKeyDown: zi(() => hi(e.id)),
2805
+ children: [/* @__PURE__ */ f("span", { children: e.label }), er.id === e.id && /* @__PURE__ */ f(_, {
2743
2806
  size: 12,
2744
2807
  "aria-hidden": "true"
2745
2808
  })]
2746
2809
  }, e.id))]
2747
2810
  })]
2748
2811
  }),
2749
- x && x.length > 1 && !Y && /* @__PURE__ */ p("div", {
2812
+ S && S.length > 1 && !Y && /* @__PURE__ */ p("div", {
2750
2813
  className: "sdk-menu-container",
2751
2814
  children: [/* @__PURE__ */ f("button", {
2752
2815
  className: `sdk-desktop-icon-btn${G === "sources" ? " active" : ""}`,
2753
2816
  onClick: (e) => {
2754
- e.stopPropagation(), Ii("sources");
2817
+ e.stopPropagation(), Hi("sources");
2755
2818
  },
2756
2819
  "data-tooltip": "Select Source",
2757
2820
  "aria-label": "Select source",
2758
2821
  "aria-haspopup": "listbox",
2759
2822
  "aria-expanded": G === "sources",
2760
- children: /* @__PURE__ */ f(Ie, {
2823
+ children: /* @__PURE__ */ f(Pe, {
2761
2824
  size: 20,
2762
2825
  "aria-hidden": "true"
2763
2826
  })
2764
2827
  }), G === "sources" && /* @__PURE__ */ p("div", {
2765
- ref: Li,
2828
+ ref: Ui,
2766
2829
  className: "sdk-dropup-menu",
2767
2830
  role: "listbox",
2768
2831
  "aria-label": "Select source",
@@ -2770,14 +2833,14 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2770
2833
  className: "sdk-dropup-header",
2771
2834
  "aria-hidden": "true",
2772
2835
  children: "Source"
2773
- }), x.map((e, t) => /* @__PURE__ */ p("div", {
2836
+ }), S.map((e, t) => /* @__PURE__ */ p("div", {
2774
2837
  role: "option",
2775
- "aria-selected": S === t,
2838
+ "aria-selected": st === t,
2776
2839
  tabIndex: 0,
2777
- className: `sdk-dropup-item ${S === t ? "active" : ""}`,
2778
- onClick: () => di(t),
2779
- onKeyDown: Ni(() => di(t)),
2780
- children: [/* @__PURE__ */ f("span", { children: e.label }), S === t && /* @__PURE__ */ f(h, {
2840
+ className: `sdk-dropup-item ${st === t ? "active" : ""}`,
2841
+ onClick: () => _i(t),
2842
+ onKeyDown: zi(() => _i(t)),
2843
+ children: [/* @__PURE__ */ f("span", { children: e.label }), st === t && /* @__PURE__ */ f(_, {
2781
2844
  size: 12,
2782
2845
  "aria-hidden": "true"
2783
2846
  })]
@@ -2785,37 +2848,37 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2785
2848
  })]
2786
2849
  }),
2787
2850
  I.enablePiP && !Y && /* @__PURE__ */ f("button", {
2788
- className: `sdk-desktop-icon-btn${pn ? " active" : ""}`,
2851
+ className: `sdk-desktop-icon-btn${yn ? " active" : ""}`,
2789
2852
  onClick: (e) => {
2790
- e.stopPropagation(), mi();
2853
+ e.stopPropagation(), bi();
2791
2854
  },
2792
2855
  "data-tooltip": "Picture-in-Picture",
2793
- "aria-label": pn ? "Exit picture-in-picture" : "Enter picture-in-picture",
2794
- "aria-pressed": pn,
2795
- children: /* @__PURE__ */ f(Ce, {
2856
+ "aria-label": yn ? "Exit picture-in-picture" : "Enter picture-in-picture",
2857
+ "aria-pressed": yn,
2858
+ children: /* @__PURE__ */ f(xe, {
2796
2859
  size: 20,
2797
2860
  "aria-hidden": "true"
2798
2861
  })
2799
2862
  }),
2800
- Qe === "button" && /* @__PURE__ */ f("button", {
2863
+ et === "button" && /* @__PURE__ */ f("button", {
2801
2864
  className: "sdk-desktop-icon-btn",
2802
2865
  onClick: (e) => {
2803
- e.stopPropagation(), si();
2866
+ e.stopPropagation(), pi();
2804
2867
  },
2805
- "data-tooltip": Ai ? "Unmute" : "Mute",
2806
- "aria-label": Ai ? "Unmute" : "Mute",
2807
- "aria-pressed": Ai,
2808
- children: Mi()
2868
+ "data-tooltip": Ii ? "Unmute" : "Mute",
2869
+ "aria-label": Ii ? "Unmute" : "Mute",
2870
+ "aria-pressed": Ii,
2871
+ children: Ri()
2809
2872
  }),
2810
- We && /* @__PURE__ */ f("button", {
2873
+ qe && /* @__PURE__ */ f("button", {
2811
2874
  className: "sdk-desktop-icon-btn",
2812
2875
  onClick: (e) => {
2813
- e.stopPropagation(), gi();
2876
+ e.stopPropagation(), Si();
2814
2877
  },
2815
- "data-tooltip": on || cn ? "Exit fullscreen" : "Fullscreen",
2816
- "aria-label": on || cn ? "Exit fullscreen" : "Enter fullscreen",
2817
- "aria-pressed": on || cn,
2818
- children: f(on ? g : xe, {
2878
+ "data-tooltip": fn || mn ? "Exit fullscreen" : "Fullscreen",
2879
+ "aria-label": fn || mn ? "Exit fullscreen" : "Enter fullscreen",
2880
+ "aria-pressed": fn || mn,
2881
+ children: f(fn ? be : ye, {
2819
2882
  size: 20,
2820
2883
  "aria-hidden": "true"
2821
2884
  })
@@ -2827,10 +2890,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2827
2890
  })
2828
2891
  ] })]
2829
2892
  }),
2830
- hn && (() => {
2893
+ xn && (() => {
2831
2894
  let e = R.find((e) => $ >= e.startTime && $ < e.endTime), t = e ? e.endTime - e.startTime : B, n = e ? Math.max(0, $ - e.startTime) : V($);
2832
2895
  return ee(/* @__PURE__ */ p("div", {
2833
- className: `gb-pip-overlay${Di ? "" : " gb-pip-paused"}`,
2896
+ className: `gb-pip-overlay${Ni ? "" : " gb-pip-paused"}`,
2834
2897
  children: [
2835
2898
  /* @__PURE__ */ f("div", {}),
2836
2899
  /* @__PURE__ */ p("div", {
@@ -2844,22 +2907,22 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2844
2907
  }),
2845
2908
  "aria-label": "Rewind 10 seconds",
2846
2909
  disabled: Y,
2847
- children: /* @__PURE__ */ f(Te, {
2910
+ children: /* @__PURE__ */ f(Ce, {
2848
2911
  size: 20,
2849
2912
  "aria-hidden": "true"
2850
2913
  })
2851
2914
  }),
2852
2915
  /* @__PURE__ */ f("button", {
2853
2916
  className: "gb-pip-btn gb-pip-play",
2854
- onClick: ii,
2855
- "aria-label": _n ? "Replay" : Di ? "Pause" : "Play",
2856
- children: _n ? /* @__PURE__ */ f(Te, {
2917
+ onClick: ui,
2918
+ "aria-label": Cn ? "Replay" : Ni ? "Pause" : "Play",
2919
+ children: Cn ? /* @__PURE__ */ f(Ce, {
2857
2920
  size: 24,
2858
2921
  "aria-hidden": "true"
2859
- }) : Di ? /* @__PURE__ */ f(Se, {
2922
+ }) : Ni ? /* @__PURE__ */ f(v, {
2860
2923
  size: 24,
2861
2924
  "aria-hidden": "true"
2862
- }) : /* @__PURE__ */ f(we, {
2925
+ }) : /* @__PURE__ */ f(Se, {
2863
2926
  size: 24,
2864
2927
  "aria-hidden": "true",
2865
2928
  style: { marginLeft: 2 }
@@ -2873,7 +2936,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2873
2936
  }),
2874
2937
  "aria-label": "Skip forward 10 seconds",
2875
2938
  disabled: Y,
2876
- children: /* @__PURE__ */ f(Ee, {
2939
+ children: /* @__PURE__ */ f(we, {
2877
2940
  size: 20,
2878
2941
  "aria-hidden": "true"
2879
2942
  })
@@ -2884,7 +2947,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2884
2947
  className: "gb-pip-bottom",
2885
2948
  children: [/* @__PURE__ */ f("div", {
2886
2949
  className: "gb-pip-progress",
2887
- onClick: hi,
2950
+ onClick: xi,
2888
2951
  children: /* @__PURE__ */ f("div", {
2889
2952
  className: "gb-pip-progress-fill",
2890
2953
  style: { width: `${t ? n / t * 100 : 0}%` }
@@ -2899,79 +2962,90 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2899
2962
  })]
2900
2963
  })
2901
2964
  ]
2902
- }), hn.document.body);
2965
+ }), xn.document.body);
2903
2966
  })()
2904
2967
  ]
2905
2968
  });
2906
- }, He = "https://dev-api.go-boss.com";
2907
- function Ue(e) {
2969
+ }, Ge = "https://dev-api.go-boss.com";
2970
+ function Ke(e) {
2908
2971
  return {
2909
2972
  "x-player-key": e,
2910
2973
  "Content-Type": "application/json"
2911
2974
  };
2912
2975
  }
2913
- async function We(e, t = He) {
2914
- let n = await fetch(`${t}/api/player/sdk/init`, {
2976
+ async function qe(e, t = Ge, n = {}) {
2977
+ let r = await fetch(`${t}/api/player/sdk/init`, {
2915
2978
  method: "POST",
2916
- headers: Ue(e),
2917
- body: JSON.stringify({})
2979
+ headers: Ke(e),
2980
+ body: JSON.stringify({ videoUrl: n.videoUrl })
2918
2981
  });
2919
- if (!n.ok) throw Error(`SDK init failed: ${n.status}`);
2920
- return await n.json();
2982
+ if (!r.ok) throw Error(`SDK init failed: ${r.status}`);
2983
+ return await r.json();
2921
2984
  }
2922
- async function Ge(e, t, n, r = He) {
2923
- let i = await fetch(`${r}/api/player/sdk/session/start`, {
2985
+ async function Je(e, t, n = Ge) {
2986
+ let { sessionId: r, videoId: i, videoTitle: a, videoUrl: o, contentDurationSec: s } = t, c = await fetch(`${n}/api/player/sdk/session/start`, {
2924
2987
  method: "POST",
2925
- headers: Ue(e),
2988
+ headers: Ke(e),
2926
2989
  body: JSON.stringify({
2927
- sessionId: t,
2928
- videoId: n
2990
+ sessionId: r,
2991
+ videoId: i,
2992
+ videoTitle: a,
2993
+ videoUrl: o,
2994
+ contentDurationSec: typeof s == "number" && Number.isFinite(s) && s > 0 ? s : void 0
2929
2995
  })
2930
2996
  });
2931
- if (!i.ok) throw Error(`Session start failed: ${i.status}`);
2997
+ if (!c.ok) throw Error(`Session start failed: ${c.status}`);
2932
2998
  }
2933
- async function Ke(e, t, n, r, i = He) {
2999
+ async function Ye(e, t, n, r, i = Ge) {
2934
3000
  let a = {
2935
3001
  sessionId: t,
2936
3002
  currentTime: n,
2937
3003
  duration: r
2938
3004
  }, o = await fetch(`${i}/api/player/sdk/session/heartbeat`, {
2939
3005
  method: "POST",
2940
- headers: Ue(e),
3006
+ headers: Ke(e),
2941
3007
  body: JSON.stringify(a)
2942
3008
  });
2943
3009
  if (!o.ok) throw Error(`Heartbeat failed: ${o.status}`);
2944
3010
  }
2945
- async function qe(e, t, n = He) {
2946
- let r = await fetch(`${n}/api/player/sdk/session/end`, {
3011
+ async function Xe(e, t, n = 0, r = 0, i = Ge) {
3012
+ let a = await fetch(`${i}/api/player/sdk/session/end`, {
2947
3013
  method: "POST",
2948
- headers: Ue(e),
2949
- body: JSON.stringify({ sessionId: t })
3014
+ headers: Ke(e),
3015
+ body: JSON.stringify({
3016
+ sessionId: t,
3017
+ currentTime: n,
3018
+ duration: r
3019
+ })
2950
3020
  });
2951
- if (!r.ok) throw Error(`Session end failed: ${r.status}`);
3021
+ if (!a.ok) throw Error(`Session end failed: ${a.status}`);
2952
3022
  }
2953
- async function Je(e, t, n = He) {
3023
+ async function Ze(e, t, n = Ge) {
2954
3024
  let r = await fetch(`${n}/api/player/sdk/events`, {
2955
3025
  method: "POST",
2956
- headers: Ue(e),
3026
+ headers: Ke(e),
2957
3027
  body: JSON.stringify(t)
2958
3028
  });
2959
3029
  if (!r.ok) throw Error(`Event ${t.eventType} failed: ${r.status}`);
2960
3030
  }
2961
- function Ye(e, t, n = He) {
2962
- fetch(`${n}/api/player/sdk/session/end`, {
3031
+ function Qe(e, t, n = 0, r = 0, i = Ge) {
3032
+ fetch(`${i}/api/player/sdk/session/end`, {
2963
3033
  method: "POST",
2964
- headers: Ue(e),
2965
- body: JSON.stringify({ sessionId: t }),
3034
+ headers: Ke(e),
3035
+ body: JSON.stringify({
3036
+ sessionId: t,
3037
+ currentTime: n,
3038
+ duration: r
3039
+ }),
2966
3040
  keepalive: !0
2967
3041
  });
2968
3042
  }
2969
3043
  //#endregion
2970
3044
  //#region src/delegate.ts
2971
- function Xe() {
3045
+ function x() {
2972
3046
  if (!(typeof screen > "u")) return screen.orientation?.type ?? void 0;
2973
3047
  }
2974
- var Ze = class {
3048
+ var $e = class {
2975
3049
  constructor() {
2976
3050
  this.autoplay = !1, this.keyMoments = [], this.isPlaybackActive = !1, this.hasFinished = !1, this.hasDismissed = !1, this.lastCurrentTime = 0, this.lastDuration = 0, this.lastWatchDuration = 0, this.prevSpeed = 1, this.pendingSeek = null;
2977
3051
  }
@@ -3033,10 +3107,10 @@ var Ze = class {
3033
3107
  break;
3034
3108
  }
3035
3109
  case "fullscreen_enter":
3036
- this.call("playerDidEnterFullscreen", Xe());
3110
+ this.call("playerDidEnterFullscreen", x());
3037
3111
  break;
3038
3112
  case "fullscreen_exit":
3039
- this.call("playerDidExitFullscreen", Xe());
3113
+ this.call("playerDidExitFullscreen", x());
3040
3114
  break;
3041
3115
  case "key_moments": {
3042
3116
  let t = e.momentTitle ?? "", n = e.momentTime ?? e.currentTime, r = this.keyMoments, i = r.findIndex((e) => t && e.title === t || e.startTime === n), a = i >= 0 ? r[i] : void 0;
@@ -3083,7 +3157,7 @@ var Ze = class {
3083
3157
  console.error(`[PlayerSDK Delegate] ${String(e)} callback failed:`, t);
3084
3158
  }
3085
3159
  }
3086
- }, Qe = {
3160
+ }, et = {
3087
3161
  subtitles: "subtitle_support",
3088
3162
  ads: "ad_support",
3089
3163
  chapterMarkers: "key_moments",
@@ -3097,7 +3171,7 @@ var Ze = class {
3097
3171
  screenRecordingPrevention: "screen_recording_prevention",
3098
3172
  signalStrength: "signal_strength"
3099
3173
  };
3100
- function $e(e) {
3174
+ function tt(e) {
3101
3175
  let t = {
3102
3176
  m3u8_playback: !0,
3103
3177
  subtitle_support: !1,
@@ -3113,10 +3187,10 @@ function $e(e) {
3113
3187
  signal_strength: !1,
3114
3188
  ad_support: !1
3115
3189
  };
3116
- for (let [n, r] of Object.entries(Qe)) n in e && (t[r] = e[n]);
3190
+ for (let [n, r] of Object.entries(et)) n in e && (t[r] = e[n]);
3117
3191
  return t;
3118
3192
  }
3119
- function et(e) {
3193
+ function nt(e) {
3120
3194
  if (!e) return (e) => e;
3121
3195
  let t = [];
3122
3196
  for (let n of e.split(",")) {
@@ -3136,12 +3210,12 @@ function et(e) {
3136
3210
  return e;
3137
3211
  };
3138
3212
  }
3139
- function tt(e) {
3213
+ function rt(e) {
3140
3214
  let t = e.replace("#", "");
3141
3215
  return t.length === 6 ? `${parseInt(t.substring(0, 2), 16)}, ${parseInt(t.substring(2, 4), 16)}, ${parseInt(t.substring(4, 6), 16)}` : "99, 102, 241";
3142
3216
  }
3143
- var nt = 3e4;
3144
- function rt(e, t) {
3217
+ var it = 30 * 1e3;
3218
+ function at(e, t) {
3145
3219
  switch (e.eventType) {
3146
3220
  case "pause": return {
3147
3221
  eventType: "pause",
@@ -3235,119 +3309,141 @@ function rt(e, t) {
3235
3309
  default: return null;
3236
3310
  }
3237
3311
  }
3238
- function b({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i = "#6366f1", firebaseConfig: a, proxyDomains: s, apiBaseUrl: l, adTrackingUrl: ee, overlayAdUrl: te, title: ne, watermark: ie, autoplay: ae = !1, muted: oe = !1, autoFullscreen: se = !1, enableControls: ce = !0, enableSkipAd: le, skipAdAfterSeconds: ue, chaptersDisplayMode: de = "strip", volumeControlType: fe = "slider", subtitleStyle: m, drmConfig: pe, onAnalyticsEvent: me, delegate: he, onKeyMomentsLoaded: h, initialTime: ge, onTimeUpdate: _e }) {
3239
- let [ve, ye] = d([]), [be, xe] = d(0), [g] = d(() => new Ze());
3312
+ function ot({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i = "#6366f1", firebaseConfig: a, proxyDomains: s, apiBaseUrl: l, adTrackingUrl: ee, overlayAdUrl: te, videoId: ne, title: m, watermark: ie, autoplay: h = !1, muted: ae = !1, autoFullscreen: oe = !1, enableControls: se = !0, enableSkipAd: ce, skipAdAfterSeconds: le, chaptersDisplayMode: ue = "strip", volumeControlType: g = "slider", subtitleStyle: de, drmConfig: fe, onAnalyticsEvent: pe, delegate: _, onKeyMomentsLoaded: me, initialTime: he, onTimeUpdate: ge }) {
3313
+ let [_e, ve] = d([]), [ye, be] = d(0), [v] = d(() => new $e());
3240
3314
  c(() => {
3241
- g.setDelegate(he), g.setAutoplay(ae);
3315
+ v.setDelegate(_), v.setAutoplay(h);
3242
3316
  }, [
3243
- g,
3244
- he,
3245
- ae
3246
- ]), c(() => () => g.notifyDismissed(), [g]);
3247
- let Se = Array.isArray(t) ? t : [{
3317
+ v,
3318
+ _,
3319
+ h
3320
+ ]), c(() => () => v.notifyDismissed(), [v]);
3321
+ let xe = Array.isArray(t) ? t : [{
3248
3322
  label: "Default",
3249
3323
  url: t
3250
- }], Ce = Se[be]?.url ?? Se[0]?.url ?? "", [we, Te] = d("loading"), [Ee, De] = d(null), [Oe, ke] = d(0), [Ae, je] = d("network"), Me = u(null), Ne = u(!1), _ = u(""), Pe = u(!1), Fe = u(!1), Ie = u(void 0), Le = u(!1), v = u(null), Re = u(0), y = u(null), ze = u({
3324
+ }], Se = xe[ye]?.url ?? xe[0]?.url ?? "", [Ce, we] = d("loading"), [Te, Ee] = d(null), [De, Oe] = d(0), [ke, Ae] = d("network"), je = u(null), Me = u(!1), y = u(""), Ne = u(!1), Pe = u(!1), Fe = u(void 0), Ie = u(!1), Le = u(it), b = u(null), Re = u(0), ze = u(null), Be = u({
3251
3325
  currentTime: 0,
3252
3326
  duration: 0
3253
- }), Be = u(() => {}), He = Ce.split("/").filter(Boolean), Ue = (He[He.length - 1] ?? "").replace(/\.m3u8.*$/, "") || "video", Xe = o(() => et(s), [s])(), Qe = tt(i);
3327
+ }), Ve = u(() => {}), He = Se.split("/").filter(Boolean), Ue = ne || (He[He.length - 1] ?? "").replace(/\.m3u8.*$/, "") || "video", Ge = u(Se);
3254
3328
  c(() => {
3255
- document.documentElement.style.setProperty("--accent-indigo", i), document.documentElement.style.setProperty("--accent-indigo-rgb", Qe);
3256
- }, [i, Qe]), c(() => {
3329
+ Ge.current = Se;
3330
+ }, [Se]);
3331
+ let Ke = o(() => nt(s), [s])(), x = rt(i);
3332
+ c(() => {
3333
+ document.documentElement.style.setProperty("--accent-indigo", i), document.documentElement.style.setProperty("--accent-indigo-rgb", x);
3334
+ }, [i, x]), c(() => {
3257
3335
  let t = !1;
3258
- return We(e, l).then((e) => {
3336
+ return qe(e, l, { videoUrl: Ge.current }).then((e) => {
3259
3337
  if (t) return;
3260
- Me.current = e;
3261
- let { features: n, planTier: r } = e.result.data, i = {
3338
+ je.current = e;
3339
+ let { features: n, planTier: r, heartbeatIntervalSeconds: i } = e.result.data;
3340
+ Le.current = typeof i == "number" && i > 0 ? i * 1e3 : it;
3341
+ let a = {
3262
3342
  package: r,
3263
3343
  is_active: !0,
3264
- features: $e(n),
3344
+ features: tt(n),
3265
3345
  limits: { streaming_minutes: 0 }
3266
3346
  };
3267
- console.log("[SDK] Player key validated. Features:", i.features), De(i), Te("ready");
3347
+ console.log("[SDK] Player key validated. Features:", a.features), Ee(a), we("ready");
3268
3348
  }).catch((e) => {
3269
3349
  if (t) return;
3270
3350
  console.error("[SDK] Player key validation failed:", e);
3271
3351
  let n = e.message ?? "";
3272
- je(/init failed: 4\d\d/.test(n) ? "auth" : "network"), Te("error");
3352
+ Ae(/init failed: 4\d\d/.test(n) ? "auth" : "network"), we("error");
3273
3353
  }), () => {
3274
- t = !0, v.current &&= (clearTimeout(v.current), null), Re.current = 0, y.current = null, Te("loading"), De(null), Pe.current = !1, _.current = "", Fe.current = !1, Ie.current = void 0;
3354
+ t = !0, b.current &&= (clearTimeout(b.current), null), Re.current = 0, ze.current = null, we("loading"), Ee(null), Ne.current = !1, y.current = "", Pe.current = !1, Fe.current = void 0;
3275
3355
  };
3276
3356
  }, [
3277
3357
  e,
3278
3358
  l,
3279
- Oe
3359
+ De
3280
3360
  ]);
3281
- let b = o(() => {
3282
- v.current && (clearTimeout(v.current), v.current = null, y.current !== null && (Re.current += Date.now() - y.current, y.current = null));
3283
- }, []), x = o(() => {
3284
- v.current &&= (clearTimeout(v.current), null), Re.current = 0, y.current = null;
3361
+ let et = o(() => {
3362
+ b.current && (clearTimeout(b.current), b.current = null, ze.current !== null && (Re.current += Date.now() - ze.current, ze.current = null));
3363
+ }, []), ot = o(() => {
3364
+ b.current &&= (clearTimeout(b.current), null), Re.current = 0, ze.current = null;
3285
3365
  }, []), S = o(() => {
3286
- if (v.current || !_.current) return;
3287
- y.current = Date.now();
3288
- let t = nt - Re.current;
3289
- v.current = setTimeout(() => {
3290
- v.current = null, Re.current = 0, y.current = null;
3291
- let { currentTime: t, duration: n } = ze.current;
3292
- console.log("[SDK] Heartbeat timer fired — 30s of real content elapsed"), Ke(e, _.current, t, n, l).catch((e) => console.warn("[SDK] Heartbeat failed:", e.message)), Be.current();
3366
+ if (b.current || !y.current) return;
3367
+ ze.current = Date.now();
3368
+ let t = Le.current - Re.current;
3369
+ b.current = setTimeout(() => {
3370
+ b.current = null, Re.current = 0, ze.current = null;
3371
+ let { currentTime: t, duration: n } = Be.current;
3372
+ console.log(`[SDK] Heartbeat timer fired — ${Le.current / 1e3}s of real content elapsed`), Ye(e, y.current, t, n, l).catch((e) => console.warn("[SDK] Heartbeat failed:", e.message)), Ve.current();
3293
3373
  }, t);
3294
3374
  }, [e, l]);
3295
3375
  c(() => {
3296
- Be.current = S;
3376
+ Ve.current = S;
3297
3377
  }, [S]);
3298
- let it = u(!0);
3378
+ let st = u(!0);
3299
3379
  c(() => {
3300
- if (it.current) {
3301
- it.current = !1;
3380
+ if (st.current) {
3381
+ st.current = !1;
3302
3382
  return;
3303
3383
  }
3304
- Le.current = !0, Ie.current = void 0, b();
3305
- }, [be, b]), c(() => {
3384
+ Ie.current = !0, Fe.current = void 0, et();
3385
+ }, [ye, et]), c(() => {
3306
3386
  let t = () => {
3307
- g.notifyDismissed(), _.current && (Fe.current = !0, x(), Ye(e, _.current, l));
3387
+ if (v.notifyDismissed(), !y.current) return;
3388
+ Pe.current = !0, ot();
3389
+ let { currentTime: t, duration: n } = Be.current;
3390
+ Qe(e, y.current, t, n, l);
3308
3391
  };
3309
3392
  return window.addEventListener("beforeunload", t), () => {
3310
- window.removeEventListener("beforeunload", t), x();
3393
+ window.removeEventListener("beforeunload", t), ot();
3311
3394
  };
3312
3395
  }, [
3313
3396
  e,
3314
3397
  l,
3315
- x,
3316
- g
3398
+ ot,
3399
+ v
3317
3400
  ]);
3318
- let at = o((t) => {
3401
+ let ct = o((t) => {
3319
3402
  let n = t;
3320
- if (t.currentTime !== void 0 && (ze.current = {
3403
+ if (t.currentTime !== void 0 && (Be.current = {
3321
3404
  currentTime: t.currentTime,
3322
3405
  duration: t.duration
3323
- }), t.eventType === "session_start" && !Pe.current && (Pe.current = !0, Fe.current = !1, _.current = typeof n.sessionId == "string" ? n.sessionId : "", Ge(e, _.current, Ue, l).catch((e) => console.warn("[SDK] Session start failed:", e.message)), Ne.current || S()), t.eventType === "play" && Pe.current && !Ne.current && !Le.current && S(), t.eventType === "pause" && b(), t.eventType === "buffering_start" && b(), t.eventType === "buffering_end" && Pe.current && !Ne.current && (Le.current = !1, S()), t.eventType === "ended" && (x(), _.current && (Fe.current = !0, qe(e, _.current, l).catch((e) => console.warn("[SDK] Session end failed:", e.message)))), Pe.current && _.current && !Fe.current) {
3324
- let n = rt(t, Ie.current);
3325
- n && Je(e, {
3406
+ }), t.eventType === "session_start" && !Ne.current && (Ne.current = !0, Pe.current = !1, y.current = typeof n.sessionId == "string" ? n.sessionId : "", Je(e, {
3407
+ sessionId: y.current,
3408
+ videoId: Ue,
3409
+ videoTitle: m,
3410
+ videoUrl: Ge.current,
3411
+ contentDurationSec: t.duration
3412
+ }, l).catch((e) => console.warn("[SDK] Session start failed:", e.message)), Me.current || S()), t.eventType === "play" && Ne.current && !Me.current && !Ie.current && S(), t.eventType === "pause" && et(), t.eventType === "buffering_start" && et(), t.eventType === "buffering_end" && Ne.current && !Me.current && (Ie.current = !1, S()), t.eventType === "ended" && (ot(), y.current)) {
3413
+ Pe.current = !0;
3414
+ let { currentTime: t, duration: n } = Be.current;
3415
+ Xe(e, y.current, t, n, l).catch((e) => console.warn("[SDK] Session end failed:", e.message));
3416
+ }
3417
+ if (Ne.current && y.current && !Pe.current) {
3418
+ let n = at(t, Fe.current);
3419
+ n && Ze(e, {
3326
3420
  eventType: n.eventType,
3327
- sessionId: _.current,
3421
+ sessionId: y.current,
3328
3422
  currentTime: t.currentTime ?? 0,
3329
3423
  videoId: Ue,
3424
+ videoTitle: m,
3330
3425
  ...n.extras
3331
3426
  }, l).catch((e) => console.warn(`[SDK] Event ${n.eventType} failed:`, e.message));
3332
3427
  }
3333
- t.eventType === "quality_change" && t.rendition && (Ie.current = t.rendition), console.log("[SDK Analytics]", t), g.handleAnalyticsEvent(t), me?.(t);
3428
+ t.eventType === "quality_change" && t.rendition && (Fe.current = t.rendition), console.log("[SDK Analytics]", t), v.handleAnalyticsEvent(t), pe?.(t);
3334
3429
  }, [
3335
3430
  e,
3336
3431
  l,
3337
3432
  Ue,
3433
+ m,
3338
3434
  S,
3339
- b,
3340
- x,
3341
- me,
3342
- g
3343
- ]), ot = o((e) => {
3344
- Ne.current = e, e ? (b(), console.log("[SDK] Ad break started — heartbeat timer paused")) : (Pe.current && S(), console.log("[SDK] Ad break ended — heartbeat timer resumed"));
3345
- }, [b, S]), st = o((e) => {
3346
- g.setKeyMoments(e), ye(e), h?.(e);
3347
- }, [h, g]), C = o((e) => {
3348
- g.handleTimeUpdate(e), _e?.(e);
3349
- }, [_e, g]);
3350
- if (we === "loading") return /* @__PURE__ */ p("div", {
3435
+ et,
3436
+ ot,
3437
+ pe,
3438
+ v
3439
+ ]), lt = o((e) => {
3440
+ Me.current = e, e ? (et(), console.log("[SDK] Ad break started — heartbeat timer paused")) : (Ne.current && S(), console.log("[SDK] Ad break ended — heartbeat timer resumed"));
3441
+ }, [et, S]), ut = o((e) => {
3442
+ v.setKeyMoments(e), ve(e), me?.(e);
3443
+ }, [me, v]), dt = o((e) => {
3444
+ v.handleTimeUpdate(e), ge?.(e);
3445
+ }, [ge, v]);
3446
+ if (Ce === "loading") return /* @__PURE__ */ p("div", {
3351
3447
  style: {
3352
3448
  width: "100%",
3353
3449
  aspectRatio: "16 / 9",
@@ -3361,15 +3457,15 @@ function b({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i =
3361
3457
  width: 60,
3362
3458
  height: 60,
3363
3459
  borderRadius: "50%",
3364
- border: `4px solid rgba(${Qe}, 0.1)`,
3460
+ border: `4px solid rgba(${x}, 0.1)`,
3365
3461
  borderLeftColor: i,
3366
- borderRightColor: `rgba(${Qe}, 0.2)`,
3367
- filter: `drop-shadow(0 0 10px rgba(${Qe}, 0.5))`,
3462
+ borderRightColor: `rgba(${x}, 0.2)`,
3463
+ filter: `drop-shadow(0 0 10px rgba(${x}, 0.5))`,
3368
3464
  animation: "boss-sdk-spin 1s linear infinite"
3369
3465
  } })]
3370
3466
  });
3371
- if (we === "error") {
3372
- let e = Ae === "auth";
3467
+ if (Ce === "error") {
3468
+ let e = ke === "auth";
3373
3469
  return /* @__PURE__ */ f("div", {
3374
3470
  style: {
3375
3471
  width: "100%",
@@ -3385,53 +3481,54 @@ function b({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i =
3385
3481
  children: /* @__PURE__ */ f(re, {
3386
3482
  title: e ? "Invalid Player Key" : "Something Went Wrong",
3387
3483
  subtitle: e ? "Your player key is invalid or expired.\nPlease check your configuration." : "We encountered an error while connecting.\nPlease try again.",
3388
- onRetry: () => ke((e) => e + 1)
3484
+ onRetry: () => Oe((e) => e + 1)
3389
3485
  })
3390
3486
  });
3391
3487
  }
3392
- return /* @__PURE__ */ f(Ve, {
3393
- src: Ce,
3394
- sources: Se,
3395
- activeSourceIndex: be,
3396
- onSourceChange: (e) => xe(e),
3488
+ return /* @__PURE__ */ f(We, {
3489
+ src: Se,
3490
+ sources: xe,
3491
+ activeSourceIndex: ye,
3492
+ onSourceChange: (e) => be(e),
3397
3493
  subtitles: n,
3398
- keyMoments: ve,
3494
+ keyMoments: _e,
3399
3495
  themeColor: i,
3400
3496
  firebaseConfig: a,
3401
- resolvedEntitlement: Ee,
3497
+ resolvedEntitlement: Te,
3402
3498
  licenseKey: r,
3403
- title: ne,
3499
+ title: m,
3404
3500
  watermark: ie,
3405
- autoplay: ae,
3406
- muted: oe,
3407
- autoFullscreen: se,
3408
- enableControls: ce,
3409
- enableSkipAd: le,
3410
- skipAdAfterSeconds: ue,
3411
- chaptersDisplayMode: de,
3412
- volumeControlType: fe,
3413
- subtitleStyle: m,
3414
- drmConfig: pe,
3501
+ autoplay: h,
3502
+ muted: ae,
3503
+ autoFullscreen: oe,
3504
+ enableControls: se,
3505
+ enableSkipAd: ce,
3506
+ skipAdAfterSeconds: le,
3507
+ chaptersDisplayMode: ue,
3508
+ volumeControlType: g,
3509
+ subtitleStyle: de,
3510
+ drmConfig: fe,
3415
3511
  overlayAdUrl: te,
3416
3512
  adTrackingUrl: ee,
3417
- urlTransformer: Xe,
3418
- onAnalyticsEvent: at,
3419
- onAdBreakChange: ot,
3420
- onKeyMomentsLoaded: st,
3421
- initialTime: ge,
3422
- onTimeUpdate: C
3513
+ videoId: Ue,
3514
+ urlTransformer: Ke,
3515
+ onAnalyticsEvent: ct,
3516
+ onAdBreakChange: lt,
3517
+ onKeyMomentsLoaded: ut,
3518
+ initialTime: he,
3519
+ onTimeUpdate: dt
3423
3520
  });
3424
3521
  }
3425
3522
  //#endregion
3426
3523
  //#region src/create-player.ts
3427
- function x(e, t) {
3524
+ function S(e, t) {
3428
3525
  let n = ne(e), r = t;
3429
- return n.render(i(b, r)), {
3526
+ return n.render(i(ot, r)), {
3430
3527
  update(e) {
3431
3528
  r = {
3432
3529
  ...r,
3433
3530
  ...e
3434
- }, n.render(i(b, r));
3531
+ }, n.render(i(ot, r));
3435
3532
  },
3436
3533
  destroy() {
3437
3534
  n.unmount();
@@ -3439,6 +3536,6 @@ function x(e, t) {
3439
3536
  };
3440
3537
  }
3441
3538
  //#endregion
3442
- export { b as BossVideoPlayer, e as FirebaseAnalyticsProvider, t as VideoPlayerSDK, Ve as WebVideoPlayer, x as createPlayer, qe as endSession, We as initSdk, Je as sendEvent, Ke as sendHeartbeat, Ge as startSession };
3539
+ export { ot as BossVideoPlayer, e as FirebaseAnalyticsProvider, t as VideoPlayerSDK, We as WebVideoPlayer, S as createPlayer, Xe as endSession, qe as initSdk, Ze as sendEvent, Ye as sendHeartbeat, Je as startSession };
3443
3540
 
3444
3541
  //# sourceMappingURL=index.js.map