@vindral/web-sdk 4.7.2-4-gc6377efe → 4.7.2-6-gceea26ed

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/legacy.es.js CHANGED
@@ -12266,7 +12266,10 @@ var FC = class {
12266
12266
  s > 0 && performance.now() - i.lastBufferCleanupTime > 1e4 && (i.lastBufferCleanupTime = performance.now(), yield i.sourceBuffer.removeBuffer(0, s + 10));
12267
12267
  try {
12268
12268
  let t = i.sequenceNumber;
12269
- if ("fragmented" in n) for (let t of e) "initData" in t && (yield i.sourceBuffer.appendBuffer(t.data, t.initData));
12269
+ if ("fragmented" in n) for (let t of VC(e)) {
12270
+ var c;
12271
+ yield i.sourceBuffer.appendBuffer(HC(t.map((e) => e.data)), (c = t[0]) == null ? void 0 : c.initData);
12272
+ }
12270
12273
  else {
12271
12274
  let n = Cl(e, t++);
12272
12275
  yield i.sourceBuffer.appendBuffer(n);
@@ -12312,18 +12315,19 @@ var FC = class {
12312
12315
  if (e.duration === 0) return;
12313
12316
  let t = this.trackContexts.get(e.type);
12314
12317
  if (!t) throw Li(e.type, e.renditionId);
12315
- if (!(!t.hasFirstSync && !e.isSync)) {
12318
+ let n = t.pendingSamples.length - t.pendingSamplesOffset;
12319
+ if (t.state === "uninitialized" && n >= RC && (e.isSync || n >= 2 * RC) && (t.pendingSamples = [], t.pendingSamplesOffset = 0, t.hasFirstSync = !1), !(!t.hasFirstSync && !e.isSync)) {
12316
12320
  if (this.hasAddedInitialPosterFrame && e.isSync && e.type === "video") {
12317
12321
  this.hasAddedInitialPosterFrame = !1;
12318
12322
  let n = L({}, e);
12319
12323
  "fragment" in n ? (n.fragment = n.fragment.clone(), n.fragment.updateBaseMediaDecodeTime(0), n.data = n.fragment.rawBytes()) : n.timestamp = 0, t.pendingSamples.push(n);
12320
12324
  }
12321
12325
  if (t.hasFirstSync = !0, t.pendingSamples.push(e), e.type === "video" && e.isSync) {
12322
- var n;
12323
- let t = (e.timestamp + ((n = e.compositionTimeOffset) == null ? 0 : n)) / e.timescale * 1e3, r = this.videoKeyframeTimestamps[this.videoKeyframeTimestamps.length - 1];
12324
- r !== void 0 && t < r && (this.videoKeyframeTimestamps = []), this.videoKeyframeTimestamps.push(t), this.videoKeyframeTimestamps.length > 20 && (this.videoKeyframeTimestamps = this.videoKeyframeTimestamps.slice(-20));
12326
+ var r;
12327
+ let t = (e.timestamp + ((r = e.compositionTimeOffset) == null ? 0 : r)) / e.timescale * 1e3, n = this.videoKeyframeTimestamps[this.videoKeyframeTimestamps.length - 1];
12328
+ n !== void 0 && t < n && (this.videoKeyframeTimestamps = []), this.videoKeyframeTimestamps.push(t), this.videoKeyframeTimestamps.length > 20 && (this.videoKeyframeTimestamps = this.videoKeyframeTimestamps.slice(-20));
12325
12329
  }
12326
- t.state !== "uninitialized" && (t.isWorkingOnPendingSamples || VC(t, this.append, this.maxChunkSize).catch((n) => {
12330
+ t.state !== "uninitialized" && (t.isWorkingOnPendingSamples || WC(t, this.append, this.maxChunkSize).catch((n) => {
12327
12331
  if (t.isWorkingOnPendingSamples = !1, !this.isReopening) {
12328
12332
  if (!this.isCurrentTrackContext(e.type, t)) {
12329
12333
  this.logger.debug("Suppressing append error from stale track context", { type: e.type });
@@ -12442,7 +12446,7 @@ var FC = class {
12442
12446
  if (this.mediaSource.isClosed()) return;
12443
12447
  let e = this.getInitializedTrackBuffers();
12444
12448
  if (e.length !== 0) return this.getCommonBufferedRanges(e);
12445
- }), p(this, "getCommonBufferedRanges", (e) => e.slice(1).reduce((e, t) => zC(e, t), e[0] ? Array.from(e[0]) : [])), p(this, "getPlaybackStateForBufferedRanges", (e, t) => gr(t, e) ? "playing" : "buffering"), this.logger = e, this.mediaElement = n, this.emitter = t;
12449
+ }), p(this, "getCommonBufferedRanges", (e) => e.slice(1).reduce((e, t) => BC(e, t), e[0] ? Array.from(e[0]) : [])), p(this, "getPlaybackStateForBufferedRanges", (e, t) => gr(t, e) ? "playing" : "buffering"), this.logger = e, this.mediaElement = n, this.emitter = t;
12446
12450
  }
12447
12451
  };
12448
12452
  jC = FC, p(FC, "create", (e, t, n) => {
@@ -12464,7 +12468,7 @@ var IC = (e, t) => {
12464
12468
  var n;
12465
12469
  let r = e.renditionId !== t.renditionId, i = e.channelId !== t.channelId, a = ((n = e.timestamp) == null ? 0 : n) > t.timestamp, o = e.type === "video" && t.type === "video" && "levelIdc" in e && "levelIdc" in t && e.levelIdc !== t.levelIdc, s = !1;
12466
12470
  return e.type === "video" && t.type === "video" && "width" in e && "width" in t && (s = t.width !== e.width || t.height !== e.height), i || r || a || s || o;
12467
- }, RC = 32, zC = (e, t) => {
12471
+ }, RC = 1e3, zC = 32, BC = (e, t) => {
12468
12472
  let n = [], r = 0, i = 0;
12469
12473
  for (; r < e.length && i < t.length;) {
12470
12474
  let a = e[r], o = t[i];
@@ -12476,16 +12480,30 @@ var IC = (e, t) => {
12476
12480
  }), a.end <= o.end ? r++ : i++;
12477
12481
  }
12478
12482
  return n;
12479
- }, BC = (e) => {
12483
+ }, VC = (e) => {
12484
+ let t = [];
12485
+ for (let r of e) {
12486
+ var n;
12487
+ if (!("fragmented" in r)) continue;
12488
+ let e = t.at(-1);
12489
+ (e == null || (n = e[0]) == null ? void 0 : n.initData) === r.initData ? e.push(r) : t.push([r]);
12490
+ }
12491
+ return t;
12492
+ }, HC = (e) => {
12493
+ if (e.length === 1 && e[0]) return e[0];
12494
+ let t = new Uint8Array(e.reduce((e, t) => e + t.byteLength, 0)), n = 0;
12495
+ for (let r of e) t.set(r, n), n += r.byteLength;
12496
+ return t;
12497
+ }, UC = (e) => {
12480
12498
  let t = e.pendingSamplesOffset;
12481
12499
  if (t !== 0) {
12482
12500
  if (t >= e.pendingSamples.length) {
12483
12501
  e.pendingSamples = [], e.pendingSamplesOffset = 0;
12484
12502
  return;
12485
12503
  }
12486
- t < RC || t * 2 < e.pendingSamples.length || (e.pendingSamples = e.pendingSamples.slice(t), e.pendingSamplesOffset = 0);
12504
+ t < zC || t * 2 < e.pendingSamples.length || (e.pendingSamples = e.pendingSamples.slice(t), e.pendingSamplesOffset = 0);
12487
12505
  }
12488
- }, VC = function() {
12506
+ }, WC = function() {
12489
12507
  var e = N(function* (e, t, n) {
12490
12508
  for (e.isWorkingOnPendingSamples = !0; e.pendingSamplesOffset < e.pendingSamples.length;) {
12491
12509
  let r = [], i = e.pendingSamplesOffset;
@@ -12501,7 +12519,7 @@ var IC = (e, t) => {
12501
12519
  }
12502
12520
  let a = r[0];
12503
12521
  if (!a) break;
12504
- yield t(r, e.previousSample ? LC(e.previousSample, a) : !0), e.pendingSamplesOffset = i + 1, e.previousSample = r[r.length - 1], BC(e);
12522
+ yield t(r, e.previousSample ? LC(e.previousSample, a) : !0), e.pendingSamplesOffset = i + 1, e.previousSample = r[r.length - 1], UC(e);
12505
12523
  }
12506
12524
  e.isWorkingOnPendingSamples = !1;
12507
12525
  });
@@ -12510,7 +12528,7 @@ var IC = (e, t) => {
12510
12528
  };
12511
12529
  }();
12512
12530
  H(), m(), P();
12513
- var HC, UC = class {
12531
+ var GC, KC = class {
12514
12532
  constructor(e, t) {
12515
12533
  var n = this;
12516
12534
  p(this, "logger", void 0), p(this, "emitter", void 0), p(this, "element", void 0), p(this, "pictureInPictureWindow", void 0), p(this, "unload", () => {
@@ -12542,8 +12560,8 @@ var HC, UC = class {
12542
12560
  }()), p(this, "isWebkitPresentationModeSupported", () => !!this.element && Mt(this.element)), this.emitter = e, this.logger = t, this.emitter.on("add picture in picture listener", this.onEnablePictureInPicture);
12543
12561
  }
12544
12562
  };
12545
- HC = UC, p(UC, "create", (e, t) => new HC(e, t)), H(), m();
12546
- var WC, GC = class {
12563
+ GC = KC, p(KC, "create", (e, t) => new GC(e, t)), H(), m();
12564
+ var qC, JC = class {
12547
12565
  constructor(e, t, n, r) {
12548
12566
  p(this, "emitter", void 0), p(this, "logger", void 0), p(this, "clockSource", void 0), p(this, "state", "buffering"), p(this, "bufferFullness", 0), p(this, "targetBufferTime", void 0), p(this, "lastBufferStateEvent", "drained"), p(this, "firstFrameTime", void 0), p(this, "currentTimeIsInRange", !1), p(this, "needsInputForAudioCount", 0), p(this, "needsInputForVideoCount", 0), p(this, "unload", () => {
12549
12567
  this.emitter.off("buffer state", this.onBufferedStateChanged), this.emitter.off("needs user input", this.onNeedsUserInput);
@@ -12561,22 +12579,22 @@ var WC, GC = class {
12561
12579
  }), this.emitter = e, this.logger = t, this.clockSource = n, this.targetBufferTime = r, this.emitter.on("buffer state", this.onBufferedStateChanged), this.emitter.on("needs user input", this.onNeedsUserInput), this.emitter.emit("target buffer time", r);
12562
12580
  }
12563
12581
  };
12564
- WC = GC, p(GC, "create", (e, t, n, r) => new WC(e, t, n, r)), H(), m();
12565
- var KC, qC = () => ({
12582
+ qC = JC, p(JC, "create", (e, t, n, r) => new qC(e, t, n, r)), H(), m();
12583
+ var YC, XC = () => ({
12566
12584
  upgradesFromLevel: [],
12567
12585
  downgradesFromLevel: [],
12568
12586
  bufferingRanges: [],
12569
12587
  activeRanges: [],
12570
12588
  decodeRate: 2 ** 53 - 1
12571
- }), JC = () => ({
12589
+ }), ZC = () => ({
12572
12590
  levels: {},
12573
12591
  levelDowngrades: [],
12574
12592
  levelUpgrades: [],
12575
12593
  bufferFullness: 0,
12576
- general: qC()
12577
- }), YC = 100, XC = 3600, ZC = 1e3, QC = class {
12594
+ general: XC()
12595
+ }), QC = 100, $C = 3600, ew = 1e3, tw = class {
12578
12596
  constructor(e, t, n, r) {
12579
- p(this, "minBufferFullnessLengthForRegression", 6), p(this, "logger", void 0), p(this, "emitter", void 0), p(this, "timers", lr.create()), p(this, "metrics", JC()), p(this, "bufferFullness", new w(Infinity)), p(this, "bufferFullnessRegression", void 0), p(this, "lastDeliveryResumeTime", -Infinity), p(this, "currentLevel", void 0), p(this, "isSuspended", !1), p(this, "_fatalQosCount", 0), p(this, "renditionLevelSource", void 0), p(this, "targetBufferTimeSource", void 0), p(this, "qualityIndexOrder", []), p(this, "hasPlayedInSession", !1), p(this, "hasAsserted", !1), p(this, "load", () => {
12597
+ p(this, "minBufferFullnessLengthForRegression", 6), p(this, "logger", void 0), p(this, "emitter", void 0), p(this, "timers", lr.create()), p(this, "metrics", ZC()), p(this, "bufferFullness", new w(Infinity)), p(this, "bufferFullnessRegression", void 0), p(this, "lastDeliveryResumeTime", -Infinity), p(this, "currentLevel", void 0), p(this, "isSuspended", !1), p(this, "_fatalQosCount", 0), p(this, "renditionLevelSource", void 0), p(this, "targetBufferTimeSource", void 0), p(this, "qualityIndexOrder", []), p(this, "hasPlayedInSession", !1), p(this, "hasAsserted", !1), p(this, "load", () => {
12580
12598
  this.emitter.on("playback state", this.onPlaybackState), this.emitter.on("buffer fullness", this.onBufferFullness), this.emitter.on("media delivery resumed", this.onMediaDeliveryResumed), this.emitter.on("rendition level changed", this.onRenditionLevelChanged), this.emitter.on("video decode rate", this.onVideoDecodeRate), this.emitter.on("connection state", this.onConnectionState);
12581
12599
  }), p(this, "unload", () => {
12582
12600
  this.emitter.off("playback state", this.onPlaybackState), this.emitter.off("buffer fullness", this.onBufferFullness), this.emitter.off("media delivery resumed", this.onMediaDeliveryResumed), this.emitter.off("rendition level changed", this.onRenditionLevelChanged), this.emitter.off("video decode rate", this.onVideoDecodeRate), this.emitter.off("connection state", this.onConnectionState), this.suspend();
@@ -12592,7 +12610,7 @@ var KC, qC = () => ({
12592
12610
  return this.metrics.levels[a];
12593
12611
  }), p(this, "getBufferFullnessRegression", (e = !1) => {
12594
12612
  if (!e) return this.bufferFullnessRegression;
12595
- if (performance.now() - this.lastDeliveryResumeTime < ZC) return;
12613
+ if (performance.now() - this.lastDeliveryResumeTime < ew) return;
12596
12614
  let t = this.bufferFullness.items().filter(({ time: e }) => e >= this.lastDeliveryResumeTime);
12597
12615
  return t.length >= this.minBufferFullnessLengthForRegression ? this.calculateLinearRegression(t) : void 0;
12598
12616
  }), p(this, "getTargetBufferTime", () => {
@@ -12652,21 +12670,21 @@ var KC, qC = () => ({
12652
12670
  let d = !1;
12653
12671
  if (e.from) {
12654
12672
  var f;
12655
- let e = (f = this.metrics.levels[l]) == null ? qC() : f;
12673
+ let e = (f = this.metrics.levels[l]) == null ? XC() : f;
12656
12674
  l < u ? e.upgradesFromLevel.push(performance.now()) : e.downgradesFromLevel.push(performance.now()), dr(e.activeRanges);
12657
12675
  let t = e.bufferingRanges[e.bufferingRanges.length - 1];
12658
12676
  d = !!t && !t.end, dr(e.bufferingRanges), this.metrics.levels[l] = e;
12659
12677
  }
12660
12678
  if (e.to) {
12661
12679
  var p;
12662
- let e = (p = this.metrics.levels[u]) == null ? qC() : p;
12680
+ let e = (p = this.metrics.levels[u]) == null ? XC() : p;
12663
12681
  fr(e.activeRanges), d && fr(e.bufferingRanges), this.metrics.levels[u] = e, this.currentLevel = u;
12664
12682
  }
12665
12683
  }), p(this, "onMediaDeliveryResumed", () => {
12666
12684
  this.lastDeliveryResumeTime = performance.now();
12667
12685
  }), p(this, "onBufferFullness", (e) => {
12668
12686
  if (this.metrics.bufferFullness = e, this.isSuspended) return;
12669
- let t = performance.now(), n = this.bufferFullness.peekLast(), r = (e) => Math.floor(e / YC);
12687
+ let t = performance.now(), n = this.bufferFullness.peekLast(), r = (e) => Math.floor(e / QC);
12670
12688
  if (n && r(n.time) === r(t)) n.time = t, n.value = e;
12671
12689
  else {
12672
12690
  var i, a;
@@ -12674,7 +12692,7 @@ var KC, qC = () => ({
12674
12692
  time: t,
12675
12693
  value: e
12676
12694
  });
12677
- let n = this.bufferFullness.items(), r = (i = (a = n[n.length - this.minBufferFullnessLengthForRegression]) == null ? void 0 : a.time) == null ? -Infinity : i, o = Math.min(t - XC, r);
12695
+ let n = this.bufferFullness.items(), r = (i = (a = n[n.length - this.minBufferFullnessLengthForRegression]) == null ? void 0 : a.time) == null ? -Infinity : i, o = Math.min(t - $C, r);
12678
12696
  this.bufferFullness.filterPop(({ time: e }) => e >= o);
12679
12697
  }
12680
12698
  this.bufferFullnessRegression = this.bufferFullness.items().length >= this.minBufferFullnessLengthForRegression ? this.calculateLinearRegression() : void 0;
@@ -12746,8 +12764,8 @@ var KC, qC = () => ({
12746
12764
  fr(this.metrics.general.activeRanges);
12747
12765
  }
12748
12766
  };
12749
- KC = QC, p(QC, "create", (e, t, n, r) => new KC(e, t, n, r)), H(), m();
12750
- var $C, ew = class {
12767
+ YC = tw, p(tw, "create", (e, t, n, r) => new YC(e, t, n, r)), H(), m();
12768
+ var nw, rw = class {
12751
12769
  constructor(e, t) {
12752
12770
  p(this, "renditions", /* @__PURE__ */ new Map()), p(this, "renditionLevels", []), p(this, "languages", []), p(this, "emitter", void 0), p(this, "subscriptionSource", void 0), p(this, "renditionLevelChangeCount", 0), p(this, "unload", () => {
12753
12771
  this.emitter.off("renditions", this.onRenditions), this.emitter.off("subscription changed", this.onSubscriptionChanged);
@@ -12822,8 +12840,8 @@ var $C, ew = class {
12822
12840
  }), p(this, "getCurrentSubscription", () => this.subscriptionSource.getCurrentSubscription()), this.subscriptionSource = t, this.emitter = e, this.emitter.on("renditions", this.onRenditions), this.emitter.on("subscription changed", this.onSubscriptionChanged);
12823
12841
  }
12824
12842
  };
12825
- $C = ew, p(ew, "create", (e, t) => new $C(e, t)), H(), m();
12826
- var tw, nw = (e) => JSON.parse(JSON.stringify(e)), rw = 1e4, iw = class {
12843
+ nw = rw, p(rw, "create", (e, t) => new nw(e, t)), H(), m();
12844
+ var iw, aw = (e) => JSON.parse(JSON.stringify(e)), ow = 1e4, sw = class {
12827
12845
  constructor(e, t, n) {
12828
12846
  p(this, "logger", void 0), p(this, "timers", new lr()), p(this, "emitter", void 0), p(this, "targetSubscription", void 0), p(this, "currentSubscription", void 0), p(this, "_isSwitchingSubscription", !1), p(this, "pendingSubscriptionTimeoutId", void 0), p(this, "burstMs", 0), p(this, "unload", () => {
12829
12847
  this.logger.debug("Unloading module..."), this.timers.unload(), this.emitter.off("subscription changed", this.onSubscriptionChanged), this.logger.debug("Unloaded module");
@@ -12861,21 +12879,21 @@ var tw, nw = (e) => JSON.parse(JSON.stringify(e)), rw = 1e4, iw = class {
12861
12879
  this.logger.debug("onSubscriptionChanged", {
12862
12880
  to: e,
12863
12881
  reset: t
12864
- }), t ? this.targetSubscription = nw(this.currentSubscription) : this.currentSubscription = nw(e), this._isSwitchingSubscription = this.isNewSubscription();
12882
+ }), t ? this.targetSubscription = aw(this.currentSubscription) : this.currentSubscription = aw(e), this._isSwitchingSubscription = this.isNewSubscription();
12865
12883
  }), p(this, "scheduleSubscriptionChange", () => {
12866
- this.targetSubscription = nw(this.targetSubscription), this._isSwitchingSubscription = this.isNewSubscription();
12884
+ this.targetSubscription = aw(this.targetSubscription), this._isSwitchingSubscription = this.isNewSubscription();
12867
12885
  let e = this.currentSubscription.channelId, t = this.targetSubscription.channelId, n = e !== t;
12868
12886
  this._isSwitchingSubscription && (n && this.burstMs ? this.setBurst(this.burstMs) : this.setBurst(0), this.pendingSubscriptionTimeoutId && (this.timers.clearTimeout(this.pendingSubscriptionTimeoutId), this.pendingSubscriptionTimeoutId = void 0), n && this.timers.setTimeout(() => {
12869
- this.currentSubscription.channelId === e && this.targetSubscription.channelId === t && (this.logger.warn("Channel switch timeout", t), this.targetSubscription = nw(this.currentSubscription), this.emitter.emit("channel switch timeout", t));
12870
- }, rw), this.pendingSubscriptionTimeoutId = this.timers.setTimeout(() => this.emitter.emit("send signal", {
12887
+ this.currentSubscription.channelId === e && this.targetSubscription.channelId === t && (this.logger.warn("Channel switch timeout", t), this.targetSubscription = aw(this.currentSubscription), this.emitter.emit("channel switch timeout", t));
12888
+ }, ow), this.pendingSubscriptionTimeoutId = this.timers.setTimeout(() => this.emitter.emit("send signal", {
12871
12889
  type: "subscribe",
12872
12890
  subscription: this.getTargetSubscription()
12873
12891
  }), 0));
12874
- }), this.logger = e, this.targetSubscription = t, this.currentSubscription = nw(t), this.emitter = n, this.emitter.on("subscription changed", this.onSubscriptionChanged);
12892
+ }), this.logger = e, this.targetSubscription = t, this.currentSubscription = aw(t), this.emitter = n, this.emitter.on("subscription changed", this.onSubscriptionChanged);
12875
12893
  }
12876
12894
  };
12877
- tw = iw, p(iw, "create", (e, t, n) => new tw(e, n, t)), H(), m();
12878
- var aw = class e {
12895
+ iw = sw, p(sw, "create", (e, t, n) => new iw(e, n, t)), H(), m();
12896
+ var cw = class e {
12879
12897
  constructor() {
12880
12898
  p(this, "channelId", void 0), p(this, "renditionId", void 0), p(this, "anchorCts", void 0), p(this, "hasBFramesValue", !1), p(this, "isAwaitingAssessment", !1), p(this, "zeroOffsetSamples", 0), p(this, "omittedBoundaryCrossings", 0), p(this, "hasSeenKeyframe", !1), p(this, "hasObservedReordering", !1), p(this, "rememberedRenditions", new an(e.MAX_REMEMBERED_RENDITIONS));
12881
12899
  }
@@ -12931,8 +12949,8 @@ var aw = class e {
12931
12949
  }
12932
12950
  }
12933
12951
  };
12934
- p(aw, "MAX_REMEMBERED_RENDITIONS", 32), H(), m(), R();
12935
- var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw = (e) => (t) => t > e, dw = 100, fw = 1e3, pw = 1e3, mw = 1e3, hw = 100, gw = 50, _w = {
12952
+ p(cw, "MAX_REMEMBERED_RENDITIONS", 32), H(), m(), R();
12953
+ var lw, uw = 5e3, dw = () => it() || tt(), fw = (e) => e && dw() ? 100 : 0, pw = (e) => (t) => t > e, mw = 100, hw = 1e3, gw = 1e3, _w = 1e3, vw = 100, yw = 50, bw = {
12936
12954
  seek: {
12937
12955
  toleranceMs: 200,
12938
12956
  toleranceMaxMs: 2500,
@@ -12964,7 +12982,7 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
12964
12982
  decayCooldownMultiplier: 3,
12965
12983
  decayCheckInterval: 15e3
12966
12984
  }
12967
- }, vw = class {
12985
+ }, xw = class {
12968
12986
  get driftSamplesToCollect() {
12969
12987
  return this._driftSamplesToCollect;
12970
12988
  }
@@ -12972,8 +12990,8 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
12972
12990
  this._driftSamplesToCollect = e, this.driftSamples = new w(e);
12973
12991
  }
12974
12992
  constructor(e, t, n, r, i, a = !0) {
12975
- p(this, "emitter", void 0), p(this, "logger", void 0), p(this, "playbackSource", void 0), p(this, "bufferSource", void 0), p(this, "keyframeTimestamps", new w(10)), p(this, "lastSeekTime", void 0), p(this, "needsMediaSourceRecovery", !1), p(this, "lastAdjustmentTime", performance.now()), p(this, "lastDecayCheckTime", performance.now()), p(this, "syncInterval", void 0), p(this, "currentSyncIntervalMs", dw), p(this, "config", void 0), p(this, "state", void 0), p(this, "allowTimeshiftOnAudio", !1), p(this, "syncInfoToleranceMaxMs", 150), p(this, "syncInfoToleranceStep", 20), p(this, "seekOvershoot", void 0), p(this, "timers", lr.create()), p(this, "rtt", 0), p(this, "channelSyncInfo", /* @__PURE__ */ new Map()), p(this, "seekAdjustmentCount", 0), p(this, "timeshiftAdjustmentCount", 0), p(this, "syncInfoCorrectionCount", 0), p(this, "playbackRateAdjustmentCount", 0), p(this, "lastPlaybackRateChangeTime", 0), p(this, "seekAdjustmentTimestamps", []), p(this, "timeshiftAdjustmentTimestamps", []), p(this, "_driftSamplesToCollect", 5), p(this, "driftSamples", new w(this._driftSamplesToCollect)), p(this, "timestampOffset", void 0), p(this, "hasObservedBFrames", !1), p(this, "bFrameDetector", new aw()), p(this, "currentChannelId", void 0), p(this, "highestSeenTimestamps", /* @__PURE__ */ new Map()), p(this, "isSuspended", !1), p(this, "isSyncAdjustmentActivated", !1), p(this, "queuedTimeshift", !1), p(this, "playbackState", void 0), p(this, "hasPerformedRecoverySeekInCurrentRecoveryState", !1), p(this, "shouldSeekAfterBuffering", !1), p(this, "shouldSeekWhileStuck", !1), p(this, "hasPerformedStuckSeekInCurrentStillness", !1), p(this, "positionSetBySeek", void 0), p(this, "lastPlayheadPosition", void 0), p(this, "lastPlayheadProgressAt", performance.now()), p(this, "usesMse", void 0), p(this, "load", () => {
12976
- this.emitter.on("page active", this.onPageActive), this.emitter.on("pageshow", this.onPageShow), this.setSyncInterval(document.visibilityState === "hidden" ? fw : dw);
12993
+ p(this, "emitter", void 0), p(this, "logger", void 0), p(this, "playbackSource", void 0), p(this, "bufferSource", void 0), p(this, "keyframeTimestamps", new w(10)), p(this, "lastSeekTime", void 0), p(this, "needsMediaSourceRecovery", !1), p(this, "lastAdjustmentTime", performance.now()), p(this, "lastDecayCheckTime", performance.now()), p(this, "syncInterval", void 0), p(this, "currentSyncIntervalMs", mw), p(this, "config", void 0), p(this, "state", void 0), p(this, "allowTimeshiftOnAudio", !1), p(this, "syncInfoToleranceMaxMs", 150), p(this, "syncInfoToleranceStep", 20), p(this, "seekOvershoot", void 0), p(this, "timers", lr.create()), p(this, "rtt", 0), p(this, "channelSyncInfo", /* @__PURE__ */ new Map()), p(this, "seekAdjustmentCount", 0), p(this, "timeshiftAdjustmentCount", 0), p(this, "syncInfoCorrectionCount", 0), p(this, "playbackRateAdjustmentCount", 0), p(this, "lastPlaybackRateChangeTime", 0), p(this, "seekAdjustmentTimestamps", []), p(this, "timeshiftAdjustmentTimestamps", []), p(this, "_driftSamplesToCollect", 5), p(this, "driftSamples", new w(this._driftSamplesToCollect)), p(this, "timestampOffset", void 0), p(this, "hasObservedBFrames", !1), p(this, "bFrameDetector", new cw()), p(this, "currentChannelId", void 0), p(this, "highestSeenTimestamps", /* @__PURE__ */ new Map()), p(this, "isSuspended", !1), p(this, "isSyncAdjustmentActivated", !1), p(this, "queuedTimeshift", !1), p(this, "playbackState", void 0), p(this, "hasPerformedRecoverySeekInCurrentRecoveryState", !1), p(this, "shouldSeekAfterBuffering", !1), p(this, "shouldSeekWhileStuck", !1), p(this, "hasPerformedStuckSeekInCurrentStillness", !1), p(this, "positionSetBySeek", void 0), p(this, "lastPlayheadPosition", void 0), p(this, "lastPlayheadProgressAt", performance.now()), p(this, "usesMse", void 0), p(this, "load", () => {
12994
+ this.emitter.on("page active", this.onPageActive), this.emitter.on("pageshow", this.onPageShow), this.setSyncInterval(document.visibilityState === "hidden" ? hw : mw);
12977
12995
  }), p(this, "unload", () => {
12978
12996
  this.logger.debug("Unloading module..."), this.emitter.off("rtt", this.updateRtt), this.emitter.off("playback state", this.onPlaybackState), this.emitter.off("page active", this.onPageActive), this.emitter.off("pageshow", this.onPageShow), this.emitter.off("buffers flushed", this.clearBFrameLatch), this.emitter.off("recovered from media error", this.onMediaSourceRecovered), this.clearSyncInterval(), this.timers.unload(), this.logger.debug("Unloaded module");
12979
12997
  }), p(this, "suspend", () => {
@@ -13015,7 +13033,7 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
13015
13033
  }), p(this, "processSample", (e) => {
13016
13034
  var t;
13017
13035
  if (!e.channelId) throw Error("Sample must be assigned to a channel");
13018
- this.currentChannelId || (this.currentChannelId = e.channelId), this.timestampOffset || (this.timestampOffset = e.timestamp / e.timescale * 1e3 - sw);
13036
+ this.currentChannelId || (this.currentChannelId = e.channelId), this.timestampOffset || (this.timestampOffset = e.timestamp / e.timescale * 1e3 - uw);
13019
13037
  let n = e.type === "video" && e.isSync;
13020
13038
  if (this.bFrameDetector.update(e), this.latchBFramesIfDetected(), this.currentChannelId !== e.channelId) {
13021
13039
  let t = 2 ** 53 - 1;
@@ -13032,7 +13050,7 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
13032
13050
  this.currentChannelId || (this.currentChannelId = e);
13033
13051
  let i = t.mediaType();
13034
13052
  if (!i) throw Error("Fragment must have a media type");
13035
- this.timestampOffset || (this.timestampOffset = t.baseMediaDecodeTime() / t.timescale() * 1e3 - sw);
13053
+ this.timestampOffset || (this.timestampOffset = t.baseMediaDecodeTime() / t.timescale() * 1e3 - uw);
13036
13054
  let a = i === "video" && t.startsWithKeyframe();
13037
13055
  if (i === "video" && (this.bFrameDetector.updateFromFragment({
13038
13056
  type: i,
@@ -13153,7 +13171,7 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
13153
13171
  return;
13154
13172
  }
13155
13173
  if (n >= this.getEffectiveSeekToleranceMs() || n < this.currentTimeshiftToleranceMs()) return;
13156
- let r = performance.now() - this.config.seek.timeoutMs * this.state.timeshiftToleranceMultiplier, i = this.timeshiftAdjustmentTimestamps.filter(uw(r)).length;
13174
+ let r = performance.now() - this.config.seek.timeoutMs * this.state.timeshiftToleranceMultiplier, i = this.timeshiftAdjustmentTimestamps.filter(pw(r)).length;
13157
13175
  if (i && this.state.timeshiftToleranceMultiplier > 2) {
13158
13176
  this.logger.debug("Too many timeshifts within sliding window", {
13159
13177
  timeshiftCooldownThreshold: r,
@@ -13177,20 +13195,20 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
13177
13195
  let n = (e = (t = this.bufferSource).getNextBufferedRangeStart) == null ? void 0 : e.call(t, this.playbackSource.currentTime);
13178
13196
  return this.shouldSeekAfterBuffering = n !== void 0, n;
13179
13197
  }), p(this, "observePlayheadProgress", () => {
13180
- let e = this.playbackSource.currentTime, t = e !== this.lastPlayheadPosition, n = t && (this.positionSetBySeek === void 0 || e - this.positionSetBySeek > gw);
13198
+ let e = this.playbackSource.currentTime, t = e !== this.lastPlayheadPosition, n = t && (this.positionSetBySeek === void 0 || e - this.positionSetBySeek > yw);
13181
13199
  this.positionSetBySeek = void 0, (n || this.playbackSource.isPaused) && (this.hasPerformedStuckSeekInCurrentStillness = !1), (t || this.playbackSource.isPaused || this.isSeeking()) && (this.lastPlayheadPosition = e, this.lastPlayheadProgressAt = performance.now());
13182
13200
  }), p(this, "isPlayheadStuckInBuffer", () => {
13183
13201
  var e, t;
13184
- if (performance.now() - this.lastPlayheadProgressAt < pw) return !1;
13202
+ if (performance.now() - this.lastPlayheadProgressAt < gw) return !1;
13185
13203
  let n = this.playbackSource.currentTime, r = (e = (t = this.bufferSource).getBufferedEndAt) == null ? void 0 : e.call(t, n);
13186
- return r !== void 0 && r - n >= mw;
13204
+ return r !== void 0 && r - n >= _w;
13187
13205
  }), p(this, "getRecoverySeekReason", () => {
13188
13206
  if (this.needsMediaSourceRecovery) return "media source reopen";
13189
13207
  if (this.shouldSeekWhileStuck) return "stuck in buffer";
13190
13208
  if (this.shouldSeekAfterBuffering) return "buffering";
13191
13209
  }), p(this, "shouldSkipNormalSeek", (e) => e < 0 && -e < this.currentAheadToleranceMs() || e > 0 && e < this.currentSeekToleranceMs() || Math.abs(e) < 1 ? !0 : !this.isAllowedToSync()), p(this, "shouldDeferRecoverySeek", (e, t) => t !== void 0 && t > e), p(this, "buildStuckInBufferSeekPlan", () => {
13192
13210
  var e, t;
13193
- let n = this.playbackSource.currentTime, r = (e = (t = this.bufferSource).getBufferedEndAt) == null ? void 0 : e.call(t, n), i = n + Math.max(this.seekOvershoot, hw);
13211
+ let n = this.playbackSource.currentTime, r = (e = (t = this.bufferSource).getBufferedEndAt) == null ? void 0 : e.call(t, n), i = n + Math.max(this.seekOvershoot, vw);
13194
13212
  if (r === void 0 || i >= r) return;
13195
13213
  let a = this.findKeyframeCloseToTimestamp(i);
13196
13214
  return {
@@ -13267,7 +13285,7 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
13267
13285
  if (!r && !this.isAllowedToSyncIgnoringCooldown() || r && (this.isSeeking() || !this.currentChannelId || this.isSuspended || this.playbackSource.isPaused) || (this.driftSamples.push(t), !this.isSeekCooldownExpired()) || !r && this.driftSamples.items().length < this.driftSamplesToCollect && Math.abs(t) < 2e3) return;
13268
13286
  let i = r ? t : Ut(this.driftSamples.items());
13269
13287
  if (!r && this.tryPlaybackRateSync(i) || !r && this.shouldSkipNormalSeek(i)) return;
13270
- let a = performance.now() - this.config.seek.timeoutMs * this.state.seekToleranceMultiplier, o = this.seekAdjustmentTimestamps.filter(uw(a)).length, s = this.currentEmergencySeekToleranceMs(), c = i > 0 && i >= s;
13288
+ let a = performance.now() - this.config.seek.timeoutMs * this.state.seekToleranceMultiplier, o = this.seekAdjustmentTimestamps.filter(pw(a)).length, s = this.currentEmergencySeekToleranceMs(), c = i > 0 && i >= s;
13271
13289
  if (o && this.state.seekToleranceMultiplier > 2 && !r && !c) {
13272
13290
  this.logger.debug("Too many seek adjustments within sliding window", {
13273
13291
  seekCooldownThreshold: a,
@@ -13296,9 +13314,9 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
13296
13314
  return;
13297
13315
  }
13298
13316
  }), p(this, "onPageActive", (e) => {
13299
- this.setSyncInterval(e ? dw : fw), e && this.onSync();
13317
+ this.setSyncInterval(e ? mw : hw), e && this.onSync();
13300
13318
  }), p(this, "onPageShow", (e) => {
13301
- e.persisted && (this.setSyncInterval(document.visibilityState === "hidden" ? fw : dw), this.onSync());
13319
+ e.persisted && (this.setSyncInterval(document.visibilityState === "hidden" ? hw : mw), this.onSync());
13302
13320
  }), p(this, "setSyncInterval", (e) => {
13303
13321
  this.syncInterval !== void 0 && this.currentSyncIntervalMs === e || (this.clearSyncInterval(), this.currentSyncIntervalMs = e, this.syncInterval = this.timers.setInterval(this.onSync, e));
13304
13322
  }), p(this, "clearSyncInterval", () => {
@@ -13309,11 +13327,11 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
13309
13327
  let t = n >= e - this.config.seek.keyframeSearchBeforeMs, r = n <= e + this.config.seek.keyframeSearchAfterMs;
13310
13328
  if (t && r) return n;
13311
13329
  }
13312
- }), this.logger = t, this.emitter = e, this.playbackSource = n, this.bufferSource = r, this.usesMse = a, this.seekOvershoot = lw(a), this.config = {
13313
- seek: L({}, _w.seek),
13314
- timeshift: L({}, _w.timeshift),
13315
- playbackRate: L({}, _w.playbackRate),
13316
- backoff: L({}, _w.backoff)
13330
+ }), this.logger = t, this.emitter = e, this.playbackSource = n, this.bufferSource = r, this.usesMse = a, this.seekOvershoot = fw(a), this.config = {
13331
+ seek: L({}, bw.seek),
13332
+ timeshift: L({}, bw.timeshift),
13333
+ playbackRate: L({}, bw.playbackRate),
13334
+ backoff: L({}, bw.backoff)
13317
13335
  }, this.config.timeshift.enabled = i, a || (this.config.seek.toleranceMs = 50, this.config.timeshift.toleranceMs = 20, this.config.seek.aheadToleranceMs = 40), this.state = {
13318
13336
  seekToleranceMultiplier: 1,
13319
13337
  timeshiftToleranceMultiplier: 1
@@ -13375,8 +13393,8 @@ var ow, sw = 5e3, cw = () => it() || tt(), lw = (e) => e && cw() ? 100 : 0, uw =
13375
13393
  return this.serverCurrentTime - this.playbackSource.currentTime;
13376
13394
  }
13377
13395
  };
13378
- ow = vw, p(vw, "create", (e, t, n, r, i, a = !0) => new ow(e, t, n, r, i, a)), H(), R(), m(), P();
13379
- var yw, bw = {
13396
+ lw = xw, p(xw, "create", (e, t, n, r, i, a = !0) => new lw(e, t, n, r, i, a)), H(), R(), m(), P();
13397
+ var Sw, Cw = {
13380
13398
  enabled: !0,
13381
13399
  interval: 3e4,
13382
13400
  includeErrors: !0,
@@ -13385,11 +13403,11 @@ var yw, bw = {
13385
13403
  maxRetries: 10,
13386
13404
  maxErrorReports: 50,
13387
13405
  maxEvents: 50
13388
- }, xw = (e, t) => L(L({}, t), {}, {
13406
+ }, ww = (e, t) => L(L({}, t), {}, {
13389
13407
  type: e,
13390
13408
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
13391
13409
  discriminator: "web"
13392
- }), Sw = class {
13410
+ }), Tw = class {
13393
13411
  constructor(e, t, n, r) {
13394
13412
  var i = this;
13395
13413
  p(this, "logger", void 0), p(this, "timers", new lr()), p(this, "emitter", void 0), p(this, "options", void 0), p(this, "parentContext", void 0), p(this, "unsentLines", new w(100)), p(this, "retries", 0), p(this, "errorCount", 0), p(this, "eventCount", 0), p(this, "statsCount", 0), p(this, "unload", () => {
@@ -13406,7 +13424,7 @@ var yw, bw = {
13406
13424
  initiator: "interval"
13407
13425
  }, n = {}) => {
13408
13426
  if (!this.options.includeStats) return;
13409
- let r = this.parentContext.getStatistics(), i = xw("stats", L(L(L({}, n), r), {}, {
13427
+ let r = this.parentContext.getStatistics(), i = ww("stats", L(L(L({}, n), r), {}, {
13410
13428
  isFinal: e,
13411
13429
  initiator: t,
13412
13430
  count: this.statsCount++
@@ -13414,7 +13432,7 @@ var yw, bw = {
13414
13432
  this.unsentLines.push(i);
13415
13433
  }), p(this, "addEvent", (e) => {
13416
13434
  if (!this.options.includeEvents || this.eventCount > this.options.maxEvents) return;
13417
- let t = xw("event", L(L({}, this.parentContext.getStatistics()), e));
13435
+ let t = ww("event", L(L({}, this.parentContext.getStatistics()), e));
13418
13436
  this.eventCount++, this.unsentLines.push(t);
13419
13437
  }), p(this, "getStatistics", () => ({ errorCount: this.errorCount })), p(this, "send", function() {
13420
13438
  var e = N(function* (e) {
@@ -13459,12 +13477,12 @@ var yw, bw = {
13459
13477
  let { includeErrors: t, maxErrorReports: n } = this.options;
13460
13478
  if (!(e instanceof U) || e.code() === "channel_not_live" || !t || (this.errorCount++, this.errorCount > n)) return;
13461
13479
  let r = this.parentContext.getStatistics();
13462
- this.unsentLines.push(xw("error", L(L({}, r), e.toStringifiable())));
13463
- }), this.logger = e, this.emitter = t, this.options = L(L({}, bw), n), this.parentContext = r;
13480
+ this.unsentLines.push(ww("error", L(L({}, r), e.toStringifiable())));
13481
+ }), this.logger = e, this.emitter = t, this.options = L(L({}, Cw), n), this.parentContext = r;
13464
13482
  }
13465
13483
  };
13466
- yw = Sw, p(Sw, "create", (e, t, n, r) => new yw(e, t, n, r)), H(), m();
13467
- var Cw, ww = class {
13484
+ Sw = Tw, p(Tw, "create", (e, t, n, r) => new Sw(e, t, n, r)), H(), m();
13485
+ var Ew, Dw = class {
13468
13486
  constructor(e, t, n) {
13469
13487
  p(this, "logger", void 0), p(this, "elements", void 0), p(this, "documentState", void 0), p(this, "timers", new lr()), p(this, "unload", () => {
13470
13488
  this.timers.unload();
@@ -13475,8 +13493,8 @@ var Cw, ww = class {
13475
13493
  };
13476
13494
  //#endregion
13477
13495
  //#region ../../libs/web-sdk/src/OptionsProvider.ts
13478
- Cw = ww, p(ww, "create", (e, t, n) => new Cw(e, t, n)), m();
13479
- var Tw = [
13496
+ Ew = Dw, p(Dw, "create", (e, t, n) => new Ew(e, t, n)), m();
13497
+ var Ow = [
13480
13498
  "minBufferTime",
13481
13499
  "maxBufferTime",
13482
13500
  "burstEnabled",
@@ -13485,10 +13503,10 @@ var Tw = [
13485
13503
  "offscreenCanvasEnabled",
13486
13504
  "videoCodecs"
13487
13505
  ];
13488
- function Ew(e) {
13489
- return Tw.includes(e);
13506
+ function kw(e) {
13507
+ return Ow.includes(e);
13490
13508
  }
13491
- var Dw = class {
13509
+ var Aw = class {
13492
13510
  constructor(e) {
13493
13511
  p(this, "options", void 0), p(this, "overrides", /* @__PURE__ */ new Map()), this.options = e;
13494
13512
  }
@@ -13502,7 +13520,7 @@ var Dw = class {
13502
13520
  this.options[e] = t;
13503
13521
  }
13504
13522
  get(e, t) {
13505
- if (t && Ew(e)) {
13523
+ if (t && kw(e)) {
13506
13524
  var n;
13507
13525
  let r = (n = this.overrides.get(t)) == null ? void 0 : n[e];
13508
13526
  if (r !== void 0) return r;
@@ -13517,7 +13535,7 @@ var Dw = class {
13517
13535
  //#endregion
13518
13536
  //#region ../../libs/web-sdk/src/processSampleTimestamps.ts
13519
13537
  R();
13520
- var Ow = 6, kw = (e) => {
13538
+ var jw = 6, Mw = (e) => {
13521
13539
  let t = [e], n = 0, r = 0, i = !1, a = (e, t) => {
13522
13540
  var i, a;
13523
13541
  if (e.flags && kl(e.flags)) {
@@ -13529,7 +13547,7 @@ var Ow = 6, kw = (e) => {
13529
13547
  return u > 0 && (r = u), L(L({}, e), {}, { duration: u > 0 ? u : r });
13530
13548
  };
13531
13549
  return (e, n = !1) => {
13532
- if (e.flags && kl(e.flags) && n && (i = !i), !(n && t.length < Ow && i) && t.length > 0) {
13550
+ if (e.flags && kl(e.flags) && n && (i = !i), !(n && t.length < jw && i) && t.length > 0) {
13533
13551
  i = !1;
13534
13552
  let n = e;
13535
13553
  for (let e = t.length - 1; e > 0; e--) {
@@ -13542,13 +13560,13 @@ var Ow = 6, kw = (e) => {
13542
13560
  }
13543
13561
  return t.push(e), [];
13544
13562
  };
13545
- }, Aw = ["mse", "wasm"], jw = (e) => e == null ? Aw : e, Mw = (e) => {
13563
+ }, Nw = ["mse", "wasm"], Pw = (e) => e == null ? Nw : e, Fw = (e) => {
13546
13564
  if (!e) return !1;
13547
13565
  let t = e.headers && Object.keys(e.headers).length > 0, n = e.queryParams && Object.keys(e.queryParams).length > 0;
13548
13566
  return !!(t || n);
13549
- }, Nw = (e, t, n) => {
13550
- if (Mw(n)) return "mse";
13551
- let r = jw(e);
13567
+ }, Iw = (e, t, n) => {
13568
+ if (Fw(n)) return "mse";
13569
+ let r = Pw(e);
13552
13570
  for (let e of r) switch (e) {
13553
13571
  case "mse":
13554
13572
  if (t) return "mse";
@@ -13563,7 +13581,7 @@ var Ow = 6, kw = (e) => {
13563
13581
  //#endregion
13564
13582
  //#region ../../libs/web-sdk/src/sampleFromMessage.ts
13565
13583
  R();
13566
- var Pw = (e, t, n) => {
13584
+ var Lw = (e, t, n) => {
13567
13585
  if (zr(t)) return L(L({}, e), {}, {
13568
13586
  type: "video",
13569
13587
  codec: t.codec,
@@ -13588,12 +13606,12 @@ var Pw = (e, t, n) => {
13588
13606
  //#endregion
13589
13607
  //#region ../../libs/web-sdk/src/statisticsRounding.ts
13590
13608
  R();
13591
- var Fw = ({ average: e, last: t, max: n, min: r }) => ({
13609
+ var Rw = ({ average: e, last: t, max: n, min: r }) => ({
13592
13610
  average: Math.round(e),
13593
13611
  last: Math.round(t),
13594
13612
  max: Math.round(n),
13595
13613
  min: Math.round(r)
13596
- }), Iw = [
13614
+ }), zw = [
13597
13615
  "timeSpentBuffering",
13598
13616
  "timePerBufferingEvent",
13599
13617
  "drift",
@@ -13605,28 +13623,28 @@ var Fw = ({ average: e, last: t, max: n, min: r }) => ({
13605
13623
  "videoKeyframeIntervalMs",
13606
13624
  "timeToConnected",
13607
13625
  "mediaSourceOpenTime"
13608
- ], Lw = [
13626
+ ], Bw = [
13609
13627
  "videoDecodeTime",
13610
13628
  "audioDecodeTime",
13611
13629
  "videoTransportTime",
13612
13630
  "rtt"
13613
- ], Rw = (e) => typeof e == "object" && !!e && "min" in e && "max" in e && "average" in e && "last" in e, zw = (e) => {
13631
+ ], Vw = (e) => typeof e == "object" && !!e && "min" in e && "max" in e && "average" in e && "last" in e, Hw = (e) => {
13614
13632
  let t = L({}, e);
13615
- for (let e of Iw) {
13633
+ for (let e of zw) {
13616
13634
  let n = t[e];
13617
13635
  typeof n == "number" && (t[e] = Math.round(n));
13618
13636
  }
13619
- for (let e of Lw) {
13637
+ for (let e of Bw) {
13620
13638
  let n = t[e];
13621
- Rw(n) && (t[e] = Fw(n));
13639
+ Vw(n) && (t[e] = Rw(n));
13622
13640
  }
13623
13641
  return t;
13624
13642
  };
13625
13643
  //#endregion
13626
13644
  //#region ../../libs/web-sdk/src/validateOptions.ts
13627
13645
  R();
13628
- var Bw = (e, t) => e && typeof e == "object" && t in e, Vw = (e) => !(typeof e != "object" || !Bw(e, "channelId") || typeof e.channelId != "string" || !Bw(e, "url") || typeof e.url != "string" || e.channelId.length === 0 || e.url.length === 0), Hw = (e) => {
13629
- if (!Vw(e)) throw new U("Invalid options", {
13646
+ var Uw = (e, t) => e && typeof e == "object" && t in e, Ww = (e) => !(typeof e != "object" || !Uw(e, "channelId") || typeof e.channelId != "string" || !Uw(e, "url") || typeof e.url != "string" || e.channelId.length === 0 || e.url.length === 0), Gw = (e) => {
13647
+ if (!Ww(e)) throw new U("Invalid options", {
13630
13648
  isFatal: !0,
13631
13649
  code: "invalid_options"
13632
13650
  });
@@ -13635,7 +13653,7 @@ var Bw = (e, t) => e && typeof e == "object" && t in e, Vw = (e) => !(typeof e !
13635
13653
  let n = t;
13636
13654
  n[e] === void 0 && delete n[e];
13637
13655
  }), t;
13638
- }, Uw = (e) => {
13656
+ }, Kw = (e) => {
13639
13657
  if (typeof e != "object" || !e) throw Error("not an object");
13640
13658
  if (!("video" in e)) throw Error("missing video in subscription");
13641
13659
  if (!("audio" in e)) throw Error("missing audio in subscription");
@@ -13643,7 +13661,7 @@ var Bw = (e, t) => e && typeof e == "object" && t in e, Vw = (e) => !(typeof e !
13643
13661
  return !0;
13644
13662
  };
13645
13663
  vo(), Dl(), vS(), m(), P();
13646
- var Ww = class {
13664
+ var qw = class {
13647
13665
  constructor(e) {
13648
13666
  var t = this;
13649
13667
  p(this, "cache", /* @__PURE__ */ new Map()), p(this, "inFlight", /* @__PURE__ */ new Map()), p(this, "checkVideoSupport", function() {
@@ -13706,10 +13724,10 @@ var Ww = class {
13706
13724
  }
13707
13725
  };
13708
13726
  H(), m(), E(), R(), P(), M(), A();
13709
- var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PURE__ */ new WeakMap(), Yw = /* @__PURE__ */ new WeakMap(), Xw = class e extends nn {
13727
+ var Jw = 1e4, Yw = 1280 * 720, Xw = /* @__PURE__ */ new WeakMap(), Zw = /* @__PURE__ */ new WeakMap(), Qw = /* @__PURE__ */ new WeakMap(), $w = class e extends nn {
13710
13728
  constructor(t) {
13711
13729
  var n, r, i;
13712
- super(), n = this, p(this, "pictureInPicture", void 0), p(this, "drm", void 0), p(this, "browser", pt()), p(this, "options", void 0), p(this, "element", void 0), p(this, "playbackSource", void 0), p(this, "emitter", new nn()), p(this, "logger", void 0), p(this, "modules", void 0), p(this, "clientIp", void 0), p(this, "sessionId", void 0), p(this, "clientId", Er()), p(this, "_channels", []), p(this, "createdAt", performance.now()), p(this, "offscreenCanvasElement", void 0), p(this, "webCodecsRenditionSupport", void 0), p(this, "hasCalledConnect", !1), p(this, "hasRequestedAudioSession", !1), p(this, "isUserPaused", !1), p(this, "isMediaElementPaused", !1), p(this, "latestEmittedLanguages", []), p(this, "wakeLock", void 0), p(this, "pool", new re(e.MAX_POOL_SIZE)), p(this, "userAgentInformation", new wr()), p(this, "encryptedMediaExtensions", void 0), T(this, qw, 0), T(this, Jw, []), p(this, "sampleProcessingSesssions", /* @__PURE__ */ new Map()), p(this, "unbackedSamplesWarned", new gS()), p(this, "unextractableSamplesWarned", new gS()), p(this, "sizes", /* @__PURE__ */ new Map()), p(this, "isSuspended", !0), p(this, "inactivityDisconnectInterval", void 0), p(this, "visiblePauseTimeout", void 0), p(this, "offscreenSubtitleInterval", void 0), T(this, Yw, void 0), p(this, "attach", (e) => {
13730
+ super(), n = this, p(this, "pictureInPicture", void 0), p(this, "drm", void 0), p(this, "browser", pt()), p(this, "options", void 0), p(this, "element", void 0), p(this, "playbackSource", void 0), p(this, "emitter", new nn()), p(this, "logger", void 0), p(this, "modules", void 0), p(this, "clientIp", void 0), p(this, "sessionId", void 0), p(this, "clientId", Er()), p(this, "_channels", []), p(this, "createdAt", performance.now()), p(this, "offscreenCanvasElement", void 0), p(this, "webCodecsRenditionSupport", void 0), p(this, "hasCalledConnect", !1), p(this, "hasRequestedAudioSession", !1), p(this, "isUserPaused", !1), p(this, "isMediaElementPaused", !1), p(this, "latestEmittedLanguages", []), p(this, "wakeLock", void 0), p(this, "pool", new re(e.MAX_POOL_SIZE)), p(this, "userAgentInformation", new wr()), p(this, "encryptedMediaExtensions", void 0), T(this, Xw, 0), T(this, Zw, []), p(this, "sampleProcessingSesssions", /* @__PURE__ */ new Map()), p(this, "unbackedSamplesWarned", new gS()), p(this, "unextractableSamplesWarned", new gS()), p(this, "sizes", /* @__PURE__ */ new Map()), p(this, "isSuspended", !0), p(this, "inactivityDisconnectInterval", void 0), p(this, "visiblePauseTimeout", void 0), p(this, "offscreenSubtitleInterval", void 0), T(this, Qw, void 0), p(this, "attach", (e) => {
13713
13731
  var t;
13714
13732
  (t = this.wakeLock) == null || t.attach(e), e.appendChild(this.element);
13715
13733
  }), p(this, "setElement", (e) => {
@@ -13796,20 +13814,20 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
13796
13814
  }), p(this, "updateTextTracks", (e) => {
13797
13815
  let t = e.filter((e) => e.codec === "webvtt");
13798
13816
  t.forEach((e) => {
13799
- if (!j(Jw, this).find((t) => t.language === e.language)) {
13817
+ if (!j(Zw, this).find((t) => t.language === e.language)) {
13800
13818
  if (this.modules.canvasModule) {
13801
13819
  let t = this.modules.canvasModule.textTracks.addTextTrack(e.kind, e.label || e.language || "", e.language || "");
13802
- j(Jw, this).push(t);
13820
+ j(Zw, this).push(t);
13803
13821
  } else if (this.mediaElement instanceof HTMLVideoElement) {
13804
13822
  let t = this.mediaElement.addTextTrack(e.kind, e.label || e.language, e.language);
13805
- j(Jw, this).push(t);
13823
+ j(Zw, this).push(t);
13806
13824
  }
13807
13825
  }
13808
13826
  });
13809
- for (let e of j(Jw, this)) t.find((t) => t.language === e.language) ? e.mode === "disabled" && (e.mode = "hidden") : e.mode = "disabled";
13827
+ for (let e of j(Zw, this)) t.find((t) => t.language === e.language) ? e.mode === "disabled" && (e.mode = "hidden") : e.mode = "disabled";
13810
13828
  this.emit("text tracks", this.textTracks);
13811
13829
  }), p(this, "cleanupTextTracks", (e = this.currentTime - 2e4) => {
13812
- j(Jw, this).forEach((t) => {
13830
+ j(Zw, this).forEach((t) => {
13813
13831
  if (t.cues) for (let n of Array.from(t.cues)) n.endTime * 1e3 < e - 2e3 && t.removeCue(n);
13814
13832
  });
13815
13833
  }), p(this, "filterRenditions", function() {
@@ -13985,7 +14003,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
13985
14003
  (e = n.modules.decoder) == null || e.unload(), n.modules.decoder = p, n.isHiddenWithBackgroundPlayback() && n.modules.decoder.enableBackgroundTimers(), n.modules.decoder.setVideoRenderingEnabled(n.isVideoOnScreen()), n.modules.decoder.load(), n.setupOffscreenSubtitleRouting();
13986
14004
  })), p(this, "capturesCanvasOnWebKit", (e) => !!e && this.browser.platform.isWebKit && this.modules.canvasModule instanceof AC), p(this, "connectWebKitVideoOutput", (e, t) => {
13987
14005
  let n = () => {
13988
- t.setVideoTrack(void 0), this.browser.platform.isIOS && e.setMaxVideoCanvasPixels(Kw);
14006
+ t.setVideoTrack(void 0), this.browser.platform.isIOS && e.setMaxVideoCanvasPixels(Yw);
13989
14007
  };
13990
14008
  e.onVideoTrackLost((e) => {
13991
14009
  this.logger.warn("Worker video track lost, falling back to canvas capture", { error: e }), n();
@@ -14035,7 +14053,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14035
14053
  this.clearVisiblePauseDisconnect(), this.isUserPaused = !1, this.requestAudioSessionOnce(), this.hasCalledConnect ? this.unsuspend() : this.playbackState !== "playing" && (this._connect(), self.addEventListener("__vindral_register_debug__", this.registerDebugInstance), this.modules.timer.setInterval(() => this.cleanupTextTracks(), e.REMOVE_CUE_THRESHOLD)), (t = this.wakeLock) == null || t.enable(), this.playbackState === "paused" && this.playbackSource.isActivated && (this.resetModules(), this.emitter.emit("flush buffers"), this.cleanupTextTracks(2 ** 53 - 1)), this.playbackSource.play(), this.isHiddenWithBackgroundPlayback() && this.scheduleInactivityDisconnect();
14036
14054
  }), p(this, "getStatistics", () => {
14037
14055
  let e = Object.values(this.modules).reduce((e, t) => t && "getStatistics" in t ? L(L({}, e), t.getStatistics()) : e, this.getRuntimeInfo()), t = Math.round(this.timeActive > 0 ? (e.bytesReceived || 0) * 8 / (this.timeActive / 1e3) : 0), n = this.uptime / 36e5, r = Math.max(0, (e.connectCount || 0) - 1), i = n > 0 ? r / n : 0, a = this.timeActive / 6e4, o = Math.max(a, 1), s = a > 0 ? (e.seekAdjustmentCount || 0) / o : 0, c = a > 0 ? (e.timeshiftAdjustmentCount || 0) / o : 0;
14038
- return zw(L(L({}, e), {}, {
14056
+ return Hw(L(L({}, e), {}, {
14039
14057
  averageBitRate: t,
14040
14058
  reconnectsPerHour: i,
14041
14059
  seekAdjustmentsPerMinute: s,
@@ -14044,7 +14062,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14044
14062
  }), p(this, "resetModules", () => {
14045
14063
  Object.values(this.modules).forEach((e) => {
14046
14064
  e && "reset" in e && e.reset();
14047
- }), this.playbackSource instanceof ru && this.modules.adaptivity.reset(Gw), this.sampleProcessingSesssions.clear(), this.cleanupTextTracks(Infinity), this.playbackSource.currentTime = 0, this.playbackSource.isActivated = !1;
14065
+ }), this.playbackSource instanceof ru && this.modules.adaptivity.reset(Jw), this.sampleProcessingSesssions.clear(), this.cleanupTextTracks(Infinity), this.playbackSource.currentTime = 0, this.playbackSource.isActivated = !1;
14048
14066
  }), p(this, "disconnectForInactivePage", (e) => {
14049
14067
  if (this.clearInactivityDisconnect(), this.emitter.emit("flush buffers"), !this.isBackgroundPlayEnabled(this.channelId)) {
14050
14068
  var t;
@@ -14078,7 +14096,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14078
14096
  let e = this.modules.canvasModule instanceof AC ? !0 : void 0;
14079
14097
  return L({
14080
14098
  uptime: this.uptime,
14081
- version: "4.7.2-4-gc6377efe",
14099
+ version: "4.7.2-6-gceea26ed",
14082
14100
  clientId: this.clientId,
14083
14101
  sessionId: this.sessionId,
14084
14102
  channelId: this.channelId,
@@ -14123,7 +14141,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14123
14141
  if (this.browser.platform.isWebKit || !this.browser.isMobile) return !1;
14124
14142
  let t = (e = this.modules) == null ? void 0 : e.decoder;
14125
14143
  return t ? t.audioWebCodecsInUse : this.isWebCodecsAudioAvailable(this.channelId);
14126
- }), this.options = new Dw(L(L({}, Gr), Hw(t))), t.telemetryEnabled === void 0 && ["localhost", "127.0.0.1"].includes(location.hostname) && this.options.set("telemetryEnabled", !1);
14144
+ }), this.options = new Aw(L(L({}, Gr), Gw(t))), t.telemetryEnabled === void 0 && ["localhost", "127.0.0.1"].includes(location.hostname) && this.options.set("telemetryEnabled", !1);
14127
14145
  let a = {
14128
14146
  channelId: this.options.get("channelId"),
14129
14147
  audio: {
@@ -14136,14 +14154,14 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14136
14154
  height: this.options.get("maxSize").height
14137
14155
  }
14138
14156
  }, o = Sn.get();
14139
- o.setLevel(this.options.get("logLevel")), o.setDebug(!1), this.logger = o, this.webCodecsRenditionSupport = new Ww(o), t.iosMediaElementEnabled !== void 0 && this.logger.warn("Option iosMediaElementEnabled is deprecated and will be removed in a future release. Use streamToMediaElementEnabled instead.");
14157
+ o.setLevel(this.options.get("logLevel")), o.setDebug(!1), this.logger = o, this.webCodecsRenditionSupport = new qw(o), t.iosMediaElementEnabled !== void 0 && this.logger.warn("Option iosMediaElementEnabled is deprecated and will be removed in a future release. Use streamToMediaElementEnabled instead.");
14140
14158
  let s = (r = t.streamToMediaElementEnabled) == null ? t.iosMediaElementEnabled : r;
14141
14159
  s !== void 0 && (this.options.set("streamToMediaElementEnabled", s), this.options.set("iosMediaElementEnabled", s)), t.iosBackgroundPlayEnabled !== void 0 && this.logger.warn("Option iosBackgroundPlayEnabled is deprecated and will be removed in a future release. Use backgroundPlayEnabled instead.");
14142
14160
  let c = (i = t.backgroundPlayEnabled) == null ? t.iosBackgroundPlayEnabled : i;
14143
14161
  c !== void 0 && (this.options.set("backgroundPlayEnabled", c), this.options.set("iosBackgroundPlayEnabled", c));
14144
14162
  let l = t.mseEnabled !== void 0, u = t.decoders !== void 0;
14145
14163
  l && this.logger.warn("Option mseEnabled is deprecated and will be removed in a future release. Use decoders instead (e.g. decoders: [\"wasm\"])."), l && !u && t.mseEnabled === !1 && this.options.set("decoders", ["wasm"]);
14146
- let d = UC.create(this.emitter, this.logger.createContext("PictureInPictureModule")), f = this.options.get("mediaSessionEnabled") ? OC.create(this.emitter, this.logger.createContext("MediaSessionModule"), {
14164
+ let d = KC.create(this.emitter, this.logger.createContext("PictureInPictureModule")), f = this.options.get("mediaSessionEnabled") ? OC.create(this.emitter, this.logger.createContext("MediaSessionModule"), {
14147
14165
  metadata: this.options.get("mediaSessionMetadata"),
14148
14166
  decoy: this.willUseMediaSource() || this.usesSplitCanvasAudio() ? void 0 : Su.create(this.logger.createContext("AudioFocusDecoy"), this.yieldToInterruption),
14149
14167
  isMuted: () => this.playbackSource.userMuted,
@@ -14158,7 +14176,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14158
14176
  reconnectHandler: this.options.get("reconnectHandler"),
14159
14177
  options: this.options,
14160
14178
  onConnectInfo: this.onConnectInfo
14161
- }), g = iw.create(this.logger.createContext("SubscriptionModule"), this.emitter, a), _ = ew.create(this.emitter, g), v = GC.create(this.emitter, this.logger.createContext("PlaybackModule"), this, this.options.get("minBufferTime")), y = QC.create(this.emitter, this.logger.createContext("QualityOfServiceModule"), _, v);
14179
+ }), g = sw.create(this.logger.createContext("SubscriptionModule"), this.emitter, a), _ = rw.create(this.emitter, g), v = JC.create(this.emitter, this.logger.createContext("PlaybackModule"), this, this.options.get("minBufferTime")), y = tw.create(this.emitter, this.logger.createContext("QualityOfServiceModule"), _, v);
14162
14180
  this.encryptedMediaExtensions = new $a(this.emitter, this.logger.createContext("EncryptedMediaExtensions"), t.drm), this.drm = {
14163
14181
  setHeaders: (e) => {
14164
14182
  this.encryptedMediaExtensions.headers = e;
@@ -14177,7 +14195,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14177
14195
  logger: this.logger.createContext("MediaElement"),
14178
14196
  poster: x
14179
14197
  });
14180
- e.on("buffer state", (e) => this.onMediaElementBufferState(e, te)), e.on("needs user input", (e) => this.emitter.emit("needs user input", e)), e.on("volume state", (e) => this.emitter.emit("volume state", e)), e.on("media element state", (e) => this.onMediaElementState(e)), this.element = e.element, this.playbackSource = e, $a.isSupported() && this.encryptedMediaExtensions.attach(e.element), te = FC.create(this.logger.createContext("MseModule"), this.emitter, this.element), this.options.get("pauseSupportEnabled") || (ne = ww.create(this.logger.createContext("UnpauseModule"), [e], b)), this.options.get("pictureInPictureEnabled") && this.emitter.emit("add picture in picture listener", { element: e.element });
14198
+ e.on("buffer state", (e) => this.onMediaElementBufferState(e, te)), e.on("needs user input", (e) => this.emitter.emit("needs user input", e)), e.on("volume state", (e) => this.emitter.emit("volume state", e)), e.on("media element state", (e) => this.onMediaElementState(e)), this.element = e.element, this.playbackSource = e, $a.isSupported() && this.encryptedMediaExtensions.attach(e.element), te = FC.create(this.logger.createContext("MseModule"), this.emitter, this.element), this.options.get("pauseSupportEnabled") || (ne = Dw.create(this.logger.createContext("UnpauseModule"), [e], b)), this.options.get("pictureInPictureEnabled") && this.emitter.emit("add picture in picture listener", { element: e.element });
14181
14199
  } else if (this.streamsToMediaElement()) {
14182
14200
  let e = AC.create(this.emitter, this.logger.createContext("ModernCanvasModule"), this.pool, this, {
14183
14201
  type: this.options.get("media") === "audio" ? "audio" : "video",
@@ -14191,7 +14209,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14191
14209
  });
14192
14210
  this.element = e.element().element, this.playbackSource = e, ie = e;
14193
14211
  let t = this.browser.platform.isIOS && this.browser.platform.iosVersion <= 15;
14194
- this.options.get("pictureInPictureEnabled") && !t && this.emitter.emit("add picture in picture listener", { element: this.element }), this.options.get("pauseSupportEnabled") || (ne = ww.create(this.logger.createContext("UnpauseModule"), e.elements(), b));
14212
+ this.options.get("pictureInPictureEnabled") && !t && this.emitter.emit("add picture in picture listener", { element: this.element }), this.options.get("pauseSupportEnabled") || (ne = Dw.create(this.logger.createContext("UnpauseModule"), e.elements(), b));
14195
14213
  } else {
14196
14214
  let e;
14197
14215
  e = CC.create(this.emitter, this.logger.createContext("LegacyCanvasModule"), this.pool, this, this.options.get("muted") || this.options.get("media") === "video", this.options.get("volume"), () => {
@@ -14212,9 +14230,9 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14212
14230
  getTargetBufferTime: () => v.getTargetBufferTime(),
14213
14231
  getNextBufferedRangeStart: te ? (e) => te.getNextBufferedRangeStart(e) : void 0,
14214
14232
  getBufferedEndAt: te ? (e) => te.getBufferedEndAt(e) : void 0
14215
- }, oe = vw.create(this.emitter, this.logger.createContext("SyncModule"), this.playbackSource, C, ae, S), w = cC.create(this.logger.createContext("JitterModule")), se = ou.create(this.emitter), ce = (this.options.get("edgeUrl") || this.options.get("url")).replace("wss://", "https://").replace("ws://", "http://").replace("//lb.", "//errors."), le = new URL("/telemetry", ce).toString();
14233
+ }, oe = xw.create(this.emitter, this.logger.createContext("SyncModule"), this.playbackSource, C, ae, S), w = cC.create(this.logger.createContext("JitterModule")), se = ou.create(this.emitter), ce = (this.options.get("edgeUrl") || this.options.get("url")).replace("wss://", "https://").replace("ws://", "http://").replace("//lb.", "//errors."), le = new URL("/telemetry", ce).toString();
14216
14234
  this.modules = {
14217
- telemetry: Sw.create(this.logger.createContext("TelemetryModule"), this.emitter, {
14235
+ telemetry: Tw.create(this.logger.createContext("TelemetryModule"), this.emitter, {
14218
14236
  url: le,
14219
14237
  enabled: this.options.get("telemetryEnabled"),
14220
14238
  includeStats: !1,
@@ -14299,7 +14317,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14299
14317
  let r = ((t = (n = e.telemetry) == null ? void 0 : n.probability) == null ? 1 : t) >= Math.random();
14300
14318
  if (e.telemetry) {
14301
14319
  var i;
14302
- (i = this.modules.telemetry) == null || i.unload(), this.modules.telemetry = Sw.create(this.logger.createContext("TelemetryModule"), this.emitter, L(L({}, e.telemetry), {}, { enabled: this.options.get("telemetryEnabled") && r }), this), this.modules.telemetry.load();
14320
+ (i = this.modules.telemetry) == null || i.unload(), this.modules.telemetry = Tw.create(this.logger.createContext("TelemetryModule"), this.emitter, L(L({}, e.telemetry), {}, { enabled: this.options.get("telemetryEnabled") && r }), this), this.modules.telemetry.load();
14303
14321
  }
14304
14322
  }), this.emitter.on("adapt level", (e) => {
14305
14323
  let t = this.modules.renditions.getRenditionLevels(), n = this.modules.renditions.getRenditionLevel(), r = t.findIndex((e) => e === n), i = t.length - 1, a = r;
@@ -14330,8 +14348,8 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14330
14348
  audio: L(L({}, this.targetSubscription.audio), d == null ? void 0 : d.audio)
14331
14349
  })), this.emitter.emit("adapted level");
14332
14350
  }), this.emitter.on("text track data", (e) => {
14333
- let t = j(Jw, this).find((t) => t.language === e.language), n = this.modules.sync.getTimeshiftOffset() / 1e3, r = n - j(qw, this);
14334
- if (k(qw, this, n), t) {
14351
+ let t = j(Zw, this).find((t) => t.language === e.language), n = this.modules.sync.getTimeshiftOffset() / 1e3, r = n - j(Xw, this);
14352
+ if (k(Xw, this, n), t) {
14335
14353
  if (t.cues) for (let e of t.cues) e.startTime -= r, e.endTime -= r;
14336
14354
  for (let r of e.cues) {
14337
14355
  let e = new VTTCue(r.startTime - n, r.endTime - n, r.text);
@@ -14347,19 +14365,19 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14347
14365
  this.clientIp = t.ip;
14348
14366
  break;
14349
14367
  case "renditions":
14350
- this.updateTextTracks(t.renditions), k(Yw, this, this.filterRenditions(t.renditions).then((e) => {
14368
+ this.updateTextTracks(t.renditions), k(Qw, this, this.filterRenditions(t.renditions).then((e) => {
14351
14369
  this.emitter.emit("renditions", {
14352
14370
  renditions: e,
14353
14371
  channelId: this.currentSubscription.channelId
14354
14372
  }), this.emit("rendition levels", this.modules.renditions.getRenditionLevels()), this.emitLanguagesIfChanged();
14355
14373
  }).finally(() => {
14356
- k(Yw, this, void 0);
14374
+ k(Qw, this, void 0);
14357
14375
  }));
14358
14376
  break;
14359
14377
  case "subscription changed":
14360
14378
  var r;
14361
14379
  try {
14362
- Uw(t.subscription);
14380
+ Kw(t.subscription);
14363
14381
  } catch (e) {
14364
14382
  this.emitter.emit("error", new U("Subscription failed validation", {
14365
14383
  source: e instanceof Error ? e : void 0,
@@ -14490,7 +14508,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14490
14508
  let O = function() {
14491
14509
  var e = N(function* (e) {
14492
14510
  let t = e.channelId;
14493
- j(Yw, n) && (yield j(Yw, n));
14511
+ j(Qw, n) && (yield j(Qw, n));
14494
14512
  let r = n.modules.renditions.getRendition(e.renditionId, t);
14495
14513
  if (!jl(e.flags)) {
14496
14514
  if (Ml(e.flags)) {
@@ -14504,8 +14522,8 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14504
14522
  } catch (e) {
14505
14523
  n.logger.warn("failed to parse WebVTT segment, dropping it", e);
14506
14524
  }
14507
- let a = r / 1e3, o = j(Jw, n).find((t) => t.language === e.language), s = a - j(qw, n);
14508
- if (k(qw, n, a), o) {
14525
+ let a = r / 1e3, o = j(Zw, n).find((t) => t.language === e.language), s = a - j(Xw, n);
14526
+ if (k(Xw, n, a), o) {
14509
14527
  if (o.cues) for (let e of o.cues) e.startTime -= s, e.endTime -= s;
14510
14528
  for (let e of i) {
14511
14529
  let t = new VTTCue(e.startTime - a, e.endTime - a, e.text);
@@ -14541,10 +14559,10 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14541
14559
  mimeType: s
14542
14560
  }), n.emit("initialized media");
14543
14561
  } else {
14544
- let t = Pw(e, r, n.sizes.get(e.renditionId));
14562
+ let t = Lw(e, r, n.sizes.get(e.renditionId));
14545
14563
  n.modules.jitter.recordSample(t);
14546
14564
  let a = n.sampleProcessingSesssions.get(i);
14547
- if (!a) a = kw(n.modules.sync.processSample(t)), n.sampleProcessingSesssions.set(i, a);
14565
+ if (!a) a = Mw(n.modules.sync.processSample(t)), n.sampleProcessingSesssions.set(i, a);
14548
14566
  else {
14549
14567
  let e = n.willUseMediaSource() && n.isSwitchingRenditionLevel && t.type === "video", r = a(n.modules.sync.processSample(t), e), i = t;
14550
14568
  r.forEach((e) => {
@@ -14651,7 +14669,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14651
14669
  this.modules.subscription.setLanguage(e), this.alignSizeAndBitRate(this.targetSubscription);
14652
14670
  }
14653
14671
  set textTrack(e) {
14654
- e !== this.textTrack && (j(Jw, this).forEach((t) => {
14672
+ e !== this.textTrack && (j(Zw, this).forEach((t) => {
14655
14673
  if (t.label === e) t.mode = "showing";
14656
14674
  else {
14657
14675
  if (t.mode === "showing" && t.cues) for (let e of [...t.cues]) t.removeCue(e);
@@ -14660,11 +14678,11 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14660
14678
  }), this.emitter.emit("text track", e));
14661
14679
  }
14662
14680
  get textTracks() {
14663
- return j(Jw, this).filter((e) => e.mode !== "disabled").map((e) => e.label);
14681
+ return j(Zw, this).filter((e) => e.mode !== "disabled").map((e) => e.label);
14664
14682
  }
14665
14683
  get textTrack() {
14666
14684
  var e;
14667
- return (e = j(Jw, this).find((e) => e.mode === "showing")) == null ? void 0 : e.label;
14685
+ return (e = j(Zw, this).find((e) => e.mode === "showing")) == null ? void 0 : e.label;
14668
14686
  }
14669
14687
  get channelId() {
14670
14688
  var e, t;
@@ -14802,7 +14820,7 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14802
14820
  return this.modules.subscription.getTargetSubscription();
14803
14821
  }
14804
14822
  resolvedDecoder(e) {
14805
- return Nw(this.options.get("decoders", e), this.browser.supportsMediaSource, this.options.get("drm"));
14823
+ return Iw(this.options.get("decoders", e), this.browser.supportsMediaSource, this.options.get("drm"));
14806
14824
  }
14807
14825
  usesSplitCanvasAudio() {
14808
14826
  return !this.willUseMediaSource() && this.options.get("streamToMediaElementEnabled") && Lt(this.browser) && this.options.get("media") !== "audio" && this.options.get("media") !== "video" && this.browser.platform.isIOS;
@@ -14842,89 +14860,89 @@ var Gw = 1e4, Kw = 1280 * 720, qw = /* @__PURE__ */ new WeakMap(), Jw = /* @__PU
14842
14860
  return this.hasCalledConnect && this.isBackgroundPlayEnabled(e) && !this.isUserPaused;
14843
14861
  }
14844
14862
  };
14845
- p(Xw, "MAX_POOL_SIZE", 10), p(Xw, "REMOVE_CUE_THRESHOLD", 1e3 * 10), p(Xw, "BACKGROUND_INACTIVITY_DISCONNECT_TIMEOUT", 1e3 * 15), p(Xw, "VISIBLE_PAUSE_DISCONNECT_DELAY", 1e3);
14846
- var Zw = {
14863
+ p($w, "MAX_POOL_SIZE", 10), p($w, "REMOVE_CUE_THRESHOLD", 1e3 * 10), p($w, "BACKGROUND_INACTIVITY_DISCONNECT_TIMEOUT", 1e3 * 15), p($w, "VISIBLE_PAUSE_DISCONNECT_DELAY", 1e3);
14864
+ var eT = {
14847
14865
  bar: "_bar_qm7bl_1",
14848
14866
  hidden: "_hidden_qm7bl_47"
14849
- }, Qw = "_withThumbnails_suenn_19", $w = {
14867
+ }, tT = "_withThumbnails_suenn_19", nT = {
14850
14868
  "channel-selection-item": "_channel-selection-item_suenn_1",
14851
14869
  "channel-selection-item-selected": "_channel-selection-item-selected_suenn_8",
14852
14870
  "channel-selection-item-image": "_channel-selection-item-image_suenn_13",
14853
- withThumbnails: Qw,
14871
+ withThumbnails: tT,
14854
14872
  "hide-on-small": "_hide-on-small_suenn_27"
14855
- }, eT = { "icon-button": "_icon-button_5fg7v_1" }, tT = {
14873
+ }, rT = { "icon-button": "_icon-button_5fg7v_1" }, iT = {
14856
14874
  viewBox: "-10 -10 44 44",
14857
14875
  content: "<g fill=\"none\" stroke=\"white\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z\" clip-rule=\"evenodd\" />\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2\" />\n </g>"
14858
- }, nT = {
14876
+ }, aT = {
14859
14877
  viewBox: "-160 -160 832 832",
14860
14878
  content: "<path fill=\"white\" d=\"M208,432H160a16,16,0,0,1-16-16V96a16,16,0,0,1,16-16h48a16,16,0,0,1,16,16V416A16,16,0,0,1,208,432Z\"/><path fill=\"white\" d=\"M352,432H304a16,16,0,0,1-16-16V96a16,16,0,0,1,16-16h48a16,16,0,0,1,16,16V416A16,16,0,0,1,352,432Z\"/>"
14861
- }, rT = {
14879
+ }, oT = {
14862
14880
  viewBox: "-6 -6 36 36",
14863
14881
  content: "<path d=\"M7 17.259V6.74104C7 5.96925 7.83721 5.48837 8.50387 5.87726L18.2596 11.5681C18.5904 11.761 18.5904 12.2389 18.2596 12.4319L8.50387 18.1227C7.83721 18.5116 7 18.0308 7 17.259Z\" fill=\"none\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
14864
- }, iT = {
14882
+ }, sT = {
14865
14883
  viewBox: "-10 -10 44 44",
14866
14884
  content: "<g fill=\"none\" stroke=\"white\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z\" />\n </svg>"
14867
- }, aT = {
14885
+ }, cT = {
14868
14886
  viewBox: "-10 -10 44 44",
14869
14887
  content: "\n <path stroke=\"white\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\" />"
14870
- }, oT = {
14888
+ }, lT = {
14871
14889
  viewBox: "-12 -12 38 38",
14872
14890
  content: "<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-5.000000, -5.000000)\">\n <path d=\"M6,14 C5.45,14 5,14.45 5,15 L5,18 C5,18.55 5.45,19 6,19 L9,19 C9.55,19 10,18.55 10,18 C10,17.45 9.55,17 9,17 L7,17 L7,15 C7,14.45 6.55,14 6,14 Z M6,10 C6.55,10 7,9.55 7,9 L7,7 L9,7 C9.55,7 10,6.55 10,6 C10,5.45 9.55,5 9,5 L6,5 C5.45,5 5,5.45 5,6 L5,9 C5,9.55 5.45,10 6,10 Z M17,17 L15,17 C14.45,17 14,17.45 14,18 C14,18.55 14.45,19 15,19 L18,19 C18.55,19 19,18.55 19,18 L19,15 C19,14.45 18.55,14 18,14 C17.45,14 17,14.45 17,15 L17,17 Z M14,6 C14,6.55 14.45,7 15,7 L17,7 L17,9 C17,9.55 17.45,10 18,10 C18.55,10 19,9.55 19,9 L19,6 C19,5.45 18.55,5 18,5 L15,5 C14.45,5 14,5.45 14,6 Z\" fill=\"white\"></path>\n</g>"
14873
- }, sT = {
14891
+ }, uT = {
14874
14892
  viewBox: "-12 -12 38 38",
14875
14893
  content: "<g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-5.000000, -5.000000)\">\n <path d=\"M6,16 L8,16 L8,18 C8,18.55 8.45,19 9,19 C9.55,19 10,18.55 10,18 L10,15 C10,14.45 9.55,14 9,14 L6,14 C5.45,14 5,14.45 5,15 C5,15.55 5.45,16 6,16 Z M8,8 L6,8 C5.45,8 5,8.45 5,9 C5,9.55 5.45,10 6,10 L9,10 C9.55,10 10,9.55 10,9 L10,6 C10,5.45 9.55,5 9,5 C8.45,5 8,5.45 8,6 L8,8 Z M15,19 C15.55,19 16,18.55 16,18 L16,16 L18,16 C18.55,16 19,15.55 19,15 C19,14.45 18.55,14 18,14 L15,14 C14.45,14 14,14.45 14,15 L14,18 C14,18.55 14.45,19 15,19 Z M16,8 L16,6 C16,5.45 15.55,5 15,5 C14.45,5 14,5.45 14,6 L14,9 C14,9.55 14.45,10 15,10 L18,10 C18.55,10 19,9.55 19,9 C19,8.45 18.55,8 18,8 L16,8 Z\" fill=\"white\"></path>\n</g>"
14876
- }, cT = {
14894
+ }, dT = {
14877
14895
  viewBox: "-10 -10 44 44",
14878
14896
  content: "<path fill=\"white\" d=\"M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z\"/>"
14879
- }, lT = {
14897
+ }, fT = {
14880
14898
  viewBox: "-10 -10 45 45",
14881
14899
  content: "<path fill=\"white\" d=\"M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4l-6-3.27v6.53L16 16z\"/>"
14882
- }, uT = {
14900
+ }, pT = {
14883
14901
  viewBox: "-8 -8 40 40",
14884
14902
  content: "<path fill=\"white\" d=\"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 11H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm7-1c0 .55-.45 1-1 1h-.75v1.5h-1.5V15H14c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v4zm-3.5-.5h2v-3h-2v3z\"/>"
14885
- }, dT = {
14903
+ }, mT = {
14886
14904
  viewBox: "-8 -8 40 40",
14887
14905
  content: "<path fill=\"white\" d=\"M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z\"/>"
14888
- }, fT = {
14906
+ }, hT = {
14889
14907
  viewBox: "-8 -8 40 40",
14890
14908
  content: "<path fill=\"white\" d=\"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z\"></path>"
14891
- }, pT = {
14909
+ }, gT = {
14892
14910
  viewBox: "-8 -8 40 40",
14893
14911
  content: "<path fill=\"white\" d=\"M12.8 13.4c-.1-.1-.1-.2-.2-.2c-.5-.3-1.1-.2-1.5.2l-4 6c0 .2-.1.4-.1.6c0 .6.4 1 1 1h8c.2 0 .4-.1.6-.2c.5-.3.6-.9.3-1.4zM19 3H5C3.3 3 2 4.3 2 6v9c0 1.7 1.3 3 3 3h.8c.6 0 1-.4 1-1s-.4-1-1-1H5c-.6 0-1-.4-1-1V6c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v9c0 .6-.4 1-1 1h-.8c-.6 0-1 .4-1 1s.4 1 1 1h.8c1.7 0 3-1.3 3-3V6c0-1.7-1.3-3-3-3\"/>"
14894
14912
  };
14895
14913
  //#endregion
14896
14914
  //#region ../../libs/player/src/IconButton.ts
14897
14915
  m();
14898
- var mT, hT = {
14899
- enter: oT,
14900
- exit: sT,
14901
- pip: cT,
14902
- channels: lT,
14903
- languages: dT,
14904
- textTracks: fT,
14905
- levels: uT,
14906
- oneToOne: aT,
14907
- mute: tT,
14908
- unmute: iT,
14909
- pause: nT,
14910
- play: rT,
14911
- airPlay: pT
14912
- }, gT = (mT = eT["icon-button"]) == null ? "" : mT, _T = class extends h {
14916
+ var _T, vT = {
14917
+ enter: lT,
14918
+ exit: uT,
14919
+ pip: dT,
14920
+ channels: fT,
14921
+ languages: mT,
14922
+ textTracks: hT,
14923
+ levels: pT,
14924
+ oneToOne: cT,
14925
+ mute: iT,
14926
+ unmute: sT,
14927
+ pause: aT,
14928
+ play: oT,
14929
+ airPlay: gT
14930
+ }, yT = (_T = rT["icon-button"]) == null ? "" : _T, bT = class extends h {
14913
14931
  constructor(e, t, n) {
14914
14932
  super(document.createElement("div")), p(this, "iconElement", void 0), p(this, "setIcon", (e) => {
14915
- this.iconElement.setAttribute("viewBox", hT[e].viewBox), this.iconElement.innerHTML = hT[e].content;
14916
- }), p(this, "isHidden", () => this.element.style.display === "none"), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "show", () => void (this.element.style.display = "block")), p(this, "hide", () => void (this.element.style.display = "none")), this.element.style.cursor = "pointer", this.element.setAttribute("role", "button"), this.element.setAttribute("aria-label", e), this.iconElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this.iconElement.setAttribute("width", "40px"), this.iconElement.setAttribute("height", "40px"), this.iconElement.setAttribute("class", gT), this.setIcon(t), this.element.addEventListener("click", n), this.element.appendChild(this.iconElement);
14933
+ this.iconElement.setAttribute("viewBox", vT[e].viewBox), this.iconElement.innerHTML = vT[e].content;
14934
+ }), p(this, "isHidden", () => this.element.style.display === "none"), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "show", () => void (this.element.style.display = "block")), p(this, "hide", () => void (this.element.style.display = "none")), this.element.style.cursor = "pointer", this.element.setAttribute("role", "button"), this.element.setAttribute("aria-label", e), this.iconElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this.iconElement.setAttribute("width", "40px"), this.iconElement.setAttribute("height", "40px"), this.iconElement.setAttribute("class", yT), this.setIcon(t), this.element.addEventListener("click", n), this.element.appendChild(this.iconElement);
14917
14935
  }
14918
- }, vT = "_list_1vkum_1", yT = "_hidden_1vkum_20", bT = {
14919
- list: vT,
14936
+ }, xT = "_list_1vkum_1", ST = "_hidden_1vkum_20", CT = {
14937
+ list: xT,
14920
14938
  "list-item": "_list-item_1vkum_12",
14921
14939
  "list-item-disabled": "_list-item-disabled_1vkum_16",
14922
- hidden: yT
14940
+ hidden: ST
14923
14941
  };
14924
14942
  //#endregion
14925
14943
  //#region ../../libs/player/src/List.ts
14926
14944
  m();
14927
- var xT, ST, CT, wT, TT = (xT = bT.hidden) == null ? "" : xT, ET = (ST = bT.list) == null ? "" : ST, DT = (CT = bT["list-item"]) == null ? "" : CT, OT = (wT = bT["list-item-disabled"]) == null ? "" : wT, kT = class extends h {
14945
+ var wT, TT, ET, DT, OT = (wT = CT.hidden) == null ? "" : wT, kT = (TT = CT.list) == null ? "" : TT, AT = (ET = CT["list-item"]) == null ? "" : ET, jT = (DT = CT["list-item-disabled"]) == null ? "" : DT, MT = class extends h {
14928
14946
  constructor({ items: e, onItemClick: t, classNames: n = [], maxHeight: r }) {
14929
14947
  super(document.createElement("div")), p(this, "onItemClick", void 0), p(this, "updateItems", (e) => {
14930
14948
  for (; this.element.firstChild;) {
@@ -14933,11 +14951,11 @@ var xT, ST, CT, wT, TT = (xT = bT.hidden) == null ? "" : xT, ET = (ST = bT.list)
14933
14951
  }
14934
14952
  e.forEach((e) => {
14935
14953
  let t = document.createElement("div");
14936
- e.disabled || t.addEventListener("click", () => this.onItemClick(e)), t.className = [DT, e.disabled ? OT : ""].join(" "), t.appendChild(e.element()), this.element.appendChild(t);
14954
+ e.disabled || t.addEventListener("click", () => this.onItemClick(e)), t.className = [AT, e.disabled ? jT : ""].join(" "), t.appendChild(e.element()), this.element.appendChild(t);
14937
14955
  });
14938
- }), p(this, "hide", () => this.element.classList.add(TT)), p(this, "show", () => this.element.classList.remove(TT)), this.element.className = [ET, ...n].join(" "), this.onItemClick = t, this.updateItems(e), r && (this.element.style.maxHeight = r);
14956
+ }), p(this, "hide", () => this.element.classList.add(OT)), p(this, "show", () => this.element.classList.remove(OT)), this.element.className = [kT, ...n].join(" "), this.onItemClick = t, this.updateItems(e), r && (this.element.style.maxHeight = r);
14939
14957
  }
14940
- }, AT = {
14958
+ }, NT = {
14941
14959
  container: "_container_13xnz_1",
14942
14960
  hidden: "_hidden_13xnz_6",
14943
14961
  list: "_list_13xnz_10"
@@ -14945,7 +14963,7 @@ var xT, ST, CT, wT, TT = (xT = bT.hidden) == null ? "" : xT, ET = (ST = bT.list)
14945
14963
  //#endregion
14946
14964
  //#region ../../libs/player/src/ToggleListButton.ts
14947
14965
  m();
14948
- var jT, MT, NT, PT = (jT = AT.list) == null ? "" : jT, FT = (MT = AT.hidden) == null ? "" : MT, IT = (NT = AT.container) == null ? "" : NT, LT = class extends h {
14966
+ var PT, FT, IT, LT = (PT = NT.list) == null ? "" : PT, RT = (FT = NT.hidden) == null ? "" : FT, zT = (IT = NT.container) == null ? "" : IT, BT = class extends h {
14949
14967
  constructor({ label: e, items: t, onItemClick: n, iconButtonType: r, onToggle: i }) {
14950
14968
  super(document.createElement("div")), p(this, "iconButton", void 0), p(this, "onItemClick", void 0), p(this, "onToggle", void 0), p(this, "maxHeight", void 0), p(this, "items", void 0), p(this, "list", void 0), p(this, "onButtonClick", () => {
14951
14969
  this.toggleShowChannels(), this.onToggle(this);
@@ -14954,10 +14972,10 @@ var jT, MT, NT, PT = (jT = AT.list) == null ? "" : jT, FT = (MT = AT.hidden) ==
14954
14972
  }), p(this, "handleItemClick", (e) => {
14955
14973
  this.toggleShowChannels(), this.onItemClick(e);
14956
14974
  }), p(this, "showList", () => {
14957
- this.list = new kT({
14975
+ this.list = new MT({
14958
14976
  items: this.items,
14959
14977
  onItemClick: this.handleItemClick,
14960
- classNames: [PT],
14978
+ classNames: [LT],
14961
14979
  maxHeight: this.maxHeight
14962
14980
  }), this.list.attach(this.element);
14963
14981
  }), p(this, "hideList", () => {
@@ -14967,16 +14985,16 @@ var jT, MT, NT, PT = (jT = AT.list) == null ? "" : jT, FT = (MT = AT.hidden) ==
14967
14985
  var t;
14968
14986
  this.items = e, (t = this.list) == null || t.updateItems(e);
14969
14987
  }), p(this, "isListVisible", () => this.list !== void 0), p(this, "hide", () => {
14970
- FT && this.element.classList.add(FT);
14988
+ RT && this.element.classList.add(RT);
14971
14989
  }), p(this, "show", () => {
14972
- FT && this.element.classList.remove(FT);
14973
- }), this.element.className = IT, this.onItemClick = n, this.onToggle = i, this.items = t, this.iconButton = new _T(e, r, this.onButtonClick), this.iconButton.attach(this.element);
14990
+ RT && this.element.classList.remove(RT);
14991
+ }), this.element.className = zT, this.onItemClick = n, this.onToggle = i, this.items = t, this.iconButton = new bT(e, r, this.onButtonClick), this.iconButton.attach(this.element);
14974
14992
  }
14975
14993
  };
14976
14994
  //#endregion
14977
14995
  //#region ../../libs/player/src/ChannelSelectionButton.ts
14978
14996
  H();
14979
- var RT, zT, BT, VT, HT, UT = (RT = $w["hide-on-small"]) == null ? "" : RT, WT = (zT = $w["channel-selection-item"]) == null ? "" : zT, GT = (BT = $w["channel-selection-item-selected"]) == null ? "" : BT, KT = (VT = $w["channel-selection-item-image"]) == null ? "" : VT, qT = (HT = $w.withThumbnails) == null ? "" : HT, JT = class extends LT {
14997
+ var VT, HT, UT, WT, GT, KT = (VT = nT["hide-on-small"]) == null ? "" : VT, qT = (HT = nT["channel-selection-item"]) == null ? "" : HT, JT = (UT = nT["channel-selection-item-selected"]) == null ? "" : UT, YT = (WT = nT["channel-selection-item-image"]) == null ? "" : WT, XT = (GT = nT.withThumbnails) == null ? "" : GT, ZT = class extends BT {
14980
14998
  constructor({ vindral: e, enabled: t, thumbnailsEnabled: n, thumbnailModule: r }) {
14981
14999
  e.on("channels", () => {
14982
15000
  let i = e.channels.map((t) => ({
@@ -14984,12 +15002,12 @@ var RT, zT, BT, VT, HT, UT = (RT = $w["hide-on-small"]) == null ? "" : RT, WT =
14984
15002
  disabled: !t.isLive,
14985
15003
  element: () => {
14986
15004
  let i = document.createElement("div");
14987
- if (i.className = [WT, t.channelId === e.channelId ? GT : ""].join(" "), r && n) {
14988
- i.classList.add(qT);
15005
+ if (i.className = [qT, t.channelId === e.channelId ? JT : ""].join(" "), r && n) {
15006
+ i.classList.add(XT);
14989
15007
  let e = document.createElement("p");
14990
15008
  e.innerHTML = t.name, i.appendChild(e);
14991
15009
  let n = r.getImageUrl(t), a = document.createElement("img");
14992
- n && (a.className = KT, a.src = n, i.style.backgroundImage = `url(${n})`);
15010
+ n && (a.className = YT, a.src = n, i.style.backgroundImage = `url(${n})`);
14993
15011
  } else i.innerHTML = t.name;
14994
15012
  return i;
14995
15013
  }
@@ -15001,16 +15019,16 @@ var RT, zT, BT, VT, HT, UT = (RT = $w["hide-on-small"]) == null ? "" : RT, WT =
15001
15019
  onItemClick: (t) => e.channelId = t.channel.channelId,
15002
15020
  onToggle: S,
15003
15021
  iconButtonType: "channels"
15004
- }), this.element.classList.add(UT), this.hide();
15022
+ }), this.element.classList.add(KT), this.hide();
15005
15023
  }
15006
- }, YT = {
15024
+ }, QT = {
15007
15025
  "language-button-item": "_language-button-item_1dov5_1",
15008
15026
  "language-button-item-selected": "_language-button-item-selected_1dov5_6"
15009
15027
  };
15010
15028
  //#endregion
15011
15029
  //#region ../../libs/player/src/LanguageButton.ts
15012
15030
  H();
15013
- var XT, ZT, QT = (XT = YT["language-button-item"]) == null ? "" : XT, $T = (ZT = YT["language-button-item-selected"]) == null ? "" : ZT, eE = class extends LT {
15031
+ var $T, eE, tE = ($T = QT["language-button-item"]) == null ? "" : $T, nE = (eE = QT["language-button-item-selected"]) == null ? "" : eE, rE = class extends BT {
15014
15032
  constructor({ vindral: e }) {
15015
15033
  e.on("languages", () => {
15016
15034
  let t = e.languages.map((t) => ({
@@ -15018,7 +15036,7 @@ var XT, ZT, QT = (XT = YT["language-button-item"]) == null ? "" : XT, $T = (ZT =
15018
15036
  disabled: !1,
15019
15037
  element: () => {
15020
15038
  let n = document.createElement("div");
15021
- return n.className = [QT, t === e.language ? $T : ""].join(" "), n.innerHTML = t, n;
15039
+ return n.className = [tE, t === e.language ? nE : ""].join(" "), n.innerHTML = t, n;
15022
15040
  }
15023
15041
  }));
15024
15042
  this.maxHeight = `calc(${Math.max(110, e.mediaElement.clientHeight)}px - 46px)`, this.updateItems(t), t.length > 0 ? this.show() : this.hide();
@@ -15034,25 +15052,25 @@ var XT, ZT, QT = (XT = YT["language-button-item"]) == null ? "" : XT, $T = (ZT =
15034
15052
  //#endregion
15035
15053
  //#region ../../libs/player/src/PlayControls.ts
15036
15054
  m();
15037
- var tE = class extends h {
15055
+ var iE = class extends h {
15038
15056
  constructor({ vindral: e }) {
15039
15057
  super(document.createElement("div")), p(this, "vindral", void 0), p(this, "playButton", void 0), p(this, "updateState", () => {
15040
15058
  this.playButton.setIcon(this.playIcon());
15041
15059
  }), p(this, "onPlayClick", () => {
15042
15060
  this.vindral.playbackState === "paused" ? this.vindral.play() : this.vindral.pause(), this.playButton.setIcon(this.playIcon());
15043
- }), p(this, "playIcon", () => this.vindral.playbackState === "paused" ? "play" : "pause"), this.element.style.cursor = "pointer", this.vindral = e, this.playButton = new _T("Play", this.playIcon(), this.onPlayClick), this.playButton.attach(this.element);
15061
+ }), p(this, "playIcon", () => this.vindral.playbackState === "paused" ? "play" : "pause"), this.element.style.cursor = "pointer", this.vindral = e, this.playButton = new bT("Play", this.playIcon(), this.onPlayClick), this.playButton.attach(this.element);
15044
15062
  }
15045
- }, nE = "_item_5vhyo_1", rE = "_title_5vhyo_10", iE = {
15046
- item: nE,
15063
+ }, aE = "_item_5vhyo_1", oE = "_title_5vhyo_10", sE = {
15064
+ item: aE,
15047
15065
  "item-selected": "_item-selected_5vhyo_6",
15048
- title: rE,
15066
+ title: oE,
15049
15067
  "sub-title": "_sub-title_5vhyo_14",
15050
15068
  "hide-on-small": "_hide-on-small_5vhyo_21"
15051
15069
  };
15052
15070
  //#endregion
15053
15071
  //#region ../../libs/player/src/RenditionLevelButton.ts
15054
15072
  H();
15055
- var aE, oE, sE, cE, lE, uE = (aE = iE["hide-on-small"]) == null ? "" : aE, dE = (oE = iE.item) == null ? "" : oE, fE = (sE = iE["item-selected"]) == null ? "" : sE, pE = (cE = iE.title) == null ? "" : cE, mE = (lE = iE["sub-title"]) == null ? "" : lE, hE = class extends LT {
15073
+ var cE, lE, uE, dE, fE, pE = (cE = sE["hide-on-small"]) == null ? "" : cE, mE = (lE = sE.item) == null ? "" : lE, hE = (uE = sE["item-selected"]) == null ? "" : uE, gE = (dE = sE.title) == null ? "" : dE, _E = (fE = sE["sub-title"]) == null ? "" : fE, vE = class extends BT {
15056
15074
  constructor({ vindral: e }) {
15057
15075
  let t = () => {
15058
15076
  let t = e.renditionLevels.map((t) => ({
@@ -15061,13 +15079,13 @@ var aE, oE, sE, cE, lE, uE = (aE = iE["hide-on-small"]) == null ? "" : aE, dE =
15061
15079
  element: () => {
15062
15080
  var n, r, i;
15063
15081
  let a = document.createElement("div");
15064
- a.className = [dE, t === e.currentRenditionLevel ? fE : ""].join(" ");
15082
+ a.className = [mE, t === e.currentRenditionLevel ? hE : ""].join(" ");
15065
15083
  let o = document.createElement("span"), s = document.createElement("span"), { audio: c, video: l } = t, u = l ? fn(l) : void 0, d = c ? pn(c.sampleRate) : void 0, f = dn(((n = l == null ? void 0 : l.bitRate) == null ? 0 : n) + ((r = c == null ? void 0 : c.bitRate) == null ? 0 : r));
15066
15084
  if (l) {
15067
15085
  let e = l.frameRate[0] / l.frameRate[1], t = l.frameRate[0] % l.frameRate[1] === 0 ? `${e}p` : `${e.toFixed(2)}p`;
15068
15086
  f += `, ${t}`;
15069
15087
  }
15070
- return o.innerHTML = (i = u == null ? d : u) == null ? "" : i, o.className = pE, s.innerHTML = f, s.className = mE, a.appendChild(o), a.appendChild(s), a;
15088
+ return o.innerHTML = (i = u == null ? d : u) == null ? "" : i, o.className = gE, s.innerHTML = f, s.className = _E, a.appendChild(o), a.appendChild(s), a;
15071
15089
  }
15072
15090
  }));
15073
15091
  this.maxHeight = `calc(${Math.max(110, e.mediaElement.clientHeight)}px - 46px)`, this.updateItems(t);
@@ -15080,20 +15098,20 @@ var aE, oE, sE, cE, lE, uE = (aE = iE["hide-on-small"]) == null ? "" : aE, dE =
15080
15098
  },
15081
15099
  onToggle: S,
15082
15100
  iconButtonType: "levels"
15083
- }), this.element.classList.add(uE);
15101
+ }), this.element.classList.add(pE);
15084
15102
  }
15085
- }, gE = class extends h {
15103
+ }, yE = class extends h {
15086
15104
  constructor() {
15087
15105
  super(document.createElement("div")), this.element.style.flexGrow = "1";
15088
15106
  }
15089
- }, _E = {
15107
+ }, bE = {
15090
15108
  "text-track-button-item": "_text-track-button-item_1ry10_1",
15091
15109
  "text-track-button-item-selected": "_text-track-button-item-selected_1ry10_6"
15092
15110
  };
15093
15111
  //#endregion
15094
15112
  //#region ../../libs/player/src/TextTrackButton.ts
15095
15113
  H();
15096
- var vE, yE, bE = (vE = _E["text-track-button-item"]) == null ? "" : vE, xE = (yE = _E["text-track-button-item-selected"]) == null ? "" : yE, SE = class extends LT {
15114
+ var xE, SE, CE = (xE = bE["text-track-button-item"]) == null ? "" : xE, wE = (SE = bE["text-track-button-item-selected"]) == null ? "" : SE, TE = class extends BT {
15097
15115
  constructor({ vindral: e }) {
15098
15116
  e.on("text tracks", () => {
15099
15117
  let t = e.textTracks.map((t) => ({
@@ -15101,7 +15119,7 @@ var vE, yE, bE = (vE = _E["text-track-button-item"]) == null ? "" : vE, xE = (yE
15101
15119
  disabled: !1,
15102
15120
  element: () => {
15103
15121
  let n = document.createElement("div");
15104
- return n.className = [bE, t === e.textTrack ? xE : ""].join(" "), n.innerHTML = t, n;
15122
+ return n.className = [CE, t === e.textTrack ? wE : ""].join(" "), n.innerHTML = t, n;
15105
15123
  }
15106
15124
  }));
15107
15125
  t.length > 0 ? (t.push({
@@ -15109,7 +15127,7 @@ var vE, yE, bE = (vE = _E["text-track-button-item"]) == null ? "" : vE, xE = (yE
15109
15127
  disabled: !1,
15110
15128
  element: () => {
15111
15129
  let t = document.createElement("div");
15112
- return t.className = [bE, e.textTrack === void 0 ? xE : ""].join(" "), t.innerHTML = "Off", t;
15130
+ return t.className = [CE, e.textTrack === void 0 ? wE : ""].join(" "), t.innerHTML = "Off", t;
15113
15131
  }
15114
15132
  }), this.show()) : this.hide(), this.maxHeight = `calc(${Math.max(110, e.mediaElement.clientHeight)}px - 46px)`, this.updateItems(t);
15115
15133
  }), super({
@@ -15124,26 +15142,26 @@ var vE, yE, bE = (vE = _E["text-track-button-item"]) == null ? "" : vE, xE = (yE
15124
15142
  //#endregion
15125
15143
  //#region ../../libs/player/src/VolumeControls.ts
15126
15144
  m();
15127
- var CE = class extends h {
15145
+ var EE = class extends h {
15128
15146
  constructor({ vindral: e }) {
15129
15147
  super(document.createElement("div")), p(this, "vindral", void 0), p(this, "muteButton", void 0), p(this, "updateState", () => {
15130
15148
  this.muteButton.setIcon(this.muteIcon());
15131
15149
  }), p(this, "onMuteClick", () => {
15132
15150
  this.vindral.muted = !this.vindral.muted, this.muteButton.setIcon(this.muteIcon());
15133
- }), p(this, "muteIcon", () => this.vindral.muted ? "mute" : "unmute"), this.element.style.cursor = "pointer", this.vindral = e, this.muteButton = new _T("Mute", this.muteIcon(), this.onMuteClick), this.muteButton.attach(this.element);
15151
+ }), p(this, "muteIcon", () => this.vindral.muted ? "mute" : "unmute"), this.element.style.cursor = "pointer", this.vindral = e, this.muteButton = new bT("Mute", this.muteIcon(), this.onMuteClick), this.muteButton.attach(this.element);
15134
15152
  }
15135
15153
  };
15136
15154
  //#endregion
15137
15155
  //#region ../../libs/player/src/Bar.ts
15138
15156
  m();
15139
- var wE, TE, EE = (wE = Zw.hidden) == null ? "" : wE, DE = (TE = Zw.bar) == null ? "" : TE, OE = class extends h {
15157
+ var DE, OE, kE = (DE = eT.hidden) == null ? "" : DE, AE = (OE = eT.bar) == null ? "" : OE, jE = class extends h {
15140
15158
  constructor({ vindral: e, onFullscreenClicked: t, onOneToOneClicked: n, onPipClicked: r, onAirPlayClicked: i, pauseButtonEnabled: a, fullscreenButtonEnabled: o, pipButtonEnabled: s, channelSelectionEnabled: c, channelSelectionThumbnails: l, renditionLevelsEnabled: u, languagesButtonEnabled: d, textTracksButtonEnabled: f, oneToOneButtonEnabled: m, thumbnailModule: h }) {
15141
15159
  super(document.createElement("div")), p(this, "items", []), p(this, "isMouseInElement", !1), p(this, "volumeControls", void 0), p(this, "playControls", void 0), p(this, "oneToOneButton", void 0), p(this, "fullscreenButton", void 0), p(this, "airPlayButton", void 0), p(this, "containerElement", void 0), p(this, "hideLists", () => {
15142
15160
  this.items.forEach((e) => "hideList" in e && e.hideList());
15143
- }), p(this, "listButtons", () => this.items), p(this, "isAnyListOpen", () => this.items.filter((e) => "isListVisible" in e && e.isListVisible()).length > 0), p(this, "hasFocus", () => this.isMouseInElement || this.isAnyListOpen()), p(this, "isHidden", () => this.element.classList.contains(EE)), p(this, "hide", () => {
15144
- this.containerElement.style.setProperty("--vindral-control-bar-offset", "0px"), this.element.classList.add(EE);
15161
+ }), p(this, "listButtons", () => this.items), p(this, "isAnyListOpen", () => this.items.filter((e) => "isListVisible" in e && e.isListVisible()).length > 0), p(this, "hasFocus", () => this.isMouseInElement || this.isAnyListOpen()), p(this, "isHidden", () => this.element.classList.contains(kE)), p(this, "hide", () => {
15162
+ this.containerElement.style.setProperty("--vindral-control-bar-offset", "0px"), this.element.classList.add(kE);
15145
15163
  }), p(this, "show", () => {
15146
- this.containerElement.style.setProperty("--vindral-control-bar-offset", "-96px"), this.element.classList.remove(EE);
15164
+ this.containerElement.style.setProperty("--vindral-control-bar-offset", "-96px"), this.element.classList.remove(kE);
15147
15165
  }), p(this, "addCastButton", () => {
15148
15166
  let e = document.createElement("google-cast-launcher");
15149
15167
  this.element.insertBefore(e, this.element.lastChild);
@@ -15153,65 +15171,65 @@ var wE, TE, EE = (wE = Zw.hidden) == null ? "" : wE, DE = (TE = Zw.bar) == null
15153
15171
  this.playControls.updateState(), this.volumeControls.updateState();
15154
15172
  }), p(this, "onToggle", (e) => {
15155
15173
  this.listButtons().filter((t) => e !== t).forEach((e) => "hideList" in e && e.hideList());
15156
- }), this.element.className = [DE, EE].join(" ");
15157
- let g = new gE();
15158
- this.oneToOneButton = new _T("One to One", "oneToOne", n), this.fullscreenButton = new _T("Fullscreen", "enter", t), this.airPlayButton = new _T("AirPlay", "airPlay", i);
15159
- let _ = new _T("Picture in Picture", "pip", r), v = new JT({
15174
+ }), this.element.className = [AE, kE].join(" ");
15175
+ let g = new yE();
15176
+ this.oneToOneButton = new bT("One to One", "oneToOne", n), this.fullscreenButton = new bT("Fullscreen", "enter", t), this.airPlayButton = new bT("AirPlay", "airPlay", i);
15177
+ let _ = new bT("Picture in Picture", "pip", r), v = new ZT({
15160
15178
  vindral: e,
15161
15179
  enabled: c,
15162
15180
  thumbnailsEnabled: l,
15163
15181
  thumbnailModule: l ? h : void 0
15164
- }), y = new hE({ vindral: e });
15165
- this.volumeControls = new CE({ vindral: e }), this.playControls = new tE({ vindral: e }), this.containerElement = e.mediaElement, a && e.getOptions().pauseSupportEnabled && this.playControls.attach(this.element), e.getOptions().media !== "video" && this.volumeControls.attach(this.element), g.attach(this.element);
15182
+ }), y = new vE({ vindral: e });
15183
+ this.volumeControls = new EE({ vindral: e }), this.playControls = new iE({ vindral: e }), this.containerElement = e.mediaElement, a && e.getOptions().pauseSupportEnabled && this.playControls.attach(this.element), e.getOptions().media !== "video" && this.volumeControls.attach(this.element), g.attach(this.element);
15166
15184
  let b = [];
15167
15185
  if (d) {
15168
- let t = new eE({ vindral: e });
15186
+ let t = new rE({ vindral: e });
15169
15187
  t.attach(this.element), b.push(t);
15170
15188
  }
15171
15189
  if (f) {
15172
- let t = new SE({ vindral: e });
15190
+ let t = new TE({ vindral: e });
15173
15191
  t.attach(this.element), b.push(t);
15174
15192
  }
15175
15193
  y.attach(this.element), v.attach(this.element), _.attach(this.element), this.oneToOneButton.attach(this.element), this.fullscreenButton.attach(this.element), this.items.push(g, ...b, y, v, _, this.fullscreenButton), this.items.forEach((e) => "onToggle" in e && (e.onToggle = this.onToggle)), m || this.oneToOneButton.hide(), o || this.fullscreenButton.hide(), s || _.hide(), c || v.hide(), u || y.hide(), navigator.maxTouchPoints < 1 && (this.element.addEventListener("mouseenter", () => this.isMouseInElement = !0), this.element.addEventListener("mouseleave", () => this.isMouseInElement = !1));
15176
15194
  }
15177
- }, kE = {
15195
+ }, ME = {
15178
15196
  castoverlay: "_castoverlay_1n91l_1",
15179
15197
  hidden: "_hidden_1n91l_20"
15180
15198
  };
15181
15199
  //#endregion
15182
15200
  //#region ../../libs/player/src/CastOverlay.ts
15183
15201
  m();
15184
- var AE, jE, ME = (AE = kE.hidden) == null ? "" : AE, NE = (jE = kE.castoverlay) == null ? "" : jE, PE = class extends h {
15202
+ var NE, PE, FE = (NE = ME.hidden) == null ? "" : NE, IE = (PE = ME.castoverlay) == null ? "" : PE, LE = class extends h {
15185
15203
  constructor() {
15186
15204
  super(document.createElement("div")), p(this, "onClick", void 0), p(this, "setText", (e) => {
15187
15205
  this.element.innerText = e;
15188
- }), p(this, "hide", () => this.element.classList.add(ME)), p(this, "show", () => this.element.classList.remove(ME)), this.element.classList.add(NE), this.element.classList.add(ME), this.element.innerText = "device";
15206
+ }), p(this, "hide", () => this.element.classList.add(FE)), p(this, "show", () => this.element.classList.remove(FE)), this.element.classList.add(IE), this.element.classList.add(FE), this.element.innerText = "device";
15189
15207
  }
15190
- }, FE = "_button_4ybkq_21", IE = "_image_4ybkq_98", LE = "_overlay_4ybkq_118", RE = "_selected_4ybkq_136", zE = "_hidden_4ybkq_141", BE = "_disabled_4ybkq_145", VE = {
15191
- button: FE,
15208
+ }, RE = "_button_4ybkq_21", zE = "_image_4ybkq_98", BE = "_overlay_4ybkq_118", VE = "_selected_4ybkq_136", HE = "_hidden_4ybkq_141", UE = "_disabled_4ybkq_145", WE = {
15209
+ button: RE,
15192
15210
  "show-and-scaleup": "_show-and-scaleup_4ybkq_1",
15193
- image: IE,
15194
- overlay: LE,
15195
- selected: RE,
15196
- hidden: zE,
15197
- disabled: BE
15211
+ image: zE,
15212
+ overlay: BE,
15213
+ selected: VE,
15214
+ hidden: HE,
15215
+ disabled: UE
15198
15216
  };
15199
15217
  //#endregion
15200
15218
  //#region ../../libs/player/src/ChannelSelectionImageButton.ts
15201
15219
  m();
15202
- var HE, UE, WE, GE, KE, qE = (HE = VE.button) == null ? "" : HE, JE = (UE = VE.hidden) == null ? "" : UE, YE = (WE = VE.overlay) == null ? "" : WE, XE = (GE = VE.image) == null ? "" : GE, ZE = (KE = VE.selected) == null ? "" : KE, QE = class extends h {
15220
+ var GE, KE, qE, JE, YE, XE = (GE = WE.button) == null ? "" : GE, ZE = (KE = WE.hidden) == null ? "" : KE, QE = (qE = WE.overlay) == null ? "" : qE, $E = (JE = WE.image) == null ? "" : JE, eD = (YE = WE.selected) == null ? "" : YE, tD = class extends h {
15203
15221
  constructor({ title: e, onClick: t, imageUrl: n, selected: r }) {
15204
15222
  super(document.createElement("button")), p(this, "overlay", void 0), p(this, "imageHolder1", void 0), p(this, "imageHolder2", void 0), p(this, "isImageHolder1Active", !1), p(this, "loadingOverlay", void 0), p(this, "transition", (e, t, n) => {
15205
15223
  t.style.backgroundImage = `url(${n})`, t.style.opacity = "1", e.style.opacity = "0";
15206
15224
  }), p(this, "setSelected", (e) => {
15207
- e ? this.element.classList.add(ZE) : this.element.classList.remove(ZE);
15225
+ e ? this.element.classList.add(eD) : this.element.classList.remove(eD);
15208
15226
  }), p(this, "setAnimationDelay", (e) => {
15209
15227
  this.element.style.animationDelay = e;
15210
15228
  }), p(this, "hideLoading", () => {
15211
15229
  this.loadingOverlay.hide();
15212
- }), p(this, "isHidden", () => this.element.classList.contains(JE)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(JE)), p(this, "show", () => this.element.classList.remove(JE)), this.element.className = qE, r && this.setSelected(r), this.element.onclick = () => {
15230
+ }), p(this, "isHidden", () => this.element.classList.contains(ZE)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(ZE)), p(this, "show", () => this.element.classList.remove(ZE)), this.element.className = XE, r && this.setSelected(r), this.element.onclick = () => {
15213
15231
  this.loadingOverlay.show(), t();
15214
- }, this.imageHolder1 = document.createElement("div"), this.imageHolder1.className = XE, this.imageHolder1.style.animationFillMode = "forwards", this.imageHolder2 = document.createElement("div"), this.imageHolder2.className = XE, this.imageHolder2.style.animationFillMode = "forwards", n && (this.imageHolder1.style.backgroundImage = `url(${n})`, this.isImageHolder1Active = !0), this.loadingOverlay = new ne(), this.loadingOverlay.attach(this.element), this.loadingOverlay.hide(), this.element.appendChild(this.imageHolder1), this.element.appendChild(this.imageHolder2), this.overlay = document.createElement("div"), this.overlay.className = YE, this.element.appendChild(this.overlay);
15232
+ }, this.imageHolder1 = document.createElement("div"), this.imageHolder1.className = $E, this.imageHolder1.style.animationFillMode = "forwards", this.imageHolder2 = document.createElement("div"), this.imageHolder2.className = $E, this.imageHolder2.style.animationFillMode = "forwards", n && (this.imageHolder1.style.backgroundImage = `url(${n})`, this.isImageHolder1Active = !0), this.loadingOverlay = new ne(), this.loadingOverlay.attach(this.element), this.loadingOverlay.hide(), this.element.appendChild(this.imageHolder1), this.element.appendChild(this.imageHolder2), this.overlay = document.createElement("div"), this.overlay.className = QE, this.element.appendChild(this.overlay);
15215
15233
  let i = document.createElement("span");
15216
15234
  i.innerHTML = e, this.element.appendChild(i), this.show();
15217
15235
  }
@@ -15224,23 +15242,23 @@ var HE, UE, WE, GE, KE, qE = (HE = VE.button) == null ? "" : HE, JE = (UE = VE.h
15224
15242
  this.isImageHolder1Active ? this.transition(this.imageHolder1, this.imageHolder2, e) : this.transition(this.imageHolder2, this.imageHolder1, e), this.isImageHolder1Active = !this.isImageHolder1Active;
15225
15243
  }
15226
15244
  }
15227
- }, $E = "_container_btpgd_13", eD = "_hidden_btpgd_37", tD = "_disabled_btpgd_41", nD = {
15245
+ }, nD = "_container_btpgd_13", rD = "_hidden_btpgd_37", iD = "_disabled_btpgd_41", aD = {
15228
15246
  "channel-selection-overlay": "_channel-selection-overlay_btpgd_1",
15229
- container: $E,
15230
- hidden: eD,
15231
- disabled: tD
15247
+ container: nD,
15248
+ hidden: rD,
15249
+ disabled: iD
15232
15250
  };
15233
15251
  //#endregion
15234
15252
  //#region ../../libs/player/src/ChannelSelectionList.ts
15235
15253
  m();
15236
- var rD, iD, aD = (rD = nD.hidden) == null ? "" : rD, oD = (iD = nD.container) == null ? "" : iD, sD = class extends h {
15254
+ var oD, sD, cD = (oD = aD.hidden) == null ? "" : oD, lD = (sD = aD.container) == null ? "" : sD, uD = class extends h {
15237
15255
  constructor({ vindral: e, thumbnailModule: t }) {
15238
15256
  var n;
15239
15257
  super(document.createElement("div")), p(this, "thumbnailModule", void 0), p(this, "list", void 0), p(this, "vindral", void 0), p(this, "setSelected", (e) => {
15240
15258
  this.list.forEach((t, n) => {
15241
15259
  t.setSelected(n.channelId === e.channelId);
15242
15260
  }), e.channelId !== this.vindral.channelId && (this.vindral.channelId = e.channelId);
15243
- }), p(this, "isHidden", () => this.element.classList.contains(aD)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(aD)), p(this, "show", () => this.element.classList.remove(aD)), this.thumbnailModule = t, this.list = /* @__PURE__ */ new Map(), this.vindral = e, this.vindral.on("context switch", (e) => {
15261
+ }), p(this, "isHidden", () => this.element.classList.contains(cD)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(cD)), p(this, "show", () => this.element.classList.remove(cD)), this.thumbnailModule = t, this.list = /* @__PURE__ */ new Map(), this.vindral = e, this.vindral.on("context switch", (e) => {
15244
15262
  if (e === "completed") {
15245
15263
  this.list.forEach((e) => e.hideLoading());
15246
15264
  let e = this.vindral.channelId;
@@ -15255,7 +15273,7 @@ var rD, iD, aD = (rD = nD.hidden) == null ? "" : rD, oD = (iD = nD.container) ==
15255
15273
  this.vindral.channels.forEach((t, n) => {
15256
15274
  var r;
15257
15275
  if (!t.isLive) return;
15258
- let i = new QE({
15276
+ let i = new tD({
15259
15277
  title: t.name,
15260
15278
  onClick: () => {
15261
15279
  this.setSelected(t);
@@ -15270,35 +15288,35 @@ var rD, iD, aD = (rD = nD.hidden) == null ? "" : rD, oD = (iD = nD.container) ==
15270
15288
  var n;
15271
15289
  e.setImageUrl((n = this.thumbnailModule) == null ? void 0 : n.getImageUrl(t));
15272
15290
  });
15273
- }), this.element.className = oD, this.show();
15291
+ }), this.element.className = lD, this.show();
15274
15292
  }
15275
- }, cD = { fullscreen: "_fullscreen_1v9d8_1" };
15293
+ }, dD = { fullscreen: "_fullscreen_1v9d8_1" };
15276
15294
  H(), B(), m(), O();
15277
- var lD, uD = (lD = cD.fullscreen) == null ? "" : lD, dD = /* @__PURE__ */ new WeakSet(), fD = class e extends nn {
15295
+ var fD, pD = (fD = dD.fullscreen) == null ? "" : fD, mD = /* @__PURE__ */ new WeakSet(), hD = class e extends nn {
15278
15296
  constructor(t) {
15279
- super(), z(this, dD), p(this, "container", void 0), p(this, "unload", () => {
15297
+ super(), z(this, mD), p(this, "container", void 0), p(this, "unload", () => {
15280
15298
  document.removeEventListener("webkitfullscreenchange", this.onChange), document.removeEventListener("mozfullscreenchange", this.onChange), document.removeEventListener("fullscreenchange", this.onChange), this.container.removeEventListener("webkitendfullscreen", this.onChange);
15281
- }), p(this, "request", () => D(dD, this, pD).call(this).catch((e) => {
15299
+ }), p(this, "request", () => D(mD, this, gD).call(this).catch((e) => {
15282
15300
  throw this.onChange(), e;
15283
- })), p(this, "exit", () => D(dD, this, mD).call(this).catch((e) => {
15301
+ })), p(this, "exit", () => D(mD, this, _D).call(this).catch((e) => {
15284
15302
  throw this.onChange(), e;
15285
- })), p(this, "onChange", () => this.emit("on fullscreen change", this.isFullscreen())), p(this, "isFullscreen", () => !!(bt() || this.container.classList.contains(uD))), p(this, "isSupported", () => e.isFullscreenApiSupported(this.container) || !this.isInIframe()), p(this, "isInIframe", () => window.location !== window.parent.location), this.container = t, document.addEventListener("webkitfullscreenchange", this.onChange), document.addEventListener("mozfullscreenchange", this.onChange), document.addEventListener("fullscreenchange", this.onChange), this.container.addEventListener("webkitendfullscreen", this.onChange);
15303
+ })), p(this, "onChange", () => this.emit("on fullscreen change", this.isFullscreen())), p(this, "isFullscreen", () => !!(bt() || this.container.classList.contains(pD))), p(this, "isSupported", () => e.isFullscreenApiSupported(this.container) || !this.isInIframe()), p(this, "isInIframe", () => window.location !== window.parent.location), this.container = t, document.addEventListener("webkitfullscreenchange", this.onChange), document.addEventListener("mozfullscreenchange", this.onChange), document.addEventListener("fullscreenchange", this.onChange), this.container.addEventListener("webkitendfullscreen", this.onChange);
15286
15304
  }
15287
15305
  };
15288
- function pD() {
15306
+ function gD() {
15289
15307
  let e = xt(this.container);
15290
- return e ? e() : (this.container.classList.add(uD), Promise.resolve());
15308
+ return e ? e() : (this.container.classList.add(pD), Promise.resolve());
15291
15309
  }
15292
- function mD() {
15310
+ function _D() {
15293
15311
  let e = St(this.container);
15294
- return e ? e() : (this.container.classList.remove(uD), Promise.resolve());
15312
+ return e ? e() : (this.container.classList.remove(pD), Promise.resolve());
15295
15313
  }
15296
- p(fD, "isFullscreenApiSupported", (e) => Ct(e));
15297
- var hD = {
15314
+ p(hD, "isFullscreenApiSupported", (e) => Ct(e));
15315
+ var vD = {
15298
15316
  player: "_player_1vdos_1",
15299
15317
  "one-to-one": "_one-to-one_1vdos_19",
15300
15318
  "audio-only": "_audio-only_1vdos_28"
15301
- }, gD = {
15319
+ }, yD = {
15302
15320
  playoverlay: "_playoverlay_1niji_1",
15303
15321
  hidden: "_hidden_1niji_17",
15304
15322
  "playoverlay-indicator": "_playoverlay-indicator_1niji_23"
@@ -15306,15 +15324,15 @@ var hD = {
15306
15324
  //#endregion
15307
15325
  //#region ../../libs/player/src/PlayOverlay.ts
15308
15326
  m();
15309
- var _D, vD, yD, bD = (_D = gD.hidden) == null ? "" : _D, xD = (vD = gD.playoverlay) == null ? "" : vD, SD = (yD = gD["playoverlay-indicator"]) == null ? "" : yD, CD = class extends h {
15327
+ var bD, xD, SD, CD = (bD = yD.hidden) == null ? "" : bD, wD = (xD = yD.playoverlay) == null ? "" : xD, TD = (SD = yD["playoverlay-indicator"]) == null ? "" : SD, ED = class extends h {
15310
15328
  constructor() {
15311
- super(document.createElement("div")), p(this, "onClick", void 0), p(this, "indicator", document.createElement("div")), p(this, "isHidden", () => this.element.classList.contains(bD)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(bD)), p(this, "show", () => this.element.classList.remove(bD)), this.element.classList.add(xD), this.element.classList.add(bD), this.indicator.className = SD, this.element.appendChild(this.indicator), this.element.onclick = () => {
15329
+ super(document.createElement("div")), p(this, "onClick", void 0), p(this, "indicator", document.createElement("div")), p(this, "isHidden", () => this.element.classList.contains(CD)), p(this, "setHidden", (e) => e ? this.hide() : this.show()), p(this, "hide", () => this.element.classList.add(CD)), p(this, "show", () => this.element.classList.remove(CD)), this.element.classList.add(wD), this.element.classList.add(CD), this.indicator.className = TD, this.element.appendChild(this.indicator), this.element.onclick = () => {
15312
15330
  this.onClick && this.onClick();
15313
15331
  };
15314
15332
  }
15315
15333
  };
15316
15334
  H(), m(), P();
15317
- var wD = class extends nn {
15335
+ var DD = class extends nn {
15318
15336
  constructor({ vindral: e, refreshEveryMs: t }) {
15319
15337
  super(), p(this, "thumbnails", /* @__PURE__ */ new Map()), p(this, "interval", void 0), p(this, "channels", void 0), p(this, "refreshEveryMs", void 0), p(this, "isFetching", !1), p(this, "hasFetched", !1), this.channels = [...e.channels], this.refreshEveryMs = t || 6e4, e.on("channels", () => {
15320
15338
  this.channels = [...e.channels], this.hasFetched || this.refreshThumbnails();
@@ -15362,7 +15380,7 @@ var wD = class extends nn {
15362
15380
  }
15363
15381
  };
15364
15382
  H(), m(), P(), R();
15365
- var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-one"]) == null ? "" : ED, AD = (DD = hD["audio-only"]) == null ? "" : DD, jD = {
15383
+ var OD, kD, AD, jD = (OD = vD.player) == null ? "" : OD, MD = (kD = vD["one-to-one"]) == null ? "" : kD, ND = (AD = vD["audio-only"]) == null ? "" : AD, PD = {
15366
15384
  controlsEnabled: !0,
15367
15385
  castEnabled: !0,
15368
15386
  channelSelectionEnabled: !0,
@@ -15376,10 +15394,10 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
15376
15394
  airPlayButtonEnabled: !1,
15377
15395
  playOverlayEnabled: !0,
15378
15396
  bufferingOverlayEnabled: !0
15379
- }, MD = (e) => !Vw(e), ND = class {
15397
+ }, FD = (e) => !Ww(e), ID = class {
15380
15398
  constructor(e, t) {
15381
15399
  var n = this, r, i, a, o;
15382
- p(this, "core", void 0), p(this, "castSender", void 0), p(this, "airPlaySender", void 0), p(this, "options", void 0), p(this, "state", void 0), p(this, "playerElement", document.createElement("div")), p(this, "bufferingOverlay", void 0), p(this, "playOverlay", void 0), p(this, "castOverlay", new PE()), p(this, "channelSelectionList", void 0), p(this, "bar", void 0), p(this, "stateInterval", void 0), p(this, "thumbnailModule", void 0), p(this, "browser", pt()), p(this, "unload", () => {
15400
+ p(this, "core", void 0), p(this, "castSender", void 0), p(this, "airPlaySender", void 0), p(this, "options", void 0), p(this, "state", void 0), p(this, "playerElement", document.createElement("div")), p(this, "bufferingOverlay", void 0), p(this, "playOverlay", void 0), p(this, "castOverlay", new LE()), p(this, "channelSelectionList", void 0), p(this, "bar", void 0), p(this, "stateInterval", void 0), p(this, "thumbnailModule", void 0), p(this, "browser", pt()), p(this, "unload", () => {
15383
15401
  var e, t;
15384
15402
  this.stateInterval && window.clearInterval(this.stateInterval), this.core.unload(), this.playerElement.remove(), (e = this.thumbnailModule) == null || e.stop(), (t = this.airPlaySender) == null || t.unload();
15385
15403
  }), p(this, "attach", (e) => {
@@ -15420,7 +15438,7 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
15420
15438
  this.core.muted = !e, this.core.muted = e;
15421
15439
  }
15422
15440
  }), p(this, "toggleOneToOne", () => {
15423
- this.playerElement.classList.contains(kD) ? this.playerElement.classList.remove(kD) : this.playerElement.classList.add(kD);
15441
+ this.playerElement.classList.contains(MD) ? this.playerElement.classList.remove(MD) : this.playerElement.classList.add(MD);
15424
15442
  }), p(this, "isInFullscreen", () => this.state.fullscreen.isFullscreen()), p(this, "enterFullscreen", N(function* () {
15425
15443
  n.triggerUserInput(), n.iosHackResetSize(), n.bar.fullscreenButton.setIcon("exit"), yield n.state.fullscreen.request(), n.lockOrientation();
15426
15444
  })), p(this, "exitFullscreen", () => (this.bar.fullscreenButton.setIcon("enter"), this.unlockOrientation(), this.state.fullscreen.exit())), p(this, "showAirPlayPicker", () => {
@@ -15439,20 +15457,20 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
15439
15457
  var e, t, n;
15440
15458
  return !((e = this.options.channelSelectionOptions) == null || (e = e.barButton) == null) && e.enabled && !((t = this.options.channelSelectionOptions) == null || (t = t.barButton) == null) && t.thumbnails ? !0 : !!(!((n = this.options.channelSelectionOptions) == null || (n = n.list) == null) && n.enabled);
15441
15459
  }), p(this, "bumpInteractTime", () => void (this.state.lastInteractionTime = Date.now()));
15442
- let s = L(L({}, jD), t);
15443
- this.options = s, this.playerElement.className = OD, MD(e) ? this.core = e : this.core = new Xw(e), this.state = {
15460
+ let s = L(L({}, PD), t);
15461
+ this.options = s, this.playerElement.className = jD, FD(e) ? this.core = e : this.core = new $w(e), this.state = {
15444
15462
  isBuffering: !1,
15445
- fullscreen: new fD(!fD.isFullscreenApiSupported(this.playerElement) && fD.isFullscreenApiSupported(this.core.mediaElement) ? this.core.mediaElement : this.playerElement),
15463
+ fullscreen: new hD(!hD.isFullscreenApiSupported(this.playerElement) && hD.isFullscreenApiSupported(this.core.mediaElement) ? this.core.mediaElement : this.playerElement),
15446
15464
  lastInteractionTime: 0
15447
- }, this.needsThumbnails() && (this.thumbnailModule = new wD({
15465
+ }, this.needsThumbnails() && (this.thumbnailModule = new DD({
15448
15466
  vindral: this.core,
15449
15467
  refreshEveryMs: t == null ? void 0 : t.thumbnailUpdateInterval
15450
- }), this.thumbnailModule.start()), !((r = this.options.channelSelectionOptions) == null || (r = r.list) == null) && r.enabled && (this.channelSelectionList = new sD({
15468
+ }), this.thumbnailModule.start()), !((r = this.options.channelSelectionOptions) == null || (r = r.list) == null) && r.enabled && (this.channelSelectionList = new uD({
15451
15469
  vindral: this.core,
15452
15470
  thumbnailModule: this.thumbnailModule
15453
15471
  }));
15454
15472
  let c = (t == null ? void 0 : t.channelSelectionEnabled) || (t == null || (i = t.channelSelectionOptions) == null || (i = i.barButton) == null ? void 0 : i.enabled), l = t == null || (a = t.channelSelectionOptions) == null || (a = a.barButton) == null ? void 0 : a.thumbnails;
15455
- this.bar = new OE(L(L({
15473
+ this.bar = new jE(L(L({
15456
15474
  vindral: this.core,
15457
15475
  thumbnailModule: this.thumbnailModule
15458
15476
  }, s), {}, {
@@ -15465,7 +15483,7 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
15465
15483
  onOneToOneClicked: () => this.toggleOneToOne(),
15466
15484
  onPipClicked: () => void this.togglePip().catch((e) => console.error("error", e)),
15467
15485
  onAirPlayClicked: () => this.showAirPlayPicker()
15468
- })), this.core.media === "audio" && (this.playerElement.classList.add(AD), this.options.controlsEnabled && this.bar.show());
15486
+ })), this.core.media === "audio" && (this.playerElement.classList.add(ND), this.options.controlsEnabled && this.bar.show());
15469
15487
  let u = this.core.getCastOptions();
15470
15488
  this.castSender = new Pr({
15471
15489
  background: this.options.castBackground,
@@ -15510,7 +15528,7 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
15510
15528
  break;
15511
15529
  }
15512
15530
  }
15513
- }), this.core.attach(this.playerElement), this.castOverlay.attach(this.playerElement), this.options.bufferingOverlayEnabled && (this.bufferingOverlay = new ne(), this.bufferingOverlay.attach(this.playerElement)), this.options.playOverlayEnabled && (this.playOverlay = new CD(), this.playOverlay.attach(this.playerElement), this.playOverlay.onClick = () => {
15531
+ }), this.core.attach(this.playerElement), this.castOverlay.attach(this.playerElement), this.options.bufferingOverlayEnabled && (this.bufferingOverlay = new ne(), this.bufferingOverlay.attach(this.playerElement)), this.options.playOverlayEnabled && (this.playOverlay = new ED(), this.playOverlay.attach(this.playerElement), this.playOverlay.onClick = () => {
15514
15532
  var e;
15515
15533
  this.core.userInput(), (e = this.playOverlay) == null || e.hide();
15516
15534
  }), this.channelSelectionList && this.channelSelectionList.attach(this.playerElement), this.bar.attach(this.playerElement), this.playerElement.addEventListener("click", this.onClick), this.playerElement.addEventListener("mousemove", this.onMouseMove), this.state.fullscreen.on("on fullscreen change", (e) => {
@@ -15522,4 +15540,4 @@ var TD, ED, DD, OD = (TD = hD.player) == null ? "" : TD, kD = (ED = hD["one-to-o
15522
15540
  }
15523
15541
  };
15524
15542
  //#endregion
15525
- export { mi as AUTHENTICATION_EXPIRED_CODE, pi as AUTHENTICATION_FAILED_CODE, zu as ApiClient, hi as CHANNEL_NOT_FOUND_CODE, gi as CHANNEL_NOT_LIVE_CODE, fi as CONNECTION_FAILED_AFTER_RETRIES_CODE, di as CONNECTION_FAILED_CODE, Pr as CastSender, Si as DISCONNECTED_BY_EDGE, vi as INACTIVITY_CODE, _i as NO_INCOMING_DATA, ND as Player, Xw as Vindral, U as VindralError };
15543
+ export { mi as AUTHENTICATION_EXPIRED_CODE, pi as AUTHENTICATION_FAILED_CODE, zu as ApiClient, hi as CHANNEL_NOT_FOUND_CODE, gi as CHANNEL_NOT_LIVE_CODE, fi as CONNECTION_FAILED_AFTER_RETRIES_CODE, di as CONNECTION_FAILED_CODE, Pr as CastSender, Si as DISCONNECTED_BY_EDGE, vi as INACTIVITY_CODE, _i as NO_INCOMING_DATA, ID as Player, $w as Vindral, U as VindralError };