@cloudflare/realtimekit 1.2.2-staging.1 → 1.2.2-staging.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es5.js CHANGED
@@ -66,7 +66,7 @@ function l(o, t) {
66
66
  return o;
67
67
  }
68
68
  var im = 0;
69
- function E(o) {
69
+ function C(o) {
70
70
  return "__private_" + im++ + "_" + o;
71
71
  }
72
72
  function Pe(o) {
@@ -292,7 +292,7 @@ function h() {
292
292
  });
293
293
  var y = Object.getPrototypeOf, b = y && y(y(U([])));
294
294
  b && b !== e && r.call(b, a) && (k = b);
295
- var C = g.prototype = v.prototype = Object.create(k);
295
+ var E = g.prototype = v.prototype = Object.create(k);
296
296
  function T($) {
297
297
  ["next", "throw", "return"].forEach(function(L) {
298
298
  u($, L, function(H) {
@@ -366,11 +366,11 @@ function h() {
366
366
  }
367
367
  throw new TypeError(ke($) + " is not iterable");
368
368
  }
369
- return f.prototype = g, u(C, "constructor", g), u(g, "constructor", f), f.displayName = u(g, s, "GeneratorFunction"), t.isGeneratorFunction = function($) {
369
+ return f.prototype = g, u(E, "constructor", g), u(g, "constructor", f), f.displayName = u(g, s, "GeneratorFunction"), t.isGeneratorFunction = function($) {
370
370
  var L = typeof $ == "function" && $.constructor;
371
371
  return !!L && (L === f || (L.displayName || L.name) === "GeneratorFunction");
372
372
  }, t.mark = function($) {
373
- return Object.setPrototypeOf ? Object.setPrototypeOf($, g) : ($.__proto__ = g, u($, s, "GeneratorFunction")), $.prototype = Object.create(C), $;
373
+ return Object.setPrototypeOf ? Object.setPrototypeOf($, g) : ($.__proto__ = g, u($, s, "GeneratorFunction")), $.prototype = Object.create(E), $;
374
374
  }, t.awrap = function($) {
375
375
  return { __await: $ };
376
376
  }, T(S.prototype), u(S.prototype, i, function() {
@@ -381,9 +381,9 @@ function h() {
381
381
  return t.isGeneratorFunction(L) ? B : B.next().then(function(x) {
382
382
  return x.done ? x.value : B.next();
383
383
  });
384
- }, T(C), u(C, s, "Generator"), u(C, a, function() {
384
+ }, T(E), u(E, s, "Generator"), u(E, a, function() {
385
385
  return this;
386
- }), u(C, "toString", function() {
386
+ }), u(E, "toString", function() {
387
387
  return "[object Generator]";
388
388
  }), t.keys = function($) {
389
389
  var L = Object($), H = [];
@@ -1949,10 +1949,10 @@ var sf = /* @__PURE__ */ P(function o() {
1949
1949
  });
1950
1950
  return n || r[r.length - 1];
1951
1951
  } }, { key: "parseRTCReport", value: function(r) {
1952
- var n = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, u = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, c = r, d = new sf(), p = a.length ? new Set(a) : void 0, v = [], f = [], g = [], k = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = Fn(c.values()), C;
1952
+ var n = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, u = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, c = r, d = new sf(), p = a.length ? new Set(a) : void 0, v = [], f = [], g = [], k = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = Fn(c.values()), E;
1953
1953
  try {
1954
- for (b.s(); !(C = b.n()).done; ) {
1955
- var T = C.value;
1954
+ for (b.s(); !(E = b.n()).done; ) {
1955
+ var T = E.value;
1956
1956
  if (p) {
1957
1957
  if (p.size === 0)
1958
1958
  break;
@@ -2325,32 +2325,32 @@ var sf = /* @__PURE__ */ P(function o() {
2325
2325
  for (; ; )
2326
2326
  switch (y.prev = y.next) {
2327
2327
  case 0:
2328
- return y.prev = 0, i = { iceServers: a || sh }, s = new Promise(function(b, C) {
2328
+ return y.prev = 0, i = { iceServers: a || sh }, s = new Promise(function(b, E) {
2329
2329
  try {
2330
2330
  var T = new Km(i);
2331
2331
  T.addListener("done", b), T.addListener("failed", function() {
2332
2332
  b({ connectivity: !1 });
2333
2333
  }), T.start(2e3);
2334
2334
  } catch (S) {
2335
- C(S);
2335
+ E(S);
2336
2336
  }
2337
- }), u = new Promise(function(b, C) {
2337
+ }), u = new Promise(function(b, E) {
2338
2338
  try {
2339
2339
  var T = new zm(i);
2340
2340
  T.addListener("done", b), T.addListener("failed", function() {
2341
2341
  b({ connectivity: !1 });
2342
2342
  }), T.start(2e3);
2343
2343
  } catch (S) {
2344
- C(S);
2344
+ E(S);
2345
2345
  }
2346
- }), c = new Promise(function(b, C) {
2346
+ }), c = new Promise(function(b, E) {
2347
2347
  try {
2348
2348
  var T = new Ym(i);
2349
2349
  T.addListener("done", b), T.addListener("failed", function() {
2350
2350
  b({ connectivity: !1 });
2351
2351
  }), T.start(2e3);
2352
2352
  } catch (S) {
2353
- C(S);
2353
+ E(S);
2354
2354
  }
2355
2355
  }), y.next = 7, Promise.all([s, u, c]);
2356
2356
  case 7:
@@ -2590,10 +2590,10 @@ var sf = /* @__PURE__ */ P(function o() {
2590
2590
  var n;
2591
2591
  return { id: r.id, type: r.candidateType || r.type, address: r.address, port: r.port, url: r.url, protocol: (n = r.relayProtocol) !== null && n !== void 0 ? n : r.protocol, networkType: r.networkType, relatedAddress: r.relatedAddress, relatedPort: r.relatedPort };
2592
2592
  } }, { key: "parseRTCReport", value: function(r) {
2593
- var n = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, u = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, c = r, d = new sf(), p = a.length ? new Set(a) : void 0, v = [], f = [], g = [], k = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = Fn(c.values()), C;
2593
+ var n = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : void 0, u = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0, c = r, d = new sf(), p = a.length ? new Set(a) : void 0, v = [], f = [], g = [], k = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = Fn(c.values()), E;
2594
2594
  try {
2595
- for (b.s(); !(C = b.n()).done; ) {
2596
- var T = C.value;
2595
+ for (b.s(); !(E = b.n()).done; ) {
2596
+ var T = E.value;
2597
2597
  if (p) {
2598
2598
  if (p.size === 0)
2599
2599
  break;
@@ -3074,7 +3074,7 @@ var pe = function(t, e) {
3074
3074
  clearInterval(this.pingStatsTimeout);
3075
3075
  } }, { key: "sendPingStatsEvent", value: function() {
3076
3076
  var e = m(/* @__PURE__ */ h().mark(function n() {
3077
- var a, i, s, u, c, d, p, v, f, g, k, y, b, C, T, S = arguments;
3077
+ var a, i, s, u, c, d, p, v, f, g, k, y, b, E, T, S = arguments;
3078
3078
  return h().wrap(function(I) {
3079
3079
  for (; ; )
3080
3080
  switch (I.prev = I.next) {
@@ -3114,11 +3114,11 @@ var pe = function(t, e) {
3114
3114
  }
3115
3115
  return this.logger.debug("callStats::sendPingStatsEvent::staleConsumingTransport", { disclaimer: "Stale consumer? Regenerating Stream Maps!" }), I.next = 27, this.measurements.getConsumersReport(Pe(this.consumers.values()));
3116
3116
  case 27:
3117
- if (C = I.sent, !(g && C)) {
3117
+ if (E = I.sent, !(g && E)) {
3118
3118
  I.next = 32;
3119
3119
  break;
3120
3120
  }
3121
- g.consumerReport = C, I.next = 36;
3121
+ g.consumerReport = E, I.next = 36;
3122
3122
  break;
3123
3123
  case 32:
3124
3124
  return I.next = 34, this.measurements.getProcessedStats(this.consumingTransport, !0, !1);
@@ -3341,14 +3341,14 @@ var ey = ue, lf = /* @__PURE__ */ function(o) {
3341
3341
  }
3342
3342
  return A(t, o), P(t, [{ key: "initialize", value: function() {
3343
3343
  var e = m(/* @__PURE__ */ h().mark(function n(a) {
3344
- var i, s, u, c, d, p, v, f, g, k, y, b, C, T, S;
3344
+ var i, s, u, c, d, p, v, f, g, k, y, b, E, T, S;
3345
3345
  return h().wrap(function(I) {
3346
3346
  for (; ; )
3347
3347
  switch (I.prev = I.next) {
3348
3348
  case 0:
3349
- return i = a.peerId, s = a.engineName, u = a.env, c = u === void 0 ? Ou.PROD : u, d = a.iceServers, p = a.apiBase, v = p === void 0 ? "https://api.cluster.dyte.in" : p, f = a.flags, g = a.logger, k = g === void 0 ? console : g, y = a.apiHostnames, b = a.skipConnectivityChecks, C = b === void 0 ? !1 : b, I.prev = 1, this.peerId = i, this.logger = k, I.next = 6, Sp.getIPDetails({ peerId: i, apiHostnames: y, logger: k });
3349
+ return i = a.peerId, s = a.engineName, u = a.env, c = u === void 0 ? Ou.PROD : u, d = a.iceServers, p = a.apiBase, v = p === void 0 ? "https://api.cluster.dyte.in" : p, f = a.flags, g = a.logger, k = g === void 0 ? console : g, y = a.apiHostnames, b = a.skipConnectivityChecks, E = b === void 0 ? !1 : b, I.prev = 1, this.peerId = i, this.logger = k, I.next = 6, Sp.getIPDetails({ peerId: i, apiHostnames: y, logger: k });
3350
3350
  case 6:
3351
- this.ipInformation = I.sent, this.backend = new ey(v, s, c, f, k, i, y), this.iceServers = d, (T = this.backend) === null || T === void 0 || T.registerIceServers(this.iceServers), this.initialized = !0, (S = this.backend) === null || S === void 0 || (S = S.eventHandler) === null || S === void 0 || S.emit("initialized", this.ipInformation), this.emit("initialized", this.ipInformation), this.startPreCallTest(C), I.next = 20;
3351
+ this.ipInformation = I.sent, this.backend = new ey(v, s, c, f, k, i, y), this.iceServers = d, (T = this.backend) === null || T === void 0 || T.registerIceServers(this.iceServers), this.initialized = !0, (S = this.backend) === null || S === void 0 || (S = S.eventHandler) === null || S === void 0 || S.emit("initialized", this.ipInformation), this.emit("initialized", this.ipInformation), this.startPreCallTest(E), I.next = 20;
3352
3352
  break;
3353
3353
  case 16:
3354
3354
  I.prev = 16, I.t0 = I.catch(1), this.logger.error("callStats::CallStatsIntegration: ", { error: I.t0 }), this.stallCallStats();
@@ -4361,7 +4361,7 @@ var $f = /* @__PURE__ */ function() {
4361
4361
  }
4362
4362
  return P(o, [{ key: "identifyAndFetchFlagsWithRetry", value: function() {
4363
4363
  var t = m(/* @__PURE__ */ h().mark(function r(n) {
4364
- var a = this, i, s, u, c, d, p, v, f, g, k, y, b, C, T;
4364
+ var a = this, i, s, u, c, d, p, v, f, g, k, y, b, E, T;
4365
4365
  return h().wrap(function(D) {
4366
4366
  for (; ; )
4367
4367
  switch (D.prev = D.next) {
@@ -4374,7 +4374,7 @@ var $f = /* @__PURE__ */ function() {
4374
4374
  for (; ; )
4375
4375
  switch (q.prev = q.next) {
4376
4376
  case 0:
4377
- return _ = T[C], q.prev = 1, V = new AbortController(), U = setTimeout(function() {
4377
+ return _ = T[E], q.prev = 1, V = new AbortController(), U = setTimeout(function() {
4378
4378
  return V.abort();
4379
4379
  }, c), $ = "_" + (Math.random() + 1).toString(36).substring(2), q.next = 7, fetch("https://".concat(_, "/api/v1/identities/"), {
4380
4380
  method: "POST",
@@ -4400,9 +4400,9 @@ var $f = /* @__PURE__ */ function() {
4400
4400
  return q.stop();
4401
4401
  }
4402
4402
  }, I, null, [[1, 17]]);
4403
- }), C = 0, T = k;
4403
+ }), E = 0, T = k;
4404
4404
  case 6:
4405
- if (!(C < T.length)) {
4405
+ if (!(E < T.length)) {
4406
4406
  D.next = 14;
4407
4407
  break;
4408
4408
  }
@@ -4414,7 +4414,7 @@ var $f = /* @__PURE__ */ function() {
4414
4414
  }
4415
4415
  return D.abrupt("return", b.v);
4416
4416
  case 11:
4417
- C++, D.next = 6;
4417
+ E++, D.next = 6;
4418
4418
  break;
4419
4419
  case 14:
4420
4420
  return D.abrupt("return", {});
@@ -4510,7 +4510,7 @@ var yT = function(t, e, r) {
4510
4510
  });
4511
4511
  if (y === -1)
4512
4512
  throw new Error("Invalid reducer provided, it must contain atleast one zero");
4513
- var b = 5 - y, C = y + 1, T = (100 - k) / b, S = k / C, D = Fn(e), I;
4513
+ var b = 5 - y, E = y + 1, T = (100 - k) / b, S = k / E, D = Fn(e), I;
4514
4514
  try {
4515
4515
  for (D.s(); !(I = D.n()).done; ) {
4516
4516
  var _ = I.value, V = void 0;
@@ -4636,7 +4636,7 @@ var CT = { permissions: {
4636
4636
  function Np() {
4637
4637
  return Dp(CT);
4638
4638
  }
4639
- var Yo = /* @__PURE__ */ E("context"), jf = /* @__PURE__ */ function() {
4639
+ var Yo = /* @__PURE__ */ C("context"), jf = /* @__PURE__ */ function() {
4640
4640
  function o() {
4641
4641
  w(this, o), Object.defineProperty(this, Yo, { writable: !0, value: void 0 });
4642
4642
  }
@@ -4667,7 +4667,7 @@ var Yo = /* @__PURE__ */ E("context"), jf = /* @__PURE__ */ function() {
4667
4667
  var a;
4668
4668
  (a = this.telemetry) === null || a === void 0 || a.addLogInCurrentSpan("warn", e, r, n);
4669
4669
  } }]);
4670
- }(), Ht = /* @__PURE__ */ E("eventPromises"), Bt = /* @__PURE__ */ E("asyncListeners"), RT = /* @__PURE__ */ function(o) {
4670
+ }(), Ht = /* @__PURE__ */ C("eventPromises"), Bt = /* @__PURE__ */ C("asyncListeners"), RT = /* @__PURE__ */ function(o) {
4671
4671
  function t(e) {
4672
4672
  var r;
4673
4673
  return w(this, t), r = R(this, t), Object.defineProperty(r, Ht, { writable: !0, value: void 0 }), Object.defineProperty(r, Bt, { writable: !0, value: void 0 }), r.asyncPromiseTimeout = void 0, r.logger = void 0, r.logger = e, l(r, Ht)[Ht] = /* @__PURE__ */ new Map(), l(r, Bt)[Bt] = /* @__PURE__ */ new Map(), r.asyncPromiseTimeout = 8e3, r;
@@ -4908,9 +4908,9 @@ function Bf(o, t, e, r, n, a) {
4908
4908
  break;
4909
4909
  }
4910
4910
  if (f) {
4911
- if (!dw(t, function(b, C) {
4912
- if (!Hf(f, C) && (g === b || n(g, b, e, r, a)))
4913
- return f.push(C);
4911
+ if (!dw(t, function(b, E) {
4912
+ if (!Hf(f, E) && (g === b || n(g, b, e, r, a)))
4913
+ return f.push(E);
4914
4914
  })) {
4915
4915
  v = !1;
4916
4916
  break;
@@ -4987,10 +4987,10 @@ function Ow(o, t, e, r, n, a) {
4987
4987
  a.set(o, t), a.set(t, o);
4988
4988
  for (var y = i; ++p < u; ) {
4989
4989
  v = s[p];
4990
- var b = o[v], C = t[v];
4990
+ var b = o[v], E = t[v];
4991
4991
  if (r)
4992
- var T = i ? r(C, b, v, t, o, a) : r(b, C, v, o, t, a);
4993
- if (!(T === void 0 ? b === C || n(b, C, e, r, a) : T)) {
4992
+ var T = i ? r(E, b, v, t, o, a) : r(b, E, v, o, t, a);
4993
+ if (!(T === void 0 ? b === E || n(b, E, e, r, a) : T)) {
4994
4994
  k = !1;
4995
4995
  break;
4996
4996
  }
@@ -5138,17 +5138,17 @@ function jp(o, t, e) {
5138
5138
  function b() {
5139
5139
  var I = Bc();
5140
5140
  if (y(I))
5141
- return C(I);
5141
+ return E(I);
5142
5142
  s = setTimeout(b, k(I));
5143
5143
  }
5144
- function C(I) {
5144
+ function E(I) {
5145
5145
  return s = void 0, v && r ? f(I) : (r = n = void 0, i);
5146
5146
  }
5147
5147
  function T() {
5148
5148
  s !== void 0 && clearTimeout(s), c = 0, r = u = n = s = void 0;
5149
5149
  }
5150
5150
  function S() {
5151
- return s === void 0 ? i : C(Bc());
5151
+ return s === void 0 ? i : E(Bc());
5152
5152
  }
5153
5153
  function D() {
5154
5154
  var I = Bc(), _ = y(I);
@@ -5828,9 +5828,9 @@ function DP(o) {
5828
5828
  }).join("").toUpperCase();
5829
5829
  }
5830
5830
  var Hh = 1080, Bh = 1920, LP = function(t, e, r, n, a, i) {
5831
- var s = 0.5, u = 0.5, c = a, d = i, p = Math.min(r / c, n / d), v = c * p, f = d * p, g, k, y, b, C = 1;
5832
- return v < r && (C = r / v), Math.abs(C - 1) < 1e-14 && f < n && (C = n / f), v *= C, f *= C, y = c / (v / r), b = d / (f / n), g = (c - y) * s, k = (d - b) * u, g < 0 && (g = 0), k < 0 && (k = 0), y > c && (y = c), b > d && (b = d), [g, k, y, b, t, e, r, n];
5833
- }, Kr = /* @__PURE__ */ E("canvas"), ha = /* @__PURE__ */ E("context"), tr = /* @__PURE__ */ E("videoContainer"), zr = /* @__PURE__ */ E("video"), Se = /* @__PURE__ */ E("dimensions"), st = /* @__PURE__ */ E("colors"), qt = /* @__PURE__ */ E("rafRequest"), fr = /* @__PURE__ */ E("sources"), Oe = /* @__PURE__ */ E("self"), ss = /* @__PURE__ */ E("pinIcon"), os = /* @__PURE__ */ E("handRaiseIcon"), Gt = /* @__PURE__ */ E("state"), us = /* @__PURE__ */ E("initComplete"), $P = /* @__PURE__ */ function(o) {
5831
+ var s = 0.5, u = 0.5, c = a, d = i, p = Math.min(r / c, n / d), v = c * p, f = d * p, g, k, y, b, E = 1;
5832
+ return v < r && (E = r / v), Math.abs(E - 1) < 1e-14 && f < n && (E = n / f), v *= E, f *= E, y = c / (v / r), b = d / (f / n), g = (c - y) * s, k = (d - b) * u, g < 0 && (g = 0), k < 0 && (k = 0), y > c && (y = c), b > d && (b = d), [g, k, y, b, t, e, r, n];
5833
+ }, Kr = /* @__PURE__ */ C("canvas"), ha = /* @__PURE__ */ C("context"), tr = /* @__PURE__ */ C("videoContainer"), zr = /* @__PURE__ */ C("video"), Se = /* @__PURE__ */ C("dimensions"), st = /* @__PURE__ */ C("colors"), qt = /* @__PURE__ */ C("rafRequest"), fr = /* @__PURE__ */ C("sources"), Oe = /* @__PURE__ */ C("self"), ss = /* @__PURE__ */ C("pinIcon"), os = /* @__PURE__ */ C("handRaiseIcon"), Gt = /* @__PURE__ */ C("state"), us = /* @__PURE__ */ C("initComplete"), $P = /* @__PURE__ */ function(o) {
5834
5834
  function t(e, r, n, a) {
5835
5835
  var i;
5836
5836
  w(this, t);
@@ -5953,7 +5953,7 @@ var Hh = 1080, Bh = 1920, LP = function(t, e, r, n, a, i) {
5953
5953
  return [].concat(Pe(n.pinned), Pe(n.regular));
5954
5954
  } }, { key: "drawEmptyTile", value: function(r, n, a, i) {
5955
5955
  if (l(this, Kr)[Kr] !== void 0) {
5956
- var s = l(this, Kr)[Kr].getContext("2d"), u = l(this, Kr)[Kr].width, c = 0, d = 0, p = n - c * 2, v = a - c * 2, f = Math.floor(u / p), g = Math.floor(r / f), k = r % f, y = k * (p + c) + c, b = g * (v + c) + c, C = i != null ? i : {}, T = C.displayText, S = C.image;
5956
+ var s = l(this, Kr)[Kr].getContext("2d"), u = l(this, Kr)[Kr].width, c = 0, d = 0, p = n - c * 2, v = a - c * 2, f = Math.floor(u / p), g = Math.floor(r / f), k = r % f, y = k * (p + c) + c, b = g * (v + c) + c, E = i != null ? i : {}, T = E.displayText, S = E.image;
5957
5957
  s.fillStyle = T || S ? l(this, st)[st].videoBackground : l(this, st)[st].background, s.strokeStyle = l(this, st)[st].brand, s.beginPath(), s.moveTo(y + d, b), s.arcTo(y + p, b, y + p, b + d, d), s.arcTo(y + p, b + v, y + p - d, b + v, d), s.arcTo(y, b + v, y, b + v - d, d), s.arcTo(y, b, y + d, b, d), s.closePath(), s.fill(), s.stroke();
5958
5958
  var D = p / 6, I = p / 2 + y, _ = v / 2 + b;
5959
5959
  s.save(), (T || S) && (s.beginPath(), s.arc(I, _, D, 0, Math.PI * 2), s.fillStyle = l(this, st)[st].brand, s.fill(), S ? (s.clip(), s.drawImage(S, I - D, _ - D, D * 2, D * 2), s.restore()) : T && (s.fillStyle = l(this, st)[st].textOnBrand, s.font = "".concat(D / 2, "px sans-serif"), s.textAlign = "center", s.textBaseline = "middle", s.fillText(T, I, _)), this.drawIcons(i, y, b, Math.max(p, v)));
@@ -5970,8 +5970,8 @@ var Hh = 1080, Bh = 1920, LP = function(t, e, r, n, a, i) {
5970
5970
  for (var d = 0; d < l(this, Se)[Se].width - 5 && c < a; ) {
5971
5971
  var p;
5972
5972
  if ((p = s[c]) !== null && p !== void 0 && p.enabled) {
5973
- var v, f = s[c].element, g = LP(d, u, r, n, f.videoWidth, f.videoHeight), k = He(g, 8), y = k[0], b = k[1], C = k[2], T = k[3], S = k[4], D = k[5], I = k[6], _ = k[7], V = f == null || (v = f.classList) === null || v === void 0 ? void 0 : v.contains("mirror");
5974
- V ? (i.save(), i.scale(-1, 1), i.drawImage(f, y, b, C, T, -1 * S, D, -1 * I, _), i.restore()) : i.drawImage(f, y, b, C, T, S, D, I, _), this.drawIcons(s[c], S, D, Math.max(I, _));
5973
+ var v, f = s[c].element, g = LP(d, u, r, n, f.videoWidth, f.videoHeight), k = He(g, 8), y = k[0], b = k[1], E = k[2], T = k[3], S = k[4], D = k[5], I = k[6], _ = k[7], V = f == null || (v = f.classList) === null || v === void 0 ? void 0 : v.contains("mirror");
5974
+ V ? (i.save(), i.scale(-1, 1), i.drawImage(f, y, b, E, T, -1 * S, D, -1 * I, _), i.restore()) : i.drawImage(f, y, b, E, T, S, D, I, _), this.drawIcons(s[c], S, D, Math.max(I, _));
5975
5975
  } else
5976
5976
  this.drawEmptyTile(c, r, n, s[c]);
5977
5977
  c += 1, d += r;
@@ -10604,7 +10604,7 @@ var Q = Ho(FA, JA), Ir = Ho(HA, KA), se = Ho(BA, zA), Na = Ho(qA, YA), As = Ho(G
10604
10604
  for (var a = n > 1 ? void 0 : n ? xA(e, r) : e, i = t.length - 1, s; i >= 0; i--)
10605
10605
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
10606
10606
  return n && a && ZA(e, r, a), a;
10607
- }, Dd = (cn = /* @__PURE__ */ E("socket"), Za = /* @__PURE__ */ E("context"), /* @__PURE__ */ function() {
10607
+ }, Dd = (cn = /* @__PURE__ */ C("socket"), Za = /* @__PURE__ */ C("context"), /* @__PURE__ */ function() {
10608
10608
  function o(t, e) {
10609
10609
  w(this, o), Object.defineProperty(this, cn, { writable: !0, value: void 0 }), Object.defineProperty(this, Za, { writable: !0, value: void 0 }), l(this, cn)[cn] = e, l(this, Za)[Za] = t;
10610
10610
  }
@@ -10729,7 +10729,7 @@ var eI = Object.defineProperty, rI = Object.getOwnPropertyDescriptor, Gn = funct
10729
10729
  return n && a && eI(e, r, a), a;
10730
10730
  }, St = /* @__PURE__ */ function(o) {
10731
10731
  return o[o.TEXT = 0] = "TEXT", o[o.IMAGE = 1] = "IMAGE", o[o.FILE = 2] = "FILE", o[o.CUSTOM = 3] = "CUSTOM", o;
10732
- }(St || {}), nr = /* @__PURE__ */ E("socket"), ls = /* @__PURE__ */ E("context"), wn = /* @__PURE__ */ function() {
10732
+ }(St || {}), nr = /* @__PURE__ */ C("socket"), ls = /* @__PURE__ */ C("context"), wn = /* @__PURE__ */ function() {
10733
10733
  function o(t, e) {
10734
10734
  w(this, o), Object.defineProperty(this, nr, { writable: !0, value: void 0 }), Object.defineProperty(this, ls, { writable: !0, value: void 0 }), l(this, nr)[nr] = e, l(this, ls)[ls] = t;
10735
10735
  }
@@ -11031,7 +11031,7 @@ var pv = /* @__PURE__ */ function() {
11031
11031
  return a;
11032
11032
  } }, { key: "request", value: function() {
11033
11033
  var t = m(/* @__PURE__ */ h().mark(function r(n) {
11034
- var a, i, s, u, c, d, p, v, f, g, k, y, b, C, T, S, D;
11034
+ var a, i, s, u, c, d, p, v, f, g, k, y, b, E, T, S, D;
11035
11035
  return h().wrap(function(_) {
11036
11036
  for (; ; )
11037
11037
  switch (_.prev = _.next) {
@@ -11040,22 +11040,22 @@ var pv = /* @__PURE__ */ function() {
11040
11040
  return k.abort();
11041
11041
  }, v), p.signal = k.signal, _.next = 16, fetch(s, p);
11042
11042
  case 16:
11043
- if (b = _.sent, clearTimeout(y), C = null, T = b.headers.get("content-type"), !(T && T.includes("application/json"))) {
11043
+ if (b = _.sent, clearTimeout(y), E = null, T = b.headers.get("content-type"), !(T && T.includes("application/json"))) {
11044
11044
  _.next = 26;
11045
11045
  break;
11046
11046
  }
11047
11047
  return _.next = 23, b.json();
11048
11048
  case 23:
11049
- C = _.sent, _.next = 29;
11049
+ E = _.sent, _.next = 29;
11050
11050
  break;
11051
11051
  case 26:
11052
11052
  return _.next = 28, b.text();
11053
11053
  case 28:
11054
- C = _.sent;
11054
+ E = _.sent;
11055
11055
  case 29:
11056
11056
  if (S = {}, b.headers.forEach(function(V, U) {
11057
11057
  S[U] = V;
11058
- }), D = { data: C, status: b.status, statusText: b.statusText, headers: S, config: n }, b.ok) {
11058
+ }), D = { data: E, status: b.status, statusText: b.statusText, headers: S, config: n }, b.ok) {
11059
11059
  _.next = 34;
11060
11060
  break;
11061
11061
  }
@@ -11154,15 +11154,15 @@ var pv = /* @__PURE__ */ function() {
11154
11154
  }), this.setAuthToken(f, { bearer: !0 });
11155
11155
  var k = this.requests.request.bind(this.requests);
11156
11156
  this.requests.request = /* @__PURE__ */ function() {
11157
- var y = m(/* @__PURE__ */ h().mark(function b(C) {
11157
+ var y = m(/* @__PURE__ */ h().mark(function b(E) {
11158
11158
  var T, S, D, I, _, V, U;
11159
11159
  return h().wrap(function(L) {
11160
11160
  for (; ; )
11161
11161
  switch (L.prev = L.next) {
11162
11162
  case 0:
11163
- return T = t.getValue("telemetry"), L.prev = 1, T.injectContext(r.requests.defaults.headers.common), L.next = 5, k(C);
11163
+ return T = t.getValue("telemetry"), L.prev = 1, T.injectContext(r.requests.defaults.headers.common), L.next = 5, k(E);
11164
11164
  case 5:
11165
- return S = L.sent, C.url !== T.logsEndpoint && r.logger.debug("xhr::fetch", { networkCall: { status: S.status, statusText: S.statusText, baseURL: C.baseURL || r.requests.defaults.baseURL, url: C.url, method: C.method } }), L.abrupt("return", S);
11165
+ return S = L.sent, E.url !== T.logsEndpoint && r.logger.debug("xhr::fetch", { networkCall: { status: S.status, statusText: S.statusText, baseURL: E.baseURL || r.requests.defaults.baseURL, url: E.url, method: E.method } }), L.abrupt("return", S);
11166
11166
  case 10:
11167
11167
  if (L.prev = 10, L.t0 = L.catch(1), L.t0) {
11168
11168
  L.next = 14;
@@ -11285,8 +11285,8 @@ var pv = /* @__PURE__ */ function() {
11285
11285
  return u = f.sent.data.data.plugins, c = ((a = this.context.getValue("flagsmith").getValue(ge.V1_PLUGINS)) === null || a === void 0 || (a = a.toString()) === null || a === void 0 ? void 0 : a.split(",")) || [], d = u.reduce(function(g, k) {
11286
11286
  return g[c.includes(k.id) ? "v1" : "v2"].push(N(N({}, k), {}, { name: k.name.replace("v2", "") })), g;
11287
11287
  }, { v1: [], v2: [] }), (i = this.context.getValue("modules")) !== null && i !== void 0 && (i = i.devTools) !== null && i !== void 0 && (i = i.plugins) !== null && i !== void 0 && i.length && ((p = this.context.getValue("modules")) === null || p === void 0 || (p = p.devTools) === null || p === void 0 || p.plugins.forEach(function(g) {
11288
- var k, y, b, C = N(N({}, Qo), {}, { tags: Pe(Qo.tags), baseUrl: "http://localhost:".concat(g.port), name: g.name, picture: (k = g.picture) !== null && k !== void 0 ? k : Qo.picture, createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), id: g.id, organizationId: s.organizationId, description: (y = g.description) !== null && y !== void 0 ? y : Qo.description, staggered: (b = g.staggered) !== null && b !== void 0 ? b : Qo.staggered });
11289
- d.v2.push(C);
11288
+ var k, y, b, E = N(N({}, Qo), {}, { tags: Pe(Qo.tags), baseUrl: "http://localhost:".concat(g.port), name: g.name, picture: (k = g.picture) !== null && k !== void 0 ? k : Qo.picture, createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), id: g.id, organizationId: s.organizationId, description: (y = g.description) !== null && y !== void 0 ? y : Qo.description, staggered: (b = g.staggered) !== null && b !== void 0 ? b : Qo.staggered });
11289
+ d.v2.push(E);
11290
11290
  })), f.abrupt("return", d.v2);
11291
11291
  case 9:
11292
11292
  case "end":
@@ -11655,7 +11655,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
11655
11655
  for (var a = n > 1 ? void 0 : n ? hI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
11656
11656
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
11657
11657
  return n && a && pI(e, r, a), a;
11658
- }, vI = ["text", "image", "file", "custom", "poll"], Nl = { maxInvocations: 180, period: 60 }, at = (z = /* @__PURE__ */ E("self"), Jn = /* @__PURE__ */ E("participants"), $e = /* @__PURE__ */ E("chatSocketHandler"), Kn = /* @__PURE__ */ E("chatChannelSocketHandler"), oa = /* @__PURE__ */ E("context"), Fl = /* @__PURE__ */ E("connectionHandler"), so = /* @__PURE__ */ E("socketJoined"), /* @__PURE__ */ function(o) {
11658
+ }, vI = ["text", "image", "file", "custom", "poll"], Nl = { maxInvocations: 180, period: 60 }, at = (z = /* @__PURE__ */ C("self"), Jn = /* @__PURE__ */ C("participants"), $e = /* @__PURE__ */ C("chatSocketHandler"), Kn = /* @__PURE__ */ C("chatChannelSocketHandler"), oa = /* @__PURE__ */ C("context"), Fl = /* @__PURE__ */ C("connectionHandler"), so = /* @__PURE__ */ C("socketJoined"), /* @__PURE__ */ function(o) {
11659
11659
  function t(e, r, n, a, i) {
11660
11660
  var s;
11661
11661
  w(this, t);
@@ -11927,7 +11927,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
11927
11927
  return r;
11928
11928
  }() }, { key: "sendCustomMessage", value: function() {
11929
11929
  var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
11930
- var s, u, c, d = this, p, v, f, g, k, y, b, C, T, S, D;
11930
+ var s, u, c, d = this, p, v, f, g, k, y, b, E, T, S, D;
11931
11931
  return h().wrap(function(_) {
11932
11932
  for (; ; )
11933
11933
  switch (_.prev = _.next) {
@@ -11936,7 +11936,7 @@ var pI = Object.defineProperty, hI = Object.getOwnPropertyDescriptor, gt = funct
11936
11936
  _.next = 6;
11937
11937
  break;
11938
11938
  }
11939
- if (!(!((b = l(this, z)[z].permissions) !== null && b !== void 0 && b.chatPrivate.canSend) || !((C = l(this, z)[z].permissions) !== null && C !== void 0 && C.chatPrivate.files) || !((T = l(this, z)[z].permissions) !== null && T !== void 0 && T.chatPrivate.text))) {
11939
+ if (!(!((b = l(this, z)[z].permissions) !== null && b !== void 0 && b.chatPrivate.canSend) || !((E = l(this, z)[z].permissions) !== null && E !== void 0 && E.chatPrivate.files) || !((T = l(this, z)[z].permissions) !== null && T !== void 0 && T.chatPrivate.text))) {
11940
11940
  _.next = 4;
11941
11941
  break;
11942
11942
  }
@@ -12574,7 +12574,7 @@ var mI = Object.defineProperty, yI = Object.getOwnPropertyDescriptor, kI = funct
12574
12574
  for (var a = n > 1 ? void 0 : n ? yI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
12575
12575
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
12576
12576
  return n && a && mI(e, r, a), a;
12577
- }, Es = (dn = /* @__PURE__ */ E("context"), /* @__PURE__ */ function() {
12577
+ }, Es = (dn = /* @__PURE__ */ C("context"), /* @__PURE__ */ function() {
12578
12578
  function o(t, e, r, n, a) {
12579
12579
  w(this, o), this.chat = void 0, this.chatSocketHandler = void 0, this.chatChannelSocketHandler = void 0, this.self = void 0, Object.defineProperty(this, dn, { writable: !0, value: void 0 }), l(this, dn)[dn] = t, this.chatSocketHandler = e, this.chatChannelSocketHandler = r, this.chat = new at(t, e, r, n, a), this.self = n, this.setupEvents();
12580
12580
  }
@@ -12752,7 +12752,7 @@ var bI = Object.defineProperty, TI = Object.getOwnPropertyDescriptor, wI = funct
12752
12752
  for (var a = n > 1 ? void 0 : n ? TI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
12753
12753
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
12754
12754
  return n && a && bI(e, r, a), a;
12755
- }, $d = (Hl = /* @__PURE__ */ E("connectionHandler"), pl = /* @__PURE__ */ E("socketJoined"), xa = /* @__PURE__ */ E("self"), ei = /* @__PURE__ */ E("pollSocketHandler"), Eo = /* @__PURE__ */ E("context"), /* @__PURE__ */ function(o) {
12755
+ }, $d = (Hl = /* @__PURE__ */ C("connectionHandler"), pl = /* @__PURE__ */ C("socketJoined"), xa = /* @__PURE__ */ C("self"), ei = /* @__PURE__ */ C("pollSocketHandler"), Eo = /* @__PURE__ */ C("context"), /* @__PURE__ */ function(o) {
12756
12756
  function t(e, r, n) {
12757
12757
  var a;
12758
12758
  w(this, t);
@@ -12838,7 +12838,7 @@ var EI = Object.defineProperty, CI = Object.getOwnPropertyDescriptor, RI = funct
12838
12838
  for (var a = n > 1 ? void 0 : n ? CI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
12839
12839
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
12840
12840
  return n && a && EI(e, r, a), a;
12841
- }, To = (pn = /* @__PURE__ */ E("context"), ri = /* @__PURE__ */ E("self"), zn = /* @__PURE__ */ E("pollSocketHandler"), /* @__PURE__ */ function() {
12841
+ }, To = (pn = /* @__PURE__ */ C("context"), ri = /* @__PURE__ */ C("self"), zn = /* @__PURE__ */ C("pollSocketHandler"), /* @__PURE__ */ function() {
12842
12842
  function o(t, e, r) {
12843
12843
  w(this, o), this.polls = void 0, Object.defineProperty(this, pn, { writable: !0, value: void 0 }), Object.defineProperty(this, ri, { writable: !0, value: void 0 }), Object.defineProperty(this, zn, { writable: !0, value: void 0 }), this.polls = new $d(t, e, r), l(this, ri)[ri] = e, l(this, pn)[pn] = t, l(this, zn)[zn] = r, this.setupEvents();
12844
12844
  }
@@ -12987,7 +12987,7 @@ var AI = Object.defineProperty, II = Object.getOwnPropertyDescriptor, MI = funct
12987
12987
  return n && a && AI(e, r, a), a;
12988
12988
  }, hg = /* @__PURE__ */ function(o) {
12989
12989
  return o[o.User = 0] = "User", o[o.Meeting = 1] = "Meeting", o;
12990
- }(hg || {}), Nd = (wi = /* @__PURE__ */ E("context"), oo = /* @__PURE__ */ E("connectionHandler"), Yn = /* @__PURE__ */ E("self"), uo = /* @__PURE__ */ E("roomSocketHandler"), /* @__PURE__ */ function(o) {
12990
+ }(hg || {}), Nd = (wi = /* @__PURE__ */ C("context"), oo = /* @__PURE__ */ C("connectionHandler"), Yn = /* @__PURE__ */ C("self"), uo = /* @__PURE__ */ C("roomSocketHandler"), /* @__PURE__ */ function(o) {
12991
12991
  function t(e, r, n, a, i) {
12992
12992
  var s;
12993
12993
  w(this, t);
@@ -13046,7 +13046,7 @@ var DI = Object.defineProperty, LI = Object.getOwnPropertyDescriptor, vg = funct
13046
13046
  for (var a = n > 1 ? void 0 : n ? LI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
13047
13047
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
13048
13048
  return n && a && DI(e, r, a), a;
13049
- }, _i = (lo = /* @__PURE__ */ E("context"), /* @__PURE__ */ function(o) {
13049
+ }, _i = (lo = /* @__PURE__ */ C("context"), /* @__PURE__ */ function(o) {
13050
13050
  function t(e) {
13051
13051
  var r;
13052
13052
  w(this, t);
@@ -13166,7 +13166,7 @@ var $I = Object.defineProperty, NI = Object.getOwnPropertyDescriptor, VI = funct
13166
13166
  for (var a = n > 1 ? void 0 : n ? NI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
13167
13167
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
13168
13168
  return n && a && $I(e, r, a), a;
13169
- }, fg = (hn = /* @__PURE__ */ E("self"), ti = /* @__PURE__ */ E("roomSocketHandler"), Or = /* @__PURE__ */ E("context"), /* @__PURE__ */ function() {
13169
+ }, fg = (hn = /* @__PURE__ */ C("self"), ti = /* @__PURE__ */ C("roomSocketHandler"), Or = /* @__PURE__ */ C("context"), /* @__PURE__ */ function() {
13170
13170
  function o(t, e, r, n, a, i) {
13171
13171
  w(this, o), this.meta = void 0, this.ai = void 0, Object.defineProperty(this, hn, { writable: !0, value: void 0 }), Object.defineProperty(this, ti, { writable: !0, value: void 0 }), this.aiSocketHandler = void 0, Object.defineProperty(this, Or, { writable: !0, value: void 0 }), l(this, Or)[Or] = t, this.meta = new Nd(t, e, e.config.viewType, r, i), this.ai = n, l(this, hn)[hn] = e, l(this, ti)[ti] = r, this.aiSocketHandler = a, e.config.viewType !== Lt.Chat && this.setupEvents();
13172
13172
  }
@@ -13318,13 +13318,13 @@ var Zo = {}, za = {
13318
13318
  throw b.name = "UnsupportedConcurrentMethodExecution", y == null || y.error("Locker::UnsupportedConcurrentMethodExecution", { error: { stack: b.stack }, locker: { methodName: t, lockName: k } }), b;
13319
13319
  }
13320
13320
  Zo[k] = !0;
13321
- var C = setTimeout(function() {
13321
+ var E = setTimeout(function() {
13322
13322
  return delete Zo[k];
13323
13323
  }, r), T = s.apply(this, v);
13324
13324
  return Promise.resolve(T).then(function() {
13325
- delete Zo[k], clearTimeout(C);
13325
+ delete Zo[k], clearTimeout(E);
13326
13326
  }).catch(function() {
13327
- delete Zo[k], clearTimeout(C);
13327
+ delete Zo[k], clearTimeout(E);
13328
13328
  }), T;
13329
13329
  }, i;
13330
13330
  };
@@ -13333,7 +13333,7 @@ var Zo = {}, za = {
13333
13333
  for (var a = n > 1 ? void 0 : n ? jI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
13334
13334
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
13335
13335
  return n && a && UI(e, r, a), a;
13336
- }, Yr = /* @__PURE__ */ E("stageSocketHandler"), Qc = /* @__PURE__ */ E("roomSocketHandler"), oe = /* @__PURE__ */ E("self"), xo = /* @__PURE__ */ E("participants"), yt = /* @__PURE__ */ E("stageRequests"), Ge = /* @__PURE__ */ E("context"), eu = /* @__PURE__ */ E("roomNodeClient"), cs = /* @__PURE__ */ E("setStatus"), Di = /* @__PURE__ */ function(o) {
13336
+ }, Yr = /* @__PURE__ */ C("stageSocketHandler"), Qc = /* @__PURE__ */ C("roomSocketHandler"), oe = /* @__PURE__ */ C("self"), xo = /* @__PURE__ */ C("participants"), yt = /* @__PURE__ */ C("stageRequests"), Ge = /* @__PURE__ */ C("context"), eu = /* @__PURE__ */ C("roomNodeClient"), cs = /* @__PURE__ */ C("setStatus"), Di = /* @__PURE__ */ function(o) {
13337
13337
  function t(e, r, n, a, i) {
13338
13338
  var s;
13339
13339
  w(this, t);
@@ -13681,7 +13681,7 @@ var qI = Object.defineProperty, GI = Object.getOwnPropertyDescriptor, WI = funct
13681
13681
  for (var a = n > 1 ? void 0 : n ? GI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
13682
13682
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
13683
13683
  return n && a && qI(e, r, a), a;
13684
- }, Sn = /* @__PURE__ */ E("self"), ot = /* @__PURE__ */ E("participants"), En = /* @__PURE__ */ E("stageSocketHandler"), ru = /* @__PURE__ */ E("stageRequestCount"), gr = /* @__PURE__ */ E("context"), mg = /* @__PURE__ */ function() {
13684
+ }, Sn = /* @__PURE__ */ C("self"), ot = /* @__PURE__ */ C("participants"), En = /* @__PURE__ */ C("stageSocketHandler"), ru = /* @__PURE__ */ C("stageRequestCount"), gr = /* @__PURE__ */ C("context"), mg = /* @__PURE__ */ function() {
13685
13685
  function o(t, e, r, n, a) {
13686
13686
  w(this, o), this.stage = void 0, Object.defineProperty(this, Sn, { writable: !0, value: void 0 }), Object.defineProperty(this, ot, { writable: !0, value: void 0 }), Object.defineProperty(this, En, { writable: !0, value: void 0 }), Object.defineProperty(this, ru, { writable: !0, value: 0 }), Object.defineProperty(this, gr, { writable: !0, value: void 0 }), l(this, gr)[gr] = t, this.stage = new Di(t, n, a, e, r), l(this, En)[En] = e, l(this, Sn)[Sn] = n, l(this, ot)[ot] = a, this.setupEvents();
13687
13687
  }
@@ -13841,12 +13841,12 @@ var JI = Object.defineProperty, KI = Object.getOwnPropertyDescriptor, Sc = funct
13841
13841
  for (var a = n > 1 ? void 0 : n ? KI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
13842
13842
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
13843
13843
  return n && a && JI(e, r, a), a;
13844
- }, Lr = { getPeer: 14, getPeers: 15, chatMessage: 16, getRoomName: 17, getDisplayTitle: 18, getPluginInitiator: 19, customPluginEventToParent: 20, peerJoined: 22, peerLeft: 23, sendData: 24, stageStatusUpdate: 25, peerStageStatusUpdate: 26 }, Vo = (Qe = /* @__PURE__ */ E("pluginSocketHandler"), Dr = /* @__PURE__ */ E("self"), ni = /* @__PURE__ */ E("participants"), ai = /* @__PURE__ */ E("chat"), It = /* @__PURE__ */ E("startedAt"), ii = /* @__PURE__ */ E("authToken"), vn = /* @__PURE__ */ E("context"), si = /* @__PURE__ */ E("meetingTitle"), /* @__PURE__ */ function(o) {
13844
+ }, Lr = { getPeer: 14, getPeers: 15, chatMessage: 16, getRoomName: 17, getDisplayTitle: 18, getPluginInitiator: 19, customPluginEventToParent: 20, peerJoined: 22, peerLeft: 23, sendData: 24, stageStatusUpdate: 25, peerStageStatusUpdate: 26 }, Vo = (Qe = /* @__PURE__ */ C("pluginSocketHandler"), Dr = /* @__PURE__ */ C("self"), ni = /* @__PURE__ */ C("participants"), ai = /* @__PURE__ */ C("chat"), It = /* @__PURE__ */ C("startedAt"), ii = /* @__PURE__ */ C("authToken"), vn = /* @__PURE__ */ C("context"), si = /* @__PURE__ */ C("meetingTitle"), /* @__PURE__ */ function(o) {
13845
13845
  function t(e, r, n, a, i, s, u) {
13846
- var c, d = r.baseURL, p = r.createdAt, v = r.description, f = r.id, g = r.name, k = r.organizationId, y = r.picture, b = r.private, C = r.published, T = r.staggered, S = r.tags, D = r.type, I = r.updatedAt;
13846
+ var c, d = r.baseURL, p = r.createdAt, v = r.description, f = r.id, g = r.name, k = r.organizationId, y = r.picture, b = r.private, E = r.published, T = r.staggered, S = r.tags, D = r.type, I = r.updatedAt;
13847
13847
  w(this, t);
13848
13848
  var _ = e.getValue("logger");
13849
- return c = R(this, t, [_]), Object.defineProperty(c, Qe, { writable: !0, value: void 0 }), c.baseURL = void 0, c.createdAt = void 0, c.description = void 0, c.id = void 0, c.name = void 0, Object.defineProperty(c, Dr, { writable: !0, value: void 0 }), Object.defineProperty(c, ni, { writable: !0, value: void 0 }), Object.defineProperty(c, ai, { writable: !0, value: void 0 }), c.organizationId = void 0, c.picture = void 0, c.private = void 0, c.published = void 0, c.staggered = void 0, c.tags = void 0, c.type = void 0, c.updatedAt = void 0, Object.defineProperty(c, It, { writable: !0, value: void 0 }), c.config = void 0, Object.defineProperty(c, ii, { writable: !0, value: void 0 }), c.active = void 0, c.iframes = void 0, c.enabledBy = void 0, Object.defineProperty(c, vn, { writable: !0, value: void 0 }), Object.defineProperty(c, si, { writable: !0, value: void 0 }), l(c, vn)[vn] = e, c.baseURL = d, c.createdAt = new Date(p), c.description = v, c.id = f, c.name = g, l(c, Dr)[Dr] = a, c.organizationId = k, c.picture = y, c.private = b, c.published = C, c.staggered = T, c.tags = S, c.type = D, c.updatedAt = new Date(I), c.active = !1, c.iframes = /* @__PURE__ */ new Map(), l(c, Qe)[Qe] = n, l(c, ni)[ni] = i, l(c, ai)[ai] = s, c.enabledBy = "", l(c, si)[si] = u, c;
13849
+ return c = R(this, t, [_]), Object.defineProperty(c, Qe, { writable: !0, value: void 0 }), c.baseURL = void 0, c.createdAt = void 0, c.description = void 0, c.id = void 0, c.name = void 0, Object.defineProperty(c, Dr, { writable: !0, value: void 0 }), Object.defineProperty(c, ni, { writable: !0, value: void 0 }), Object.defineProperty(c, ai, { writable: !0, value: void 0 }), c.organizationId = void 0, c.picture = void 0, c.private = void 0, c.published = void 0, c.staggered = void 0, c.tags = void 0, c.type = void 0, c.updatedAt = void 0, Object.defineProperty(c, It, { writable: !0, value: void 0 }), c.config = void 0, Object.defineProperty(c, ii, { writable: !0, value: void 0 }), c.active = void 0, c.iframes = void 0, c.enabledBy = void 0, Object.defineProperty(c, vn, { writable: !0, value: void 0 }), Object.defineProperty(c, si, { writable: !0, value: void 0 }), l(c, vn)[vn] = e, c.baseURL = d, c.createdAt = new Date(p), c.description = v, c.id = f, c.name = g, l(c, Dr)[Dr] = a, c.organizationId = k, c.picture = y, c.private = b, c.published = E, c.staggered = T, c.tags = S, c.type = D, c.updatedAt = new Date(I), c.active = !1, c.iframes = /* @__PURE__ */ new Map(), l(c, Qe)[Qe] = n, l(c, ni)[ni] = i, l(c, ai)[ai] = s, c.enabledBy = "", l(c, si)[si] = u, c;
13850
13850
  }
13851
13851
  return A(t, o), P(t, [{ key: "telemetry", get: (
13852
13852
  /**
@@ -13864,70 +13864,70 @@ var JI = Object.defineProperty, KI = Object.getOwnPropertyDescriptor, Sc = funct
13864
13864
  } }, { key: "handleIframeMessage", value: function() {
13865
13865
  var e = m(/* @__PURE__ */ h().mark(function n(a) {
13866
13866
  var i, s, u, c, d, p, v, f, g, k, y;
13867
- return h().wrap(function(C) {
13867
+ return h().wrap(function(E) {
13868
13868
  for (; ; )
13869
- switch (C.prev = C.next) {
13869
+ switch (E.prev = E.next) {
13870
13870
  case 0:
13871
13871
  if (this.active) {
13872
- C.next = 2;
13872
+ E.next = 2;
13873
13873
  break;
13874
13874
  }
13875
- return C.abrupt("return");
13875
+ return E.abrupt("return");
13876
13876
  case 2:
13877
- i = a, s = i.payload, u = i.uuid, c = i.type, C.t0 = c, C.next = C.t0 === se.customPluginEventToRoom ? 7 : C.t0 === se.customPluginEventToPeers ? 9 : C.t0 === se.enablePluginForRoom ? 11 : C.t0 === se.enablePluginForPeers ? 13 : C.t0 === se.disablePluginForRoom ? 15 : C.t0 === se.disablePluginForPeers ? 17 : C.t0 === se.storeInsertKeys ? 19 : C.t0 === se.storeGetKeys ? 21 : C.t0 === se.storeDeleteKeys ? 23 : C.t0 === se.storeDelete ? 25 : C.t0 === Lr.chatMessage ? 27 : C.t0 === Lr.getPeer ? 41 : C.t0 === Lr.getPeers ? 46 : C.t0 === Lr.getPluginInitiator ? 49 : C.t0 === Lr.getDisplayTitle ? 51 : C.t0 === Lr.getRoomName ? 53 : C.t0 === Lr.customPluginEventToParent ? 55 : 57;
13877
+ i = a, s = i.payload, u = i.uuid, c = i.type, E.t0 = c, E.next = E.t0 === se.customPluginEventToRoom ? 7 : E.t0 === se.customPluginEventToPeers ? 9 : E.t0 === se.enablePluginForRoom ? 11 : E.t0 === se.enablePluginForPeers ? 13 : E.t0 === se.disablePluginForRoom ? 15 : E.t0 === se.disablePluginForPeers ? 17 : E.t0 === se.storeInsertKeys ? 19 : E.t0 === se.storeGetKeys ? 21 : E.t0 === se.storeDeleteKeys ? 23 : E.t0 === se.storeDelete ? 25 : E.t0 === Lr.chatMessage ? 27 : E.t0 === Lr.getPeer ? 41 : E.t0 === Lr.getPeers ? 46 : E.t0 === Lr.getPluginInitiator ? 49 : E.t0 === Lr.getDisplayTitle ? 51 : E.t0 === Lr.getRoomName ? 53 : E.t0 === Lr.customPluginEventToParent ? 55 : 57;
13878
13878
  break;
13879
13879
  case 7:
13880
- return l(this, Qe)[Qe].customPluginEventToRoom(this.id, s, u), C.abrupt("break", 57);
13880
+ return l(this, Qe)[Qe].customPluginEventToRoom(this.id, s, u), E.abrupt("break", 57);
13881
13881
  case 9:
13882
- return l(this, Qe)[Qe].customPluginEventToPeers(this.id, s.peerIds, s, u), C.abrupt("break", 57);
13882
+ return l(this, Qe)[Qe].customPluginEventToPeers(this.id, s.peerIds, s, u), E.abrupt("break", 57);
13883
13883
  case 11:
13884
- return l(this, Qe)[Qe].enablePluginForRoom(this.id, u), C.abrupt("break", 57);
13884
+ return l(this, Qe)[Qe].enablePluginForRoom(this.id, u), E.abrupt("break", 57);
13885
13885
  case 13:
13886
- return l(this, Qe)[Qe].enablePluginForPeers(this.id, s.peerIds, u), C.abrupt("break", 57);
13886
+ return l(this, Qe)[Qe].enablePluginForPeers(this.id, s.peerIds, u), E.abrupt("break", 57);
13887
13887
  case 15:
13888
- return l(this, Qe)[Qe].disablePluginForRoom(this.id, u), C.abrupt("break", 57);
13888
+ return l(this, Qe)[Qe].disablePluginForRoom(this.id, u), E.abrupt("break", 57);
13889
13889
  case 17:
13890
- return l(this, Qe)[Qe].disablePluginForPeers(this.id, s.peerIds, u), C.abrupt("break", 57);
13890
+ return l(this, Qe)[Qe].disablePluginForPeers(this.id, s.peerIds, u), E.abrupt("break", 57);
13891
13891
  case 19:
13892
- return l(this, Qe)[Qe].storeInsertKeys(this.id, s.store, s.insertKeys, u), C.abrupt("break", 57);
13892
+ return l(this, Qe)[Qe].storeInsertKeys(this.id, s.store, s.insertKeys, u), E.abrupt("break", 57);
13893
13893
  case 21:
13894
- return l(this, Qe)[Qe].storeGetKeys(this.id, s.store, s.getKeys, u), C.abrupt("break", 57);
13894
+ return l(this, Qe)[Qe].storeGetKeys(this.id, s.store, s.getKeys, u), E.abrupt("break", 57);
13895
13895
  case 23:
13896
- return l(this, Qe)[Qe].storeDeleteKeys(this.id, s.store, s.deleteKeys, u), C.abrupt("break", 57);
13896
+ return l(this, Qe)[Qe].storeDeleteKeys(this.id, s.store, s.deleteKeys, u), E.abrupt("break", 57);
13897
13897
  case 25:
13898
- return l(this, Qe)[Qe].storeDelete(this.id, s.store, u), C.abrupt("break", 57);
13898
+ return l(this, Qe)[Qe].storeDelete(this.id, s.store, u), E.abrupt("break", 57);
13899
13899
  case 27:
13900
13900
  if (d = s.messagePayload, p = s.peerIds, l(this, ai)[ai]) {
13901
- C.next = 31;
13901
+ E.next = 31;
13902
13902
  break;
13903
13903
  }
13904
- return this.sendIframeEvent({ type: Lr.chatMessage, uuid: i.uuid, payload: { error: "Chat is disabled for this room." } }), C.abrupt("return");
13904
+ return this.sendIframeEvent({ type: Lr.chatMessage, uuid: i.uuid, payload: { error: "Chat is disabled for this room." } }), E.abrupt("return");
13905
13905
  case 31:
13906
- return C.prev = 31, C.next = 34, l(this, ai)[ai].sendMessage(d, p);
13906
+ return E.prev = 31, E.next = 34, l(this, ai)[ai].sendMessage(d, p);
13907
13907
  case 34:
13908
- this.sendIframeEvent({ type: Lr.chatMessage, uuid: i.uuid, payload: { success: !0 } }), C.next = 40;
13908
+ this.sendIframeEvent({ type: Lr.chatMessage, uuid: i.uuid, payload: { success: !0 } }), E.next = 40;
13909
13909
  break;
13910
13910
  case 37:
13911
- C.prev = 37, C.t1 = C.catch(31), this.sendIframeEvent({ type: Lr.chatMessage, uuid: i.uuid, payload: { error: C.t1 } });
13911
+ E.prev = 37, E.t1 = E.catch(31), this.sendIframeEvent({ type: Lr.chatMessage, uuid: i.uuid, payload: { error: E.t1 } });
13912
13912
  case 40:
13913
- return C.abrupt("break", 57);
13913
+ return E.abrupt("break", 57);
13914
13914
  case 41:
13915
- return g = s.peerId, k = N(N({}, l(this, Dr)[Dr]), {}, { id: l(this, Dr)[Dr].id, isRecorder: (v = l(this, Dr)[Dr].permissions) === null || v === void 0 ? void 0 : v.isRecorder, isHidden: l(this, Dr)[Dr].permissions.hiddenParticipant, stageStatus: l(this, Dr)[Dr].stageStatus }), g ? (f = l(this, ni)[ni].joined.get(s.peerId), l(this, Dr)[Dr].id === g && (f = k)) : f = k, this.sendIframeEvent({ type: Lr.getPeer, payload: { peer: f && rc(f) }, uuid: i.uuid }), C.abrupt("break", 57);
13915
+ return g = s.peerId, k = N(N({}, l(this, Dr)[Dr]), {}, { id: l(this, Dr)[Dr].id, isRecorder: (v = l(this, Dr)[Dr].permissions) === null || v === void 0 ? void 0 : v.isRecorder, isHidden: l(this, Dr)[Dr].permissions.hiddenParticipant, stageStatus: l(this, Dr)[Dr].stageStatus }), g ? (f = l(this, ni)[ni].joined.get(s.peerId), l(this, Dr)[Dr].id === g && (f = k)) : f = k, this.sendIframeEvent({ type: Lr.getPeer, payload: { peer: f && rc(f) }, uuid: i.uuid }), E.abrupt("break", 57);
13916
13916
  case 46:
13917
13917
  return y = l(this, ni)[ni].joined.toArray().map(function(T) {
13918
13918
  return rc(T);
13919
- }), this.sendIframeEvent({ type: Lr.getPeers, payload: { peers: y }, uuid: i.uuid }), C.abrupt("break", 57);
13919
+ }), this.sendIframeEvent({ type: Lr.getPeers, payload: { peers: y }, uuid: i.uuid }), E.abrupt("break", 57);
13920
13920
  case 49:
13921
- return this.sendIframeEvent({ type: Lr.getPluginInitiator, payload: { enabledBy: this.enabledBy }, uuid: i.uuid }), C.abrupt("break", 57);
13921
+ return this.sendIframeEvent({ type: Lr.getPluginInitiator, payload: { enabledBy: this.enabledBy }, uuid: i.uuid }), E.abrupt("break", 57);
13922
13922
  case 51:
13923
- return this.sendIframeEvent({ type: Lr.getDisplayTitle, payload: { displayTitle: l(this, si)[si] }, uuid: i.uuid }), C.abrupt("break", 57);
13923
+ return this.sendIframeEvent({ type: Lr.getDisplayTitle, payload: { displayTitle: l(this, si)[si] }, uuid: i.uuid }), E.abrupt("break", 57);
13924
13924
  case 53:
13925
- return this.sendIframeEvent({ type: Lr.getRoomName, payload: { roomName: l(this, vn)[vn].getValue("meetingId") }, uuid: i.uuid }), C.abrupt("break", 57);
13925
+ return this.sendIframeEvent({ type: Lr.getRoomName, payload: { roomName: l(this, vn)[vn].getValue("meetingId") }, uuid: i.uuid }), E.abrupt("break", 57);
13926
13926
  case 55:
13927
- return this.emit(i.payload.eventName, i.payload.data), C.abrupt("break", 57);
13927
+ return this.emit(i.payload.eventName, i.payload.data), E.abrupt("break", 57);
13928
13928
  case 57:
13929
13929
  case "end":
13930
- return C.stop();
13930
+ return E.stop();
13931
13931
  }
13932
13932
  }, n, this, [[31, 37]]);
13933
13933
  }));
@@ -14134,7 +14134,7 @@ Sc([$t({ maxInvocations: 5, period: 1 })], Vo.prototype, "sendData", 1);
14134
14134
  Sc([O.trace("Plugin.activatePlugin")], Vo.prototype, "activate", 1);
14135
14135
  Sc([O.trace("Plugin.deactivatePlugin")], Vo.prototype, "deactivate", 1);
14136
14136
  Vo = Sc([ft("0600")], Vo);
14137
- var De = /* @__PURE__ */ E("eventEmitter"), va = /* @__PURE__ */ E("listeners"), yg = /* @__PURE__ */ function(o) {
14137
+ var De = /* @__PURE__ */ C("eventEmitter"), va = /* @__PURE__ */ C("listeners"), yg = /* @__PURE__ */ function(o) {
14138
14138
  function t(e) {
14139
14139
  var r, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0;
14140
14140
  w(this, t);
@@ -14221,7 +14221,7 @@ var XI = Object.defineProperty, ZI = Object.getOwnPropertyDescriptor, Ec = funct
14221
14221
  for (var a = n > 1 ? void 0 : n ? ZI(e, r) : e, i = t.length - 1, s; i >= 0; i--)
14222
14222
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
14223
14223
  return n && a && XI(e, r, a), a;
14224
- }, kg = (Br = /* @__PURE__ */ E("pluginSocketHandler"), oi = /* @__PURE__ */ E("chatSocketHandler"), et = /* @__PURE__ */ E("context"), /* @__PURE__ */ function() {
14224
+ }, kg = (Br = /* @__PURE__ */ C("pluginSocketHandler"), oi = /* @__PURE__ */ C("chatSocketHandler"), et = /* @__PURE__ */ C("context"), /* @__PURE__ */ function() {
14225
14225
  function o(t, e, r, n) {
14226
14226
  w(this, o), this.plugins = void 0, Object.defineProperty(this, Br, { writable: !0, value: void 0 }), Object.defineProperty(this, oi, { writable: !0, value: void 0 }), Object.defineProperty(this, et, { writable: !0, value: void 0 }), l(this, Br)[Br] = e, l(this, oi)[oi] = r, l(this, et)[et] = t, this.plugins = n, this.setupEvents();
14227
14227
  }
@@ -14527,7 +14527,7 @@ Ec([O.trace("PluginController.getRoomPlugins")], il.prototype, "getRoomPlugins",
14527
14527
  Ec([O.trace("PluginController.enableForSelf")], il.prototype, "enablePlugin", 1);
14528
14528
  Ec([O.trace("PluginController.disableForSelf")], il.prototype, "disablePlugin", 1);
14529
14529
  Ec([O.trace("PluginController.setupEvents")], il.prototype, "setupEvents", 1);
14530
- var tu = /* @__PURE__ */ E("context"), xI = /* @__PURE__ */ function() {
14530
+ var tu = /* @__PURE__ */ C("context"), xI = /* @__PURE__ */ function() {
14531
14531
  function o(t) {
14532
14532
  w(this, o), this.mediaJoined = void 0, this.socketJoined = void 0, this.socketJoinAttempted = void 0, this.mediaJoinAttempted = void 0, this.socketState = void 0, this.mediaState = void 0, Object.defineProperty(this, tu, { writable: !0, value: void 0 }), this.mediaJoined = !1, this.socketJoined = !1, this.socketJoinAttempted = !1, this.mediaJoinAttempted = !1, this.socketState = { state: void 0, reconnected: !1, reconnectionAttempt: void 0 }, this.mediaState = { recv: void 0, send: void 0 }, l(this, tu)[tu] = t;
14533
14533
  }
@@ -14563,7 +14563,7 @@ var tu = /* @__PURE__ */ E("context"), xI = /* @__PURE__ */ function() {
14563
14563
  for (var a = n > 1 ? void 0 : n ? rM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
14564
14564
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
14565
14565
  return n && a && eM(e, r, a), a;
14566
- }, Qs = (Pi = /* @__PURE__ */ E("self"), ui = /* @__PURE__ */ E("context"), li = /* @__PURE__ */ E("update"), /* @__PURE__ */ function(o) {
14566
+ }, Qs = (Pi = /* @__PURE__ */ C("self"), ui = /* @__PURE__ */ C("context"), li = /* @__PURE__ */ C("update"), /* @__PURE__ */ function(o) {
14567
14567
  function t(e, r) {
14568
14568
  var n;
14569
14569
  w(this, t);
@@ -14752,7 +14752,7 @@ var nM = Object.defineProperty, aM = Object.getOwnPropertyDescriptor, iM = funct
14752
14752
  for (var a = n > 1 ? void 0 : n ? aM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
14753
14753
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
14754
14754
  return n && a && nM(e, r, a), a;
14755
- }, fa = /* @__PURE__ */ E("context"), bg = /* @__PURE__ */ function() {
14755
+ }, fa = /* @__PURE__ */ C("context"), bg = /* @__PURE__ */ function() {
14756
14756
  function o(t, e, r) {
14757
14757
  w(this, o), this.recording = void 0, this.room = void 0, Object.defineProperty(this, fa, { writable: !0, value: void 0 }), l(this, fa)[fa] = t, this.recording = new Qs(t, e), this.room = r, this.setupEvents();
14758
14758
  }
@@ -14819,7 +14819,7 @@ var nM = Object.defineProperty, aM = Object.getOwnPropertyDescriptor, iM = funct
14819
14819
  } }]);
14820
14820
  }();
14821
14821
  iM([O.trace("RecordingController.setupEvents")], bg.prototype, "setupEvents", 1);
14822
- var ga = /* @__PURE__ */ E("context"), sM = /* @__PURE__ */ function() {
14822
+ var ga = /* @__PURE__ */ C("context"), sM = /* @__PURE__ */ function() {
14823
14823
  function o(t) {
14824
14824
  w(this, o), Object.defineProperty(this, ga, { writable: !0, value: void 0 }), l(this, ga)[ga] = t;
14825
14825
  }
@@ -14865,7 +14865,7 @@ var ga = /* @__PURE__ */ E("context"), sM = /* @__PURE__ */ function() {
14865
14865
  for (var a = n > 1 ? void 0 : n ? cM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
14866
14866
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
14867
14867
  return n && a && lM(e, r, a), a;
14868
- }, je = /* @__PURE__ */ E("mediaInterface"), me = /* @__PURE__ */ E("audioMediaHandler"), fe = /* @__PURE__ */ E("videoMediaHandler"), Wt = /* @__PURE__ */ E("audioOutputMediaHandler"), Qr = /* @__PURE__ */ E("screenShareMediaHandler"), nu = /* @__PURE__ */ E("autoSwitchDevice"), Ee = /* @__PURE__ */ E("context"), Nt = /* @__PURE__ */ function(o) {
14868
+ }, je = /* @__PURE__ */ C("mediaInterface"), me = /* @__PURE__ */ C("audioMediaHandler"), fe = /* @__PURE__ */ C("videoMediaHandler"), Wt = /* @__PURE__ */ C("audioOutputMediaHandler"), Qr = /* @__PURE__ */ C("screenShareMediaHandler"), nu = /* @__PURE__ */ C("autoSwitchDevice"), Ee = /* @__PURE__ */ C("context"), Nt = /* @__PURE__ */ function(o) {
14869
14869
  function t(e, r) {
14870
14870
  var n, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : tc, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0;
14871
14871
  w(this, t);
@@ -14998,8 +14998,8 @@ var ga = /* @__PURE__ */ E("context"), sM = /* @__PURE__ */ function() {
14998
14998
  case 56:
14999
14999
  g = y.sent, l(this, Ee)[Ee].getValue("callstats").selectedDevice("AUDIO", g);
15000
15000
  case 58:
15001
- (i = l(this, Wt)[Wt].currentDevice) !== null && i !== void 0 && i.deviceId && l(this, Ee)[Ee].getValue("callstats").selectedDevice("SPEAKER", l(this, Wt)[Wt].currentDevice), l(this, je)[je].onDeviceChange(function(b, C, T) {
15002
- s.onDeviceChange(C, T);
15001
+ (i = l(this, Wt)[Wt].currentDevice) !== null && i !== void 0 && i.deviceId && l(this, Ee)[Ee].getValue("callstats").selectedDevice("SPEAKER", l(this, Wt)[Wt].currentDevice), l(this, je)[je].onDeviceChange(function(b, E, T) {
15002
+ s.onDeviceChange(E, T);
15003
15003
  });
15004
15004
  case 60:
15005
15005
  case "end":
@@ -15351,31 +15351,31 @@ var ga = /* @__PURE__ */ E("context"), sM = /* @__PURE__ */ function() {
15351
15351
  c = !1, a == null || (s = a.added) === null || s === void 0 || s.reverse().forEach(/* @__PURE__ */ function() {
15352
15352
  var f = m(/* @__PURE__ */ h().mark(function g(k) {
15353
15353
  var y;
15354
- return h().wrap(function(C) {
15354
+ return h().wrap(function(E) {
15355
15355
  for (; ; )
15356
- switch (C.prev = C.next) {
15356
+ switch (E.prev = E.next) {
15357
15357
  case 0:
15358
15358
  if (!(k && !tc(k))) {
15359
- C.next = 10;
15359
+ E.next = 10;
15360
15360
  break;
15361
15361
  }
15362
15362
  if (!(k.kind === "audioinput" && ((y = u.audioTrack) === null || y === void 0 ? void 0 : y.enabled) === !0)) {
15363
- C.next = 6;
15363
+ E.next = 6;
15364
15364
  break;
15365
15365
  }
15366
- return C.next = 4, u.setAudioDevice(k, { saveDevicePreference: !1 });
15366
+ return E.next = 4, u.setAudioDevice(k, { saveDevicePreference: !1 });
15367
15367
  case 4:
15368
- C.next = 10;
15368
+ E.next = 10;
15369
15369
  break;
15370
15370
  case 6:
15371
15371
  if (k.kind !== "audiooutput") {
15372
- C.next = 10;
15372
+ E.next = 10;
15373
15373
  break;
15374
15374
  }
15375
- return c = !0, C.next = 10, u.setSpeakerDevice(k, { saveDevicePreference: !1 });
15375
+ return c = !0, E.next = 10, u.setSpeakerDevice(k, { saveDevicePreference: !1 });
15376
15376
  case 10:
15377
15377
  case "end":
15378
- return C.stop();
15378
+ return E.stop();
15379
15379
  }
15380
15380
  }, g);
15381
15381
  }));
@@ -15587,7 +15587,7 @@ function Fd() {
15587
15587
  }, o, null, [[9, 15]]);
15588
15588
  })), Fd.apply(this, arguments);
15589
15589
  }
15590
- var ma = /* @__PURE__ */ E("middlewareWebWorkerInterval"), au = /* @__PURE__ */ E("context"), hM = /* @__PURE__ */ function() {
15590
+ var ma = /* @__PURE__ */ C("middlewareWebWorkerInterval"), au = /* @__PURE__ */ C("context"), hM = /* @__PURE__ */ function() {
15591
15591
  function o(t) {
15592
15592
  w(this, o), Object.defineProperty(this, ma, { writable: !0, value: void 0 }), Object.defineProperty(this, au, { writable: !0, value: void 0 }), l(this, au)[au] = t;
15593
15593
  }
@@ -15709,11 +15709,11 @@ function mM(o) {
15709
15709
  }
15710
15710
  return t.video = o.video.quality, t;
15711
15711
  }
15712
- var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"), yM = /* @__PURE__ */ function() {
15712
+ var ya = /* @__PURE__ */ C("mediaConstraints"), kt = /* @__PURE__ */ C("context"), yM = /* @__PURE__ */ function() {
15713
15713
  function o(t, e) {
15714
15714
  var r = this;
15715
15715
  w(this, o), Object.defineProperty(this, ya, { writable: !0, value: void 0 }), Object.defineProperty(this, kt, { writable: !0, value: void 0 }), this.getScreenShareConstraints = function() {
15716
- var n, a, i, s, u, c, d, p, v, f = (n = l(r, ya)[ya]) === null || n === void 0 ? void 0 : n.screenshare, g = (a = f == null || (i = f.width) === null || i === void 0 ? void 0 : i.max) !== null && a !== void 0 ? a : 1920, k = (s = f == null || (u = f.height) === null || u === void 0 ? void 0 : u.max) !== null && s !== void 0 ? s : 1080, y = (c = f == null || (d = f.frameRate) === null || d === void 0 ? void 0 : d.max) !== null && c !== void 0 ? c : 5, b = (p = f == null || (v = f.frameRate) === null || v === void 0 ? void 0 : v.ideal) !== null && p !== void 0 ? p : 5, C = f == null ? void 0 : f.displaySurface, T = f == null ? void 0 : f.selfBrowserSurface;
15716
+ var n, a, i, s, u, c, d, p, v, f = (n = l(r, ya)[ya]) === null || n === void 0 ? void 0 : n.screenshare, g = (a = f == null || (i = f.width) === null || i === void 0 ? void 0 : i.max) !== null && a !== void 0 ? a : 1920, k = (s = f == null || (u = f.height) === null || u === void 0 ? void 0 : u.max) !== null && s !== void 0 ? s : 1080, y = (c = f == null || (d = f.frameRate) === null || d === void 0 ? void 0 : d.max) !== null && c !== void 0 ? c : 5, b = (p = f == null || (v = f.frameRate) === null || v === void 0 ? void 0 : v.ideal) !== null && p !== void 0 ? p : 5, E = f == null ? void 0 : f.displaySurface, T = f == null ? void 0 : f.selfBrowserSurface;
15717
15717
  if (l(r, kt)[kt].getValue("flagsmith").getValue(ge.VAL_MIN_FRAMERATE)) {
15718
15718
  var S;
15719
15719
  b = parseInt((S = l(r, kt)[kt].getValue("flagsmith").getValue(ge.VAL_MIN_FRAMERATE)) === null || S === void 0 ? void 0 : S.toString(), 10);
@@ -15723,7 +15723,7 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
15723
15723
  var I, _ = (I = l(r, kt)[kt].getValue("flagsmith").getValue(ge.SCREENSHARE_CONSTRAINTS)) === null || I === void 0 ? void 0 : I.toString();
15724
15724
  D = JSON.parse(_);
15725
15725
  }
15726
- return C !== void 0 && ["monitor", "browser", "window"].includes(C) && (D = N(N({}, D), {}, { displaySurface: C })), T !== void 0 && (D = N(N({}, D), {}, { selfBrowserSurface: T })), { audio: !0, video: D };
15726
+ return E !== void 0 && ["monitor", "browser", "window"].includes(E) && (D = N(N({}, D), {}, { displaySurface: E })), T !== void 0 && (D = N(N({}, D), {}, { selfBrowserSurface: T })), { audio: !0, video: D };
15727
15727
  }, this.getAudioConstraints = function(n) {
15728
15728
  var a, i, s, u, c = {}, d = (a = l(r, ya)[ya]) === null || a === void 0 ? void 0 : a.audio, p = d != null && d.enableStereo ? 2 : 1;
15729
15729
  if (br.isFirefox() || br.isWebKitBased()) {
@@ -15846,7 +15846,7 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
15846
15846
  for (var a = n > 1 ? void 0 : n ? TM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
15847
15847
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
15848
15848
  return n && a && bM(e, r, a), a;
15849
- }, an = (ci = /* @__PURE__ */ E("deviceChangeAbortController"), qr = /* @__PURE__ */ E("constraintsBuilder"), Ae = /* @__PURE__ */ E("context"), /* @__PURE__ */ function(o) {
15849
+ }, an = (ci = /* @__PURE__ */ C("deviceChangeAbortController"), qr = /* @__PURE__ */ C("constraintsBuilder"), Ae = /* @__PURE__ */ C("context"), /* @__PURE__ */ function(o) {
15850
15850
  function t(e, r) {
15851
15851
  var n;
15852
15852
  return w(this, t), n = R(this, t), Object.defineProperty(n, ci, { writable: !0, value: void 0 }), Object.defineProperty(n, qr, { writable: !0, value: void 0 }), Object.defineProperty(n, Ae, { writable: !0, value: void 0 }), l(n, Ae)[Ae] = e, l(n, qr)[qr] = new yM(e, r), l(n, ci)[ci] = new AbortController(), n;
@@ -15893,7 +15893,7 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
15893
15893
  return this.permissions[r] = a, l(this, Ae)[Ae].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_ERROR, { message: a, constraints: n.constraints, kind: r }), a;
15894
15894
  } }, { key: "getAudioAndVideoTrack", value: function() {
15895
15895
  var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
15896
- var s, u, c, d, p, v, f, g, k, y, b, C, T, S, D, I, _;
15896
+ var s, u, c, d, p, v, f, g, k, y, b, E, T, S, D, I, _;
15897
15897
  return h().wrap(function(U) {
15898
15898
  for (; ; )
15899
15899
  switch (U.prev = U.next) {
@@ -15908,7 +15908,7 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
15908
15908
  return $.deviceId === i;
15909
15909
  })), i && g ? k = i : d && (u = d[0]) !== null && u !== void 0 && u.deviceId && (k = (y = d[0]) === null || y === void 0 ? void 0 : y.deviceId), b = { audio: l(this, qr)[qr].getAudioConstraints(v).audio, video: l(this, qr)[qr].getVideoConstraints(k).video }, this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", { constraints: JSON.stringify(b) }), U.next = 15, navigator.mediaDevices.getUserMedia(b);
15910
15910
  case 15:
15911
- if (C = U.sent, this.logger.info("getUserMediaWithoutTimeout::received_user_media", { constraints: JSON.stringify(b) }), T = C.getAudioTracks()[0], S = C.getVideoTracks()[0], this.permissions.audio = "ACCEPTED", this.permissions.video = "ACCEPTED", D = l(this, Ae)[Ae].getValue("flagsmith").hasFeature(ge.OBS_QUALITY), !(D && S.label.includes("OBS Virtual"))) {
15911
+ if (E = U.sent, this.logger.info("getUserMediaWithoutTimeout::received_user_media", { constraints: JSON.stringify(b) }), T = E.getAudioTracks()[0], S = E.getVideoTracks()[0], this.permissions.audio = "ACCEPTED", this.permissions.video = "ACCEPTED", D = l(this, Ae)[Ae].getValue("flagsmith").hasFeature(ge.OBS_QUALITY), !(D && S.label.includes("OBS Virtual"))) {
15912
15912
  U.next = 30;
15913
15913
  break;
15914
15914
  }
@@ -15936,14 +15936,14 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
15936
15936
  }() }, { key: "getAudioTrack", value: function() {
15937
15937
  var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
15938
15938
  var s, u, c, d = this, p, v, f, g, k, y;
15939
- return h().wrap(function(C) {
15939
+ return h().wrap(function(E) {
15940
15940
  for (; ; )
15941
- switch (C.prev = C.next) {
15941
+ switch (E.prev = E.next) {
15942
15942
  case 0:
15943
- return C.next = 2, this.getAudioInputDevices();
15943
+ return E.next = 2, this.getAudioInputDevices();
15944
15944
  case 2:
15945
- if (p = C.sent, (s = p) !== null && s !== void 0 && s.length) {
15946
- C.next = 7;
15945
+ if (p = E.sent, (s = p) !== null && s !== void 0 && s.length) {
15946
+ E.next = 7;
15947
15947
  break;
15948
15948
  }
15949
15949
  throw this.permissions.audio = "NO_DEVICES_AVAILABLE", l(this, Ae)[Ae].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" }), new j("No audio devices available", "1606");
@@ -15985,14 +15985,14 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
15985
15985
  return function(D) {
15986
15986
  return T.apply(this, arguments);
15987
15987
  };
15988
- }(), C.prev = 10, C.next = 13, k(f);
15988
+ }(), E.prev = 10, E.next = 13, k(f);
15989
15989
  case 13:
15990
- return y = C.sent, y.enabled = !a, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", l(this, Ae)[Ae].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" })), C.abrupt("return", y);
15990
+ return y = E.sent, y.enabled = !a, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", l(this, Ae)[Ae].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.audio, kind: "audio" })), E.abrupt("return", y);
15991
15991
  case 19:
15992
- throw C.prev = 19, C.t0 = C.catch(10), C.t0.constraints && this.handlePermissionErrors("audio", C.t0), new j(C.t0.message, "1601");
15992
+ throw E.prev = 19, E.t0 = E.catch(10), E.t0.constraints && this.handlePermissionErrors("audio", E.t0), new j(E.t0.message, "1601");
15993
15993
  case 23:
15994
15994
  case "end":
15995
- return C.stop();
15995
+ return E.stop();
15996
15996
  }
15997
15997
  }, n, this, [[10, 19]]);
15998
15998
  }));
@@ -16002,7 +16002,7 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
16002
16002
  return r;
16003
16003
  }() }, { key: "getVideoTrack", value: function() {
16004
16004
  var e = m(/* @__PURE__ */ h().mark(function n(a) {
16005
- var i, s, u = this, c, d, p, v, f, g, k, y, b, C;
16005
+ var i, s, u = this, c, d, p, v, f, g, k, y, b, E;
16006
16006
  return h().wrap(function(S) {
16007
16007
  for (; ; )
16008
16008
  switch (S.prev = S.next) {
@@ -16069,7 +16069,7 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
16069
16069
  };
16070
16070
  }(), S.prev = 24, b = l(this, qr)[qr].getVideoConstraints(g), S.next = 28, y(b);
16071
16071
  case 28:
16072
- return C = S.sent, this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", l(this, Ae)[Ae].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" })), S.abrupt("return", C);
16072
+ return E = S.sent, this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", l(this, Ae)[Ae].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, { message: this.permissions.video, kind: "video" })), S.abrupt("return", E);
16073
16073
  case 33:
16074
16074
  throw S.prev = 33, S.t3 = S.catch(24), S.t3.constraints && this.handlePermissionErrors("video", S.t3), new j(S.t3.message, "1602");
16075
16075
  case 37:
@@ -16172,7 +16172,7 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
16172
16172
  case 2:
16173
16173
  return a = c.sent, i = function(p) {
16174
16174
  var v, f = ((v = p.label) === null || v === void 0 ? void 0 : v.toLowerCase()) || "";
16175
- return tc(p) ? 4 : p.deviceId === "default" || f.includes("default") ? 0 : (f.includes("airpods") || f.includes("bluetooth") || f.includes("wireless") || f.includes("headphones") || f.includes("headset") || f.includes("earbuds") || f.includes("usb") || f.includes("external")) && !f.includes("default") ? 1 : f.includes("built-in") || f.includes("internal") ? 2 : 3;
16175
+ return tc(p) ? 4 : f.includes("airpods") || f.includes("airdopes") || f.includes("bluetooth") || f.includes("wireless") || f.includes("headphones") || f.includes("headset") || f.includes("earbuds") || f.includes("usb") || f.includes("external") ? 0 : p.deviceId === "default" || f.includes("default") ? 1 : f.includes("built-in") || f.includes("internal") ? 2 : 3;
16176
16176
  }, s = function(p) {
16177
16177
  var v;
16178
16178
  if (p.kind !== "videoinput")
@@ -16180,14 +16180,19 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
16180
16180
  var f = ((v = p.label) === null || v === void 0 ? void 0 : v.toLowerCase()) || "";
16181
16181
  return f.includes("front") || f.includes("user") || f.includes("selfie") ? !0 : !(f.includes("back") || f.includes("rear") || f.includes("environment"));
16182
16182
  }, c.abrupt("return", a.sort(function(d, p) {
16183
- var v = i(d), f = i(p);
16184
- if (v !== f)
16185
- return v - f;
16186
- if (v === f && d.kind === "videoinput" && p.kind === "videoinput") {
16187
- var g = s(d), k = s(p);
16188
- if (g && !k)
16183
+ var v, f, g = i(d), k = i(p);
16184
+ if (g !== k)
16185
+ return g - k;
16186
+ var y = d.deviceId === "default" || ((v = d.label) === null || v === void 0 ? void 0 : v.toLowerCase().includes("default")), b = p.deviceId === "default" || ((f = p.label) === null || f === void 0 ? void 0 : f.toLowerCase().includes("default"));
16187
+ if (y && !b)
16188
+ return -1;
16189
+ if (!y && b)
16190
+ return 1;
16191
+ if (d.kind === "videoinput" && p.kind === "videoinput") {
16192
+ var E = s(d), T = s(p);
16193
+ if (E && !T)
16189
16194
  return -1;
16190
- if (!g && k)
16195
+ if (!E && T)
16191
16196
  return 1;
16192
16197
  }
16193
16198
  return 0;
@@ -16287,7 +16292,7 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
16287
16292
  case 3:
16288
16293
  s = c.sent, navigator.mediaDevices.addEventListener("devicechange", /* @__PURE__ */ function() {
16289
16294
  var d = m(/* @__PURE__ */ h().mark(function p(v) {
16290
- var f, g, k, y, b, C, T, S;
16295
+ var f, g, k, y, b, E, T, S;
16291
16296
  return h().wrap(function(I) {
16292
16297
  for (; ; )
16293
16298
  switch (I.prev = I.next) {
@@ -16298,12 +16303,12 @@ var ya = /* @__PURE__ */ E("mediaConstraints"), kt = /* @__PURE__ */ E("context"
16298
16303
  return k(_);
16299
16304
  })), I.next = 4, i.getAvailableDevices();
16300
16305
  case 4:
16301
- b = I.sent, C = new Set(b.map(function(_) {
16306
+ b = I.sent, E = new Set(b.map(function(_) {
16302
16307
  return k(_);
16303
16308
  })), T = { added: b.filter(function(_) {
16304
16309
  return !y.has(k(_));
16305
16310
  }), removed: s.filter(function(_) {
16306
- return !C.has(k(_));
16311
+ return !E.has(k(_));
16307
16312
  }), devices: b }, s = b, ((f = T.added) !== null && f !== void 0 && f.length || (g = T.removed) !== null && g !== void 0 && g.length) && (i.logger.info("repopulated_full_device_list", { devices: JSON.stringify(b) }), S = [].concat(Pe(T.added), Pe(T.removed)), S.some(function(_) {
16308
16313
  return _.kind === "audioinput";
16309
16314
  }) && l(i, Ae)[Ae].getValue("callstats").devices("AUDIO", b == null ? void 0 : b.filter(function(_) {
@@ -16783,19 +16788,19 @@ var Pg = nc, _M = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, W
16783
16788
  }
16784
16789
  throw this.logger.warn("AudioMediaHandler.setDevice Received non audio device"), new j("Non audio device received while setting device!", "1603");
16785
16790
  case 6:
16786
- return u.prev = 6, i = this.trackEnabled, u.t0 = this, u.next = 11, this.mediaInterface.getAudioTrack(!i, this.userSelectedDevice);
16787
- case 11:
16788
- return u.t1 = u.sent, u.next = 14, u.t0.setMediaTrack.call(u.t0, u.t1);
16789
- case 14:
16790
- u.next = 21;
16791
+ return u.prev = 6, i = this.trackEnabled, this.disableTrack(), u.t0 = this, u.next = 12, this.mediaInterface.getAudioTrack(!i, this.userSelectedDevice);
16792
+ case 12:
16793
+ return u.t1 = u.sent, u.next = 15, u.t0.setMediaTrack.call(u.t0, u.t1);
16794
+ case 15:
16795
+ u.next = 22;
16791
16796
  break;
16792
- case 16:
16793
- throw u.prev = 16, u.t2 = u.catch(6), this.logger.error("AudioMediaHandler.setDevice.error", { error: u.t2 }), this.disableTrack(), new j(u.t2.message, "1604");
16794
- case 21:
16797
+ case 17:
16798
+ throw u.prev = 17, u.t2 = u.catch(6), this.logger.error("AudioMediaHandler.setDevice.error", { error: u.t2 }), this.disableTrack(), new j(u.t2.message, "1604");
16799
+ case 22:
16795
16800
  case "end":
16796
16801
  return u.stop();
16797
16802
  }
16798
- }, n, this, [[6, 16]]);
16803
+ }, n, this, [[6, 17]]);
16799
16804
  }));
16800
16805
  function r(n) {
16801
16806
  return e.apply(this, arguments);
@@ -16909,16 +16914,16 @@ var Pg = nc, _M = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, W
16909
16914
  case 5:
16910
16915
  return u = a, b.next = 8, this.mediaInterface.getAudioInputDevices();
16911
16916
  case 8:
16912
- if (c = b.sent, d = this.isNonPreferredDevice ? c.filter(function(C) {
16913
- return C && !i.isNonPreferredDevice(C);
16917
+ if (c = b.sent, d = this.isNonPreferredDevice ? c.filter(function(E) {
16918
+ return E && !i.isNonPreferredDevice(E);
16914
16919
  }) : c, d != null && d.length) {
16915
16920
  b.next = 12;
16916
16921
  break;
16917
16922
  }
16918
16923
  return b.abrupt("return", u);
16919
16924
  case 12:
16920
- if (d.find(function(C) {
16921
- return C.deviceId === a.getSettings().deviceId;
16925
+ if (d.find(function(E) {
16926
+ return E.deviceId === a.getSettings().deviceId;
16922
16927
  })) {
16923
16928
  b.next = 18;
16924
16929
  break;
@@ -16927,8 +16932,8 @@ var Pg = nc, _M = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, W
16927
16932
  case 17:
16928
16933
  u = b.sent;
16929
16934
  case 18:
16930
- if (p = JSON.parse(Bs.getItem(Zc, this.logger)), !(p != null && p.devices.some(function(C) {
16931
- return C.label === u.label;
16935
+ if (p = JSON.parse(Bs.getItem(Zc, this.logger)), !(p != null && p.devices.some(function(E) {
16936
+ return E.label === u.label;
16932
16937
  }))) {
16933
16938
  b.next = 21;
16934
16939
  break;
@@ -16943,10 +16948,10 @@ var Pg = nc, _M = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, W
16943
16948
  }
16944
16949
  return f = (v = p == null ? void 0 : p.devices.concat({ label: u.label })) !== null && v !== void 0 ? v : [{ label: u.label }], Bs.setItem(Zc, JSON.stringify({ devices: f }), this.logger), b.abrupt("return", u);
16945
16950
  case 27:
16946
- return this.logger.info("AudioMediaHandler.conditionallyChangeTrack.DetectedSilentTrack"), g = u.getSettings().deviceId, d.filter(function(C) {
16947
- return C.deviceId !== g;
16951
+ return this.logger.info("AudioMediaHandler.conditionallyChangeTrack.DetectedSilentTrack"), g = u.getSettings().deviceId, d.filter(function(E) {
16952
+ return E.deviceId !== g;
16948
16953
  }).some(/* @__PURE__ */ function() {
16949
- var C = m(/* @__PURE__ */ h().mark(function T(S) {
16954
+ var E = m(/* @__PURE__ */ h().mark(function T(S) {
16950
16955
  var D, I;
16951
16956
  return h().wrap(function(V) {
16952
16957
  for (; ; )
@@ -16970,7 +16975,7 @@ var Pg = nc, _M = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, W
16970
16975
  }, T);
16971
16976
  }));
16972
16977
  return function(T) {
16973
- return C.apply(this, arguments);
16978
+ return E.apply(this, arguments);
16974
16979
  };
16975
16980
  }()), b.abrupt("return", u);
16976
16981
  case 31:
@@ -16988,7 +16993,7 @@ var Pg = nc, _M = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, W
16988
16993
  Wp([O.trace("AudioMediaHandler.setTransformedTrack")], Cc.prototype, "setTransformedTrack", 1);
16989
16994
  Wp([O.trace("AudioMediaHandler.onTrackEnded")], Cc.prototype, "onTrackEnded", 1);
16990
16995
  Wp([O.trace("AudioMediaHandler.conditionallyChangeTrack")], Cc.prototype, "conditionallyChangeTrack", 1);
16991
- var DM = Cc, ka = /* @__PURE__ */ E("mediaInterface"), LM = /* @__PURE__ */ function() {
16996
+ var DM = Cc, ka = /* @__PURE__ */ C("mediaInterface"), LM = /* @__PURE__ */ function() {
16992
16997
  function o(t, e) {
16993
16998
  var r = this;
16994
16999
  w(this, o), Object.defineProperty(this, ka, { writable: !0, value: void 0 }), this.currentDevice = void 0, this.userPreferredDeviceKey = "Realtimekit::speaker::UserDeviceID", this.logger = void 0, this.setUserPreferredDevice = function(n) {
@@ -17061,7 +17066,7 @@ var DM = Cc, ka = /* @__PURE__ */ E("mediaInterface"), LM = /* @__PURE__ */ func
17061
17066
  return y.abrupt("return");
17062
17067
  case 20:
17063
17068
  g.forEach(/* @__PURE__ */ function() {
17064
- var b = m(/* @__PURE__ */ h().mark(function C(T) {
17069
+ var b = m(/* @__PURE__ */ h().mark(function E(T) {
17065
17070
  return h().wrap(function(D) {
17066
17071
  for (; ; )
17067
17072
  switch (D.prev = D.next) {
@@ -17080,9 +17085,9 @@ var DM = Cc, ka = /* @__PURE__ */ E("mediaInterface"), LM = /* @__PURE__ */ func
17080
17085
  case "end":
17081
17086
  return D.stop();
17082
17087
  }
17083
- }, C, null, [[1, 6]]);
17088
+ }, E, null, [[1, 6]]);
17084
17089
  }));
17085
- return function(C) {
17090
+ return function(E) {
17086
17091
  return b.apply(this, arguments);
17087
17092
  };
17088
17093
  }());
@@ -17097,7 +17102,7 @@ var DM = Cc, ka = /* @__PURE__ */ E("mediaInterface"), LM = /* @__PURE__ */ func
17097
17102
  }
17098
17103
  return e;
17099
17104
  }() }]);
17100
- }(), $M = LM, iu = /* @__PURE__ */ E("context"), NM = /* @__PURE__ */ function(o) {
17105
+ }(), $M = LM, iu = /* @__PURE__ */ C("context"), NM = /* @__PURE__ */ function(o) {
17101
17106
  function t(e, r) {
17102
17107
  var n;
17103
17108
  w(this, t);
@@ -17188,7 +17193,7 @@ var DM = Cc, ka = /* @__PURE__ */ E("mediaInterface"), LM = /* @__PURE__ */ func
17188
17193
  for (var a = n > 1 ? void 0 : n ? jM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
17189
17194
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
17190
17195
  return n && a && UM(e, r, a), a;
17191
- }, ds = /* @__PURE__ */ E("videoMiddlewareUtils"), su = /* @__PURE__ */ E("middlewareGlobalConfig"), ol = /* @__PURE__ */ function(o) {
17196
+ }, ds = /* @__PURE__ */ C("videoMiddlewareUtils"), su = /* @__PURE__ */ C("middlewareGlobalConfig"), ol = /* @__PURE__ */ function(o) {
17192
17197
  function t(e, r, n, a) {
17193
17198
  var i;
17194
17199
  return w(this, t), i = R(this, t, [e, r, n, a]), Object.defineProperty(i, ds, { writable: !0, value: void 0 }), Object.defineProperty(i, su, { writable: !0, value: { disablePerFrameCanvasRendering: !1 } }), l(i, ds)[ds] = new hM(e), i;
@@ -17217,19 +17222,19 @@ var DM = Cc, ka = /* @__PURE__ */ E("mediaInterface"), LM = /* @__PURE__ */ func
17217
17222
  }
17218
17223
  return this.logger.warn("VideoMediaHandler.setDevice Tried switching device with video disabled", { devices: [a] }), this.currentDevice = a, s.abrupt("return");
17219
17224
  case 10:
17220
- return s.prev = 10, s.t0 = this, s.next = 14, this.mediaInterface.getVideoTrack(this.userSelectedDevice);
17221
- case 14:
17222
- return s.t1 = s.sent, s.next = 17, s.t0.setMediaTrack.call(s.t0, s.t1);
17223
- case 17:
17224
- s.next = 24;
17225
+ return s.prev = 10, this.disableTrack(), s.t0 = this, s.next = 15, this.mediaInterface.getVideoTrack(this.userSelectedDevice);
17226
+ case 15:
17227
+ return s.t1 = s.sent, s.next = 18, s.t0.setMediaTrack.call(s.t0, s.t1);
17228
+ case 18:
17229
+ s.next = 25;
17225
17230
  break;
17226
- case 19:
17227
- throw s.prev = 19, s.t2 = s.catch(10), this.logger.error("VideoMediaHandler.setDevice.error", { error: s.t2 }), this.disableTrack(), new j("Failed to change device", "1600", this.logger);
17228
- case 24:
17231
+ case 20:
17232
+ throw s.prev = 20, s.t2 = s.catch(10), this.logger.error("VideoMediaHandler.setDevice.error", { error: s.t2 }), this.disableTrack(), new j("Failed to change device", "1600", this.logger);
17233
+ case 25:
17229
17234
  case "end":
17230
17235
  return s.stop();
17231
17236
  }
17232
- }, n, this, [[10, 19]]);
17237
+ }, n, this, [[10, 20]]);
17233
17238
  }));
17234
17239
  function r(n) {
17235
17240
  return e.apply(this, arguments);
@@ -17435,7 +17440,7 @@ Rc([O.trace("VideoMediaHandler.setTransformedTrack")], ol.prototype, "setTransfo
17435
17440
  Rc([O.trace("VideoMediaHandler.setVideoMiddlewareGlobalConfig")], ol.prototype, "setVideoMiddlewareGlobalConfig", 1);
17436
17441
  Rc([O.trace("VideoMediaHandler.onTrackEnded")], ol.prototype, "onTrackEnded", 1);
17437
17442
  Rc([O.trace("VideoMediaHandler.conditionallyChangeTrack")], ol.prototype, "conditionallyChangeTrack", 1);
17438
- var FM = ol, mv = jn(Np()), Rr = /* @__PURE__ */ E("config"), ba = /* @__PURE__ */ E("theme"), ou = /* @__PURE__ */ E("name"), ps = /* @__PURE__ */ E("pluginsConfig"), HM = /* @__PURE__ */ function() {
17443
+ var FM = ol, mv = jn(Np()), Rr = /* @__PURE__ */ C("config"), ba = /* @__PURE__ */ C("theme"), ou = /* @__PURE__ */ C("name"), ps = /* @__PURE__ */ C("pluginsConfig"), HM = /* @__PURE__ */ function() {
17439
17444
  function o(t) {
17440
17445
  if (w(this, o), Object.defineProperty(this, Rr, { writable: !0, value: void 0 }), Object.defineProperty(this, ba, { writable: !0, value: void 0 }), Object.defineProperty(this, ou, { writable: !0, value: void 0 }), Object.defineProperty(this, ps, { writable: !0, value: void 0 }), !t)
17441
17446
  throw new j("Could not load preset.", "0904");
@@ -17576,7 +17581,7 @@ var FM = ol, mv = jn(Np()), Rr = /* @__PURE__ */ E("config"), ba = /* @__PURE__
17576
17581
  for (var a = n > 1 ? void 0 : n ? qM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
17577
17582
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
17578
17583
  return n && a && BM(e, r, a), a;
17579
- }, hs = /* @__PURE__ */ E("self"), uu = /* @__PURE__ */ E("context"), Jp = /* @__PURE__ */ function(o) {
17584
+ }, hs = /* @__PURE__ */ C("self"), uu = /* @__PURE__ */ C("context"), Jp = /* @__PURE__ */ function(o) {
17580
17585
  function t(e, r) {
17581
17586
  var n;
17582
17587
  w(this, t);
@@ -17668,7 +17673,7 @@ var GM = Object.defineProperty, WM = Object.getOwnPropertyDescriptor, JM = funct
17668
17673
  for (var a = n > 1 ? void 0 : n ? WM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
17669
17674
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
17670
17675
  return n && a && GM(e, r, a), a;
17671
- }, vs = /* @__PURE__ */ E("livestreamingPeerId"), fs = /* @__PURE__ */ E("self"), Jt = /* @__PURE__ */ E("livestreamSocketHandler"), bt = /* @__PURE__ */ E("context"), Eg = /* @__PURE__ */ function() {
17676
+ }, vs = /* @__PURE__ */ C("livestreamingPeerId"), fs = /* @__PURE__ */ C("self"), Jt = /* @__PURE__ */ C("livestreamSocketHandler"), bt = /* @__PURE__ */ C("context"), Eg = /* @__PURE__ */ function() {
17672
17677
  function o(t, e, r) {
17673
17678
  w(this, o), this.livestream = void 0, Object.defineProperty(this, vs, { writable: !0, value: void 0 }), Object.defineProperty(this, fs, { writable: !0, value: void 0 }), Object.defineProperty(this, Jt, { writable: !0, value: void 0 }), Object.defineProperty(this, bt, { writable: !0, value: void 0 }), l(this, bt)[bt] = t, l(this, fs)[fs] = e, this.livestream = new Jp(t, e), l(this, Jt)[Jt] = r, this.setupEvents();
17674
17679
  }
@@ -17838,7 +17843,7 @@ var KM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, ul = funct
17838
17843
  for (var a = n > 1 ? void 0 : n ? zM(e, r) : e, i = t.length - 1, s; i >= 0; i--)
17839
17844
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
17840
17845
  return n && a && KM(e, r, a), a;
17841
- }, ir = /* @__PURE__ */ E("data"), Cn = /* @__PURE__ */ E("meetingId"), Rn = /* @__PURE__ */ E("socketHandler"), xc = /* @__PURE__ */ E("update"), qo = /* @__PURE__ */ function() {
17846
+ }, ir = /* @__PURE__ */ C("data"), Cn = /* @__PURE__ */ C("meetingId"), Rn = /* @__PURE__ */ C("socketHandler"), xc = /* @__PURE__ */ C("update"), qo = /* @__PURE__ */ function() {
17842
17847
  function o(t) {
17843
17848
  var e = t.name, r = t.socketHandler, n = t.meetingId;
17844
17849
  w(this, o), Object.defineProperty(this, xc, { value: YM }), this.name = "", Object.defineProperty(this, ir, { writable: !0, value: {} }), Object.defineProperty(this, Cn, { writable: !0, value: "" }), Object.defineProperty(this, Rn, { writable: !0, value: void 0 }), this.rateLimitConfig = { maxInvocations: 5, period: 1 }, this.bulkRateLimitConfig = { maxInvocations: 5, period: 1 }, this.listeners = {}, this.name = e, l(this, Rn)[Rn] = r, l(this, Cn)[Cn] = n;
@@ -18059,7 +18064,7 @@ ul([$t(Bo, "bulkRateLimitConfig")], qo.prototype, "bulkSet", 1);
18059
18064
  ul([$t(Bo, "rateLimitConfig")], qo.prototype, "update", 1);
18060
18065
  ul([$t(Bo, "rateLimitConfig")], qo.prototype, "delete", 1);
18061
18066
  ul([$t(Bo, "bulkRateLimitConfig")], qo.prototype, "bulkDelete", 1);
18062
- var Oa = /* @__PURE__ */ E("pluginSocketHandler"), Da = /* @__PURE__ */ E("meetingId"), Iu = /* @__PURE__ */ E("peerId"), Lu = /* @__PURE__ */ E("context"), Ln = /* @__PURE__ */ E("pendingInit"), ed = /* @__PURE__ */ E("setup"), QM = /* @__PURE__ */ function() {
18067
+ var Oa = /* @__PURE__ */ C("pluginSocketHandler"), Da = /* @__PURE__ */ C("meetingId"), Iu = /* @__PURE__ */ C("peerId"), Lu = /* @__PURE__ */ C("context"), Ln = /* @__PURE__ */ C("pendingInit"), ed = /* @__PURE__ */ C("setup"), QM = /* @__PURE__ */ function() {
18063
18068
  function o(t, e) {
18064
18069
  w(this, o), Object.defineProperty(this, ed, { value: ZM }), Object.defineProperty(this, Iu, { get: XM, set: void 0 }), this.stores = /* @__PURE__ */ new Map(), Object.defineProperty(this, Oa, { writable: !0, value: void 0 }), Object.defineProperty(this, Da, { writable: !0, value: "" }), Object.defineProperty(this, Lu, { writable: !0, value: void 0 }), Object.defineProperty(this, Ln, { writable: !0, value: /* @__PURE__ */ new Map() }), l(this, Oa)[Oa] = e, l(this, Da)[Da] = t.getValue("meetingId"), l(this, Lu)[Lu] = t, l(this, ed)[ed]();
18065
18070
  }
@@ -18138,7 +18143,7 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
18138
18143
  for (var a = n > 1 ? void 0 : n ? e_(e, r) : e, i = t.length - 1, s; i >= 0; i--)
18139
18144
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
18140
18145
  return n && a && xM(e, r, a), a;
18141
- }, r_ = 0.8, t_ = 1.2, Wa = (di = /* @__PURE__ */ E("isPinned"), pi = /* @__PURE__ */ E("stageStatus"), Nr = /* @__PURE__ */ E("context"), Qn = /* @__PURE__ */ E("roomNodeClient"), bn = /* @__PURE__ */ E("audioPlayback"), Xn = /* @__PURE__ */ E("mediaJoined"), hl = /* @__PURE__ */ E("socketJoined"), Mt = /* @__PURE__ */ E("self"), co = /* @__PURE__ */ E("roomSocketHandler"), mn = /* @__PURE__ */ E("videoElements"), Zn = /* @__PURE__ */ E("pip"), _t = /* @__PURE__ */ E("maxSpatialLayer"), vl = /* @__PURE__ */ E("videoDimensionsUpdated"), po = /* @__PURE__ */ E("updateVideos"), fl = /* @__PURE__ */ E("updateAudio"), gl = /* @__PURE__ */ E("updateScreenShare"), /* @__PURE__ */ function(o) {
18146
+ }, r_ = 0.8, t_ = 1.2, Wa = (di = /* @__PURE__ */ C("isPinned"), pi = /* @__PURE__ */ C("stageStatus"), Nr = /* @__PURE__ */ C("context"), Qn = /* @__PURE__ */ C("roomNodeClient"), bn = /* @__PURE__ */ C("audioPlayback"), Xn = /* @__PURE__ */ C("mediaJoined"), hl = /* @__PURE__ */ C("socketJoined"), Mt = /* @__PURE__ */ C("self"), co = /* @__PURE__ */ C("roomSocketHandler"), mn = /* @__PURE__ */ C("videoElements"), Zn = /* @__PURE__ */ C("pip"), _t = /* @__PURE__ */ C("maxSpatialLayer"), vl = /* @__PURE__ */ C("videoDimensionsUpdated"), po = /* @__PURE__ */ C("updateVideos"), fl = /* @__PURE__ */ C("updateAudio"), gl = /* @__PURE__ */ C("updateScreenShare"), /* @__PURE__ */ function(o) {
18142
18147
  function t(e, r, n, a) {
18143
18148
  var i;
18144
18149
  w(this, t);
@@ -18152,8 +18157,8 @@ var xM = Object.defineProperty, e_ = Object.getOwnPropertyDescriptor, Go = funct
18152
18157
  }
18153
18158
  }
18154
18159
  }, 2e3) }), l(i, Nr)[Nr] = e;
18155
- var u = r.id, c = r.userId, d = r.displayName, p = r.device, v = r.picture, f = r.isHost, g = r.flags, k = r.clientSpecificId, y = r.stageStatus, b = r.customParticipantId, C = r.audioMuted, T = r.audioTrack, S = r.videoEnabled, D = S === void 0 ? !1 : S, I = r.videoTrack, _ = r.producers, V = r.metadata;
18156
- return i.id = u, i.userId = c, i.name = d, i.device = p, i.picture = v, i.isHost = f, i.flags = g, i.manualProducerConfig = bP, l(i, pi)[pi] = y != null ? y : "ON_STAGE", i.customParticipantId = b != null ? b : k, i.audioEnabled = !C, i.audioTrack = T, i.videoEnabled = D, i.videoTrack = I, i.screenShareTracks = { audio: void 0, video: void 0 }, i.producers = _ != null ? _ : [], i.presetName = V == null ? void 0 : V.preset_name, l(i, di)[di] = !1, l(i, Mt)[Mt] = n, l(i, co)[co] = a, i.setupEvents(), i.updateVideo = i.updateVideo.bind(i), l(i, po)[po](), i;
18160
+ var u = r.id, c = r.userId, d = r.displayName, p = r.device, v = r.picture, f = r.isHost, g = r.flags, k = r.clientSpecificId, y = r.stageStatus, b = r.customParticipantId, E = r.audioMuted, T = r.audioTrack, S = r.videoEnabled, D = S === void 0 ? !1 : S, I = r.videoTrack, _ = r.producers, V = r.metadata;
18161
+ return i.id = u, i.userId = c, i.name = d, i.device = p, i.picture = v, i.isHost = f, i.flags = g, i.manualProducerConfig = bP, l(i, pi)[pi] = y != null ? y : "ON_STAGE", i.customParticipantId = b != null ? b : k, i.audioEnabled = !E, i.audioTrack = T, i.videoEnabled = D, i.videoTrack = I, i.screenShareTracks = { audio: void 0, video: void 0 }, i.producers = _ != null ? _ : [], i.presetName = V == null ? void 0 : V.preset_name, l(i, di)[di] = !1, l(i, Mt)[Mt] = n, l(i, co)[co] = a, i.setupEvents(), i.updateVideo = i.updateVideo.bind(i), l(i, po)[po](), i;
18157
18162
  }
18158
18163
  return A(t, o), P(t, [{ key: "clientSpecificId", get: (
18159
18164
  /**
@@ -18470,7 +18475,7 @@ var lu = /* @__PURE__ */ function(o) {
18470
18475
  var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
18471
18476
  return Ce(t, "delete", this, 3)([r, n, a]);
18472
18477
  } }]);
18473
- }(yg), An = /* @__PURE__ */ E("map"), d_ = /* @__PURE__ */ function(o) {
18478
+ }(yg), An = /* @__PURE__ */ C("map"), d_ = /* @__PURE__ */ function(o) {
18474
18479
  function t(e) {
18475
18480
  var r;
18476
18481
  return w(this, t), r = R(this, t, [e]), Object.defineProperty(r, An, { writable: !0, value: void 0 }), l(r, An)[An] = /* @__PURE__ */ new Map(), r;
@@ -18548,7 +18553,7 @@ var lu = /* @__PURE__ */ function(o) {
18548
18553
  for (var a = n > 1 ? void 0 : n ? f_(e, r) : e, i = t.length - 1, s; i >= 0; i--)
18549
18554
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
18550
18555
  return n && a && v_(e, r, a), a;
18551
- }, g_ = ["ACTIVE_GRID", "PAGINATED", "MANUAL"], Rt = (ye = /* @__PURE__ */ E("context"), ho = /* @__PURE__ */ E("roomNodeClient"), xn = /* @__PURE__ */ E("socketJoined"), hi = /* @__PURE__ */ E("mediaJoined"), ea = /* @__PURE__ */ E("self"), wr = /* @__PURE__ */ E("roomSocketHandler"), /* @__PURE__ */ function(o) {
18556
+ }, g_ = ["ACTIVE_GRID", "PAGINATED", "MANUAL"], Rt = (ye = /* @__PURE__ */ C("context"), ho = /* @__PURE__ */ C("roomNodeClient"), xn = /* @__PURE__ */ C("socketJoined"), hi = /* @__PURE__ */ C("mediaJoined"), ea = /* @__PURE__ */ C("self"), wr = /* @__PURE__ */ C("roomSocketHandler"), /* @__PURE__ */ function(o) {
18552
18557
  function t(e, r, n) {
18553
18558
  var a;
18554
18559
  w(this, t);
@@ -19113,7 +19118,7 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19113
19118
  for (var a = n > 1 ? void 0 : n ? T_(e, r) : e, i = t.length - 1, s; i >= 0; i--)
19114
19119
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
19115
19120
  return n && a && b_(e, r, a), a;
19116
- }, Rg = (Gr = /* @__PURE__ */ E("currentView"), rt = /* @__PURE__ */ E("consumersSyncing"), vi = /* @__PURE__ */ E("resyncRequired"), /* @__PURE__ */ function() {
19121
+ }, Rg = (Gr = /* @__PURE__ */ C("currentView"), rt = /* @__PURE__ */ C("consumersSyncing"), vi = /* @__PURE__ */ C("resyncRequired"), /* @__PURE__ */ function() {
19117
19122
  function o(t, e, r) {
19118
19123
  var n = this;
19119
19124
  w(this, o), this.participants = void 0, this.self = void 0, this.selectedPeers = Cg, this.maxSpatialLayerUpdates = /* @__PURE__ */ new Map(), this.consumerPeerMap = void 0, this.events = void 0, this.roomSocketHandler = void 0, this.context = void 0, this.videoPeerConsumerMap = /* @__PURE__ */ new Map(), Object.defineProperty(this, Gr, { writable: !0, value: { mode: "ACTIVE_GRID", page: 0 } }), Object.defineProperty(this, rt, { writable: !0, value: !1 }), Object.defineProperty(this, vi, { writable: !0, value: !1 }), this.updateConsumerSpatialLayers = jp(function() {
@@ -19438,17 +19443,17 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19438
19443
  return l(this, vi)[vi] = !0, this.logger.info("syncConsumers: Sync in progress, marking resyncRequired=true and exiting."), y.abrupt("return");
19439
19444
  case 7:
19440
19445
  if (this.logger.info("syncConsumers: Starting sync operation."), l(this, rt)[rt] = !0, l(this, vi)[vi] = !1, c = [], this.participants.videoSubscribed.forEach(function(b) {
19441
- var C, T, S = a.participants.joined.get(b.id), D = (C = (T = b.producers) === null || T === void 0 ? void 0 : T.filter(function(I) {
19446
+ var E, T, S = a.participants.joined.get(b.id), D = (E = (T = b.producers) === null || T === void 0 ? void 0 : T.filter(function(I) {
19442
19447
  return I.kind === "video";
19443
- })) !== null && C !== void 0 ? C : [];
19448
+ })) !== null && E !== void 0 ? E : [];
19444
19449
  S && D !== null && D !== void 0 && D.length && D.forEach(function(I) {
19445
19450
  var _, V, U, $, L = ((_ = (V = S.manualProducerConfig) === null || V === void 0 ? void 0 : V.video) !== null && _ !== void 0 ? _ : !0) && I.kind === "video" && !I.screenShare, H = ((U = ($ = S.manualProducerConfig) === null || $ === void 0 ? void 0 : $.screenshareVideo) !== null && U !== void 0 ? U : !0) && I.kind === "video" && I.screenShare;
19446
19451
  (L || H) && (I.pause || c.push(I));
19447
19452
  });
19448
19453
  }), this.participants.audioSubscribed.forEach(function(b) {
19449
- var C, T, S = a.participants.joined.get(b.id), D = (C = (T = b.producers) === null || T === void 0 ? void 0 : T.filter(function(I) {
19454
+ var E, T, S = a.participants.joined.get(b.id), D = (E = (T = b.producers) === null || T === void 0 ? void 0 : T.filter(function(I) {
19450
19455
  return I.kind === "audio";
19451
- })) !== null && C !== void 0 ? C : [];
19456
+ })) !== null && E !== void 0 ? E : [];
19452
19457
  S && D !== null && D !== void 0 && D.length && D.forEach(function(I) {
19453
19458
  var _, V, U, $, L = ((_ = (V = S.manualProducerConfig) === null || V === void 0 ? void 0 : V.audio) !== null && _ !== void 0 ? _ : !0) && I.kind === "audio" && !I.screenShare, H = ((U = ($ = S.manualProducerConfig) === null || $ === void 0 ? void 0 : $.screenshareAudio) !== null && U !== void 0 ? U : !0) && I.kind === "audio" && I.screenShare;
19454
19459
  (L || H) && c.push(I);
@@ -19462,12 +19467,12 @@ var b_ = Object.defineProperty, T_ = Object.getOwnPropertyDescriptor, no = funct
19462
19467
  }), f = [], g = Array.from((s = p == null ? void 0 : p.values()) !== null && s !== void 0 ? s : []).map(function(b) {
19463
19468
  return b.peerId;
19464
19469
  }), g = yP(g), (u = g) === null || u === void 0 || u.forEach(function(b) {
19465
- var C, T = a.participants.joined.get(b);
19470
+ var E, T = a.participants.joined.get(b);
19466
19471
  if (!T) {
19467
19472
  a.logger.warn("Peer with ".concat(b, " doesn't exist in joined list but producers of it are being consumed."));
19468
19473
  return;
19469
19474
  }
19470
- (C = T.producers) !== null && C !== void 0 && C.length && T.producers.forEach(function(S) {
19475
+ (E = T.producers) !== null && E !== void 0 && E.length && T.producers.forEach(function(S) {
19471
19476
  var D = S.consumer && p.has(S.consumer.id);
19472
19477
  !d.has(S.producerId) && (p.has(S.producerId) || D) && f.push(S);
19473
19478
  });
@@ -19893,7 +19898,7 @@ no([O.trace("ParticipantController.processConsumerClosed")], Ya.prototype, "proc
19893
19898
  no([O.trace("ParticipantController.processConsumerResumed")], Ya.prototype, "processConsumerResumed", 1);
19894
19899
  no([O.trace("ParticipantController.processConsumerPaused")], Ya.prototype, "processConsumerPaused", 1);
19895
19900
  no([O.trace("ParticipantController.processNewConsumer")], Ya.prototype, "processNewConsumer", 1);
19896
- var ar = jn(Np().permissions), G = /* @__PURE__ */ E("permissions"), gs = /* @__PURE__ */ E("viewType"), Ms = /* @__PURE__ */ E("context"), rd = /* @__PURE__ */ E("updatePermission"), mr = /* @__PURE__ */ E("stageStatus"), w_ = /* @__PURE__ */ function(o) {
19901
+ var ar = jn(Np().permissions), G = /* @__PURE__ */ C("permissions"), gs = /* @__PURE__ */ C("viewType"), Ms = /* @__PURE__ */ C("context"), rd = /* @__PURE__ */ C("updatePermission"), mr = /* @__PURE__ */ C("stageStatus"), w_ = /* @__PURE__ */ function(o) {
19897
19902
  function t(e, r, n) {
19898
19903
  var a, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
19899
19904
  w(this, t);
@@ -19901,7 +19906,7 @@ var ar = jn(Np().permissions), G = /* @__PURE__ */ E("permissions"), gs = /* @__
19901
19906
  if (a = R(this, t, [s]), Object.defineProperty(a, mr, { get: P_, set: void 0 }), Object.defineProperty(a, G, { writable: !0, value: void 0 }), Object.defineProperty(a, gs, { writable: !0, value: void 0 }), Object.defineProperty(a, Ms, { writable: !0, value: void 0 }), Object.defineProperty(a, rd, { writable: !0, value: function(c) {
19902
19907
  var d = c.chat, p = c.connectedMeetings, v = c.plugins, f = c.polls, g = c.media, k = cc(c, xg);
19903
19908
  if (d && (d.private && ki(l(a, G)[G].chat.private, d.private), d.public && ki(l(a, G)[G].chat.public, d.public), a.emit("chatUpdate")), p && ki(l(a, G)[G].connectedMeetings, p), g) {
19904
- var y, b, C, T = function(I) {
19909
+ var y, b, E, T = function(I) {
19905
19910
  switch (I) {
19906
19911
  case Ai.NONE:
19907
19912
  return te.Allowed;
@@ -19915,7 +19920,7 @@ var ar = jn(Np().permissions), G = /* @__PURE__ */ E("permissions"), gs = /* @__
19915
19920
  return;
19916
19921
  }
19917
19922
  }, S = { audio: void 0, video: void 0, screenshare: void 0 };
19918
- (y = g.audio) !== null && y !== void 0 && y.canProduce && (S.audio = { canProduce: T(g.audio.canProduce) }), (b = g.video) !== null && b !== void 0 && b.canProduce && (S.video = { canProduce: T(g.video.canProduce) }), (C = g.screenshare) !== null && C !== void 0 && C.canProduce && (S.screenshare = { canProduce: T(g.screenshare.canProduce) }), ki(l(a, G)[G].media, S);
19923
+ (y = g.audio) !== null && y !== void 0 && y.canProduce && (S.audio = { canProduce: T(g.audio.canProduce) }), (b = g.video) !== null && b !== void 0 && b.canProduce && (S.video = { canProduce: T(g.video.canProduce) }), (E = g.screenshare) !== null && E !== void 0 && E.canProduce && (S.screenshare = { canProduce: T(g.screenshare.canProduce) }), ki(l(a, G)[G].media, S);
19919
19924
  }
19920
19925
  v && (ki(l(a, G)[G].plugins, v), a.emit("pluginsUpdate")), f && (ki(l(a, G)[G].polls, f), a.emit("pollsUpdate")), Object.keys(k).length !== 0 && ki(l(a, G)[G], k), a.emit("permissionsUpdate", c);
19921
19926
  } }), !r)
@@ -20339,7 +20344,7 @@ var ar = jn(Np().permissions), G = /* @__PURE__ */ E("permissions"), gs = /* @__
20339
20344
  function P_() {
20340
20345
  return l(this, Ms)[Ms].getValue("stageStatus");
20341
20346
  }
20342
- var Xr = /* @__PURE__ */ E("context"), Ag = /* @__PURE__ */ function(o) {
20347
+ var Xr = /* @__PURE__ */ C("context"), Ag = /* @__PURE__ */ function(o) {
20343
20348
  function t() {
20344
20349
  var e;
20345
20350
  w(this, t);
@@ -20356,10 +20361,10 @@ var Xr = /* @__PURE__ */ E("context"), Ag = /* @__PURE__ */ function(o) {
20356
20361
  for (; ; )
20357
20362
  switch (k.prev = k.next) {
20358
20363
  case 0:
20359
- if (u = function(b, C) {
20360
- a.mediaPermissions[b] = C;
20364
+ if (u = function(b, E) {
20365
+ a.mediaPermissions[b] = E;
20361
20366
  var T = { message: a.mediaPermissions[b], kind: b };
20362
- C === "DENIED" ? l(a, Xr)[Xr].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_ERROR, T) : l(a, Xr)[Xr].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, T);
20367
+ E === "DENIED" ? l(a, Xr)[Xr].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_ERROR, T) : l(a, Xr)[Xr].getValue("peerSessionStore").emit(F.MEDIA_PERMISSION_UPDATE, T);
20363
20368
  }, br.getName() !== "firefox") {
20364
20369
  k.next = 3;
20365
20370
  break;
@@ -20370,8 +20375,8 @@ var Xr = /* @__PURE__ */ E("context"), Ag = /* @__PURE__ */ function(o) {
20370
20375
  case 7:
20371
20376
  return p = k.sent, k.next = 10, (s = navigator) === null || s === void 0 || (s = s.permissions) === null || s === void 0 ? void 0 : s.query({ name: d });
20372
20377
  case 10:
20373
- v = k.sent, f = function(b, C) {
20374
- switch (C) {
20378
+ v = k.sent, f = function(b, E) {
20379
+ switch (E) {
20375
20380
  case "granted":
20376
20381
  u(b, "ACCEPTED");
20377
20382
  break;
@@ -20430,7 +20435,7 @@ var Xr = /* @__PURE__ */ E("context"), Ag = /* @__PURE__ */ function(o) {
20430
20435
  return (r = l(this, Xr)[Xr]) === null || r === void 0 ? void 0 : r.getValue("peerId");
20431
20436
  } }, { key: "init", value: function() {
20432
20437
  var e = m(/* @__PURE__ */ h().mark(function n() {
20433
- var a = this, i, s, u, c, d, p, v, f, g, k, y, b, C, T, S = arguments;
20438
+ var a = this, i, s, u, c, d, p, v, f, g, k, y, b, E, T, S = arguments;
20434
20439
  return h().wrap(function(I) {
20435
20440
  for (; ; )
20436
20441
  switch (I.prev = I.next) {
@@ -20509,7 +20514,7 @@ var Xr = /* @__PURE__ */ E("context"), Ag = /* @__PURE__ */ function(o) {
20509
20514
  I.next = 30;
20510
20515
  break;
20511
20516
  }
20512
- if (this.logger.info("Setting up SelfMedia streams using media handler. audio:".concat((k = i == null ? void 0 : i.audio) !== null && k !== void 0 ? k : !0, " video:").concat((y = i == null ? void 0 : i.video) !== null && y !== void 0 ? y : !0)), T = this.localMediaHandler.setupStreams({ video: (b = i == null ? void 0 : i.video) !== null && b !== void 0 ? b : !0, audio: (C = i == null ? void 0 : i.audio) !== null && C !== void 0 ? C : !0 }), s) {
20517
+ if (this.logger.info("Setting up SelfMedia streams using media handler. audio:".concat((k = i == null ? void 0 : i.audio) !== null && k !== void 0 ? k : !0, " video:").concat((y = i == null ? void 0 : i.video) !== null && y !== void 0 ? y : !0)), T = this.localMediaHandler.setupStreams({ video: (b = i == null ? void 0 : i.video) !== null && b !== void 0 ? b : !0, audio: (E = i == null ? void 0 : i.audio) !== null && E !== void 0 ? E : !0 }), s) {
20513
20518
  I.next = 30;
20514
20519
  break;
20515
20520
  }
@@ -20982,7 +20987,7 @@ var Xr = /* @__PURE__ */ E("context"), Ag = /* @__PURE__ */ function(o) {
20982
20987
  for (var a = n > 1 ? void 0 : n ? E_(e, r) : e, i = t.length - 1, s; i >= 0; i--)
20983
20988
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
20984
20989
  return n && a && S_(e, r, a), a;
20985
- }, it = (fi = /* @__PURE__ */ E("config"), ur = /* @__PURE__ */ E("permissions"), gi = /* @__PURE__ */ E("isPinned"), Ne = /* @__PURE__ */ E("context"), Ot = /* @__PURE__ */ E("pip"), Ve = /* @__PURE__ */ E("roomNodeClient"), mi = /* @__PURE__ */ E("audioPlayback"), Ie = /* @__PURE__ */ E("mediaJoined"), Si = /* @__PURE__ */ E("previewVideoElements"), Ei = /* @__PURE__ */ E("videoElements"), vo = /* @__PURE__ */ E("updateVideos"), /* @__PURE__ */ function(o) {
20990
+ }, it = (fi = /* @__PURE__ */ C("config"), ur = /* @__PURE__ */ C("permissions"), gi = /* @__PURE__ */ C("isPinned"), Ne = /* @__PURE__ */ C("context"), Ot = /* @__PURE__ */ C("pip"), Ve = /* @__PURE__ */ C("roomNodeClient"), mi = /* @__PURE__ */ C("audioPlayback"), Ie = /* @__PURE__ */ C("mediaJoined"), Si = /* @__PURE__ */ C("previewVideoElements"), Ei = /* @__PURE__ */ C("videoElements"), vo = /* @__PURE__ */ C("updateVideos"), /* @__PURE__ */ function(o) {
20986
20991
  function t(e, r, n, a, i) {
20987
20992
  var s, u;
20988
20993
  w(this, t);
@@ -21800,18 +21805,18 @@ var Xr = /* @__PURE__ */ E("context"), Ag = /* @__PURE__ */ function(o) {
21800
21805
  r.style.display = this.videoEnabled ? "block" : "none";
21801
21806
  } }], [{ key: "__init__", value: function() {
21802
21807
  var e = m(/* @__PURE__ */ h().mark(function n(a, i, s, u, c) {
21803
- var d, p, v, f, g, k, y, b, C, T, S, D, I = arguments;
21808
+ var d, p, v, f, g, k, y, b, E, T, S, D, I = arguments;
21804
21809
  return h().wrap(function(V) {
21805
21810
  for (; ; )
21806
21811
  switch (V.prev = V.next) {
21807
21812
  case 0:
21808
- if (y = I.length > 5 && I[5] !== void 0 ? I[5] : !1, b = (d = (p = a.getValue("defaults")) === null || p === void 0 ? void 0 : p.audio) !== null && d !== void 0 ? d : !0, C = (v = (f = a.getValue("defaults")) === null || f === void 0 ? void 0 : f.video) !== null && v !== void 0 ? v : !0, s.canProduceAudio !== "ALLOWED" && (b = !1), s.canProduceVideo !== "ALLOWED" && (C = !1), T = new it(a, i, s, u, c), u.viewType !== Lt.Chat) {
21813
+ if (y = I.length > 5 && I[5] !== void 0 ? I[5] : !1, b = (d = (p = a.getValue("defaults")) === null || p === void 0 ? void 0 : p.audio) !== null && d !== void 0 ? d : !0, E = (v = (f = a.getValue("defaults")) === null || f === void 0 ? void 0 : f.video) !== null && v !== void 0 ? v : !0, s.canProduceAudio !== "ALLOWED" && (b = !1), s.canProduceVideo !== "ALLOWED" && (E = !1), T = new it(a, i, s, u, c), u.viewType !== Lt.Chat) {
21809
21814
  V.next = 8;
21810
21815
  break;
21811
21816
  }
21812
21817
  return V.abrupt("return", T);
21813
21818
  case 8:
21814
- return S = mM(u.mediaConstraints), ki(S, (g = a.getValue("defaults")) === null || g === void 0 ? void 0 : g.mediaConfiguration), D = (k = a.getValue("defaults")) === null || k === void 0 ? void 0 : k.mediaHandler, D && (D.context = a), V.next = 14, T.init({ audio: b, video: C, constraints: S }, y, a);
21819
+ return S = mM(u.mediaConstraints), ki(S, (g = a.getValue("defaults")) === null || g === void 0 ? void 0 : g.mediaConfiguration), D = (k = a.getValue("defaults")) === null || k === void 0 ? void 0 : k.mediaHandler, D && (D.context = a), V.next = 14, T.init({ audio: b, video: E, constraints: S }, y, a);
21815
21820
  case 14:
21816
21821
  return T.setupEvents(), V.abrupt("return", T);
21817
21822
  case 16:
@@ -21874,7 +21879,7 @@ var __ = /* @__PURE__ */ function(o) {
21874
21879
  return w(this, t), r = R(this, t, [e != null ? e : "AwaitQueue task removed"]), r.name = "AwaitQueueRemovedTaskError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(r, t), r;
21875
21880
  }
21876
21881
  return A(t, o), P(t);
21877
- }(/* @__PURE__ */ Ws(Error)), cu = /* @__PURE__ */ E("logger"), Bd = /* @__PURE__ */ function() {
21882
+ }(/* @__PURE__ */ Ws(Error)), cu = /* @__PURE__ */ C("logger"), Bd = /* @__PURE__ */ function() {
21878
21883
  function o(t) {
21879
21884
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
21880
21885
  w(this, o), this.pendingTasks = /* @__PURE__ */ new Map(), this.nextTaskId = 0, this.stopping = !1, Object.defineProperty(this, cu, { writable: !0, value: void 0 }), this.log = e, l(this, cu)[cu] = { info: e && t ? t.info : function() {
@@ -22114,7 +22119,7 @@ function N_(o) {
22114
22119
  var a = { audio: Il(t), video: Il(e) }, i = { audio: Il(r), video: Il(n) }, s = { sender: i, receiver: a };
22115
22120
  return s;
22116
22121
  }
22117
- var qe = /* @__PURE__ */ E("socket"), V_ = /* @__PURE__ */ function() {
22122
+ var qe = /* @__PURE__ */ C("socket"), V_ = /* @__PURE__ */ function() {
22118
22123
  function o(t) {
22119
22124
  w(this, o), Object.defineProperty(this, qe, { writable: !0, value: void 0 }), this.events = void 0, l(this, qe)[qe] = t, this.events = Vn;
22120
22125
  }
@@ -22429,7 +22434,7 @@ var qe = /* @__PURE__ */ E("socket"), V_ = /* @__PURE__ */ function() {
22429
22434
  }() }]);
22430
22435
  }(), Uo = /* @__PURE__ */ function(o) {
22431
22436
  return o.NEW = "new", o.CONNECTING = "connecting", o.RECONNECTING = "reconnecting", o.DISCONNECTED = "disconnected", o.CONNECTED = "connected", o.FAILED = "failed", o.CLOSED = "closed", o;
22432
- }(Uo || {}), du = /* @__PURE__ */ E("context"), Ac = /* @__PURE__ */ function(o) {
22437
+ }(Uo || {}), du = /* @__PURE__ */ C("context"), Ac = /* @__PURE__ */ function(o) {
22433
22438
  function t(e) {
22434
22439
  var r;
22435
22440
  return w(this, t), r = R(this, t), Object.defineProperty(r, du, { writable: !0, value: void 0 }), l(r, du)[du] = e, r.setMaxListeners(1 / 0), r;
@@ -22842,7 +22847,7 @@ var qe = /* @__PURE__ */ E("socket"), V_ = /* @__PURE__ */ function() {
22842
22847
  }), this._addEventListeners();
22843
22848
  } }, { key: "send", value: function() {
22844
22849
  var e = m(/* @__PURE__ */ h().mark(function n(a) {
22845
- var i = this, s, u, c, d, p, v, f, g, k, y, b, C;
22850
+ var i = this, s, u, c, d, p, v, f, g, k, y, b, E;
22846
22851
  return h().wrap(function(S) {
22847
22852
  for (; ; )
22848
22853
  switch (S.prev = S.next) {
@@ -22868,7 +22873,7 @@ var qe = /* @__PURE__ */ E("socket"), V_ = /* @__PURE__ */ function() {
22868
22873
  var I = D.name;
22869
22874
  return I === "opus";
22870
22875
  }) >= 0 && (k = this.enableDtx, y = this.enableStereo, b = this.enableHighBitrate ? y ? 128e3 : 64e3 : y ? 64e3 : 32e3, g.sdp = g.sdp.replace("minptime=10;useinbandfec=1", "minptime=10;useinbandfec=1;".concat(k ? "usedtx=1;" : "").concat(y ? "stereo=1;sprop-stereo=1;" : "", "maxaveragebitrate=").concat(b)), g.sdp += `a=rtcp-fb:111 nack\r
22871
- `), this.midTransceiverMap.set(p.mid, p), C = /* @__PURE__ */ function() {
22876
+ `), this.midTransceiverMap.set(p.mid, p), E = /* @__PURE__ */ function() {
22872
22877
  var D = m(/* @__PURE__ */ h().mark(function I(_) {
22873
22878
  return h().wrap(function(U) {
22874
22879
  for (; ; )
@@ -22886,7 +22891,7 @@ var qe = /* @__PURE__ */ E("socket"), V_ = /* @__PURE__ */ function() {
22886
22891
  return function(_) {
22887
22892
  return D.apply(this, arguments);
22888
22893
  };
22889
- }(), this.logger.debug("send() | calling pc.setLocalDescription() [offer: ".concat(JSON.stringify(g, void 0, 2), "]")), S.abrupt("return", { offerSdp: g, callback: C, sender: p.sender, mid: p.mid });
22894
+ }(), this.logger.debug("send() | calling pc.setLocalDescription() [offer: ".concat(JSON.stringify(g, void 0, 2), "]")), S.abrupt("return", { offerSdp: g, callback: E, sender: p.sender, mid: p.mid });
22890
22895
  case 14:
22891
22896
  case "end":
22892
22897
  return S.stop();
@@ -22924,7 +22929,7 @@ var qe = /* @__PURE__ */ E("socket"), V_ = /* @__PURE__ */ function() {
22924
22929
  return "Firefox60";
22925
22930
  } }, { key: "send", value: function() {
22926
22931
  var e = m(/* @__PURE__ */ h().mark(function n(a) {
22927
- var i = this, s, u, c, d, p, v, f, g, k, y, b, C, T;
22932
+ var i = this, s, u, c, d, p, v, f, g, k, y, b, E, T;
22928
22933
  return h().wrap(function(D) {
22929
22934
  for (; ; )
22930
22935
  switch (D.prev = D.next) {
@@ -22956,7 +22961,7 @@ var qe = /* @__PURE__ */ E("socket"), V_ = /* @__PURE__ */ function() {
22956
22961
  case 13:
22957
22962
  return k = D.sent, k.sdp = g(k.sdp, c), this.logger.debug("send() | calling pc.setLocalDescription() [offer:".concat(JSON.stringify(k), "]")), D.next = 18, this.pc.setLocalDescription(k);
22958
22963
  case 18:
22959
- return (s === "audio" || s.kind === "audio") && (y = this.enableDtx, b = this.enableStereo, C = this.enableHighBitrate ? b ? 128e3 : 64e3 : b ? 64e3 : 32e3, k.sdp = k.sdp.replace("minptime=10;useinbandfec=1", "minptime=10;useinbandfec=1;".concat(y ? "usedtx=1;" : "").concat(b ? "stereo=1;sprop-stereo=1;" : "", "maxaveragebitrate=").concat(C))), this.midTransceiverMap.set(v.mid, v), T = /* @__PURE__ */ function() {
22964
+ return (s === "audio" || s.kind === "audio") && (y = this.enableDtx, b = this.enableStereo, E = this.enableHighBitrate ? b ? 128e3 : 64e3 : b ? 64e3 : 32e3, k.sdp = k.sdp.replace("minptime=10;useinbandfec=1", "minptime=10;useinbandfec=1;".concat(y ? "usedtx=1;" : "").concat(b ? "stereo=1;sprop-stereo=1;" : "", "maxaveragebitrate=").concat(E))), this.midTransceiverMap.set(v.mid, v), T = /* @__PURE__ */ function() {
22960
22965
  var I = m(/* @__PURE__ */ h().mark(function _(V) {
22961
22966
  return h().wrap(function($) {
22962
22967
  for (; ; )
@@ -23057,7 +23062,7 @@ var qe = /* @__PURE__ */ E("socket"), V_ = /* @__PURE__ */ function() {
23057
23062
  }
23058
23063
  ) }, { key: "send", value: function() {
23059
23064
  var e = m(/* @__PURE__ */ h().mark(function n(a) {
23060
- var i = this, s, u, c, d, p, v, f, g, k, y, b, C;
23065
+ var i = this, s, u, c, d, p, v, f, g, k, y, b, E;
23061
23066
  return h().wrap(function(S) {
23062
23067
  for (; ; )
23063
23068
  switch (S.prev = S.next) {
@@ -23079,7 +23084,7 @@ var qe = /* @__PURE__ */ E("socket"), V_ = /* @__PURE__ */ function() {
23079
23084
  case 12:
23080
23085
  return g = S.sent, S.next = 15, this.pc.setLocalDescription(g);
23081
23086
  case 15:
23082
- return (s === "audio" || s.kind === "audio") && (k = this.enableStereo, y = this.enableDtx, b = this.enableHighBitrate ? k ? 128e3 : 64e3 : k ? 64e3 : 32e3, g.sdp = g.sdp.replace("minptime=10;useinbandfec=1", "minptime=10;useinbandfec=1;".concat(y ? "usedtx=1;" : "").concat(k ? "stereo=1;sprop-stereo=1;" : "", "maxaveragebitrate=").concat(b))), this.midTransceiverMap.set(p.mid, p), C = /* @__PURE__ */ function() {
23087
+ return (s === "audio" || s.kind === "audio") && (k = this.enableStereo, y = this.enableDtx, b = this.enableHighBitrate ? k ? 128e3 : 64e3 : k ? 64e3 : 32e3, g.sdp = g.sdp.replace("minptime=10;useinbandfec=1", "minptime=10;useinbandfec=1;".concat(y ? "usedtx=1;" : "").concat(k ? "stereo=1;sprop-stereo=1;" : "", "maxaveragebitrate=").concat(b))), this.midTransceiverMap.set(p.mid, p), E = /* @__PURE__ */ function() {
23083
23088
  var D = m(/* @__PURE__ */ h().mark(function I(_) {
23084
23089
  return h().wrap(function(U) {
23085
23090
  for (; ; )
@@ -23097,7 +23102,7 @@ var qe = /* @__PURE__ */ E("socket"), V_ = /* @__PURE__ */ function() {
23097
23102
  return function(_) {
23098
23103
  return D.apply(this, arguments);
23099
23104
  };
23100
- }(), S.abrupt("return", { offerSdp: g, callback: C, sender: p.sender, mid: p.mid });
23105
+ }(), S.abrupt("return", { offerSdp: g, callback: E, sender: p.sender, mid: p.mid });
23101
23106
  case 19:
23102
23107
  case "end":
23103
23108
  return S.stop();
@@ -23145,7 +23150,7 @@ var qe = /* @__PURE__ */ E("socket"), V_ = /* @__PURE__ */ function() {
23145
23150
  function F_(o, t) {
23146
23151
  return typeof o == "undefined" ? t : typeof window != "undefined" && Object.getOwnPropertyDescriptor(window, "structuredClone") ? structuredClone(o) : JSON.parse(JSON.stringify(o));
23147
23152
  }
23148
- var pu = /* @__PURE__ */ E("handler"), Ta = /* @__PURE__ */ E("paused"), Tt = /* @__PURE__ */ E("closed"), td = /* @__PURE__ */ E("context"), Pt = /* @__PURE__ */ E("metadata"), Xu = /* @__PURE__ */ E("onTrackEnded"), nd = /* @__PURE__ */ E("handleTrack"), ad = /* @__PURE__ */ E("destroyTrack"), H_ = /* @__PURE__ */ function(o) {
23153
+ var pu = /* @__PURE__ */ C("handler"), Ta = /* @__PURE__ */ C("paused"), Tt = /* @__PURE__ */ C("closed"), td = /* @__PURE__ */ C("context"), Pt = /* @__PURE__ */ C("metadata"), Xu = /* @__PURE__ */ C("onTrackEnded"), nd = /* @__PURE__ */ C("handleTrack"), ad = /* @__PURE__ */ C("destroyTrack"), H_ = /* @__PURE__ */ function(o) {
23149
23154
  function t(e, r) {
23150
23155
  var n, a;
23151
23156
  return w(this, t), a = R(this, t, [e]), Object.defineProperty(a, ad, { value: W_ }), Object.defineProperty(a, nd, { value: G_ }), Object.defineProperty(a, Xu, { value: q_ }), Object.defineProperty(a, Pt, { get: B_, set: void 0 }), a.rtpReceiver = void 0, a.id = void 0, a.localId = void 0, a.producerId = void 0, a.producingTransportId = void 0, a.mimeType = void 0, a.track = void 0, a.peerId = void 0, a.appData = void 0, a.transceiver = void 0, Object.defineProperty(a, pu, { writable: !0, value: void 0 }), Object.defineProperty(a, Ta, { writable: !0, value: void 0 }), Object.defineProperty(a, Tt, { writable: !0, value: void 0 }), Object.defineProperty(a, td, { writable: !0, value: void 0 }), a.id = r.id, a.localId = r.localId, l(a, pu)[pu] = r.handler, a.appData = r.appData, a.peerId = r.producingPeerId, a.producingTransportId = r.producingTransportId, l(a, Tt)[Tt] = !1, a.producerId = r.producerId, a.track = r.track, l(a, Ta)[Ta] = (n = r.paused) !== null && n !== void 0 ? n : !1, a.mimeType = r.mimeType, a.transceiver = r.transceiver, a.rtpReceiver = r.rtpReceiver, l(a, nd)[nd](), l(a, td)[td] = e, a;
@@ -23240,7 +23245,7 @@ function W_() {
23240
23245
  this.logger.error("Consumer::destroyTrack()", N(N({}, l(this, Pt)[Pt]), {}, { error: o }));
23241
23246
  }
23242
23247
  }
23243
- var ut = /* @__PURE__ */ E("handler"), ms = /* @__PURE__ */ E("stopTracks"), ys = /* @__PURE__ */ E("disableTrackOnPause"), wa = /* @__PURE__ */ E("zeroRtpOnPause"), Zr = /* @__PURE__ */ E("closed"), Ke = /* @__PURE__ */ E("track"), In = /* @__PURE__ */ E("paused"), ks = /* @__PURE__ */ E("maxSpatialLayer"), id = /* @__PURE__ */ E("context"), jr = /* @__PURE__ */ E("metadata"), J_ = /* @__PURE__ */ function(o) {
23248
+ var ut = /* @__PURE__ */ C("handler"), ms = /* @__PURE__ */ C("stopTracks"), ys = /* @__PURE__ */ C("disableTrackOnPause"), wa = /* @__PURE__ */ C("zeroRtpOnPause"), Zr = /* @__PURE__ */ C("closed"), Ke = /* @__PURE__ */ C("track"), In = /* @__PURE__ */ C("paused"), ks = /* @__PURE__ */ C("maxSpatialLayer"), id = /* @__PURE__ */ C("context"), jr = /* @__PURE__ */ C("metadata"), J_ = /* @__PURE__ */ function(o) {
23244
23249
  function t(e, r) {
23245
23250
  var n, a, i;
23246
23251
  return w(this, t), i = R(this, t, [e]), Object.defineProperty(i, jr, { get: K_, set: void 0 }), i.id = void 0, i.localId = void 0, Object.defineProperty(i, ut, { writable: !0, value: void 0 }), i.kind = void 0, i.appData = void 0, i.rtpSender = void 0, Object.defineProperty(i, ms, { writable: !0, value: void 0 }), Object.defineProperty(i, ys, { writable: !0, value: void 0 }), Object.defineProperty(i, wa, { writable: !0, value: void 0 }), Object.defineProperty(i, Zr, { writable: !0, value: !1 }), Object.defineProperty(i, Ke, { writable: !0, value: void 0 }), Object.defineProperty(i, In, { writable: !0, value: void 0 }), Object.defineProperty(i, ks, { writable: !0, value: void 0 }), Object.defineProperty(i, id, { writable: !0, value: void 0 }), i.id = r.id, i.localId = r.localId, l(i, Ke)[Ke] = r.track, i.kind = (n = r.track) === null || n === void 0 ? void 0 : n.kind, l(i, In)[In] = r.disableTrackOnPause ? !((a = r.track) !== null && a !== void 0 && a.enabled) : !1, l(i, ks)[ks] = void 0, l(i, ms)[ms] = r.stopTracks, l(i, ys)[ys] = r.disableTrackOnPause, l(i, wa)[wa] = r.zeroRtpOnPause, i.appData = r.appData || {}, i._onTrackEnded = i._onTrackEnded.bind(i), l(i, ut)[ut] = r.handler, i.rtpSender = r.rtpSender, i._handleTrack(), l(i, id)[id] = e, i;
@@ -23504,7 +23509,7 @@ function Y_(o) {
23504
23509
  var t, e;
23505
23510
  return z_(o) && (t = (e = o.payload._bolt) === null || e === void 0 ? void 0 : e.id) !== null && t !== void 0 ? t : "";
23506
23511
  }
23507
- var Mn = /* @__PURE__ */ E("datachannelCache"), sd = /* @__PURE__ */ E("context"), Pa = /* @__PURE__ */ E("logger"), ll = /* @__PURE__ */ function(o) {
23512
+ var Mn = /* @__PURE__ */ C("datachannelCache"), sd = /* @__PURE__ */ C("context"), Pa = /* @__PURE__ */ C("logger"), ll = /* @__PURE__ */ function(o) {
23508
23513
  function t(e, r, n, a) {
23509
23514
  var i;
23510
23515
  return w(this, t), i = R(this, t), i.channel = void 0, i.queue = void 0, i.serverProtocolVersion = void 0, Object.defineProperty(i, Mn, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(i, sd, { writable: !0, value: void 0 }), Object.defineProperty(i, Pa, { writable: !0, value: void 0 }), i.respond = function(s, u) {
@@ -23521,14 +23526,14 @@ var Mn = /* @__PURE__ */ E("datachannelCache"), sd = /* @__PURE__ */ E("context"
23521
23526
  switch (f.prev = f.next) {
23522
23527
  case 0:
23523
23528
  return d = t.createRequest(c), p = new Promise(function(g, k) {
23524
- var y = 2e4, b = d.payload._bolt.id, C = { id: b, method: d.type, resolve: function(S) {
23525
- i.queue.delete(b) && (clearTimeout(C.timer), g(S));
23529
+ var y = 2e4, b = d.payload._bolt.id, E = { id: b, method: d.type, resolve: function(S) {
23530
+ i.queue.delete(b) && (clearTimeout(E.timer), g(S));
23526
23531
  }, timer: setTimeout(function() {
23527
23532
  i.queue.delete(b) && k(new Error("request timeout for message id: ".concat(b)));
23528
23533
  }, y), cancel: function(S) {
23529
- i.queue.delete(b) && (clearTimeout(C.timer), k(S));
23534
+ i.queue.delete(b) && (clearTimeout(E.timer), k(S));
23530
23535
  } };
23531
- i.queue.set(b, C);
23536
+ i.queue.set(b, E);
23532
23537
  }), i.channel.send(JSON.stringify(d)), f.abrupt("return", p);
23533
23538
  case 4:
23534
23539
  case "end":
@@ -23547,7 +23552,7 @@ var Mn = /* @__PURE__ */ E("datachannelCache"), sd = /* @__PURE__ */ E("context"
23547
23552
  v.push(u.slice(g, k));
23548
23553
  }
23549
23554
  for (var y = Ks(), b = 0; b < p; b += 1) {
23550
- var C = v[b], T = { id: y, count: p, chunkIndex: b, chunk: C }, S = JSON.stringify(T);
23555
+ var E = v[b], T = { id: y, count: p, chunkIndex: b, chunk: E }, S = JSON.stringify(T);
23551
23556
  l(i, Pa)[Pa].debug("Sending message chunk over dc: ".concat(S)), i.channel.send(S);
23552
23557
  }
23553
23558
  } else
@@ -23604,14 +23609,14 @@ ll.createNotification = function(o) {
23604
23609
  ll.createErrorResponse = function(o, t) {
23605
23610
  return { type: "error", payload: { error: t.message, _bolt: { id: o, type: "RESPONSE", version: Ic } } };
23606
23611
  };
23607
- var ac = "transport closed", Sa = /* @__PURE__ */ E("context"), Q_ = /* @__PURE__ */ function(o) {
23612
+ var ac = "transport closed", Sa = /* @__PURE__ */ C("context"), Q_ = /* @__PURE__ */ function(o) {
23608
23613
  function t(e, r) {
23609
23614
  var n, a, i, s, u = r.id, c = r.direction, d = r.handlerFactory, p = r.iceServers, v = r.iceTransportPolicy, f = r.proprietaryConstraints, g = r.additionalSettings, k = r.appData, y = r.config;
23610
23615
  w(this, t), s = R(this, t, [e]), s.awaitQueue = void 0, s.observer = void 0, s.id = void 0, s.serverId = void 0, s.direction = void 0, s.maxSctpMessageSize = void 0, s.handler = void 0, s.connectionState = "new", s.producers = void 0, s.consumers = void 0, s.datachannels = void 0, s.connected = !1, s.eventsDCReadyPromise = void 0, s.eventsDCReadyPromiseResolver = void 0, s.eventsDCFailureTimer = void 0, s.transportConnectionPromise = void 0, s.consumerTrackEvents = void 0, s.unknownTracksMap = void 0, s.appData = void 0, Object.defineProperty(s, Sa, { writable: !0, value: void 0 }), l(s, Sa)[Sa] = e;
23611
23616
  var b = e.getValue("logger");
23612
23617
  b.debug("constructor() [id: ".concat(u, ", direction: ").concat(c, "]")), s.id = u, s.direction = c;
23613
- var C = F_(g, {});
23614
- return delete C.iceServers, delete C.iceTransportPolicy, delete C.bundlePolicy, delete C.rtcpMuxPolicy, delete C.sdpSemantics, s.producers = /* @__PURE__ */ new Map(), s.consumers = /* @__PURE__ */ new Map(), s.datachannels = /* @__PURE__ */ new Map(), s.consumerTrackEvents = /* @__PURE__ */ new Map(), s.unknownTracksMap = /* @__PURE__ */ new Map(), s.awaitQueue = new Bd(b, !0), s.handler = d(), s.handler.enableHighBitrate = (n = y == null ? void 0 : y.enableHighBitrate) !== null && n !== void 0 ? n : !1, s.handler.enableStereo = (a = y == null ? void 0 : y.enableStereo) !== null && a !== void 0 ? a : !1, s.handler.enableDtx = (i = y == null ? void 0 : y.enableDtx) !== null && i !== void 0 ? i : !0, s.handler.init({ onTrackHandler: s._ontrack.bind(s), direction: c, iceServers: p, iceTransportPolicy: v, additionalSettings: g, proprietaryConstraints: f }), s.appData = k || {}, s.transportConnectionPromise = new Promise(function(T) {
23618
+ var E = F_(g, {});
23619
+ return delete E.iceServers, delete E.iceTransportPolicy, delete E.bundlePolicy, delete E.rtcpMuxPolicy, delete E.sdpSemantics, s.producers = /* @__PURE__ */ new Map(), s.consumers = /* @__PURE__ */ new Map(), s.datachannels = /* @__PURE__ */ new Map(), s.consumerTrackEvents = /* @__PURE__ */ new Map(), s.unknownTracksMap = /* @__PURE__ */ new Map(), s.awaitQueue = new Bd(b, !0), s.handler = d(), s.handler.enableHighBitrate = (n = y == null ? void 0 : y.enableHighBitrate) !== null && n !== void 0 ? n : !1, s.handler.enableStereo = (a = y == null ? void 0 : y.enableStereo) !== null && a !== void 0 ? a : !1, s.handler.enableDtx = (i = y == null ? void 0 : y.enableDtx) !== null && i !== void 0 ? i : !0, s.handler.init({ onTrackHandler: s._ontrack.bind(s), direction: c, iceServers: p, iceTransportPolicy: v, additionalSettings: g, proprietaryConstraints: f }), s.appData = k || {}, s.transportConnectionPromise = new Promise(function(T) {
23615
23620
  s.once("connected", function() {
23616
23621
  T(!0);
23617
23622
  }), s.once("disconnect", function() {
@@ -23830,7 +23835,7 @@ var ac = "transport closed", Sa = /* @__PURE__ */ E("context"), Q_ = /* @__PURE_
23830
23835
  return r;
23831
23836
  }() }, { key: "produce", value: function() {
23832
23837
  var e = m(/* @__PURE__ */ h().mark(function n(a, i) {
23833
- var s = this, u, c, d, p, v, f, g, k, y, b, C, T, S, D, I, _;
23838
+ var s = this, u, c, d, p, v, f, g, k, y, b, E, T, S, D, I, _;
23834
23839
  return h().wrap(function(U) {
23835
23840
  for (; ; )
23836
23841
  switch (U.prev = U.next) {
@@ -23843,7 +23848,7 @@ var ac = "transport closed", Sa = /* @__PURE__ */ E("context"), Q_ = /* @__PURE_
23843
23848
  }
23844
23849
  throw new Error("Cannot produce");
23845
23850
  case 5:
23846
- return c = a.track, d = a.encodings, p = a.codecOptions, v = a.stopTracks, f = v === void 0 ? !0 : v, g = a.disableTrackOnPause, k = g === void 0 ? !0 : g, y = a.zeroRtpOnPause, b = y === void 0 ? !1 : y, C = a.appData, T = C === void 0 ? {} : C, this.logger.debug("produce() [track:".concat(c.id, "]")), U.next = 9, this.awaitQueue.push(/* @__PURE__ */ m(/* @__PURE__ */ h().mark(function $() {
23851
+ return c = a.track, d = a.encodings, p = a.codecOptions, v = a.stopTracks, f = v === void 0 ? !0 : v, g = a.disableTrackOnPause, k = g === void 0 ? !0 : g, y = a.zeroRtpOnPause, b = y === void 0 ? !1 : y, E = a.appData, T = E === void 0 ? {} : E, this.logger.debug("produce() [track:".concat(c.id, "]")), U.next = 9, this.awaitQueue.push(/* @__PURE__ */ m(/* @__PURE__ */ h().mark(function $() {
23847
23852
  var L, H, Y, q, B, x, we, ie, Le;
23848
23853
  return h().wrap(function(X) {
23849
23854
  for (; ; )
@@ -24092,12 +24097,12 @@ var ac = "transport closed", Sa = /* @__PURE__ */ E("context"), Q_ = /* @__PURE_
24092
24097
  i.respond(n, a);
24093
24098
  } }, { key: "createConsumerObjectAndWaitForTrack", value: function() {
24094
24099
  var e = m(/* @__PURE__ */ h().mark(function n(a) {
24095
- var i = this, s, u, c, d, p, v, f, g, k, y, b, C;
24100
+ var i = this, s, u, c, d, p, v, f, g, k, y, b, E;
24096
24101
  return h().wrap(function(S) {
24097
24102
  for (; ; )
24098
24103
  switch (S.prev = S.next) {
24099
24104
  case 0:
24100
- return s = a.consumerId, u = a.producerId, c = a.producingPeerId, d = a.producingTransportId, p = a.streamId, v = a.paused, f = a.screenShare, g = a.appData, k = a.kind, y = a.mimeType, b = "".concat(p, ":").concat(k), C = N(N({}, a), {}, { name: "consumer creation task error", message: "consumer creation failed" }), S.abrupt("return", new Promise(/* @__PURE__ */ function() {
24105
+ return s = a.consumerId, u = a.producerId, c = a.producingPeerId, d = a.producingTransportId, p = a.streamId, v = a.paused, f = a.screenShare, g = a.appData, k = a.kind, y = a.mimeType, b = "".concat(p, ":").concat(k), E = N(N({}, a), {}, { name: "consumer creation task error", message: "consumer creation failed" }), S.abrupt("return", new Promise(/* @__PURE__ */ function() {
24101
24106
  var D = m(/* @__PURE__ */ h().mark(function I(_, V) {
24102
24107
  var U, $, L;
24103
24108
  return h().wrap(function(Y) {
@@ -24105,11 +24110,11 @@ var ac = "transport closed", Sa = /* @__PURE__ */ E("context"), Q_ = /* @__PURE_
24105
24110
  switch (Y.prev = Y.next) {
24106
24111
  case 0:
24107
24112
  U = setTimeout(function() {
24108
- i.logger.warn("Timed out waiting for track event ".concat(b, " producingPeerId: ").concat(c)), i.consumerTrackEvents.delete(b), C.isTimedout = !0, V(C);
24113
+ i.logger.warn("Timed out waiting for track event ".concat(b, " producingPeerId: ").concat(c)), i.consumerTrackEvents.delete(b), E.isTimedout = !0, V(E);
24109
24114
  }, 5e3), $ = function(B, x) {
24110
24115
  try {
24111
24116
  if (B.readyState === "ended")
24112
- clearTimeout(U), V(C);
24117
+ clearTimeout(U), V(E);
24113
24118
  else {
24114
24119
  var we = B;
24115
24120
  we.enabled = !0, i.handler.midTransceiverMap.set(x.mid, x);
@@ -24119,7 +24124,7 @@ var ac = "transport closed", Sa = /* @__PURE__ */ E("context"), Q_ = /* @__PURE_
24119
24124
  }), i.logger.info("consumer created for ", { consumer: { id: s, kind: k, appData: { screenShare: f }, peerId: c, producerId: u } }), i.emit("newconsumer", ie), clearTimeout(U), _(ie);
24120
24125
  }
24121
24126
  } catch (Le) {
24122
- i.logger.warn("error while creating consumer:", Le), clearTimeout(U), V(C);
24127
+ i.logger.warn("error while creating consumer:", Le), clearTimeout(U), V(E);
24123
24128
  }
24124
24129
  }, L = i.unknownTracksMap.get(b), L ? (i.logger.info("track event already received [trackId: ".concat(L.track.id, "] [mid: ").concat(L.transceiver.mid, "]")), i.unknownTracksMap.delete(b), $(L.track, L.transceiver)) : (i.logger.info("Registering onTrack handler for key ".concat(b, " [producingPeerId: ").concat(c, "]")), i.consumerTrackEvents.set(b, $));
24125
24130
  case 4:
@@ -24270,7 +24275,7 @@ function X_(o) {
24270
24275
  }
24271
24276
  o.warn("Device::this._detectDevice() | unknown device");
24272
24277
  }
24273
- var Kt = /* @__PURE__ */ E("context"), Ea = /* @__PURE__ */ E("logger"), Z_ = /* @__PURE__ */ function() {
24278
+ var Kt = /* @__PURE__ */ C("context"), Ea = /* @__PURE__ */ C("logger"), Z_ = /* @__PURE__ */ function() {
24274
24279
  function o(t) {
24275
24280
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = e.handlerName, n = e.handlerFactory;
24276
24281
  w(this, o), this.handlerFactory = void 0, Object.defineProperty(this, Kt, { writable: !0, value: void 0 }), Object.defineProperty(this, Ea, { writable: !0, value: void 0 });
@@ -24308,7 +24313,7 @@ var Kt = /* @__PURE__ */ E("context"), Ea = /* @__PURE__ */ E("logger"), Z_ = /*
24308
24313
  var r = Ks(), n = new Q_(l(this, Kt)[Kt], N(N({ id: r }, e), {}, { handlerFactory: this.handlerFactory }));
24309
24314
  return n;
24310
24315
  } }]);
24311
- }(), x_ = 2e3, Gs = /* @__PURE__ */ E("device"), sr = /* @__PURE__ */ E("sendTransport"), or = /* @__PURE__ */ E("recvTransport"), hu = /* @__PURE__ */ E("sendTransportConnectedCallback"), vu = /* @__PURE__ */ E("recvTransportConnectedCallback"), ja = /* @__PURE__ */ E("socket"), _s = /* @__PURE__ */ E("socketHandler"), fu = /* @__PURE__ */ E("events"), Xs = /* @__PURE__ */ E("metrics"), Va = /* @__PURE__ */ E("transportDisconnectedTimer"), Ct = /* @__PURE__ */ E("iceTransportPolicy"), Ns = /* @__PURE__ */ E("connectionHandler"), gu = /* @__PURE__ */ E("reset"), od = /* @__PURE__ */ E("createTransports"), mu = /* @__PURE__ */ E("connectTransportWithRetry"), Wd = /* @__PURE__ */ E("connectTransport"), Jd = /* @__PURE__ */ E("createSendTransport"), Kd = /* @__PURE__ */ E("createRecvTransport"), zd = /* @__PURE__ */ E("setTransportEventHandlers"), Yd = /* @__PURE__ */ E("transportConnectionRequest"), Mu = /* @__PURE__ */ E("reconnectTransport"), Zu = /* @__PURE__ */ E("updateTransportState"), eO = /* @__PURE__ */ function(o) {
24316
+ }(), x_ = 2e3, Gs = /* @__PURE__ */ C("device"), sr = /* @__PURE__ */ C("sendTransport"), or = /* @__PURE__ */ C("recvTransport"), hu = /* @__PURE__ */ C("sendTransportConnectedCallback"), vu = /* @__PURE__ */ C("recvTransportConnectedCallback"), ja = /* @__PURE__ */ C("socket"), _s = /* @__PURE__ */ C("socketHandler"), fu = /* @__PURE__ */ C("events"), Xs = /* @__PURE__ */ C("metrics"), Va = /* @__PURE__ */ C("transportDisconnectedTimer"), Ct = /* @__PURE__ */ C("iceTransportPolicy"), Ns = /* @__PURE__ */ C("connectionHandler"), gu = /* @__PURE__ */ C("reset"), od = /* @__PURE__ */ C("createTransports"), mu = /* @__PURE__ */ C("connectTransportWithRetry"), Wd = /* @__PURE__ */ C("connectTransport"), Jd = /* @__PURE__ */ C("createSendTransport"), Kd = /* @__PURE__ */ C("createRecvTransport"), zd = /* @__PURE__ */ C("setTransportEventHandlers"), Yd = /* @__PURE__ */ C("transportConnectionRequest"), Mu = /* @__PURE__ */ C("reconnectTransport"), Zu = /* @__PURE__ */ C("updateTransportState"), eO = /* @__PURE__ */ function(o) {
24312
24317
  function t(e, r) {
24313
24318
  var n;
24314
24319
  w(this, t), n = R(this, t), Object.defineProperty(n, Zu, { value: dO }), Object.defineProperty(n, Mu, { value: cO }), Object.defineProperty(n, Yd, { value: lO }), Object.defineProperty(n, zd, { value: uO }), Object.defineProperty(n, Kd, { value: oO }), Object.defineProperty(n, Jd, { value: sO }), Object.defineProperty(n, Wd, { value: iO }), Object.defineProperty(n, mu, { value: aO }), Object.defineProperty(n, od, { value: nO }), Object.defineProperty(n, gu, { value: tO }), Object.defineProperty(n, Ns, { get: rO, set: void 0 }), n.context = void 0, Object.defineProperty(n, Gs, { writable: !0, value: void 0 }), Object.defineProperty(n, sr, { writable: !0, value: void 0 }), Object.defineProperty(n, or, { writable: !0, value: void 0 }), Object.defineProperty(n, hu, { writable: !0, value: void 0 }), Object.defineProperty(n, vu, { writable: !0, value: void 0 }), Object.defineProperty(n, ja, { writable: !0, value: void 0 }), Object.defineProperty(n, _s, { writable: !0, value: void 0 }), Object.defineProperty(n, fu, { writable: !0, value: void 0 }), Object.defineProperty(n, Xs, { writable: !0, value: { transportFailureCount: { send: 0, recv: 0 }, lastConnectionTime: 0 } }), Object.defineProperty(n, Va, { writable: !0, value: void 0 }), Object.defineProperty(n, Ct, { writable: !0, value: "all" }), n.context = e, l(n, ja)[ja] = r, l(n, Gs)[Gs] = new Z_(e), l(n, _s)[_s] = new V_(r), l(n, fu)[fu] = Vn, l(n, Ns)[Ns].mediaState = { send: { state: Uo.NEW }, recv: { state: Uo.NEW } };
@@ -24691,7 +24696,7 @@ function dO(o) {
24691
24696
  var t = o.state, e = o.direction;
24692
24697
  l(this, Ns)[Ns].mediaState[e] = { state: t }, this.context.getValue("peerSessionStore").emit(F.TRANSPORT_STATE_UPDATE, N({ transport: e }, l(this, Ns)[Ns].mediaState[e]));
24693
24698
  }
24694
- var yu = /* @__PURE__ */ E("context"), xr = /* @__PURE__ */ E("logger"), pO = /* @__PURE__ */ function() {
24699
+ var yu = /* @__PURE__ */ C("context"), xr = /* @__PURE__ */ C("logger"), pO = /* @__PURE__ */ function() {
24695
24700
  function o(t, e, r, n, a) {
24696
24701
  w(this, o), Object.defineProperty(this, yu, { writable: !0, value: void 0 }), Object.defineProperty(this, xr, { writable: !0, value: void 0 }), this.events = e, this.recvTransport = r, this.socket = n, this.socketHandler = a, l(this, yu)[yu] = t, l(this, xr)[xr] = t.getValue("logger");
24697
24702
  }
@@ -24709,17 +24714,17 @@ var yu = /* @__PURE__ */ E("context"), xr = /* @__PURE__ */ E("logger"), pO = /*
24709
24714
  throw new Error("List of producers is required");
24710
24715
  case 2:
24711
24716
  return i = /* @__PURE__ */ new Map(), s = [], n.forEach(function(g) {
24712
- var k = g.producingPeerId, y = g.producerId, b = g.producingTransportId, C = l(a, yu)[yu].getValue("flagsmith").hasFeature(ge.ENABLE_CF_SIMULCAST) ? { simulcast: { preferredRid: "h", priorityOrdering: "asciibetical", ridNotAvailable: "asciibetical" } } : {};
24713
- i.set(y, k), s.push(N({ producingPeerId: k, producerId: y, producingTransportId: b }, C));
24717
+ var k = g.producingPeerId, y = g.producerId, b = g.producingTransportId, E = l(a, yu)[yu].getValue("flagsmith").hasFeature(ge.ENABLE_CF_SIMULCAST) ? { simulcast: { preferredRid: "h", priorityOrdering: "asciibetical", ridNotAvailable: "asciibetical" } } : {};
24718
+ i.set(y, k), s.push(N({ producingPeerId: k, producerId: y, producingTransportId: b }, E));
24714
24719
  }), f.next = 7, this.socketHandler.consume({ requests: s, consumingTransportId: this.recvTransport.serverId });
24715
24720
  case 7:
24716
24721
  return u = f.sent, c = /* @__PURE__ */ new Map(), n.forEach(function(g) {
24717
24722
  return c.set(g.producerId, g);
24718
24723
  }), d = /* @__PURE__ */ new Map(), p = [], Object.entries(u.consumerStateMap).forEach(function(g) {
24719
- var k = He(g, 2), y = k[0], b = k[1], C = c.get(y);
24720
- if (C) {
24724
+ var k = He(g, 2), y = k[0], b = k[1], E = c.get(y);
24725
+ if (E) {
24721
24726
  if (b.errorCode) {
24722
- l(a, xr)[xr].warn("Consumer request failed for producer ".concat(y), { error: { message: b.errorCode } }), p.push(N(N({}, C), {}, { errorCode: b.errorCode }));
24727
+ l(a, xr)[xr].warn("Consumer request failed for producer ".concat(y), { error: { message: b.errorCode } }), p.push(N(N({}, E), {}, { errorCode: b.errorCode }));
24723
24728
  return;
24724
24729
  }
24725
24730
  var T = {};
@@ -24727,7 +24732,7 @@ var yu = /* @__PURE__ */ E("context"), xr = /* @__PURE__ */ E("logger"), pO = /*
24727
24732
  T = JSON.parse(b.producerState.appData);
24728
24733
  } catch (S) {
24729
24734
  }
24730
- d.set(y, { consumerId: b.consumerId, producingTransportId: C.producingTransportId, producingPeerId: C.producingPeerId, kind: C.kind, paused: C.pause, streamId: b.producerTrack.streamId, trackId: b.producerTrack.trackId, screenShare: C.screenShare, mimeType: C.mimeType, appData: T });
24735
+ d.set(y, { consumerId: b.consumerId, producingTransportId: E.producingTransportId, producingPeerId: E.producingPeerId, kind: E.kind, paused: E.pause, streamId: b.producerTrack.streamId, trackId: b.producerTrack.trackId, screenShare: E.screenShare, mimeType: E.mimeType, appData: T });
24731
24736
  }
24732
24737
  }), f.abrupt("return", { consumerStates: d, sessionDescription: u.sessionDescription, failedProducers: p });
24733
24738
  case 14:
@@ -24780,18 +24785,18 @@ var yu = /* @__PURE__ */ E("context"), xr = /* @__PURE__ */ E("logger"), pO = /*
24780
24785
  return i = /* @__PURE__ */ function() {
24781
24786
  var c = m(/* @__PURE__ */ h().mark(function d(p, v) {
24782
24787
  var f, g, k, y;
24783
- return h().wrap(function(C) {
24788
+ return h().wrap(function(E) {
24784
24789
  for (; ; )
24785
- switch (C.prev = C.next) {
24790
+ switch (E.prev = E.next) {
24786
24791
  case 0:
24787
24792
  return f = p.map(function(T) {
24788
24793
  return T.localId;
24789
- }), l(a, xr)[xr].info("Closing consumers: ".concat(JSON.stringify(f))), g = { description: { sdp: v.sdp, type: v.type, target: Ga.SUBSCRIBER }, consumerIds: f, consumingTransportId: a.recvTransport.serverId }, C.next = 5, a.socketHandler.closeConsumer(g);
24794
+ }), l(a, xr)[xr].info("Closing consumers: ".concat(JSON.stringify(f))), g = { description: { sdp: v.sdp, type: v.type, target: Ga.SUBSCRIBER }, consumerIds: f, consumingTransportId: a.recvTransport.serverId }, E.next = 5, a.socketHandler.closeConsumer(g);
24790
24795
  case 5:
24791
- return k = C.sent, y = wE.fromBinary(k).description, C.abrupt("return", { sdp: y.sdp, type: y.type });
24796
+ return k = E.sent, y = wE.fromBinary(k).description, E.abrupt("return", { sdp: y.sdp, type: y.type });
24792
24797
  case 8:
24793
24798
  case "end":
24794
- return C.stop();
24799
+ return E.stop();
24795
24800
  }
24796
24801
  }, d);
24797
24802
  }));
@@ -24872,7 +24877,7 @@ var yu = /* @__PURE__ */ E("context"), xr = /* @__PURE__ */ E("logger"), pO = /*
24872
24877
  }).at(-1).msid;
24873
24878
  return a;
24874
24879
  } }]);
24875
- }(), La = /* @__PURE__ */ E("producers"), $n = /* @__PURE__ */ E("consumers"), bs = /* @__PURE__ */ E("producerIdToConsumerIdMap"), $u = /* @__PURE__ */ E("producerStrategy"), Et = /* @__PURE__ */ E("consumerStrategy"), ud = /* @__PURE__ */ E("metrics"), tn = /* @__PURE__ */ E("producersToConsume"), Os = /* @__PURE__ */ E("processConsumerTimeout"), Nu = /* @__PURE__ */ E("processConsumers"), ld = /* @__PURE__ */ E("producerCreationRequest"), cd = /* @__PURE__ */ E("handleProducer"), rp = /* @__PURE__ */ E("consumerCreationRequest"), tp = /* @__PURE__ */ E("handleConsumer"), vO = /* @__PURE__ */ function(o) {
24880
+ }(), La = /* @__PURE__ */ C("producers"), $n = /* @__PURE__ */ C("consumers"), bs = /* @__PURE__ */ C("producerIdToConsumerIdMap"), $u = /* @__PURE__ */ C("producerStrategy"), Et = /* @__PURE__ */ C("consumerStrategy"), ud = /* @__PURE__ */ C("metrics"), tn = /* @__PURE__ */ C("producersToConsume"), Os = /* @__PURE__ */ C("processConsumerTimeout"), Nu = /* @__PURE__ */ C("processConsumers"), ld = /* @__PURE__ */ C("producerCreationRequest"), cd = /* @__PURE__ */ C("handleProducer"), rp = /* @__PURE__ */ C("consumerCreationRequest"), tp = /* @__PURE__ */ C("handleConsumer"), vO = /* @__PURE__ */ function(o) {
24876
24881
  function t(e, r) {
24877
24882
  var n;
24878
24883
  return w(this, t), n = R(this, t, [e, r]), Object.defineProperty(n, tp, { value: kO }), Object.defineProperty(n, rp, { value: yO }), Object.defineProperty(n, cd, { value: mO }), Object.defineProperty(n, ld, { value: gO }), Object.defineProperty(n, Nu, { value: fO }), Object.defineProperty(n, La, { writable: !0, value: void 0 }), Object.defineProperty(n, $n, { writable: !0, value: void 0 }), Object.defineProperty(n, bs, { writable: !0, value: void 0 }), Object.defineProperty(n, $u, { writable: !0, value: void 0 }), Object.defineProperty(n, Et, { writable: !0, value: void 0 }), Object.defineProperty(n, ud, { writable: !0, value: { producerCreationFailureCount: 0, consumerCreationFailureCount: 0, producerNotReadyFailureCount: 0 } }), Object.defineProperty(n, tn, { writable: !0, value: [] }), Object.defineProperty(n, Os, { writable: !0, value: void 0 }), n.context = e, n.sendTransportConnectedCallback = /* @__PURE__ */ m(/* @__PURE__ */ h().mark(function a() {
@@ -25197,9 +25202,9 @@ function kO(o) {
25197
25202
  };
25198
25203
  }()), l(this, $n)[$n].set(o.id, o), this.producerIdToConsumerIdMap.set(o.producerId, o.id), this.context.getValue("peerSessionStore").emit(F.NEW_CONSUMER, { id: o.id, appData: o.appData, peerId: o.peerId });
25199
25204
  }
25200
- var ku = /* @__PURE__ */ E("zeroCrossingThreshold"), bu = /* @__PURE__ */ E("minVoiceDuration"), Tu = /* @__PURE__ */ E("hangoverFrames"), Ts = /* @__PURE__ */ E("initialEnergyThreshold"), Vs = /* @__PURE__ */ E("noiseAdaptationRate"), Us = /* @__PURE__ */ E("voiceAdaptationRate"), Vu = /* @__PURE__ */ E("minEnergyThreshold"), Uu = /* @__PURE__ */ E("maxEnergyThreshold"), ws = /* @__PURE__ */ E("energyRatioThreshold"), Mr = /* @__PURE__ */ E("currentEnergyThreshold"), dt = /* @__PURE__ */ E("backgroundNoiseEnergy"), ct = /* @__PURE__ */ E("voiceDetected"), Ca = /* @__PURE__ */ E("consecutiveVoiceFrames"), Ra = /* @__PURE__ */ E("hangoverCount"), en = /* @__PURE__ */ E("noiseEnergyHistory"), ju = /* @__PURE__ */ E("noiseHistorySize"), dd = /* @__PURE__ */ E("updateEnergyThreshold"), pd = /* @__PURE__ */ E("updateNoiseEstimate"), ip = /* @__PURE__ */ E("calculateEnergy"), sp = /* @__PURE__ */ E("calculateZeroCrossingRate"), Yp = /* @__PURE__ */ function() {
25205
+ var ku = /* @__PURE__ */ C("zeroCrossingThreshold"), bu = /* @__PURE__ */ C("minVoiceDuration"), Tu = /* @__PURE__ */ C("hangoverFrames"), Ts = /* @__PURE__ */ C("initialEnergyThreshold"), Vs = /* @__PURE__ */ C("noiseAdaptationRate"), Us = /* @__PURE__ */ C("voiceAdaptationRate"), Vu = /* @__PURE__ */ C("minEnergyThreshold"), Uu = /* @__PURE__ */ C("maxEnergyThreshold"), ws = /* @__PURE__ */ C("energyRatioThreshold"), Mr = /* @__PURE__ */ C("currentEnergyThreshold"), dt = /* @__PURE__ */ C("backgroundNoiseEnergy"), ct = /* @__PURE__ */ C("voiceDetected"), Ca = /* @__PURE__ */ C("consecutiveVoiceFrames"), Ra = /* @__PURE__ */ C("hangoverCount"), en = /* @__PURE__ */ C("noiseEnergyHistory"), ju = /* @__PURE__ */ C("noiseHistorySize"), dd = /* @__PURE__ */ C("updateEnergyThreshold"), pd = /* @__PURE__ */ C("updateNoiseEstimate"), ip = /* @__PURE__ */ C("calculateEnergy"), sp = /* @__PURE__ */ C("calculateZeroCrossingRate"), Yp = /* @__PURE__ */ function() {
25201
25206
  function o() {
25202
- var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.initialEnergyThreshold, r = e === void 0 ? 0.015 : e, n = t.zeroCrossingThreshold, a = n === void 0 ? 20 : n, i = t.minVoiceDuration, s = i === void 0 ? 3 : i, u = t.hangoverFrames, c = u === void 0 ? 5 : u, d = t.noiseAdaptationRate, p = d === void 0 ? 0.95 : d, v = t.voiceAdaptationRate, f = v === void 0 ? 0.99 : v, g = t.minEnergyThreshold, k = g === void 0 ? 5e-3 : g, y = t.maxEnergyThreshold, b = y === void 0 ? 0.2 : y, C = t.energyRatioThreshold, T = C === void 0 ? 1.5 : C, S = t.noiseHistorySize, D = S === void 0 ? 50 : S;
25207
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.initialEnergyThreshold, r = e === void 0 ? 0.015 : e, n = t.zeroCrossingThreshold, a = n === void 0 ? 20 : n, i = t.minVoiceDuration, s = i === void 0 ? 3 : i, u = t.hangoverFrames, c = u === void 0 ? 5 : u, d = t.noiseAdaptationRate, p = d === void 0 ? 0.95 : d, v = t.voiceAdaptationRate, f = v === void 0 ? 0.99 : v, g = t.minEnergyThreshold, k = g === void 0 ? 5e-3 : g, y = t.maxEnergyThreshold, b = y === void 0 ? 0.2 : y, E = t.energyRatioThreshold, T = E === void 0 ? 1.5 : E, S = t.noiseHistorySize, D = S === void 0 ? 50 : S;
25203
25208
  w(this, o), Object.defineProperty(this, pd, { value: TO }), Object.defineProperty(this, dd, { value: bO }), Object.defineProperty(this, ku, { writable: !0, value: void 0 }), Object.defineProperty(this, bu, { writable: !0, value: void 0 }), Object.defineProperty(this, Tu, { writable: !0, value: void 0 }), Object.defineProperty(this, Ts, { writable: !0, value: void 0 }), Object.defineProperty(this, Vs, { writable: !0, value: void 0 }), Object.defineProperty(this, Us, { writable: !0, value: void 0 }), Object.defineProperty(this, Vu, { writable: !0, value: void 0 }), Object.defineProperty(this, Uu, { writable: !0, value: void 0 }), Object.defineProperty(this, ws, { writable: !0, value: void 0 }), Object.defineProperty(this, Mr, { writable: !0, value: void 0 }), Object.defineProperty(this, dt, { writable: !0, value: void 0 }), Object.defineProperty(this, ct, { writable: !0, value: !1 }), Object.defineProperty(this, Ca, { writable: !0, value: 0 }), Object.defineProperty(this, Ra, { writable: !0, value: 0 }), Object.defineProperty(this, en, { writable: !0, value: [] }), Object.defineProperty(this, ju, { writable: !0, value: void 0 }), l(this, Ts)[Ts] = r, l(this, Mr)[Mr] = r, l(this, ku)[ku] = a, l(this, bu)[bu] = s, l(this, Tu)[Tu] = c, l(this, Vs)[Vs] = p, l(this, Us)[Us] = f, l(this, Vu)[Vu] = k, l(this, Uu)[Uu] = b, l(this, ws)[ws] = T, l(this, ju)[ju] = D, l(this, dt)[dt] = r / 2;
25204
25209
  }
25205
25210
  return P(o, [{
@@ -25261,7 +25266,7 @@ function PO(o) {
25261
25266
  }
25262
25267
  Object.defineProperty(Yp, sp, { value: PO });
25263
25268
  Object.defineProperty(Yp, ip, { value: wO });
25264
- var wu = /* @__PURE__ */ E("context"), Tv = /* @__PURE__ */ function() {
25269
+ var wu = /* @__PURE__ */ C("context"), Tv = /* @__PURE__ */ function() {
25265
25270
  function o(t) {
25266
25271
  var e = this;
25267
25272
  w(this, o), this.RNAudioSampleHandler = void 0, Object.defineProperty(this, wu, { writable: !0, value: void 0 }), l(this, wu)[wu] = t;
@@ -25287,7 +25292,7 @@ var wu = /* @__PURE__ */ E("context"), Tv = /* @__PURE__ */ function() {
25287
25292
  var e;
25288
25293
  (e = this.RNAudioSampleHandler) === null || e === void 0 || e.destructor();
25289
25294
  } }]);
25290
- }(), Pu = /* @__PURE__ */ E("context"), wv = /* @__PURE__ */ function() {
25295
+ }(), Pu = /* @__PURE__ */ C("context"), wv = /* @__PURE__ */ function() {
25291
25296
  function o(t) {
25292
25297
  w(this, o), this.audioContext = void 0, this.analyser = void 0, Object.defineProperty(this, Pu, { writable: !0, value: void 0 }), l(this, Pu)[Pu] = t, this.audioContext = new AudioContext(), this.analyser = this.audioContext.createAnalyser(), this.analyser.fftSize = 2048;
25293
25298
  }
@@ -25339,7 +25344,7 @@ var wu = /* @__PURE__ */ E("context"), Tv = /* @__PURE__ */ function() {
25339
25344
  } }, { key: "clearTimeout", value: function(e) {
25340
25345
  return navigator && navigator.RNBackgroundTimerImpl ? navigator.RNBackgroundTimerImpl.clearTimeout(e) : global.clearTimeout(e);
25341
25346
  } }]);
25342
- }(), EO = 60, CO = 400, zt = /* @__PURE__ */ E("interval"), Yt = /* @__PURE__ */ E("reportInterval"), pt = /* @__PURE__ */ E("producerId"), Su = /* @__PURE__ */ E("audioTrack"), Fa = /* @__PURE__ */ E("energy"), Ds = /* @__PURE__ */ E("vad"), Zt = /* @__PURE__ */ E("minEnergy"), On = /* @__PURE__ */ E("maxEnergy"), Ls = /* @__PURE__ */ E("previousState"), rn = /* @__PURE__ */ E("context"), xt = /* @__PURE__ */ E("audioSampler"), wt = /* @__PURE__ */ E("timer"), hd = /* @__PURE__ */ E("getAudioCharacteristics"), xu = /* @__PURE__ */ E("isSilent"), vd = /* @__PURE__ */ E("report"), op = /* @__PURE__ */ E("logScale"), Mc = /* @__PURE__ */ function() {
25347
+ }(), EO = 60, CO = 400, zt = /* @__PURE__ */ C("interval"), Yt = /* @__PURE__ */ C("reportInterval"), pt = /* @__PURE__ */ C("producerId"), Su = /* @__PURE__ */ C("audioTrack"), Fa = /* @__PURE__ */ C("energy"), Ds = /* @__PURE__ */ C("vad"), Zt = /* @__PURE__ */ C("minEnergy"), On = /* @__PURE__ */ C("maxEnergy"), Ls = /* @__PURE__ */ C("previousState"), rn = /* @__PURE__ */ C("context"), xt = /* @__PURE__ */ C("audioSampler"), wt = /* @__PURE__ */ C("timer"), hd = /* @__PURE__ */ C("getAudioCharacteristics"), xu = /* @__PURE__ */ C("isSilent"), vd = /* @__PURE__ */ C("report"), op = /* @__PURE__ */ C("logScale"), Mc = /* @__PURE__ */ function() {
25343
25348
  function o(t, e) {
25344
25349
  w(this, o), Object.defineProperty(this, vd, { value: IO }), Object.defineProperty(this, hd, { value: RO }), Object.defineProperty(this, zt, { writable: !0, value: void 0 }), Object.defineProperty(this, Yt, { writable: !0, value: void 0 }), Object.defineProperty(this, pt, { writable: !0, value: void 0 }), Object.defineProperty(this, Su, { writable: !0, value: void 0 }), Object.defineProperty(this, Fa, { writable: !0, value: void 0 }), Object.defineProperty(this, Ds, { writable: !0, value: void 0 }), Object.defineProperty(this, Zt, { writable: !0, value: void 0 }), Object.defineProperty(this, On, { writable: !0, value: void 0 }), Object.defineProperty(this, Ls, { writable: !0, value: void 0 }), Object.defineProperty(this, rn, { writable: !0, value: void 0 }), Object.defineProperty(this, xt, { writable: !0, value: void 0 }), Object.defineProperty(this, wt, { writable: !0, value: void 0 }), this.reportRequest = e, l(this, rn)[rn] = t, l(this, Ds)[Ds] = new Yp();
25345
25350
  var r = navigator, n = r.isReactNative;
@@ -25420,7 +25425,7 @@ var _O = function() {
25420
25425
  if ("MediaStreamTrackGenerator" in window && "AudioData" in window)
25421
25426
  try {
25422
25427
  var e = new window.MediaStreamTrackGenerator({ kind: "audio" }), r = e.writable.getWriter(), n = 48e3, a = 128, i = 1, s = 0, u = null, c = /* @__PURE__ */ function() {
25423
- var C = m(/* @__PURE__ */ h().mark(function T() {
25428
+ var E = m(/* @__PURE__ */ h().mark(function T() {
25424
25429
  var S, D;
25425
25430
  return h().wrap(function(_) {
25426
25431
  for (; ; )
@@ -25441,7 +25446,7 @@ var _O = function() {
25441
25446
  }, T, null, [[0, 10]]);
25442
25447
  }));
25443
25448
  return function() {
25444
- return C.apply(this, arguments);
25449
+ return E.apply(this, arguments);
25445
25450
  };
25446
25451
  }();
25447
25452
  u = window.setInterval(c, 100);
@@ -25449,7 +25454,7 @@ var _O = function() {
25449
25454
  return p.addEventListener("ended", function() {
25450
25455
  u && clearInterval(u), r.releaseLock(), e.writable.abort();
25451
25456
  }), Object.assign(p, { fakeTracks: "fakeTracks:fakeAudioTrack" }), p.enabled = t, p;
25452
- } catch (C) {
25457
+ } catch (E) {
25453
25458
  }
25454
25459
  var v = window.AudioContext || window.webkitAudioContext;
25455
25460
  if (v)
@@ -25465,7 +25470,7 @@ var _O = function() {
25465
25470
  k.connect(y), g.start();
25466
25471
  var b = y.stream.getAudioTracks()[0];
25467
25472
  return b ? (Object.assign(b, { fakeTracks: "fakeTracks:fakeAudioTrack" }), b.enabled = t, b) : void 0;
25468
- } catch (C) {
25473
+ } catch (E) {
25469
25474
  return;
25470
25475
  }
25471
25476
  }, OO = function() {
@@ -25481,7 +25486,7 @@ var _O = function() {
25481
25486
  for (var a = n > 1 ? void 0 : n ? LO(e, r) : e, i = t.length - 1, s; i >= 0; i--)
25482
25487
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
25483
25488
  return n && a && DO(e, r, a), a;
25484
- }, Qt = ["video/VP9", "video/VP8"], _g = (Co = /* @__PURE__ */ E("roomUUID"), Ro = /* @__PURE__ */ E("peerDisplayName"), Xe = /* @__PURE__ */ E("socketClient"), W = /* @__PURE__ */ E("sfuHandler"), Ci = /* @__PURE__ */ E("rtpCapabilities"), lr = /* @__PURE__ */ E("events"), ua = /* @__PURE__ */ E("roomJoiningInProgress"), la = /* @__PURE__ */ E("onceJoined"), ra = /* @__PURE__ */ E("transportQueue"), fo = /* @__PURE__ */ E("rejoinRoomFn"), Jr = /* @__PURE__ */ E("connectionPromise"), Dt = /* @__PURE__ */ E("screenshareConsumerProducer"), js = /* @__PURE__ */ E("location"), ta = /* @__PURE__ */ E("senderVideoCodecMap"), na = /* @__PURE__ */ E("receiverVideoCodecMap"), hr = /* @__PURE__ */ E("producerTypes"), Pr = /* @__PURE__ */ E("audioActivityReporter"), fn = /* @__PURE__ */ E("connectionHandler"), ml = /* @__PURE__ */ E("joinRoom"), Bl = /* @__PURE__ */ E("completeJoinRoom"), ql = /* @__PURE__ */ E("reportRoomJoinedAnalytics"), Ao = /* @__PURE__ */ E("initializeConnection"), Gl = /* @__PURE__ */ E("getLocation"), Wl = /* @__PURE__ */ E("getRtpCapabilities"), Jl = /* @__PURE__ */ E("sendJoinRoomMessage"), Kl = /* @__PURE__ */ E("setupInitialMediaProducers"), We = /* @__PURE__ */ E("getProducer"), aa = /* @__PURE__ */ E("setProducer"), yl = /* @__PURE__ */ E("deleteProducer"), kl = /* @__PURE__ */ E("getMicProducerDefaults"), bl = /* @__PURE__ */ E("getWebcamProducerDefaults"), Uc = /* @__PURE__ */ function() {
25489
+ }, Qt = ["video/VP9", "video/VP8"], _g = (Co = /* @__PURE__ */ C("roomUUID"), Ro = /* @__PURE__ */ C("peerDisplayName"), Xe = /* @__PURE__ */ C("socketClient"), W = /* @__PURE__ */ C("sfuHandler"), Ci = /* @__PURE__ */ C("rtpCapabilities"), lr = /* @__PURE__ */ C("events"), ua = /* @__PURE__ */ C("roomJoiningInProgress"), la = /* @__PURE__ */ C("onceJoined"), ra = /* @__PURE__ */ C("transportQueue"), fo = /* @__PURE__ */ C("rejoinRoomFn"), Jr = /* @__PURE__ */ C("connectionPromise"), Dt = /* @__PURE__ */ C("screenshareConsumerProducer"), js = /* @__PURE__ */ C("location"), ta = /* @__PURE__ */ C("senderVideoCodecMap"), na = /* @__PURE__ */ C("receiverVideoCodecMap"), hr = /* @__PURE__ */ C("producerTypes"), Pr = /* @__PURE__ */ C("audioActivityReporter"), fn = /* @__PURE__ */ C("connectionHandler"), ml = /* @__PURE__ */ C("joinRoom"), Bl = /* @__PURE__ */ C("completeJoinRoom"), ql = /* @__PURE__ */ C("reportRoomJoinedAnalytics"), Ao = /* @__PURE__ */ C("initializeConnection"), Gl = /* @__PURE__ */ C("getLocation"), Wl = /* @__PURE__ */ C("getRtpCapabilities"), Jl = /* @__PURE__ */ C("sendJoinRoomMessage"), Kl = /* @__PURE__ */ C("setupInitialMediaProducers"), We = /* @__PURE__ */ C("getProducer"), aa = /* @__PURE__ */ C("setProducer"), yl = /* @__PURE__ */ C("deleteProducer"), kl = /* @__PURE__ */ C("getMicProducerDefaults"), bl = /* @__PURE__ */ C("getWebcamProducerDefaults"), Uc = /* @__PURE__ */ function() {
25485
25490
  function o(t, e) {
25486
25491
  var r, n, a = this;
25487
25492
  w(this, o), Object.defineProperty(this, bl, { value: zO }), Object.defineProperty(this, kl, { value: KO }), Object.defineProperty(this, yl, { value: JO }), Object.defineProperty(this, aa, { value: WO }), Object.defineProperty(this, We, { value: GO }), Object.defineProperty(this, Kl, { value: qO }), Object.defineProperty(this, Jl, { value: BO }), Object.defineProperty(this, Wl, { value: HO }), Object.defineProperty(this, Ao, { value: jO }), Object.defineProperty(this, ql, { value: UO }), Object.defineProperty(this, Bl, { value: VO }), Object.defineProperty(this, ml, { value: NO }), Object.defineProperty(this, fn, { get: $O, set: void 0 }), this.context = void 0, this.authToken = void 0, this.e2ee = void 0, Object.defineProperty(this, Co, { writable: !0, value: void 0 }), Object.defineProperty(this, Ro, { writable: !0, value: void 0 }), Object.defineProperty(this, Xe, { writable: !0, value: void 0 }), Object.defineProperty(this, W, { writable: !0, value: void 0 }), Object.defineProperty(this, Ci, { writable: !0, value: void 0 }), Object.defineProperty(this, lr, { writable: !0, value: void 0 }), Object.defineProperty(this, ua, { writable: !0, value: void 0 }), Object.defineProperty(this, la, { writable: !0, value: void 0 }), Object.defineProperty(this, ra, { writable: !0, value: void 0 }), Object.defineProperty(this, fo, { writable: !0, value: void 0 }), Object.defineProperty(this, Jr, { writable: !0, value: null }), Object.defineProperty(this, Dt, { writable: !0, value: void 0 }), Object.defineProperty(this, js, { writable: !0, value: void 0 }), Object.defineProperty(this, ta, { writable: !0, value: void 0 }), Object.defineProperty(this, na, { writable: !0, value: void 0 }), Object.defineProperty(this, hr, { writable: !0, value: void 0 }), Object.defineProperty(this, Pr, { writable: !0, value: void 0 }), this.context = t;
@@ -25701,7 +25706,7 @@ var _O = function() {
25701
25706
  return e;
25702
25707
  }() }, { key: "_shareWebcam", value: function() {
25703
25708
  var t = m(/* @__PURE__ */ h().mark(function r(n, a) {
25704
- var i, s = this, u, c, d, p, v, f, g, k, y, b, C;
25709
+ var i, s = this, u, c, d, p, v, f, g, k, y, b, E;
25705
25710
  return h().wrap(function(S) {
25706
25711
  for (; ; )
25707
25712
  switch (S.prev = S.next) {
@@ -25734,9 +25739,9 @@ var _O = function() {
25734
25739
  return D !== a;
25735
25740
  })), f = l(this, bl)[bl](n, v), g = No(this.context, "disableSimulcast"), k = (i = this.context) === null || i === void 0 || (i = i.getValue("overrides")) === null || i === void 0 ? void 0 : i.simulcastConfig, y = g || k && k.disable, !y && this.context.getValue("flagsmith").hasFeature(ge.ENABLE_CF_SIMULCAST) ? (this.logger.info("Simulcast enabled for SFU: CF"), f.encodings = fM(this.context, n)) : this.logger.info("Simulcast disabled for webcam producer, SFU: CF"), this.context.getValue("flagsmith").hasFeature(ge.TRACK_HINT) && (f.track.contentHint = this.context.getValue("flagsmith").getValue(ge.TRACK_HINT)), b = function() {
25736
25741
  s.logger.info("Disabling video due to the producer closure"), l(s, hr)[hr].delete(u);
25737
- }, C = l(this, W)[W].createProducer(f, b), l(this, aa)[aa](u, C.then(function(D) {
25742
+ }, E = l(this, W)[W].createProducer(f, b), l(this, aa)[aa](u, E.then(function(D) {
25738
25743
  return D.id;
25739
- })), S.abrupt("return", C.then(function(D) {
25744
+ })), S.abrupt("return", E.then(function(D) {
25740
25745
  return D.track;
25741
25746
  }));
25742
25747
  case 28:
@@ -26368,10 +26373,10 @@ var _O = function() {
26368
26373
  if (n.logger.info("producer toggle broadcast: ".concat(d, ", producerId: ").concat(k, ", kind:").concat(b, ", paused:").concat(g, " payload: ").concat(JSON.stringify(zh.fromBinary(u)))), d === n.peerId && p !== n.peerId && g && n.context.getValue("peerSessionStore").emit(b === "audio" ? F.MUTE_SELF : F.MUTE_SELF_VIDEO), d === n.peerId)
26369
26374
  return;
26370
26375
  n.context.getValue("peerSessionStore").emit(F.PRODUCER_TOGGLE, { peerId: d, producerId: k, paused: g, kind: b });
26371
- var C = Array.from(n.getConsumers().values()).filter(function(T) {
26376
+ var E = Array.from(n.getConsumers().values()).filter(function(T) {
26372
26377
  return T.producerId === k;
26373
26378
  });
26374
- C.forEach(function(T) {
26379
+ E.forEach(function(T) {
26375
26380
  T.kind === "video" && g || T.paused !== g && (n.logger.debug("consumer state mismatched for ".concat(T.id, ". updating consumer pause state ").concat(T.paused, " to ").concat(g)), g ? (T.pause(), n.context.getValue("peerSessionStore").emit(F.CONSUMER_PAUSED, { id: T.id })) : (T.resume(), n.context.getValue("peerSessionStore").emit(F.CONSUMER_RESUMED, { id: T.id })));
26376
26381
  });
26377
26382
  } catch (T) {
@@ -26727,7 +26732,7 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
26727
26732
  for (var a = n > 1 ? void 0 : n ? QO(e, r) : e, i = t.length - 1, s; i >= 0; i--)
26728
26733
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
26729
26734
  return n && a && YO(e, r, a), a;
26730
- }, Lg = (ia = /* @__PURE__ */ E("socketService"), tt = /* @__PURE__ */ E("roomSocketHandler"), Z = /* @__PURE__ */ E("context"), cr = /* @__PURE__ */ E("roomNodeClient"), /* @__PURE__ */ function() {
26735
+ }, Lg = (ia = /* @__PURE__ */ C("socketService"), tt = /* @__PURE__ */ C("roomSocketHandler"), Z = /* @__PURE__ */ C("context"), cr = /* @__PURE__ */ C("roomNodeClient"), /* @__PURE__ */ function() {
26731
26736
  function o(t, e, r, n) {
26732
26737
  w(this, o), Object.defineProperty(this, cr, { get: XO, set: void 0 }), this.self = void 0, this.authToken = void 0, Object.defineProperty(this, ia, { writable: !0, value: void 0 }), this.viewType = void 0, Object.defineProperty(this, tt, { writable: !0, value: void 0 }), Object.defineProperty(this, Z, { writable: !0, value: void 0 });
26733
26738
  var a = r.socket, i = t.getValue("authToken");
@@ -27023,12 +27028,12 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
27023
27028
  return e;
27024
27029
  }() }, { key: "joinMediaRoom", value: function() {
27025
27030
  var t = m(/* @__PURE__ */ h().mark(function r() {
27026
- var n, a, i, s, u, c, d, p, v, f, g, k, y, b, C = arguments;
27031
+ var n, a, i, s, u, c, d, p, v, f, g, k, y, b, E = arguments;
27027
27032
  return h().wrap(function(S) {
27028
27033
  for (; ; )
27029
27034
  switch (S.prev = S.next) {
27030
27035
  case 0:
27031
- if (n = C.length > 0 && C[0] !== void 0 ? C[0] : !1, a = l(this, Z)[Z].getAllValues(), i = a.peerId, s = a.viewType, u = a.meetingId, c = a.stageStatus, S.prev = 2, s !== Lt.Livestream) {
27036
+ if (n = E.length > 0 && E[0] !== void 0 ? E[0] : !1, a = l(this, Z)[Z].getAllValues(), i = a.peerId, s = a.viewType, u = a.meetingId, c = a.stageStatus, S.prev = 2, s !== Lt.Livestream) {
27032
27037
  S.next = 9;
27033
27038
  break;
27034
27039
  }
@@ -27164,18 +27169,18 @@ var YO = Object.defineProperty, QO = Object.getOwnPropertyDescriptor, ao = funct
27164
27169
  return c = ht(), d = n.getValue("peerId"), p = !!n.getValue("cachedUserDetails"), y.next = 5, it.__init__(n, i, s, u, u.name, p);
27165
27170
  case 5:
27166
27171
  return v = y.sent, n.setValue("self", v), f = n.getValue("logger"), navigator.product !== "ReactNative" ? (g = !n.getValue("flagsmith").hasFeature(ge.PRECALL_BANDWIDTH_TEST), setTimeout(/* @__PURE__ */ m(/* @__PURE__ */ h().mark(function b() {
27167
- var C;
27172
+ var E;
27168
27173
  return h().wrap(function(S) {
27169
27174
  for (; ; )
27170
27175
  switch (S.prev = S.next) {
27171
27176
  case 0:
27172
27177
  return S.next = 2, v.getAllDevices();
27173
27178
  case 2:
27174
- return C = S.sent, f.info("populated_full_device_list", { devices: JSON.stringify(C) }), n.getValue("callstats").devices("AUDIO", C == null ? void 0 : C.filter(function(D) {
27179
+ return E = S.sent, f.info("populated_full_device_list", { devices: JSON.stringify(E) }), n.getValue("callstats").devices("AUDIO", E == null ? void 0 : E.filter(function(D) {
27175
27180
  return D.kind === "audioinput";
27176
- })), n.getValue("callstats").devices("VIDEO", C == null ? void 0 : C.filter(function(D) {
27181
+ })), n.getValue("callstats").devices("VIDEO", E == null ? void 0 : E.filter(function(D) {
27177
27182
  return D.kind === "videoinput";
27178
- })), n.getValue("callstats").devices("SPEAKER", C == null ? void 0 : C.filter(function(D) {
27183
+ })), n.getValue("callstats").devices("SPEAKER", E == null ? void 0 : E.filter(function(D) {
27179
27184
  return D.kind === "audiooutput";
27180
27185
  })), f.info("Callstats:: initializing"), S.prev = 8, S.t0 = n.getValue("callstats"), S.t1 = d, S.t2 = br.getDeviceInfo().engineName, S.t3 = n.getValue("env"), S.next = 15, c.getICEServers();
27181
27186
  case 15:
@@ -27214,7 +27219,7 @@ ao([O.trace("SelfController.leaveRoom")], Li.prototype, "leaveRoom", 1);
27214
27219
  ao([O.trace("SelfController.joinMediaRoom")], Li.prototype, "joinMediaRoom", 1);
27215
27220
  ao([O.trace("SelfController.leaveMediaRoom")], Li.prototype, "leaveMediaRoom", 1);
27216
27221
  ao([O.trace("SelfController.init")], Li, "init", 1);
27217
- var Eu = /* @__PURE__ */ E("socket"), ZO = /* @__PURE__ */ function() {
27222
+ var Eu = /* @__PURE__ */ C("socket"), ZO = /* @__PURE__ */ function() {
27218
27223
  function o(t) {
27219
27224
  w(this, o), Object.defineProperty(this, Eu, { writable: !0, value: void 0 }), l(this, Eu)[Eu] = t;
27220
27225
  }
@@ -27228,7 +27233,7 @@ var Eu = /* @__PURE__ */ E("socket"), ZO = /* @__PURE__ */ function() {
27228
27233
  }
27229
27234
  });
27230
27235
  } }]);
27231
- }(), Cu = /* @__PURE__ */ E("socket"), Ru = /* @__PURE__ */ E("context"), xO = /* @__PURE__ */ function() {
27236
+ }(), Cu = /* @__PURE__ */ C("socket"), Ru = /* @__PURE__ */ C("context"), xO = /* @__PURE__ */ function() {
27232
27237
  function o(t, e) {
27233
27238
  w(this, o), Object.defineProperty(this, Cu, { writable: !0, value: void 0 }), Object.defineProperty(this, Ru, { writable: !0, value: void 0 }), l(this, Cu)[Cu] = e, l(this, Ru)[Ru] = t;
27234
27239
  }
@@ -27266,7 +27271,7 @@ var Eu = /* @__PURE__ */ E("socket"), ZO = /* @__PURE__ */ function() {
27266
27271
  for (var a = n > 1 ? void 0 : n ? rD(e, r) : e, i = t.length - 1, s; i >= 0; i--)
27267
27272
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
27268
27273
  return n && a && eD(e, r, a), a;
27269
- }, Xt = /* @__PURE__ */ E("socket"), Ps = /* @__PURE__ */ E("context"), _c = /* @__PURE__ */ function() {
27274
+ }, Xt = /* @__PURE__ */ C("socket"), Ps = /* @__PURE__ */ C("context"), _c = /* @__PURE__ */ function() {
27270
27275
  function o(t, e) {
27271
27276
  w(this, o), Object.defineProperty(this, Xt, { writable: !0, value: void 0 }), Object.defineProperty(this, Ps, { writable: !0, value: void 0 }), l(this, Xt)[Xt] = e, l(this, Ps)[Ps] = t;
27272
27277
  }
@@ -27325,7 +27330,7 @@ var tD = Object.defineProperty, nD = Object.getOwnPropertyDescriptor, aD = funct
27325
27330
  for (var a = n > 1 ? void 0 : n ? nD(e, r) : e, i = t.length - 1, s; i >= 0; i--)
27326
27331
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
27327
27332
  return n && a && tD(e, r, a), a;
27328
- }, Fr = /* @__PURE__ */ E("context"), $g = /* @__PURE__ */ function() {
27333
+ }, Fr = /* @__PURE__ */ C("context"), $g = /* @__PURE__ */ function() {
27329
27334
  function o(t, e) {
27330
27335
  w(this, o), this.socket = void 0, Object.defineProperty(this, Fr, { writable: !0, value: void 0 }), l(this, Fr)[Fr] = t, this.socket = e, this.handleSocketEvents(), l(this, Fr)[Fr].setValue("roomSocketHandler", this);
27331
27336
  }
@@ -27833,7 +27838,7 @@ var tD = Object.defineProperty, nD = Object.getOwnPropertyDescriptor, aD = funct
27833
27838
  }() }]);
27834
27839
  }();
27835
27840
  aD([O.trace("RoomSocketHandler.joinRoom")], $g.prototype, "joinRoom", 1);
27836
- var Ar = /* @__PURE__ */ E("socket"), iD = /* @__PURE__ */ function() {
27841
+ var Ar = /* @__PURE__ */ C("socket"), iD = /* @__PURE__ */ function() {
27837
27842
  function o(t) {
27838
27843
  w(this, o), Object.defineProperty(this, Ar, { writable: !0, value: void 0 }), l(this, Ar)[Ar] = t;
27839
27844
  }
@@ -27956,7 +27961,7 @@ var Ar = /* @__PURE__ */ E("socket"), iD = /* @__PURE__ */ function() {
27956
27961
  }
27957
27962
  return e;
27958
27963
  }() }]);
27959
- }(), Fe = /* @__PURE__ */ E("socket"), Au = /* @__PURE__ */ E("context"), sD = /* @__PURE__ */ function() {
27964
+ }(), Fe = /* @__PURE__ */ C("socket"), Au = /* @__PURE__ */ C("context"), sD = /* @__PURE__ */ function() {
27960
27965
  function o(t, e) {
27961
27966
  w(this, o), Object.defineProperty(this, Fe, { writable: !0, value: void 0 }), Object.defineProperty(this, Au, { writable: !0, value: void 0 }), l(this, Fe)[Fe] = e, l(this, Au)[Au] = t;
27962
27967
  }
@@ -28411,8 +28416,8 @@ var Wg = /* @__PURE__ */ function(o) {
28411
28416
  function o(t, e) {
28412
28417
  var r, n, a, i, s, u, c, d, p, v;
28413
28418
  w(this, o), yr(this, hp), yr(this, _u), yr(this, vp), yr(this, fp), yr(this, sc), yr(this, mp), yr(this, Fu), yr(this, Hu), yr(this, uc), yr(this, Oo), yr(this, qu), yr(this, $r, void 0), yr(this, wo, void 0), yr(this, Sr, void 0), yr(this, Hr, void 0), yr(this, Ti, void 0), yr(this, nt, void 0), yr(this, Ha, void 0), yr(this, Ii, void 0), yr(this, Nn, void 0), yr(this, Po, void 0), yr(this, $a, void 0);
28414
- var f, g, k, y, b, C, T, S, D;
28415
- ze(this, wo, t), ze(this, Ti, []), ze(this, nt, new ic()), ze(this, Ha, !0), ze(this, Nn, !1), ze(this, Sr, e != null ? e : {}), (r = (f = J(this, Sr)).autoReconnect) !== null && r !== void 0 || (f.autoReconnect = !0), (n = (g = J(this, Sr)).retryConnectionInterval) !== null && n !== void 0 || (g.retryConnectionInterval = 1e3), (a = (k = J(this, Sr)).pingTimeout) !== null && a !== void 0 || (k.pingTimeout = 3e4), (i = (y = J(this, Sr)).connectionTimeout) !== null && i !== void 0 || (y.connectionTimeout = 5e3), (s = (b = J(this, Sr)).debug) !== null && s !== void 0 || (b.debug = !0), (u = (C = J(this, Sr)).maxReconnectionAttempts) !== null && u !== void 0 || (C.maxReconnectionAttempts = 10), (c = (T = J(this, Sr)).disconnectOnPingTimeout) !== null && c !== void 0 || (T.disconnectOnPingTimeout = !0), (d = (S = J(this, Sr)).queueOnDisconnect) !== null && d !== void 0 || (S.queueOnDisconnect = !1), (p = (D = J(this, Sr)).flushOnReconnect) !== null && p !== void 0 || (D.flushOnReconnect = !1), ze(this, Ii, { code: void 0, reason: void 0 }), ze(this, Hr, (v = J(this, Sr).logger) !== null && v !== void 0 ? v : new bD(J(this, Sr).debug ? "debug" : "info")), ze(this, $a, new kD());
28419
+ var f, g, k, y, b, E, T, S, D;
28420
+ ze(this, wo, t), ze(this, Ti, []), ze(this, nt, new ic()), ze(this, Ha, !0), ze(this, Nn, !1), ze(this, Sr, e != null ? e : {}), (r = (f = J(this, Sr)).autoReconnect) !== null && r !== void 0 || (f.autoReconnect = !0), (n = (g = J(this, Sr)).retryConnectionInterval) !== null && n !== void 0 || (g.retryConnectionInterval = 1e3), (a = (k = J(this, Sr)).pingTimeout) !== null && a !== void 0 || (k.pingTimeout = 3e4), (i = (y = J(this, Sr)).connectionTimeout) !== null && i !== void 0 || (y.connectionTimeout = 5e3), (s = (b = J(this, Sr)).debug) !== null && s !== void 0 || (b.debug = !0), (u = (E = J(this, Sr)).maxReconnectionAttempts) !== null && u !== void 0 || (E.maxReconnectionAttempts = 10), (c = (T = J(this, Sr)).disconnectOnPingTimeout) !== null && c !== void 0 || (T.disconnectOnPingTimeout = !0), (d = (S = J(this, Sr)).queueOnDisconnect) !== null && d !== void 0 || (S.queueOnDisconnect = !1), (p = (D = J(this, Sr)).flushOnReconnect) !== null && p !== void 0 || (D.flushOnReconnect = !1), ze(this, Ii, { code: void 0, reason: void 0 }), ze(this, Hr, (v = J(this, Sr).logger) !== null && v !== void 0 ? v : new bD(J(this, Sr).debug ? "debug" : "info")), ze(this, $a, new kD());
28416
28421
  }
28417
28422
  return P(o, [{
28418
28423
  key: "readyState",
@@ -28734,7 +28739,7 @@ var SD = Object.defineProperty, ED = Object.getOwnPropertyDescriptor, Dc = funct
28734
28739
  for (var a = n > 1 ? void 0 : n ? ED(e, r) : e, i = t.length - 1, s; i >= 0; i--)
28735
28740
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
28736
28741
  return n && a && SD(e, r, a), a;
28737
- }, Rv = 65535, CD = 3e3, Yg = (gn = /* @__PURE__ */ E("url"), be = /* @__PURE__ */ E("sockrates"), Te = /* @__PURE__ */ E("connectionHandler"), Wr = /* @__PURE__ */ E("socketDisconnectionTimeout"), Je = /* @__PURE__ */ E("context"), go = /* @__PURE__ */ E("getSocketURL"), mo = /* @__PURE__ */ E("generateId"), /* @__PURE__ */ function() {
28742
+ }, Rv = 65535, CD = 3e3, Yg = (gn = /* @__PURE__ */ C("url"), be = /* @__PURE__ */ C("sockrates"), Te = /* @__PURE__ */ C("connectionHandler"), Wr = /* @__PURE__ */ C("socketDisconnectionTimeout"), Je = /* @__PURE__ */ C("context"), go = /* @__PURE__ */ C("getSocketURL"), mo = /* @__PURE__ */ C("generateId"), /* @__PURE__ */ function() {
28738
28743
  function o(t, e) {
28739
28744
  var r, n = e.peerId, a = e.meetingId, i = e.authToken, s = e.capabilities;
28740
28745
  if (w(this, o), Object.defineProperty(this, mo, { value: ID }), Object.defineProperty(this, go, { value: AD }), Object.defineProperty(this, Te, { get: RD, set: void 0 }), Object.defineProperty(this, gn, { writable: !0, value: void 0 }), Object.defineProperty(this, be, { writable: !0, value: void 0 }), this.roomName = void 0, this.authToken = void 0, this.capabilities = void 0, Object.defineProperty(this, Wr, { writable: !0, value: void 0 }), Object.defineProperty(this, Je, { writable: !0, value: void 0 }), !n || !a || !i)
@@ -29100,7 +29105,7 @@ var MD = /* @__PURE__ */ function() {
29100
29105
  for (var a = n > 1 ? void 0 : n ? OD(e, r) : e, i = t.length - 1, s; i >= 0; i--)
29101
29106
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
29102
29107
  return n && a && _D(e, r, a), a;
29103
- }, lt = /* @__PURE__ */ E("context"), Qg = /* @__PURE__ */ function(o) {
29108
+ }, lt = /* @__PURE__ */ C("context"), Qg = /* @__PURE__ */ function(o) {
29104
29109
  function t(e) {
29105
29110
  var r;
29106
29111
  w(this, t);
@@ -29284,7 +29289,7 @@ var LD = Object.defineProperty, $D = Object.getOwnPropertyDescriptor, Zp = funct
29284
29289
  for (var a = n > 1 ? void 0 : n ? $D(e, r) : e, i = t.length - 1, s; i >= 0; i--)
29285
29290
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
29286
29291
  return n && a && LD(e, r, a), a;
29287
- }, Xg = (he = /* @__PURE__ */ E("context"), /* @__PURE__ */ function() {
29292
+ }, Xg = (he = /* @__PURE__ */ C("context"), /* @__PURE__ */ function() {
29288
29293
  function o(t) {
29289
29294
  w(this, o), this.connectedMeetings = void 0, Object.defineProperty(this, he, { writable: !0, value: void 0 }), l(this, he)[he] = t, this.connectedMeetings = new Qg(t);
29290
29295
  }
@@ -29417,7 +29422,7 @@ var ND = Object.defineProperty, VD = Object.getOwnPropertyDescriptor, $c = funct
29417
29422
  }
29418
29423
  return P(o, null, [{ key: "init", value: function() {
29419
29424
  var t = m(/* @__PURE__ */ h().mark(function r(n) {
29420
- var a, i, s, u, c, d, p, v, f, g, k, y, b, C, T, S, D, I, _, V, U, $, L, H, Y;
29425
+ var a, i, s, u, c, d, p, v, f, g, k, y, b, E, T, S, D, I, _, V, U, $, L, H, Y;
29421
29426
  return h().wrap(function(B) {
29422
29427
  for (; ; )
29423
29428
  switch (B.prev = B.next) {
@@ -29428,7 +29433,7 @@ var ND = Object.defineProperty, VD = Object.getOwnPropertyDescriptor, $c = funct
29428
29433
  }
29429
29434
  throw new j("Browser not supported", "0010", f, !0);
29430
29435
  case 4:
29431
- return g = cI(n, { authToken: c, baseURL: u, cachedUserDetails: v }), g.setRoomName(d), g.setRoomUUID(d), g.setOrganizationId(p), g.setHeader("tracing-id", s), n.setValue("apiClient", g), k = new xI(n), n.setValue("connectionHandler", k), y = So.createSocketService(n), b = y.connect(), C = g.getUserDetails(), T = g.getPlugins(), D = "", B.prev = 17, B.next = 20, So.setupFlagsmith(n);
29436
+ return g = cI(n, { authToken: c, baseURL: u, cachedUserDetails: v }), g.setRoomName(d), g.setRoomUUID(d), g.setOrganizationId(p), g.setHeader("tracing-id", s), n.setValue("apiClient", g), k = new xI(n), n.setValue("connectionHandler", k), y = So.createSocketService(n), b = y.connect(), E = g.getUserDetails(), T = g.getPlugins(), D = "", B.prev = 17, B.next = 20, So.setupFlagsmith(n);
29432
29437
  case 20:
29433
29438
  B.next = 25;
29434
29439
  break;
@@ -29444,7 +29449,7 @@ var ND = Object.defineProperty, VD = Object.getOwnPropertyDescriptor, $c = funct
29444
29449
  case 33:
29445
29450
  return B.prev = 33, B.next = 36, g.getRoomNodeData();
29446
29451
  case 36:
29447
- return I = B.sent, D = I.meetingTitle, B.next = 40, C;
29452
+ return I = B.sent, D = I.meetingTitle, B.next = 40, E;
29448
29453
  case 40:
29449
29454
  S = B.sent, f.info("CF SFU is being used."), n.setValue("presetName", S.preset.name), B.next = 48;
29450
29455
  break;
@@ -29500,12 +29505,12 @@ var ND = Object.defineProperty, VD = Object.getOwnPropertyDescriptor, $c = funct
29500
29505
  return e;
29501
29506
  }() }, { key: "setupControllers", value: function() {
29502
29507
  var t = m(/* @__PURE__ */ h().mark(function r(n, a, i, s, u, c, d) {
29503
- var p, v, f, g, k, y, b, C, T, S, D, I, _, V, U, $, L, H, Y, q, B, x, we, ie, Le, Tr, X, _r, Be, mt, ae, ee, Qa, Xa;
29508
+ var p, v, f, g, k, y, b, E, T, S, D, I, _, V, U, $, L, H, Y, q, B, x, we, ie, Le, Tr, X, _r, Be, mt, ae, ee, Qa, Xa;
29504
29509
  return h().wrap(function(Re) {
29505
29510
  for (; ; )
29506
29511
  switch (Re.prev = Re.next) {
29507
29512
  case 0:
29508
- return g = a.getValue("modules"), k = i.participant, y = a.getValue("defaults"), b = a.getValue("logger"), C = c.viewType, T = c.mediaConstraints.audio, a.setValue("viewType", C), a.setValue("defaults", N({ mediaConfiguration: { audio: { enableHighBitrate: (p = T.enableHighBitrate) !== null && p !== void 0 ? p : !1, enableStereo: (v = T.enableStereo) !== null && v !== void 0 ? v : !1 } } }, y)), a.setValue("maxPreferredStreams", br.isMobile() ? c.maxVideoStreams.mobile : c.maxVideoStreams.desktop), Y = new xO(a, n), q = new MD(n), a.setValue("connectedMeetingsSocketHandler", q), B = new _c(a, n), x = new wn(a, n), we = new iD(n), ie = new $g(a, n), Le = new sD(a, n), Tr = new ZO(n), X = new Ys(a, n), Re.next = 20, Li.init(a, ie, k, d, c);
29513
+ return g = a.getValue("modules"), k = i.participant, y = a.getValue("defaults"), b = a.getValue("logger"), E = c.viewType, T = c.mediaConstraints.audio, a.setValue("viewType", E), a.setValue("defaults", N({ mediaConfiguration: { audio: { enableHighBitrate: (p = T.enableHighBitrate) !== null && p !== void 0 ? p : !1, enableStereo: (v = T.enableStereo) !== null && v !== void 0 ? v : !1 } } }, y)), a.setValue("maxPreferredStreams", br.isMobile() ? c.maxVideoStreams.mobile : c.maxVideoStreams.desktop), Y = new xO(a, n), q = new MD(n), a.setValue("connectedMeetingsSocketHandler", q), B = new _c(a, n), x = new wn(a, n), we = new iD(n), ie = new $g(a, n), Le = new sD(a, n), Tr = new ZO(n), X = new Ys(a, n), Re.next = 20, Li.init(a, ie, k, d, c);
29509
29514
  case 20:
29510
29515
  return _r = Re.sent, a.setValue("selfController", _r), Re.next = 24, gg.init(a, _r.self, ie, Y, u);
29511
29516
  case 24:
@@ -29651,7 +29656,7 @@ function jD(o, t) {
29651
29656
  throw new j("Invalid auth token", "0004");
29652
29657
  }
29653
29658
  }
29654
- var _n = /* @__PURE__ */ E("audioEl"), Aa = /* @__PURE__ */ E("stream"), Ia = /* @__PURE__ */ E("tracks"), Gu = /* @__PURE__ */ E("onError"), fd = /* @__PURE__ */ E("runErrorCallbacks"), FD = /* @__PURE__ */ function() {
29659
+ var _n = /* @__PURE__ */ C("audioEl"), Aa = /* @__PURE__ */ C("stream"), Ia = /* @__PURE__ */ C("tracks"), Gu = /* @__PURE__ */ C("onError"), fd = /* @__PURE__ */ C("runErrorCallbacks"), FD = /* @__PURE__ */ function() {
29655
29660
  function o() {
29656
29661
  w(this, o), Object.defineProperty(this, fd, { value: HD }), Object.defineProperty(this, _n, { writable: !0, value: new Audio() }), Object.defineProperty(this, Aa, { writable: !0, value: new MediaStream() }), Object.defineProperty(this, Ia, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(this, Gu, { writable: !0, value: void 0 }), l(this, _n)[_n].srcObject = l(this, Aa)[Aa], l(this, _n)[_n].autoplay = !0;
29657
29662
  }
@@ -29708,7 +29713,7 @@ function HD(o) {
29708
29713
  var t, e;
29709
29714
  (t = (e = l(this, Gu))[Gu]) === null || t === void 0 || t.call(e, o);
29710
29715
  }
29711
- var Ma = /* @__PURE__ */ E("trackMap"), BD = /* @__PURE__ */ function(o) {
29716
+ var Ma = /* @__PURE__ */ C("trackMap"), BD = /* @__PURE__ */ function(o) {
29712
29717
  function t() {
29713
29718
  var e;
29714
29719
  return w(this, t), e = R(this, t), Object.defineProperty(e, Ma, { writable: !0, value: void 0 }), l(e, Ma)[Ma] = /* @__PURE__ */ new Map(), e;
@@ -29723,7 +29728,7 @@ var Ma = /* @__PURE__ */ E("trackMap"), BD = /* @__PURE__ */ function(o) {
29723
29728
  for (var a = n > 1 ? void 0 : n ? GD(e, r) : e, i = t.length - 1, s; i >= 0; i--)
29724
29729
  (s = t[i]) && (a = (n ? s(e, r, a) : s(a)) || a);
29725
29730
  return n && a && qD(e, r, a), a;
29726
- }, Oi = (Ue = /* @__PURE__ */ E("controller"), sa = /* @__PURE__ */ E("context"), /* @__PURE__ */ function() {
29731
+ }, Oi = (Ue = /* @__PURE__ */ C("controller"), sa = /* @__PURE__ */ C("context"), /* @__PURE__ */ function() {
29727
29732
  function o(t, e) {
29728
29733
  w(this, o), Object.defineProperty(this, Ue, { writable: !0, value: void 0 }), Object.defineProperty(this, sa, { writable: !0, value: void 0 }), l(this, sa)[sa] = t, l(this, Ue)[Ue] = e;
29729
29734
  }
@@ -29931,12 +29936,12 @@ var Ma = /* @__PURE__ */ E("trackMap"), BD = /* @__PURE__ */ function(o) {
29931
29936
  return c.init(r, n, s), s.setValue("defaults", { mediaHandler: c }), c;
29932
29937
  } }, { key: "init", value: function() {
29933
29938
  var t = m(/* @__PURE__ */ h().mark(function r(n) {
29934
- var a, i, s, u, c, d, p, v, f, g, k, y, b, C, T, S, D, I, _, V;
29939
+ var a, i, s, u, c, d, p, v, f, g, k, y, b, E, T, S, D, I, _, V;
29935
29940
  return h().wrap(function($) {
29936
29941
  for (; ; )
29937
29942
  switch ($.prev = $.next) {
29938
29943
  case 0:
29939
- return br.init(), v = (a = n.defaults) !== null && a !== void 0 ? a : {}, f = v.mediaHandler, g = (f == null ? void 0 : f.peerId) || ((i = n == null || (s = n.cachedUserDetails) === null || s === void 0 ? void 0 : s.peerId) !== null && i !== void 0 ? i : Ks()), k = n.authToken, y = n.baseURI, b = jD(k, y), C = b.meetingId, T = cc(b, rm), window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0, S = Oi.setupContext(g, n, C, T), D = S.getValue("telemetry"), I = S.getValue("logger"), bm(I), Av.init(I), D.init(S, { roomName: C, userId: T.participantId, organizationId: T.orgId, peerId: g }, (u = (c = n.modules) === null || c === void 0 ? void 0 : c.tracing) !== null && u !== void 0 ? u : !0), I.init(S), I.info("Client::init::options", { clientInitOptions: N(N({}, n), {}, { authToken: "".concat((d = n.authToken) === null || d === void 0 ? void 0 : d.slice(0, 10), `...
29944
+ return br.init(), v = (a = n.defaults) !== null && a !== void 0 ? a : {}, f = v.mediaHandler, g = (f == null ? void 0 : f.peerId) || ((i = n == null || (s = n.cachedUserDetails) === null || s === void 0 ? void 0 : s.peerId) !== null && i !== void 0 ? i : Ks()), k = n.authToken, y = n.baseURI, b = jD(k, y), E = b.meetingId, T = cc(b, rm), window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0, S = Oi.setupContext(g, n, E, T), D = S.getValue("telemetry"), I = S.getValue("logger"), bm(I), Av.init(I), D.init(S, { roomName: E, userId: T.participantId, organizationId: T.orgId, peerId: g }, (u = (c = n.modules) === null || c === void 0 ? void 0 : c.tracing) !== null && u !== void 0 ? u : !0), I.init(S), I.info("Client::init::options", { clientInitOptions: N(N({}, n), {}, { authToken: "".concat((d = n.authToken) === null || d === void 0 ? void 0 : d.slice(0, 10), `...
29940
29945
  `).concat((p = n.authToken) === null || p === void 0 ? void 0 : p.slice(-10)) }) }), $.next = 16, dl.init(S);
29941
29946
  case 16:
29942
29947
  return _ = $.sent, V = new Oi(S, _), S.setValue("meeting", V), $.abrupt("return", V);