@grizzshutsdown/simpleplayer 0.1.12 → 0.1.13

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.
@@ -59,7 +59,7 @@ function k(o) {
59
59
  const e = o, i = e.captureStream ?? e.mozCaptureStream;
60
60
  if (i && o.readyState >= HTMLMediaElement.HAVE_METADATA)
61
61
  try {
62
- return i.call(o).getAudioTracks().length > 0 ? "available" : "unavailable";
62
+ if (i.call(o).getAudioTracks().length > 0) return "available";
63
63
  } catch {
64
64
  }
65
65
  const r = o;
@@ -527,6 +527,10 @@ const C = `
527
527
  outline: 0;
528
528
  }
529
529
 
530
+ .sp-control-button:disabled {
531
+ opacity: 1;
532
+ }
533
+
530
534
  .sp-control-button:hover {
531
535
  background: var(--sp-control-slot-hover-surface);
532
536
  }
@@ -847,6 +851,11 @@ const C = `
847
851
  display: none !important;
848
852
  }
849
853
 
854
+ .sp-player.is-loading:not(.has-loaded-once) .sp-time,
855
+ .sp-player.is-loading:not(.has-loaded-once) .sp-progress-hover-fill {
856
+ display: none;
857
+ }
858
+
850
859
  .sp-tray-time {
851
860
  position: absolute;
852
861
  display: none;
@@ -1149,79 +1158,79 @@ u.innerHTML = `
1149
1158
  class A extends HTMLElement {
1150
1159
  static observedAttributes = f;
1151
1160
  #r;
1152
- #At = [];
1153
- #E = null;
1161
+ #Lt = [];
1162
+ #T = null;
1154
1163
  #ts = !1;
1155
- #C = !1;
1164
+ #E = !1;
1156
1165
  #s;
1157
1166
  #t;
1158
1167
  #M;
1159
1168
  #i;
1160
1169
  #V;
1161
- #j;
1170
+ #Z;
1162
1171
  #oe;
1163
1172
  #c;
1164
1173
  #ss;
1165
1174
  #Es;
1166
- #o;
1175
+ #n;
1167
1176
  #z;
1168
1177
  #d;
1169
- #Z;
1170
1178
  #O;
1171
- #K = [];
1172
- #ot = 0;
1179
+ #K;
1180
+ #G = [];
1181
+ #nt = 0;
1173
1182
  #a = !1;
1174
1183
  #x = !1;
1175
- #G = !1;
1184
+ #J = !1;
1176
1185
  #f = 0;
1177
- #Lt = 0;
1178
- #J = 0;
1179
- #Ft = !1;
1186
+ #Ft = 0;
1187
+ #Q = 0;
1188
+ #St = !1;
1180
1189
  #I = !1;
1181
- #nt = !1;
1190
+ #at = !1;
1182
1191
  #es = 0;
1183
- #St = 0;
1192
+ #Mt = 0;
1184
1193
  #h = null;
1185
1194
  #b = null;
1186
1195
  #is = 0;
1187
- #Q = 0;
1188
- #at = 0;
1189
- #lt = 0;
1190
1196
  #tt = 0;
1197
+ #lt = 0;
1198
+ #ht = 0;
1199
+ #st = 0;
1191
1200
  #Cs = 0;
1192
1201
  #rs = 0;
1193
- #Mt = null;
1202
+ #Vt = null;
1203
+ #C = !1;
1194
1204
  #A = !1;
1195
- #L = !1;
1196
1205
  #q = !1;
1197
1206
  #B = !1;
1198
1207
  #$ = 0;
1199
- #Vt = 0;
1200
- #ht = !1;
1208
+ #zt = 0;
1209
+ #ct = !1;
1201
1210
  #As = 0;
1202
- #zt = !0;
1211
+ #It = !0;
1203
1212
  #Ls = 0;
1204
1213
  #Fs = performance.now();
1205
- #ct = 0;
1214
+ #pt = 0;
1206
1215
  #k = null;
1207
- #st = null;
1208
- #It = !1;
1209
- #v = !1;
1216
+ #et = null;
1210
1217
  #Rt = !1;
1211
- #pt = !1;
1218
+ #v = !1;
1219
+ #ut = !1;
1212
1220
  #U = !1;
1221
+ #N = !1;
1213
1222
  #os = null;
1214
1223
  #ns = null;
1215
1224
  #Dt = !1;
1216
- #F = !1;
1217
- #N = !1;
1218
- #n = null;
1219
- #ut = 0;
1225
+ #L = !1;
1226
+ #Y = !1;
1227
+ #o = null;
1220
1228
  #dt = 0;
1221
1229
  #mt = 0;
1230
+ #ft = 0;
1222
1231
  #as = null;
1223
1232
  #ls = !1;
1224
- #ft = 0;
1233
+ #bt = 0;
1225
1234
  #ne = 4;
1226
1235
  #ae = 3.5;
1227
1236
  #hs = 6;
@@ -1318,10 +1327,10 @@ class A extends HTMLElement {
1318
1327
  this.#ps("fullscreen", t);
1319
1328
  }
1320
1329
  connectedCallback() {
1321
- this.#s = this.#r.querySelector("[data-sp-player]"), this.#t = this.#r.querySelector("[data-sp-video]"), this.#M = this.#r.querySelector("[data-sp-button]"), this.#i = this.#r.querySelector("[data-sp-progress-track]"), this.#V = this.#r.querySelector("[data-sp-control-tray]"), this.#j = this.#r.querySelector("[data-sp-control-tray-slots]"), this.#oe = this.#r.querySelector("[data-sp-tray-time]"), this.#c = this.#r.querySelector("[data-sp-tray-time-text]"), this.#ss = this.#r.querySelector("[data-sp-time]"), this.#Es = this.#r.querySelector("[data-sp-time-text]"), this.#o = this.#r.querySelector("[data-sp-volume-control]"), this.#z = this.#r.querySelector("[data-sp-volume-popover]"), this.#d = this.#r.querySelector("[data-sp-volume-track]"), this.#Z = this.#r.querySelector("[data-sp-picture-in-picture-control]"), this.#O = this.#r.querySelector("[data-sp-fullscreen-control]"), this.#K = [this.#o, this.#Z, this.#O], this.#Ms(), this.#ts || (this.#ge(), this.#ts = !0), this.#Bt(), this.#ms(), this.#us(), this.#ds(), this.#w(), this.#y(), this.#Tt(), this.#Qt(), this.#u();
1330
+ this.#s = this.#r.querySelector("[data-sp-player]"), this.#t = this.#r.querySelector("[data-sp-video]"), this.#M = this.#r.querySelector("[data-sp-button]"), this.#i = this.#r.querySelector("[data-sp-progress-track]"), this.#V = this.#r.querySelector("[data-sp-control-tray]"), this.#Z = this.#r.querySelector("[data-sp-control-tray-slots]"), this.#oe = this.#r.querySelector("[data-sp-tray-time]"), this.#c = this.#r.querySelector("[data-sp-tray-time-text]"), this.#ss = this.#r.querySelector("[data-sp-time]"), this.#Es = this.#r.querySelector("[data-sp-time-text]"), this.#n = this.#r.querySelector("[data-sp-volume-control]"), this.#z = this.#r.querySelector("[data-sp-volume-popover]"), this.#d = this.#r.querySelector("[data-sp-volume-track]"), this.#O = this.#r.querySelector("[data-sp-picture-in-picture-control]"), this.#K = this.#r.querySelector("[data-sp-fullscreen-control]"), this.#G = [this.#n, this.#O, this.#K], this.#Ms(), this.#ts || (this.#ge(), this.#ts = !0), this.#Bt(), this.#ms(), this.#us(), this.#ds(), this.#w(), this.#y(), this.#Et(), this.#Qt(), this.#u();
1322
1331
  }
1323
1332
  disconnectedCallback() {
1324
- this.#E?.disconnect(), this.#E = null, this.#At.forEach((t) => t()), this.#At = [], this.#ts = !1, this.#P(), this.#$s(), this.#Zt(), this.#gs(), this.#rt(), this.#Ot(), this.#Ct(), this.#Us(), this.#vs(), this.#s.classList.remove("is-volume-icon-animating"), this.#j.style.removeProperty("--sp-control-hover-offset"), this.style.removeProperty("--sp-touch-control-hover-offset"), this.#xt(), this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#F = !1, this.#N = !1, this.#U = !1, this.#n = null, this.#o.classList.remove("is-volume-open"), this.#K.forEach((t) => t.classList.remove("is-control-tap-active")), this.#s.classList.remove("is-pointer-active"), this.#kt();
1333
+ this.#T?.disconnect(), this.#T = null, this.#Lt.forEach((t) => t()), this.#Lt = [], this.#ts = !1, this.#P(), this.#$s(), this.#Zt(), this.#gs(), this.#ot(), this.#Ot(), this.#At(), this.#Us(), this.#vs(), this.#s.classList.remove("is-volume-icon-animating"), this.#Z.style.removeProperty("--sp-control-hover-offset"), this.style.removeProperty("--sp-touch-control-hover-offset"), this.#kt(), this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#L = !1, this.#Y = !1, this.#N = !1, this.#o = null, this.#n.classList.remove("is-volume-open"), this.#G.forEach((t) => t.classList.remove("is-control-tap-active")), this.#s.classList.remove("is-pointer-active"), this.#Pt();
1325
1334
  }
1326
1335
  attributeChangedCallback(t, s, e) {
1327
1336
  if (s !== e) {
@@ -1330,7 +1339,7 @@ class A extends HTMLElement {
1330
1339
  return;
1331
1340
  }
1332
1341
  if (t === "preload-margin" && this.isConnected) {
1333
- this.#E?.disconnect(), this.#ms();
1342
+ this.#T?.disconnect(), this.#ms();
1334
1343
  return;
1335
1344
  }
1336
1345
  if (t === "src" && this.isConnected) {
@@ -1345,7 +1354,7 @@ class A extends HTMLElement {
1345
1354
  this.#ds();
1346
1355
  return;
1347
1356
  }
1348
- (t === "controls" || t.startsWith("enable-") || t.startsWith("disable-") || t.startsWith("no-")) && this.isConnected && (this.#us(), this.#y(), this.#Tt(), this.#Qt(), this.#ds());
1357
+ (t === "controls" || t.startsWith("enable-") || t.startsWith("disable-") || t.startsWith("no-")) && this.isConnected && (this.#us(), this.#y(), this.#Et(), this.#Qt(), this.#ds());
1349
1358
  }
1350
1359
  }
1351
1360
  #cs(t, s) {
@@ -1372,35 +1381,35 @@ class A extends HTMLElement {
1372
1381
  this.#t.muted = !0, this.#t.setAttribute("autoplay", ""), this.#t.setAttribute("muted", "");
1373
1382
  return;
1374
1383
  }
1375
- this.#t.removeAttribute("autoplay"), this.#C || (this.#t.muted = !1, this.#t.removeAttribute("muted"));
1384
+ this.#t.removeAttribute("autoplay"), this.#E || (this.#t.muted = !1, this.#t.removeAttribute("muted"));
1376
1385
  }
1377
1386
  #us() {
1378
1387
  if (!this.#s) return;
1379
- const t = this.#T(), s = [
1380
- { button: this.#o, enabled: t, className: "has-volume-control" },
1381
- { button: this.#Z, enabled: this.pictureInPictureEnabled, className: "has-picture-in-picture-control" },
1382
- { button: this.#O, enabled: this.fullscreenEnabled, className: "has-fullscreen-control" }
1388
+ const t = this.volumeEnabled && !(this.#U && !this.#ut), s = [
1389
+ { button: this.#n, enabled: t, className: "has-volume-control" },
1390
+ { button: this.#O, enabled: this.pictureInPictureEnabled, className: "has-picture-in-picture-control" },
1391
+ { button: this.#K, enabled: this.fullscreenEnabled, className: "has-fullscreen-control" }
1383
1392
  ];
1384
1393
  let e = 0;
1385
1394
  for (const i of s)
1386
1395
  this.#s.classList.toggle(i.className, i.enabled), i.button.hidden = !i.enabled, i.enabled ? (i.button.dataset.spControlIndex = `${e}`, e += 1) : delete i.button.dataset.spControlIndex;
1387
- this.style.setProperty("--sp-enabled-controls-count", `${e}`), this.style.setProperty("--sp-control-tray-display", e > 0 ? "block" : "none"), this.#s.classList.toggle("has-volume-slider-control", t && this.volumeSliderEnabled), (!t || !this.volumeSliderEnabled) && (this.#Ps(), this.#Jt(this.#n), this.#F = !1, this.#N = !1, this.#z.classList.remove("is-scrubbing-volume")), this.#j.style.removeProperty("--sp-control-hover-offset");
1396
+ this.style.setProperty("--sp-enabled-controls-count", `${e}`), this.style.setProperty("--sp-control-tray-display", e > 0 ? "block" : "none"), this.#s.classList.toggle("has-volume-slider-control", t && this.volumeSliderEnabled), (!t || !this.volumeSliderEnabled) && (this.#Ps(), this.#Jt(this.#o), this.#L = !1, this.#Y = !1, this.#z.classList.remove("is-scrubbing-volume")), this.#Z.style.removeProperty("--sp-control-hover-offset");
1388
1397
  }
1389
- get #bt() {
1398
+ get #vt() {
1390
1399
  return this.timeVisible && this.controlsEnabled;
1391
1400
  }
1392
1401
  #ds() {
1393
- this.#s && (this.#s.classList.toggle("has-pinned-time", this.#bt), this.#bt && this.#wt());
1402
+ this.#s && (this.#s.classList.toggle("has-pinned-time", this.#vt), this.#vt && this.#xt());
1394
1403
  }
1395
1404
  #ge() {
1396
- this.#e(this.#M, "click", this.#_e), this.#e(this, "pointerenter", this.#_t), this.#e(this, "pointermove", this.#Wt), this.#e(this, "pointerleave", this.#jt), this.#e(this, "mouseenter", this.#_t), this.#e(this, "mousemove", this.#Wt), this.#e(this, "mouseleave", this.#jt), this.#e(this.#s, "pointerenter", this.#_t), this.#e(this.#s, "pointermove", this.#Wt), this.#e(this.#s, "pointerleave", this.#jt), this.#e(this.#s, "mouseenter", this.#_t), this.#e(this.#s, "mousemove", this.#Wt), this.#e(this.#s, "mouseleave", this.#jt), this.#e(this.#M, "pointerenter", this.#et), this.#e(this.#M, "pointerleave", this.#it), this.#e(this.#M, "mouseenter", this.#et), this.#e(this.#M, "mouseleave", this.#it), this.#e(this.#i, "pointerenter", this.#et), this.#e(this.#i, "pointerleave", this.#it), this.#e(this.#i, "mouseenter", this.#et), this.#e(this.#i, "mouseleave", this.#it), this.#e(this.#i, "pointerenter", this.#ie), this.#e(this.#i, "pointerleave", this.#re), this.#e(this.#i, "mouseenter", this.#ie), this.#e(this.#i, "mouseleave", this.#re), this.#e(this.#V, "pointerenter", this.#et), this.#e(this.#V, "pointerleave", this.#it), this.#e(this.#V, "mouseenter", this.#et), this.#e(this.#V, "mouseleave", this.#it), this.#e(this.#r, "focusin", this.#Hs), this.#e(this.#r, "focusout", this.#xe), this.#e(this.#s, "pointerdown", this.#We), this.#e(this.#s, "dragstart", this.#Ut), this.#e(this.#s, "selectstart", this.#Ut), this.#e(this.#t, "dragstart", this.#Ut), this.#e(this.#t, "selectstart", this.#Ut), this.#e(this.#i, "pointerdown", this.#ei), this.#e(this.#i, "pointermove", this.#ri), this.#e(this.#i, "pointerup", this.#oi), this.#e(this.#i, "pointercancel", this.#ni), this.#e(this.#i, "keydown", this.#ii), this.#e(this.#o, "pointerenter", this.#se), this.#e(this.#o, "pointerleave", this.#ee), this.#e(this.#o, "click", this.#Ze), this.#e(this.#z, "pointerenter", this.#se), this.#e(this.#z, "pointerleave", this.#ee), this.#e(this.#d, "pointerdown", this.#Oe), this.#e(this.#d, "pointermove", this.#Ke), this.#e(this.#d, "pointerup", this.#Ge), this.#e(this.#d, "pointercancel", this.#Je), this.#e(this.#d, "click", this.#je), this.#e(this.#d, "keydown", this.#Qe), this.#e(this.#Z, "click", this.#ti), this.#e(this.#O, "click", this.#si), this.#e(this.#c, "click", this.#Xe);
1397
- for (const t of this.#K)
1405
+ this.#e(this.#M, "click", this.#_e), this.#e(this, "pointerenter", this.#_t), this.#e(this, "pointermove", this.#Wt), this.#e(this, "pointerleave", this.#jt), this.#e(this, "mouseenter", this.#_t), this.#e(this, "mousemove", this.#Wt), this.#e(this, "mouseleave", this.#jt), this.#e(this.#s, "pointerenter", this.#_t), this.#e(this.#s, "pointermove", this.#Wt), this.#e(this.#s, "pointerleave", this.#jt), this.#e(this.#s, "mouseenter", this.#_t), this.#e(this.#s, "mousemove", this.#Wt), this.#e(this.#s, "mouseleave", this.#jt), this.#e(this.#M, "pointerenter", this.#it), this.#e(this.#M, "pointerleave", this.#rt), this.#e(this.#M, "mouseenter", this.#it), this.#e(this.#M, "mouseleave", this.#rt), this.#e(this.#i, "pointerenter", this.#it), this.#e(this.#i, "pointerleave", this.#rt), this.#e(this.#i, "mouseenter", this.#it), this.#e(this.#i, "mouseleave", this.#rt), this.#e(this.#i, "pointerenter", this.#ie), this.#e(this.#i, "pointerleave", this.#re), this.#e(this.#i, "mouseenter", this.#ie), this.#e(this.#i, "mouseleave", this.#re), this.#e(this.#V, "pointerenter", this.#it), this.#e(this.#V, "pointerleave", this.#rt), this.#e(this.#V, "mouseenter", this.#it), this.#e(this.#V, "mouseleave", this.#rt), this.#e(this.#r, "focusin", this.#Hs), this.#e(this.#r, "focusout", this.#xe), this.#e(this.#s, "pointerdown", this.#We), this.#e(this.#s, "dragstart", this.#Ut), this.#e(this.#s, "selectstart", this.#Ut), this.#e(this.#t, "dragstart", this.#Ut), this.#e(this.#t, "selectstart", this.#Ut), this.#e(this.#i, "pointerdown", this.#ei), this.#e(this.#i, "pointermove", this.#ri), this.#e(this.#i, "pointerup", this.#oi), this.#e(this.#i, "pointercancel", this.#ni), this.#e(this.#i, "keydown", this.#ii), this.#e(this.#n, "pointerenter", this.#se), this.#e(this.#n, "pointerleave", this.#ee), this.#e(this.#n, "click", this.#Ze), this.#e(this.#z, "pointerenter", this.#se), this.#e(this.#z, "pointerleave", this.#ee), this.#e(this.#d, "pointerdown", this.#Oe), this.#e(this.#d, "pointermove", this.#Ke), this.#e(this.#d, "pointerup", this.#Ge), this.#e(this.#d, "pointercancel", this.#Je), this.#e(this.#d, "click", this.#je), this.#e(this.#d, "keydown", this.#Qe), this.#e(this.#O, "click", this.#ti), this.#e(this.#K, "click", this.#si), this.#e(this.#c, "click", this.#Xe);
1406
+ for (const t of this.#G)
1398
1407
  this.#e(t, "pointerenter", this.#qs), this.#e(t, "mouseenter", this.#qs), this.#e(t, "pointerdown", this.#ke);
1399
- "ResizeObserver" in window && (this.#Mt = new ResizeObserver(() => {
1408
+ "ResizeObserver" in window && (this.#Vt = new ResizeObserver(() => {
1400
1409
  this.#$t();
1401
- }), this.#Mt.observe(this.#c), this.#At.push(() => {
1402
- this.#Mt?.disconnect(), this.#Mt = null;
1403
- })), this.#e(document, "pointerup", this.#ai), this.#e(document, "pointercancel", this.#li), this.#e(document, "pointermove", this.#Ds), this.#e(document, "mousemove", this.#Ds), this.#e(document, "fullscreenchange", this.#Et), this.#e(document, "webkitfullscreenchange", this.#Et), this.#e(document, "mozfullscreenchange", this.#Et), this.#e(document, "MSFullscreenChange", this.#Et), this.#e(this.#r, "fullscreenchange", this.#Et), this.#e(window, "blur", this.#hi), this.#e(window, "focus", this.#ci), this.#e(this.#t, "play", this.#pi), this.#e(this.#t, "pause", this.#ui), this.#e(this.#t, "ended", this.#di), this.#e(this.#t, "loadstart", this.#mi), this.#e(this.#t, "waiting", this.#Ts), this.#e(this.#t, "stalled", this.#Ts), this.#e(this.#t, "seeking", this.#Ts), this.#e(this.#t, "loadeddata", this.#Kt), this.#e(this.#t, "loadedmetadata", this.#fi), this.#e(this.#t, "canplay", this.#Kt), this.#e(this.#t, "canplaythrough", this.#Kt), this.#e(this.#t, "playing", this.#bi), this.#e(this.#t, "seeked", this.#vi), this.#e(this.#t, "error", this.#gi), this.#e(this.#t, "progress", this.#w), this.#e(this.#t, "suspend", this.#w), this.#e(this.#t, "timeupdate", this.#yi), this.#e(this.#t, "volumechange", this.#wi), this.#e(this.#t, "enterpictureinpicture", this.#Tt), this.#e(this.#t, "leavepictureinpicture", this.#Tt);
1410
+ }), this.#Vt.observe(this.#c), this.#Lt.push(() => {
1411
+ this.#Vt?.disconnect(), this.#Vt = null;
1412
+ })), this.#e(document, "pointerup", this.#ai), this.#e(document, "pointercancel", this.#li), this.#e(document, "pointermove", this.#Ds), this.#e(document, "mousemove", this.#Ds), this.#e(document, "fullscreenchange", this.#Ct), this.#e(document, "webkitfullscreenchange", this.#Ct), this.#e(document, "mozfullscreenchange", this.#Ct), this.#e(document, "MSFullscreenChange", this.#Ct), this.#e(this.#r, "fullscreenchange", this.#Ct), this.#e(window, "blur", this.#hi), this.#e(window, "focus", this.#ci), this.#e(this.#t, "play", this.#pi), this.#e(this.#t, "pause", this.#ui), this.#e(this.#t, "ended", this.#di), this.#e(this.#t, "loadstart", this.#mi), this.#e(this.#t, "waiting", this.#Ts), this.#e(this.#t, "stalled", this.#Ts), this.#e(this.#t, "seeking", this.#Ts), this.#e(this.#t, "loadeddata", this.#Kt), this.#e(this.#t, "loadedmetadata", this.#fi), this.#e(this.#t, "canplay", this.#Kt), this.#e(this.#t, "canplaythrough", this.#Kt), this.#e(this.#t, "playing", this.#bi), this.#e(this.#t, "seeked", this.#vi), this.#e(this.#t, "error", this.#gi), this.#e(this.#t, "progress", this.#w), this.#e(this.#t, "suspend", this.#w), this.#e(this.#t, "timeupdate", this.#yi), this.#e(this.#t, "volumechange", this.#wi), this.#e(this.#t, "enterpictureinpicture", this.#Et), this.#e(this.#t, "leavepictureinpicture", this.#Et);
1404
1413
  }
1405
1414
  #$t() {
1406
1415
  if (!this.#s || !this.#c) return;
@@ -1409,36 +1418,36 @@ class A extends HTMLElement {
1409
1418
  this.#c.style.width = "", this.#s.style.setProperty("--sp-tray-time-width", `${t}px`);
1410
1419
  }
1411
1420
  #e(t, s, e) {
1412
- t.addEventListener(s, e), this.#At.push(() => t.removeEventListener(s, e));
1421
+ t.addEventListener(s, e), this.#Lt.push(() => t.removeEventListener(s, e));
1413
1422
  }
1414
1423
  #ms() {
1415
- if (!(!this.src || this.#C)) {
1416
- if (this.#E?.disconnect(), this.#t.dataset.src = this.src, "IntersectionObserver" in window) {
1417
- this.#E = new IntersectionObserver((t, s) => {
1418
- t.some((e) => e.isIntersecting) && (s.disconnect(), this.#E = null, this.#Y());
1419
- }, { rootMargin: this.preloadMargin }), this.#E.observe(this.#s);
1424
+ if (!(!this.src || this.#E)) {
1425
+ if (this.#T?.disconnect(), this.#t.dataset.src = this.src, "IntersectionObserver" in window) {
1426
+ this.#T = new IntersectionObserver((t, s) => {
1427
+ t.some((e) => e.isIntersecting) && (s.disconnect(), this.#T = null, this.#X());
1428
+ }, { rootMargin: this.preloadMargin }), this.#T.observe(this.#s);
1420
1429
  return;
1421
1430
  }
1422
- this.#Y();
1431
+ this.#X();
1423
1432
  }
1424
1433
  }
1425
1434
  #Ut = (t) => {
1426
1435
  t.preventDefault();
1427
1436
  };
1428
1437
  #P() {
1429
- this.#at && (window.clearTimeout(this.#at), this.#at = 0);
1438
+ this.#lt && (window.clearTimeout(this.#lt), this.#lt = 0);
1430
1439
  }
1431
1440
  #ye = () => {
1432
- if (this.#at = 0, !(this.#x || this.#a || this.#F)) {
1441
+ if (this.#lt = 0, !(this.#x || this.#a || this.#L)) {
1433
1442
  if (this.#m()) {
1434
1443
  this.#s.classList.remove("is-controls-visible");
1435
1444
  return;
1436
1445
  }
1437
- this.#U || this.#s.classList.remove("is-pointer-active");
1446
+ this.#N || this.#s.classList.remove("is-pointer-active");
1438
1447
  }
1439
1448
  };
1440
1449
  #Nt(t = this.#m() ? this.#Ss : this.#Ht) {
1441
- this.#P(), this.#at = window.setTimeout(this.#ye, t);
1450
+ this.#P(), this.#lt = window.setTimeout(this.#ye, t);
1442
1451
  }
1443
1452
  #R() {
1444
1453
  this.#m() && this.#Nt(this.#Ss);
@@ -1449,12 +1458,12 @@ class A extends HTMLElement {
1449
1458
  return this.#s.classList.add("is-controls-visible"), this.#R(), !t;
1450
1459
  }
1451
1460
  #fs(t = !1) {
1452
- !t && this.#m() || (this.#s.classList.add("is-pointer-active"), this.#U ? this.#P() : this.#Nt(t ? this.#Ht : void 0));
1461
+ !t && this.#m() || (this.#s.classList.add("is-pointer-active"), this.#N ? this.#P() : this.#Nt(t ? this.#Ht : void 0));
1453
1462
  }
1454
1463
  #Yt() {
1455
- this.#U = !1, this.#P(), this.#s.classList.remove("is-pointer-active");
1464
+ this.#N = !1, this.#P(), this.#s.classList.remove("is-pointer-active");
1456
1465
  }
1457
- #vt(t) {
1466
+ #gt(t) {
1458
1467
  return t instanceof PointerEvent ? (this.#Dt = t.pointerType === "touch", this.#Dt ? !1 : (this.#os = t.clientX, this.#ns = t.clientY, !0)) : t instanceof MouseEvent ? (this.#Dt = !1, this.#os = t.clientX, this.#ns = t.clientY, !0) : !1;
1459
1468
  }
1460
1469
  #we(t, s) {
@@ -1468,24 +1477,24 @@ class A extends HTMLElement {
1468
1477
  return i.width <= 0 || i.height <= 0 ? !1 : s >= i.left && s <= i.right && e >= i.top && e <= i.bottom;
1469
1478
  }
1470
1479
  #zs() {
1471
- this.#v && (this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#s.style.setProperty("--sp-hover-fill-inset", "100%"), this.#xt(), this.#wt());
1480
+ this.#v && (this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#s.style.setProperty("--sp-hover-fill-inset", "100%"), this.#kt(), this.#xt());
1472
1481
  }
1473
1482
  #Is(t, s) {
1474
1483
  if (this.#m()) return;
1475
- !this.#p() && this.#Vs(this.#i, t, s) ? (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#W(t, !1, !1)) : this.#p() || this.#zs();
1476
- const e = this.#K.find((r) => !r.hidden && !this.#bs(r) && this.#Vs(r, t, s)) ?? null;
1484
+ !this.#p() && this.#Vs(this.#i, t, s) ? (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#j(t, !1, !1)) : this.#p() || this.#zs();
1485
+ const e = this.#G.find((r) => !r.hidden && !this.#bs(r) && this.#Vs(r, t, s)) ?? null;
1477
1486
  if (!e) return;
1478
1487
  const i = Number(e.dataset.spControlIndex ?? 0);
1479
- this.#j.style.setProperty("--sp-control-hover-offset", `calc(var(--sp-control-slot-size) * ${i})`);
1488
+ this.#Z.style.setProperty("--sp-control-hover-offset", `calc(var(--sp-control-slot-size) * ${i})`);
1480
1489
  }
1481
- #gt() {
1490
+ #yt() {
1482
1491
  return this.#s.classList.contains("is-controls-visible") || this.#s.classList.contains("is-pointer-active") || this.#r.activeElement instanceof HTMLElement;
1483
1492
  }
1484
1493
  #Xt() {
1485
1494
  return this.#m() && performance.now() < this.#rs;
1486
1495
  }
1487
1496
  #bs(t) {
1488
- return t instanceof HTMLButtonElement && (t.disabled || t === this.#o && !this.#T());
1497
+ return t instanceof HTMLButtonElement && (t.disabled || t === this.#n && !this.#F());
1489
1498
  }
1490
1499
  #Rs() {
1491
1500
  if (!this.#Dt && this.#we(this.#os, this.#ns)) {
@@ -1495,22 +1504,22 @@ class A extends HTMLElement {
1495
1504
  this.#Yt();
1496
1505
  }
1497
1506
  #_t = (t) => {
1498
- this.#vt(t) && this.#fs(!0);
1507
+ this.#gt(t) && this.#fs(!0);
1499
1508
  };
1500
1509
  #Wt = (t) => {
1501
- this.#vt(t) && ((t instanceof PointerEvent || t instanceof MouseEvent) && this.#Is(t.clientX, t.clientY), this.#fs(!0));
1510
+ this.#gt(t) && ((t instanceof PointerEvent || t instanceof MouseEvent) && this.#Is(t.clientX, t.clientY), this.#fs(!0));
1502
1511
  };
1503
1512
  #Ds = (t) => {
1504
- this.#vt(t) && ((t instanceof PointerEvent || t instanceof MouseEvent) && this.#Is(t.clientX, t.clientY), this.#Rs());
1513
+ this.#gt(t) && ((t instanceof PointerEvent || t instanceof MouseEvent) && this.#Is(t.clientX, t.clientY), this.#Rs());
1505
1514
  };
1506
1515
  #jt = () => {
1507
1516
  this.#Yt();
1508
1517
  };
1509
- #et = (t) => {
1510
- this.#vt(t) && (this.#U = !0, this.#s.classList.add("is-pointer-active"), this.#P());
1518
+ #it = (t) => {
1519
+ this.#gt(t) && (this.#N = !0, this.#s.classList.add("is-pointer-active"), this.#P());
1511
1520
  };
1512
- #it = () => {
1513
- this.#U = !1, this.#Nt(this.#Ht);
1521
+ #rt = () => {
1522
+ this.#N = !1, this.#Nt(this.#Ht);
1514
1523
  };
1515
1524
  #Hs = () => {
1516
1525
  this.#m() ? this.#s.classList.add("is-controls-visible") : this.#s.classList.add("is-pointer-active"), this.#P();
@@ -1522,57 +1531,57 @@ class A extends HTMLElement {
1522
1531
  const s = t.currentTarget;
1523
1532
  if (this.#bs(s)) return;
1524
1533
  const i = Number(s.dataset.spControlIndex ?? 0);
1525
- this.#j.style.setProperty("--sp-control-hover-offset", `calc(var(--sp-control-slot-size) * ${i})`);
1534
+ this.#Z.style.setProperty("--sp-control-hover-offset", `calc(var(--sp-control-slot-size) * ${i})`);
1526
1535
  };
1527
1536
  #vs() {
1528
- this.#mt && (window.clearTimeout(this.#mt), this.#mt = 0);
1537
+ this.#ft && (window.clearTimeout(this.#ft), this.#ft = 0);
1529
1538
  }
1530
1539
  #Bs = () => {
1531
- this.#mt = 0, this.#K.forEach((t) => t.classList.remove("is-control-tap-active")), this.style.removeProperty("--sp-touch-control-hover-offset");
1540
+ this.#ft = 0, this.#G.forEach((t) => t.classList.remove("is-control-tap-active")), this.style.removeProperty("--sp-touch-control-hover-offset");
1532
1541
  };
1533
1542
  #ke = (t) => {
1534
1543
  if (!(t instanceof PointerEvent) || t.pointerType !== "touch") return;
1535
1544
  const s = t.currentTarget;
1536
- if (!s || !this.#gt() || this.#bs(s)) return;
1545
+ if (!s || !this.#yt() || this.#bs(s)) return;
1537
1546
  const e = Number(s.dataset.spControlIndex ?? 0);
1538
- this.#vs(), this.#K.forEach((i) => i.classList.toggle("is-control-tap-active", i === s)), this.style.setProperty("--sp-touch-control-hover-offset", `calc(var(--sp-control-slot-size) * ${e})`), this.#mt = window.setTimeout(this.#Bs, 280);
1547
+ this.#vs(), this.#G.forEach((i) => i.classList.toggle("is-control-tap-active", i === s)), this.style.setProperty("--sp-touch-control-hover-offset", `calc(var(--sp-control-slot-size) * ${e})`), this.#ft = window.setTimeout(this.#Bs, 280);
1539
1548
  };
1540
1549
  #$s() {
1541
- this.#lt && (window.clearTimeout(this.#lt), this.#lt = 0);
1550
+ this.#ht && (window.clearTimeout(this.#ht), this.#ht = 0);
1542
1551
  }
1543
1552
  #Zt() {
1544
- this.#Q && (window.clearTimeout(this.#Q), this.#Q = 0);
1553
+ this.#tt && (window.clearTimeout(this.#tt), this.#tt = 0);
1545
1554
  }
1546
1555
  #gs() {
1547
- this.#tt && (window.clearTimeout(this.#tt), this.#tt = 0);
1556
+ this.#st && (window.clearTimeout(this.#st), this.#st = 0);
1548
1557
  }
1549
1558
  #Ot() {
1550
- this.#Vt && (window.clearTimeout(this.#Vt), this.#Vt = 0);
1559
+ this.#zt && (window.clearTimeout(this.#zt), this.#zt = 0);
1551
1560
  }
1552
1561
  #Us() {
1553
- this.#dt && (window.clearTimeout(this.#dt), this.#dt = 0);
1562
+ this.#mt && (window.clearTimeout(this.#mt), this.#mt = 0);
1554
1563
  }
1555
1564
  #Pe() {
1556
- this.#Us(), this.#s.classList.remove("is-volume-icon-animating"), this.#o.offsetWidth, this.#s.classList.add("is-volume-icon-animating"), this.#dt = window.setTimeout(() => {
1557
- this.#dt = 0, this.#s.classList.remove("is-volume-icon-animating");
1565
+ this.#Us(), this.#s.classList.remove("is-volume-icon-animating"), this.#n.offsetWidth, this.#s.classList.add("is-volume-icon-animating"), this.#mt = window.setTimeout(() => {
1566
+ this.#mt = 0, this.#s.classList.remove("is-volume-icon-animating");
1558
1567
  }, 240);
1559
1568
  }
1560
1569
  #Ns = () => {
1561
- if (this.#tt || this.#s.classList.contains("is-progress-settling")) {
1562
- if (this.#gs(), this.#ht) {
1570
+ if (this.#st || this.#s.classList.contains("is-progress-settling")) {
1571
+ if (this.#gs(), this.#ct) {
1563
1572
  this.#s.classList.remove("is-progress-settling");
1564
1573
  return;
1565
1574
  }
1566
- this.#ht = !0, this.#As = performance.now() + this.#ue, this.#p() || this.#l(), this.#g(), this.#s.classList.remove("is-progress-settling"), this.#u();
1575
+ this.#ct = !0, this.#As = performance.now() + this.#ue, this.#p() || this.#l(), this.#g(), this.#s.classList.remove("is-progress-settling"), this.#u();
1567
1576
  }
1568
1577
  };
1569
1578
  #Te() {
1570
- this.#ht || this.#tt || (this.#s.classList.add("is-progress-settling"), this.#_(0), this.#tt = window.setTimeout(this.#Ns, this.#pe));
1579
+ this.#ct || this.#st || (this.#s.classList.add("is-progress-settling"), this.#W(0), this.#st = window.setTimeout(this.#Ns, this.#pe));
1571
1580
  }
1572
- async #Y() {
1573
- if (this.#C) return;
1581
+ async #X() {
1582
+ if (this.#E) return;
1574
1583
  const t = this.#t.dataset.src || this.src;
1575
- t && (this.#Zt(), this.#Ot(), this.#is += 1, this.#C = !0, this.#A = !1, this.#L = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#s.classList.remove("has-visible-frame"), this.#Bt(), this.#t.src = t, this.#t.preload = "auto", this.#t.load(), this.#t.autoplay && this.#t.muted && await this.#t.play().catch(() => {
1584
+ t && (this.#Zt(), this.#Ot(), this.#is += 1, this.#E = !0, this.#C = !1, this.#A = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#s.classList.remove("has-visible-frame"), this.#Bt(), this.#t.src = t, this.#t.preload = "auto", this.#t.load(), this.#t.autoplay && this.#t.muted && await this.#t.play().catch(() => {
1576
1585
  }));
1577
1586
  }
1578
1587
  #Ys() {
@@ -1593,14 +1602,14 @@ class A extends HTMLElement {
1593
1602
  return 0;
1594
1603
  }
1595
1604
  #Xs(t = this.#fe) {
1596
- if (!this.#C || this.#t.error || !this.#s.classList.contains("has-loaded-once") || !Number.isFinite(this.#t.duration) || this.#t.duration <= 0) return !1;
1605
+ if (!this.#E || this.#t.error || !this.#s.classList.contains("has-loaded-once") || !Number.isFinite(this.#t.duration) || this.#t.duration <= 0) return !1;
1597
1606
  const s = Math.max(0, this.#t.duration - this.#t.currentTime), e = Math.min(t, s);
1598
1607
  return e <= this.#qt || this.#Ee() + this.#qt >= e;
1599
1608
  }
1600
- #yt(t, s = !1) {
1609
+ #wt(t, s = !1) {
1601
1610
  this.#$s();
1602
- const e = t && !this.#Ys() && !this.#Xs(), r = t && !this.#L || e;
1603
- if (this.#zt = r, !r) {
1611
+ const e = t && !this.#Ys() && !this.#Xs(), r = t && !this.#A || e;
1612
+ if (this.#It = r, !r) {
1604
1613
  this.#s.classList.remove("is-loading");
1605
1614
  return;
1606
1615
  }
@@ -1608,50 +1617,50 @@ class A extends HTMLElement {
1608
1617
  this.#s.classList.add("is-loading");
1609
1618
  return;
1610
1619
  }
1611
- this.#lt = window.setTimeout(() => {
1612
- if (this.#lt = 0, !this.#L || !this.#Ys() && !this.#Xs()) {
1613
- this.#zt = !0, this.#s.classList.add("is-loading");
1620
+ this.#ht = window.setTimeout(() => {
1621
+ if (this.#ht = 0, !this.#A || !this.#Ys() && !this.#Xs()) {
1622
+ this.#It = !0, this.#s.classList.add("is-loading");
1614
1623
  return;
1615
1624
  }
1616
- this.#zt = !1, this.#s.classList.remove("is-loading");
1625
+ this.#It = !1, this.#s.classList.remove("is-loading");
1617
1626
  }, this.#ce);
1618
1627
  }
1619
1628
  #w = () => {
1620
1629
  if (this.#t.error) {
1621
- this.#yt(!0, !0);
1630
+ this.#wt(!0, !0);
1622
1631
  return;
1623
1632
  }
1624
- this.#yt(
1625
- !this.#C || !this.#L || this.#t.readyState < HTMLMediaElement.HAVE_FUTURE_DATA
1633
+ this.#wt(
1634
+ !this.#E || !this.#A || this.#t.readyState < HTMLMediaElement.HAVE_FUTURE_DATA
1626
1635
  );
1627
1636
  };
1628
1637
  #Ce() {
1629
- return this.#C && !this.#t.error && this.#A && (this.#t.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA || this.#t.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !this.#s.classList.contains("is-loading"));
1638
+ return this.#E && !this.#t.error && this.#C && (this.#t.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA || this.#t.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !this.#s.classList.contains("is-loading"));
1630
1639
  }
1631
1640
  #p() {
1632
1641
  return this.#x || this.#a || this.#I;
1633
1642
  }
1634
1643
  #Ae() {
1635
- this.#is >= this.#me || this.#Q || (this.#Q = window.setTimeout(() => {
1636
- this.#Q = 0, this.#Ot(), this.#C = !1, this.#A = !1, this.#L = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#s.classList.remove("has-visible-frame"), this.#s.classList.contains("has-loaded-once") || this.#_(0), this.#t.removeAttribute("src"), this.#t.load(), this.#Y();
1644
+ this.#is >= this.#me || this.#tt || (this.#tt = window.setTimeout(() => {
1645
+ this.#tt = 0, this.#Ot(), this.#E = !1, this.#C = !1, this.#A = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#s.classList.remove("has-visible-frame"), this.#s.classList.contains("has-loaded-once") || this.#W(0), this.#t.removeAttribute("src"), this.#t.load(), this.#X();
1637
1646
  }, this.#de));
1638
1647
  }
1639
1648
  #_s() {
1640
- return this.#I ? (this.#I = !1, this.#nt = !1, this.#l(), this.#g(), !0) : !1;
1649
+ return this.#I ? (this.#I = !1, this.#at = !1, this.#l(), this.#g(), !0) : !1;
1641
1650
  }
1642
1651
  #Ws() {
1643
1652
  return this.#Zt(), !this.#s.classList.contains("has-loaded-once") && this.#Te(), this.#s.classList.add("has-loaded-once"), this.#s.classList.add("has-visible-frame"), this.#w(), this.#b = null, this.#I ? (this.#_s(), !0) : (this.#p() || this.#l(), this.#g(), !0);
1644
1653
  }
1645
1654
  #Le() {
1646
- if (this.#A || this.#q || this.#t.error) return;
1655
+ if (this.#C || this.#q || this.#t.error) return;
1647
1656
  this.#q = !0;
1648
1657
  const t = this.#$, s = () => {
1649
1658
  if (t === this.#$) {
1650
- if (this.#Ot(), this.#q = !1, this.#A = !this.#t.error && this.#t.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && this.#t.videoWidth > 0 && this.#t.videoHeight > 0, this.#A) {
1651
- if (this.#B || this.#L) return;
1659
+ if (this.#Ot(), this.#q = !1, this.#C = !this.#t.error && this.#t.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && this.#t.videoWidth > 0 && this.#t.videoHeight > 0, this.#C) {
1660
+ if (this.#B || this.#A) return;
1652
1661
  this.#B = !0, window.requestAnimationFrame(() => {
1653
1662
  window.requestAnimationFrame(() => {
1654
- t === this.#$ && (this.#B = !1, this.#L = !0, this.#Ws(), this.#u());
1663
+ t === this.#$ && (this.#B = !1, this.#A = !0, this.#Ws(), this.#u());
1655
1664
  });
1656
1665
  }), this.#u();
1657
1666
  return;
@@ -1660,7 +1669,7 @@ class A extends HTMLElement {
1660
1669
  }
1661
1670
  };
1662
1671
  if ("requestVideoFrameCallback" in this.#t) {
1663
- this.#t.requestVideoFrameCallback(s), this.#Vt = window.setTimeout(s, 180);
1672
+ this.#t.requestVideoFrameCallback(s), this.#zt = window.setTimeout(s, 180);
1664
1673
  return;
1665
1674
  }
1666
1675
  window.requestAnimationFrame(s);
@@ -1668,7 +1677,7 @@ class A extends HTMLElement {
1668
1677
  #Kt = () => {
1669
1678
  if (this.#t.error || this.#t.readyState < HTMLMediaElement.HAVE_CURRENT_DATA || this.#t.videoWidth <= 0 || this.#t.videoHeight <= 0)
1670
1679
  return this.#w(), !1;
1671
- if (!this.#A)
1680
+ if (!this.#C)
1672
1681
  return this.#Le(), this.#w(), !1;
1673
1682
  const t = this.#Ws();
1674
1683
  return this.#y(), t;
@@ -1680,43 +1689,43 @@ class A extends HTMLElement {
1680
1689
  this.#Ls = Number.isFinite(t) ? Math.max(0, t) : 0, this.#Fs = performance.now();
1681
1690
  }
1682
1691
  #H() {
1683
- this.#k = null, this.#st = null;
1692
+ this.#k = null, this.#et = null;
1684
1693
  }
1685
1694
  #Zs() {
1686
1695
  if (!Number.isFinite(this.#t.duration) || this.#t.duration <= 0) {
1687
1696
  this.#k = null;
1688
1697
  return;
1689
1698
  }
1690
- const t = Number.isFinite(this.#t.currentTime) ? Math.max(0, this.#t.currentTime) : 0, s = Number.isFinite(this.#ct) ? this.#ct : t;
1699
+ const t = Number.isFinite(this.#t.currentTime) ? Math.max(0, this.#t.currentTime) : 0, s = Number.isFinite(this.#pt) ? this.#pt : t;
1691
1700
  this.#k = Math.min(this.#t.duration, Math.max(t, s)), this.#l(this.#k);
1692
1701
  }
1693
1702
  #Fe() {
1694
1703
  if (!Number.isFinite(this.#t.duration) || this.#t.duration <= 0) {
1695
- this.#st = null, this.#Zs();
1704
+ this.#et = null, this.#Zs();
1696
1705
  return;
1697
1706
  }
1698
- const t = this.#s.style.getPropertyValue("--sp-progress-inset"), s = Number.parseFloat(t), e = Number.isFinite(s) ? Math.min(1, Math.max(0, 1 - s / 100)) : null, i = this.#X(), r = Math.min(1, Math.max(0, i / this.#t.duration)), n = Math.max(e ?? 0, r);
1699
- this.#st = n, this.#k = n * this.#t.duration, this.#l(this.#k), this.#_(n), this.#i.setAttribute("aria-valuenow", `${this.#k}`), this.#i.setAttribute(
1707
+ const t = this.#s.style.getPropertyValue("--sp-progress-inset"), s = Number.parseFloat(t), e = Number.isFinite(s) ? Math.min(1, Math.max(0, 1 - s / 100)) : null, i = this.#_(), r = Math.min(1, Math.max(0, i / this.#t.duration)), n = Math.max(e ?? 0, r);
1708
+ this.#et = n, this.#k = n * this.#t.duration, this.#l(this.#k), this.#W(n), this.#i.setAttribute("aria-valuenow", `${this.#k}`), this.#i.setAttribute(
1700
1709
  "aria-valuetext",
1701
1710
  `${a(this.#k)} of ${a(this.#t.duration)}`
1702
1711
  );
1703
1712
  }
