@cloudflare/realtimekit 2.0.4-staging.3 → 2.0.4-staging.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es5.js CHANGED
@@ -3,7 +3,7 @@ import af from "bowser";
3
3
  import { MessageType as A, PbLong as Xo, typeofJsonValue as Um } from "@protobuf-ts/runtime";
4
4
  import * as Uu from "worker-timers";
5
5
  import * as Nn from "sdp-transform";
6
- var wm = ["chat", "connectedMeetings", "plugins", "polls", "media"], bm = ["id"], Pm = ["meetingId"], ee, Gn, Je, ya, nl, ro, Jn, il, Cc, xi, ea, Co, an, ta, Kn, ka, no, zn, io, ao, sn, ra, It, Qn, Er, so, oo, Yn, tr, Ea, un, ai, Rc, Ro, _o, Ao, Ta, na, ia, aa, qt, Ne, sa, oa, Dt, Xn, mn, Zn, _c, st, uo, cn, xn, Cr, Ac, co, Ic, Mc, ke, lo, ei, ua, ti, bt, Wt, ur, on, je, _r, si, ri, Oc, Dc, ho, Lc, Nc, Vc, ca, ot, la, $e, Rr, Ve, da, be, wa, ba, po, Cl, ha, Gt, Z, ut, Zl, cr, Pa, me, ze, yn, pn, oi, ui, dn, xt, lr, vn, ci, lt, kn, dt, Ae, vo, al, sl, $c, Io, Mo, ii, ol, ul, fo, $o, go, cl, mo, yo, he, _e, ni;
6
+ var wm = ["chat", "connectedMeetings", "plugins", "polls", "media"], bm = ["id"], Pm = ["meetingId"], ee, Gn, Je, ya, nl, ro, Jn, il, Cc, xi, ea, Co, an, ta, Kn, ka, no, zn, io, ao, sn, ra, It, Qn, Er, so, oo, Yn, tr, Ea, un, ai, Rc, Ro, _o, Ao, Ta, na, ia, aa, qt, Ne, sa, oa, Dt, Xn, mn, Zn, _c, ot, uo, cn, xn, Cr, Ac, co, Ic, Mc, ke, lo, ei, ua, ti, bt, Wt, ur, on, je, _r, si, ri, Oc, Dc, ho, Lc, Nc, Vc, ca, ut, la, $e, Rr, Ve, da, be, wa, ba, po, Cl, ha, Gt, Z, xe, Zl, cr, Pa, me, ze, yn, pn, oi, ui, dn, xt, lr, vn, ci, lt, kn, dt, Ae, vo, al, sl, $c, Io, Mo, ii, ol, ul, fo, $o, go, cl, mo, yo, he, _e, ni;
7
7
  function Gh(s, r) {
8
8
  if (s == null)
9
9
  return {};
@@ -215,7 +215,7 @@ function Nm(s) {
215
215
  function h() {
216
216
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
217
217
  var s, r, e = typeof Symbol == "function" ? Symbol : {}, t = e.iterator || "@@iterator", n = e.toStringTag || "@@toStringTag";
218
- function i(f, g, y, k) {
218
+ function i(f, g, k, y) {
219
219
  var b = g && g.prototype instanceof o ? g : o, T = Object.create(b.prototype);
220
220
  return Kr(T, "_invoke", function(E, I, M) {
221
221
  var _, O, L, q = 0, X = M || [], Y = !1, H = { p: 0, n: 0, v: s, a: J, f: J.bind(s, 4), d: function(U, x) {
@@ -256,7 +256,7 @@ function h() {
256
256
  }
257
257
  return { value: r, done: Y };
258
258
  };
259
- }(f, y, k), !0), T;
259
+ }(f, k, y), !0), T;
260
260
  }
261
261
  var a = {};
262
262
  function o() {
@@ -945,42 +945,42 @@ function Xm(s) {
945
945
  var pf = Number.isNaN || function(r) {
946
946
  return r !== r;
947
947
  };
948
- function tt() {
949
- tt.init.call(this);
948
+ function rt() {
949
+ rt.init.call(this);
950
950
  }
951
- Ym.exports = tt;
951
+ Ym.exports = rt;
952
952
  Pr.once = ty;
953
- tt.EventEmitter = tt;
954
- tt.prototype._events = void 0;
955
- tt.prototype._eventsCount = 0;
956
- tt.prototype._maxListeners = void 0;
953
+ rt.EventEmitter = rt;
954
+ rt.prototype._events = void 0;
955
+ rt.prototype._eventsCount = 0;
956
+ rt.prototype._maxListeners = void 0;
957
957
  var Ip = 10;
958
958
  function Rl(s) {
959
959
  if (typeof s != "function")
960
960
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + ye(s));
961
961
  }
962
- Object.defineProperty(tt, "defaultMaxListeners", { enumerable: !0, get: function() {
962
+ Object.defineProperty(rt, "defaultMaxListeners", { enumerable: !0, get: function() {
963
963
  return Ip;
964
964
  }, set: function(r) {
965
965
  if (typeof r != "number" || r < 0 || pf(r))
966
966
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + r + ".");
967
967
  Ip = r;
968
968
  } });
969
- tt.init = function() {
969
+ rt.init = function() {
970
970
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
971
971
  };
972
- tt.prototype.setMaxListeners = function(r) {
972
+ rt.prototype.setMaxListeners = function(r) {
973
973
  if (typeof r != "number" || r < 0 || pf(r))
974
974
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + r + ".");
975
975
  return this._maxListeners = r, this;
976
976
  };
977
977
  function vf(s) {
978
- return s._maxListeners === void 0 ? tt.defaultMaxListeners : s._maxListeners;
978
+ return s._maxListeners === void 0 ? rt.defaultMaxListeners : s._maxListeners;
979
979
  }
980
- tt.prototype.getMaxListeners = function() {
980
+ rt.prototype.getMaxListeners = function() {
981
981
  return vf(this);
982
982
  };
983
- tt.prototype.emit = function(r) {
983
+ rt.prototype.emit = function(r) {
984
984
  for (var e = [], t = 1; t < arguments.length; t++)
985
985
  e.push(arguments[t]);
986
986
  var n = r === "error", i = this._events;
@@ -1016,11 +1016,11 @@ function ff(s, r, e, t) {
1016
1016
  }
1017
1017
  return s;
1018
1018
  }
1019
- tt.prototype.addListener = function(r, e) {
1019
+ rt.prototype.addListener = function(r, e) {
1020
1020
  return ff(this, r, e, !1);
1021
1021
  };
1022
- tt.prototype.on = tt.prototype.addListener;
1023
- tt.prototype.prependListener = function(r, e) {
1022
+ rt.prototype.on = rt.prototype.addListener;
1023
+ rt.prototype.prependListener = function(r, e) {
1024
1024
  return ff(this, r, e, !0);
1025
1025
  };
1026
1026
  function Zm() {
@@ -1031,13 +1031,13 @@ function gf(s, r, e) {
1031
1031
  var t = { fired: !1, wrapFn: void 0, target: s, type: r, listener: e }, n = Zm.bind(t);
1032
1032
  return n.listener = e, t.wrapFn = n, n;
1033
1033
  }
1034
- tt.prototype.once = function(r, e) {
1034
+ rt.prototype.once = function(r, e) {
1035
1035
  return Rl(e), this.on(r, gf(this, r, e)), this;
1036
1036
  };
1037
- tt.prototype.prependOnceListener = function(r, e) {
1037
+ rt.prototype.prependOnceListener = function(r, e) {
1038
1038
  return Rl(e), this.prependListener(r, gf(this, r, e)), this;
1039
1039
  };
1040
- tt.prototype.removeListener = function(r, e) {
1040
+ rt.prototype.removeListener = function(r, e) {
1041
1041
  var t, n, i, a, o;
1042
1042
  if (Rl(e), n = this._events, n === void 0)
1043
1043
  return this;
@@ -1057,8 +1057,8 @@ tt.prototype.removeListener = function(r, e) {
1057
1057
  }
1058
1058
  return this;
1059
1059
  };
1060
- tt.prototype.off = tt.prototype.removeListener;
1061
- tt.prototype.removeAllListeners = function(r) {
1060
+ rt.prototype.off = rt.prototype.removeListener;
1061
+ rt.prototype.removeAllListeners = function(r) {
1062
1062
  var e, t, n;
1063
1063
  if (t = this._events, t === void 0)
1064
1064
  return this;
@@ -1084,16 +1084,16 @@ function mf(s, r, e) {
1084
1084
  var n = t[r];
1085
1085
  return n === void 0 ? [] : typeof n == "function" ? e ? [n.listener || n] : [n] : e ? ey(n) : kf(n, n.length);
1086
1086
  }
1087
- tt.prototype.listeners = function(r) {
1087
+ rt.prototype.listeners = function(r) {
1088
1088
  return mf(this, r, !0);
1089
1089
  };
1090
- tt.prototype.rawListeners = function(r) {
1090
+ rt.prototype.rawListeners = function(r) {
1091
1091
  return mf(this, r, !1);
1092
1092
  };
1093
- tt.listenerCount = function(s, r) {
1093
+ rt.listenerCount = function(s, r) {
1094
1094
  return typeof s.listenerCount == "function" ? s.listenerCount(r) : yf.call(s, r);
1095
1095
  };
1096
- tt.prototype.listenerCount = yf;
1096
+ rt.prototype.listenerCount = yf;
1097
1097
  function yf(s) {
1098
1098
  var r = this._events;
1099
1099
  if (r !== void 0) {
@@ -1105,7 +1105,7 @@ function yf(s) {
1105
1105
  }
1106
1106
  return 0;
1107
1107
  }
1108
- tt.prototype.eventNames = function() {
1108
+ rt.prototype.eventNames = function() {
1109
1109
  return this._eventsCount > 0 ? Kc(this._events) : [];
1110
1110
  };
1111
1111
  function kf(s, r) {
@@ -1545,7 +1545,7 @@ b=AS:`.concat(this.constrainVideoBitrateKbps, `\r
1545
1545
  }
1546
1546
  return S(s, [{ key: "getIPDetails", value: function() {
1547
1547
  var r = m(/* @__PURE__ */ h().m(function t(n) {
1548
- var i, a, o, c, l, d, p, v, f, g, y, k;
1548
+ var i, a, o, c, l, d, p, v, f, g, k, y;
1549
1549
  return h().w(function(b) {
1550
1550
  for (; ; )
1551
1551
  switch (b.p = b.n) {
@@ -1566,7 +1566,7 @@ b=AS:`.concat(this.constrainVideoBitrateKbps, `\r
1566
1566
  case 4:
1567
1567
  throw Error("Insufficient data");
1568
1568
  case 5:
1569
- b.p = 5, y = b.v, o.error("callstats::ipDetails:: failed to fetch ip using location service", { error: y });
1569
+ b.p = 5, k = b.v, o.error("callstats::ipDetails:: failed to fetch ip using location service", { error: k });
1570
1570
  case 6:
1571
1571
  return b.p = 6, b.n = 7, fetch("https://".concat(a.locationLegacy, "/?token=3c493932b0624c&peerId=").concat(i), { method: "POST" });
1572
1572
  case 7:
@@ -1575,7 +1575,7 @@ b=AS:`.concat(this.constrainVideoBitrateKbps, `\r
1575
1575
  this.ipInformation = b.v, (f = this.ipInformation) !== null && f !== void 0 && f.ip && (this.ipInformation.ip = _a(this.ipInformation.ip)), b.n = 10;
1576
1576
  break;
1577
1577
  case 9:
1578
- b.p = 9, k = b.v, o.error("callstats::ipDetails:: failed to fetch ip using legacy location service", { error: k });
1578
+ b.p = 9, y = b.v, o.error("callstats::ipDetails:: failed to fetch ip using legacy location service", { error: y });
1579
1579
  case 10:
1580
1580
  return b.a(2, this.ipInformation);
1581
1581
  }
@@ -1667,34 +1667,34 @@ var Nf = /* @__PURE__ */ S(function s() {
1667
1667
  } }, { key: "generateProducerStreamMap", value: function() {
1668
1668
  var e = m(/* @__PURE__ */ h().m(function n(i) {
1669
1669
  var a, o, c, l, d, p, v = arguments, f, g;
1670
- return h().w(function(y) {
1670
+ return h().w(function(k) {
1671
1671
  for (; ; )
1672
- switch (y.p = y.n) {
1672
+ switch (k.p = k.n) {
1673
1673
  case 0:
1674
- return a = v.length > 1 && v[1] !== void 0 ? v[1] : !1, y.n = 1, i.getStats();
1674
+ return a = v.length > 1 && v[1] !== void 0 ? v[1] : !1, k.n = 1, i.getStats();
1675
1675
  case 1:
1676
- o = y.v, c = a ? this.getProducerStatsFromReport(this.parseRTCReport(o, ["outbound-rtp", "remote-inbound-rtp"], !1, i.id))[0] : void 0, l = Un(o.values()), y.p = 2, l.s();
1676
+ o = k.v, c = a ? this.getProducerStatsFromReport(this.parseRTCReport(o, ["outbound-rtp", "remote-inbound-rtp"], !1, i.id))[0] : void 0, l = Un(o.values()), k.p = 2, l.s();
1677
1677
  case 3:
1678
1678
  if ((d = l.n()).done) {
1679
- y.n = 6;
1679
+ k.n = 6;
1680
1680
  break;
1681
1681
  }
1682
- p = d.value, f = p.type, y.n = f === "outbound-rtp" ? 4 : 5;
1682
+ p = d.value, f = p.type, k.n = f === "outbound-rtp" ? 4 : 5;
1683
1683
  break;
1684
1684
  case 4:
1685
- return this.outboundProducerMap.set(p.id, i.id), y.a(3, 5);
1685
+ return this.outboundProducerMap.set(p.id, i.id), k.a(3, 5);
1686
1686
  case 5:
1687
- y.n = 3;
1687
+ k.n = 3;
1688
1688
  break;
1689
1689
  case 6:
1690
- y.n = 8;
1690
+ k.n = 8;
1691
1691
  break;
1692
1692
  case 7:
1693
- y.p = 7, g = y.v, l.e(g);
1693
+ k.p = 7, g = k.v, l.e(g);
1694
1694
  case 8:
1695
- return y.p = 8, l.f(), y.f(8);
1695
+ return k.p = 8, l.f(), k.f(8);
1696
1696
  case 9:
1697
- return y.a(2, c);
1697
+ return k.a(2, c);
1698
1698
  }
1699
1699
  }, n, this, [[2, 7, 8, 9]]);
1700
1700
  }));
@@ -1705,34 +1705,34 @@ var Nf = /* @__PURE__ */ S(function s() {
1705
1705
  }() }, { key: "generateConsumerStreamMap", value: function() {
1706
1706
  var e = m(/* @__PURE__ */ h().m(function n(i) {
1707
1707
  var a, o, c, l, d, p, v = arguments, f, g;
1708
- return h().w(function(y) {
1708
+ return h().w(function(k) {
1709
1709
  for (; ; )
1710
- switch (y.p = y.n) {
1710
+ switch (k.p = k.n) {
1711
1711
  case 0:
1712
- return a = v.length > 1 && v[1] !== void 0 ? v[1] : !1, y.n = 1, i.getStats();
1712
+ return a = v.length > 1 && v[1] !== void 0 ? v[1] : !1, k.n = 1, i.getStats();
1713
1713
  case 1:
1714
- o = y.v, c = a ? this.getConsumerStatsFromReport(this.parseRTCReport(o, ["inbound-rtp"], !1, i.id))[0] : void 0, l = Un(o.values()), y.p = 2, l.s();
1714
+ o = k.v, c = a ? this.getConsumerStatsFromReport(this.parseRTCReport(o, ["inbound-rtp"], !1, i.id))[0] : void 0, l = Un(o.values()), k.p = 2, l.s();
1715
1715
  case 3:
1716
1716
  if ((d = l.n()).done) {
1717
- y.n = 6;
1717
+ k.n = 6;
1718
1718
  break;
1719
1719
  }
1720
- p = d.value, f = p.type, y.n = f === "inbound-rtp" ? 4 : 5;
1720
+ p = d.value, f = p.type, k.n = f === "inbound-rtp" ? 4 : 5;
1721
1721
  break;
1722
1722
  case 4:
1723
- return this.inboundConsumerMap.set(p.id, i.id), y.a(3, 5);
1723
+ return this.inboundConsumerMap.set(p.id, i.id), k.a(3, 5);
1724
1724
  case 5:
1725
- y.n = 3;
1725
+ k.n = 3;
1726
1726
  break;
1727
1727
  case 6:
1728
- y.n = 8;
1728
+ k.n = 8;
1729
1729
  break;
1730
1730
  case 7:
1731
- y.p = 7, g = y.v, l.e(g);
1731
+ k.p = 7, g = k.v, l.e(g);
1732
1732
  case 8:
1733
- return y.p = 8, l.f(), y.f(8);
1733
+ return k.p = 8, l.f(), k.f(8);
1734
1734
  case 9:
1735
- return y.a(2, c);
1735
+ return k.a(2, c);
1736
1736
  }
1737
1737
  }, n, this, [[2, 7, 8, 9]]);
1738
1738
  }));
@@ -1768,7 +1768,7 @@ var Nf = /* @__PURE__ */ S(function s() {
1768
1768
  });
1769
1769
  return n || t[t.length - 1];
1770
1770
  } }, { key: "parseRTCReport", value: function(t) {
1771
- var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, c = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, l = t, d = new Nf(), p = i.length ? new Set(i) : void 0, v = [], f = [], g = [], y = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), b = Un(l.values()), T;
1771
+ var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, c = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, l = t, d = new Nf(), p = i.length ? new Set(i) : void 0, v = [], f = [], g = [], k = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = Un(l.values()), T;
1772
1772
  try {
1773
1773
  for (b.s(); !(T = b.n()).done; ) {
1774
1774
  var E = T.value;
@@ -1904,7 +1904,7 @@ var Nf = /* @__PURE__ */ S(function s() {
1904
1904
  var zo = { bytesReceived: re.bytesReceived, packetsReceived: re.packetsReceived, packetsLost: re.packetsLost >= 0 ? re.packetsLost : 0, jitter: re.jitter, nackCount: re.nackCount, jitterBufferDelay: re.jitterBufferDelay, jitterBufferEmittedCount: re.jitterBufferEmittedCount, lastPacketReceivedTimestamp: re.lastPacketReceivedTimestamp, ssrc: re.ssrc, mid: re.mid, codecId: re.codecId, headerBytesReceived: re.headerBytesReceived || 0, packetsDiscarded: re.packetsDiscarded || 0, jitterBufferMinimumDelay: re.jitterBufferMinimumDelay || 0, jitterBufferTargetDelay: re.jitterBufferTargetDelay || 0 };
1905
1905
  if (re.mediaType === "video" || re.kind === "video") {
1906
1906
  var Va, $a, ja, Ua, Fa, Ha, ve = re, Pe = V({ frameHeight: ve.frameHeight, frameWidth: ve.frameWidth, framesDecoded: ve.framesDecoded, framesDropped: ve.framesDropped, framesPerSecond: ve.framesPerSecond, framesReceived: ve.framesReceived, keyFramesDecoded: ve.keyFramesDecoded, firCount: ve.firCount, decoderImplementation: ve.decoderImplementation, pliCount: ve.pliCount, totalProcessingDelay: ve.totalProcessingDelay, qpSum: ve.qpSum || 0, totalAssemblyTime: ve.totalAssemblyTime || 0, totalDecodeTime: ve.totalDecodeTime || 0, totalFreezesDuration: ve.totalFreezesDuration || 0, totalInterFrameDelay: ve.totalInterFrameDelay || 0, totalPausesDuration: ve.totalPausesDuration || 0, totalSquaredInterFrameDelay: ve.totalSquaredInterFrameDelay || 0, freezeCount: ve.freezeCount || 0, pauseCount: ve.pauseCount || 0, powerEfficientDecoder: ve.powerEfficientDecoder }, zo);
1907
- Pe.score = Of({ frameWidth: Pe.frameWidth || 0, framesDecoded: (Pe.framesDecoded || 0) - (((Va = this.videoConsumerToStatsMap.get(K)) === null || Va === void 0 ? void 0 : Va.framesDecoded) || 0), framesPerSecond: Pe.framesPerSecond || 0, packetsLost: (Pe.packetsLost || 0) - ((($a = this.videoConsumerToStatsMap.get(K)) === null || $a === void 0 ? void 0 : $a.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - (((ja = this.videoConsumerToStatsMap.get(K)) === null || ja === void 0 ? void 0 : ja.packetsReceived) || 0), jitter: Pe.jitter || 0, isScreenShare: this.screenShareConsumers.has(K) }), k.set(K, {
1907
+ Pe.score = Of({ frameWidth: Pe.frameWidth || 0, framesDecoded: (Pe.framesDecoded || 0) - (((Va = this.videoConsumerToStatsMap.get(K)) === null || Va === void 0 ? void 0 : Va.framesDecoded) || 0), framesPerSecond: Pe.framesPerSecond || 0, packetsLost: (Pe.packetsLost || 0) - ((($a = this.videoConsumerToStatsMap.get(K)) === null || $a === void 0 ? void 0 : $a.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - (((ja = this.videoConsumerToStatsMap.get(K)) === null || ja === void 0 ? void 0 : ja.packetsReceived) || 0), jitter: Pe.jitter || 0, isScreenShare: this.screenShareConsumers.has(K) }), y.set(K, {
1908
1908
  score: +(Pe.score * 10).toFixed(),
1909
1909
  frameWidth: Pe.frameWidth || 0,
1910
1910
  frameHeight: Pe.frameHeight || 0,
@@ -1916,15 +1916,15 @@ var Nf = /* @__PURE__ */ S(function s() {
1916
1916
  // Bytes received in last 7 seconds
1917
1917
  }), this.videoConsumerToStatsMap.set(K, Pe), d.inboundVideoRtp.set(E.id, Pe), d.consumerStreamMap.get(K).inboundVideoRtpId.push(E.id), this.processInboundConsumerVideoStats(K, Ko, Pe);
1918
1918
  } else if (re.mediaType === "audio" || re.kind === "audio") {
1919
- var Ba, qa, Wa, Ga, Ja, Ka, pt = re, it = V({ audioLevel: pt.audioLevel, concealedSamples: pt.concealedSamples, concealmentEvents: pt.concealmentEvents, totalAudioEnergy: pt.totalAudioEnergy, totalSamplesDuration: pt.totalSamplesDuration, totalSamplesReceived: pt.totalSamplesReceived, fecPacketsDiscarded: pt.fecPacketsDiscarded || 0, fecPacketsReceived: pt.fecPacketsReceived || 0, insertedSamplesForDeceleration: pt.insertedSamplesForDeceleration || 0, removedSamplesForAcceleration: pt.removedSamplesForAcceleration || 0, silentConcealedSamples: pt.silentConcealedSamples || 0, playoutId: pt.playoutId }, zo);
1920
- it.score = Mf({ concealmentEvents: (it.concealmentEvents || 0) - (((Ba = this.audioConsumerToStatsMap.get(K)) === null || Ba === void 0 ? void 0 : Ba.concealmentEvents) || 0), packetsLost: (it.packetsLost || 0) - (((qa = this.audioConsumerToStatsMap.get(K)) === null || qa === void 0 ? void 0 : qa.packetsLost) || 0), packetsReceived: (it.packetsReceived || 0) - (((Wa = this.audioConsumerToStatsMap.get(K)) === null || Wa === void 0 ? void 0 : Wa.packetsReceived) || 0), jitter: it.jitter || 0 }), k.set(K, {
1921
- score: +(it.score * 10).toFixed(),
1922
- packetsLostPercentage: hl({ packetsLost: (it.packetsLost || 0) - (((Ga = this.audioConsumerToStatsMap.get(K)) === null || Ga === void 0 ? void 0 : Ga.packetsLost) || 0), packetsReceived: (it.packetsReceived || 0) - (((Ja = this.audioConsumerToStatsMap.get(K)) === null || Ja === void 0 ? void 0 : Ja.packetsReceived) || 0) }),
1923
- jitter: it.jitter || 0,
1919
+ var Ba, qa, Wa, Ga, Ja, Ka, pt = re, at = V({ audioLevel: pt.audioLevel, concealedSamples: pt.concealedSamples, concealmentEvents: pt.concealmentEvents, totalAudioEnergy: pt.totalAudioEnergy, totalSamplesDuration: pt.totalSamplesDuration, totalSamplesReceived: pt.totalSamplesReceived, fecPacketsDiscarded: pt.fecPacketsDiscarded || 0, fecPacketsReceived: pt.fecPacketsReceived || 0, insertedSamplesForDeceleration: pt.insertedSamplesForDeceleration || 0, removedSamplesForAcceleration: pt.removedSamplesForAcceleration || 0, silentConcealedSamples: pt.silentConcealedSamples || 0, playoutId: pt.playoutId }, zo);
1920
+ at.score = Mf({ concealmentEvents: (at.concealmentEvents || 0) - (((Ba = this.audioConsumerToStatsMap.get(K)) === null || Ba === void 0 ? void 0 : Ba.concealmentEvents) || 0), packetsLost: (at.packetsLost || 0) - (((qa = this.audioConsumerToStatsMap.get(K)) === null || qa === void 0 ? void 0 : qa.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((Wa = this.audioConsumerToStatsMap.get(K)) === null || Wa === void 0 ? void 0 : Wa.packetsReceived) || 0), jitter: at.jitter || 0 }), y.set(K, {
1921
+ score: +(at.score * 10).toFixed(),
1922
+ packetsLostPercentage: hl({ packetsLost: (at.packetsLost || 0) - (((Ga = this.audioConsumerToStatsMap.get(K)) === null || Ga === void 0 ? void 0 : Ga.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((Ja = this.audioConsumerToStatsMap.get(K)) === null || Ja === void 0 ? void 0 : Ja.packetsReceived) || 0) }),
1923
+ jitter: at.jitter || 0,
1924
1924
  isScreenShare: this.screenShareConsumers.has(K),
1925
- bitrate: ((it.bytesReceived || 0) - (((Ka = this.audioConsumerToStatsMap.get(K)) === null || Ka === void 0 ? void 0 : Ka.bytesReceived) || 0)) * 8 / 7
1925
+ bitrate: ((at.bytesReceived || 0) - (((Ka = this.audioConsumerToStatsMap.get(K)) === null || Ka === void 0 ? void 0 : Ka.bytesReceived) || 0)) * 8 / 7
1926
1926
  // Bytes received in last 7 seconds
1927
- }), this.audioConsumerToStatsMap.set(K, it), d.inboundAudioRtp.set(E.id, it), d.consumerStreamMap.get(K).inboundAudioRtpId.push(E.id), this.processInboundConsumerAudioStats(K, Ko, it);
1927
+ }), this.audioConsumerToStatsMap.set(K, at), d.inboundAudioRtp.set(E.id, at), d.consumerStreamMap.get(K).inboundAudioRtpId.push(E.id), this.processInboundConsumerAudioStats(K, Ko, at);
1928
1928
  }
1929
1929
  } else
1930
1930
  this.callStatsInstance.logger.error("Callstats: Unknown Inbound-rtp. mediatype: ".concat(re.mediaType, " kind: ").concat(re.kind));
@@ -1944,7 +1944,7 @@ var Nf = /* @__PURE__ */ S(function s() {
1944
1944
  Yo.push(d.outboundVideoRtp.get(Xl));
1945
1945
  });
1946
1946
  var Se = n.getWorkingSimulcastVideoStats(Yo);
1947
- Se.score = Af({ frameWidth: Se.frameWidth || 0, framesPerSecond: Se.framesPerSecond || 0, jitter: ((Nt = Se.remoteData) === null || Nt === void 0 ? void 0 : Nt.jitter) || 0, isScreenShare: n.screenShareProducers.has(ne), packetsSent: (Se.packetsSent || 0) - (((Et = n.videoProducerToStatsMap.get(ne)) === null || Et === void 0 ? void 0 : Et.packetsSent) || 0), packetsLost: (((Qa = Se.remoteData) === null || Qa === void 0 ? void 0 : Qa.packetsLost) || 0) - (((Ir = n.videoProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Ya = n.videoProducerToStatsMap.get(ne)) === null || Ya === void 0 ? void 0 : Ya.framesEncoded) || 0) }), y.set(ne, {
1947
+ Se.score = Af({ frameWidth: Se.frameWidth || 0, framesPerSecond: Se.framesPerSecond || 0, jitter: ((Nt = Se.remoteData) === null || Nt === void 0 ? void 0 : Nt.jitter) || 0, isScreenShare: n.screenShareProducers.has(ne), packetsSent: (Se.packetsSent || 0) - (((Et = n.videoProducerToStatsMap.get(ne)) === null || Et === void 0 ? void 0 : Et.packetsSent) || 0), packetsLost: (((Qa = Se.remoteData) === null || Qa === void 0 ? void 0 : Qa.packetsLost) || 0) - (((Ir = n.videoProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Ya = n.videoProducerToStatsMap.get(ne)) === null || Ya === void 0 ? void 0 : Ya.framesEncoded) || 0) }), k.set(ne, {
1948
1948
  score: +(Se.score * 10).toFixed(),
1949
1949
  frameWidth: Se.frameWidth || 0,
1950
1950
  frameHeight: Se.frameHeight || 0,
@@ -1959,7 +1959,7 @@ var Nf = /* @__PURE__ */ S(function s() {
1959
1959
  }), n.videoProducerToStatsMap.set(ne, Se);
1960
1960
  } else if (te.outboundAudioRtpId.length > 0) {
1961
1961
  var ts, rs, Or, ns, is, as, ss, Dr, os, Vt = d.outboundAudioRtp.get(te.outboundAudioRtpId[0]);
1962
- Vt.score = _f({ packetsSent: (Vt.packetsSent || 0) - (((ts = n.audioProducerToStatsMap.get(ne)) === null || ts === void 0 ? void 0 : ts.packetsSent) || 0), packetsLost: (((rs = Vt.remoteData) === null || rs === void 0 ? void 0 : rs.packetsLost) || 0) - (((Or = n.audioProducerToStatsMap.get(ne)) === null || Or === void 0 || (Or = Or.remoteData) === null || Or === void 0 ? void 0 : Or.packetsLost) || 0), jitter: ((ns = Vt.remoteData) === null || ns === void 0 ? void 0 : ns.jitter) || 0 }), y.set(ne, {
1962
+ Vt.score = _f({ packetsSent: (Vt.packetsSent || 0) - (((ts = n.audioProducerToStatsMap.get(ne)) === null || ts === void 0 ? void 0 : ts.packetsSent) || 0), packetsLost: (((rs = Vt.remoteData) === null || rs === void 0 ? void 0 : rs.packetsLost) || 0) - (((Or = n.audioProducerToStatsMap.get(ne)) === null || Or === void 0 || (Or = Or.remoteData) === null || Or === void 0 ? void 0 : Or.packetsLost) || 0), jitter: ((ns = Vt.remoteData) === null || ns === void 0 ? void 0 : ns.jitter) || 0 }), k.set(ne, {
1963
1963
  score: +(Vt.score * 10).toFixed(),
1964
1964
  bitrate: ((Vt.bytesSent || 0) - (((is = n.audioProducerToStatsMap.get(ne)) === null || is === void 0 ? void 0 : is.bytesSent) || 0)) * 8 / 7,
1965
1965
  // Bytes received in last 7 seconds
@@ -1989,14 +1989,14 @@ var Nf = /* @__PURE__ */ S(function s() {
1989
1989
  te.roundTripTime && te.roundTripTime > za && (za = te.roundTripTime, Qo = te.totalRoundTripTime);
1990
1990
  }), d.transport.roundTripTime = za, d.transport.totalRoundTripTime = Qo;
1991
1991
  }
1992
- if (k.size > 0)
1992
+ if (y.size > 0)
1993
1993
  try {
1994
- this.observer.emit("consumer_score", k);
1994
+ this.observer.emit("consumer_score", y);
1995
1995
  } catch (te) {
1996
1996
  }
1997
- if (y.size > 0)
1997
+ if (k.size > 0)
1998
1998
  try {
1999
- this.observer.emit("producer_score", y);
1999
+ this.observer.emit("producer_score", k);
2000
2000
  } catch (te) {
2001
2001
  }
2002
2002
  return d;
@@ -2057,19 +2057,19 @@ var Nf = /* @__PURE__ */ S(function s() {
2057
2057
  value: function() {
2058
2058
  var e = m(/* @__PURE__ */ h().m(function n(i, a, o) {
2059
2059
  var c, l, d, p, v, f, g;
2060
- return h().w(function(y) {
2060
+ return h().w(function(k) {
2061
2061
  for (; ; )
2062
- switch (y.n) {
2062
+ switch (k.n) {
2063
2063
  case 0:
2064
- return y.n = 1, this.getTransportReport(i);
2064
+ return k.n = 1, this.getTransportReport(i);
2065
2065
  case 1:
2066
- if (c = y.v, l = { producing: o, consuming: a, id: i.id }, d = c, p = this.parseRTCReport(d, ["transport", "candidate-pair", "inbound-rtp", "outbound-rtp", "remote-inbound-rtp", "local-candidate", "remote-candidate"], !1, void 0, l), p) {
2067
- y.n = 2;
2066
+ if (c = k.v, l = { producing: o, consuming: a, id: i.id }, d = c, p = this.parseRTCReport(d, ["transport", "candidate-pair", "inbound-rtp", "outbound-rtp", "remote-inbound-rtp", "local-candidate", "remote-candidate"], !1, void 0, l), p) {
2067
+ k.n = 2;
2068
2068
  break;
2069
2069
  }
2070
- return y.a(2, void 0);
2070
+ return k.a(2, void 0);
2071
2071
  case 2:
2072
- return v = { stats: p.transport, transportId: i.id, consuming: a, producing: o }, f = p.staleProducerStreamMap ? void 0 : this.getProducerStatsFromReport(p), g = p.staleConsumerStreamMap ? void 0 : this.getConsumerStatsFromReport(p), y.a(2, { transportReport: v, producerReport: f, consumerReport: g });
2072
+ return v = { stats: p.transport, transportId: i.id, consuming: a, producing: o }, f = p.staleProducerStreamMap ? void 0 : this.getProducerStatsFromReport(p), g = p.staleConsumerStreamMap ? void 0 : this.getConsumerStatsFromReport(p), k.a(2, { transportReport: v, producerReport: f, consumerReport: g });
2073
2073
  }
2074
2074
  }, n, this);
2075
2075
  }));
@@ -2143,12 +2143,12 @@ var Nf = /* @__PURE__ */ S(function s() {
2143
2143
  key: "getConnectivity",
2144
2144
  value: function() {
2145
2145
  var e = m(/* @__PURE__ */ h().m(function n(i) {
2146
- var a, o, c, l, d, p, v, f, g, y;
2147
- return h().w(function(k) {
2146
+ var a, o, c, l, d, p, v, f, g, k;
2147
+ return h().w(function(y) {
2148
2148
  for (; ; )
2149
- switch (k.p = k.n) {
2149
+ switch (y.p = y.n) {
2150
2150
  case 0:
2151
- return k.p = 0, a = { iceServers: i || Dp }, o = new Promise(function(b, T) {
2151
+ return y.p = 0, a = { iceServers: i || Dp }, o = new Promise(function(b, T) {
2152
2152
  try {
2153
2153
  var E = new fy(a);
2154
2154
  E.addListener("done", b), E.addListener("failed", function() {
@@ -2175,11 +2175,11 @@ var Nf = /* @__PURE__ */ S(function s() {
2175
2175
  } catch (I) {
2176
2176
  T(I);
2177
2177
  }
2178
- }), k.n = 1, Promise.all([o, c, l]);
2178
+ }), y.n = 1, Promise.all([o, c, l]);
2179
2179
  case 1:
2180
- return d = k.v, p = Ue(d, 3), v = p[0], f = p[1], g = p[2], k.a(2, { host: v == null ? void 0 : v.connectivity, relay: f == null ? void 0 : f.connectivity, reflexive: g == null ? void 0 : g.connectivity });
2180
+ return d = y.v, p = Ue(d, 3), v = p[0], f = p[1], g = p[2], y.a(2, { host: v == null ? void 0 : v.connectivity, relay: f == null ? void 0 : f.connectivity, reflexive: g == null ? void 0 : g.connectivity });
2181
2181
  case 2:
2182
- return k.p = 2, y = k.v, k.a(2, { host: !1, relay: !1, reflexive: !1 });
2182
+ return y.p = 2, k = y.v, y.a(2, { host: !1, relay: !1, reflexive: !1 });
2183
2183
  }
2184
2184
  }, n, null, [[0, 2]]);
2185
2185
  }));
@@ -2259,27 +2259,27 @@ var Nf = /* @__PURE__ */ S(function s() {
2259
2259
  return t;
2260
2260
  }() }, { key: "getNetworkInfo", value: function() {
2261
2261
  var e = m(/* @__PURE__ */ h().m(function n(i) {
2262
- var a, o, c, l, d, p, v, f, g, y = arguments;
2263
- return h().w(function(k) {
2262
+ var a, o, c, l, d, p, v, f, g, k = arguments;
2263
+ return h().w(function(y) {
2264
2264
  for (; ; )
2265
- switch (k.n) {
2265
+ switch (y.n) {
2266
2266
  case 0:
2267
- if (o = y.length > 1 && y[1] !== void 0 ? y[1] : !1, !o) {
2268
- k.n = 2;
2267
+ if (o = k.length > 1 && k[1] !== void 0 ? k[1] : !1, !o) {
2268
+ y.n = 2;
2269
2269
  break;
2270
2270
  }
2271
- return k.n = 1, this.getIPDetails();
2271
+ return y.n = 1, this.getIPDetails();
2272
2272
  case 1:
2273
- return l = k.v, k.a(2, {
2273
+ return l = y.v, y.a(2, {
2274
2274
  ipDetails: l,
2275
2275
  effectiveNetworkType: (c = navigator.connection) === null || c === void 0 ? void 0 : c.effectiveType,
2276
2276
  location: l != null && l.loc ? Lp(l == null ? void 0 : l.loc) : void 0
2277
2277
  // userLocation,
2278
2278
  });
2279
2279
  case 2:
2280
- return k.n = 3, Promise.all([this.getConnectivity(i), this.getThroughput(i), this.getIPDetails()]);
2280
+ return y.n = 3, Promise.all([this.getConnectivity(i), this.getThroughput(i), this.getIPDetails()]);
2281
2281
  case 3:
2282
- return d = k.v, p = Ue(d, 3), v = p[0], f = p[1], g = p[2], k.a(2, {
2282
+ return d = y.v, p = Ue(d, 3), v = p[0], f = p[1], g = p[2], y.a(2, {
2283
2283
  ipDetails: g,
2284
2284
  effectiveNetworkType: (a = navigator.connection) === null || a === void 0 ? void 0 : a.effectiveType,
2285
2285
  location: g != null && g.loc ? Lp(g == null ? void 0 : g.loc) : void 0,
@@ -2351,7 +2351,7 @@ var Nf = /* @__PURE__ */ S(function s() {
2351
2351
  return t;
2352
2352
  }() }, { key: "generateConsumerStreamMap", value: function() {
2353
2353
  var e = m(/* @__PURE__ */ h().m(function n(i) {
2354
- var a, o, c, l, d, p, v, f, g = arguments, y, k;
2354
+ var a, o, c, l, d, p, v, f, g = arguments, k, y;
2355
2355
  return h().w(function(b) {
2356
2356
  for (; ; )
2357
2357
  switch (b.p = b.n) {
@@ -2364,7 +2364,7 @@ var Nf = /* @__PURE__ */ S(function s() {
2364
2364
  b.n = 6;
2365
2365
  break;
2366
2366
  }
2367
- f = v.value, y = f.type, b.n = y === "inbound-rtp" ? 4 : 5;
2367
+ f = v.value, k = f.type, b.n = k === "inbound-rtp" ? 4 : 5;
2368
2368
  break;
2369
2369
  case 4:
2370
2370
  return this.inboundConsumerMap.set(f.id, i.id), b.a(3, 5);
@@ -2375,7 +2375,7 @@ var Nf = /* @__PURE__ */ S(function s() {
2375
2375
  b.n = 8;
2376
2376
  break;
2377
2377
  case 7:
2378
- b.p = 7, k = b.v, p.e(k);
2378
+ b.p = 7, y = b.v, p.e(y);
2379
2379
  case 8:
2380
2380
  return b.p = 8, p.f(), b.f(8);
2381
2381
  case 9:
@@ -2405,7 +2405,7 @@ var Nf = /* @__PURE__ */ S(function s() {
2405
2405
  var n;
2406
2406
  return { id: t.id, type: t.candidateType || t.type, address: t.address, port: t.port, url: t.url, protocol: (n = t.relayProtocol) !== null && n !== void 0 ? n : t.protocol, networkType: t.networkType, relatedAddress: t.relatedAddress, relatedPort: t.relatedPort };
2407
2407
  } }, { key: "parseRTCReport", value: function(t) {
2408
- var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, c = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, l = t, d = new Nf(), p = i.length ? new Set(i) : void 0, v = [], f = [], g = [], y = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(), b = Un(l.values()), T;
2408
+ var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, c = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, l = t, d = new Nf(), p = i.length ? new Set(i) : void 0, v = [], f = [], g = [], k = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = Un(l.values()), T;
2409
2409
  try {
2410
2410
  for (b.s(); !(T = b.n()).done; ) {
2411
2411
  var E = T.value;
@@ -2507,7 +2507,7 @@ var Nf = /* @__PURE__ */ S(function s() {
2507
2507
  var zo = { bytesReceived: re.bytesReceived, packetsReceived: re.packetsReceived, packetsLost: re.packetsLost >= 0 ? re.packetsLost : 0, jitter: re.jitter, nackCount: re.nackCount, jitterBufferDelay: re.jitterBufferDelay, jitterBufferEmittedCount: re.jitterBufferEmittedCount, lastPacketReceivedTimestamp: re.lastPacketReceivedTimestamp, ssrc: re.ssrc, mid: re.mid, codecId: re.codecId, headerBytesReceived: re.headerBytesReceived || 0, packetsDiscarded: re.packetsDiscarded || 0, jitterBufferMinimumDelay: re.jitterBufferMinimumDelay || 0, jitterBufferTargetDelay: re.jitterBufferTargetDelay || 0 };
2508
2508
  if (re.mediaType === "video" || re.kind === "video") {
2509
2509
  var Va, $a, ja, Ua, Fa, Ha, ve = re, Pe = V({ frameHeight: ve.frameHeight, frameWidth: ve.frameWidth, framesDecoded: ve.framesDecoded, framesDropped: ve.framesDropped ? ve.framesDropped : ve.droppedFrames, framesPerSecond: ve.framesPerSecond ? ve.framesPerSecond : ve.framerateMean, framesReceived: ve.framesReceived, keyFramesDecoded: ve.keyFramesDecoded, firCount: ve.firCount, decoderImplementation: ve.decoderImplementation, pliCount: ve.pliCount, totalProcessingDelay: ve.totalProcessingDelay, qpSum: ve.qpSum || 0, totalAssemblyTime: ve.totalAssemblyTime || 0, totalDecodeTime: ve.totalDecodeTime || 0, totalFreezesDuration: ve.totalFreezesDuration || 0, totalInterFrameDelay: ve.totalInterFrameDelay || 0, totalPausesDuration: ve.totalPausesDuration || 0, totalSquaredInterFrameDelay: ve.totalSquaredInterFrameDelay || 0, freezeCount: ve.freezeCount || 0, pauseCount: ve.pauseCount || 0, powerEfficientDecoder: ve.powerEfficientDecoder }, zo);
2510
- Pe.score = Of({ frameWidth: Pe.frameWidth || 0, framesDecoded: (Pe.framesDecoded || 0) - (((Va = this.videoConsumerToStatsMap.get(K)) === null || Va === void 0 ? void 0 : Va.framesDecoded) || 0), framesPerSecond: Pe.framesPerSecond || 0, packetsLost: (Pe.packetsLost || 0) - ((($a = this.videoConsumerToStatsMap.get(K)) === null || $a === void 0 ? void 0 : $a.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - (((ja = this.videoConsumerToStatsMap.get(K)) === null || ja === void 0 ? void 0 : ja.packetsReceived) || 0), jitter: Pe.jitter || 0, isScreenShare: this.screenShareConsumers.has(K) }), k.set(K, {
2510
+ Pe.score = Of({ frameWidth: Pe.frameWidth || 0, framesDecoded: (Pe.framesDecoded || 0) - (((Va = this.videoConsumerToStatsMap.get(K)) === null || Va === void 0 ? void 0 : Va.framesDecoded) || 0), framesPerSecond: Pe.framesPerSecond || 0, packetsLost: (Pe.packetsLost || 0) - ((($a = this.videoConsumerToStatsMap.get(K)) === null || $a === void 0 ? void 0 : $a.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - (((ja = this.videoConsumerToStatsMap.get(K)) === null || ja === void 0 ? void 0 : ja.packetsReceived) || 0), jitter: Pe.jitter || 0, isScreenShare: this.screenShareConsumers.has(K) }), y.set(K, {
2511
2511
  score: +(Pe.score * 10).toFixed(),
2512
2512
  frameWidth: Pe.frameWidth || 0,
2513
2513
  frameHeight: Pe.frameHeight || 0,
@@ -2519,15 +2519,15 @@ var Nf = /* @__PURE__ */ S(function s() {
2519
2519
  // Bytes received in last 7 seconds
2520
2520
  }), this.videoConsumerToStatsMap.set(K, Pe), d.inboundVideoRtp.set(E.id, Pe), d.consumerStreamMap.get(K).inboundVideoRtpId.push(E.id), this.processInboundConsumerVideoStats(K, Ko, Pe);
2521
2521
  } else if (re.mediaType === "audio" || re.kind === "audio") {
2522
- var Ba, qa, Wa, Ga, Ja, Ka, pt = re, it = V({ audioLevel: pt.audioLevel, concealedSamples: pt.concealedSamples, concealmentEvents: pt.concealmentEvents, totalAudioEnergy: pt.totalAudioEnergy, totalSamplesDuration: pt.totalSamplesDuration, totalSamplesReceived: pt.totalSamplesReceived, fecPacketsDiscarded: pt.fecPacketsDiscarded || 0, fecPacketsReceived: pt.fecPacketsReceived || 0, insertedSamplesForDeceleration: pt.insertedSamplesForDeceleration || 0, removedSamplesForAcceleration: pt.removedSamplesForAcceleration || 0, silentConcealedSamples: pt.silentConcealedSamples || 0, playoutId: pt.playoutId }, zo);
2523
- it.score = Mf({ concealmentEvents: (it.concealmentEvents || 0) - (((Ba = this.audioConsumerToStatsMap.get(K)) === null || Ba === void 0 ? void 0 : Ba.concealmentEvents) || 0), packetsLost: (it.packetsLost || 0) - (((qa = this.audioConsumerToStatsMap.get(K)) === null || qa === void 0 ? void 0 : qa.packetsLost) || 0), packetsReceived: (it.packetsReceived || 0) - (((Wa = this.audioConsumerToStatsMap.get(K)) === null || Wa === void 0 ? void 0 : Wa.packetsReceived) || 0), jitter: it.jitter || 0 }), k.set(K, {
2524
- score: +(it.score * 10).toFixed(),
2525
- packetsLostPercentage: hl({ packetsLost: (it.packetsLost || 0) - (((Ga = this.audioConsumerToStatsMap.get(K)) === null || Ga === void 0 ? void 0 : Ga.packetsLost) || 0), packetsReceived: (it.packetsReceived || 0) - (((Ja = this.audioConsumerToStatsMap.get(K)) === null || Ja === void 0 ? void 0 : Ja.packetsReceived) || 0) }),
2526
- jitter: it.jitter || 0,
2522
+ var Ba, qa, Wa, Ga, Ja, Ka, pt = re, at = V({ audioLevel: pt.audioLevel, concealedSamples: pt.concealedSamples, concealmentEvents: pt.concealmentEvents, totalAudioEnergy: pt.totalAudioEnergy, totalSamplesDuration: pt.totalSamplesDuration, totalSamplesReceived: pt.totalSamplesReceived, fecPacketsDiscarded: pt.fecPacketsDiscarded || 0, fecPacketsReceived: pt.fecPacketsReceived || 0, insertedSamplesForDeceleration: pt.insertedSamplesForDeceleration || 0, removedSamplesForAcceleration: pt.removedSamplesForAcceleration || 0, silentConcealedSamples: pt.silentConcealedSamples || 0, playoutId: pt.playoutId }, zo);
2523
+ at.score = Mf({ concealmentEvents: (at.concealmentEvents || 0) - (((Ba = this.audioConsumerToStatsMap.get(K)) === null || Ba === void 0 ? void 0 : Ba.concealmentEvents) || 0), packetsLost: (at.packetsLost || 0) - (((qa = this.audioConsumerToStatsMap.get(K)) === null || qa === void 0 ? void 0 : qa.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((Wa = this.audioConsumerToStatsMap.get(K)) === null || Wa === void 0 ? void 0 : Wa.packetsReceived) || 0), jitter: at.jitter || 0 }), y.set(K, {
2524
+ score: +(at.score * 10).toFixed(),
2525
+ packetsLostPercentage: hl({ packetsLost: (at.packetsLost || 0) - (((Ga = this.audioConsumerToStatsMap.get(K)) === null || Ga === void 0 ? void 0 : Ga.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((Ja = this.audioConsumerToStatsMap.get(K)) === null || Ja === void 0 ? void 0 : Ja.packetsReceived) || 0) }),
2526
+ jitter: at.jitter || 0,
2527
2527
  isScreenShare: this.screenShareConsumers.has(K),
2528
- bitrate: ((it.bytesReceived || 0) - (((Ka = this.audioConsumerToStatsMap.get(K)) === null || Ka === void 0 ? void 0 : Ka.bytesReceived) || 0)) * 8 / 7
2528
+ bitrate: ((at.bytesReceived || 0) - (((Ka = this.audioConsumerToStatsMap.get(K)) === null || Ka === void 0 ? void 0 : Ka.bytesReceived) || 0)) * 8 / 7
2529
2529
  // Bytes received in last 7 seconds
2530
- }), this.audioConsumerToStatsMap.set(K, it), d.inboundAudioRtp.set(E.id, it), d.consumerStreamMap.get(K).inboundAudioRtpId.push(E.id), this.processInboundConsumerAudioStats(K, Ko, it);
2530
+ }), this.audioConsumerToStatsMap.set(K, at), d.inboundAudioRtp.set(E.id, at), d.consumerStreamMap.get(K).inboundAudioRtpId.push(E.id), this.processInboundConsumerAudioStats(K, Ko, at);
2531
2531
  }
2532
2532
  } else
2533
2533
  this.callStatsInstance.logger.error("Callstats: Unknown Inbound-rtp. mediatype: ".concat(re.mediaType, " kind: ").concat(re.kind));
@@ -2547,7 +2547,7 @@ var Nf = /* @__PURE__ */ S(function s() {
2547
2547
  Yo.push(d.outboundVideoRtp.get(Xl));
2548
2548
  });
2549
2549
  var Se = n.getWorkingSimulcastVideoStats(Yo);
2550
- Se.score = Af({ frameWidth: Se.frameWidth || 0, framesPerSecond: Se.framesPerSecond || 0, jitter: ((Nt = Se.remoteData) === null || Nt === void 0 ? void 0 : Nt.jitter) || 0, isScreenShare: n.screenShareProducers.has(ne), packetsSent: (Se.packetsSent || 0) - (((Et = n.videoProducerToStatsMap.get(ne)) === null || Et === void 0 ? void 0 : Et.packetsSent) || 0), packetsLost: (((Qa = Se.remoteData) === null || Qa === void 0 ? void 0 : Qa.packetsLost) || 0) - (((Ir = n.videoProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Ya = n.videoProducerToStatsMap.get(ne)) === null || Ya === void 0 ? void 0 : Ya.framesEncoded) || 0) }), y.set(ne, {
2550
+ Se.score = Af({ frameWidth: Se.frameWidth || 0, framesPerSecond: Se.framesPerSecond || 0, jitter: ((Nt = Se.remoteData) === null || Nt === void 0 ? void 0 : Nt.jitter) || 0, isScreenShare: n.screenShareProducers.has(ne), packetsSent: (Se.packetsSent || 0) - (((Et = n.videoProducerToStatsMap.get(ne)) === null || Et === void 0 ? void 0 : Et.packetsSent) || 0), packetsLost: (((Qa = Se.remoteData) === null || Qa === void 0 ? void 0 : Qa.packetsLost) || 0) - (((Ir = n.videoProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Ya = n.videoProducerToStatsMap.get(ne)) === null || Ya === void 0 ? void 0 : Ya.framesEncoded) || 0) }), k.set(ne, {
2551
2551
  score: +(Se.score * 10).toFixed(),
2552
2552
  frameWidth: Se.frameWidth || 0,
2553
2553
  frameHeight: Se.frameHeight || 0,
@@ -2562,7 +2562,7 @@ var Nf = /* @__PURE__ */ S(function s() {
2562
2562
  }), n.videoProducerToStatsMap.set(ne, Se);
2563
2563
  } else if (te.outboundAudioRtpId.length > 0) {
2564
2564
  var ts, rs, Or, ns, is, as, ss, Dr, os, Vt = d.outboundAudioRtp.get(te.outboundAudioRtpId[0]);
2565
- Vt.score = _f({ packetsSent: (Vt.packetsSent || 0) - (((ts = n.audioProducerToStatsMap.get(ne)) === null || ts === void 0 ? void 0 : ts.packetsSent) || 0), packetsLost: (((rs = Vt.remoteData) === null || rs === void 0 ? void 0 : rs.packetsLost) || 0) - (((Or = n.audioProducerToStatsMap.get(ne)) === null || Or === void 0 || (Or = Or.remoteData) === null || Or === void 0 ? void 0 : Or.packetsLost) || 0), jitter: ((ns = Vt.remoteData) === null || ns === void 0 ? void 0 : ns.jitter) || 0 }), y.set(ne, {
2565
+ Vt.score = _f({ packetsSent: (Vt.packetsSent || 0) - (((ts = n.audioProducerToStatsMap.get(ne)) === null || ts === void 0 ? void 0 : ts.packetsSent) || 0), packetsLost: (((rs = Vt.remoteData) === null || rs === void 0 ? void 0 : rs.packetsLost) || 0) - (((Or = n.audioProducerToStatsMap.get(ne)) === null || Or === void 0 || (Or = Or.remoteData) === null || Or === void 0 ? void 0 : Or.packetsLost) || 0), jitter: ((ns = Vt.remoteData) === null || ns === void 0 ? void 0 : ns.jitter) || 0 }), k.set(ne, {
2566
2566
  score: +(Vt.score * 10).toFixed(),
2567
2567
  bitrate: ((Vt.bytesSent || 0) - (((is = n.audioProducerToStatsMap.get(ne)) === null || is === void 0 ? void 0 : is.bytesSent) || 0)) * 8 / 7,
2568
2568
  // Bytes received in last 7 seconds
@@ -2592,14 +2592,14 @@ var Nf = /* @__PURE__ */ S(function s() {
2592
2592
  te.roundTripTime && te.roundTripTime > za && (za = te.roundTripTime, Qo = te.totalRoundTripTime);
2593
2593
  }), d.transport.roundTripTime = za, d.transport.totalRoundTripTime = Qo;
2594
2594
  }
2595
- if (k.size > 0)
2595
+ if (y.size > 0)
2596
2596
  try {
2597
- this.observer.emit("consumer_score", k);
2597
+ this.observer.emit("consumer_score", y);
2598
2598
  } catch (te) {
2599
2599
  }
2600
- if (y.size > 0)
2600
+ if (k.size > 0)
2601
2601
  try {
2602
- this.observer.emit("producer_score", y);
2602
+ this.observer.emit("producer_score", k);
2603
2603
  } catch (te) {
2604
2604
  }
2605
2605
  return d;
@@ -2623,8 +2623,8 @@ var Nf = /* @__PURE__ */ S(function s() {
2623
2623
  var a = this, o;
2624
2624
  try {
2625
2625
  var c = this.consumerPeerIdMap.get(i), l = c.peerId, d = c.producerId, p = c.appData, v = n == null ? void 0 : n.inboundVideoRtpId.map(function(f) {
2626
- var g = a.consumerMap.get(i), y = g.track.getSettings(), k = t.inboundVideoRtp.get(f);
2627
- return k.frameHeight || (k.frameHeight = y.height, k.frameWidth = y.width, k.framesPerSecond = y.frameRate), k;
2626
+ var g = a.consumerMap.get(i), k = g.track.getSettings(), y = t.inboundVideoRtp.get(f);
2627
+ return y.frameHeight || (y.frameHeight = k.height, y.frameWidth = k.width, y.framesPerSecond = k.frameRate), y;
2628
2628
  });
2629
2629
  o = { consumerId: i, peerId: l, producerId: d, appData: p, videoStats: v, audioStats: n == null ? void 0 : n.inboundAudioRtpId.map(function(f) {
2630
2630
  return t.inboundAudioRtp.get(f);
@@ -2835,7 +2835,7 @@ var de = function(r, e) {
2835
2835
  this.eventHandler.callEvent({ event: W.NET_QUALITY_TEST_BEGIN, timestamp: n });
2836
2836
  var a = new Promise(/* @__PURE__ */ function() {
2837
2837
  var o = m(/* @__PURE__ */ h().m(function c(l, d) {
2838
- var p, v, f, g, y, k, b, T;
2838
+ var p, v, f, g, k, y, b, T;
2839
2839
  return h().w(function(E) {
2840
2840
  for (; ; )
2841
2841
  switch (E.p = E.n) {
@@ -2852,12 +2852,12 @@ var de = function(r, e) {
2852
2852
  }
2853
2853
  return E.n = 5, i.measurements.getNetworkQuality(g.iceServers);
2854
2854
  case 5:
2855
- y = E.v, p.push(V(V({}, g), {}, { networkResults: y }));
2855
+ k = E.v, p.push(V(V({}, g), {}, { networkResults: k }));
2856
2856
  case 6:
2857
2857
  E.n = 8;
2858
2858
  break;
2859
2859
  case 7:
2860
- E.p = 7, k = E.v, console.warn("Error handling ", k);
2860
+ E.p = 7, y = E.v, console.warn("Error handling ", y);
2861
2861
  case 8:
2862
2862
  E.n = 3;
2863
2863
  break;
@@ -2906,7 +2906,7 @@ var de = function(r, e) {
2906
2906
  clearInterval(this.pingStatsTimeout);
2907
2907
  } }, { key: "sendPingStatsEvent", value: function() {
2908
2908
  var e = m(/* @__PURE__ */ h().m(function n() {
2909
- var i, a, o, c, l, d, p, v, f, g, y, k, b, T, E, I, M = arguments;
2909
+ var i, a, o, c, l, d, p, v, f, g, k, y, b, T, E, I, M = arguments;
2910
2910
  return h().w(function(_) {
2911
2911
  for (; ; )
2912
2912
  switch (_.n) {
@@ -2917,17 +2917,17 @@ var de = function(r, e) {
2917
2917
  }
2918
2918
  return _.n = 1, this.measurements.getProcessedStats(this.producingTransport, !1, !0);
2919
2919
  case 1:
2920
- if (f = _.v, !(!f || !((y = f) !== null && y !== void 0 && (y = y.producerReport) !== null && y !== void 0 && y.length))) {
2920
+ if (f = _.v, !(!f || !((k = f) !== null && k !== void 0 && (k = k.producerReport) !== null && k !== void 0 && k.length))) {
2921
2921
  _.n = 5;
2922
2922
  break;
2923
2923
  }
2924
2924
  return this.logger.debug("callStats::sendPingStatsEvent::staleProducingTransport", { disclaimer: "Stale producer? Regenerating Stream Maps!" }), _.n = 2, this.measurements.getProducersReport(De(this.producers.values()));
2925
2925
  case 2:
2926
- if (k = _.v, !(f && k)) {
2926
+ if (y = _.v, !(f && y)) {
2927
2927
  _.n = 3;
2928
2928
  break;
2929
2929
  }
2930
- f.producerReport = k, _.n = 5;
2930
+ f.producerReport = y, _.n = 5;
2931
2931
  break;
2932
2932
  case 3:
2933
2933
  return _.n = 4, this.measurements.getProcessedStats(this.producingTransport, !1, !0);
@@ -3172,20 +3172,20 @@ var by = ae, jf = /* @__PURE__ */ function(s) {
3172
3172
  }
3173
3173
  return R(r, s), S(r, [{ key: "initialize", value: function() {
3174
3174
  var e = m(/* @__PURE__ */ h().m(function n(i) {
3175
- var a, o, c, l, d, p, v, f, g, y, k, b, T, E, I, M, _;
3175
+ var a, o, c, l, d, p, v, f, g, k, y, b, T, E, I, M, _;
3176
3176
  return h().w(function(O) {
3177
3177
  for (; ; )
3178
3178
  switch (O.p = O.n) {
3179
3179
  case 0:
3180
- if (a = i.peerId, o = i.engineName, c = i.env, l = c === void 0 ? wf.PROD : c, d = i.iceServers, p = i.apiBase, v = p === void 0 ? "https://api.cluster.dyte.in" : p, f = i.flags, g = i.logger, y = g === void 0 ? console : g, k = i.apiHostnames, b = i.skipConnectivityChecks, T = b === void 0 ? !1 : b, E = i.authToken, O.p = 1, this.peerId = a, this.logger = y, E) {
3180
+ if (a = i.peerId, o = i.engineName, c = i.env, l = c === void 0 ? wf.PROD : c, d = i.iceServers, p = i.apiBase, v = p === void 0 ? "https://api.cluster.dyte.in" : p, f = i.flags, g = i.logger, k = g === void 0 ? console : g, y = i.apiHostnames, b = i.skipConnectivityChecks, T = b === void 0 ? !1 : b, E = i.authToken, O.p = 1, this.peerId = a, this.logger = k, E) {
3181
3181
  O.n = 2;
3182
3182
  break;
3183
3183
  }
3184
3184
  return this.logger.error("callStats::initialize", { event: "auth_token_missing", peerId: this.peerId }), this.stallCallStats(), O.a(2);
3185
3185
  case 2:
3186
- return O.n = 3, Lf.getIPDetails({ peerId: a, apiHostnames: k, logger: y });
3186
+ return O.n = 3, Lf.getIPDetails({ peerId: a, apiHostnames: y, logger: k });
3187
3187
  case 3:
3188
- this.ipInformation = O.v, this.backend = new by(v, o, l, f, y, a, k, E), this.iceServers = d, (I = this.backend) === null || I === void 0 || I.registerIceServers(this.iceServers), this.initialized = !0, (M = this.backend) === null || M === void 0 || (M = M.eventHandler) === null || M === void 0 || M.emit("initialized", this.ipInformation), this.emit("initialized", this.ipInformation), this.startPreCallTest(T), O.n = 5;
3188
+ this.ipInformation = O.v, this.backend = new by(v, o, l, f, k, a, y, E), this.iceServers = d, (I = this.backend) === null || I === void 0 || I.registerIceServers(this.iceServers), this.initialized = !0, (M = this.backend) === null || M === void 0 || (M = M.eventHandler) === null || M === void 0 || M.emit("initialized", this.ipInformation), this.emit("initialized", this.ipInformation), this.startPreCallTest(T), O.n = 5;
3189
3189
  break;
3190
3190
  case 4:
3191
3191
  O.p = 4, _ = O.v, this.logger.error("callStats::CallStatsIntegration", { peerId: this.peerId, error: _ instanceof Error ? _.message : String(_), stack: _ instanceof Error ? _.stack : void 0 }), this.stallCallStats();
@@ -3464,7 +3464,7 @@ var by = ae, jf = /* @__PURE__ */ function(s) {
3464
3464
  } }, { key: "ivsPlayerEvent", value: function(t, n) {
3465
3465
  var i = this, a = new Date();
3466
3466
  this.onSafeInitialization(function() {
3467
- var o, c, l, d, p, v, f, g, y, k, b;
3467
+ var o, c, l, d, p, v, f, g, k, y, b;
3468
3468
  switch (t) {
3469
3469
  case "PlayerRebuffering":
3470
3470
  (o = i.backend) === null || o === void 0 || o.sendIVSPlayerRebufferEvent(a);
@@ -3491,10 +3491,10 @@ var by = ae, jf = /* @__PURE__ */ function(s) {
3491
3491
  (g = i.backend) === null || g === void 0 || g.sendIVSPlayerRecoverableErrorEvent(n, a);
3492
3492
  break;
3493
3493
  case "PlayerAnalyticsEvent":
3494
- (y = i.backend) === null || y === void 0 || y.sendIVSPlayerAnalyticsEvent(n, a);
3494
+ (k = i.backend) === null || k === void 0 || k.sendIVSPlayerAnalyticsEvent(n, a);
3495
3495
  break;
3496
3496
  case "PlayerPlaybackRateChanged":
3497
- (k = i.backend) === null || k === void 0 || k.sendIVSPlayerPlaybackRateChangedEvent(n, a);
3497
+ (y = i.backend) === null || y === void 0 || y.sendIVSPlayerPlaybackRateChangedEvent(n, a);
3498
3498
  break;
3499
3499
  case "PlayerQualityChanged":
3500
3500
  (b = i.backend) === null || b === void 0 || b.sendIVSPlayerQualityChanged(n, a);
@@ -4484,14 +4484,14 @@ function Hu(s, r, e, t, n, i) {
4484
4484
  var f = i.get(s);
4485
4485
  if (f)
4486
4486
  return f;
4487
- i.set(s, a), Vw(s) ? s.forEach(function(k) {
4488
- a.add(Hu(k, r, e, k, s, i));
4489
- }) : Ow(s) && s.forEach(function(k, b) {
4490
- a.set(b, Hu(k, r, e, b, s, i));
4487
+ i.set(s, a), Vw(s) ? s.forEach(function(y) {
4488
+ a.add(Hu(y, r, e, y, s, i));
4489
+ }) : Ow(s) && s.forEach(function(y, b) {
4490
+ a.set(b, Hu(y, r, e, b, s, i));
4491
4491
  });
4492
- var g = l ? c ? G0 : Ud : c ? yc : Ll, y = d ? void 0 : g(s);
4493
- return _k(y || s, function(k, b) {
4494
- y && (b = k, k = s[b]), qf(a, b, Hu(k, r, e, b, s, i));
4492
+ var g = l ? c ? G0 : Ud : c ? yc : Ll, k = d ? void 0 : g(s);
4493
+ return _k(k || s, function(y, b) {
4494
+ k && (b = y, y = s[b]), qf(a, b, Hu(y, r, e, b, s, i));
4495
4495
  }), a;
4496
4496
  }
4497
4497
  var cb = 4;
@@ -4535,11 +4535,11 @@ function dg(s, r, e, t, n, i) {
4535
4535
  return l == r && d == s;
4536
4536
  var p = -1, v = !0, f = e & yb ? new dc() : void 0;
4537
4537
  for (i.set(s, r), i.set(r, s); ++p < o; ) {
4538
- var g = s[p], y = r[p];
4538
+ var g = s[p], k = r[p];
4539
4539
  if (t)
4540
- var k = a ? t(y, g, p, r, s, i) : t(g, y, p, s, r, i);
4541
- if (k !== void 0) {
4542
- if (k)
4540
+ var y = a ? t(k, g, p, r, s, i) : t(g, k, p, s, r, i);
4541
+ if (y !== void 0) {
4542
+ if (y)
4543
4543
  continue;
4544
4544
  v = !1;
4545
4545
  break;
@@ -4552,7 +4552,7 @@ function dg(s, r, e, t, n, i) {
4552
4552
  v = !1;
4553
4553
  break;
4554
4554
  }
4555
- } else if (!(g === y || n(g, y, e, t, i))) {
4555
+ } else if (!(g === k || n(g, k, e, t, i))) {
4556
4556
  v = !1;
4557
4557
  break;
4558
4558
  }
@@ -4620,24 +4620,24 @@ function $b(s, r, e, t, n, i) {
4620
4620
  var f = i.get(s), g = i.get(r);
4621
4621
  if (f && g)
4622
4622
  return f == r && g == s;
4623
- var y = !0;
4623
+ var k = !0;
4624
4624
  i.set(s, r), i.set(r, s);
4625
- for (var k = a; ++p < c; ) {
4625
+ for (var y = a; ++p < c; ) {
4626
4626
  v = o[p];
4627
4627
  var b = s[v], T = r[v];
4628
4628
  if (t)
4629
4629
  var E = a ? t(T, b, v, r, s, i) : t(b, T, v, s, r, i);
4630
4630
  if (!(E === void 0 ? b === T || n(b, T, e, t, i) : E)) {
4631
- y = !1;
4631
+ k = !1;
4632
4632
  break;
4633
4633
  }
4634
- k || (k = v == "constructor");
4634
+ y || (y = v == "constructor");
4635
4635
  }
4636
- if (y && !k) {
4636
+ if (k && !y) {
4637
4637
  var I = s.constructor, M = r.constructor;
4638
- I != M && "constructor" in s && "constructor" in r && !(typeof I == "function" && I instanceof I && typeof M == "function" && M instanceof M) && (y = !1);
4638
+ I != M && "constructor" in s && "constructor" in r && !(typeof I == "function" && I instanceof I && typeof M == "function" && M instanceof M) && (k = !1);
4639
4639
  }
4640
- return i.delete(s), i.delete(r), y;
4640
+ return i.delete(s), i.delete(r), k;
4641
4641
  }
4642
4642
  var jb = 1, cv = "[object Arguments]", lv = "[object Array]", jc = "[object Object]", Ub = Object.prototype, dv = Ub.hasOwnProperty;
4643
4643
  function Fb(s, r, e, t, n, i) {
@@ -4654,8 +4654,8 @@ function Fb(s, r, e, t, n, i) {
4654
4654
  if (!(e & jb)) {
4655
4655
  var f = d && dv.call(s, "__wrapped__"), g = p && dv.call(r, "__wrapped__");
4656
4656
  if (f || g) {
4657
- var y = f ? s.value() : s, k = g ? r.value() : r;
4658
- return i || (i = new Fn()), n(y, k, e, t, i);
4657
+ var k = f ? s.value() : s, y = g ? r.value() : r;
4658
+ return i || (i = new Fn()), n(k, y, e, t, i);
4659
4659
  }
4660
4660
  }
4661
4661
  return v ? (i || (i = new Fn()), $b(s, r, e, t, n, i)) : !1;
@@ -4774,19 +4774,19 @@ function cp(s, r, e) {
4774
4774
  function g(_) {
4775
4775
  return l = _, o = setTimeout(b, r), d ? f(_) : a;
4776
4776
  }
4777
- function y(_) {
4777
+ function k(_) {
4778
4778
  var O = _ - c, L = _ - l, q = r - O;
4779
4779
  return p ? uP(q, i - L) : q;
4780
4780
  }
4781
- function k(_) {
4781
+ function y(_) {
4782
4782
  var O = _ - c, L = _ - l;
4783
4783
  return c === void 0 || O >= r || O < 0 || p && L >= i;
4784
4784
  }
4785
4785
  function b() {
4786
4786
  var _ = rd();
4787
- if (k(_))
4787
+ if (y(_))
4788
4788
  return T(_);
4789
- o = setTimeout(b, y(_));
4789
+ o = setTimeout(b, k(_));
4790
4790
  }
4791
4791
  function T(_) {
4792
4792
  return o = void 0, v && t ? f(_) : (t = n = void 0, a);
@@ -4798,7 +4798,7 @@ function cp(s, r, e) {
4798
4798
  return o === void 0 ? a : T(rd());
4799
4799
  }
4800
4800
  function M() {
4801
- var _ = rd(), O = k(_);
4801
+ var _ = rd(), O = y(_);
4802
4802
  if (t = arguments, n = this, c = _, O) {
4803
4803
  if (o === void 0)
4804
4804
  return g(c);
@@ -5046,12 +5046,12 @@ var D = /* @__PURE__ */ function() {
5046
5046
  }
5047
5047
  } }, { key: "sendOtelLogsToNewRelic", value: function() {
5048
5048
  var r = m(/* @__PURE__ */ h().m(function t(n) {
5049
- var i, a, o, c, l, d, p, v, f, g, y, k = arguments, b;
5049
+ var i, a, o, c, l, d, p, v, f, g, k, y = arguments, b;
5050
5050
  return h().w(function(T) {
5051
5051
  for (; ; )
5052
5052
  switch (T.p = T.n) {
5053
5053
  case 0:
5054
- if (i = k.length > 1 && k[1] !== void 0 ? k[1] : { isInDestructionMode: !1 }, a = i.isInDestructionMode, o = a === void 0 ? !1 : a, c = new AbortController(), l = setTimeout(function() {
5054
+ if (i = y.length > 1 && y[1] !== void 0 ? y[1] : { isInDestructionMode: !1 }, a = i.isInDestructionMode, o = a === void 0 ? !1 : a, c = new AbortController(), l = setTimeout(function() {
5055
5055
  return c.abort("Logs request timed out after 8 seconds");
5056
5056
  }, 8e3), T.p = 1, d = Aa.getContext(this.meetingMetadata.peerId), p = JSON.stringify({ meetingMetadata: pv(d, "sendOtelLogsToNewRelic", this.meetingMetadata, "meetingMetadata"), serviceName: d.getValue("sdkName"), logs: n }), f = { Authorization: "Bearer ".concat(d.getValue("authToken")) }, !this.isCompressionSupported()) {
5057
5057
  T.n = 3;
@@ -5083,7 +5083,7 @@ var D = /* @__PURE__ */ function() {
5083
5083
  T.n = 7;
5084
5084
  break;
5085
5085
  case 6:
5086
- T.p = 6, b = T.v, o || (this.addLogInCurrentSpan("error", "opentelemetry::sendOtelLogToNewRelic_failed", { error: zc(b) }), (y = this.logsCache).push.apply(y, De(n)));
5086
+ T.p = 6, b = T.v, o || (this.addLogInCurrentSpan("error", "opentelemetry::sendOtelLogToNewRelic_failed", { error: zc(b) }), (k = this.logsCache).push.apply(k, De(n)));
5087
5087
  case 7:
5088
5088
  return T.p = 7, clearTimeout(l), T.f(7);
5089
5089
  case 8:
@@ -5153,11 +5153,11 @@ var D = /* @__PURE__ */ function() {
5153
5153
  l.addLogInCurrentSpan("info", e, t);
5154
5154
  var f = performance.now(), g = o.apply(this, p);
5155
5155
  return Promise.resolve(g).then(function() {
5156
- var y = performance.now();
5157
- y - f > 10 && l.addLogInCurrentSpan("info", "".concat(e, "_timing"), { execTime: y - f });
5156
+ var k = performance.now();
5157
+ k - f > 10 && l.addLogInCurrentSpan("info", "".concat(e, "_timing"), { execTime: k - f });
5158
5158
  }).catch(function() {
5159
- var y = performance.now();
5160
- l.addLogInCurrentSpan("info", "".concat(e, "_timing"), { execTime: y - f });
5159
+ var k = performance.now();
5160
+ l.addLogInCurrentSpan("info", "".concat(e, "_timing"), { execTime: k - f });
5161
5161
  }), g;
5162
5162
  }, a;
5163
5163
  };
@@ -5484,18 +5484,18 @@ var HP = function(r, e, t) {
5484
5484
  };
5485
5485
  return "#".concat(n(r)).concat(n(e)).concat(n(t));
5486
5486
  }, yg = function(r) {
5487
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : mg, t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0.4, n = [], i = FP(r), a = Ue(i, 3), o = a[0], c = a[1], l = a[2], d = BP(o, c, l), p = Ue(d, 3), v = p[0], f = p[1], g = p[2], y = Math.round(g * 100);
5488
- y > 70 ? t = 0.8 : y > 60 ? t = 0.9 : y < 10 ? t = 0.075 : y < 42 && (t = 0.3);
5489
- var k = e.findIndex(function(N) {
5487
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : mg, t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0.4, n = [], i = FP(r), a = Ue(i, 3), o = a[0], c = a[1], l = a[2], d = BP(o, c, l), p = Ue(d, 3), v = p[0], f = p[1], g = p[2], k = Math.round(g * 100);
5488
+ k > 70 ? t = 0.8 : k > 60 ? t = 0.9 : k < 10 ? t = 0.075 : k < 42 && (t = 0.3);
5489
+ var y = e.findIndex(function(N) {
5490
5490
  return N === 0;
5491
5491
  });
5492
- if (k === -1)
5492
+ if (y === -1)
5493
5493
  throw new Error("Invalid reducer provided, it must contain atleast one zero");
5494
- var b = 5 - k, T = k + 1, E = (100 - y) / b, I = y / T, M = Un(e), _;
5494
+ var b = 5 - y, T = y + 1, E = (100 - k) / b, I = k / T, M = Un(e), _;
5495
5495
  try {
5496
5496
  for (M.s(); !(_ = M.n()).done; ) {
5497
5497
  var O = _.value, L = void 0;
5498
- O < 0 ? L = y + O * I * t : O > 0 ? L = y + O * E * t : L = y;
5498
+ O < 0 ? L = k + O * I * t : O > 0 ? L = k + O * E * t : L = k;
5499
5499
  var q = HP(v, f, L / 100), X = Ue(q, 3), Y = X[0], H = X[1], J = X[2];
5500
5500
  n.push(qP(Y, H, J));
5501
5501
  }
@@ -5654,14 +5654,14 @@ function XP(s) {
5654
5654
  }).join("").toUpperCase();
5655
5655
  }
5656
5656
  var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5657
- var o = 0.5, c = 0.5, l = i, d = a, p = Math.min(t / l, n / d), v = l * p, f = d * p, g, y, k, b, T = 1;
5658
- return v < t && (T = t / v), Math.abs(T - 1) < 1e-14 && f < n && (T = n / f), v *= T, f *= T, k = l / (v / t), b = d / (f / n), g = (l - k) * o, y = (d - b) * c, g < 0 && (g = 0), y < 0 && (y = 0), k > l && (k = l), b > d && (b = d), [g, y, k, b, r, e, t, n];
5659
- }, Ct = /* @__PURE__ */ w("canvas"), Pn = /* @__PURE__ */ w("context"), at = /* @__PURE__ */ w("videoContainer"), Jt = /* @__PURE__ */ w("video"), Te = /* @__PURE__ */ w("dimensions"), Kt = /* @__PURE__ */ w("colors"), Vr = /* @__PURE__ */ w("rafRequest"), Me = /* @__PURE__ */ w("sources"), Ee = /* @__PURE__ */ w("self"), us = /* @__PURE__ */ w("selfSourceId"), cs = /* @__PURE__ */ w("pinIcon"), ls = /* @__PURE__ */ w("handRaiseIcon"), $r = /* @__PURE__ */ w("state"), ds = /* @__PURE__ */ w("initComplete"), nd = /* @__PURE__ */ w("handleSelfPeerIdChange"), eu = /* @__PURE__ */ w("roomLeftListener"), xP = /* @__PURE__ */ function(s) {
5657
+ var o = 0.5, c = 0.5, l = i, d = a, p = Math.min(t / l, n / d), v = l * p, f = d * p, g, k, y, b, T = 1;
5658
+ return v < t && (T = t / v), Math.abs(T - 1) < 1e-14 && f < n && (T = n / f), v *= T, f *= T, y = l / (v / t), b = d / (f / n), g = (l - y) * o, k = (d - b) * c, g < 0 && (g = 0), k < 0 && (k = 0), y > l && (y = l), b > d && (b = d), [g, k, y, b, r, e, t, n];
5659
+ }, Ct = /* @__PURE__ */ w("canvas"), Pn = /* @__PURE__ */ w("context"), st = /* @__PURE__ */ w("videoContainer"), Jt = /* @__PURE__ */ w("video"), Te = /* @__PURE__ */ w("dimensions"), Kt = /* @__PURE__ */ w("colors"), Vr = /* @__PURE__ */ w("rafRequest"), Me = /* @__PURE__ */ w("sources"), Ee = /* @__PURE__ */ w("self"), us = /* @__PURE__ */ w("selfSourceId"), cs = /* @__PURE__ */ w("pinIcon"), ls = /* @__PURE__ */ w("handRaiseIcon"), $r = /* @__PURE__ */ w("state"), ds = /* @__PURE__ */ w("initComplete"), nd = /* @__PURE__ */ w("handleSelfPeerIdChange"), eu = /* @__PURE__ */ w("roomLeftListener"), xP = /* @__PURE__ */ function(s) {
5660
5660
  function r(e, t, n, i) {
5661
5661
  var a;
5662
5662
  P(this, r);
5663
5663
  var o = e.getValue("logger");
5664
- return a = C(this, r, [o]), Object.defineProperty(a, Ct, { writable: !0, value: void 0 }), Object.defineProperty(a, Pn, { writable: !0, value: void 0 }), Object.defineProperty(a, at, { writable: !0, value: void 0 }), Object.defineProperty(a, Jt, { writable: !0, value: void 0 }), Object.defineProperty(a, Te, { writable: !0, value: { height: mv, width: yv } }), Object.defineProperty(a, Kt, { writable: !0, value: { brand: "#2160FD", background: "#141414", text: "#000000", videoBackground: "#191919", textOnBrand: "#EEEEEE" } }), Object.defineProperty(a, Vr, { writable: !0, value: void 0 }), Object.defineProperty(a, Me, { writable: !0, value: {} }), Object.defineProperty(a, Ee, { writable: !0, value: void 0 }), Object.defineProperty(a, us, { writable: !0, value: void 0 }), Object.defineProperty(a, cs, { writable: !0, value: void 0 }), Object.defineProperty(a, ls, { writable: !0, value: void 0 }), Object.defineProperty(a, $r, { writable: !0, value: void 0 }), Object.defineProperty(a, ds, { writable: !0, value: !1 }), Object.defineProperty(a, nd, { writable: !0, value: function(l) {
5664
+ return a = C(this, r, [o]), Object.defineProperty(a, Ct, { writable: !0, value: void 0 }), Object.defineProperty(a, Pn, { writable: !0, value: void 0 }), Object.defineProperty(a, st, { writable: !0, value: void 0 }), Object.defineProperty(a, Jt, { writable: !0, value: void 0 }), Object.defineProperty(a, Te, { writable: !0, value: { height: mv, width: yv } }), Object.defineProperty(a, Kt, { writable: !0, value: { brand: "#2160FD", background: "#141414", text: "#000000", videoBackground: "#191919", textOnBrand: "#EEEEEE" } }), Object.defineProperty(a, Vr, { writable: !0, value: void 0 }), Object.defineProperty(a, Me, { writable: !0, value: {} }), Object.defineProperty(a, Ee, { writable: !0, value: void 0 }), Object.defineProperty(a, us, { writable: !0, value: void 0 }), Object.defineProperty(a, cs, { writable: !0, value: void 0 }), Object.defineProperty(a, ls, { writable: !0, value: void 0 }), Object.defineProperty(a, $r, { writable: !0, value: void 0 }), Object.defineProperty(a, ds, { writable: !0, value: !1 }), Object.defineProperty(a, nd, { writable: !0, value: function(l) {
5665
5665
  var d = u(a, us)[us];
5666
5666
  if (u(a, us)[us] = l, !(!d || d === l)) {
5667
5667
  var p = u(a, Me)[Me][d];
@@ -5696,7 +5696,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5696
5696
  }));
5697
5697
  }, a.disable = function() {
5698
5698
  var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
5699
- u(a, $r)[$r] = "idle", a.cleanupEventListeners(), cancelAnimationFrame(u(a, Vr)[Vr]), c !== !0 && document.body.removeChild(u(a, at)[at]), u(a, Vr)[Vr] = void 0, document.pictureInPictureElement && document.exitPictureInPicture();
5699
+ u(a, $r)[$r] = "idle", a.cleanupEventListeners(), cancelAnimationFrame(u(a, Vr)[Vr]), c !== !0 && document.body.removeChild(u(a, st)[st]), u(a, Vr)[Vr] = void 0, document.pictureInPictureElement && document.exitPictureInPicture();
5700
5700
  }, u(a, Pn)[Pn] = e, u(a, $r)[$r] = "idle", u(a, Ee)[Ee] = t, u(a, us)[us] = e.getValue("peerId"), u(a, Pn)[Pn].subscribe("peerId", u(a, nd)[nd]), u(a, Kt)[Kt] = { brand: t.config.designTokens.colors.brand[500], background: t.config.designTokens.colors.background[1e3], text: t.config.designTokens.colors.text, videoBackground: t.config.designTokens.colors.videoBg, textOnBrand: t.config.designTokens.colors.textOnBrand }, n && a.setupIcon("pin", n), i && a.setupIcon("handRaise", i), a;
5701
5701
  }
5702
5702
  return R(r, s), S(r, [{ key: "setupIcon", value: (
@@ -5768,7 +5768,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5768
5768
  }, {
5769
5769
  key: "createVideoContainer",
5770
5770
  value: function() {
5771
- u(this, at)[at] = document.createElement("div"), u(this, at)[at].style.width = "0.1px", u(this, at)[at].style.height = "0.1px", u(this, at)[at].style.overflow = "hidden", u(this, at)[at].style.position = "absolute", u(this, at)[at].style.bottom = "0", u(this, at)[at].style.right = "0", u(this, at)[at].style.opacity = "0", u(this, at)[at].appendChild(u(this, Jt)[Jt]);
5771
+ u(this, st)[st] = document.createElement("div"), u(this, st)[st].style.width = "0.1px", u(this, st)[st].style.height = "0.1px", u(this, st)[st].style.overflow = "hidden", u(this, st)[st].style.position = "absolute", u(this, st)[st].style.bottom = "0", u(this, st)[st].style.right = "0", u(this, st)[st].style.opacity = "0", u(this, st)[st].appendChild(u(this, Jt)[Jt]);
5772
5772
  }
5773
5773
  /** @access private */
5774
5774
  }, { key: "setupEventListeners", value: function() {
@@ -5821,19 +5821,19 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5821
5821
  key: "drawEmptyTile",
5822
5822
  value: function(t, n, i, a) {
5823
5823
  if (u(this, Ct)[Ct] !== void 0) {
5824
- var o = u(this, Ct)[Ct].getContext("2d"), c = u(this, Ct)[Ct].width, l = 0, d = 0, p = n - l * 2, v = i - l * 2, f = Math.floor(c / p), g = Math.floor(t / f), y = t % f, k = y * (p + l) + l, b = g * (v + l) + l, T = a != null ? a : {}, E = T.displayText, I = T.image;
5825
- o.fillStyle = E || I ? u(this, Kt)[Kt].videoBackground : u(this, Kt)[Kt].background, o.strokeStyle = u(this, Kt)[Kt].brand, o.beginPath(), o.moveTo(k + d, b), o.arcTo(k + p, b, k + p, b + d, d), o.arcTo(k + p, b + v, k + p - d, b + v, d), o.arcTo(k, b + v, k, b + v - d, d), o.arcTo(k, b, k + d, b, d), o.closePath(), o.fill(), o.stroke();
5826
- var M = p / 6, _ = p / 2 + k, O = v / 2 + b;
5827
- o.save(), (E || I) && (o.beginPath(), o.arc(_, O, M, 0, Math.PI * 2), o.fillStyle = u(this, Kt)[Kt].brand, o.fill(), I ? (o.clip(), o.drawImage(I, _ - M, O - M, M * 2, M * 2), o.restore()) : E && (o.fillStyle = u(this, Kt)[Kt].textOnBrand, o.font = "".concat(M / 2, "px sans-serif"), o.textAlign = "center", o.textBaseline = "middle", o.fillText(E, _, O)), this.drawIcons(a, k, b, Math.max(p, v)));
5824
+ var o = u(this, Ct)[Ct].getContext("2d"), c = u(this, Ct)[Ct].width, l = 0, d = 0, p = n - l * 2, v = i - l * 2, f = Math.floor(c / p), g = Math.floor(t / f), k = t % f, y = k * (p + l) + l, b = g * (v + l) + l, T = a != null ? a : {}, E = T.displayText, I = T.image;
5825
+ o.fillStyle = E || I ? u(this, Kt)[Kt].videoBackground : u(this, Kt)[Kt].background, o.strokeStyle = u(this, Kt)[Kt].brand, o.beginPath(), o.moveTo(y + d, b), o.arcTo(y + p, b, y + p, b + d, d), o.arcTo(y + p, b + v, y + p - d, b + v, d), o.arcTo(y, b + v, y, b + v - d, d), o.arcTo(y, b, y + d, b, d), o.closePath(), o.fill(), o.stroke();
5826
+ var M = p / 6, _ = p / 2 + y, O = v / 2 + b;
5827
+ o.save(), (E || I) && (o.beginPath(), o.arc(_, O, M, 0, Math.PI * 2), o.fillStyle = u(this, Kt)[Kt].brand, o.fill(), I ? (o.clip(), o.drawImage(I, _ - M, O - M, M * 2, M * 2), o.restore()) : E && (o.fillStyle = u(this, Kt)[Kt].textOnBrand, o.font = "".concat(M / 2, "px sans-serif"), o.textAlign = "center", o.textBaseline = "middle", o.fillText(E, _, O)), this.drawIcons(a, y, b, Math.max(p, v)));
5828
5828
  }
5829
5829
  }
5830
5830
  /** @access private */
5831
5831
  }, {
5832
5832
  key: "drawIcons",
5833
5833
  value: function(t, n, i, a) {
5834
- var o = this, c = Math.min(Math.max(a * 0.15, 100), 200), l = c * 0.2, d = c * 0.2, p = n + l, v = i + l, f = function(y) {
5835
- var k = u(o, Ct)[Ct].getContext("2d");
5836
- k.save(), k.fillStyle = u(o, Kt)[Kt].background, k.beginPath(), k.moveTo(p + d, v), k.arcTo(p + c, v, p + c, v + d, d), k.arcTo(p + c, v + c, p + c - d, v + c, d), k.arcTo(p, v + c, p, v + c - d, d), k.arcTo(p, v, p + d, v, d), k.closePath(), k.fill(), typeof y == "string" ? (k.font = "".concat(c / 1.5, "px sans-serif"), k.fillStyle = u(o, Kt)[Kt].text, k.textAlign = "center", k.textBaseline = "top", k.fillText(y, c / 2 + p, v + l)) : k.drawImage(y, p + l, v + l, c - l * 2, c - l * 2), p += c + l, k.restore();
5834
+ var o = this, c = Math.min(Math.max(a * 0.15, 100), 200), l = c * 0.2, d = c * 0.2, p = n + l, v = i + l, f = function(k) {
5835
+ var y = u(o, Ct)[Ct].getContext("2d");
5836
+ y.save(), y.fillStyle = u(o, Kt)[Kt].background, y.beginPath(), y.moveTo(p + d, v), y.arcTo(p + c, v, p + c, v + d, d), y.arcTo(p + c, v + c, p + c - d, v + c, d), y.arcTo(p, v + c, p, v + c - d, d), y.arcTo(p, v, p + d, v, d), y.closePath(), y.fill(), typeof k == "string" ? (y.font = "".concat(c / 1.5, "px sans-serif"), y.fillStyle = u(o, Kt)[Kt].text, y.textAlign = "center", y.textBaseline = "top", y.fillText(k, c / 2 + p, v + l)) : y.drawImage(k, p + l, v + l, c - l * 2, c - l * 2), p += c + l, y.restore();
5837
5837
  };
5838
5838
  t.pinned && f(u(this, cs)[cs]), t.handRaised && f(u(this, ls)[ls]), t.reaction && f(t.reaction);
5839
5839
  }
@@ -5848,8 +5848,8 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5848
5848
  for (var d = 0; d < u(this, Te)[Te].width - 5 && l < i; ) {
5849
5849
  var p;
5850
5850
  if ((p = o[l]) !== null && p !== void 0 && p.enabled) {
5851
- var v, f = o[l].element, g = ZP(d, c, t, n, f.videoWidth, f.videoHeight), y = Ue(g, 8), k = y[0], b = y[1], T = y[2], E = y[3], I = y[4], M = y[5], _ = y[6], O = y[7], L = f == null || (v = f.classList) === null || v === void 0 ? void 0 : v.contains("mirror");
5852
- L ? (a.save(), a.scale(-1, 1), a.drawImage(f, k, b, T, E, -1 * I, M, -1 * _, O), a.restore()) : a.drawImage(f, k, b, T, E, I, M, _, O), this.drawIcons(o[l], I, M, Math.max(_, O));
5851
+ var v, f = o[l].element, g = ZP(d, c, t, n, f.videoWidth, f.videoHeight), k = Ue(g, 8), y = k[0], b = k[1], T = k[2], E = k[3], I = k[4], M = k[5], _ = k[6], O = k[7], L = f == null || (v = f.classList) === null || v === void 0 ? void 0 : v.contains("mirror");
5852
+ L ? (a.save(), a.scale(-1, 1), a.drawImage(f, y, b, T, E, -1 * I, M, -1 * _, O), a.restore()) : a.drawImage(f, y, b, T, E, I, M, _, O), this.drawIcons(o[l], I, M, Math.max(_, O));
5853
5853
  } else
5854
5854
  this.drawEmptyTile(l, t, n, o[l]);
5855
5855
  l += 1, d += t;
@@ -5900,9 +5900,9 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5900
5900
  }, {
5901
5901
  key: "cleanup",
5902
5902
  value: function() {
5903
- if (u(this, ds)[ds] = !1, this.isSupported() && document.exitPictureInPicture !== void 0 && document.pictureInPictureElement !== null && document.exitPictureInPicture(), u(this, at)[at])
5903
+ if (u(this, ds)[ds] = !1, this.isSupported() && document.exitPictureInPicture !== void 0 && document.pictureInPictureElement !== null && document.exitPictureInPicture(), u(this, st)[st])
5904
5904
  try {
5905
- document.body.removeChild(u(this, at)[at]);
5905
+ document.body.removeChild(u(this, st)[st]);
5906
5906
  } catch (t) {
5907
5907
  }
5908
5908
  this.removeAllSources(), u(this, Ct)[Ct] = void 0, u(this, Jt)[Jt] = void 0, u(this, Vr)[Vr] = void 0;
@@ -6034,7 +6034,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
6034
6034
  */
6035
6035
  }, { key: "enable", value: function() {
6036
6036
  var t = this;
6037
- u(this, $r)[$r] = "activating", this.setupEventListeners(), this.setupMediaSessionEvents(), this.updateMediaSession("CAMERA", u(this, Ee)[Ee].videoEnabled), this.updateMediaSession("MIC", u(this, Ee)[Ee].audioEnabled), document.body.appendChild(u(this, at)[at]), u(this, Vr)[Vr] = requestAnimationFrame(function() {
6037
+ u(this, $r)[$r] = "activating", this.setupEventListeners(), this.setupMediaSessionEvents(), this.updateMediaSession("CAMERA", u(this, Ee)[Ee].videoEnabled), this.updateMediaSession("MIC", u(this, Ee)[Ee].audioEnabled), document.body.appendChild(u(this, st)[st]), u(this, Vr)[Vr] = requestAnimationFrame(function() {
6038
6038
  return t.animate();
6039
6039
  }), u(this, Jt)[Jt].onloadedmetadata = function() {
6040
6040
  u(t, Jt)[Jt].requestPictureInPicture().then(function() {
@@ -10896,16 +10896,16 @@ var yl = /* @__PURE__ */ function(s) {
10896
10896
  return i;
10897
10897
  } }, { key: "request", value: function() {
10898
10898
  var r = m(/* @__PURE__ */ h().m(function t(n) {
10899
- var i, a, o, c, l, d, p, v, f, g, y, k, b, T, E, I, M, _;
10899
+ var i, a, o, c, l, d, p, v, f, g, k, y, b, T, E, I, M, _;
10900
10900
  return h().w(function(O) {
10901
10901
  for (; ; )
10902
10902
  switch (O.p = O.n) {
10903
10903
  case 0:
10904
- return a = ((i = n.method) === null || i === void 0 ? void 0 : i.toUpperCase()) || "GET", o = this.buildURL(n.url || "", n.params), c = V(V({}, this.defaults.headers.common), n.headers), a !== "GET" && a !== "HEAD" && n.data && !c["Content-Type"] && (c["Content-Type"] = "application/json"), l = c["Content-Type"], d = l === "application/json" ? JSON.stringify(n.data) : n.data, p = { method: a, headers: c, body: a !== "GET" && a !== "HEAD" && n.data ? d : void 0 }, v = n.timeout || this.defaults.timeout, f = n.retry !== void 0 ? n.retry : this.defaults.retry, g = n.retryDelay || this.defaults.retryDelay, O.p = 1, y = new AbortController(), k = setTimeout(function() {
10905
- return y.abort();
10906
- }, v), p.signal = y.signal, O.n = 2, fetch(o, p);
10904
+ return a = ((i = n.method) === null || i === void 0 ? void 0 : i.toUpperCase()) || "GET", o = this.buildURL(n.url || "", n.params), c = V(V({}, this.defaults.headers.common), n.headers), a !== "GET" && a !== "HEAD" && n.data && !c["Content-Type"] && (c["Content-Type"] = "application/json"), l = c["Content-Type"], d = l === "application/json" ? JSON.stringify(n.data) : n.data, p = { method: a, headers: c, body: a !== "GET" && a !== "HEAD" && n.data ? d : void 0 }, v = n.timeout || this.defaults.timeout, f = n.retry !== void 0 ? n.retry : this.defaults.retry, g = n.retryDelay || this.defaults.retryDelay, O.p = 1, k = new AbortController(), y = setTimeout(function() {
10905
+ return k.abort();
10906
+ }, v), p.signal = k.signal, O.n = 2, fetch(o, p);
10907
10907
  case 2:
10908
- if (b = O.v, clearTimeout(k), T = null, E = b.headers.get("content-type"), !(E && E.includes("application/json"))) {
10908
+ if (b = O.v, clearTimeout(y), T = null, E = b.headers.get("content-type"), !(E && E.includes("application/json"))) {
10909
10909
  O.n = 4;
10910
10910
  break;
10911
10911
  }
@@ -11007,15 +11007,15 @@ var yl = /* @__PURE__ */ function(s) {
11007
11007
  retryDelay: d,
11008
11008
  responseType: "json"
11009
11009
  }), this.setAuthToken(f, { bearer: !0 });
11010
- var y = this.requests.request.bind(this.requests);
11010
+ var k = this.requests.request.bind(this.requests);
11011
11011
  this.requests.request = /* @__PURE__ */ function() {
11012
- var k = m(/* @__PURE__ */ h().m(function b(T) {
11012
+ var y = m(/* @__PURE__ */ h().m(function b(T) {
11013
11013
  var E, I, M, _, O, L, q, X, Y, H;
11014
11014
  return h().w(function(J) {
11015
11015
  for (; ; )
11016
11016
  switch (J.p = J.n) {
11017
11017
  case 0:
11018
- return E = r.getValue("telemetry"), J.p = 1, E.injectContext(t.requests.defaults.headers.common), J.n = 2, y(T);
11018
+ return E = r.getValue("telemetry"), J.p = 1, E.injectContext(t.requests.defaults.headers.common), J.n = 2, k(T);
11019
11019
  case 2:
11020
11020
  return I = J.v, T.url !== E.logsEndpoint && t.logger.debug("XHR - Fetched ".concat(T.method, ":").concat(T.url, " with status ").concat(I.status), { networkCall: { status: I.status, statusText: I.statusText, baseURL: T.baseURL || t.requests.defaults.baseURL, url: T.url, method: T.method } }), J.a(2, I);
11021
11021
  case 3:
@@ -11044,7 +11044,7 @@ var yl = /* @__PURE__ */ function(s) {
11044
11044
  }, b, null, [[1, 3]]);
11045
11045
  }));
11046
11046
  return function(b) {
11047
- return k.apply(this, arguments);
11047
+ return y.apply(this, arguments);
11048
11048
  };
11049
11049
  }();
11050
11050
  }
@@ -11447,7 +11447,7 @@ var pA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, fi = funct
11447
11447
  return t;
11448
11448
  }() }, { key: "sendImageMessageInternal", value: function() {
11449
11449
  var e = m(/* @__PURE__ */ h().m(function n(i, a) {
11450
- var o, c, l, d, p, v, f, g, y, k, b;
11450
+ var o, c, l, d, p, v, f, g, k, y, b;
11451
11451
  return h().w(function(T) {
11452
11452
  for (; ; )
11453
11453
  switch (T.p = T.n) {
@@ -11485,13 +11485,13 @@ var pA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, fi = funct
11485
11485
  case 5:
11486
11486
  return T.p = 5, v = Zr(), T.n = 6, v.getPresignedUrls(i.name);
11487
11487
  case 6:
11488
- return f = T.v, g = f.getLocation, y = f.putLocation, T.n = 7, v.uploadFile(i, y);
11488
+ return f = T.v, g = f.getLocation, k = f.putLocation, T.n = 7, v.uploadFile(i, k);
11489
11489
  case 7:
11490
- k = [], a && a.length > 0 && (a.push(u(this, ee)[ee].id), k = u(this, Gn)[Gn].joined.toArray().filter(function(E) {
11490
+ y = [], a && a.length > 0 && (a.push(u(this, ee)[ee].id), y = u(this, Gn)[Gn].joined.toArray().filter(function(E) {
11491
11491
  return a.includes(E.id);
11492
11492
  }).map(function(E) {
11493
11493
  return E.userId;
11494
- }), k.push(u(this, ee)[ee].userId)), u(this, Je)[Je].sendMessage(g, hn.IMAGE, a), T.n = 9;
11494
+ }), y.push(u(this, ee)[ee].userId)), u(this, Je)[Je].sendMessage(g, hn.IMAGE, a), T.n = 9;
11495
11495
  break;
11496
11496
  case 8:
11497
11497
  throw T.p = 8, b = T.v, new j("Error sending image message.", "0500", this.logger);
@@ -11506,7 +11506,7 @@ var pA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, fi = funct
11506
11506
  return t;
11507
11507
  }() }, { key: "sendFileMessageInternal", value: function() {
11508
11508
  var e = m(/* @__PURE__ */ h().m(function n(i, a) {
11509
- var o, c, l, d, p, v, f, g, y, k, b;
11509
+ var o, c, l, d, p, v, f, g, k, y, b;
11510
11510
  return h().w(function(T) {
11511
11511
  for (; ; )
11512
11512
  switch (T.p = T.n) {
@@ -11540,11 +11540,11 @@ var pA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, fi = funct
11540
11540
  case 5:
11541
11541
  return v = T.v, f = v.getLocation, g = v.putLocation, T.n = 6, p.uploadFile(i, g);
11542
11542
  case 6:
11543
- y = [], a && a.length > 0 && (a.push(u(this, ee)[ee].id), y = u(this, Gn)[Gn].joined.toArray().filter(function(E) {
11543
+ k = [], a && a.length > 0 && (a.push(u(this, ee)[ee].id), k = u(this, Gn)[Gn].joined.toArray().filter(function(E) {
11544
11544
  return a.includes(E.id);
11545
11545
  }).map(function(E) {
11546
11546
  return E.userId;
11547
- }), y.push(u(this, ee)[ee].userId)), k = JSON.stringify({ link: f, name: i.name, size: "size" in i ? i.size : 0 }), u(this, Je)[Je].sendMessage(k, hn.FILE, a), T.n = 8;
11547
+ }), k.push(u(this, ee)[ee].userId)), y = JSON.stringify({ link: f, name: i.name, size: "size" in i ? i.size : 0 }), u(this, Je)[Je].sendMessage(y, hn.FILE, a), T.n = 8;
11548
11548
  break;
11549
11549
  case 7:
11550
11550
  throw T.p = 7, b = T.v, new j("Error sending file message.", "0500", this.logger);
@@ -11592,7 +11592,7 @@ var pA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, fi = funct
11592
11592
  */
11593
11593
  }, { key: "sendCustomMessage", value: function() {
11594
11594
  var e = m(/* @__PURE__ */ h().m(function n(i, a) {
11595
- var o, c, l, d = this, p, v, f, g, y, k, b, T, E, I, M, _, O, L, q, X, Y;
11595
+ var o, c, l, d = this, p, v, f, g, k, y, b, T, E, I, M, _, O, L, q, X, Y;
11596
11596
  return h().w(function(H) {
11597
11597
  for (; ; )
11598
11598
  switch (H.n) {
@@ -11674,7 +11674,7 @@ var pA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, fi = funct
11674
11674
  };
11675
11675
  }()));
11676
11676
  case 5:
11677
- return X = H.v, H.n = 6, Promise.all((y = (k = i.videos) !== null && k !== void 0 ? k : []) === null || y === void 0 ? void 0 : y.map(/* @__PURE__ */ function() {
11677
+ return X = H.v, H.n = 6, Promise.all((k = (y = i.videos) !== null && y !== void 0 ? y : []) === null || k === void 0 ? void 0 : k.map(/* @__PURE__ */ function() {
11678
11678
  var J = m(/* @__PURE__ */ h().m(function N(U) {
11679
11679
  return h().w(function(x) {
11680
11680
  for (; ; )
@@ -11773,38 +11773,38 @@ var pA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, fi = funct
11773
11773
  }() }, { key: "editImageMessage", value: function() {
11774
11774
  var e = m(/* @__PURE__ */ h().m(function n(i, a) {
11775
11775
  var o, c, l, d, p, v, f, g;
11776
- return h().w(function(y) {
11776
+ return h().w(function(k) {
11777
11777
  for (; ; )
11778
- switch (y.p = y.n) {
11778
+ switch (k.p = k.n) {
11779
11779
  case 0:
11780
11780
  if (!(!((o = u(this, ee)[ee].permissions) !== null && o !== void 0 && (o = o.chatPublic) !== null && o !== void 0 && o.canSend) || !((c = u(this, ee)[ee].permissions) !== null && c !== void 0 && (c = c.chatPublic) !== null && c !== void 0 && c.files))) {
11781
- y.n = 1;
11781
+ k.n = 1;
11782
11782
  break;
11783
11783
  }
11784
- return this.logger.error("editImageMessage::permission_denied"), y.a(2);
11784
+ return this.logger.error("editImageMessage::permission_denied"), k.a(2);
11785
11785
  case 1:
11786
11786
  if (a) {
11787
- y.n = 2;
11787
+ k.n = 2;
11788
11788
  break;
11789
11789
  }
11790
- return this.logger.error("editImageMessage::required_argument_image_can_not_be_empty"), y.a(2);
11790
+ return this.logger.error("editImageMessage::required_argument_image_can_not_be_empty"), k.a(2);
11791
11791
  case 2:
11792
11792
  if (l = ["image/gif", "image/jpeg", "image/png"], l.includes(a.type)) {
11793
- y.n = 3;
11793
+ k.n = 3;
11794
11794
  break;
11795
11795
  }
11796
- return this.logger.error("sendImageMessage::image_type_not_supported", { chat: { imageType: a.type } }), y.a(2);
11796
+ return this.logger.error("sendImageMessage::image_type_not_supported", { chat: { imageType: a.type } }), k.a(2);
11797
11797
  case 3:
11798
- return y.p = 3, d = Zr(), y.n = 4, d.getPresignedUrls(a.name);
11798
+ return k.p = 3, d = Zr(), k.n = 4, d.getPresignedUrls(a.name);
11799
11799
  case 4:
11800
- return p = y.v, v = p.getLocation, f = p.putLocation, y.n = 5, d.uploadFile(a, f);
11800
+ return p = k.v, v = p.getLocation, f = p.putLocation, k.n = 5, d.uploadFile(a, f);
11801
11801
  case 5:
11802
- u(this, Je)[Je].editMessage(i, v, hn.IMAGE), y.n = 7;
11802
+ u(this, Je)[Je].editMessage(i, v, hn.IMAGE), k.n = 7;
11803
11803
  break;
11804
11804
  case 6:
11805
- throw y.p = 6, g = y.v, new j("Error editing image message.", "0500", this.logger);
11805
+ throw k.p = 6, g = k.v, new j("Error editing image message.", "0500", this.logger);
11806
11806
  case 7:
11807
- return y.a(2);
11807
+ return k.a(2);
11808
11808
  }
11809
11809
  }, n, this, [[3, 6]]);
11810
11810
  }));
@@ -11981,8 +11981,8 @@ var pA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, fi = funct
11981
11981
  case 0:
11982
11982
  return a = i.timestamp, o = a === void 0 ? new Date().getTime() : a, c = i.limit, l = i.direction, d = l === void 0 ? "after" : l, p = i.userId, g.n = 1, u(this, Je)[Je].getChatMessagesPaginated(o, c, d === "before", { oneofKind: "userId", userId: p });
11983
11983
  case 1:
11984
- return v = g.v, f = v.messages.map(function(y) {
11985
- return Bu.formatSocketPeerMessage(y);
11984
+ return v = g.v, f = v.messages.map(function(k) {
11985
+ return Bu.formatSocketPeerMessage(k);
11986
11986
  }), g.a(2, f);
11987
11987
  }
11988
11988
  }, n, this);
@@ -12744,19 +12744,19 @@ var ru = {}, Xi = {
12744
12744
  return a.value = function() {
12745
12745
  for (var l, d, p = arguments.length, v = new Array(p), f = 0; f < p; f++)
12746
12746
  v[f] = arguments[f];
12747
- var g = (l = (this === null || this === void 0 ? void 0 : this.peerId) || ((d = v[0]) === null || d === void 0 ? void 0 : d.authToken)) !== null && l !== void 0 ? l : "", y = "".concat(e, "-").concat(g), k = this === null || this === void 0 ? void 0 : this.logger;
12748
- if (ru[y]) {
12747
+ var g = (l = (this === null || this === void 0 ? void 0 : this.peerId) || ((d = v[0]) === null || d === void 0 ? void 0 : d.authToken)) !== null && l !== void 0 ? l : "", k = "".concat(e, "-").concat(g), y = this === null || this === void 0 ? void 0 : this.logger;
12748
+ if (ru[k]) {
12749
12749
  var b = new Error("Unsupported concurrent calls on method: ".concat(r, "."));
12750
- throw b.name = "UnsupportedConcurrentMethodExecution", k == null || k.error("Locker::UnsupportedConcurrentMethodExecution", { error: { stack: b.stack }, locker: { methodName: r, lockName: y } }), b;
12750
+ throw b.name = "UnsupportedConcurrentMethodExecution", y == null || y.error("Locker::UnsupportedConcurrentMethodExecution", { error: { stack: b.stack }, locker: { methodName: r, lockName: k } }), b;
12751
12751
  }
12752
- ru[y] = !0;
12752
+ ru[k] = !0;
12753
12753
  var T = setTimeout(function() {
12754
- return delete ru[y];
12754
+ return delete ru[k];
12755
12755
  }, t), E = o.apply(this, v);
12756
12756
  return Promise.resolve(E).then(function() {
12757
- delete ru[y], clearTimeout(T);
12757
+ delete ru[k], clearTimeout(T);
12758
12758
  }).catch(function() {
12759
- delete ru[y], clearTimeout(T);
12759
+ delete ru[k], clearTimeout(T);
12760
12760
  }), E;
12761
12761
  }, a;
12762
12762
  };
@@ -13555,8 +13555,8 @@ var ZA = Object.defineProperty, xA = Object.getOwnPropertyDescriptor, eI = funct
13555
13555
  c.info("Deferring active plugins store creation until socket connects.");
13556
13556
  case 3:
13557
13557
  return i.forEach(function(g) {
13558
- var y = new hc(n, g, p, a);
13559
- d.all.add(y);
13558
+ var k = new hc(n, g, p, a);
13559
+ d.all.add(k);
13560
13560
  }), v = new qg(n, d, o, p), p ? u(v, Ao)[Ao]() : u(v, Rc)[Rc](), f.a(2, v);
13561
13561
  }
13562
13562
  }, t);
@@ -14068,7 +14068,7 @@ var ki = /* @__PURE__ */ w("context"), hI = /* @__PURE__ */ function() {
14068
14068
  return t;
14069
14069
  }() }, { key: "setupStreams", value: function() {
14070
14070
  var e = m(/* @__PURE__ */ h().m(function n(i) {
14071
- var a, o = this, c, l, d, p, v, f, g, y, k, b, T;
14071
+ var a, o = this, c, l, d, p, v, f, g, k, y, b, T;
14072
14072
  return h().w(function(E) {
14073
14073
  for (; ; )
14074
14074
  switch (E.p = E.n) {
@@ -14082,7 +14082,7 @@ var ki = /* @__PURE__ */ w("context"), hI = /* @__PURE__ */ function() {
14082
14082
  v = E.v, d = v.audioTrack, p = v.videoTrack, E.n = 4;
14083
14083
  break;
14084
14084
  case 3:
14085
- E.p = 3, y = E.v, this.logger.error("LocalMediaHandler::init::Failed to get audio video tracks", { error: y });
14085
+ E.p = 3, k = E.v, this.logger.error("LocalMediaHandler::init::Failed to get audio video tracks", { error: k });
14086
14086
  case 4:
14087
14087
  if (!(!d && c)) {
14088
14088
  E.n = 8;
@@ -14093,7 +14093,7 @@ var ki = /* @__PURE__ */ w("context"), hI = /* @__PURE__ */ function() {
14093
14093
  d = E.v, E.n = 8;
14094
14094
  break;
14095
14095
  case 7:
14096
- E.p = 7, k = E.v, this.logger.error("LocalMediaHandler::init::Failed to get audio track", { error: k });
14096
+ E.p = 7, y = E.v, this.logger.error("LocalMediaHandler::init::Failed to get audio track", { error: y });
14097
14097
  case 8:
14098
14098
  if (!(!p && l)) {
14099
14099
  E.n = 12;
@@ -14476,31 +14476,31 @@ var ki = /* @__PURE__ */ w("context"), hI = /* @__PURE__ */ function() {
14476
14476
  case 1:
14477
14477
  l = !1, i == null || (o = i.added) === null || o === void 0 || o.reverse().forEach(/* @__PURE__ */ function() {
14478
14478
  var v = m(/* @__PURE__ */ h().m(function f(g) {
14479
- var y;
14480
- return h().w(function(k) {
14479
+ var k;
14480
+ return h().w(function(y) {
14481
14481
  for (; ; )
14482
- switch (k.n) {
14482
+ switch (y.n) {
14483
14483
  case 0:
14484
14484
  if (!(g && !kl(g))) {
14485
- k.n = 3;
14485
+ y.n = 3;
14486
14486
  break;
14487
14487
  }
14488
- if (!(g.kind === "audioinput" && ((y = c.audioTrack) === null || y === void 0 ? void 0 : y.enabled) === !0)) {
14489
- k.n = 2;
14488
+ if (!(g.kind === "audioinput" && ((k = c.audioTrack) === null || k === void 0 ? void 0 : k.enabled) === !0)) {
14489
+ y.n = 2;
14490
14490
  break;
14491
14491
  }
14492
- return k.n = 1, c.setAudioDevice(g, { saveDevicePreference: !1 });
14492
+ return y.n = 1, c.setAudioDevice(g, { saveDevicePreference: !1 });
14493
14493
  case 1:
14494
- k.n = 3;
14494
+ y.n = 3;
14495
14495
  break;
14496
14496
  case 2:
14497
14497
  if (g.kind !== "audiooutput") {
14498
- k.n = 3;
14498
+ y.n = 3;
14499
14499
  break;
14500
14500
  }
14501
- return l = !0, k.n = 3, c.setSpeakerDevice(g, { saveDevicePreference: !1 });
14501
+ return l = !0, y.n = 3, c.setSpeakerDevice(g, { saveDevicePreference: !1 });
14502
14502
  case 3:
14503
- return k.a(2);
14503
+ return y.a(2);
14504
14504
  }
14505
14505
  }, f);
14506
14506
  }));
@@ -14509,22 +14509,22 @@ var ki = /* @__PURE__ */ w("context"), hI = /* @__PURE__ */ function() {
14509
14509
  };
14510
14510
  }()), l || i == null || (d = i.removed) === null || d === void 0 || d.forEach(/* @__PURE__ */ function() {
14511
14511
  var v = m(/* @__PURE__ */ h().m(function f(g) {
14512
- var y, k;
14512
+ var k, y;
14513
14513
  return h().w(function(b) {
14514
14514
  for (; ; )
14515
14515
  switch (b.n) {
14516
14516
  case 0:
14517
- if (!(g.kind === "audiooutput" && ((y = c.getCurrentDevices().speaker) === null || y === void 0 ? void 0 : y.deviceId) === g.deviceId)) {
14517
+ if (!(g.kind === "audiooutput" && ((k = c.getCurrentDevices().speaker) === null || k === void 0 ? void 0 : k.deviceId) === g.deviceId)) {
14518
14518
  b.n = 2;
14519
14519
  break;
14520
14520
  }
14521
14521
  return b.n = 1, c.getSpeakerDevices();
14522
14522
  case 1:
14523
- if (k = b.v, !((k == null ? void 0 : k.length) > 0)) {
14523
+ if (y = b.v, !((y == null ? void 0 : y.length) > 0)) {
14524
14524
  b.n = 2;
14525
14525
  break;
14526
14526
  }
14527
- return b.n = 2, c.setSpeakerDevice(k[0], { saveDevicePreference: !1 });
14527
+ return b.n = 2, c.setSpeakerDevice(y[0], { saveDevicePreference: !1 });
14528
14528
  case 2:
14529
14529
  return b.a(2);
14530
14530
  }
@@ -14721,7 +14721,7 @@ var Ti = /* @__PURE__ */ w("middlewareWebWorkerInterval"), uu = /* @__PURE__ */
14721
14721
  }
14722
14722
  } }, { key: "getTransformedVideoTrack", value: function() {
14723
14723
  var r = m(/* @__PURE__ */ h().m(function t(n, i, a) {
14724
- var o = this, c, l, d, p, v, f, g, y, k, b;
14724
+ var o = this, c, l, d, p, v, f, g, k, y, b;
14725
14725
  return h().w(function(T) {
14726
14726
  for (; ; )
14727
14727
  switch (T.n) {
@@ -14742,7 +14742,7 @@ var Ti = /* @__PURE__ */ w("middlewareWebWorkerInterval"), uu = /* @__PURE__ */
14742
14742
  }
14743
14743
  return d = c.captureStream(), p = d.getVideoTracks()[0], Object.defineProperty(p, "originalSettings", { value: i.getSettings() }), T.a(2, p);
14744
14744
  case 3:
14745
- v = document.createElement("video"), f = new MediaStream(), f.addTrack(i), g = c.getContext("2d"), v.srcObject = f, v.autoplay = !0, this.terminateMiddlewareWebWorker(), y = /* @__PURE__ */ function() {
14745
+ v = document.createElement("video"), f = new MediaStream(), f.addTrack(i), g = c.getContext("2d"), v.srcObject = f, v.autoplay = !0, this.terminateMiddlewareWebWorker(), k = /* @__PURE__ */ function() {
14746
14746
  var E = m(/* @__PURE__ */ h().m(function I() {
14747
14747
  var M, _;
14748
14748
  return h().w(function(O) {
@@ -14788,8 +14788,8 @@ var Ti = /* @__PURE__ */ w("middlewareWebWorkerInterval"), uu = /* @__PURE__ */
14788
14788
  } catch (E) {
14789
14789
  }
14790
14790
  return v.addEventListener("play", function() {
14791
- c.width = v.width || i.getSettings().width, c.height = v.width || i.getSettings().height, u(o, Ti)[Ti] = Uu.setInterval(y, 50);
14792
- }, !1), k = c.captureStream(), b = k.getVideoTracks()[0], Object.defineProperty(b, "originalSettings", { value: i.getSettings() }), T.a(2, b);
14791
+ c.width = v.width || i.getSettings().width, c.height = v.width || i.getSettings().height, u(o, Ti)[Ti] = Uu.setInterval(k, 50);
14792
+ }, !1), y = c.captureStream(), b = y.getVideoTracks()[0], Object.defineProperty(b, "originalSettings", { value: i.getSettings() }), T.a(2, b);
14793
14793
  }
14794
14794
  }, t, this);
14795
14795
  }));
@@ -14826,7 +14826,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
14826
14826
  function s(r, e) {
14827
14827
  var t = this;
14828
14828
  P(this, s), Object.defineProperty(this, wi, { writable: !0, value: void 0 }), Object.defineProperty(this, hd, { writable: !0, value: void 0 }), this.getScreenShareConstraints = function() {
14829
- var n, i, a, o, c, l, d, p, v, f = (n = u(t, wi)[wi]) === null || n === void 0 ? void 0 : n.screenshare, g = (i = f == null || (a = f.width) === null || a === void 0 ? void 0 : a.max) !== null && i !== void 0 ? i : 1920, y = (o = f == null || (c = f.height) === null || c === void 0 ? void 0 : c.max) !== null && o !== void 0 ? o : 1080, k = (l = f == null || (d = f.frameRate) === null || d === void 0 ? void 0 : d.max) !== null && l !== void 0 ? l : 5, b = (p = f == null || (v = f.frameRate) === null || v === void 0 ? void 0 : v.ideal) !== null && p !== void 0 ? p : 5, T = f == null ? void 0 : f.displaySurface, E = f == null ? void 0 : f.selfBrowserSurface, I = { width: { max: g }, height: { max: y }, frameRate: { ideal: b, max: k } };
14829
+ var n, i, a, o, c, l, d, p, v, f = (n = u(t, wi)[wi]) === null || n === void 0 ? void 0 : n.screenshare, g = (i = f == null || (a = f.width) === null || a === void 0 ? void 0 : a.max) !== null && i !== void 0 ? i : 1920, k = (o = f == null || (c = f.height) === null || c === void 0 ? void 0 : c.max) !== null && o !== void 0 ? o : 1080, y = (l = f == null || (d = f.frameRate) === null || d === void 0 ? void 0 : d.max) !== null && l !== void 0 ? l : 5, b = (p = f == null || (v = f.frameRate) === null || v === void 0 ? void 0 : v.ideal) !== null && p !== void 0 ? p : 5, T = f == null ? void 0 : f.displaySurface, E = f == null ? void 0 : f.selfBrowserSurface, I = { width: { max: g }, height: { max: k }, frameRate: { ideal: b, max: y } };
14830
14830
  return T !== void 0 && ["monitor", "browser", "window"].includes(T) && (I = V(V({}, I), {}, { displaySurface: T })), E !== void 0 && (I = V(V({}, I), {}, { selfBrowserSurface: E })), { audio: !0, video: I };
14831
14831
  }, this.getAudioConstraints = function(n) {
14832
14832
  var i, a, o, c, l = {}, d = (i = u(t, wi)[wi]) === null || i === void 0 ? void 0 : i.audio, p = d != null && d.enableStereo ? 2 : 1;
@@ -14990,7 +14990,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
14990
14990
  return this.permissions[t] = i, u(this, Ne)[Ne].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_ERROR, { message: i, constraints: n.constraints, kind: t }), i;
14991
14991
  } }, { key: "getAudioAndVideoTrack", value: function() {
14992
14992
  var e = m(/* @__PURE__ */ h().m(function n(i, a) {
14993
- var o, c, l, d, p, v, f, g, y, k, b, T, E, I, M, _, O;
14993
+ var o, c, l, d, p, v, f, g, k, y, b, T, E, I, M, _, O;
14994
14994
  return h().w(function(L) {
14995
14995
  for (; ; )
14996
14996
  switch (L.p = L.n) {
@@ -15003,7 +15003,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15003
15003
  return q.deviceId === i;
15004
15004
  })), i && p ? v = i : l && (o = l[0]) !== null && o !== void 0 && o.deviceId && (v = (f = l[0]) === null || f === void 0 ? void 0 : f.deviceId), g = !!(d != null && d.find(function(q) {
15005
15005
  return q.deviceId === a;
15006
- })), a && g ? y = a : d && (c = d[0]) !== null && c !== void 0 && c.deviceId && (y = (k = d[0]) === null || k === void 0 ? void 0 : k.deviceId), b = { audio: u(this, qt)[qt].getAudioConstraints(v).audio, video: u(this, qt)[qt].getVideoConstraints(y).video }, this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", { constraints: JSON.stringify(b) }), L.n = 3, navigator.mediaDevices.getUserMedia(b);
15006
+ })), a && g ? k = a : d && (c = d[0]) !== null && c !== void 0 && c.deviceId && (k = (y = d[0]) === null || y === void 0 ? void 0 : y.deviceId), b = { audio: u(this, qt)[qt].getAudioConstraints(v).audio, video: u(this, qt)[qt].getVideoConstraints(k).video }, this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", { constraints: JSON.stringify(b) }), L.n = 3, navigator.mediaDevices.getUserMedia(b);
15007
15007
  case 3:
15008
15008
  if (T = L.v, this.logger.info("getUserMediaWithoutTimeout::received_user_media", { constraints: JSON.stringify(b) }), E = T.getAudioTracks()[0], I = T.getVideoTracks()[0], this.permissions.audio = "ACCEPTED", this.permissions.video = "ACCEPTED", !I.label.includes("OBS Virtual")) {
15009
15009
  L.n = 6;
@@ -15031,7 +15031,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15031
15031
  return t;
15032
15032
  }() }, { key: "getAudioTrack", value: function() {
15033
15033
  var e = m(/* @__PURE__ */ h().m(function n(i, a) {
15034
- var o, c, l, d = this, p, v, f, g, y, k, b;
15034
+ var o, c, l, d = this, p, v, f, g, k, y, b;
15035
15035
  return h().w(function(T) {
15036
15036
  for (; ; )
15037
15037
  switch (T.p = T.n) {
@@ -15046,7 +15046,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15046
15046
  case 2:
15047
15047
  return v = !!((c = p) !== null && c !== void 0 && c.find(function(E) {
15048
15048
  return E.deviceId === a;
15049
- })), a && v ? f = a : (l = p[0]) !== null && l !== void 0 && l.deviceId && (f = (g = p[0]) === null || g === void 0 ? void 0 : g.deviceId), y = /* @__PURE__ */ function() {
15049
+ })), a && v ? f = a : (l = p[0]) !== null && l !== void 0 && l.deviceId && (f = (g = p[0]) === null || g === void 0 ? void 0 : g.deviceId), k = /* @__PURE__ */ function() {
15050
15050
  var E = m(/* @__PURE__ */ h().m(function I(M) {
15051
15051
  var _, O, L, q, X, Y, H, J, N;
15052
15052
  return h().w(function(U) {
@@ -15069,7 +15069,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15069
15069
  }
15070
15070
  throw Y;
15071
15071
  case 3:
15072
- return d.logger.info("getAudioTrack::gum_failed", { constraints: JSON.stringify(_), error: N }), J = u(d, qt)[qt].getAudioConstraints(H.deviceId), d.logger.info("getAudioTrack::retrying_gum_for_next_device", { constraints: JSON.stringify(J) }), U.a(2, y(H.deviceId));
15072
+ return d.logger.info("getAudioTrack::gum_failed", { constraints: JSON.stringify(_), error: N }), J = u(d, qt)[qt].getAudioConstraints(H.deviceId), d.logger.info("getAudioTrack::retrying_gum_for_next_device", { constraints: JSON.stringify(J) }), U.a(2, k(H.deviceId));
15073
15073
  case 4:
15074
15074
  throw Y;
15075
15075
  case 5:
@@ -15080,9 +15080,9 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15080
15080
  return function(M) {
15081
15081
  return E.apply(this, arguments);
15082
15082
  };
15083
- }(), T.p = 3, T.n = 4, y(f);
15083
+ }(), T.p = 3, T.n = 4, k(f);
15084
15084
  case 4:
15085
- return k = T.v, k.enabled = !i, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", u(this, Ne)[Ne].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" })), T.a(2, k);
15085
+ return y = T.v, y.enabled = !i, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", u(this, Ne)[Ne].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" })), T.a(2, y);
15086
15086
  case 5:
15087
15087
  throw T.p = 5, b = T.v, b.constraints && this.handlePermissionErrors("audio", b), new j(b.message, "1601");
15088
15088
  case 6:
@@ -15096,7 +15096,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15096
15096
  return t;
15097
15097
  }() }, { key: "getVideoTrack", value: function() {
15098
15098
  var e = m(/* @__PURE__ */ h().m(function n(i) {
15099
- var a, o, c = this, l, d, p, v, f, g, y, k, b, T, E, I;
15099
+ var a, o, c = this, l, d, p, v, f, g, k, y, b, T, E, I;
15100
15100
  return h().w(function(M) {
15101
15101
  for (; ; )
15102
15102
  switch (M.p = M.n) {
@@ -15160,9 +15160,9 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15160
15160
  return function(L) {
15161
15161
  return _.apply(this, arguments);
15162
15162
  };
15163
- }(), M.p = 7, y = u(this, qt)[qt].getVideoConstraints(v), M.n = 8, g(y);
15163
+ }(), M.p = 7, k = u(this, qt)[qt].getVideoConstraints(v), M.n = 8, g(k);
15164
15164
  case 8:
15165
- return k = M.v, this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", u(this, Ne)[Ne].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" })), M.a(2, k);
15165
+ return y = M.v, this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", u(this, Ne)[Ne].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" })), M.a(2, y);
15166
15166
  case 9:
15167
15167
  throw M.p = 9, I = M.v, I.constraints && this.handlePermissionErrors("video", I), new j(I.message, "1602");
15168
15168
  case 10:
@@ -15183,7 +15183,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15183
15183
  case 0:
15184
15184
  return a = /* @__PURE__ */ function() {
15185
15185
  var p = m(/* @__PURE__ */ h().m(function v(f) {
15186
- var g, y, k, b, T;
15186
+ var g, k, y, b, T;
15187
15187
  return h().w(function(E) {
15188
15188
  for (; ; )
15189
15189
  switch (E.p = E.n) {
@@ -15192,19 +15192,19 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15192
15192
  case 1:
15193
15193
  return g = E.v, i.logger.info("getDisplayMediaWithoutTimeout::received_display_media", { constraints: JSON.stringify(f) }), E.a(2, g);
15194
15194
  case 2:
15195
- if (E.p = 2, T = E.v, y = Gc("video", T.name, T.message), k = new pd(T.name, T.message, f), b = { video: !0 }, !yP(f, b)) {
15195
+ if (E.p = 2, T = E.v, k = Gc("video", T.name, T.message), y = new pd(T.name, T.message, f), b = { video: !0 }, !yP(f, b)) {
15196
15196
  E.n = 3;
15197
15197
  break;
15198
15198
  }
15199
- throw k;
15199
+ throw y;
15200
15200
  case 3:
15201
- if (y !== "COULD_NOT_START") {
15201
+ if (k !== "COULD_NOT_START") {
15202
15202
  E.n = 4;
15203
15203
  break;
15204
15204
  }
15205
15205
  return E.a(2, a(b));
15206
15206
  case 4:
15207
- throw k;
15207
+ throw y;
15208
15208
  case 5:
15209
15209
  return E.a(2);
15210
15210
  }
@@ -15270,10 +15270,10 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15270
15270
  var p, v, f = a(l), g = a(d);
15271
15271
  if (f !== g)
15272
15272
  return f - g;
15273
- var y = l.deviceId === "default" || ((p = l.label) === null || p === void 0 ? void 0 : p.toLowerCase().includes("default")), k = d.deviceId === "default" || ((v = d.label) === null || v === void 0 ? void 0 : v.toLowerCase().includes("default"));
15274
- if (y && !k)
15273
+ var k = l.deviceId === "default" || ((p = l.label) === null || p === void 0 ? void 0 : p.toLowerCase().includes("default")), y = d.deviceId === "default" || ((v = d.label) === null || v === void 0 ? void 0 : v.toLowerCase().includes("default"));
15274
+ if (k && !y)
15275
15275
  return -1;
15276
- if (!y && k)
15276
+ if (!k && y)
15277
15277
  return 1;
15278
15278
  if (l.kind === "videoinput" && d.kind === "videoinput") {
15279
15279
  var b = o(l), T = o(d);
@@ -15372,34 +15372,34 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15372
15372
  case 1:
15373
15373
  o = c.v, navigator.mediaDevices.addEventListener("devicechange", /* @__PURE__ */ function() {
15374
15374
  var l = m(/* @__PURE__ */ h().m(function d(p) {
15375
- var v, f, g, y, k, b, T, E;
15375
+ var v, f, g, k, y, b, T, E;
15376
15376
  return h().w(function(I) {
15377
15377
  for (; ; )
15378
15378
  switch (I.n) {
15379
15379
  case 0:
15380
15380
  return g = function(_) {
15381
15381
  return "".concat(_.kind, "-").concat(_.label, "-").concat(_.deviceId, "-").concat(_.groupId);
15382
- }, y = new Set(o.map(function(M) {
15382
+ }, k = new Set(o.map(function(M) {
15383
15383
  return g(M);
15384
15384
  })), I.n = 1, a.getAvailableDevices();
15385
15385
  case 1:
15386
- k = I.v, b = new Set(k.map(function(M) {
15386
+ y = I.v, b = new Set(y.map(function(M) {
15387
15387
  return g(M);
15388
- })), T = { added: k.filter(function(M) {
15389
- return !y.has(g(M));
15388
+ })), T = { added: y.filter(function(M) {
15389
+ return !k.has(g(M));
15390
15390
  }), removed: o.filter(function(M) {
15391
15391
  return !b.has(g(M));
15392
- }), devices: k }, o = k, ((v = T.added) !== null && v !== void 0 && v.length || (f = T.removed) !== null && f !== void 0 && f.length) && (a.logger.info("repopulated_full_device_list", { devices: JSON.stringify(k) }), E = [].concat(De(T.added), De(T.removed)), E.some(function(M) {
15392
+ }), devices: y }, o = y, ((v = T.added) !== null && v !== void 0 && v.length || (f = T.removed) !== null && f !== void 0 && f.length) && (a.logger.info("repopulated_full_device_list", { devices: JSON.stringify(y) }), E = [].concat(De(T.added), De(T.removed)), E.some(function(M) {
15393
15393
  return M.kind === "audioinput";
15394
- }) && u(a, Ne)[Ne].getValue("callstats").devices("AUDIO", k == null ? void 0 : k.filter(function(M) {
15394
+ }) && u(a, Ne)[Ne].getValue("callstats").devices("AUDIO", y == null ? void 0 : y.filter(function(M) {
15395
15395
  return M.kind === "audioinput";
15396
15396
  })), E.some(function(M) {
15397
15397
  return M.kind === "videoinput";
15398
- }) && u(a, Ne)[Ne].getValue("callstats").devices("VIDEO", k == null ? void 0 : k.filter(function(M) {
15398
+ }) && u(a, Ne)[Ne].getValue("callstats").devices("VIDEO", y == null ? void 0 : y.filter(function(M) {
15399
15399
  return M.kind === "videoinput";
15400
15400
  })), E.some(function(M) {
15401
15401
  return M.kind === "audiooutput";
15402
- }) && u(a, Ne)[Ne].getValue("callstats").devices("SPEAKER", k == null ? void 0 : k.filter(function(M) {
15402
+ }) && u(a, Ne)[Ne].getValue("callstats").devices("SPEAKER", y == null ? void 0 : y.filter(function(M) {
15403
15403
  return M.kind === "audiooutput";
15404
15404
  })), i(p, T, !1));
15405
15405
  case 2:
@@ -15955,58 +15955,58 @@ var zg = Tl, jI = Object.defineProperty, UI = Object.getOwnPropertyDescriptor, y
15955
15955
  this.logger.info("AudioMediaHandler.TrackMuted"), this.emit("trackMuted");
15956
15956
  } }, { key: "conditionallyChangeTrack", value: function() {
15957
15957
  var e = m(/* @__PURE__ */ h().m(function n(i) {
15958
- var a = this, o, c, l, d, p, v, f, g, y = arguments;
15959
- return h().w(function(k) {
15958
+ var a = this, o, c, l, d, p, v, f, g, k = arguments;
15959
+ return h().w(function(y) {
15960
15960
  for (; ; )
15961
- switch (k.n) {
15961
+ switch (y.n) {
15962
15962
  case 0:
15963
- if (o = y.length > 1 && y[1] !== void 0 ? y[1] : !1, i) {
15964
- k.n = 1;
15963
+ if (o = k.length > 1 && k[1] !== void 0 ? k[1] : !1, i) {
15964
+ y.n = 1;
15965
15965
  break;
15966
15966
  }
15967
- return k.a(2, i);
15967
+ return y.a(2, i);
15968
15968
  case 1:
15969
15969
  if (!(this.userSelectedDevice || o)) {
15970
- k.n = 2;
15970
+ y.n = 2;
15971
15971
  break;
15972
15972
  }
15973
- return k.a(2, i);
15973
+ return y.a(2, i);
15974
15974
  case 2:
15975
- return c = i, k.n = 3, this.mediaInterface.getAudioInputDevices();
15975
+ return c = i, y.n = 3, this.mediaInterface.getAudioInputDevices();
15976
15976
  case 3:
15977
- if (l = k.v, d = this.isNonPreferredDevice ? l.filter(function(b) {
15977
+ if (l = y.v, d = this.isNonPreferredDevice ? l.filter(function(b) {
15978
15978
  return b && !a.isNonPreferredDevice(b);
15979
15979
  }) : l, d != null && d.length) {
15980
- k.n = 4;
15980
+ y.n = 4;
15981
15981
  break;
15982
15982
  }
15983
- return k.a(2, c);
15983
+ return y.a(2, c);
15984
15984
  case 4:
15985
15985
  if (d.find(function(b) {
15986
15986
  return b.deviceId === i.getSettings().deviceId;
15987
15987
  })) {
15988
- k.n = 6;
15988
+ y.n = 6;
15989
15989
  break;
15990
15990
  }
15991
- return c.stop(), this.logger.info("localmediahandler::setupstreams::found_audio_non_preferred"), k.n = 5, this.mediaInterface.getAudioTrack(!1, d[0].deviceId);
15991
+ return c.stop(), this.logger.info("localmediahandler::setupstreams::found_audio_non_preferred"), y.n = 5, this.mediaInterface.getAudioTrack(!1, d[0].deviceId);
15992
15992
  case 5:
15993
- c = k.v;
15993
+ c = y.v;
15994
15994
  case 6:
15995
15995
  if (p = JSON.parse(qs.getItem(vd, this.logger)), !(p != null && p.devices.some(function(b) {
15996
15996
  return b.label === c.label;
15997
15997
  }))) {
15998
- k.n = 7;
15998
+ y.n = 7;
15999
15999
  break;
16000
16000
  }
16001
- return k.a(2, c);
16001
+ return y.a(2, c);
16002
16002
  case 7:
16003
- return k.n = 8, qv(this.logger, c);
16003
+ return y.n = 8, qv(this.logger, c);
16004
16004
  case 8:
16005
- if (k.v) {
16006
- k.n = 9;
16005
+ if (y.v) {
16006
+ y.n = 9;
16007
16007
  break;
16008
16008
  }
16009
- return f = (v = p == null ? void 0 : p.devices.concat({ label: c.label })) !== null && v !== void 0 ? v : [{ label: c.label }], qs.setItem(vd, JSON.stringify({ devices: f }), this.logger), k.a(2, c);
16009
+ return f = (v = p == null ? void 0 : p.devices.concat({ label: c.label })) !== null && v !== void 0 ? v : [{ label: c.label }], qs.setItem(vd, JSON.stringify({ devices: f }), this.logger), y.a(2, c);
16010
16010
  case 9:
16011
16011
  return this.logger.info("AudioMediaHandler.conditionallyChangeTrack.DetectedSilentTrack"), g = c.getSettings().deviceId, d.filter(function(b) {
16012
16012
  return b.deviceId !== g;
@@ -16034,7 +16034,7 @@ var zg = Tl, jI = Object.defineProperty, UI = Object.getOwnPropertyDescriptor, y
16034
16034
  return function(T) {
16035
16035
  return b.apply(this, arguments);
16036
16036
  };
16037
- }()), k.a(2, c);
16037
+ }()), y.a(2, c);
16038
16038
  }
16039
16039
  }, n, this);
16040
16040
  }));
@@ -16080,46 +16080,46 @@ var FI = Fl, bi = /* @__PURE__ */ w("mediaInterface"), HI = /* @__PURE__ */ func
16080
16080
  }() }, { key: "setupSpeaker", value: function() {
16081
16081
  var r = m(/* @__PURE__ */ h().m(function t(n, i) {
16082
16082
  var a, o, c = this, l, d, p, v, f, g;
16083
- return h().w(function(y) {
16083
+ return h().w(function(k) {
16084
16084
  for (; ; )
16085
- switch (y.n) {
16085
+ switch (k.n) {
16086
16086
  case 0:
16087
16087
  if (l = i.saveDevicePreference, u(this, bi)[bi] instanceof Jg) {
16088
- y.n = 1;
16088
+ k.n = 1;
16089
16089
  break;
16090
16090
  }
16091
- return y.a(2);
16091
+ return k.a(2);
16092
16092
  case 1:
16093
16093
  if (d = n, n) {
16094
- y.n = 3;
16094
+ k.n = 3;
16095
16095
  break;
16096
16096
  }
16097
- return y.n = 2, u(this, bi)[bi].getAvailableDevicesByKind("audiooutput");
16097
+ return k.n = 2, u(this, bi)[bi].getAvailableDevicesByKind("audiooutput");
16098
16098
  case 2:
16099
- p = y.v, v = p.filter(function(k) {
16100
- return !kl(k);
16099
+ p = k.v, v = p.filter(function(y) {
16100
+ return !kl(y);
16101
16101
  }), f = Ue(v, 1), d = f[0];
16102
16102
  case 3:
16103
16103
  if (d) {
16104
- y.n = 4;
16104
+ k.n = 4;
16105
16105
  break;
16106
16106
  }
16107
16107
  throw new j("No speaker found", "1608");
16108
16108
  case 4:
16109
16109
  if (((a = this.currentDevice) === null || a === void 0 ? void 0 : a.deviceId) !== d.deviceId) {
16110
- y.n = 5;
16110
+ k.n = 5;
16111
16111
  break;
16112
16112
  }
16113
- return y.a(2);
16113
+ return k.a(2);
16114
16114
  case 5:
16115
16115
  if (l && this.setUserPreferredDevice(d.deviceId), this.currentDevice = d, g = document.querySelectorAll("audio"), (o = g[0]) !== null && o !== void 0 && o.setSinkId) {
16116
- y.n = 6;
16116
+ k.n = 6;
16117
16117
  break;
16118
16118
  }
16119
- return y.a(2);
16119
+ return k.a(2);
16120
16120
  case 6:
16121
16121
  g.forEach(/* @__PURE__ */ function() {
16122
- var k = m(/* @__PURE__ */ h().m(function b(T) {
16122
+ var y = m(/* @__PURE__ */ h().m(function b(T) {
16123
16123
  var E;
16124
16124
  return h().w(function(I) {
16125
16125
  for (; ; )
@@ -16141,11 +16141,11 @@ var FI = Fl, bi = /* @__PURE__ */ w("mediaInterface"), HI = /* @__PURE__ */ func
16141
16141
  }, b, null, [[1, 3]]);
16142
16142
  }));
16143
16143
  return function(b) {
16144
- return k.apply(this, arguments);
16144
+ return y.apply(this, arguments);
16145
16145
  };
16146
16146
  }());
16147
16147
  case 7:
16148
- return y.a(2);
16148
+ return k.a(2);
16149
16149
  }
16150
16150
  }, t, this);
16151
16151
  }));
@@ -17210,8 +17210,8 @@ function aM() {
17210
17210
  return p.a(2);
17211
17211
  case 4:
17212
17212
  r === ji.storeInsertKeys && o.forEach(function(v) {
17213
- var f = v.key, g = v.peerId, y = v.payload;
17214
- g !== u(s, Lu)[Lu] && d.set(f, y, !1, !0);
17213
+ var f = v.key, g = v.peerId, k = v.payload;
17214
+ g !== u(s, Lu)[Lu] && d.set(f, k, !1, !0);
17215
17215
  }), r === ji.storeDeleteKeys && o.forEach(function(v) {
17216
17216
  var f = v.key, g = v.peerId;
17217
17217
  g !== u(s, Lu)[Lu] && d.delete(f, !1, !0);
@@ -17235,12 +17235,12 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17235
17235
  for (var i = n > 1 ? void 0 : n ? oM(e, t) : e, a = r.length - 1, o; a >= 0; a--)
17236
17236
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
17237
17237
  return n && i && sM(e, t, i), i;
17238
- }, uM = 0.8, cM = 1.2, Ji = (sa = /* @__PURE__ */ w("isPinned"), oa = /* @__PURE__ */ w("stageStatus"), Dt = /* @__PURE__ */ w("context"), Xn = /* @__PURE__ */ w("roomNodeClient"), mn = /* @__PURE__ */ w("audioPlayback"), Zn = /* @__PURE__ */ w("mediaJoined"), _c = /* @__PURE__ */ w("socketJoined"), st = /* @__PURE__ */ w("self"), uo = /* @__PURE__ */ w("roomSocketHandler"), cn = /* @__PURE__ */ w("videoElements"), xn = /* @__PURE__ */ w("pip"), Cr = /* @__PURE__ */ w("maxSpatialLayer"), Ac = /* @__PURE__ */ w("videoDimensionsUpdated"), co = /* @__PURE__ */ w("updateVideos"), Ic = /* @__PURE__ */ w("updateAudio"), Mc = /* @__PURE__ */ w("updateScreenShare"), /* @__PURE__ */ function(s) {
17238
+ }, uM = 0.8, cM = 1.2, Ji = (sa = /* @__PURE__ */ w("isPinned"), oa = /* @__PURE__ */ w("stageStatus"), Dt = /* @__PURE__ */ w("context"), Xn = /* @__PURE__ */ w("roomNodeClient"), mn = /* @__PURE__ */ w("audioPlayback"), Zn = /* @__PURE__ */ w("mediaJoined"), _c = /* @__PURE__ */ w("socketJoined"), ot = /* @__PURE__ */ w("self"), uo = /* @__PURE__ */ w("roomSocketHandler"), cn = /* @__PURE__ */ w("videoElements"), xn = /* @__PURE__ */ w("pip"), Cr = /* @__PURE__ */ w("maxSpatialLayer"), Ac = /* @__PURE__ */ w("videoDimensionsUpdated"), co = /* @__PURE__ */ w("updateVideos"), Ic = /* @__PURE__ */ w("updateAudio"), Mc = /* @__PURE__ */ w("updateScreenShare"), /* @__PURE__ */ function(s) {
17239
17239
  function r(e, t, n, i) {
17240
17240
  var a;
17241
17241
  P(this, r);
17242
17242
  var o = e.getValue("logger");
17243
- a = C(this, r, [o]), Object.defineProperty(a, Mc, { value: mM }), Object.defineProperty(a, Ic, { value: gM }), Object.defineProperty(a, co, { value: fM }), Object.defineProperty(a, xn, { get: vM, set: void 0 }), Object.defineProperty(a, _c, { get: pM, set: void 0 }), Object.defineProperty(a, Zn, { get: hM, set: void 0 }), Object.defineProperty(a, mn, { get: dM, set: void 0 }), Object.defineProperty(a, Xn, { get: lM, set: void 0 }), a.id = void 0, a.userId = void 0, a.name = void 0, a.picture = void 0, a.isHost = void 0, a.customParticipantId = void 0, a.flags = void 0, a.device = void 0, a.videoTrack = void 0, a.audioTrack = void 0, a.screenShareTracks = void 0, a.videoEnabled = void 0, a.audioEnabled = void 0, a.screenShareEnabled = void 0, a.producers = void 0, a.manualProducerConfig = void 0, Object.defineProperty(a, sa, { writable: !0, value: void 0 }), a.supportsRemoteControl = !1, Object.defineProperty(a, oa, { writable: !0, value: void 0 }), a.presetName = void 0, Object.defineProperty(a, Dt, { writable: !0, value: void 0 }), Object.defineProperty(a, st, { writable: !0, value: void 0 }), Object.defineProperty(a, uo, { writable: !0, value: void 0 }), Object.defineProperty(a, cn, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(a, Cr, { writable: !0, value: 1 }), Object.defineProperty(a, Ac, { writable: !0, value: cp(function(L) {
17243
+ a = C(this, r, [o]), Object.defineProperty(a, Mc, { value: mM }), Object.defineProperty(a, Ic, { value: gM }), Object.defineProperty(a, co, { value: fM }), Object.defineProperty(a, xn, { get: vM, set: void 0 }), Object.defineProperty(a, _c, { get: pM, set: void 0 }), Object.defineProperty(a, Zn, { get: hM, set: void 0 }), Object.defineProperty(a, mn, { get: dM, set: void 0 }), Object.defineProperty(a, Xn, { get: lM, set: void 0 }), a.id = void 0, a.userId = void 0, a.name = void 0, a.picture = void 0, a.isHost = void 0, a.customParticipantId = void 0, a.flags = void 0, a.device = void 0, a.videoTrack = void 0, a.audioTrack = void 0, a.screenShareTracks = void 0, a.videoEnabled = void 0, a.audioEnabled = void 0, a.screenShareEnabled = void 0, a.producers = void 0, a.manualProducerConfig = void 0, Object.defineProperty(a, sa, { writable: !0, value: void 0 }), a.supportsRemoteControl = !1, Object.defineProperty(a, oa, { writable: !0, value: void 0 }), a.presetName = void 0, Object.defineProperty(a, Dt, { writable: !0, value: void 0 }), Object.defineProperty(a, ot, { writable: !0, value: void 0 }), Object.defineProperty(a, uo, { writable: !0, value: void 0 }), Object.defineProperty(a, cn, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(a, Cr, { writable: !0, value: 1 }), Object.defineProperty(a, Ac, { writable: !0, value: cp(function(L) {
17244
17244
  if (a.videoTrack) {
17245
17245
  var q = L.clientWidth, X = L.clientHeight, Y = a.videoTrack.getSettings(), H = Y.width, J = Y.height;
17246
17246
  if (!(!H || !J)) {
@@ -17249,8 +17249,8 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17249
17249
  }
17250
17250
  }
17251
17251
  }, 2e3) }), u(a, Dt)[Dt] = e;
17252
- var c = t.id, l = t.userId, d = t.displayName, p = t.device, v = t.picture, f = t.isHost, g = t.flags, y = t.stageStatus, k = t.customParticipantId, b = t.audioMuted, T = t.audioTrack, E = t.videoEnabled, I = E === void 0 ? !1 : E, M = t.videoTrack, _ = t.producers, O = t.metadata;
17253
- return a.id = c, a.userId = l, a.name = d, a.device = p, a.picture = v, a.isHost = f, a.flags = g, a.manualProducerConfig = CP, u(a, oa)[oa] = y != null ? y : "ON_STAGE", a.customParticipantId = k, a.audioEnabled = !b, a.audioTrack = T, a.videoEnabled = I, a.videoTrack = M, a.screenShareTracks = { audio: void 0, video: void 0 }, a.producers = _ != null ? _ : [], a.presetName = O == null ? void 0 : O.preset_name, u(a, sa)[sa] = !1, u(a, st)[st] = n, u(a, uo)[uo] = i, a.setupEvents(), a.updateVideo = a.updateVideo.bind(a), u(a, co)[co](), a;
17252
+ var c = t.id, l = t.userId, d = t.displayName, p = t.device, v = t.picture, f = t.isHost, g = t.flags, k = t.stageStatus, y = t.customParticipantId, b = t.audioMuted, T = t.audioTrack, E = t.videoEnabled, I = E === void 0 ? !1 : E, M = t.videoTrack, _ = t.producers, O = t.metadata;
17253
+ return a.id = c, a.userId = l, a.name = d, a.device = p, a.picture = v, a.isHost = f, a.flags = g, a.manualProducerConfig = CP, u(a, oa)[oa] = k != null ? k : "ON_STAGE", a.customParticipantId = y, a.audioEnabled = !b, a.audioTrack = T, a.videoEnabled = I, a.videoTrack = M, a.screenShareTracks = { audio: void 0, video: void 0 }, a.producers = _ != null ? _ : [], a.presetName = O == null ? void 0 : O.preset_name, u(a, sa)[sa] = !1, u(a, ot)[ot] = n, u(a, uo)[uo] = i, a.setupEvents(), a.updateVideo = a.updateVideo.bind(a), u(a, co)[co](), a;
17254
17254
  }
17255
17255
  return R(r, s), S(r, [{ key: "stageStatus", get: (
17256
17256
  /** Denotes the participants's current stage status. */
@@ -17315,7 +17315,7 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17315
17315
  }
17316
17316
  throw new j("Can`t pin participant without joining room", "1205");
17317
17317
  case 1:
17318
- if (u(this, st)[st].permissions.pinParticipant) {
17318
+ if (u(this, ot)[ot].permissions.pinParticipant) {
17319
17319
  i.n = 2;
17320
17320
  break;
17321
17321
  }
@@ -17341,7 +17341,7 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17341
17341
  }
17342
17342
  throw new j("Can`t unpin participant without joining room", "1205");
17343
17343
  case 1:
17344
- if (u(this, st)[st].permissions.pinParticipant) {
17344
+ if (u(this, ot)[ot].permissions.pinParticipant) {
17345
17345
  i.n = 2;
17346
17346
  break;
17347
17347
  }
@@ -17367,19 +17367,19 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17367
17367
  for (; ; )
17368
17368
  switch (a.n) {
17369
17369
  case 0:
17370
- if (i = this.id, this.logger.info("Local peer ".concat(u(this, st)[st].id, " is disabling mic of a remote peer ").concat(i)), u(this, Zn)[Zn]) {
17370
+ if (i = this.id, this.logger.info("Local peer ".concat(u(this, ot)[ot].id, " is disabling mic of a remote peer ").concat(i)), u(this, Zn)[Zn]) {
17371
17371
  a.n = 1;
17372
17372
  break;
17373
17373
  }
17374
17374
  throw new j("Can`t disable participant audio without joining room", "1205");
17375
17375
  case 1:
17376
- if (!u(this, st)[st].permissions.canDisableParticipantAudio) {
17376
+ if (!u(this, ot)[ot].permissions.canDisableParticipantAudio) {
17377
17377
  a.n = 2;
17378
17378
  break;
17379
17379
  }
17380
17380
  return a.a(2, u(this, Xn)[Xn].disableAudio(i));
17381
17381
  case 2:
17382
- throw this.logger.error("Local peer ".concat(u(this, st)[st].id, " is not authorized to disable mic of a remote peer ").concat(i)), new j("Unauthorized: User does not have permission to disable participant audio.", "1201");
17382
+ throw this.logger.error("Local peer ".concat(u(this, ot)[ot].id, " is not authorized to disable mic of a remote peer ").concat(i)), new j("Unauthorized: User does not have permission to disable participant audio.", "1201");
17383
17383
  case 3:
17384
17384
  return a.a(2);
17385
17385
  }
@@ -17396,13 +17396,13 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17396
17396
  for (; ; )
17397
17397
  switch (a.n) {
17398
17398
  case 0:
17399
- if (i = this.id, this.logger.info("Local peer ".concat(u(this, st)[st].id, " is kicking a remote peer ").concat(i, " out of the meeting.")), u(this, _c)[_c]) {
17399
+ if (i = this.id, this.logger.info("Local peer ".concat(u(this, ot)[ot].id, " is kicking a remote peer ").concat(i, " out of the meeting.")), u(this, _c)[_c]) {
17400
17400
  a.n = 1;
17401
17401
  break;
17402
17402
  }
17403
17403
  throw new j("Can`t kick participant without joining room", "1205");
17404
17404
  case 1:
17405
- if (!u(this, st)[st].permissions.kickParticipant) {
17405
+ if (!u(this, ot)[ot].permissions.kickParticipant) {
17406
17406
  a.n = 3;
17407
17407
  break;
17408
17408
  }
@@ -17410,7 +17410,7 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17410
17410
  case 2:
17411
17411
  return a.a(2);
17412
17412
  case 3:
17413
- throw this.logger.error("Local peer ".concat(u(this, st)[st].id, " is not authorized to kick a remote peer ").concat(i, " out of the meeting.")), new j("Unauthorized: User does not have permission to kick participants.", "1201");
17413
+ throw this.logger.error("Local peer ".concat(u(this, ot)[ot].id, " is not authorized to kick a remote peer ").concat(i, " out of the meeting.")), new j("Unauthorized: User does not have permission to kick participants.", "1201");
17414
17414
  case 4:
17415
17415
  return a.a(2);
17416
17416
  }
@@ -17427,19 +17427,19 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17427
17427
  for (; ; )
17428
17428
  switch (a.n) {
17429
17429
  case 0:
17430
- if (i = this.id, this.logger.info("Local peer ".concat(u(this, st)[st].id, " is disabling webcam of a remote peer ").concat(i, ".")), u(this, Zn)[Zn]) {
17430
+ if (i = this.id, this.logger.info("Local peer ".concat(u(this, ot)[ot].id, " is disabling webcam of a remote peer ").concat(i, ".")), u(this, Zn)[Zn]) {
17431
17431
  a.n = 1;
17432
17432
  break;
17433
17433
  }
17434
17434
  throw new j("Can`t disable participant video without joining room", "1205");
17435
17435
  case 1:
17436
- if (!u(this, st)[st].permissions.canDisableParticipantVideo) {
17436
+ if (!u(this, ot)[ot].permissions.canDisableParticipantVideo) {
17437
17437
  a.n = 2;
17438
17438
  break;
17439
17439
  }
17440
17440
  return a.a(2, u(this, Xn)[Xn].disableVideo(i));
17441
17441
  case 2:
17442
- throw this.logger.error("Local peer ".concat(u(this, st)[st].id, " is not authorized to disable webcam of a remote peer ").concat(i, ".")), new j("Unauthorized: User does not have permission to disable participant video.", "1201");
17442
+ throw this.logger.error("Local peer ".concat(u(this, ot)[ot].id, " is not authorized to disable webcam of a remote peer ").concat(i, ".")), new j("Unauthorized: User does not have permission to disable participant video.", "1201");
17443
17443
  case 3:
17444
17444
  return a.a(2);
17445
17445
  }
@@ -18289,8 +18289,8 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18289
18289
  }), this.participants.joined.clear(), a.forEach(function(v) {
18290
18290
  var f = n.createParticipantObjFromSocketPeer(v);
18291
18291
  if (n.isRebuildingReconnectSnapshot) {
18292
- var g, y = (g = n.participants.videoSubscribed.get(v.peerId)) !== null && g !== void 0 ? g : n.participants.audioSubscribed.get(v.peerId);
18293
- y && (f.manualProducerConfig = V({}, y.manualProducerConfig));
18292
+ var g, k = (g = n.participants.videoSubscribed.get(v.peerId)) !== null && g !== void 0 ? g : n.participants.audioSubscribed.get(v.peerId);
18293
+ k && (f.manualProducerConfig = V({}, k.manualProducerConfig));
18294
18294
  }
18295
18295
  n.logger.debug("Processing socket join for ".concat(n.self.id === f.id ? "local peer" : "remote peer", " ").concat(f.id, " listed in socket peers.")), n.onParticipantSocketJoined(f), n.logger.debug("Processed socket join for ".concat(n.self.id === f.id ? "local peer" : "remote peer", " ").concat(f.id, " listed in socket peers."));
18296
18296
  });
@@ -18321,8 +18321,8 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18321
18321
  switch (v.n) {
18322
18322
  case 0:
18323
18323
  if (a = i.participants, o = i.selectedPeers, c = i.roomState, e.logger.info("Local peer has joined media room. Processing media joins for existing ".concat(a == null ? void 0 : a.length, " peers.")), a.forEach(function(f) {
18324
- var g = f.peerId, y = f.producerStates;
18325
- e.logger.debug("Processing media join for ".concat(e.self.peerId === g ? "local peer" : "existing remote peer", " ").concat(g, ".")), e.onParticipantMediaJoined(g, y), e.logger.debug("Processed media join for ".concat(e.self.peerId === g ? "local peer" : "existing remote peer", " ").concat(g, "."));
18324
+ var g = f.peerId, k = f.producerStates;
18325
+ e.logger.debug("Processing media join for ".concat(e.self.peerId === g ? "local peer" : "existing remote peer", " ").concat(g, ".")), e.onParticipantMediaJoined(g, k), e.logger.debug("Processed media join for ".concat(e.self.peerId === g ? "local peer" : "existing remote peer", " ").concat(g, "."));
18326
18326
  }), e.isRebuildingReconnectSnapshot && e.rewireConsumersOnLocalUserReconnect(), l = o != null ? o : {}, d = l.audioPeers, p = l.compulsoryPeers, e.applyPinnedSnapshot(c.pinnedPeerIds), e.computeActivateParticipants(d != null ? d : [], p), !(e.participants.viewMode === "PAGINATED" && (e.participants.currentPage < 1 || e.participants.currentPage > e.participants.pageCount))) {
18327
18327
  v.n = 1;
18328
18328
  break;
@@ -18450,8 +18450,8 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18450
18450
  return g.stageStatus === "ON_STAGE";
18451
18451
  }).map(function(g) {
18452
18452
  return n.set(g.id, !0), g.id;
18453
- })), a = this.selectedPeers.peers, o = this.participants.pinned.toArray().reduce(function(g, y) {
18454
- return y.stageStatus !== "ON_STAGE" ? t.participants.pinned.delete(y.id) : g.push(y.id), g;
18453
+ })), a = this.selectedPeers.peers, o = this.participants.pinned.toArray().reduce(function(g, k) {
18454
+ return k.stageStatus !== "ON_STAGE" ? t.participants.pinned.delete(k.id) : g.push(k.id), g;
18455
18455
  }, []), c = this.self.stageStatus === "ON_STAGE" ? 1 : 0, l = e - c, d = new Set(a.concat(o).filter(function(g) {
18456
18456
  return g !== t.self.id && n.has(g);
18457
18457
  })), p = Array.from(d), v = l - d.size;
@@ -18546,7 +18546,7 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18546
18546
  */
18547
18547
  }, { key: "syncConsumers", value: function() {
18548
18548
  var r = m(/* @__PURE__ */ h().m(function t() {
18549
- var n, i, a = this, o, c, l, d, p, v, f, g, y, k, b, T, E, I, M, _, O, L, q, X, Y, H;
18549
+ var n, i, a = this, o, c, l, d, p, v, f, g, k, y, b, T, E, I, M, _, O, L, q, X, Y, H;
18550
18550
  return h().w(function(J) {
18551
18551
  for (; ; )
18552
18552
  switch (J.p = J.n) {
@@ -18589,11 +18589,11 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18589
18589
  return N.producerId;
18590
18590
  }), f = /* @__PURE__ */ new Map(), v.forEach(function(N) {
18591
18591
  f.set(N.producerId, N);
18592
- }), g = (o = (c = this.roomNodeClient) === null || c === void 0 ? void 0 : c.getConsumers()) !== null && o !== void 0 ? o : /* @__PURE__ */ new Map(), y = [], g.forEach(function(N) {
18593
- N.closed && y.push(N.id);
18594
- }), k = (l = (d = this.roomNodeClient) === null || d === void 0 ? void 0 : d.removeClosedConsumers(y)) !== null && l !== void 0 ? l : [], k.forEach(function(N) {
18592
+ }), g = (o = (c = this.roomNodeClient) === null || c === void 0 ? void 0 : c.getConsumers()) !== null && o !== void 0 ? o : /* @__PURE__ */ new Map(), k = [], g.forEach(function(N) {
18593
+ N.closed && k.push(N.id);
18594
+ }), y = (l = (d = this.roomNodeClient) === null || d === void 0 ? void 0 : d.removeClosedConsumers(k)) !== null && l !== void 0 ? l : [], y.forEach(function(N) {
18595
18595
  u(a, je)[je].delete(N), a.consumerPeerMap.has(N) && a.processConsumerClosed(N);
18596
- }), k.length > 0 && this.logger.info("syncConsumers: Removed closed consumers: consumerIds=[".concat(k.join(","), "].")), b = [], T = /* @__PURE__ */ new Set(), E = [], I = [], f.forEach(function(N) {
18596
+ }), y.length > 0 && this.logger.info("syncConsumers: Removed closed consumers: consumerIds=[".concat(y.join(","), "].")), b = [], T = /* @__PURE__ */ new Set(), E = [], I = [], f.forEach(function(N) {
18597
18597
  var U = g.get(N.producerId);
18598
18598
  if (!U) {
18599
18599
  b.push(N);
@@ -18796,9 +18796,9 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18796
18796
  var g = f.producerId;
18797
18797
  return !d.has(g);
18798
18798
  }), p.forEach(function(f) {
18799
- if (!c.producers.some(function(y) {
18800
- var k = y.producerId;
18801
- return k === f.producerId;
18799
+ if (!c.producers.some(function(k) {
18800
+ var y = k.producerId;
18801
+ return y === f.producerId;
18802
18802
  })) {
18803
18803
  var g = V({}, f);
18804
18804
  delete g.consumer, t.context.getValue("peerSessionStore").emit($.NEW_PRODUCER, { peerId: i, producer: V(V({}, g), {}, { producingPeerId: i }) });
@@ -19030,8 +19030,8 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
19030
19030
  this.logger.info("ParticipantController::processConsumerResumed", { consumer: { id: e, peerId: n, kind: i, appData: a, remotelyPaused: c, producerId: l } });
19031
19031
  var v = this.participants.joined.get(n);
19032
19032
  if (v) {
19033
- var f = v.producers.find(function(y) {
19034
- return y.producerId === l;
19033
+ var f = v.producers.find(function(k) {
19034
+ return k.producerId === l;
19035
19035
  });
19036
19036
  if (f && (f.consumer = { id: e, peerId: n, kind: i, appData: a, paused: c, producerId: l, rtpReceiver: d, localId: p }), a.e2ee && this.context.getValue("peerSessionStore").emit($.E2EE_ACTIVE_CONSUMER, { peerId: n, rtpReceiver: d, track: o }), a.screenShare) {
19037
19037
  var g;
@@ -19181,9 +19181,9 @@ var Mt = di(hp().permissions), G = /* @__PURE__ */ w("permissions"), ks = /* @__
19181
19181
  P(this, r);
19182
19182
  var o = e.getValue("logger");
19183
19183
  if (i = C(this, r, [o]), Object.defineProperty(i, gt, { get: jM, set: void 0 }), Object.defineProperty(i, G, { writable: !0, value: void 0 }), Object.defineProperty(i, ks, { writable: !0, value: void 0 }), Object.defineProperty(i, Os, { writable: !0, value: void 0 }), Object.defineProperty(i, md, { writable: !0, value: function(l) {
19184
- var d = l.chat, p = l.connectedMeetings, v = l.plugins, f = l.polls, g = l.media, y = Gh(l, wm);
19184
+ var d = l.chat, p = l.connectedMeetings, v = l.plugins, f = l.polls, g = l.media, k = Gh(l, wm);
19185
19185
  if (d && (d.private && va(u(i, G)[G].chat.private, d.private), d.public && va(u(i, G)[G].chat.public, d.public), i.emit("chatUpdate")), p && va(u(i, G)[G].connectedMeetings, p), g) {
19186
- var k, b, T, E = function(_) {
19186
+ var y, b, T, E = function(_) {
19187
19187
  switch (_) {
19188
19188
  case Ca.NONE:
19189
19189
  return se.Allowed;
@@ -19197,9 +19197,9 @@ var Mt = di(hp().permissions), G = /* @__PURE__ */ w("permissions"), ks = /* @__
19197
19197
  return;
19198
19198
  }
19199
19199
  }, I = { audio: void 0, video: void 0, screenshare: void 0 };
19200
- (k = g.audio) !== null && k !== void 0 && k.canProduce && (I.audio = { canProduce: E(g.audio.canProduce) }), (b = g.video) !== null && b !== void 0 && b.canProduce && (I.video = { canProduce: E(g.video.canProduce) }), (T = g.screenshare) !== null && T !== void 0 && T.canProduce && (I.screenshare = { canProduce: E(g.screenshare.canProduce) }), va(u(i, G)[G].media, I);
19200
+ (y = g.audio) !== null && y !== void 0 && y.canProduce && (I.audio = { canProduce: E(g.audio.canProduce) }), (b = g.video) !== null && b !== void 0 && b.canProduce && (I.video = { canProduce: E(g.video.canProduce) }), (T = g.screenshare) !== null && T !== void 0 && T.canProduce && (I.screenshare = { canProduce: E(g.screenshare.canProduce) }), va(u(i, G)[G].media, I);
19201
19201
  }
19202
- v && (va(u(i, G)[G].plugins, v), i.emit("pluginsUpdate")), f && (va(u(i, G)[G].polls, f), i.emit("pollsUpdate")), Object.keys(y).length !== 0 && va(u(i, G)[G], y), i.emit("permissionsUpdate", l);
19202
+ v && (va(u(i, G)[G].plugins, v), i.emit("pluginsUpdate")), f && (va(u(i, G)[G].polls, f), i.emit("pollsUpdate")), Object.keys(k).length !== 0 && va(u(i, G)[G], k), i.emit("permissionsUpdate", l);
19203
19203
  } }), !t)
19204
19204
  throw i.logger.error("PermissionPreset::load_preset_permissions_failed"), new j("Could not load preset permissions.", "0904");
19205
19205
  return u(i, Os)[Os] = e, u(i, ks)[ks] = n, u(i, G)[G] = t, a && i.setupEvents(), i;
@@ -19518,9 +19518,9 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19518
19518
  for (; ; )
19519
19519
  switch (g.n) {
19520
19520
  case 0:
19521
- if (c = function(k, b) {
19522
- i.mediaPermissions[k] = b;
19523
- var T = { message: i.mediaPermissions[k], kind: k };
19521
+ if (c = function(y, b) {
19522
+ i.mediaPermissions[y] = b;
19523
+ var T = { message: i.mediaPermissions[y], kind: y };
19524
19524
  b === "DENIED" ? u(i, jt)[jt].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_ERROR, T) : u(i, jt)[jt].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_UPDATE, T);
19525
19525
  }, wt.getName() !== "firefox") {
19526
19526
  g.n = 1;
@@ -19532,16 +19532,16 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19532
19532
  case 2:
19533
19533
  return p = g.v, g.n = 3, (o = navigator) === null || o === void 0 || (o = o.permissions) === null || o === void 0 ? void 0 : o.query({ name: d });
19534
19534
  case 3:
19535
- v = g.v, f = function(k, b) {
19535
+ v = g.v, f = function(y, b) {
19536
19536
  switch (b) {
19537
19537
  case "granted":
19538
- c(k, "ACCEPTED");
19538
+ c(y, "ACCEPTED");
19539
19539
  break;
19540
19540
  case "denied":
19541
- c(k, "DENIED");
19541
+ c(y, "DENIED");
19542
19542
  break;
19543
19543
  case "prompt":
19544
- c(k, "NOT_REQUESTED");
19544
+ c(y, "NOT_REQUESTED");
19545
19545
  break;
19546
19546
  }
19547
19547
  i.localMediaHandler.repopulateAvailableDevices();
@@ -19594,7 +19594,7 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19594
19594
  /** @access private */
19595
19595
  }, { key: "init", value: function() {
19596
19596
  var e = m(/* @__PURE__ */ h().m(function n() {
19597
- var i = this, a, o, c, l, d, p, v, f, g, y, k, b, T, E, I = arguments, M;
19597
+ var i = this, a, o, c, l, d, p, v, f, g, k, y, b, T, E, I = arguments, M;
19598
19598
  return h().w(function(_) {
19599
19599
  for (; ; )
19600
19600
  switch (_.p = _.n) {
@@ -19672,7 +19672,7 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19672
19672
  _.n = 6;
19673
19673
  break;
19674
19674
  }
19675
- if (this.logger.info("Setting up SelfMedia streams using media handler. audio:".concat((y = a == null ? void 0 : a.audio) !== null && y !== void 0 ? y : !0, " video:").concat((k = a == null ? void 0 : a.video) !== null && k !== void 0 ? k : !0)), E = this.localMediaHandler.setupStreams({ video: (b = a == null ? void 0 : a.video) !== null && b !== void 0 ? b : !0, audio: (T = a == null ? void 0 : a.audio) !== null && T !== void 0 ? T : !0 }), o) {
19675
+ if (this.logger.info("Setting up SelfMedia streams using media handler. audio:".concat((k = a == null ? void 0 : a.audio) !== null && k !== void 0 ? k : !0, " video:").concat((y = a == null ? void 0 : a.video) !== null && y !== void 0 ? y : !0)), E = this.localMediaHandler.setupStreams({ video: (b = a == null ? void 0 : a.video) !== null && b !== void 0 ? b : !0, audio: (T = a == null ? void 0 : a.audio) !== null && T !== void 0 ? T : !0 }), o) {
19676
19676
  _.n = 6;
19677
19677
  break;
19678
19678
  }
@@ -20111,12 +20111,12 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
20111
20111
  for (var i = n > 1 ? void 0 : n ? FM(e, t) : e, a = r.length - 1, o; a >= 0; a--)
20112
20112
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
20113
20113
  return n && i && UM(e, t, i), i;
20114
- }, rr = (ca = /* @__PURE__ */ w("config"), ot = /* @__PURE__ */ w("permissions"), la = /* @__PURE__ */ w("isPinned"), $e = /* @__PURE__ */ w("context"), Rr = /* @__PURE__ */ w("pip"), Ve = /* @__PURE__ */ w("roomNodeClient"), da = /* @__PURE__ */ w("audioPlayback"), be = /* @__PURE__ */ w("mediaJoined"), wa = /* @__PURE__ */ w("previewVideoElements"), ba = /* @__PURE__ */ w("videoElements"), po = /* @__PURE__ */ w("updateVideos"), /* @__PURE__ */ function(s) {
20114
+ }, rr = (ca = /* @__PURE__ */ w("config"), ut = /* @__PURE__ */ w("permissions"), la = /* @__PURE__ */ w("isPinned"), $e = /* @__PURE__ */ w("context"), Rr = /* @__PURE__ */ w("pip"), Ve = /* @__PURE__ */ w("roomNodeClient"), da = /* @__PURE__ */ w("audioPlayback"), be = /* @__PURE__ */ w("mediaJoined"), wa = /* @__PURE__ */ w("previewVideoElements"), ba = /* @__PURE__ */ w("videoElements"), po = /* @__PURE__ */ w("updateVideos"), /* @__PURE__ */ function(s) {
20115
20115
  function r(e, t, n, i, a) {
20116
20116
  var o;
20117
20117
  P(this, r);
20118
20118
  var c = e.getValue("logger");
20119
- return o = C(this, r, [e, c]), Object.defineProperty(o, po, { value: GM }), Object.defineProperty(o, be, { get: WM, set: void 0 }), Object.defineProperty(o, da, { get: qM, set: void 0 }), Object.defineProperty(o, Ve, { get: BM, set: void 0 }), Object.defineProperty(o, Rr, { get: HM, set: void 0 }), o.name = void 0, o.picture = void 0, o.customParticipantId = void 0, o.waitlistStatus = void 0, Object.defineProperty(o, ca, { writable: !0, value: void 0 }), Object.defineProperty(o, ot, { writable: !0, value: void 0 }), Object.defineProperty(o, la, { writable: !0, value: void 0 }), o.role = void 0, o.userId = void 0, o.organizationId = void 0, o.supportsRemoteControl = !1, o.device = void 0, Object.defineProperty(o, $e, { writable: !0, value: void 0 }), o.hidden = !1, o.presetName = void 0, o.roomState = "init", Object.defineProperty(o, wa, { writable: !0, value: /* @__PURE__ */ new Set() }), Object.defineProperty(o, ba, { writable: !0, value: /* @__PURE__ */ new Set() }), u(o, $e)[$e] = e, o.userId = t.id, o.name = t.name, o.picture = t.picture, o.customParticipantId = t.customParticipantId, o.waitlistStatus = "none", u(o, ot)[ot] = n, u(o, ca)[ca] = i, o.hidden = !1, u(o, la)[la] = !1, o.organizationId = t.organizationId, o.supportsRemoteControl = wt.isElectron(), o.device = wt.getDeviceInfo(), o.presetName = a, o.updatePermission(), o.updateVideo = o.updateVideo.bind(o), u(o, po)[po](), o;
20119
+ return o = C(this, r, [e, c]), Object.defineProperty(o, po, { value: GM }), Object.defineProperty(o, be, { get: WM, set: void 0 }), Object.defineProperty(o, da, { get: qM, set: void 0 }), Object.defineProperty(o, Ve, { get: BM, set: void 0 }), Object.defineProperty(o, Rr, { get: HM, set: void 0 }), o.name = void 0, o.picture = void 0, o.customParticipantId = void 0, o.waitlistStatus = void 0, Object.defineProperty(o, ca, { writable: !0, value: void 0 }), Object.defineProperty(o, ut, { writable: !0, value: void 0 }), Object.defineProperty(o, la, { writable: !0, value: void 0 }), o.role = void 0, o.userId = void 0, o.organizationId = void 0, o.supportsRemoteControl = !1, o.device = void 0, Object.defineProperty(o, $e, { writable: !0, value: void 0 }), o.hidden = !1, o.presetName = void 0, o.roomState = "init", Object.defineProperty(o, wa, { writable: !0, value: /* @__PURE__ */ new Set() }), Object.defineProperty(o, ba, { writable: !0, value: /* @__PURE__ */ new Set() }), u(o, $e)[$e] = e, o.userId = t.id, o.name = t.name, o.picture = t.picture, o.customParticipantId = t.customParticipantId, o.waitlistStatus = "none", u(o, ut)[ut] = n, u(o, ca)[ca] = i, o.hidden = !1, u(o, la)[la] = !1, o.organizationId = t.organizationId, o.supportsRemoteControl = wt.isElectron(), o.device = wt.getDeviceInfo(), o.presetName = a, o.updatePermission(), o.updateVideo = o.updateVideo.bind(o), u(o, po)[po](), o;
20120
20120
  }
20121
20121
  return R(r, s), S(r, [{ key: "telemetry", get: (
20122
20122
  /**
@@ -20144,7 +20144,7 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
20144
20144
  } }, {
20145
20145
  key: "cleanupEvents",
20146
20146
  value: function() {
20147
- this.removeAllListeners("videoUpdate"), this.localMediaHandler.removeAllListeners("AUDIO_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("VIDEO_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("DEVICE_CHANGE"), this.localMediaHandler.removeAllListeners("DEVICE_LIST_UPDATED"), this.localMediaHandler.removeAllListeners("SCREENSHARE_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("SCREENSHARE_ENDED"), this.localMediaHandler.removeAllListeners("AUDIO_TRACK_SILENT"), this.localMediaHandler.removeAllListeners("FORCE_MUTE_AUDIO"), this.localMediaHandler.removeAllListeners("FORCE_MUTE_VIDEO"), u(this, ot)[ot].removeAllListeners("permissionsUpdate");
20147
+ this.removeAllListeners("videoUpdate"), this.localMediaHandler.removeAllListeners("AUDIO_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("VIDEO_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("DEVICE_CHANGE"), this.localMediaHandler.removeAllListeners("DEVICE_LIST_UPDATED"), this.localMediaHandler.removeAllListeners("SCREENSHARE_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("SCREENSHARE_ENDED"), this.localMediaHandler.removeAllListeners("AUDIO_TRACK_SILENT"), this.localMediaHandler.removeAllListeners("FORCE_MUTE_AUDIO"), this.localMediaHandler.removeAllListeners("FORCE_MUTE_VIDEO"), u(this, ut)[ut].removeAllListeners("permissionsUpdate");
20148
20148
  }
20149
20149
  /** @access private */
20150
20150
  }, {
@@ -20294,9 +20294,9 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
20294
20294
  return o.a(2);
20295
20295
  }
20296
20296
  }, i);
20297
- }))), u(this, ot)[ot].on("permissionsUpdate", function(i) {
20297
+ }))), u(this, ut)[ut].on("permissionsUpdate", function(i) {
20298
20298
  var a, o, c;
20299
- i != null && (a = i.media) !== null && a !== void 0 && a.audio && u(t, ot)[ot].canProduceAudio !== se.Allowed && (t.disableAudio(), t.logger.info("Disabled audio due to dynamic preset change: canProduceAudio: ".concat(t.permissions.canProduceAudio))), i != null && (o = i.media) !== null && o !== void 0 && o.video && u(t, ot)[ot].canProduceVideo !== se.Allowed && (t.disableVideo(), t.logger.info("Disabled video due to dynamic preset change: canProduceVideo: ".concat(t.permissions.canProduceVideo))), i != null && (c = i.media) !== null && c !== void 0 && c.screenshare && u(t, ot)[ot].canProduceScreenshare !== se.Allowed && (t.disableScreenShare(), t.logger.info("Disabled screenshare due to dynamic preset change: canProduceScreenshare: ".concat(t.permissions.canProduceScreenshare)));
20299
+ i != null && (a = i.media) !== null && a !== void 0 && a.audio && u(t, ut)[ut].canProduceAudio !== se.Allowed && (t.disableAudio(), t.logger.info("Disabled audio due to dynamic preset change: canProduceAudio: ".concat(t.permissions.canProduceAudio))), i != null && (o = i.media) !== null && o !== void 0 && o.video && u(t, ut)[ut].canProduceVideo !== se.Allowed && (t.disableVideo(), t.logger.info("Disabled video due to dynamic preset change: canProduceVideo: ".concat(t.permissions.canProduceVideo))), i != null && (c = i.media) !== null && c !== void 0 && c.screenshare && u(t, ut)[ut].canProduceScreenshare !== se.Allowed && (t.disableScreenShare(), t.logger.info("Disabled screenshare due to dynamic preset change: canProduceScreenshare: ".concat(t.permissions.canProduceScreenshare)));
20300
20300
  });
20301
20301
  }
20302
20302
  /**
@@ -20305,7 +20305,7 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
20305
20305
  }, {
20306
20306
  key: "permissions",
20307
20307
  get: function() {
20308
- return u(this, ot)[ot];
20308
+ return u(this, ut)[ut];
20309
20309
  }
20310
20310
  /**
20311
20311
  * Returns configuration for the meeting.
@@ -20407,7 +20407,7 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
20407
20407
  }
20408
20408
  return c.a(2);
20409
20409
  case 1:
20410
- if (!(u(this, ot)[ot].canProduceAudio === se.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20410
+ if (!(u(this, ut)[ut].canProduceAudio === se.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20411
20411
  c.n = 2;
20412
20412
  break;
20413
20413
  }
@@ -20459,13 +20459,13 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
20459
20459
  for (; ; )
20460
20460
  switch (c.p = c.n) {
20461
20461
  case 0:
20462
- if (u(this, ot)[ot].canProduceVideo !== se.NotAllowed) {
20462
+ if (u(this, ut)[ut].canProduceVideo !== se.NotAllowed) {
20463
20463
  c.n = 1;
20464
20464
  break;
20465
20465
  }
20466
20466
  return c.a(2);
20467
20467
  case 1:
20468
- if (!(u(this, ot)[ot].canProduceVideo === se.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20468
+ if (!(u(this, ut)[ut].canProduceVideo === se.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20469
20469
  c.n = 2;
20470
20470
  break;
20471
20471
  }
@@ -20535,13 +20535,13 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
20535
20535
  }
20536
20536
  throw new j("Can`t enable screenshare without joining room", "1105");
20537
20537
  case 1:
20538
- if (u(this, ot)[ot].canProduceScreenshare !== se.NotAllowed) {
20538
+ if (u(this, ut)[ut].canProduceScreenshare !== se.NotAllowed) {
20539
20539
  a.n = 2;
20540
20540
  break;
20541
20541
  }
20542
20542
  return a.a(2);
20543
20543
  case 2:
20544
- if (!(u(this, ot)[ot].canProduceScreenshare === se.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20544
+ if (!(u(this, ut)[ut].canProduceScreenshare === se.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20545
20545
  a.n = 3;
20546
20546
  break;
20547
20547
  }
@@ -20894,12 +20894,12 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
20894
20894
  t.style.display = this.videoEnabled ? "block" : "none";
20895
20895
  } }], [{ key: "__init__", value: function() {
20896
20896
  var e = m(/* @__PURE__ */ h().m(function n(i, a, o, c, l) {
20897
- var d, p, v, f, g, y, k, b, T, E, I, M, _ = arguments;
20897
+ var d, p, v, f, g, k, y, b, T, E, I, M, _ = arguments;
20898
20898
  return h().w(function(O) {
20899
20899
  for (; ; )
20900
20900
  switch (O.n) {
20901
20901
  case 0:
20902
- return k = _.length > 5 && _[5] !== void 0 ? _[5] : !1, b = (d = (p = i.getValue("defaults")) === null || p === void 0 ? void 0 : p.audio) !== null && d !== void 0 ? d : !0, T = (v = (f = i.getValue("defaults")) === null || f === void 0 ? void 0 : f.video) !== null && v !== void 0 ? v : !0, o.canProduceAudio !== "ALLOWED" && (b = !1), o.canProduceVideo !== "ALLOWED" && (T = !1), E = new rr(i, a, o, c, l), I = SI(c.mediaConstraints), va(I, (g = i.getValue("defaults")) === null || g === void 0 ? void 0 : g.mediaConfiguration), M = (y = i.getValue("defaults")) === null || y === void 0 ? void 0 : y.mediaHandler, M && (M.context = i), O.n = 1, E.init({ audio: b, video: T, constraints: I }, k, i);
20902
+ return y = _.length > 5 && _[5] !== void 0 ? _[5] : !1, b = (d = (p = i.getValue("defaults")) === null || p === void 0 ? void 0 : p.audio) !== null && d !== void 0 ? d : !0, T = (v = (f = i.getValue("defaults")) === null || f === void 0 ? void 0 : f.video) !== null && v !== void 0 ? v : !0, o.canProduceAudio !== "ALLOWED" && (b = !1), o.canProduceVideo !== "ALLOWED" && (T = !1), E = new rr(i, a, o, c, l), I = SI(c.mediaConstraints), va(I, (g = i.getValue("defaults")) === null || g === void 0 ? void 0 : g.mediaConfiguration), M = (k = i.getValue("defaults")) === null || k === void 0 ? void 0 : k.mediaHandler, M && (M.context = i), O.n = 1, E.init({ audio: b, video: T, constraints: I }, y, i);
20903
20903
  case 1:
20904
20904
  return E.setupEvents(), O.a(2, E);
20905
20905
  }
@@ -20989,13 +20989,13 @@ var JM = /* @__PURE__ */ function(s) {
20989
20989
  var p = { id: o.nextTaskId++, task: n, metadata: a, name: i, enqueuedAt: Date.now(), executedAt: void 0, completed: !1, resolve: function(f) {
20990
20990
  if (!p.completed) {
20991
20991
  p.completed = !0, o.pendingTasks.delete(p.id), l(f);
20992
- var g = o.pendingTasks.values(), y = Ue(g, 1), k = y[0];
20993
- k && !k.executedAt && o.execute(k);
20992
+ var g = o.pendingTasks.values(), k = Ue(g, 1), y = k[0];
20993
+ y && !y.executedAt && o.execute(y);
20994
20994
  }
20995
20995
  }, reject: function(f) {
20996
20996
  if (!p.completed && (p.completed = !0, o.pendingTasks.delete(p.id), d(f), !o.stopping)) {
20997
- var g = o.pendingTasks.values(), y = Ue(g, 1), k = y[0];
20998
- k && !k.executedAt && o.execute(k);
20997
+ var g = o.pendingTasks.values(), k = Ue(g, 1), y = k[0];
20998
+ y && !y.executedAt && o.execute(y);
20999
20999
  }
21000
21000
  } };
21001
21001
  o.pendingTasks.set(p.id, p), o.pendingTasks.size === 1 && o.execute(p);
@@ -21094,12 +21094,12 @@ function ch() {
21094
21094
  case 0:
21095
21095
  return t.a(2, new Promise(/* @__PURE__ */ function() {
21096
21096
  var n = m(/* @__PURE__ */ h().m(function i(a, o) {
21097
- var c, l, d, p, v, f, g, y, k, b;
21097
+ var c, l, d, p, v, f, g, k, y, b;
21098
21098
  return h().w(function(T) {
21099
21099
  for (; ; )
21100
21100
  switch (T.p = T.n) {
21101
21101
  case 0:
21102
- c = V({ strategy: "linear", maxRetryCount: 3, delayTime: 10 }, e), l = c.strategy, d = c.maxRetryCount, p = c.delayTime, v = 0, g = !1, y = function(I) {
21102
+ c = V({ strategy: "linear", maxRetryCount: 3, delayTime: 10 }, e), l = c.strategy, d = c.maxRetryCount, p = c.delayTime, v = 0, g = !1, k = function(I) {
21103
21103
  g = !0, o(I);
21104
21104
  };
21105
21105
  case 1:
@@ -21107,9 +21107,9 @@ function ch() {
21107
21107
  T.n = 11;
21108
21108
  break;
21109
21109
  }
21110
- return T.p = 2, T.n = 3, r(v, y);
21110
+ return T.p = 2, T.n = 3, r(v, k);
21111
21111
  case 3:
21112
- return k = T.v, T.a(2, a(k));
21112
+ return y = T.v, T.a(2, a(y));
21113
21113
  case 4:
21114
21114
  if (T.p = 4, b = T.v, f = b, !g) {
21115
21115
  T.n = 5;
@@ -21230,8 +21230,8 @@ var fu = /* @__PURE__ */ w("context"), ql = /* @__PURE__ */ function(s) {
21230
21230
  setTimeout(g, a, "event request timeout");
21231
21231
  try {
21232
21232
  o.emit.apply(o, [i.toString()].concat(l, [f, g]));
21233
- } catch (y) {
21234
- o.logger.error("EnhancedEventEmitter:: safeEmitAsPromise() | event listener for event ".concat(i.toString(), " threw an error [event:%s]:%o"), { error: y }), g(y);
21233
+ } catch (k) {
21234
+ o.logger.error("EnhancedEventEmitter:: safeEmitAsPromise() | event listener for event ".concat(i.toString(), " threw an error [event:%s]:%o"), { error: k }), g(k);
21235
21235
  }
21236
21236
  }));
21237
21237
  }
@@ -21581,12 +21581,12 @@ function iO() {
21581
21581
  }
21582
21582
  var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /* @__PURE__ */ function(s) {
21583
21583
  function r(e, t) {
21584
- var n, i, a, o, c = t.id, l = t.direction, d = t.handlerFactory, p = t.iceServers, v = t.iceTransportPolicy, f = t.proprietaryConstraints, g = t.additionalSettings, y = t.appData, k = t.config;
21584
+ var n, i, a, o, c = t.id, l = t.direction, d = t.handlerFactory, p = t.iceServers, v = t.iceTransportPolicy, f = t.proprietaryConstraints, g = t.additionalSettings, k = t.appData, y = t.config;
21585
21585
  P(this, r), o = C(this, r, [e]), o.awaitQueue = void 0, o.observer = void 0, o.id = void 0, o.serverId = void 0, o.direction = void 0, o.maxSctpMessageSize = void 0, o.handler = void 0, o.connectionState = "new", o.producers = void 0, o.consumers = void 0, o.connected = !1, o.transportConnectionPromise = void 0, o.consumerTrackEvents = void 0, o.unknownTracksMap = void 0, o.appData = void 0, Object.defineProperty(o, Ps, { writable: !0, value: void 0 }), u(o, Ps)[Ps] = e;
21586
21586
  var b = e.getValue("logger");
21587
21587
  b.debug("constructor() [id: ".concat(c, ", direction: ").concat(l, "]")), o.id = c, o.direction = l;
21588
21588
  var T = XM(g, {});
21589
- delete T.iceServers, delete T.iceTransportPolicy, delete T.bundlePolicy, delete T.rtcpMuxPolicy, delete T.sdpSemantics, o.producers = /* @__PURE__ */ new Map(), o.consumers = /* @__PURE__ */ new Map(), o.consumerTrackEvents = /* @__PURE__ */ new Map(), o.unknownTracksMap = /* @__PURE__ */ new Map(), o.awaitQueue = new oh(b, !0), o.handler = d(), o.handler.enableHighBitrate = (n = k == null ? void 0 : k.enableHighBitrate) !== null && n !== void 0 ? n : !1, o.handler.enableStereo = (i = k == null ? void 0 : k.enableStereo) !== null && i !== void 0 ? i : !1, o.handler.enableDtx = (a = k == null ? void 0 : k.enableDtx) !== null && a !== void 0 ? a : !0, o.handler.init({ onTrackHandler: o._ontrack.bind(o), direction: l, iceServers: p, iceTransportPolicy: v, additionalSettings: g, proprietaryConstraints: f }), o.appData = y || {};
21589
+ delete T.iceServers, delete T.iceTransportPolicy, delete T.bundlePolicy, delete T.rtcpMuxPolicy, delete T.sdpSemantics, o.producers = /* @__PURE__ */ new Map(), o.consumers = /* @__PURE__ */ new Map(), o.consumerTrackEvents = /* @__PURE__ */ new Map(), o.unknownTracksMap = /* @__PURE__ */ new Map(), o.awaitQueue = new oh(b, !0), o.handler = d(), o.handler.enableHighBitrate = (n = y == null ? void 0 : y.enableHighBitrate) !== null && n !== void 0 ? n : !1, o.handler.enableStereo = (i = y == null ? void 0 : y.enableStereo) !== null && i !== void 0 ? i : !1, o.handler.enableDtx = (a = y == null ? void 0 : y.enableDtx) !== null && a !== void 0 ? a : !0, o.handler.init({ onTrackHandler: o._ontrack.bind(o), direction: l, iceServers: p, iceTransportPolicy: v, additionalSettings: g, proprietaryConstraints: f }), o.appData = k || {};
21590
21590
  var E = 3e4;
21591
21591
  return o.transportConnectionPromise = new Promise(function(I) {
21592
21592
  var M = setTimeout(function() {
@@ -21661,18 +21661,18 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
21661
21661
  switch (c.p = c.n) {
21662
21662
  case 0:
21663
21663
  return c.p = 0, c.n = 1, this.awaitQueue.push(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function l() {
21664
- var d, p, v, f, g, y;
21665
- return h().w(function(k) {
21664
+ var d, p, v, f, g, k;
21665
+ return h().w(function(y) {
21666
21666
  for (; ; )
21667
- switch (k.n) {
21667
+ switch (y.n) {
21668
21668
  case 0:
21669
- return k.n = 1, a.handler.connect();
21669
+ return y.n = 1, a.handler.connect();
21670
21670
  case 1:
21671
- return d = k.v, p = d.offerSdp, v = d.callback, k.n = 2, i(p);
21671
+ return d = y.v, p = d.offerSdp, v = d.callback, y.n = 2, i(p);
21672
21672
  case 2:
21673
- return f = k.v, g = f.transportId, y = f.answer, a.setServerId(g), k.n = 3, v(y);
21673
+ return f = y.v, g = f.transportId, k = f.answer, a.setServerId(g), y.n = 3, v(k);
21674
21674
  case 3:
21675
- return k.a(2);
21675
+ return y.a(2);
21676
21676
  }
21677
21677
  }, l);
21678
21678
  })));
@@ -21771,7 +21771,7 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
21771
21771
  return t;
21772
21772
  }() }, { key: "produce", value: function() {
21773
21773
  var e = m(/* @__PURE__ */ h().m(function n(i, a) {
21774
- var o = this, c, l, d, p, v, f, g, y, k, b, T, E, I, M, _, O;
21774
+ var o = this, c, l, d, p, v, f, g, k, y, b, T, E, I, M, _, O;
21775
21775
  return h().w(function(L) {
21776
21776
  for (; ; )
21777
21777
  switch (L.n) {
@@ -21784,7 +21784,7 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
21784
21784
  }
21785
21785
  throw new Error("Cannot produce");
21786
21786
  case 2:
21787
- return l = i.track, d = i.encodings, p = i.codecOptions, v = i.stopTracks, f = v === void 0 ? !0 : v, g = i.disableTrackOnPause, y = g === void 0 ? !0 : g, k = i.zeroRtpOnPause, b = k === void 0 ? !1 : k, T = i.appData, E = T === void 0 ? {} : T, this.logger.debug("produce() [track:".concat(l.id, "]")), L.n = 3, this.awaitQueue.push(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function q() {
21787
+ return l = i.track, d = i.encodings, p = i.codecOptions, v = i.stopTracks, f = v === void 0 ? !0 : v, g = i.disableTrackOnPause, k = g === void 0 ? !0 : g, y = i.zeroRtpOnPause, b = y === void 0 ? !1 : y, T = i.appData, E = T === void 0 ? {} : T, this.logger.debug("produce() [track:".concat(l.id, "]")), L.n = 3, this.awaitQueue.push(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function q() {
21788
21788
  var X, Y, H, J, N, U, x, le, Re;
21789
21789
  return h().w(function(pe) {
21790
21790
  for (; ; )
@@ -21792,7 +21792,7 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
21792
21792
  case 0:
21793
21793
  return pe.n = 1, o.handler.send({ track: l, encodings: d, codecOptions: p, screenShare: E == null ? void 0 : E.screenShare });
21794
21794
  case 1:
21795
- return X = pe.v, Y = X.offerSdp, H = X.callback, J = X.sender, N = X.mid, pe.n = 2, a({ offer: Y, kind: l.kind, paused: y ? !l.enabled || Object.hasOwn(l, "fakeTracks") : !1, appData: V(V({}, E || {}), {}, { mid: N }), codecOptions: p, producingTransportId: o.serverId });
21795
+ return X = pe.v, Y = X.offerSdp, H = X.callback, J = X.sender, N = X.mid, pe.n = 2, a({ offer: Y, kind: l.kind, paused: k ? !l.enabled || Object.hasOwn(l, "fakeTracks") : !1, appData: V(V({}, E || {}), {}, { mid: N }), codecOptions: p, producingTransportId: o.serverId });
21796
21796
  case 2:
21797
21797
  return U = pe.v, x = U.answer, le = U.producerId, pe.n = 3, H(x);
21798
21798
  case 3:
@@ -21801,7 +21801,7 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
21801
21801
  }, q);
21802
21802
  })), "Transport.produce");
21803
21803
  case 3:
21804
- return I = L.v, M = I.producerId, _ = I.localId, O = I.rtpSender, L.a(2, this.createProducerObject({ id: M, localId: _, track: l, stopTracks: f, disableTrackOnPause: y, zeroRtpOnPause: b, appData: E, handler: this.handler, rtpSender: O }));
21804
+ return I = L.v, M = I.producerId, _ = I.localId, O = I.rtpSender, L.a(2, this.createProducerObject({ id: M, localId: _, track: l, stopTracks: f, disableTrackOnPause: k, zeroRtpOnPause: b, appData: E, handler: this.handler, rtpSender: O }));
21805
21805
  }
21806
21806
  }, n, this);
21807
21807
  }));
@@ -21884,14 +21884,14 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
21884
21884
  switch (l.n) {
21885
21885
  case 0:
21886
21886
  return l.a(2, this.awaitQueue.push(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function d() {
21887
- var p, v, f, g, y, k;
21887
+ var p, v, f, g, k, y;
21888
21888
  return h().w(function(b) {
21889
21889
  for (; ; )
21890
21890
  switch (b.n) {
21891
21891
  case 0:
21892
21892
  return p = {}, b.n = 1, a(i);
21893
21893
  case 1:
21894
- if (v = b.v, f = v.consumerStates, g = v.sessionDescription, y = v.failedProducers, f.forEach(function(T, E) {
21894
+ if (v = b.v, f = v.consumerStates, g = v.sessionDescription, k = v.failedProducers, f.forEach(function(T, E) {
21895
21895
  p[E] = c.createConsumerObjectAndWaitForTrack(V(V({}, T), {}, { producerId: E }));
21896
21896
  }), !g) {
21897
21897
  b.n = 2;
@@ -21899,16 +21899,16 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
21899
21899
  }
21900
21900
  return c.logger.info("Session description found, sending negotiation request"), b.n = 2, o(g);
21901
21901
  case 2:
21902
- return k = [], b.n = 3, Promise.all(Object.entries(p).map(function(T) {
21902
+ return y = [], b.n = 3, Promise.all(Object.entries(p).map(function(T) {
21903
21903
  var E = Ue(T, 2), I = E[0], M = E[1];
21904
21904
  return M.then(function(_) {
21905
- return k.push(_);
21905
+ return y.push(_);
21906
21906
  }).catch(function() {
21907
21907
  c.logger.error("Failed to create consumer object, producer: ".concat(I), { error: { message: "This should not happen" }, transport: { serverId: c.serverId } });
21908
21908
  });
21909
21909
  }));
21910
21910
  case 3:
21911
- return b.a(2, { consumers: k, failedProducers: y });
21911
+ return b.a(2, { consumers: y, failedProducers: k });
21912
21912
  }
21913
21913
  }, d);
21914
21914
  })), "Transport.consume", { producersLength: i.length }));
@@ -21929,8 +21929,8 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
21929
21929
  return f.p = 0, o = i.map(function(g) {
21930
21930
  return g.transceiver.mid;
21931
21931
  }), c = r.parseCodecAndFmtpMappings(this.handler.pc.remoteDescription, o), l = r.parseHeaderExtensionMappings(this.handler.pc.remoteDescription), this.logger.info("Stopping transceivers", { consumerIds: i.map(function(g) {
21932
- var y = g.id;
21933
- return y;
21932
+ var k = g.id;
21933
+ return k;
21934
21934
  }) }), i.forEach(function(g) {
21935
21935
  return g.close(void 0, !0);
21936
21936
  }), f.n = 1, this.handler.pc.createOffer();
@@ -22002,12 +22002,12 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
22002
22002
  c ? (c(i, a), this.consumerTrackEvents.delete(o)) : (this.logger.warn("track event handler not found ".concat(o)), this.unknownTracksMap.set(o, t));
22003
22003
  } }, { key: "createConsumerObjectAndWaitForTrack", value: function() {
22004
22004
  var e = m(/* @__PURE__ */ h().m(function n(i) {
22005
- var a = this, o, c, l, d, p, v, f, g, y, k, b, T;
22005
+ var a = this, o, c, l, d, p, v, f, g, k, y, b, T;
22006
22006
  return h().w(function(E) {
22007
22007
  for (; ; )
22008
22008
  switch (E.n) {
22009
22009
  case 0:
22010
- return o = i.consumerId, c = i.producerId, l = i.producingPeerId, d = i.producingTransportId, p = i.streamId, v = i.paused, f = i.screenShare, g = i.appData, y = i.kind, k = i.mimeType, b = "".concat(p, ":").concat(y), T = V(V({}, i), {}, { name: "consumer creation task error", message: "consumer creation failed" }), E.a(2, new Promise(/* @__PURE__ */ function() {
22010
+ return o = i.consumerId, c = i.producerId, l = i.producingPeerId, d = i.producingTransportId, p = i.streamId, v = i.paused, f = i.screenShare, g = i.appData, k = i.kind, y = i.mimeType, b = "".concat(p, ":").concat(k), T = V(V({}, i), {}, { name: "consumer creation task error", message: "consumer creation failed" }), E.a(2, new Promise(/* @__PURE__ */ function() {
22011
22011
  var I = m(/* @__PURE__ */ h().m(function M(_, O) {
22012
22012
  var L, q, X;
22013
22013
  return h().w(function(Y) {
@@ -22023,15 +22023,15 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
22023
22023
  else {
22024
22024
  var U = J;
22025
22025
  U.enabled = !0, a.handler.midTransceiverMap.set(N.mid, N);
22026
- var x = new ZM(u(a, Ps)[Ps], { id: o, localId: N.mid, transceiver: N, track: U, paused: v, producerId: c, producingPeerId: l, producingTransportId: d, handler: a.handler, appData: V(V({}, g), {}, { screenShare: f, peerId: l }), rtpReceiver: N.receiver, mimeType: k });
22026
+ var x = new ZM(u(a, Ps)[Ps], { id: o, localId: N.mid, transceiver: N, track: U, paused: v, producerId: c, producingPeerId: l, producingTransportId: d, handler: a.handler, appData: V(V({}, g), {}, { screenShare: f, peerId: l }), rtpReceiver: N.receiver, mimeType: y });
22027
22027
  a.consumers.set(o, x), x.once("close", function() {
22028
22028
  a.consumers.delete(x.id), a.handler.midTransceiverMap.delete(N.mid);
22029
- }), a.logger.info("".concat(f ? "screenshare" : "participant", " ").concat(y, " consumer ").concat(o, " created for producer ").concat(c, " of remote producing peer ").concat(l, " with track ").concat(J.id, " on mid ").concat(N.mid)), a.emit("newconsumer", x), clearTimeout(L), _(x);
22029
+ }), a.logger.info("".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer ").concat(o, " created for producer ").concat(c, " of remote producing peer ").concat(l, " with track ").concat(J.id, " on mid ").concat(N.mid)), a.emit("newconsumer", x), clearTimeout(L), _(x);
22030
22030
  }
22031
22031
  } catch (le) {
22032
- a.logger.error("Error while creating ".concat(f ? "screenshare" : "participant", " ").concat(y, " consumer for producerId ").concat(c, " of remote peer ").concat(l), le), clearTimeout(L), O(T);
22032
+ a.logger.error("Error while creating ".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer for producerId ").concat(c, " of remote peer ").concat(l), le), clearTimeout(L), O(T);
22033
22033
  }
22034
- }, X = a.unknownTracksMap.get(b), X ? (a.logger.info("track event already received for ".concat(f ? "screenshare" : "participant", " ").concat(y, " consumer ").concat(o, " of a remote peer ").concat(l, " with trackId ").concat(X.track.id, " on mid ").concat(X.transceiver.mid, " having key ").concat(b)), a.unknownTracksMap.delete(b), q(X.track, X.transceiver)) : (a.logger.info("Registering onTrack handler for ".concat(f ? "screenshare" : "participant", " ").concat(y, " consumer ").concat(o, " of a remote peer ").concat(l, " with key ").concat(b)), a.consumerTrackEvents.set(b, q));
22034
+ }, X = a.unknownTracksMap.get(b), X ? (a.logger.info("track event already received for ".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer ").concat(o, " of a remote peer ").concat(l, " with trackId ").concat(X.track.id, " on mid ").concat(X.transceiver.mid, " having key ").concat(b)), a.unknownTracksMap.delete(b), q(X.track, X.transceiver)) : (a.logger.info("Registering onTrack handler for ".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer ").concat(o, " of a remote peer ").concat(l, " with key ").concat(b)), a.consumerTrackEvents.set(b, q));
22035
22035
  case 1:
22036
22036
  return Y.a(2);
22037
22037
  }
@@ -22699,7 +22699,7 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
22699
22699
  }), this._addEventListeners();
22700
22700
  } }, { key: "send", value: function() {
22701
22701
  var e = m(/* @__PURE__ */ h().m(function n(i) {
22702
- var a = this, o, c, l, d, p, v, f, g, y, k, b, T;
22702
+ var a = this, o, c, l, d, p, v, f, g, k, y, b, T;
22703
22703
  return h().w(function(E) {
22704
22704
  for (; ; )
22705
22705
  switch (E.n) {
@@ -22724,7 +22724,7 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
22724
22724
  return l && l.findIndex(function(I) {
22725
22725
  var M = I.name;
22726
22726
  return M === "opus";
22727
- }) >= 0 && (y = this.enableDtx, k = this.enableStereo, b = this.enableHighBitrate ? k ? 128e3 : 64e3 : k ? 64e3 : 32e3, g.sdp = g.sdp.replace("minptime=10;useinbandfec=1", "minptime=10;useinbandfec=1;".concat(y ? "usedtx=1;" : "").concat(k ? "stereo=1;sprop-stereo=1;" : "", "maxaveragebitrate=").concat(b)), g.sdp += `a=rtcp-fb:111 nack\r
22727
+ }) >= 0 && (k = this.enableDtx, y = this.enableStereo, b = this.enableHighBitrate ? y ? 128e3 : 64e3 : y ? 64e3 : 32e3, g.sdp = g.sdp.replace("minptime=10;useinbandfec=1", "minptime=10;useinbandfec=1;".concat(k ? "usedtx=1;" : "").concat(y ? "stereo=1;sprop-stereo=1;" : "", "maxaveragebitrate=").concat(b)), g.sdp += `a=rtcp-fb:111 nack\r
22728
22728
  `), this.midTransceiverMap.set(p.mid, p), T = /* @__PURE__ */ function() {
22729
22729
  var I = m(/* @__PURE__ */ h().m(function M(_) {
22730
22730
  return h().w(function(O) {
@@ -22767,7 +22767,7 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
22767
22767
  return "Firefox60";
22768
22768
  } }, { key: "send", value: function() {
22769
22769
  var e = m(/* @__PURE__ */ h().m(function n(i) {
22770
- var a = this, o, c, l, d, p, v, f, g, y, k, b, T, E;
22770
+ var a = this, o, c, l, d, p, v, f, g, k, y, b, T, E;
22771
22771
  return h().w(function(I) {
22772
22772
  for (; ; )
22773
22773
  switch (I.n) {
@@ -22797,9 +22797,9 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
22797
22797
  return q.media[q.media.length - 1].rtp = Y, q.media[q.media.length - 1].fmtp = H, q.media[q.media.length - 1].rtcpFb = J, q.media[q.media.length - 1].payloads = N.join(" "), Nn.write(q);
22798
22798
  }, I.n = 2, this.pc.createOffer();
22799
22799
  case 2:
22800
- return y = I.v, y.sdp = g(y.sdp, l), this.logger.debug("[SDP] send() | calling pc.setLocalDescription() [offer:".concat(JSON.stringify(y), "]")), I.n = 3, this.pc.setLocalDescription(y);
22800
+ return k = I.v, k.sdp = g(k.sdp, l), this.logger.debug("[SDP] send() | calling pc.setLocalDescription() [offer:".concat(JSON.stringify(k), "]")), I.n = 3, this.pc.setLocalDescription(k);
22801
22801
  case 3:
22802
- return (o === "audio" || o.kind === "audio") && (k = this.enableDtx, b = this.enableStereo, T = this.enableHighBitrate ? b ? 128e3 : 64e3 : b ? 64e3 : 32e3, y.sdp = y.sdp.replace("minptime=10;useinbandfec=1", "minptime=10;useinbandfec=1;".concat(k ? "usedtx=1;" : "").concat(b ? "stereo=1;sprop-stereo=1;" : "", "maxaveragebitrate=").concat(T))), this.midTransceiverMap.set(v.mid, v), E = /* @__PURE__ */ function() {
22802
+ return (o === "audio" || o.kind === "audio") && (y = this.enableDtx, b = this.enableStereo, T = this.enableHighBitrate ? b ? 128e3 : 64e3 : b ? 64e3 : 32e3, k.sdp = k.sdp.replace("minptime=10;useinbandfec=1", "minptime=10;useinbandfec=1;".concat(y ? "usedtx=1;" : "").concat(b ? "stereo=1;sprop-stereo=1;" : "", "maxaveragebitrate=").concat(T))), this.midTransceiverMap.set(v.mid, v), E = /* @__PURE__ */ function() {
22803
22803
  var M = m(/* @__PURE__ */ h().m(function _(O) {
22804
22804
  return h().w(function(L) {
22805
22805
  for (; ; )
@@ -22814,7 +22814,7 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
22814
22814
  return function(O) {
22815
22815
  return M.apply(this, arguments);
22816
22816
  };
22817
- }(), I.a(2, { offerSdp: y, callback: E, sender: v.sender, mid: v.mid });
22817
+ }(), I.a(2, { offerSdp: k, callback: E, sender: v.sender, mid: v.mid });
22818
22818
  }
22819
22819
  }, n, this);
22820
22820
  }));
@@ -22868,7 +22868,7 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
22868
22868
  }
22869
22869
  ) }, { key: "send", value: function() {
22870
22870
  var e = m(/* @__PURE__ */ h().m(function n(i) {
22871
- var a = this, o, c, l, d, p, v, f, g, y, k, b, T;
22871
+ var a = this, o, c, l, d, p, v, f, g, k, y, b, T;
22872
22872
  return h().w(function(E) {
22873
22873
  for (; ; )
22874
22874
  switch (E.n) {
@@ -22890,7 +22890,7 @@ var wl = "transport closed", aO = 3e4, Ps = /* @__PURE__ */ w("context"), sO = /
22890
22890
  case 1:
22891
22891
  return g = E.v, E.n = 2, this.pc.setLocalDescription(g);
22892
22892
  case 2:
22893
- return (o === "audio" || o.kind === "audio") && (y = this.enableStereo, k = this.enableDtx, b = this.enableHighBitrate ? y ? 128e3 : 64e3 : y ? 64e3 : 32e3, g.sdp = g.sdp.replace("minptime=10;useinbandfec=1", "minptime=10;useinbandfec=1;".concat(k ? "usedtx=1;" : "").concat(y ? "stereo=1;sprop-stereo=1;" : "", "maxaveragebitrate=").concat(b))), this.midTransceiverMap.set(p.mid, p), T = /* @__PURE__ */ function() {
22893
+ return (o === "audio" || o.kind === "audio") && (k = this.enableStereo, y = this.enableDtx, b = this.enableHighBitrate ? k ? 128e3 : 64e3 : k ? 64e3 : 32e3, g.sdp = g.sdp.replace("minptime=10;useinbandfec=1", "minptime=10;useinbandfec=1;".concat(y ? "usedtx=1;" : "").concat(k ? "stereo=1;sprop-stereo=1;" : "", "maxaveragebitrate=").concat(b))), this.midTransceiverMap.set(p.mid, p), T = /* @__PURE__ */ function() {
22894
22894
  var I = m(/* @__PURE__ */ h().m(function M(_) {
22895
22895
  return h().w(function(O) {
22896
22896
  for (; ; )
@@ -23363,25 +23363,25 @@ var Pd = /* @__PURE__ */ w("context"), Xt = /* @__PURE__ */ w("logger"), EO = /*
23363
23363
  throw new Error("List of producers is required");
23364
23364
  case 1:
23365
23365
  return a = /* @__PURE__ */ new Map(), o = [], n.forEach(function(f) {
23366
- var g = f.producingPeerId, y = f.producerId, k = f.producingTransportId, b = { simulcast: { preferredRid: "f", priorityOrdering: "asciibetical", ridNotAvailable: "asciibetical" } };
23367
- a.set(y, g), o.push(V({ producingPeerId: g, producerId: y, producingTransportId: k }, b));
23366
+ var g = f.producingPeerId, k = f.producerId, y = f.producingTransportId, b = { simulcast: { preferredRid: "f", priorityOrdering: "asciibetical", ridNotAvailable: "asciibetical" } };
23367
+ a.set(k, g), o.push(V({ producingPeerId: g, producerId: k, producingTransportId: y }, b));
23368
23368
  }), v.n = 2, this.socketHandler.consume({ requests: o, consumingTransportId: this.recvTransport.serverId });
23369
23369
  case 2:
23370
23370
  return c = v.v, l = /* @__PURE__ */ new Map(), n.forEach(function(f) {
23371
23371
  return l.set(f.producerId, f);
23372
23372
  }), d = /* @__PURE__ */ new Map(), p = [], Object.entries(c.consumerStateMap).forEach(function(f) {
23373
- var g = Ue(f, 2), y = g[0], k = g[1], b = l.get(y);
23373
+ var g = Ue(f, 2), k = g[0], y = g[1], b = l.get(k);
23374
23374
  if (b) {
23375
- if (k.errorCode) {
23376
- u(i, Xt)[Xt].warn("Consumer request failed for producer ".concat(y), { error: { message: k.errorCode } }), p.push(V(V({}, b), {}, { errorCode: k.errorCode }));
23375
+ if (y.errorCode) {
23376
+ u(i, Xt)[Xt].warn("Consumer request failed for producer ".concat(k), { error: { message: y.errorCode } }), p.push(V(V({}, b), {}, { errorCode: y.errorCode }));
23377
23377
  return;
23378
23378
  }
23379
23379
  var T = {};
23380
23380
  try {
23381
- T = JSON.parse(k.producerState.appData);
23381
+ T = JSON.parse(y.producerState.appData);
23382
23382
  } catch (E) {
23383
23383
  }
23384
- d.set(y, { consumerId: k.consumerId, producingTransportId: b.producingTransportId, producingPeerId: b.producingPeerId, kind: b.kind, paused: b.pause, streamId: k.producerTrack.streamId, trackId: k.producerTrack.trackId, screenShare: b.screenShare, mimeType: b.mimeType, appData: T });
23384
+ d.set(k, { consumerId: y.consumerId, producingTransportId: b.producingTransportId, producingPeerId: b.producingPeerId, kind: b.kind, paused: b.pause, streamId: y.producerTrack.streamId, trackId: y.producerTrack.trackId, screenShare: b.screenShare, mimeType: b.mimeType, appData: T });
23385
23385
  }
23386
23386
  }), v.a(2, { consumerStates: d, sessionDescription: c.sessionDescription, failedProducers: p });
23387
23387
  }
@@ -23427,16 +23427,16 @@ var Pd = /* @__PURE__ */ w("context"), Xt = /* @__PURE__ */ w("logger"), EO = /*
23427
23427
  case 1:
23428
23428
  return a = /* @__PURE__ */ function() {
23429
23429
  var c = m(/* @__PURE__ */ h().m(function l(d, p) {
23430
- var v, f, g, y;
23431
- return h().w(function(k) {
23430
+ var v, f, g, k;
23431
+ return h().w(function(y) {
23432
23432
  for (; ; )
23433
- switch (k.n) {
23433
+ switch (y.n) {
23434
23434
  case 0:
23435
23435
  return v = d.map(function(b) {
23436
23436
  return b.localId;
23437
- }), u(i, Xt)[Xt].info("Closing consumers: ".concat(JSON.stringify(v))), f = { description: { sdp: p.sdp, type: p.type, target: Gi.SUBSCRIBER }, consumerIds: v, consumingTransportId: i.recvTransport.serverId }, k.n = 1, i.socketHandler.closeConsumer(f);
23437
+ }), u(i, Xt)[Xt].info("Closing consumers: ".concat(JSON.stringify(v))), f = { description: { sdp: p.sdp, type: p.type, target: Gi.SUBSCRIBER }, consumerIds: v, consumingTransportId: i.recvTransport.serverId }, y.n = 1, i.socketHandler.closeConsumer(f);
23438
23438
  case 1:
23439
- return g = k.v, y = UE.fromBinary(g).description, k.a(2, { sdp: y.sdp, type: y.type });
23439
+ return g = y.v, k = UE.fromBinary(g).description, y.a(2, { sdp: k.sdp, type: k.type });
23440
23440
  }
23441
23441
  }, l);
23442
23442
  }));
@@ -23489,14 +23489,14 @@ var Pd = /* @__PURE__ */ w("context"), Xt = /* @__PURE__ */ w("logger"), EO = /*
23489
23489
  }
23490
23490
  return S(s, [{ key: "create", value: function() {
23491
23491
  var r = m(/* @__PURE__ */ h().m(function t(n) {
23492
- var i, a, o, c, l, d, p, v, f, g, y, k, b;
23492
+ var i, a, o, c, l, d, p, v, f, g, k, y, b;
23493
23493
  return h().w(function(T) {
23494
23494
  for (; ; )
23495
23495
  switch (T.n) {
23496
23496
  case 0:
23497
23497
  return o = n.offer, c = n.kind, l = n.paused, d = n.appData, p = n.codecOptions, v = n.producingTransportId, f = s.getMSIDFromSDP(o.sdp, c), g = { description: { sdp: o.sdp, type: o.type, target: Gi.PUBLISHER }, paused: l, kind: c, msid: f, appData: JSON.stringify(d), screenShare: (i = d.screenShare) !== null && i !== void 0 ? i : !1, mimeType: "".concat(c, "/").concat((a = p[0]) === null || a === void 0 ? void 0 : a.name), producingTransportId: v }, T.n = 1, this.socketHandler.produce(g);
23498
23498
  case 1:
23499
- return y = T.v, k = y.answer, b = y.producerId, T.a(2, { answer: k, producerId: b });
23499
+ return k = T.v, y = k.answer, b = k.producerId, T.a(2, { answer: y, producerId: b });
23500
23500
  }
23501
23501
  }, t, this);
23502
23502
  }));
@@ -23712,48 +23712,48 @@ function AO() {
23712
23712
  function bh() {
23713
23713
  return bh = m(/* @__PURE__ */ h().m(function s() {
23714
23714
  var r = this, e, t, n, i, a, o, c, l, d, p, v, f, g;
23715
- return h().w(function(y) {
23715
+ return h().w(function(k) {
23716
23716
  for (; ; )
23717
- switch (y.p = y.n) {
23717
+ switch (k.p = k.n) {
23718
23718
  case 0:
23719
23719
  if (!(!this.recvTransport || this.recvTransport.closed)) {
23720
- y.n = 1;
23720
+ k.n = 1;
23721
23721
  break;
23722
23722
  }
23723
23723
  throw new Error("Recv transport is closed");
23724
23724
  case 1:
23725
- if (e = 500, t = u(this, Qr)[Qr].splice(0, u(this, Qr)[Qr].length), y.p = 2, n = new Set(Array.from(this.consumers.values()).map(function(k) {
23726
- var b = k.producerId;
23725
+ if (e = 500, t = u(this, Qr)[Qr].splice(0, u(this, Qr)[Qr].length), k.p = 2, n = new Set(Array.from(this.consumers.values()).map(function(y) {
23726
+ var b = y.producerId;
23727
23727
  return b;
23728
- })), i = t.filter(function(k) {
23729
- var b = k.producerId;
23728
+ })), i = t.filter(function(y) {
23729
+ var b = y.producerId;
23730
23730
  return !r.producers.get(b) && !n.has(b);
23731
23731
  }), i.length !== 0) {
23732
- y.n = 3;
23732
+ k.n = 3;
23733
23733
  break;
23734
23734
  }
23735
- return y.a(2);
23735
+ return k.a(2);
23736
23736
  case 3:
23737
- return y.n = 4, this.recvTransport.consume(i, u(this, Th)[Th].bind(this), u(this, Tr)[Tr].negotiate.bind(u(this, Tr)[Tr]));
23737
+ return k.n = 4, this.recvTransport.consume(i, u(this, Th)[Th].bind(this), u(this, Tr)[Tr].negotiate.bind(u(this, Tr)[Tr]));
23738
23738
  case 4:
23739
- a = y.v, o = a.consumers, c = a.failedProducers, o.forEach(u(this, wh)[wh].bind(this)), c != null && c.length && (this.logger.error("Failed to create consumers for producers", { producers: c }), l = c.filter(function(k) {
23740
- var b = k.errorCode, T = k.producerId;
23739
+ a = k.v, o = a.consumers, c = a.failedProducers, o.forEach(u(this, wh)[wh].bind(this)), c != null && c.length && (this.logger.error("Failed to create consumers for producers", { producers: c }), l = c.filter(function(y) {
23740
+ var b = y.errorCode, T = y.producerId;
23741
23741
  return b === "not_found_track_error" ? (r.logger.error("Track not found for producer: ".concat(T, ". This will not be retried.")), !1) : b === "backend_error" ? (r.logger.error("Unrecoverable error: backend error"), !1) : !0;
23742
- }), u(this, Qr)[Qr] = u(this, Qr)[Qr].concat(l), u(this, Ls)[Ls] = setTimeout(u(this, Gu)[Gu].bind(this), e)), y.n = 6;
23742
+ }), u(this, Qr)[Qr] = u(this, Qr)[Qr].concat(l), u(this, Ls)[Ls] = setTimeout(u(this, Gu)[Gu].bind(this), e)), k.n = 6;
23743
23743
  break;
23744
23744
  case 5:
23745
- if (y.p = 5, g = y.v, d = g instanceof Error ? g : new Error(String(g)), this.logger.error("failed to consume on transport", { error: d }), p = RO(d), v = p.errorCode, f = p.errorDescription, !(v === "internal_error" && f === "Backend error" || v === "invalid_session_description")) {
23746
- y.n = 6;
23745
+ if (k.p = 5, g = k.v, d = g instanceof Error ? g : new Error(String(g)), this.logger.error("failed to consume on transport", { error: d }), p = RO(d), v = p.errorCode, f = p.errorDescription, !(v === "internal_error" && f === "Backend error" || v === "invalid_session_description")) {
23746
+ k.n = 6;
23747
23747
  break;
23748
23748
  }
23749
23749
  this.logger.error("Irrecoverable error, closing current recvTransport to create a new one", { transport: this.recvTransport, error: { code: v, message: f } });
23750
23750
  try {
23751
23751
  this.stopTransports({ recv: !0 });
23752
- } catch (k) {
23752
+ } catch (y) {
23753
23753
  }
23754
- return y.n = 6, this.setupTransports({ recv: !0 });
23754
+ return k.n = 6, this.setupTransports({ recv: !0 });
23755
23755
  case 6:
23756
- return y.a(2);
23756
+ return k.a(2);
23757
23757
  }
23758
23758
  }, s, this, [[2, 5]]);
23759
23759
  })), bh.apply(this, arguments);
@@ -23838,8 +23838,8 @@ function DO(s) {
23838
23838
  }
23839
23839
  var bu = /* @__PURE__ */ w("zeroCrossingThreshold"), Pu = /* @__PURE__ */ w("minVoiceDuration"), Su = /* @__PURE__ */ w("hangoverFrames"), Ss = /* @__PURE__ */ w("initialEnergyThreshold"), $s = /* @__PURE__ */ w("noiseAdaptationRate"), js = /* @__PURE__ */ w("voiceAdaptationRate"), Ju = /* @__PURE__ */ w("minEnergyThreshold"), Ku = /* @__PURE__ */ w("maxEnergyThreshold"), Es = /* @__PURE__ */ w("energyRatioThreshold"), At = /* @__PURE__ */ w("currentEnergyThreshold"), or = /* @__PURE__ */ w("backgroundNoiseEnergy"), ar = /* @__PURE__ */ w("voiceDetected"), Ri = /* @__PURE__ */ w("consecutiveVoiceFrames"), _i = /* @__PURE__ */ w("hangoverCount"), zr = /* @__PURE__ */ w("noiseEnergyHistory"), zu = /* @__PURE__ */ w("noiseHistorySize"), Rd = /* @__PURE__ */ w("updateEnergyThreshold"), _d = /* @__PURE__ */ w("updateNoiseEstimate"), Sh = /* @__PURE__ */ w("calculateEnergy"), Eh = /* @__PURE__ */ w("calculateZeroCrossingRate"), wp = /* @__PURE__ */ function() {
23840
23840
  function s() {
23841
- var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = r.initialEnergyThreshold, t = e === void 0 ? 0.015 : e, n = r.zeroCrossingThreshold, i = n === void 0 ? 20 : n, a = r.minVoiceDuration, o = a === void 0 ? 3 : a, c = r.hangoverFrames, l = c === void 0 ? 5 : c, d = r.noiseAdaptationRate, p = d === void 0 ? 0.95 : d, v = r.voiceAdaptationRate, f = v === void 0 ? 0.99 : v, g = r.minEnergyThreshold, y = g === void 0 ? 5e-3 : g, k = r.maxEnergyThreshold, b = k === void 0 ? 0.2 : k, T = r.energyRatioThreshold, E = T === void 0 ? 1.5 : T, I = r.noiseHistorySize, M = I === void 0 ? 50 : I;
23842
- P(this, s), Object.defineProperty(this, _d, { value: NO }), Object.defineProperty(this, Rd, { value: LO }), Object.defineProperty(this, bu, { writable: !0, value: void 0 }), Object.defineProperty(this, Pu, { writable: !0, value: void 0 }), Object.defineProperty(this, Su, { writable: !0, value: void 0 }), Object.defineProperty(this, Ss, { writable: !0, value: void 0 }), Object.defineProperty(this, $s, { writable: !0, value: void 0 }), Object.defineProperty(this, js, { writable: !0, value: void 0 }), Object.defineProperty(this, Ju, { writable: !0, value: void 0 }), Object.defineProperty(this, Ku, { writable: !0, value: void 0 }), Object.defineProperty(this, Es, { writable: !0, value: void 0 }), Object.defineProperty(this, At, { writable: !0, value: void 0 }), Object.defineProperty(this, or, { writable: !0, value: void 0 }), Object.defineProperty(this, ar, { writable: !0, value: !1 }), Object.defineProperty(this, Ri, { writable: !0, value: 0 }), Object.defineProperty(this, _i, { writable: !0, value: 0 }), Object.defineProperty(this, zr, { writable: !0, value: [] }), Object.defineProperty(this, zu, { writable: !0, value: void 0 }), u(this, Ss)[Ss] = t, u(this, At)[At] = t, u(this, bu)[bu] = i, u(this, Pu)[Pu] = o, u(this, Su)[Su] = l, u(this, $s)[$s] = p, u(this, js)[js] = f, u(this, Ju)[Ju] = y, u(this, Ku)[Ku] = b, u(this, Es)[Es] = E, u(this, zu)[zu] = M, u(this, or)[or] = t / 2;
23841
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = r.initialEnergyThreshold, t = e === void 0 ? 0.015 : e, n = r.zeroCrossingThreshold, i = n === void 0 ? 20 : n, a = r.minVoiceDuration, o = a === void 0 ? 3 : a, c = r.hangoverFrames, l = c === void 0 ? 5 : c, d = r.noiseAdaptationRate, p = d === void 0 ? 0.95 : d, v = r.voiceAdaptationRate, f = v === void 0 ? 0.99 : v, g = r.minEnergyThreshold, k = g === void 0 ? 5e-3 : g, y = r.maxEnergyThreshold, b = y === void 0 ? 0.2 : y, T = r.energyRatioThreshold, E = T === void 0 ? 1.5 : T, I = r.noiseHistorySize, M = I === void 0 ? 50 : I;
23842
+ P(this, s), Object.defineProperty(this, _d, { value: NO }), Object.defineProperty(this, Rd, { value: LO }), Object.defineProperty(this, bu, { writable: !0, value: void 0 }), Object.defineProperty(this, Pu, { writable: !0, value: void 0 }), Object.defineProperty(this, Su, { writable: !0, value: void 0 }), Object.defineProperty(this, Ss, { writable: !0, value: void 0 }), Object.defineProperty(this, $s, { writable: !0, value: void 0 }), Object.defineProperty(this, js, { writable: !0, value: void 0 }), Object.defineProperty(this, Ju, { writable: !0, value: void 0 }), Object.defineProperty(this, Ku, { writable: !0, value: void 0 }), Object.defineProperty(this, Es, { writable: !0, value: void 0 }), Object.defineProperty(this, At, { writable: !0, value: void 0 }), Object.defineProperty(this, or, { writable: !0, value: void 0 }), Object.defineProperty(this, ar, { writable: !0, value: !1 }), Object.defineProperty(this, Ri, { writable: !0, value: 0 }), Object.defineProperty(this, _i, { writable: !0, value: 0 }), Object.defineProperty(this, zr, { writable: !0, value: [] }), Object.defineProperty(this, zu, { writable: !0, value: void 0 }), u(this, Ss)[Ss] = t, u(this, At)[At] = t, u(this, bu)[bu] = i, u(this, Pu)[Pu] = o, u(this, Su)[Su] = l, u(this, $s)[$s] = p, u(this, js)[js] = f, u(this, Ju)[Ju] = k, u(this, Ku)[Ku] = b, u(this, Es)[Es] = E, u(this, zu)[zu] = M, u(this, or)[or] = t / 2;
23843
23843
  }
23844
23844
  return S(s, [{
23845
23845
  key: "voiceDetected",
@@ -24038,7 +24038,7 @@ function WO(s) {
24038
24038
  }
24039
24039
  Object.defineProperty(Wl, Rh, { value: WO });
24040
24040
  Object.defineProperty(Wl, vc, { value: BO });
24041
- var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = function(r, e, t, n) {
24041
+ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, it = function(r, e, t, n) {
24042
24042
  for (var i = n > 1 ? void 0 : n ? JO(e, t) : e, a = r.length - 1, o; a >= 0; a--)
24043
24043
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
24044
24044
  return n && i && GO(e, t, i), i;
@@ -24254,7 +24254,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24254
24254
  return e;
24255
24255
  }() }, { key: "_shareWebcam", value: function() {
24256
24256
  var r = m(/* @__PURE__ */ h().m(function t(n) {
24257
- var i, a, o = this, c, l, d, p, v, f, g, y, k, b;
24257
+ var i, a, o = this, c, l, d, p, v, f, g, k, y, b;
24258
24258
  return h().w(function(T) {
24259
24259
  for (; ; )
24260
24260
  switch (T.n) {
@@ -24283,9 +24283,9 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24283
24283
  case 5:
24284
24284
  return T.a(2, this._shareWebcam(n));
24285
24285
  case 6:
24286
- return v = u(this, Dd)[Dd](n), f = kc(this.context, "disableSimulcast"), g = (i = this.context) === null || i === void 0 || (i = i.getValue("overrides")) === null || i === void 0 ? void 0 : i.simulcastConfig, y = f || g && g.disable || !((a = this.context) !== null && a !== void 0 && (a = a.getValue("theme")) !== null && a !== void 0 && a.isSimulcastEnabled), y ? this.logger.info("Simulcast disabled for webcam producer, SFU: CF") : (this.logger.info("Simulcast enabled for SFU: CF"), v.encodings = bI(this.context, n), this.logger.info("Simulcast encodings: ".concat(JSON.stringify(v.encodings)))), k = function() {
24286
+ return v = u(this, Dd)[Dd](n), f = kc(this.context, "disableSimulcast"), g = (i = this.context) === null || i === void 0 || (i = i.getValue("overrides")) === null || i === void 0 ? void 0 : i.simulcastConfig, k = f || g && g.disable || !((a = this.context) !== null && a !== void 0 && (a = a.getValue("theme")) !== null && a !== void 0 && a.isSimulcastEnabled), k ? this.logger.info("Simulcast disabled for webcam producer, SFU: CF") : (this.logger.info("Simulcast enabled for SFU: CF"), v.encodings = bI(this.context, n), this.logger.info("Simulcast encodings: ".concat(JSON.stringify(v.encodings)))), y = function() {
24287
24287
  o.logger.info("Disabling video due to the producer closure"), u(o, kt)[kt].delete(c);
24288
- }, b = u(this, B)[B].createProducer(v, k), u(this, Mi)[Mi](c, b.then(function(E) {
24288
+ }, b = u(this, B)[B].createProducer(v, y), u(this, Mi)[Mi](c, b.then(function(E) {
24289
24289
  return E.id;
24290
24290
  })), T.a(2, b.then(function(E) {
24291
24291
  return E.track;
@@ -24319,7 +24319,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24319
24319
  return e;
24320
24320
  }() }, { key: "shareScreen", value: function() {
24321
24321
  var r = m(/* @__PURE__ */ h().m(function t(n) {
24322
- var i = this, a, o, c, l, d, p, v, f, g, y, k, b, T;
24322
+ var i = this, a, o, c, l, d, p, v, f, g, k, y, b, T;
24323
24323
  return h().w(function(E) {
24324
24324
  for (; ; )
24325
24325
  switch (E.n) {
@@ -24336,10 +24336,10 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24336
24336
  case 3:
24337
24337
  return l = E.v, d = u(this, B)[B].producers.get(c), p = u(this, B)[B].producers.get(l), v = [], d && !d.closed ? v.push(d.replaceTrack({ track: a })) : (f = { track: a, codecOptions: [{ name: "VP8" }], appData: { screenShare: !0, e2ee: this.e2ee, supportsRemoteControl: wt.isElectron() }, stopTracks: !1 }, g = function() {
24338
24338
  i.logger.info("Disabling screenShare due to the producer closure"), u(i, kt)[kt].delete(Pt.SCREENSHARE_VIDEO), u(i, kt)[kt].delete(Pt.SCREENSHARE_AUDIO);
24339
- }, y = u(this, B)[B].createProducer(f, g), u(this, Mi)[Mi](Pt.SCREENSHARE_VIDEO, y.then(function(I) {
24339
+ }, k = u(this, B)[B].createProducer(f, g), u(this, Mi)[Mi](Pt.SCREENSHARE_VIDEO, k.then(function(I) {
24340
24340
  return I.id;
24341
- })), v.push(y)), o && (p && !p.closed ? v.push(p.replaceTrack({ track: o })) : (k = { track: o, codecOptions: [{ name: "opus" }], appData: { screenShare: !0, e2ee: this.e2ee, supportsRemoteControl: wt.isElectron() }, stopTracks: !1, zeroRtpOnPause: !1 }, b = function() {
24342
- }, T = u(this, B)[B].createProducer(k, b), u(this, Mi)[Mi](Pt.SCREENSHARE_AUDIO, T.then(function(I) {
24341
+ })), v.push(k)), o && (p && !p.closed ? v.push(p.replaceTrack({ track: o })) : (y = { track: o, codecOptions: [{ name: "opus" }], appData: { screenShare: !0, e2ee: this.e2ee, supportsRemoteControl: wt.isElectron() }, stopTracks: !1, zeroRtpOnPause: !1 }, b = function() {
24342
+ }, T = u(this, B)[B].createProducer(y, b), u(this, Mi)[Mi](Pt.SCREENSHARE_AUDIO, T.then(function(I) {
24343
24343
  return I.id;
24344
24344
  })), v.push(T))), E.n = 4, Promise.all(v);
24345
24345
  case 4:
@@ -24849,13 +24849,13 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24849
24849
  var o = a.payload;
24850
24850
  if (n.mediaJoined)
24851
24851
  try {
24852
- var c = Sv.fromBinary(o), l = c.participantId, d = c.initiatorParticipantId, p = c.producerState, v = p.kind, f = p.pause, g = p.producerId, y = p.screenShare;
24853
- if (y)
24852
+ var c = Sv.fromBinary(o), l = c.participantId, d = c.initiatorParticipantId, p = c.producerState, v = p.kind, f = p.pause, g = p.producerId, k = p.screenShare;
24853
+ if (k)
24854
24854
  return;
24855
- var k = v === li.AUDIO ? "audio" : "video";
24856
- if (n.logger.info("Received participant ".concat(k, " producer ").concat(f ? "paused" : "resumed", " broadcast for ").concat(l === n.peerId ? "local" : "remote", " producer ").concat(g, " of peer ").concat(l, ". payload: ").concat(Sv.toJsonString(c))), l === n.peerId && d !== n.peerId && f && (n.logger.info("".concat(d ? "Remote peer ".concat(d) : "Kick/Kick-all api", " has paused the ").concat(k === "audio" ? "audio" : "video", " feed of local peer ").concat(n.peerId, ". Reconciling the local state.")), n.context.getValue("peerSessionStore").emit(k === "audio" ? $.MUTE_SELF : $.MUTE_SELF_VIDEO)), l === n.peerId)
24855
+ var y = v === li.AUDIO ? "audio" : "video";
24856
+ if (n.logger.info("Received participant ".concat(y, " producer ").concat(f ? "paused" : "resumed", " broadcast for ").concat(l === n.peerId ? "local" : "remote", " producer ").concat(g, " of peer ").concat(l, ". payload: ").concat(Sv.toJsonString(c))), l === n.peerId && d !== n.peerId && f && (n.logger.info("".concat(d ? "Remote peer ".concat(d) : "Kick/Kick-all api", " has paused the ").concat(y === "audio" ? "audio" : "video", " feed of local peer ").concat(n.peerId, ". Reconciling the local state.")), n.context.getValue("peerSessionStore").emit(y === "audio" ? $.MUTE_SELF : $.MUTE_SELF_VIDEO)), l === n.peerId)
24857
24857
  return;
24858
- n.context.getValue("peerSessionStore").emit($.PRODUCER_TOGGLE, { peerId: l, producerId: g, paused: f, kind: k });
24858
+ n.context.getValue("peerSessionStore").emit($.PRODUCER_TOGGLE, { peerId: l, producerId: g, paused: f, kind: y });
24859
24859
  var b = Array.from(n.getConsumers().values()).filter(function(T) {
24860
24860
  return T.producerId === g;
24861
24861
  });
@@ -24948,30 +24948,30 @@ function QO(s, r, e, t) {
24948
24948
  function Dh() {
24949
24949
  return Dh = m(/* @__PURE__ */ h().m(function s(r, e, t, n) {
24950
24950
  var i, a, o, c, l, d, p, v, f, g;
24951
- return h().w(function(y) {
24951
+ return h().w(function(k) {
24952
24952
  for (; ; )
24953
- switch (y.p = y.n) {
24953
+ switch (k.p = k.n) {
24954
24954
  case 0:
24955
- if (u(this, Xu)[Xu] = r, i = !1, t && (o = (a = u(this, Jr)[Jr].mediaState) !== null && a !== void 0 ? a : {}, c = o.recv, l = o.send, d = (l == null ? void 0 : l.state) === fn.CONNECTED && (c == null ? void 0 : c.state) === fn.CONNECTED, d ? (this.logger.info("MediaNodeClient.joinRoom: transports healthy — preserving all producers for ownership handover"), u(this, Bt)[Bt] = null, i = !0) : (this.logger.info("MediaNodeClient.joinRoom: transports unhealthy — full reset"), this.reset({ resetTransportQueue: !1 }))), y.p = 1, !u(this, Bt)[Bt]) {
24956
- y.n = 3;
24955
+ if (u(this, Xu)[Xu] = r, i = !1, t && (o = (a = u(this, Jr)[Jr].mediaState) !== null && a !== void 0 ? a : {}, c = o.recv, l = o.send, d = (l == null ? void 0 : l.state) === fn.CONNECTED && (c == null ? void 0 : c.state) === fn.CONNECTED, d ? (this.logger.info("MediaNodeClient.joinRoom: transports healthy — preserving all producers for ownership handover"), u(this, Bt)[Bt] = null, i = !0) : (this.logger.info("MediaNodeClient.joinRoom: transports unhealthy — full reset"), this.reset({ resetTransportQueue: !1 }))), k.p = 1, !u(this, Bt)[Bt]) {
24956
+ k.n = 3;
24957
24957
  break;
24958
24958
  }
24959
- return y.n = 2, u(this, Bt)[Bt];
24959
+ return k.n = 2, u(this, Bt)[Bt];
24960
24960
  case 2:
24961
- y.n = 4;
24961
+ k.n = 4;
24962
24962
  break;
24963
24963
  case 3:
24964
- return y.n = 4, u(this, Zu)[Zu](r, e, t, n, i);
24964
+ return k.n = 4, u(this, Zu)[Zu](r, e, t, n, i);
24965
24965
  case 4:
24966
- return u(this, Ih)[Ih](e), y.n = 5, u(this, Ah)[Ah]();
24966
+ return u(this, Ih)[Ih](e), k.n = 5, u(this, Ah)[Ah]();
24967
24967
  case 5:
24968
- return p = y.v, v = p.joined, f = p.error, y.a(2, { roomJoined: v, error: f });
24968
+ return p = k.v, v = p.joined, f = p.error, k.a(2, { roomJoined: v, error: f });
24969
24969
  case 6:
24970
- return y.p = 6, g = y.v, this.logger.error("Failed to complete room join", { error: g }), y.a(2, { roomJoined: !1, error: g });
24970
+ return k.p = 6, g = k.v, this.logger.error("Failed to complete room join", { error: g }), k.a(2, { roomJoined: !1, error: g });
24971
24971
  case 7:
24972
- return y.p = 7, u(this, Bt)[Bt] = null, y.f(7);
24972
+ return k.p = 7, u(this, Bt)[Bt] = null, k.f(7);
24973
24973
  case 8:
24974
- return y.a(2);
24974
+ return k.a(2);
24975
24975
  }
24976
24976
  }, s, this, [[1, 6, 7, 8]]);
24977
24977
  })), Dh.apply(this, arguments);
@@ -25130,34 +25130,34 @@ function aD(s) {
25130
25130
  function sD(s) {
25131
25131
  return { track: s, codecOptions: [{ name: "VP8" }], appData: { screenShare: !1, e2ee: this.e2ee }, stopTracks: !1 };
25132
25132
  }
25133
- nt([D.trace("MediaNodeClient.reset")], Ze.prototype, "reset", 1);
25134
- nt([D.trace("MediaNodeClient.joinRoom")], Ze.prototype, "joinRoom", 1);
25135
- nt([D.trace("MediaNodeClient.leaveRoom")], Ze.prototype, "leaveRoom", 1);
25136
- nt([D.trace("MediaNodeClient.activatePeers")], Ze.prototype, "activatePeers", 1);
25137
- nt([D.trace("MediaNodeClient.createConsumers")], Ze.prototype, "createConsumers", 1);
25138
- nt([D.trace("MediaNodeClient.closeConsumersById")], Ze.prototype, "closeConsumersById", 1);
25139
- nt([D.trace("MediaNodeClient._shareWebcam")], Ze.prototype, "_shareWebcam", 1);
25140
- nt([D.trace("MediaNodeClient.shareWebcam")], Ze.prototype, "shareWebcam", 1);
25141
- nt([D.trace("MediaNodeClient.shareScreen")], Ze.prototype, "shareScreen", 1);
25142
- nt([D.trace("MediaNodeClient.shareMic")], Ze.prototype, "shareMic", 1);
25143
- nt([D.trace("MediaNodeClient.pauseMic")], Ze.prototype, "pauseMic", 1);
25144
- nt([D.trace("MediaNodeClient.pauseWebcam")], Ze.prototype, "pauseWebcam", 1);
25145
- nt([D.trace("MediaNodeClient.resumeMic")], Ze.prototype, "resumeMic", 1);
25146
- nt([D.trace("MediaNodeClient.resumeWebcam")], Ze.prototype, "resumeWebcam", 1);
25147
- nt([D.trace("MediaNodeClient.disableWebcam")], Ze.prototype, "disableWebcam", 1);
25148
- nt([D.trace("MediaNodeClient.disableMic")], Ze.prototype, "disableMic", 1);
25149
- nt([D.trace("MediaNodeClient.disableScreenShare")], Ze.prototype, "disableScreenShare", 1);
25150
- nt([D.trace("MediaNodeClient.muteSelf")], Ze.prototype, "muteSelf", 1);
25151
- nt([D.trace("MediaNodeClient.resetVideoProducers")], Ze.prototype, "resetVideoProducers", 1);
25152
- nt([D.trace("MediaNodeClient.changeDisplayName")], Ze.prototype, "changeDisplayName", 1);
25153
- nt([D.trace("MediaNodeClient.kickPeer")], Ze.prototype, "kick", 1);
25154
- nt([D.trace("MediaNodeClient.kickAllPeers")], Ze.prototype, "kickAll", 1);
25155
- nt([D.trace("MediaNodeClient.muteAll")], Ze.prototype, "muteAll", 1);
25156
- nt([D.trace("MediaNodeClient.muteAllVideo")], Ze.prototype, "muteAllVideo", 1);
25157
- nt([D.trace("MediaNodeClient.disableAudio")], Ze.prototype, "disableAudio", 1);
25158
- nt([D.trace("MediaNodeClient.disableVideo")], Ze.prototype, "disableVideo", 1);
25159
- nt([D.trace("MediaNodeClient.pinPeer")], Ze.prototype, "pinPeer", 1);
25160
- nt([D.trace("MediaNodeClient.validateScreenShare")], Ze.prototype, "validateScreenShare", 1);
25133
+ it([D.trace("MediaNodeClient.reset")], Ze.prototype, "reset", 1);
25134
+ it([D.trace("MediaNodeClient.joinRoom")], Ze.prototype, "joinRoom", 1);
25135
+ it([D.trace("MediaNodeClient.leaveRoom")], Ze.prototype, "leaveRoom", 1);
25136
+ it([D.trace("MediaNodeClient.activatePeers")], Ze.prototype, "activatePeers", 1);
25137
+ it([D.trace("MediaNodeClient.createConsumers")], Ze.prototype, "createConsumers", 1);
25138
+ it([D.trace("MediaNodeClient.closeConsumersById")], Ze.prototype, "closeConsumersById", 1);
25139
+ it([D.trace("MediaNodeClient._shareWebcam")], Ze.prototype, "_shareWebcam", 1);
25140
+ it([D.trace("MediaNodeClient.shareWebcam")], Ze.prototype, "shareWebcam", 1);
25141
+ it([D.trace("MediaNodeClient.shareScreen")], Ze.prototype, "shareScreen", 1);
25142
+ it([D.trace("MediaNodeClient.shareMic")], Ze.prototype, "shareMic", 1);
25143
+ it([D.trace("MediaNodeClient.pauseMic")], Ze.prototype, "pauseMic", 1);
25144
+ it([D.trace("MediaNodeClient.pauseWebcam")], Ze.prototype, "pauseWebcam", 1);
25145
+ it([D.trace("MediaNodeClient.resumeMic")], Ze.prototype, "resumeMic", 1);
25146
+ it([D.trace("MediaNodeClient.resumeWebcam")], Ze.prototype, "resumeWebcam", 1);
25147
+ it([D.trace("MediaNodeClient.disableWebcam")], Ze.prototype, "disableWebcam", 1);
25148
+ it([D.trace("MediaNodeClient.disableMic")], Ze.prototype, "disableMic", 1);
25149
+ it([D.trace("MediaNodeClient.disableScreenShare")], Ze.prototype, "disableScreenShare", 1);
25150
+ it([D.trace("MediaNodeClient.muteSelf")], Ze.prototype, "muteSelf", 1);
25151
+ it([D.trace("MediaNodeClient.resetVideoProducers")], Ze.prototype, "resetVideoProducers", 1);
25152
+ it([D.trace("MediaNodeClient.changeDisplayName")], Ze.prototype, "changeDisplayName", 1);
25153
+ it([D.trace("MediaNodeClient.kickPeer")], Ze.prototype, "kick", 1);
25154
+ it([D.trace("MediaNodeClient.kickAllPeers")], Ze.prototype, "kickAll", 1);
25155
+ it([D.trace("MediaNodeClient.muteAll")], Ze.prototype, "muteAll", 1);
25156
+ it([D.trace("MediaNodeClient.muteAllVideo")], Ze.prototype, "muteAllVideo", 1);
25157
+ it([D.trace("MediaNodeClient.disableAudio")], Ze.prototype, "disableAudio", 1);
25158
+ it([D.trace("MediaNodeClient.disableVideo")], Ze.prototype, "disableVideo", 1);
25159
+ it([D.trace("MediaNodeClient.pinPeer")], Ze.prototype, "pinPeer", 1);
25160
+ it([D.trace("MediaNodeClient.validateScreenShare")], Ze.prototype, "validateScreenShare", 1);
25161
25161
  function em(s, r) {
25162
25162
  var e = s.getValue("roomNodeClient");
25163
25163
  if (e) {
@@ -25181,9 +25181,9 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25181
25181
  for (var i = n > 1 ? void 0 : n ? cD(e, t) : e, a = r.length - 1, o; a >= 0; a--)
25182
25182
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
25183
25183
  return n && i && uD(e, t, i), i;
25184
- }, tm = (ha = /* @__PURE__ */ w("socketService"), Gt = /* @__PURE__ */ w("roomSocketHandler"), Z = /* @__PURE__ */ w("context"), ut = /* @__PURE__ */ w("roomNodeClient"), /* @__PURE__ */ function() {
25184
+ }, tm = (ha = /* @__PURE__ */ w("socketService"), Gt = /* @__PURE__ */ w("roomSocketHandler"), Z = /* @__PURE__ */ w("context"), xe = /* @__PURE__ */ w("roomNodeClient"), /* @__PURE__ */ function() {
25185
25185
  function s(r, e, t, n) {
25186
- P(this, s), Object.defineProperty(this, ut, { get: lD, set: void 0 }), this.self = void 0, this.authToken = void 0, Object.defineProperty(this, ha, { writable: !0, value: void 0 }), this.viewType = void 0, Object.defineProperty(this, Gt, { writable: !0, value: void 0 }), Object.defineProperty(this, Z, { writable: !0, value: void 0 });
25186
+ P(this, s), Object.defineProperty(this, xe, { get: lD, set: void 0 }), this.self = void 0, this.authToken = void 0, Object.defineProperty(this, ha, { writable: !0, value: void 0 }), this.viewType = void 0, Object.defineProperty(this, Gt, { writable: !0, value: void 0 }), Object.defineProperty(this, Z, { writable: !0, value: void 0 });
25187
25187
  var i = t.socket, a = r.getValue("authToken");
25188
25188
  this.self = e, u(this, Z)[Z] = r, this.viewType = n, this.authToken = a, u(this, ha)[ha] = i, u(this, Gt)[Gt] = t, this.setupEvents();
25189
25189
  }
@@ -25210,7 +25210,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25210
25210
  return u(this, Z)[Z].getValue("connectionHandler").mediaJoined;
25211
25211
  } }, { key: "shareMediaTracks", value: function() {
25212
25212
  var r = m(/* @__PURE__ */ h().m(function t() {
25213
- var n, i, a, o, c, l, d, p, v, f, g, y, k, b;
25213
+ var n, i, a, o, c, l, d, p, v, f, g, k, y, b;
25214
25214
  return h().w(function(T) {
25215
25215
  for (; ; )
25216
25216
  switch (T.p = T.n) {
@@ -25223,12 +25223,12 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25223
25223
  T.n = 5;
25224
25224
  break;
25225
25225
  }
25226
- return T.p = 1, T.n = 2, u(this, ut)[ut].shareMic(i);
25226
+ return T.p = 1, T.n = 2, u(this, xe)[xe].shareMic(i);
25227
25227
  case 2:
25228
- this.self.audioEnabled || u(this, ut)[ut].pauseMic(), T.n = 4;
25228
+ this.self.audioEnabled || u(this, xe)[xe].pauseMic(), T.n = 4;
25229
25229
  break;
25230
25230
  case 3:
25231
- T.p = 3, y = T.v, this.self.disableAudio();
25231
+ T.p = 3, k = T.v, this.self.disableAudio();
25232
25232
  case 4:
25233
25233
  T.n = 6;
25234
25234
  break;
@@ -25243,12 +25243,12 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25243
25243
  T.n = 11;
25244
25244
  break;
25245
25245
  }
25246
- return T.p = 7, T.n = 8, u(this, ut)[ut].shareWebcam(a);
25246
+ return T.p = 7, T.n = 8, u(this, xe)[xe].shareWebcam(a);
25247
25247
  case 8:
25248
- this.self.videoEnabled || u(this, ut)[ut].pauseWebcam(), T.n = 10;
25248
+ this.self.videoEnabled || u(this, xe)[xe].pauseWebcam(), T.n = 10;
25249
25249
  break;
25250
25250
  case 9:
25251
- T.p = 9, k = T.v, this.self.disableVideo();
25251
+ T.p = 9, y = T.v, this.self.disableVideo();
25252
25252
  case 10:
25253
25253
  T.n = 12;
25254
25254
  break;
@@ -25263,7 +25263,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25263
25263
  T.n = 17;
25264
25264
  break;
25265
25265
  }
25266
- return T.p = 13, T.n = 14, (g = u(this, ut)[ut]) === null || g === void 0 ? void 0 : g.shareScreen({ video: v, audio: (f == null ? void 0 : f.readyState) === "live" ? f : void 0 });
25266
+ return T.p = 13, T.n = 14, (g = u(this, xe)[xe]) === null || g === void 0 ? void 0 : g.shareScreen({ video: v, audio: (f == null ? void 0 : f.readyState) === "live" ? f : void 0 });
25267
25267
  case 14:
25268
25268
  T.n = 16;
25269
25269
  break;
@@ -25336,7 +25336,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25336
25336
  c.n = 3;
25337
25337
  break;
25338
25338
  case 2:
25339
- this.logger.info("Resetting Self post reconnect. User never joined the room so doing full reset."), (o = u(this, ut)[ut]) === null || o === void 0 || o.reset({ resetTransportQueue: !0 });
25339
+ this.logger.info("Resetting Self post reconnect. User never joined the room so doing full reset."), (o = u(this, xe)[xe]) === null || o === void 0 || o.reset({ resetTransportQueue: !0 });
25340
25340
  case 3:
25341
25341
  return c.a(2);
25342
25342
  }
@@ -25471,36 +25471,36 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25471
25471
  return e;
25472
25472
  }() }, { key: "joinRoom", value: function() {
25473
25473
  var r = m(/* @__PURE__ */ h().m(function t() {
25474
- var n, i, a, o, c, l, d, p, v = arguments, f, g;
25474
+ var n, i, a, o, c, l, d, p, v, f = arguments, g, k;
25475
25475
  return h().w(function(y) {
25476
25476
  for (; ; )
25477
25477
  switch (y.p = y.n) {
25478
25478
  case 0:
25479
- return n = v.length > 0 && v[0] !== void 0 ? v[0] : {}, i = n.reconnected, a = i === void 0 ? !1 : i, o = n.joinAttempts, y.p = 1, this.logger.info("Local peer is joining socket room."), y.n = 2, this.joinSocketRoomWithRetry();
25479
+ return n = f.length > 0 && f[0] !== void 0 ? f[0] : {}, i = n.reconnected, a = i === void 0 ? !1 : i, o = n.joinAttempts, y.p = 1, this.logger.info("Local peer is joining socket room."), y.n = 2, this.joinSocketRoomWithRetry();
25480
25480
  case 2:
25481
25481
  if (c = y.v, l = c.peer, this.logger.info("Local peer has joined socket room."), u(this, Gt)[Gt].socket.flush(), d = gp(l.stageType), u(this, Z)[Z].setValue("stageStatus", d, !1), !l.waitlisted) {
25482
25482
  y.n = 3;
25483
25483
  break;
25484
25484
  }
25485
- return this.logger.info("Peer was waitlisted. Skipped joining media room."), this.waitlistedHandler(), y.a(2);
25485
+ return this.logger.info("Peer was waitlisted. Skipped joining media room."), a && (this.logger.info("Peer reconnected while waitlisted. Resetting media node client."), (p = u(this, xe)[xe]) === null || p === void 0 || p.reset({ resetTransportQueue: !0 })), this.waitlistedHandler(), y.a(2);
25486
25486
  case 3:
25487
25487
  y.n = 5;
25488
25488
  break;
25489
25489
  case 4:
25490
- throw y.p = 4, f = y.v, this.logger.error("SelfController.joinRoom: socket join failed", { error: f }), new j("Check the network and try again.", "0002");
25490
+ throw y.p = 4, g = y.v, this.logger.error("SelfController.joinRoom: socket join failed", { error: g }), new j("Check the network and try again.", "0002");
25491
25491
  case 5:
25492
25492
  if (!(this.viewType === jn.Livestream && o !== null && o !== void 0 && o.wasSocketJoinAttempted && !o.wasMediaJoinAttempted && u(this, Z)[Z].getValue("stageStatus") !== "ON_STAGE")) {
25493
25493
  y.n = 6;
25494
25494
  break;
25495
25495
  }
25496
- return this.logger.info("Local livestream peer that only joined the socket room is not ON_STAGE. Closing transports, if any."), (p = u(this, ut)[ut]) === null || p === void 0 || p.reset({ resetTransportQueue: !0 }), this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: a }), u(this, Z)[Z].notify("stageStatus"), y.a(2);
25496
+ return this.logger.info("Local livestream peer that only joined the socket room is not ON_STAGE. Closing transports, if any."), (v = u(this, xe)[xe]) === null || v === void 0 || v.reset({ resetTransportQueue: !0 }), this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: a }), u(this, Z)[Z].notify("stageStatus"), y.a(2);
25497
25497
  case 6:
25498
25498
  return y.p = 6, this.logger.info("Local peer is joining media room."), y.n = 7, this.joinMediaRoom(a);
25499
25499
  case 7:
25500
25500
  this.logger.info("Local peer has joined media room."), u(this, Z)[Z].notify("stageStatus"), y.n = 10;
25501
25501
  break;
25502
25502
  case 8:
25503
- if (y.p = 8, g = y.v, this.logger.error("SelfController.joinRoom: media room join failed", { error: g }), !(g instanceof Ia && g.message === "ice connection failed")) {
25503
+ if (y.p = 8, k = y.v, this.logger.error("SelfController.joinRoom: media room join failed", { error: k }), !(k instanceof Ia && k.message === "ice connection failed")) {
25504
25504
  y.n = 9;
25505
25505
  break;
25506
25506
  }
@@ -25549,7 +25549,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25549
25549
  return e;
25550
25550
  }() }, { key: "joinMediaRoom", value: function() {
25551
25551
  var r = m(/* @__PURE__ */ h().m(function t() {
25552
- var n, i, a, o, c, l, d, p, v, f, g, y, k, b, T, E = arguments, I, M, _, O;
25552
+ var n, i, a, o, c, l, d, p, v, f, g, k, y, b, T, E = arguments, I, M, _, O;
25553
25553
  return h().w(function(L) {
25554
25554
  for (; ; )
25555
25555
  switch (L.p = L.n) {
@@ -25566,7 +25566,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25566
25566
  case 2:
25567
25567
  em(u(this, Z)[Z], { socket: u(this, ha)[ha], peerId: a });
25568
25568
  case 3:
25569
- return v = this.self.permissions, f = v.canProduceAudio, g = v.canProduceVideo, y = v.canProduceScreenshare, L.n = 4, (p = u(this, ut)[ut]) === null || p === void 0 ? void 0 : p.joinRoom(this.self.name, c, n, { canProduceAudio: f, canProduceVideo: g, canProduceScreenshare: y });
25569
+ return v = this.self.permissions, f = v.canProduceAudio, g = v.canProduceVideo, k = v.canProduceScreenshare, L.n = 4, (p = u(this, xe)[xe]) === null || p === void 0 ? void 0 : p.joinRoom(this.self.name, c, n, { canProduceAudio: f, canProduceVideo: g, canProduceScreenshare: k });
25570
25570
  case 4:
25571
25571
  if (M = d = L.v, I = M !== null, !I) {
25572
25572
  L.n = 5;
@@ -25583,7 +25583,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25583
25583
  case 6:
25584
25584
  _ = {};
25585
25585
  case 7:
25586
- if (k = _, b = k.roomJoined, T = k.error, b) {
25586
+ if (y = _, b = y.roomJoined, T = y.error, b) {
25587
25587
  L.n = 8;
25588
25588
  break;
25589
25589
  }
@@ -25627,17 +25627,17 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25627
25627
  }
25628
25628
  return a.a(2);
25629
25629
  case 2:
25630
- if (u(this, ut)[ut]) {
25630
+ if (u(this, xe)[xe]) {
25631
25631
  a.n = 3;
25632
25632
  break;
25633
25633
  }
25634
25634
  return a.a(2);
25635
25635
  case 3:
25636
- if (!(u(this, ut)[ut].mediaJoined && n !== "disconnected")) {
25636
+ if (!(u(this, xe)[xe].mediaJoined && n !== "disconnected")) {
25637
25637
  a.n = 4;
25638
25638
  break;
25639
25639
  }
25640
- return a.n = 4, u(this, ut)[ut].leaveRoom();
25640
+ return a.n = 4, u(this, xe)[xe].leaveRoom();
25641
25641
  case 4:
25642
25642
  if (!(n === "stageLeft" && i === jn.Livestream)) {
25643
25643
  a.n = 5;
@@ -25645,7 +25645,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25645
25645
  }
25646
25646
  return a.a(2);
25647
25647
  case 5:
25648
- u(this, ut)[ut].mediaJoined = !1;
25648
+ u(this, xe)[xe].mediaJoined = !1;
25649
25649
  case 6:
25650
25650
  return a.a(2);
25651
25651
  }
@@ -25686,19 +25686,19 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25686
25686
  case 0:
25687
25687
  return l = Zr(), d = !!n.getValue("cachedUserDetails"), g.n = 1, rr.__init__(n, a, o, c, c.name, d);
25688
25688
  case 1:
25689
- return p = g.v, n.setValue("self", p), v = n.getValue("logger"), navigator.product !== "ReactNative" ? (f = !0, setTimeout(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function y() {
25690
- var k, b, T, E, I, M, _, O, L, q, X, Y, H;
25689
+ return p = g.v, n.setValue("self", p), v = n.getValue("logger"), navigator.product !== "ReactNative" ? (f = !0, setTimeout(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function k() {
25690
+ var y, b, T, E, I, M, _, O, L, q, X, Y, H;
25691
25691
  return h().w(function(J) {
25692
25692
  for (; ; )
25693
25693
  switch (J.p = J.n) {
25694
25694
  case 0:
25695
25695
  return J.n = 1, p.getAllDevices();
25696
25696
  case 1:
25697
- return k = J.v, v.info("populated_full_device_list", { devices: JSON.stringify(k) }), n.getValue("callstats").devices("AUDIO", k == null ? void 0 : k.filter(function(N) {
25697
+ return y = J.v, v.info("populated_full_device_list", { devices: JSON.stringify(y) }), n.getValue("callstats").devices("AUDIO", y == null ? void 0 : y.filter(function(N) {
25698
25698
  return N.kind === "audioinput";
25699
- })), n.getValue("callstats").devices("VIDEO", k == null ? void 0 : k.filter(function(N) {
25699
+ })), n.getValue("callstats").devices("VIDEO", y == null ? void 0 : y.filter(function(N) {
25700
25700
  return N.kind === "videoinput";
25701
- })), n.getValue("callstats").devices("SPEAKER", k == null ? void 0 : k.filter(function(N) {
25701
+ })), n.getValue("callstats").devices("SPEAKER", y == null ? void 0 : y.filter(function(N) {
25702
25702
  return N.kind === "audiooutput";
25703
25703
  })), v.info("Callstats:: initializing"), J.p = 2, b = n.getValue("callstats"), T = n.getValue("peerId"), E = wt.getDeviceInfo().engineName, I = n.getValue("env") === "prod" ? "prod" : "devel", J.n = 3, l.getICEServers();
25704
25704
  case 3:
@@ -25711,7 +25711,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25711
25711
  case 6:
25712
25712
  return J.a(2);
25713
25713
  }
25714
- }, y, null, [[2, 5]]);
25714
+ }, k, null, [[2, 5]]);
25715
25715
  })), 0)) : v.info("Callstats:: Skipped initialization due to navigator product being ReactNative."), g.a(2, new tm(n, p, i, c.viewType));
25716
25716
  }
25717
25717
  }, t);
@@ -25874,16 +25874,16 @@ var fD = Object.defineProperty, gD = Object.getOwnPropertyDescriptor, mD = funct
25874
25874
  }
25875
25875
  } }, { key: "joinRoom", value: function() {
25876
25876
  var r = m(/* @__PURE__ */ h().m(function t(n) {
25877
- var i, a, o, c, l, d, p, v, f, g, y, k, b;
25877
+ var i, a, o, c, l, d, p, v, f, g, k, y, b;
25878
25878
  return h().w(function(T) {
25879
25879
  for (; ; )
25880
25880
  switch (T.p = T.n) {
25881
25881
  case 0:
25882
- return this.socket.joinAttempted = !0, a = { capabilities: [], peer: { displayName: (i = n.name) !== null && i !== void 0 ? i : "Participant", customParticipantId: n.customParticipantId, peerId: n.id, userId: n.userId, displayPictureUrl: n.picture, waitlisted: !1 }, roomUuid: "" }, o = this.socket.sendMessagePromise(z.joinRoom, NC.toBinary(a)), T.p = 1, k = wo, T.n = 2, o;
25882
+ return this.socket.joinAttempted = !0, a = { capabilities: [], peer: { displayName: (i = n.name) !== null && i !== void 0 ? i : "Participant", customParticipantId: n.customParticipantId, peerId: n.id, userId: n.userId, displayPictureUrl: n.picture, waitlisted: !1 }, roomUuid: "" }, o = this.socket.sendMessagePromise(z.joinRoom, NC.toBinary(a)), T.p = 1, y = wo, T.n = 2, o;
25883
25883
  case 2:
25884
- return c = k.fromBinary.call(k, T.v.payload), l = c.peer, u(this, Ft)[Ft].getValue("connectionHandler").socketJoined = !0, u(this, Ft)[Ft].getValue("peerSessionStore").emit($.SOCKET_SERVICE_ROOM_JOINED, { peer: l }), d = this.getRoomState(), p = this.getRoomPeersNonPaginated(), T.n = 3, Promise.all([d, p]);
25884
+ return c = y.fromBinary.call(y, T.v.payload), l = c.peer, u(this, Ft)[Ft].getValue("connectionHandler").socketJoined = !0, u(this, Ft)[Ft].getValue("peerSessionStore").emit($.SOCKET_SERVICE_ROOM_JOINED, { peer: l }), d = this.getRoomState(), p = this.getRoomPeersNonPaginated(), T.n = 3, Promise.all([d, p]);
25885
25885
  case 3:
25886
- return v = T.v, f = Ue(v, 2), g = f[0].room, y = f[1].peers, u(this, Ft)[Ft].getValue("peerSessionStore").emit($.ROOM_STATE, g), u(this, Ft)[Ft].getValue("peerSessionStore").emit($.SOCKET_PEERS, y), T.a(2, { peer: l });
25886
+ return v = T.v, f = Ue(v, 2), g = f[0].room, k = f[1].peers, u(this, Ft)[Ft].getValue("peerSessionStore").emit($.ROOM_STATE, g), u(this, Ft)[Ft].getValue("peerSessionStore").emit($.SOCKET_PEERS, k), T.a(2, { peer: l });
25887
25887
  case 4:
25888
25888
  throw T.p = 4, b = T.v, this.logger.error("RoomSocketHandler.joinRoom.failed", { error: b }), b;
25889
25889
  case 5:
@@ -26463,7 +26463,7 @@ var Rt = /* @__PURE__ */ w("socket"), yD = /* @__PURE__ */ function() {
26463
26463
  throw TypeError("Cannot " + t);
26464
26464
  }, F = function(r, e, t) {
26465
26465
  return Pp(r, e, "read from private field"), t ? t.call(r) : e.get(r);
26466
- }, xe = function(r, e, t) {
26466
+ }, et = function(r, e, t) {
26467
26467
  if (e.has(r))
26468
26468
  throw TypeError("Cannot add the same private member more than once");
26469
26469
  e instanceof WeakSet ? e.add(r) : e.set(r, t);
@@ -26489,42 +26489,42 @@ function SD(s) {
26489
26489
  var nm = Number.isNaN || function(s) {
26490
26490
  return s !== s;
26491
26491
  };
26492
- function rt() {
26493
- rt.init.call(this);
26492
+ function nt() {
26493
+ nt.init.call(this);
26494
26494
  }
26495
- PD.exports = rt;
26495
+ PD.exports = nt;
26496
26496
  bl.once = _D;
26497
- rt.EventEmitter = rt;
26498
- rt.prototype._events = void 0;
26499
- rt.prototype._eventsCount = 0;
26500
- rt.prototype._maxListeners = void 0;
26497
+ nt.EventEmitter = nt;
26498
+ nt.prototype._events = void 0;
26499
+ nt.prototype._eventsCount = 0;
26500
+ nt.prototype._maxListeners = void 0;
26501
26501
  var Yv = 10;
26502
26502
  function Jl(s) {
26503
26503
  if (typeof s != "function")
26504
26504
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + ye(s));
26505
26505
  }
26506
- Object.defineProperty(rt, "defaultMaxListeners", { enumerable: !0, get: function() {
26506
+ Object.defineProperty(nt, "defaultMaxListeners", { enumerable: !0, get: function() {
26507
26507
  return Yv;
26508
26508
  }, set: function(r) {
26509
26509
  if (typeof r != "number" || r < 0 || nm(r))
26510
26510
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + r + ".");
26511
26511
  Yv = r;
26512
26512
  } });
26513
- rt.init = function() {
26513
+ nt.init = function() {
26514
26514
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
26515
26515
  };
26516
- rt.prototype.setMaxListeners = function(s) {
26516
+ nt.prototype.setMaxListeners = function(s) {
26517
26517
  if (typeof s != "number" || s < 0 || nm(s))
26518
26518
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + s + ".");
26519
26519
  return this._maxListeners = s, this;
26520
26520
  };
26521
26521
  function im(s) {
26522
- return s._maxListeners === void 0 ? rt.defaultMaxListeners : s._maxListeners;
26522
+ return s._maxListeners === void 0 ? nt.defaultMaxListeners : s._maxListeners;
26523
26523
  }
26524
- rt.prototype.getMaxListeners = function() {
26524
+ nt.prototype.getMaxListeners = function() {
26525
26525
  return im(this);
26526
26526
  };
26527
- rt.prototype.emit = function(s) {
26527
+ nt.prototype.emit = function(s) {
26528
26528
  for (var r = [], e = 1; e < arguments.length; e++)
26529
26529
  r.push(arguments[e]);
26530
26530
  var t = s === "error", n = this._events;
@@ -26560,11 +26560,11 @@ function am(s, r, e, t) {
26560
26560
  }
26561
26561
  return s;
26562
26562
  }
26563
- rt.prototype.addListener = function(s, r) {
26563
+ nt.prototype.addListener = function(s, r) {
26564
26564
  return am(this, s, r, !1);
26565
26565
  };
26566
- rt.prototype.on = rt.prototype.addListener;
26567
- rt.prototype.prependListener = function(s, r) {
26566
+ nt.prototype.on = nt.prototype.addListener;
26567
+ nt.prototype.prependListener = function(s, r) {
26568
26568
  return am(this, s, r, !0);
26569
26569
  };
26570
26570
  function ED() {
@@ -26575,13 +26575,13 @@ function sm(s, r, e) {
26575
26575
  var t = { fired: !1, wrapFn: void 0, target: s, type: r, listener: e }, n = ED.bind(t);
26576
26576
  return n.listener = e, t.wrapFn = n, n;
26577
26577
  }
26578
- rt.prototype.once = function(s, r) {
26578
+ nt.prototype.once = function(s, r) {
26579
26579
  return Jl(r), this.on(s, sm(this, s, r)), this;
26580
26580
  };
26581
- rt.prototype.prependOnceListener = function(s, r) {
26581
+ nt.prototype.prependOnceListener = function(s, r) {
26582
26582
  return Jl(r), this.prependListener(s, sm(this, s, r)), this;
26583
26583
  };
26584
- rt.prototype.removeListener = function(s, r) {
26584
+ nt.prototype.removeListener = function(s, r) {
26585
26585
  var e, t, n, i, a;
26586
26586
  if (Jl(r), t = this._events, t === void 0)
26587
26587
  return this;
@@ -26601,8 +26601,8 @@ rt.prototype.removeListener = function(s, r) {
26601
26601
  }
26602
26602
  return this;
26603
26603
  };
26604
- rt.prototype.off = rt.prototype.removeListener;
26605
- rt.prototype.removeAllListeners = function(s) {
26604
+ nt.prototype.off = nt.prototype.removeListener;
26605
+ nt.prototype.removeAllListeners = function(s) {
26606
26606
  var r, e, t;
26607
26607
  if (e = this._events, e === void 0)
26608
26608
  return this;
@@ -26628,16 +26628,16 @@ function om(s, r, e) {
26628
26628
  var n = t[r];
26629
26629
  return n === void 0 ? [] : typeof n == "function" ? e ? [n.listener || n] : [n] : e ? RD(n) : cm(n, n.length);
26630
26630
  }
26631
- rt.prototype.listeners = function(s) {
26631
+ nt.prototype.listeners = function(s) {
26632
26632
  return om(this, s, !0);
26633
26633
  };
26634
- rt.prototype.rawListeners = function(s) {
26634
+ nt.prototype.rawListeners = function(s) {
26635
26635
  return om(this, s, !1);
26636
26636
  };
26637
- rt.listenerCount = function(s, r) {
26637
+ nt.listenerCount = function(s, r) {
26638
26638
  return typeof s.listenerCount == "function" ? s.listenerCount(r) : um.call(s, r);
26639
26639
  };
26640
- rt.prototype.listenerCount = um;
26640
+ nt.prototype.listenerCount = um;
26641
26641
  function um(s) {
26642
26642
  var r = this._events;
26643
26643
  if (r !== void 0) {
@@ -26649,7 +26649,7 @@ function um(s) {
26649
26649
  }
26650
26650
  return 0;
26651
26651
  }
26652
- rt.prototype.eventNames = function() {
26652
+ nt.prototype.eventNames = function() {
26653
26653
  return this._eventsCount > 0 ? Zc(this._events) : [];
26654
26654
  };
26655
26655
  function cm(s, r) {
@@ -26739,7 +26739,7 @@ function MD(s, r) {
26739
26739
  var ga, OD = /* @__PURE__ */ function() {
26740
26740
  function s() {
26741
26741
  var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
26742
- P(this, s), bD(this, "opts"), xe(this, ga, void 0), this.opts = { initialTimeout: r.initialTimeout || 1e3, maxTimeout: r.maxTimeout || 1e4, factor: r.factor || 2 }, qe(this, ga, 0);
26742
+ P(this, s), bD(this, "opts"), et(this, ga, void 0), this.opts = { initialTimeout: r.initialTimeout || 1e3, maxTimeout: r.maxTimeout || 1e4, factor: r.factor || 2 }, qe(this, ga, 0);
26743
26743
  }
26744
26744
  return S(s, [{ key: "wait", value: function() {
26745
26745
  var r = m(/* @__PURE__ */ h().m(function t() {
@@ -26769,7 +26769,7 @@ var ga, OD = /* @__PURE__ */ function() {
26769
26769
  ga = /* @__PURE__ */ new WeakMap();
26770
26770
  var pa = { debug: 0, info: 1, warn: 2, error: 3 }, As, Is, DD = /* @__PURE__ */ function() {
26771
26771
  function s(r) {
26772
- P(this, s), xe(this, As, void 0), xe(this, Is, void 0), qe(this, As, console), qe(this, Is, r);
26772
+ P(this, s), et(this, As, void 0), et(this, Is, void 0), qe(this, As, console), qe(this, Is, r);
26773
26773
  }
26774
26774
  return S(s, [{ key: "debug", value: function() {
26775
26775
  for (var e, t = arguments.length, n = new Array(t), i = 0; i < t; i++)
@@ -26792,12 +26792,12 @@ var pa = { debug: 0, info: 1, warn: 2, error: 3 }, As, Is, DD = /* @__PURE__ */
26792
26792
  As = /* @__PURE__ */ new WeakMap(), Is = /* @__PURE__ */ new WeakMap();
26793
26793
  var hm = /* @__PURE__ */ function(s) {
26794
26794
  return s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s;
26795
- }(hm || {}), Zv = "2", xv = "3", Ot, Po, et, _t, ma, er, qi, Ra, Vn, So, Eo, $i, $h, pm, $u, xc, jh, vm, el, Ld, Pl, Uh, Fh, fm, xu, tl, No, ec, Sl, Hh, Vo, tc, Bh, gm, rc, rl, nc, El, LD = /* @__PURE__ */ function() {
26795
+ }(hm || {}), Zv = "2", xv = "3", Ot, Po, tt, _t, ma, er, qi, Ra, Vn, So, Eo, $i, $h, pm, $u, xc, jh, vm, el, Ld, Pl, Uh, Fh, fm, xu, tl, No, ec, Sl, Hh, Vo, tc, Bh, gm, rc, rl, nc, El, LD = /* @__PURE__ */ function() {
26796
26796
  function s(r, e) {
26797
26797
  var t, n, i, a, o, c, l, d, p, v, f, g;
26798
- P(this, s), xe(this, $h), xe(this, $u), xe(this, jh), xe(this, el), xe(this, Pl), xe(this, Fh), xe(this, xu), xe(this, No), xe(this, Sl), xe(this, Vo), xe(this, Bh), xe(this, rc), xe(this, nc), xe(this, Ot, void 0), xe(this, Po, void 0), xe(this, et, void 0), xe(this, _t, void 0), xe(this, ma, void 0), xe(this, er, void 0), xe(this, qi, void 0), xe(this, Ra, void 0), xe(this, Vn, void 0), xe(this, So, void 0), xe(this, Eo, void 0), xe(this, $i, void 0);
26799
- var y, k, b, T, E, I, M, _, O, L, q;
26800
- qe(this, Po, r), qe(this, ma, []), qe(this, er, new bl()), qe(this, qi, !0), qe(this, Vn, !1), qe(this, et, e != null ? e : {}), (t = (y = F(this, et)).autoReconnect) !== null && t !== void 0 || (y.autoReconnect = !0), (n = (k = F(this, et)).retryConnectionInterval) !== null && n !== void 0 || (k.retryConnectionInterval = 1e3), (i = (b = F(this, et)).pingTimeout) !== null && i !== void 0 || (b.pingTimeout = 3e4), (a = (T = F(this, et)).connectionTimeout) !== null && a !== void 0 || (T.connectionTimeout = 5e3), (o = (E = F(this, et)).debug) !== null && o !== void 0 || (E.debug = !0), (c = (I = F(this, et)).maxReconnectionAttempts) !== null && c !== void 0 || (I.maxReconnectionAttempts = 10), (l = (M = F(this, et)).disconnectOnPingTimeout) !== null && l !== void 0 || (M.disconnectOnPingTimeout = !0), (d = (_ = F(this, et)).queueOnDisconnect) !== null && d !== void 0 || (_.queueOnDisconnect = !1), (p = (O = F(this, et)).flushOnReconnect) !== null && p !== void 0 || (O.flushOnReconnect = !1), (v = (L = F(this, et)).clientInitiatedPings) !== null && v !== void 0 || (L.clientInitiatedPings = !1), (f = (q = F(this, et)).clientInitiatedPingInterval) !== null && f !== void 0 || (q.clientInitiatedPingInterval = 3e4), qe(this, Ra, { code: void 0, reason: void 0 }), qe(this, _t, (g = F(this, et).logger) !== null && g !== void 0 ? g : new DD(F(this, et).debug ? "debug" : "info")), qe(this, $i, new OD());
26798
+ P(this, s), et(this, $h), et(this, $u), et(this, jh), et(this, el), et(this, Pl), et(this, Fh), et(this, xu), et(this, No), et(this, Sl), et(this, Vo), et(this, Bh), et(this, rc), et(this, nc), et(this, Ot, void 0), et(this, Po, void 0), et(this, tt, void 0), et(this, _t, void 0), et(this, ma, void 0), et(this, er, void 0), et(this, qi, void 0), et(this, Ra, void 0), et(this, Vn, void 0), et(this, So, void 0), et(this, Eo, void 0), et(this, $i, void 0);
26799
+ var k, y, b, T, E, I, M, _, O, L, q;
26800
+ qe(this, Po, r), qe(this, ma, []), qe(this, er, new bl()), qe(this, qi, !0), qe(this, Vn, !1), qe(this, tt, e != null ? e : {}), (t = (k = F(this, tt)).autoReconnect) !== null && t !== void 0 || (k.autoReconnect = !0), (n = (y = F(this, tt)).retryConnectionInterval) !== null && n !== void 0 || (y.retryConnectionInterval = 1e3), (i = (b = F(this, tt)).pingTimeout) !== null && i !== void 0 || (b.pingTimeout = 3e4), (a = (T = F(this, tt)).connectionTimeout) !== null && a !== void 0 || (T.connectionTimeout = 5e3), (o = (E = F(this, tt)).debug) !== null && o !== void 0 || (E.debug = !0), (c = (I = F(this, tt)).maxReconnectionAttempts) !== null && c !== void 0 || (I.maxReconnectionAttempts = 10), (l = (M = F(this, tt)).disconnectOnPingTimeout) !== null && l !== void 0 || (M.disconnectOnPingTimeout = !0), (d = (_ = F(this, tt)).queueOnDisconnect) !== null && d !== void 0 || (_.queueOnDisconnect = !1), (p = (O = F(this, tt)).flushOnReconnect) !== null && p !== void 0 || (O.flushOnReconnect = !1), (v = (L = F(this, tt)).clientInitiatedPings) !== null && v !== void 0 || (L.clientInitiatedPings = !1), (f = (q = F(this, tt)).clientInitiatedPingInterval) !== null && f !== void 0 || (q.clientInitiatedPingInterval = 3e4), qe(this, Ra, { code: void 0, reason: void 0 }), qe(this, _t, (g = F(this, tt).logger) !== null && g !== void 0 ? g : new DD(F(this, tt).debug ? "debug" : "info")), qe(this, $i, new OD());
26801
26801
  }
26802
26802
  return S(s, [{
26803
26803
  key: "readyState",
@@ -26827,7 +26827,7 @@ var hm = /* @__PURE__ */ function(s) {
26827
26827
  }, {
26828
26828
  key: "config",
26829
26829
  get: function() {
26830
- return F(this, et);
26830
+ return F(this, tt);
26831
26831
  }
26832
26832
  /**
26833
26833
  * Messages that got queued due to the
@@ -26844,7 +26844,7 @@ var hm = /* @__PURE__ */ function(s) {
26844
26844
  */
26845
26845
  }, { key: "flush", value: function() {
26846
26846
  var e = this;
26847
- if (!F(this, et).queueOnDisconnect)
26847
+ if (!F(this, tt).queueOnDisconnect)
26848
26848
  return !1;
26849
26849
  var t = [];
26850
26850
  return F(this, ma).forEach(function(n) {
@@ -26878,16 +26878,16 @@ var hm = /* @__PURE__ */ function(s) {
26878
26878
  try {
26879
26879
  qe(n, Ot, new WebSocket(Ke(n, $h, pm).call(n, F(n, Po)))), F(n, Ot).binaryType = "arraybuffer", F(n, _t).debug("Connecting");
26880
26880
  var d = setTimeout(function() {
26881
- F(n, _t).debug("Connection timeout. Closing socket"), qe(n, qi, !0), Ke(n, nc, El).call(n), F(n, Ot).close(3001, "Connection Timeout"), F(n, et).autoReconnect && !F(n, Vn) && (F(n, er).emit(
26881
+ F(n, _t).debug("Connection timeout. Closing socket"), qe(n, qi, !0), Ke(n, nc, El).call(n), F(n, Ot).close(3001, "Connection Timeout"), F(n, tt).autoReconnect && !F(n, Vn) && (F(n, er).emit(
26882
26882
  "reconnecting"
26883
26883
  /* reconnecting */
26884
26884
  ), Ke(n, xu, tl).call(n)), l(new Error("Connection timed out!"));
26885
- }, F(n, et).connectionTimeout);
26885
+ }, F(n, tt).connectionTimeout);
26886
26886
  F(n, Ot).onopen = function() {
26887
26887
  F(n, _t).debug("Ready State: ".concat(hm[F(n, Ot).readyState])), d && clearTimeout(d), Ke(n, Sl, Hh).call(n), Ke(n, Bh, gm).call(n), qe(n, Ra, { code: void 0, reason: void 0 }), F(n, er).emit(
26888
26888
  "connected"
26889
26889
  /* connected */
26890
- ), F(n, et).flushOnReconnect && n.flush(), c();
26890
+ ), F(n, tt).flushOnReconnect && n.flush(), c();
26891
26891
  }, F(n, Ot).onclose = function(p) {
26892
26892
  try {
26893
26893
  d && clearTimeout(d);
@@ -26923,7 +26923,7 @@ var hm = /* @__PURE__ */ function(s) {
26923
26923
  key: "send",
26924
26924
  value: function(e, t, n, i) {
26925
26925
  var a = { event: e, id: t, payload: n, metadata: i };
26926
- if (F(this, et).queueOnDisconnect && (!F(this, Ot) || F(this, Ot).readyState !== 1))
26926
+ if (F(this, tt).queueOnDisconnect && (!F(this, Ot) || F(this, Ot).readyState !== 1))
26927
26927
  return F(this, _t).debug("Queuing message since socket is not connected!", a), F(this, ma).push(a), !1;
26928
26928
  var o = dm.encode(a);
26929
26929
  return Ke(this, No, ec).call(this, o);
@@ -27014,7 +27014,7 @@ var hm = /* @__PURE__ */ function(s) {
27014
27014
  qe(this, qi, !1), Ke(this, Vo, tc).call(this), Ke(this, rc, rl).call(this), this.removeAllListeners(), qe(this, Ra, { code: 1e3, reason: "Sockrates disconnect method called" }), F(this, Ot).close(1e3, "Sockrates disconnect method called.");
27015
27015
  } }]);
27016
27016
  }();
27017
- Ot = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), qi = /* @__PURE__ */ new WeakMap(), Ra = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap(), So = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), $i = /* @__PURE__ */ new WeakMap(), $h = /* @__PURE__ */ new WeakSet(), pm = function(r) {
27017
+ Ot = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), qi = /* @__PURE__ */ new WeakMap(), Ra = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap(), So = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), $i = /* @__PURE__ */ new WeakMap(), $h = /* @__PURE__ */ new WeakSet(), pm = function(r) {
27018
27018
  if (r.startsWith("ws://") || r.startsWith("wss://"))
27019
27019
  return r;
27020
27020
  if (r.startsWith("https://"))
@@ -27041,7 +27041,7 @@ Ot = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), et = /*
27041
27041
  qe(this, Ra, { reason: e, code: r }), F(this, er).emit("disconnected", { code: r, reason: e });
27042
27042
  }, Fh = /* @__PURE__ */ new WeakSet(), fm = function() {
27043
27043
  var r = F(this, Ra), e = r.reason, t = r.code;
27044
- t && t !== 1e3 && F(this, qi) && F(this, et).autoReconnect && !F(this, Vn) && (F(this, _t).debug("Triggering reconnection due to ".concat(e, ".")), F(this, er).emit(
27044
+ t && t !== 1e3 && F(this, qi) && F(this, tt).autoReconnect && !F(this, Vn) && (F(this, _t).debug("Triggering reconnection due to ".concat(e, ".")), F(this, er).emit(
27045
27045
  "reconnecting"
27046
27046
  /* reconnecting */
27047
27047
  ), Ke(this, xu, tl).call(this));
@@ -27058,7 +27058,7 @@ Ot = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), et = /*
27058
27058
  }
27059
27059
  return F(this, _t).debug("Reconnect called when already in a reconnect loop. Ignoring."), i.a(2);
27060
27060
  case 1:
27061
- if (F(this, Vn) || F(this, $i).reset(), !(F(this, et).maxReconnectionAttempts !== null && F(this, $i).getAttempts() >= F(this, et).maxReconnectionAttempts)) {
27061
+ if (F(this, Vn) || F(this, $i).reset(), !(F(this, tt).maxReconnectionAttempts !== null && F(this, $i).getAttempts() >= F(this, tt).maxReconnectionAttempts)) {
27062
27062
  i.n = 2;
27063
27063
  break;
27064
27064
  }
@@ -27111,14 +27111,14 @@ Ot = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), et = /*
27111
27111
  F(r, _t).debug("Disconnecting the socket due to ping timeout"), qe(r, qi, !0);
27112
27112
  var t = 3002, n = "Ping timeout";
27113
27113
  (e = F(r, Ot)) == null || e.close(t, n), Ke(r, Pl, Uh).call(r, t, n);
27114
- }, F(this, et).pingTimeout)));
27114
+ }, F(this, tt).pingTimeout)));
27115
27115
  }, Vo = /* @__PURE__ */ new WeakSet(), tc = function() {
27116
27116
  F(this, So) && (clearTimeout(F(this, So)), qe(this, So, void 0));
27117
27117
  }, Bh = /* @__PURE__ */ new WeakSet(), gm = function() {
27118
27118
  var r = this;
27119
- Ke(this, rc, rl).call(this), F(this, et).clientInitiatedPings && qe(this, Eo, setInterval(function() {
27119
+ Ke(this, rc, rl).call(this), F(this, tt).clientInitiatedPings && qe(this, Eo, setInterval(function() {
27120
27120
  Ke(r, el, Ld).call(r) && (F(r, _t).debug("Sending client-initiated ping"), Ke(r, No, ec).call(r, Zv));
27121
- }, F(this, et).clientInitiatedPingInterval));
27121
+ }, F(this, tt).clientInitiatedPingInterval));
27122
27122
  }, rc = /* @__PURE__ */ new WeakSet(), rl = function() {
27123
27123
  F(this, Eo) && (clearInterval(F(this, Eo)), qe(this, Eo, void 0));
27124
27124
  }, nc = /* @__PURE__ */ new WeakSet(), El = function() {
@@ -27255,8 +27255,8 @@ var VD = Object.defineProperty, $D = Object.getOwnPropertyDescriptor, Kl = funct
27255
27255
  return new Promise(function(d, p) {
27256
27256
  var v, f = function(M, _) {
27257
27257
  v && clearTimeout(v), u(t, me)[me].removeListener(l, M), u(t, me)[me].removeListener(ef, _), u(t, me)[me].removeListener(Sa.errorResponse, _), u(t, me)[me].removeListener($n.errorResponse, _);
27258
- }, g = o != null ? o : u(t, yo)[yo](), y = {}, k = u(t, Ae)[Ae].getValue("telemetry");
27259
- k.injectContext(y);
27258
+ }, g = o != null ? o : u(t, yo)[yo](), k = {}, y = u(t, Ae)[Ae].getValue("telemetry");
27259
+ y.injectContext(k);
27260
27260
  var b = function(M) {
27261
27261
  var _ = M.id, O = M.payload;
27262
27262
  if (g === _) {
@@ -27282,7 +27282,7 @@ var VD = Object.defineProperty, $D = Object.getOwnPropertyDescriptor, Kl = funct
27282
27282
  u(t, me)[me].on(l, T), u(t, me)[me].on(ef, b), u(t, me)[me].on(Sa.errorResponse, b), u(t, me)[me].on($n.errorResponse, b), v = setTimeout(function() {
27283
27283
  f(T, b), p(new Error("request timeout for callback eventId:".concat(n)));
27284
27284
  }, i);
27285
- var E = u(t, me)[me].send(n, g, a, new TextEncoder().encode(JSON.stringify(y)));
27285
+ var E = u(t, me)[me].send(n, g, a, new TextEncoder().encode(JSON.stringify(k)));
27286
27286
  E || (f(T, b), p(new Error("Socket message could not be sent for the current peer ID")));
27287
27287
  });
27288
27288
  } }, { key: "on", value: function(e, t) {
@@ -27867,19 +27867,19 @@ var l2 = Object.defineProperty, d2 = Object.getOwnPropertyDescriptor, Sp = funct
27867
27867
  return this.logger.info("Honoring request to switch connected meetings. Going to ".concat(t == null ? void 0 : t.meetingId)), this.switchMeeting(t);
27868
27868
  } }, { key: "switchMeeting", value: function() {
27869
27869
  var r = m(/* @__PURE__ */ h().m(function t(n) {
27870
- var i, a, o, c, l, d, p, v, f, g, y;
27871
- return h().w(function(k) {
27870
+ var i, a, o, c, l, d, p, v, f, g, k;
27871
+ return h().w(function(y) {
27872
27872
  for (; ; )
27873
- switch (k.p = k.n) {
27873
+ switch (y.p = y.n) {
27874
27874
  case 0:
27875
- return o = n.authToken, c = n.meetingId, this.logger.info("ConnectedMeetingsController::switchMeeting:: asking ui-kit to show switching breakout UI"), this.connectedMeetings.emit("changingMeeting", c), l = { video: u(this, he)[he].getValue("self").videoEnabled, audio: u(this, he)[he].getValue("self").audioEnabled }, k.p = 1, u(this, he)[he].getValue("self").cleanupEvents(), k.n = 2, u(this, he)[he].getValue("meeting").leave("connected-meeting");
27875
+ return o = n.authToken, c = n.meetingId, this.logger.info("ConnectedMeetingsController::switchMeeting:: asking ui-kit to show switching breakout UI"), this.connectedMeetings.emit("changingMeeting", c), l = { video: u(this, he)[he].getValue("self").videoEnabled, audio: u(this, he)[he].getValue("self").audioEnabled }, y.p = 1, u(this, he)[he].getValue("self").cleanupEvents(), y.n = 2, u(this, he)[he].getValue("meeting").leave("connected-meeting");
27876
27876
  case 2:
27877
- k.n = 4;
27877
+ y.n = 4;
27878
27878
  break;
27879
27879
  case 3:
27880
- k.p = 3, g = k.v, this.logger.error("ConnectedMeetingsController:: switchMeeting:: issues in leaving previous meeting. Meeting Id: ".concat((d = u(this, he)[he].getValue("meeting")) === null || d === void 0 || (d = d.meta) === null || d === void 0 ? void 0 : d.meetingId), { error: g });
27880
+ y.p = 3, g = y.v, this.logger.error("ConnectedMeetingsController:: switchMeeting:: issues in leaving previous meeting. Meeting Id: ".concat((d = u(this, he)[he].getValue("meeting")) === null || d === void 0 || (d = d.meta) === null || d === void 0 ? void 0 : d.meetingId), { error: g });
27881
27881
  case 4:
27882
- return this.logger.info("ConnectedMeetingsController::switchMeeting:: initializing new meeting. Meeting Id: ".concat(c)), k.n = 5, T2.init(V(V({}, u(this, he)[he].getValue("options")), {}, { cachedUserDetails: null, defaults: V(V(V({}, u(this, he)[he].getValue("options").defaults), l), {}, {
27882
+ return this.logger.info("ConnectedMeetingsController::switchMeeting:: initializing new meeting. Meeting Id: ".concat(c)), y.n = 5, T2.init(V(V({}, u(this, he)[he].getValue("options")), {}, { cachedUserDetails: null, defaults: V(V(V({}, u(this, he)[he].getValue("options").defaults), l), {}, {
27883
27883
  /**
27884
27884
  * NOTE(ravindra-cloudflare):
27885
27885
  * Protected methods & variables of SelfMedia,
@@ -27893,14 +27893,14 @@ var l2 = Object.defineProperty, d2 = Object.getOwnPropertyDescriptor, Sp = funct
27893
27893
  mediaHandler: u(this, he)[he].getValue("self")
27894
27894
  }), authToken: o }));
27895
27895
  case 5:
27896
- return p = k.v, this.logger.info("ConnectedMeetingsController::switchMeeting:: initialized new meeting. Meeting Id: ".concat(p == null || (i = p.meta) === null || i === void 0 ? void 0 : i.meetingId)), k.p = 6, v = u(this, he)[he].getValue("self"), f = v.hidden, p.self.setName(u(this, he)[he].getValue("self").name), k.n = 7, p.join();
27896
+ return p = y.v, this.logger.info("ConnectedMeetingsController::switchMeeting:: initialized new meeting. Meeting Id: ".concat(p == null || (i = p.meta) === null || i === void 0 ? void 0 : i.meetingId)), y.p = 6, v = u(this, he)[he].getValue("self"), f = v.hidden, p.self.setName(u(this, he)[he].getValue("self").name), y.n = 7, p.join();
27897
27897
  case 7:
27898
- f && p.self.hide(), k.n = 9;
27898
+ f && p.self.hide(), y.n = 9;
27899
27899
  break;
27900
27900
  case 8:
27901
- k.p = 8, y = k.v, this.logger.error("ConnectedMeetingsController.joinRoom", { error: y });
27901
+ y.p = 8, k = y.v, this.logger.error("ConnectedMeetingsController.joinRoom", { error: k });
27902
27902
  case 9:
27903
- return this.logger.info("ConnectedMeetingsController::switchMeeting:: asking ui-kit to show in-meeting ui of newly joined meeting id: ".concat(p == null || (a = p.meta) === null || a === void 0 ? void 0 : a.meetingId)), this.connectedMeetings.emit("meetingChanged", p), k.a(2, p);
27903
+ return this.logger.info("ConnectedMeetingsController::switchMeeting:: asking ui-kit to show in-meeting ui of newly joined meeting id: ".concat(p == null || (a = p.meta) === null || a === void 0 ? void 0 : a.meetingId)), this.connectedMeetings.emit("meetingChanged", p), y.a(2, p);
27904
27904
  }
27905
27905
  }, t, this, [[6, 8], [1, 3]]);
27906
27906
  }));
@@ -27956,7 +27956,7 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
27956
27956
  }
27957
27957
  return S(s, null, [{ key: "init", value: function() {
27958
27958
  var r = m(/* @__PURE__ */ h().m(function t(n) {
27959
- var i, a, o, c, l, d, p, v, f, g, y, k, b, T, E, I, M, _, O, L, q, X, Y, H, J;
27959
+ var i, a, o, c, l, d, p, v, f, g, k, y, b, T, E, I, M, _, O, L, q, X, Y, H, J;
27960
27960
  return h().w(function(N) {
27961
27961
  for (; ; )
27962
27962
  switch (N.p = N.n) {
@@ -27967,10 +27967,10 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
27967
27967
  }
27968
27968
  throw new j("Browser not supported", "0010", v, !0);
27969
27969
  case 1:
27970
- return f = hA(n, { authToken: c, baseURL: o, cachedUserDetails: p }), f.setRoomName(l), f.setRoomUUID(l), f.setOrganizationId(d), f.setHeader("tracing-id", a), n.setValue("apiClient", f), g = new aI(n), n.setValue("connectionHandler", g), y = "", k = null, v.info("CF SFU is being used."), b = ju.createSocketService(n), T = b.connect(), T.catch(function() {
27970
+ return f = hA(n, { authToken: c, baseURL: o, cachedUserDetails: p }), f.setRoomName(l), f.setRoomUUID(l), f.setOrganizationId(d), f.setHeader("tracing-id", a), n.setValue("apiClient", f), g = new aI(n), n.setValue("connectionHandler", g), k = "", y = null, v.info("CF SFU is being used."), b = ju.createSocketService(n), T = b.connect(), T.catch(function() {
27971
27971
  }), E = f.getUserDetails(), N.p = 2, N.n = 3, E;
27972
27972
  case 3:
27973
- k = N.v, y = ((I = k.meeting) === null || I === void 0 ? void 0 : I.title) || "", n.setValue("presetName", k.preset.name), N.n = 12;
27973
+ y = N.v, k = ((I = y.meeting) === null || I === void 0 ? void 0 : I.title) || "", n.setValue("presetName", y.preset.name), N.n = 12;
27974
27974
  break;
27975
27975
  case 4:
27976
27976
  if (N.p = 4, H = N.v, v.error("Failed to get user details", { error: H }), b.disconnect(), !(H instanceof yl)) {
@@ -28024,7 +28024,7 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
28024
28024
  case 14:
28025
28025
  N.p = 14, J = N.v, v.error("[Controller]: Failed to connect to socket server:", { error: J });
28026
28026
  case 15:
28027
- return M = zI.init(k.preset, !n.getValue("modules").theme), n.setValue("theme", M), _ = $M.init(n, M.viewType, k.preset.permissions), O = ju.setupControllers(b, n, k, y, M, _), qA(M) && (q = ju.createRoomNodeClient(n, b), (L = q.initializeConnection(k.participant.name, l, !1, _)) === null || L === void 0 || L.catch(function(U) {
28027
+ return M = zI.init(y.preset, !n.getValue("modules").theme), n.setValue("theme", M), _ = $M.init(n, M.viewType, y.preset.permissions), O = ju.setupControllers(b, n, y, k, M, _), qA(M) && (q = ju.createRoomNodeClient(n, b), (L = q.initializeConnection(y.participant.name, l, !1, _)) === null || L === void 0 || L.catch(function(U) {
28028
28028
  v.error("[Controller]: Failed to queue partial media room promise:", { error: U });
28029
28029
  })), N.n = 16, O;
28030
28030
  case 16:
@@ -28038,16 +28038,16 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
28038
28038
  return e;
28039
28039
  }() }, { key: "setupControllers", value: function() {
28040
28040
  var r = m(/* @__PURE__ */ h().m(function t(n, i, a, o, c, l) {
28041
- var d, p, v, f, g, y, k, b, T, E, I, M, _, O, L, q, X, Y, H, J, N, U, x, le, Re, pe, Le, Q, Lt, St, ht, re;
28041
+ var d, p, v, f, g, k, y, b, T, E, I, M, _, O, L, q, X, Y, H, J, N, U, x, le, Re, pe, Le, Q, Lt, St, ht, re;
28042
28042
  return h().w(function(K) {
28043
28043
  for (; ; )
28044
28044
  switch (K.n) {
28045
28045
  case 0:
28046
- return f = i.getValue("modules"), g = a.participant, y = i.getValue("defaults"), k = i.getValue("logger"), b = c.viewType, T = c.mediaConstraints.audio, i.setValue("viewType", b), i.setValue("defaults", V({ mediaConfiguration: { audio: { enableHighBitrate: (d = T.enableHighBitrate) !== null && d !== void 0 ? d : !1, enableStereo: (p = T.enableStereo) !== null && p !== void 0 ? p : !1 } } }, y)), i.setValue("maxPreferredStreams", wt.isMobile() ? c.maxVideoStreams.mobile : c.maxVideoStreams.desktop), H = new hD(i, n), J = new s2(n), i.setValue("connectedMeetingsSocketHandler", J), N = new Gl(i, n), U = new Qi(i, n), x = new yD(n), le = new rm(i, n), Re = new kD(i, n), pe = new dD(n), K.n = 1, Na.init(i, le, g, l, c);
28046
+ return f = i.getValue("modules"), g = a.participant, k = i.getValue("defaults"), y = i.getValue("logger"), b = c.viewType, T = c.mediaConstraints.audio, i.setValue("viewType", b), i.setValue("defaults", V({ mediaConfiguration: { audio: { enableHighBitrate: (d = T.enableHighBitrate) !== null && d !== void 0 ? d : !1, enableStereo: (p = T.enableStereo) !== null && p !== void 0 ? p : !1 } } }, k)), i.setValue("maxPreferredStreams", wt.isMobile() ? c.maxVideoStreams.mobile : c.maxVideoStreams.desktop), H = new hD(i, n), J = new s2(n), i.setValue("connectedMeetingsSocketHandler", J), N = new Gl(i, n), U = new Qi(i, n), x = new yD(n), le = new rm(i, n), Re = new kD(i, n), pe = new dD(n), K.n = 1, Na.init(i, le, g, l, c);
28047
28047
  case 1:
28048
28048
  return Le = K.v, i.setValue("selfController", Le), K.n = 2, Fg.init(i, Le.self, le, H, o);
28049
28049
  case 2:
28050
- if (Q = K.v, f.participant && (X = new Zi(i, Le.self, le)), (v = f.e2ee) !== null && v !== void 0 && v.enabled && f.e2ee.manager.init(k, i.getValue("peerSessionStore")), !f.chat) {
28050
+ if (Q = K.v, f.participant && (X = new Zi(i, Le.self, le)), (v = f.e2ee) !== null && v !== void 0 && v.enabled && f.e2ee.manager.init(y, i.getValue("peerSessionStore")), !f.chat) {
28051
28051
  K.n = 4;
28052
28052
  break;
28053
28053
  }
@@ -28081,7 +28081,7 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
28081
28081
  }
28082
28082
  throw new j("The plugin module cannot be initialized without the `participant` module", "0102");
28083
28083
  case 9:
28084
- return St = y.plugins || [], K.n = 10, Wg.init(i, St, Le.self, Lt);
28084
+ return St = k.plugins || [], K.n = 10, Wg.init(i, St, Le.self, Lt);
28085
28085
  case 10:
28086
28086
  _ = K.v;
28087
28087
  case 11:
@@ -28420,20 +28420,20 @@ var gr = /* @__PURE__ */ w("trackMap"), m2 = /* @__PURE__ */ function(s) {
28420
28420
  key: "init",
28421
28421
  value: function() {
28422
28422
  var r = m(/* @__PURE__ */ h().m(function t(n) {
28423
- var i, a, o, c, l, d, p, v, f, g, y, k, b, T, E, I, M;
28423
+ var i, a, o, c, l, d, p, v, f, g, k, y, b, T, E, I, M;
28424
28424
  return h().w(function(_) {
28425
28425
  for (; ; )
28426
28426
  switch (_.n) {
28427
28427
  case 0:
28428
- if (wt.init(), p = (i = n == null || (a = n.cachedUserDetails) === null || a === void 0 ? void 0 : a.peerId) !== null && i !== void 0 ? i : Js(), v = n.authToken, f = n.baseURI, g = ND(v, f), y = g.meetingId, k = Gh(g, Pm), !((o = k.baseURI) !== null && o !== void 0 && o.includes("dyte.io"))) {
28428
+ if (wt.init(), p = (i = n == null || (a = n.cachedUserDetails) === null || a === void 0 ? void 0 : a.peerId) !== null && i !== void 0 ? i : Js(), v = n.authToken, f = n.baseURI, g = ND(v, f), k = g.meetingId, y = Gh(g, Pm), !((o = y.baseURI) !== null && o !== void 0 && o.includes("dyte.io"))) {
28429
28429
  _.n = 1;
28430
28430
  break;
28431
28431
  }
28432
28432
  throw new j("Dyte Base URIs are no longer supported. Use RealtimeKit Base URIs.", "0001");
28433
28433
  case 1:
28434
- return window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0, b = Ma.setupContext(p, n, y, k), T = b.getValue("telemetry"), E = b.getValue("logger"), Bm(E), tf.init(E), T.init(b, { roomName: y, userId: k.participantId, organizationId: k.orgId, peerId: p }, (c = (l = n.modules) === null || l === void 0 ? void 0 : l.tracing) !== null && c !== void 0 ? c : !0, n == null || (d = n.modules) === null || d === void 0 || (d = d.devTools) === null || d === void 0 ? void 0 : d.logLevel), E.init(b), E.info("Client::init::options", { clientInitOptions: V(V({}, n), {}, { authToken: mm(n.authToken) }) }), _.n = 2, Ql.init(b);
28434
+ return window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0, b = Ma.setupContext(p, n, k, y), T = b.getValue("telemetry"), E = b.getValue("logger"), Bm(E), tf.init(E), T.init(b, { roomName: k, userId: y.participantId, organizationId: y.orgId, peerId: p }, (c = (l = n.modules) === null || l === void 0 ? void 0 : l.tracing) !== null && c !== void 0 ? c : !0, n == null || (d = n.modules) === null || d === void 0 || (d = d.devTools) === null || d === void 0 ? void 0 : d.logLevel), E.init(b), E.info("Client::init::options", { clientInitOptions: V(V({}, n), {}, { authToken: mm(n.authToken) }) }), _.n = 2, Ql.init(b);
28435
28435
  case 2:
28436
- return I = _.v, M = new Ma(b, I), b.setValue("meeting", M), _.a(2, M);
28436
+ return I = _.v, M = new Ma(b, I), b.setValue("meeting", M), E.info("Meeting view type: ".concat(M.meta.viewType)), _.a(2, M);
28437
28437
  }
28438
28438
  }, t);
28439
28439
  }));
@@ -28452,7 +28452,7 @@ var gr = /* @__PURE__ */ w("trackMap"), m2 = /* @__PURE__ */ function(s) {
28452
28452
  }, { key: "setupContext", value: function(e, t, n, i) {
28453
28453
  var a, o, c = Aa.createContext(e, t), l = V(V({}, RP), t == null ? void 0 : t.modules), d = t.defaults || { audio: !0, video: !0 };
28454
28454
  return c.setValue("options", t), c.setValue("peerId", e), c.setValue("modules", l), c.setValue("sdkName", "web-core"), c.setValue("meetingId", n), c.setValue("apiBase", i.apiBase), c.setValue("baseURI", i.baseURI), c.setValue("userId", i.participantId), c.setValue("organizationId", i.orgId), c.setValue("authToken", t.authToken), c.setValue("overrides", (a = t.overrides) !== null && a !== void 0 ? a : {}), c.setValue("env", _P({ baseURI: i.baseURI })), c.setValue("defaults", d), c.setValue("onError", t.onError || function() {
28455
- }), c.setValue("cachedUserDetails", di(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.4-staging.3"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new m2()), c;
28455
+ }), c.setValue("cachedUserDetails", di(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.4-staging.4"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new m2()), c;
28456
28456
  } }]);
28457
28457
  }());
28458
28458
  Yl([dr("0002"), Xi.executeWithLock({ methodName: "meeting.join", lockName: "Client.join", timeout: 3e3 })], Ma.prototype, "join", 1);