@cloudflare/realtimekit 1.2.3-staging.3 → 1.2.4-staging.1

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.es.js CHANGED
@@ -926,7 +926,7 @@ var np;
926
926
  (function(s) {
927
927
  s[s.INIT = 0] = "INIT", s[s.ACCEPTED = 1] = "ACCEPTED", s[s.DENIED = 2] = "DENIED", s[s.SYS_DENIED = 3] = "SYS_DENIED", s[s.FAILED = 4] = "FAILED", s[s.NOTFOUND = 5] = "NOTFOUND", s[s.NOT_APPLICABLE = 6] = "NOT_APPLICABLE";
928
928
  })(np || (np = {}));
929
- function Zr(s) {
929
+ function Xr(s) {
930
930
  return s ? s.split(".").slice(0, 2).concat(["0", "0"]).join(".") : "";
931
931
  }
932
932
  function Ed({ packetsLost: s, packetsSent: t }) {
@@ -1312,7 +1312,7 @@ class $S {
1312
1312
  try {
1313
1313
  const d = `https://${e.location}`, p = yield (yield fetch(d)).json();
1314
1314
  if (((a = p.loc) == null ? void 0 : a.length) > 5)
1315
- return this.ipInformation = p, (o = this.ipInformation) != null && o.ip && (this.ipInformation.ip = Zr(this.ipInformation.ip)), p;
1315
+ return this.ipInformation = p, (o = this.ipInformation) != null && o.ip && (this.ipInformation.ip = Xr(this.ipInformation.ip)), p;
1316
1316
  throw Error("Insufficient data");
1317
1317
  } catch (d) {
1318
1318
  r.error("callstats::ipDetails:: failed to fetch ip using location service", { error: d });
@@ -1321,7 +1321,7 @@ class $S {
1321
1321
  const d = yield fetch(`https://${e.locationLegacy}/?token=3c493932b0624c&peerId=${t}`, {
1322
1322
  method: "POST"
1323
1323
  });
1324
- this.ipInformation = yield d.json(), (c = this.ipInformation) != null && c.ip && (this.ipInformation.ip = Zr(this.ipInformation.ip));
1324
+ this.ipInformation = yield d.json(), (c = this.ipInformation) != null && c.ip && (this.ipInformation.ip = Xr(this.ipInformation.ip));
1325
1325
  } catch (d) {
1326
1326
  r.error("callstats::ipDetails:: failed to fetch ip using legacy location service", { error: d });
1327
1327
  }
@@ -1519,7 +1519,7 @@ class wm extends lt {
1519
1519
  }) || e[e.length - 1];
1520
1520
  }
1521
1521
  parseRTCReport(e, r = [], i = !1, a = void 0, o = void 0) {
1522
- var _, C, w, L, F, N, B, G, re, tt, ds, ii, ls;
1522
+ var _, C, w, L, F, N, B, G, re, tt, ds, ri, ls;
1523
1523
  const c = e, d = new Cm(), l = r.length ? new Set(r) : void 0, p = [], g = [], v = [], S = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
1524
1524
  for (const A of c.values()) {
1525
1525
  if (l) {
@@ -1793,7 +1793,7 @@ class wm extends lt {
1793
1793
  score: +(I.score * 10).toFixed(),
1794
1794
  packetsLostPercentage: Pd({
1795
1795
  packetsLost: (I.packetsLost || 0) - (((ds = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ds.packetsLost) || 0),
1796
- packetsReceived: (I.packetsReceived || 0) - (((ii = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ii.packetsReceived) || 0)
1796
+ packetsReceived: (I.packetsReceived || 0) - (((ri = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ri.packetsReceived) || 0)
1797
1797
  }),
1798
1798
  jitter: I.jitter || 0,
1799
1799
  isScreenShare: this.screenShareConsumers.has(R),
@@ -1857,7 +1857,7 @@ class wm extends lt {
1857
1857
  }
1858
1858
  }), v.forEach((A) => {
1859
1859
  const y = p.find((x) => x.id === A.localCandidateId ? (A.localCandidateId = x.id, x) : null), R = g.find((x) => x.id === A.remoteCandidateId ? (A.remoteCandidateId = x.id, x) : null);
1860
- y && (A.localCandidateType = y.type, A.localCandidateAddress = Zr(y.address), A.localCandidatePort = y.port, A.localCandidateProtocol = y.protocol, A.localCandidateUrl = y.url, A.localCandidateNetworkType = y.networkType, A.localCandidateRelatedAddress = Zr(y.relatedAddress), A.localCandidateRelatedPort = y.relatedPort), R && (A.remoteCandidateType = R.type, A.remoteCandidateAddress = Zr(R.address), A.remoteCandidatePort = R.port, A.remoteCandidateProtocol = R.protocol, A.remoteCandidateUrl = R.url);
1860
+ y && (A.localCandidateType = y.type, A.localCandidateAddress = Xr(y.address), A.localCandidatePort = y.port, A.localCandidateProtocol = y.protocol, A.localCandidateUrl = y.url, A.localCandidateNetworkType = y.networkType, A.localCandidateRelatedAddress = Xr(y.relatedAddress), A.localCandidateRelatedPort = y.relatedPort), R && (A.remoteCandidateType = R.type, A.remoteCandidateAddress = Xr(R.address), A.remoteCandidatePort = R.port, A.remoteCandidateProtocol = R.protocol, A.remoteCandidateUrl = R.url);
1861
1861
  }), 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 = {
1862
1862
  // candidateStats: result.candidatePair,
1863
1863
  bytesReceived: d.candidatePair.bytesReceived,
@@ -2170,7 +2170,7 @@ class Rm extends wm {
2170
2170
  };
2171
2171
  }
2172
2172
  parseRTCReport(e, r = [], i = !1, a = void 0, o = void 0) {
2173
- var _, C, w, L, F, N, B, G, re, tt, ds, ii, ls;
2173
+ var _, C, w, L, F, N, B, G, re, tt, ds, ri, ls;
2174
2174
  const c = e, d = new Cm(), l = r.length ? new Set(r) : void 0, p = [], g = [], v = [], S = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
2175
2175
  for (const A of c.values()) {
2176
2176
  if (l) {
@@ -2440,7 +2440,7 @@ class Rm extends wm {
2440
2440
  score: +(I.score * 10).toFixed(),
2441
2441
  packetsLostPercentage: Pd({
2442
2442
  packetsLost: (I.packetsLost || 0) - (((ds = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ds.packetsLost) || 0),
2443
- packetsReceived: (I.packetsReceived || 0) - (((ii = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ii.packetsReceived) || 0)
2443
+ packetsReceived: (I.packetsReceived || 0) - (((ri = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ri.packetsReceived) || 0)
2444
2444
  }),
2445
2445
  jitter: I.jitter || 0,
2446
2446
  isScreenShare: this.screenShareConsumers.has(R),
@@ -2504,7 +2504,7 @@ class Rm extends wm {
2504
2504
  }
2505
2505
  }), v.forEach((A) => {
2506
2506
  const y = p.find((x) => x.id === A.localCandidateId ? (A.localCandidateId = x.id, x) : null), R = g.find((x) => x.id === A.remoteCandidateId ? (A.remoteCandidateId = x.id, x) : null);
2507
- y && (A.localCandidateType = y.type, A.localCandidateAddress = Zr(y.address), A.localCandidatePort = y.port, A.localCandidateProtocol = y.protocol, A.localCandidateUrl = y.url, A.localCandidateNetworkType = y.networkType, A.localCandidateRelatedAddress = Zr(y.relatedAddress), A.localCandidateRelatedPort = y.relatedPort), R && (A.remoteCandidateType = R.type, A.remoteCandidateAddress = Zr(R.address), A.remoteCandidatePort = R.port, A.remoteCandidateProtocol = R.protocol, A.remoteCandidateUrl = R.url);
2507
+ y && (A.localCandidateType = y.type, A.localCandidateAddress = Xr(y.address), A.localCandidatePort = y.port, A.localCandidateProtocol = y.protocol, A.localCandidateUrl = y.url, A.localCandidateNetworkType = y.networkType, A.localCandidateRelatedAddress = Xr(y.relatedAddress), A.localCandidateRelatedPort = y.relatedPort), R && (A.remoteCandidateType = R.type, A.remoteCandidateAddress = Xr(R.address), A.remoteCandidatePort = R.port, A.remoteCandidateProtocol = R.protocol, A.remoteCandidateUrl = R.url);
2508
2508
  }), 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 = {
2509
2509
  // candidateStats: result.candidatePair,
2510
2510
  bytesReceived: d.candidatePair.bytesReceived,
@@ -4016,8 +4016,8 @@ var mE = pn(ks, "Set");
4016
4016
  const Mn = mE;
4017
4017
  var fE = pn(ks, "WeakMap");
4018
4018
  const yu = fE;
4019
- var Tp = "[object Map]", vE = "[object Object]", yp = "[object Promise]", Ep = "[object Set]", Pp = "[object WeakMap]", _p = "[object DataView]", SE = hn(Su), TE = hn(ko), yE = hn(Tu), EE = hn(Mn), PE = hn(yu), ni = un;
4020
- (Su && ni(new Su(new ArrayBuffer(1))) != _p || ko && ni(new ko()) != Tp || Tu && ni(Tu.resolve()) != yp || Mn && ni(new Mn()) != Ep || yu && ni(new yu()) != Pp) && (ni = function(s) {
4019
+ var Tp = "[object Map]", vE = "[object Object]", yp = "[object Promise]", Ep = "[object Set]", Pp = "[object WeakMap]", _p = "[object DataView]", SE = hn(Su), TE = hn(ko), yE = hn(Tu), EE = hn(Mn), PE = hn(yu), ii = un;
4020
+ (Su && ii(new Su(new ArrayBuffer(1))) != _p || ko && ii(new ko()) != Tp || Tu && ii(Tu.resolve()) != yp || Mn && ii(new Mn()) != Ep || yu && ii(new yu()) != Pp) && (ii = function(s) {
4021
4021
  var t = un(s), e = t == vE ? s.constructor : void 0, r = e ? hn(e) : "";
4022
4022
  if (r)
4023
4023
  switch (r) {
@@ -4034,7 +4034,7 @@ var Tp = "[object Map]", vE = "[object Object]", yp = "[object Promise]", Ep = "
4034
4034
  }
4035
4035
  return t;
4036
4036
  });
4037
- const La = ni;
4037
+ const La = ii;
4038
4038
  var _E = Object.prototype, CE = _E.hasOwnProperty;
4039
4039
  function wE(s) {
4040
4040
  var t = s.length, e = new s.constructor(t);
@@ -5517,7 +5517,6 @@ const ee = {
5517
5517
  LOG_LEVEL: "log_level",
5518
5518
  V1_PLUGINS: "v1_plugins",
5519
5519
  LIVESTREAM: "feat_livestream",
5520
- FEAT_PAGINATED_CHAT: "feat_paginated_chat",
5521
5520
  VAL_MIN_FRAMERATE: "val_min_framerate",
5522
5521
  SCREEENSHARE_ERR_HACK: "screenshare_err_hack",
5523
5522
  SCREEENSHARE_CONSTRAINTS_RETRY: "screenshare_constraints_retry",
@@ -5626,7 +5625,7 @@ const uw = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d=
5626
5625
  o(), window.URL.revokeObjectURL(i);
5627
5626
  }, r.src = i;
5628
5627
  });
5629
- }, gi = {
5628
+ }, pi = {
5630
5629
  logs: "https://api-silos.dyte.io/otel/logs",
5631
5630
  mock: {
5632
5631
  url: "https://mock.dyte.io",
@@ -5646,7 +5645,7 @@ const uw = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d=
5646
5645
  };
5647
5646
  function pw(s) {
5648
5647
  var r, i, a;
5649
- const t = typeof navigator != "undefined" && !navigator.isReactNative && typeof window != "undefined" && ((r = window.location.host) == null ? void 0 : r.includes(gi.baseURI.staging)), e = !!((a = (i = s == null ? void 0 : s.getValue("modules")) == null ? void 0 : i.devTools) != null && a.logs);
5648
+ const t = typeof navigator != "undefined" && !navigator.isReactNative && typeof window != "undefined" && ((r = window.location.host) == null ? void 0 : r.includes(pi.baseURI.staging)), e = !!((a = (i = s == null ? void 0 : s.getValue("modules")) == null ? void 0 : i.devTools) != null && a.logs);
5650
5649
  return t || e;
5651
5650
  }
5652
5651
  function gw(s, t) {
@@ -6294,13 +6293,13 @@ const Bp = 1080, Hp = 1920, Pw = (s, t, e, r, i, a) => {
6294
6293
  let g = d * p, v = l * p, S, P, _, C, w = 1;
6295
6294
  return g < e && (w = e / g), Math.abs(w - 1) < 1e-14 && v < r && (w = r / v), g *= w, v *= w, _ = d / (g / e), C = l / (v / r), S = (d - _) * o, P = (l - C) * c, S < 0 && (S = 0), P < 0 && (P = 0), _ > d && (_ = d), C > l && (C = l), [S, P, _, C, s, t, e, r];
6296
6295
  };
6297
- var zt, mi, st, Yt, be, ps, zs, gt, De, Vn, Ln, Ys, xn;
6296
+ var zt, gi, st, Yt, be, ps, zs, gt, De, Vn, Ln, Ys, xn;
6298
6297
  const Qh = class extends jt {
6299
6298
  constructor(e, r, i, a) {
6300
6299
  const o = e.getValue("logger");
6301
6300
  super(o);
6302
6301
  m(this, zt, void 0);
6303
- m(this, mi, void 0);
6302
+ m(this, gi, void 0);
6304
6303
  m(this, st, void 0);
6305
6304
  m(this, Yt, void 0);
6306
6305
  m(this, be, {
@@ -6322,7 +6321,7 @@ const Qh = class extends jt {
6322
6321
  m(this, Ys, void 0);
6323
6322
  m(this, xn, !1);
6324
6323
  h(this, "cleanupEventListeners", () => {
6325
- n(this, mi).unsubscribe("stageStatus", this.handlePipMediaControls), n(this, De).removeListener("videoUpdate", this.onSelfVideoUpdateListener), n(this, De).removeListener("audioUpdate", this.onSelfAudioUpdateListener), n(this, De).removeListener("roomLeft", () => this.disable());
6324
+ n(this, gi).unsubscribe("stageStatus", this.handlePipMediaControls), n(this, De).removeListener("videoUpdate", this.onSelfVideoUpdateListener), n(this, De).removeListener("audioUpdate", this.onSelfAudioUpdateListener), n(this, De).removeListener("roomLeft", () => this.disable());
6326
6325
  });
6327
6326
  h(this, "enablePipMediaControls", () => {
6328
6327
  this.mountAudioEvents(), this.mountVideoEvents();
@@ -6337,7 +6336,7 @@ const Qh = class extends jt {
6337
6336
  e === "ON_STAGE" ? this.enablePipMediaControls() : this.unmountEvents();
6338
6337
  });
6339
6338
  h(this, "eventCallback", (e) => {
6340
- e === "CAMERA" && (n(this, De).videoEnabled ? n(this, De).disableVideo() : n(this, De).enableVideo(), this.emit("cameraToggled")), e === "MIC" && (n(this, De).audioEnabled ? n(this, De).disableAudio() : n(this, De).enableAudio(), this.emit("micToggled")), e === "END" && (n(this, mi).getValue("peerSessionStore").emit(k.PIP_HANGUP), this.cleanupEventListeners(), this.emit("hangup"), this.cleanup());
6339
+ e === "CAMERA" && (n(this, De).videoEnabled ? n(this, De).disableVideo() : n(this, De).enableVideo(), this.emit("cameraToggled")), e === "MIC" && (n(this, De).audioEnabled ? n(this, De).disableAudio() : n(this, De).enableAudio(), this.emit("micToggled")), e === "END" && (n(this, gi).getValue("peerSessionStore").emit(k.PIP_HANGUP), this.cleanupEventListeners(), this.emit("hangup"), this.cleanup());
6341
6340
  });
6342
6341
  h(this, "unmountEvents", () => {
6343
6342
  navigator.mediaSession === void 0 || navigator.mediaSession.setCameraActive === void 0 || (navigator.mediaSession.setActionHandler("togglemicrophone", void 0), navigator.mediaSession.setActionHandler("togglecamera", void 0));
@@ -6355,7 +6354,7 @@ const Qh = class extends jt {
6355
6354
  h(this, "disable", (e = !1) => {
6356
6355
  f(this, Ys, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(n(this, zs)), e !== !0 && document.body.removeChild(n(this, st)), f(this, zs, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
6357
6356
  });
6358
- f(this, mi, e), f(this, Ys, "idle"), f(this, De, r), f(this, ps, {
6357
+ f(this, gi, e), f(this, Ys, "idle"), f(this, De, r), f(this, ps, {
6359
6358
  brand: r.config.designTokens.colors.brand[500],
6360
6359
  background: r.config.designTokens.colors.background[1e3],
6361
6360
  text: r.config.designTokens.colors.text,
@@ -6409,7 +6408,7 @@ const Qh = class extends jt {
6409
6408
  f(this, st, document.createElement("div")), n(this, st).style.width = "0.1px", n(this, st).style.height = "0.1px", n(this, st).style.overflow = "hidden", n(this, st).style.position = "absolute", n(this, st).style.bottom = "0", n(this, st).style.right = "0", n(this, st).style.opacity = "0", n(this, st).appendChild(n(this, Yt));
6410
6409
  }
6411
6410
  setupEventListeners() {
6412
- n(this, mi).subscribe("stageStatus", this.handlePipMediaControls), n(this, De).addListener("videoUpdate", this.onSelfVideoUpdateListener), n(this, De).addListener("audioUpdate", this.onSelfAudioUpdateListener), n(this, De).addListener("roomLeft", () => this.disable());
6411
+ n(this, gi).subscribe("stageStatus", this.handlePipMediaControls), n(this, De).addListener("videoUpdate", this.onSelfVideoUpdateListener), n(this, De).addListener("audioUpdate", this.onSelfAudioUpdateListener), n(this, De).addListener("roomLeft", () => this.disable());
6413
6412
  }
6414
6413
  createCanvas() {
6415
6414
  const e = document.createElement("canvas");
@@ -6666,7 +6665,7 @@ const Qh = class extends jt {
6666
6665
  }
6667
6666
  };
6668
6667
  let wu = Qh;
6669
- zt = new WeakMap(), mi = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), be = new WeakMap(), ps = new WeakMap(), zs = new WeakMap(), gt = new WeakMap(), De = new WeakMap(), Vn = new WeakMap(), Ln = new WeakMap(), Ys = new WeakMap(), xn = new WeakMap();
6668
+ zt = new WeakMap(), gi = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), be = new WeakMap(), ps = new WeakMap(), zs = new WeakMap(), gt = new WeakMap(), De = new WeakMap(), Vn = new WeakMap(), Ln = new WeakMap(), Ys = new WeakMap(), xn = new WeakMap();
6670
6669
  var Sr;
6671
6670
  (function(s) {
6672
6671
  s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
@@ -9458,10 +9457,10 @@ var Mu;
9458
9457
  (function(s) {
9459
9458
  s[s.NONE = 0] = "NONE", s[s.SKIP = 1] = "SKIP", s[s.ON_PRIVILEGED_USER_ENTRY = 2] = "ON_PRIVILEGED_USER_ENTRY", s[s.SKIP_ON_ACCEPT = 3] = "SKIP_ON_ACCEPT";
9460
9459
  })(Mu || (Mu = {}));
9461
- var Qr;
9460
+ var Yr;
9462
9461
  (function(s) {
9463
9462
  s[s.NONE = 0] = "NONE", s[s.ALLOWED = 1] = "ALLOWED", s[s.NOT_ALLOWED = 2] = "NOT_ALLOWED", s[s.CAN_REQUEST = 3] = "CAN_REQUEST";
9464
- })(Qr || (Qr = {}));
9463
+ })(Yr || (Yr = {}));
9465
9464
  class eI extends T {
9466
9465
  constructor() {
9467
9466
  super("socket.preset.PollsPermissionUpdate", [
@@ -9629,8 +9628,8 @@ const uI = new lI();
9629
9628
  class hI extends T {
9630
9629
  constructor() {
9631
9630
  super("socket.preset.StreamPermission", [
9632
- { no: 1, name: "can_produce", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType", Qr, "STREAM_PERMISSION_TYPE_"] },
9633
- { no: 2, name: "can_consume", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType", Qr, "STREAM_PERMISSION_TYPE_"] }
9631
+ { no: 1, name: "can_produce", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType", Yr, "STREAM_PERMISSION_TYPE_"] },
9632
+ { no: 2, name: "can_consume", kind: "enum", opt: !0, T: () => ["socket.preset.StreamPermissionType", Yr, "STREAM_PERMISSION_TYPE_"] }
9634
9633
  ]);
9635
9634
  }
9636
9635
  }
@@ -11793,7 +11792,7 @@ function If(s, t) {
11793
11792
  const $ = Fa(bM, OM), Re = Fa(kM, NM), J = Fa(
11794
11793
  IM,
11795
11794
  VM
11796
- ), Ws = Fa(AM, LM), ui = Fa(
11795
+ ), Ws = Fa(AM, LM), li = Fa(
11797
11796
  MM,
11798
11797
  xM
11799
11798
  ), Ar = If(kf, 16777216), Cs = If(kf, 50331648), ld = Fa(
@@ -11836,7 +11835,7 @@ const Nu = (Ig = class {
11836
11835
  };
11837
11836
  i && (a.visibility = "private");
11838
11837
  const o = yield n(this, Mr).sendMessagePromise(
11839
- ui.createChatChannel,
11838
+ li.createChatChannel,
11840
11839
  oA.toBinary(a)
11841
11840
  ), c = js.fromBinary(
11842
11841
  o.payload
@@ -11847,7 +11846,7 @@ const Nu = (Ig = class {
11847
11846
  updateChannel(s, t) {
11848
11847
  return u(this, null, function* () {
11849
11848
  const e = yield n(this, Mr).sendMessagePromise(
11850
- ui.updateChatChannel,
11849
+ li.updateChatChannel,
11851
11850
  dA.toBinary({
11852
11851
  chatChannelId: s,
11853
11852
  targetUserIds: t.memberIds,
@@ -11876,7 +11875,7 @@ const Nu = (Ig = class {
11876
11875
  return u(this, null, function* () {
11877
11876
  try {
11878
11877
  const t = yield n(this, Mr).sendMessagePromise(
11879
- ui.getChannelMembers,
11878
+ li.getChannelMembers,
11880
11879
  hA.toBinary({ chatChannelId: s })
11881
11880
  );
11882
11881
  return EA.fromBinary(t.payload).channelMembers.map((i) => {
@@ -11891,13 +11890,13 @@ const Nu = (Ig = class {
11891
11890
  on(s, t) {
11892
11891
  let e, r;
11893
11892
  switch (s) {
11894
- case ui.createChatChannel: {
11893
+ case li.createChatChannel: {
11895
11894
  e = js.fromBinary.bind(
11896
11895
  js
11897
11896
  ), r = js.create();
11898
11897
  break;
11899
11898
  }
11900
- case ui.updateChatChannel: {
11899
+ case li.updateChatChannel: {
11901
11900
  e = js.fromBinary.bind(
11902
11901
  js
11903
11902
  ), r = js.create();
@@ -12299,7 +12298,7 @@ class hg {
12299
12298
  return L;
12300
12299
  } catch (v) {
12301
12300
  if (v instanceof Error && l > 0)
12302
- return yield new Promise((S) => setTimeout(S, p)), this.defaults.baseURL === gi.apiBase.prod ? this.defaults.baseURL = gi.apiBase.prodAlternate : this.defaults.baseURL === gi.apiBase.prodAlternate && (this.defaults.baseURL = gi.apiBase.prod), this.request(H(D({}, t), {
12301
+ return yield new Promise((S) => setTimeout(S, p)), this.defaults.baseURL === pi.apiBase.prod ? this.defaults.baseURL = pi.apiBase.prodAlternate : this.defaults.baseURL === pi.apiBase.prodAlternate && (this.defaults.baseURL = pi.apiBase.prod), this.request(H(D({}, t), {
12303
12302
  retry: l - 1
12304
12303
  }));
12305
12304
  throw v;
@@ -12353,7 +12352,7 @@ class KM {
12353
12352
  timeout: r = JM,
12354
12353
  retry: i = GM,
12355
12354
  retryDelay: a = WM,
12356
- baseURL: o = gi.apiBase.prod,
12355
+ baseURL: o = pi.apiBase.prod,
12357
12356
  authToken: c,
12358
12357
  cachedUserDetails: d
12359
12358
  } = e || {};
@@ -12737,7 +12736,7 @@ var ZM = Object.defineProperty, e0 = Object.getOwnPropertyDescriptor, ht = (s, t
12737
12736
  return r && i && ZM(t, e, i), i;
12738
12737
  };
12739
12738
  const t0 = ["text", "image", "file", "custom", "poll"], ud = { maxInvocations: 180, period: 60 };
12740
- var Z, fi, $e, vi, Si, xd, Mf, No, Lu, Ag;
12739
+ var Z, mi, $e, fi, vi, xd, Mf, No, Lu, Ag;
12741
12740
  let ze = (Ag = class extends jt {
12742
12741
  constructor(t, e, r, i, a) {
12743
12742
  const o = t.getValue("logger");
@@ -12757,19 +12756,19 @@ let ze = (Ag = class extends jt {
12757
12756
  */
12758
12757
  h(this, "channels", []);
12759
12758
  m(this, Z, void 0);
12760
- m(this, fi, void 0);
12759
+ m(this, mi, void 0);
12761
12760
  m(this, $e, void 0);
12761
+ m(this, fi, void 0);
12762
12762
  m(this, vi, void 0);
12763
- m(this, Si, void 0);
12764
12763
  h(this, "maxTextLimit", 2e3);
12765
- f(this, Si, t), f(this, $e, e), f(this, vi, r), f(this, Z, i), f(this, fi, a), this.messages = [];
12764
+ f(this, vi, t), f(this, $e, e), f(this, fi, r), f(this, Z, i), f(this, mi, a), this.messages = [];
12766
12765
  }
12767
12766
  /**
12768
12767
  * @access private
12769
12768
  * Not for external use
12770
12769
  */
12771
12770
  get telemetry() {
12772
- return n(this, Si).getValue("telemetry");
12771
+ return n(this, vi).getValue("telemetry");
12773
12772
  }
12774
12773
  /**
12775
12774
  Set the max character limit of a text message
@@ -12816,7 +12815,7 @@ let ze = (Ag = class extends jt {
12816
12815
  return;
12817
12816
  }
12818
12817
  let i = [];
12819
- e && e.length > 0 && (e.push(n(this, Z).id), i = n(this, fi).joined.toArray().filter((g) => e.includes(g.id)).map((g) => g.userId), i.push(n(this, Z).userId)), n(this, $e).sendMessage(
12818
+ e && e.length > 0 && (e.push(n(this, Z).id), i = n(this, mi).joined.toArray().filter((g) => e.includes(g.id)).map((g) => g.userId), i.push(n(this, Z).userId)), n(this, $e).sendMessage(
12820
12819
  t,
12821
12820
  Et.TEXT,
12822
12821
  e
@@ -12857,7 +12856,7 @@ let ze = (Ag = class extends jt {
12857
12856
  return;
12858
12857
  }
12859
12858
  let P = [];
12860
- e && e.length > 0 && (e.push(n(this, Z).id), P = n(this, fi).joined.toArray().filter((_) => e.includes(_.id)).map((_) => _.userId), P.push(n(this, Z).userId)), n(this, $e).sendMessage(
12859
+ e && e.length > 0 && (e.push(n(this, Z).id), P = n(this, mi).joined.toArray().filter((_) => e.includes(_.id)).map((_) => _.userId), P.push(n(this, Z).userId)), n(this, $e).sendMessage(
12861
12860
  v,
12862
12861
  Et.IMAGE,
12863
12862
  e
@@ -12901,7 +12900,7 @@ let ze = (Ag = class extends jt {
12901
12900
  return;
12902
12901
  }
12903
12902
  let S = [];
12904
- e && e.length > 0 && (e.push(n(this, Z).id), S = n(this, fi).joined.toArray().filter((_) => e.includes(_.id)).map((_) => _.userId), S.push(n(this, Z).userId));
12903
+ e && e.length > 0 && (e.push(n(this, Z).id), S = n(this, mi).joined.toArray().filter((_) => e.includes(_.id)).map((_) => _.userId), S.push(n(this, Z).userId));
12905
12904
  const P = JSON.stringify({
12906
12905
  link: g,
12907
12906
  name: t.name,
@@ -13185,7 +13184,7 @@ let ze = (Ag = class extends jt {
13185
13184
  if (!t || t.trim().length === 0)
13186
13185
  throw new b("channel name cannot be empty.", "0510");
13187
13186
  const c = [.../* @__PURE__ */ new Set([...e, n(this, Z).userId])];
13188
- return yield n(this, vi).createChannel(
13187
+ return yield n(this, fi).createChannel(
13189
13188
  t.trim(),
13190
13189
  c,
13191
13190
  r.displayPictureUrl,
@@ -13211,7 +13210,7 @@ let ze = (Ag = class extends jt {
13211
13210
  displayPictureUrl: (l = e.displayPictureUrl) != null ? l : r.displayPictureUrl,
13212
13211
  visibility: (p = e.visibility) != null ? p : r.visibility
13213
13212
  };
13214
- return n(this, vi).updateChannel(t, a);
13213
+ return n(this, fi).updateChannel(t, a);
13215
13214
  }
13216
13215
  sendMessageToChannel(i, a) {
13217
13216
  return u(this, arguments, function* (t, e, r = {}) {
@@ -13220,12 +13219,12 @@ let ze = (Ag = class extends jt {
13220
13219
  }
13221
13220
  getChannelMembers(t) {
13222
13221
  return u(this, null, function* () {
13223
- return n(this, vi).getChannelMembers(t);
13222
+ return n(this, fi).getChannelMembers(t);
13224
13223
  });
13225
13224
  }
13226
13225
  searchMessages(r) {
13227
13226
  return u(this, arguments, function* (t, e = {}) {
13228
- if (!n(this, Si).getValue("flagsmith").hasFeature(ee.FEAT_CHAT_SDK_SEARCH))
13227
+ if (!n(this, vi).getValue("flagsmith").hasFeature(ee.FEAT_CHAT_SDK_SEARCH))
13229
13228
  throw new b("searchMessages is temporarily disabled!", "0506");
13230
13229
  return (yield n(this, $e).searchMessages(t, e)).map(ws.formatSocketPeerMessage);
13231
13230
  });
@@ -13246,8 +13245,8 @@ let ze = (Ag = class extends jt {
13246
13245
  get pinned() {
13247
13246
  return this.messages.filter((t) => t.pinned);
13248
13247
  }
13249
- }, Z = new WeakMap(), fi = new WeakMap(), $e = new WeakMap(), vi = new WeakMap(), Si = new WeakMap(), xd = new WeakSet(), Mf = function() {
13250
- return n(this, Si).getValue("connectionHandler");
13248
+ }, Z = new WeakMap(), mi = new WeakMap(), $e = new WeakMap(), fi = new WeakMap(), vi = new WeakMap(), xd = new WeakSet(), Mf = function() {
13249
+ return n(this, vi).getValue("connectionHandler");
13251
13250
  }, No = new WeakSet(), Lu = function() {
13252
13251
  return n(this, xd, Mf).socketJoined === !0;
13253
13252
  }, Ag);
@@ -13307,15 +13306,15 @@ var s0 = Object.defineProperty, r0 = Object.getOwnPropertyDescriptor, i0 = (s, t
13307
13306
  for (var i = r > 1 ? void 0 : r ? r0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
13308
13307
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
13309
13308
  return r && i && s0(t, e, i), i;
13310
- }, Dr, Mg;
13311
- const ai = (Mg = class {
13309
+ }, Si, Mg;
13310
+ const ni = (Mg = class {
13312
13311
  constructor(s, t, e, r, i) {
13313
13312
  h(this, "chat");
13314
13313
  h(this, "chatSocketHandler");
13315
13314
  h(this, "chatChannelSocketHandler");
13316
13315
  h(this, "self");
13317
- m(this, Dr, void 0);
13318
- f(this, Dr, s), this.chatSocketHandler = t, this.chatChannelSocketHandler = e, this.chat = new ze(
13316
+ m(this, Si, void 0);
13317
+ f(this, Si, s), this.chatSocketHandler = t, this.chatChannelSocketHandler = e, this.chat = new ze(
13319
13318
  s,
13320
13319
  t,
13321
13320
  e,
@@ -13328,18 +13327,18 @@ const ai = (Mg = class {
13328
13327
  * Not for external use
13329
13328
  */
13330
13329
  get telemetry() {
13331
- return n(this, Dr).getValue("telemetry");
13330
+ return n(this, Si).getValue("telemetry");
13332
13331
  }
13333
13332
  /**
13334
13333
  * @access private
13335
13334
  * Not for external use
13336
13335
  */
13337
13336
  get logger() {
13338
- return n(this, Dr).getValue("logger");
13337
+ return n(this, Si).getValue("logger");
13339
13338
  }
13340
13339
  static init(s, t, e, r, i) {
13341
13340
  return u(this, null, function* () {
13342
- return new ai(
13341
+ return new ni(
13343
13342
  s,
13344
13343
  t,
13345
13344
  e,
@@ -13407,11 +13406,11 @@ const ai = (Mg = class {
13407
13406
  break;
13408
13407
  }
13409
13408
  }
13410
- return ai.formatMessage(e);
13409
+ return ni.formatMessage(e);
13411
13410
  }
13412
13411
  getChatMessages() {
13413
13412
  return u(this, null, function* () {
13414
- if (this.self.config.viewType === "LIVESTREAM" || this.self.config.viewType === "CHAT" || n(this, Dr).getValue("flagsmith").hasFeature(ee.FEAT_PAGINATED_CHAT))
13413
+ if (this.self.config.viewType === "LIVESTREAM")
13415
13414
  return;
13416
13415
  const s = yield this.chatSocketHandler.getChatMessages();
13417
13416
  if (!(s != null && s.payload))
@@ -13420,12 +13419,12 @@ const ai = (Mg = class {
13420
13419
  s.payload
13421
13420
  ).messages;
13422
13421
  this.chat.messages = t.map(
13423
- (e) => ai.formatSocketPeerMessage(e)
13422
+ (e) => ni.formatSocketPeerMessage(e)
13424
13423
  );
13425
13424
  });
13426
13425
  }
13427
13426
  setupEvents() {
13428
- n(this, Dr).getValue("peerSessionStore").on(
13427
+ n(this, Si).getValue("peerSessionStore").on(
13429
13428
  k.SOCKET_SERVICE_ROOM_JOINED,
13430
13429
  () => u(this, null, function* () {
13431
13430
  this.getChatMessages();
@@ -13433,7 +13432,7 @@ const ai = (Mg = class {
13433
13432
  ), this.chatSocketHandler.on(
13434
13433
  Re.sendMessageToRoom,
13435
13434
  (s) => {
13436
- const t = ai.formatSocketPeerMessage(
13435
+ const t = ni.formatSocketPeerMessage(
13437
13436
  s.message
13438
13437
  );
13439
13438
  if (!t.channelId)
@@ -13451,7 +13450,7 @@ const ai = (Mg = class {
13451
13450
  ), this.chatSocketHandler.on(
13452
13451
  Re.sendMessageToPeers,
13453
13452
  (s) => {
13454
- const t = ai.formatSocketPeerMessage(
13453
+ const t = ni.formatSocketPeerMessage(
13455
13454
  s.message
13456
13455
  );
13457
13456
  this.chat.messages = [...this.chat.messages, t], this.chat.emit("chatUpdate", {
@@ -13463,7 +13462,7 @@ const ai = (Mg = class {
13463
13462
  ), this.chatSocketHandler.on(
13464
13463
  Re.editMessage,
13465
13464
  (s) => {
13466
- const t = ai.formatSocketPeerMessage(
13465
+ const t = ni.formatSocketPeerMessage(
13467
13466
  s.message
13468
13467
  );
13469
13468
  if (t.channelId) {
@@ -13503,7 +13502,7 @@ const ai = (Mg = class {
13503
13502
  });
13504
13503
  }
13505
13504
  ), this.chatChannelSocketHandler.on(
13506
- ui.createChatChannel,
13505
+ li.createChatChannel,
13507
13506
  (s) => {
13508
13507
  const [t] = s.chatChannels, e = dn.formatChannel(t);
13509
13508
  this.chat.channels.push(e), this.chat.emit("channelCreate", e);
@@ -13522,15 +13521,15 @@ const ai = (Mg = class {
13522
13521
  });
13523
13522
  }
13524
13523
  ), this.chatChannelSocketHandler.on(
13525
- ui.updateChatChannel,
13524
+ li.updateChatChannel,
13526
13525
  (s) => {
13527
13526
  const [t] = s.chatChannels, e = dn.formatChannel(t);
13528
13527
  this.chat.channels = this.chat.channels.map((r) => r.id === e.id ? e : r), this.chat.emit("channelUpdate", e);
13529
13528
  }
13530
13529
  );
13531
13530
  }
13532
- }, Dr = new WeakMap(), Mg);
13533
- let ws = ai;
13531
+ }, Si = new WeakMap(), Mg);
13532
+ let ws = ni;
13534
13533
  i0([
13535
13534
  E.trace("ChatController.setupEvents")
13536
13535
  ], ws.prototype, "setupEvents", 1);
@@ -13623,28 +13622,28 @@ var c0 = Object.defineProperty, d0 = Object.getOwnPropertyDescriptor, l0 = (s, t
13623
13622
  for (var i = r > 1 ? void 0 : r ? d0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
13624
13623
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
13625
13624
  return r && i && c0(t, e, i), i;
13626
- }, Or, Hn, Ti, Og;
13625
+ }, Dr, Hn, Ti, Og;
13627
13626
  const yn = (Og = class {
13628
13627
  constructor(s, t, e) {
13629
13628
  h(this, "polls");
13630
- m(this, Or, void 0);
13629
+ m(this, Dr, void 0);
13631
13630
  m(this, Hn, void 0);
13632
13631
  m(this, Ti, void 0);
13633
- this.polls = new xu(s, t, e), f(this, Hn, t), f(this, Or, s), f(this, Ti, e), this.setupEvents();
13632
+ this.polls = new xu(s, t, e), f(this, Hn, t), f(this, Dr, s), f(this, Ti, e), this.setupEvents();
13634
13633
  }
13635
13634
  /**
13636
13635
  * @access private
13637
13636
  * Not for external use
13638
13637
  */
13639
13638
  get telemetry() {
13640
- return n(this, Or).getValue("telemetry");
13639
+ return n(this, Dr).getValue("telemetry");
13641
13640
  }
13642
13641
  /**
13643
13642
  * @access private
13644
13643
  * Not for external use
13645
13644
  */
13646
13645
  get logger() {
13647
- return n(this, Or).getValue("logger");
13646
+ return n(this, Dr).getValue("logger");
13648
13647
  }
13649
13648
  static init(s, t, e) {
13650
13649
  return u(this, null, function* () {
@@ -13666,13 +13665,13 @@ const yn = (Og = class {
13666
13665
  r.poll && this.updatePoll(yn.formatSocketServicePoll(r.poll));
13667
13666
  }
13668
13667
  }, t = () => {
13669
- n(this, Or).getValue("peerSessionStore").on(k.SOCKET_SERVICE_ROOM_JOINED, () => {
13668
+ n(this, Dr).getValue("peerSessionStore").on(k.SOCKET_SERVICE_ROOM_JOINED, () => {
13670
13669
  this.getPolls();
13671
13670
  }), Object.keys(s).map(Number).forEach((r) => {
13672
13671
  n(this, Ti).on(r, s[r]);
13673
13672
  });
13674
13673
  }, e = () => {
13675
- n(this, Or).getValue("peerSessionStore").on(k.SOCKET_SERVICE_ROOM_JOINED, () => {
13674
+ n(this, Dr).getValue("peerSessionStore").on(k.SOCKET_SERVICE_ROOM_JOINED, () => {
13676
13675
  this.getPolls();
13677
13676
  }), Object.keys(s).map(Number).forEach((r) => {
13678
13677
  n(this, Ti).removeListeners(r);
@@ -13728,7 +13727,7 @@ const yn = (Og = class {
13728
13727
  voted: s.votes
13729
13728
  };
13730
13729
  }
13731
- }, Or = new WeakMap(), Hn = new WeakMap(), Ti = new WeakMap(), Og);
13730
+ }, Dr = new WeakMap(), Hn = new WeakMap(), Ti = new WeakMap(), Og);
13732
13731
  let Nf = yn;
13733
13732
  l0([
13734
13733
  E.trace("PollController.setupEvents")
@@ -13835,7 +13834,7 @@ var m0 = Object.defineProperty, f0 = Object.getOwnPropertyDescriptor, Lf = (s, t
13835
13834
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
13836
13835
  return r && i && m0(t, e, i), i;
13837
13836
  }, Uo, Vg;
13838
- let ei = (Vg = class extends jt {
13837
+ let Zr = (Vg = class extends jt {
13839
13838
  constructor(t) {
13840
13839
  const e = t.getValue("logger");
13841
13840
  super(e);
@@ -13852,7 +13851,7 @@ let ei = (Vg = class extends jt {
13852
13851
  }
13853
13852
  static init(t, e) {
13854
13853
  return u(this, null, function* () {
13855
- const r = new ei(t), i = t.getValue("logger");
13854
+ const r = new Zr(t), i = t.getValue("logger");
13856
13855
  try {
13857
13856
  e && r.getActiveTranscript();
13858
13857
  } catch (a) {
@@ -13891,13 +13890,13 @@ let ei = (Vg = class extends jt {
13891
13890
  */
13892
13891
  static parseTranscripts(t) {
13893
13892
  return t ? t.split(`
13894
- `).map((e) => ei.parseTranscript(e, !1)).filter(Boolean) : [];
13893
+ `).map((e) => Zr.parseTranscript(e, !1)).filter(Boolean) : [];
13895
13894
  }
13896
13895
  getActiveTranscript() {
13897
13896
  return u(this, null, function* () {
13898
13897
  try {
13899
13898
  const t = dt(), { transcript: e } = yield t.getActiveTranscript();
13900
- this.transcripts = ei.parseTranscripts(e);
13899
+ this.transcripts = Zr.parseTranscripts(e);
13901
13900
  } catch (t) {
13902
13901
  }
13903
13902
  });
@@ -13917,20 +13916,20 @@ let ei = (Vg = class extends jt {
13917
13916
  }, Uo = new WeakMap(), Vg);
13918
13917
  Lf([
13919
13918
  E.trace("Ai.getActiveTranscript")
13920
- ], ei.prototype, "getActiveTranscript", 1);
13921
- ei = Lf([
13919
+ ], Zr.prototype, "getActiveTranscript", 1);
13920
+ Zr = Lf([
13922
13921
  ut("0000")
13923
- ], ei);
13922
+ ], Zr);
13924
13923
  var v0 = Object.defineProperty, S0 = Object.getOwnPropertyDescriptor, T0 = (s, t, e, r) => {
13925
13924
  for (var i = r > 1 ? void 0 : r ? S0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
13926
13925
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
13927
13926
  return r && i && v0(t, e, i), i;
13928
- }, Nr, jn, Lt, Lg;
13927
+ }, Or, jn, Lt, Lg;
13929
13928
  const xf = (Lg = class {
13930
13929
  constructor(s, t, e, r, i, a) {
13931
13930
  h(this, "meta");
13932
13931
  h(this, "ai");
13933
- m(this, Nr, void 0);
13932
+ m(this, Or, void 0);
13934
13933
  m(this, jn, void 0);
13935
13934
  h(this, "aiSocketHandler");
13936
13935
  m(this, Lt, void 0);
@@ -13940,7 +13939,7 @@ const xf = (Lg = class {
13940
13939
  t.config.viewType,
13941
13940
  e,
13942
13941
  a
13943
- ), this.ai = r, f(this, Nr, t), f(this, jn, e), this.aiSocketHandler = i, t.config.viewType !== At.Chat && this.setupEvents();
13942
+ ), this.ai = r, f(this, Or, t), f(this, jn, e), this.aiSocketHandler = i, t.config.viewType !== At.Chat && this.setupEvents();
13944
13943
  }
13945
13944
  /**
13946
13945
  * @access private
@@ -13961,7 +13960,7 @@ const xf = (Lg = class {
13961
13960
  */
13962
13961
  static init(s, t, e, r, i) {
13963
13962
  return u(this, null, function* () {
13964
- const a = yield ei.init(s, t.permissions.transcriptionEnabled);
13963
+ const a = yield Zr.init(s, t.permissions.transcriptionEnabled);
13965
13964
  return new xf(
13966
13965
  s,
13967
13966
  t,
@@ -14006,14 +14005,14 @@ const xf = (Lg = class {
14006
14005
  ({ score: s }) => {
14007
14006
  s < 5 && this.meta.emit("poorConnection", { score: s });
14008
14007
  }
14009
- ), n(this, Nr).permissions.canSpotlight && (this.logger.info("MetaController::Asserting Spotlight"), this.meta.selfActiveTab && n(this, jn).broadcastMessage("spotlight", {
14010
- userId: n(this, Nr).userId,
14008
+ ), n(this, Or).permissions.canSpotlight && (this.logger.info("MetaController::Asserting Spotlight"), this.meta.selfActiveTab && n(this, jn).broadcastMessage("spotlight", {
14009
+ userId: n(this, Or).userId,
14011
14010
  currentTab: this.meta.selfActiveTab
14012
14011
  })), n(this, Lt).getValue("peerSessionStore").on(
14013
14012
  k.PEER_JOINED_INTERNAL,
14014
14013
  (s) => u(this, null, function* () {
14015
- n(this, Nr).permissions.canSpotlight && this.meta.selfActiveTab && n(this, jn).broadcastToPeers("spotlight", [s.id], {
14016
- userId: n(this, Nr).userId,
14014
+ n(this, Or).permissions.canSpotlight && this.meta.selfActiveTab && n(this, jn).broadcastToPeers("spotlight", [s.id], {
14015
+ userId: n(this, Or).userId,
14017
14016
  currentTab: this.meta.selfActiveTab
14018
14017
  });
14019
14018
  })
@@ -14075,7 +14074,7 @@ const xf = (Lg = class {
14075
14074
  } = s;
14076
14075
  let i;
14077
14076
  try {
14078
- i = ei.parseTranscript(e, r);
14077
+ i = Zr.parseTranscript(e, r);
14079
14078
  } catch (d) {
14080
14079
  this.logger.error(`Failed to parse transcript: ${e}`, d);
14081
14080
  }
@@ -14088,7 +14087,7 @@ const xf = (Lg = class {
14088
14087
  this.logger.debug(`${t} Received transcript for peer ${a} - ${o}: ${c}`);
14089
14088
  });
14090
14089
  }
14091
- }, Nr = new WeakMap(), jn = new WeakMap(), Lt = new WeakMap(), Lg);
14090
+ }, Or = new WeakMap(), jn = new WeakMap(), Lt = new WeakMap(), Lg);
14092
14091
  let Uf = xf;
14093
14092
  T0([
14094
14093
  E.trace("MetaController.setupEvents")
@@ -14156,7 +14155,7 @@ var y0 = Object.defineProperty, E0 = Object.getOwnPropertyDescriptor, mn = (s, t
14156
14155
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
14157
14156
  return r && i && y0(t, e, i), i;
14158
14157
  }, Qt, Fd, ie, $o, Ds, We, Fo, Fu, Gn, hd;
14159
- class si extends jt {
14158
+ class ti extends jt {
14160
14159
  constructor(e, r, i, a, o) {
14161
14160
  const c = e.getValue("logger");
14162
14161
  super(c);
@@ -14341,19 +14340,19 @@ Qt = new WeakMap(), Fd = new WeakMap(), ie = new WeakMap(), $o = new WeakMap(),
14341
14340
  };
14342
14341
  mn([
14343
14342
  E.trace("Stage.getStageRequests")
14344
- ], si.prototype, "getAccessRequests", 1);
14343
+ ], ti.prototype, "getAccessRequests", 1);
14345
14344
  mn([
14346
14345
  E.trace("Stage.requestAccess")
14347
- ], si.prototype, "requestAccess", 1);
14346
+ ], ti.prototype, "requestAccess", 1);
14348
14347
  mn([
14349
14348
  E.trace("Stage.cancelRequestAccess")
14350
- ], si.prototype, "cancelRequestAccess", 1);
14349
+ ], ti.prototype, "cancelRequestAccess", 1);
14351
14350
  mn([
14352
14351
  E.trace("Stage.grantAccess")
14353
- ], si.prototype, "grantAccess", 1);
14352
+ ], ti.prototype, "grantAccess", 1);
14354
14353
  mn([
14355
14354
  E.trace("Stage.denyAccess")
14356
- ], si.prototype, "denyAccess", 1);
14355
+ ], ti.prototype, "denyAccess", 1);
14357
14356
  mn([
14358
14357
  Pr.executeWithLock({
14359
14358
  methodName: "joinStage",
@@ -14361,10 +14360,10 @@ mn([
14361
14360
  timeout: 5e3
14362
14361
  }),
14363
14362
  E.trace("Stage.joinStage")
14364
- ], si.prototype, "join", 1);
14363
+ ], ti.prototype, "join", 1);
14365
14364
  mn([
14366
14365
  E.trace("Stage.leaveStage")
14367
- ], si.prototype, "leave", 1);
14366
+ ], ti.prototype, "leave", 1);
14368
14367
  function P0(s) {
14369
14368
  return !(s.viewType === "LIVESTREAM" || s.viewType === "CHAT");
14370
14369
  }
@@ -14388,22 +14387,22 @@ var _0 = Object.defineProperty, C0 = Object.getOwnPropertyDescriptor, w0 = (s, t
14388
14387
  for (var i = r > 1 ? void 0 : r ? C0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
14389
14388
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
14390
14389
  return r && i && _0(t, e, i), i;
14391
- }, Vr, gs, Lr, Bo, mt;
14390
+ }, Nr, gs, Vr, Bo, mt;
14392
14391
  class $f {
14393
14392
  constructor(t, e, r, i, a) {
14394
14393
  h(this, "stage");
14395
- m(this, Vr, void 0);
14394
+ m(this, Nr, void 0);
14396
14395
  m(this, gs, void 0);
14397
- m(this, Lr, void 0);
14396
+ m(this, Vr, void 0);
14398
14397
  m(this, Bo, 0);
14399
14398
  m(this, mt, void 0);
14400
- f(this, mt, t), this.stage = new si(
14399
+ f(this, mt, t), this.stage = new ti(
14401
14400
  t,
14402
14401
  i,
14403
14402
  a,
14404
14403
  e,
14405
14404
  r
14406
- ), f(this, Lr, e), f(this, Vr, i), f(this, gs, a), this.setupEvents();
14405
+ ), f(this, Vr, e), f(this, Nr, i), f(this, gs, a), this.setupEvents();
14407
14406
  }
14408
14407
  /**
14409
14408
  * @access private
@@ -14422,17 +14421,17 @@ class $f {
14422
14421
  setupEvents() {
14423
14422
  n(this, mt).subscribe("stageStatus", (t) => {
14424
14423
  this.stage.emit("stageStatusUpdate", t);
14425
- }), n(this, Lr).on($.grantStageAccess, () => {
14426
- n(this, Vr).permissions.stageAccess !== j.Allowed && (this.stage.emit("stageRequestApproved"), this.setStageStatus("ACCEPTED_TO_JOIN_STAGE"));
14427
- }), n(this, Lr).on($.peerStageStatusUpdate, (t) => {
14428
- t !== void 0 && (t.peerId === n(this, Vr).id ? this.selfStageStatusHandler(t) : this.peerStageStatusHandler(t));
14429
- }), n(this, Lr).on($.denyStageAccess, () => {
14430
- n(this, Vr).permissions.stageAccess !== j.Allowed && (this.stage.emit("stageRequestRejected"), this.setStageStatus("OFF_STAGE"));
14431
- }), n(this, Lr).on(
14424
+ }), n(this, Vr).on($.grantStageAccess, () => {
14425
+ n(this, Nr).permissions.stageAccess !== j.Allowed && (this.stage.emit("stageRequestApproved"), this.setStageStatus("ACCEPTED_TO_JOIN_STAGE"));
14426
+ }), n(this, Vr).on($.peerStageStatusUpdate, (t) => {
14427
+ t !== void 0 && (t.peerId === n(this, Nr).id ? this.selfStageStatusHandler(t) : this.peerStageStatusHandler(t));
14428
+ }), n(this, Vr).on($.denyStageAccess, () => {
14429
+ n(this, Nr).permissions.stageAccess !== j.Allowed && (this.stage.emit("stageRequestRejected"), this.setStageStatus("OFF_STAGE"));
14430
+ }), n(this, Vr).on(
14432
14431
  $.getStageRequests,
14433
14432
  (t) => u(this, null, function* () {
14434
14433
  var r;
14435
- if (n(this, Vr).permissions.stageAccess !== j.Allowed)
14434
+ if (n(this, Nr).permissions.stageAccess !== j.Allowed)
14436
14435
  return;
14437
14436
  const e = (r = t == null ? void 0 : t.stageRequests) != null ? r : [];
14438
14437
  yield n(this, mt).getValue("peerSessionStore").emitAsync(k.GET_STAGE_REQUESTS, e), n(this, Bo) < e.length && e.length > 0 && this.stage.emit("newStageRequest", { count: e.length }), f(this, Bo, e.length), this.stage.emit("stageAccessRequestUpdate", e);
@@ -14509,7 +14508,7 @@ class $f {
14509
14508
  });
14510
14509
  }
14511
14510
  }
14512
- Vr = new WeakMap(), gs = new WeakMap(), Lr = new WeakMap(), Bo = new WeakMap(), mt = new WeakMap();
14511
+ Nr = new WeakMap(), gs = new WeakMap(), Vr = new WeakMap(), Bo = new WeakMap(), mt = new WeakMap();
14513
14512
  w0([
14514
14513
  E.trace("Stage.setupEvents")
14515
14514
  ], $f.prototype, "setupEvents", 1);
@@ -14532,7 +14531,7 @@ const Ie = {
14532
14531
  stageStatusUpdate: 25,
14533
14532
  peerStageStatusUpdate: 26
14534
14533
  };
14535
- var it, xt, Wn, Jn, Qs, Kn, xr, zn, xg;
14534
+ var it, xt, Wn, Jn, Qs, Kn, Lr, zn, xg;
14536
14535
  let Ua = (xg = class extends $a {
14537
14536
  constructor(t, {
14538
14537
  baseURL: e,
@@ -14574,16 +14573,16 @@ let Ua = (xg = class extends $a {
14574
14573
  h(this, "active");
14575
14574
  h(this, "iframes");
14576
14575
  h(this, "enabledBy");
14577
- m(this, xr, void 0);
14576
+ m(this, Lr, void 0);
14578
14577
  m(this, zn, void 0);
14579
- f(this, xr, t), this.baseURL = e, this.createdAt = new Date(r), this.description = i, this.id = a, this.name = o, f(this, xt, C), this.organizationId = c, this.picture = d, this.private = l, this.published = p, this.staggered = g, this.tags = v, this.type = S, this.updatedAt = new Date(P), this.active = !1, this.iframes = /* @__PURE__ */ new Map(), f(this, it, _), f(this, Wn, w), f(this, Jn, L), this.enabledBy = "", f(this, zn, F);
14578
+ f(this, Lr, t), this.baseURL = e, this.createdAt = new Date(r), this.description = i, this.id = a, this.name = o, f(this, xt, C), this.organizationId = c, this.picture = d, this.private = l, this.published = p, this.staggered = g, this.tags = v, this.type = S, this.updatedAt = new Date(P), this.active = !1, this.iframes = /* @__PURE__ */ new Map(), f(this, it, _), f(this, Wn, w), f(this, Jn, L), this.enabledBy = "", f(this, zn, F);
14580
14579
  }
14581
14580
  /**
14582
14581
  * @access private
14583
14582
  * Not for external use
14584
14583
  */
14585
14584
  get telemetry() {
14586
- return n(this, xr).getValue("telemetry");
14585
+ return n(this, Lr).getValue("telemetry");
14587
14586
  }
14588
14587
  /**
14589
14588
  * @access private
@@ -14748,7 +14747,7 @@ let Ua = (xg = class extends $a {
14748
14747
  case Ie.getRoomName: {
14749
14748
  this.sendIframeEvent({
14750
14749
  type: Ie.getRoomName,
14751
- payload: { roomName: n(this, xr).getValue("meetingId") },
14750
+ payload: { roomName: n(this, Lr).getValue("meetingId") },
14752
14751
  uuid: e.uuid
14753
14752
  });
14754
14753
  break;
@@ -14803,9 +14802,9 @@ let Ua = (xg = class extends $a {
14803
14802
  const r = t, i = new URL(this.baseURL), a = {
14804
14803
  auth: n(this, Kn),
14805
14804
  parent: navigator.isReactNative ? this.baseURL : window.location.origin,
14806
- backend: n(this, xr).getValue("apiBase"),
14805
+ backend: n(this, Lr).getValue("apiBase"),
14807
14806
  pluginId: this.id,
14808
- roomName: (o = n(this, xr).getValue("meetingId")) != null ? o : "",
14807
+ roomName: (o = n(this, Lr).getValue("meetingId")) != null ? o : "",
14809
14808
  displayTitle: n(this, zn)
14810
14809
  };
14811
14810
  if (Object.keys(a).forEach((c) => {
@@ -14904,7 +14903,7 @@ let Ua = (xg = class extends $a {
14904
14903
  }), f(this, Qs, void 0)));
14905
14904
  });
14906
14905
  }
14907
- }, it = new WeakMap(), xt = new WeakMap(), Wn = new WeakMap(), Jn = new WeakMap(), Qs = new WeakMap(), Kn = new WeakMap(), xr = new WeakMap(), zn = new WeakMap(), xg);
14906
+ }, it = new WeakMap(), xt = new WeakMap(), Wn = new WeakMap(), Jn = new WeakMap(), Qs = new WeakMap(), Kn = new WeakMap(), Lr = new WeakMap(), zn = new WeakMap(), xg);
14908
14907
  Hl([
14909
14908
  Mt({ maxInvocations: 5, period: 1 })
14910
14909
  ], Ua.prototype, "sendData", 1);
@@ -17851,14 +17850,14 @@ var PD = Object.defineProperty, _D = Object.getOwnPropertyDescriptor, Gc = (s, t
17851
17850
  for (var i = r > 1 ? void 0 : r ? _D(t, e) : t, a = s.length - 1, o; a >= 0; a--)
17852
17851
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
17853
17852
  return r && i && PD(t, e, i), i;
17854
- }, nt, Ur, $r, Bd, Kf;
17853
+ }, nt, xr, Ur, Bd, Kf;
17855
17854
  class Ha {
17856
17855
  constructor({ name: t, socketHandler: e, meetingId: r }) {
17857
17856
  m(this, Bd);
17858
17857
  h(this, "name", "");
17859
17858
  m(this, nt, {});
17860
- m(this, Ur, "");
17861
- m(this, $r, void 0);
17859
+ m(this, xr, "");
17860
+ m(this, Ur, void 0);
17862
17861
  h(this, "rateLimitConfig", {
17863
17862
  maxInvocations: 5,
17864
17863
  period: 1
@@ -17868,7 +17867,7 @@ class Ha {
17868
17867
  period: 1
17869
17868
  });
17870
17869
  h(this, "listeners", {});
17871
- this.name = t, f(this, $r, e), f(this, Ur, r);
17870
+ this.name = t, f(this, Ur, e), f(this, xr, r);
17872
17871
  }
17873
17872
  /**
17874
17873
  * @description Sets a value in the store.
@@ -17886,13 +17885,13 @@ class Ha {
17886
17885
  });
17887
17886
  }
17888
17887
  remoteSet(t, e) {
17889
- n(this, $r).storeInsertKeys(n(this, Ur), this.name, [{ key: t, payload: e }]);
17888
+ n(this, Ur).storeInsertKeys(n(this, xr), this.name, [{ key: t, payload: e }]);
17890
17889
  }
17891
17890
  bulkSet(t) {
17892
17891
  return u(this, null, function* () {
17893
17892
  t.forEach(({ key: e, payload: r }) => {
17894
17893
  n(this, nt)[e] = r;
17895
- }), n(this, $r).storeInsertKeys(n(this, Ur), this.name, t);
17894
+ }), n(this, Ur).storeInsertKeys(n(this, xr), this.name, t);
17896
17895
  });
17897
17896
  }
17898
17897
  update(t, e, r = !0) {
@@ -17904,8 +17903,8 @@ class Ha {
17904
17903
  delete(t, e = !0, r = !1) {
17905
17904
  return u(this, null, function* () {
17906
17905
  if (n(this, nt)[t] && delete n(this, nt)[t], e)
17907
- return n(this, $r).storeDeleteKeys(
17908
- n(this, Ur),
17906
+ return n(this, Ur).storeDeleteKeys(
17907
+ n(this, xr),
17909
17908
  this.name,
17910
17909
  [{ key: t }]
17911
17910
  );
@@ -17916,8 +17915,8 @@ class Ha {
17916
17915
  return u(this, null, function* () {
17917
17916
  return t.forEach(({ key: e }) => {
17918
17917
  n(this, nt)[e] && delete n(this, nt)[e];
17919
- }), n(this, $r).storeDeleteKeys(
17920
- n(this, Ur),
17918
+ }), n(this, Ur).storeDeleteKeys(
17919
+ n(this, xr),
17921
17920
  this.name,
17922
17921
  t
17923
17922
  );
@@ -17984,7 +17983,7 @@ class Ha {
17984
17983
  f(this, nt, t);
17985
17984
  }
17986
17985
  }
17987
- nt = new WeakMap(), Ur = new WeakMap(), $r = new WeakMap(), Bd = new WeakSet(), Kf = function(t, e, r = !0) {
17986
+ nt = new WeakMap(), xr = new WeakMap(), Ur = new WeakMap(), Bd = new WeakSet(), Kf = function(t, e, r = !0) {
17988
17987
  let i;
17989
17988
  const a = n(this, nt)[t], o = Object.prototype.toString.call(e), c = Object.prototype.toString.call(a);
17990
17989
  if (o !== c) {
@@ -18025,7 +18024,7 @@ Gc([
18025
18024
  Gc([
18026
18025
  Mt(Ba, "bulkRateLimitConfig")
18027
18026
  ], Ha.prototype, "bulkDelete", 1);
18028
- var ki, Ii, zo, qu, Yo, Fr, Hd, zf;
18027
+ var ki, Ii, zo, qu, Yo, $r, Hd, zf;
18029
18028
  class CD {
18030
18029
  constructor(t, e) {
18031
18030
  m(this, zo);
@@ -18034,7 +18033,7 @@ class CD {
18034
18033
  m(this, ki, void 0);
18035
18034
  m(this, Ii, "");
18036
18035
  m(this, Yo, void 0);
18037
- m(this, Fr, /* @__PURE__ */ new Map());
18036
+ m(this, $r, /* @__PURE__ */ new Map());
18038
18037
  f(this, ki, e), f(this, Ii, t.getValue("meetingId")), f(this, Yo, t), U(this, Hd, zf).call(this);
18039
18038
  }
18040
18039
  create(t) {
@@ -18043,13 +18042,13 @@ class CD {
18043
18042
  );
18044
18043
  return n(this, ki).storeGetKeys(n(this, Ii), t, []), new Promise((i, a) => {
18045
18044
  const o = setTimeout(() => a(Error("Failed")), 3e3);
18046
- n(this, Fr).set(t, { rejectTimeout: o, resolve: i, store: e });
18045
+ n(this, $r).set(t, { rejectTimeout: o, resolve: i, store: e });
18047
18046
  });
18048
18047
  }
18049
18048
  }
18050
18049
  ki = new WeakMap(), Ii = new WeakMap(), zo = new WeakSet(), qu = function() {
18051
18050
  return n(this, Yo).getValue("peerId");
18052
- }, Yo = new WeakMap(), Fr = new WeakMap(), Hd = new WeakSet(), zf = function() {
18051
+ }, Yo = new WeakMap(), $r = new WeakMap(), Hd = new WeakSet(), zf = function() {
18053
18052
  [
18054
18053
  J.storeInsertKeys,
18055
18054
  J.storeGetKeys,
@@ -18073,13 +18072,13 @@ ki = new WeakMap(), Ii = new WeakMap(), zo = new WeakSet(), qu = function() {
18073
18072
  };
18074
18073
  });
18075
18074
  if (t === J.storeGetKeys) {
18076
- const c = n(this, Fr).get(e.storeName), d = this.stores.get(e.storeName) || (c == null ? void 0 : c.store);
18077
- n(this, Fr).get(e.storeName) && (this.stores.set(e.storeName, c.store), c.resolve(d), clearTimeout(c.rejectTimeout), n(this, Fr).delete(e.storeName)), r.forEach((l) => {
18075
+ const c = n(this, $r).get(e.storeName), d = this.stores.get(e.storeName) || (c == null ? void 0 : c.store);
18076
+ n(this, $r).get(e.storeName) && (this.stores.set(e.storeName, c.store), c.resolve(d), clearTimeout(c.rejectTimeout), n(this, $r).delete(e.storeName)), r.forEach((l) => {
18078
18077
  d.set(l.key, l.payload, !1, !1);
18079
18078
  });
18080
18079
  return;
18081
18080
  }
18082
- const i = this.stores.get(e.storeName) || ((o = n(this, Fr).get(e.storeName)) == null ? void 0 : o.store);
18081
+ const i = this.stores.get(e.storeName) || ((o = n(this, $r).get(e.storeName)) == null ? void 0 : o.store);
18083
18082
  i !== void 0 && (t === J.storeInsertKeys && r.forEach(({ key: c, peerId: d, payload: l }) => {
18084
18083
  d !== n(this, zo, qu) && i.set(c, l, !1, !0);
18085
18084
  }), t === J.storeDeleteKeys && r.forEach(({ key: c, peerId: d }) => {
@@ -18089,7 +18088,7 @@ ki = new WeakMap(), Ii = new WeakMap(), zo = new WeakSet(), qu = function() {
18089
18088
  );
18090
18089
  });
18091
18090
  };
18092
- function hi(s) {
18091
+ function ui(s) {
18093
18092
  var t, e, r, i, a, o, c, d, l, p, g, v, S;
18094
18093
  return s ? {
18095
18094
  media: {
@@ -18124,14 +18123,14 @@ var wD = Object.defineProperty, RD = Object.getOwnPropertyDescriptor, qa = (s, t
18124
18123
  return r && i && wD(t, e, i), i;
18125
18124
  };
18126
18125
  const bD = 0.8, kD = 1.2;
18127
- var aa, oa, Ut, Ai, ho, Br, En, Mi, po, qd, Yf, er, Qo, Hr, Di, go, tr, jd, Xo, ju, Gd, Qf, Wd, Xf, Bg;
18126
+ var aa, oa, Ut, Ai, ho, Fr, En, Mi, po, qd, Yf, er, Qo, Br, Di, go, tr, jd, Xo, ju, Gd, Qf, Wd, Xf, Bg;
18128
18127
  let Tr = (Bg = class extends jt {
18129
18128
  constructor(t, e, r, i) {
18130
18129
  const a = t.getValue("logger");
18131
18130
  super(a);
18132
18131
  // eslint-disable-next-line class-methods-use-this
18133
18132
  m(this, Ai);
18134
- m(this, Br);
18133
+ m(this, Fr);
18135
18134
  /**
18136
18135
  * Returns true if the local participant has joined the meeting.
18137
18136
  */
@@ -18222,7 +18221,7 @@ let Tr = (Bg = class extends jt {
18222
18221
  m(this, Ut, void 0);
18223
18222
  m(this, er, void 0);
18224
18223
  m(this, Qo, void 0);
18225
- m(this, Hr, /* @__PURE__ */ new Map());
18224
+ m(this, Br, /* @__PURE__ */ new Map());
18226
18225
  /*
18227
18226
  * Specifies the currently set max spatial layer
18228
18227
  * Assuming a two layer simulcast, 0 being the lower layer
@@ -18287,13 +18286,13 @@ let Tr = (Bg = class extends jt {
18287
18286
  return n(this, Ut).getValue("telemetry");
18288
18287
  }
18289
18288
  setVideoEnabled(t, e = !0) {
18290
- this.videoEnabled = t, e && (this.logger.info("Participant::setVideoEnabled::videoUpdate", D({}, hi(this))), this.emit("videoUpdate", {
18289
+ this.videoEnabled = t, e && (this.logger.info("Participant::setVideoEnabled::videoUpdate", D({}, ui(this))), this.emit("videoUpdate", {
18291
18290
  videoEnabled: this.videoEnabled,
18292
18291
  videoTrack: this.videoTrack
18293
18292
  }));
18294
18293
  }
18295
18294
  setAudioEnabled(t, e = !0) {
18296
- this.audioEnabled = t, e && (this.logger.info("Participant::setAudioEnabled::audioUpdate", D({}, hi(this))), this.emit("audioUpdate", {
18295
+ this.audioEnabled = t, e && (this.logger.info("Participant::setAudioEnabled::audioUpdate", D({}, ui(this))), this.emit("audioUpdate", {
18297
18296
  audioEnabled: this.audioEnabled,
18298
18297
  audioTrack: this.audioTrack
18299
18298
  }));
@@ -18305,7 +18304,7 @@ let Tr = (Bg = class extends jt {
18305
18304
  });
18306
18305
  }
18307
18306
  setupEvents() {
18308
- this.on("videoUpdate", U(this, Xo, ju)), n(this, Br, En) && (this.on("audioUpdate", U(this, Gd, Qf)), this.on("screenShareUpdate", U(this, Wd, Xf)));
18307
+ this.on("videoUpdate", U(this, Xo, ju)), n(this, Fr, En) && (this.on("audioUpdate", U(this, Gd, Qf)), this.on("screenShareUpdate", U(this, Wd, Xf)));
18309
18308
  }
18310
18309
  /**
18311
18310
  * Returns `participant.id` if user has permission
@@ -18423,7 +18422,7 @@ let Tr = (Bg = class extends jt {
18423
18422
  if (!t)
18424
18423
  return;
18425
18424
  let e;
18426
- (i = (r = n(this, Hr).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), "ResizeObserver" in window && (e = new ResizeObserver(() => n(this, jd).call(this, t)), e.observe(t)), n(this, Hr).set(t, { observer: e }), this.updateVideo(t), (o = n(this, Di, go)) == null || o.addSource(
18425
+ (i = (r = n(this, Br).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), "ResizeObserver" in window && (e = new ResizeObserver(() => n(this, jd).call(this, t)), e.observe(t)), n(this, Br).set(t, { observer: e }), this.updateVideo(t), (o = n(this, Di, go)) == null || o.addSource(
18427
18426
  this.id,
18428
18427
  t,
18429
18428
  this.videoEnabled,
@@ -18439,7 +18438,7 @@ let Tr = (Bg = class extends jt {
18439
18438
  (e = n(this, Di, go)) == null || e.removeSource(this.id);
18440
18439
  return;
18441
18440
  }
18442
- t.srcObject = void 0, (i = (r = n(this, Hr).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), n(this, Hr).delete(t), (a = n(this, Di, go)) == null || a.removeSource(this.id);
18441
+ t.srcObject = void 0, (i = (r = n(this, Br).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), n(this, Br).delete(t), (a = n(this, Di, go)) == null || a.removeSource(this.id);
18443
18442
  }
18444
18443
  /**
18445
18444
  * Internal method, do not use
@@ -18460,22 +18459,22 @@ let Tr = (Bg = class extends jt {
18460
18459
  }
18461
18460
  }, aa = new WeakMap(), oa = new WeakMap(), Ut = new WeakMap(), Ai = new WeakSet(), ho = function() {
18462
18461
  return n(this, Ut).getValue("roomNodeClient");
18463
- }, Br = new WeakSet(), En = function() {
18462
+ }, Fr = new WeakSet(), En = function() {
18464
18463
  return n(this, Ut).getValue("audioPlayback");
18465
18464
  }, Mi = new WeakSet(), po = function() {
18466
18465
  return n(this, Ut).getValue("connectionHandler").mediaJoined;
18467
18466
  }, qd = new WeakSet(), Yf = function() {
18468
18467
  return n(this, Ut).getValue("connectionHandler").socketJoined;
18469
- }, er = new WeakMap(), Qo = new WeakMap(), Hr = new WeakMap(), Di = new WeakSet(), go = function() {
18468
+ }, er = new WeakMap(), Qo = new WeakMap(), Br = new WeakMap(), Di = new WeakSet(), go = function() {
18470
18469
  return n(this, Ut).getValue("pip");
18471
18470
  }, tr = new WeakMap(), jd = new WeakMap(), Xo = new WeakSet(), ju = function() {
18472
- Array.from(n(this, Hr).keys()).forEach(this.updateVideo);
18471
+ Array.from(n(this, Br).keys()).forEach(this.updateVideo);
18473
18472
  }, Gd = new WeakSet(), Qf = function() {
18474
18473
  var t, e;
18475
- this.audioEnabled && this.audioTrack ? (t = n(this, Br, En)) == null || t.addParticipantTrack(this.id, this.audioTrack) : (e = n(this, Br, En)) == null || e.removeParticipantTrack(this.id);
18474
+ this.audioEnabled && this.audioTrack ? (t = n(this, Fr, En)) == null || t.addParticipantTrack(this.id, this.audioTrack) : (e = n(this, Fr, En)) == null || e.removeParticipantTrack(this.id);
18476
18475
  }, Wd = new WeakSet(), Xf = function() {
18477
18476
  var t, e;
18478
- this.screenShareEnabled && this.screenShareTracks.audio ? (t = n(this, Br, En)) == null || t.addParticipantTrack(`screenshare-${this.id}`, this.screenShareTracks.audio) : (e = n(this, Br, En)) == null || e.removeParticipantTrack(`screenshare-${this.id}`);
18477
+ this.screenShareEnabled && this.screenShareTracks.audio ? (t = n(this, Fr, En)) == null || t.addParticipantTrack(`screenshare-${this.id}`, this.screenShareTracks.audio) : (e = n(this, Fr, En)) == null || e.removeParticipantTrack(`screenshare-${this.id}`);
18479
18478
  }, Bg);
18480
18479
  qa([
18481
18480
  E.trace("Participant.disableAudio")
@@ -18518,33 +18517,33 @@ class uo extends Ff {
18518
18517
  return super.delete(t, e, r);
18519
18518
  }
18520
18519
  }
18521
- var qr;
18520
+ var Hr;
18522
18521
  class ID extends $a {
18523
18522
  constructor(e) {
18524
18523
  super(e);
18525
- m(this, qr, void 0);
18526
- f(this, qr, /* @__PURE__ */ new Map());
18524
+ m(this, Hr, void 0);
18525
+ f(this, Hr, /* @__PURE__ */ new Map());
18527
18526
  }
18528
18527
  /**
18529
18528
  * @private
18530
18529
  */
18531
18530
  __set(e, r) {
18532
- return n(this, qr).set(e, r);
18531
+ return n(this, Hr).set(e, r);
18533
18532
  }
18534
18533
  /**
18535
18534
  * @private
18536
18535
  */
18537
18536
  __clear() {
18538
- return n(this, qr).clear();
18537
+ return n(this, Hr).clear();
18539
18538
  }
18540
18539
  get(e) {
18541
- return n(this, qr).get(e);
18540
+ return n(this, Hr).get(e);
18542
18541
  }
18543
18542
  toArray() {
18544
- return Array.from(n(this, qr).values());
18543
+ return Array.from(n(this, Hr).values());
18545
18544
  }
18546
18545
  }
18547
- qr = new WeakMap();
18546
+ Hr = new WeakMap();
18548
18547
  class AD {
18549
18548
  constructor() {
18550
18549
  h(this, "_orderedArray");
@@ -20141,13 +20140,13 @@ const bn = class extends jt {
20141
20140
  if (r && (r.private && Rr(n(this, q).chat.private, r.private), r.public && Rr(n(this, q).chat.public, r.public), this.emit("chatUpdate")), i && Rr(n(this, q).connectedMeetings, i), c) {
20142
20141
  const S = (_) => {
20143
20142
  switch (_) {
20144
- case Qr.NONE:
20143
+ case Yr.NONE:
20145
20144
  return j.Allowed;
20146
- case Qr.ALLOWED:
20145
+ case Yr.ALLOWED:
20147
20146
  return j.Allowed;
20148
- case Qr.NOT_ALLOWED:
20147
+ case Yr.NOT_ALLOWED:
20149
20148
  return j.NotAllowed;
20150
- case Qr.CAN_REQUEST:
20149
+ case Yr.CAN_REQUEST:
20151
20150
  return j.CanRequest;
20152
20151
  default:
20153
20152
  return;
@@ -20917,7 +20916,7 @@ var xD = Object.defineProperty, UD = Object.getOwnPropertyDescriptor, _t = (s, t
20917
20916
  for (var i = r > 1 ? void 0 : r ? UD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
20918
20917
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
20919
20918
  return r && i && xD(t, e, i), i;
20920
- }, ha, vt, pa, Fe, sr, oi, qe, Qe, ga, md, Ve, Be, ma, fa, ec, Ju, jg;
20919
+ }, ha, vt, pa, Fe, sr, ai, qe, Qe, ga, md, Ve, Be, ma, fa, ec, Ju, jg;
20921
20920
  let Ye = (jg = class extends tv {
20922
20921
  constructor(t, e, r, i, a) {
20923
20922
  var c;
@@ -21013,7 +21012,7 @@ let Ye = (jg = class extends tv {
21013
21012
  t && t.onError((e) => {
21014
21013
  this.emit("autoplayError", e);
21015
21014
  }), this.localMediaHandler.on("AUDIO_TRACK_CHANGE", () => u(this, null, function* () {
21016
- if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", D({}, hi(this))), n(this, Ve, Be) && this.audioEnabled)
21015
+ if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", D({}, ui(this))), n(this, Ve, Be) && this.audioEnabled)
21017
21016
  try {
21018
21017
  yield n(this, qe, Qe).shareMic(this.audioTrack);
21019
21018
  } catch (e) {
@@ -21026,7 +21025,7 @@ let Ye = (jg = class extends tv {
21026
21025
  audioTrack: this.audioTrack
21027
21026
  });
21028
21027
  })), this.localMediaHandler.on("VIDEO_TRACK_CHANGE", () => u(this, null, function* () {
21029
- if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", D({}, hi(this))), n(this, Ve, Be) && this.rawVideoTrack === void 0)
21028
+ if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", D({}, ui(this))), n(this, Ve, Be) && this.rawVideoTrack === void 0)
21030
21029
  this.logger.info("Self::VIDEO_TRACK_CHANGE::Forcing_disable_video"), this.disableVideo();
21031
21030
  else if (this.videoEnabled && n(this, Ve, Be))
21032
21031
  try {
@@ -21069,12 +21068,12 @@ let Ye = (jg = class extends tv {
21069
21068
  }
21070
21069
  ), this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare());
21071
21070
  }
21072
- this.logger.info("Self::setupEvents::SCREENSHARE_TRACK_CHANGE", D({}, hi(this))), this.emit("screenShareUpdate", {
21071
+ this.logger.info("Self::setupEvents::SCREENSHARE_TRACK_CHANGE", D({}, ui(this))), this.emit("screenShareUpdate", {
21073
21072
  screenShareEnabled: this.screenShareEnabled,
21074
21073
  screenShareTracks: this.screenShareTracks
21075
21074
  });
21076
21075
  })), this.localMediaHandler.on("SCREENSHARE_ENDED", () => u(this, null, function* () {
21077
- this.logger.log("Disabling screenshare due to SCREENSHARE_ENDED"), yield this.disableScreenShare(), this.logger.info("Self::setupEvents::SCREENSHARE_ENDED", D({}, hi(this)));
21076
+ this.logger.log("Disabling screenshare due to SCREENSHARE_ENDED"), yield this.disableScreenShare(), this.logger.info("Self::setupEvents::SCREENSHARE_ENDED", D({}, ui(this)));
21078
21077
  })), this.localMediaHandler.on("AUDIO_TRACK_SILENT", () => {
21079
21078
  var e;
21080
21079
  (e = n(this, Fe)) == null || e.getValue("callstats").mediaTrackMuted("AUDIO");
@@ -21174,7 +21173,7 @@ let Ye = (jg = class extends tv {
21174
21173
  this.emit("videoUpdate", {
21175
21174
  videoEnabled: this.videoEnabled,
21176
21175
  videoTrack: this.videoTrack
21177
- }), this.logger.info("Self.enableVideo", D({}, hi(this)));
21176
+ }), this.logger.info("Self.enableVideo", D({}, ui(this)));
21178
21177
  }
21179
21178
  });
21180
21179
  }
@@ -21254,7 +21253,7 @@ let Ye = (jg = class extends tv {
21254
21253
  var i;
21255
21254
  f(this, pa, t);
21256
21255
  const r = t ? "pinned" : "unpinned";
21257
- (i = n(this, sr, oi)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
21256
+ (i = n(this, sr, ai)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
21258
21257
  }
21259
21258
  /**
21260
21259
  * Returns true if the current user is pinned.
@@ -21347,7 +21346,7 @@ let Ye = (jg = class extends tv {
21347
21346
  }
21348
21347
  registerVideoElement(t, e = !1) {
21349
21348
  var r, i;
21350
- t && (e ? n(this, ma).add(t) : n(this, fa).add(t), this.updateVideo(t), e || (i = n(this, sr, oi)) == null || i.addSource(
21349
+ t && (e ? n(this, ma).add(t) : n(this, fa).add(t), this.updateVideo(t), e || (i = n(this, sr, ai)) == null || i.addSource(
21351
21350
  this.id,
21352
21351
  t,
21353
21352
  this.videoEnabled,
@@ -21359,10 +21358,10 @@ let Ye = (jg = class extends tv {
21359
21358
  }
21360
21359
  deregisterVideoElement(t, e = !1) {
21361
21360
  if (!t) {
21362
- n(this, sr, oi).removeSource(this.id);
21361
+ n(this, sr, ai).removeSource(this.id);
21363
21362
  return;
21364
21363
  }
21365
- t.srcObject = void 0, e ? n(this, ma).delete(t) : (n(this, fa).delete(t), n(this, sr, oi).removeSource(this.id));
21364
+ t.srcObject = void 0, e ? n(this, ma).delete(t) : (n(this, fa).delete(t), n(this, sr, ai).removeSource(this.id));
21366
21365
  }
21367
21366
  /**
21368
21367
  * Internal method, do not use
@@ -21376,12 +21375,12 @@ let Ye = (jg = class extends tv {
21376
21375
  if ((o == null ? void 0 : o.id) === this.videoTrack.id)
21377
21376
  return;
21378
21377
  const c = new MediaStream();
21379
- c.addTrack(this.videoTrack), t.srcObject = c, e || (i = n(this, sr, oi)) == null || i.enableSource(this.id);
21378
+ c.addTrack(this.videoTrack), t.srcObject = c, e || (i = n(this, sr, ai)) == null || i.enableSource(this.id);
21380
21379
  } else
21381
- t.srcObject = void 0, e || (a = n(this, sr, oi)) == null || a.disableSource(this.id);
21380
+ t.srcObject = void 0, e || (a = n(this, sr, ai)) == null || a.disableSource(this.id);
21382
21381
  t.style.display = this.videoEnabled ? "block" : "none";
21383
21382
  }
21384
- }, ha = new WeakMap(), vt = new WeakMap(), pa = new WeakMap(), Fe = new WeakMap(), sr = new WeakSet(), oi = function() {
21383
+ }, ha = new WeakMap(), vt = new WeakMap(), pa = new WeakMap(), Fe = new WeakMap(), sr = new WeakSet(), ai = function() {
21385
21384
  return n(this, Fe).getValue("pip");
21386
21385
  }, qe = new WeakSet(), Qe = function() {
21387
21386
  return n(this, Fe).getValue("roomNodeClient");
@@ -21594,7 +21593,7 @@ class It extends b {
21594
21593
  super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, It) : this.stack = new Error(t).stack;
21595
21594
  }
21596
21595
  }
21597
- class pi extends b {
21596
+ class hi extends b {
21598
21597
  constructor(t) {
21599
21598
  super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, It) : this.stack = new Error(t).stack;
21600
21599
  }
@@ -22542,7 +22541,7 @@ rc = new WeakMap(), Vi = new WeakMap(), Vs = new WeakMap(), Kd = new WeakMap(),
22542
22541
  }));
22543
22542
  }
22544
22543
  };
22545
- var vs, va, Sa, Li, ss, Xe, jr, Ta, Qd, Ft, us;
22544
+ var vs, va, Sa, Li, ss, Xe, qr, Ta, Qd, Ft, us;
22546
22545
  class WD extends Wl {
22547
22546
  /**
22548
22547
  * @emits transportclose
@@ -22594,10 +22593,10 @@ class WD extends Wl {
22594
22593
  m(this, Li, void 0);
22595
22594
  m(this, ss, !1);
22596
22595
  m(this, Xe, void 0);
22597
- m(this, jr, void 0);
22596
+ m(this, qr, void 0);
22598
22597
  m(this, Ta, void 0);
22599
22598
  m(this, Qd, void 0);
22600
- this.id = r.id, this.localId = r.localId, f(this, Xe, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this, jr, r.disableTrackOnPause ? !((a = r.track) != null && a.enabled) : !1), f(this, Ta, void 0), f(this, va, r.stopTracks), f(this, Sa, r.disableTrackOnPause), f(this, Li, r.zeroRtpOnPause), this.appData = r.appData || {}, this._onTrackEnded = this._onTrackEnded.bind(this), f(this, vs, r.handler), this.rtpSender = r.rtpSender, this._handleTrack(), f(this, Qd, e);
22599
+ this.id = r.id, this.localId = r.localId, f(this, Xe, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this, qr, r.disableTrackOnPause ? !((a = r.track) != null && a.enabled) : !1), f(this, Ta, void 0), f(this, va, r.stopTracks), f(this, Sa, r.disableTrackOnPause), f(this, Li, r.zeroRtpOnPause), this.appData = r.appData || {}, this._onTrackEnded = this._onTrackEnded.bind(this), f(this, vs, r.handler), this.rtpSender = r.rtpSender, this._handleTrack(), f(this, Qd, e);
22601
22600
  }
22602
22601
  /**
22603
22602
  * Whether the Producer is closed.
@@ -22615,7 +22614,7 @@ class WD extends Wl {
22615
22614
  * Whether the Producer is paused.
22616
22615
  */
22617
22616
  get paused() {
22618
- return n(this, jr);
22617
+ return n(this, qr);
22619
22618
  }
22620
22619
  /**
22621
22620
  * Max spatial layer.
@@ -22654,7 +22653,7 @@ class WD extends Wl {
22654
22653
  * Pauses sending media.
22655
22654
  */
22656
22655
  pause() {
22657
- this.logger.debug("Producer::pause()", n(this, Ft, us)), n(this, ss) && this.logger.error("Producer::pause() | Producer closed", n(this, Ft, us)), f(this, jr, !0), n(this, Xe) && n(this, Sa) && (n(this, Xe).enabled = !1), n(this, Li) && n(this, vs).replaceTrack(this.localId, null), this.emit("pause");
22656
+ this.logger.debug("Producer::pause()", n(this, Ft, us)), n(this, ss) && this.logger.error("Producer::pause() | Producer closed", n(this, Ft, us)), f(this, qr, !0), n(this, Xe) && n(this, Sa) && (n(this, Xe).enabled = !1), n(this, Li) && n(this, vs).replaceTrack(this.localId, null), this.emit("pause");
22658
22657
  }
22659
22658
  /**
22660
22659
  * Resumes sending media.
@@ -22664,7 +22663,7 @@ class WD extends Wl {
22664
22663
  this.logger.error("Producer::resume() | Producer closed", n(this, Ft, us));
22665
22664
  return;
22666
22665
  }
22667
- f(this, jr, !1), n(this, Xe) && n(this, Sa) && (n(this, Xe).enabled = !0), n(this, Li) && n(this, vs).replaceTrack(this.localId, n(this, Xe)), this.emit("resume");
22666
+ f(this, qr, !1), n(this, Xe) && n(this, Sa) && (n(this, Xe).enabled = !0), n(this, Li) && n(this, vs).replaceTrack(this.localId, n(this, Xe)), this.emit("resume");
22668
22667
  }
22669
22668
  /**
22670
22669
  * Replaces the current track with a new one or null.
@@ -22689,7 +22688,7 @@ class WD extends Wl {
22689
22688
  this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, n(this, Ft, us));
22690
22689
  return;
22691
22690
  }
22692
- (!n(this, Li) || !n(this, jr)) && (yield n(this, vs).replaceTrack(this.localId, e)), this._destroyTrack(), f(this, Xe, e), this._handleTrack();
22691
+ (!n(this, Li) || !n(this, qr)) && (yield n(this, vs).replaceTrack(this.localId, e)), this._destroyTrack(), f(this, Xe, e), this._handleTrack();
22693
22692
  });
22694
22693
  }
22695
22694
  /**
@@ -22736,7 +22735,7 @@ class WD extends Wl {
22736
22735
  }
22737
22736
  }
22738
22737
  }
22739
- vs = new WeakMap(), va = new WeakMap(), Sa = new WeakMap(), Li = new WeakMap(), ss = new WeakMap(), Xe = new WeakMap(), jr = new WeakMap(), Ta = new WeakMap(), Qd = new WeakMap(), Ft = new WeakSet(), us = function() {
22738
+ vs = new WeakMap(), va = new WeakMap(), Sa = new WeakMap(), Li = new WeakMap(), ss = new WeakMap(), Xe = new WeakMap(), qr = new WeakMap(), Ta = new WeakMap(), Qd = new WeakMap(), Ft = new WeakSet(), us = function() {
22740
22739
  return {
22741
22740
  producer: {
22742
22741
  id: this.id,
@@ -22763,14 +22762,14 @@ function KD(s) {
22763
22762
  var t, e;
22764
22763
  return JD(s) && (e = (t = s.payload._bolt) == null ? void 0 : t.id) != null ? e : "";
22765
22764
  }
22766
- var Gr, Xd, xi;
22765
+ var jr, Xd, xi;
22767
22766
  const kn = class extends lt.EventEmitter {
22768
22767
  constructor(e, r, i, a) {
22769
22768
  super();
22770
22769
  h(this, "channel");
22771
22770
  h(this, "queue");
22772
22771
  h(this, "serverProtocolVersion");
22773
- m(this, Gr, /* @__PURE__ */ new Map());
22772
+ m(this, jr, /* @__PURE__ */ new Map());
22774
22773
  m(this, Xd, void 0);
22775
22774
  m(this, xi, void 0);
22776
22775
  h(this, "respond", (e, r, i = !1) => {
@@ -22823,11 +22822,11 @@ const kn = class extends lt.EventEmitter {
22823
22822
  });
22824
22823
  h(this, "processMessage", (e) => {
22825
22824
  var i;
22826
- n(this, Gr).has(e.id) || n(this, Gr).set(e.id, []);
22827
- const r = n(this, Gr).get(e.id);
22825
+ n(this, jr).has(e.id) || n(this, jr).set(e.id, []);
22826
+ const r = n(this, jr).get(e.id);
22828
22827
  if (r[e.chunkIndex] = e, (r == null ? void 0 : r.length) === e.count && !r.some((a) => a === void 0)) {
22829
- const a = n(this, Gr).get(e.id), o = a == null ? void 0 : a.reduce((d, l) => d + l.chunk, "");
22830
- n(this, Gr).delete(e.id);
22828
+ const a = n(this, jr).get(e.id), o = a == null ? void 0 : a.reduce((d, l) => d + l.chunk, "");
22829
+ n(this, jr).delete(e.id);
22831
22830
  const c = JSON.parse(o);
22832
22831
  if (!c.payload || !nv(c.payload))
22833
22832
  throw new Error("corrupted incoming message over dc", {
@@ -22850,8 +22849,8 @@ const kn = class extends lt.EventEmitter {
22850
22849
  this.label = i, this.transportId = a, f(this, Xd, e), f(this, xi, e.getValue("logger")), this.channel = r, this.queue = /* @__PURE__ */ new Map();
22851
22850
  }
22852
22851
  };
22853
- let ci = kn;
22854
- Gr = new WeakMap(), Xd = new WeakMap(), xi = new WeakMap(), h(ci, "createRequest", (e) => {
22852
+ let oi = kn;
22853
+ jr = new WeakMap(), Xd = new WeakMap(), xi = new WeakMap(), h(oi, "createRequest", (e) => {
22855
22854
  var r;
22856
22855
  if ((r = e.payload) != null && r._bolt)
22857
22856
  throw new Error("rpc fields are internal values");
@@ -22865,7 +22864,7 @@ Gr = new WeakMap(), Xd = new WeakMap(), xi = new WeakMap(), h(ci, "createRequest
22865
22864
  }
22866
22865
  })
22867
22866
  };
22868
- }), h(ci, "createResponse", (e, r) => {
22867
+ }), h(oi, "createResponse", (e, r) => {
22869
22868
  var i;
22870
22869
  if ((i = r.payload) != null && i._bolt)
22871
22870
  throw new Error("rpc fields are internal values");
@@ -22879,7 +22878,7 @@ Gr = new WeakMap(), Xd = new WeakMap(), xi = new WeakMap(), h(ci, "createRequest
22879
22878
  }
22880
22879
  })
22881
22880
  };
22882
- }), h(ci, "createNotification", (e) => {
22881
+ }), h(oi, "createNotification", (e) => {
22883
22882
  var r;
22884
22883
  if ((r = e.payload) != null && r._bolt)
22885
22884
  throw new Error("rpc fields are internal values");
@@ -22893,7 +22892,7 @@ Gr = new WeakMap(), Xd = new WeakMap(), xi = new WeakMap(), h(ci, "createRequest
22893
22892
  }
22894
22893
  })
22895
22894
  };
22896
- }), h(ci, "createErrorResponse", (e, r) => ({
22895
+ }), h(oi, "createErrorResponse", (e, r) => ({
22897
22896
  type: "error",
22898
22897
  payload: {
22899
22898
  error: r.message,
@@ -22982,7 +22981,7 @@ const In = class extends Wl {
22982
22981
  }
22983
22982
  ), this.handler.on("dc_open", (w) => {
22984
22983
  let L = this.datachannels.get(w.label);
22985
- L || (L || (L = new ci(n(this, Ui), w, w.label, this.serverId), this.datachannels.set(w.label, L)), this.eventsDCFailureTimer = setTimeout(() => {
22984
+ L || (L || (L = new oi(n(this, Ui), w, w.label, this.serverId), this.datachannels.set(w.label, L)), this.eventsDCFailureTimer = setTimeout(() => {
22986
22985
  w.label === "events" && (this.eventsDCReadyPromiseResolver(!1), this.safeEmit("dc_error", w.label));
22987
22986
  }, 5e3));
22988
22987
  }), this.handler.on("datachannel", (w, L) => {
@@ -23097,7 +23096,7 @@ const In = class extends Wl {
23097
23096
  } else
23098
23097
  throw new TypeError("missing track");
23099
23098
  if (!(yield this.transportConnectionPromise))
23100
- throw new pi("transport not connected");
23099
+ throw new hi("transport not connected");
23101
23100
  return !0;
23102
23101
  });
23103
23102
  }
@@ -23171,7 +23170,7 @@ const In = class extends Wl {
23171
23170
  if (this.direction !== "recv")
23172
23171
  throw new Do("not a receiving transport");
23173
23172
  if (!(yield this.transportConnectionPromise))
23174
- throw new pi("transport not connected");
23173
+ throw new hi("transport not connected");
23175
23174
  return !0;
23176
23175
  });
23177
23176
  }
@@ -23662,10 +23661,10 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
23662
23661
  });
23663
23662
  try {
23664
23663
  if (e.closed)
23665
- throw new pi("Cannot reconnect closed transport");
23664
+ throw new hi("Cannot reconnect closed transport");
23666
23665
  yield U(this, el, ov).call(this, e);
23667
23666
  } catch (l) {
23668
- if (l instanceof pi) {
23667
+ if (l instanceof hi) {
23669
23668
  d(l);
23670
23669
  return;
23671
23670
  }
@@ -23692,9 +23691,9 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
23692
23691
  if (this.logger.info(`Connecting ${i} transport`, {
23693
23692
  transport: { id: r, type: i }
23694
23693
  }), !n(this, Fi).isConnected)
23695
- throw new pi("Socket is not connected");
23694
+ throw new hi("Socket is not connected");
23696
23695
  if (e.connectionState === "closed")
23697
- throw new pi("Transport is closed");
23696
+ throw new hi("Transport is closed");
23698
23697
  try {
23699
23698
  yield e.connect(
23700
23699
  (a) => U(this, il, uv).call(this, i, a)
@@ -23702,7 +23701,7 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
23702
23701
  transport: { id: r, serverId: e.serverId, type: i }
23703
23702
  });
23704
23703
  } catch (a) {
23705
- throw n(this, Pa).transportFailureCount[i] += 1, a.message === "ice connection failed" ? new pi(a.message) : a;
23704
+ throw n(this, Pa).transportFailureCount[i] += 1, a.message === "ice connection failed" ? new hi(a.message) : a;
23706
23705
  }
23707
23706
  });
23708
23707
  }, tl = new WeakSet(), cv = function(e) {
@@ -24030,7 +24029,7 @@ class Gh {
24030
24029
  });
24031
24030
  }
24032
24031
  }
24033
- var Hi, Wr, Ca, pc, Us, nl, ir, wa, gc, th, al, hv, ol, pv, cl, gv, dl, mv;
24032
+ var Hi, Gr, Ca, pc, Us, nl, ir, wa, gc, th, al, hv, ol, pv, cl, gv, dl, mv;
24034
24033
  class eO extends XD {
24035
24034
  constructor(e, r) {
24036
24035
  super(e, r);
@@ -24040,7 +24039,7 @@ class eO extends XD {
24040
24039
  m(this, cl);
24041
24040
  m(this, dl);
24042
24041
  m(this, Hi, void 0);
24043
- m(this, Wr, void 0);
24042
+ m(this, Gr, void 0);
24044
24043
  m(this, Ca, void 0);
24045
24044
  m(this, pc, void 0);
24046
24045
  m(this, Us, void 0);
@@ -24070,7 +24069,7 @@ class eO extends XD {
24070
24069
  return n(this, Hi);
24071
24070
  }
24072
24071
  get consumers() {
24073
- return n(this, Wr);
24072
+ return n(this, Gr);
24074
24073
  }
24075
24074
  get producerIdToConsumerIdMap() {
24076
24075
  return n(this, Ca);
@@ -24083,7 +24082,7 @@ class eO extends XD {
24083
24082
  return this.context.getValue("logger");
24084
24083
  }
24085
24084
  reset() {
24086
- f(this, Hi, /* @__PURE__ */ new Map()), f(this, Wr, /* @__PURE__ */ new Map()), f(this, Ca, /* @__PURE__ */ new Map());
24085
+ f(this, Hi, /* @__PURE__ */ new Map()), f(this, Gr, /* @__PURE__ */ new Map()), f(this, Ca, /* @__PURE__ */ new Map());
24087
24086
  }
24088
24087
  createProducer(e, r) {
24089
24088
  return u(this, null, function* () {
@@ -24143,7 +24142,7 @@ class eO extends XD {
24143
24142
  });
24144
24143
  }
24145
24144
  closeAllConsumers() {
24146
- return this.closeConsumers(Array.from(n(this, Wr).keys()));
24145
+ return this.closeConsumers(Array.from(n(this, Gr).keys()));
24147
24146
  }
24148
24147
  switchConsumersToLayer(e, r) {
24149
24148
  return u(this, null, function* () {
@@ -24151,7 +24150,7 @@ class eO extends XD {
24151
24150
  });
24152
24151
  }
24153
24152
  }
24154
- Hi = new WeakMap(), Wr = new WeakMap(), Ca = new WeakMap(), pc = new WeakMap(), Us = new WeakMap(), nl = new WeakMap(), ir = new WeakMap(), wa = new WeakMap(), gc = new WeakSet(), th = function() {
24153
+ Hi = new WeakMap(), Gr = new WeakMap(), Ca = new WeakMap(), pc = new WeakMap(), Us = new WeakMap(), nl = new WeakMap(), ir = new WeakMap(), wa = new WeakMap(), gc = new WeakSet(), th = function() {
24155
24154
  return u(this, null, function* () {
24156
24155
  if (!this.recvTransport || this.recvTransport.closed)
24157
24156
  throw new Error("Recv transport is closed");
@@ -24238,8 +24237,8 @@ Hi = new WeakMap(), Wr = new WeakMap(), Ca = new WeakMap(), pc = new WeakMap(),
24238
24237
  kind: e.kind,
24239
24238
  appData: e.appData
24240
24239
  }
24241
- }), n(this, Wr).delete(e.id), this.context.getValue("peerSessionStore").emit(k.CONSUMER_CLOSED, { id: e.id });
24242
- })), n(this, Wr).set(e.id, e), this.producerIdToConsumerIdMap.set(e.producerId, e.id), this.context.getValue("peerSessionStore").emit(k.NEW_CONSUMER, {
24240
+ }), n(this, Gr).delete(e.id), this.context.getValue("peerSessionStore").emit(k.CONSUMER_CLOSED, { id: e.id });
24241
+ })), n(this, Gr).set(e.id, e), this.producerIdToConsumerIdMap.set(e.producerId, e.id), this.context.getValue("peerSessionStore").emit(k.NEW_CONSUMER, {
24243
24242
  id: e.id,
24244
24243
  appData: e.appData,
24245
24244
  peerId: e.peerId
@@ -24419,7 +24418,7 @@ class tO {
24419
24418
  }
24420
24419
  }
24421
24420
  const sO = 60, rO = 400;
24422
- var ar, or, ys, _c, Gi, Aa, cr, Jr, Ma, dr, lr, $s, ml, yv, Cc, sh, fl, Ev, vl, Pv;
24421
+ var ar, or, ys, _c, Gi, Aa, cr, Wr, Ma, dr, lr, $s, ml, yv, Cc, sh, fl, Ev, vl, Pv;
24423
24422
  const Ro = class {
24424
24423
  constructor(t, e) {
24425
24424
  m(this, ml);
@@ -24431,7 +24430,7 @@ const Ro = class {
24431
24430
  m(this, Gi, void 0);
24432
24431
  m(this, Aa, void 0);
24433
24432
  m(this, cr, void 0);
24434
- m(this, Jr, void 0);
24433
+ m(this, Wr, void 0);
24435
24434
  m(this, Ma, void 0);
24436
24435
  m(this, dr, void 0);
24437
24436
  m(this, lr, void 0);
@@ -24475,14 +24474,14 @@ const Ro = class {
24475
24474
  }
24476
24475
  };
24477
24476
  let vo = Ro;
24478
- ar = new WeakMap(), or = new WeakMap(), ys = new WeakMap(), _c = new WeakMap(), Gi = new WeakMap(), Aa = new WeakMap(), cr = new WeakMap(), Jr = new WeakMap(), Ma = new WeakMap(), dr = new WeakMap(), lr = new WeakMap(), $s = new WeakMap(), ml = new WeakSet(), yv = function() {
24477
+ ar = new WeakMap(), or = new WeakMap(), ys = new WeakMap(), _c = new WeakMap(), Gi = new WeakMap(), Aa = new WeakMap(), cr = new WeakMap(), Wr = new WeakMap(), Ma = new WeakMap(), dr = new WeakMap(), lr = new WeakMap(), $s = new WeakMap(), ml = new WeakSet(), yv = function() {
24479
24478
  var o;
24480
24479
  const { samples: t } = n(this, lr), { energy: e, isVoice: r } = n(this, Aa).processAudioChunk(t), i = U(o = Ro, vl, Pv).call(o, e);
24481
24480
  return n(this, dr).getValue("flagsmith").hasFeature(ee.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug(
24482
24481
  `AudioActivityReporter: producer: ${n(this, ys)}, energy: ${n(this, Gi)},
24483
24482
  slogScale: ${i}, isVoice: ${r}, minEnergy: ${n(this, cr)},
24484
- maxEnergy: ${n(this, Jr)}`
24485
- ), i === -1 / 0 || e < 1e-6 ? { energy: 0, isVoice: !1 } : ((!n(this, cr) || i < n(this, cr)) && f(this, cr, i), (!n(this, Jr) || i > n(this, Jr)) && f(this, Jr, i), { energy: (i - n(this, cr)) / (n(this, Jr) - n(this, cr)) * 10 || 0, isVoice: r });
24483
+ maxEnergy: ${n(this, Wr)}`
24484
+ ), i === -1 / 0 || e < 1e-6 ? { energy: 0, isVoice: !1 } : ((!n(this, cr) || i < n(this, cr)) && f(this, cr, i), (!n(this, Wr) || i > n(this, Wr)) && f(this, Wr, i), { energy: (i - n(this, cr)) / (n(this, Wr) - n(this, cr)) * 10 || 0, isVoice: r });
24486
24485
  }, Cc = new WeakSet(), sh = function(t) {
24487
24486
  return t < 5;
24488
24487
  }, fl = new WeakSet(), Ev = function(t = n(this, Gi)) {
@@ -24562,10 +24561,10 @@ var aO = Object.defineProperty, oO = Object.getOwnPropertyDescriptor, de = (s, t
24562
24561
  return r && i && aO(t, e, i), i;
24563
24562
  };
24564
24563
  const Ot = ["video/VP9", "video/VP8"];
24565
- var wc, Rc, ct, W, Da, St, Wi, Ji, Ki, bc, is, ur, kc, zi, Yi, Tt, bt, Kr, Pn, Sl, Cv, Tl, wv, yl, Rv, Ic, rh, El, fu, bv, Pl, kv, _l, Iv, Cl, Av, Ze, pt, Qi, So, wl, Mv, Rl, Dv, bl, Ov;
24564
+ var wc, Rc, ct, W, Da, St, Wi, Ji, Ki, bc, is, ur, kc, zi, Yi, Tt, bt, Jr, Pn, Sl, Cv, Tl, wv, yl, Rv, Ic, rh, El, fu, bv, Pl, kv, _l, Iv, Cl, Av, Ze, pt, Qi, So, wl, Mv, Rl, Dv, bl, Ov;
24566
24565
  const _v = (fu = class {
24567
24566
  constructor(s, t) {
24568
- m(this, Kr);
24567
+ m(this, Jr);
24569
24568
  /**
24570
24569
  * Wait for the transports to be established and notify join room completion
24571
24570
  */
@@ -24628,7 +24627,7 @@ const _v = (fu = class {
24628
24627
  n(this, W).socketHandler.audioActivity.bind(n(this, W).socketHandler)
24629
24628
  )), this.e2ee = (i = (r = s.getValue("modules").e2ee) == null ? void 0 : r.enabled) != null ? i : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), f(this, bc, Ih(
24630
24629
  () => u(this, null, function* () {
24631
- if (!n(this, Kr, Pn).mediaJoinAttempted)
24630
+ if (!n(this, Jr, Pn).mediaJoinAttempted)
24632
24631
  return;
24633
24632
  const { roomJoined: a } = yield this.joinRoom(
24634
24633
  n(this, Rc),
@@ -24660,17 +24659,17 @@ const _v = (fu = class {
24660
24659
  return this.context.getValue("logger");
24661
24660
  }
24662
24661
  get mediaJoined() {
24663
- return n(this, Kr, Pn).mediaJoined;
24662
+ return n(this, Jr, Pn).mediaJoined;
24664
24663
  }
24665
24664
  set mediaJoined(s) {
24666
- n(this, Kr, Pn).mediaJoined = s;
24665
+ n(this, Jr, Pn).mediaJoined = s;
24667
24666
  }
24668
24667
  reset() {
24669
24668
  n(this, W).closeAllProducers(), n(this, W).closeAllConsumers(), n(this, Tt).clear(), n(this, ur).clear(), f(this, is, null), n(this, Ki).stop(), n(this, W).stopAllTransports(), n(this, W).reset(), f(this, Ki, new Ku());
24670
24669
  }
24671
24670
  joinRoom(a, o) {
24672
24671
  return u(this, arguments, function* (s, t, e = !1, r = !1, i = {}) {
24673
- n(this, Kr, Pn).mediaJoinAttempted = !0, f(this, Wi, !0), e && this.reset();
24672
+ n(this, Jr, Pn).mediaJoinAttempted = !0, f(this, Wi, !0), e && this.reset();
24674
24673
  try {
24675
24674
  return yield n(this, Ki).push(
24676
24675
  () => U(this, Sl, Cv).call(this, s, t, r, i),
@@ -24705,7 +24704,7 @@ const _v = (fu = class {
24705
24704
  }
24706
24705
  leaveRoom() {
24707
24706
  return u(this, null, function* () {
24708
- n(this, W).stopAllTransports(), f(this, Ji, !1), n(this, Kr, Pn).mediaJoinAttempted = !1;
24707
+ n(this, W).stopAllTransports(), f(this, Ji, !1), n(this, Jr, Pn).mediaJoinAttempted = !1;
24709
24708
  const s = {
24710
24709
  closeRoom: !1
24711
24710
  };
@@ -25268,7 +25267,7 @@ const _v = (fu = class {
25268
25267
  t.delete(s), !(t.size !== 0 || e === Ot[0]) && this.disableWebcam(e);
25269
25268
  }));
25270
25269
  }
25271
- }, wc = new WeakMap(), Rc = new WeakMap(), ct = new WeakMap(), W = new WeakMap(), Da = new WeakMap(), St = new WeakMap(), Wi = new WeakMap(), Ji = new WeakMap(), Ki = new WeakMap(), bc = new WeakMap(), is = new WeakMap(), ur = new WeakMap(), kc = new WeakMap(), zi = new WeakMap(), Yi = new WeakMap(), Tt = new WeakMap(), bt = new WeakMap(), Kr = new WeakSet(), Pn = function() {
25270
+ }, wc = new WeakMap(), Rc = new WeakMap(), ct = new WeakMap(), W = new WeakMap(), Da = new WeakMap(), St = new WeakMap(), Wi = new WeakMap(), Ji = new WeakMap(), Ki = new WeakMap(), bc = new WeakMap(), is = new WeakMap(), ur = new WeakMap(), kc = new WeakMap(), zi = new WeakMap(), Yi = new WeakMap(), Tt = new WeakMap(), bt = new WeakMap(), Jr = new WeakSet(), Pn = function() {
25272
25271
  return this.context.getValue("connectionHandler");
25273
25272
  }, Sl = new WeakSet(), Cv = function(s, t, e, r) {
25274
25273
  return u(this, null, function* () {
@@ -25818,28 +25817,28 @@ const Lv = (Gg = class {
25818
25817
  }, Xi = new WeakMap(), Es = new WeakMap(), te = new WeakMap(), yt = new WeakSet(), Vt = function() {
25819
25818
  return n(this, te).getValue("roomNodeClient");
25820
25819
  }, Gg);
25821
- let ri = Lv;
25820
+ let si = Lv;
25822
25821
  vn([
25823
25822
  E.trace("SelfController.resetSelf")
25824
- ], ri.prototype, "resetSelf", 1);
25823
+ ], si.prototype, "resetSelf", 1);
25825
25824
  vn([
25826
25825
  E.trace("SelfController.setupEvents")
25827
- ], ri.prototype, "setupEvents", 1);
25826
+ ], si.prototype, "setupEvents", 1);
25828
25827
  vn([
25829
25828
  E.trace("SelfController.joinRoom")
25830
- ], ri.prototype, "joinRoom", 1);
25829
+ ], si.prototype, "joinRoom", 1);
25831
25830
  vn([
25832
25831
  E.trace("SelfController.leaveRoom")
25833
- ], ri.prototype, "leaveRoom", 1);
25832
+ ], si.prototype, "leaveRoom", 1);
25834
25833
  vn([
25835
25834
  E.trace("SelfController.joinMediaRoom")
25836
- ], ri.prototype, "joinMediaRoom", 1);
25835
+ ], si.prototype, "joinMediaRoom", 1);
25837
25836
  vn([
25838
25837
  E.trace("SelfController.leaveMediaRoom")
25839
- ], ri.prototype, "leaveMediaRoom", 1);
25838
+ ], si.prototype, "leaveMediaRoom", 1);
25840
25839
  vn([
25841
25840
  E.trace("SelfController.init")
25842
- ], ri, "init", 1);
25841
+ ], si, "init", 1);
25843
25842
  var Ac;
25844
25843
  class lO {
25845
25844
  constructor(t) {
@@ -27022,34 +27021,34 @@ const wr = {
27022
27021
  warn: 2,
27023
27022
  error: 3
27024
27023
  };
27025
- var di, li;
27024
+ var ci, di;
27026
27025
  class DO {
27027
27026
  constructor(t) {
27028
- ve(this, di, void 0), ve(this, li, void 0), ne(this, di, console), ne(this, li, t);
27027
+ ve(this, ci, void 0), ve(this, di, void 0), ne(this, ci, console), ne(this, di, t);
27029
27028
  }
27030
27029
  debug(...t) {
27031
- wr[M(this, li)] > wr.debug || M(this, di).debug("[Sockrates]:", ...t);
27030
+ wr[M(this, di)] > wr.debug || M(this, ci).debug("[Sockrates]:", ...t);
27032
27031
  }
27033
27032
  info(...t) {
27034
- wr[M(this, li)] > wr.info || M(this, di).info("[Sockrates]:", ...t);
27033
+ wr[M(this, di)] > wr.info || M(this, ci).info("[Sockrates]:", ...t);
27035
27034
  }
27036
27035
  warn(...t) {
27037
- wr[M(this, li)] > wr.warn || M(this, di).warn("[Sockrates]:", ...t);
27036
+ wr[M(this, di)] > wr.warn || M(this, ci).warn("[Sockrates]:", ...t);
27038
27037
  }
27039
27038
  error(...t) {
27040
- wr[M(this, li)] > wr.error || M(this, di).error("[Sockrates]:", ...t);
27039
+ wr[M(this, di)] > wr.error || M(this, ci).error("[Sockrates]:", ...t);
27041
27040
  }
27042
27041
  }
27043
- di = /* @__PURE__ */ new WeakMap(), li = /* @__PURE__ */ new WeakMap();
27042
+ ci = /* @__PURE__ */ new WeakMap(), di = /* @__PURE__ */ new WeakMap();
27044
27043
  var Jv = /* @__PURE__ */ ((s) => (s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s))(Jv || {});
27045
27044
  const OO = "2", NO = "3";
27046
- var Ae, _n, Pe, Le, Ir, Ke, gr, Xr, _s, Cn, Gs, ih, Kv, To, Sd, nh, zv, ah, wg, Od, oh, ch, Yv, Po, Td, _o, Nd, Vd, dh, Nn, Co, wo, Ld;
27045
+ var Ae, _n, Pe, Le, Ir, Ke, gr, Qr, _s, Cn, Gs, ih, Kv, To, Sd, nh, zv, ah, wg, Od, oh, ch, Yv, Po, Td, _o, Nd, Vd, dh, Nn, Co, wo, Ld;
27047
27046
  class VO {
27048
27047
  constructor(t, e) {
27049
27048
  var v, S, P, _, C, w, L, F, N, B;
27050
- ve(this, ih), ve(this, To), ve(this, nh), ve(this, ah), ve(this, Od), ve(this, ch), ve(this, Po), ve(this, _o), ve(this, Vd), ve(this, Nn), ve(this, wo), ve(this, Ae, void 0), ve(this, _n, void 0), ve(this, Pe, void 0), ve(this, Le, void 0), ve(this, Ir, void 0), ve(this, Ke, void 0), ve(this, gr, void 0), ve(this, Xr, void 0), ve(this, _s, void 0), ve(this, Cn, void 0), ve(this, Gs, void 0);
27049
+ ve(this, ih), ve(this, To), ve(this, nh), ve(this, ah), ve(this, Od), ve(this, ch), ve(this, Po), ve(this, _o), ve(this, Vd), ve(this, Nn), ve(this, wo), ve(this, Ae, void 0), ve(this, _n, void 0), ve(this, Pe, void 0), ve(this, Le, void 0), ve(this, Ir, void 0), ve(this, Ke, void 0), ve(this, gr, void 0), ve(this, Qr, void 0), ve(this, _s, void 0), ve(this, Cn, void 0), ve(this, Gs, void 0);
27051
27050
  var r, i, a, o, c, d, l, p, g;
27052
- ne(this, _n, t), ne(this, Ir, []), ne(this, Ke, new Dd()), ne(this, gr, !0), ne(this, _s, !1), ne(this, Pe, e != null ? e : {}), (v = (r = M(this, Pe)).autoReconnect) != null || (r.autoReconnect = !0), (S = (i = M(this, Pe)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (P = (a = M(this, Pe)).pingTimeout) != null || (a.pingTimeout = 3e4), (_ = (o = M(this, Pe)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (C = (c = M(this, Pe)).debug) != null || (c.debug = !0), (w = (d = M(this, Pe)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (L = (l = M(this, Pe)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (F = (p = M(this, Pe)).queueOnDisconnect) != null || (p.queueOnDisconnect = !1), (N = (g = M(this, Pe)).flushOnReconnect) != null || (g.flushOnReconnect = !1), ne(this, Xr, {
27051
+ ne(this, _n, t), ne(this, Ir, []), ne(this, Ke, new Dd()), ne(this, gr, !0), ne(this, _s, !1), ne(this, Pe, e != null ? e : {}), (v = (r = M(this, Pe)).autoReconnect) != null || (r.autoReconnect = !0), (S = (i = M(this, Pe)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (P = (a = M(this, Pe)).pingTimeout) != null || (a.pingTimeout = 3e4), (_ = (o = M(this, Pe)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (C = (c = M(this, Pe)).debug) != null || (c.debug = !0), (w = (d = M(this, Pe)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (L = (l = M(this, Pe)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (F = (p = M(this, Pe)).queueOnDisconnect) != null || (p.queueOnDisconnect = !1), (N = (g = M(this, Pe)).flushOnReconnect) != null || (g.flushOnReconnect = !1), ne(this, Qr, {
27053
27052
  code: void 0,
27054
27053
  reason: void 0
27055
27054
  }), ne(this, Le, (B = M(this, Pe).logger) != null ? B : new DO(M(this, Pe).debug ? "debug" : "info")), ne(this, Gs, new MO());
@@ -27120,7 +27119,7 @@ class VO {
27120
27119
  ), _e(this, Po, Td).call(this)), r(new Error("Connection timed out!"));
27121
27120
  }, M(this, Pe).connectionTimeout);
27122
27121
  M(this, Ae).onopen = () => {
27123
- M(this, Le).debug(`Ready State: ${Jv[M(this, Ae).readyState]}`), i && clearTimeout(i), _e(this, Vd, dh).call(this), ne(this, Xr, {
27122
+ M(this, Le).debug(`Ready State: ${Jv[M(this, Ae).readyState]}`), i && clearTimeout(i), _e(this, Vd, dh).call(this), ne(this, Qr, {
27124
27123
  code: void 0,
27125
27124
  reason: void 0
27126
27125
  }), M(this, Ke).emit(
@@ -27219,13 +27218,13 @@ class VO {
27219
27218
  * Disconnect the socket.
27220
27219
  */
27221
27220
  disconnect() {
27222
- ne(this, gr, !1), _e(this, Nn, Co).call(this), this.removeAllListeners(), ne(this, Xr, {
27221
+ ne(this, gr, !1), _e(this, Nn, Co).call(this), this.removeAllListeners(), ne(this, Qr, {
27223
27222
  code: 1e3,
27224
27223
  reason: "Sockrates disconnect method called"
27225
27224
  }), M(this, Ae).close(1e3, "Sockrates disconnect method called.");
27226
27225
  }
27227
27226
  }
27228
- Ae = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), Xr = /* @__PURE__ */ new WeakMap(), _s = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), Gs = /* @__PURE__ */ new WeakMap(), ih = /* @__PURE__ */ new WeakSet(), Kv = function(s) {
27227
+ Ae = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), _s = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), Gs = /* @__PURE__ */ new WeakMap(), ih = /* @__PURE__ */ new WeakSet(), Kv = function(s) {
27229
27228
  if (s.startsWith("ws://") || s.startsWith("wss://"))
27230
27229
  return s;
27231
27230
  if (s.startsWith("https://"))
@@ -27245,9 +27244,9 @@ Ae = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Pe = /*
27245
27244
  }, ah = /* @__PURE__ */ new WeakSet(), wg = function() {
27246
27245
  return M(this, Ae).readyState === 1;
27247
27246
  }, Od = /* @__PURE__ */ new WeakSet(), oh = function(s, t) {
27248
- ne(this, Xr, { reason: t, code: s }), M(this, Ke).emit("disconnected", { code: s, reason: t });
27247
+ ne(this, Qr, { reason: t, code: s }), M(this, Ke).emit("disconnected", { code: s, reason: t });
27249
27248
  }, ch = /* @__PURE__ */ new WeakSet(), Yv = function() {
27250
- const { reason: s, code: t } = M(this, Xr);
27249
+ const { reason: s, code: t } = M(this, Qr);
27251
27250
  t && t !== 1e3 && M(this, gr) && M(this, Pe).autoReconnect && !M(this, _s) && (M(this, Le).debug(`Triggering reconnection due to ${s}.`), M(this, Ke).emit(
27252
27251
  "reconnecting"
27253
27252
  /* reconnecting */
@@ -27271,7 +27270,7 @@ Ae = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Pe = /*
27271
27270
  return;
27272
27271
  if (M(this, Le).debug(`Reconnection attempt ${M(this, Gs).getAttempts()}`), M(this, Ke).emit("reconnectAttempt", { attempt: M(this, Gs).getAttempts() }), yield this.connect(), !_e(this, ah, wg).call(this))
27273
27272
  throw Error("Reconnect Failed");
27274
- ne(this, _s, !1), ne(this, Xr, {
27273
+ ne(this, _s, !1), ne(this, Qr, {
27275
27274
  code: void 0,
27276
27275
  reason: void 0
27277
27276
  }), M(this, Ke).emit(
@@ -27306,7 +27305,7 @@ var LO = Object.defineProperty, xO = Object.getOwnPropertyDescriptor, zl = (s, t
27306
27305
  return r && i && LO(t, e, i), i;
27307
27306
  };
27308
27307
  const Rg = 65535, UO = 3e3;
27309
- var zr, Ce, we, Me, ns, et, Nc, lh, Vc, uh, Wg;
27308
+ var Kr, Ce, we, Me, ns, et, Nc, lh, Vc, uh, Wg;
27310
27309
  const Qv = (Wg = class {
27311
27310
  constructor(s, {
27312
27311
  peerId: t,
@@ -27317,7 +27316,7 @@ const Qv = (Wg = class {
27317
27316
  m(this, we);
27318
27317
  m(this, Nc);
27319
27318
  m(this, Vc);
27320
- m(this, zr, void 0);
27319
+ m(this, Kr, void 0);
27321
27320
  m(this, Ce, void 0);
27322
27321
  h(this, "roomName");
27323
27322
  h(this, "authToken");
@@ -27327,7 +27326,7 @@ const Qv = (Wg = class {
27327
27326
  var a;
27328
27327
  if (!t || !e || !r)
27329
27328
  throw new b("peerId, meetingId, or authToken can not be empty", "0404");
27330
- f(this, ns, void 0), f(this, et, s), this.capabilities = i, this.roomName = e, this.authToken = r, f(this, zr, U(this, Nc, lh).call(this, t)), f(this, Ce, new VO(n(this, zr), {
27329
+ f(this, ns, void 0), f(this, et, s), this.capabilities = i, this.roomName = e, this.authToken = r, f(this, Kr, U(this, Nc, lh).call(this, t)), f(this, Ce, new VO(n(this, Kr), {
27331
27330
  autoReconnect: !0,
27332
27331
  disconnectOnPingTimeout: (a = i.includes("PING")) != null ? a : !1,
27333
27332
  queueOnDisconnect: !0,
@@ -27359,13 +27358,13 @@ const Qv = (Wg = class {
27359
27358
  return n(this, et).getValue("peerId");
27360
27359
  }
27361
27360
  updateURL(s) {
27362
- s !== this.peerId && (f(this, zr, U(this, Nc, lh).call(this, s)), this.logger.debug("SocketService:: Connection URL updated.")), n(this, Ce).updateURL(n(this, zr));
27361
+ s !== this.peerId && (f(this, Kr, U(this, Nc, lh).call(this, s)), this.logger.debug("SocketService:: Connection URL updated.")), n(this, Ce).updateURL(n(this, Kr));
27363
27362
  }
27364
27363
  static getSocketEdgeDomain(s) {
27365
27364
  return rn({ servicePrefix: "socket-edge", baseURI: s });
27366
27365
  }
27367
27366
  get url() {
27368
- return n(this, zr);
27367
+ return n(this, Kr);
27369
27368
  }
27370
27369
  connect() {
27371
27370
  return u(this, null, function* () {
@@ -27521,7 +27520,7 @@ const Qv = (Wg = class {
27521
27520
  this.logger.info("SocketService::Failed to connect to socket-edge", { country: E.location.country }), n(this, et).getValue("peerSessionStore").emit(k.SOCKET_SERVICE_FAILED), n(this, we, Me).updateSocketConnectionState("failed");
27522
27521
  }));
27523
27522
  }
27524
- }, zr = new WeakMap(), Ce = new WeakMap(), we = new WeakSet(), Me = function() {
27523
+ }, Kr = new WeakMap(), Ce = new WeakMap(), we = new WeakSet(), Me = function() {
27525
27524
  return n(this, et).getValue("connectionHandler");
27526
27525
  }, ns = new WeakMap(), et = new WeakMap(), Nc = new WeakSet(), lh = function(s) {
27527
27526
  let t = Qv.getSocketEdgeDomain(n(this, et).getValue("baseURI"));
@@ -28126,7 +28125,7 @@ const wn = class {
28126
28125
  s
28127
28126
  );
28128
28127
  t.setValue("connectedMeetingsSocketHandler", re);
28129
- const tt = new Jl(t, s), ds = new os(t, s), ii = new vO(s), ls = new xv(t, s), A = new SO(t, s), y = new lO(s), R = new dn(t, s), x = yield ri.init(
28128
+ const tt = new Jl(t, s), ds = new os(t, s), ri = new vO(s), ls = new xv(t, s), A = new SO(t, s), y = new lO(s), R = new dn(t, s), x = yield si.init(
28130
28129
  t,
28131
28130
  ls,
28132
28131
  d,
@@ -28166,7 +28165,7 @@ const wn = class {
28166
28165
  ls
28167
28166
  )), c.stage && (_ = new $f(
28168
28167
  t,
28169
- ii,
28168
+ ri,
28170
28169
  ls,
28171
28170
  x.self,
28172
28171
  N.participants
@@ -28293,7 +28292,7 @@ function KO(s, t) {
28293
28292
  const { meetingId: e, orgId: r, participantId: i } = JSON.parse(atob(s.split(".")[1]));
28294
28293
  if (!e)
28295
28294
  throw Error(`Received V1 auth token ${s}`);
28296
- let a = gi.baseURI.prod;
28295
+ let a = pi.baseURI.prod;
28297
28296
  t && (a = t);
28298
28297
  const o = `https://${rn({ servicePrefix: "api", baseURI: a })}`;
28299
28298
  return {
@@ -28307,15 +28306,15 @@ function KO(s, t) {
28307
28306
  throw new b("Invalid auth token", "0004");
28308
28307
  }
28309
28308
  }
28310
- var Yr, Zi, en, Lc, kl, eS;
28309
+ var zr, Zi, en, Lc, kl, eS;
28311
28310
  class zO {
28312
28311
  constructor() {
28313
28312
  m(this, kl);
28314
- m(this, Yr, new Audio());
28313
+ m(this, zr, new Audio());
28315
28314
  m(this, Zi, new MediaStream());
28316
28315
  m(this, en, /* @__PURE__ */ new Map());
28317
28316
  m(this, Lc, void 0);
28318
- n(this, Yr).srcObject = n(this, Zi), n(this, Yr).autoplay = !0;
28317
+ n(this, zr).srcObject = n(this, Zi), n(this, zr).autoplay = !0;
28319
28318
  }
28320
28319
  playTracks(t) {
28321
28320
  return u(this, null, function* () {
@@ -28325,7 +28324,7 @@ class zO {
28325
28324
  });
28326
28325
  }
28327
28326
  setSpeakerDevice(t) {
28328
- typeof HTMLAudioElement.prototype.setSinkId == "function" && n(this, Yr).setSinkId(t);
28327
+ typeof HTMLAudioElement.prototype.setSinkId == "function" && n(this, zr).setSinkId(t);
28329
28328
  }
28330
28329
  removeTrack(t) {
28331
28330
  const e = n(this, en).get(t);
@@ -28333,7 +28332,7 @@ class zO {
28333
28332
  }
28334
28333
  play() {
28335
28334
  return u(this, null, function* () {
28336
- return n(this, Yr).srcObject = n(this, Zi), n(this, Yr).play().catch((t) => {
28335
+ return n(this, zr).srcObject = n(this, Zi), n(this, zr).play().catch((t) => {
28337
28336
  U(this, kl, eS).call(this, t);
28338
28337
  });
28339
28338
  });
@@ -28342,7 +28341,7 @@ class zO {
28342
28341
  f(this, Lc, t);
28343
28342
  }
28344
28343
  }
28345
- Yr = new WeakMap(), Zi = new WeakMap(), en = new WeakMap(), Lc = new WeakMap(), kl = new WeakSet(), eS = function(t) {
28344
+ zr = new WeakMap(), Zi = new WeakMap(), en = new WeakMap(), Lc = new WeakMap(), kl = new WeakSet(), eS = function(t) {
28346
28345
  var e;
28347
28346
  (e = n(this, Lc)) == null || e.call(this, t);
28348
28347
  };
@@ -28368,7 +28367,7 @@ var QO = Object.defineProperty, XO = Object.getOwnPropertyDescriptor, Xl = (s, t
28368
28367
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
28369
28368
  return r && i && QO(t, e, i), i;
28370
28369
  }, Ge, sn, Kg;
28371
- let ti = (Kg = class {
28370
+ let ei = (Kg = class {
28372
28371
  constructor(t, e) {
28373
28372
  m(this, Ge, void 0);
28374
28373
  m(this, sn, void 0);
@@ -28394,7 +28393,7 @@ let ti = (Kg = class {
28394
28393
  ye.init();
28395
28394
  const { mediaHandler: e } = (S = t.defaults) != null ? S : {}, r = (e == null ? void 0 : e.peerId) || ((_ = (P = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : P.peerId) != null ? _ : on()), { authToken: i, baseURI: a } = t, C = KO(i, a), { meetingId: o } = C, c = io(C, ["meetingId"]);
28396
28395
  window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0;
28397
- const d = ti.setupContext(
28396
+ const d = ei.setupContext(
28398
28397
  r,
28399
28398
  t,
28400
28399
  o,
@@ -28411,7 +28410,7 @@ let ti = (Kg = class {
28411
28410
  ${(N = t.authToken) == null ? void 0 : N.slice(-10)}`
28412
28411
  })
28413
28412
  });
28414
- const g = yield Jc.init(d), v = new ti(d, g);
28413
+ const g = yield Jc.init(d), v = new ei(d, g);
28415
28414
  return d.setValue("meeting", v), v;
28416
28415
  });
28417
28416
  }
@@ -28422,7 +28421,7 @@ let ti = (Kg = class {
28422
28421
  video: !0
28423
28422
  };
28424
28423
  return a.setValue("options", e), a.setValue("peerId", t), a.setValue("modules", o), a.setValue("sdkName", "web-core"), a.setValue("meetingId", r), a.setValue("apiBase", i.apiBase), a.setValue("baseURI", i.baseURI), a.setValue("userId", i.participantId), a.setValue("organizationId", i.orgId), a.setValue("authToken", e.authToken), a.setValue("overrides", (d = e.overrides) != null ? d : {}), a.setValue("env", lw({ baseURI: i.baseURI })), a.setValue("defaults", c), a.setValue("onError", e.onError || (() => {
28425
- })), a.setValue("cachedUserDetails", Rs(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.3-staging.3"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new YO()), a;
28424
+ })), a.setValue("cachedUserDetails", Rs(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.4-staging.1"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new YO()), a;
28426
28425
  }
28427
28426
  join() {
28428
28427
  return u(this, null, function* () {
@@ -28556,10 +28555,10 @@ Xl([
28556
28555
  lockName: "Client.join",
28557
28556
  timeout: 3e3
28558
28557
  })
28559
- ], ti.prototype, "join", 1);
28558
+ ], ei.prototype, "join", 1);
28560
28559
  Xl([
28561
28560
  ut("0003")
28562
- ], ti.prototype, "leave", 1);
28561
+ ], ei.prototype, "leave", 1);
28563
28562
  Xl([
28564
28563
  ut("0001"),
28565
28564
  Pr.executeWithLock({
@@ -28567,11 +28566,11 @@ Xl([
28567
28566
  lockName: "Client.init",
28568
28567
  timeout: 3e3
28569
28568
  })
28570
- ], ti, "init", 1);
28571
- ti = Xl([
28569
+ ], ei, "init", 1);
28570
+ ei = Xl([
28572
28571
  ut("0000")
28573
- ], ti);
28574
- const ZO = ti;
28572
+ ], ei);
28573
+ const ZO = ei;
28575
28574
  export {
28576
28575
  ZO as default
28577
28576
  };