1704
- #X() {
1713
+ #_() {
1705
1714
  if (!Number.isFinite(this.#t.duration) || this.#t.duration <= 0) return this.#t.currentTime || 0;
1706
1715
  if (this.#p()) return this.#f;
1707
1716
  if (this.#k !== null) return this.#k;
1708
1717
  if (!this.#js()) return this.#t.currentTime || 0;
1709
- if (this.#zt || !this.#ht || performance.now() < this.#As)
1718
+ if (this.#It || !this.#ct || performance.now() < this.#As)
1710
1719
  return this.#l(), this.#t.currentTime || 0;
1711
1720
  if (this.#s.classList.contains("is-loading") && this.#t.readyState < HTMLMediaElement.HAVE_FUTURE_DATA)
1712
1721
  return this.#l(), this.#t.currentTime || 0;
1713
1722
  const t = (performance.now() - this.#Fs) / 1e3, s = this.#Ls + t, e = this.#t.loop ? s % this.#t.duration : Math.min(s, this.#t.duration);
1714
1723
  return !this.#t.loop && this.#t.currentTime - e > 0.45 ? (this.#l(), this.#t.currentTime) : e;
1715
1724
  }
1716
- #_(t) {
1717
- const s = Math.min(1, Math.max(0, t)), e = (1 - s) * 100, { innerWidth: i } = this.#Me(), r = 1 / i, n = this.#a && this.#Ft && this.#J + r < s;
1725
+ #W(t) {
1726
+ const s = Math.min(1, Math.max(0, t)), e = (1 - s) * 100, { innerWidth: i } = this.#Me(), r = 1 / i, n = this.#a && this.#St && this.#Q + r < s;
1718
1727
  if (this.#s.style.setProperty("--sp-progress-inset", `${e}%`), this.#s.style.setProperty("--sp-return-marker-base-opacity", n ? "0" : "1"), n) {
1719
- const l = this.#Gt(this.#J), h = Math.max(0, i - 2), d = Math.min(h, Math.max(0, l - 3));
1728
+ const l = this.#Gt(this.#Q), h = Math.max(0, i - 2), d = Math.min(h, Math.max(0, l - 3));
1720
1729
  this.#s.style.setProperty("--sp-return-marker-hole-left", `${d}px`);
1721
1730
  } else
1722
1731
  this.#s.style.setProperty("--sp-return-marker-hole-left", "-9999px");
@@ -1734,117 +1743,117 @@ class A extends HTMLElement {
1734
1743
  return E(t, s);
1735
1744
  }
1736
1745
  #ze(t) {
1737
- this.#Lt = Number.isFinite(t) ? Math.max(0, t) : 0, this.#J = this.#Se(this.#Lt);
1738
- const s = this.#i.getBoundingClientRect(), e = this.#Gt(this.#J, s), i = e >= this.#hs && e <= Math.max(this.#hs, s.width - this.#hs);
1739
- this.#Ft = this.#Lt > this.#le && i, this.#s.classList.toggle("has-return-marker", this.#Ft), this.#s.style.setProperty("--sp-return-marker-left", `${e}px`);
1746
+ this.#Ft = Number.isFinite(t) ? Math.max(0, t) : 0, this.#Q = this.#Se(this.#Ft);
1747
+ const s = this.#i.getBoundingClientRect(), e = this.#Gt(this.#Q, s), i = e >= this.#hs && e <= Math.max(this.#hs, s.width - this.#hs);
1748
+ this.#St = this.#Ft > this.#le && i, this.#s.classList.toggle("has-return-marker", this.#St), this.#s.style.setProperty("--sp-return-marker-left", `${e}px`);
1740
1749
  }
1741
1750
  #Ie(t, s, e, i = this.#a) {
1742
1751
  const r = e * this.#t.duration;
1743
- if (!i || !this.#Ft)
1752
+ if (!i || !this.#St)
1744
1753
  return { percent: e, targetTime: r };
1745
- const n = s.left + this.#Gt(this.#J, s);
1754
+ const n = s.left + this.#Gt(this.#Q, s);
1746
1755
  return Math.abs(t - n) <= this.#ae ? {
1747
- percent: this.#J,
1748
- targetTime: this.#Lt
1756
+ percent: this.#Q,
1757
+ targetTime: this.#Ft
1749
1758
  } : { percent: e, targetTime: r };
1750
1759
  }
1751
- #wt(t = this.#X()) {
1752
- !this.#bt || this.#v || this.#p() || (this.#c.textContent = this.#ks(t), this.#$t());
1760
+ #xt(t = this.#_()) {
1761
+ !this.#vt || this.#v || this.#p() || (this.#c.textContent = this.#ks(t), this.#$t());
1753
1762
  }
1754
- #g(t = this.#X()) {
1763
+ #g(t = this.#_()) {
1755
1764
  const s = Number.isFinite(this.#t.duration) && this.#t.duration > 0;
1756
- if (s && this.#st !== null) {
1757
- const r = this.#st * this.#t.duration;
1758
- this.#ct = r, this.#_(this.#st), this.#i.setAttribute("aria-valuemin", "0"), this.#i.setAttribute("aria-valuemax", `${this.#t.duration}`), this.#i.setAttribute("aria-valuenow", `${r}`), this.#i.setAttribute(
1765
+ if (s && this.#et !== null) {
1766
+ const r = this.#et * this.#t.duration;
1767
+ this.#pt = r, this.#W(this.#et), this.#i.setAttribute("aria-valuemin", "0"), this.#i.setAttribute("aria-valuemax", `${this.#t.duration}`), this.#i.setAttribute("aria-valuenow", `${r}`), this.#i.setAttribute(
1759
1768
  "aria-valuetext",
1760
1769
  `${a(r)} of ${a(this.#t.duration)}`
1761
- ), this.#wt(r);
1770
+ ), this.#xt(r);
1762
1771
  return;
1763
1772
  }
1764
1773
  const e = s ? Math.min(this.#t.duration, Math.max(0, t)) : t, i = s ? e / this.#t.duration : 0;
1765
- this.#ct = Number.isFinite(e) ? Math.max(0, e) : 0, this.#_(i), this.#i.setAttribute("aria-valuemin", "0"), this.#i.setAttribute("aria-valuemax", s ? `${this.#t.duration}` : "0"), this.#i.setAttribute("aria-valuenow", s ? `${e}` : "0"), this.#i.setAttribute(
1774
+ this.#pt = Number.isFinite(e) ? Math.max(0, e) : 0, this.#W(i), this.#i.setAttribute("aria-valuemin", "0"), this.#i.setAttribute("aria-valuemax", s ? `${this.#t.duration}` : "0"), this.#i.setAttribute("aria-valuenow", s ? `${e}` : "0"), this.#i.setAttribute(
1766
1775
  "aria-valuetext",
1767
1776
  s ? `${a(e)} of ${a(this.#t.duration)}` : "Loading video"
1768
- ), this.#wt(e);
1777
+ ), this.#xt(e);
1769
1778
  }
1770
- #W(t, s = this.#a, e = !0) {
1779
+ #j(t, s = this.#a, e = !0) {
1771
1780
  if (!Number.isFinite(this.#t.duration) || this.#t.duration <= 0) return this.#t.currentTime;
1772
1781
  const i = this.#i.getBoundingClientRect(), r = this.#Ve(t, i), n = this.#Ie(t, i, r, s);
1773
- return this.#s.style.setProperty("--sp-hover-fill-inset", `${(1 - r) * 100}%`), e && this.#_(n.percent), this.#bt || this.#s.style.setProperty("--sp-scrub-preview-left", `${this.#Gt(n.percent, i)}px`), this.#Es.textContent = a(n.targetTime), this.#c.textContent = this.#ks(n.targetTime), this.#$t(), e && (this.#i.setAttribute("aria-valuenow", `${n.targetTime}`), this.#i.setAttribute(
1782
+ return this.#s.style.setProperty("--sp-hover-fill-inset", `${(1 - r) * 100}%`), e && this.#W(n.percent), this.#vt || this.#s.style.setProperty("--sp-scrub-preview-left", `${this.#Gt(n.percent, i)}px`), this.#Es.textContent = a(n.targetTime), this.#c.textContent = this.#ks(n.targetTime), this.#$t(), e && (this.#i.setAttribute("aria-valuenow", `${n.targetTime}`), this.#i.setAttribute(
1774
1783
  "aria-valuetext",
1775
1784
  `${a(n.targetTime)} of ${a(this.#t.duration)}`
1776
1785
  )), this.#Re(), n.targetTime;
1777
1786
  }
1778
- #xt() {
1779
- this.#It = !1, this.#s?.classList.remove("has-controls-collision");
1787
+ #kt() {
1788
+ this.#Rt = !1, this.#s?.classList.remove("has-controls-collision");
1780
1789
  }
1781
1790
  #Re() {
1782
- if (!this.#a && !this.#v || !this.#V || !this.#ss || this.#bt) {
1783
- this.#xt();
1791
+ if (!this.#a && !this.#v || !this.#V || !this.#ss || this.#vt) {
1792
+ this.#kt();
1784
1793
  return;
1785
1794
  }
1786
- const t = this.#V.getBoundingClientRect(), s = this.#ss.getBoundingClientRect(), e = t.width > 0 && t.height > 0, i = this.#It ? this.#ve : this.#be, r = e && s.right >= t.left - i && s.left <= t.right + i && s.bottom >= t.top - i && s.top <= t.bottom + i;
1787
- this.#It = r, this.#s.classList.toggle("has-controls-collision", this.#It);
1795
+ const t = this.#V.getBoundingClientRect(), s = this.#ss.getBoundingClientRect(), e = t.width > 0 && t.height > 0, i = this.#Rt ? this.#ve : this.#be, r = e && s.right >= t.left - i && s.left <= t.right + i && s.bottom >= t.top - i && s.top <= t.bottom + i;
1796
+ this.#Rt = r, this.#s.classList.toggle("has-controls-collision", this.#Rt);
1788
1797
  }
1789
- #kt() {
1790
- this.#ot && (window.cancelAnimationFrame(this.#ot), this.#ot = 0);
1798
+ #Pt() {
1799
+ this.#nt && (window.cancelAnimationFrame(this.#nt), this.#nt = 0);
1791
1800
  }
1792
1801
  #De() {
1793
- this.#kt(), this.#l();
1802
+ this.#Pt(), this.#l();
1794
1803
  const t = () => {
1795
- this.#g(this.#X()), this.#js() && (this.#ot = window.requestAnimationFrame(t));
1804
+ this.#g(this.#_()), this.#js() && (this.#nt = window.requestAnimationFrame(t));
1796
1805
  };
1797
- this.#ot = window.requestAnimationFrame(t);
1806
+ this.#nt = window.requestAnimationFrame(t);
1798
1807
  }
