stream-engine-player 0.0.10 → 0.0.11

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.
@@ -13334,8 +13334,8 @@ var require_stream_engine_player = __commonJS({
13334
13334
  }
13335
13335
  var global2 = get_self_scope_1.getSelfScope();
13336
13336
  function consolePrintFn(type2) {
13337
- var func2 = global2.console[type2];
13338
- if (func2) {
13337
+ var func = global2.console[type2];
13338
+ if (func) {
13339
13339
  return function() {
13340
13340
  var args = [];
13341
13341
  for (var _i2 = 0; _i2 < arguments.length; _i2++) {
@@ -13344,7 +13344,7 @@ var require_stream_engine_player = __commonJS({
13344
13344
  if (args[0]) {
13345
13345
  args[0] = formatMsg(type2, args[0]);
13346
13346
  }
13347
- func2.apply(global2.console, args);
13347
+ func.apply(global2.console, args);
13348
13348
  };
13349
13349
  }
13350
13350
  return noop2;
@@ -22092,20 +22092,20 @@ var require_stream_engine_player = __commonJS({
22092
22092
  if (Array.isArray(type2)) {
22093
22093
  return _handleMultipleEvents(one, elem, type2, fn);
22094
22094
  }
22095
- var func2 = function func3() {
22096
- off(elem, type2, func3);
22095
+ var func = function func2() {
22096
+ off(elem, type2, func2);
22097
22097
  fn.apply(this, arguments);
22098
22098
  };
22099
- func2.guid = fn.guid = fn.guid || newGUID();
22100
- on(elem, type2, func2);
22099
+ func.guid = fn.guid = fn.guid || newGUID();
22100
+ on(elem, type2, func);
22101
22101
  }
22102
22102
  function any(elem, type2, fn) {
22103
- var func2 = function func3() {
22104
- off(elem, type2, func3);
22103
+ var func = function func2() {
22104
+ off(elem, type2, func2);
22105
22105
  fn.apply(this, arguments);
22106
22106
  };
22107
- func2.guid = fn.guid = fn.guid || newGUID();
22108
- on(elem, type2, func2);
22107
+ func.guid = fn.guid = fn.guid || newGUID();
22108
+ on(elem, type2, func);
22109
22109
  }
22110
22110
  var Events = /* @__PURE__ */ Object.freeze({
22111
22111
  fixEvent,
@@ -22135,7 +22135,7 @@ var require_stream_engine_player = __commonJS({
22135
22135
  };
22136
22136
  return throttled;
22137
22137
  };
22138
- var debounce = function debounce2(func2, wait, immediate, context) {
22138
+ var debounce = function debounce2(func, wait, immediate, context) {
22139
22139
  if (context === void 0) {
22140
22140
  context = window_1$1;
22141
22141
  }
@@ -22151,11 +22151,11 @@ var require_stream_engine_player = __commonJS({
22151
22151
  timeout = null;
22152
22152
  _later = null;
22153
22153
  if (!immediate) {
22154
- func2.apply(self2, args);
22154
+ func.apply(self2, args);
22155
22155
  }
22156
22156
  };
22157
22157
  if (!timeout && immediate) {
22158
- func2.apply(self2, args);
22158
+ func.apply(self2, args);
22159
22159
  }
22160
22160
  context.clearTimeout(timeout);
22161
22161
  timeout = context.setTimeout(_later, wait);
@@ -43277,7 +43277,7 @@ var require_stream_engine_player = __commonJS({
43277
43277
  default: videojs$1
43278
43278
  }, Symbol.toStringTag, { value: "Module" }));
43279
43279
  const name$1 = "stream-engine-player";
43280
- const version$2 = "0.0.10";
43280
+ const version$2 = "0.0.11";
43281
43281
  const description = "Stream engine player";
43282
43282
  const type$1 = "module";
43283
43283
  const files$1 = [
@@ -43307,7 +43307,8 @@ var require_stream_engine_player = __commonJS({
43307
43307
  "video.js": "7.6.6",
43308
43308
  "videojs-youtube": "^2.6.1",
43309
43309
  "videojs-ima": "1.7.5",
43310
- "videojs-contrib-ads": "6.6.5"
43310
+ "videojs-contrib-ads": "6.6.5",
43311
+ "videojs-mux": "4.19.0"
43311
43312
  };
43312
43313
  const devDependencies$1 = {
43313
43314
  concurrently: "^8.2.1",
@@ -43593,11 +43594,11 @@ var require_stream_engine_player = __commonJS({
43593
43594
  QueueItem.prototype.otherCallRejected = function(value) {
43594
43595
  unwrap(this.promise, this.onRejected, value);
43595
43596
  };
43596
- function unwrap(promise, func2, value) {
43597
+ function unwrap(promise, func, value) {
43597
43598
  immediate(function() {
43598
43599
  var returnValue;
43599
43600
  try {
43600
- returnValue = func2(value);
43601
+ returnValue = func(value);
43601
43602
  } catch (e) {
43602
43603
  return handlers.reject(promise, e);
43603
43604
  }
@@ -43669,10 +43670,10 @@ var require_stream_engine_player = __commonJS({
43669
43670
  onError2(result.value);
43670
43671
  }
43671
43672
  }
43672
- function tryCatch(func2, value) {
43673
+ function tryCatch(func, value) {
43673
43674
  var out = {};
43674
43675
  try {
43675
- out.value = func2(value);
43676
+ out.value = func(value);
43676
43677
  out.status = "success";
43677
43678
  } catch (e) {
43678
43679
  out.status = "error";
@@ -45645,12 +45646,12 @@ var require_stream_engine_player = __commonJS({
45645
45646
  loadData: function(data) {
45646
45647
  angular.extend(this, data);
45647
45648
  },
45648
- exec: function(func2, args) {
45649
- if (this[func2]) {
45649
+ exec: function(func, args) {
45650
+ if (this[func]) {
45650
45651
  if (!args || args.constructor !== Array) {
45651
45652
  args = [args];
45652
45653
  }
45653
- this[func2].apply(this, args);
45654
+ this[func].apply(this, args);
45654
45655
  }
45655
45656
  },
45656
45657
  whenReady: function() {
@@ -52727,6 +52728,2219 @@ var require_stream_engine_player = __commonJS({
52727
52728
  plugin.pluginName = "sourceSelector";
52728
52729
  return plugin;
52729
52730
  });
52731
+ var videojsMux = { exports: {} };
52732
+ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(video_es);
52733
+ /*!
52734
+ * videojs-mux
52735
+ * @version 4.19.0
52736
+ * @copyright 2024 Mux, Inc.
52737
+ */
52738
+ (function(module2, exports2) {
52739
+ !function() {
52740
+ !function(e, t) {
52741
+ module2.exports = t(require$$0);
52742
+ }(this, function(e) {
52743
+ return function() {
52744
+ var t = { 48: function(e2, t2, a2) {
52745
+ var r2;
52746
+ r2 = "undefined" != typeof window ? window : void 0 !== a2.g ? a2.g : "undefined" != typeof self ? self : {}, e2.exports = r2;
52747
+ }, 855: function(t2) {
52748
+ t2.exports = e;
52749
+ } }, a = {};
52750
+ function r(e2) {
52751
+ var n2 = a[e2];
52752
+ if (void 0 !== n2)
52753
+ return n2.exports;
52754
+ var i2 = a[e2] = { exports: {} };
52755
+ return t[e2](i2, i2.exports, r), i2.exports;
52756
+ }
52757
+ r.n = function(e2) {
52758
+ var t2 = e2 && e2.__esModule ? function() {
52759
+ return e2.default;
52760
+ } : function() {
52761
+ return e2;
52762
+ };
52763
+ return r.d(t2, { a: t2 }), t2;
52764
+ }, r.d = function(e2, t2) {
52765
+ for (var a2 in t2)
52766
+ r.o(t2, a2) && !r.o(e2, a2) && Object.defineProperty(e2, a2, { enumerable: true, get: t2[a2] });
52767
+ }, r.g = function() {
52768
+ if ("object" == typeof globalThis)
52769
+ return globalThis;
52770
+ try {
52771
+ return this || new Function("return this")();
52772
+ } catch (e2) {
52773
+ if ("object" == typeof window)
52774
+ return window;
52775
+ }
52776
+ }(), r.o = function(e2, t2) {
52777
+ return Object.prototype.hasOwnProperty.call(e2, t2);
52778
+ }, r.r = function(e2) {
52779
+ "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e2, "__esModule", { value: true });
52780
+ };
52781
+ var n = {};
52782
+ return function() {
52783
+ r.r(n), r.d(n, { register: function() {
52784
+ return Ta;
52785
+ } });
52786
+ var e2 = r(48), t2 = r.n(e2), a2 = r(855), i2 = r.n(a2), o = Object.create, s = Object.defineProperty, u = Object.getOwnPropertyDescriptor, d = Object.getOwnPropertyNames, l = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, p = function(e3, t3) {
52787
+ return function() {
52788
+ return e3 && (t3 = e3(e3 = 0)), t3;
52789
+ };
52790
+ }, f = function(e3, t3) {
52791
+ return function() {
52792
+ return t3 || e3((t3 = { exports: {} }).exports, t3), t3.exports;
52793
+ };
52794
+ }, _2 = function(e3, t3, a3) {
52795
+ return a3 = null != e3 ? o(l(e3)) : {}, function(e4, t4, a4, r2) {
52796
+ if (t4 && "object" == typeof t4 || "function" == typeof t4)
52797
+ for (var n2, i3 = d(t4), o2 = 0, l2 = i3.length; o2 < l2; o2++)
52798
+ n2 = i3[o2], !c.call(e4, n2) && n2 !== a4 && s(e4, n2, { get: function(e5) {
52799
+ return t4[e5];
52800
+ }.bind(null, n2), enumerable: !(r2 = u(t4, n2)) || r2.enumerable });
52801
+ return e4;
52802
+ }(!t3 && e3 && e3.__esModule ? a3 : s(a3, "default", { value: e3, enumerable: true }), e3);
52803
+ }, h = f(function(e3, t3) {
52804
+ var a3;
52805
+ a3 = "undefined" != typeof window ? window : "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : {}, t3.exports = a3;
52806
+ });
52807
+ function v(e3) {
52808
+ return e3 && "undefined" != typeof Symbol && e3.constructor === Symbol ? "symbol" : typeof e3;
52809
+ }
52810
+ var m = p(function() {
52811
+ }), y = f(function(e3, t3) {
52812
+ var a3, r2;
52813
+ m(), a3 = e3, r2 = function() {
52814
+ var e4 = function() {
52815
+ }, t4 = "undefined", a4 = ("undefined" == typeof window ? "undefined" : v(window)) !== t4 && v(window.navigator) !== t4 && /Trident\/|MSIE /.test(window.navigator.userAgent), r3 = ["trace", "debug", "info", "warn", "error"];
52816
+ function n2(e5, t5) {
52817
+ var a5 = e5[t5];
52818
+ if ("function" == typeof a5.bind)
52819
+ return a5.bind(e5);
52820
+ try {
52821
+ return Function.prototype.bind.call(a5, e5);
52822
+ } catch (t6) {
52823
+ return function() {
52824
+ return Function.prototype.apply.apply(a5, [e5, arguments]);
52825
+ };
52826
+ }
52827
+ }
52828
+ function i3() {
52829
+ console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
52830
+ }
52831
+ function o2(r4) {
52832
+ return "debug" === r4 && (r4 = "log"), ("undefined" == typeof console ? "undefined" : v(console)) !== t4 && ("trace" === r4 && a4 ? i3 : void 0 !== console[r4] ? n2(console, r4) : void 0 !== console.log ? n2(console, "log") : e4);
52833
+ }
52834
+ function s2(t5, a5) {
52835
+ for (var n3 = 0; n3 < r3.length; n3++) {
52836
+ var i4 = r3[n3];
52837
+ this[i4] = n3 < t5 ? e4 : this.methodFactory(i4, t5, a5);
52838
+ }
52839
+ this.log = this.debug;
52840
+ }
52841
+ function u2(e5, a5, r4) {
52842
+ return function() {
52843
+ ("undefined" == typeof console ? "undefined" : v(console)) !== t4 && (s2.call(this, a5, r4), this[e5].apply(this, arguments));
52844
+ };
52845
+ }
52846
+ function d2(e5, t5, a5) {
52847
+ return o2(e5) || u2.apply(this, arguments);
52848
+ }
52849
+ function l2(e5, a5, n3) {
52850
+ var i4, o3 = this;
52851
+ a5 = null == a5 ? "WARN" : a5;
52852
+ var u3 = "loglevel";
52853
+ function l3() {
52854
+ var e6;
52855
+ if (("undefined" == typeof window ? "undefined" : v(window)) !== t4 && u3) {
52856
+ try {
52857
+ e6 = window.localStorage[u3];
52858
+ } catch (e7) {
52859
+ }
52860
+ if ((void 0 === e6 ? "undefined" : v(e6)) === t4)
52861
+ try {
52862
+ var a6 = window.document.cookie, r4 = a6.indexOf(encodeURIComponent(u3) + "=");
52863
+ -1 !== r4 && (e6 = /^([^;]+)/.exec(a6.slice(r4))[1]);
52864
+ } catch (e7) {
52865
+ }
52866
+ return void 0 === o3.levels[e6] && (e6 = void 0), e6;
52867
+ }
52868
+ }
52869
+ "string" == typeof e5 ? u3 += ":" + e5 : "symbol" === (void 0 === e5 ? "undefined" : v(e5)) && (u3 = void 0), o3.name = e5, o3.levels = { TRACE: 0, DEBUG: 1, INFO: 2, WARN: 3, ERROR: 4, SILENT: 5 }, o3.methodFactory = n3 || d2, o3.getLevel = function() {
52870
+ return i4;
52871
+ }, o3.setLevel = function(a6, n4) {
52872
+ if ("string" == typeof a6 && void 0 !== o3.levels[a6.toUpperCase()] && (a6 = o3.levels[a6.toUpperCase()]), !("number" == typeof a6 && a6 >= 0 && a6 <= o3.levels.SILENT))
52873
+ throw "log.setLevel() called with invalid level: " + a6;
52874
+ if (i4 = a6, false !== n4 && function(e6) {
52875
+ var a7 = (r3[e6] || "silent").toUpperCase();
52876
+ if (("undefined" == typeof window ? "undefined" : v(window)) !== t4 && u3) {
52877
+ try {
52878
+ return void (window.localStorage[u3] = a7);
52879
+ } catch (e7) {
52880
+ }
52881
+ try {
52882
+ window.document.cookie = encodeURIComponent(u3) + "=" + a7 + ";";
52883
+ } catch (e7) {
52884
+ }
52885
+ }
52886
+ }(a6), s2.call(o3, a6, e5), ("undefined" == typeof console ? "undefined" : v(console)) === t4 && a6 < o3.levels.SILENT)
52887
+ return "No console available for logging";
52888
+ }, o3.setDefaultLevel = function(e6) {
52889
+ a5 = e6, l3() || o3.setLevel(e6, false);
52890
+ }, o3.resetLevel = function() {
52891
+ o3.setLevel(a5, false), function() {
52892
+ if (("undefined" == typeof window ? "undefined" : v(window)) !== t4 && u3) {
52893
+ try {
52894
+ return void window.localStorage.removeItem(u3);
52895
+ } catch (e6) {
52896
+ }
52897
+ try {
52898
+ window.document.cookie = encodeURIComponent(u3) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
52899
+ } catch (e6) {
52900
+ }
52901
+ }
52902
+ }();
52903
+ }, o3.enableAll = function(e6) {
52904
+ o3.setLevel(o3.levels.TRACE, e6);
52905
+ }, o3.disableAll = function(e6) {
52906
+ o3.setLevel(o3.levels.SILENT, e6);
52907
+ };
52908
+ var c3 = l3();
52909
+ null == c3 && (c3 = a5), o3.setLevel(c3, false);
52910
+ }
52911
+ var c2 = new l2(), p2 = {};
52912
+ c2.getLogger = function(e5) {
52913
+ if ("symbol" !== (void 0 === e5 ? "undefined" : v(e5)) && "string" != typeof e5 || "" === e5)
52914
+ throw new TypeError("You must supply a name when creating a logger.");
52915
+ var t5 = p2[e5];
52916
+ return t5 || (t5 = p2[e5] = new l2(e5, c2.getLevel(), c2.methodFactory)), t5;
52917
+ };
52918
+ var f2 = ("undefined" == typeof window ? "undefined" : v(window)) !== t4 ? window.log : void 0;
52919
+ return c2.noConflict = function() {
52920
+ return ("undefined" == typeof window ? "undefined" : v(window)) !== t4 && window.log === c2 && (window.log = f2), c2;
52921
+ }, c2.getLoggers = function() {
52922
+ return p2;
52923
+ }, c2.default = c2, c2;
52924
+ }, "object" == typeof t3 && t3.exports ? t3.exports = r2() : a3.log = r2();
52925
+ });
52926
+ function g(e3, t3) {
52927
+ return null != t3 && "undefined" != typeof Symbol && t3[Symbol.hasInstance] ? !!t3[Symbol.hasInstance](e3) : g(e3, t3);
52928
+ }
52929
+ var b = p(function() {
52930
+ b();
52931
+ }), w = f(function(e3) {
52932
+ var t3 = Object.prototype.hasOwnProperty;
52933
+ function a3(e4) {
52934
+ try {
52935
+ return decodeURIComponent(e4.replace(/\+/g, " "));
52936
+ } catch (e5) {
52937
+ return null;
52938
+ }
52939
+ }
52940
+ function r2(e4) {
52941
+ try {
52942
+ return encodeURIComponent(e4);
52943
+ } catch (e5) {
52944
+ return null;
52945
+ }
52946
+ }
52947
+ e3.stringify = function(e4, a4) {
52948
+ a4 = a4 || "";
52949
+ var n2, i3, o2 = [];
52950
+ for (i3 in "string" != typeof a4 && (a4 = "?"), e4)
52951
+ if (t3.call(e4, i3)) {
52952
+ if (!(n2 = e4[i3]) && (null == n2 || isNaN(n2)) && (n2 = ""), i3 = r2(i3), n2 = r2(n2), null === i3 || null === n2)
52953
+ continue;
52954
+ o2.push(i3 + "=" + n2);
52955
+ }
52956
+ return o2.length ? a4 + o2.join("&") : "";
52957
+ }, e3.parse = function(e4) {
52958
+ for (var t4, r3 = /([^=?#&]+)=?([^&]*)/g, n2 = {}; t4 = r3.exec(e4); ) {
52959
+ var i3 = a3(t4[1]), o2 = a3(t4[2]);
52960
+ null === i3 || null === o2 || i3 in n2 || (n2[i3] = o2);
52961
+ }
52962
+ return n2;
52963
+ };
52964
+ }), T = f(function(e3, t3) {
52965
+ !function(a3) {
52966
+ var r2 = false;
52967
+ if ("object" == typeof e3 && (t3.exports = a3(), r2 = true), !r2) {
52968
+ var n2 = window.Cookies, i3 = window.Cookies = a3();
52969
+ i3.noConflict = function() {
52970
+ return window.Cookies = n2, i3;
52971
+ };
52972
+ }
52973
+ }(function() {
52974
+ var e4 = function() {
52975
+ for (var e5 = 0, t4 = {}; e5 < arguments.length; e5++) {
52976
+ var a3 = arguments[e5];
52977
+ for (var r2 in a3)
52978
+ t4[r2] = a3[r2];
52979
+ }
52980
+ return t4;
52981
+ };
52982
+ return function t4(a3) {
52983
+ function r2(t5, n2, i3) {
52984
+ var o2;
52985
+ if ("undefined" != typeof document) {
52986
+ if (arguments.length > 1) {
52987
+ if ("number" == typeof (i3 = e4({ path: "/" }, r2.defaults, i3)).expires) {
52988
+ var s2 = new Date();
52989
+ s2.setMilliseconds(s2.getMilliseconds() + 864e5 * i3.expires), i3.expires = s2;
52990
+ }
52991
+ try {
52992
+ o2 = JSON.stringify(n2), /^[\{\[]/.test(o2) && (n2 = o2);
52993
+ } catch (e5) {
52994
+ }
52995
+ return n2 = a3.write ? a3.write(n2, t5) : encodeURIComponent(String(n2)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), t5 = (t5 = (t5 = encodeURIComponent(String(t5))).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)).replace(/[\(\)]/g, escape), document.cookie = [t5, "=", n2, i3.expires ? "; expires=" + i3.expires.toUTCString() : "", i3.path ? "; path=" + i3.path : "", i3.domain ? "; domain=" + i3.domain : "", i3.secure ? "; secure" : ""].join("");
52996
+ }
52997
+ t5 || (o2 = {});
52998
+ for (var u2 = document.cookie ? document.cookie.split("; ") : [], d2 = /(%[0-9A-Z]{2})+/g, l2 = 0; l2 < u2.length; l2++) {
52999
+ var c2 = u2[l2].split("="), p2 = c2.slice(1).join("=");
53000
+ '"' === p2.charAt(0) && (p2 = p2.slice(1, -1));
53001
+ try {
53002
+ var f2 = c2[0].replace(d2, decodeURIComponent);
53003
+ if (p2 = a3.read ? a3.read(p2, f2) : a3(p2, f2) || p2.replace(d2, decodeURIComponent), this.json)
53004
+ try {
53005
+ p2 = JSON.parse(p2);
53006
+ } catch (e5) {
53007
+ }
53008
+ if (t5 === f2) {
53009
+ o2 = p2;
53010
+ break;
53011
+ }
53012
+ t5 || (o2[f2] = p2);
53013
+ } catch (e5) {
53014
+ }
53015
+ }
53016
+ return o2;
53017
+ }
53018
+ }
53019
+ return r2.set = r2, r2.get = function(e5) {
53020
+ return r2.call(r2, e5);
53021
+ }, r2.getJSON = function() {
53022
+ return r2.apply({ json: true }, [].slice.call(arguments));
53023
+ }, r2.defaults = {}, r2.remove = function(t5, a4) {
53024
+ r2(t5, "", e4(a4, { expires: -1 }));
53025
+ }, r2.withConverter = t4, r2;
53026
+ }(function() {
53027
+ });
53028
+ });
53029
+ }), x = f(function(e3, t3) {
53030
+ var a3 = Array.prototype.slice;
53031
+ t3.exports = function(e4, t4) {
53032
+ for (("length" in e4) || (e4 = [e4]), e4 = a3.call(e4); e4.length; ) {
53033
+ var r2 = e4.shift(), n2 = t4(r2);
53034
+ if (n2)
53035
+ return n2;
53036
+ r2.childNodes && r2.childNodes.length && (e4 = a3.call(r2.childNodes).concat(e4));
53037
+ }
53038
+ };
53039
+ }), k = f(function(e3, t3) {
53040
+ function a3(e4, t4) {
53041
+ if (!g(this, a3))
53042
+ return new a3(e4, t4);
53043
+ this.data = e4, this.nodeValue = e4, this.length = e4.length, this.ownerDocument = t4 || null;
53044
+ }
53045
+ b(), t3.exports = a3, a3.prototype.nodeType = 8, a3.prototype.nodeName = "#comment", a3.prototype.toString = function() {
53046
+ return "[object Comment]";
53047
+ };
53048
+ }), E = f(function(e3, t3) {
53049
+ function a3(e4, t4) {
53050
+ if (!g(this, a3))
53051
+ return new a3(e4);
53052
+ this.data = e4 || "", this.length = this.data.length, this.ownerDocument = t4 || null;
53053
+ }
53054
+ b(), t3.exports = a3, a3.prototype.type = "DOMTextNode", a3.prototype.nodeType = 3, a3.prototype.nodeName = "#text", a3.prototype.toString = function() {
53055
+ return this.data;
53056
+ }, a3.prototype.replaceData = function(e4, t4, a4) {
53057
+ var r2 = this.data, n2 = r2.substring(0, e4), i3 = r2.substring(e4 + t4, r2.length);
53058
+ this.data = n2 + a4 + i3, this.length = this.data.length;
53059
+ };
53060
+ }), D = f(function(e3, t3) {
53061
+ t3.exports = function(e4) {
53062
+ var t4 = this, a3 = e4.type;
53063
+ e4.target || (e4.target = t4), t4.listeners || (t4.listeners = {});
53064
+ var r2 = t4.listeners[a3];
53065
+ if (r2)
53066
+ return r2.forEach(function(a4) {
53067
+ e4.currentTarget = t4, "function" == typeof a4 ? a4(e4) : a4.handleEvent(e4);
53068
+ });
53069
+ t4.parentNode && t4.parentNode.dispatchEvent(e4);
53070
+ };
53071
+ }), q = f(function(e3, t3) {
53072
+ t3.exports = function(e4, t4) {
53073
+ var a3 = this;
53074
+ a3.listeners || (a3.listeners = {}), a3.listeners[e4] || (a3.listeners[e4] = []), -1 === a3.listeners[e4].indexOf(t4) && a3.listeners[e4].push(t4);
53075
+ };
53076
+ }), S = f(function(e3, t3) {
53077
+ t3.exports = function(e4, t4) {
53078
+ var a3 = this;
53079
+ if (a3.listeners && a3.listeners[e4]) {
53080
+ var r2 = a3.listeners[e4], n2 = r2.indexOf(t4);
53081
+ -1 !== n2 && r2.splice(n2, 1);
53082
+ }
53083
+ };
53084
+ }), A = f(function(e3, t3) {
53085
+ m(), t3.exports = r2;
53086
+ var a3 = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "menuitem", "meta", "param", "source", "track", "wbr"];
53087
+ function r2(e4) {
53088
+ switch (e4.nodeType) {
53089
+ case 3:
53090
+ return o2(e4.data);
53091
+ case 8:
53092
+ return "<!--" + e4.data + "-->";
53093
+ default:
53094
+ return function(e5) {
53095
+ var t4 = [], s2 = e5.tagName;
53096
+ return "http://www.w3.org/1999/xhtml" === e5.namespaceURI && (s2 = s2.toLowerCase()), t4.push("<" + s2 + function(e6) {
53097
+ var t5 = [];
53098
+ for (var a4 in e6)
53099
+ n2(e6, a4) && t5.push({ name: a4, value: e6[a4] });
53100
+ for (var r3 in e6._attributes)
53101
+ for (var o3 in e6._attributes[r3]) {
53102
+ var s3 = e6._attributes[r3][o3], u2 = (s3.prefix ? s3.prefix + ":" : "") + o3;
53103
+ t5.push({ name: u2, value: s3.value });
53104
+ }
53105
+ return e6.className && t5.push({ name: "class", value: e6.className }), t5.length ? i3(t5) : "";
53106
+ }(e5) + function(e6) {
53107
+ var t5 = e6.dataset, a4 = [];
53108
+ for (var r3 in t5)
53109
+ a4.push({ name: "data-" + r3, value: t5[r3] });
53110
+ return a4.length ? i3(a4) : "";
53111
+ }(e5)), a3.indexOf(s2) > -1 ? t4.push(" />") : (t4.push(">"), e5.childNodes.length ? t4.push.apply(t4, e5.childNodes.map(r2)) : e5.textContent || e5.innerText ? t4.push(o2(e5.textContent || e5.innerText)) : e5.innerHTML && t4.push(e5.innerHTML), t4.push("</" + s2 + ">")), t4.join("");
53112
+ }(e4);
53113
+ }
53114
+ }
53115
+ function n2(e4, t4) {
53116
+ var a4 = v(e4[t4]);
53117
+ return "style" === t4 && Object.keys(e4.style).length > 0 || e4.hasOwnProperty(t4) && ("string" === a4 || "boolean" === a4 || "number" === a4) && "nodeName" !== t4 && "className" !== t4 && "tagName" !== t4 && "textContent" !== t4 && "innerText" !== t4 && "namespaceURI" !== t4 && "innerHTML" !== t4;
53118
+ }
53119
+ function i3(e4) {
53120
+ var t4 = [];
53121
+ return e4.forEach(function(e5) {
53122
+ var a4 = e5.name, r3 = e5.value;
53123
+ "style" === a4 && (r3 = function(e6) {
53124
+ if ("string" == typeof e6)
53125
+ return e6;
53126
+ var t5 = "";
53127
+ return Object.keys(e6).forEach(function(a5) {
53128
+ var r4 = e6[a5];
53129
+ a5 = a5.replace(/[A-Z]/g, function(e7) {
53130
+ return "-" + e7.toLowerCase();
53131
+ }), t5 += a5 + ":" + r4 + ";";
53132
+ }), t5;
53133
+ }(r3)), t4.push(a4 + '="' + function(e6) {
53134
+ return o2(e6).replace(/"/g, "&quot;");
53135
+ }(r3) + '"');
53136
+ }), t4.length ? " " + t4.join(" ") : "";
53137
+ }
53138
+ function o2(e4) {
53139
+ var t4 = "";
53140
+ return "string" == typeof e4 ? t4 = e4 : e4 && (t4 = e4.toString()), t4.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
53141
+ }
53142
+ }), O = f(function(e3, t3) {
53143
+ b();
53144
+ var a3 = x(), r2 = D(), n2 = q(), i3 = S(), o2 = A(), s2 = "http://www.w3.org/1999/xhtml";
53145
+ function u2(e4, t4, a4) {
53146
+ if (!g(this, u2))
53147
+ return new u2(e4);
53148
+ var r3 = void 0 === a4 ? s2 : a4 || null;
53149
+ this.tagName = r3 === s2 ? String(e4).toUpperCase() : e4, this.nodeName = this.tagName, this.className = "", this.dataset = {}, this.childNodes = [], this.parentNode = null, this.style = {}, this.ownerDocument = t4 || null, this.namespaceURI = r3, this._attributes = {}, "INPUT" === this.tagName && (this.type = "text");
53150
+ }
53151
+ t3.exports = u2, u2.prototype.type = "DOMElement", u2.prototype.nodeType = 1, u2.prototype.appendChild = function(e4) {
53152
+ return e4.parentNode && e4.parentNode.removeChild(e4), this.childNodes.push(e4), e4.parentNode = this, e4;
53153
+ }, u2.prototype.replaceChild = function(e4, t4) {
53154
+ e4.parentNode && e4.parentNode.removeChild(e4);
53155
+ var a4 = this.childNodes.indexOf(t4);
53156
+ return t4.parentNode = null, this.childNodes[a4] = e4, e4.parentNode = this, t4;
53157
+ }, u2.prototype.removeChild = function(e4) {
53158
+ var t4 = this.childNodes.indexOf(e4);
53159
+ return this.childNodes.splice(t4, 1), e4.parentNode = null, e4;
53160
+ }, u2.prototype.insertBefore = function(e4, t4) {
53161
+ e4.parentNode && e4.parentNode.removeChild(e4);
53162
+ var a4 = null == t4 ? -1 : this.childNodes.indexOf(t4);
53163
+ return a4 > -1 ? this.childNodes.splice(a4, 0, e4) : this.childNodes.push(e4), e4.parentNode = this, e4;
53164
+ }, u2.prototype.setAttributeNS = function(e4, t4, a4) {
53165
+ var r3 = null, n3 = t4, i4 = t4.indexOf(":");
53166
+ (i4 > -1 && (r3 = t4.substr(0, i4), n3 = t4.substr(i4 + 1)), "INPUT" === this.tagName && "type" === t4) ? this.type = a4 : (this._attributes[e4] || (this._attributes[e4] = {}))[n3] = { value: a4, prefix: r3 };
53167
+ }, u2.prototype.getAttributeNS = function(e4, t4) {
53168
+ var a4 = this._attributes[e4], r3 = a4 && a4[t4] && a4[t4].value;
53169
+ return "INPUT" === this.tagName && "type" === t4 ? this.type : "string" != typeof r3 ? null : r3;
53170
+ }, u2.prototype.removeAttributeNS = function(e4, t4) {
53171
+ var a4 = this._attributes[e4];
53172
+ a4 && delete a4[t4];
53173
+ }, u2.prototype.hasAttributeNS = function(e4, t4) {
53174
+ var a4 = this._attributes[e4];
53175
+ return !!a4 && t4 in a4;
53176
+ }, u2.prototype.setAttribute = function(e4, t4) {
53177
+ return this.setAttributeNS(null, e4, t4);
53178
+ }, u2.prototype.getAttribute = function(e4) {
53179
+ return this.getAttributeNS(null, e4);
53180
+ }, u2.prototype.removeAttribute = function(e4) {
53181
+ return this.removeAttributeNS(null, e4);
53182
+ }, u2.prototype.hasAttribute = function(e4) {
53183
+ return this.hasAttributeNS(null, e4);
53184
+ }, u2.prototype.removeEventListener = i3, u2.prototype.addEventListener = n2, u2.prototype.dispatchEvent = r2, u2.prototype.focus = function() {
53185
+ }, u2.prototype.toString = function() {
53186
+ return o2(this);
53187
+ }, u2.prototype.getElementsByClassName = function(e4) {
53188
+ var t4 = e4.split(" "), r3 = [];
53189
+ return a3(this, function(e5) {
53190
+ if (1 === e5.nodeType) {
53191
+ var a4 = (e5.className || "").split(" ");
53192
+ t4.every(function(e6) {
53193
+ return -1 !== a4.indexOf(e6);
53194
+ }) && r3.push(e5);
53195
+ }
53196
+ }), r3;
53197
+ }, u2.prototype.getElementsByTagName = function(e4) {
53198
+ e4 = e4.toLowerCase();
53199
+ var t4 = [];
53200
+ return a3(this.childNodes, function(a4) {
53201
+ 1 === a4.nodeType && ("*" === e4 || a4.tagName.toLowerCase() === e4) && t4.push(a4);
53202
+ }), t4;
53203
+ }, u2.prototype.contains = function(e4) {
53204
+ return a3(this, function(t4) {
53205
+ return e4 === t4;
53206
+ }) || false;
53207
+ };
53208
+ }), R = f(function(e3, t3) {
53209
+ b();
53210
+ var a3 = O();
53211
+ function r2(e4) {
53212
+ if (!g(this, r2))
53213
+ return new r2();
53214
+ this.childNodes = [], this.parentNode = null, this.ownerDocument = e4 || null;
53215
+ }
53216
+ t3.exports = r2, r2.prototype.type = "DocumentFragment", r2.prototype.nodeType = 11, r2.prototype.nodeName = "#document-fragment", r2.prototype.appendChild = a3.prototype.appendChild, r2.prototype.replaceChild = a3.prototype.replaceChild, r2.prototype.removeChild = a3.prototype.removeChild, r2.prototype.toString = function() {
53217
+ return this.childNodes.map(function(e4) {
53218
+ return String(e4);
53219
+ }).join("");
53220
+ };
53221
+ }), P = f(function(e3, t3) {
53222
+ function a3(e4) {
53223
+ }
53224
+ t3.exports = a3, a3.prototype.initEvent = function(e4, t4, a4) {
53225
+ this.type = e4, this.bubbles = t4, this.cancelable = a4;
53226
+ }, a3.prototype.preventDefault = function() {
53227
+ };
53228
+ }), N = f(function(e3, t3) {
53229
+ b();
53230
+ var a3 = x(), r2 = k(), n2 = E(), i3 = O(), o2 = R(), s2 = P(), u2 = D(), d2 = q(), l2 = S();
53231
+ function c2() {
53232
+ if (!g(this, c2))
53233
+ return new c2();
53234
+ this.head = this.createElement("head"), this.body = this.createElement("body"), this.documentElement = this.createElement("html"), this.documentElement.appendChild(this.head), this.documentElement.appendChild(this.body), this.childNodes = [this.documentElement], this.nodeType = 9;
53235
+ }
53236
+ t3.exports = c2;
53237
+ var p2 = c2.prototype;
53238
+ p2.createTextNode = function(e4) {
53239
+ return new n2(e4, this);
53240
+ }, p2.createElementNS = function(e4, t4) {
53241
+ var a4 = null === e4 ? null : String(e4);
53242
+ return new i3(t4, this, a4);
53243
+ }, p2.createElement = function(e4) {
53244
+ return new i3(e4, this);
53245
+ }, p2.createDocumentFragment = function() {
53246
+ return new o2(this);
53247
+ }, p2.createEvent = function(e4) {
53248
+ return new s2(e4);
53249
+ }, p2.createComment = function(e4) {
53250
+ return new r2(e4, this);
53251
+ }, p2.getElementById = function(e4) {
53252
+ return e4 = String(e4), a3(this.childNodes, function(t4) {
53253
+ if (String(t4.id) === e4)
53254
+ return t4;
53255
+ }) || null;
53256
+ }, p2.getElementsByClassName = i3.prototype.getElementsByClassName, p2.getElementsByTagName = i3.prototype.getElementsByTagName, p2.contains = i3.prototype.contains, p2.removeEventListener = l2, p2.addEventListener = d2, p2.dispatchEvent = u2;
53257
+ }), I = f(function(e3, t3) {
53258
+ var a3 = N();
53259
+ t3.exports = new a3();
53260
+ }), L = f(function(e3, t3) {
53261
+ var a3, r2 = "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof window ? window : {}, n2 = I();
53262
+ "undefined" != typeof document ? a3 = document : (a3 = r2["__GLOBAL_DOCUMENT_CACHE@4"]) || (a3 = r2["__GLOBAL_DOCUMENT_CACHE@4"] = n2), t3.exports = a3;
53263
+ });
53264
+ function C(e3, t3) {
53265
+ (null == t3 || t3 > e3.length) && (t3 = e3.length);
53266
+ for (var a3 = 0, r2 = new Array(t3); a3 < t3; a3++)
53267
+ r2[a3] = e3[a3];
53268
+ return r2;
53269
+ }
53270
+ function j(e3, t3) {
53271
+ return function(e4) {
53272
+ if (Array.isArray(e4))
53273
+ return e4;
53274
+ }(e3) || function(e4, t4) {
53275
+ var a3 = null == e4 ? null : "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
53276
+ if (null != a3) {
53277
+ var r2, n2, i3 = [], o2 = true, s2 = false;
53278
+ try {
53279
+ for (a3 = a3.call(e4); !(o2 = (r2 = a3.next()).done) && (i3.push(r2.value), !t4 || i3.length !== t4); o2 = true)
53280
+ ;
53281
+ } catch (e5) {
53282
+ s2 = true, n2 = e5;
53283
+ } finally {
53284
+ try {
53285
+ !o2 && null != a3.return && a3.return();
53286
+ } finally {
53287
+ if (s2)
53288
+ throw n2;
53289
+ }
53290
+ }
53291
+ return i3;
53292
+ }
53293
+ }(e3, t3) || function(e4, t4) {
53294
+ if (e4) {
53295
+ if ("string" == typeof e4)
53296
+ return C(e4, t4);
53297
+ var a3 = Object.prototype.toString.call(e4).slice(8, -1);
53298
+ if ("Object" === a3 && e4.constructor && (a3 = e4.constructor.name), "Map" === a3 || "Set" === a3)
53299
+ return Array.from(a3);
53300
+ if ("Arguments" === a3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a3))
53301
+ return C(e4, t4);
53302
+ }
53303
+ }(e3, t3) || function() {
53304
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
53305
+ }();
53306
+ }
53307
+ var H = _2(h()), M = function() {
53308
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e3) {
53309
+ var t3 = 16 * Math.random() | 0;
53310
+ return ("x" === e3 ? t3 : 3 & t3 | 8).toString(16);
53311
+ });
53312
+ }, U = function() {
53313
+ return ("000000" + (Math.random() * Math.pow(36, 6) << 0).toString(36)).slice(-6);
53314
+ }, B = function(e3) {
53315
+ if (e3 && void 0 !== e3.nodeName)
53316
+ return e3.muxId || (e3.muxId = U()), e3.muxId;
53317
+ var t3;
53318
+ try {
53319
+ t3 = document.querySelector(e3);
53320
+ } catch (e4) {
53321
+ }
53322
+ return t3 && !t3.muxId && (t3.muxId = e3), (null == t3 ? void 0 : t3.muxId) || e3;
53323
+ }, F = function(e3) {
53324
+ var t3;
53325
+ e3 && void 0 !== e3.nodeName ? e3 = B(t3 = e3) : t3 = document.querySelector(e3);
53326
+ var a3 = t3 && t3.nodeName ? t3.nodeName.toLowerCase() : "";
53327
+ return [t3, e3, a3];
53328
+ }, W = _2(y()), V = W.default.methodFactory;
53329
+ W.default.methodFactory = function(e3, t3, a3) {
53330
+ var r2 = V(e3, t3, a3);
53331
+ return function() {
53332
+ for (var e4 = ["[mux]"], t4 = 0; t4 < arguments.length; t4++)
53333
+ e4.push(arguments[t4]);
53334
+ r2.apply(void 0, e4);
53335
+ };
53336
+ }, W.default.setLevel(W.default.getLevel());
53337
+ var G = W.default, Q = _2(h());
53338
+ function J() {
53339
+ return "1" === (Q.default.doNotTrack || Q.default.navigator && Q.default.navigator.doNotTrack);
53340
+ }
53341
+ var z = _2(h()), K = { now: function() {
53342
+ var e3 = z.default.performance, t3 = e3 && e3.timing, a3 = t3 && t3.navigationStart, r2 = "number" == typeof a3 && "function" == typeof e3.now ? a3 + e3.now() : Date.now();
53343
+ return Math.round(r2);
53344
+ } };
53345
+ function Y(e3) {
53346
+ if (void 0 === e3)
53347
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
53348
+ return e3;
53349
+ }
53350
+ function X(e3, t3) {
53351
+ if (!g(e3, t3))
53352
+ throw new TypeError("Cannot call a class as a function");
53353
+ }
53354
+ function $2(e3, t3) {
53355
+ for (var a3 = 0; a3 < t3.length; a3++) {
53356
+ var r2 = t3[a3];
53357
+ r2.enumerable = r2.enumerable || false, r2.configurable = true, "value" in r2 && (r2.writable = true), Object.defineProperty(e3, r2.key, r2);
53358
+ }
53359
+ }
53360
+ function Z(e3, t3, a3) {
53361
+ return t3 && $2(e3.prototype, t3), a3 && $2(e3, a3), e3;
53362
+ }
53363
+ function ee(e3, t3, a3) {
53364
+ return t3 in e3 ? Object.defineProperty(e3, t3, { value: a3, enumerable: true, configurable: true, writable: true }) : e3[t3] = a3, e3;
53365
+ }
53366
+ function te(e3, t3) {
53367
+ return (te = Object.setPrototypeOf || function(e4, t4) {
53368
+ return e4.__proto__ = t4, e4;
53369
+ })(e3, t3);
53370
+ }
53371
+ function ae(e3) {
53372
+ return (ae = Object.setPrototypeOf ? Object.getPrototypeOf : function(e4) {
53373
+ return e4.__proto__ || Object.getPrototypeOf(e4);
53374
+ })(e3);
53375
+ }
53376
+ function re(e3, t3) {
53377
+ return !t3 || "object" !== v(t3) && "function" != typeof t3 ? Y(e3) : t3;
53378
+ }
53379
+ function ne(e3) {
53380
+ var t3 = function() {
53381
+ if ("undefined" == typeof Reflect || !Reflect.construct || Reflect.construct.sham)
53382
+ return false;
53383
+ if ("function" == typeof Proxy)
53384
+ return true;
53385
+ try {
53386
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
53387
+ })), true;
53388
+ } catch (e4) {
53389
+ return false;
53390
+ }
53391
+ }();
53392
+ return function() {
53393
+ var a3, r2 = ae(e3);
53394
+ if (t3) {
53395
+ var n2 = ae(this).constructor;
53396
+ a3 = Reflect.construct(r2, arguments, n2);
53397
+ } else
53398
+ a3 = r2.apply(this, arguments);
53399
+ return re(this, a3);
53400
+ };
53401
+ }
53402
+ b(), m();
53403
+ var ie = function(e3) {
53404
+ return oe(e3)[0];
53405
+ }, oe = function(e3) {
53406
+ if ("string" != typeof e3 || "" === e3)
53407
+ return ["localhost"];
53408
+ var t3, a3 = (e3.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/) || [])[4];
53409
+ return a3 && (t3 = (a3.match(/[^\.]+\.[^\.]+$/) || [])[0]), [a3, t3];
53410
+ }, se = _2(h()), ue = { exists: function() {
53411
+ var e3 = se.default.performance;
53412
+ return void 0 !== (e3 && e3.timing);
53413
+ }, domContentLoadedEventEnd: function() {
53414
+ var e3 = se.default.performance, t3 = e3 && e3.timing;
53415
+ return t3 && t3.domContentLoadedEventEnd;
53416
+ }, navigationStart: function() {
53417
+ var e3 = se.default.performance, t3 = e3 && e3.timing;
53418
+ return t3 && t3.navigationStart;
53419
+ } };
53420
+ function de(e3, t3, a3) {
53421
+ a3 = void 0 === a3 ? 1 : a3, e3[t3] = e3[t3] || 0, e3[t3] += a3;
53422
+ }
53423
+ function le(e3) {
53424
+ for (var t3 = 1; t3 < arguments.length; t3++) {
53425
+ var a3 = null != arguments[t3] ? arguments[t3] : {}, r2 = Object.keys(a3);
53426
+ "function" == typeof Object.getOwnPropertySymbols && (r2 = r2.concat(Object.getOwnPropertySymbols(a3).filter(function(e4) {
53427
+ return Object.getOwnPropertyDescriptor(a3, e4).enumerable;
53428
+ }))), r2.forEach(function(t4) {
53429
+ ee(e3, t4, a3[t4]);
53430
+ });
53431
+ }
53432
+ return e3;
53433
+ }
53434
+ function ce(e3, t3) {
53435
+ return t3 = null != t3 ? t3 : {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(e3, Object.getOwnPropertyDescriptors(t3)) : function(e4, t4) {
53436
+ var a3 = Object.keys(e4);
53437
+ if (Object.getOwnPropertySymbols) {
53438
+ var r2 = Object.getOwnPropertySymbols(e4);
53439
+ t4 && (r2 = r2.filter(function(t5) {
53440
+ return Object.getOwnPropertyDescriptor(e4, t5).enumerable;
53441
+ })), a3.push.apply(a3, r2);
53442
+ }
53443
+ return a3;
53444
+ }(Object(t3)).forEach(function(a3) {
53445
+ Object.defineProperty(e3, a3, Object.getOwnPropertyDescriptor(t3, a3));
53446
+ }), e3;
53447
+ }
53448
+ var pe = ["x-request-id", "cf-ray", "x-amz-cf-id", "x-akamai-request-id"], fe = ["x-cdn", "content-type"].concat(pe);
53449
+ function _e(e3) {
53450
+ var t3 = {};
53451
+ return (e3 = e3 || "").trim().split(/[\r\n]+/).forEach(function(e4) {
53452
+ if (e4) {
53453
+ var a3 = e4.split(": "), r2 = a3.shift();
53454
+ r2 && (fe.indexOf(r2.toLowerCase()) >= 0 || 0 === r2.toLowerCase().indexOf("x-litix-")) && (t3[r2] = a3.join(": "));
53455
+ }
53456
+ }), t3;
53457
+ }
53458
+ function he(e3) {
53459
+ if (e3) {
53460
+ var t3 = pe.find(function(t4) {
53461
+ return void 0 !== e3[t4];
53462
+ });
53463
+ return t3 ? e3[t3] : void 0;
53464
+ }
53465
+ }
53466
+ var ve = function(e3) {
53467
+ var t3 = {};
53468
+ for (var a3 in e3) {
53469
+ var r2 = e3[a3];
53470
+ if (-1 !== r2["DATA-ID"].search("io.litix.data."))
53471
+ t3[r2["DATA-ID"].replace("io.litix.data.", "")] = r2.VALUE;
53472
+ }
53473
+ return t3;
53474
+ }, me = function(e3) {
53475
+ if (!e3)
53476
+ return {};
53477
+ var t3 = ue.navigationStart(), a3 = e3.loading, r2 = a3 ? a3.start : e3.trequest, n2 = a3 ? a3.first : e3.tfirst, i3 = a3 ? a3.end : e3.tload;
53478
+ return { bytesLoaded: e3.total, requestStart: Math.round(t3 + r2), responseStart: Math.round(t3 + n2), responseEnd: Math.round(t3 + i3) };
53479
+ }, ye = function(e3) {
53480
+ if (e3 && "function" == typeof e3.getAllResponseHeaders)
53481
+ return _e(e3.getAllResponseHeaders());
53482
+ }, ge = function(e3, t3) {
53483
+ if (!e3 || !e3.requestEndDate)
53484
+ return {};
53485
+ var a3, r2 = ie(e3.url), n2 = e3.url, i3 = e3.bytesLoaded, o2 = new Date(e3.requestStartDate).getTime(), s2 = new Date(e3.firstByteDate).getTime(), u2 = new Date(e3.requestEndDate).getTime(), d2 = isNaN(e3.duration) ? 0 : e3.duration, l2 = "function" == typeof t3.getMetricsFor ? t3.getMetricsFor(e3.mediaType).HttpList : t3.getDashMetrics().getHttpRequests(e3.mediaType);
53486
+ return l2.length > 0 && (a3 = _e(l2[l2.length - 1]._responseHeaders || "")), { requestStart: o2, requestResponseStart: s2, requestResponseEnd: u2, requestBytesLoaded: i3, requestResponseHeaders: a3, requestMediaDuration: d2, requestHostname: r2, requestUrl: n2, requestId: a3 ? he(a3) : void 0 };
53487
+ }, be = function(e3, t3) {
53488
+ var a3 = t3.getQualityFor(e3), r2 = t3.getCurrentTrackFor(e3).bitrateList;
53489
+ return r2 ? { currentLevel: a3, renditionWidth: r2[a3].width || null, renditionHeight: r2[a3].height || null, renditionBitrate: r2[a3].bandwidth } : {};
53490
+ }, we = function(e3) {
53491
+ var t3;
53492
+ return null === (t3 = e3.match(/.*codecs\*?="(.*)"/)) || void 0 === t3 ? void 0 : t3[1];
53493
+ }, Te = function(e3) {
53494
+ try {
53495
+ var t3, a3;
53496
+ return null === (a3 = e3.getVersion) || void 0 === a3 || null === (t3 = a3.call(e3)) || void 0 === t3 ? void 0 : t3.split(".").map(function(e4) {
53497
+ return parseInt(e4);
53498
+ })[0];
53499
+ } catch (e4) {
53500
+ return false;
53501
+ }
53502
+ }, xe = 0, ke = function() {
53503
+ function e3() {
53504
+ X(this, e3), ee(this, "_listeners", void 0);
53505
+ }
53506
+ return Z(e3, [{ key: "on", value: function(e4, t3, a3) {
53507
+ return t3._eventEmitterGuid = t3._eventEmitterGuid || ++xe, this._listeners = this._listeners || {}, this._listeners[e4] = this._listeners[e4] || [], a3 && (t3 = t3.bind(a3)), this._listeners[e4].push(t3), t3;
53508
+ } }, { key: "off", value: function(e4, t3) {
53509
+ var a3 = this._listeners && this._listeners[e4];
53510
+ a3 && a3.forEach(function(e5, r2) {
53511
+ e5._eventEmitterGuid === t3._eventEmitterGuid && a3.splice(r2, 1);
53512
+ });
53513
+ } }, { key: "one", value: function(e4, t3, a3) {
53514
+ var r2 = this;
53515
+ t3._eventEmitterGuid = t3._eventEmitterGuid || ++xe;
53516
+ var n2 = function() {
53517
+ r2.off(e4, n2), t3.apply(a3 || this, arguments);
53518
+ };
53519
+ n2._eventEmitterGuid = t3._eventEmitterGuid, this.on(e4, n2);
53520
+ } }, { key: "emit", value: function(e4, t3) {
53521
+ var a3 = this;
53522
+ if (this._listeners) {
53523
+ t3 = t3 || {};
53524
+ var r2 = this._listeners["before*"] || [], n2 = this._listeners[e4] || [], i3 = this._listeners["after" + e4] || [], o2 = function(t4, r3) {
53525
+ (t4 = t4.slice()).forEach(function(t5) {
53526
+ t5.call(a3, { type: e4 }, r3);
53527
+ });
53528
+ };
53529
+ o2(r2, t3), o2(n2, t3), o2(i3, t3);
53530
+ }
53531
+ } }]), e3;
53532
+ }(), Ee = ke, De = _2(h()), qe = function() {
53533
+ function e3(t3) {
53534
+ var a3 = this;
53535
+ X(this, e3), ee(this, "_playbackHeartbeatInterval", void 0), ee(this, "_playheadShouldBeProgressing", void 0), ee(this, "pm", void 0), this.pm = t3, this._playbackHeartbeatInterval = null, this._playheadShouldBeProgressing = false, t3.on("playing", function() {
53536
+ a3._playheadShouldBeProgressing = true;
53537
+ }), t3.on("play", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("playing", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("adbreakstart", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("adplay", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("adplaying", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("devicewake", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("viewstart", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("rebufferstart", this._startPlaybackHeartbeatInterval.bind(this)), t3.on("pause", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("ended", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("viewend", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("error", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("aderror", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("adpause", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("adended", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("adbreakend", this._stopPlaybackHeartbeatInterval.bind(this)), t3.on("seeked", function() {
53538
+ t3.data.player_is_paused ? a3._stopPlaybackHeartbeatInterval() : a3._startPlaybackHeartbeatInterval();
53539
+ }), t3.on("timeupdate", function() {
53540
+ null !== a3._playbackHeartbeatInterval && t3.emit("playbackheartbeat");
53541
+ }), t3.on("devicesleep", function(e4, r2) {
53542
+ null !== a3._playbackHeartbeatInterval && (De.default.clearInterval(a3._playbackHeartbeatInterval), t3.emit("playbackheartbeatend", { viewer_time: r2.viewer_time }), a3._playbackHeartbeatInterval = null);
53543
+ });
53544
+ }
53545
+ return Z(e3, [{ key: "_startPlaybackHeartbeatInterval", value: function() {
53546
+ var e4 = this;
53547
+ null === this._playbackHeartbeatInterval && (this.pm.emit("playbackheartbeat"), this._playbackHeartbeatInterval = De.default.setInterval(function() {
53548
+ e4.pm.emit("playbackheartbeat");
53549
+ }, this.pm.playbackHeartbeatTime));
53550
+ } }, { key: "_stopPlaybackHeartbeatInterval", value: function() {
53551
+ this._playheadShouldBeProgressing = false, null !== this._playbackHeartbeatInterval && (De.default.clearInterval(this._playbackHeartbeatInterval), this.pm.emit("playbackheartbeatend"), this._playbackHeartbeatInterval = null);
53552
+ } }]), e3;
53553
+ }(), Se = function e3(t3) {
53554
+ var a3 = this;
53555
+ X(this, e3), ee(this, "viewErrored", void 0), t3.on("viewinit", function() {
53556
+ a3.viewErrored = false;
53557
+ }), t3.on("error", function(e4, r2) {
53558
+ try {
53559
+ var n2 = t3.errorTranslator({ player_error_code: r2.player_error_code, player_error_message: r2.player_error_message, player_error_context: r2.player_error_context, player_error_severity: r2.player_error_severity, player_error_business_exception: r2.player_error_business_exception });
53560
+ n2 && (t3.data.player_error_code = n2.player_error_code || r2.player_error_code, t3.data.player_error_message = n2.player_error_message || r2.player_error_message, t3.data.player_error_context = n2.player_error_context || r2.player_error_context, t3.data.player_error_severity = n2.player_error_severity || r2.player_error_severity, t3.data.player_error_business_exception = n2.player_error_business_exception || r2.player_error_business_exception, a3.viewErrored = true);
53561
+ } catch (e5) {
53562
+ t3.mux.log.warn("Exception in error translator callback.", e5), a3.viewErrored = true;
53563
+ }
53564
+ }), t3.on("aftererror", function() {
53565
+ var e4, a4, r2, n2, i3;
53566
+ null === (e4 = t3.data) || void 0 === e4 || delete e4.player_error_code, null === (a4 = t3.data) || void 0 === a4 || delete a4.player_error_message, null === (r2 = t3.data) || void 0 === r2 || delete r2.player_error_context, null === (n2 = t3.data) || void 0 === n2 || delete n2.player_error_severity, null === (i3 = t3.data) || void 0 === i3 || delete i3.player_error_business_exception;
53567
+ });
53568
+ }, Ae = function() {
53569
+ function e3(t3) {
53570
+ X(this, e3), ee(this, "_watchTimeTrackerLastCheckedTime", void 0), ee(this, "pm", void 0), this.pm = t3, this._watchTimeTrackerLastCheckedTime = null, t3.on("playbackheartbeat", this._updateWatchTime.bind(this)), t3.on("playbackheartbeatend", this._clearWatchTimeState.bind(this));
53571
+ }
53572
+ return Z(e3, [{ key: "_updateWatchTime", value: function(e4, t3) {
53573
+ var a3 = t3.viewer_time;
53574
+ null === this._watchTimeTrackerLastCheckedTime && (this._watchTimeTrackerLastCheckedTime = a3), de(this.pm.data, "view_watch_time", a3 - this._watchTimeTrackerLastCheckedTime), this._watchTimeTrackerLastCheckedTime = a3;
53575
+ } }, { key: "_clearWatchTimeState", value: function(e4, t3) {
53576
+ this._updateWatchTime(e4, t3), this._watchTimeTrackerLastCheckedTime = null;
53577
+ } }]), e3;
53578
+ }(), Oe = function() {
53579
+ function e3(t3) {
53580
+ var a3 = this;
53581
+ X(this, e3), ee(this, "_playbackTimeTrackerLastPlayheadPosition", void 0), ee(this, "_lastTime", void 0), ee(this, "_isAdPlaying", void 0), ee(this, "_callbackUpdatePlaybackTime", void 0), ee(this, "pm", void 0), this.pm = t3, this._playbackTimeTrackerLastPlayheadPosition = -1, this._lastTime = K.now(), this._isAdPlaying = false, this._callbackUpdatePlaybackTime = null;
53582
+ var r2 = this._startPlaybackTimeTracking.bind(this);
53583
+ t3.on("playing", r2), t3.on("adplaying", r2), t3.on("seeked", r2);
53584
+ var n2 = this._stopPlaybackTimeTracking.bind(this);
53585
+ t3.on("playbackheartbeatend", n2), t3.on("seeking", n2), t3.on("adplaying", function() {
53586
+ a3._isAdPlaying = true;
53587
+ }), t3.on("adended", function() {
53588
+ a3._isAdPlaying = false;
53589
+ }), t3.on("adpause", function() {
53590
+ a3._isAdPlaying = false;
53591
+ }), t3.on("adbreakstart", function() {
53592
+ a3._isAdPlaying = false;
53593
+ }), t3.on("adbreakend", function() {
53594
+ a3._isAdPlaying = false;
53595
+ }), t3.on("adplay", function() {
53596
+ a3._isAdPlaying = false;
53597
+ }), t3.on("viewinit", function() {
53598
+ a3._playbackTimeTrackerLastPlayheadPosition = -1, a3._lastTime = K.now(), a3._isAdPlaying = false, a3._callbackUpdatePlaybackTime = null;
53599
+ });
53600
+ }
53601
+ return Z(e3, [{ key: "_startPlaybackTimeTracking", value: function() {
53602
+ null === this._callbackUpdatePlaybackTime && (this._callbackUpdatePlaybackTime = this._updatePlaybackTime.bind(this), this._playbackTimeTrackerLastPlayheadPosition = this.pm.data.player_playhead_time, this.pm.on("playbackheartbeat", this._callbackUpdatePlaybackTime));
53603
+ } }, { key: "_stopPlaybackTimeTracking", value: function() {
53604
+ this._callbackUpdatePlaybackTime && (this._updatePlaybackTime(), this.pm.off("playbackheartbeat", this._callbackUpdatePlaybackTime), this._callbackUpdatePlaybackTime = null, this._playbackTimeTrackerLastPlayheadPosition = -1);
53605
+ } }, { key: "_updatePlaybackTime", value: function() {
53606
+ var e4 = this.pm.data.player_playhead_time, t3 = K.now(), a3 = -1;
53607
+ this._playbackTimeTrackerLastPlayheadPosition >= 0 && e4 > this._playbackTimeTrackerLastPlayheadPosition ? a3 = e4 - this._playbackTimeTrackerLastPlayheadPosition : this._isAdPlaying && (a3 = t3 - this._lastTime), a3 > 0 && a3 <= 1e3 && de(this.pm.data, "view_content_playback_time", a3), this._playbackTimeTrackerLastPlayheadPosition = e4, this._lastTime = t3;
53608
+ } }]), e3;
53609
+ }(), Re = function() {
53610
+ function e3(t3) {
53611
+ X(this, e3), ee(this, "pm", void 0), this.pm = t3;
53612
+ var a3 = this._updatePlayheadTime.bind(this);
53613
+ t3.on("playbackheartbeat", a3), t3.on("playbackheartbeatend", a3), t3.on("timeupdate", a3), t3.on("destroy", function() {
53614
+ t3.off("timeupdate", a3);
53615
+ });
53616
+ }
53617
+ return Z(e3, [{ key: "_updateMaxPlayheadPosition", value: function() {
53618
+ this.pm.data.view_max_playhead_position = void 0 === this.pm.data.view_max_playhead_position ? this.pm.data.player_playhead_time : Math.max(this.pm.data.view_max_playhead_position, this.pm.data.player_playhead_time);
53619
+ } }, { key: "_updatePlayheadTime", value: function(e4, t3) {
53620
+ var a3 = this, r2 = function() {
53621
+ a3.pm.currentFragmentPDT && a3.pm.currentFragmentStart && (a3.pm.data.player_program_time = a3.pm.currentFragmentPDT + a3.pm.data.player_playhead_time - a3.pm.currentFragmentStart);
53622
+ };
53623
+ if (t3 && t3.player_playhead_time)
53624
+ this.pm.data.player_playhead_time = t3.player_playhead_time, r2(), this._updateMaxPlayheadPosition();
53625
+ else if (this.pm.getPlayheadTime) {
53626
+ var n2 = this.pm.getPlayheadTime();
53627
+ void 0 !== n2 && (this.pm.data.player_playhead_time = n2, r2(), this._updateMaxPlayheadPosition());
53628
+ }
53629
+ } }]), e3;
53630
+ }(), Pe = 3e5, Ne = function e3(t3) {
53631
+ if (X(this, e3), !t3.disableRebufferTracking) {
53632
+ var a3, r2 = function(e4, t4) {
53633
+ n2(t4), a3 = void 0;
53634
+ }, n2 = function(e4) {
53635
+ if (a3) {
53636
+ var r3 = e4.viewer_time - a3;
53637
+ de(t3.data, "view_rebuffer_duration", r3), a3 = e4.viewer_time, t3.data.view_rebuffer_duration > Pe && (t3.emit("viewend"), t3.send("viewend"), t3.mux.log.warn("Ending view after rebuffering for longer than ".concat(Pe, "ms, future events will be ignored unless a programchange or videochange occurs.")));
53638
+ }
53639
+ t3.data.view_watch_time >= 0 && t3.data.view_rebuffer_count > 0 && (t3.data.view_rebuffer_frequency = t3.data.view_rebuffer_count / t3.data.view_watch_time, t3.data.view_rebuffer_percentage = t3.data.view_rebuffer_duration / t3.data.view_watch_time);
53640
+ };
53641
+ t3.on("playbackheartbeat", function(e4, t4) {
53642
+ return n2(t4);
53643
+ }), t3.on("rebufferstart", function(e4, n3) {
53644
+ a3 || (de(t3.data, "view_rebuffer_count", 1), a3 = n3.viewer_time, t3.one("rebufferend", r2));
53645
+ }), t3.on("viewinit", function() {
53646
+ a3 = void 0, t3.off("rebufferend", r2);
53647
+ });
53648
+ }
53649
+ }, Ie = function() {
53650
+ function e3(t3) {
53651
+ var a3 = this;
53652
+ X(this, e3), ee(this, "_lastCheckedTime", void 0), ee(this, "_lastPlayheadTime", void 0), ee(this, "_lastPlayheadTimeUpdatedTime", void 0), ee(this, "_rebuffering", void 0), ee(this, "pm", void 0), this.pm = t3, !t3.disableRebufferTracking && !t3.disablePlayheadRebufferTracking && (this._lastCheckedTime = null, this._lastPlayheadTime = null, this._lastPlayheadTimeUpdatedTime = null, t3.on("playbackheartbeat", this._checkIfRebuffering.bind(this)), t3.on("playbackheartbeatend", this._cleanupRebufferTracker.bind(this)), t3.on("seeking", function() {
53653
+ a3._cleanupRebufferTracker(null, { viewer_time: K.now() });
53654
+ }));
53655
+ }
53656
+ return Z(e3, [{ key: "_checkIfRebuffering", value: function(e4, t3) {
53657
+ if (this.pm.seekingTracker.isSeeking || this.pm.adTracker.isAdBreak || !this.pm.playbackHeartbeat._playheadShouldBeProgressing)
53658
+ this._cleanupRebufferTracker(e4, t3);
53659
+ else if (null !== this._lastCheckedTime)
53660
+ if (this._lastPlayheadTime === this.pm.data.player_playhead_time) {
53661
+ var a3 = t3.viewer_time - this._lastPlayheadTimeUpdatedTime;
53662
+ "number" == typeof this.pm.sustainedRebufferThreshold && a3 >= this.pm.sustainedRebufferThreshold && (this._rebuffering || (this._rebuffering = true, this.pm.emit("rebufferstart", { viewer_time: this._lastPlayheadTimeUpdatedTime }))), this._lastCheckedTime = t3.viewer_time;
53663
+ } else
53664
+ this._cleanupRebufferTracker(e4, t3, true);
53665
+ else
53666
+ this._prepareRebufferTrackerState(t3.viewer_time);
53667
+ } }, { key: "_clearRebufferTrackerState", value: function() {
53668
+ this._lastCheckedTime = null, this._lastPlayheadTime = null, this._lastPlayheadTimeUpdatedTime = null;
53669
+ } }, { key: "_prepareRebufferTrackerState", value: function(e4) {
53670
+ this._lastCheckedTime = e4, this._lastPlayheadTime = this.pm.data.player_playhead_time, this._lastPlayheadTimeUpdatedTime = e4;
53671
+ } }, { key: "_cleanupRebufferTracker", value: function(e4, t3) {
53672
+ var a3 = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
53673
+ if (this._rebuffering)
53674
+ this._rebuffering = false, this.pm.emit("rebufferend", { viewer_time: t3.viewer_time });
53675
+ else {
53676
+ if (null === this._lastCheckedTime)
53677
+ return;
53678
+ var r2 = this.pm.data.player_playhead_time - this._lastPlayheadTime, n2 = t3.viewer_time - this._lastPlayheadTimeUpdatedTime;
53679
+ "number" == typeof this.pm.minimumRebufferDuration && r2 > 0 && n2 - r2 > this.pm.minimumRebufferDuration && (this._lastCheckedTime = null, this.pm.emit("rebufferstart", { viewer_time: this._lastPlayheadTimeUpdatedTime }), this.pm.emit("rebufferend", { viewer_time: this._lastPlayheadTimeUpdatedTime + n2 - r2 }));
53680
+ }
53681
+ a3 ? this._prepareRebufferTrackerState(t3.viewer_time) : this._clearRebufferTrackerState();
53682
+ } }]), e3;
53683
+ }(), Le = Ie, Ce = function() {
53684
+ function e3(t3) {
53685
+ var a3 = this;
53686
+ X(this, e3), ee(this, "NAVIGATION_START", void 0), ee(this, "pm", void 0), this.pm = t3, t3.on("viewinit", function() {
53687
+ var e4 = t3.data, r2 = e4.view_id;
53688
+ if (!e4.view_program_changed) {
53689
+ var n2 = function(e5, n3) {
53690
+ var i3 = n3.viewer_time;
53691
+ ("playing" === e5.type && void 0 === t3.data.view_time_to_first_frame || "adplaying" === e5.type && (void 0 === t3.data.view_time_to_first_frame || a3._inPrerollPosition())) && a3.calculateTimeToFirstFrame(i3 || K.now(), r2);
53692
+ };
53693
+ t3.one("playing", n2), t3.one("adplaying", n2), t3.one("viewend", function() {
53694
+ t3.off("playing", n2), t3.off("adplaying", n2);
53695
+ });
53696
+ }
53697
+ });
53698
+ }
53699
+ return Z(e3, [{ key: "_inPrerollPosition", value: function() {
53700
+ return void 0 === this.pm.data.view_content_playback_time || this.pm.data.view_content_playback_time <= 1e3;
53701
+ } }, { key: "calculateTimeToFirstFrame", value: function(e4, t3) {
53702
+ t3 === this.pm.data.view_id && (this.pm.watchTimeTracker._updateWatchTime(null, { viewer_time: e4 }), this.pm.data.view_time_to_first_frame = this.pm.data.view_watch_time, (this.pm.data.player_autoplay_on || this.pm.data.video_is_autoplay) && this.NAVIGATION_START && (this.pm.data.view_aggregate_startup_time = this.pm.data.view_start + this.pm.data.view_watch_time - this.NAVIGATION_START));
53703
+ } }]), e3;
53704
+ }(), je = function e3(t3) {
53705
+ var a3 = this;
53706
+ X(this, e3), ee(this, "_lastPlayerHeight", void 0), ee(this, "_lastPlayerWidth", void 0), ee(this, "_lastPlayheadPosition", void 0), ee(this, "_lastSourceHeight", void 0), ee(this, "_lastSourceWidth", void 0), t3.on("viewinit", function() {
53707
+ a3._lastPlayheadPosition = -1;
53708
+ });
53709
+ ["pause", "rebufferstart", "seeking", "error", "adbreakstart", "hb"].forEach(function(e4) {
53710
+ t3.on(e4, function() {
53711
+ if (a3._lastPlayheadPosition >= 0 && t3.data.player_playhead_time >= 0 && a3._lastPlayerWidth >= 0 && a3._lastSourceWidth > 0 && a3._lastPlayerHeight >= 0 && a3._lastSourceHeight > 0) {
53712
+ var e5 = t3.data.player_playhead_time - a3._lastPlayheadPosition;
53713
+ if (e5 < 0)
53714
+ return void (a3._lastPlayheadPosition = -1);
53715
+ var r2 = Math.min(a3._lastPlayerWidth / a3._lastSourceWidth, a3._lastPlayerHeight / a3._lastSourceHeight), n2 = Math.max(0, r2 - 1), i3 = Math.max(0, 1 - r2);
53716
+ t3.data.view_max_upscale_percentage = Math.max(t3.data.view_max_upscale_percentage || 0, n2), t3.data.view_max_downscale_percentage = Math.max(t3.data.view_max_downscale_percentage || 0, i3), de(t3.data, "view_total_content_playback_time", e5), de(t3.data, "view_total_upscaling", n2 * e5), de(t3.data, "view_total_downscaling", i3 * e5);
53717
+ }
53718
+ a3._lastPlayheadPosition = -1;
53719
+ });
53720
+ }), ["playing", "hb"].forEach(function(e4) {
53721
+ t3.on(e4, function() {
53722
+ a3._lastPlayheadPosition = t3.data.player_playhead_time, a3._lastPlayerWidth = t3.data.player_width, a3._lastPlayerHeight = t3.data.player_height, a3._lastSourceWidth = t3.data.video_source_width, a3._lastSourceHeight = t3.data.video_source_height;
53723
+ });
53724
+ });
53725
+ }, He = function e3(t3) {
53726
+ var a3 = this;
53727
+ X(this, e3), ee(this, "isSeeking", void 0), this.isSeeking = false;
53728
+ var r2 = -1, n2 = function() {
53729
+ var e4 = K.now(), n3 = (t3.data.viewer_time || e4) - (r2 || e4);
53730
+ de(t3.data, "view_seek_duration", n3), t3.data.view_max_seek_time = Math.max(t3.data.view_max_seek_time || 0, n3), a3.isSeeking = false, r2 = -1;
53731
+ };
53732
+ t3.on("seeking", function(e4, i3) {
53733
+ Object.assign(t3.data, i3), a3.isSeeking && i3.viewer_time - r2 <= 2e3 ? r2 = i3.viewer_time : (a3.isSeeking && n2(), a3.isSeeking = true, r2 = i3.viewer_time, de(t3.data, "view_seek_count", 1), t3.send("seeking"));
53734
+ }), t3.on("seeked", function() {
53735
+ n2();
53736
+ }), t3.on("viewend", function() {
53737
+ a3.isSeeking && (n2(), t3.send("seeked")), a3.isSeeking = false, r2 = -1;
53738
+ });
53739
+ }, Me = function(e3, t3) {
53740
+ e3.push(t3), e3.sort(function(e4, t4) {
53741
+ return e4.viewer_time - t4.viewer_time;
53742
+ });
53743
+ }, Ue = ["adbreakstart", "adrequest", "adresponse", "adplay", "adplaying", "adpause", "adended", "adbreakend", "aderror", "adclicked", "adskipped"], Be = function() {
53744
+ function e3(t3) {
53745
+ var a3 = this;
53746
+ X(this, e3), ee(this, "_adHasPlayed", void 0), ee(this, "_adRequests", void 0), ee(this, "_adResponses", void 0), ee(this, "_currentAdRequestNumber", void 0), ee(this, "_currentAdResponseNumber", void 0), ee(this, "_prerollPlayTime", void 0), ee(this, "_wouldBeNewAdPlay", void 0), ee(this, "isAdBreak", void 0), ee(this, "pm", void 0), this.pm = t3, t3.on("viewinit", function() {
53747
+ a3.isAdBreak = false, a3._currentAdRequestNumber = 0, a3._currentAdResponseNumber = 0, a3._adRequests = [], a3._adResponses = [], a3._adHasPlayed = false, a3._wouldBeNewAdPlay = true, a3._prerollPlayTime = void 0;
53748
+ }), Ue.forEach(function(e4) {
53749
+ return t3.on(e4, a3._updateAdData.bind(a3));
53750
+ });
53751
+ var r2 = function() {
53752
+ a3.isAdBreak = false;
53753
+ };
53754
+ t3.on("adbreakstart", function() {
53755
+ a3.isAdBreak = true;
53756
+ }), t3.on("play", r2), t3.on("playing", r2), t3.on("viewend", r2), t3.on("adrequest", function(e4, r3) {
53757
+ r3 = Object.assign({ ad_request_id: "generatedAdRequestId" + a3._currentAdRequestNumber++ }, r3), Me(a3._adRequests, r3), de(t3.data, "view_ad_request_count"), a3.inPrerollPosition() && (t3.data.view_preroll_requested = true, a3._adHasPlayed || de(t3.data, "view_preroll_request_count"));
53758
+ }), t3.on("adresponse", function(e4, r3) {
53759
+ r3 = Object.assign({ ad_request_id: "generatedAdRequestId" + a3._currentAdResponseNumber++ }, r3), Me(a3._adResponses, r3);
53760
+ var n2 = a3.findAdRequest(r3.ad_request_id);
53761
+ n2 && de(t3.data, "view_ad_request_time", Math.max(0, r3.viewer_time - n2.viewer_time));
53762
+ }), t3.on("adplay", function(e4, r3) {
53763
+ a3._adHasPlayed = true, a3._wouldBeNewAdPlay && (a3._wouldBeNewAdPlay = false, de(t3.data, "view_ad_played_count")), a3.inPrerollPosition() && !t3.data.view_preroll_played && (t3.data.view_preroll_played = true, a3._adRequests.length > 0 && (t3.data.view_preroll_request_time = Math.max(0, r3.viewer_time - a3._adRequests[0].viewer_time)), t3.data.view_start && (t3.data.view_startup_preroll_request_time = Math.max(0, r3.viewer_time - t3.data.view_start)), a3._prerollPlayTime = r3.viewer_time);
53764
+ }), t3.on("adplaying", function(e4, r3) {
53765
+ a3.inPrerollPosition() && void 0 === t3.data.view_preroll_load_time && void 0 !== a3._prerollPlayTime && (t3.data.view_preroll_load_time = r3.viewer_time - a3._prerollPlayTime, t3.data.view_startup_preroll_load_time = r3.viewer_time - a3._prerollPlayTime);
53766
+ }), t3.on("adclicked", function(e4, r3) {
53767
+ a3._wouldBeNewAdPlay || de(t3.data, "view_ad_clicked_count");
53768
+ }), t3.on("adskipped", function(e4, r3) {
53769
+ a3._wouldBeNewAdPlay || de(t3.data, "view_ad_skipped_count");
53770
+ }), t3.on("adended", function() {
53771
+ a3._wouldBeNewAdPlay = true;
53772
+ }), t3.on("aderror", function() {
53773
+ a3._wouldBeNewAdPlay = true;
53774
+ });
53775
+ }
53776
+ return Z(e3, [{ key: "inPrerollPosition", value: function() {
53777
+ return void 0 === this.pm.data.view_content_playback_time || this.pm.data.view_content_playback_time <= 1e3;
53778
+ } }, { key: "findAdRequest", value: function(e4) {
53779
+ for (var t3 = 0; t3 < this._adRequests.length; t3++)
53780
+ if (this._adRequests[t3].ad_request_id === e4)
53781
+ return this._adRequests[t3];
53782
+ } }, { key: "_updateAdData", value: function(e4, t3) {
53783
+ if (this.inPrerollPosition()) {
53784
+ if (!this.pm.data.view_preroll_ad_tag_hostname && t3.ad_tag_url) {
53785
+ var a3 = j(oe(t3.ad_tag_url), 2), r2 = a3[0], n2 = a3[1];
53786
+ this.pm.data.view_preroll_ad_tag_domain = n2, this.pm.data.view_preroll_ad_tag_hostname = r2;
53787
+ }
53788
+ if (!this.pm.data.view_preroll_ad_asset_hostname && t3.ad_asset_url) {
53789
+ var i3 = j(oe(t3.ad_asset_url), 2), o2 = i3[0], s2 = i3[1];
53790
+ this.pm.data.view_preroll_ad_asset_domain = s2, this.pm.data.view_preroll_ad_asset_hostname = o2;
53791
+ }
53792
+ }
53793
+ this.pm.data.ad_asset_url = null == t3 ? void 0 : t3.ad_asset_url, this.pm.data.ad_tag_url = null == t3 ? void 0 : t3.ad_tag_url, this.pm.data.ad_creative_id = null == t3 ? void 0 : t3.ad_creative_id, this.pm.data.ad_id = null == t3 ? void 0 : t3.ad_id, this.pm.data.ad_universal_id = null == t3 ? void 0 : t3.ad_universal_id;
53794
+ } }]), e3;
53795
+ }(), Fe = _2(h()), We = function e3(t3) {
53796
+ X(this, e3);
53797
+ var a3, r2, n2 = function() {
53798
+ t3.disableRebufferTracking || a3 && (de(t3.data, "view_waiting_rebuffer_duration", K.now() - a3), a3 = false, Fe.default.clearInterval(r2));
53799
+ }, i3 = false, o2 = function() {
53800
+ i3 = false, n2();
53801
+ };
53802
+ t3.on("waiting", function() {
53803
+ i3 && (t3.disableRebufferTracking || (de(t3.data, "view_waiting_rebuffer_count", 1), a3 = K.now(), r2 = Fe.default.setInterval(function() {
53804
+ if (a3) {
53805
+ var e4 = K.now();
53806
+ de(t3.data, "view_waiting_rebuffer_duration", e4 - a3), a3 = e4;
53807
+ }
53808
+ }, 250)));
53809
+ }), t3.on("playing", function() {
53810
+ n2(), i3 = true;
53811
+ }), t3.on("pause", o2), t3.on("seeking", o2);
53812
+ }, Ve = function e3(t3) {
53813
+ var a3 = this;
53814
+ X(this, e3), ee(this, "lastWallClockTime", void 0);
53815
+ var r2 = function() {
53816
+ a3.lastWallClockTime = K.now(), t3.on("before*", n2);
53817
+ }, n2 = function(e4) {
53818
+ var r3 = K.now(), n3 = a3.lastWallClockTime;
53819
+ a3.lastWallClockTime = r3, r3 - n3 > 3e4 && (t3.emit("devicesleep", { viewer_time: n3 }), Object.assign(t3.data, { viewer_time: n3 }), t3.send("devicesleep"), t3.emit("devicewake", { viewer_time: r3 }), Object.assign(t3.data, { viewer_time: r3 }), t3.send("devicewake"));
53820
+ };
53821
+ t3.one("playbackheartbeat", r2), t3.on("playbackheartbeatend", function() {
53822
+ t3.off("before*", n2), t3.one("playbackheartbeat", r2);
53823
+ });
53824
+ }, Ge = _2(h()), Qe = _2(w()), Je = _2(T()), ze = "muxData", Ke = function() {
53825
+ var e3;
53826
+ try {
53827
+ e3 = Qe.default.parse(Je.default.get(ze) || "");
53828
+ } catch (t3) {
53829
+ e3 = {};
53830
+ }
53831
+ return e3;
53832
+ }, Ye = function(e3) {
53833
+ try {
53834
+ Je.default.set(ze, Qe.default.stringify(e3), { expires: 365 });
53835
+ } catch (e4) {
53836
+ }
53837
+ }, Xe = function() {
53838
+ var e3 = Ke();
53839
+ return e3.mux_viewer_id = e3.mux_viewer_id || M(), e3.msn = e3.msn || Math.random(), Ye(e3), { mux_viewer_id: e3.mux_viewer_id, mux_sample_number: e3.msn };
53840
+ };
53841
+ function $e(e3, t3) {
53842
+ var a3 = t3.beaconCollectionDomain, r2 = t3.beaconDomain;
53843
+ if (a3)
53844
+ return "https://" + a3;
53845
+ var n2 = r2 || "litix.io";
53846
+ return (e3 = e3 || "inferred").match(/^[a-z0-9]+$/) ? "https://" + e3 + "." + n2 : "https://img.litix.io/a.gif";
53847
+ }
53848
+ var Ze = _2(h()), et = function() {
53849
+ var e3;
53850
+ switch (tt()) {
53851
+ case "cellular":
53852
+ e3 = "cellular";
53853
+ break;
53854
+ case "ethernet":
53855
+ e3 = "wired";
53856
+ break;
53857
+ case "wifi":
53858
+ e3 = "wifi";
53859
+ break;
53860
+ case void 0:
53861
+ break;
53862
+ default:
53863
+ e3 = "other";
53864
+ }
53865
+ return e3;
53866
+ }, tt = function() {
53867
+ var e3 = Ze.default.navigator, t3 = e3 && (e3.connection || e3.mozConnection || e3.webkitConnection);
53868
+ return t3 && t3.type;
53869
+ };
53870
+ et.getConnectionFromAPI = tt;
53871
+ var at = et, rt = it({ a: "env", b: "beacon", c: "custom", d: "ad", e: "event", f: "experiment", i: "internal", m: "mux", n: "response", p: "player", q: "request", r: "retry", s: "session", t: "timestamp", u: "viewer", v: "video", w: "page", x: "view", y: "sub" }), nt = it({ ad: "ad", ag: "aggregate", ap: "api", al: "application", ar: "architecture", as: "asset", au: "autoplay", av: "average", bi: "bitrate", br: "break", bw: "browser", by: "bytes", bz: "business", ca: "cached", cb: "cancel", cc: "codec", cd: "code", cg: "category", ch: "changed", ck: "clicked", cl: "canceled", cn: "config", co: "count", ce: "counter", cp: "complete", cr: "creative", ct: "content", cu: "current", cx: "connection", cz: "context", dg: "downscaling", dm: "domain", dn: "cdn", do: "downscale", dr: "drm", dp: "dropped", du: "duration", dv: "device", ec: "encoding", ed: "edge", en: "end", eg: "engine", em: "embed", er: "error", ep: "experiments", es: "errorcode", et: "errortext", ee: "event", ev: "events", ex: "expires", ez: "exception", fa: "failed", fi: "first", fm: "family", ft: "format", fp: "fps", fq: "frequency", fr: "frame", fs: "fullscreen", ha: "has", hb: "holdback", he: "headers", ho: "host", hn: "hostname", ht: "height", id: "id", ii: "init", in: "instance", ip: "ip", is: "is", ke: "key", la: "language", lb: "labeled", le: "level", li: "live", ld: "loaded", lo: "load", ls: "lists", lt: "latency", ma: "max", md: "media", me: "message", mf: "manifest", mi: "mime", ml: "midroll", mm: "min", mn: "manufacturer", mo: "model", mx: "mux", ne: "newest", nm: "name", no: "number", on: "on", os: "os", pa: "paused", pb: "playback", pd: "producer", pe: "percentage", pf: "played", pg: "program", ph: "playhead", pi: "plugin", pl: "preroll", pn: "playing", po: "poster", pr: "preload", ps: "position", pt: "part", py: "property", ra: "rate", rd: "requested", re: "rebuffer", rf: "rendition", rm: "remote", ro: "ratio", rp: "response", rq: "request", rs: "requests", sa: "sample", sd: "skipped", se: "session", sk: "seek", sm: "stream", so: "source", sq: "sequence", sr: "series", st: "start", su: "startup", sv: "server", sw: "software", sy: "severity", ta: "tag", tc: "tech", te: "text", tg: "target", th: "throughput", ti: "time", tl: "total", to: "to", tt: "title", ty: "type", ug: "upscaling", un: "universal", up: "upscale", ur: "url", us: "user", va: "variant", vd: "viewed", vi: "video", ve: "version", vw: "view", vr: "viewer", wd: "width", wa: "watch", wt: "waiting" });
53872
+ function it(e3) {
53873
+ var t3 = {};
53874
+ for (var a3 in e3)
53875
+ e3.hasOwnProperty(a3) && (t3[e3[a3]] = a3);
53876
+ return t3;
53877
+ }
53878
+ function ot(e3) {
53879
+ var t3 = {}, a3 = {};
53880
+ return Object.keys(e3).forEach(function(r2) {
53881
+ var n2 = false;
53882
+ if (e3.hasOwnProperty(r2) && void 0 !== e3[r2]) {
53883
+ var i3 = r2.split("_"), o2 = i3[0], s2 = rt[o2];
53884
+ s2 || (G.info("Data key word `" + i3[0] + "` not expected in " + r2), s2 = o2 + "_"), i3.splice(1).forEach(function(e4) {
53885
+ "url" === e4 && (n2 = true), nt[e4] ? s2 += nt[e4] : Number(e4) && Math.floor(Number(e4)) === Number(e4) ? s2 += e4 : (G.info("Data key word `" + e4 + "` not expected in " + r2), s2 += "_" + e4 + "_");
53886
+ }), n2 ? a3[s2] = e3[r2] : t3[s2] = e3[r2];
53887
+ }
53888
+ }), Object.assign(t3, a3);
53889
+ }
53890
+ var st = _2(h()), ut = { maxBeaconSize: 300, maxQueueLength: 3600, baseTimeBetweenBeacons: 1e4, maxPayloadKBSize: 500 }, dt = ["hb", "requestcompleted", "requestfailed", "requestcanceled"], lt = "https://img.litix.io", ct = function(e3) {
53891
+ var t3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
53892
+ this._beaconUrl = e3 || lt, this._eventQueue = [], this._postInFlight = false, this._failureCount = 0, this._sendTimeout = false, this._options = Object.assign({}, ut, t3);
53893
+ };
53894
+ ct.prototype.queueEvent = function(e3, t3) {
53895
+ var a3 = Object.assign({}, t3);
53896
+ return (this._eventQueue.length <= this._options.maxQueueLength || "eventrateexceeded" === e3) && (this._eventQueue.push(a3), this._sendTimeout || this._startBeaconSending(), this._eventQueue.length <= this._options.maxQueueLength);
53897
+ }, ct.prototype.flushEvents = function() {
53898
+ var e3 = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
53899
+ e3 && 1 === this._eventQueue.length ? this._eventQueue.pop() : (this._eventQueue.length && this._sendBeaconQueue(), this._startBeaconSending());
53900
+ }, ct.prototype.destroy = function() {
53901
+ var e3 = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
53902
+ this.destroyed = true, e3 ? this._clearBeaconQueue() : this.flushEvents(), st.default.clearTimeout(this._sendTimeout);
53903
+ }, ct.prototype._clearBeaconQueue = function() {
53904
+ var e3 = this._eventQueue.length > this._options.maxBeaconSize ? this._eventQueue.length - this._options.maxBeaconSize : 0, t3 = this._eventQueue.slice(e3);
53905
+ e3 > 0 && Object.assign(t3[t3.length - 1], ot({ mux_view_message: "event queue truncated" }));
53906
+ var a3 = this._createPayload(t3);
53907
+ ft(this._beaconUrl, a3, true, function() {
53908
+ });
53909
+ }, ct.prototype._sendBeaconQueue = function() {
53910
+ var e3 = this;
53911
+ if (!this._postInFlight) {
53912
+ var t3 = this._eventQueue.slice(0, this._options.maxBeaconSize);
53913
+ this._eventQueue = this._eventQueue.slice(this._options.maxBeaconSize), this._postInFlight = true;
53914
+ var a3 = this._createPayload(t3), r2 = K.now();
53915
+ ft(this._beaconUrl, a3, false, function(a4, n2) {
53916
+ n2 ? (e3._eventQueue = t3.concat(e3._eventQueue), e3._failureCount += 1, G.info("Error sending beacon: " + n2)) : e3._failureCount = 0, e3._roundTripTime = K.now() - r2, e3._postInFlight = false;
53917
+ });
53918
+ }
53919
+ }, ct.prototype._getNextBeaconTime = function() {
53920
+ if (!this._failureCount)
53921
+ return this._options.baseTimeBetweenBeacons;
53922
+ var e3 = Math.pow(2, this._failureCount - 1);
53923
+ return (1 + (e3 *= Math.random())) * this._options.baseTimeBetweenBeacons;
53924
+ }, ct.prototype._startBeaconSending = function() {
53925
+ var e3 = this;
53926
+ st.default.clearTimeout(this._sendTimeout), !this.destroyed && (this._sendTimeout = st.default.setTimeout(function() {
53927
+ e3._eventQueue.length && e3._sendBeaconQueue(), e3._startBeaconSending();
53928
+ }, this._getNextBeaconTime()));
53929
+ }, ct.prototype._createPayload = function(e3) {
53930
+ var t3 = this, a3 = { transmission_timestamp: Math.round(K.now()) };
53931
+ this._roundTripTime && (a3.rtt_ms = Math.round(this._roundTripTime));
53932
+ var r2, n2, i3, o2 = function() {
53933
+ r2 = JSON.stringify({ metadata: a3, events: n2 || e3 }), i3 = r2.length / 1024;
53934
+ }, s2 = function() {
53935
+ return i3 <= t3._options.maxPayloadKBSize;
53936
+ };
53937
+ return o2(), s2() || (G.info("Payload size is too big (" + i3 + " kb). Removing unnecessary events."), n2 = e3.filter(function(e4) {
53938
+ return -1 === dt.indexOf(e4.e);
53939
+ }), o2()), s2() || (G.info("Payload size still too big (" + i3 + " kb). Cropping fields.."), n2.forEach(function(e4) {
53940
+ for (var t4 in e4) {
53941
+ var a4 = e4[t4];
53942
+ "string" == typeof a4 && a4.length > 51200 && (e4[t4] = a4.substring(0, 51200));
53943
+ }
53944
+ }), o2()), r2;
53945
+ };
53946
+ var pt = function(e3) {
53947
+ return e3.length <= 57344;
53948
+ }, ft = function(e3, t3, a3, r2) {
53949
+ if (a3 && navigator && navigator.sendBeacon && navigator.sendBeacon(e3, t3))
53950
+ r2();
53951
+ else if (st.default.fetch)
53952
+ st.default.fetch(e3, { method: "POST", body: t3, headers: { "Content-Type": "text/plain" }, keepalive: pt(t3) }).then(function(e4) {
53953
+ return r2(null, e4.ok ? null : "Error");
53954
+ }).catch(function(e4) {
53955
+ return r2(null, e4);
53956
+ });
53957
+ else {
53958
+ if (st.default.XMLHttpRequest) {
53959
+ var n2 = new st.default.XMLHttpRequest();
53960
+ return n2.onreadystatechange = function() {
53961
+ if (4 === n2.readyState)
53962
+ return r2(null, 200 !== n2.status ? "error" : void 0);
53963
+ }, n2.open("POST", e3), n2.setRequestHeader("Content-Type", "text/plain"), void n2.send(t3);
53964
+ }
53965
+ r2();
53966
+ }
53967
+ }, _t = ct, ht = ["env_key", "view_id", "view_sequence_number", "player_sequence_number", "beacon_domain", "player_playhead_time", "viewer_time", "mux_api_version", "event", "video_id", "player_instance_id", "player_error_code", "player_error_message", "player_error_context", "player_error_severity", "player_error_business_exception"], vt = ["adplay", "adplaying", "adpause", "adfirstquartile", "admidpoint", "adthirdquartile", "adended", "adresponse", "adrequest"], mt = ["ad_id", "ad_creative_id", "ad_universal_id"], yt = ["viewstart", "error", "ended", "viewend"], gt = function() {
53968
+ function e3(t3, a3) {
53969
+ var r2, n2, i3, o2, s2, u2, d2, l2, c2, p2, f2, _3, h2, v2, m2, y2 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
53970
+ X(this, e3), ee(this, "mux", void 0), ee(this, "envKey", void 0), ee(this, "options", void 0), ee(this, "eventQueue", void 0), ee(this, "sampleRate", void 0), ee(this, "disableCookies", void 0), ee(this, "respectDoNotTrack", void 0), ee(this, "previousBeaconData", void 0), ee(this, "lastEventTime", void 0), ee(this, "rateLimited", void 0), ee(this, "pageLevelData", void 0), ee(this, "viewerData", void 0), this.mux = t3, this.envKey = a3, this.options = y2, this.previousBeaconData = null, this.lastEventTime = 0, this.rateLimited = false, this.eventQueue = new _t($e(this.envKey, this.options)), this.sampleRate = null !== (h2 = this.options.sampleRate) && void 0 !== h2 ? h2 : 1, this.disableCookies = null !== (v2 = this.options.disableCookies) && void 0 !== v2 && v2, this.respectDoNotTrack = null !== (m2 = this.options.respectDoNotTrack) && void 0 !== m2 && m2, this.previousBeaconData = null, this.lastEventTime = 0, this.rateLimited = false, this.pageLevelData = { mux_api_version: this.mux.API_VERSION, mux_embed: this.mux.NAME, mux_embed_version: this.mux.VERSION, viewer_application_name: null === (r2 = this.options.platform) || void 0 === r2 ? void 0 : r2.name, viewer_application_version: null === (n2 = this.options.platform) || void 0 === n2 ? void 0 : n2.version, viewer_application_engine: null === (i3 = this.options.platform) || void 0 === i3 ? void 0 : i3.layout, viewer_device_name: null === (o2 = this.options.platform) || void 0 === o2 ? void 0 : o2.product, viewer_device_category: "", viewer_device_manufacturer: null === (s2 = this.options.platform) || void 0 === s2 ? void 0 : s2.manufacturer, viewer_os_family: null === (d2 = this.options.platform) || void 0 === d2 || null === (u2 = d2.os) || void 0 === u2 ? void 0 : u2.family, viewer_os_architecture: null === (c2 = this.options.platform) || void 0 === c2 || null === (l2 = c2.os) || void 0 === l2 ? void 0 : l2.architecture, viewer_os_version: null === (f2 = this.options.platform) || void 0 === f2 || null === (p2 = f2.os) || void 0 === p2 ? void 0 : p2.version, viewer_connection_type: at(), page_url: null === Ge.default || void 0 === Ge.default || null === (_3 = Ge.default.location) || void 0 === _3 ? void 0 : _3.href }, this.viewerData = this.disableCookies ? {} : Xe();
53971
+ }
53972
+ return Z(e3, [{ key: "send", value: function(e4, t3) {
53973
+ if (e4 && null != t3 && t3.view_id) {
53974
+ if (this.respectDoNotTrack && J())
53975
+ return G.info("Not sending `" + e4 + "` because Do Not Track is enabled");
53976
+ if (!t3 || "object" != typeof t3)
53977
+ return G.error("A data object was expected in send() but was not provided");
53978
+ var a3 = this.disableCookies ? {} : function() {
53979
+ var e5 = Ke(), t4 = K.now();
53980
+ return e5.session_start && (e5.sst = e5.session_start, delete e5.session_start), e5.session_id && (e5.sid = e5.session_id, delete e5.session_id), e5.session_expires && (e5.sex = e5.session_expires, delete e5.session_expires), (!e5.sex || e5.sex < t4) && (e5.sid = M(), e5.sst = t4), e5.sex = t4 + 15e5, Ye(e5), { session_id: e5.sid, session_start: e5.sst, session_expires: e5.sex };
53981
+ }(), r2 = ce(le({}, this.pageLevelData, t3, a3, this.viewerData), { event: e4, env_key: this.envKey });
53982
+ r2.user_id && (r2.viewer_user_id = r2.user_id, delete r2.user_id);
53983
+ var n2, i3 = (null !== (n2 = r2.mux_sample_number) && void 0 !== n2 ? n2 : 0) >= this.sampleRate, o2 = ot(this._deduplicateBeaconData(e4, r2));
53984
+ if (this.lastEventTime = this.mux.utils.now(), i3)
53985
+ return G.info("Not sending event due to sample rate restriction", e4, r2, o2);
53986
+ if (this.envKey || G.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL", e4, r2, o2), !this.rateLimited) {
53987
+ if (G.info("Sending event", e4, r2, o2), this.rateLimited = !this.eventQueue.queueEvent(e4, o2), this.mux.WINDOW_UNLOADING && "viewend" === e4)
53988
+ this.eventQueue.destroy(true);
53989
+ else if (this.mux.WINDOW_HIDDEN && "hb" === e4 ? this.eventQueue.flushEvents(true) : yt.indexOf(e4) >= 0 && this.eventQueue.flushEvents(), this.rateLimited)
53990
+ return r2.event = "eventrateexceeded", o2 = ot(r2), this.eventQueue.queueEvent(r2.event, o2), G.error("Beaconing disabled due to rate limit.");
53991
+ }
53992
+ }
53993
+ } }, { key: "destroy", value: function() {
53994
+ this.eventQueue.destroy(false);
53995
+ } }, { key: "_deduplicateBeaconData", value: function(e4, t3) {
53996
+ var a3 = this, r2 = {}, n2 = t3.view_id;
53997
+ if ("-1" === n2 || "viewstart" === e4 || "viewend" === e4 || !this.previousBeaconData || this.mux.utils.now() - this.lastEventTime >= 6e5)
53998
+ r2 = le({}, t3), n2 && (this.previousBeaconData = r2), n2 && "viewend" === e4 && (this.previousBeaconData = null);
53999
+ else {
54000
+ var i3 = 0 === e4.indexOf("request");
54001
+ Object.entries(t3).forEach(function(t4) {
54002
+ var n3 = j(t4, 2), o2 = n3[0], s2 = n3[1];
54003
+ a3.previousBeaconData && (s2 !== a3.previousBeaconData[o2] || ht.indexOf(o2) > -1 || a3.objectHasChanged(i3, o2, s2, a3.previousBeaconData[o2]) || a3.eventRequiresKey(e4, o2)) && (r2[o2] = s2, a3.previousBeaconData[o2] = s2);
54004
+ });
54005
+ }
54006
+ return r2;
54007
+ } }, { key: "objectHasChanged", value: function(e4, t3, a3, r2) {
54008
+ return !(!e4 || 0 !== t3.indexOf("request_")) && ("request_response_headers" === t3 || "object" != typeof a3 || "object" != typeof r2 || Object.keys(a3 || {}).length !== Object.keys(r2 || {}).length);
54009
+ } }, { key: "eventRequiresKey", value: function(e4, t3) {
54010
+ return !!("renditionchange" === e4 && 0 === t3.indexOf("video_source_") || mt.includes(t3) && vt.includes(e4));
54011
+ } }]), e3;
54012
+ }(), bt = function e3(t3) {
54013
+ X(this, e3);
54014
+ var a3 = 0, r2 = 0, n2 = 0, i3 = 0, o2 = 0, s2 = 0, u2 = 0;
54015
+ t3.on("requestcompleted", function(e4, s3) {
54016
+ var u3, d2, l2 = s3.request_start, c2 = s3.request_response_start, p2 = s3.request_response_end, f2 = s3.request_bytes_loaded;
54017
+ if (i3++, c2 ? (u3 = c2 - (null != l2 ? l2 : 0), d2 = (null != p2 ? p2 : 0) - c2) : d2 = (null != p2 ? p2 : 0) - (null != l2 ? l2 : 0), d2 > 0 && f2 && f2 > 0) {
54018
+ var _3 = f2 / d2 * 8e3;
54019
+ o2++, r2 += f2, n2 += d2, t3.data.view_min_request_throughput = Math.min(t3.data.view_min_request_throughput || 1 / 0, _3), t3.data.view_average_request_throughput = r2 / n2 * 8e3, t3.data.view_request_count = i3, u3 > 0 && (a3 += u3, t3.data.view_max_request_latency = Math.max(t3.data.view_max_request_latency || 0, u3), t3.data.view_average_request_latency = a3 / o2);
54020
+ }
54021
+ }), t3.on("requestfailed", function(e4, a4) {
54022
+ i3++, s2++, t3.data.view_request_count = i3, t3.data.view_request_failed_count = s2;
54023
+ }), t3.on("requestcanceled", function(e4, a4) {
54024
+ i3++, u2++, t3.data.view_request_count = i3, t3.data.view_request_canceled_count = u2;
54025
+ });
54026
+ }, wt = function e3(t3) {
54027
+ var a3 = this;
54028
+ X(this, e3), ee(this, "_lastEventTime", void 0), t3.on("before*", function(e4, r2) {
54029
+ var n2 = r2.viewer_time, i3 = K.now(), o2 = a3._lastEventTime;
54030
+ if (a3._lastEventTime = i3, o2 && i3 - o2 > 36e5) {
54031
+ var s2 = Object.keys(t3.data).reduce(function(e5, a4) {
54032
+ return 0 === a4.indexOf("video_") ? Object.assign(e5, ee({}, a4, t3.data[a4])) : e5;
54033
+ }, {});
54034
+ t3.mux.log.info("Received event after at least an hour inactivity, creating a new view"), t3.emit("viewinit", Object.assign({ viewer_time: n2 }, s2)), t3.playbackHeartbeat._playheadShouldBeProgressing && "play" !== e4.type && "adbreakstart" !== e4.type && (t3.emit("play", { viewer_time: n2 }), "playing" !== e4.type && t3.emit("playing", { viewer_time: n2 }));
54035
+ }
54036
+ });
54037
+ }, Tt = ["viewstart", "ended", "loadstart", "pause", "play", "playing", "ratechange", "waiting", "adplay", "adpause", "adended", "aderror", "adplaying", "adrequest", "adresponse", "adbreakstart", "adbreakend", "adfirstquartile", "admidpoint", "adthirdquartile", "rebufferstart", "rebufferend", "seeked", "error", "hb", "requestcompleted", "requestfailed", "requestcanceled", "renditionchange"], xt = function(e3) {
54038
+ !function(e4, t4) {
54039
+ if ("function" != typeof t4 && null !== t4)
54040
+ throw new TypeError("Super expression must either be null or a function");
54041
+ e4.prototype = Object.create(t4 && t4.prototype, { constructor: { value: e4, writable: true, configurable: true } }), t4 && te(e4, t4);
54042
+ }(a3, e3);
54043
+ var t3 = ne(a3);
54044
+ function a3(e4, r2, n2) {
54045
+ var i3;
54046
+ X(this, a3), ee(Y(i3 = t3.call(this)), "DOM_CONTENT_LOADED_EVENT_END", void 0), ee(Y(i3), "NAVIGATION_START", void 0), ee(Y(i3), "_destroyed", void 0), ee(Y(i3), "_heartBeatTimeout", void 0), ee(Y(i3), "adTracker", void 0), ee(Y(i3), "dashjs", void 0), ee(Y(i3), "data", void 0), ee(Y(i3), "disablePlayheadRebufferTracking", void 0), ee(Y(i3), "disableRebufferTracking", void 0), ee(Y(i3), "errorTracker", void 0), ee(Y(i3), "errorTranslator", void 0), ee(Y(i3), "getAdData", void 0), ee(Y(i3), "getPlayheadTime", void 0), ee(Y(i3), "getStateData", void 0), ee(Y(i3), "hlsjs", void 0), ee(Y(i3), "id", void 0), ee(Y(i3), "longResumeTracker", void 0), ee(Y(i3), "minimumRebufferDuration", void 0), ee(Y(i3), "mux", void 0), ee(Y(i3), "oldEmit", void 0), ee(Y(i3), "playbackEventDispatcher", void 0), ee(Y(i3), "playbackHeartbeat", void 0), ee(Y(i3), "playbackHeartbeatTime", void 0), ee(Y(i3), "playheadTime", void 0), ee(Y(i3), "seekingTracker", void 0), ee(Y(i3), "sustainedRebufferThreshold", void 0), ee(Y(i3), "watchTimeTracker", void 0), ee(Y(i3), "currentFragmentPDT", void 0), ee(Y(i3), "currentFragmentStart", void 0), i3.DOM_CONTENT_LOADED_EVENT_END = ue.domContentLoadedEventEnd(), i3.NAVIGATION_START = ue.navigationStart();
54047
+ i3.mux = e4, i3.id = r2, null != n2 && n2.beaconDomain && i3.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."), (n2 = Object.assign({ debug: false, minimumRebufferDuration: 250, sustainedRebufferThreshold: 1e3, playbackHeartbeatTime: 25, beaconDomain: "litix.io", sampleRate: 1, disableCookies: false, respectDoNotTrack: false, disableRebufferTracking: false, disablePlayheadRebufferTracking: false, errorTranslator: function(e5) {
54048
+ return e5;
54049
+ } }, n2)).data = n2.data || {}, n2.data.property_key && (n2.data.env_key = n2.data.property_key, delete n2.data.property_key), G.setLevel(n2.debug ? "debug" : "warn"), i3.getPlayheadTime = n2.getPlayheadTime, i3.getStateData = n2.getStateData || function() {
54050
+ return {};
54051
+ }, i3.getAdData = n2.getAdData || function() {
54052
+ }, i3.minimumRebufferDuration = n2.minimumRebufferDuration, i3.sustainedRebufferThreshold = n2.sustainedRebufferThreshold, i3.playbackHeartbeatTime = n2.playbackHeartbeatTime, i3.disableRebufferTracking = n2.disableRebufferTracking, i3.disableRebufferTracking && i3.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."), i3.disablePlayheadRebufferTracking = n2.disablePlayheadRebufferTracking, i3.errorTranslator = n2.errorTranslator, i3.playbackEventDispatcher = new gt(e4, n2.data.env_key, n2), i3.data = { player_instance_id: M(), mux_sample_rate: n2.sampleRate, beacon_domain: n2.beaconCollectionDomain || n2.beaconDomain }, i3.data.view_sequence_number = 1, i3.data.player_sequence_number = 1, i3.oldEmit = i3.emit, i3.emit = function(e5, t4) {
54053
+ t4 = Object.assign({ viewer_time: this.mux.utils.now() }, t4), this.oldEmit(e5, t4);
54054
+ };
54055
+ var o2 = function() {
54056
+ void 0 === this.data.view_start && (this.data.view_start = this.mux.utils.now(), this.emit("viewstart"));
54057
+ }.bind(Y(i3));
54058
+ i3.on("viewinit", function(e5, t4) {
54059
+ this._resetVideoData(), this._resetViewData(), this._resetErrorData(), this._updateStateData(), Object.assign(this.data, t4), this._initializeViewData(), this.one("play", o2), this.one("adbreakstart", o2);
54060
+ });
54061
+ var s2 = function(e5) {
54062
+ this.emit("viewend"), this.send("viewend"), this.emit("viewinit", e5);
54063
+ }.bind(Y(i3));
54064
+ if (i3.on("videochange", function(e5, t4) {
54065
+ s2(t4);
54066
+ }), i3.on("programchange", function(e5, t4) {
54067
+ this.data.player_is_paused && this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."), s2(Object.assign(t4, { view_program_changed: true })), o2(), this.emit("play"), this.emit("playing");
54068
+ }), i3.on("fragmentchange", function(e5, t4) {
54069
+ this.currentFragmentPDT = t4.currentFragmentPDT, this.currentFragmentStart = t4.currentFragmentStart;
54070
+ }), i3.on("destroy", i3.destroy), "undefined" != typeof window && "function" == typeof window.addEventListener && "function" == typeof window.removeEventListener) {
54071
+ var u2 = function() {
54072
+ var e5 = void 0 !== i3.data.view_start;
54073
+ i3.mux.WINDOW_HIDDEN = "hidden" === document.visibilityState, e5 && i3.mux.WINDOW_HIDDEN && (i3.data.player_is_paused || i3.emit("hb"));
54074
+ };
54075
+ window.addEventListener("visibilitychange", u2, false);
54076
+ var d2 = function(e5) {
54077
+ e5.persisted || i3.destroy();
54078
+ };
54079
+ window.addEventListener("pagehide", d2, false), i3.on("destroy", function() {
54080
+ window.removeEventListener("visibilitychange", u2), window.removeEventListener("pagehide", d2);
54081
+ });
54082
+ }
54083
+ i3.on("playerready", function(e5, t4) {
54084
+ Object.assign(this.data, t4);
54085
+ }), Tt.forEach(function(e5) {
54086
+ i3.on(e5, function(t4, a4) {
54087
+ 0 !== e5.indexOf("ad") && this._updateStateData(), Object.assign(this.data, a4), this._sanitizeData();
54088
+ }), i3.on("after" + e5, function() {
54089
+ ("error" !== e5 || this.errorTracker.viewErrored) && this.send(e5);
54090
+ });
54091
+ }), i3.on("viewend", function(e5, t4) {
54092
+ Object.assign(i3.data, t4);
54093
+ });
54094
+ return i3.one("playerready", function(e5) {
54095
+ var t4 = this.mux.utils.now();
54096
+ this.data.player_init_time && (this.data.player_startup_time = t4 - this.data.player_init_time), !this.mux.PLAYER_TRACKED && this.NAVIGATION_START && (this.mux.PLAYER_TRACKED = true, (this.data.player_init_time || this.DOM_CONTENT_LOADED_EVENT_END) && (this.data.page_load_time = Math.min(this.data.player_init_time || 1 / 0, this.DOM_CONTENT_LOADED_EVENT_END || 1 / 0) - this.NAVIGATION_START)), this.send("playerready"), delete this.data.player_startup_time, delete this.data.page_load_time;
54097
+ }), i3.longResumeTracker = new wt(Y(i3)), i3.errorTracker = new Se(Y(i3)), new Ve(Y(i3)), i3.seekingTracker = new He(Y(i3)), i3.playheadTime = new Re(Y(i3)), i3.playbackHeartbeat = new qe(Y(i3)), new je(Y(i3)), i3.watchTimeTracker = new Ae(Y(i3)), new Oe(Y(i3)), i3.adTracker = new Be(Y(i3)), new Le(Y(i3)), new Ne(Y(i3)), new Ce(Y(i3)), new We(Y(i3)), new bt(Y(i3)), n2.hlsjs && i3.addHLSJS(n2), n2.dashjs && i3.addDashJS(n2), i3.emit("viewinit", n2.data), i3;
54098
+ }
54099
+ return Z(a3, [{ key: "destroy", value: function() {
54100
+ this._destroyed || (this._destroyed = true, void 0 !== this.data.view_start && (this.emit("viewend"), this.send("viewend")), this.playbackEventDispatcher.destroy(), this.removeHLSJS(), this.removeDashJS(), window.clearTimeout(this._heartBeatTimeout));
54101
+ } }, { key: "send", value: function(e4) {
54102
+ if (this.data.view_id) {
54103
+ var t4 = Object.assign({}, this.data);
54104
+ if (void 0 === t4.video_source_is_live && (t4.player_source_duration === 1 / 0 || t4.video_source_duration === 1 / 0 ? t4.video_source_is_live = true : (t4.player_source_duration > 0 || t4.video_source_duration > 0) && (t4.video_source_is_live = false)), t4.video_source_is_live || ["player_program_time", "player_manifest_newest_program_time", "player_live_edge_program_time", "player_program_time", "video_holdback", "video_part_holdback", "video_target_duration", "video_part_target_duration"].forEach(function(e5) {
54105
+ t4[e5] = void 0;
54106
+ }), t4.video_source_url = t4.video_source_url || t4.player_source_url, t4.video_source_url) {
54107
+ var a4 = j(oe(t4.video_source_url), 2), r2 = a4[0], n2 = a4[1];
54108
+ t4.video_source_domain = n2, t4.video_source_hostname = r2;
54109
+ }
54110
+ delete t4.ad_request_id, this.playbackEventDispatcher.send(e4, t4), this.data.view_sequence_number++, this.data.player_sequence_number++, this._restartHeartBeat(), "viewend" === e4 && delete this.data.view_id;
54111
+ }
54112
+ } }, { key: "_updateStateData", value: function() {
54113
+ Object.assign(this.data, this.getStateData()), this.playheadTime._updatePlayheadTime(), this._sanitizeData();
54114
+ } }, { key: "_sanitizeData", value: function() {
54115
+ var e4 = this;
54116
+ ["player_width", "player_height", "video_source_width", "video_source_height", "player_playhead_time", "video_source_bitrate"].forEach(function(t4) {
54117
+ var a4 = parseInt(e4.data[t4], 10);
54118
+ e4.data[t4] = isNaN(a4) ? void 0 : a4;
54119
+ });
54120
+ ["player_source_url", "video_source_url"].forEach(function(t4) {
54121
+ if (e4.data[t4]) {
54122
+ var a4 = e4.data[t4].toLowerCase();
54123
+ (0 === a4.indexOf("data:") || 0 === a4.indexOf("blob:")) && (e4.data[t4] = "MSE style URL");
54124
+ }
54125
+ });
54126
+ } }, { key: "_resetVideoData", value: function() {
54127
+ var e4 = this;
54128
+ Object.keys(this.data).forEach(function(t4) {
54129
+ 0 === t4.indexOf("video_") && delete e4.data[t4];
54130
+ });
54131
+ } }, { key: "_resetViewData", value: function() {
54132
+ var e4 = this;
54133
+ Object.keys(this.data).forEach(function(t4) {
54134
+ 0 === t4.indexOf("view_") && delete e4.data[t4];
54135
+ }), this.data.view_sequence_number = 1;
54136
+ } }, { key: "_resetErrorData", value: function() {
54137
+ delete this.data.player_error_code, delete this.data.player_error_message, delete this.data.player_error_context, delete this.data.player_error_severity, delete this.data.player_error_business_exception;
54138
+ } }, { key: "_initializeViewData", value: function() {
54139
+ var e4 = this, t4 = this.data.view_id = M(), a4 = function() {
54140
+ t4 === e4.data.view_id && de(e4.data, "player_view_count", 1);
54141
+ };
54142
+ this.data.player_is_paused ? this.one("play", a4) : a4();
54143
+ } }, { key: "_restartHeartBeat", value: function() {
54144
+ var e4 = this;
54145
+ window.clearTimeout(this._heartBeatTimeout), this._heartBeatTimeout = window.setTimeout(function() {
54146
+ e4.data.player_is_paused || e4.emit("hb");
54147
+ }, 1e4);
54148
+ } }, { key: "addHLSJS", value: function(e4) {
54149
+ e4.hlsjs ? this.hlsjs ? this.mux.log.warn("An instance of HLS.js is already being monitored for this player.") : (this.hlsjs = e4.hlsjs, function(e5, t4, a4) {
54150
+ var r2 = arguments.length > 4 ? arguments[4] : void 0, n2 = e5.log, i3 = e5.utils.secondsToMs, o2 = function(e6) {
54151
+ var t5, a5 = parseInt(r2.version);
54152
+ return 1 === a5 && null !== e6.programDateTime && (t5 = e6.programDateTime), 0 === a5 && null !== e6.pdt && (t5 = e6.pdt), t5;
54153
+ };
54154
+ if (ue.exists()) {
54155
+ var s2 = function(a5, r3) {
54156
+ return e5.emit(t4, a5, r3);
54157
+ }, u2 = function(e6, t5) {
54158
+ var a5 = t5.levels, r3 = t5.audioTracks, n3 = t5.url, i4 = t5.stats, o3 = t5.networkDetails, u3 = t5.sessionData, d3 = {}, l3 = {};
54159
+ a5.forEach(function(e7, t6) {
54160
+ d3[t6] = { width: e7.width, height: e7.height, bitrate: e7.bitrate, attrs: e7.attrs };
54161
+ }), r3.forEach(function(e7, t6) {
54162
+ l3[t6] = { name: e7.name, language: e7.lang, bitrate: e7.bitrate };
54163
+ });
54164
+ var c3 = me(i4), p3 = c3.bytesLoaded, f3 = c3.requestStart, _4 = c3.responseStart, h3 = c3.responseEnd;
54165
+ s2("requestcompleted", ce(le({}, ve(u3)), { request_event_type: e6, request_bytes_loaded: p3, request_start: f3, request_response_start: _4, request_response_end: h3, request_type: "manifest", request_hostname: ie(n3), request_response_headers: ye(o3), request_rendition_lists: { media: d3, audio: l3, video: {} } }));
54166
+ };
54167
+ a4.on(r2.Events.MANIFEST_LOADED, u2);
54168
+ var d2 = function(e6, t5) {
54169
+ var a5 = t5.details, r3 = t5.level, n3 = t5.networkDetails, u3 = t5.stats, d3 = me(u3), l3 = d3.bytesLoaded, c3 = d3.requestStart, p3 = d3.responseStart, f3 = d3.responseEnd, _4 = a5.fragments[a5.fragments.length - 1], h3 = o2(_4) + i3(_4.duration);
54170
+ s2("requestcompleted", { request_event_type: e6, request_bytes_loaded: l3, request_start: c3, request_response_start: p3, request_response_end: f3, request_current_level: r3, request_type: "manifest", request_hostname: ie(a5.url), request_response_headers: ye(n3), video_holdback: a5.holdBack && i3(a5.holdBack), video_part_holdback: a5.partHoldBack && i3(a5.partHoldBack), video_part_target_duration: a5.partTarget && i3(a5.partTarget), video_target_duration: a5.targetduration && i3(a5.targetduration), video_source_is_live: a5.live, player_manifest_newest_program_time: isNaN(h3) ? void 0 : h3 });
54171
+ };
54172
+ a4.on(r2.Events.LEVEL_LOADED, d2);
54173
+ var l2 = function(e6, t5) {
54174
+ var a5 = t5.details, r3 = t5.networkDetails, n3 = t5.stats, i4 = me(n3), o3 = i4.bytesLoaded, u3 = i4.requestStart, d3 = i4.responseStart, l3 = i4.responseEnd;
54175
+ s2("requestcompleted", { request_event_type: e6, request_bytes_loaded: o3, request_start: u3, request_response_start: d3, request_response_end: l3, request_type: "manifest", request_hostname: ie(a5.url), request_response_headers: ye(r3) });
54176
+ };
54177
+ a4.on(r2.Events.AUDIO_TRACK_LOADED, l2);
54178
+ var c2 = function(e6, t5) {
54179
+ var r3 = t5.stats, n3 = t5.networkDetails, i4 = t5.frag;
54180
+ r3 = r3 || i4.stats;
54181
+ var o3 = me(r3), u3 = o3.bytesLoaded, d3 = o3.requestStart, l3 = o3.responseStart, c3 = o3.responseEnd, p3 = n3 ? ye(n3) : void 0, f3 = { request_event_type: e6, request_bytes_loaded: u3, request_start: d3, request_response_start: l3, request_response_end: c3, request_hostname: n3 ? ie(n3.responseURL) : void 0, request_id: p3 ? he(p3) : void 0, request_response_headers: p3, request_media_duration: i4.duration, request_url: null == n3 ? void 0 : n3.responseURL };
54182
+ "main" === i4.type ? (f3.request_type = "media", f3.request_current_level = i4.level, f3.request_video_width = (a4.levels[i4.level] || {}).width, f3.request_video_height = (a4.levels[i4.level] || {}).height, f3.request_labeled_bitrate = (a4.levels[i4.level] || {}).bitrate) : f3.request_type = i4.type, s2("requestcompleted", f3);
54183
+ };
54184
+ a4.on(r2.Events.FRAG_LOADED, c2);
54185
+ var p2 = function(e6, t5) {
54186
+ var a5 = t5.frag, r3 = a5.start, n3 = { currentFragmentPDT: o2(a5), currentFragmentStart: i3(r3) };
54187
+ s2("fragmentchange", n3);
54188
+ };
54189
+ a4.on(r2.Events.FRAG_CHANGED, p2);
54190
+ var f2 = function(e6, t5) {
54191
+ var a5 = t5.type, n3 = t5.details, i4 = t5.response, o3 = t5.fatal, u3 = t5.frag, d3 = t5.networkDetails, l3 = (null == u3 ? void 0 : u3.url) || t5.url || "", c3 = d3 ? ye(d3) : void 0;
54192
+ if ((n3 === r2.ErrorDetails.MANIFEST_LOAD_ERROR || n3 === r2.ErrorDetails.MANIFEST_LOAD_TIMEOUT || n3 === r2.ErrorDetails.FRAG_LOAD_ERROR || n3 === r2.ErrorDetails.FRAG_LOAD_TIMEOUT || n3 === r2.ErrorDetails.LEVEL_LOAD_ERROR || n3 === r2.ErrorDetails.LEVEL_LOAD_TIMEOUT || n3 === r2.ErrorDetails.AUDIO_TRACK_LOAD_ERROR || n3 === r2.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT || n3 === r2.ErrorDetails.SUBTITLE_LOAD_ERROR || n3 === r2.ErrorDetails.SUBTITLE_LOAD_TIMEOUT || n3 === r2.ErrorDetails.KEY_LOAD_ERROR || n3 === r2.ErrorDetails.KEY_LOAD_TIMEOUT) && s2("requestfailed", { request_error: n3, request_url: l3, request_hostname: ie(l3), request_id: c3 ? he(c3) : void 0, request_type: n3 === r2.ErrorDetails.FRAG_LOAD_ERROR || n3 === r2.ErrorDetails.FRAG_LOAD_TIMEOUT ? "media" : n3 === r2.ErrorDetails.AUDIO_TRACK_LOAD_ERROR || n3 === r2.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT ? "audio" : n3 === r2.ErrorDetails.SUBTITLE_LOAD_ERROR || n3 === r2.ErrorDetails.SUBTITLE_LOAD_TIMEOUT ? "subtitle" : n3 === r2.ErrorDetails.KEY_LOAD_ERROR || n3 === r2.ErrorDetails.KEY_LOAD_TIMEOUT ? "encryption" : "manifest", request_error_code: null == i4 ? void 0 : i4.code, request_error_text: null == i4 ? void 0 : i4.text }), o3) {
54193
+ var p3, f3 = "".concat(l3 ? "url: ".concat(l3, "\n") : "") + "".concat(i4 && (i4.code || i4.text) ? "response: ".concat(i4.code, ", ").concat(i4.text, "\n") : "") + "".concat(t5.reason ? "failure reason: ".concat(t5.reason, "\n") : "") + "".concat(t5.level ? "level: ".concat(t5.level, "\n") : "") + "".concat(t5.parent ? "parent stream controller: ".concat(t5.parent, "\n") : "") + "".concat(t5.buffer ? "buffer length: ".concat(t5.buffer, "\n") : "") + "".concat(t5.error ? "error: ".concat(t5.error, "\n") : "") + "".concat(t5.event ? "event: ".concat(t5.event, "\n") : "") + "".concat(t5.err ? "error message: ".concat(null === (p3 = t5.err) || void 0 === p3 ? void 0 : p3.message, "\n") : "");
54194
+ s2("error", { player_error_code: a5, player_error_message: n3, player_error_context: f3 });
54195
+ }
54196
+ };
54197
+ a4.on(r2.Events.ERROR, f2);
54198
+ var _3 = function(e6, t5) {
54199
+ var a5 = t5.frag, r3 = a5 && a5._url || "";
54200
+ s2("requestcanceled", { request_event_type: e6, request_url: r3, request_type: "media", request_hostname: ie(r3) });
54201
+ };
54202
+ a4.on(r2.Events.FRAG_LOAD_EMERGENCY_ABORTED, _3);
54203
+ var h2 = function(e6, t5) {
54204
+ var r3 = t5.level, i4 = a4.levels[r3];
54205
+ if (i4 && i4.attrs && i4.attrs.BANDWIDTH) {
54206
+ var o3, u3 = i4.attrs.BANDWIDTH, d3 = parseFloat(i4.attrs["FRAME-RATE"]);
54207
+ isNaN(d3) || (o3 = d3), u3 ? s2("renditionchange", { video_source_fps: o3, video_source_bitrate: u3, video_source_width: i4.width, video_source_height: i4.height, video_source_rendition_name: i4.name, video_source_codec: null == i4 ? void 0 : i4.videoCodec }) : n2.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js");
54208
+ }
54209
+ };
54210
+ a4.on(r2.Events.LEVEL_SWITCHED, h2), a4._stopMuxMonitor = function() {
54211
+ a4.off(r2.Events.MANIFEST_LOADED, u2), a4.off(r2.Events.LEVEL_LOADED, d2), a4.off(r2.Events.AUDIO_TRACK_LOADED, l2), a4.off(r2.Events.FRAG_LOADED, c2), a4.off(r2.Events.FRAG_CHANGED, p2), a4.off(r2.Events.ERROR, f2), a4.off(r2.Events.FRAG_LOAD_EMERGENCY_ABORTED, _3), a4.off(r2.Events.LEVEL_SWITCHED, h2), a4.off(r2.Events.DESTROYING, a4._stopMuxMonitor), delete a4._stopMuxMonitor;
54212
+ }, a4.on(r2.Events.DESTROYING, a4._stopMuxMonitor);
54213
+ } else
54214
+ n2.warn("performance timing not supported. Not tracking HLS.js.");
54215
+ }(this.mux, this.id, e4.hlsjs, {}, e4.Hls || window.Hls)) : this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.");
54216
+ } }, { key: "removeHLSJS", value: function() {
54217
+ this.hlsjs && (function(e4) {
54218
+ e4 && "function" == typeof e4._stopMuxMonitor && e4._stopMuxMonitor();
54219
+ }(this.hlsjs), this.hlsjs = void 0);
54220
+ } }, { key: "addDashJS", value: function(e4) {
54221
+ e4.dashjs ? this.dashjs ? this.mux.log.warn("An instance of Dash.js is already being monitored for this player.") : (this.dashjs = e4.dashjs, function(e5, t4, a4) {
54222
+ var r2 = e5.log;
54223
+ if (a4 && a4.on) {
54224
+ var n2 = Te(a4), i3 = function(a5, r3) {
54225
+ return e5.emit(t4, a5, r3);
54226
+ }, o2 = function(e6) {
54227
+ var t5 = e6.type, a5 = (e6.data || {}).url;
54228
+ i3("requestcompleted", { request_event_type: t5, request_start: 0, request_response_start: 0, request_response_end: 0, request_bytes_loaded: -1, request_type: "manifest", request_hostname: ie(a5), request_url: a5 });
54229
+ };
54230
+ a4.on("manifestLoaded", o2);
54231
+ var s2 = {}, u2 = function(e6) {
54232
+ if ("function" != typeof e6.getRequests)
54233
+ return null;
54234
+ var t5 = e6.getRequests({ state: "executed" });
54235
+ return 0 === t5.length ? null : t5[t5.length - 1];
54236
+ }, d2 = function(e6) {
54237
+ var t5 = e6.type, a5 = e6.fragmentModel, r3 = e6.chunk, n3 = u2(a5);
54238
+ l2({ type: t5, request: n3, chunk: r3 });
54239
+ }, l2 = function(e6) {
54240
+ var t5 = e6.type, r3 = e6.chunk, n3 = e6.request, o3 = (r3 || {}).mediaInfo || {}, u3 = o3.type, d3 = o3.bitrateList, l3 = {};
54241
+ (d3 = d3 || []).forEach(function(e7, t6) {
54242
+ l3[t6] = {}, l3[t6].width = e7.width, l3[t6].height = e7.height, l3[t6].bitrate = e7.bandwidth, l3[t6].attrs = {};
54243
+ }), "video" === u3 ? s2.video = l3 : "audio" === u3 ? s2.audio = l3 : s2.media = l3;
54244
+ var c3 = ge(n3, a4), p3 = c3.requestStart, f3 = c3.requestResponseStart, _4 = c3.requestResponseEnd, h3 = c3.requestResponseHeaders, v3 = c3.requestMediaDuration, m3 = c3.requestHostname, y2 = c3.requestUrl, g2 = c3.requestId;
54245
+ i3("requestcompleted", { request_event_type: t5, request_start: p3, request_response_start: f3, request_response_end: _4, request_bytes_loaded: -1, request_type: u3 + "_init", request_response_headers: h3, request_hostname: m3, request_id: g2, request_url: y2, request_media_duration: v3, request_rendition_lists: s2 });
54246
+ };
54247
+ n2 >= 4 ? a4.on("initFragmentLoaded", l2) : a4.on("initFragmentLoaded", d2);
54248
+ var c2 = function(e6) {
54249
+ var t5 = e6.type, a5 = e6.fragmentModel, r3 = e6.chunk, n3 = u2(a5);
54250
+ p2({ type: t5, request: n3, chunk: r3 });
54251
+ }, p2 = function(e6) {
54252
+ var t5 = e6.type, r3 = e6.chunk, n3 = e6.request, o3 = r3 || {}, s3 = o3.mediaInfo, u3 = o3.start, d3 = (s3 || {}).type, l3 = ge(n3, a4), c3 = l3.requestStart, p3 = l3.requestResponseStart, f3 = l3.requestResponseEnd, _4 = l3.requestBytesLoaded, h3 = l3.requestResponseHeaders, v3 = l3.requestMediaDuration, m3 = l3.requestHostname, y2 = l3.requestUrl, g2 = l3.requestId, b2 = be(d3, a4), w2 = b2.currentLevel, T2 = b2.renditionWidth, x2 = b2.renditionHeight, k2 = b2.renditionBitrate;
54253
+ i3("requestcompleted", { request_event_type: t5, request_start: c3, request_response_start: p3, request_response_end: f3, request_bytes_loaded: _4, request_type: d3, request_response_headers: h3, request_hostname: m3, request_id: g2, request_url: y2, request_media_start_time: u3, request_media_duration: v3, request_current_level: w2, request_labeled_bitrate: k2, request_video_width: T2, request_video_height: x2 });
54254
+ };
54255
+ n2 >= 4 ? a4.on("mediaFragmentLoaded", p2) : a4.on("mediaFragmentLoaded", c2);
54256
+ var f2 = { video: void 0, audio: void 0, totalBitrate: void 0 }, _3 = function() {
54257
+ if (f2.video && "number" == typeof f2.video.bitrate) {
54258
+ if (!f2.video.width || !f2.video.height)
54259
+ return void r2.warn("have bitrate info for video but missing width/height");
54260
+ var e6 = f2.video.bitrate;
54261
+ if (f2.audio && "number" == typeof f2.audio.bitrate && (e6 += f2.audio.bitrate), e6 !== f2.totalBitrate)
54262
+ return f2.totalBitrate = e6, { video_source_bitrate: e6, video_source_height: f2.video.height, video_source_width: f2.video.width, video_source_codec: we(f2.video.codec) };
54263
+ }
54264
+ }, h2 = function(e6, t5, n3) {
54265
+ if ("number" == typeof e6.newQuality) {
54266
+ var o3 = e6.mediaType;
54267
+ if ("audio" === o3 || "video" === o3) {
54268
+ var s3 = a4.getBitrateInfoListFor(o3).find(function(t6) {
54269
+ return t6.qualityIndex === e6.newQuality;
54270
+ });
54271
+ if (!s3 || "number" != typeof s3.bitrate)
54272
+ return void r2.warn("missing bitrate info for ".concat(o3));
54273
+ f2[o3] = ce(le({}, s3), { codec: a4.getCurrentTrackFor(o3).codec });
54274
+ var u3 = _3();
54275
+ u3 && i3("renditionchange", u3);
54276
+ }
54277
+ } else
54278
+ r2.warn("missing evt.newQuality in qualityChangeRendered event", e6);
54279
+ };
54280
+ a4.on("qualityChangeRendered", h2);
54281
+ var v2 = function(e6) {
54282
+ var t5 = e6.request, a5 = e6.mediaType;
54283
+ i3("requestcanceled", { request_event_type: (t5 = t5 || {}).type + "_" + t5.action, request_url: t5.url, request_type: a5, request_hostname: ie(t5.url) });
54284
+ };
54285
+ a4.on("fragmentLoadingAbandoned", v2);
54286
+ var m2 = function(e6) {
54287
+ var t5, a5, r3 = e6.error, n3 = (null == r3 || null === (t5 = r3.data) || void 0 === t5 ? void 0 : t5.request) || {}, o3 = (null == r3 || null === (a5 = r3.data) || void 0 === a5 ? void 0 : a5.response) || {};
54288
+ 27 === (null == r3 ? void 0 : r3.code) && i3("requestfailed", { request_error: n3.type + "_" + n3.action, request_url: n3.url, request_hostname: ie(n3.url), request_type: n3.mediaType, request_error_code: o3.status, request_error_text: o3.statusText });
54289
+ var s3 = "".concat(null != n3 && n3.url ? "url: ".concat(n3.url, "\n") : "") + "".concat(null != o3 && o3.status || null != o3 && o3.statusText ? "response: ".concat(null == o3 ? void 0 : o3.status, ", ").concat(null == o3 ? void 0 : o3.statusText, "\n") : "");
54290
+ i3("error", { player_error_code: null == r3 ? void 0 : r3.code, player_error_message: null == r3 ? void 0 : r3.message, player_error_context: s3 });
54291
+ };
54292
+ a4.on("error", m2), a4._stopMuxMonitor = function() {
54293
+ a4.off("manifestLoaded", o2), a4.off("initFragmentLoaded", l2), a4.off("mediaFragmentLoaded", p2), a4.off("qualityChangeRendered", h2), a4.off("error", m2), a4.off("fragmentLoadingAbandoned", v2), delete a4._stopMuxMonitor;
54294
+ };
54295
+ } else
54296
+ r2.warn("Invalid dash.js player reference. Monitoring blocked.");
54297
+ }(this.mux, this.id, e4.dashjs)) : this.mux.log.warn("You must pass a valid dashjs instance in order to track it.");
54298
+ } }, { key: "removeDashJS", value: function() {
54299
+ this.dashjs && (function(e4) {
54300
+ e4 && "function" == typeof e4._stopMuxMonitor && e4._stopMuxMonitor();
54301
+ }(this.dashjs), this.dashjs = void 0);
54302
+ } }]), a3;
54303
+ }(Ee), kt = xt;
54304
+ m();
54305
+ var Et = _2(L());
54306
+ var Dt = ["loadstart", "pause", "play", "playing", "seeking", "seeked", "timeupdate", "ratechange", "stalled", "waiting", "error", "ended"], qt = { 1: "MEDIA_ERR_ABORTED", 2: "MEDIA_ERR_NETWORK", 3: "MEDIA_ERR_DECODE", 4: "MEDIA_ERR_SRC_NOT_SUPPORTED" };
54307
+ var St, At = _2(h());
54308
+ At.default && At.default.WeakMap && (St = /* @__PURE__ */ new WeakMap());
54309
+ var Ot = "#EXT-X-TARGETDURATION", Rt = "#EXT-X-PART-INF", Pt = "#EXT-X-SERVER-CONTROL", Nt = "#EXTINF", It = "#EXT-X-PROGRAM-DATE-TIME", Lt = "#EXT-X-VERSION", Ct = "#EXT-X-SESSION-DATA", jt = function(e3) {
54310
+ return this.buffer = "", this.manifest = { segments: [], serverControl: {}, sessionData: {} }, this.currentUri = {}, this.process(e3), this.manifest;
54311
+ };
54312
+ jt.prototype.process = function(e3) {
54313
+ var t3;
54314
+ for (this.buffer += e3, t3 = this.buffer.indexOf("\n"); t3 > -1; t3 = this.buffer.indexOf("\n"))
54315
+ this.processLine(this.buffer.substring(0, t3)), this.buffer = this.buffer.substring(t3 + 1);
54316
+ }, jt.prototype.processLine = function(e3) {
54317
+ var t3 = e3.indexOf(":"), a3 = Vt(e3, t3), r2 = a3[0], n2 = 2 === a3.length ? Ut(a3[1]) : void 0;
54318
+ if ("#" !== r2[0])
54319
+ this.currentUri.uri = r2, this.manifest.segments.push(this.currentUri), this.manifest.targetDuration && !("duration" in this.currentUri) && (this.currentUri.duration = this.manifest.targetDuration), this.currentUri = {};
54320
+ else
54321
+ switch (r2) {
54322
+ case Ot:
54323
+ if (!isFinite(n2) || n2 < 0)
54324
+ return;
54325
+ this.manifest.targetDuration = n2, this.setHoldBack();
54326
+ break;
54327
+ case Rt:
54328
+ Ht(this.manifest, a3), this.manifest.partInf.partTarget && (this.manifest.partTargetDuration = this.manifest.partInf.partTarget), this.setHoldBack();
54329
+ break;
54330
+ case Pt:
54331
+ Ht(this.manifest, a3), this.setHoldBack();
54332
+ break;
54333
+ case Nt:
54334
+ 0 === n2 ? this.currentUri.duration = 0.01 : n2 > 0 && (this.currentUri.duration = n2);
54335
+ break;
54336
+ case It:
54337
+ var i3 = n2, o2 = new Date(i3);
54338
+ this.manifest.dateTimeString || (this.manifest.dateTimeString = i3, this.manifest.dateTimeObject = o2), this.currentUri.dateTimeString = i3, this.currentUri.dateTimeObject = o2;
54339
+ break;
54340
+ case Lt:
54341
+ Ht(this.manifest, a3);
54342
+ break;
54343
+ case Ct:
54344
+ var s2 = Gt(a3[1]), u2 = ve(s2);
54345
+ Object.assign(this.manifest.sessionData, u2);
54346
+ }
54347
+ }, jt.prototype.setHoldBack = function() {
54348
+ var e3 = this.manifest, t3 = e3.serverControl, a3 = e3.targetDuration, r2 = e3.partTargetDuration;
54349
+ if (t3) {
54350
+ var n2 = "holdBack", i3 = "partHoldBack", o2 = a3 && 3 * a3, s2 = r2 && 2 * r2;
54351
+ a3 && !t3.hasOwnProperty(n2) && (t3[n2] = o2), o2 && t3[n2] < o2 && (t3[n2] = o2), r2 && !t3.hasOwnProperty(i3) && (t3[i3] = 3 * r2), r2 && t3[i3] < s2 && (t3[i3] = s2);
54352
+ }
54353
+ };
54354
+ var Ht = function(e3, t3) {
54355
+ var a3, r2 = Mt(t3[0].replace("#EXT-X-", ""));
54356
+ Wt(t3[1]) ? (a3 = {}, a3 = Object.assign(Ft(t3[1]), a3)) : a3 = Ut(t3[1]), e3[r2] = a3;
54357
+ }, Mt = function(e3) {
54358
+ return e3.toLowerCase().replace(/-(\w)/g, function(e4) {
54359
+ return e4[1].toUpperCase();
54360
+ });
54361
+ }, Ut = function(e3) {
54362
+ if ("yes" === e3.toLowerCase() || "no" === e3.toLowerCase())
54363
+ return "yes" === e3.toLowerCase();
54364
+ var t3 = -1 !== e3.indexOf(":") ? e3 : parseFloat(e3);
54365
+ return isNaN(t3) ? e3 : t3;
54366
+ }, Bt = function(e3) {
54367
+ var t3 = {}, a3 = e3.split("=");
54368
+ a3.length > 1 && (t3[Mt(a3[0])] = Ut(a3[1]));
54369
+ return t3;
54370
+ }, Ft = function(e3) {
54371
+ for (var t3 = e3.split(","), a3 = {}, r2 = 0; t3.length > r2; r2++) {
54372
+ var n2 = t3[r2], i3 = Bt(n2);
54373
+ a3 = Object.assign(i3, a3);
54374
+ }
54375
+ return a3;
54376
+ }, Wt = function(e3) {
54377
+ return e3.indexOf("=") > -1;
54378
+ }, Vt = function(e3, t3) {
54379
+ return -1 === t3 ? [e3] : [e3.substring(0, t3), e3.substring(t3 + 1)];
54380
+ }, Gt = function(e3) {
54381
+ var t3 = {};
54382
+ if (e3) {
54383
+ var a3 = e3.search(",");
54384
+ return [e3.slice(0, a3), e3.slice(a3 + 1)].forEach(function(e4, a4) {
54385
+ for (var r2 = e4.replace(/['"]+/g, "").split("="), n2 = 0; n2 < r2.length; n2++)
54386
+ "DATA-ID" === r2[n2] && (t3["DATA-ID"] = r2[1 - n2]), "VALUE" === r2[n2] && (t3.VALUE = r2[1 - n2]);
54387
+ }), { data: t3 };
54388
+ }
54389
+ }, Qt = jt, Jt = { safeCall: function(e3, t3, a3, r2) {
54390
+ var n2 = r2;
54391
+ if (e3 && "function" == typeof e3[t3])
54392
+ try {
54393
+ n2 = e3[t3].apply(e3, a3);
54394
+ } catch (e4) {
54395
+ G.info("safeCall error", e4);
54396
+ }
54397
+ return n2;
54398
+ }, safeIncrement: de, getComputedStyle: function(e3, t3) {
54399
+ return e3 && t3 && At.default && "function" == typeof At.default.getComputedStyle ? (St && St.has(e3) && (a3 = St.get(e3)), a3 || (a3 = At.default.getComputedStyle(e3, null), St && St.set(e3, a3)), a3.getPropertyValue(t3)) : "";
54400
+ var a3;
54401
+ }, secondsToMs: function(e3) {
54402
+ return Math.floor(1e3 * e3);
54403
+ }, assign: Object.assign, headersStringToObject: _e, cdnHeadersToRequestId: he, extractHostnameAndDomain: oe, extractHostname: ie, manifestParser: Qt, generateShortID: U, generateUUID: M, now: K.now }, zt = { PLAYER_READY: "playerready", VIEW_INIT: "viewinit", VIDEO_CHANGE: "videochange", PLAY: "play", PAUSE: "pause", PLAYING: "playing", TIME_UPDATE: "timeupdate", SEEKING: "seeking", SEEKED: "seeked", REBUFFER_START: "rebufferstart", REBUFFER_END: "rebufferend", ERROR: "error", ENDED: "ended", RENDITION_CHANGE: "renditionchange", ORIENTATION_CHANGE: "orientationchange", AD_REQUEST: "adrequest", AD_RESPONSE: "adresponse", AD_BREAK_START: "adbreakstart", AD_PLAY: "adplay", AD_PLAYING: "adplaying", AD_PAUSE: "adpause", AD_FIRST_QUARTILE: "adfirstquartile", AD_MID_POINT: "admidpoint", AD_THIRD_QUARTILE: "adthirdquartile", AD_ENDED: "adended", AD_BREAK_END: "adbreakend", AD_ERROR: "aderror", REQUEST_COMPLETED: "requestcompleted", REQUEST_FAILED: "requestfailed", REQUEST_CANCELLED: "requestcanceled" }, Kt = {}, Yt = function(e3) {
54404
+ var t3 = arguments;
54405
+ "string" == typeof e3 ? Yt.hasOwnProperty(e3) ? H.default.setTimeout(function() {
54406
+ t3 = Array.prototype.splice.call(t3, 1), Yt[e3].apply(null, t3);
54407
+ }, 0) : G.warn("`" + e3 + "` is an unknown task") : "function" == typeof e3 ? H.default.setTimeout(function() {
54408
+ e3(Yt);
54409
+ }, 0) : G.warn("`" + e3 + "` is invalid.");
54410
+ }, Xt = { loaded: K.now(), NAME: "mux-embed", VERSION: "5.2.1", API_VERSION: "2.1", PLAYER_TRACKED: false, monitor: function(e3, t3) {
54411
+ return function(e4, t4, a3) {
54412
+ var r2 = j(F(t4), 3), n2 = r2[0], i3 = r2[1], o2 = r2[2], s2 = e4.log, u2 = e4.utils.getComputedStyle, d2 = e4.utils.secondsToMs;
54413
+ if (!n2)
54414
+ return s2.error("No element was found with the `" + i3 + "` query selector.");
54415
+ if ("video" !== o2 && "audio" !== o2)
54416
+ return s2.error("The element of `" + i3 + "` was not a media element.");
54417
+ n2.mux && (n2.mux.destroy(), delete n2.mux, s2.warn("Already monitoring this video element, replacing existing event listeners")), (a3 = Object.assign({ automaticErrorTracking: true }, a3)).data = Object.assign({ player_software: "HTML5 Video Element", player_mux_plugin_name: "VideoElementMonitor", player_mux_plugin_version: e4.VERSION }, a3.data), a3.getPlayheadTime = function() {
54418
+ return d2(n2.currentTime);
54419
+ }, a3.getStateData = function() {
54420
+ var e5, t5 = this.hlsjs && this.hlsjs.url, r3 = this.dashjs && v("function" === this.dashjs.getSource) && this.dashjs.getSource(), i4 = { player_is_paused: n2.paused, player_playhead_time: d2(n2.currentTime), player_width: parseInt(u2(n2, "width")), player_height: parseInt(u2(n2, "height")), player_autoplay_on: n2.autoplay, player_preload_on: n2.preload, player_language_code: n2.lang, player_is_fullscreen: Et.default && !!(Et.default.fullscreenElement || Et.default.webkitFullscreenElement || Et.default.mozFullScreenElement || Et.default.msFullscreenElement), video_poster_url: n2.poster, video_source_url: t5 || r3 || n2.currentSrc, video_source_duration: d2(n2.duration), video_source_height: n2.videoHeight, video_source_width: n2.videoWidth, view_dropped_frame_count: null == n2 || null === (e5 = n2.getVideoPlaybackQuality) || void 0 === e5 ? void 0 : e5.call(n2).droppedVideoFrames }, o3 = a3.getPlayheadTime();
54421
+ if (n2.getStartDate && o3 > 0) {
54422
+ var s3 = n2.getStartDate();
54423
+ if (s3 && "function" == typeof s3.getTime && s3.getTime()) {
54424
+ var l3 = s3.getTime();
54425
+ if (i4.player_program_time = l3 + o3, n2.seekable.length > 0) {
54426
+ var c2 = l3 + n2.seekable.end(n2.seekable.length - 1);
54427
+ i4.player_live_edge_program_time = c2;
54428
+ }
54429
+ }
54430
+ }
54431
+ return i4;
54432
+ }, n2.mux = n2.mux || {}, n2.mux.deleted = false, n2.mux.emit = function(t5, a4) {
54433
+ e4.emit(i3, t5, a4);
54434
+ };
54435
+ var l2 = function() {
54436
+ s2.error("The monitor for this video element has already been destroyed.");
54437
+ };
54438
+ n2.mux.destroy = function() {
54439
+ Object.keys(n2.mux.listeners).forEach(function(e5) {
54440
+ n2.removeEventListener(e5, n2.mux.listeners[e5], false);
54441
+ }), delete n2.mux.listeners, n2.mux.destroy = l2, n2.mux.swapElement = l2, n2.mux.emit = l2, n2.mux.addHLSJS = l2, n2.mux.addDashJS = l2, n2.mux.removeHLSJS = l2, n2.mux.removeDashJS = l2, n2.mux.deleted = true, e4.emit(i3, "destroy");
54442
+ }, n2.mux.swapElement = function(t5) {
54443
+ var a4 = j(F(t5), 3), r3 = a4[0], i4 = a4[1], o3 = a4[2];
54444
+ return r3 ? "video" !== o3 && "audio" !== o3 ? e4.log.error("The element of `" + i4 + "` was not a media element.") : (r3.muxId = n2.muxId, delete n2.muxId, r3.mux = r3.mux || {}, r3.mux.listeners = Object.assign({}, n2.mux.listeners), delete n2.mux.listeners, Object.keys(r3.mux.listeners).forEach(function(e5) {
54445
+ n2.removeEventListener(e5, r3.mux.listeners[e5], false), r3.addEventListener(e5, r3.mux.listeners[e5], false);
54446
+ }), r3.mux.swapElement = n2.mux.swapElement, r3.mux.destroy = n2.mux.destroy, delete n2.mux, void (n2 = r3)) : e4.log.error("No element was found with the `" + i4 + "` query selector.");
54447
+ }, n2.mux.addHLSJS = function(t5) {
54448
+ e4.addHLSJS(i3, t5);
54449
+ }, n2.mux.addDashJS = function(t5) {
54450
+ e4.addDashJS(i3, t5);
54451
+ }, n2.mux.removeHLSJS = function() {
54452
+ e4.removeHLSJS(i3);
54453
+ }, n2.mux.removeDashJS = function() {
54454
+ e4.removeDashJS(i3);
54455
+ }, e4.init(i3, a3), e4.emit(i3, "playerready"), n2.paused || (e4.emit(i3, "play"), n2.readyState > 2 && e4.emit(i3, "playing")), n2.mux.listeners = {}, Dt.forEach(function(t5) {
54456
+ "error" === t5 && !a3.automaticErrorTracking || (n2.mux.listeners[t5] = function() {
54457
+ var a4 = {};
54458
+ if ("error" === t5) {
54459
+ if (!n2.error || 1 === n2.error.code)
54460
+ return;
54461
+ a4.player_error_code = n2.error.code, a4.player_error_message = qt[n2.error.code] || n2.error.message;
54462
+ }
54463
+ e4.emit(i3, t5, a4);
54464
+ }, n2.addEventListener(t5, n2.mux.listeners[t5], false));
54465
+ });
54466
+ }(Yt, e3, t3);
54467
+ }, destroyMonitor: function(e3) {
54468
+ var t3 = j(F(e3), 1)[0];
54469
+ t3 && t3.mux && "function" == typeof t3.mux.destroy ? t3.mux.destroy() : G.error("A video element monitor for `" + e3 + "` has not been initialized via `mux.monitor`.");
54470
+ }, addHLSJS: function(e3, t3) {
54471
+ var a3 = B(e3);
54472
+ Kt[a3] ? Kt[a3].addHLSJS(t3) : G.error("A monitor for `" + a3 + "` has not been initialized.");
54473
+ }, addDashJS: function(e3, t3) {
54474
+ var a3 = B(e3);
54475
+ Kt[a3] ? Kt[a3].addDashJS(t3) : G.error("A monitor for `" + a3 + "` has not been initialized.");
54476
+ }, removeHLSJS: function(e3) {
54477
+ var t3 = B(e3);
54478
+ Kt[t3] ? Kt[t3].removeHLSJS() : G.error("A monitor for `" + t3 + "` has not been initialized.");
54479
+ }, removeDashJS: function(e3) {
54480
+ var t3 = B(e3);
54481
+ Kt[t3] ? Kt[t3].removeDashJS() : G.error("A monitor for `" + t3 + "` has not been initialized.");
54482
+ }, init: function(e3, t3) {
54483
+ J() && t3 && t3.respectDoNotTrack && G.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");
54484
+ var a3 = B(e3);
54485
+ Kt[a3] = new kt(Yt, a3, t3);
54486
+ }, emit: function(e3, t3, a3) {
54487
+ var r2 = B(e3);
54488
+ Kt[r2] ? (Kt[r2].emit(t3, a3), "destroy" === t3 && delete Kt[r2]) : G.error("A monitor for `" + r2 + "` has not been initialized.");
54489
+ }, checkDoNotTrack: J, log: G, utils: Jt, events: zt, WINDOW_HIDDEN: false, WINDOW_UNLOADING: false };
54490
+ Object.assign(Yt, Xt), void 0 !== H.default && "function" == typeof H.default.addEventListener && H.default.addEventListener("pagehide", function(e3) {
54491
+ e3.persisted || (Yt.WINDOW_UNLOADING = true);
54492
+ }, false);
54493
+ var $t = Yt;
54494
+ /*!
54495
+ * JavaScript Cookie v2.1.3
54496
+ * https://github.com/js-cookie/js-cookie
54497
+ *
54498
+ * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
54499
+ * Released under the MIT license
54500
+ */
54501
+ var Zt = $t.utils.secondsToMs;
54502
+ function ea(e3, t3) {
54503
+ var a3 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : [], r2 = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : [], n2 = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : function() {
54504
+ return {};
54505
+ }, i3 = false;
54506
+ e3.on("adstart", function() {
54507
+ i3 = true;
54508
+ }), e3.on("adend", function() {
54509
+ i3 = false;
54510
+ }), e3.on("adserror", function() {
54511
+ i3 = false;
54512
+ });
54513
+ var o2 = function() {
54514
+ var r3 = Zt(t3.currentTime()), o3 = function a4() {
54515
+ var o4 = $t.utils.now(), s3 = Zt(t3.currentTime());
54516
+ if (i3) {
54517
+ if (s3 > r3) {
54518
+ var u2 = n2();
54519
+ u2.viewer_time = o4 - Math.max(0, s3 - r3), t3.off("timeupdate", a4), e3.mux.emit("adplaying", u2);
54520
+ }
54521
+ } else
54522
+ t3.off("timeupdate", a4);
54523
+ };
54524
+ t3.on("timeupdate", o3);
54525
+ var s2 = function e4() {
54526
+ t3.off("timeupdate", o3), a3.forEach(function(a4) {
54527
+ t3.off(a4, e4);
54528
+ });
54529
+ };
54530
+ a3.forEach(function(e4) {
54531
+ t3.on(e4, s2);
54532
+ });
54533
+ };
54534
+ r2.forEach(function(e4) {
54535
+ t3.on(e4, o2);
54536
+ });
54537
+ }
54538
+ function ta(e3) {
54539
+ if ("string" != typeof e3)
54540
+ return false;
54541
+ var t3 = e3.split(".").map(function(e4) {
54542
+ return parseInt(e4);
54543
+ }), a3 = t3[0], r2 = t3[1];
54544
+ return a3 > 2 || 2 === a3 && r2 >= 3;
54545
+ }
54546
+ var aa = $t.utils.manifestParser;
54547
+ function ra(e3, t3) {
54548
+ return function(e4) {
54549
+ if (Array.isArray(e4))
54550
+ return e4;
54551
+ }(e3) || function(e4, t4) {
54552
+ var a3 = null == e4 ? null : "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
54553
+ if (null == a3)
54554
+ return;
54555
+ var r2, n2, i3 = [], o2 = true, s2 = false;
54556
+ try {
54557
+ for (a3 = a3.call(e4); !(o2 = (r2 = a3.next()).done) && (i3.push(r2.value), !t4 || i3.length !== t4); o2 = true)
54558
+ ;
54559
+ } catch (e5) {
54560
+ s2 = true, n2 = e5;
54561
+ } finally {
54562
+ try {
54563
+ o2 || null == a3.return || a3.return();
54564
+ } finally {
54565
+ if (s2)
54566
+ throw n2;
54567
+ }
54568
+ }
54569
+ return i3;
54570
+ }(e3, t3) || function(e4, t4) {
54571
+ if (!e4)
54572
+ return;
54573
+ if ("string" == typeof e4)
54574
+ return na(e4, t4);
54575
+ var a3 = Object.prototype.toString.call(e4).slice(8, -1);
54576
+ "Object" === a3 && e4.constructor && (a3 = e4.constructor.name);
54577
+ if ("Map" === a3 || "Set" === a3)
54578
+ return Array.from(e4);
54579
+ if ("Arguments" === a3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a3))
54580
+ return na(e4, t4);
54581
+ }(e3, t3) || function() {
54582
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
54583
+ }();
54584
+ }
54585
+ function na(e3, t3) {
54586
+ (null == t3 || t3 > e3.length) && (t3 = e3.length);
54587
+ for (var a3 = 0, r2 = new Array(t3); a3 < t3; a3++)
54588
+ r2[a3] = e3[a3];
54589
+ return r2;
54590
+ }
54591
+ var ia = $t.utils, oa = ia.assign, sa = ia.secondsToMs;
54592
+ function ua(e3, t3, a3) {
54593
+ var r2 = 0;
54594
+ return function() {
54595
+ var n2, i3 = t3.readyState;
54596
+ if (i3 >= 2) {
54597
+ if (r2 = r2 || $t.utils.now(), 4 !== i3)
54598
+ return;
54599
+ var o2 = e3(), s2 = o2.mux.utils.extractHostnameAndDomain, u2 = o2.mux.utils.headersStringToObject, d2 = $t.utils.now(), l2 = ra(s2(t3.responseURL), 1)[0], c2 = "arraybuffer" === t3.responseType ? t3.response.byteLength : t3.responseText.length, p2 = u2(t3.getAllResponseHeaders ? t3.getAllResponseHeaders() : ""), f2 = function(e4) {
54600
+ var t4 = e4["content-type"];
54601
+ return t4 ? t4.match(/^audio\/mpegurl/i) ? "manifest" : t4.match(/^audio.*/i) ? "audio" : t4.match(/^video.*/) ? "video" : t4.match(/^application\/x-mpegurl/i) || t4.match(/^application\/vnd.apple.mpegurl/i) || t4.match(/^application\/dash+xml/i) ? "manifest" : "unknown" : "unknown";
54602
+ }(p2);
54603
+ if (t3.status >= 200 && t3.status < 300) {
54604
+ var _3 = { request_start: a3, request_response_start: r2, request_response_end: d2, request_bytes_loaded: c2, request_hostname: l2, request_url: t3.responseURL, request_response_headers: p2, request_type: f2 };
54605
+ if ("manifest" === f2) {
54606
+ var h2, v2, m2, y2, g2, b2, w2, T2 = (n2 = t3.responseText, new aa(n2));
54607
+ if (T2) {
54608
+ h2 = T2.partTargetDuration, v2 = T2.targetDuration, m2 = T2.segments;
54609
+ var x2 = T2.serverControl;
54610
+ y2 = x2.partHoldBack, g2 = x2.holdBack, w2 = T2.sessionData;
54611
+ var k2 = m2[m2.length - 1];
54612
+ k2 && k2.dateTimeObject && (b2 = k2.dateTimeObject.getTime() + sa(k2.duration)), _3 = oa(_3, { video_holdback: g2 && sa(g2), video_part_holdback: y2 && sa(y2), video_part_target_duration: h2 && sa(h2), video_target_duration: v2 && sa(v2), player_manifest_newest_program_time: b2 }), w2 && (_3 = oa(_3, w2));
54613
+ }
54614
+ }
54615
+ o2.mux.emit("requestcompleted", _3);
54616
+ } else {
54617
+ var E2 = { request_hostname: ra(s2(t3.responseURL), 1)[0], request_url: t3.responseURL, request_type: f2 };
54618
+ o2.mux.emit("requestfailed", E2);
54619
+ }
54620
+ }
54621
+ };
54622
+ }
54623
+ function da(e3, t3) {
54624
+ var a3, r2 = function(t4) {
54625
+ return function(a4) {
54626
+ var r3 = $t.utils.now();
54627
+ try {
54628
+ t4(a4);
54629
+ } catch (e4) {
54630
+ }
54631
+ try {
54632
+ a4.onreadystatechange = function(t5, a5, r4) {
54633
+ var n2 = ua(e3, t5, a5);
54634
+ return function() {
54635
+ try {
54636
+ n2();
54637
+ } catch (e4) {
54638
+ }
54639
+ try {
54640
+ r4();
54641
+ } catch (e4) {
54642
+ }
54643
+ };
54644
+ }(a4, r3, a4.onreadystatechange || function() {
54645
+ });
54646
+ } catch (e4) {
54647
+ }
54648
+ };
54649
+ };
54650
+ "function" == typeof (null == t3 ? void 0 : t3.onRequest) ? t3.onRequest(function(e4) {
54651
+ return e4.beforeSend = r2(e4.beforeSend || function() {
54652
+ }), e4;
54653
+ }) : t3.beforeRequest = (a3 = t3.beforeRequest || function(e4) {
54654
+ return e4;
54655
+ }, function(e4) {
54656
+ var t4 = a3(e4);
54657
+ return t4 ? (t4.beforeSend = r2(t4.beforeSend || function() {
54658
+ }), t4) : e4;
54659
+ });
54660
+ }
54661
+ var la = function(e3) {
54662
+ var t3, a3 = function(e4) {
54663
+ for (var t4, a4 = e4.textTracks(), r2 = 0; r2 < a4.length; r2++)
54664
+ "segment-metadata" === a4[r2].label && (t4 = a4[r2]);
54665
+ return t4;
54666
+ }(e3);
54667
+ a3 && a3.on && a3.on("cuechange", function() {
54668
+ try {
54669
+ var a4 = e3.tech({ IWillNotUseThisInPlugins: true }), r2 = (a4.vhs || a4.hls).playlists.media().attributes.BANDWIDTH;
54670
+ t3 !== r2 && e3.mux.emit("renditionchange", { video_source_bitrate: r2 }), t3 = r2;
54671
+ } catch (t4) {
54672
+ e3.mux && e3.mux.log && e3.mux.log.warn && e3.mux.log.warn("Cannot retrieve BANDWIDTH information from player: ".concat(t4));
54673
+ }
54674
+ });
54675
+ };
54676
+ function ca(e3, t3) {
54677
+ return function(e4) {
54678
+ if (Array.isArray(e4))
54679
+ return e4;
54680
+ }(e3) || function(e4, t4) {
54681
+ var a3 = null == e4 ? null : "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
54682
+ if (null == a3)
54683
+ return;
54684
+ var r2, n2, i3 = [], o2 = true, s2 = false;
54685
+ try {
54686
+ for (a3 = a3.call(e4); !(o2 = (r2 = a3.next()).done) && (i3.push(r2.value), !t4 || i3.length !== t4); o2 = true)
54687
+ ;
54688
+ } catch (e5) {
54689
+ s2 = true, n2 = e5;
54690
+ } finally {
54691
+ try {
54692
+ o2 || null == a3.return || a3.return();
54693
+ } finally {
54694
+ if (s2)
54695
+ throw n2;
54696
+ }
54697
+ }
54698
+ return i3;
54699
+ }(e3, t3) || function(e4, t4) {
54700
+ if (!e4)
54701
+ return;
54702
+ if ("string" == typeof e4)
54703
+ return pa(e4, t4);
54704
+ var a3 = Object.prototype.toString.call(e4).slice(8, -1);
54705
+ "Object" === a3 && e4.constructor && (a3 = e4.constructor.name);
54706
+ if ("Map" === a3 || "Set" === a3)
54707
+ return Array.from(e4);
54708
+ if ("Arguments" === a3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a3))
54709
+ return pa(e4, t4);
54710
+ }(e3, t3) || function() {
54711
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
54712
+ }();
54713
+ }
54714
+ function pa(e3, t3) {
54715
+ (null == t3 || t3 > e3.length) && (t3 = e3.length);
54716
+ for (var a3 = 0, r2 = new Array(t3); a3 < t3; a3++)
54717
+ r2[a3] = e3[a3];
54718
+ return r2;
54719
+ }
54720
+ var fa = /* @__PURE__ */ new Map();
54721
+ var _a, ha = $t.log, va = $t.utils.assign, ma = $t.utils.safeCall, ya = $t.utils.getComputedStyle, ga = $t.utils.secondsToMs, ba = ["loadstart", "pause", "play", "playing", "seeking", "seeked", "timeupdate", "ratechange", "stalled", "waiting", "error", "ended"];
54722
+ function wa(e3) {
54723
+ var a3 = e3;
54724
+ return function(e4) {
54725
+ var r2, n2;
54726
+ if (a3.IS_IE8)
54727
+ return false;
54728
+ var i3 = this, o2 = i3.id(), s2 = (null === (r2 = i3.tech) || void 0 === r2 || null === (n2 = r2.call(i3, true)) || void 0 === n2 ? void 0 : n2.el()) || i3.tag, u2 = _a && (_a.get(s2) || _a.get(i3.el()));
54729
+ (e4 = va({ automaticErrorTracking: true }, e4)).data = va({ player_software_name: "Video.js", player_software_version: a3.VERSION || "< 4.11", player_mux_plugin_name: "videojs-mux", player_mux_plugin_version: "4.19.0", player_init_time: u2 }, e4.data), e4.getPlayheadTime = function() {
54730
+ return ga(i3.currentTime());
54731
+ }, e4.getStateData = function() {
54732
+ var e5 = ma(i3, "videoHeight"), t3 = ma(i3, "videoWidth");
54733
+ if (void 0 === t3 || void 0 === e5) {
54734
+ var a4 = i3.el().firstChild;
54735
+ a4 && "VIDEO" === a4.nodeName.toUpperCase() && (e5 = a4.videoHeight, t3 = a4.videoWidth);
54736
+ }
54737
+ return { player_is_paused: ma(i3, "paused"), player_is_fullscreen: ma(i3, "isFullscreen"), player_autoplay_on: !!ma(i3, "autoplay"), player_preload_on: ma(i3, "preload"), player_width: parseInt(ya(i3.el(), "width"), 10), player_height: parseInt(ya(i3.el(), "height"), 10), player_language_code: ma(i3, "language"), video_poster_url: ma(i3, "poster"), video_source_url: ma(i3, "currentSrc"), video_source_mime_type: ma(i3, "currentType") && ma(i3, "currentType").toLowerCase(), video_source_duration: ga(ma(i3, "duration") || 0), video_source_is_live: i3.duration() === 1 / 0, video_source_height: e5, video_source_width: t3 };
54738
+ }, i3.mux = function() {
54739
+ ha.error("[videojs-mux] The plugin was initialized more than once.");
54740
+ }, i3.mux.emit = function(e5, t3) {
54741
+ $t.emit(o2, e5, t3);
54742
+ }, i3.mux.addHLSJS = function(e5) {
54743
+ $t.addHLSJS(o2, e5);
54744
+ }, i3.mux.log = ha, i3.mux.utils = $t.utils, $t.init(o2, e4);
54745
+ var d2 = false, l2 = function() {
54746
+ d2 || i3.mux.emit("playerready"), d2 = true;
54747
+ };
54748
+ i3.ready(function() {
54749
+ i3.addClass("vjs-mux"), t2().setTimeout(l2, 0);
54750
+ });
54751
+ var c2 = false;
54752
+ i3.one("play", l2), ba.forEach(function(t3) {
54753
+ ("error" !== t3 || e4.automaticErrorTracking) && i3.on(t3, function() {
54754
+ if (!c2) {
54755
+ var e5 = {};
54756
+ if ("error" === t3) {
54757
+ var a4 = ma(i3, "error");
54758
+ if (a4) {
54759
+ if (1 === a4.code)
54760
+ return;
54761
+ e5 = { player_error_code: a4.code, player_error_message: a4.message, player_error_context: a4.status };
54762
+ }
54763
+ }
54764
+ i3.mux.emit(t3, e5);
54765
+ }
54766
+ });
54767
+ });
54768
+ var p2 = false;
54769
+ i3.on("play", function() {
54770
+ p2 = true;
54771
+ }), i3.on("pause", function() {
54772
+ p2 = false;
54773
+ }), i3.on("adstart", function() {
54774
+ c2 = true, p2 && i3.mux.emit("pause"), i3.mux.emit("adbreakstart");
54775
+ }), i3.on("adend", function() {
54776
+ i3.mux.emit("adbreakend"), c2 = false, ma(i3, "paused") || (i3.mux.emit("play"), p2 = true, i3.onceux && i3.mux.emit("playing"));
54777
+ }), i3.ima && function(e5) {
54778
+ var t3, a4, r3, n3, i4, o3, s3 = function(t4) {
54779
+ var a5 = "function" == typeof (t4 = t4 || {}).getAdData ? t4.getAdData() : {}, r4 = "function" == typeof t4.getAd ? t4.getAd() : {}, n4 = "function" == typeof r4.getMediaUrl ? r4.getMediaUrl() : a5.mediaUrl, i5 = null == a5 ? void 0 : a5.adId, o4 = null == a5 ? void 0 : a5.creativeId, s4 = null == a5 ? void 0 : a5.universalAdIdValue, u4 = e5.ima.settings || {}, d4 = {};
54780
+ return n4 && (d4.ad_asset_url = n4), u4.adTagUrl && (d4.ad_tag_url = u4.adTagUrl), i5 && (d4.ad_id = i5), o4 && (d4.ad_creative_id = o4), s4 && (d4.ad_universal_id = s4), d4;
54781
+ };
54782
+ try {
54783
+ var u3 = window.google.ima.AdEvent.Type;
54784
+ t3 = u3.LOADED, a4 = u3.STARTED, r3 = u3.COMPLETE, n3 = u3.PAUSED, i4 = u3.RESUMED, o3 = u3.SKIPPED;
54785
+ } catch (e6) {
54786
+ t3 = "loaded", a4 = "start", r3 = "complete", n3 = "pause", i4 = "resume", o3 = "skip";
54787
+ }
54788
+ var d3 = 0;
54789
+ e5.mux.triggerAdRequest = function() {
54790
+ d3++, e5.mux.emit("adrequest", s3());
54791
+ }, e5.on("adsready", function() {
54792
+ var u4 = e5.ima.addEventListener || function() {
54793
+ };
54794
+ u4(t3, function(t4) {
54795
+ var a5 = s3(t4);
54796
+ d3 > 0 && (d3--, e5.mux.emit("adresponse", a5)), e5.mux.emit("adplay", a5);
54797
+ }), u4(a4, function(t4) {
54798
+ var a5 = s3(t4);
54799
+ e5.mux.emit("adplaying", a5);
54800
+ }), u4(i4, function(t4) {
54801
+ var a5 = s3(t4);
54802
+ e5.mux.emit("adplay", a5), e5.mux.emit("adplaying", a5);
54803
+ }), u4(n3, function(t4) {
54804
+ var a5 = s3(t4);
54805
+ e5.mux.emit("adpause", a5);
54806
+ }), u4(r3, function(t4) {
54807
+ var a5 = s3(t4);
54808
+ e5.mux.emit("adended", a5);
54809
+ }), u4(o3, function(t4) {
54810
+ var a5 = s3(t4);
54811
+ e5.mux.emit("adended", a5);
54812
+ }), e5.on("adserror", function() {
54813
+ d3 > 0 && (d3--, e5.mux.emit("adresponse")), e5.mux.emit("aderror");
54814
+ });
54815
+ });
54816
+ }(i3), i3.onceux && function(e5) {
54817
+ ea(e5, e5, ["onceux-linearad-pause", "onceux-linearad-skipped", "onceux-linearad-complete", "adserror"], ["adstart", "onceux-linearad-resume"]), e5.on("adstart", function() {
54818
+ e5.mux.emit("adplay");
54819
+ }), e5.on("onceux-linearad-start", function(t3) {
54820
+ t3.linearAd && t3.linearAd.index > 0 && (e5.mux.emit("adplay"), e5.mux.emit("adplaying"));
54821
+ }), e5.on("onceux-linearad-resume", function() {
54822
+ e5.mux.emit("adplay");
54823
+ }), e5.on("onceux-linearad-pause", function() {
54824
+ e5.mux.emit("adpause");
54825
+ }), e5.on("onceux-linearad-complete", function() {
54826
+ e5.mux.emit("adended");
54827
+ }), e5.on("onceux-linearad-skipped", function() {
54828
+ e5.mux.emit("adended");
54829
+ });
54830
+ }(i3), i3.ima3 && "function" == typeof i3.ima3.ready && function(e5) {
54831
+ var t3 = function() {
54832
+ var t4 = e5.ima3.currentAd, a5 = e5.ima3.settings, r4 = {};
54833
+ return t4 && (r4.ad_asset_url = t4.mediaUrl), a5 && (r4.ad_tag_url = a5.serverUrl), r4;
54834
+ };
54835
+ if (ta(e5.ima3.version)) {
54836
+ var a4 = 0, r3 = function() {
54837
+ a4 > 0 && (a4--, e5.mux.emit("adresponse", t3()));
54838
+ };
54839
+ e5.on("ads-request", function() {
54840
+ a4++, e5.mux.emit("adrequest", t3());
54841
+ }), e5.on("ads-load", function() {
54842
+ r3(), e5.mux.emit("adplay", t3());
54843
+ }), e5.on("adserror", function() {
54844
+ r3(), e5.mux.emit("aderror");
54845
+ }), e5.on("ads-play", function() {
54846
+ e5.mux.emit("adplay", t3());
54847
+ }), e5.on("ads-pause", function() {
54848
+ e5.mux.emit("adpause", t3());
54849
+ }), e5.on("ads-ad-ended", function() {
54850
+ e5.mux.emit("adended", t3());
54851
+ });
54852
+ }
54853
+ e5.ima3.ready(function() {
54854
+ e5.ima3.adPlayer ? (ta(e5.ima3.version) || (e5.ima3.adPlayer.on("play", function() {
54855
+ e5.mux.emit("adplay");
54856
+ }), e5.ima3.adPlayer.on("pause", function() {
54857
+ e5.mux.emit("adpause");
54858
+ }), e5.ima3.adPlayer.on("ended", function() {
54859
+ e5.mux.emit("adended");
54860
+ })), ea(e5, e5.ima3.adPlayer, ["pause", "ended", "adserror"], ["play"], t3)) : (e5.mux.log("Legacy IMA3 plugin found, ad events may not track correctly."), e5.on("ads-ad-started", function() {
54861
+ e5.mux.emit("adplaying", t3());
54862
+ }), e5.on("ads-play", function() {
54863
+ e5.mux.emit("adplaying", t3());
54864
+ }));
54865
+ });
54866
+ }(i3), i3.FreeWheelPlugin && i3.FreeWheelPlugin.VERSION && function(e5) {
54867
+ var t3 = function(t4) {
54868
+ var a4 = e5.FreeWheelPlugin, r3 = {};
54869
+ switch (t4) {
54870
+ case "adplay":
54871
+ case "adplaying":
54872
+ case "adpause":
54873
+ r3.ad_asset_url = e5.currentSrc();
54874
+ }
54875
+ return a4 && (r3.ad_tag_url = "html5" === a4.tech.toLowerCase() ? a4.settings.Html5.serverUrl : a4.settings.Flash.serverUrl), r3;
54876
+ };
54877
+ e5.on("ads-request", function() {
54878
+ e5.mux.emit("adrequest", t3("adrequest"));
54879
+ }), e5.on("ads-load", function() {
54880
+ e5.mux.emit("adresponse", t3("adresponse"));
54881
+ }), e5.on("adserror", function() {
54882
+ e5.mux.emit("aderror");
54883
+ }), e5.on("ads-ad-started", function() {
54884
+ e5.mux.emit("adplay", t3("adplay")), e5.mux.emit("adplaying", t3("adplaying"));
54885
+ }), e5.on("ads-play", function() {
54886
+ e5.mux.emit("adplay", t3("adplay")), e5.mux.emit("adplaying", t3("adplaying"));
54887
+ }), e5.on("ads-pause", function() {
54888
+ e5.mux.emit("adpause", t3("adpause"));
54889
+ }), e5.on("ads-ad-ended", function() {
54890
+ e5.mux.emit("adended", t3("adended"));
54891
+ }), e5.on("adend", function() {
54892
+ e5.mux.emit("play");
54893
+ });
54894
+ }(i3), i3.on("dispose", function() {
54895
+ i3.mux.emit("destroy"), _a.delete(i3);
54896
+ });
54897
+ };
54898
+ }
54899
+ function Ta(e3) {
54900
+ (e3.registerPlugin || e3.plugin || function() {
54901
+ $t.log.error("No valid method to register videojs plugin available.");
54902
+ })("mux", wa(e3)), function(e4) {
54903
+ if (!fa.get(e4) && (fa.set(e4, "video.js ".concat(e4.VERSION, " initialized")), "function" == typeof e4.getTech))
54904
+ for (var t3 = (e4.getTech("Html5") || {}).sourceHandlers, a3 = e4.Vhs || e4.Hls, r2 = function(r3) {
54905
+ var n3 = t3[r3], i3 = n3.handleSource;
54906
+ n3.handleSource = function(t4, r4) {
54907
+ var n4 = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
54908
+ a3 && a3.xhr && da(function() {
54909
+ return e4(r4.el());
54910
+ }, a3.xhr);
54911
+ var o2 = i3(t4, r4, n4);
54912
+ if (o2 && "function" == typeof o2.xhr)
54913
+ try {
54914
+ var s2 = ca(e4.VERSION.split("."), 2), u2 = s2[0], d2 = s2[1];
54915
+ u2 = parseInt(u2), d2 = parseInt(d2);
54916
+ var l2 = u2 >= 7 && d2 >= 4 ? o2.player().id() : o2.player_.el_.parentNode.id;
54917
+ la(e4(l2));
54918
+ } catch (e5) {
54919
+ }
54920
+ return o2;
54921
+ };
54922
+ }, n2 = 0; n2 < t3.length; n2++)
54923
+ r2(n2);
54924
+ }(e3);
54925
+ }
54926
+ _a = "undefined" != typeof WeakMap ? /* @__PURE__ */ new WeakMap() : /* @__PURE__ */ new Map(), i2().hook && i2().hook("beforesetup", function(e3, t3) {
54927
+ return _a.set(e3, $t.utils.now()), t3;
54928
+ }), Ta(i2());
54929
+ }(), n;
54930
+ }();
54931
+ });
54932
+ }();
54933
+ })(videojsMux);
54934
+ module$2.service("VJSAnalyticsPlugin", [function() {
54935
+ const Plugin2 = videojs$1.getPlugin("plugin");
54936
+ const plugin = videojs$1.extend(Plugin2, {
54937
+ constructor: function(player, options) {
54938
+ Plugin2.call(this, player, options);
54939
+ }
54940
+ });
54941
+ plugin.pluginName = "analytics";
54942
+ return plugin;
54943
+ }]);
52730
54944
  module$2.run([
52731
54945
  "VJSPlaylistPlugin",
52732
54946
  "VJSHlsJsPlugin",
@@ -52740,7 +54954,8 @@ var require_stream_engine_player = __commonJS({
52740
54954
  "VJSTransform",
52741
54955
  "VJSSeekButtons",
52742
54956
  "VJSSourceSelector",
52743
- function(VJSPlaylistPlugin, VJSHlsJsPlugin, VJSManualHlsPlugin, VJSContentFitPlugin, VJSCropperPlugin, VJSElementWrapperPlugin, VJSAutoplaySupportPlugin, VJSResponsiveScrubbing, VJSPostMessagesPlugin, VJSTransform, VJSSeekButtons, VJSSourceSelector) {
54957
+ "VJSAnalyticsPlugin",
54958
+ function(VJSPlaylistPlugin, VJSHlsJsPlugin, VJSManualHlsPlugin, VJSContentFitPlugin, VJSCropperPlugin, VJSElementWrapperPlugin, VJSAutoplaySupportPlugin, VJSResponsiveScrubbing, VJSPostMessagesPlugin, VJSTransform, VJSSeekButtons, VJSSourceSelector, VJSAnalyticsPlugin) {
52744
54959
  videojs$1.registerPlugin(VJSPlaylistPlugin.pluginName, VJSPlaylistPlugin);
52745
54960
  videojs$1.registerPlugin(VJSHlsJsPlugin.pluginName, VJSHlsJsPlugin);
52746
54961
  videojs$1.registerPlugin(VJSManualHlsPlugin.pluginName, VJSManualHlsPlugin);
@@ -52753,6 +54968,7 @@ var require_stream_engine_player = __commonJS({
52753
54968
  videojs$1.registerPlugin(VJSTransform.pluginName, VJSTransform);
52754
54969
  videojs$1.registerPlugin(VJSSeekButtons.pluginName, VJSSeekButtons);
52755
54970
  videojs$1.registerPlugin(VJSSourceSelector.pluginName, VJSSourceSelector);
54971
+ videojs$1.registerPlugin(VJSAnalyticsPlugin.pluginName, VJSAnalyticsPlugin);
52756
54972
  }
52757
54973
  ]);
52758
54974
  module$2.factory("VJSFullscreenToggle", function() {
@@ -55912,7 +58128,6 @@ var require_stream_engine_player = __commonJS({
55912
58128
  }, { "@vimeo/player": 1 }] }, {}, [2])(2);
55913
58129
  });
55914
58130
  var Youtube = { exports: {} };
55915
- const require$$0 = /* @__PURE__ */ getAugmentedNamespace(video_es);
55916
58131
  (function(module2, exports2) {
55917
58132
  (function(root, factory) {
55918
58133
  {
@@ -59998,7 +62213,6 @@ var require_stream_engine_player = __commonJS({
59998
62213
  player.removeClass("vjs-ad-paused");
59999
62214
  }
60000
62215
  );
60001
- tracker.trackAds();
60002
62216
  let isLoop = false;
60003
62217
  player.on("adstart", () => {
60004
62218
  try {
@@ -60191,7 +62405,7 @@ var require_stream_engine_player = __commonJS({
60191
62405
  let dashify = (str) => {
60192
62406
  return str.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase());
60193
62407
  };
60194
- let func = (id, options = {}) => {
62408
+ let initPlayer = (id, options = {}) => {
60195
62409
  let player = document.getElementById(id);
60196
62410
  if (player) {
60197
62411
  for (const [key, value] of Object.entries(options)) {
@@ -60203,7 +62417,32 @@ var require_stream_engine_player = __commonJS({
60203
62417
  });
60204
62418
  }
60205
62419
  };
60206
- window.streamEnginePlayer = func;
62420
+ let bootstrap = (id, options = {}) => {
62421
+ if (options.adTagUrl) {
62422
+ loadIMASDK(
62423
+ () => {
62424
+ initPlayer(id, options);
62425
+ },
62426
+ () => {
62427
+ delete options.adTagUrl;
62428
+ initPlayer(id, options);
62429
+ }
62430
+ );
62431
+ } else {
62432
+ initPlayer(id, options);
62433
+ }
62434
+ };
62435
+ function loadIMASDK(success, fail) {
62436
+ if (window.google)
62437
+ return success();
62438
+ const script = document.createElement("script");
62439
+ script.src = "//imasdk.googleapis.com/js/sdkloader/ima3.js";
62440
+ script.async = true;
62441
+ script.onload = success;
62442
+ script.onerror = fail;
62443
+ document.head.appendChild(script);
62444
+ }
62445
+ window.streamEnginePlayer = bootstrap;
60207
62446
  console.log(`Stream Engine Player version: ${packageJSON.version}`);
60208
62447
  }
60209
62448
  });