@cloudflare/realtimekit 2.0.3-staging.15 → 2.0.3-staging.16

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 On from "sdp-transform";
6
- var wm = ["chat", "connectedMeetings", "plugins", "polls", "media"], bm = ["id"], Pm = ["meetingId"], ee, Bn, Ke, ga, nl, ro, qn, il, Cc, Xi, Zi, Co, rn, xi, Wn, ma, no, Gn, io, ao, nn, ea, At, Jn, Pr, so, oo, Kn, er, Pa, sn, ri, Rc, Ro, _o, Ao, ya, ta, ra, na, Bt, Ne, ia, aa, Ot, zn, vn, Qn, _c, st, uo, on, Yn, Sr, Ac, co, Ic, Mc, ke, lo, Xn, sa, Zn, Tt, qt, ur, an, Ue, Cr, ni, xn, Oc, Dc, ho, Lc, Nc, Vc, oa, ot, ua, $e, Er, Ve, ca, be, ka, Ta, po, Cl, la, Wt, x, wt, Zl, cr, wa, me, je, fn, dn, ii, ai, cn, Zt, lr, hn, si, ct, gn, lt, Ae, vo, al, sl, $c, Io, Mo, ti, ol, ul, fo, $o, go, cl, mo, yo, he, _e, ei;
6
+ var wm = ["chat", "connectedMeetings", "plugins", "polls", "media"], bm = ["id"], Pm = ["meetingId"], ee, Bn, Ke, ga, nl, ro, qn, il, Cc, Xi, Zi, Co, rn, xi, Wn, ma, no, Gn, io, ao, nn, ea, It, Jn, Pr, so, oo, Kn, tr, Pa, sn, ri, Rc, Ro, _o, Ao, ya, ta, ra, na, qt, Ne, ia, aa, Dt, zn, vn, Qn, _c, st, uo, on, Yn, Sr, Ac, co, Ic, Mc, ke, lo, Xn, sa, Zn, Tt, Wt, ur, an, Ue, Cr, ni, xn, Oc, Dc, ho, Lc, Nc, Vc, oa, ot, ua, $e, Er, Ve, ca, be, ka, Ta, po, Cl, la, Gt, x, wt, Zl, cr, wa, me, je, fn, dn, ii, ai, cn, xt, lr, hn, si, ct, gn, lt, Ae, vo, al, sl, $c, Io, Mo, ti, ol, ul, fo, $o, go, cl, mo, yo, he, _e, ei;
7
7
  function Gh(s, r) {
8
8
  if (s == null)
9
9
  return {};
@@ -1848,7 +1848,7 @@ var Nf = /* @__PURE__ */ S(function s() {
1848
1848
  d.producerStreamMap.has(U) || d.producerStreamMap.set(U, { outboundVideoRtpId: [], outboundAudioRtpId: [] });
1849
1849
  var Le = { bytesSent: N.bytesSent, packetsSent: N.packetsSent, nackCount: N.nackCount, ssrc: N.ssrc, mid: N.mid, active: N.active, codecId: N.codecId, headerBytesSent: N.headerBytesSent || 0, totalPacketSendDelay: N.totalPacketSendDelay || 0 };
1850
1850
  if (N.mediaType === "video" || N.kind === "video") {
1851
- var Q = N, Dt = V({
1851
+ var Q = N, Lt = V({
1852
1852
  frameHeight: Q.frameHeight,
1853
1853
  frameWidth: Q.frameWidth,
1854
1854
  framesEncoded: Q.framesEncoded,
@@ -1873,7 +1873,7 @@ var Nf = /* @__PURE__ */ S(function s() {
1873
1873
  scalabilityMode: Q.scalabilityMode,
1874
1874
  powerEfficientEncoder: Q.powerEfficientEncoder
1875
1875
  }, Le);
1876
- d.outboundVideoRtp.set(E.id, Dt), d.producerStreamMap.get(U).outboundVideoRtpId.push(E.id), this.processOutboundProducerVideoStats(U, le, Dt);
1876
+ d.outboundVideoRtp.set(E.id, Lt), d.producerStreamMap.get(U).outboundVideoRtpId.push(E.id), this.processOutboundProducerVideoStats(U, le, Lt);
1877
1877
  } else if (N.mediaType === "audio" || N.kind === "audio") {
1878
1878
  var Pt = N, dt = V({ retransmittedBytesSent: Pt.retransmittedBytesSent, retransmittedPacketsSent: Pt.retransmittedPacketsSent }, Le);
1879
1879
  d.outboundAudioRtp.set(E.id, dt), d.producerStreamMap.get(U).outboundAudioRtpId.push(E.id), this.processOutboundProducerAudioStats(U, le, dt);
@@ -1939,12 +1939,12 @@ var Nf = /* @__PURE__ */ S(function s() {
1939
1939
  }
1940
1940
  if (d.producerStreamMap.forEach(function(te, ne) {
1941
1941
  if (te.outboundVideoRtpId.length > 0) {
1942
- var Lt, St, za, _r, Qa, Ya, Xa, Za, Ar, xa, Yo = [];
1942
+ var Nt, St, za, _r, Qa, Ya, Xa, Za, Ar, xa, Yo = [];
1943
1943
  te.outboundVideoRtpId.forEach(function(Xl) {
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: ((Lt = Se.remoteData) === null || Lt === void 0 ? void 0 : Lt.jitter) || 0, isScreenShare: n.screenShareProducers.has(ne), packetsSent: (Se.packetsSent || 0) - (((St = n.videoProducerToStatsMap.get(ne)) === null || St === void 0 ? void 0 : St.packetsSent) || 0), packetsLost: (((za = Se.remoteData) === null || za === void 0 ? void 0 : za.packetsLost) || 0) - (((_r = n.videoProducerToStatsMap.get(ne)) === null || _r === void 0 || (_r = _r.remoteData) === null || _r === void 0 ? void 0 : _r.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Qa = n.videoProducerToStatsMap.get(ne)) === null || Qa === void 0 ? void 0 : Qa.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) - (((St = n.videoProducerToStatsMap.get(ne)) === null || St === void 0 ? void 0 : St.packetsSent) || 0), packetsLost: (((za = Se.remoteData) === null || za === void 0 ? void 0 : za.packetsLost) || 0) - (((_r = n.videoProducerToStatsMap.get(ne)) === null || _r === void 0 || (_r = _r.remoteData) === null || _r === void 0 ? void 0 : _r.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Qa = n.videoProducerToStatsMap.get(ne)) === null || Qa === void 0 ? void 0 : Qa.framesEncoded) || 0) }), y.set(ne, {
1948
1948
  score: +(Se.score * 10).toFixed(),
1949
1949
  frameWidth: Se.frameWidth || 0,
1950
1950
  frameHeight: Se.frameHeight || 0,
@@ -1958,23 +1958,23 @@ var Nf = /* @__PURE__ */ S(function s() {
1958
1958
  bandwidthLimitations: Se.qualityLimitationReason === "bandwidth"
1959
1959
  }), n.videoProducerToStatsMap.set(ne, Se);
1960
1960
  } else if (te.outboundAudioRtpId.length > 0) {
1961
- var es, ts, Ir, rs, ns, is, as, Mr, ss, Nt = d.outboundAudioRtp.get(te.outboundAudioRtpId[0]);
1962
- Nt.score = _f({ packetsSent: (Nt.packetsSent || 0) - (((es = n.audioProducerToStatsMap.get(ne)) === null || es === void 0 ? void 0 : es.packetsSent) || 0), packetsLost: (((ts = Nt.remoteData) === null || ts === void 0 ? void 0 : ts.packetsLost) || 0) - (((Ir = n.audioProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), jitter: ((rs = Nt.remoteData) === null || rs === void 0 ? void 0 : rs.jitter) || 0 }), y.set(ne, {
1963
- score: +(Nt.score * 10).toFixed(),
1964
- bitrate: ((Nt.bytesSent || 0) - (((ns = n.audioProducerToStatsMap.get(ne)) === null || ns === void 0 ? void 0 : ns.bytesSent) || 0)) * 8 / 7,
1961
+ var es, ts, Ir, rs, ns, is, as, Mr, ss, Vt = d.outboundAudioRtp.get(te.outboundAudioRtpId[0]);
1962
+ Vt.score = _f({ packetsSent: (Vt.packetsSent || 0) - (((es = n.audioProducerToStatsMap.get(ne)) === null || es === void 0 ? void 0 : es.packetsSent) || 0), packetsLost: (((ts = Vt.remoteData) === null || ts === void 0 ? void 0 : ts.packetsLost) || 0) - (((Ir = n.audioProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), jitter: ((rs = Vt.remoteData) === null || rs === void 0 ? void 0 : rs.jitter) || 0 }), y.set(ne, {
1963
+ score: +(Vt.score * 10).toFixed(),
1964
+ bitrate: ((Vt.bytesSent || 0) - (((ns = n.audioProducerToStatsMap.get(ne)) === null || ns === void 0 ? void 0 : ns.bytesSent) || 0)) * 8 / 7,
1965
1965
  // Bytes received in last 7 seconds
1966
- packetsLostPercentage: dl({ packetsSent: (Nt.packetsSent || 0) - (((is = n.audioProducerToStatsMap.get(ne)) === null || is === void 0 ? void 0 : is.packetsSent) || 0), packetsLost: (((as = Nt.remoteData) === null || as === void 0 ? void 0 : as.packetsLost) || 0) - (((Mr = n.audioProducerToStatsMap.get(ne)) === null || Mr === void 0 || (Mr = Mr.remoteData) === null || Mr === void 0 ? void 0 : Mr.packetsLost) || 0) }),
1967
- jitter: ((ss = Nt.remoteData) === null || ss === void 0 ? void 0 : ss.jitter) || 0,
1966
+ packetsLostPercentage: dl({ packetsSent: (Vt.packetsSent || 0) - (((is = n.audioProducerToStatsMap.get(ne)) === null || is === void 0 ? void 0 : is.packetsSent) || 0), packetsLost: (((as = Vt.remoteData) === null || as === void 0 ? void 0 : as.packetsLost) || 0) - (((Mr = n.audioProducerToStatsMap.get(ne)) === null || Mr === void 0 || (Mr = Mr.remoteData) === null || Mr === void 0 ? void 0 : Mr.packetsLost) || 0) }),
1967
+ jitter: ((ss = Vt.remoteData) === null || ss === void 0 ? void 0 : ss.jitter) || 0,
1968
1968
  isScreenShare: n.screenShareProducers.has(ne)
1969
- }), n.audioProducerToStatsMap.set(ne, Nt);
1969
+ }), n.audioProducerToStatsMap.set(ne, Vt);
1970
1970
  }
1971
1971
  }), g.forEach(function(te) {
1972
1972
  var ne = v.find(function(St) {
1973
1973
  return St.id === te.localCandidateId ? (te.localCandidateId = St.id, St) : null;
1974
- }), Lt = f.find(function(St) {
1974
+ }), Nt = f.find(function(St) {
1975
1975
  return St.id === te.remoteCandidateId ? (te.remoteCandidateId = St.id, St) : null;
1976
1976
  });
1977
- ne && (te.localCandidateType = ne.type, te.localCandidateAddress = Ca(ne.address), te.localCandidatePort = ne.port, te.localCandidateProtocol = ne.protocol, te.localCandidateUrl = ne.url, te.localCandidateNetworkType = ne.networkType, te.localCandidateRelatedAddress = Ca(ne.relatedAddress), te.localCandidateRelatedPort = ne.relatedPort), Lt && (te.remoteCandidateType = Lt.type, te.remoteCandidateAddress = Ca(Lt.address), te.remoteCandidatePort = Lt.port, te.remoteCandidateProtocol = Lt.protocol, te.remoteCandidateUrl = Lt.url);
1977
+ ne && (te.localCandidateType = ne.type, te.localCandidateAddress = Ca(ne.address), te.localCandidatePort = ne.port, te.localCandidateProtocol = ne.protocol, te.localCandidateUrl = ne.url, te.localCandidateNetworkType = ne.networkType, te.localCandidateRelatedAddress = Ca(ne.relatedAddress), te.localCandidateRelatedPort = ne.relatedPort), Nt && (te.remoteCandidateType = Nt.type, te.remoteCandidateAddress = Ca(Nt.address), te.remoteCandidatePort = Nt.port, te.remoteCandidateProtocol = Nt.protocol, te.remoteCandidateUrl = Nt.url);
1978
1978
  }), d.candidatePair && (d.transport ? (d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
1979
1979
  // candidateStats: result.candidatePair,
1980
1980
  bytesReceived: d.candidatePair.bytesReceived,
@@ -2475,8 +2475,8 @@ var Nf = /* @__PURE__ */ S(function s() {
2475
2475
  d.producerStreamMap.has(U) || d.producerStreamMap.set(U, { outboundVideoRtpId: [], outboundAudioRtpId: [] });
2476
2476
  var Le = { bytesSent: N.bytesSent, packetsSent: N.packetsSent, nackCount: N.nackCount, ssrc: N.ssrc, mid: N.mid, active: N.active, codecId: N.codecId, headerBytesSent: N.headerBytesSent || 0, totalPacketSendDelay: N.totalPacketSendDelay || 0 };
2477
2477
  if (N.mediaType === "video" || N.kind === "video") {
2478
- var Q = N, Dt = V({ frameHeight: Q.frameHeight, frameWidth: Q.frameWidth, framesEncoded: Q.framesEncoded, framesDropped: Q.framesDropped ? Q.framesDropped : Q.droppedFrames, framesPerSecond: Q.framesPerSecond ? Q.framesPerSecond : Q.framerateMean, framesSent: Q.framesSent, keyFramesEncoded: Q.keyFramesEncoded, firCount: Q.firCount, encoderImplementation: Q.encoderImplementation, hugeFramesSent: Q.hugeFramesSent, pliCount: Q.pliCount, qpSum: Q.qpSum, qualityLimitationReason: Q.qualityLimitationReason, qualityLimitationDurations: Q.qualityLimitationDurations, qualityLimitationResolutionChanges: Q.qualityLimitationResolutionChanges, totalEncodeTime: Q.totalEncodeTime, totalPacketSendDelay: Q.totalEncodeTime, retransmittedBytesSent: Q.retransmittedBytesSent, retransmittedPacketsSent: Q.retransmittedPacketsSent, scalabilityMode: Q.scalabilityMode, powerEfficientEncoder: Q.powerEfficientEncoder }, Le);
2479
- d.outboundVideoRtp.set(E.id, Dt), d.producerStreamMap.get(U).outboundVideoRtpId.push(E.id), this.processOutboundProducerVideoStats(U, le, Dt);
2478
+ var Q = N, Lt = V({ frameHeight: Q.frameHeight, frameWidth: Q.frameWidth, framesEncoded: Q.framesEncoded, framesDropped: Q.framesDropped ? Q.framesDropped : Q.droppedFrames, framesPerSecond: Q.framesPerSecond ? Q.framesPerSecond : Q.framerateMean, framesSent: Q.framesSent, keyFramesEncoded: Q.keyFramesEncoded, firCount: Q.firCount, encoderImplementation: Q.encoderImplementation, hugeFramesSent: Q.hugeFramesSent, pliCount: Q.pliCount, qpSum: Q.qpSum, qualityLimitationReason: Q.qualityLimitationReason, qualityLimitationDurations: Q.qualityLimitationDurations, qualityLimitationResolutionChanges: Q.qualityLimitationResolutionChanges, totalEncodeTime: Q.totalEncodeTime, totalPacketSendDelay: Q.totalEncodeTime, retransmittedBytesSent: Q.retransmittedBytesSent, retransmittedPacketsSent: Q.retransmittedPacketsSent, scalabilityMode: Q.scalabilityMode, powerEfficientEncoder: Q.powerEfficientEncoder }, Le);
2479
+ d.outboundVideoRtp.set(E.id, Lt), d.producerStreamMap.get(U).outboundVideoRtpId.push(E.id), this.processOutboundProducerVideoStats(U, le, Lt);
2480
2480
  } else if (N.mediaType === "audio" || N.kind === "audio") {
2481
2481
  var Pt = N, dt = V({ retransmittedBytesSent: Pt.retransmittedBytesSent, retransmittedPacketsSent: Pt.retransmittedPacketsSent }, Le);
2482
2482
  d.outboundAudioRtp.set(E.id, dt), d.producerStreamMap.get(U).outboundAudioRtpId.push(E.id), this.processOutboundProducerAudioStats(U, le, dt);
@@ -2542,12 +2542,12 @@ var Nf = /* @__PURE__ */ S(function s() {
2542
2542
  }
2543
2543
  if (d.producerStreamMap.forEach(function(te, ne) {
2544
2544
  if (te.outboundVideoRtpId.length > 0) {
2545
- var Lt, St, za, _r, Qa, Ya, Xa, Za, Ar, xa, Yo = [];
2545
+ var Nt, St, za, _r, Qa, Ya, Xa, Za, Ar, xa, Yo = [];
2546
2546
  te.outboundVideoRtpId.forEach(function(Xl) {
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: ((Lt = Se.remoteData) === null || Lt === void 0 ? void 0 : Lt.jitter) || 0, isScreenShare: n.screenShareProducers.has(ne), packetsSent: (Se.packetsSent || 0) - (((St = n.videoProducerToStatsMap.get(ne)) === null || St === void 0 ? void 0 : St.packetsSent) || 0), packetsLost: (((za = Se.remoteData) === null || za === void 0 ? void 0 : za.packetsLost) || 0) - (((_r = n.videoProducerToStatsMap.get(ne)) === null || _r === void 0 || (_r = _r.remoteData) === null || _r === void 0 ? void 0 : _r.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Qa = n.videoProducerToStatsMap.get(ne)) === null || Qa === void 0 ? void 0 : Qa.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) - (((St = n.videoProducerToStatsMap.get(ne)) === null || St === void 0 ? void 0 : St.packetsSent) || 0), packetsLost: (((za = Se.remoteData) === null || za === void 0 ? void 0 : za.packetsLost) || 0) - (((_r = n.videoProducerToStatsMap.get(ne)) === null || _r === void 0 || (_r = _r.remoteData) === null || _r === void 0 ? void 0 : _r.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Qa = n.videoProducerToStatsMap.get(ne)) === null || Qa === void 0 ? void 0 : Qa.framesEncoded) || 0) }), y.set(ne, {
2551
2551
  score: +(Se.score * 10).toFixed(),
2552
2552
  frameWidth: Se.frameWidth || 0,
2553
2553
  frameHeight: Se.frameHeight || 0,
@@ -2561,23 +2561,23 @@ var Nf = /* @__PURE__ */ S(function s() {
2561
2561
  bandwidthLimitations: Se.qualityLimitationReason === "bandwidth"
2562
2562
  }), n.videoProducerToStatsMap.set(ne, Se);
2563
2563
  } else if (te.outboundAudioRtpId.length > 0) {
2564
- var es, ts, Ir, rs, ns, is, as, Mr, ss, Nt = d.outboundAudioRtp.get(te.outboundAudioRtpId[0]);
2565
- Nt.score = _f({ packetsSent: (Nt.packetsSent || 0) - (((es = n.audioProducerToStatsMap.get(ne)) === null || es === void 0 ? void 0 : es.packetsSent) || 0), packetsLost: (((ts = Nt.remoteData) === null || ts === void 0 ? void 0 : ts.packetsLost) || 0) - (((Ir = n.audioProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), jitter: ((rs = Nt.remoteData) === null || rs === void 0 ? void 0 : rs.jitter) || 0 }), y.set(ne, {
2566
- score: +(Nt.score * 10).toFixed(),
2567
- bitrate: ((Nt.bytesSent || 0) - (((ns = n.audioProducerToStatsMap.get(ne)) === null || ns === void 0 ? void 0 : ns.bytesSent) || 0)) * 8 / 7,
2564
+ var es, ts, Ir, rs, ns, is, as, Mr, ss, Vt = d.outboundAudioRtp.get(te.outboundAudioRtpId[0]);
2565
+ Vt.score = _f({ packetsSent: (Vt.packetsSent || 0) - (((es = n.audioProducerToStatsMap.get(ne)) === null || es === void 0 ? void 0 : es.packetsSent) || 0), packetsLost: (((ts = Vt.remoteData) === null || ts === void 0 ? void 0 : ts.packetsLost) || 0) - (((Ir = n.audioProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), jitter: ((rs = Vt.remoteData) === null || rs === void 0 ? void 0 : rs.jitter) || 0 }), y.set(ne, {
2566
+ score: +(Vt.score * 10).toFixed(),
2567
+ bitrate: ((Vt.bytesSent || 0) - (((ns = n.audioProducerToStatsMap.get(ne)) === null || ns === void 0 ? void 0 : ns.bytesSent) || 0)) * 8 / 7,
2568
2568
  // Bytes received in last 7 seconds
2569
- packetsLostPercentage: dl({ packetsSent: (Nt.packetsSent || 0) - (((is = n.audioProducerToStatsMap.get(ne)) === null || is === void 0 ? void 0 : is.packetsSent) || 0), packetsLost: (((as = Nt.remoteData) === null || as === void 0 ? void 0 : as.packetsLost) || 0) - (((Mr = n.audioProducerToStatsMap.get(ne)) === null || Mr === void 0 || (Mr = Mr.remoteData) === null || Mr === void 0 ? void 0 : Mr.packetsLost) || 0) }),
2570
- jitter: ((ss = Nt.remoteData) === null || ss === void 0 ? void 0 : ss.jitter) || 0,
2569
+ packetsLostPercentage: dl({ packetsSent: (Vt.packetsSent || 0) - (((is = n.audioProducerToStatsMap.get(ne)) === null || is === void 0 ? void 0 : is.packetsSent) || 0), packetsLost: (((as = Vt.remoteData) === null || as === void 0 ? void 0 : as.packetsLost) || 0) - (((Mr = n.audioProducerToStatsMap.get(ne)) === null || Mr === void 0 || (Mr = Mr.remoteData) === null || Mr === void 0 ? void 0 : Mr.packetsLost) || 0) }),
2570
+ jitter: ((ss = Vt.remoteData) === null || ss === void 0 ? void 0 : ss.jitter) || 0,
2571
2571
  isScreenShare: n.screenShareProducers.has(ne)
2572
- }), n.audioProducerToStatsMap.set(ne, Nt);
2572
+ }), n.audioProducerToStatsMap.set(ne, Vt);
2573
2573
  }
2574
2574
  }), g.forEach(function(te) {
2575
2575
  var ne = v.find(function(St) {
2576
2576
  return St.id === te.localCandidateId ? (te.localCandidateId = St.id, St) : null;
2577
- }), Lt = f.find(function(St) {
2577
+ }), Nt = f.find(function(St) {
2578
2578
  return St.id === te.remoteCandidateId ? (te.remoteCandidateId = St.id, St) : null;
2579
2579
  });
2580
- ne && (te.localCandidateType = ne.type, te.localCandidateAddress = Ca(ne.address), te.localCandidatePort = ne.port, te.localCandidateProtocol = ne.protocol, te.localCandidateUrl = ne.url, te.localCandidateNetworkType = ne.networkType, te.localCandidateRelatedAddress = Ca(ne.relatedAddress), te.localCandidateRelatedPort = ne.relatedPort), Lt && (te.remoteCandidateType = Lt.type, te.remoteCandidateAddress = Ca(Lt.address), te.remoteCandidatePort = Lt.port, te.remoteCandidateProtocol = Lt.protocol, te.remoteCandidateUrl = Lt.url);
2580
+ ne && (te.localCandidateType = ne.type, te.localCandidateAddress = Ca(ne.address), te.localCandidatePort = ne.port, te.localCandidateProtocol = ne.protocol, te.localCandidateUrl = ne.url, te.localCandidateNetworkType = ne.networkType, te.localCandidateRelatedAddress = Ca(ne.relatedAddress), te.localCandidateRelatedPort = ne.relatedPort), Nt && (te.remoteCandidateType = Nt.type, te.remoteCandidateAddress = Ca(Nt.address), te.remoteCandidatePort = Nt.port, te.remoteCandidateProtocol = Nt.protocol, te.remoteCandidateUrl = Nt.url);
2581
2581
  }), d.candidatePair && (d.transport ? (d.transport.bytesReceived = d.candidatePair.bytesReceived, d.transport.bytesSent = d.candidatePair.bytesSent, d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
2582
2582
  // candidateStats: result.candidatePair,
2583
2583
  bytesReceived: d.candidatePair.bytesReceived,
@@ -5656,12 +5656,12 @@ function XP(s) {
5656
5656
  var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5657
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
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
- }, Gt = /* @__PURE__ */ w("canvas"), Tn = /* @__PURE__ */ w("context"), at = /* @__PURE__ */ w("videoContainer"), Jt = /* @__PURE__ */ w("video"), Te = /* @__PURE__ */ w("dimensions"), rr = /* @__PURE__ */ w("colors"), Lr = /* @__PURE__ */ w("rafRequest"), Me = /* @__PURE__ */ w("sources"), Ee = /* @__PURE__ */ w("self"), os = /* @__PURE__ */ w("selfSourceId"), us = /* @__PURE__ */ w("pinIcon"), cs = /* @__PURE__ */ w("handRaiseIcon"), Nr = /* @__PURE__ */ w("state"), ls = /* @__PURE__ */ w("initComplete"), nd = /* @__PURE__ */ w("handleSelfPeerIdChange"), eu = /* @__PURE__ */ w("roomLeftListener"), xP = /* @__PURE__ */ function(s) {
5659
+ }, Et = /* @__PURE__ */ w("canvas"), Tn = /* @__PURE__ */ w("context"), at = /* @__PURE__ */ w("videoContainer"), Jt = /* @__PURE__ */ w("video"), Te = /* @__PURE__ */ w("dimensions"), Kt = /* @__PURE__ */ w("colors"), Lr = /* @__PURE__ */ w("rafRequest"), Me = /* @__PURE__ */ w("sources"), Ee = /* @__PURE__ */ w("self"), os = /* @__PURE__ */ w("selfSourceId"), us = /* @__PURE__ */ w("pinIcon"), cs = /* @__PURE__ */ w("handRaiseIcon"), Nr = /* @__PURE__ */ w("state"), ls = /* @__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, Gt, { writable: !0, value: void 0 }), Object.defineProperty(a, Tn, { 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, rr, { writable: !0, value: { brand: "#2160FD", background: "#141414", text: "#000000", videoBackground: "#191919", textOnBrand: "#EEEEEE" } }), Object.defineProperty(a, Lr, { writable: !0, value: void 0 }), Object.defineProperty(a, Me, { writable: !0, value: {} }), Object.defineProperty(a, Ee, { writable: !0, value: void 0 }), Object.defineProperty(a, os, { 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, Nr, { writable: !0, value: void 0 }), Object.defineProperty(a, ls, { writable: !0, value: !1 }), Object.defineProperty(a, nd, { writable: !0, value: function(l) {
5664
+ return a = C(this, r, [o]), Object.defineProperty(a, Et, { writable: !0, value: void 0 }), Object.defineProperty(a, Tn, { 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, Lr, { writable: !0, value: void 0 }), Object.defineProperty(a, Me, { writable: !0, value: {} }), Object.defineProperty(a, Ee, { writable: !0, value: void 0 }), Object.defineProperty(a, os, { 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, Nr, { writable: !0, value: void 0 }), Object.defineProperty(a, ls, { writable: !0, value: !1 }), Object.defineProperty(a, nd, { writable: !0, value: function(l) {
5665
5665
  var d = u(a, os)[os];
5666
5666
  if (u(a, os)[os] = l, !(!d || d === l)) {
5667
5667
  var p = u(a, Me)[Me][d];
@@ -5697,7 +5697,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5697
5697
  }, a.disable = function() {
5698
5698
  var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
5699
5699
  u(a, Nr)[Nr] = "idle", a.cleanupEventListeners(), cancelAnimationFrame(u(a, Lr)[Lr]), c !== !0 && document.body.removeChild(u(a, at)[at]), u(a, Lr)[Lr] = void 0, document.pictureInPictureElement && document.exitPictureInPicture();
5700
- }, u(a, Tn)[Tn] = e, u(a, Nr)[Nr] = "idle", u(a, Ee)[Ee] = t, u(a, os)[os] = e.getValue("peerId"), u(a, Tn)[Tn].subscribe("peerId", u(a, nd)[nd]), u(a, rr)[rr] = { 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;
5700
+ }, u(a, Tn)[Tn] = e, u(a, Nr)[Nr] = "idle", u(a, Ee)[Ee] = t, u(a, os)[os] = e.getValue("peerId"), u(a, Tn)[Tn].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: (
5703
5703
  /** @access private */
@@ -5777,7 +5777,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5777
5777
  /** @access private */
5778
5778
  function() {
5779
5779
  var t = document.createElement("canvas");
5780
- t.height = u(this, Te)[Te].height, t.width = u(this, Te)[Te].width, u(this, Gt)[Gt] = t;
5780
+ t.height = u(this, Te)[Te].height, t.width = u(this, Te)[Te].width, u(this, Et)[Et] = t;
5781
5781
  }
5782
5782
  ) }, {
5783
5783
  key: "setupMediaSessionEvents",
@@ -5820,11 +5820,11 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5820
5820
  }, {
5821
5821
  key: "drawEmptyTile",
5822
5822
  value: function(t, n, i, a) {
5823
- if (u(this, Gt)[Gt] !== void 0) {
5824
- var o = u(this, Gt)[Gt].getContext("2d"), c = u(this, Gt)[Gt].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, rr)[rr].videoBackground : u(this, rr)[rr].background, o.strokeStyle = u(this, rr)[rr].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();
5823
+ if (u(this, Et)[Et] !== void 0) {
5824
+ var o = u(this, Et)[Et].getContext("2d"), c = u(this, Et)[Et].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
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, rr)[rr].brand, o.fill(), I ? (o.clip(), o.drawImage(I, _ - M, O - M, M * 2, M * 2), o.restore()) : E && (o.fillStyle = u(this, rr)[rr].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)));
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)));
5828
5828
  }
5829
5829
  }
5830
5830
  /** @access private */
@@ -5832,8 +5832,8 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5832
5832
  key: "drawIcons",
5833
5833
  value: function(t, n, i, a) {
5834
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, Gt)[Gt].getContext("2d");
5836
- k.save(), k.fillStyle = u(o, rr)[rr].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, rr)[rr].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();
5835
+ var k = u(o, Et)[Et].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();
5837
5837
  };
5838
5838
  t.pinned && f(u(this, us)[us]), t.handRaised && f(u(this, cs)[cs]), t.reaction && f(t.reaction);
5839
5839
  }
@@ -5841,8 +5841,10 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5841
5841
  }, {
5842
5842
  key: "drawTile",
5843
5843
  value: function(t, n, i) {
5844
- if (u(this, Gt)[Gt] !== void 0)
5845
- for (var a = u(this, Gt)[Gt].getContext("2d"), o = this.getSources(), c = 0, l = 0; c < u(this, Te)[Te].height - 5; ) {
5844
+ if (u(this, Et)[Et] !== void 0) {
5845
+ var a = u(this, Et)[Et].getContext("2d");
5846
+ a.fillStyle = u(this, Kt)[Kt].background, a.fillRect(0, 0, u(this, Et)[Et].width, u(this, Et)[Et].height);
5847
+ for (var o = this.getSources(), c = 0, l = 0; c < u(this, Te)[Te].height - 5; ) {
5846
5848
  for (var d = 0; d < u(this, Te)[Te].width - 5 && l < i; ) {
5847
5849
  var p;
5848
5850
  if ((p = o[l]) !== null && p !== void 0 && p.enabled) {
@@ -5854,6 +5856,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5854
5856
  }
5855
5857
  c += n;
5856
5858
  }
5859
+ }
5857
5860
  }
5858
5861
  /** @access private */
5859
5862
  }, {
@@ -5902,7 +5905,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5902
5905
  document.body.removeChild(u(this, at)[at]);
5903
5906
  } catch (t) {
5904
5907
  }
5905
- this.removeAllSources(), u(this, Gt)[Gt] = void 0, u(this, Jt)[Jt] = void 0, u(this, Lr)[Lr] = void 0;
5908
+ this.removeAllSources(), u(this, Et)[Et] = void 0, u(this, Jt)[Jt] = void 0, u(this, Lr)[Lr] = void 0;
5906
5909
  }
5907
5910
  /**
5908
5911
  * Initialize PiP and prepare sources
@@ -5917,9 +5920,9 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5917
5920
  if (!this.isSupported())
5918
5921
  throw this.logger.error("Pip.unsupported"), new Error("Picture-in-picture is not available in this environment");
5919
5922
  if (!u(this, ls)[ls]) {
5920
- u(this, ls)[ls] = !0, this.createCanvas(), this.setupMediaSessionEvents();
5923
+ u(this, ls)[ls] = !0, this.createCanvas();
5921
5924
  var o = document.createElement("video");
5922
- u(this, Te)[Te] = { height: i != null ? i : mv, width: a != null ? a : yv }, o.height = u(this, Te)[Te].height, o.width = u(this, Te)[Te].width, o.autoplay = !0, o.muted = !0, o.srcObject = u(this, Gt)[Gt].captureStream(24), u(this, Jt)[Jt] = o, u(this, Jt)[Jt].onloadedmetadata = function() {
5925
+ u(this, Te)[Te] = { height: i != null ? i : mv, width: a != null ? a : yv }, o.height = u(this, Te)[Te].height, o.width = u(this, Te)[Te].width, o.autoplay = !0, o.muted = !0, o.srcObject = u(this, Et)[Et].captureStream(24), u(this, Jt)[Jt] = o, u(this, Jt)[Jt].onloadedmetadata = function() {
5923
5926
  try {
5924
5927
  t.emit("pipStarted"), u(t, Jt)[Jt].onleavepictureinpicture = function() {
5925
5928
  t.emit("pipEnded");
@@ -6031,7 +6034,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
6031
6034
  */
6032
6035
  }, { key: "enable", value: function() {
6033
6036
  var t = this;
6034
- u(this, Nr)[Nr] = "activating", this.setupEventListeners(), 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, Lr)[Lr] = requestAnimationFrame(function() {
6037
+ u(this, Nr)[Nr] = "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, Lr)[Lr] = requestAnimationFrame(function() {
6035
6038
  return t.animate();
6036
6039
  }), u(this, Jt)[Jt].onloadedmetadata = function() {
6037
6040
  u(t, Jt)[Jt].requestPictureInPicture().then(function() {
@@ -10635,15 +10638,15 @@ function Ng(s, r) {
10635
10638
  return e[t] = r | s[t], e;
10636
10639
  }, {});
10637
10640
  }
10638
- var z = wc(J_, X_), Xt = wc(K_, Z_), Vi = wc(z_, x_), $i = wc(Q_, eA), ba = Ng(Lg, 16777216), Ln = Ng(Lg, 50331648), Yc = wc(Y_, tA), rA = Object.defineProperty, nA = Object.getOwnPropertyDescriptor, Oa = function(r, e, t, n) {
10641
+ var z = wc(J_, X_), Zt = wc(K_, Z_), Vi = wc(z_, x_), $i = wc(Q_, eA), ba = Ng(Lg, 16777216), Ln = Ng(Lg, 50331648), Yc = wc(Y_, tA), rA = Object.defineProperty, nA = Object.getOwnPropertyDescriptor, Oa = function(r, e, t, n) {
10639
10642
  for (var i = n > 1 ? void 0 : n ? nA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
10640
10643
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
10641
10644
  return n && i && rA(e, t, i), i;
10642
10645
  }, ln = /* @__PURE__ */ function(s) {
10643
10646
  return s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s;
10644
- }(ln || {}), Vt = /* @__PURE__ */ w("socket"), ds = /* @__PURE__ */ w("context"), Ki = /* @__PURE__ */ function() {
10647
+ }(ln || {}), $t = /* @__PURE__ */ w("socket"), ds = /* @__PURE__ */ w("context"), Ki = /* @__PURE__ */ function() {
10645
10648
  function s(r, e) {
10646
- P(this, s), Object.defineProperty(this, Vt, { writable: !0, value: void 0 }), Object.defineProperty(this, ds, { writable: !0, value: void 0 }), u(this, Vt)[Vt] = e, u(this, ds)[ds] = r;
10649
+ P(this, s), Object.defineProperty(this, $t, { writable: !0, value: void 0 }), Object.defineProperty(this, ds, { writable: !0, value: void 0 }), u(this, $t)[$t] = e, u(this, ds)[ds] = r;
10647
10650
  }
10648
10651
  return S(s, [{
10649
10652
  key: "telemetry",
@@ -10663,7 +10666,7 @@ var z = wc(J_, X_), Xt = wc(K_, Z_), Vi = wc(z_, x_), $i = wc(Q_, eA), ba = Ng(L
10663
10666
  }, { key: "logger", get: function() {
10664
10667
  return u(this, ds)[ds].getValue("logger");
10665
10668
  } }, { key: "getChatMessages", value: function() {
10666
- return u(this, Vt)[Vt].sendMessagePromise(Xt.getMessages);
10669
+ return u(this, $t)[$t].sendMessagePromise(Zt.getMessages);
10667
10670
  } }, { key: "getChatMessagesPaginated", value: function() {
10668
10671
  var r = m(/* @__PURE__ */ h().m(function t(n, i, a, o) {
10669
10672
  var c, l;
@@ -10677,7 +10680,7 @@ var z = wc(J_, X_), Xt = wc(K_, Z_), Vi = wc(z_, x_), $i = wc(Q_, eA), ba = Ng(L
10677
10680
  from: 0,
10678
10681
  // NOTE(ikabra): We do not need offset for timeStamp based pagination.
10679
10682
  reversed: a
10680
- }, o && { filters: { filters: o } }), d.n = 1, u(this, Vt)[Vt].sendMessagePromise(Xt.getPaginatedMessages, h1.toBinary(c));
10683
+ }, o && { filters: { filters: o } }), d.n = 1, u(this, $t)[$t].sendMessagePromise(Zt.getPaginatedMessages, h1.toBinary(c));
10681
10684
  case 1:
10682
10685
  if (l = d.v, l.payload) {
10683
10686
  d.n = 2;
@@ -10695,10 +10698,10 @@ var z = wc(J_, X_), Xt = wc(K_, Z_), Vi = wc(z_, x_), $i = wc(Q_, eA), ba = Ng(L
10695
10698
  return e;
10696
10699
  }() }, { key: "sendMessageToRoom", value: function(e, t) {
10697
10700
  var n = { payloadType: t, payload: e };
10698
- u(this, Vt)[Vt].sendMessage(Xt.sendMessageToRoom, m1.toBinary(n));
10701
+ u(this, $t)[$t].sendMessage(Zt.sendMessageToRoom, m1.toBinary(n));
10699
10702
  } }, { key: "sendMessageToPeers", value: function(e, t, n) {
10700
10703
  var i = { payloadType: t, peerIds: n, payload: e };
10701
- u(this, Vt)[Vt].sendMessage(Xt.sendMessageToPeers, T1.toBinary(i));
10704
+ u(this, $t)[$t].sendMessage(Zt.sendMessageToPeers, T1.toBinary(i));
10702
10705
  } }, { key: "sendMessage", value: function(e, t, n) {
10703
10706
  if (n && n.length > 0) {
10704
10707
  this.sendMessageToPeers(e, t, n);
@@ -10712,7 +10715,7 @@ var z = wc(J_, X_), Xt = wc(K_, Z_), Vi = wc(z_, x_), $i = wc(Q_, eA), ba = Ng(L
10712
10715
  for (; ; )
10713
10716
  switch (d.n) {
10714
10717
  case 0:
10715
- return c = { chatId: n, payloadType: a, payload: i }, o !== void 0 && (c.pinned = o), d.n = 1, u(this, Vt)[Vt].sendMessagePromise(Xt.editMessage, E1.toBinary(c));
10718
+ return c = { chatId: n, payloadType: a, payload: i }, o !== void 0 && (c.pinned = o), d.n = 1, u(this, $t)[$t].sendMessagePromise(Zt.editMessage, E1.toBinary(c));
10716
10719
  case 1:
10717
10720
  return l = d.v, d.a(2, qc.fromBinary(l.payload).message);
10718
10721
  }
@@ -10729,7 +10732,7 @@ var z = wc(J_, X_), Xt = wc(K_, Z_), Vi = wc(z_, x_), $i = wc(Q_, eA), ba = Ng(L
10729
10732
  for (; ; )
10730
10733
  switch (c.n) {
10731
10734
  case 0:
10732
- return i = { chatId: n }, c.n = 1, u(this, Vt)[Vt].sendMessagePromise(Xt.deleteMessage, M1.toBinary(i));
10735
+ return i = { chatId: n }, c.n = 1, u(this, $t)[$t].sendMessagePromise(Zt.deleteMessage, M1.toBinary(i));
10733
10736
  case 1:
10734
10737
  return a = c.v, o = Wc.fromBinary(a.payload), c.a(2, { id: o.chatId });
10735
10738
  }
@@ -10746,7 +10749,7 @@ var z = wc(J_, X_), Xt = wc(K_, Z_), Vi = wc(z_, x_), $i = wc(Q_, eA), ba = Ng(L
10746
10749
  for (; ; )
10747
10750
  switch (f.p = f.n) {
10748
10751
  case 0:
10749
- return d = { searchTerm: n, timeStamp: (a = i.timestamp) !== null && a !== void 0 ? a : Date.now(), size: (o = i.limit) !== null && o !== void 0 ? o : 75, from: (c = i.offset) !== null && c !== void 0 ? c : 0, reversed: (l = i.reversed) !== null && l !== void 0 ? l : !0 }, f.p = 1, f.n = 2, u(this, Vt)[Vt].sendMessagePromise(Xt.searchChannelMessages, L1.toBinary(d));
10752
+ return d = { searchTerm: n, timeStamp: (a = i.timestamp) !== null && a !== void 0 ? a : Date.now(), size: (o = i.limit) !== null && o !== void 0 ? o : 75, from: (c = i.offset) !== null && c !== void 0 ? c : 0, reversed: (l = i.reversed) !== null && l !== void 0 ? l : !0 }, f.p = 1, f.n = 2, u(this, $t)[$t].sendMessagePromise(Zt.searchChannelMessages, L1.toBinary(d));
10750
10753
  case 2:
10751
10754
  return p = f.v, f.a(2, Og.fromBinary(p.payload).messages);
10752
10755
  case 3:
@@ -10765,7 +10768,7 @@ var z = wc(J_, X_), Xt = wc(K_, Z_), Vi = wc(z_, x_), $i = wc(Q_, eA), ba = Ng(L
10765
10768
  for (; ; )
10766
10769
  switch (c.n) {
10767
10770
  case 0:
10768
- return a = { chatId: n, pinned: i }, c.n = 1, u(this, Vt)[Vt].sendMessagePromise(Xt.pinMessage, R1.toBinary(a));
10771
+ return a = { chatId: n, pinned: i }, c.n = 1, u(this, $t)[$t].sendMessagePromise(Zt.pinMessage, R1.toBinary(a));
10769
10772
  case 1:
10770
10773
  return o = c.v, c.a(2, Bc.fromBinary(o.payload));
10771
10774
  }
@@ -10778,23 +10781,23 @@ var z = wc(J_, X_), Xt = wc(K_, Z_), Vi = wc(z_, x_), $i = wc(Q_, eA), ba = Ng(L
10778
10781
  }() }, { key: "on", value: function(e, t) {
10779
10782
  var n = this, i, a;
10780
10783
  switch (e) {
10781
- case Xt.sendMessageToRoom: {
10784
+ case Zt.sendMessageToRoom: {
10782
10785
  i = od.fromBinary.bind(od), a = od.create();
10783
10786
  break;
10784
10787
  }
10785
- case Xt.sendMessageToPeers: {
10788
+ case Zt.sendMessageToPeers: {
10786
10789
  i = ud.fromBinary.bind(ud), a = ud.create();
10787
10790
  break;
10788
10791
  }
10789
- case Xt.editMessage: {
10792
+ case Zt.editMessage: {
10790
10793
  i = qc.fromBinary.bind(qc), a = qc.create();
10791
10794
  break;
10792
10795
  }
10793
- case Xt.pinMessage: {
10796
+ case Zt.pinMessage: {
10794
10797
  i = Bc.fromBinary.bind(Bc), a = Bc.create();
10795
10798
  break;
10796
10799
  }
10797
- case Xt.deleteMessage: {
10800
+ case Zt.deleteMessage: {
10798
10801
  i = Wc.fromBinary.bind(Wc), a = Wc.create();
10799
10802
  break;
10800
10803
  }
@@ -10803,7 +10806,7 @@ var z = wc(J_, X_), Xt = wc(K_, Z_), Vi = wc(z_, x_), $i = wc(Q_, eA), ba = Ng(L
10803
10806
  this.logger.warn("ChatSocketHandler::Event ".concat(e, " is not recognized"));
10804
10807
  return;
10805
10808
  }
10806
- u(this, Vt)[Vt].on(e, function(o) {
10809
+ u(this, $t)[$t].on(e, function(o) {
10807
10810
  var c = o.payload, l = a;
10808
10811
  try {
10809
10812
  l = i(c);
@@ -12095,22 +12098,22 @@ var yA = Object.defineProperty, kA = Object.getOwnPropertyDescriptor, TA = funct
12095
12098
  return n.a(2);
12096
12099
  }
12097
12100
  }, t);
12098
- }))), this.chatSocketHandler.on(Xt.sendMessageToRoom, function(t) {
12101
+ }))), this.chatSocketHandler.on(Zt.sendMessageToRoom, function(t) {
12099
12102
  if (t.message) {
12100
12103
  var n = pa.formatSocketPeerMessage(t.message);
12101
12104
  e.chat.messages = [].concat(De(e.chat.messages), [n]), e.chat.emit("chatUpdate", { action: "add", message: n, messages: e.chat.messages });
12102
12105
  }
12103
- }), this.chatSocketHandler.on(Xt.sendMessageToPeers, function(t) {
12106
+ }), this.chatSocketHandler.on(Zt.sendMessageToPeers, function(t) {
12104
12107
  var n = pa.formatSocketPeerMessage(t.message);
12105
12108
  e.chat.messages = [].concat(De(e.chat.messages), [n]), e.chat.emit("chatUpdate", { action: "add", message: n, messages: e.chat.messages });
12106
- }), this.chatSocketHandler.on(Xt.editMessage, function(t) {
12109
+ }), this.chatSocketHandler.on(Zt.editMessage, function(t) {
12107
12110
  if (t.message) {
12108
12111
  var n = pa.formatSocketPeerMessage(t.message), i = e.chat.messages.findIndex(function(a) {
12109
12112
  return a.id === n.id;
12110
12113
  });
12111
12114
  i !== -1 && (e.chat.messages[i] = n), e.chat.emit("chatUpdate", { action: "edit", message: n, messages: e.chat.messages });
12112
12115
  }
12113
- }), this.chatSocketHandler.on(Xt.deleteMessage, function(t) {
12116
+ }), this.chatSocketHandler.on(Zt.deleteMessage, function(t) {
12114
12117
  var n = e.chat.messages.findIndex(function(c) {
12115
12118
  return c.id === t.chatId;
12116
12119
  }), i = { id: t.chatId };
@@ -12119,7 +12122,7 @@ var yA = Object.defineProperty, kA = Object.getOwnPropertyDescriptor, TA = funct
12119
12122
  i = o[0];
12120
12123
  }
12121
12124
  e.chat.emit("chatUpdate", { action: "delete", message: i, messages: e.chat.messages });
12122
- }), this.chatSocketHandler.on(Xt.pinMessage, function(t) {
12125
+ }), this.chatSocketHandler.on(Zt.pinMessage, function(t) {
12123
12126
  var n = e.chat.messages.findIndex(function(a) {
12124
12127
  return a.id === t.chatId;
12125
12128
  }), i = pa.formatSocketPeerMessage(t.message);
@@ -12595,9 +12598,9 @@ var VA = Object.defineProperty, $A = Object.getOwnPropertyDescriptor, jA = funct
12595
12598
  for (var i = n > 1 ? void 0 : n ? $A(e, t) : e, a = r.length - 1, o; a >= 0; a--)
12596
12599
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
12597
12600
  return n && i && VA(e, t, i), i;
12598
- }, eh = (nn = /* @__PURE__ */ w("self"), ea = /* @__PURE__ */ w("roomSocketHandler"), At = /* @__PURE__ */ w("context"), /* @__PURE__ */ function() {
12601
+ }, eh = (nn = /* @__PURE__ */ w("self"), ea = /* @__PURE__ */ w("roomSocketHandler"), It = /* @__PURE__ */ w("context"), /* @__PURE__ */ function() {
12599
12602
  function s(r, e, t, n, i, a) {
12600
- P(this, s), this.meta = void 0, this.ai = void 0, Object.defineProperty(this, nn, { writable: !0, value: void 0 }), Object.defineProperty(this, ea, { writable: !0, value: void 0 }), this.aiSocketHandler = void 0, Object.defineProperty(this, At, { writable: !0, value: void 0 }), u(this, At)[At] = r, this.meta = new xd(r, e, e.config.viewType, t, a), this.ai = n, u(this, nn)[nn] = e, u(this, ea)[ea] = t, this.aiSocketHandler = i, this.setupEvents();
12603
+ P(this, s), this.meta = void 0, this.ai = void 0, Object.defineProperty(this, nn, { writable: !0, value: void 0 }), Object.defineProperty(this, ea, { writable: !0, value: void 0 }), this.aiSocketHandler = void 0, Object.defineProperty(this, It, { writable: !0, value: void 0 }), u(this, It)[It] = r, this.meta = new xd(r, e, e.config.viewType, t, a), this.ai = n, u(this, nn)[nn] = e, u(this, ea)[ea] = t, this.aiSocketHandler = i, this.setupEvents();
12601
12604
  }
12602
12605
  return S(s, [{
12603
12606
  key: "telemetry",
@@ -12607,7 +12610,7 @@ var VA = Object.defineProperty, $A = Object.getOwnPropertyDescriptor, jA = funct
12607
12610
  * Not for external use
12608
12611
  */
12609
12612
  function() {
12610
- return u(this, At)[At].getValue("telemetry");
12613
+ return u(this, It)[It].getValue("telemetry");
12611
12614
  }
12612
12615
  )
12613
12616
  /**
@@ -12615,26 +12618,26 @@ var VA = Object.defineProperty, $A = Object.getOwnPropertyDescriptor, jA = funct
12615
12618
  * Not for external use
12616
12619
  */
12617
12620
  }, { key: "logger", get: function() {
12618
- return u(this, At)[At].getValue("logger");
12621
+ return u(this, It)[It].getValue("logger");
12619
12622
  } }, { key: "conditionallySetActiveTab", value: function(e) {
12620
12623
  var t;
12621
12624
  e != null && e.currentTab && ((t = this.meta.selfActiveTab) === null || t === void 0 ? void 0 : t.id) !== e.currentTab.id && (this.meta.setSelfActiveTab(e.currentTab, jg.Meeting), this.meta.emit("activeTabUpdate", e.currentTab));
12622
12625
  } }, { key: "setupEvents", value: function() {
12623
12626
  var e = this;
12624
- u(this, At)[At].getValue("peerSessionStore").on($.TRANSPORT_STATE_UPDATE, function(t) {
12627
+ u(this, It)[It].getValue("peerSessionStore").on($.TRANSPORT_STATE_UPDATE, function(t) {
12625
12628
  e.meta.emit("mediaConnectionUpdate", t);
12626
- }), u(this, At)[At].getValue("peerSessionStore").on($.SOCKET_STATE_UPDATE, function(t) {
12629
+ }), u(this, It)[It].getValue("peerSessionStore").on($.SOCKET_STATE_UPDATE, function(t) {
12627
12630
  e.meta.emit("socketConnectionUpdate", t);
12628
- }), u(this, At)[At].getValue("peerSessionStore").on($.ROOM_STATE, function(t) {
12631
+ }), u(this, It)[It].getValue("peerSessionStore").on($.ROOM_STATE, function(t) {
12629
12632
  var n = t.createdAt, i = t.roomUuid, a = e.meta.meetingStartedTimestamp;
12630
12633
  if (i && (e.meta.sessionId = i), n && !a) {
12631
12634
  var o = new Date(n * 1e3);
12632
12635
  e.meta.meetingStartedTimestamp = o, e.meta.emit("meetingStartTimeUpdate", { meetingStartedTimestamp: e.meta.meetingStartedTimestamp });
12633
12636
  }
12634
- }), u(this, At)[At].getValue("peerSessionStore").on($.PRODUCER_SCORE_UPDATE, function(t) {
12637
+ }), u(this, It)[It].getValue("peerSessionStore").on($.PRODUCER_SCORE_UPDATE, function(t) {
12635
12638
  var n = t.score;
12636
12639
  n < 5 && e.meta.emit("poorConnection", { score: n });
12637
- }), u(this, nn)[nn].permissions.canSpotlight && this.meta.selfActiveTab && (this.logger.info("Asserting Spotlight status to other peers."), u(this, ea)[ea].broadcastMessage("spotlight", { userId: u(this, nn)[nn].userId, currentTab: this.meta.selfActiveTab })), u(this, At)[At].getValue("peerSessionStore").on($.PEER_JOINED_INTERNAL, /* @__PURE__ */ function() {
12640
+ }), u(this, nn)[nn].permissions.canSpotlight && this.meta.selfActiveTab && (this.logger.info("Asserting Spotlight status to other peers."), u(this, ea)[ea].broadcastMessage("spotlight", { userId: u(this, nn)[nn].userId, currentTab: this.meta.selfActiveTab })), u(this, It)[It].getValue("peerSessionStore").on($.PEER_JOINED_INTERNAL, /* @__PURE__ */ function() {
12638
12641
  var t = m(/* @__PURE__ */ h().m(function n(i) {
12639
12642
  return h().w(function(a) {
12640
12643
  for (; ; )
@@ -12649,7 +12652,7 @@ var VA = Object.defineProperty, $A = Object.getOwnPropertyDescriptor, jA = funct
12649
12652
  return function(n) {
12650
12653
  return t.apply(this, arguments);
12651
12654
  };
12652
- }()), u(this, At)[At].getValue("peerSessionStore").on($.ROOM_MESSAGE, function(t) {
12655
+ }()), u(this, It)[It].getValue("peerSessionStore").on($.ROOM_MESSAGE, function(t) {
12653
12656
  var n, i, a;
12654
12657
  if ("type" in t) {
12655
12658
  if (t.type !== "spotlight")
@@ -12662,7 +12665,7 @@ var VA = Object.defineProperty, $A = Object.getOwnPropertyDescriptor, jA = funct
12662
12665
  } else
12663
12666
  return;
12664
12667
  e.logger.info("Spotlight Assertion Received", { spotlight: { spotlighter: { id: a.userId }, currentTab: { id: (n = a.currentTab) === null || n === void 0 ? void 0 : n.id, type: (i = a.currentTab) === null || i === void 0 ? void 0 : i.type } } }), e.conditionallySetActiveTab(a);
12665
- }), u(this, At)[At].getValue("peerSessionStore").on($.MESSAGE, function(t) {
12668
+ }), u(this, It)[It].getValue("peerSessionStore").on($.MESSAGE, function(t) {
12666
12669
  var n, i, a;
12667
12670
  if ("type" in t) {
12668
12671
  if (t.type !== "spotlight")
@@ -12762,12 +12765,12 @@ var ru = {}, Qi = {
12762
12765
  for (var i = n > 1 ? void 0 : n ? FA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
12763
12766
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
12764
12767
  return n && i && UA(e, t, i), i;
12765
- }, Kt = /* @__PURE__ */ w("stageSocketHandler"), dd = /* @__PURE__ */ w("roomSocketHandler"), ie = /* @__PURE__ */ w("self"), nu = /* @__PURE__ */ w("participants"), hr = /* @__PURE__ */ w("stageRequests"), Be = /* @__PURE__ */ w("context"), iu = /* @__PURE__ */ w("roomNodeClient"), hs = /* @__PURE__ */ w("setStatus"), Da = /* @__PURE__ */ function(s) {
12768
+ }, zt = /* @__PURE__ */ w("stageSocketHandler"), dd = /* @__PURE__ */ w("roomSocketHandler"), ie = /* @__PURE__ */ w("self"), nu = /* @__PURE__ */ w("participants"), hr = /* @__PURE__ */ w("stageRequests"), Be = /* @__PURE__ */ w("context"), iu = /* @__PURE__ */ w("roomNodeClient"), hs = /* @__PURE__ */ w("setStatus"), Da = /* @__PURE__ */ function(s) {
12766
12769
  function r(e, t, n, i, a) {
12767
12770
  var o;
12768
12771
  P(this, r);
12769
12772
  var c = e.getValue("logger");
12770
- return o = C(this, r, [c]), Object.defineProperty(o, hs, { value: BA }), Object.defineProperty(o, iu, { get: HA, set: void 0 }), Object.defineProperty(o, Kt, { writable: !0, value: void 0 }), Object.defineProperty(o, dd, { writable: !0, value: void 0 }), Object.defineProperty(o, ie, { writable: !0, value: void 0 }), Object.defineProperty(o, nu, { writable: !0, value: void 0 }), Object.defineProperty(o, hr, { writable: !0, value: void 0 }), Object.defineProperty(o, Be, { writable: !0, value: void 0 }), u(o, Be)[Be] = e, u(o, Kt)[Kt] = i, u(o, dd)[dd] = a, u(o, ie)[ie] = t, u(o, nu)[nu] = n, u(o, hr)[hr] = [], o.setupEvents(), o;
12773
+ return o = C(this, r, [c]), Object.defineProperty(o, hs, { value: BA }), Object.defineProperty(o, iu, { get: HA, set: void 0 }), Object.defineProperty(o, zt, { writable: !0, value: void 0 }), Object.defineProperty(o, dd, { writable: !0, value: void 0 }), Object.defineProperty(o, ie, { writable: !0, value: void 0 }), Object.defineProperty(o, nu, { writable: !0, value: void 0 }), Object.defineProperty(o, hr, { writable: !0, value: void 0 }), Object.defineProperty(o, Be, { writable: !0, value: void 0 }), u(o, Be)[Be] = e, u(o, zt)[zt] = i, u(o, dd)[dd] = a, u(o, ie)[ie] = t, u(o, nu)[nu] = n, u(o, hr)[hr] = [], o.setupEvents(), o;
12771
12774
  }
12772
12775
  return R(r, s), S(r, [{ key: "telemetry", get: (
12773
12776
  /**
@@ -12836,7 +12839,7 @@ var ru = {}, Qi = {
12836
12839
  };
12837
12840
  u(this, ie)[ie].permissions.on("permissionsUpdate", function(o) {
12838
12841
  var c = o.canAcceptProductionRequests;
12839
- c !== void 0 && (u(t, ie)[ie].permissions.acceptStageRequests ? (i(), u(t, Kt)[Kt].getStageRequests()) : (a(), u(t, hr)[hr] = [], t.emit("stageAccessRequestUpdate", u(t, hr)[hr])));
12842
+ c !== void 0 && (u(t, ie)[ie].permissions.acceptStageRequests ? (i(), u(t, zt)[zt].getStageRequests()) : (a(), u(t, hr)[hr] = [], t.emit("stageAccessRequestUpdate", u(t, hr)[hr])));
12840
12843
  }), u(this, ie)[ie].permissions.acceptStageRequests && i();
12841
12844
  }
12842
12845
  ) }, { key: "getAccessRequests", value: function() {
@@ -12874,7 +12877,7 @@ var ru = {}, Qi = {
12874
12877
  }
12875
12878
  return u(this, hs)[hs]("ACCEPTED_TO_JOIN_STAGE"), i.a(2);
12876
12879
  case 3:
12877
- u(this, Kt)[Kt].requestAccess(), u(this, hs)[hs]("REQUESTED_TO_JOIN_STAGE");
12880
+ u(this, zt)[zt].requestAccess(), u(this, hs)[hs]("REQUESTED_TO_JOIN_STAGE");
12878
12881
  case 4:
12879
12882
  return i.a(2);
12880
12883
  }
@@ -12898,7 +12901,7 @@ var ru = {}, Qi = {
12898
12901
  }
12899
12902
  throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
12900
12903
  case 1:
12901
- u(this, Kt)[Kt].cancelRequestAccess(), u(this, hs)[hs]("OFF_STAGE");
12904
+ u(this, zt)[zt].cancelRequestAccess(), u(this, hs)[hs]("OFF_STAGE");
12902
12905
  case 2:
12903
12906
  return i.a(2);
12904
12907
  }
@@ -12921,7 +12924,7 @@ var ru = {}, Qi = {
12921
12924
  throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
12922
12925
  if (!u(this, ie)[ie].permissions.acceptStageRequests)
12923
12926
  throw this.logger.error("Stage::grant_access::permission_denied"), new j("You do not have permission to perform this action", "2001");
12924
- return u(this, Kt)[Kt].grantAccess(t);
12927
+ return u(this, zt)[zt].grantAccess(t);
12925
12928
  }
12926
12929
  /**
12927
12930
  * @param {string[]} userIds
@@ -12935,7 +12938,7 @@ var ru = {}, Qi = {
12935
12938
  throw this.logger.error("Stage::stage_disabled"), new j("Stage is disabled", "2003");
12936
12939
  if (!u(this, ie)[ie].permissions.acceptStageRequests)
12937
12940
  throw this.logger.error("Stage::deny_access::permission_denied"), new j("You do not have permission to perform this action", "2001");
12938
- return u(this, Kt)[Kt].denyAccess(t);
12941
+ return u(this, zt)[zt].denyAccess(t);
12939
12942
  }
12940
12943
  /**
12941
12944
  * Returns the peerId of the current user
@@ -12961,7 +12964,7 @@ var ru = {}, Qi = {
12961
12964
  }
12962
12965
  throw new j("Unable to join stage you are currently ".concat(this.status), "2006");
12963
12966
  case 2:
12964
- return u(this, Be)[Be].setValue("stageStatus", "ON_STAGE", !1), a.n = 3, u(this, Kt)[Kt].joinStage();
12967
+ return u(this, Be)[Be].setValue("stageStatus", "ON_STAGE", !1), a.n = 3, u(this, zt)[zt].joinStage();
12965
12968
  case 3:
12966
12969
  if (i !== oi.Livestream) {
12967
12970
  a.n = 5;
@@ -13002,7 +13005,7 @@ var ru = {}, Qi = {
13002
13005
  }
13003
13006
  throw new j("Unable to leave stage you are currently ".concat(this.status), "2006");
13004
13007
  case 2:
13005
- return u(this, ie)[ie].setIsPinned(!1), u(this, Be)[Be].setValue("stageStatus", "OFF_STAGE", !1), a.n = 3, u(this, Kt)[Kt].leaveStage(u(this, ie)[ie].userId);
13008
+ return u(this, ie)[ie].setIsPinned(!1), u(this, Be)[Be].setValue("stageStatus", "OFF_STAGE", !1), a.n = 3, u(this, zt)[zt].leaveStage(u(this, ie)[ie].userId);
13006
13009
  case 3:
13007
13010
  return a.p = 3, a.n = 4, u(this, Be)[Be].getValue("peerSessionStore").emitAsync($.LEAVE_MEDIA_ROOM, "stageLeft");
13008
13011
  case 4:
@@ -13052,7 +13055,7 @@ var ru = {}, Qi = {
13052
13055
  }
13053
13056
  throw this.logger.error("Stage::kick::permission_denied"), new j("You do not have permissions for kick", "2001");
13054
13057
  case 3:
13055
- return a.a(2, u(this, Kt)[Kt].kick(i));
13058
+ return a.a(2, u(this, zt)[zt].kick(i));
13056
13059
  }
13057
13060
  }, n, this);
13058
13061
  }));
@@ -13479,9 +13482,9 @@ var ZA = Object.defineProperty, xA = Object.getOwnPropertyDescriptor, eI = funct
13479
13482
  for (var i = n > 1 ? void 0 : n ? xA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
13480
13483
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
13481
13484
  return n && i && ZA(e, t, i), i;
13482
- }, qg = (er = /* @__PURE__ */ w("activePluginsStore"), Pa = /* @__PURE__ */ w("storesManager"), sn = /* @__PURE__ */ w("context"), ri = /* @__PURE__ */ w("socketStateCleanup"), Rc = /* @__PURE__ */ w("createStoreOnSocketConnected"), Ro = /* @__PURE__ */ w("removeSocketStateListener"), _o = /* @__PURE__ */ w("syncActivePlugins"), Ao = /* @__PURE__ */ w("subscribeToStore"), /* @__PURE__ */ function() {
13485
+ }, qg = (tr = /* @__PURE__ */ w("activePluginsStore"), Pa = /* @__PURE__ */ w("storesManager"), sn = /* @__PURE__ */ w("context"), ri = /* @__PURE__ */ w("socketStateCleanup"), Rc = /* @__PURE__ */ w("createStoreOnSocketConnected"), Ro = /* @__PURE__ */ w("removeSocketStateListener"), _o = /* @__PURE__ */ w("syncActivePlugins"), Ao = /* @__PURE__ */ w("subscribeToStore"), /* @__PURE__ */ function() {
13483
13486
  function s(r, e, t, n) {
13484
- P(this, s), Object.defineProperty(this, Ao, { value: iI }), Object.defineProperty(this, _o, { value: nI }), Object.defineProperty(this, Ro, { value: rI }), Object.defineProperty(this, Rc, { value: tI }), this.plugins = void 0, Object.defineProperty(this, er, { writable: !0, value: void 0 }), Object.defineProperty(this, Pa, { writable: !0, value: void 0 }), Object.defineProperty(this, sn, { writable: !0, value: void 0 }), Object.defineProperty(this, ri, { writable: !0, value: null }), u(this, sn)[sn] = r, this.plugins = e, u(this, Pa)[Pa] = t, u(this, er)[er] = n, this.setupEvents();
13487
+ P(this, s), Object.defineProperty(this, Ao, { value: iI }), Object.defineProperty(this, _o, { value: nI }), Object.defineProperty(this, Ro, { value: rI }), Object.defineProperty(this, Rc, { value: tI }), this.plugins = void 0, Object.defineProperty(this, tr, { writable: !0, value: void 0 }), Object.defineProperty(this, Pa, { writable: !0, value: void 0 }), Object.defineProperty(this, sn, { writable: !0, value: void 0 }), Object.defineProperty(this, ri, { writable: !0, value: null }), u(this, sn)[sn] = r, this.plugins = e, u(this, Pa)[Pa] = t, u(this, tr)[tr] = n, this.setupEvents();
13485
13488
  }
13486
13489
  return S(s, [{
13487
13490
  key: "telemetry",
@@ -13519,7 +13522,7 @@ var ZA = Object.defineProperty, xA = Object.getOwnPropertyDescriptor, eI = funct
13519
13522
  case 0:
13520
13523
  if (a = (n = (i = e.plugins.active) === null || i === void 0 ? void 0 : i.toArray()) !== null && n !== void 0 ? n : [], a.forEach(function(c) {
13521
13524
  c.deactivateForSelf();
13522
- }), u(e, er)[er]) {
13525
+ }), u(e, tr)[tr]) {
13523
13526
  o.n = 1;
13524
13527
  break;
13525
13528
  }
@@ -13578,7 +13581,7 @@ function tI() {
13578
13581
  }
13579
13582
  return o.a(2);
13580
13583
  case 1:
13581
- if (!u(s, er)[er]) {
13584
+ if (!u(s, tr)[tr]) {
13582
13585
  o.n = 2;
13583
13586
  break;
13584
13587
  }
@@ -13586,8 +13589,8 @@ function tI() {
13586
13589
  case 2:
13587
13590
  return o.p = 2, o.n = 3, u(s, Pa)[Pa].create(dp, !0);
13588
13591
  case 3:
13589
- return u(s, er)[er] = o.v, u(s, Ro)[Ro](), s.plugins.all.toArray().forEach(function(c) {
13590
- c.activePluginsStore = u(s, er)[er];
13592
+ return u(s, tr)[tr] = o.v, u(s, Ro)[Ro](), s.plugins.all.toArray().forEach(function(c) {
13593
+ c.activePluginsStore = u(s, tr)[tr];
13591
13594
  }), u(s, Ao)[Ao](), s.logger.info("Active plugins store created after socket connected"), o.n = 4, u(s, _o)[_o]();
13592
13595
  case 4:
13593
13596
  o.n = 6;
@@ -13620,14 +13623,14 @@ function nh() {
13620
13623
  for (; ; )
13621
13624
  switch (n.p = n.n) {
13622
13625
  case 0:
13623
- return n.p = 0, n.n = 1, u(this, Pa)[Pa].refresh(u(this, er)[er].name);
13626
+ return n.p = 0, n.n = 1, u(this, Pa)[Pa].refresh(u(this, tr)[tr].name);
13624
13627
  case 1:
13625
13628
  n.n = 3;
13626
13629
  break;
13627
13630
  case 2:
13628
13631
  n.p = 2, t = n.v, this.logger.error("Failed to refresh active plugins store, syncing from stale data.", { error: t });
13629
13632
  case 3:
13630
- e = u(this, er)[er].getAll(), Object.entries(e).forEach(function(i) {
13633
+ e = u(this, tr)[tr].getAll(), Object.entries(e).forEach(function(i) {
13631
13634
  var a = Fe(i, 2), o = a[0], c = a[1];
13632
13635
  if (c) {
13633
13636
  var l = r.plugins.all.get(o);
@@ -13646,7 +13649,7 @@ function nh() {
13646
13649
  }
13647
13650
  function iI() {
13648
13651
  var s = this;
13649
- u(this, er)[er].subscribe("*", function(r) {
13652
+ u(this, tr)[tr].subscribe("*", function(r) {
13650
13653
  Object.entries(r).forEach(function(e) {
13651
13654
  var t = Fe(e, 2), n = t[0], i = t[1], a = s.plugins.all.get(n);
13652
13655
  if (!a) {
@@ -14001,12 +14004,12 @@ var mi = /* @__PURE__ */ w("context"), hI = /* @__PURE__ */ function() {
14001
14004
  for (var i = n > 1 ? void 0 : n ? gI(e, t) : e, a = r.length - 1, o; a >= 0; a--)
14002
14005
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
14003
14006
  return n && i && fI(e, t, i), i;
14004
- }, Oe = /* @__PURE__ */ w("mediaInterface"), ge = /* @__PURE__ */ w("audioMediaHandler"), fe = /* @__PURE__ */ w("videoMediaHandler"), Vr = /* @__PURE__ */ w("audioOutputMediaHandler"), zt = /* @__PURE__ */ w("screenShareMediaHandler"), ou = /* @__PURE__ */ w("autoSwitchDevice"), we = /* @__PURE__ */ w("context"), Rr = /* @__PURE__ */ function(s) {
14007
+ }, Oe = /* @__PURE__ */ w("mediaInterface"), ge = /* @__PURE__ */ w("audioMediaHandler"), fe = /* @__PURE__ */ w("videoMediaHandler"), Vr = /* @__PURE__ */ w("audioOutputMediaHandler"), Qt = /* @__PURE__ */ w("screenShareMediaHandler"), ou = /* @__PURE__ */ w("autoSwitchDevice"), we = /* @__PURE__ */ w("context"), Rr = /* @__PURE__ */ function(s) {
14005
14008
  function r(e, t) {
14006
14009
  var n, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : kl, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0;
14007
14010
  P(this, r);
14008
14011
  var o = e.getValue("logger");
14009
- return n = C(this, r, [o]), Object.defineProperty(n, Oe, { writable: !0, value: void 0 }), Object.defineProperty(n, ge, { writable: !0, value: void 0 }), Object.defineProperty(n, fe, { writable: !0, value: void 0 }), Object.defineProperty(n, Vr, { writable: !0, value: void 0 }), Object.defineProperty(n, zt, { writable: !0, value: void 0 }), Object.defineProperty(n, ou, { writable: !0, value: void 0 }), Object.defineProperty(n, we, { writable: !0, value: void 0 }), n.audioUpdateInProgress = void 0, n.videoUpdateInProgress = void 0, u(n, we)[we] = e, n.audioUpdateInProgress = !1, n.videoUpdateInProgress = !1, u(n, Oe)[Oe] = new Jg(e, t), u(n, ge)[ge] = new FI(e, u(n, Oe)[Oe], void 0, i), u(n, fe)[fe] = new KI(e, u(n, Oe)[Oe], void 0, i), u(n, zt)[zt] = new WI(u(n, we)[we], u(n, Oe)[Oe]), u(n, Vr)[Vr] = new BI(e, u(n, Oe)[Oe]), u(n, ou)[ou] = a, u(n, ge)[ge].on("trackMuted", n.onAudioTrackMuted.bind(n)), u(n, ge)[ge].on("trackChanged", n.onAudioTrackChanged.bind(n)), u(n, fe)[fe].on("trackChanged", n.onVideoTrackChanged.bind(n)), u(n, fe)[fe].on("trackEnded", n.onVideoTrackEnded.bind(n)), u(n, zt)[zt].on("trackEnded", n.onScreenShareEnded.bind(n)), n.onVisibilityChange = n.onVisibilityChange.bind(n), document.addEventListener("visibilitychange", n.onVisibilityChange), n;
14012
+ return n = C(this, r, [o]), Object.defineProperty(n, Oe, { writable: !0, value: void 0 }), Object.defineProperty(n, ge, { writable: !0, value: void 0 }), Object.defineProperty(n, fe, { writable: !0, value: void 0 }), Object.defineProperty(n, Vr, { writable: !0, value: void 0 }), Object.defineProperty(n, Qt, { writable: !0, value: void 0 }), Object.defineProperty(n, ou, { writable: !0, value: void 0 }), Object.defineProperty(n, we, { writable: !0, value: void 0 }), n.audioUpdateInProgress = void 0, n.videoUpdateInProgress = void 0, u(n, we)[we] = e, n.audioUpdateInProgress = !1, n.videoUpdateInProgress = !1, u(n, Oe)[Oe] = new Jg(e, t), u(n, ge)[ge] = new FI(e, u(n, Oe)[Oe], void 0, i), u(n, fe)[fe] = new KI(e, u(n, Oe)[Oe], void 0, i), u(n, Qt)[Qt] = new WI(u(n, we)[we], u(n, Oe)[Oe]), u(n, Vr)[Vr] = new BI(e, u(n, Oe)[Oe]), u(n, ou)[ou] = a, u(n, ge)[ge].on("trackMuted", n.onAudioTrackMuted.bind(n)), u(n, ge)[ge].on("trackChanged", n.onAudioTrackChanged.bind(n)), u(n, fe)[fe].on("trackChanged", n.onVideoTrackChanged.bind(n)), u(n, fe)[fe].on("trackEnded", n.onVideoTrackEnded.bind(n)), u(n, Qt)[Qt].on("trackEnded", n.onScreenShareEnded.bind(n)), n.onVisibilityChange = n.onVisibilityChange.bind(n), document.addEventListener("visibilitychange", n.onVisibilityChange), n;
14010
14013
  }
14011
14014
  return R(r, s), S(r, [{ key: "telemetry", get: (
14012
14015
  /**
@@ -14381,16 +14384,16 @@ var mi = /* @__PURE__ */ w("context"), hI = /* @__PURE__ */ function() {
14381
14384
  }, { key: "onScreenShareEnded", value: function() {
14382
14385
  this.emit("SCREENSHARE_ENDED");
14383
14386
  } }, { key: "screenShareTracks", get: function() {
14384
- return { audio: u(this, zt)[zt].audioMediaTrack, video: u(this, zt)[zt].videoMediaTrack };
14387
+ return { audio: u(this, Qt)[Qt].audioMediaTrack, video: u(this, Qt)[Qt].videoMediaTrack };
14385
14388
  } }, { key: "screenShareEnabled", get: function() {
14386
- return u(this, zt)[zt].trackEnabled;
14389
+ return u(this, Qt)[Qt].trackEnabled;
14387
14390
  } }, { key: "enableScreenShare", value: function() {
14388
14391
  var e = m(/* @__PURE__ */ h().m(function n() {
14389
14392
  return h().w(function(i) {
14390
14393
  for (; ; )
14391
14394
  switch (i.n) {
14392
14395
  case 0:
14393
- return i.n = 1, u(this, zt)[zt].enableScreenShare();
14396
+ return i.n = 1, u(this, Qt)[Qt].enableScreenShare();
14394
14397
  case 1:
14395
14398
  return i.a(2);
14396
14399
  }
@@ -14406,7 +14409,7 @@ var mi = /* @__PURE__ */ w("context"), hI = /* @__PURE__ */ function() {
14406
14409
  for (; ; )
14407
14410
  switch (i.n) {
14408
14411
  case 0:
14409
- u(this, zt)[zt].disableScreenShare();
14412
+ u(this, Qt)[Qt].disableScreenShare();
14410
14413
  case 1:
14411
14414
  return i.a(2);
14412
14415
  }
@@ -14422,7 +14425,7 @@ var mi = /* @__PURE__ */ w("context"), hI = /* @__PURE__ */ function() {
14422
14425
  for (; ; )
14423
14426
  switch (a.n) {
14424
14427
  case 0:
14425
- return a.n = 1, u(this, zt)[zt].updateConstraints(i);
14428
+ return a.n = 1, u(this, Qt)[Qt].updateConstraints(i);
14426
14429
  case 1:
14427
14430
  return a.a(2);
14428
14431
  }
@@ -14455,7 +14458,7 @@ var mi = /* @__PURE__ */ w("context"), hI = /* @__PURE__ */ function() {
14455
14458
  } }, { key: "setVideoMiddlewareGlobalConfig", value: function(t) {
14456
14459
  return u(this, fe)[fe].setVideoMiddlewareGlobalConfig(t);
14457
14460
  } }, { key: "destruct", value: function() {
14458
- u(this, ge)[ge].disableTrack(), u(this, fe)[fe].disableTrack(), u(this, fe)[fe].terminateMiddlewareWebWorker(), u(this, zt)[zt].disableScreenShare(), u(this, Oe)[Oe].destruct();
14461
+ u(this, ge)[ge].disableTrack(), u(this, fe)[fe].disableTrack(), u(this, fe)[fe].terminateMiddlewareWebWorker(), u(this, Qt)[Qt].disableScreenShare(), u(this, Oe)[Oe].destruct();
14459
14462
  } }, {
14460
14463
  key: "onDeviceChange",
14461
14464
  value: function() {
@@ -14941,10 +14944,10 @@ var ki = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
14941
14944
  for (var i = n > 1 ? void 0 : n ? _I(e, t) : e, a = r.length - 1, o; a >= 0; a--)
14942
14945
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
14943
14946
  return n && i && RI(e, t, i), i;
14944
- }, Zr = (na = /* @__PURE__ */ w("deviceChangeAbortController"), Bt = /* @__PURE__ */ w("constraintsBuilder"), Ne = /* @__PURE__ */ w("context"), /* @__PURE__ */ function(s) {
14947
+ }, Zr = (na = /* @__PURE__ */ w("deviceChangeAbortController"), qt = /* @__PURE__ */ w("constraintsBuilder"), Ne = /* @__PURE__ */ w("context"), /* @__PURE__ */ function(s) {
14945
14948
  function r(e, t) {
14946
14949
  var n;
14947
- return P(this, r), n = C(this, r), Object.defineProperty(n, na, { writable: !0, value: void 0 }), Object.defineProperty(n, Bt, { writable: !0, value: void 0 }), Object.defineProperty(n, Ne, { writable: !0, value: void 0 }), u(n, Ne)[Ne] = e, u(n, Bt)[Bt] = new EI(e, t), u(n, na)[na] = new AbortController(), n;
14950
+ return P(this, r), n = C(this, r), Object.defineProperty(n, na, { writable: !0, value: void 0 }), Object.defineProperty(n, qt, { writable: !0, value: void 0 }), Object.defineProperty(n, Ne, { writable: !0, value: void 0 }), u(n, Ne)[Ne] = e, u(n, qt)[qt] = new EI(e, t), u(n, na)[na] = new AbortController(), n;
14948
14951
  }
14949
14952
  return R(r, s), S(r, [{
14950
14953
  key: "telemetry",
@@ -14964,7 +14967,7 @@ var ki = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
14964
14967
  }, { key: "logger", get: function() {
14965
14968
  return u(this, Ne)[Ne].getValue("logger");
14966
14969
  } }, { key: "constraintsBuilder", get: function() {
14967
- return u(this, Bt)[Bt];
14970
+ return u(this, qt)[qt];
14968
14971
  } }, { key: "destruct", value: function() {
14969
14972
  var e = m(/* @__PURE__ */ h().m(function n() {
14970
14973
  var i;
@@ -15000,7 +15003,7 @@ var ki = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15000
15003
  return q.deviceId === i;
15001
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) {
15002
15005
  return q.deviceId === a;
15003
- })), 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, Bt)[Bt].getAudioConstraints(v).audio, video: u(this, Bt)[Bt].getVideoConstraints(y).video }, this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", { constraints: JSON.stringify(b) }), L.n = 3, navigator.mediaDevices.getUserMedia(b);
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);
15004
15007
  case 3:
15005
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")) {
15006
15009
  L.n = 6;
@@ -15052,7 +15055,7 @@ var ki = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15052
15055
  case 0:
15053
15056
  return U.p = 0, p = p.filter(function(Z) {
15054
15057
  return Z.deviceId !== M;
15055
- }), _ = u(d, Bt)[Bt].getAudioConstraints(M), d.logger.info("getUserMediaWithoutTimeout::requesting_user_media", { constraints: JSON.stringify(_) }), U.n = 1, navigator.mediaDevices.getUserMedia(_);
15058
+ }), _ = u(d, qt)[qt].getAudioConstraints(M), d.logger.info("getUserMediaWithoutTimeout::requesting_user_media", { constraints: JSON.stringify(_) }), U.n = 1, navigator.mediaDevices.getUserMedia(_);
15056
15059
  case 1:
15057
15060
  return O = U.v.getAudioTracks(), L = Fe(O, 1), q = L[0], d.logger.info("getUserMediaWithoutTimeout::received_user_media", { constraints: JSON.stringify(_) }), U.a(2, q);
15058
15061
  case 2:
@@ -15066,7 +15069,7 @@ var ki = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15066
15069
  }
15067
15070
  throw Y;
15068
15071
  case 3:
15069
- return d.logger.info("getAudioTrack::gum_failed", { constraints: JSON.stringify(_), error: N }), J = u(d, Bt)[Bt].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, y(H.deviceId));
15070
15073
  case 4:
15071
15074
  throw Y;
15072
15075
  case 5:
@@ -15127,7 +15130,7 @@ var ki = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15127
15130
  return _.deviceId === i;
15128
15131
  })), i && p ? v = i : (o = d[0]) !== null && o !== void 0 && o.deviceId && (v = (f = d[0]) === null || f === void 0 ? void 0 : f.deviceId), g = /* @__PURE__ */ function() {
15129
15132
  var _ = m(/* @__PURE__ */ h().m(function O(L) {
15130
- var q, X, Y, H, J, N, U, Z, le, Re, pe, Le, Q, Dt, Pt;
15133
+ var q, X, Y, H, J, N, U, Z, le, Re, pe, Le, Q, Lt, Pt;
15131
15134
  return h().w(function(dt) {
15132
15135
  for (; ; )
15133
15136
  switch (dt.p = dt.n) {
@@ -15146,7 +15149,7 @@ var ki = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15146
15149
  }
15147
15150
  throw Le;
15148
15151
  case 3:
15149
- return c.logger.info("getVideoTrack::gum_failed", { constraints: JSON.stringify(L), error: Pt }), Dt = u(c, Bt)[Bt].getVideoConstraints(Q.deviceId), c.logger.info("getVideoTrack::retrying_gum_for_next_device", { constraints: JSON.stringify(Dt) }), dt.a(2, g({ video: Dt.video }));
15152
+ return c.logger.info("getVideoTrack::gum_failed", { constraints: JSON.stringify(L), error: Pt }), Lt = u(c, qt)[qt].getVideoConstraints(Q.deviceId), c.logger.info("getVideoTrack::retrying_gum_for_next_device", { constraints: JSON.stringify(Lt) }), dt.a(2, g({ video: Lt.video }));
15150
15153
  case 4:
15151
15154
  throw Le;
15152
15155
  case 5:
@@ -15157,7 +15160,7 @@ var ki = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15157
15160
  return function(L) {
15158
15161
  return _.apply(this, arguments);
15159
15162
  };
15160
- }(), M.p = 7, y = u(this, Bt)[Bt].getVideoConstraints(v), M.n = 8, g(y);
15163
+ }(), M.p = 7, y = u(this, qt)[qt].getVideoConstraints(v), M.n = 8, g(y);
15161
15164
  case 8:
15162
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);
15163
15166
  case 9:
@@ -15210,7 +15213,7 @@ var ki = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15210
15213
  return function(f) {
15211
15214
  return p.apply(this, arguments);
15212
15215
  };
15213
- }(), d.p = 1, o = u(this, Bt)[Bt].getScreenShareConstraints(), d.n = 2, a(o);
15216
+ }(), d.p = 1, o = u(this, qt)[qt].getScreenShareConstraints(), d.n = 2, a(o);
15214
15217
  case 2:
15215
15218
  return c = d.v, this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", u(this, Ne)[Ne].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_UPDATE, { message: this.permissions.screenshare, kind: "screenshare" })), d.a(2, { audioTrack: c.getAudioTracks()[0], videoTrack: c.getVideoTracks()[0] });
15216
15219
  case 3:
@@ -17232,20 +17235,20 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17232
17235
  for (var i = n > 1 ? void 0 : n ? oM(e, t) : e, a = r.length - 1, o; a >= 0; a--)
17233
17236
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
17234
17237
  return n && i && sM(e, t, i), i;
17235
- }, uM = 0.8, cM = 1.2, Wi = (ia = /* @__PURE__ */ w("isPinned"), aa = /* @__PURE__ */ w("stageStatus"), Ot = /* @__PURE__ */ w("context"), zn = /* @__PURE__ */ w("roomNodeClient"), vn = /* @__PURE__ */ w("audioPlayback"), Qn = /* @__PURE__ */ w("mediaJoined"), _c = /* @__PURE__ */ w("socketJoined"), st = /* @__PURE__ */ w("self"), uo = /* @__PURE__ */ w("roomSocketHandler"), on = /* @__PURE__ */ w("videoElements"), Yn = /* @__PURE__ */ w("pip"), Sr = /* @__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, Wi = (ia = /* @__PURE__ */ w("isPinned"), aa = /* @__PURE__ */ w("stageStatus"), Dt = /* @__PURE__ */ w("context"), zn = /* @__PURE__ */ w("roomNodeClient"), vn = /* @__PURE__ */ w("audioPlayback"), Qn = /* @__PURE__ */ w("mediaJoined"), _c = /* @__PURE__ */ w("socketJoined"), st = /* @__PURE__ */ w("self"), uo = /* @__PURE__ */ w("roomSocketHandler"), on = /* @__PURE__ */ w("videoElements"), Yn = /* @__PURE__ */ w("pip"), Sr = /* @__PURE__ */ w("maxSpatialLayer"), Ac = /* @__PURE__ */ w("videoDimensionsUpdated"), co = /* @__PURE__ */ w("updateVideos"), Ic = /* @__PURE__ */ w("updateAudio"), Mc = /* @__PURE__ */ w("updateScreenShare"), /* @__PURE__ */ function(s) {
17236
17239
  function r(e, t, n, i) {
17237
17240
  var a;
17238
17241
  P(this, r);
17239
17242
  var o = e.getValue("logger");
17240
- 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, Yn, { get: vM, set: void 0 }), Object.defineProperty(a, _c, { get: pM, set: void 0 }), Object.defineProperty(a, Qn, { get: hM, set: void 0 }), Object.defineProperty(a, vn, { get: dM, set: void 0 }), Object.defineProperty(a, zn, { 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, ia, { writable: !0, value: void 0 }), a.supportsRemoteControl = !1, Object.defineProperty(a, aa, { writable: !0, value: void 0 }), a.presetName = void 0, Object.defineProperty(a, Ot, { 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, on, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(a, Sr, { 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, Yn, { get: vM, set: void 0 }), Object.defineProperty(a, _c, { get: pM, set: void 0 }), Object.defineProperty(a, Qn, { get: hM, set: void 0 }), Object.defineProperty(a, vn, { get: dM, set: void 0 }), Object.defineProperty(a, zn, { 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, ia, { writable: !0, value: void 0 }), a.supportsRemoteControl = !1, Object.defineProperty(a, aa, { 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, on, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(a, Sr, { writable: !0, value: 1 }), Object.defineProperty(a, Ac, { writable: !0, value: cp(function(L) {
17241
17244
  if (a.videoTrack) {
17242
17245
  var q = L.clientWidth, X = L.clientHeight, Y = a.videoTrack.getSettings(), H = Y.width, J = Y.height;
17243
17246
  if (!(!H || !J)) {
17244
17247
  var N = J / X, U = H / q, Z = Math.max(N, U);
17245
- Z > cM && u(a, Sr)[Sr] === 1 ? (u(a, Sr)[Sr] = 0, u(a, Ot)[Ot].getValue("peerSessionStore").emit($.MAX_SPATIAL_LAYER_CHANGE, { peerId: a.id, maxSpatialLayer: u(a, Sr)[Sr] })) : Z < uM && u(a, Sr)[Sr] === 0 && (u(a, Sr)[Sr] = 1, u(a, Ot)[Ot].getValue("peerSessionStore").emit($.MAX_SPATIAL_LAYER_CHANGE, { peerId: a.id, maxSpatialLayer: u(a, Sr)[Sr] }));
17248
+ Z > cM && u(a, Sr)[Sr] === 1 ? (u(a, Sr)[Sr] = 0, u(a, Dt)[Dt].getValue("peerSessionStore").emit($.MAX_SPATIAL_LAYER_CHANGE, { peerId: a.id, maxSpatialLayer: u(a, Sr)[Sr] })) : Z < uM && u(a, Sr)[Sr] === 0 && (u(a, Sr)[Sr] = 1, u(a, Dt)[Dt].getValue("peerSessionStore").emit($.MAX_SPATIAL_LAYER_CHANGE, { peerId: a.id, maxSpatialLayer: u(a, Sr)[Sr] }));
17246
17249
  }
17247
17250
  }
17248
- }, 2e3) }), u(a, Ot)[Ot] = e;
17251
+ }, 2e3) }), u(a, Dt)[Dt] = e;
17249
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;
17250
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, aa)[aa] = 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, ia)[ia] = !1, u(a, st)[st] = n, u(a, uo)[uo] = i, a.setupEvents(), a.updateVideo = a.updateVideo.bind(a), u(a, co)[co](), a;
17251
17254
  }
@@ -17260,7 +17263,7 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17260
17263
  * Not for external use
17261
17264
  */
17262
17265
  function() {
17263
- return u(this, Ot)[Ot].getValue("telemetry");
17266
+ return u(this, Dt)[Dt].getValue("telemetry");
17264
17267
  }
17265
17268
  ) }, {
17266
17269
  key: "setVideoEnabled",
@@ -17403,7 +17406,7 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17403
17406
  a.n = 3;
17404
17407
  break;
17405
17408
  }
17406
- return a.n = 2, u(this, Ot)[Ot].getValue("peerSessionStore").emitAsync($.KICK_PEER, { peerId: i });
17409
+ return a.n = 2, u(this, Dt)[Dt].getValue("peerSessionStore").emitAsync($.KICK_PEER, { peerId: i });
17407
17410
  case 2:
17408
17411
  return a.a(2);
17409
17412
  case 3:
@@ -17526,19 +17529,19 @@ var sM = Object.defineProperty, oM = Object.getOwnPropertyDescriptor, Go = funct
17526
17529
  ) }]);
17527
17530
  }(xr));
17528
17531
  function lM() {
17529
- return u(this, Ot)[Ot].getValue("roomNodeClient");
17532
+ return u(this, Dt)[Dt].getValue("roomNodeClient");
17530
17533
  }
17531
17534
  function dM() {
17532
- return u(this, Ot)[Ot].getValue("audioPlayback");
17535
+ return u(this, Dt)[Dt].getValue("audioPlayback");
17533
17536
  }
17534
17537
  function hM() {
17535
- return u(this, Ot)[Ot].getValue("connectionHandler").mediaJoined;
17538
+ return u(this, Dt)[Dt].getValue("connectionHandler").mediaJoined;
17536
17539
  }
17537
17540
  function pM() {
17538
- return u(this, Ot)[Ot].getValue("connectionHandler").socketJoined;
17541
+ return u(this, Dt)[Dt].getValue("connectionHandler").socketJoined;
17539
17542
  }
17540
17543
  function vM() {
17541
- return u(this, Ot)[Ot].getValue("pip");
17544
+ return u(this, Dt)[Dt].getValue("pip");
17542
17545
  }
17543
17546
  function fM() {
17544
17547
  Array.from(u(this, on)[on].keys()).forEach(this.updateVideo);
@@ -18190,10 +18193,10 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18190
18193
  for (var i = n > 1 ? void 0 : n ? _M(e, t) : e, a = r.length - 1, o; a >= 0; a--)
18191
18194
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
18192
18195
  return n && i && RM(e, t, i), i;
18193
- }, AM = 5e3, IM = 1e4, Nu = (qt = /* @__PURE__ */ w("currentView"), ur = /* @__PURE__ */ w("consumersSyncing"), an = /* @__PURE__ */ w("resyncRequired"), Ue = /* @__PURE__ */ w("consumersMarkedForDeletion"), Cr = /* @__PURE__ */ w("consumerDeletionPausedAt"), ni = /* @__PURE__ */ w("consumerDeletionSweepInterval"), xn = /* @__PURE__ */ w("pauseConsumerDeletionAging"), Oc = /* @__PURE__ */ w("resumeConsumerDeletionAging"), Dc = /* @__PURE__ */ w("markConsumerForDeletion"), ho = /* @__PURE__ */ w("claimConsumer"), Lc = /* @__PURE__ */ w("startConsumerDeletionSweep"), Nc = /* @__PURE__ */ w("stopConsumerDeletionSweep"), Vc = /* @__PURE__ */ w("handleSelfRoomLeft"), /* @__PURE__ */ function() {
18196
+ }, AM = 5e3, IM = 1e4, Nu = (Wt = /* @__PURE__ */ w("currentView"), ur = /* @__PURE__ */ w("consumersSyncing"), an = /* @__PURE__ */ w("resyncRequired"), Ue = /* @__PURE__ */ w("consumersMarkedForDeletion"), Cr = /* @__PURE__ */ w("consumerDeletionPausedAt"), ni = /* @__PURE__ */ w("consumerDeletionSweepInterval"), xn = /* @__PURE__ */ w("pauseConsumerDeletionAging"), Oc = /* @__PURE__ */ w("resumeConsumerDeletionAging"), Dc = /* @__PURE__ */ w("markConsumerForDeletion"), ho = /* @__PURE__ */ w("claimConsumer"), Lc = /* @__PURE__ */ w("startConsumerDeletionSweep"), Nc = /* @__PURE__ */ w("stopConsumerDeletionSweep"), Vc = /* @__PURE__ */ w("handleSelfRoomLeft"), /* @__PURE__ */ function() {
18194
18197
  function s(r, e, t) {
18195
18198
  var n = this;
18196
- P(this, s), Object.defineProperty(this, Nc, { value: VM }), Object.defineProperty(this, Lc, { value: NM }), Object.defineProperty(this, ho, { value: LM }), Object.defineProperty(this, Dc, { value: DM }), Object.defineProperty(this, Oc, { value: OM }), Object.defineProperty(this, xn, { value: MM }), this.participants = void 0, this.self = void 0, this.selectedPeers = Xg, this.maxSpatialLayerUpdates = /* @__PURE__ */ new Map(), this.consumerPeerMap = void 0, this.events = void 0, this.roomSocketHandler = void 0, this.context = void 0, this.videoPeerConsumerMap = /* @__PURE__ */ new Map(), Object.defineProperty(this, qt, { writable: !0, value: { mode: "ACTIVE_GRID", page: 0 } }), Object.defineProperty(this, ur, { writable: !0, value: !1 }), Object.defineProperty(this, an, { writable: !0, value: !1 }), this.isRebuildingReconnectSnapshot = !1, Object.defineProperty(this, Ue, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(this, Cr, { writable: !0, value: void 0 }), Object.defineProperty(this, ni, { writable: !0, value: void 0 }), Object.defineProperty(this, Vc, { writable: !0, value: function(a) {
18199
+ P(this, s), Object.defineProperty(this, Nc, { value: VM }), Object.defineProperty(this, Lc, { value: NM }), Object.defineProperty(this, ho, { value: LM }), Object.defineProperty(this, Dc, { value: DM }), Object.defineProperty(this, Oc, { value: OM }), Object.defineProperty(this, xn, { value: MM }), this.participants = void 0, this.self = void 0, this.selectedPeers = Xg, this.maxSpatialLayerUpdates = /* @__PURE__ */ new Map(), this.consumerPeerMap = void 0, this.events = void 0, this.roomSocketHandler = void 0, this.context = void 0, this.videoPeerConsumerMap = /* @__PURE__ */ new Map(), Object.defineProperty(this, Wt, { writable: !0, value: { mode: "ACTIVE_GRID", page: 0 } }), Object.defineProperty(this, ur, { writable: !0, value: !1 }), Object.defineProperty(this, an, { writable: !0, value: !1 }), this.isRebuildingReconnectSnapshot = !1, Object.defineProperty(this, Ue, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(this, Cr, { writable: !0, value: void 0 }), Object.defineProperty(this, ni, { writable: !0, value: void 0 }), Object.defineProperty(this, Vc, { writable: !0, value: function(a) {
18197
18200
  var o = a.state;
18198
18201
  o === "disconnected" || o === "stageLeft" || (n.isRebuildingReconnectSnapshot = !1, u(n, Nc)[Nc](), u(n, Ue)[Ue].clear(), u(n, Cr)[Cr] = void 0);
18199
18202
  } }), this.updateConsumerSpatialLayers = cp(function() {
@@ -18476,8 +18479,8 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18476
18479
  * */
18477
18480
  }, { key: "updateMediaSubscribedMaps", value: function(e, t) {
18478
18481
  var n = t != null ? t : {}, i = n.page;
18479
- e && u(this, qt)[qt].mode !== e && (u(this, qt)[qt].mode = e), i && u(this, qt)[qt].page !== i && (u(this, qt)[qt].page = i);
18480
- var a = u(this, qt)[qt], o = a.mode, c = a.page;
18482
+ e && u(this, Wt)[Wt].mode !== e && (u(this, Wt)[Wt].mode = e), i && u(this, Wt)[Wt].page !== i && (u(this, Wt)[Wt].page = i);
18483
+ var a = u(this, Wt)[Wt], o = a.mode, c = a.page;
18481
18484
  switch (o) {
18482
18485
  case "PAGINATED": {
18483
18486
  if (!c)
@@ -18507,7 +18510,7 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18507
18510
  for (; ; )
18508
18511
  switch (p.n) {
18509
18512
  case 0:
18510
- l = n.source, d = ((i = u(this, qt)[qt]) === null || i === void 0 ? void 0 : i.mode) === "PAGINATED" && !u(this, ur)[ur] ? 200 : 0, this.logger.info("scheduleSyncConsumers():: Source: ".concat(l, ", ViewMode: ").concat((a = u(this, qt)[qt]) === null || a === void 0 ? void 0 : a.mode, ", ConsumersSyncing: ").concat(u(this, ur)[ur], ", Delay: ").concat(d, ", Page: ").concat((o = u(this, qt)[qt]) === null || o === void 0 ? void 0 : o.page)), setTimeout(function() {
18513
+ l = n.source, d = ((i = u(this, Wt)[Wt]) === null || i === void 0 ? void 0 : i.mode) === "PAGINATED" && !u(this, ur)[ur] ? 200 : 0, this.logger.info("scheduleSyncConsumers():: Source: ".concat(l, ", ViewMode: ").concat((a = u(this, Wt)[Wt]) === null || a === void 0 ? void 0 : a.mode, ", ConsumersSyncing: ").concat(u(this, ur)[ur], ", Delay: ").concat(d, ", Page: ").concat((o = u(this, Wt)[Wt]) === null || o === void 0 ? void 0 : o.page)), setTimeout(function() {
18511
18514
  return c.syncConsumers();
18512
18515
  }, d);
18513
18516
  case 1:
@@ -18569,7 +18572,7 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18569
18572
  return pe.kind === "video";
18570
18573
  })) !== null && U !== void 0 ? U : [];
18571
18574
  le && Re !== null && Re !== void 0 && Re.length && Re.forEach(function(pe) {
18572
- var Le, Q, Dt, Pt, dt = ((Le = (Q = le.manualProducerConfig) === null || Q === void 0 ? void 0 : Q.video) !== null && Le !== void 0 ? Le : !0) && pe.kind === "video" && !pe.screenShare, re = ((Dt = (Pt = le.manualProducerConfig) === null || Pt === void 0 ? void 0 : Pt.screenshareVideo) !== null && Dt !== void 0 ? Dt : !0) && pe.kind === "video" && pe.screenShare;
18575
+ var Le, Q, Lt, Pt, dt = ((Le = (Q = le.manualProducerConfig) === null || Q === void 0 ? void 0 : Q.video) !== null && Le !== void 0 ? Le : !0) && pe.kind === "video" && !pe.screenShare, re = ((Lt = (Pt = le.manualProducerConfig) === null || Pt === void 0 ? void 0 : Pt.screenshareVideo) !== null && Lt !== void 0 ? Lt : !0) && pe.kind === "video" && pe.screenShare;
18573
18576
  (dt || re) && (pe.pause || v.push(pe));
18574
18577
  });
18575
18578
  }), this.participants.audioSubscribed.forEach(function(N) {
@@ -18577,7 +18580,7 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18577
18580
  return pe.kind === "audio";
18578
18581
  })) !== null && U !== void 0 ? U : [];
18579
18582
  le && Re !== null && Re !== void 0 && Re.length && Re.forEach(function(pe) {
18580
- var Le, Q, Dt, Pt, dt = ((Le = (Q = le.manualProducerConfig) === null || Q === void 0 ? void 0 : Q.audio) !== null && Le !== void 0 ? Le : !0) && pe.kind === "audio" && !pe.screenShare, re = ((Dt = (Pt = le.manualProducerConfig) === null || Pt === void 0 ? void 0 : Pt.screenshareAudio) !== null && Dt !== void 0 ? Dt : !0) && pe.kind === "audio" && pe.screenShare;
18583
+ var Le, Q, Lt, Pt, dt = ((Le = (Q = le.manualProducerConfig) === null || Q === void 0 ? void 0 : Q.audio) !== null && Le !== void 0 ? Le : !0) && pe.kind === "audio" && !pe.screenShare, re = ((Lt = (Pt = le.manualProducerConfig) === null || Pt === void 0 ? void 0 : Pt.screenshareAudio) !== null && Lt !== void 0 ? Lt : !0) && pe.kind === "audio" && pe.screenShare;
18581
18584
  (dt || re) && v.push(pe);
18582
18585
  });
18583
18586
  }), v = EP(v, function(N) {
@@ -18925,7 +18928,7 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18925
18928
  };
18926
18929
  }()), this.context.getValue("peerSessionStore").on($.UPDATE_ACTIVE, function() {
18927
18930
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = t.viewMode, i = t.page;
18928
- e.isRebuildingReconnectSnapshot || (e.logger.info("UPDATE_ACTIVE event received - viewMode: ".concat(u(e, qt)[qt].mode, ", page: ").concat(i)), e.updateMediaSubscribedMaps(n, { page: i }), e.scheduleSyncConsumers({ source: "UPDATE_ACTIVE" }));
18931
+ e.isRebuildingReconnectSnapshot || (e.logger.info("UPDATE_ACTIVE event received - viewMode: ".concat(u(e, Wt)[Wt].mode, ", page: ").concat(i)), e.updateMediaSubscribedMaps(n, { page: i }), e.scheduleSyncConsumers({ source: "UPDATE_ACTIVE" }));
18929
18932
  });
18930
18933
  } }, {
18931
18934
  key: "onParticipantPinned",
@@ -19170,7 +19173,7 @@ eo([D.trace("ParticipantController.processConsumerClosed")], Yi.prototype, "proc
19170
19173
  eo([D.trace("ParticipantController.processConsumerResumed")], Yi.prototype, "processConsumerResumed", 1);
19171
19174
  eo([D.trace("ParticipantController.processConsumerPaused")], Yi.prototype, "processConsumerPaused", 1);
19172
19175
  eo([D.trace("ParticipantController.processNewConsumer")], Yi.prototype, "processNewConsumer", 1);
19173
- var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__PURE__ */ w("viewType"), Ms = /* @__PURE__ */ w("context"), md = /* @__PURE__ */ w("updatePermission"), ft = /* @__PURE__ */ w("stageStatus"), $M = /* @__PURE__ */ function(s) {
19176
+ var Mt = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__PURE__ */ w("viewType"), Ms = /* @__PURE__ */ w("context"), md = /* @__PURE__ */ w("updatePermission"), ft = /* @__PURE__ */ w("stageStatus"), $M = /* @__PURE__ */ function(s) {
19174
19177
  function r(e, t, n) {
19175
19178
  var i, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
19176
19179
  P(this, r);
@@ -19243,7 +19246,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19243
19246
  key: "acceptWaitingRequests",
19244
19247
  get: function() {
19245
19248
  var t, n;
19246
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.acceptWaitingRequests) !== null && t !== void 0 ? t : It.acceptWaitingRequests;
19249
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.acceptWaitingRequests) !== null && t !== void 0 ? t : Mt.acceptWaitingRequests;
19247
19250
  }
19248
19251
  /**
19249
19252
  * The `requestProduceVideo` returns boolean value.
@@ -19286,7 +19289,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19286
19289
  key: "canAllowParticipantAudio",
19287
19290
  get: function() {
19288
19291
  var t, n;
19289
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.disableParticipantAudio) !== null && t !== void 0 ? t : It.disableParticipantAudio;
19292
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.disableParticipantAudio) !== null && t !== void 0 ? t : Mt.disableParticipantAudio;
19290
19293
  }
19291
19294
  /**
19292
19295
  * The `canAllowParticipantScreensharing` returns boolean value.
@@ -19296,7 +19299,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19296
19299
  key: "canAllowParticipantScreensharing",
19297
19300
  get: function() {
19298
19301
  var t, n;
19299
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.canAcceptProductionRequests) !== null && t !== void 0 ? t : It.canAcceptProductionRequests;
19302
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.canAcceptProductionRequests) !== null && t !== void 0 ? t : Mt.canAcceptProductionRequests;
19300
19303
  }
19301
19304
  /**
19302
19305
  * The `canAllowParticipantVideo` returns boolean value.
@@ -19306,7 +19309,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19306
19309
  key: "canAllowParticipantVideo",
19307
19310
  get: function() {
19308
19311
  var t, n;
19309
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.disableParticipantVideo) !== null && t !== void 0 ? t : It.disableParticipantVideo;
19312
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.disableParticipantVideo) !== null && t !== void 0 ? t : Mt.disableParticipantVideo;
19310
19313
  }
19311
19314
  /**
19312
19315
  * If `true`, a participant can disable other participants` audio.
@@ -19332,7 +19335,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19332
19335
  key: "kickParticipant",
19333
19336
  get: function() {
19334
19337
  var t, n;
19335
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.kickParticipant) !== null && t !== void 0 ? t : It.kickParticipant;
19338
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.kickParticipant) !== null && t !== void 0 ? t : Mt.kickParticipant;
19336
19339
  }
19337
19340
  /**
19338
19341
  * The `pinParticipant` returns boolean value.
@@ -19342,7 +19345,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19342
19345
  key: "pinParticipant",
19343
19346
  get: function() {
19344
19347
  var t, n;
19345
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.pinParticipant) !== null && t !== void 0 ? t : It.pinParticipant;
19348
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.pinParticipant) !== null && t !== void 0 ? t : Mt.pinParticipant;
19346
19349
  }
19347
19350
  /**
19348
19351
  * The `canRecord` returns boolean value.
@@ -19352,7 +19355,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19352
19355
  key: "canRecord",
19353
19356
  get: function() {
19354
19357
  var t, n;
19355
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.canRecord) !== null && t !== void 0 ? t : It.canRecord;
19358
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.canRecord) !== null && t !== void 0 ? t : Mt.canRecord;
19356
19359
  }
19357
19360
  /**
19358
19361
  * The `waitingRoomType` returns string value.
@@ -19363,7 +19366,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19363
19366
  key: "waitingRoomBehaviour",
19364
19367
  get: function() {
19365
19368
  var t, n;
19366
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.waitingRoomType) !== null && t !== void 0 ? t : It.waitingRoomType;
19369
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.waitingRoomType) !== null && t !== void 0 ? t : Mt.waitingRoomType;
19367
19370
  }
19368
19371
  /**
19369
19372
  * The `plugins` tells if the participant can act on plugins
@@ -19373,7 +19376,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19373
19376
  key: "plugins",
19374
19377
  get: function() {
19375
19378
  var t, n;
19376
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.plugins) !== null && t !== void 0 ? t : It.plugins;
19379
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.plugins) !== null && t !== void 0 ? t : Mt.plugins;
19377
19380
  }
19378
19381
  /**
19379
19382
  * The `polls` tells if the participant can use polls.
@@ -19383,7 +19386,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19383
19386
  key: "polls",
19384
19387
  get: function() {
19385
19388
  var t, n;
19386
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.polls) !== null && t !== void 0 ? t : It.polls;
19389
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.polls) !== null && t !== void 0 ? t : Mt.polls;
19387
19390
  }
19388
19391
  /**
19389
19392
  * The `canProduceVideo` shows permissions for enabling video.
@@ -19392,7 +19395,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19392
19395
  }, {
19393
19396
  key: "canProduceVideo",
19394
19397
  get: function() {
19395
- var t, n = (t = u(this, G)[G].media.video.canProduce) !== null && t !== void 0 ? t : It.media.video.canProduce;
19398
+ var t, n = (t = u(this, G)[G].media.video.canProduce) !== null && t !== void 0 ? t : Mt.media.video.canProduce;
19396
19399
  return this.stageEnabled && (u(this, ft)[ft] === "ACCEPTED_TO_JOIN_STAGE" || u(this, ft)[ft] === "ON_STAGE") && n === se.CanRequest ? se.Allowed : this.stageEnabled && (u(this, ft)[ft] === "OFF_STAGE" || u(this, ft)[ft] === "REQUESTED_TO_JOIN_STAGE") && n === se.Allowed ? se.NotAllowed : n;
19397
19400
  }
19398
19401
  /**
@@ -19402,7 +19405,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19402
19405
  }, {
19403
19406
  key: "canProduceScreenshare",
19404
19407
  get: function() {
19405
- var t, n = (t = u(this, G)[G].media.screenshare.canProduce) !== null && t !== void 0 ? t : It.media.screenshare.canProduce;
19408
+ var t, n = (t = u(this, G)[G].media.screenshare.canProduce) !== null && t !== void 0 ? t : Mt.media.screenshare.canProduce;
19406
19409
  return this.stageEnabled && (u(this, ft)[ft] === "ACCEPTED_TO_JOIN_STAGE" || u(this, ft)[ft] === "ON_STAGE") && n === se.CanRequest ? se.Allowed : this.stageEnabled && (u(this, ft)[ft] === "OFF_STAGE" || u(this, ft)[ft] === "REQUESTED_TO_JOIN_STAGE") && n === se.Allowed ? se.NotAllowed : n;
19407
19410
  }
19408
19411
  /**
@@ -19412,7 +19415,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19412
19415
  }, {
19413
19416
  key: "canProduceAudio",
19414
19417
  get: function() {
19415
- var t, n = (t = u(this, G)[G].media.audio.canProduce) !== null && t !== void 0 ? t : It.media.audio.canProduce;
19418
+ var t, n = (t = u(this, G)[G].media.audio.canProduce) !== null && t !== void 0 ? t : Mt.media.audio.canProduce;
19416
19419
  return this.stageEnabled && (u(this, ft)[ft] === "ACCEPTED_TO_JOIN_STAGE" || u(this, ft)[ft] === "ON_STAGE") && n === se.CanRequest ? se.Allowed : this.stageEnabled && (u(this, ft)[ft] === "OFF_STAGE" || u(this, ft)[ft] === "REQUESTED_TO_JOIN_STAGE") && n === se.Allowed ? se.NotAllowed : n;
19417
19420
  }
19418
19421
  /**
@@ -19426,7 +19429,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19426
19429
  key: "chatPublic",
19427
19430
  get: function() {
19428
19431
  var t, n;
19429
- return (t = (n = u(this, G)[G]) === null || n === void 0 || (n = n.chat) === null || n === void 0 ? void 0 : n.public) !== null && t !== void 0 ? t : It.chat.public;
19432
+ return (t = (n = u(this, G)[G]) === null || n === void 0 || (n = n.chat) === null || n === void 0 ? void 0 : n.public) !== null && t !== void 0 ? t : Mt.chat.public;
19430
19433
  }
19431
19434
  /**
19432
19435
  * The `chatPrivate` shows permissions for public chat
@@ -19438,12 +19441,12 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19438
19441
  */
19439
19442
  }, { key: "chatPrivate", get: function() {
19440
19443
  var t, n;
19441
- return (t = (n = u(this, G)[G]) === null || n === void 0 || (n = n.chat) === null || n === void 0 ? void 0 : n.private) !== null && t !== void 0 ? t : It.chat.private;
19444
+ return (t = (n = u(this, G)[G]) === null || n === void 0 || (n = n.chat) === null || n === void 0 ? void 0 : n.private) !== null && t !== void 0 ? t : Mt.chat.private;
19442
19445
  } }, {
19443
19446
  key: "connectedMeetings",
19444
19447
  get: function() {
19445
19448
  var t, n;
19446
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.connectedMeetings) !== null && t !== void 0 ? t : It == null ? void 0 : It.connectedMeetings;
19449
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.connectedMeetings) !== null && t !== void 0 ? t : Mt == null ? void 0 : Mt.connectedMeetings;
19447
19450
  }
19448
19451
  /**
19449
19452
  * The `hiddenParticipant` returns boolean value.
@@ -19453,7 +19456,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19453
19456
  key: "hiddenParticipant",
19454
19457
  get: function() {
19455
19458
  var t, n;
19456
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.hiddenParticipant) !== null && t !== void 0 ? t : It.hiddenParticipant;
19459
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.hiddenParticipant) !== null && t !== void 0 ? t : Mt.hiddenParticipant;
19457
19460
  }
19458
19461
  /**
19459
19462
  * The `showParticipantList` returns boolean value.
@@ -19463,7 +19466,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19463
19466
  key: "showParticipantList",
19464
19467
  get: function() {
19465
19468
  var t;
19466
- return (t = u(this, G)[G].showParticipantList) !== null && t !== void 0 ? t : It.showParticipantList;
19469
+ return (t = u(this, G)[G].showParticipantList) !== null && t !== void 0 ? t : Mt.showParticipantList;
19467
19470
  }
19468
19471
  /**
19469
19472
  * The `canChangeParticipantPermissions` returns boolean value.
@@ -19471,7 +19474,7 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19471
19474
  */
19472
19475
  }, { key: "canChangeParticipantPermissions", get: function() {
19473
19476
  var t, n;
19474
- return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.canChangeParticipantPermissions) !== null && t !== void 0 ? t : It.canChangeParticipantPermissions;
19477
+ return (t = (n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.canChangeParticipantPermissions) !== null && t !== void 0 ? t : Mt.canChangeParticipantPermissions;
19475
19478
  } }, {
19476
19479
  key: "canEditDisplayName",
19477
19480
  get: function() {
@@ -19493,16 +19496,16 @@ var It = ci(hp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19493
19496
  return u(this, G)[G].transcriptionEnabled;
19494
19497
  } }], [{ key: "init", value: function(t, n, i) {
19495
19498
  var a;
19496
- return i ? a = new r(t, i, n, !0) : a = new r(t, It, n), a;
19499
+ return i ? a = new r(t, i, n, !0) : a = new r(t, Mt, n), a;
19497
19500
  } }]);
19498
19501
  }(xr);
19499
19502
  function jM() {
19500
19503
  return u(this, Ms)[Ms].getValue("stageStatus");
19501
19504
  }
19502
- var $t = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19505
+ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19503
19506
  function r(e, t) {
19504
19507
  var n;
19505
- return P(this, r), n = C(this, r, [t]), n.localMediaHandler = void 0, Object.defineProperty(n, $t, { writable: !0, value: void 0 }), u(n, $t)[$t] = e, n;
19508
+ return P(this, r), n = C(this, r, [t]), n.localMediaHandler = void 0, Object.defineProperty(n, jt, { writable: !0, value: void 0 }), u(n, jt)[jt] = e, n;
19506
19509
  }
19507
19510
  return R(r, s), S(r, [{
19508
19511
  key: "updatePermission",
@@ -19516,7 +19519,7 @@ var $t = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19516
19519
  if (c = function(k, b) {
19517
19520
  i.mediaPermissions[k] = b;
19518
19521
  var T = { message: i.mediaPermissions[k], kind: k };
19519
- b === "DENIED" ? u(i, $t)[$t].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_ERROR, T) : u(i, $t)[$t].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_UPDATE, T);
19522
+ b === "DENIED" ? u(i, jt)[jt].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_ERROR, T) : u(i, jt)[jt].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_UPDATE, T);
19520
19523
  }, kt.getName() !== "firefox") {
19521
19524
  g.n = 1;
19522
19525
  break;
@@ -19566,11 +19569,11 @@ var $t = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19566
19569
  a = i.message, o = i.kind, v = o, f.n = v === "audio" ? 1 : v === "video" ? 2 : v === "screenshare" ? 3 : 4;
19567
19570
  break;
19568
19571
  case 1:
19569
- return (c = u(this, $t)[$t]) === null || c === void 0 || c.getValue("callstats").mediaPermission("AUDIO", a), (l = u(this, $t)[$t]) === null || l === void 0 || l.getValue("callstats").mediaPermission("SPEAKER", a), f.a(3, 4);
19572
+ return (c = u(this, jt)[jt]) === null || c === void 0 || c.getValue("callstats").mediaPermission("AUDIO", a), (l = u(this, jt)[jt]) === null || l === void 0 || l.getValue("callstats").mediaPermission("SPEAKER", a), f.a(3, 4);
19570
19573
  case 2:
19571
- return (d = u(this, $t)[$t]) === null || d === void 0 || d.getValue("callstats").mediaPermission("VIDEO", a), f.a(3, 4);
19574
+ return (d = u(this, jt)[jt]) === null || d === void 0 || d.getValue("callstats").mediaPermission("VIDEO", a), f.a(3, 4);
19572
19575
  case 3:
19573
- return (p = u(this, $t)[$t]) === null || p === void 0 || p.getValue("callstats").mediaPermission("SCREENSHARE", a), f.a(3, 4);
19576
+ return (p = u(this, jt)[jt]) === null || p === void 0 || p.getValue("callstats").mediaPermission("SCREENSHARE", a), f.a(3, 4);
19574
19577
  case 4:
19575
19578
  return f.a(2);
19576
19579
  }
@@ -19584,7 +19587,7 @@ var $t = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19584
19587
  key: "peerId",
19585
19588
  get: function() {
19586
19589
  var t;
19587
- return (t = u(this, $t)[$t]) === null || t === void 0 ? void 0 : t.getValue("peerId");
19590
+ return (t = u(this, jt)[jt]) === null || t === void 0 ? void 0 : t.getValue("peerId");
19588
19591
  }
19589
19592
  /** @access private */
19590
19593
  }, { key: "init", value: function() {
@@ -19594,7 +19597,7 @@ var $t = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19594
19597
  for (; ; )
19595
19598
  switch (_.p = _.n) {
19596
19599
  case 0:
19597
- if (a = I.length > 0 && I[0] !== void 0 ? I[0] : {}, o = I.length > 1 && I[1] !== void 0 ? I[1] : !1, c = I.length > 2 && I[2] !== void 0 ? I[2] : null, kt.init(), c && (u(this, $t)[$t] = c), !this.localMediaHandler) {
19600
+ if (a = I.length > 0 && I[0] !== void 0 ? I[0] : {}, o = I.length > 1 && I[1] !== void 0 ? I[1] : !1, c = I.length > 2 && I[2] !== void 0 ? I[2] : null, kt.init(), c && (u(this, jt)[jt] = c), !this.localMediaHandler) {
19598
19601
  _.n = 1;
19599
19602
  break;
19600
19603
  }
@@ -19689,7 +19692,7 @@ var $t = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19689
19692
  }() }, {
19690
19693
  key: "context",
19691
19694
  set: function(t) {
19692
- u(this, $t)[$t] = t, this.localMediaHandler.context = t;
19695
+ u(this, jt)[jt] = t, this.localMediaHandler.context = t;
19693
19696
  }
19694
19697
  /**
19695
19698
  * Returns the `audioTrack`.
@@ -20106,7 +20109,7 @@ var $t = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
20106
20109
  for (var i = n > 1 ? void 0 : n ? FM(e, t) : e, a = r.length - 1, o; a >= 0; a--)
20107
20110
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
20108
20111
  return n && i && UM(e, t, i), i;
20109
- }, tr = (oa = /* @__PURE__ */ w("config"), ot = /* @__PURE__ */ w("permissions"), ua = /* @__PURE__ */ w("isPinned"), $e = /* @__PURE__ */ w("context"), Er = /* @__PURE__ */ w("pip"), Ve = /* @__PURE__ */ w("roomNodeClient"), ca = /* @__PURE__ */ w("audioPlayback"), be = /* @__PURE__ */ w("mediaJoined"), ka = /* @__PURE__ */ w("previewVideoElements"), Ta = /* @__PURE__ */ w("videoElements"), po = /* @__PURE__ */ w("updateVideos"), /* @__PURE__ */ function(s) {
20112
+ }, rr = (oa = /* @__PURE__ */ w("config"), ot = /* @__PURE__ */ w("permissions"), ua = /* @__PURE__ */ w("isPinned"), $e = /* @__PURE__ */ w("context"), Er = /* @__PURE__ */ w("pip"), Ve = /* @__PURE__ */ w("roomNodeClient"), ca = /* @__PURE__ */ w("audioPlayback"), be = /* @__PURE__ */ w("mediaJoined"), ka = /* @__PURE__ */ w("previewVideoElements"), Ta = /* @__PURE__ */ w("videoElements"), po = /* @__PURE__ */ w("updateVideos"), /* @__PURE__ */ function(s) {
20110
20113
  function r(e, t, n, i, a) {
20111
20114
  var o;
20112
20115
  P(this, r);
@@ -20894,7 +20897,7 @@ var $t = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
20894
20897
  for (; ; )
20895
20898
  switch (O.n) {
20896
20899
  case 0:
20897
- 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 tr(i, a, o, c, l), I = SI(c.mediaConstraints), ha(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);
20900
+ 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), ha(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);
20898
20901
  case 1:
20899
20902
  return E.setupEvents(), O.a(2, E);
20900
20903
  }
@@ -20927,21 +20930,21 @@ function GM() {
20927
20930
  return s.updateVideo(r, !0);
20928
20931
  });
20929
20932
  }
20930
- br([D.trace("Self.cleanupEvents")], tr.prototype, "cleanupEvents", 1);
20931
- br([D.trace("Self.setupEvents")], tr.prototype, "setupEvents", 1);
20932
- br([D.trace("Self.setupTracks")], tr.prototype, "setupTracks", 1);
20933
- br([D.trace("Self.destructMediaHandler")], tr.prototype, "destructMediaHandler", 1);
20934
- br([D.trace("Self.removeDocumentEventListeners")], tr.prototype, "removeDocumentEventListeners", 1);
20935
- br([Qi.executeWithLock({ methodName: "meeting.self.enableAudio", lockName: "Self.toggleAudio", timeout: 3e3 }), D.trace("Self.enableAudio")], tr.prototype, "enableAudio", 1);
20936
- br([Qi.executeWithLock({ methodName: "meeting.self.enableVideo", lockName: "Self.toggleVideo", timeout: 3e3 }), D.trace("Self.enableVideo")], tr.prototype, "enableVideo", 1);
20937
- br([D.trace("Self.updateVideoConstraints")], tr.prototype, "updateVideoConstraints", 1);
20938
- br([D.trace("Self.enableScreenShare"), Qi.executeWithLock({ methodName: "meeting.self.enableScreenShare", lockName: "Self.toggleScreenShare", timeout: 3e3 })], tr.prototype, "enableScreenShare", 1);
20939
- br([D.trace("Self.updateScreenshareConstraints")], tr.prototype, "updateScreenshareConstraints", 1);
20940
- br([Qi.executeWithLock({ methodName: "meeting.self.disableAudio", lockName: "Self.toggleAudio", timeout: 3e3 }), D.trace("Self.disableAudio")], tr.prototype, "disableAudio", 1);
20941
- br([Qi.executeWithLock({ methodName: "meeting.self.disableVideo", lockName: "Self.toggleVideo", timeout: 3e3 }), D.trace("Self.disableVideo")], tr.prototype, "disableVideo", 1);
20942
- br([Qi.executeWithLock({ methodName: "meeting.self.disableScreenShare", lockName: "Self.toggleScreenShare", timeout: 3e3 }), D.trace("Self.disableScreenShare")], tr.prototype, "disableScreenShare", 1);
20943
- br([D.trace("Self.setDevice")], tr.prototype, "setDevice", 1);
20944
- tr = br([dr("1100")], tr);
20933
+ br([D.trace("Self.cleanupEvents")], rr.prototype, "cleanupEvents", 1);
20934
+ br([D.trace("Self.setupEvents")], rr.prototype, "setupEvents", 1);
20935
+ br([D.trace("Self.setupTracks")], rr.prototype, "setupTracks", 1);
20936
+ br([D.trace("Self.destructMediaHandler")], rr.prototype, "destructMediaHandler", 1);
20937
+ br([D.trace("Self.removeDocumentEventListeners")], rr.prototype, "removeDocumentEventListeners", 1);
20938
+ br([Qi.executeWithLock({ methodName: "meeting.self.enableAudio", lockName: "Self.toggleAudio", timeout: 3e3 }), D.trace("Self.enableAudio")], rr.prototype, "enableAudio", 1);
20939
+ br([Qi.executeWithLock({ methodName: "meeting.self.enableVideo", lockName: "Self.toggleVideo", timeout: 3e3 }), D.trace("Self.enableVideo")], rr.prototype, "enableVideo", 1);
20940
+ br([D.trace("Self.updateVideoConstraints")], rr.prototype, "updateVideoConstraints", 1);
20941
+ br([D.trace("Self.enableScreenShare"), Qi.executeWithLock({ methodName: "meeting.self.enableScreenShare", lockName: "Self.toggleScreenShare", timeout: 3e3 })], rr.prototype, "enableScreenShare", 1);
20942
+ br([D.trace("Self.updateScreenshareConstraints")], rr.prototype, "updateScreenshareConstraints", 1);
20943
+ br([Qi.executeWithLock({ methodName: "meeting.self.disableAudio", lockName: "Self.toggleAudio", timeout: 3e3 }), D.trace("Self.disableAudio")], rr.prototype, "disableAudio", 1);
20944
+ br([Qi.executeWithLock({ methodName: "meeting.self.disableVideo", lockName: "Self.toggleVideo", timeout: 3e3 }), D.trace("Self.disableVideo")], rr.prototype, "disableVideo", 1);
20945
+ br([Qi.executeWithLock({ methodName: "meeting.self.disableScreenShare", lockName: "Self.toggleScreenShare", timeout: 3e3 }), D.trace("Self.disableScreenShare")], rr.prototype, "disableScreenShare", 1);
20946
+ br([D.trace("Self.setDevice")], rr.prototype, "setDevice", 1);
20947
+ rr = br([dr("1100")], rr);
20945
20948
  var JM = /* @__PURE__ */ function(s) {
20946
20949
  function r(e) {
20947
20950
  var t;
@@ -21335,15 +21338,15 @@ function rO() {
21335
21338
  this.logger.error("Consumer::destroyTrack()", V(V({}, u(this, mr)[mr]), {}, { error: s }));
21336
21339
  }
21337
21340
  }
21338
- var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts = /* @__PURE__ */ w("disableTrackOnPause"), Pi = /* @__PURE__ */ w("zeroRtpOnPause"), Qt = /* @__PURE__ */ w("closed"), Qe = /* @__PURE__ */ w("track"), Cn = /* @__PURE__ */ w("paused"), ws = /* @__PURE__ */ w("maxSpatialLayer"), wd = /* @__PURE__ */ w("context"), jt = /* @__PURE__ */ w("metadata"), nO = /* @__PURE__ */ function(s) {
21341
+ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts = /* @__PURE__ */ w("disableTrackOnPause"), Pi = /* @__PURE__ */ w("zeroRtpOnPause"), Yt = /* @__PURE__ */ w("closed"), Qe = /* @__PURE__ */ w("track"), Cn = /* @__PURE__ */ w("paused"), ws = /* @__PURE__ */ w("maxSpatialLayer"), wd = /* @__PURE__ */ w("context"), Ut = /* @__PURE__ */ w("metadata"), nO = /* @__PURE__ */ function(s) {
21339
21342
  function r(e, t) {
21340
21343
  var n, i, a;
21341
- return P(this, r), a = C(this, r, [e]), Object.defineProperty(a, jt, { get: iO, set: void 0 }), a.id = void 0, a.localId = void 0, Object.defineProperty(a, ir, { writable: !0, value: void 0 }), a.kind = void 0, a.appData = void 0, a.rtpSender = void 0, Object.defineProperty(a, ks, { writable: !0, value: void 0 }), Object.defineProperty(a, Ts, { writable: !0, value: void 0 }), Object.defineProperty(a, Pi, { writable: !0, value: void 0 }), Object.defineProperty(a, Qt, { writable: !0, value: !1 }), Object.defineProperty(a, Qe, { writable: !0, value: void 0 }), Object.defineProperty(a, Cn, { writable: !0, value: void 0 }), Object.defineProperty(a, ws, { writable: !0, value: void 0 }), Object.defineProperty(a, wd, { writable: !0, value: void 0 }), a.id = t.id, a.localId = t.localId, u(a, Qe)[Qe] = t.track, a.kind = (n = t.track) === null || n === void 0 ? void 0 : n.kind, u(a, Cn)[Cn] = t.disableTrackOnPause ? !((i = t.track) !== null && i !== void 0 && i.enabled) : !1, u(a, ws)[ws] = void 0, u(a, ks)[ks] = t.stopTracks, u(a, Ts)[Ts] = t.disableTrackOnPause, u(a, Pi)[Pi] = t.zeroRtpOnPause, a.appData = t.appData || {}, a._onTrackEnded = a._onTrackEnded.bind(a), u(a, ir)[ir] = t.handler, a.rtpSender = t.rtpSender, a._handleTrack(), u(a, wd)[wd] = e, a;
21344
+ return P(this, r), a = C(this, r, [e]), Object.defineProperty(a, Ut, { get: iO, set: void 0 }), a.id = void 0, a.localId = void 0, Object.defineProperty(a, ir, { writable: !0, value: void 0 }), a.kind = void 0, a.appData = void 0, a.rtpSender = void 0, Object.defineProperty(a, ks, { writable: !0, value: void 0 }), Object.defineProperty(a, Ts, { writable: !0, value: void 0 }), Object.defineProperty(a, Pi, { writable: !0, value: void 0 }), Object.defineProperty(a, Yt, { writable: !0, value: !1 }), Object.defineProperty(a, Qe, { writable: !0, value: void 0 }), Object.defineProperty(a, Cn, { writable: !0, value: void 0 }), Object.defineProperty(a, ws, { writable: !0, value: void 0 }), Object.defineProperty(a, wd, { writable: !0, value: void 0 }), a.id = t.id, a.localId = t.localId, u(a, Qe)[Qe] = t.track, a.kind = (n = t.track) === null || n === void 0 ? void 0 : n.kind, u(a, Cn)[Cn] = t.disableTrackOnPause ? !((i = t.track) !== null && i !== void 0 && i.enabled) : !1, u(a, ws)[ws] = void 0, u(a, ks)[ks] = t.stopTracks, u(a, Ts)[Ts] = t.disableTrackOnPause, u(a, Pi)[Pi] = t.zeroRtpOnPause, a.appData = t.appData || {}, a._onTrackEnded = a._onTrackEnded.bind(a), u(a, ir)[ir] = t.handler, a.rtpSender = t.rtpSender, a._handleTrack(), u(a, wd)[wd] = e, a;
21342
21345
  }
21343
21346
  return R(r, s), S(r, [{
21344
21347
  key: "closed",
21345
21348
  get: function() {
21346
- return u(this, Qt)[Qt];
21349
+ return u(this, Yt)[Yt];
21347
21350
  }
21348
21351
  /**
21349
21352
  * The associated track.
@@ -21379,13 +21382,13 @@ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts
21379
21382
  for (; ; )
21380
21383
  switch (p.n) {
21381
21384
  case 0:
21382
- if (!u(this, Qt)[Qt]) {
21385
+ if (!u(this, Yt)[Yt]) {
21383
21386
  p.n = 1;
21384
21387
  break;
21385
21388
  }
21386
21389
  return p.a(2);
21387
21390
  case 1:
21388
- if (this.logger.debug("Producer::close() ".concat(i ? "with reason ".concat(i) : ""), u(this, jt)[jt]), u(this, Qt)[Qt] = !0, this._destroyTrack(), i !== wl) {
21391
+ if (this.logger.debug("Producer::close() ".concat(i ? "with reason ".concat(i) : ""), u(this, Ut)[Ut]), u(this, Yt)[Yt] = !0, this._destroyTrack(), i !== wl) {
21389
21392
  p.n = 2;
21390
21393
  break;
21391
21394
  }
@@ -21412,7 +21415,7 @@ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts
21412
21415
  for (; ; )
21413
21416
  switch (i.n) {
21414
21417
  case 0:
21415
- if (!u(this, Qt)[Qt]) {
21418
+ if (!u(this, Yt)[Yt]) {
21416
21419
  i.n = 1;
21417
21420
  break;
21418
21421
  }
@@ -21429,7 +21432,7 @@ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts
21429
21432
  }() }, {
21430
21433
  key: "pause",
21431
21434
  value: function() {
21432
- this.logger.debug("Producer::pause()", u(this, jt)[jt]), u(this, Qt)[Qt] && this.logger.error("Producer::pause() | Producer closed", u(this, jt)[jt]), u(this, Cn)[Cn] = !0, u(this, Qe)[Qe] && u(this, Ts)[Ts] && (u(this, Qe)[Qe].enabled = !1), u(this, Pi)[Pi] && u(this, ir)[ir].replaceTrack(this.localId, null), this.emit("pause");
21435
+ this.logger.debug("Producer::pause()", u(this, Ut)[Ut]), u(this, Yt)[Yt] && this.logger.error("Producer::pause() | Producer closed", u(this, Ut)[Ut]), u(this, Cn)[Cn] = !0, u(this, Qe)[Qe] && u(this, Ts)[Ts] && (u(this, Qe)[Qe].enabled = !1), u(this, Pi)[Pi] && u(this, ir)[ir].replaceTrack(this.localId, null), this.emit("pause");
21433
21436
  }
21434
21437
  /**
21435
21438
  * Resumes sending media.
@@ -21437,8 +21440,8 @@ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts
21437
21440
  }, {
21438
21441
  key: "resume",
21439
21442
  value: function() {
21440
- if (this.logger.debug("Producer::resume()", u(this, jt)[jt]), u(this, Qt)[Qt]) {
21441
- this.logger.error("Producer::resume() | Producer closed", u(this, jt)[jt]);
21443
+ if (this.logger.debug("Producer::resume()", u(this, Ut)[Ut]), u(this, Yt)[Yt]) {
21444
+ this.logger.error("Producer::resume() | Producer closed", u(this, Ut)[Ut]);
21442
21445
  return;
21443
21446
  }
21444
21447
  u(this, Cn)[Cn] = !1, u(this, Qe)[Qe] && u(this, Ts)[Ts] && (u(this, Qe)[Qe].enabled = !0), u(this, Pi)[Pi] && u(this, ir)[ir].replaceTrack(this.localId, u(this, Qe)[Qe]), this.emit("resume");
@@ -21453,7 +21456,7 @@ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts
21453
21456
  for (; ; )
21454
21457
  switch (o.n) {
21455
21458
  case 0:
21456
- if (a = i.track, this.logger.debug("Producer::replaceTrack() trackId: ".concat(a == null ? void 0 : a.id), u(this, jt)[jt]), !u(this, Qt)[Qt]) {
21459
+ if (a = i.track, this.logger.debug("Producer::replaceTrack() trackId: ".concat(a == null ? void 0 : a.id), u(this, Ut)[Ut]), !u(this, Yt)[Yt]) {
21457
21460
  o.n = 1;
21458
21461
  break;
21459
21462
  }
@@ -21461,7 +21464,7 @@ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts
21461
21464
  try {
21462
21465
  a.stop();
21463
21466
  } catch (c) {
21464
- this.logger.error("Producer::replaceTrack", V(V({}, u(this, jt)[jt]), {}, { error: c }));
21467
+ this.logger.error("Producer::replaceTrack", V(V({}, u(this, Ut)[Ut]), {}, { error: c }));
21465
21468
  }
21466
21469
  throw new pn("closed");
21467
21470
  case 1:
@@ -21475,7 +21478,7 @@ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts
21475
21478
  o.n = 3;
21476
21479
  break;
21477
21480
  }
21478
- return this.logger.debug("replaceTrack() | same track, ignored trackId: ".concat(a.id), u(this, jt)[jt]), o.a(2);
21481
+ return this.logger.debug("replaceTrack() | same track, ignored trackId: ".concat(a.id), u(this, Ut)[Ut]), o.a(2);
21479
21482
  case 3:
21480
21483
  if (!(!u(this, Pi)[Pi] || !u(this, Cn)[Cn])) {
21481
21484
  o.n = 4;
@@ -21499,7 +21502,7 @@ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts
21499
21502
  for (; ; )
21500
21503
  switch (a.n) {
21501
21504
  case 0:
21502
- if (!u(this, Qt)[Qt]) {
21505
+ if (!u(this, Yt)[Yt]) {
21503
21506
  a.n = 1;
21504
21507
  break;
21505
21508
  }
@@ -21535,7 +21538,7 @@ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts
21535
21538
  for (; ; )
21536
21539
  switch (a.n) {
21537
21540
  case 0:
21538
- if (!u(this, Qt)[Qt]) {
21541
+ if (!u(this, Yt)[Yt]) {
21539
21542
  a.n = 1;
21540
21543
  break;
21541
21544
  }
@@ -21558,7 +21561,7 @@ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts
21558
21561
  }
21559
21562
  return t;
21560
21563
  }() }, { key: "_onTrackEnded", value: function() {
21561
- this.logger.debug('Producer::track "ended" event trackId: '.concat(this.track.id), u(this, jt)[jt]), this.safeEmit("trackended", this.track.id);
21564
+ this.logger.debug('Producer::track "ended" event trackId: '.concat(this.track.id), u(this, Ut)[Ut]), this.safeEmit("trackended", this.track.id);
21562
21565
  } }, { key: "_handleTrack", value: function() {
21563
21566
  u(this, Qe)[Qe] && u(this, Qe)[Qe].addEventListener("ended", this._onTrackEnded);
21564
21567
  } }, { key: "_destroyTrack", value: function() {
@@ -21567,7 +21570,7 @@ var ir = /* @__PURE__ */ w("handler"), ks = /* @__PURE__ */ w("stopTracks"), Ts
21567
21570
  u(this, Qe)[Qe].removeEventListener("ended", this._onTrackEnded), u(this, ks)[ks] && u(this, Qe)[Qe].stop();
21568
21571
  } catch (n) {
21569
21572
  var t;
21570
- this.logger.error("Producer::_destroyTrack trackId: ".concat((t = this.track) === null || t === void 0 ? void 0 : t.id), V(V({}, u(this, jt)[jt]), {}, { error: n }));
21573
+ this.logger.error("Producer::_destroyTrack trackId: ".concat((t = this.track) === null || t === void 0 ? void 0 : t.id), V(V({}, u(this, Ut)[Ut]), {}, { error: n }));
21571
21574
  }
21572
21575
  } }]);
21573
21576
  }(ql);
@@ -23340,9 +23343,9 @@ function SO(s) {
23340
23343
  var r = s.state, e = s.direction, t = s.sfuSessionId;
23341
23344
  u(this, Vs)[Vs].mediaState[e] = { state: r, sfuSessionId: t }, this.context.getValue("peerSessionStore").emit($.TRANSPORT_STATE_UPDATE, V({ transport: e }, u(this, Vs)[Vs].mediaState[e]));
23342
23345
  }
23343
- var Pd = /* @__PURE__ */ w("context"), Yt = /* @__PURE__ */ w("logger"), EO = /* @__PURE__ */ function() {
23346
+ var Pd = /* @__PURE__ */ w("context"), Xt = /* @__PURE__ */ w("logger"), EO = /* @__PURE__ */ function() {
23344
23347
  function s(r, e, t, n, i) {
23345
- P(this, s), Object.defineProperty(this, Pd, { writable: !0, value: void 0 }), Object.defineProperty(this, Yt, { writable: !0, value: void 0 }), this.events = e, this.recvTransport = t, this.socket = n, this.socketHandler = i, u(this, Pd)[Pd] = r, u(this, Yt)[Yt] = r.getValue("logger");
23348
+ P(this, s), Object.defineProperty(this, Pd, { writable: !0, value: void 0 }), Object.defineProperty(this, Xt, { writable: !0, value: void 0 }), this.events = e, this.recvTransport = t, this.socket = n, this.socketHandler = i, u(this, Pd)[Pd] = r, u(this, Xt)[Xt] = r.getValue("logger");
23346
23349
  }
23347
23350
  return S(s, [{ key: "create", value: function() {
23348
23351
  var r = m(/* @__PURE__ */ h().m(function t(n) {
@@ -23368,7 +23371,7 @@ var Pd = /* @__PURE__ */ w("context"), Yt = /* @__PURE__ */ w("logger"), EO = /*
23368
23371
  var g = Fe(f, 2), y = g[0], k = g[1], b = l.get(y);
23369
23372
  if (b) {
23370
23373
  if (k.errorCode) {
23371
- u(i, Yt)[Yt].warn("Consumer request failed for producer ".concat(y), { error: { message: k.errorCode } }), p.push(V(V({}, b), {}, { errorCode: k.errorCode }));
23374
+ u(i, Xt)[Xt].warn("Consumer request failed for producer ".concat(y), { error: { message: k.errorCode } }), p.push(V(V({}, b), {}, { errorCode: k.errorCode }));
23372
23375
  return;
23373
23376
  }
23374
23377
  var T = {};
@@ -23393,13 +23396,13 @@ var Pd = /* @__PURE__ */ w("context"), Yt = /* @__PURE__ */ w("logger"), EO = /*
23393
23396
  for (; ; )
23394
23397
  switch (c.p = c.n) {
23395
23398
  case 0:
23396
- return c.p = 0, u(this, Yt)[Yt].info("Negotiating socket consumer", { transport: this.recvTransport }), u(this, Yt)[Yt].debug("[SDP] setting remote offer: ".concat(JSON.stringify(n), " on recvTransport"), { transport: this.recvTransport }), c.n = 1, this.recvTransport.setRemoteOffer(n);
23399
+ return c.p = 0, u(this, Xt)[Xt].info("Negotiating socket consumer", { transport: this.recvTransport }), u(this, Xt)[Xt].debug("[SDP] setting remote offer: ".concat(JSON.stringify(n), " on recvTransport"), { transport: this.recvTransport }), c.n = 1, this.recvTransport.setRemoteOffer(n);
23397
23400
  case 1:
23398
- return i = c.v, a = { transportId: this.recvTransport.serverId, description: { sdp: i.sdp, type: i.type, target: qi.SUBSCRIBER } }, u(this, Yt)[Yt].debug("sending renegotiate request: ".concat(JSON.stringify(a), " on recvTransport"), { transport: this.recvTransport }), c.n = 2, this.socket.sendMessagePromise(this.events.renegotiateSessionDescription, pS.toBinary(a));
23401
+ return i = c.v, a = { transportId: this.recvTransport.serverId, description: { sdp: i.sdp, type: i.type, target: qi.SUBSCRIBER } }, u(this, Xt)[Xt].debug("sending renegotiate request: ".concat(JSON.stringify(a), " on recvTransport"), { transport: this.recvTransport }), c.n = 2, this.socket.sendMessagePromise(this.events.renegotiateSessionDescription, pS.toBinary(a));
23399
23402
  case 2:
23400
- return u(this, Yt)[Yt].info("Renegotiation done", { transport: this.recvTransport }), c.a(2, i);
23403
+ return u(this, Xt)[Xt].info("Renegotiation done", { transport: this.recvTransport }), c.a(2, i);
23401
23404
  case 3:
23402
- return c.p = 3, o = c.v, u(this, Yt)[Yt].error("Failed to renegotiate", { error: o }), c.a(2, void 0);
23405
+ return c.p = 3, o = c.v, u(this, Xt)[Xt].error("Failed to renegotiate", { error: o }), c.a(2, void 0);
23403
23406
  }
23404
23407
  }, t, this, [[0, 3]]);
23405
23408
  }));
@@ -23429,7 +23432,7 @@ var Pd = /* @__PURE__ */ w("context"), Yt = /* @__PURE__ */ w("logger"), EO = /*
23429
23432
  case 0:
23430
23433
  return v = d.map(function(b) {
23431
23434
  return b.localId;
23432
- }), u(i, Yt)[Yt].info("Closing consumers: ".concat(JSON.stringify(v))), f = { description: { sdp: p.sdp, type: p.type, target: qi.SUBSCRIBER }, consumerIds: v, consumingTransportId: i.recvTransport.serverId }, k.n = 1, i.socketHandler.closeConsumer(f);
23435
+ }), u(i, Xt)[Xt].info("Closing consumers: ".concat(JSON.stringify(v))), f = { description: { sdp: p.sdp, type: p.type, target: qi.SUBSCRIBER }, consumerIds: v, consumingTransportId: i.recvTransport.serverId }, k.n = 1, i.socketHandler.closeConsumer(f);
23433
23436
  case 1:
23434
23437
  return g = k.v, y = UE.fromBinary(g).description, k.a(2, { sdp: y.sdp, type: y.type });
23435
23438
  }
@@ -23464,7 +23467,7 @@ var Pd = /* @__PURE__ */ w("context"), Yt = /* @__PURE__ */ w("logger"), EO = /*
23464
23467
  a.requests.push({ producerId: d, producingTransportId: p, mid: v, simulcast: { preferredRid: i === 0 ? "q" : "h", priorityOrdering: "asciibetical", ridNotAvailable: "asciibetical" } });
23465
23468
  }), c.n = 1, this.socketHandler.updateConsumersSimulcastConfig(a);
23466
23469
  case 1:
23467
- u(this, Yt)[Yt].info("Consumers switched layers to ".concat(i), { consumerIds: o == null ? void 0 : o.map(function(l) {
23470
+ u(this, Xt)[Xt].info("Consumers switched layers to ".concat(i), { consumerIds: o == null ? void 0 : o.map(function(l) {
23468
23471
  var d = l.id;
23469
23472
  return d;
23470
23473
  }) });
@@ -23831,10 +23834,10 @@ function DO(s) {
23831
23834
  };
23832
23835
  }()), u(this, yr)[yr].set(s.id, s), this.context.getValue("peerSessionStore").emit($.NEW_CONSUMER_CREATED, { id: s.id, appData: s.appData, peerId: s.peerId });
23833
23836
  }
23834
- var bu = /* @__PURE__ */ w("zeroCrossingThreshold"), Pu = /* @__PURE__ */ w("minVoiceDuration"), Su = /* @__PURE__ */ w("hangoverFrames"), Ps = /* @__PURE__ */ w("initialEnergyThreshold"), $s = /* @__PURE__ */ w("noiseAdaptationRate"), js = /* @__PURE__ */ w("voiceAdaptationRate"), Ju = /* @__PURE__ */ w("minEnergyThreshold"), Ku = /* @__PURE__ */ w("maxEnergyThreshold"), Ss = /* @__PURE__ */ w("energyRatioThreshold"), _t = /* @__PURE__ */ w("currentEnergyThreshold"), or = /* @__PURE__ */ w("backgroundNoiseEnergy"), ar = /* @__PURE__ */ w("voiceDetected"), Ei = /* @__PURE__ */ w("consecutiveVoiceFrames"), Ci = /* @__PURE__ */ w("hangoverCount"), Jr = /* @__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() {
23837
+ var bu = /* @__PURE__ */ w("zeroCrossingThreshold"), Pu = /* @__PURE__ */ w("minVoiceDuration"), Su = /* @__PURE__ */ w("hangoverFrames"), Ps = /* @__PURE__ */ w("initialEnergyThreshold"), $s = /* @__PURE__ */ w("noiseAdaptationRate"), js = /* @__PURE__ */ w("voiceAdaptationRate"), Ju = /* @__PURE__ */ w("minEnergyThreshold"), Ku = /* @__PURE__ */ w("maxEnergyThreshold"), Ss = /* @__PURE__ */ w("energyRatioThreshold"), At = /* @__PURE__ */ w("currentEnergyThreshold"), or = /* @__PURE__ */ w("backgroundNoiseEnergy"), ar = /* @__PURE__ */ w("voiceDetected"), Ei = /* @__PURE__ */ w("consecutiveVoiceFrames"), Ci = /* @__PURE__ */ w("hangoverCount"), Jr = /* @__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() {
23835
23838
  function s() {
23836
23839
  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;
23837
- 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, Ps, { 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, Ss, { writable: !0, value: void 0 }), Object.defineProperty(this, _t, { 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, Ei, { writable: !0, value: 0 }), Object.defineProperty(this, Ci, { writable: !0, value: 0 }), Object.defineProperty(this, Jr, { writable: !0, value: [] }), Object.defineProperty(this, zu, { writable: !0, value: void 0 }), u(this, Ps)[Ps] = t, u(this, _t)[_t] = 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, Ss)[Ss] = E, u(this, zu)[zu] = M, u(this, or)[or] = t / 2;
23840
+ 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, Ps, { 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, Ss, { 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, Ei, { writable: !0, value: 0 }), Object.defineProperty(this, Ci, { writable: !0, value: 0 }), Object.defineProperty(this, Jr, { writable: !0, value: [] }), Object.defineProperty(this, zu, { writable: !0, value: void 0 }), u(this, Ps)[Ps] = 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, Ss)[Ss] = E, u(this, zu)[zu] = M, u(this, or)[or] = t / 2;
23838
23841
  }
23839
23842
  return S(s, [{
23840
23843
  key: "voiceDetected",
@@ -23849,7 +23852,7 @@ var bu = /* @__PURE__ */ w("zeroCrossingThreshold"), Pu = /* @__PURE__ */ w("min
23849
23852
  }, { key: "processAudioChunk", value: function(e) {
23850
23853
  var t = u(s, Sh)[Sh](e), n = u(s, Eh)[Eh](e);
23851
23854
  u(this, Rd)[Rd](t);
23852
- var i = t / u(this, or)[or], a = i > u(this, Ss)[Ss] && t > u(this, _t)[_t] && n > u(this, bu)[bu];
23855
+ var i = t / u(this, or)[or], a = i > u(this, Ss)[Ss] && t > u(this, At)[At] && n > u(this, bu)[bu];
23853
23856
  return a ? (u(this, Ei)[Ei] += 1, u(this, Ci)[Ci] = u(this, Su)[Su], u(this, Ei)[Ei] >= u(this, Pu)[Pu] && (u(this, ar)[ar] = !0)) : (u(this, Ei)[Ei] = 0, u(this, Ci)[Ci] > 0 ? u(this, Ci)[Ci] -= 1 : u(this, ar)[ar] && (u(this, ar)[ar] = !1), u(this, ar)[ar] || u(this, _d)[_d](t)), { energy: t, isVoice: u(this, ar)[ar] };
23854
23857
  } }, {
23855
23858
  key: "reset",
@@ -23858,21 +23861,21 @@ var bu = /* @__PURE__ */ w("zeroCrossingThreshold"), Pu = /* @__PURE__ */ w("min
23858
23861
  * Reset the detector state
23859
23862
  */
23860
23863
  function() {
23861
- u(this, ar)[ar] = !1, u(this, Ei)[Ei] = 0, u(this, Ci)[Ci] = 0, u(this, _t)[_t] = u(this, Ps)[Ps], u(this, or)[or] = u(this, Ps)[Ps] / 2, u(this, Jr)[Jr] = [];
23864
+ u(this, ar)[ar] = !1, u(this, Ei)[Ei] = 0, u(this, Ci)[Ci] = 0, u(this, At)[At] = u(this, Ps)[Ps], u(this, or)[or] = u(this, Ps)[Ps] / 2, u(this, Jr)[Jr] = [];
23862
23865
  }
23863
23866
  )
23864
23867
  /**
23865
23868
  * Get current adaptive threshold values for debugging/visualization
23866
23869
  */
23867
23870
  }, { key: "getThresholdInfo", value: function() {
23868
- return { currentEnergyThreshold: u(this, _t)[_t], backgroundNoiseEnergy: u(this, or)[or], energyRatioThreshold: u(this, Ss)[Ss] };
23871
+ return { currentEnergyThreshold: u(this, At)[At], backgroundNoiseEnergy: u(this, or)[or], energyRatioThreshold: u(this, Ss)[Ss] };
23869
23872
  } }]);
23870
23873
  }();
23871
23874
  function LO(s) {
23872
- u(this, ar)[ar] ? u(this, _t)[_t] = u(this, js)[js] * u(this, _t)[_t] + (1 - u(this, js)[js]) * s : u(this, _t)[_t] = u(this, $s)[$s] * u(this, _t)[_t] + (1 - u(this, $s)[$s]) * u(this, or)[or], u(this, _t)[_t] = Math.max(u(this, Ju)[Ju], Math.min(u(this, Ku)[Ku], u(this, _t)[_t]));
23875
+ u(this, ar)[ar] ? u(this, At)[At] = u(this, js)[js] * u(this, At)[At] + (1 - u(this, js)[js]) * s : u(this, At)[At] = u(this, $s)[$s] * u(this, At)[At] + (1 - u(this, $s)[$s]) * u(this, or)[or], u(this, At)[At] = Math.max(u(this, Ju)[Ju], Math.min(u(this, Ku)[Ku], u(this, At)[At]));
23873
23876
  }
23874
23877
  function NO(s) {
23875
- if (s < u(this, _t)[_t] * 1.2)
23878
+ if (s < u(this, At)[At] * 1.2)
23876
23879
  if (u(this, Jr)[Jr].push(s), u(this, Jr)[Jr].length > u(this, zu)[zu] && u(this, Jr)[Jr].shift(), u(this, Jr)[Jr].length >= 10) {
23877
23880
  var r = De(u(this, Jr)[Jr]).sort(function(t, n) {
23878
23881
  return t - n;
@@ -24037,12 +24040,12 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24037
24040
  for (var i = n > 1 ? void 0 : n ? JO(e, t) : e, a = r.length - 1, o; a >= 0; a--)
24038
24041
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
24039
24042
  return n && i && GO(e, t, i), i;
24040
- }, Yu = /* @__PURE__ */ w("roomUUID"), Xu = /* @__PURE__ */ w("peerDisplayName"), qe = /* @__PURE__ */ w("socketClient"), B = /* @__PURE__ */ w("sfuHandler"), _h = /* @__PURE__ */ w("rtpCapabilities"), gt = /* @__PURE__ */ w("events"), Qr = /* @__PURE__ */ w("roomJoiningInProgress"), Li = /* @__PURE__ */ w("onceJoined"), _i = /* @__PURE__ */ w("transportQueue"), Au = /* @__PURE__ */ w("rejoinRoomFn"), Ht = /* @__PURE__ */ w("connectionPromise"), Hr = /* @__PURE__ */ w("screenshareConsumerProducer"), mt = /* @__PURE__ */ w("producerTypes"), Et = /* @__PURE__ */ w("audioActivityReporter"), Wr = /* @__PURE__ */ w("connectionHandler"), Iu = /* @__PURE__ */ w("handleMediaRoomJoinFailure"), Ad = /* @__PURE__ */ w("joinRoom"), Ah = /* @__PURE__ */ w("completeJoinRoom"), Ih = /* @__PURE__ */ w("reportRoomJoinedAnalytics"), Zu = /* @__PURE__ */ w("initializeConnection"), Mh = /* @__PURE__ */ w("getRtpCapabilities"), Oh = /* @__PURE__ */ w("sendJoinRoomMessage"), Ye = /* @__PURE__ */ w("getProducer"), Ai = /* @__PURE__ */ w("setProducer"), Id = /* @__PURE__ */ w("deleteProducer"), Md = /* @__PURE__ */ w("handlePeerProducerCreateBroadcast"), Od = /* @__PURE__ */ w("getMicProducerDefaults"), Dd = /* @__PURE__ */ w("getWebcamProducerDefaults"), Ze = /* @__PURE__ */ function() {
24043
+ }, Yu = /* @__PURE__ */ w("roomUUID"), Xu = /* @__PURE__ */ w("peerDisplayName"), qe = /* @__PURE__ */ w("socketClient"), B = /* @__PURE__ */ w("sfuHandler"), _h = /* @__PURE__ */ w("rtpCapabilities"), gt = /* @__PURE__ */ w("events"), Qr = /* @__PURE__ */ w("roomJoiningInProgress"), Li = /* @__PURE__ */ w("onceJoined"), _i = /* @__PURE__ */ w("transportQueue"), Au = /* @__PURE__ */ w("rejoinRoomFn"), Bt = /* @__PURE__ */ w("connectionPromise"), Hr = /* @__PURE__ */ w("screenshareConsumerProducer"), mt = /* @__PURE__ */ w("producerTypes"), Ct = /* @__PURE__ */ w("audioActivityReporter"), Wr = /* @__PURE__ */ w("connectionHandler"), Iu = /* @__PURE__ */ w("handleMediaRoomJoinFailure"), Ad = /* @__PURE__ */ w("joinRoom"), Ah = /* @__PURE__ */ w("completeJoinRoom"), Ih = /* @__PURE__ */ w("reportRoomJoinedAnalytics"), Zu = /* @__PURE__ */ w("initializeConnection"), Mh = /* @__PURE__ */ w("getRtpCapabilities"), Oh = /* @__PURE__ */ w("sendJoinRoomMessage"), Ye = /* @__PURE__ */ w("getProducer"), Ai = /* @__PURE__ */ w("setProducer"), Id = /* @__PURE__ */ w("deleteProducer"), Md = /* @__PURE__ */ w("handlePeerProducerCreateBroadcast"), Od = /* @__PURE__ */ w("getMicProducerDefaults"), Dd = /* @__PURE__ */ w("getWebcamProducerDefaults"), Ze = /* @__PURE__ */ function() {
24041
24044
  function s(r, e) {
24042
24045
  var t, n, i = this;
24043
- P(this, s), Object.defineProperty(this, Dd, { value: sD }), Object.defineProperty(this, Od, { value: aD }), Object.defineProperty(this, Md, { value: iD }), Object.defineProperty(this, Id, { value: nD }), Object.defineProperty(this, Ai, { value: rD }), Object.defineProperty(this, Ye, { value: tD }), Object.defineProperty(this, Oh, { value: eD }), Object.defineProperty(this, Mh, { value: xO }), Object.defineProperty(this, Zu, { value: ZO }), Object.defineProperty(this, Ih, { value: XO }), Object.defineProperty(this, Ah, { value: YO }), Object.defineProperty(this, Ad, { value: QO }), Object.defineProperty(this, Iu, { value: zO }), Object.defineProperty(this, Wr, { get: KO, set: void 0 }), this.context = void 0, this.authToken = void 0, this.e2ee = void 0, Object.defineProperty(this, Yu, { writable: !0, value: void 0 }), Object.defineProperty(this, Xu, { writable: !0, value: void 0 }), Object.defineProperty(this, qe, { writable: !0, value: void 0 }), Object.defineProperty(this, B, { writable: !0, value: void 0 }), Object.defineProperty(this, _h, { writable: !0, value: void 0 }), Object.defineProperty(this, gt, { writable: !0, value: void 0 }), Object.defineProperty(this, Qr, { writable: !0, value: void 0 }), Object.defineProperty(this, Li, { writable: !0, value: void 0 }), Object.defineProperty(this, _i, { writable: !0, value: void 0 }), Object.defineProperty(this, Au, { writable: !0, value: void 0 }), Object.defineProperty(this, Ht, { writable: !0, value: null }), Object.defineProperty(this, Hr, { writable: !0, value: void 0 }), Object.defineProperty(this, mt, { writable: !0, value: void 0 }), Object.defineProperty(this, Et, { writable: !0, value: void 0 }), this.context = r;
24046
+ P(this, s), Object.defineProperty(this, Dd, { value: sD }), Object.defineProperty(this, Od, { value: aD }), Object.defineProperty(this, Md, { value: iD }), Object.defineProperty(this, Id, { value: nD }), Object.defineProperty(this, Ai, { value: rD }), Object.defineProperty(this, Ye, { value: tD }), Object.defineProperty(this, Oh, { value: eD }), Object.defineProperty(this, Mh, { value: xO }), Object.defineProperty(this, Zu, { value: ZO }), Object.defineProperty(this, Ih, { value: XO }), Object.defineProperty(this, Ah, { value: YO }), Object.defineProperty(this, Ad, { value: QO }), Object.defineProperty(this, Iu, { value: zO }), Object.defineProperty(this, Wr, { get: KO, set: void 0 }), this.context = void 0, this.authToken = void 0, this.e2ee = void 0, Object.defineProperty(this, Yu, { writable: !0, value: void 0 }), Object.defineProperty(this, Xu, { writable: !0, value: void 0 }), Object.defineProperty(this, qe, { writable: !0, value: void 0 }), Object.defineProperty(this, B, { writable: !0, value: void 0 }), Object.defineProperty(this, _h, { writable: !0, value: void 0 }), Object.defineProperty(this, gt, { writable: !0, value: void 0 }), Object.defineProperty(this, Qr, { writable: !0, value: void 0 }), Object.defineProperty(this, Li, { writable: !0, value: void 0 }), Object.defineProperty(this, _i, { writable: !0, value: void 0 }), Object.defineProperty(this, Au, { writable: !0, value: void 0 }), Object.defineProperty(this, Bt, { writable: !0, value: null }), Object.defineProperty(this, Hr, { writable: !0, value: void 0 }), Object.defineProperty(this, mt, { writable: !0, value: void 0 }), Object.defineProperty(this, Ct, { writable: !0, value: void 0 }), this.context = r;
24044
24047
  var a = e.socket;
24045
- this.mediaJoined = !1, u(this, qe)[qe] = a, u(this, Qr)[Qr] = !1, u(this, B)[B] = new _O(r, a), u(this, gt)[gt] = u(this, B)[B].events, u(this, Hr)[Hr] = /* @__PURE__ */ new Set(), u(this, mt)[mt] = /* @__PURE__ */ new Map(), u(this, Li)[Li] = !1, u(this, _i)[_i] = new oh(r.getValue("logger")), u(this, Et)[Et] = new Wl(this.context, u(this, B)[B].socketHandler.audioActivity.bind(u(this, B)[B].socketHandler)), this.e2ee = (t = (n = r.getValue("modules").e2ee) === null || n === void 0 ? void 0 : n.enabled) !== null && t !== void 0 ? t : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), u(this, Au)[Au] = cp(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function o() {
24048
+ this.mediaJoined = !1, u(this, qe)[qe] = a, u(this, Qr)[Qr] = !1, u(this, B)[B] = new _O(r, a), u(this, gt)[gt] = u(this, B)[B].events, u(this, Hr)[Hr] = /* @__PURE__ */ new Set(), u(this, mt)[mt] = /* @__PURE__ */ new Map(), u(this, Li)[Li] = !1, u(this, _i)[_i] = new oh(r.getValue("logger")), u(this, Ct)[Ct] = new Wl(this.context, u(this, B)[B].socketHandler.audioActivity.bind(u(this, B)[B].socketHandler)), this.e2ee = (t = (n = r.getValue("modules").e2ee) === null || n === void 0 ? void 0 : n.enabled) !== null && t !== void 0 ? t : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), u(this, Au)[Au] = cp(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function o() {
24046
24049
  var c, l;
24047
24050
  return h().w(function(d) {
24048
24051
  for (; ; )
@@ -24089,7 +24092,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24089
24092
  u(this, Wr)[Wr].mediaJoined = e;
24090
24093
  } }, { key: "reset", value: function(e) {
24091
24094
  var t = e.resetTransportQueue;
24092
- this.logger.info("Resetting media node client: closing all transports, producers, consumers, and queues(resetTransportQueue: ".concat(t, ").")), u(this, B)[B].closeAllProducers(), u(this, B)[B].closeAllConsumers(), u(this, mt)[mt].clear(), u(this, Hr)[Hr].clear(), u(this, Ht)[Ht] = null, t && u(this, _i)[_i].stop(), u(this, B)[B].stopAllTransports(), u(this, B)[B].reset(), t && (u(this, _i)[_i] = new oh());
24095
+ this.logger.info("Resetting media node client: closing all transports, producers, consumers, and queues(resetTransportQueue: ".concat(t, ").")), u(this, B)[B].closeAllProducers(), u(this, B)[B].closeAllConsumers(), u(this, mt)[mt].clear(), u(this, Hr)[Hr].clear(), u(this, Bt)[Bt] = null, t && u(this, _i)[_i].stop(), u(this, B)[B].stopAllTransports(), u(this, B)[B].reset(), t && (u(this, _i)[_i] = new oh());
24093
24096
  } }, { key: "joinRoom", value: function() {
24094
24097
  var r = m(/* @__PURE__ */ h().m(function t(n, i) {
24095
24098
  var a = this, o, c, l, d, p = arguments, v;
@@ -24124,13 +24127,13 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24124
24127
  for (; ; )
24125
24128
  switch (d.n) {
24126
24129
  case 0:
24127
- if (o = l.length > 2 && l[2] !== void 0 ? l[2] : !1, c = l.length > 3 && l[3] !== void 0 ? l[3] : {}, !u(this, Ht)[Ht]) {
24130
+ if (o = l.length > 2 && l[2] !== void 0 ? l[2] : !1, c = l.length > 3 && l[3] !== void 0 ? l[3] : {}, !u(this, Bt)[Bt]) {
24128
24131
  d.n = 1;
24129
24132
  break;
24130
24133
  }
24131
- return d.a(2, u(this, Ht)[Ht]);
24134
+ return d.a(2, u(this, Bt)[Bt]);
24132
24135
  case 1:
24133
- return u(this, Ht)[Ht] = m(/* @__PURE__ */ h().m(function p() {
24136
+ return u(this, Bt)[Bt] = m(/* @__PURE__ */ h().m(function p() {
24134
24137
  var v;
24135
24138
  return h().w(function(f) {
24136
24139
  for (; ; )
@@ -24141,12 +24144,12 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24141
24144
  f.n = 3;
24142
24145
  break;
24143
24146
  case 2:
24144
- throw f.p = 2, v = f.v, u(a, Ht)[Ht] = null, v;
24147
+ throw f.p = 2, v = f.v, u(a, Bt)[Bt] = null, v;
24145
24148
  case 3:
24146
24149
  return f.a(2);
24147
24150
  }
24148
24151
  }, p, null, [[0, 2]]);
24149
- }))(), d.a(2, u(this, Ht)[Ht]);
24152
+ }))(), d.a(2, u(this, Bt)[Bt]);
24150
24153
  }
24151
24154
  }, t, this);
24152
24155
  }));
@@ -24379,7 +24382,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24379
24382
  case 3:
24380
24383
  return f.n = 4, this.resumeMic();
24381
24384
  case 4:
24382
- return u(this, Et)[Et] && (u(this, Et)[Et].audioTrack = n, u(this, Et)[Et].producerId = o, u(this, Et)[Et].start(!0)), f.a(2);
24385
+ return u(this, Ct)[Ct] && (u(this, Ct)[Ct].audioTrack = n, u(this, Ct)[Ct].producerId = o, u(this, Ct)[Ct].start(!0)), f.a(2);
24383
24386
  case 5:
24384
24387
  return f.n = 6, u(this, B)[B].closeProducer(o, { stopTrack: !1 });
24385
24388
  case 6:
@@ -24392,7 +24395,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24392
24395
  }, p = u(this, B)[B].createProducer(l, d), u(this, Ai)[Ai](bt.MIC, p.then(function(g) {
24393
24396
  return g.id;
24394
24397
  })), f.n = 9, p.then(function(g) {
24395
- u(i, Et)[Et] && (u(i, Et)[Et].audioTrack = g.track, u(i, Et)[Et].producerId = g.id, u(i, Et)[Et].start());
24398
+ u(i, Ct)[Ct] && (u(i, Ct)[Ct].audioTrack = g.track, u(i, Ct)[Ct].producerId = g.id, u(i, Ct)[Ct].start());
24396
24399
  });
24397
24400
  case 9:
24398
24401
  f.n = 11;
@@ -24429,7 +24432,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24429
24432
  }
24430
24433
  return this.logger.info("pauseMic::mic_producer_already_paused"), c.a(2);
24431
24434
  case 3:
24432
- a.pause(), (n = u(this, Et)[Et]) === null || n === void 0 || n.stop(), o = { producerId: a.id, pause: !0 }, u(this, qe)[qe].sendMessage(u(this, gt)[gt].toggleProducer, Hc.toBinary(o)), this.logger.info("Paused mic producer ".concat(a.id, " of local peer ").concat(this.peerId, ". Remote peers will stop hearing this peer."));
24435
+ a.pause(), (n = u(this, Ct)[Ct]) === null || n === void 0 || n.stop(), o = { producerId: a.id, pause: !0 }, u(this, qe)[qe].sendMessage(u(this, gt)[gt].toggleProducer, Hc.toBinary(o)), this.logger.info("Paused mic producer ".concat(a.id, " of local peer ").concat(this.peerId, ". Remote peers will stop hearing this peer."));
24433
24436
  case 4:
24434
24437
  return c.a(2);
24435
24438
  }
@@ -24564,7 +24567,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24564
24567
  }
24565
24568
  return a.n = 2, u(this, B)[B].closeProducer(i);
24566
24569
  case 2:
24567
- (n = u(this, Et)[Et]) === null || n === void 0 || n.stop(), u(this, mt)[mt].delete(bt.MIC);
24570
+ (n = u(this, Ct)[Ct]) === null || n === void 0 || n.stop(), u(this, mt)[mt].delete(bt.MIC);
24568
24571
  case 3:
24569
24572
  return a.a(2);
24570
24573
  }
@@ -24947,11 +24950,11 @@ function Dh() {
24947
24950
  for (; ; )
24948
24951
  switch (y.p = y.n) {
24949
24952
  case 0:
24950
- if (u(this, Xu)[Xu] = r, i = !1, t && (o = (a = u(this, Wr)[Wr].mediaState) !== null && a !== void 0 ? a : {}, c = o.recv, l = o.send, d = (l == null ? void 0 : l.state) === Aa.CONNECTED && (c == null ? void 0 : c.state) === Aa.CONNECTED, d ? (this.logger.info("MediaNodeClient.joinRoom: transports healthy — preserving all producers for ownership handover"), u(this, Ht)[Ht] = null, i = !0) : (this.logger.info("MediaNodeClient.joinRoom: transports unhealthy — full reset"), this.reset({ resetTransportQueue: !1 }))), y.p = 1, !u(this, Ht)[Ht]) {
24953
+ if (u(this, Xu)[Xu] = r, i = !1, t && (o = (a = u(this, Wr)[Wr].mediaState) !== null && a !== void 0 ? a : {}, c = o.recv, l = o.send, d = (l == null ? void 0 : l.state) === Aa.CONNECTED && (c == null ? void 0 : c.state) === Aa.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]) {
24951
24954
  y.n = 3;
24952
24955
  break;
24953
24956
  }
24954
- return y.n = 2, u(this, Ht)[Ht];
24957
+ return y.n = 2, u(this, Bt)[Bt];
24955
24958
  case 2:
24956
24959
  y.n = 4;
24957
24960
  break;
@@ -24964,7 +24967,7 @@ function Dh() {
24964
24967
  case 6:
24965
24968
  return y.p = 6, g = y.v, this.logger.error("Failed to complete room join", { error: g }), y.a(2, { roomJoined: !1, error: g });
24966
24969
  case 7:
24967
- return y.p = 7, u(this, Ht)[Ht] = null, y.f(7);
24970
+ return y.p = 7, u(this, Bt)[Bt] = null, y.f(7);
24968
24971
  case 8:
24969
24972
  return y.a(2);
24970
24973
  }
@@ -25176,11 +25179,11 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25176
25179
  for (var i = n > 1 ? void 0 : n ? cD(e, t) : e, a = r.length - 1, o; a >= 0; a--)
25177
25180
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
25178
25181
  return n && i && uD(e, t, i), i;
25179
- }, tm = (la = /* @__PURE__ */ w("socketService"), Wt = /* @__PURE__ */ w("roomSocketHandler"), x = /* @__PURE__ */ w("context"), wt = /* @__PURE__ */ w("roomNodeClient"), /* @__PURE__ */ function() {
25182
+ }, tm = (la = /* @__PURE__ */ w("socketService"), Gt = /* @__PURE__ */ w("roomSocketHandler"), x = /* @__PURE__ */ w("context"), wt = /* @__PURE__ */ w("roomNodeClient"), /* @__PURE__ */ function() {
25180
25183
  function s(r, e, t, n) {
25181
- P(this, s), Object.defineProperty(this, wt, { get: lD, set: void 0 }), this.self = void 0, this.authToken = void 0, Object.defineProperty(this, la, { writable: !0, value: void 0 }), this.viewType = void 0, Object.defineProperty(this, Wt, { writable: !0, value: void 0 }), Object.defineProperty(this, x, { writable: !0, value: void 0 });
25184
+ P(this, s), Object.defineProperty(this, wt, { get: lD, set: void 0 }), this.self = void 0, this.authToken = void 0, Object.defineProperty(this, la, { writable: !0, value: void 0 }), this.viewType = void 0, Object.defineProperty(this, Gt, { writable: !0, value: void 0 }), Object.defineProperty(this, x, { writable: !0, value: void 0 });
25182
25185
  var i = t.socket, a = r.getValue("authToken");
25183
- this.self = e, u(this, x)[x] = r, this.viewType = n, this.authToken = a, u(this, la)[la] = i, u(this, Wt)[Wt] = t, this.setupEvents();
25186
+ this.self = e, u(this, x)[x] = r, this.viewType = n, this.authToken = a, u(this, la)[la] = i, u(this, Gt)[Gt] = t, this.setupEvents();
25184
25187
  }
25185
25188
  return S(s, [{ key: "peerId", get: function() {
25186
25189
  return u(this, x)[x].getValue("peerId");
@@ -25373,17 +25376,17 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25373
25376
  e.self.roomState !== "disconnected" && (e.self.roomState = "disconnected", e.self.emit("roomLeft", { state: "disconnected" }));
25374
25377
  }), u(this, x)[x].getValue("peerSessionStore").on($.SOCKET_SERVICE_FAILED, function() {
25375
25378
  e.logger.error("Socket reconnection failed after exhausting all attempts. SDK re-initialization is required."), e.self.roomState = "failed", e.self.emit("roomLeft", { state: "failed" });
25376
- }), u(this, Wt)[Wt].on(z.waitingRoomRequestAccepted, function() {
25379
+ }), u(this, Gt)[Gt].on(z.waitingRoomRequestAccepted, function() {
25377
25380
  e.waitlistAcceptHandler();
25378
- }), u(this, Wt)[Wt].on(Yc.updateUserPreset, function(t) {
25381
+ }), u(this, Gt)[Gt].on(Yc.updateUserPreset, function(t) {
25379
25382
  t.updatePeersPresets.forEach(function(n) {
25380
25383
  n.userIds === e.self.userId && u(e, x)[x].getValue("peerSessionStore").emit($.UPDATE_PERMISSIONS, n.patch);
25381
25384
  });
25382
- }), u(this, Wt)[Wt].on(z.waitingRoomRequestDenied, function() {
25385
+ }), u(this, Gt)[Gt].on(z.waitingRoomRequestDenied, function() {
25383
25386
  e.waitlistRejectedHandler();
25384
- }), u(this, Wt)[Wt].on(z.kick, function() {
25387
+ }), u(this, Gt)[Gt].on(z.kick, function() {
25385
25388
  e.kickHandler({ kickType: "kick" });
25386
- }), u(this, Wt)[Wt].on(z.kickAll, function() {
25389
+ }), u(this, Gt)[Gt].on(z.kickAll, function() {
25387
25390
  e.kickHandler({ kickType: "kickAll" });
25388
25391
  }), u(this, x)[x].getValue("peerSessionStore").onAsync($.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), u(this, x)[x].getValue("peerSessionStore").on($.PRODUCER_SCORE_UPDATE, function(t) {
25389
25392
  var n, i = t.score, a = t.kind, o = t.appData, c = t.scoreStats, l = (n = o == null ? void 0 : o.screenShare) !== null && n !== void 0 ? n : !1;
@@ -25441,7 +25444,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25441
25444
  }
25442
25445
  throw p = new Error("Socket room join superseded by a newer connection"), d(p), p;
25443
25446
  case 1:
25444
- return l > 0 && n.logger.warn("Retrying socket room join for peer ".concat(i, ": attempt=").concat(l + 1)), g.n = 2, u(n, Wt)[Wt].joinRoom(n.self);
25447
+ return l > 0 && n.logger.warn("Retrying socket room join for peer ".concat(i, ": attempt=").concat(l + 1)), g.n = 2, u(n, Gt)[Gt].joinRoom(n.self);
25445
25448
  case 2:
25446
25449
  if (v = g.v, n.self.id === i) {
25447
25450
  g.n = 3;
@@ -25473,7 +25476,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25473
25476
  case 0:
25474
25477
  return n = c.length > 0 && c[0] !== void 0 ? c[0] : !1, p.p = 1, this.logger.info("Local peer is joining socket room."), p.n = 2, this.joinSocketRoomWithRetry();
25475
25478
  case 2:
25476
- if (i = p.v, a = i.peer, this.logger.info("Local peer has joined socket room."), u(this, Wt)[Wt].socket.flush(), o = gp(a.stageType), u(this, x)[x].setValue("stageStatus", o, !1), !a.waitlisted) {
25479
+ if (i = p.v, a = i.peer, this.logger.info("Local peer has joined socket room."), u(this, Gt)[Gt].socket.flush(), o = gp(a.stageType), u(this, x)[x].setValue("stageStatus", o, !1), !a.waitlisted) {
25477
25480
  p.n = 3;
25478
25481
  break;
25479
25482
  }
@@ -25522,7 +25525,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25522
25525
  case 2:
25523
25526
  if (u(this, x)[x].setValue("roomNodeClient", void 0), u(this, x)[x].notify("stageStatus"), a = u(this, x)[x].getValue("connectionHandler"), a.socketJoined)
25524
25527
  try {
25525
- o = u(this, Wt)[Wt].leaveRoom(this.self), o || this.logger.warn("SelfController.leaveRoom: socket leave was not sent");
25528
+ o = u(this, Gt)[Gt].leaveRoom(this.self), o || this.logger.warn("SelfController.leaveRoom: socket leave was not sent");
25526
25529
  } catch (d) {
25527
25530
  this.logger.error("SelfController.leaveRoom: socket leave failed", { error: d });
25528
25531
  }
@@ -25673,7 +25676,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25673
25676
  for (; ; )
25674
25677
  switch (g.n) {
25675
25678
  case 0:
25676
- return l = Yr(), d = !!n.getValue("cachedUserDetails"), g.n = 1, tr.__init__(n, a, o, c, c.name, d);
25679
+ return l = Yr(), d = !!n.getValue("cachedUserDetails"), g.n = 1, rr.__init__(n, a, o, c, c.name, d);
25677
25680
  case 1:
25678
25681
  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() {
25679
25682
  var k, b, T, E, I, M, _, O, L, q, X, Y, H;
@@ -25833,9 +25836,9 @@ var fD = Object.defineProperty, gD = Object.getOwnPropertyDescriptor, mD = funct
25833
25836
  for (var i = n > 1 ? void 0 : n ? gD(e, t) : e, a = r.length - 1, o; a >= 0; a--)
25834
25837
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
25835
25838
  return n && i && fD(e, t, i), i;
25836
- }, Ut = /* @__PURE__ */ w("context"), rm = /* @__PURE__ */ function() {
25839
+ }, Ft = /* @__PURE__ */ w("context"), rm = /* @__PURE__ */ function() {
25837
25840
  function s(r, e) {
25838
- P(this, s), this.socket = void 0, Object.defineProperty(this, Ut, { writable: !0, value: void 0 }), u(this, Ut)[Ut] = r, this.socket = e, this.handleSocketEvents(), u(this, Ut)[Ut].setValue("roomSocketHandler", this);
25841
+ P(this, s), this.socket = void 0, Object.defineProperty(this, Ft, { writable: !0, value: void 0 }), u(this, Ft)[Ft] = r, this.socket = e, this.handleSocketEvents(), u(this, Ft)[Ft].setValue("roomSocketHandler", this);
25839
25842
  }
25840
25843
  return S(s, [{
25841
25844
  key: "telemetry",
@@ -25845,7 +25848,7 @@ var fD = Object.defineProperty, gD = Object.getOwnPropertyDescriptor, mD = funct
25845
25848
  * Not for external use
25846
25849
  */
25847
25850
  function() {
25848
- return u(this, Ut)[Ut].getValue("telemetry");
25851
+ return u(this, Ft)[Ft].getValue("telemetry");
25849
25852
  }
25850
25853
  )
25851
25854
  /**
@@ -25853,7 +25856,7 @@ var fD = Object.defineProperty, gD = Object.getOwnPropertyDescriptor, mD = funct
25853
25856
  * Not for external use
25854
25857
  */
25855
25858
  }, { key: "logger", get: function() {
25856
- return u(this, Ut)[Ut].getValue("logger");
25859
+ return u(this, Ft)[Ft].getValue("logger");
25857
25860
  } }, { key: "cleanup", value: function() {
25858
25861
  try {
25859
25862
  var e;
@@ -25870,9 +25873,9 @@ var fD = Object.defineProperty, gD = Object.getOwnPropertyDescriptor, mD = funct
25870
25873
  case 0:
25871
25874
  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;
25872
25875
  case 2:
25873
- return c = k.fromBinary.call(k, T.v.payload), l = c.peer, u(this, Ut)[Ut].getValue("connectionHandler").socketJoined = !0, u(this, Ut)[Ut].getValue("peerSessionStore").emit($.SOCKET_SERVICE_ROOM_JOINED, { peer: l }), d = this.getRoomState(), p = this.getRoomPeersNonPaginated(), T.n = 3, Promise.all([d, p]);
25876
+ 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]);
25874
25877
  case 3:
25875
- return v = T.v, f = Fe(v, 2), g = f[0].room, y = f[1].peers, u(this, Ut)[Ut].getValue("peerSessionStore").emit($.ROOM_STATE, g), u(this, Ut)[Ut].getValue("peerSessionStore").emit($.SOCKET_PEERS, y), T.a(2, { peer: l });
25878
+ return v = T.v, f = Fe(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 });
25876
25879
  case 4:
25877
25880
  throw T.p = 4, b = T.v, this.logger.error("RoomSocketHandler.joinRoom.failed", { error: b }), b;
25878
25881
  case 5:
@@ -26186,7 +26189,7 @@ var fD = Object.defineProperty, gD = Object.getOwnPropertyDescriptor, mD = funct
26186
26189
  var n = t.payload;
26187
26190
  try {
26188
26191
  var i = tu.fromBinary(n);
26189
- u(e, Ut)[Ut].getValue("peerSessionStore").emit($.ROOM_MESSAGE, { payload: JSON.parse(new TextDecoder().decode(i.payload)), type: i.type, timestamp: i.timestamp });
26192
+ u(e, Ft)[Ft].getValue("peerSessionStore").emit($.ROOM_MESSAGE, { payload: JSON.parse(new TextDecoder().decode(i.payload)), type: i.type, timestamp: i.timestamp });
26190
26193
  } catch (a) {
26191
26194
  e.logger.error("failed to decode broadcast message:", a);
26192
26195
  }
@@ -26194,7 +26197,7 @@ var fD = Object.defineProperty, gD = Object.getOwnPropertyDescriptor, mD = funct
26194
26197
  var n = t.payload;
26195
26198
  try {
26196
26199
  var i = tu.fromBinary(n);
26197
- u(e, Ut)[Ut].getValue("peerSessionStore").emit($.MESSAGE, { payload: JSON.parse(new TextDecoder().decode(i.payload)), type: i.type, timestamp: i.timestamp });
26200
+ u(e, Ft)[Ft].getValue("peerSessionStore").emit($.MESSAGE, { payload: JSON.parse(new TextDecoder().decode(i.payload)), type: i.type, timestamp: i.timestamp });
26198
26201
  } catch (a) {
26199
26202
  e.logger.error("failed to decode peer broadcast message:", a);
26200
26203
  }
@@ -26291,9 +26294,9 @@ var fD = Object.defineProperty, gD = Object.getOwnPropertyDescriptor, mD = funct
26291
26294
  }() }]);
26292
26295
  }();
26293
26296
  mD([D.trace("RoomSocketHandler.joinRoom")], rm.prototype, "joinRoom", 1);
26294
- var Ct = /* @__PURE__ */ w("socket"), yD = /* @__PURE__ */ function() {
26297
+ var Rt = /* @__PURE__ */ w("socket"), yD = /* @__PURE__ */ function() {
26295
26298
  function s(r) {
26296
- P(this, s), Object.defineProperty(this, Ct, { writable: !0, value: void 0 }), u(this, Ct)[Ct] = r;
26299
+ P(this, s), Object.defineProperty(this, Rt, { writable: !0, value: void 0 }), u(this, Rt)[Rt] = r;
26297
26300
  }
26298
26301
  return S(s, [{ key: "getStageRequests", value: function() {
26299
26302
  var r = m(/* @__PURE__ */ h().m(function t() {
@@ -26302,7 +26305,7 @@ var Ct = /* @__PURE__ */ w("socket"), yD = /* @__PURE__ */ function() {
26302
26305
  for (; ; )
26303
26306
  switch (a.n) {
26304
26307
  case 0:
26305
- return a.n = 1, u(this, Ct)[Ct].sendMessagePromise(z.getStageRequests);
26308
+ return a.n = 1, u(this, Rt)[Rt].sendMessagePromise(z.getStageRequests);
26306
26309
  case 1:
26307
26310
  return n = a.v, i = n.payload, a.a(2, i ? cd.fromBinary(i) : { stageRequests: [] });
26308
26311
  }
@@ -26313,9 +26316,9 @@ var Ct = /* @__PURE__ */ w("socket"), yD = /* @__PURE__ */ function() {
26313
26316
  }
26314
26317
  return e;
26315
26318
  }() }, { key: "requestAccess", value: function() {
26316
- u(this, Ct)[Ct].sendMessage(z.requestStageAccess);
26319
+ u(this, Rt)[Rt].sendMessage(z.requestStageAccess);
26317
26320
  } }, { key: "cancelRequestAccess", value: function() {
26318
- u(this, Ct)[Ct].sendMessage(z.cancelStageRequest);
26321
+ u(this, Rt)[Rt].sendMessage(z.cancelStageRequest);
26319
26322
  } }, { key: "grantAccess", value: function() {
26320
26323
  var r = m(/* @__PURE__ */ h().m(function t(n) {
26321
26324
  var i;
@@ -26323,7 +26326,7 @@ var Ct = /* @__PURE__ */ w("socket"), yD = /* @__PURE__ */ function() {
26323
26326
  for (; ; )
26324
26327
  switch (a.n) {
26325
26328
  case 0:
26326
- i = { userIds: n }, u(this, Ct)[Ct].sendMessage(z.grantStageAccess, E_.toBinary(i));
26329
+ i = { userIds: n }, u(this, Rt)[Rt].sendMessage(z.grantStageAccess, E_.toBinary(i));
26327
26330
  case 1:
26328
26331
  return a.a(2);
26329
26332
  }
@@ -26340,7 +26343,7 @@ var Ct = /* @__PURE__ */ w("socket"), yD = /* @__PURE__ */ function() {
26340
26343
  for (; ; )
26341
26344
  switch (a.n) {
26342
26345
  case 0:
26343
- i = { userIds: n }, u(this, Ct)[Ct].sendMessage(z.denyStageAccess, R_.toBinary(i));
26346
+ i = { userIds: n }, u(this, Rt)[Rt].sendMessage(z.denyStageAccess, R_.toBinary(i));
26344
26347
  case 1:
26345
26348
  return a.a(2);
26346
26349
  }
@@ -26351,13 +26354,13 @@ var Ct = /* @__PURE__ */ w("socket"), yD = /* @__PURE__ */ function() {
26351
26354
  }
26352
26355
  return e;
26353
26356
  }() }, { key: "joinStage", value: function() {
26354
- return u(this, Ct)[Ct].sendMessagePromise(z.joinStage, void 0, void 0, z.peerStageStatusUpdate);
26357
+ return u(this, Rt)[Rt].sendMessagePromise(z.joinStage, void 0, void 0, z.peerStageStatusUpdate);
26355
26358
  } }, { key: "leaveStage", value: function(e) {
26356
26359
  var t = { userIds: [e] };
26357
- return u(this, Ct)[Ct].sendMessagePromise(z.leaveStage, $v.toBinary(t), void 0, z.peerStageStatusUpdate);
26360
+ return u(this, Rt)[Rt].sendMessagePromise(z.leaveStage, $v.toBinary(t), void 0, z.peerStageStatusUpdate);
26358
26361
  } }, { key: "kick", value: function(e) {
26359
26362
  var t = { userIds: e };
26360
- return u(this, Ct)[Ct].sendMessagePromise(z.leaveStage, $v.toBinary(t));
26363
+ return u(this, Rt)[Rt].sendMessagePromise(z.leaveStage, $v.toBinary(t));
26361
26364
  } }, { key: "on", value: function(e, t) {
26362
26365
  var n;
26363
26366
  switch (e) {
@@ -26381,7 +26384,7 @@ var Ct = /* @__PURE__ */ w("socket"), yD = /* @__PURE__ */ function() {
26381
26384
  break;
26382
26385
  }
26383
26386
  }
26384
- u(this, Ct)[Ct].on(e, function(i) {
26387
+ u(this, Rt)[Rt].on(e, function(i) {
26385
26388
  var a = i.payload, o = i.id;
26386
26389
  if (!a || !n)
26387
26390
  return t(void 0, o);
@@ -26395,7 +26398,7 @@ var Ct = /* @__PURE__ */ w("socket"), yD = /* @__PURE__ */ function() {
26395
26398
  for (; ; )
26396
26399
  switch (a.n) {
26397
26400
  case 0:
26398
- return a.n = 1, u(this, Ct)[Ct].sendMessagePromise(z.getPeerInfo, _g.toBinary({ peerId: n }));
26401
+ return a.n = 1, u(this, Rt)[Rt].sendMessagePromise(z.getPeerInfo, _g.toBinary({ peerId: n }));
26399
26402
  case 1:
26400
26403
  return i = a.v, a.a(2, wo.fromBinary(i.payload));
26401
26404
  }
@@ -26781,18 +26784,18 @@ var da = { debug: 0, info: 1, warn: 2, error: 3 }, _s, As, DD = /* @__PURE__ */
26781
26784
  _s = /* @__PURE__ */ new WeakMap(), As = /* @__PURE__ */ new WeakMap();
26782
26785
  var hm = /* @__PURE__ */ function(s) {
26783
26786
  return s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s;
26784
- }(hm || {}), Zv = "2", xv = "3", Mt, Po, et, Rt, fa, xt, Hi, Ea, Dn, So, Eo, Ni, $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() {
26787
+ }(hm || {}), Zv = "2", xv = "3", Ot, Po, et, _t, fa, er, Hi, Ea, Dn, So, Eo, Ni, $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() {
26785
26788
  function s(r, e) {
26786
26789
  var t, n, i, a, o, c, l, d, p, v, f, g;
26787
- 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, Mt, void 0), xe(this, Po, void 0), xe(this, et, void 0), xe(this, Rt, void 0), xe(this, fa, void 0), xe(this, xt, void 0), xe(this, Hi, void 0), xe(this, Ea, void 0), xe(this, Dn, void 0), xe(this, So, void 0), xe(this, Eo, void 0), xe(this, Ni, void 0);
26790
+ 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, fa, void 0), xe(this, er, void 0), xe(this, Hi, void 0), xe(this, Ea, void 0), xe(this, Dn, void 0), xe(this, So, void 0), xe(this, Eo, void 0), xe(this, Ni, void 0);
26788
26791
  var y, k, b, T, E, I, M, _, O, L, q;
26789
- We(this, Po, r), We(this, fa, []), We(this, xt, new bl()), We(this, Hi, !0), We(this, Dn, !1), We(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), We(this, Ea, { code: void 0, reason: void 0 }), We(this, Rt, (g = F(this, et).logger) !== null && g !== void 0 ? g : new DD(F(this, et).debug ? "debug" : "info")), We(this, Ni, new OD());
26792
+ We(this, Po, r), We(this, fa, []), We(this, er, new bl()), We(this, Hi, !0), We(this, Dn, !1), We(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), We(this, Ea, { code: void 0, reason: void 0 }), We(this, _t, (g = F(this, et).logger) !== null && g !== void 0 ? g : new DD(F(this, et).debug ? "debug" : "info")), We(this, Ni, new OD());
26790
26793
  }
26791
26794
  return S(s, [{
26792
26795
  key: "readyState",
26793
26796
  get: function() {
26794
26797
  var e;
26795
- return (e = F(this, Mt)) == null ? void 0 : e.readyState;
26798
+ return (e = F(this, Ot)) == null ? void 0 : e.readyState;
26796
26799
  }
26797
26800
  /**
26798
26801
  * Sockrates connection URL.
@@ -26856,7 +26859,7 @@ var hm = /* @__PURE__ */ function(s) {
26856
26859
  o.n = 1;
26857
26860
  break;
26858
26861
  }
26859
- return F(this, Rt).debug("Websocket was already connecting or connected."), o.a(2);
26862
+ return F(this, _t).debug("Websocket was already connecting or connected."), o.a(2);
26860
26863
  case 1:
26861
26864
  if (F(this, Hi) === !1) {
26862
26865
  o.n = 2;
@@ -26865,29 +26868,29 @@ var hm = /* @__PURE__ */ function(s) {
26865
26868
  return o.a(2, new Promise(function(c, l) {
26866
26869
  ze(n, Vo, tc).call(n), ze(n, nc, El).call(n);
26867
26870
  try {
26868
- We(n, Mt, new WebSocket(ze(n, $h, pm).call(n, F(n, Po)))), F(n, Mt).binaryType = "arraybuffer", F(n, Rt).debug("Connecting");
26871
+ We(n, Ot, new WebSocket(ze(n, $h, pm).call(n, F(n, Po)))), F(n, Ot).binaryType = "arraybuffer", F(n, _t).debug("Connecting");
26869
26872
  var d = setTimeout(function() {
26870
- F(n, Rt).debug("Connection timeout. Closing socket"), We(n, Hi, !0), ze(n, nc, El).call(n), F(n, Mt).close(3001, "Connection Timeout"), F(n, et).autoReconnect && !F(n, Dn) && (F(n, xt).emit(
26873
+ F(n, _t).debug("Connection timeout. Closing socket"), We(n, Hi, !0), ze(n, nc, El).call(n), F(n, Ot).close(3001, "Connection Timeout"), F(n, et).autoReconnect && !F(n, Dn) && (F(n, er).emit(
26871
26874
  "reconnecting"
26872
26875
  /* reconnecting */
26873
26876
  ), ze(n, xu, tl).call(n)), l(new Error("Connection timed out!"));
26874
26877
  }, F(n, et).connectionTimeout);
26875
- F(n, Mt).onopen = function() {
26876
- F(n, Rt).debug("Ready State: ".concat(hm[F(n, Mt).readyState])), d && clearTimeout(d), ze(n, Sl, Hh).call(n), ze(n, Bh, gm).call(n), We(n, Ea, { code: void 0, reason: void 0 }), F(n, xt).emit(
26878
+ F(n, Ot).onopen = function() {
26879
+ F(n, _t).debug("Ready State: ".concat(hm[F(n, Ot).readyState])), d && clearTimeout(d), ze(n, Sl, Hh).call(n), ze(n, Bh, gm).call(n), We(n, Ea, { code: void 0, reason: void 0 }), F(n, er).emit(
26877
26880
  "connected"
26878
26881
  /* connected */
26879
26882
  ), F(n, et).flushOnReconnect && n.flush(), c();
26880
- }, F(n, Mt).onclose = function(p) {
26883
+ }, F(n, Ot).onclose = function(p) {
26881
26884
  try {
26882
26885
  d && clearTimeout(d);
26883
26886
  var v = p.code, f = p.reason;
26884
- l(f), F(n, Rt).debug("Socket closed. Close event:", { event: p }), F(n, Rt).debug("Connection closed code: ".concat(v)), F(n, Rt).debug("Connection closed reason: ".concat(f)), F(n, Dn) || ze(n, Pl, Uh).call(n, v, f);
26887
+ l(f), F(n, _t).debug("Socket closed. Close event:", { event: p }), F(n, _t).debug("Connection closed code: ".concat(v)), F(n, _t).debug("Connection closed reason: ".concat(f)), F(n, Dn) || ze(n, Pl, Uh).call(n, v, f);
26885
26888
  } catch (g) {
26886
26889
  ze(n, $u, xc).call(n, g);
26887
26890
  }
26888
- }, F(n, Mt).onerror = function(p) {
26891
+ }, F(n, Ot).onerror = function(p) {
26889
26892
  ze(n, $u, xc).call(n, p);
26890
- }, F(n, Mt).onmessage = function(p) {
26893
+ }, F(n, Ot).onmessage = function(p) {
26891
26894
  return ze(n, jh, vm).call(n, p);
26892
26895
  };
26893
26896
  } catch (p) {
@@ -26912,8 +26915,8 @@ var hm = /* @__PURE__ */ function(s) {
26912
26915
  key: "send",
26913
26916
  value: function(e, t, n, i) {
26914
26917
  var a = { event: e, id: t, payload: n, metadata: i };
26915
- if (F(this, et).queueOnDisconnect && (!F(this, Mt) || F(this, Mt).readyState !== 1))
26916
- return F(this, Rt).debug("Queuing message since socket is not connected!", a), F(this, fa).push(a), !1;
26918
+ if (F(this, et).queueOnDisconnect && (!F(this, Ot) || F(this, Ot).readyState !== 1))
26919
+ return F(this, _t).debug("Queuing message since socket is not connected!", a), F(this, fa).push(a), !1;
26917
26920
  var o = dm.encode(a);
26918
26921
  return ze(this, No, ec).call(this, o);
26919
26922
  }
@@ -26939,7 +26942,7 @@ var hm = /* @__PURE__ */ function(s) {
26939
26942
  }, {
26940
26943
  key: "receive",
26941
26944
  value: function(e, t) {
26942
- return F(this, xt).on(e.toString(), t);
26945
+ return F(this, er).on(e.toString(), t);
26943
26946
  }
26944
26947
  /**
26945
26948
  * Event listener that is fired on receiving socket messages.
@@ -26948,7 +26951,7 @@ var hm = /* @__PURE__ */ function(s) {
26948
26951
  key: "on",
26949
26952
  value: function(e, t) {
26950
26953
  if (typeof e == "string" && (e === "connected" || e === "disconnected" || e === "errored" || e === "reconnected" || e === "reconnecting" || e === "reconnectAttempt" || e === "reconnectFailure" || e === "failed")) {
26951
- F(this, xt).on(e, t);
26954
+ F(this, er).on(e, t);
26952
26955
  return;
26953
26956
  }
26954
26957
  this.receive(e, t);
@@ -26959,7 +26962,7 @@ var hm = /* @__PURE__ */ function(s) {
26959
26962
  }, {
26960
26963
  key: "removeAllListeners",
26961
26964
  value: function() {
26962
- F(this, xt).removeAllListeners();
26965
+ F(this, er).removeAllListeners();
26963
26966
  }
26964
26967
  /**
26965
26968
  * Alias to `removeListener`.
@@ -26975,7 +26978,7 @@ var hm = /* @__PURE__ */ function(s) {
26975
26978
  }, {
26976
26979
  key: "removeListener",
26977
26980
  value: function(e, t) {
26978
- F(this, xt).removeListener(e.toString(), t);
26981
+ F(this, er).removeListener(e.toString(), t);
26979
26982
  }
26980
26983
  /**
26981
26984
  * Alias to `removeListeners`.
@@ -26992,7 +26995,7 @@ var hm = /* @__PURE__ */ function(s) {
26992
26995
  key: "removeListeners",
26993
26996
  value: function(e) {
26994
26997
  var t = this;
26995
- F(this, xt).listeners(e.toString()).map(function(n) {
26998
+ F(this, er).listeners(e.toString()).map(function(n) {
26996
26999
  return t.removeListener(e, n);
26997
27000
  });
26998
27001
  }
@@ -27000,10 +27003,10 @@ var hm = /* @__PURE__ */ function(s) {
27000
27003
  * Disconnect the socket.
27001
27004
  */
27002
27005
  }, { key: "disconnect", value: function() {
27003
- We(this, Hi, !1), ze(this, Vo, tc).call(this), ze(this, rc, rl).call(this), this.removeAllListeners(), We(this, Ea, { code: 1e3, reason: "Sockrates disconnect method called" }), F(this, Mt).close(1e3, "Sockrates disconnect method called.");
27006
+ We(this, Hi, !1), ze(this, Vo, tc).call(this), ze(this, rc, rl).call(this), this.removeAllListeners(), We(this, Ea, { code: 1e3, reason: "Sockrates disconnect method called" }), F(this, Ot).close(1e3, "Sockrates disconnect method called.");
27004
27007
  } }]);
27005
27008
  }();
27006
- Mt = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), Rt = /* @__PURE__ */ new WeakMap(), fa = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), Hi = /* @__PURE__ */ new WeakMap(), Ea = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), So = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), $h = /* @__PURE__ */ new WeakSet(), pm = function(r) {
27009
+ Ot = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), fa = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), Hi = /* @__PURE__ */ new WeakMap(), Ea = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), So = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), $h = /* @__PURE__ */ new WeakSet(), pm = function(r) {
27007
27010
  if (r.startsWith("ws://") || r.startsWith("wss://"))
27008
27011
  return r;
27009
27012
  if (r.startsWith("https://"))
@@ -27012,25 +27015,25 @@ Mt = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), et = /*
27012
27015
  return "ws://".concat(r.substring(7));
27013
27016
  throw new Error("Invalid URL. URL must start with http(s):// or ws(s)://.");
27014
27017
  }, $u = /* @__PURE__ */ new WeakSet(), xc = function(r, e) {
27015
- F(this, Rt).error("Error:", { error: r }), F(this, xt).emit("errored", { error: r }), e == null || e(r);
27018
+ F(this, _t).error("Error:", { error: r }), F(this, er).emit("errored", { error: r }), e == null || e(r);
27016
27019
  }, jh = /* @__PURE__ */ new WeakSet(), vm = function(r) {
27017
27020
  if (ze(this, Sl, Hh).call(this), r.data === Zv) {
27018
- F(this, Rt).debug("Received ping from server"), ze(this, No, ec).call(this, xv);
27021
+ F(this, _t).debug("Received ping from server"), ze(this, No, ec).call(this, xv);
27019
27022
  return;
27020
27023
  }
27021
27024
  if (r.data === xv) {
27022
- F(this, Rt).debug("Received pong from server");
27025
+ F(this, _t).debug("Received pong from server");
27023
27026
  return;
27024
27027
  }
27025
27028
  var e = dm.decode(r.data), t = e.id, n = e.payload;
27026
- F(this, Rt).debug("Received message", { event: e.event, messageID: t }), F(this, xt).emit(e.event.toString(), { id: t, payload: n });
27029
+ F(this, _t).debug("Received message", { event: e.event, messageID: t }), F(this, er).emit(e.event.toString(), { id: t, payload: n });
27027
27030
  }, el = /* @__PURE__ */ new WeakSet(), Ld = function() {
27028
- return F(this, Mt).readyState === 1;
27031
+ return F(this, Ot).readyState === 1;
27029
27032
  }, Pl = /* @__PURE__ */ new WeakSet(), Uh = function(r, e) {
27030
- We(this, Ea, { reason: e, code: r }), F(this, xt).emit("disconnected", { code: r, reason: e });
27033
+ We(this, Ea, { reason: e, code: r }), F(this, er).emit("disconnected", { code: r, reason: e });
27031
27034
  }, Fh = /* @__PURE__ */ new WeakSet(), fm = function() {
27032
27035
  var r = F(this, Ea), e = r.reason, t = r.code;
27033
- t && t !== 1e3 && F(this, Hi) && F(this, et).autoReconnect && !F(this, Dn) && (F(this, Rt).debug("Triggering reconnection due to ".concat(e, ".")), F(this, xt).emit(
27036
+ t && t !== 1e3 && F(this, Hi) && F(this, et).autoReconnect && !F(this, Dn) && (F(this, _t).debug("Triggering reconnection due to ".concat(e, ".")), F(this, er).emit(
27034
27037
  "reconnecting"
27035
27038
  /* reconnecting */
27036
27039
  ), ze(this, xu, tl).call(this));
@@ -27045,13 +27048,13 @@ Mt = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), et = /*
27045
27048
  i.n = 1;
27046
27049
  break;
27047
27050
  }
27048
- return F(this, Rt).debug("Reconnect called when already in a reconnect loop. Ignoring."), i.a(2);
27051
+ return F(this, _t).debug("Reconnect called when already in a reconnect loop. Ignoring."), i.a(2);
27049
27052
  case 1:
27050
27053
  if (F(this, Dn) || F(this, Ni).reset(), !(F(this, et).maxReconnectionAttempts !== null && F(this, Ni).getAttempts() >= F(this, et).maxReconnectionAttempts)) {
27051
27054
  i.n = 2;
27052
27055
  break;
27053
27056
  }
27054
- return F(this, xt).emit(
27057
+ return F(this, er).emit(
27055
27058
  "failed"
27056
27059
  /* failed */
27057
27060
  ), We(this, Dn, !1), i.a(2);
@@ -27064,7 +27067,7 @@ Mt = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), et = /*
27064
27067
  }
27065
27068
  return i.a(2);
27066
27069
  case 5:
27067
- return F(this, Rt).debug("Reconnection attempt ".concat(F(this, Ni).getAttempts())), F(this, xt).emit("reconnectAttempt", { attempt: F(this, Ni).getAttempts() }), i.n = 6, this.connect();
27070
+ return F(this, _t).debug("Reconnection attempt ".concat(F(this, Ni).getAttempts())), F(this, er).emit("reconnectAttempt", { attempt: F(this, Ni).getAttempts() }), i.n = 6, this.connect();
27068
27071
  case 6:
27069
27072
  if (ze(this, el, Ld).call(this)) {
27070
27073
  i.n = 7;
@@ -27072,13 +27075,13 @@ Mt = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), et = /*
27072
27075
  }
27073
27076
  throw Error("Reconnect Failed");
27074
27077
  case 7:
27075
- We(this, Dn, !1), We(this, Ea, { code: void 0, reason: void 0 }), F(this, xt).emit(
27078
+ We(this, Dn, !1), We(this, Ea, { code: void 0, reason: void 0 }), F(this, er).emit(
27076
27079
  "reconnected"
27077
27080
  /* reconnected */
27078
27081
  ), i.n = 9;
27079
27082
  break;
27080
27083
  case 8:
27081
- i.p = 8, n = i.v, F(this, Rt).debug("Failed to reconnect."), F(this, xt).emit("reconnectFailure", { attempt: F(this, Ni).getAttempts() }), ze(this, xu, tl).call(this, !1);
27084
+ i.p = 8, n = i.v, F(this, _t).debug("Failed to reconnect."), F(this, er).emit("reconnectFailure", { attempt: F(this, Ni).getAttempts() }), ze(this, xu, tl).call(this, !1);
27082
27085
  case 9:
27083
27086
  return i.a(2);
27084
27087
  }
@@ -27089,29 +27092,29 @@ Mt = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), et = /*
27089
27092
  };
27090
27093
  }(), No = /* @__PURE__ */ new WeakSet(), ec = function(r) {
27091
27094
  try {
27092
- return F(this, Mt).send(r), !0;
27095
+ return F(this, Ot).send(r), !0;
27093
27096
  } catch (e) {
27094
- return F(this, Rt).error(e.message), !1;
27097
+ return F(this, _t).error(e.message), !1;
27095
27098
  }
27096
27099
  }, Sl = /* @__PURE__ */ new WeakSet(), Hh = function() {
27097
27100
  var r = this;
27098
- this.config.disconnectOnPingTimeout && (F(this, Rt).debug("Resetting ping timeout"), ze(this, Vo, tc).call(this), We(this, So, setTimeout(function() {
27101
+ this.config.disconnectOnPingTimeout && (F(this, _t).debug("Resetting ping timeout"), ze(this, Vo, tc).call(this), We(this, So, setTimeout(function() {
27099
27102
  var e;
27100
- F(r, Rt).debug("Disconnecting the socket due to ping timeout"), We(r, Hi, !0);
27103
+ F(r, _t).debug("Disconnecting the socket due to ping timeout"), We(r, Hi, !0);
27101
27104
  var t = 3002, n = "Ping timeout";
27102
- (e = F(r, Mt)) == null || e.close(t, n), ze(r, Pl, Uh).call(r, t, n);
27105
+ (e = F(r, Ot)) == null || e.close(t, n), ze(r, Pl, Uh).call(r, t, n);
27103
27106
  }, F(this, et).pingTimeout)));
27104
27107
  }, Vo = /* @__PURE__ */ new WeakSet(), tc = function() {
27105
27108
  F(this, So) && (clearTimeout(F(this, So)), We(this, So, void 0));
27106
27109
  }, Bh = /* @__PURE__ */ new WeakSet(), gm = function() {
27107
27110
  var r = this;
27108
27111
  ze(this, rc, rl).call(this), F(this, et).clientInitiatedPings && We(this, Eo, setInterval(function() {
27109
- ze(r, el, Ld).call(r) && (F(r, Rt).debug("Sending client-initiated ping"), ze(r, No, ec).call(r, Zv));
27112
+ ze(r, el, Ld).call(r) && (F(r, _t).debug("Sending client-initiated ping"), ze(r, No, ec).call(r, Zv));
27110
27113
  }, F(this, et).clientInitiatedPingInterval));
27111
27114
  }, rc = /* @__PURE__ */ new WeakSet(), rl = function() {
27112
27115
  F(this, Eo) && (clearInterval(F(this, Eo)), We(this, Eo, void 0));
27113
27116
  }, nc = /* @__PURE__ */ new WeakSet(), El = function() {
27114
- ze(this, rc, rl).call(this), F(this, Mt) && (F(this, Mt).onopen = void 0, F(this, Mt).onerror = void 0, F(this, Mt).onmessage = void 0, F(this, Mt).onclose = void 0);
27117
+ ze(this, rc, rl).call(this), F(this, Ot) && (F(this, Ot).onopen = void 0, F(this, Ot).onerror = void 0, F(this, Ot).onmessage = void 0, F(this, Ot).onclose = void 0);
27115
27118
  };
27116
27119
  function mm(s) {
27117
27120
  return "".concat(s.slice(0, 10), "...").concat(s.slice(-10));
@@ -27134,10 +27137,10 @@ var VD = Object.defineProperty, $D = Object.getOwnPropertyDescriptor, Kl = funct
27134
27137
  for (var i = n > 1 ? void 0 : n ? $D(e, t) : e, a = r.length - 1, o; a >= 0; a--)
27135
27138
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
27136
27139
  return n && i && VD(e, t, i), i;
27137
- }, ef = 65535, jD = 3, UD = 15e3, FD = 8e3, HD = 50, BD = 1e3, qD = 1e4, ym = (cr = /* @__PURE__ */ w("url"), wa = /* @__PURE__ */ w("urlPeerId"), me = /* @__PURE__ */ w("sockrates"), je = /* @__PURE__ */ w("connectionHandler"), fn = /* @__PURE__ */ w("oldPeerIds"), dn = /* @__PURE__ */ w("apiPingTimer"), ii = /* @__PURE__ */ w("apiPingInFlight"), ai = /* @__PURE__ */ w("apiPingAbortController"), cn = /* @__PURE__ */ w("apiPingRequest"), Zt = /* @__PURE__ */ w("lastConnectedPeerId"), lr = /* @__PURE__ */ w("timer"), hn = /* @__PURE__ */ w("reconnectTimer"), si = /* @__PURE__ */ w("resolveReconnectWait"), ct = /* @__PURE__ */ w("connectionRunNumber"), gn = /* @__PURE__ */ w("reconnectLoopRunNumber"), lt = /* @__PURE__ */ w("shouldReconnect"), Ae = /* @__PURE__ */ w("context"), vo = /* @__PURE__ */ w("getSocketURL"), al = /* @__PURE__ */ w("getPingURL"), sl = /* @__PURE__ */ w("sendAPIPing"), $c = /* @__PURE__ */ w("startAPIPing"), Io = /* @__PURE__ */ w("stopAPIPing"), Mo = /* @__PURE__ */ w("recordConnectedPeerId"), ti = /* @__PURE__ */ w("redactedURL"), ol = /* @__PURE__ */ w("getReconnectDelay"), ul = /* @__PURE__ */ w("waitForReconnect"), fo = /* @__PURE__ */ w("cancelReconnectWait"), $o = /* @__PURE__ */ w("handleReconnectExhausted"), go = /* @__PURE__ */ w("startReconnectLoop"), cl = /* @__PURE__ */ w("runReconnectLoop"), mo = /* @__PURE__ */ w("canSendMessage"), yo = /* @__PURE__ */ w("generateId"), Zl = /* @__PURE__ */ function() {
27140
+ }, ef = 65535, jD = 3, UD = 15e3, FD = 8e3, HD = 50, BD = 1e3, qD = 1e4, ym = (cr = /* @__PURE__ */ w("url"), wa = /* @__PURE__ */ w("urlPeerId"), me = /* @__PURE__ */ w("sockrates"), je = /* @__PURE__ */ w("connectionHandler"), fn = /* @__PURE__ */ w("oldPeerIds"), dn = /* @__PURE__ */ w("apiPingTimer"), ii = /* @__PURE__ */ w("apiPingInFlight"), ai = /* @__PURE__ */ w("apiPingAbortController"), cn = /* @__PURE__ */ w("apiPingRequest"), xt = /* @__PURE__ */ w("lastConnectedPeerId"), lr = /* @__PURE__ */ w("timer"), hn = /* @__PURE__ */ w("reconnectTimer"), si = /* @__PURE__ */ w("resolveReconnectWait"), ct = /* @__PURE__ */ w("connectionRunNumber"), gn = /* @__PURE__ */ w("reconnectLoopRunNumber"), lt = /* @__PURE__ */ w("shouldReconnect"), Ae = /* @__PURE__ */ w("context"), vo = /* @__PURE__ */ w("getSocketURL"), al = /* @__PURE__ */ w("getPingURL"), sl = /* @__PURE__ */ w("sendAPIPing"), $c = /* @__PURE__ */ w("startAPIPing"), Io = /* @__PURE__ */ w("stopAPIPing"), Mo = /* @__PURE__ */ w("recordConnectedPeerId"), ti = /* @__PURE__ */ w("redactedURL"), ol = /* @__PURE__ */ w("getReconnectDelay"), ul = /* @__PURE__ */ w("waitForReconnect"), fo = /* @__PURE__ */ w("cancelReconnectWait"), $o = /* @__PURE__ */ w("handleReconnectExhausted"), go = /* @__PURE__ */ w("startReconnectLoop"), cl = /* @__PURE__ */ w("runReconnectLoop"), mo = /* @__PURE__ */ w("canSendMessage"), yo = /* @__PURE__ */ w("generateId"), Zl = /* @__PURE__ */ function() {
27138
27141
  function s(r, e) {
27139
27142
  var t = e.peerId, n = e.meetingId, i = e.authToken, a = e.capabilities;
27140
- if (P(this, s), Object.defineProperty(this, yo, { value: a2 }), Object.defineProperty(this, mo, { get: i2, set: void 0 }), Object.defineProperty(this, cl, { value: n2 }), Object.defineProperty(this, go, { value: r2 }), Object.defineProperty(this, $o, { value: t2 }), Object.defineProperty(this, fo, { value: e2 }), Object.defineProperty(this, ul, { value: xD }), Object.defineProperty(this, ti, { get: XD, set: void 0 }), Object.defineProperty(this, Mo, { value: YD }), Object.defineProperty(this, Io, { value: QD }), Object.defineProperty(this, $c, { value: zD }), Object.defineProperty(this, sl, { value: KD }), Object.defineProperty(this, al, { value: JD }), Object.defineProperty(this, vo, { value: GD }), Object.defineProperty(this, je, { get: WD, set: void 0 }), Object.defineProperty(this, cr, { writable: !0, value: void 0 }), Object.defineProperty(this, wa, { writable: !0, value: void 0 }), Object.defineProperty(this, me, { writable: !0, value: void 0 }), this.roomName = void 0, this.authToken = void 0, this.capabilities = void 0, Object.defineProperty(this, fn, { writable: !0, value: [] }), Object.defineProperty(this, dn, { writable: !0, value: void 0 }), Object.defineProperty(this, ii, { writable: !0, value: !1 }), Object.defineProperty(this, ai, { writable: !0, value: void 0 }), Object.defineProperty(this, cn, { writable: !0, value: void 0 }), Object.defineProperty(this, Zt, { writable: !0, value: void 0 }), Object.defineProperty(this, lr, { writable: !0, value: void 0 }), Object.defineProperty(this, hn, { writable: !0, value: void 0 }), Object.defineProperty(this, si, { writable: !0, value: void 0 }), Object.defineProperty(this, ct, { writable: !0, value: 0 }), Object.defineProperty(this, gn, { writable: !0, value: void 0 }), Object.defineProperty(this, lt, { writable: !0, value: !0 }), Object.defineProperty(this, Ae, { writable: !0, value: void 0 }), !t || !n || !i)
27143
+ if (P(this, s), Object.defineProperty(this, yo, { value: a2 }), Object.defineProperty(this, mo, { get: i2, set: void 0 }), Object.defineProperty(this, cl, { value: n2 }), Object.defineProperty(this, go, { value: r2 }), Object.defineProperty(this, $o, { value: t2 }), Object.defineProperty(this, fo, { value: e2 }), Object.defineProperty(this, ul, { value: xD }), Object.defineProperty(this, ti, { get: XD, set: void 0 }), Object.defineProperty(this, Mo, { value: YD }), Object.defineProperty(this, Io, { value: QD }), Object.defineProperty(this, $c, { value: zD }), Object.defineProperty(this, sl, { value: KD }), Object.defineProperty(this, al, { value: JD }), Object.defineProperty(this, vo, { value: GD }), Object.defineProperty(this, je, { get: WD, set: void 0 }), Object.defineProperty(this, cr, { writable: !0, value: void 0 }), Object.defineProperty(this, wa, { writable: !0, value: void 0 }), Object.defineProperty(this, me, { writable: !0, value: void 0 }), this.roomName = void 0, this.authToken = void 0, this.capabilities = void 0, Object.defineProperty(this, fn, { writable: !0, value: [] }), Object.defineProperty(this, dn, { writable: !0, value: void 0 }), Object.defineProperty(this, ii, { writable: !0, value: !1 }), Object.defineProperty(this, ai, { writable: !0, value: void 0 }), Object.defineProperty(this, cn, { writable: !0, value: void 0 }), Object.defineProperty(this, xt, { writable: !0, value: void 0 }), Object.defineProperty(this, lr, { writable: !0, value: void 0 }), Object.defineProperty(this, hn, { writable: !0, value: void 0 }), Object.defineProperty(this, si, { writable: !0, value: void 0 }), Object.defineProperty(this, ct, { writable: !0, value: 0 }), Object.defineProperty(this, gn, { writable: !0, value: void 0 }), Object.defineProperty(this, lt, { writable: !0, value: !0 }), Object.defineProperty(this, Ae, { writable: !0, value: void 0 }), !t || !n || !i)
27141
27144
  throw new j("peerId, meetingId, or authToken can not be empty", "0404");
27142
27145
  u(this, Ae)[Ae] = r, u(this, lr)[lr] = navigator.isReactNative ? xg : Uu, this.capabilities = a, this.roomName = n, this.authToken = i, u(this, cr)[cr] = u(this, vo)[vo](t), u(this, wa)[wa] = t;
27143
27146
  var o = a.includes("PING");
@@ -27207,7 +27210,7 @@ var VD = Object.defineProperty, $D = Object.getOwnPropertyDescriptor, Kl = funct
27207
27210
  }
27208
27211
  throw new Error("Socket connection was canceled");
27209
27212
  case 3:
27210
- u(this, Mo)[Mo](this.peerId), (a = (i = u(this, Zt))[Zt]) !== null && a !== void 0 || (i[Zt] = this.peerId), u(this, je)[je].socketState = { state: "connected", reconnected: !1, reconnectionAttempt: void 0 }, c.n = 5;
27213
+ u(this, Mo)[Mo](this.peerId), (a = (i = u(this, xt))[xt]) !== null && a !== void 0 || (i[xt] = this.peerId), u(this, je)[je].socketState = { state: "connected", reconnected: !1, reconnectionAttempt: void 0 }, c.n = 5;
27211
27214
  break;
27212
27215
  case 4:
27213
27216
  throw c.p = 4, o = c.v, this.logger.error("Websocket connection failed with URL: ".concat(u(this, ti)[ti]), { error: o }), u(this, lt)[lt] && n === u(this, ct)[ct] && u(this, go)[go](n), o;
@@ -27221,7 +27224,7 @@ var VD = Object.defineProperty, $D = Object.getOwnPropertyDescriptor, Kl = funct
27221
27224
  }
27222
27225
  return e;
27223
27226
  }() }, { key: "disconnect", value: function() {
27224
- u(this, je)[je].socketJoinAttempted = !1, u(this, ct)[ct] += 1, u(this, lt)[lt] = !1, u(this, fo)[fo](), u(this, Io)[Io](), u(this, Zt)[Zt] = void 0, u(this, me)[me].disconnect(), u(this, je)[je].socketState = { state: "disconnected", reconnected: !1, reconnectionAttempt: void 0 };
27227
+ u(this, je)[je].socketJoinAttempted = !1, u(this, ct)[ct] += 1, u(this, lt)[lt] = !1, u(this, fo)[fo](), u(this, Io)[Io](), u(this, xt)[xt] = void 0, u(this, me)[me].disconnect(), u(this, je)[je].socketState = { state: "disconnected", reconnected: !1, reconnectionAttempt: void 0 };
27225
27228
  } }, { key: "isConnected", get: function() {
27226
27229
  try {
27227
27230
  return u(this, me)[me].readyState === 1;
@@ -27292,7 +27295,7 @@ var VD = Object.defineProperty, $D = Object.getOwnPropertyDescriptor, Kl = funct
27292
27295
  for (; ; )
27293
27296
  switch (a.n) {
27294
27297
  case 0:
27295
- e.logger.info("Websocket connected with URL: ".concat(u(e, ti)[ti])), (i = (n = u(e, Zt))[Zt]) !== null && i !== void 0 || (n[Zt] = e.peerId), u(e, je)[je].updateSocketConnectionState("connected");
27298
+ e.logger.info("Websocket connected with URL: ".concat(u(e, ti)[ti])), (i = (n = u(e, xt))[xt]) !== null && i !== void 0 || (n[xt] = e.peerId), u(e, je)[je].updateSocketConnectionState("connected");
27296
27299
  case 1:
27297
27300
  return a.a(2);
27298
27301
  }
@@ -27321,9 +27324,9 @@ function GD(s) {
27321
27324
  }), i.href;
27322
27325
  }
27323
27326
  function JD() {
27324
- if (u(this, Zt)[Zt]) {
27327
+ if (u(this, xt)[xt]) {
27325
27328
  var s = new URL(u(this, cr)[cr]);
27326
- return s.protocol = s.protocol === "ws:" ? "http:" : "https:", s.pathname = "".concat(s.pathname.replace(/\/+$/, ""), "/ping"), s.search = "", s.searchParams.set("peerId", u(this, Zt)[Zt]), s.href;
27329
+ return s.protocol = s.protocol === "ws:" ? "http:" : "https:", s.pathname = "".concat(s.pathname.replace(/\/+$/, ""), "/ping"), s.search = "", s.searchParams.set("peerId", u(this, xt)[xt]), s.href;
27327
27330
  }
27328
27331
  }
27329
27332
  function KD() {
@@ -27394,7 +27397,7 @@ function e2() {
27394
27397
  u(this, hn)[hn] !== void 0 && (u(this, lr)[lr].clearTimeout(u(this, hn)[hn]), u(this, hn)[hn] = void 0), (s = (r = u(this, si))[si]) === null || s === void 0 || s.call(r), u(this, si)[si] = void 0;
27395
27398
  }
27396
27399
  function t2(s, r) {
27397
- !u(this, lt)[lt] || s !== u(this, ct)[ct] || (r && this.logger.error("SocketService::Reconnect loop failed", { error: r }), u(this, lt)[lt] = !1, u(this, Io)[Io](), u(this, Zt)[Zt] = void 0, u(this, je)[je].updateSocketConnectionState("failed"), u(this, Ae)[Ae].getValue("peerSessionStore").emit($.SOCKET_SERVICE_FAILED));
27400
+ !u(this, lt)[lt] || s !== u(this, ct)[ct] || (r && this.logger.error("SocketService::Reconnect loop failed", { error: r }), u(this, lt)[lt] = !1, u(this, Io)[Io](), u(this, xt)[xt] = void 0, u(this, je)[je].updateSocketConnectionState("failed"), u(this, Ae)[Ae].getValue("peerSessionStore").emit($.SOCKET_SERVICE_FAILED));
27398
27401
  }
27399
27402
  function r2(s) {
27400
27403
  var r = this;
@@ -27446,7 +27449,7 @@ function Wh() {
27446
27449
  }
27447
27450
  throw new Error("Reconnect failed");
27448
27451
  case 8:
27449
- return u(this, Mo)[Mo](this.peerId), u(this, Zt)[Zt] = this.peerId, u(this, je)[je].updateSocketConnectionState("reconnected"), u(this, Ae)[Ae].getValue("peerSessionStore").emit($.SOCKET_SERVICE_RECONNECTED, { wasJoinAttempted: u(this, je)[je].mediaJoinAttempted }), n.a(2);
27452
+ return u(this, Mo)[Mo](this.peerId), u(this, xt)[xt] = this.peerId, u(this, je)[je].updateSocketConnectionState("reconnected"), u(this, Ae)[Ae].getValue("peerSessionStore").emit($.SOCKET_SERVICE_RECONNECTED, { wasJoinAttempted: u(this, je)[je].mediaJoinAttempted }), n.a(2);
27450
27453
  case 9:
27451
27454
  if (n.p = 9, t = n.v, !(!u(this, lt)[lt] || r !== u(this, ct)[ct])) {
27452
27455
  n.n = 10;
@@ -27622,12 +27625,12 @@ var s2 = /* @__PURE__ */ function() {
27622
27625
  for (var i = n > 1 ? void 0 : n ? u2(e, t) : e, a = r.length - 1, o; a >= 0; a--)
27623
27626
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
27624
27627
  return n && i && o2(e, t, i), i;
27625
- }, Ft = /* @__PURE__ */ w("context"), km = /* @__PURE__ */ function(s) {
27628
+ }, Ht = /* @__PURE__ */ w("context"), km = /* @__PURE__ */ function(s) {
27626
27629
  function r(e) {
27627
27630
  var t;
27628
27631
  P(this, r);
27629
27632
  var n = e.getValue("logger");
27630
- return t = C(this, r, [n]), t.meetings = [], t.parentMeeting = null, Object.defineProperty(t, Ft, { writable: !0, value: void 0 }), u(t, Ft)[Ft] = e, t;
27633
+ return t = C(this, r, [n]), t.meetings = [], t.parentMeeting = null, Object.defineProperty(t, Ht, { writable: !0, value: void 0 }), u(t, Ht)[Ht] = e, t;
27631
27634
  }
27632
27635
  return R(r, s), S(r, [{
27633
27636
  key: "isActive",
@@ -27638,7 +27641,7 @@ var s2 = /* @__PURE__ */ function() {
27638
27641
  }, {
27639
27642
  key: "validateAlterAction",
27640
27643
  value: function() {
27641
- var t = u(this, Ft)[Ft].getValue("self").permissions.connectedMeetings;
27644
+ var t = u(this, Ht)[Ht].getValue("self").permissions.connectedMeetings;
27642
27645
  if (!(t != null && t.canAlterConnectedMeetings))
27643
27646
  throw new Error("You are not allowed to perform this action. Please enable canAlterConnectedMeetings permission in your preset.");
27644
27647
  }
@@ -27647,11 +27650,11 @@ var s2 = /* @__PURE__ */ function() {
27647
27650
  var i;
27648
27651
  if (!(n != null && n.length))
27649
27652
  throw new Error("You're trying to move participants with an empty list.");
27650
- var a = u(this, Ft)[Ft].getValue("self").permissions.connectedMeetings;
27653
+ var a = u(this, Ht)[Ht].getValue("self").permissions.connectedMeetings;
27651
27654
  if (!a)
27652
27655
  throw new Error("You are not allowed to perform this action. Please enable connected meetings permissions in your preset.");
27653
27656
  if (!a.canAlterConnectedMeetings) {
27654
- var o = u(this, Ft)[Ft].getValue("userId"), c = n.length === 1 && n[0] === o;
27657
+ var o = u(this, Ht)[Ht].getValue("userId"), c = n.length === 1 && n[0] === o;
27655
27658
  if (!c)
27656
27659
  throw new Error("You are not allowed to move other participants. Please enable canAlterConnectedMeetings permission in your preset.");
27657
27660
  var l = t === ((i = this.parentMeeting) === null || i === void 0 ? void 0 : i.id);
@@ -27672,7 +27675,7 @@ var s2 = /* @__PURE__ */ function() {
27672
27675
  for (; ; )
27673
27676
  switch (a.n) {
27674
27677
  case 0:
27675
- return this.logger.info("Getting connected meetings dump"), a.n = 1, u(this, Ft)[Ft].getValue("connectedMeetingsSocketHandler").getConnectedRoomsDump();
27678
+ return this.logger.info("Getting connected meetings dump"), a.n = 1, u(this, Ht)[Ht].getValue("connectedMeetingsSocketHandler").getConnectedRoomsDump();
27676
27679
  case 1:
27677
27680
  return i = a.v, this.logger.info("Got connected meetings dump"), a.a(2, i);
27678
27681
  }
@@ -27694,7 +27697,7 @@ var s2 = /* @__PURE__ */ function() {
27694
27697
  for (; ; )
27695
27698
  switch (o.n) {
27696
27699
  case 0:
27697
- return this.validateAlterAction(), this.logger.info("Creating connected meetings ".concat(JSON.stringify(i))), o.n = 1, u(this, Ft)[Ft].getValue("connectedMeetingsSocketHandler").createConnectedRooms(i);
27700
+ return this.validateAlterAction(), this.logger.info("Creating connected meetings ".concat(JSON.stringify(i))), o.n = 1, u(this, Ht)[Ht].getValue("connectedMeetingsSocketHandler").createConnectedRooms(i);
27698
27701
  case 1:
27699
27702
  return a = o.v, this.logger.info("Created connected meetings ".concat(JSON.stringify(a))), o.a(2, a.map(function(c) {
27700
27703
  return { id: c.id, title: c.title };
@@ -27712,7 +27715,7 @@ var s2 = /* @__PURE__ */ function() {
27712
27715
  for (; ; )
27713
27716
  switch (a.n) {
27714
27717
  case 0:
27715
- return this.validateAlterAction(), this.logger.info("Updating connected meetings ".concat(JSON.stringify(i))), a.n = 1, u(this, Ft)[Ft].getValue("connectedMeetingsSocketHandler").updateConnectedRooms(i.map(function(o) {
27718
+ return this.validateAlterAction(), this.logger.info("Updating connected meetings ".concat(JSON.stringify(i))), a.n = 1, u(this, Ht)[Ht].getValue("connectedMeetingsSocketHandler").updateConnectedRooms(i.map(function(o) {
27716
27719
  return { meetingId: o.id, title: o.title };
27717
27720
  }));
27718
27721
  case 1:
@@ -27739,7 +27742,7 @@ var s2 = /* @__PURE__ */ function() {
27739
27742
  })) : Promise.resolve();
27740
27743
  }), this.logger.info("Moved participants before deleting connected meetings ".concat(JSON.stringify(i), ". Deleting now.")), l.n = 1, Promise.all(o);
27741
27744
  case 1:
27742
- return l.n = 2, u(this, Ft)[Ft].getValue("connectedMeetingsSocketHandler").disableConnectedRooms(i);
27745
+ return l.n = 2, u(this, Ht)[Ht].getValue("connectedMeetingsSocketHandler").disableConnectedRooms(i);
27743
27746
  case 2:
27744
27747
  return c = l.v, this.logger.info("Deleted connected meetings ".concat(JSON.stringify(i))), l.a(2, c);
27745
27748
  }
@@ -27756,7 +27759,7 @@ var s2 = /* @__PURE__ */ function() {
27756
27759
  for (; ; )
27757
27760
  switch (l.n) {
27758
27761
  case 0:
27759
- return this.validateMoveAction(a, o), this.logger.info("Moving connected meetings participants ".concat(JSON.stringify(o), " from ").concat(i, " to ").concat(a)), l.n = 1, u(this, Ft)[Ft].getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms({ sourceMeetingId: i, destinationMeetingId: a, participants: o.map(function(d) {
27762
+ return this.validateMoveAction(a, o), this.logger.info("Moving connected meetings participants ".concat(JSON.stringify(o), " from ").concat(i, " to ").concat(a)), l.n = 1, u(this, Ht)[Ht].getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms({ sourceMeetingId: i, destinationMeetingId: a, participants: o.map(function(d) {
27760
27763
  return { id: d };
27761
27764
  }) });
27762
27765
  case 1:
@@ -27777,7 +27780,7 @@ var s2 = /* @__PURE__ */ function() {
27777
27780
  case 0:
27778
27781
  return this.validateMoveAction(a, o.map(function(d) {
27779
27782
  return d.id;
27780
- })), this.logger.info("Moving connected meetings participants (custom preset) ".concat(JSON.stringify(o), " from ").concat(i, " to ").concat(a)), l.n = 1, u(this, Ft)[Ft].getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms({ sourceMeetingId: i, destinationMeetingId: a, participants: o });
27783
+ })), this.logger.info("Moving connected meetings participants (custom preset) ".concat(JSON.stringify(o), " from ").concat(i, " to ").concat(a)), l.n = 1, u(this, Ht)[Ht].getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms({ sourceMeetingId: i, destinationMeetingId: a, participants: o });
27781
27784
  case 1:
27782
27785
  return c = l.v, c.success ? (this.logger.info("Moved connected meetings participants (custom preset) ".concat(JSON.stringify(o), " from ").concat(i, " to ").concat(a)), this.moveSuccessHandler(i, a, o.map(function(d) {
27783
27786
  return d.id;
@@ -28027,7 +28030,7 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
28027
28030
  return e;
28028
28031
  }() }, { key: "setupControllers", value: function() {
28029
28032
  var r = m(/* @__PURE__ */ h().m(function t(n, i, a, o, c, l) {
28030
- var d, p, v, f, g, y, k, b, T, E, I, M, _, O, L, q, X, Y, H, J, N, U, Z, le, Re, pe, Le, Q, Dt, Pt, dt, re;
28033
+ var d, p, v, f, g, y, k, b, T, E, I, M, _, O, L, q, X, Y, H, J, N, U, Z, le, Re, pe, Le, Q, Lt, Pt, dt, re;
28031
28034
  return h().w(function(K) {
28032
28035
  for (; ; )
28033
28036
  switch (K.n) {
@@ -28060,7 +28063,7 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
28060
28063
  case 7:
28061
28064
  E = K.v;
28062
28065
  case 8:
28063
- if (f.recording && (L = new Gg(i, Le.self, le)), f.stage && (M = new Hg(i, Z, le, Le.self, X.participants)), Dt = new nM(i, Re), !f.plugin) {
28066
+ if (f.recording && (L = new Gg(i, Le.self, le)), f.stage && (M = new Hg(i, Z, le, Le.self, X.participants)), Lt = new nM(i, Re), !f.plugin) {
28064
28067
  K.n = 11;
28065
28068
  break;
28066
28069
  }
@@ -28070,7 +28073,7 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
28070
28073
  }
28071
28074
  throw new j("The plugin module cannot be initialized without the `participant` module", "0102");
28072
28075
  case 9:
28073
- return Pt = y.plugins || [], K.n = 10, Wg.init(i, Pt, Le.self, Dt);
28076
+ return Pt = y.plugins || [], K.n = 10, Wg.init(i, Pt, Le.self, Lt);
28074
28077
  case 10:
28075
28078
  _ = K.v;
28076
28079
  case 11:
@@ -28090,7 +28093,7 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
28090
28093
  case 14:
28091
28094
  dt = K.v, i.setValue("pip", dt);
28092
28095
  case 15:
28093
- return re = { storesManager: Dt, pollController: E, selfController: Le, metaController: Q, chatController: I, stageController: M, pluginController: _, recordingController: L, internalsController: O, livestreamController: q, participantController: X, connectedMeetingsController: Y }, K.a(2, { theme: c, permissions: l, controllers: re });
28096
+ return re = { storesManager: Lt, pollController: E, selfController: Le, metaController: Q, chatController: I, stageController: M, pluginController: _, recordingController: L, internalsController: O, livestreamController: q, participantController: X, connectedMeetingsController: Y }, K.a(2, { theme: c, permissions: l, controllers: re });
28094
28097
  }
28095
28098
  }, t);
28096
28099
  }));
@@ -28441,7 +28444,7 @@ var gr = /* @__PURE__ */ w("trackMap"), m2 = /* @__PURE__ */ function(s) {
28441
28444
  }, { key: "setupContext", value: function(e, t, n, i) {
28442
28445
  var a, o, c = Ra.createContext(e, t), l = V(V({}, RP), t == null ? void 0 : t.modules), d = t.defaults || { audio: !0, video: !0 };
28443
28446
  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() {
28444
- }), c.setValue("cachedUserDetails", ci(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.3-staging.15"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new m2()), c;
28447
+ }), c.setValue("cachedUserDetails", ci(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.3-staging.16"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new m2()), c;
28445
28448
  } }]);
28446
28449
  }());
28447
28450
  Yl([dr("0002"), Qi.executeWithLock({ methodName: "meeting.join", lockName: "Client.join", timeout: 3e3 })], Ia.prototype, "join", 1);