1799
1808
  #u() {
1800
- const t = !this.#t.paused && (!this.#t.ended || this.#t.loop) || this.#a && this.#G, s = this.#b ? this.#b === "playing" : t;
1809
+ const t = !this.#t.paused && (!this.#t.ended || this.#t.loop) || this.#a && this.#J, s = this.#b ? this.#b === "playing" : t;
1801
1810
  if (this.#s.classList.toggle("is-playing", s), this.#M.setAttribute("aria-label", s ? "Pause video" : "Play video"), this.#a) {
1802
- this.#kt();
1811
+ this.#Pt();
1803
1812
  return;
1804
1813
  }
1805
- t && this.#s.classList.contains("has-loaded-once") && !this.#s.classList.contains("is-progress-settling") ? this.#De() : (this.#kt(), this.#g());
1814
+ t && this.#s.classList.contains("has-loaded-once") && !this.#s.classList.contains("is-progress-settling") ? this.#De() : (this.#Pt(), this.#g());
1806
1815
  }
1807
- #rt() {
1808
- this.#St && (window.clearTimeout(this.#St), this.#St = 0);
1816
+ #ot() {
1817
+ this.#Mt && (window.clearTimeout(this.#Mt), this.#Mt = 0);
1809
1818
  }
1810
1819
  #He() {
1811
1820
  return k(this.#t);
1812
1821
  }
1813
- #T() {
1814
- return this.volumeEnabled && this.#pt && this.#Rt;
1822
+ #F() {
1823
+ return this.volumeEnabled && this.#U && this.#ut;
1815
1824
  }
1816
1825
  #S() {
1817
- this.#Ct(), this.#Jt(this.#n), this.#F = !1, this.#N = !1, this.#n = null, this.#o.classList.remove("is-volume-open", "is-control-tap-active"), this.#z.classList.remove("is-scrubbing-volume");
1826
+ this.#At(), this.#Jt(this.#o), this.#L = !1, this.#Y = !1, this.#o = null, this.#n.classList.remove("is-volume-open", "is-control-tap-active"), this.#z.classList.remove("is-scrubbing-volume");
1818
1827
  }
1819
1828
  #y = () => {
1820
1829
  if (!this.volumeEnabled) {
1821
- this.#s.classList.remove("is-volume-unavailable", "is-volume-muted", "is-volume-sound", "is-volume-icon-animating"), this.#S(), this.#o.disabled = !0, this.#o.setAttribute("aria-disabled", "true");
1830
+ this.#s.classList.remove("is-volume-unavailable", "is-volume-muted", "is-volume-sound", "is-volume-icon-animating"), this.#S(), this.#n.disabled = !0, this.#n.setAttribute("aria-disabled", "true");
1822
1831
  return;
1823
1832
  }
1824
- if (!this.#pt) {
1825
- const l = this.#He();
1826
- l !== "unknown" ? (this.#pt = !0, this.#Rt = l === "available") : this.#t.readyState >= HTMLMediaElement.HAVE_METADATA && !P(this.#t) && (this.#pt = !0, this.#Rt = !0);
1833
+ if (!this.#U) {
1834
+ const n = this.#He();
1835
+ n !== "unknown" ? (this.#U = !0, this.#ut = n === "available") : this.#t.readyState >= HTMLMediaElement.HAVE_METADATA && !P(this.#t) && (this.#U = !0, this.#ut = !0);
1827
1836
  }
1828
- const t = this.#o.hidden, s = this.#T(), e = !s || this.#t.muted || this.#t.volume <= 0, i = s && !this.#t.muted ? this.#t.volume : 0, r = Math.round(i * 100), n = e ? "muted" : "sound";
1829
- this.#as && this.#as !== n && this.#Pe(), this.#as = n, this.#s.classList.toggle("is-volume-unavailable", !s), this.#s.classList.toggle("is-volume-muted", e), this.#s.classList.toggle("is-volume-sound", !e), this.#s.style.setProperty("--sp-volume-level", `${r}%`), this.#o.disabled = !s, this.#o.setAttribute("aria-disabled", `${!s}`), this.#o.setAttribute(
1837
+ const t = this.#F(), s = !t || this.#t.muted || this.#t.volume <= 0, e = t && !this.#t.muted ? this.#t.volume : 0, i = Math.round(e * 100), r = s ? "muted" : "sound";
1838
+ this.#as && this.#as !== r && this.#Pe(), this.#as = r, this.#s.classList.toggle("is-volume-unavailable", !t), this.#s.classList.toggle("is-volume-muted", s), this.#s.classList.toggle("is-volume-sound", !s), this.#s.style.setProperty("--sp-volume-level", `${i}%`), this.#n.disabled = !t, this.#n.setAttribute("aria-disabled", `${!t}`), this.#n.setAttribute(
1830
1839
  "aria-label",
1831
- s ? e ? "Unmute video" : "Mute video" : "Video has no audio"
1832
- ), this.#d.setAttribute("aria-valuenow", `${r}`), this.#d.setAttribute("aria-valuetext", `${r}%`), s || this.#S(), t === s && this.#us();
1840
+ t ? s ? "Unmute video" : "Mute video" : "Video has no audio"
1841
+ ), this.#d.setAttribute("aria-valuenow", `${i}`), this.#d.setAttribute("aria-valuetext", `${i}%`), t || this.#S(), this.#U && this.#us();
1833
1842
  };
1834
1843
  #Os(t) {
1835
- if (!this.#T()) return;
1844
+ if (!this.#F()) return;
1836
1845
  const s = this.#d.getBoundingClientRect(), e = Math.min(1, Math.max(0, 1 - (t - s.top) / s.height)), i = Math.round(e * 100) / 100;
1837
1846
  this.#t.volume = i, this.#t.muted = i <= 0, this.#y();
1838
1847
  }
1839
1848
  #Jt(t) {
1840
1849
  t !== null && this.#d.hasPointerCapture(t) && this.#d.releasePointerCapture(t);
1841
1850
  }
1842
- #Pt(t) {
1843
- this.#F = !1, this.#n = null, this.#z.classList.remove("is-scrubbing-volume"), this.#d.blur(), this.#Jt(t), this.#te(260);
1851
+ #Tt(t) {
1852
+ this.#L = !1, this.#o = null, this.#z.classList.remove("is-scrubbing-volume"), this.#d.blur(), this.#Jt(t), this.#te(260);
1844
1853
  }
1845
- #Tt = () => {
1854
+ #Et = () => {
1846
1855
  const t = document.pictureInPictureElement === this.#t, s = this.#t, e = !!(this.pictureInPictureEnabled && document.pictureInPictureEnabled && s.requestPictureInPicture);
1847
- this.#s.classList.toggle("is-picture-in-picture", t), this.#Z.disabled = !e, this.#Z.setAttribute("aria-label", t ? "Exit picture in picture" : "Enter picture in picture");
1856
+ this.#s.classList.toggle("is-picture-in-picture", t), this.#O.disabled = !e, this.#O.setAttribute("aria-label", t ? "Exit picture in picture" : "Enter picture in picture");
1848
1857
  };
1849
1858
  #ys() {
1850
1859
  return b(this.#r);
@@ -1863,19 +1872,19 @@ class A extends HTMLElement {
1863
1872
  }
1864
1873
  #Qt = () => {
1865
1874
  const t = this.#ys(), s = t === this.#s || t === this, e = this.#Ks();
1866
- return this.#s.classList.toggle("is-fullscreen", s), this.#O.disabled = !e, this.#O.setAttribute("aria-label", s ? "Exit fullscreen" : "Enter fullscreen"), s;
1875
+ return this.#s.classList.toggle("is-fullscreen", s), this.#K.disabled = !e, this.#K.setAttribute("aria-label", s ? "Exit fullscreen" : "Enter fullscreen"), s;
1867
1876
  };
1868
- #Et = () => {
1877
+ #Ct = () => {
1869
1878
  const t = this.#Qt();
1870
1879
  this.#Ue(t);
1871
1880
  };
1872
1881
  #Ue(t) {
1873
- this.#P(), this.#Ct(), this.#ws(this.#h), this.#Jt(this.#n), this.#rt(), this.#x = !1, this.#a = !1, this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#h = null, this.#U = !1, this.#N = !1, this.#F = !1, this.#n = null, this.#vs(), this.#Bs(), this.#j.style.removeProperty("--sp-control-hover-offset"), this.#o.classList.remove("is-volume-open"), this.#z.classList.remove("is-scrubbing-volume"), this.#s.classList.remove("is-scrubbing"), this.#s.classList.remove("is-pointer-active");
1882
+ this.#P(), this.#At(), this.#ws(this.#h), this.#Jt(this.#o), this.#ot(), this.#x = !1, this.#a = !1, this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#h = null, this.#N = !1, this.#Y = !1, this.#L = !1, this.#o = null, this.#vs(), this.#Bs(), this.#Z.style.removeProperty("--sp-control-hover-offset"), this.#n.classList.remove("is-volume-open"), this.#z.classList.remove("is-scrubbing-volume"), this.#s.classList.remove("is-scrubbing"), this.#s.classList.remove("is-pointer-active");
1874
1883
  const s = this.#r.activeElement;
1875
1884
  s instanceof HTMLElement && s.blur(), t ? this.#Rs() : this.#Yt();
1876
1885
  }
1877
1886
  #Gs = () => {
1878
- !this.#x || this.#a || (this.#H(), this.#P(), this.#rt(), this.#a = !0, this.#s.classList.add("is-scrubbing"), this.#f = this.#W(this.#es, !0), this.#G && this.#t.pause(), this.#t.currentTime = this.#f, this.#l(this.#f), this.#g(this.#f), this.#kt(), this.#u());
1887
+ !this.#x || this.#a || (this.#H(), this.#P(), this.#ot(), this.#a = !0, this.#s.classList.add("is-scrubbing"), this.#f = this.#j(this.#es, !0), this.#J && this.#t.pause(), this.#t.currentTime = this.#f, this.#l(this.#f), this.#g(this.#f), this.#Pt(), this.#u());
1879
1888
  };
1880
1889
  #ws(t) {
1881
1890
  t !== null && this.#i.hasPointerCapture(t) && this.#i.releasePointerCapture(t);
@@ -1883,10 +1892,10 @@ class A extends HTMLElement {
1883
1892
  async #Js(t, s, e) {
1884
1893
  if (!this.#x && !this.#a) return;
1885
1894
  const i = this.#a;
1886
- this.#rt(), this.#x = !1, this.#a = !1, this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#s.style.setProperty("--sp-hover-fill-inset", "100%"), this.#h = null, this.#s.classList.remove("is-scrubbing"), this.#xt(), this.#ws(s), e && t !== null && (this.#H(), this.#f = this.#W(t, i), this.#I = !0, this.#nt = this.#G, this.#t.currentTime = this.#f, this.#l(this.#f)), this.#g(this.#f), i && this.#G && await this.#t.play(), this.#R();
1895
+ this.#ot(), this.#x = !1, this.#a = !1, this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#s.style.setProperty("--sp-hover-fill-inset", "100%"), this.#h = null, this.#s.classList.remove("is-scrubbing"), this.#kt(), this.#ws(s), e && t !== null && (this.#H(), this.#f = this.#j(t, i), this.#I = !0, this.#at = this.#J, this.#t.currentTime = this.#f, this.#l(this.#f)), this.#g(this.#f), i && this.#J && await this.#t.play(), this.#R();
1887
1896
  }
1888
1897
  #xs(t) {
1889
- !this.#x && !this.#a || (this.#rt(), this.#x = !1, this.#a = !1, this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#s.style.setProperty("--sp-hover-fill-inset", "100%"), this.#h = null, this.#s.classList.remove("is-scrubbing"), this.#xt(), this.#ws(t), this.#l(), this.#g(), this.#G && this.#t.play(), this.#R());
1898
+ !this.#x && !this.#a || (this.#ot(), this.#x = !1, this.#a = !1, this.#v = !1, this.#s.classList.remove("is-progress-hovering"), this.#s.style.setProperty("--sp-hover-fill-inset", "100%"), this.#h = null, this.#s.classList.remove("is-scrubbing"), this.#kt(), this.#ws(t), this.#l(), this.#g(), this.#J && this.#t.play(), this.#R());
1890
1899
  }
1891
1900
  #ks(t) {
1892
1901
  if (!this.#ls) return a(t);
@@ -1894,94 +1903,94 @@ class A extends HTMLElement {
1894
1903
  return s <= 0 ? a(t) : `-${a(Math.max(0, s - t))}`;
1895
1904
  }
1896
1905
  #Ne() {
1897
- this.#ft && (window.clearTimeout(this.#ft), this.#ft = 0);
1906
+ this.#bt && (window.clearTimeout(this.#bt), this.#bt = 0);
1898
1907
  }
1899
1908
  #Ye() {
1900
- this.#Ne(), this.#c.classList.remove("is-time-animating"), this.#c.offsetWidth, this.#c.classList.add("is-time-animating"), this.#ft = window.setTimeout(() => {
1901
- this.#ft = 0, this.#c.classList.remove("is-time-animating");
1909
+ this.#Ne(), this.#c.classList.remove("is-time-animating"), this.#c.offsetWidth, this.#c.classList.add("is-time-animating"), this.#bt = window.setTimeout(() => {
1910
+ this.#bt = 0, this.#c.classList.remove("is-time-animating");
1902
1911
  }, 240);
1903
1912
  }
1904
1913
  #Xe = (t) => {
1905
- t.stopPropagation(), this.#ls = !this.#ls, this.#Ye(), this.#p() || this.#v ? this.#c && (this.#c.textContent = this.#ks(this.#f), this.#$t()) : this.#wt(this.#X());
1914
+ t.stopPropagation(), this.#ls = !this.#ls, this.#Ye(), this.#p() || this.#v ? this.#c && (this.#c.textContent = this.#ks(this.#f), this.#$t()) : this.#xt(this.#_());
1906
1915
  };
1907
1916
  #_e = async () => {
1908
1917
  if (performance.now() < this.#Cs)
1909
1918
  return;
1910
1919
  const t = this.#b ? this.#b !== "playing" : this.#t.paused || this.#t.ended, s = !t || this.#Ce();
1911
- this.#D(), s && (this.#b = t ? "playing" : "paused", this.#u()), t ? (this.#H(), await this.#Y(), await this.#t.play().catch(() => {
1920
+ this.#D(), s && (this.#b = t ? "playing" : "paused", this.#u()), t ? (this.#H(), await this.#X(), await this.#t.play().catch(() => {
1912
1921
  this.#b = null;
1913
1922
  })) : (this.#Fe(), this.#t.pause()), this.#u(), this.#R();
1914
1923
  };
1915
1924
  #We = (t) => {
1916
1925
  if (!(t instanceof PointerEvent)) return;
1917
1926
  const s = this.#M.getBoundingClientRect(), e = t.clientX >= s.left && t.clientX <= s.right && t.clientY >= s.top && t.clientY <= s.bottom, i = this.#V.getBoundingClientRect(), r = t.clientX >= i.left && t.clientX <= i.right && t.clientY >= i.top && t.clientY <= i.bottom, n = this.#i.getBoundingClientRect(), l = t.clientX >= n.left && t.clientX <= n.right && t.clientY >= n.top && t.clientY <= n.bottom, h = this.#D();
1918
- h && e && (this.#Cs = performance.now() + 260), h && (r || l) && (this.#rs = performance.now() + 260), this.#Y();
1927
+ h && e && (this.#Cs = performance.now() + 260), h && (r || l) && (this.#rs = performance.now() + 260), this.#X();
1919
1928
  };
1920
1929
  #je = (t) => {
1921
1930
  t.stopPropagation();
1922
1931
  };
1923
- #Ct() {
1924
- this.#ut && (window.clearTimeout(this.#ut), this.#ut = 0);
1932
+ #At() {
1933
+ this.#dt && (window.clearTimeout(this.#dt), this.#dt = 0);
1925
1934
  }
1926
1935
  #Qs() {
1927
- if (!this.#T() || !this.volumeSliderEnabled) {
1936
+ if (!this.#F() || !this.volumeSliderEnabled) {
1928
1937
  this.#S();
1929
1938
  return;
1930
1939
  }
1931
- this.#Ct(), this.#o.classList.add("is-volume-open");
1940
+ this.#At(), this.#n.classList.add("is-volume-open");
1932
1941
  }
1933
1942
  #Ps = () => {
1934
- this.#ut = 0, !(this.#N || this.#F) && this.#o.classList.remove("is-volume-open");
1943
+ this.#dt = 0, !(this.#Y || this.#L) && this.#n.classList.remove("is-volume-open");
1935
1944
  };
1936
1945
  #te(t = 150) {
1937
- this.#Ct(), this.#ut = window.setTimeout(this.#Ps, t);
1946
+ this.#At(), this.#dt = window.setTimeout(this.#Ps, t);
1938
1947
  }
1939
1948
  #se = () => {
1940
1949
  if (!this.#m()) {
1941
- if (!this.#T() || !this.volumeSliderEnabled) {
1950
+ if (!this.#F() || !this.volumeSliderEnabled) {
1942
1951
  this.#S();
1943
1952
  return;
1944
1953
  }
1945
- this.#N = !0, this.#Qs();
1954
+ this.#Y = !0, this.#Qs();
1946
1955
  }
1947
1956
  };
1948
1957
  #ee = () => {
1949
1958
  if (!this.#m()) {
1950
- if (!this.#T() || !this.volumeSliderEnabled) {
1959
+ if (!this.#F() || !this.volumeSliderEnabled) {
1951
1960
  this.#S();
1952
1961
  return;
1953
1962
  }
1954
- this.#N = !1, this.#te();
1963
+ this.#Y = !1, this.#te();
1955
1964
  }
1956
1965
  };
1957
1966
  #Ze = (t) => {
1958
- if (t.preventDefault(), t.stopPropagation(), !this.#T()) {
1967
+ if (t.preventDefault(), t.stopPropagation(), !this.#F()) {
1959
1968
  this.#S();
1960
1969
  return;
1961
1970
  }
1962
- !this.#gt() || this.#Xt() || (this.#D(), this.#Ps(), this.#t.muted || this.#t.volume <= 0 ? (this.#t.volume <= 0 && (this.#t.volume = 0.7), this.#t.muted = !1) : this.#t.muted = !0, this.#y(), this.#R());
1971
+ !this.#yt() || this.#Xt() || (this.#D(), this.#Ps(), this.#t.muted || this.#t.volume <= 0 ? (this.#t.volume <= 0 && (this.#t.volume = 0.7), this.#t.muted = !1) : this.#t.muted = !0, this.#y(), this.#R());
1963
1972
  };
1964
1973
  #Oe = (t) => {
1965
1974
  if (t instanceof PointerEvent) {
1966
- if (t.preventDefault(), t.stopPropagation(), !this.#T() || !this.volumeSliderEnabled || this.#m()) {
1975
+ if (t.preventDefault(), t.stopPropagation(), !this.#F() || !this.volumeSliderEnabled || this.#m()) {
1967
1976
  this.#S();
1968
1977
  return;
1969
1978
  }
1970
- this.#D(), this.#P(), this.#Qs(), this.#F = !0, this.#n = t.pointerId, this.#z.classList.add("is-scrubbing-volume"), this.#d.setPointerCapture(t.pointerId), this.#Os(t.clientY);
1979
+ this.#D(), this.#P(), this.#Qs(), this.#L = !0, this.#o = t.pointerId, this.#z.classList.add("is-scrubbing-volume"), this.#d.setPointerCapture(t.pointerId), this.#Os(t.clientY);
1971
1980
  }
1972
1981
  };
1973
1982
  #Ke = (t) => {
1974
- t instanceof PointerEvent && this.#F && (this.#n !== null && t.pointerId !== this.#n || (t.preventDefault(), t.stopPropagation(), this.#Os(t.clientY)));
1983
+ t instanceof PointerEvent && this.#L && (this.#o !== null && t.pointerId !== this.#o || (t.preventDefault(), t.stopPropagation(), this.#Os(t.clientY)));
1975
1984
  };
1976
1985
  #Ge = (t) => {
1977
- t instanceof PointerEvent && (this.#n !== null && t.pointerId !== this.#n || (t.stopPropagation(), this.#Pt(t.pointerId), this.#R()));
1986
+ t instanceof PointerEvent && (this.#o !== null && t.pointerId !== this.#o || (t.stopPropagation(), this.#Tt(t.pointerId), this.#R()));
1978
1987
  };
1979
1988
  #Je = (t) => {
1980
- t instanceof PointerEvent && (this.#n !== null && t.pointerId !== this.#n || (t.stopPropagation(), this.#Pt(t.pointerId)));
1989
+ t instanceof PointerEvent && (this.#o !== null && t.pointerId !== this.#o || (t.stopPropagation(), this.#Tt(t.pointerId)));
1981
1990
  };
1982
1991
  #Qe = (t) => {
1983
1992
  if (!(t instanceof KeyboardEvent)) return;
1984
- if (!this.#T()) {
1993
+ if (!this.#F()) {
1985
1994
  t.preventDefault(), t.stopPropagation(), this.#S();
1986
1995
  return;
1987
1996
  }
@@ -1992,22 +2001,22 @@ class A extends HTMLElement {
1992
2001
  };
1993
2002
  #ti = async () => {
1994
2003
  const t = this.#t;
1995
- if (!(!this.pictureInPictureEnabled || !document.pictureInPictureEnabled || !t.requestPictureInPicture) && !(!this.#gt() || this.#Xt())) {
2004
+ if (!(!this.pictureInPictureEnabled || !document.pictureInPictureEnabled || !t.requestPictureInPicture) && !(!this.#yt() || this.#Xt())) {
1996
2005
  this.#D();
1997
2006
  try {
1998
- await this.#Y(), document.pictureInPictureElement === this.#t ? await document.exitPictureInPicture() : await t.requestPictureInPicture();
2007
+ await this.#X(), document.pictureInPictureElement === this.#t ? await document.exitPictureInPicture() : await t.requestPictureInPicture();
1999
2008
  } catch {
2000
2009
  } finally {
2001
- this.#Tt(), this.#R();
2010
+ this.#Et(), this.#R();
2002
2011
  }
2003
2012
  }
2004
2013
  };
2005
2014
  #si = async (t) => {
2006
- if (this.#Ks() && (t.preventDefault(), t.stopPropagation(), !(!this.#gt() || this.#Xt()))) {
2007
- this.#vt(t), this.#D();
2015
+ if (this.#Ks() && (t.preventDefault(), t.stopPropagation(), !(!this.#yt() || this.#Xt()))) {
2016
+ this.#gt(t), this.#D();
2008
2017
  try {
2009
2018
  const s = this.#ys();
2010
- s === this.#s || s === this ? await this.#$e() : (await this.#Y(), y(this.#s) ? await this.#qe() : this.#Be());
2019
+ s === this.#s || s === this ? await this.#$e() : (await this.#X(), y(this.#s) ? await this.#qe() : this.#Be());
2011
2020
  } catch {
2012
2021
  } finally {
2013
2022
  this.#Qt(), this.#R();
@@ -2015,33 +2024,33 @@ class A extends HTMLElement {
2015
2024
  }
2016
2025
  };
2017
2026
  #ie = (t) => {
2018
- this.#m() || this.#p() || !(t instanceof PointerEvent) && !(t instanceof MouseEvent) || (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#W(t.clientX, !1, !1));
2027
+ this.#m() || this.#p() || !(t instanceof PointerEvent) && !(t instanceof MouseEvent) || (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#j(t.clientX, !1, !1));
2019
2028
  };
2020
2029
  #re = () => {
2021
2030
  this.#p() || this.#zs();
2022
2031
  };
2023
2032
  #ei = (t) => {
2024
2033
  if (t instanceof PointerEvent) {
2025
- if (t.preventDefault(), !this.#gt() || this.#Xt()) {
2034
+ if (t.preventDefault(), !this.#yt() || this.#Xt()) {
2026
2035
  this.#D(), this.#m() && (this.#rs = performance.now() + 260);
2027
2036
  return;
2028
2037
  }
2029
- this.#D(), this.#P(), this.#Ns(), this.#I = !1, this.#nt = !1, this.#ze(this.#X()), this.#x = !0, this.#h = t.pointerId, this.#es = t.clientX, this.#G = !this.#t.paused && !this.#t.ended, this.#i.setPointerCapture(t.pointerId), this.#f = this.#W(t.clientX, !1), this.#rt(), this.#St = window.setTimeout(this.#Gs, this.#he);
2038
+ this.#D(), this.#P(), this.#Ns(), this.#I = !1, this.#at = !1, this.#ze(this.#_()), this.#x = !0, this.#h = t.pointerId, this.#es = t.clientX, this.#J = !this.#t.paused && !this.#t.ended, this.#i.setPointerCapture(t.pointerId), this.#f = this.#j(t.clientX, !1), this.#ot(), this.#Mt = window.setTimeout(this.#Gs, this.#he);
2030
2039
  }
2031
2040
  };
2032
2041
  #ii = (t) => {
2033
2042
  if (!(t instanceof KeyboardEvent) || !Number.isFinite(this.#t.duration) || this.#t.duration <= 0 || !["ArrowLeft", "ArrowRight", "Home", "End", "PageUp", "PageDown"].includes(t.key)) return;
2034
2043
  t.preventDefault(), t.stopPropagation(), this.#Hs();
2035
- const s = this.#X(), e = t.shiftKey ? 10 : 5, i = Math.max(10, this.#t.duration * 0.1), r = t.key === "Home" ? 0 : t.key === "End" ? this.#t.duration : t.key === "PageUp" ? s + i : t.key === "PageDown" ? s - i : s + (t.key === "ArrowRight" ? e : -e);
2044
+ const s = this.#_(), e = t.shiftKey ? 10 : 5, i = Math.max(10, this.#t.duration * 0.1), r = t.key === "Home" ? 0 : t.key === "End" ? this.#t.duration : t.key === "PageUp" ? s + i : t.key === "PageDown" ? s - i : s + (t.key === "ArrowRight" ? e : -e);
2036
2045
  this.#t.currentTime = Math.min(this.#t.duration, Math.max(0, r)), this.#l(this.#t.currentTime), this.#g(this.#t.currentTime);
2037
2046
  };
2038
2047
  #ri = (t) => {
2039
2048
  if (t instanceof PointerEvent) {
2040
2049
  if (!this.#x) {
2041
- this.#m() || (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#W(t.clientX, !1, !1));
2050
+ this.#m() || (this.#v = !0, this.#s.classList.add("is-progress-hovering"), this.#j(t.clientX, !1, !1));
2042
2051
  return;
2043
2052
  }
2044
- this.#h !== null && t.pointerId !== this.#h || (!this.#a && Math.abs(t.clientX - this.#es) >= this.#ne && this.#Gs(), this.#a && (this.#f = this.#W(t.clientX)));
2053
+ this.#h !== null && t.pointerId !== this.#h || (!this.#a && Math.abs(t.clientX - this.#es) >= this.#ne && this.#Gs(), this.#a && (this.#f = this.#j(t.clientX)));
2045
2054
  }
2046
2055
  };
2047
2056
  #oi = (t) => {
@@ -2052,8 +2061,8 @@ class A extends HTMLElement {
2052
2061
  };
2053
2062
  #ai = (t) => {
2054
2063
  if (t instanceof PointerEvent) {
2055
- if (this.#n !== null && t.pointerId === this.#n) {
2056
- this.#Pt(t.pointerId);
2064
+ if (this.#o !== null && t.pointerId === this.#o) {
2065
+ this.#Tt(t.pointerId);
2057
2066
  return;
2058
2067
  }
2059
2068
  this.#h === null || t.pointerId !== this.#h || this.#Js(t.clientX, t.pointerId, !0);
@@ -2061,15 +2070,15 @@ class A extends HTMLElement {
2061
2070
  };
2062
2071
  #li = (t) => {
2063
2072
  if (t instanceof PointerEvent) {
2064
- if (this.#n !== null && t.pointerId === this.#n) {
2065
- this.#Pt(t.pointerId);
2073
+ if (this.#o !== null && t.pointerId === this.#o) {
2074
+ this.#Tt(t.pointerId);
2066
2075
  return;
2067
2076
  }
2068
2077
  this.#h === null || t.pointerId !== this.#h || this.#xs(t.pointerId);
2069
2078
  }
2070
2079
  };
2071
2080
  #hi = () => {
2072
- this.#Pt(this.#n), this.#xs(this.#h);
2081
+ this.#Tt(this.#o), this.#xs(this.#h);
2073
2082
  };
2074
2083
  #ci = () => {
2075
2084
  this.#ys() || this.#Yt();
@@ -2084,10 +2093,10 @@ class A extends HTMLElement {
2084
2093
  this.#b = null, this.#H(), this.#p() || this.#l(), this.#u();
2085
2094
  };
2086
2095
  #mi = () => {
2087
- this.#yt(!0, !0);
2096
+ this.#wt(!0, !0);
2088
2097
  };
2089
2098
  #Ts = () => {
2090
- this.#yt(!0);
2099
+ this.#wt(!0);
2091
2100
  };
2092
2101
  #fi = () => {
2093
2102
  this.#H(), this.#y(), this.#p() || this.#l(), this.#w(), this.#g();
@@ -2097,14 +2106,14 @@ class A extends HTMLElement {
2097
2106
  this.#y(), t && !this.#p() && this.#l(), this.#u();
2098
2107
  };
2099
2108
  #vi = () => {
2100
- if (this.#H(), this.#w(), this.#I && (!this.#nt || this.#t.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA)) {
2109
+ if (this.#H(), this.#w(), this.#I && (!this.#at || this.#t.readyState >= HTMLMediaElement.HAVE_FUTURE_DATA)) {
2101
2110
  this.#_s(), this.#u();
2102
2111
  return;
2103
2112
  }
2104
2113
  this.#p() || this.#l(), this.#g();
2105
2114
  };
2106
2115
  #gi = () => {
2107
- this.#b = null, this.#A = !1, this.#L = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#s.classList.remove("has-visible-frame"), this.#yt(!0, !0), this.#u(), this.#Ae();
2116
+ this.#b = null, this.#C = !1, this.#A = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#s.classList.remove("has-visible-frame"), this.#wt(!0, !0), this.#u(), this.#Ae();
2108
2117
  };
2109
2118
  #yi = () => {
2110
2119
  this.#y(), this.#g();
@@ -2116,7 +2125,7 @@ class A extends HTMLElement {
2116
2125
  return window.matchMedia("(max-width: 768px)").matches && window.matchMedia("(hover: none), (pointer: coarse)").matches;
2117
2126
  }
2118
2127
  #xi() {
2119
- this.#t && (this.#E?.disconnect(), this.#E = null, this.#Zt(), this.#gs(), this.#C = !1, this.#is = 0, this.#A = !1, this.#L = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#ht = !1, this.#ct = 0, this.#H(), this.#Rt = !1, this.#pt = !1, this.#S(), this.#I = !1, this.#nt = !1, this.#b = null, this.#s.classList.remove("has-loaded-once", "has-visible-frame", "is-progress-settling"), this.#t.dataset.src = this.src, this.#t.pause(), this.#t.removeAttribute("src"), this.#t.preload = "none", this.#Bt(), this.#t.load(), this.#_(0), this.#y(), this.#w(), this.#u());
2128
+ this.#t && (this.#T?.disconnect(), this.#T = null, this.#Zt(), this.#gs(), this.#E = !1, this.#is = 0, this.#C = !1, this.#A = !1, this.#q = !1, this.#B = !1, this.#$ += 1, this.#ct = !1, this.#pt = 0, this.#H(), this.#ut = !1, this.#U = !1, this.#S(), this.#I = !1, this.#at = !1, this.#b = null, this.#s.classList.remove("has-loaded-once", "has-visible-frame", "is-progress-settling"), this.#t.dataset.src = this.src, this.#t.pause(), this.#t.removeAttribute("src"), this.#t.preload = "none", this.#Bt(), this.#t.load(), this.#W(0), this.#y(), this.#w(), this.#u());
2120
2129
  }
2121
2130
  }
2122
2131
  customElements.get("simple-player") || customElements.define("simple-player", A);