quickvo-sdk-js 0.6.1 → 0.6.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.js CHANGED
@@ -1,10 +1,10 @@
1
- var re = Object.defineProperty;
2
- var ne = (a) => {
1
+ var ce = Object.defineProperty;
2
+ var oe = (a) => {
3
3
  throw TypeError(a);
4
4
  };
5
- var ce = (a, I, u) => I in a ? re(a, I, { enumerable: !0, configurable: !0, writable: !0, value: u }) : a[I] = u;
6
- var Z = (a, I, u) => ce(a, typeof I != "symbol" ? I + "" : I, u), oe = (a, I, u) => I.has(a) || ne("Cannot " + u);
7
- var Q = (a, I, u) => (oe(a, I, "read from private field"), u ? u.call(a) : I.get(a)), at = (a, I, u) => I.has(a) ? ne("Cannot add the same private member more than once") : I instanceof WeakSet ? I.add(a) : I.set(a, u), wt = (a, I, u, E) => (oe(a, I, "write to private field"), E ? E.call(a, u) : I.set(a, u), u);
5
+ var se = (a, I, u) => I in a ? ce(a, I, { enumerable: !0, configurable: !0, writable: !0, value: u }) : a[I] = u;
6
+ var Z = (a, I, u) => se(a, typeof I != "symbol" ? I + "" : I, u), re = (a, I, u) => I.has(a) || oe("Cannot " + u);
7
+ var J = (a, I, u) => (re(a, I, "read from private field"), u ? u.call(a) : I.get(a)), st = (a, I, u) => I.has(a) ? oe("Cannot add the same private member more than once") : I instanceof WeakSet ? I.add(a) : I.set(a, u), St = (a, I, u, E) => (re(a, I, "write to private field"), E ? E.call(a, u) : I.set(a, u), u);
8
8
  const L = (a, I = []) => {
9
9
  const u = { ...a }, E = Object.keys(u);
10
10
  for (const _ of E)
@@ -83,7 +83,7 @@ const L = (a, I = []) => {
83
83
  }, G = (a) => W(a), U = (a, I = "YYYY-MM-DD hh:mm:ss", u = {}) => {
84
84
  const E = { empty_str: "-", ...u }, { empty_str: _, offset: k } = E, e = W(a, k);
85
85
  if (Number(a) !== 0 && e === 0) return _;
86
- const n = new Date(e), O = `${n.getFullYear()}`, $ = `${n.getMonth() + 1}`, N = `${n.getDate()}`, D = `${n.getDay() === 0 ? 7 : n.getDay()}`, q = `${n.getHours()}`, P = `${n.getMinutes()}`, j = `${n.getSeconds()}`, V = `${Math.ceil((e - G(`${O}/01/01 00:00:00`) + 1) / 864e5)}`, J = `${Math.ceil(((e - G(`${O}/01/01 00:00:00`)) / 864e5 - Number(D)) / 7) + 1}`, z = [
86
+ const n = new Date(e), O = `${n.getFullYear()}`, $ = `${n.getMonth() + 1}`, N = `${n.getDate()}`, D = `${n.getDay() === 0 ? 7 : n.getDay()}`, q = `${n.getHours()}`, P = `${n.getMinutes()}`, j = `${n.getSeconds()}`, V = `${Math.ceil((e - G(`${O}/01/01 00:00:00`) + 1) / 864e5)}`, Q = `${Math.ceil(((e - G(`${O}/01/01 00:00:00`)) / 864e5 - Number(D)) / 7) + 1}`, z = [
87
87
  { k: "Y+", v: O },
88
88
  // 年
89
89
  { k: "M+", v: $ },
@@ -100,7 +100,7 @@ const L = (a, I = []) => {
100
100
  // 秒
101
101
  { k: "d+", v: V },
102
102
  // 第几天
103
- { k: "w+", v: J }
103
+ { k: "w+", v: Q }
104
104
  // 第几周
105
105
  // 有其他格式化字符需求可以继续添加,必须转化成字符串
106
106
  ];
@@ -747,9 +747,16 @@ class AudioMediaContext {
747
747
  * 停止
748
748
  */
749
749
  Z(this, "stop", () => {
750
- const I = this.stream.getTracks();
751
- for (const u of I)
752
- u.enabled = !1, u.stop(), this.stream.removeTrack(u);
750
+ {
751
+ const I = this.destination.stream.getTracks();
752
+ for (const u of I)
753
+ u.enabled = !1, u.stop(), this.stream.removeTrack(u);
754
+ }
755
+ {
756
+ const I = this.stream.getTracks();
757
+ for (const u of I)
758
+ u.enabled = !1, u.stop(), this.stream.removeTrack(u);
759
+ }
753
760
  });
754
761
  /**
755
762
  * 替换媒体
@@ -1134,15 +1141,15 @@ function requireFloat() {
1134
1141
  if (D < 22250738585072014e-324)
1135
1142
  V = D / 5e-324, O(V >>> 0, q, P + $), O((j << 31 | V / 4294967296) >>> 0, q, P + N);
1136
1143
  else {
1137
- var J = Math.floor(Math.log(D) / Math.LN2);
1138
- J === 1024 && (J = 1023), V = D * Math.pow(2, -J), O(V * 4503599627370496 >>> 0, q, P + $), O((j << 31 | J + 1023 << 20 | V * 1048576 & 1048575) >>> 0, q, P + N);
1144
+ var Q = Math.floor(Math.log(D) / Math.LN2);
1145
+ Q === 1024 && (Q = 1023), V = D * Math.pow(2, -Q), O(V * 4503599627370496 >>> 0, q, P + $), O((j << 31 | Q + 1023 << 20 | V * 1048576 & 1048575) >>> 0, q, P + N);
1139
1146
  }
1140
1147
  }
1141
1148
  }
1142
1149
  k.writeDoubleLE = e.bind(null, I, 0, 4), k.writeDoubleBE = e.bind(null, u, 4, 0);
1143
1150
  function n(O, $, N, D, q) {
1144
- var P = O(D, q + $), j = O(D, q + N), V = (j >> 31) * 2 + 1, J = j >>> 20 & 2047, z = 4294967296 * (j & 1048575) + P;
1145
- return J === 2047 ? z ? NaN : V * (1 / 0) : J === 0 ? V * 5e-324 * z : V * Math.pow(2, J - 1075) * (z + 4503599627370496);
1151
+ var P = O(D, q + $), j = O(D, q + N), V = (j >> 31) * 2 + 1, Q = j >>> 20 & 2047, z = 4294967296 * (j & 1048575) + P;
1152
+ return Q === 2047 ? z ? NaN : V * (1 / 0) : Q === 0 ? V * 5e-324 * z : V * Math.pow(2, Q - 1075) * (z + 4503599627370496);
1146
1153
  }
1147
1154
  k.readDoubleLE = n.bind(null, E, 0, 4), k.readDoubleBE = n.bind(null, _, 4, 0);
1148
1155
  }(), k;
@@ -1415,13 +1422,13 @@ function requireWriter() {
1415
1422
  if (hasRequiredWriter) return writer;
1416
1423
  hasRequiredWriter = 1, writer = O;
1417
1424
  var a = requireMinimal$1(), I, u = a.LongBits, E = a.base64, _ = a.utf8;
1418
- function k(J, z, Y) {
1419
- this.fn = J, this.len = z, this.next = void 0, this.val = Y;
1425
+ function k(Q, z, Y) {
1426
+ this.fn = Q, this.len = z, this.next = void 0, this.val = Y;
1420
1427
  }
1421
1428
  function e() {
1422
1429
  }
1423
- function n(J) {
1424
- this.head = J.head, this.tail = J.tail, this.len = J.len, this.next = J.states;
1430
+ function n(Q) {
1431
+ this.head = Q.head, this.tail = Q.tail, this.len = Q.len, this.next = Q.states;
1425
1432
  }
1426
1433
  function O() {
1427
1434
  this.len = 0, this.head = new k(e, 0, 0), this.tail = this.head, this.states = null;
@@ -1440,16 +1447,16 @@ function requireWriter() {
1440
1447
  }, a.Array !== Array && (O.alloc = a.pool(O.alloc, a.Array.prototype.subarray)), O.prototype._push = function(z, Y, et) {
1441
1448
  return this.tail = this.tail.next = new k(z, Y, et), this.len += Y, this;
1442
1449
  };
1443
- function N(J, z, Y) {
1444
- z[Y] = J & 255;
1450
+ function N(Q, z, Y) {
1451
+ z[Y] = Q & 255;
1445
1452
  }
1446
- function D(J, z, Y) {
1447
- for (; J > 127; )
1448
- z[Y++] = J & 127 | 128, J >>>= 7;
1449
- z[Y] = J;
1453
+ function D(Q, z, Y) {
1454
+ for (; Q > 127; )
1455
+ z[Y++] = Q & 127 | 128, Q >>>= 7;
1456
+ z[Y] = Q;
1450
1457
  }
1451
- function q(J, z) {
1452
- this.len = J, this.next = void 0, this.val = z;
1458
+ function q(Q, z) {
1459
+ this.len = Q, this.next = void 0, this.val = z;
1453
1460
  }
1454
1461
  q.prototype = Object.create(k.prototype), q.prototype.fn = D, O.prototype.uint32 = function(z) {
1455
1462
  return this.len += (this.tail = this.tail.next = new q(
@@ -1461,12 +1468,12 @@ function requireWriter() {
1461
1468
  }, O.prototype.sint32 = function(z) {
1462
1469
  return this.uint32((z << 1 ^ z >> 31) >>> 0);
1463
1470
  };
1464
- function P(J, z, Y) {
1465
- for (; J.hi; )
1466
- z[Y++] = J.lo & 127 | 128, J.lo = (J.lo >>> 7 | J.hi << 25) >>> 0, J.hi >>>= 7;
1467
- for (; J.lo > 127; )
1468
- z[Y++] = J.lo & 127 | 128, J.lo = J.lo >>> 7;
1469
- z[Y++] = J.lo;
1471
+ function P(Q, z, Y) {
1472
+ for (; Q.hi; )
1473
+ z[Y++] = Q.lo & 127 | 128, Q.lo = (Q.lo >>> 7 | Q.hi << 25) >>> 0, Q.hi >>>= 7;
1474
+ for (; Q.lo > 127; )
1475
+ z[Y++] = Q.lo & 127 | 128, Q.lo = Q.lo >>> 7;
1476
+ z[Y++] = Q.lo;
1470
1477
  }
1471
1478
  O.prototype.uint64 = function(z) {
1472
1479
  var Y = u.from(z);
@@ -1477,8 +1484,8 @@ function requireWriter() {
1477
1484
  }, O.prototype.bool = function(z) {
1478
1485
  return this._push(N, 1, z ? 1 : 0);
1479
1486
  };
1480
- function j(J, z, Y) {
1481
- z[Y] = J & 255, z[Y + 1] = J >>> 8 & 255, z[Y + 2] = J >>> 16 & 255, z[Y + 3] = J >>> 24;
1487
+ function j(Q, z, Y) {
1488
+ z[Y] = Q & 255, z[Y + 1] = Q >>> 8 & 255, z[Y + 2] = Q >>> 16 & 255, z[Y + 3] = Q >>> 24;
1482
1489
  }
1483
1490
  O.prototype.fixed32 = function(z) {
1484
1491
  return this._push(j, 4, z >>> 0);
@@ -1519,8 +1526,8 @@ function requireWriter() {
1519
1526
  for (var z = this.head.next, Y = this.constructor.alloc(this.len), et = 0; z; )
1520
1527
  z.fn(z.val, Y, et), et += z.len, z = z.next;
1521
1528
  return Y;
1522
- }, O._configure = function(J) {
1523
- I = J, O.create = $(), I._configure();
1529
+ }, O._configure = function(Q) {
1530
+ I = Q, O.create = $(), I._configure();
1524
1531
  }, writer;
1525
1532
  }
1526
1533
  var writer_buffer, hasRequiredWriter_buffer;
@@ -6150,9 +6157,9 @@ var Deflate_1$1 = Deflate$1, deflate_2 = deflate$1, deflateRaw_1$1 = deflateRaw$
6150
6157
  };
6151
6158
  const BAD$1 = 16209, TYPE$1 = 16191;
6152
6159
  var inffast = function a(I, u) {
6153
- let E, _, k, e, n, O, $, N, D, q, P, j, V, J, z, Y, et, tt, nt, lt, it, st, ct, ot;
6160
+ let E, _, k, e, n, O, $, N, D, q, P, j, V, Q, z, Y, et, tt, nt, lt, it, at, ct, ot;
6154
6161
  const rt = I.state;
6155
- E = I.next_in, ct = I.input, _ = E + (I.avail_in - 5), k = I.next_out, ot = I.output, e = k - (u - I.avail_out), n = k + (I.avail_out - 257), O = rt.dmax, $ = rt.wsize, N = rt.whave, D = rt.wnext, q = rt.window, P = rt.hold, j = rt.bits, V = rt.lencode, J = rt.distcode, z = (1 << rt.lenbits) - 1, Y = (1 << rt.distbits) - 1;
6162
+ E = I.next_in, ct = I.input, _ = E + (I.avail_in - 5), k = I.next_out, ot = I.output, e = k - (u - I.avail_out), n = k + (I.avail_out - 257), O = rt.dmax, $ = rt.wsize, N = rt.whave, D = rt.wnext, q = rt.window, P = rt.hold, j = rt.bits, V = rt.lencode, Q = rt.distcode, z = (1 << rt.lenbits) - 1, Y = (1 << rt.distbits) - 1;
6156
6163
  t:
6157
6164
  do {
6158
6165
  j < 15 && (P += ct[E++] << j, j += 8, P += ct[E++] << j, j += 8), et = V[P & z];
@@ -6161,7 +6168,7 @@ var inffast = function a(I, u) {
6161
6168
  if (tt = et >>> 24, P >>>= tt, j -= tt, tt = et >>> 16 & 255, tt === 0)
6162
6169
  ot[k++] = et & 65535;
6163
6170
  else if (tt & 16) {
6164
- nt = et & 65535, tt &= 15, tt && (j < tt && (P += ct[E++] << j, j += 8), nt += P & (1 << tt) - 1, P >>>= tt, j -= tt), j < 15 && (P += ct[E++] << j, j += 8, P += ct[E++] << j, j += 8), et = J[P & Y];
6171
+ nt = et & 65535, tt &= 15, tt && (j < tt && (P += ct[E++] << j, j += 8), nt += P & (1 << tt) - 1, P >>>= tt, j -= tt), j < 15 && (P += ct[E++] << j, j += 8, P += ct[E++] << j, j += 8), et = Q[P & Y];
6165
6172
  i:
6166
6173
  for (; ; ) {
6167
6174
  if (tt = et >>> 24, P >>>= tt, j -= tt, tt = et >>> 16 & 255, tt & 16) {
@@ -6174,13 +6181,13 @@ var inffast = function a(I, u) {
6174
6181
  I.msg = "invalid distance too far back", rt.mode = BAD$1;
6175
6182
  break t;
6176
6183
  }
6177
- if (it = 0, st = q, D === 0) {
6184
+ if (it = 0, at = q, D === 0) {
6178
6185
  if (it += $ - tt, tt < nt) {
6179
6186
  nt -= tt;
6180
6187
  do
6181
6188
  ot[k++] = q[it++];
6182
6189
  while (--tt);
6183
- it = k - lt, st = ot;
6190
+ it = k - lt, at = ot;
6184
6191
  }
6185
6192
  } else if (D < tt) {
6186
6193
  if (it += $ + D - tt, tt -= D, tt < nt) {
@@ -6193,7 +6200,7 @@ var inffast = function a(I, u) {
6193
6200
  do
6194
6201
  ot[k++] = q[it++];
6195
6202
  while (--tt);
6196
- it = k - lt, st = ot;
6203
+ it = k - lt, at = ot;
6197
6204
  }
6198
6205
  }
6199
6206
  } else if (it += D - tt, tt < nt) {
@@ -6201,11 +6208,11 @@ var inffast = function a(I, u) {
6201
6208
  do
6202
6209
  ot[k++] = q[it++];
6203
6210
  while (--tt);
6204
- it = k - lt, st = ot;
6211
+ it = k - lt, at = ot;
6205
6212
  }
6206
6213
  for (; nt > 2; )
6207
- ot[k++] = st[it++], ot[k++] = st[it++], ot[k++] = st[it++], nt -= 3;
6208
- nt && (ot[k++] = st[it++], nt > 1 && (ot[k++] = st[it++]));
6214
+ ot[k++] = at[it++], ot[k++] = at[it++], ot[k++] = at[it++], nt -= 3;
6215
+ nt && (ot[k++] = at[it++], nt > 1 && (ot[k++] = at[it++]));
6209
6216
  } else {
6210
6217
  it = k - lt;
6211
6218
  do
@@ -6214,7 +6221,7 @@ var inffast = function a(I, u) {
6214
6221
  nt && (ot[k++] = ot[it++], nt > 1 && (ot[k++] = ot[it++]));
6215
6222
  }
6216
6223
  } else if ((tt & 64) === 0) {
6217
- et = J[(et & 65535) + (P & (1 << tt) - 1)];
6224
+ et = Q[(et & 65535) + (P & (1 << tt) - 1)];
6218
6225
  continue i;
6219
6226
  } else {
6220
6227
  I.msg = "invalid distance code", rt.mode = BAD$1;
@@ -6373,9 +6380,9 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
6373
6380
  64
6374
6381
  ]), inflate_table = (a, I, u, E, _, k, e, n) => {
6375
6382
  const O = n.bits;
6376
- let $ = 0, N = 0, D = 0, q = 0, P = 0, j = 0, V = 0, J = 0, z = 0, Y = 0, et, tt, nt, lt, it, st = null, ct;
6383
+ let $ = 0, N = 0, D = 0, q = 0, P = 0, j = 0, V = 0, Q = 0, z = 0, Y = 0, et, tt, nt, lt, it, at = null, ct;
6377
6384
  const ot = new Uint16Array(MAXBITS + 1), rt = new Uint16Array(MAXBITS + 1);
6378
- let Ot = null, ie, Dt, Ct;
6385
+ let gt = null, ne, Ct, Ut;
6379
6386
  for ($ = 0; $ <= MAXBITS; $++)
6380
6387
  ot[$] = 0;
6381
6388
  for (N = 0; N < E; N++)
@@ -6386,21 +6393,21 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
6386
6393
  return _[k++] = 1 << 24 | 64 << 16 | 0, _[k++] = 1 << 24 | 64 << 16 | 0, n.bits = 1, 0;
6387
6394
  for (D = 1; D < q && ot[D] === 0; D++)
6388
6395
  ;
6389
- for (P < D && (P = D), J = 1, $ = 1; $ <= MAXBITS; $++)
6390
- if (J <<= 1, J -= ot[$], J < 0)
6396
+ for (P < D && (P = D), Q = 1, $ = 1; $ <= MAXBITS; $++)
6397
+ if (Q <<= 1, Q -= ot[$], Q < 0)
6391
6398
  return -1;
6392
- if (J > 0 && (a === CODES$1 || q !== 1))
6399
+ if (Q > 0 && (a === CODES$1 || q !== 1))
6393
6400
  return -1;
6394
6401
  for (rt[1] = 0, $ = 1; $ < MAXBITS; $++)
6395
6402
  rt[$ + 1] = rt[$] + ot[$];
6396
6403
  for (N = 0; N < E; N++)
6397
6404
  I[u + N] !== 0 && (e[rt[I[u + N]]++] = N);
6398
- if (a === CODES$1 ? (st = Ot = e, ct = 20) : a === LENS$1 ? (st = lbase, Ot = lext, ct = 257) : (st = dbase, Ot = dext, ct = 0), Y = 0, N = 0, $ = D, it = k, j = P, V = 0, nt = -1, z = 1 << P, lt = z - 1, a === LENS$1 && z > ENOUGH_LENS$1 || a === DISTS$1 && z > ENOUGH_DISTS$1)
6405
+ if (a === CODES$1 ? (at = gt = e, ct = 20) : a === LENS$1 ? (at = lbase, gt = lext, ct = 257) : (at = dbase, gt = dext, ct = 0), Y = 0, N = 0, $ = D, it = k, j = P, V = 0, nt = -1, z = 1 << P, lt = z - 1, a === LENS$1 && z > ENOUGH_LENS$1 || a === DISTS$1 && z > ENOUGH_DISTS$1)
6399
6406
  return 1;
6400
6407
  for (; ; ) {
6401
- ie = $ - V, e[N] + 1 < ct ? (Dt = 0, Ct = e[N]) : e[N] >= ct ? (Dt = Ot[e[N] - ct], Ct = st[e[N] - ct]) : (Dt = 96, Ct = 0), et = 1 << $ - V, tt = 1 << j, D = tt;
6408
+ ne = $ - V, e[N] + 1 < ct ? (Ct = 0, Ut = e[N]) : e[N] >= ct ? (Ct = gt[e[N] - ct], Ut = at[e[N] - ct]) : (Ct = 96, Ut = 0), et = 1 << $ - V, tt = 1 << j, D = tt;
6402
6409
  do
6403
- tt -= et, _[it + (Y >> V) + tt] = ie << 24 | Dt << 16 | Ct | 0;
6410
+ tt -= et, _[it + (Y >> V) + tt] = ne << 24 | Ct << 16 | Ut | 0;
6404
6411
  while (tt !== 0);
6405
6412
  for (et = 1 << $ - 1; Y & et; )
6406
6413
  et >>= 1;
@@ -6410,8 +6417,8 @@ const MAXBITS = 15, ENOUGH_LENS$1 = 852, ENOUGH_DISTS$1 = 592, CODES$1 = 0, LENS
6410
6417
  $ = I[u + e[N]];
6411
6418
  }
6412
6419
  if ($ > P && (Y & lt) !== nt) {
6413
- for (V === 0 && (V = P), it += D, j = $ - V, J = 1 << j; j + V < q && (J -= ot[j + V], !(J <= 0)); )
6414
- j++, J <<= 1;
6420
+ for (V === 0 && (V = P), it += D, j = $ - V, Q = 1 << j; j + V < q && (Q -= ot[j + V], !(Q <= 0)); )
6421
+ j++, Q <<= 1;
6415
6422
  if (z += 1 << j, a === LENS$1 && z > ENOUGH_LENS$1 || a === DISTS$1 && z > ENOUGH_DISTS$1)
6416
6423
  return 1;
6417
6424
  nt = Y & lt, _[nt] = P << 24 | j << 16 | it - k | 0;
@@ -6488,16 +6495,16 @@ const fixedtables = (a) => {
6488
6495
  const k = a.state;
6489
6496
  return k.window === null && (k.wsize = 1 << k.wbits, k.wnext = 0, k.whave = 0, k.window = new Uint8Array(k.wsize)), E >= k.wsize ? (k.window.set(I.subarray(u - k.wsize, u), 0), k.wnext = 0, k.whave = k.wsize) : (_ = k.wsize - k.wnext, _ > E && (_ = E), k.window.set(I.subarray(u - E, u - E + _), k.wnext), E -= _, E ? (k.window.set(I.subarray(u - E, u), 0), k.wnext = E, k.whave = k.wsize) : (k.wnext += _, k.wnext === k.wsize && (k.wnext = 0), k.whave < k.wsize && (k.whave += _))), 0;
6490
6497
  }, inflate$2 = (a, I) => {
6491
- let u, E, _, k, e, n, O, $, N, D, q, P, j, V, J = 0, z, Y, et, tt, nt, lt, it, st;
6498
+ let u, E, _, k, e, n, O, $, N, D, q, P, j, V, Q = 0, z, Y, et, tt, nt, lt, it, at;
6492
6499
  const ct = new Uint8Array(4);
6493
6500
  let ot, rt;
6494
- const Ot = (
6501
+ const gt = (
6495
6502
  /* permutation of code lengths */
6496
6503
  new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15])
6497
6504
  );
6498
6505
  if (inflateStateCheck(a) || !a.output || !a.input && a.avail_in !== 0)
6499
6506
  return Z_STREAM_ERROR$1;
6500
- u = a.state, u.mode === TYPE && (u.mode = TYPEDO), e = a.next_out, _ = a.output, O = a.avail_out, k = a.next_in, E = a.input, n = a.avail_in, $ = u.hold, N = u.bits, D = n, q = O, st = Z_OK$1;
6507
+ u = a.state, u.mode === TYPE && (u.mode = TYPEDO), e = a.next_out, _ = a.output, O = a.avail_out, k = a.next_in, E = a.input, n = a.avail_in, $ = u.hold, N = u.bits, D = n, q = O, at = Z_OK$1;
6501
6508
  t:
6502
6509
  for (; ; )
6503
6510
  switch (u.mode) {
@@ -6717,11 +6724,11 @@ const fixedtables = (a) => {
6717
6724
  break t;
6718
6725
  n--, $ += E[k++] << N, N += 8;
6719
6726
  }
6720
- u.lens[Ot[u.have++]] = $ & 7, $ >>>= 3, N -= 3;
6727
+ u.lens[gt[u.have++]] = $ & 7, $ >>>= 3, N -= 3;
6721
6728
  }
6722
6729
  for (; u.have < 19; )
6723
- u.lens[Ot[u.have++]] = 0;
6724
- if (u.lencode = u.lendyn, u.lenbits = 7, ot = { bits: u.lenbits }, st = inftrees(CODES, u.lens, 0, 19, u.lencode, 0, u.work, ot), u.lenbits = ot.bits, st) {
6730
+ u.lens[gt[u.have++]] = 0;
6731
+ if (u.lencode = u.lendyn, u.lenbits = 7, ot = { bits: u.lenbits }, at = inftrees(CODES, u.lens, 0, 19, u.lencode, 0, u.work, ot), u.lenbits = ot.bits, at) {
6725
6732
  a.msg = "invalid code lengths set", u.mode = BAD;
6726
6733
  break;
6727
6734
  }
@@ -6729,7 +6736,7 @@ const fixedtables = (a) => {
6729
6736
  /* falls through */
6730
6737
  case CODELENS:
6731
6738
  for (; u.have < u.nlen + u.ndist; ) {
6732
- for (; J = u.lencode[$ & (1 << u.lenbits) - 1], z = J >>> 24, Y = J >>> 16 & 255, et = J & 65535, !(z <= N); ) {
6739
+ for (; Q = u.lencode[$ & (1 << u.lenbits) - 1], z = Q >>> 24, Y = Q >>> 16 & 255, et = Q & 65535, !(z <= N); ) {
6733
6740
  if (n === 0)
6734
6741
  break t;
6735
6742
  n--, $ += E[k++] << N, N += 8;
@@ -6777,11 +6784,11 @@ const fixedtables = (a) => {
6777
6784
  a.msg = "invalid code -- missing end-of-block", u.mode = BAD;
6778
6785
  break;
6779
6786
  }
6780
- if (u.lenbits = 9, ot = { bits: u.lenbits }, st = inftrees(LENS, u.lens, 0, u.nlen, u.lencode, 0, u.work, ot), u.lenbits = ot.bits, st) {
6787
+ if (u.lenbits = 9, ot = { bits: u.lenbits }, at = inftrees(LENS, u.lens, 0, u.nlen, u.lencode, 0, u.work, ot), u.lenbits = ot.bits, at) {
6781
6788
  a.msg = "invalid literal/lengths set", u.mode = BAD;
6782
6789
  break;
6783
6790
  }
6784
- if (u.distbits = 6, u.distcode = u.distdyn, ot = { bits: u.distbits }, st = inftrees(DISTS, u.lens, u.nlen, u.ndist, u.distcode, 0, u.work, ot), u.distbits = ot.bits, st) {
6791
+ if (u.distbits = 6, u.distcode = u.distdyn, ot = { bits: u.distbits }, at = inftrees(DISTS, u.lens, u.nlen, u.ndist, u.distcode, 0, u.work, ot), u.distbits = ot.bits, at) {
6785
6792
  a.msg = "invalid distances set", u.mode = BAD;
6786
6793
  break;
6787
6794
  }
@@ -6796,13 +6803,13 @@ const fixedtables = (a) => {
6796
6803
  a.next_out = e, a.avail_out = O, a.next_in = k, a.avail_in = n, u.hold = $, u.bits = N, inffast(a, q), e = a.next_out, _ = a.output, O = a.avail_out, k = a.next_in, E = a.input, n = a.avail_in, $ = u.hold, N = u.bits, u.mode === TYPE && (u.back = -1);
6797
6804
  break;
6798
6805
  }
6799
- for (u.back = 0; J = u.lencode[$ & (1 << u.lenbits) - 1], z = J >>> 24, Y = J >>> 16 & 255, et = J & 65535, !(z <= N); ) {
6806
+ for (u.back = 0; Q = u.lencode[$ & (1 << u.lenbits) - 1], z = Q >>> 24, Y = Q >>> 16 & 255, et = Q & 65535, !(z <= N); ) {
6800
6807
  if (n === 0)
6801
6808
  break t;
6802
6809
  n--, $ += E[k++] << N, N += 8;
6803
6810
  }
6804
6811
  if (Y && (Y & 240) === 0) {
6805
- for (tt = z, nt = Y, lt = et; J = u.lencode[lt + (($ & (1 << tt + nt) - 1) >> tt)], z = J >>> 24, Y = J >>> 16 & 255, et = J & 65535, !(tt + z <= N); ) {
6812
+ for (tt = z, nt = Y, lt = et; Q = u.lencode[lt + (($ & (1 << tt + nt) - 1) >> tt)], z = Q >>> 24, Y = Q >>> 16 & 255, et = Q & 65535, !(tt + z <= N); ) {
6806
6813
  if (n === 0)
6807
6814
  break t;
6808
6815
  n--, $ += E[k++] << N, N += 8;
@@ -6835,13 +6842,13 @@ const fixedtables = (a) => {
6835
6842
  u.was = u.length, u.mode = DIST;
6836
6843
  /* falls through */
6837
6844
  case DIST:
6838
- for (; J = u.distcode[$ & (1 << u.distbits) - 1], z = J >>> 24, Y = J >>> 16 & 255, et = J & 65535, !(z <= N); ) {
6845
+ for (; Q = u.distcode[$ & (1 << u.distbits) - 1], z = Q >>> 24, Y = Q >>> 16 & 255, et = Q & 65535, !(z <= N); ) {
6839
6846
  if (n === 0)
6840
6847
  break t;
6841
6848
  n--, $ += E[k++] << N, N += 8;
6842
6849
  }
6843
6850
  if ((Y & 240) === 0) {
6844
- for (tt = z, nt = Y, lt = et; J = u.distcode[lt + (($ & (1 << tt + nt) - 1) >> tt)], z = J >>> 24, Y = J >>> 16 & 255, et = J & 65535, !(tt + z <= N); ) {
6851
+ for (tt = z, nt = Y, lt = et; Q = u.distcode[lt + (($ & (1 << tt + nt) - 1) >> tt)], z = Q >>> 24, Y = Q >>> 16 & 255, et = Q & 65535, !(tt + z <= N); ) {
6845
6852
  if (n === 0)
6846
6853
  break t;
6847
6854
  n--, $ += E[k++] << N, N += 8;
@@ -6923,10 +6930,10 @@ const fixedtables = (a) => {
6923
6930
  u.mode = DONE;
6924
6931
  /* falls through */
6925
6932
  case DONE:
6926
- st = Z_STREAM_END$1;
6933
+ at = Z_STREAM_END$1;
6927
6934
  break t;
6928
6935
  case BAD:
6929
- st = Z_DATA_ERROR$1;
6936
+ at = Z_DATA_ERROR$1;
6930
6937
  break t;
6931
6938
  case MEM:
6932
6939
  return Z_MEM_ERROR$1;
@@ -6936,7 +6943,7 @@ const fixedtables = (a) => {
6936
6943
  return Z_STREAM_ERROR$1;
6937
6944
  }
6938
6945
  return a.next_out = e, a.avail_out = O, a.next_in = k, a.avail_in = n, u.hold = $, u.bits = N, (u.wsize || q !== a.avail_out && u.mode < BAD && (u.mode < CHECK || I !== Z_FINISH$1)) && updatewindow(a, a.output, a.next_out, q - a.avail_out), D -= a.avail_in, q -= a.avail_out, a.total_in += D, a.total_out += q, u.total += q, u.wrap & 4 && q && (a.adler = u.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
6939
- u.flags ? crc32_1(u.check, _, q, a.next_out - q) : adler32_1(u.check, _, q, a.next_out - q)), a.data_type = u.bits + (u.last ? 64 : 0) + (u.mode === TYPE ? 128 : 0) + (u.mode === LEN_ || u.mode === COPY_ ? 256 : 0), (D === 0 && q === 0 || I === Z_FINISH$1) && st === Z_OK$1 && (st = Z_BUF_ERROR), st;
6946
+ u.flags ? crc32_1(u.check, _, q, a.next_out - q) : adler32_1(u.check, _, q, a.next_out - q)), a.data_type = u.bits + (u.last ? 64 : 0) + (u.mode === TYPE ? 128 : 0) + (u.mode === LEN_ || u.mode === COPY_ ? 256 : 0), (D === 0 && q === 0 || I === Z_FINISH$1) && at === Z_OK$1 && (at = Z_BUF_ERROR), at;
6940
6947
  }, inflateEnd = (a) => {
6941
6948
  if (inflateStateCheck(a))
6942
6949
  return Z_STREAM_ERROR$1;
@@ -7170,12 +7177,12 @@ const noLogEvents = ["heartbeat", "onNetQuality", "networkQualityChange"], compr
7170
7177
  }
7171
7178
  return a;
7172
7179
  };
7173
- var vt, ut, Rt, _t, yt, Ut, Mt, Pt, Lt, Et, Bt, jt, Zt;
7180
+ var vt, ut, Et, _t, yt, Mt, Pt, Lt, Bt, xt, jt, Zt, Ft;
7174
7181
  class CallsWebSocket {
7175
7182
  // 状态
7176
7183
  constructor(I) {
7177
- at(this, vt);
7178
- at(this, ut, {
7184
+ st(this, vt);
7185
+ st(this, ut, {
7179
7186
  url: "wss://demo.putplay.cc/websocket",
7180
7187
  // 地址
7181
7188
  debug: !1,
@@ -7184,10 +7191,10 @@ class CallsWebSocket {
7184
7191
  // 最大重连次数
7185
7192
  timeout: 30 * 1e3
7186
7193
  });
7187
- at(this, Rt, "");
7194
+ st(this, Et, "");
7188
7195
  // 缓存登录凭证
7189
- at(this, _t, {});
7190
- at(this, yt, {});
7196
+ st(this, _t, {});
7197
+ st(this, yt, {});
7191
7198
  Z(this, "state", "closed");
7192
7199
  // 外部 发送消息之前
7193
7200
  Z(this, "sendMessageBefore", async () => {
@@ -7199,26 +7206,26 @@ class CallsWebSocket {
7199
7206
  Z(this, "onReconnectStop", (I) => {
7200
7207
  });
7201
7208
  // 是否需要重连
7202
- at(this, Ut, (I) => {
7209
+ st(this, Mt, (I) => {
7203
7210
  let u = !0;
7204
7211
  const { code: E = 1e3, reason: _ = "" } = I;
7205
7212
  return E === 1e3 && (_ === "quit success!" || _ === "replace old connection!") && (u = !1), u;
7206
7213
  });
7207
7214
  // 重连成功
7208
- at(this, Mt, async (I) => {
7209
- Q(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 重连成功", I), this.state = "connected", this.onReconnectSuccess(I);
7215
+ st(this, Pt, async (I) => {
7216
+ J(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 重连成功", I), this.state = "connected", this.onReconnectSuccess(I);
7210
7217
  });
7211
7218
  // 重连停止
7212
- at(this, Pt, async (I) => {
7213
- Q(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 重连停止", I), this.close(), this.state = "closed", this.onReconnectStop(I);
7219
+ st(this, Lt, async (I) => {
7220
+ J(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 重连停止", I), this.close(), this.state = "closed", this.onReconnectStop(I);
7214
7221
  });
7215
7222
  // 自定义心跳规则
7216
- at(this, Lt, () => {
7223
+ st(this, Bt, () => {
7217
7224
  const I = { event: "heartbeat", sn: +`${F(1e5, 999999)}` };
7218
7225
  return com.quick.voice.proto.CommonReq.encode(I).finish();
7219
7226
  });
7220
7227
  // 更新日志
7221
- at(this, Et, (I, u = {}) => {
7228
+ st(this, xt, (I, u = {}) => {
7222
7229
  try {
7223
7230
  const { time: E, event: _, data: k = {}, data_original: e = {}, data_remote: n, ...O } = u, $ = U(E, "YYYY-MM-DD hh:mm:ss", { offset: 480 });
7224
7231
  let N = {};
@@ -7239,10 +7246,10 @@ class CallsWebSocket {
7239
7246
  }
7240
7247
  let P = "#quickvo.logs";
7241
7248
  ignoreEvent.includes(_) && (P = "#quickvo.ignoreEvents");
7242
- const j = { "#action": q, timeStr: $, event: _, data: N, time: E, ...O }, V = localStorage.getItem(P) || JSON.stringify([]), J = JSON.parse(V);
7249
+ const j = { "#action": q, timeStr: $, event: _, data: N, time: E, ...O }, V = localStorage.getItem(P) || JSON.stringify([]), Q = JSON.parse(V);
7243
7250
  let z = _ === "heartbeat";
7244
7251
  const Y = [j];
7245
- for (const et of J) {
7252
+ for (const et of Q) {
7246
7253
  const { event: tt } = et;
7247
7254
  if (tt === "heartbeat") {
7248
7255
  if (z) continue;
@@ -7257,24 +7264,24 @@ class CallsWebSocket {
7257
7264
  }
7258
7265
  });
7259
7266
  // 创建事件
7260
- at(this, Bt, (I, { resolve: u, reject: E }) => {
7267
+ st(this, jt, (I, { resolve: u, reject: E }) => {
7261
7268
  const { sn: _ } = I, k = () => {
7262
- const n = Q(this, _t)[_];
7263
- clearTimeout(n.destructionTimer), delete Q(this, _t)[_];
7269
+ const n = J(this, _t)[_];
7270
+ clearTimeout(n.destructionTimer), delete J(this, _t)[_];
7264
7271
  }, e = setTimeout(() => {
7265
- const n = Q(this, _t)[_];
7272
+ const n = J(this, _t)[_];
7266
7273
  console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo:event is timeout", n.message), k(), E("event is timeout");
7267
- }, Q(this, ut).timeout);
7268
- Q(this, _t)[_] = { message: I, resolve: u, reject: E, destruction: k, destructionTimer: e };
7274
+ }, J(this, ut).timeout);
7275
+ J(this, _t)[_] = { message: I, resolve: u, reject: E, destruction: k, destructionTimer: e };
7269
7276
  });
7270
7277
  // 获取事件
7271
- at(this, jt, (I) => Q(this, _t)[I]);
7278
+ st(this, Zt, (I) => J(this, _t)[I]);
7272
7279
  // 接收消息
7273
- at(this, Zt, async (I) => {
7280
+ st(this, Ft, async (I) => {
7274
7281
  const u = new Uint8Array(I), E = com.quick.voice.proto.CommonRsp.decode(u), { sn: _, event: k } = E, e = onMessageFormat(E);
7275
- if (Q(this, ut).debug && (noLogEvents.includes(k) || console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#ff0097;padding:16px 0;", "------->quickvo: 响应消息↓", e), ignoreEvent.includes(k) || Q(this, Et).call(this, "res", e)), notifyName_keys.includes(k))
7282
+ if (J(this, ut).debug && (noLogEvents.includes(k) || console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#ff0097;padding:16px 0;", "------->quickvo: 响应消息↓", e), ignoreEvent.includes(k) || J(this, xt).call(this, "res", e)), notifyName_keys.includes(k))
7276
7283
  return this.emitNotify(k, L(e, ["code", "data", "desc"]));
7277
- const O = Q(this, jt).call(this, _);
7284
+ const O = J(this, Zt).call(this, _);
7278
7285
  if (O) {
7279
7286
  const { resolve: $ = (D) => {
7280
7287
  }, destruction: N = () => {
@@ -7284,12 +7291,12 @@ class CallsWebSocket {
7284
7291
  });
7285
7292
  // 清除事件
7286
7293
  Z(this, "clearEvents", (I = []) => {
7287
- const u = Object.keys(Q(this, _t));
7294
+ const u = Object.keys(J(this, _t));
7288
7295
  I.length === 0 && (I = u);
7289
7296
  for (const E of u) {
7290
7297
  if (!I.includes(E)) continue;
7291
- const _ = Q(this, _t)[E];
7292
- clearTimeout(_.destructionTimer), delete Q(this, _t)[E];
7298
+ const _ = J(this, _t)[E];
7299
+ clearTimeout(_.destructionTimer), delete J(this, _t)[E];
7293
7300
  }
7294
7301
  });
7295
7302
  /**
@@ -7298,31 +7305,31 @@ class CallsWebSocket {
7298
7305
  * @returns
7299
7306
  */
7300
7307
  Z(this, "connect", async (I = "") => new Promise(async (u) => {
7301
- I && wt(this, Rt, I), Q(this, vt) && (await Q(this, vt).close(), this.state = "closed");
7302
- const E = `${Q(this, ut).url}?s=${Q(this, Rt)}&t=${Date.now()}`;
7303
- wt(this, vt, new M({
7304
- ...Q(this, ut),
7308
+ I && St(this, Et, I), J(this, vt) && (await J(this, vt).close(), this.state = "closed");
7309
+ const E = `${J(this, ut).url}?s=${J(this, Et)}&t=${Date.now()}`;
7310
+ St(this, vt, new M({
7311
+ ...J(this, ut),
7305
7312
  url: E,
7306
7313
  binaryType: "arraybuffer",
7307
- onMessage: Q(this, Zt),
7308
- checkReconnect: Q(this, Ut),
7309
- getHeartbeatMsg: Q(this, Lt),
7310
- onReconnectSuccess: Q(this, Mt),
7311
- onReconnectStop: Q(this, Pt)
7312
- })), this.state = "connecting", await Q(this, vt).connect(), this.state = "connected", Q(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 当前广播事件", Q(this, yt)), u(Q(this, vt));
7314
+ onMessage: J(this, Ft),
7315
+ checkReconnect: J(this, Mt),
7316
+ getHeartbeatMsg: J(this, Bt),
7317
+ onReconnectSuccess: J(this, Pt),
7318
+ onReconnectStop: J(this, Lt)
7319
+ })), this.state = "connecting", await J(this, vt).connect(), this.state = "connected", J(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 当前广播事件", J(this, yt)), u(J(this, vt));
7313
7320
  }));
7314
7321
  /**
7315
7322
  * 关闭
7316
7323
  */
7317
7324
  Z(this, "close", async () => {
7318
7325
  var u;
7319
- Q(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: cws is close.");
7320
- const I = Object.keys(Q(this, _t));
7326
+ J(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: cws is close.");
7327
+ const I = Object.keys(J(this, _t));
7321
7328
  for (const E of I) {
7322
- const { destructionTimer: _ } = Q(this, _t)[E];
7329
+ const { destructionTimer: _ } = J(this, _t)[E];
7323
7330
  clearTimeout(_);
7324
7331
  }
7325
- wt(this, _t, {}), await ((u = Q(this, vt)) == null ? void 0 : u.close()), wt(this, vt, void 0), this.state = "closed";
7332
+ St(this, _t, {}), await ((u = J(this, vt)) == null ? void 0 : u.close()), St(this, vt, void 0), this.state = "closed";
7326
7333
  });
7327
7334
  /**
7328
7335
  * 发送消息
@@ -7335,14 +7342,14 @@ class CallsWebSocket {
7335
7342
  event: k,
7336
7343
  sn: +`${n}${F(1e3, 9999)}`,
7337
7344
  time: n,
7338
- valid: Q(this, ut).timeout,
7345
+ valid: J(this, ut).timeout,
7339
7346
  version: 1,
7340
7347
  compress: !1,
7341
7348
  ...e
7342
7349
  });
7343
- Q(this, ut).debug && (noLogEvents.includes(k) || console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#ff9700;padding:16px 0;", "------->quickvo: 发送消息↑", O), ignoreEvent.includes(k) || Q(this, Et).call(this, "req", O)), u && Q(this, Bt).call(this, O, { resolve: E, reject: _ });
7350
+ J(this, ut).debug && (noLogEvents.includes(k) || console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#ff9700;padding:16px 0;", "------->quickvo: 发送消息↑", O), ignoreEvent.includes(k) || J(this, xt).call(this, "req", O)), u && J(this, jt).call(this, O, { resolve: E, reject: _ });
7344
7351
  const $ = com.quick.voice.proto.CommonReq.encode(O).finish();
7345
- (N = Q(this, vt)) == null || N.sendMessage($);
7352
+ (N = J(this, vt)) == null || N.sendMessage($);
7346
7353
  }));
7347
7354
  /**
7348
7355
  * 触发广播事件
@@ -7350,7 +7357,7 @@ class CallsWebSocket {
7350
7357
  * @param result 事件响应值
7351
7358
  */
7352
7359
  Z(this, "emitNotify", async (I, u) => {
7353
- const E = Q(this, yt)[I] || [];
7360
+ const E = J(this, yt)[I] || [];
7354
7361
  for (const _ of E) {
7355
7362
  const { callback: k = async () => {
7356
7363
  } } = _;
@@ -7365,8 +7372,8 @@ class CallsWebSocket {
7365
7372
  */
7366
7373
  Z(this, "addNotify", (I, u = !1) => {
7367
7374
  const { event: E, sn: _ = ht(32) } = I;
7368
- Q(this, yt)[E] || (Q(this, yt)[E] = []);
7369
- const k = Q(this, yt)[E], e = k.findIndex((n) => n.sn === _);
7375
+ J(this, yt)[E] || (J(this, yt)[E] = []);
7376
+ const k = J(this, yt)[E], e = k.findIndex((n) => n.sn === _);
7370
7377
  return e !== -1 && k.splice(e, 1), u ? k.unshift(I) : k.push(I), _;
7371
7378
  });
7372
7379
  /**
@@ -7374,18 +7381,18 @@ class CallsWebSocket {
7374
7381
  */
7375
7382
  Z(this, "removeNotify", (I = []) => {
7376
7383
  if (I.length === 0)
7377
- wt(this, yt, {});
7384
+ St(this, yt, {});
7378
7385
  else {
7379
- const u = Object.keys(Q(this, yt));
7386
+ const u = Object.keys(J(this, yt));
7380
7387
  for (const E of u)
7381
- Q(this, yt)[E] = Q(this, yt)[E].filter((_) => !I.includes(_.sn || ""));
7388
+ J(this, yt)[E] = J(this, yt)[E].filter((_) => !I.includes(_.sn || ""));
7382
7389
  }
7383
- Q(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 移除广播事件", Q(this, yt));
7390
+ J(this, ut).debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 移除广播事件", J(this, yt));
7384
7391
  });
7385
- wt(this, ut, { ...Q(this, ut), ...I });
7392
+ St(this, ut, { ...J(this, ut), ...I });
7386
7393
  }
7387
7394
  }
7388
- vt = new WeakMap(), ut = new WeakMap(), Rt = new WeakMap(), _t = new WeakMap(), yt = new WeakMap(), Ut = new WeakMap(), Mt = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), Et = new WeakMap(), Bt = new WeakMap(), jt = new WeakMap(), Zt = new WeakMap();
7395
+ vt = new WeakMap(), ut = new WeakMap(), Et = new WeakMap(), _t = new WeakMap(), yt = new WeakMap(), Mt = new WeakMap(), Pt = new WeakMap(), Lt = new WeakMap(), Bt = new WeakMap(), xt = new WeakMap(), jt = new WeakMap(), Zt = new WeakMap(), Ft = new WeakMap();
7389
7396
  var y = Object.defineProperty, x = (a) => {
7390
7397
  throw TypeError(a);
7391
7398
  }, g = (a, I, u) => I in a ? y(a, I, { enumerable: !0, configurable: !0, writable: !0, value: u }) : a[I] = u, h = (a, I, u) => g(a, typeof I != "symbol" ? I + "" : I, u), b = (a, I, u) => I.has(a) || x("Cannot " + u), o = (a, I, u) => (b(a, I, "read from private field"), u ? u.call(a) : I.get(a)), f = (a, I, u) => I.has(a) ? x("Cannot add the same private member more than once") : I instanceof WeakSet ? I.add(a) : I.set(a, u), p = (a, I, u, E) => (b(a, I, "write to private field"), I.set(a, u), u), d, c, l;
@@ -7441,7 +7448,7 @@ class K {
7441
7448
  }
7442
7449
  }
7443
7450
  d = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap();
7444
- var Ft;
7451
+ var Ht;
7445
7452
  class RoomBase {
7446
7453
  constructor(I) {
7447
7454
  Z(this, "options", {
@@ -7492,14 +7499,10 @@ class RoomBase {
7492
7499
  const { appid: E, userId: _, earlyId: k = "", logUrl: e } = this.options, n = "web";
7493
7500
  {
7494
7501
  const O = { origin: n, type: I, app_id: E, user_id: _, ins_id: k, comment: u }, $ = new URLSearchParams(O).toString(), N = `${e}/upload/log?${$}`;
7495
- console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: reportLogs", O), console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: reportLogs", N);
7496
- }
7497
- {
7498
- const O = localStorage.getItem("#quickvo.logs") || JSON.stringify([]), N = new TextEncoder().encode(O);
7499
- console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: reportLogs", N);
7502
+ console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: reportLogs", { obj: O, url: N });
7500
7503
  }
7501
7504
  });
7502
- at(this, Ft, () => {
7505
+ st(this, Ht, () => {
7503
7506
  this.taskQueue.setCondition("createWs", !0), this.taskQueue.setCondition("createSession", !1), this.taskQueue.setCondition("ice", !1);
7504
7507
  });
7505
7508
  /**
@@ -7592,33 +7595,35 @@ class RoomBase {
7592
7595
  * 处理为应用层数据
7593
7596
  */
7594
7597
  Z(this, "usersFilter", (I) => ft(I, ["id", "isSelf", "joinTime", "tracks", "callAction", "callActionStr", "callActionMap", "network", "permissions", "isPublished", "updateStreams"]).sort((_, k) => _.id.localeCompare(k.id, "en")));
7595
- this.setOptions(I), this.cwsIns = new CallsWebSocket({ ...I }), Q(this, Ft).call(this);
7598
+ this.setOptions(I), this.cwsIns = new CallsWebSocket({ ...I }), J(this, Ht).call(this);
7596
7599
  }
7597
7600
  }
7598
- Ft = new WeakMap();
7599
- var $t, kt, dt, bt, Ht, zt, Tt, Jt;
7601
+ Ht = new WeakMap();
7602
+ var Tt, kt, dt, bt, wt, zt, Jt, It, Wt;
7600
7603
  class RoomMedias extends RoomBase {
7601
- // 媒体流上下文
7604
+ // 本地流管理
7602
7605
  constructor(u) {
7603
7606
  super(u);
7604
- at(this, $t, []);
7607
+ st(this, Tt, []);
7605
7608
  // 可用媒体设备列表
7606
- at(this, kt, /* @__PURE__ */ new Map());
7609
+ st(this, kt, /* @__PURE__ */ new Map());
7607
7610
  // 媒体流设备管理
7608
- at(this, dt, /* @__PURE__ */ new Map());
7611
+ st(this, dt, /* @__PURE__ */ new Map());
7609
7612
  // 媒体轨道参数管理
7610
- at(this, bt, /* @__PURE__ */ new Map());
7613
+ st(this, bt, /* @__PURE__ */ new Map());
7614
+ // 媒体流上下文
7615
+ st(this, wt, []);
7611
7616
  /**
7612
7617
  * 初始化媒体参数
7613
7618
  */
7614
- at(this, Ht, () => {
7615
- Q(this, dt).set("microphoneCamera_audio", {}), Q(this, dt).set("microphoneCamera_video", { width: { ideal: 1920 }, height: { ideal: 1080 }, frameRate: { min: 10, ideal: 30 } }), Q(this, dt).set("screenSharing_video", { width: { ideal: 1920 }, height: { ideal: 1080 }, frameRate: { min: 10, ideal: 30 } }), Q(this, dt).set("screenSharing_audio", {});
7619
+ st(this, zt, () => {
7620
+ J(this, dt).set("microphoneCamera_audio", {}), J(this, dt).set("microphoneCamera_video", { width: { ideal: 1920 }, height: { ideal: 1080 }, frameRate: { min: 10, ideal: 30 } }), J(this, dt).set("screenSharing_video", { width: { ideal: 1920 }, height: { ideal: 1080 }, frameRate: { min: 10, ideal: 30 } }), J(this, dt).set("screenSharing_audio", {});
7616
7621
  });
7617
7622
  /**
7618
7623
  * 初始化媒体设备类型
7619
7624
  */
7620
- at(this, zt, () => {
7621
- Q(this, kt).set("audioinput", "default"), Q(this, kt).set("videoinput", "default"), Q(this, kt).set("audiooutput", "default");
7625
+ st(this, Jt, () => {
7626
+ J(this, kt).set("audioinput", "default"), J(this, kt).set("videoinput", "default"), J(this, kt).set("audiooutput", "default");
7622
7627
  });
7623
7628
  /**
7624
7629
  * 房间所有用户所有媒体流变化
@@ -7643,14 +7648,14 @@ class RoomMedias extends RoomBase {
7643
7648
  case "audio":
7644
7649
  {
7645
7650
  const $ = new AudioMediaContext(k);
7646
- Q(this, bt).set(e, $);
7651
+ J(this, bt).set(e, $);
7647
7652
  }
7648
7653
  break;
7649
7654
  // 视频媒体处理
7650
7655
  case "video":
7651
7656
  {
7652
7657
  const $ = new VideoMediaContext(k);
7653
- Q(this, bt).set(e, $);
7658
+ J(this, bt).set(e, $);
7654
7659
  }
7655
7660
  break;
7656
7661
  }
@@ -7658,7 +7663,7 @@ class RoomMedias extends RoomBase {
7658
7663
  const $ = this.getUserMediaStreamContext(u, E);
7659
7664
  if ($ && $.kind === "audio")
7660
7665
  try {
7661
- const N = Q(this, kt).get("audiooutput");
7666
+ const N = J(this, kt).get("audiooutput");
7662
7667
  (O = $.audioContext) == null || O.setSinkId(N);
7663
7668
  } catch (N) {
7664
7669
  console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: setSinkId is error", N);
@@ -7670,21 +7675,21 @@ class RoomMedias extends RoomBase {
7670
7675
  */
7671
7676
  Z(this, "getUserMediaStreamContext", (u, E) => {
7672
7677
  const _ = this.getUserMediaKey(u, E);
7673
- return Q(this, bt).get(_);
7678
+ return J(this, bt).get(_);
7674
7679
  });
7675
7680
  /**
7676
7681
  * 获取用户音频媒体流上下文
7677
7682
  */
7678
7683
  Z(this, "getUserAudioMediaStreamContext", (u, E) => {
7679
7684
  const _ = this.getUserMediaKey(u, E);
7680
- return Q(this, bt).get(_);
7685
+ return J(this, bt).get(_);
7681
7686
  });
7682
7687
  /**
7683
7688
  * 删除用户媒体流上下文
7684
7689
  */
7685
7690
  Z(this, "removeUserMediaStreamContext", (u, E) => {
7686
- const _ = this.getUserMediaKey(u, E), k = Q(this, bt).get(_);
7687
- k == null || k.stop(), Q(this, bt).delete(_);
7691
+ const _ = this.getUserMediaKey(u, E), k = J(this, bt).get(_);
7692
+ k == null || k.stop(), J(this, bt).delete(_);
7688
7693
  });
7689
7694
  /**
7690
7695
  * 获取某个用户的某个数据流
@@ -7717,16 +7722,16 @@ class RoomMedias extends RoomBase {
7717
7722
  * 清除所有媒体流使用
7718
7723
  */
7719
7724
  Z(this, "clearUserStreams", () => {
7720
- const u = Q(this, bt).values();
7725
+ const u = J(this, bt).values();
7721
7726
  for (const E of u)
7722
7727
  E.stop();
7723
- wt(this, bt, /* @__PURE__ */ new Map());
7728
+ St(this, bt, /* @__PURE__ */ new Map());
7724
7729
  });
7725
7730
  /**
7726
7731
  * 设置轨道媒体参数
7727
7732
  */
7728
7733
  Z(this, "setMediaTrackConstraints", async (u, E) => {
7729
- Q(this, dt).set(u, E);
7734
+ J(this, dt).set(u, E);
7730
7735
  const k = this.getUserStream(this.options.userId, u).getTracks();
7731
7736
  if (k.length !== 0)
7732
7737
  for (const e of k) {
@@ -7734,6 +7739,17 @@ class RoomMedias extends RoomBase {
7734
7739
  await e.applyConstraints(O);
7735
7740
  }
7736
7741
  });
7742
+ /**
7743
+ * 清理所有本地流
7744
+ */
7745
+ Z(this, "clearLocalStream", () => {
7746
+ for (const u of J(this, wt)) {
7747
+ const E = u.getTracks();
7748
+ for (const _ of E)
7749
+ _.stop();
7750
+ }
7751
+ St(this, wt, []);
7752
+ });
7737
7753
  /**
7738
7754
  * 初始化本地流
7739
7755
  */
@@ -7744,31 +7760,33 @@ class RoomMedias extends RoomBase {
7744
7760
  case "microphoneCamera_audio":
7745
7761
  {
7746
7762
  this.removeUserMediaStreamContext(E, "microphoneCamera_audio");
7747
- const _ = Q(this, kt).get("audioinput"), k = Q(this, dt).get("microphoneCamera_audio"), e = await navigator.mediaDevices.getUserMedia({ audio: { deviceId: _, ...k }, video: !1 });
7748
- await this.initUserMediaStreamContext(E, "microphoneCamera_audio", e);
7763
+ const _ = J(this, kt).get("audioinput"), k = J(this, dt).get("microphoneCamera_audio"), e = await navigator.mediaDevices.getUserMedia({ audio: { deviceId: _, ...k }, video: !1 });
7764
+ J(this, wt).push(e), await this.initUserMediaStreamContext(E, "microphoneCamera_audio", e);
7749
7765
  }
7750
7766
  break;
7751
7767
  // 摄像头
7752
7768
  case "microphoneCamera_video":
7753
7769
  {
7754
7770
  this.removeUserMediaStreamContext(E, "microphoneCamera_video");
7755
- const _ = Q(this, kt).get("videoinput"), k = Q(this, dt).get("microphoneCamera_video"), e = await navigator.mediaDevices.getUserMedia({ audio: !1, video: { deviceId: _, ...k } });
7756
- await this.initUserMediaStreamContext(E, "microphoneCamera_video", e);
7771
+ const _ = J(this, kt).get("videoinput"), k = J(this, dt).get("microphoneCamera_video"), e = await navigator.mediaDevices.getUserMedia({ audio: !1, video: { deviceId: _, ...k } });
7772
+ J(this, wt).push(e), await this.initUserMediaStreamContext(E, "microphoneCamera_video", e);
7757
7773
  }
7758
7774
  break;
7759
7775
  // 麦克风 + 摄像头
7760
7776
  case "microphoneCamera":
7761
7777
  {
7762
7778
  this.removeUserMediaStreamContext(E, "microphoneCamera_audio"), this.removeUserMediaStreamContext(E, "microphoneCamera_video");
7763
- const _ = Q(this, kt).get("audioinput"), k = Q(this, kt).get("videoinput"), e = Q(this, dt).get("microphoneCamera_audio"), n = Q(this, dt).get("microphoneCamera_video"), O = await navigator.mediaDevices.getUserMedia({ audio: { deviceId: _, ...e }, video: { deviceId: k, ...n } });
7764
- await this.initUserMediaStreamContext(E, "microphoneCamera_audio", O);
7779
+ const _ = J(this, kt).get("audioinput"), k = J(this, kt).get("videoinput"), e = J(this, dt).get("microphoneCamera_audio"), n = J(this, dt).get("microphoneCamera_video"), O = await navigator.mediaDevices.getUserMedia({ audio: { deviceId: _, ...e }, video: { deviceId: k, ...n } });
7780
+ J(this, wt).push(O), await this.initUserMediaStreamContext(E, "microphoneCamera_audio", O);
7765
7781
  }
7766
7782
  break;
7767
7783
  // 屏幕共享 音频
7768
7784
  case "screenSharing_audio":
7769
7785
  {
7770
7786
  this.removeUserMediaStreamContext(E, "screenSharing_audio");
7771
- const _ = Q(this, dt).get("screenSharing_audio"), e = (await navigator.mediaDevices.getDisplayMedia({ audio: !0, video: !0, ..._ })).getTracks();
7787
+ const _ = J(this, dt).get("screenSharing_audio"), k = await navigator.mediaDevices.getDisplayMedia({ audio: !0, video: !0, ..._ });
7788
+ J(this, wt).push(k);
7789
+ const e = k.getTracks();
7772
7790
  for (const n of e) {
7773
7791
  const { kind: O } = n;
7774
7792
  if (O === "audio") {
@@ -7782,7 +7800,9 @@ class RoomMedias extends RoomBase {
7782
7800
  case "screenSharing_video":
7783
7801
  {
7784
7802
  this.removeUserMediaStreamContext(E, u);
7785
- const _ = Q(this, dt).get(u), e = (await navigator.mediaDevices.getDisplayMedia({ audio: !1, video: !0, ..._ })).getTracks();
7803
+ const _ = J(this, dt).get(u), k = await navigator.mediaDevices.getDisplayMedia({ audio: !1, video: !0, ..._ });
7804
+ J(this, wt).push(k);
7805
+ const e = k.getTracks();
7786
7806
  for (const n of e) {
7787
7807
  const { kind: O } = n;
7788
7808
  if (O === "video") {
@@ -7796,7 +7816,9 @@ class RoomMedias extends RoomBase {
7796
7816
  case "screenSharing":
7797
7817
  {
7798
7818
  this.removeUserMediaStreamContext(E, "screenSharing_audio"), this.removeUserMediaStreamContext(E, "screenSharing_video");
7799
- const _ = Q(this, dt).get("screenSharing_audio"), k = Q(this, dt).get("screenSharing_video"), n = (await navigator.mediaDevices.getDisplayMedia({ audio: !0, video: !0, ..._, ...k })).getTracks();
7819
+ const _ = J(this, dt).get("screenSharing_audio"), k = J(this, dt).get("screenSharing_video"), e = await navigator.mediaDevices.getDisplayMedia({ audio: !0, video: !0, ..._, ...k });
7820
+ J(this, wt).push(e);
7821
+ const n = e.getTracks();
7800
7822
  for (const O of n) {
7801
7823
  const { kind: $ } = O;
7802
7824
  if ($ === "audio") {
@@ -7819,33 +7841,33 @@ class RoomMedias extends RoomBase {
7819
7841
  /**
7820
7842
  * 获取媒体设备列表
7821
7843
  */
7822
- at(this, Tt, async () => !navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices ? (console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 不支持 enumerateDevices"), []) : (await navigator.mediaDevices.enumerateDevices().then((u) => {
7823
- wt(this, $t, u);
7844
+ st(this, It, async () => !navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices ? (console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 不支持 enumerateDevices"), []) : (await navigator.mediaDevices.enumerateDevices().then((u) => {
7845
+ St(this, Tt, u);
7824
7846
  }).catch(function(u) {
7825
7847
  console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: getEnumerateDevices is err", u);
7826
- }), Q(this, $t)));
7848
+ }), J(this, Tt)));
7827
7849
  /**
7828
7850
  * 媒体设备发生变化
7829
7851
  */
7830
- at(this, Jt, () => {
7852
+ st(this, Wt, () => {
7831
7853
  navigator.mediaDevices && (navigator.mediaDevices.ondevicechange = async () => {
7832
- await Q(this, Tt).call(this), this.cwsIns.emitNotify("onDevicechange", { code: 200, data: {}, desc: "device is change." });
7833
- }), Q(this, Tt).call(this);
7854
+ await J(this, It).call(this), this.cwsIns.emitNotify("onDevicechange", { code: 200, data: {}, desc: "device is change." });
7855
+ }), J(this, It).call(this);
7834
7856
  });
7835
7857
  /**
7836
7858
  * 获取正在使用的媒体设备ID
7837
7859
  * @param mediaDeviceKind 设备类型 "audioinput" | "audiooutput" | "videoinput"
7838
7860
  * @returns deviceId 设备ID
7839
7861
  */
7840
- Z(this, "getMediaDeviceKind", (u) => Q(this, kt).get(u));
7862
+ Z(this, "getMediaDeviceKind", (u) => J(this, kt).get(u));
7841
7863
  /**
7842
7864
  * 设置正在使用的媒体设备
7843
7865
  * @param mediaDeviceKind 设备类型 "audioinput" | "audiooutput" | "videoinput"
7844
7866
  * @param deviceId 设备ID
7845
7867
  */
7846
7868
  Z(this, "setDeviceKind", async (u, E) => {
7847
- if (Q(this, kt).set(u, E), u === "audiooutput") {
7848
- const _ = Q(this, bt).values();
7869
+ if (J(this, kt).set(u, E), u === "audiooutput") {
7870
+ const _ = J(this, bt).values();
7849
7871
  for (const k of _)
7850
7872
  if (k.kind === "audio" && "setSinkId" in HTMLMediaElement.prototype)
7851
7873
  try {
@@ -7866,7 +7888,7 @@ class RoomMedias extends RoomBase {
7866
7888
  * @param mediaDeviceKind 设备类型 "audioinput" | "audiooutput" | "videoinput"
7867
7889
  * @returns MediaDeviceInfo[]
7868
7890
  */
7869
- Z(this, "getEnumerateDevices", async (u) => (await Q(this, Tt).call(this), Q(this, $t).filter((_) => _.kind === u)));
7891
+ Z(this, "getEnumerateDevices", async (u) => (await J(this, It).call(this), J(this, Tt).filter((_) => _.kind === u)));
7870
7892
  /**
7871
7893
  * 获取可用音频输入设备
7872
7894
  * @returns MediaDeviceInfo[]
@@ -7882,10 +7904,10 @@ class RoomMedias extends RoomBase {
7882
7904
  * @returns MediaDeviceInfo[]
7883
7905
  */
7884
7906
  Z(this, "getEnumerateVideoinputDevices", () => this.getEnumerateDevices("videoinput"));
7885
- Q(this, Jt).call(this), Q(this, zt).call(this), Q(this, Ht).call(this);
7907
+ J(this, Wt).call(this), J(this, Jt).call(this), J(this, zt).call(this);
7886
7908
  }
7887
7909
  }
7888
- $t = new WeakMap(), kt = new WeakMap(), dt = new WeakMap(), bt = new WeakMap(), Ht = new WeakMap(), zt = new WeakMap(), Tt = new WeakMap(), Jt = new WeakMap();
7910
+ Tt = new WeakMap(), kt = new WeakMap(), dt = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), zt = new WeakMap(), Jt = new WeakMap(), It = new WeakMap(), Wt = new WeakMap();
7889
7911
  class RoomUsers extends RoomMedias {
7890
7912
  constructor(u) {
7891
7913
  super(u);
@@ -8189,11 +8211,11 @@ const createMutedAudioStream = () => {
8189
8211
  O.addColorStop(0, `hsla(${k}, 100%, 50%, 0)`), O.addColorStop(1, `hsla(${k + 120}, 100%, 50%, 0)`), _.fillStyle = O, _.fillRect(0, 0, E.width, E.height), k = (k + 1) % 360;
8190
8212
  }, 100), E.captureStream(u);
8191
8213
  };
8192
- var St, Wt, xt, Kt, Gt, Qt;
8214
+ var Ot, Kt, Nt, Gt, Qt, Vt;
8193
8215
  class RoomPeer extends RoomUsers {
8194
8216
  constructor(u) {
8195
8217
  super(u);
8196
- at(this, St, /* @__PURE__ */ new Map());
8218
+ st(this, Ot, /* @__PURE__ */ new Map());
8197
8219
  // 假媒体流 (创建轨道用)
8198
8220
  Z(this, "getPeerStatsTimer", 0);
8199
8221
  // 获取报告的定时器
@@ -8212,28 +8234,28 @@ class RoomPeer extends RoomUsers {
8212
8234
  // 网络抖动
8213
8235
  });
8214
8236
  Z(this, "initPeer", () => {
8215
- this.peerIns = new RTCPeerConnection({ bundlePolicy: "max-bundle" }), this.transceiverMap = /* @__PURE__ */ new Map(), Q(this, Kt).call(this), Q(this, Qt).call(this);
8237
+ this.peerIns = new RTCPeerConnection({ bundlePolicy: "max-bundle" }), this.transceiverMap = /* @__PURE__ */ new Map(), J(this, Gt).call(this), J(this, Vt).call(this);
8216
8238
  });
8217
8239
  // 初始化假数据流
8218
- at(this, Wt, () => {
8240
+ st(this, Kt, () => {
8219
8241
  for (const u of mediaType_keys)
8220
8242
  switch (u) {
8221
8243
  case "microphoneCamera_audio":
8222
- Q(this, St).set("microphoneCamera_audio", createMutedAudioStream());
8244
+ J(this, Ot).set("microphoneCamera_audio", createMutedAudioStream());
8223
8245
  break;
8224
8246
  case "microphoneCamera_video":
8225
- Q(this, St).set("microphoneCamera_video", createFakeVideoStream());
8247
+ J(this, Ot).set("microphoneCamera_video", createFakeVideoStream());
8226
8248
  break;
8227
8249
  case "screenSharing_audio":
8228
- Q(this, St).set("screenSharing_audio", createMutedAudioStream());
8250
+ J(this, Ot).set("screenSharing_audio", createMutedAudioStream());
8229
8251
  break;
8230
8252
  case "screenSharing_video":
8231
- Q(this, St).set("screenSharing_video", createFakeVideoStream());
8253
+ J(this, Ot).set("screenSharing_video", createFakeVideoStream());
8232
8254
  break;
8233
8255
  }
8234
8256
  });
8235
8257
  // 获取假数据流
8236
- at(this, xt, (u) => Q(this, St).get(u));
8258
+ st(this, Nt, (u) => J(this, Ot).get(u));
8237
8259
  /**
8238
8260
  * 替换发射器媒体流
8239
8261
  */
@@ -8245,7 +8267,7 @@ class RoomPeer extends RoomUsers {
8245
8267
  let n;
8246
8268
  if (e) {
8247
8269
  const { sender: O } = e;
8248
- E ? n = this.getUserStream(_, k) : n = Q(this, xt).call(this, k);
8270
+ E ? n = this.getUserStream(_, k) : n = J(this, Nt).call(this, k);
8249
8271
  const [$] = n.getTracks();
8250
8272
  await O.replaceTrack($);
8251
8273
  }
@@ -8274,7 +8296,7 @@ class RoomPeer extends RoomUsers {
8274
8296
  const E = [];
8275
8297
  for (const _ of u) {
8276
8298
  if (this.transceiverMap.has(_)) continue;
8277
- const k = Q(this, xt).call(this, _), [e] = k.getTracks(), n = this.peerIns.addTransceiver(e, { direction: "sendonly" });
8299
+ const k = J(this, Nt).call(this, _), [e] = k.getTracks(), n = this.peerIns.addTransceiver(e, { direction: "sendonly" });
8278
8300
  this.transceiverMap.set(_, n), E.push(_);
8279
8301
  }
8280
8302
  if (u.length === 0 || E.length) {
@@ -8291,6 +8313,7 @@ class RoomPeer extends RoomUsers {
8291
8313
  * 移除发射器
8292
8314
  */
8293
8315
  Z(this, "removeSenders", async (u = []) => {
8316
+ u.length === 0 && (u = mediaType_keys);
8294
8317
  for (const E of u)
8295
8318
  this.transceiverMap.has(E) && this.transceiverMap.delete(E);
8296
8319
  });
@@ -8337,7 +8360,7 @@ class RoomPeer extends RoomUsers {
8337
8360
  }
8338
8361
  await this.emitNotifyUpdateUsersStreams(N), this.peerIns.removeEventListener("track", O), _(!0);
8339
8362
  }, O = async ($) => {
8340
- const { streams: N, transceiver: D } = $, [q] = N, { mid: P, receiver: j } = D, { track: V } = j, { id: J, kind: z } = V, Y = k.find((nt) => nt.mid === `${P}`);
8363
+ const { streams: N, transceiver: D } = $, [q] = N, { mid: P, receiver: j } = D, { track: V } = j, { id: Q, kind: z } = V, Y = k.find((nt) => nt.mid === `${P}`);
8341
8364
  if (!Y) return;
8342
8365
  const { userId: et, mediaType: tt } = Y;
8343
8366
  if (!(!et || !tt)) {
@@ -8346,7 +8369,7 @@ class RoomPeer extends RoomUsers {
8346
8369
  (nt == null ? void 0 : nt.kind) === "audio" && nt.setMute(!1);
8347
8370
  }
8348
8371
  {
8349
- const nt = { ...Y, mid: P, msid: J };
8372
+ const nt = { ...Y, mid: P, msid: Q };
8350
8373
  e.push(nt);
8351
8374
  }
8352
8375
  this.options.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#00b60f;", `------->quickvo: await subscribe ${e.length}/${k.length}`, { mediaType: tt, mid: P, userTrack: Y, e: $ }), k.length === e.length && n();
@@ -8359,7 +8382,7 @@ class RoomPeer extends RoomUsers {
8359
8382
  /**
8360
8383
  * 监听webrtc ice通讯连接
8361
8384
  */
8362
- at(this, Kt, () => {
8385
+ st(this, Gt, () => {
8363
8386
  let u = 0;
8364
8387
  const E = () => {
8365
8388
  this.setRoomState("closed");
@@ -8509,7 +8532,7 @@ class RoomPeer extends RoomUsers {
8509
8532
  /**
8510
8533
  * 计算网络质量
8511
8534
  */
8512
- at(this, Gt, async () => {
8535
+ st(this, Qt, async () => {
8513
8536
  try {
8514
8537
  const u = await this.peerIns.getStats(), E = ["inbound-rtp", "remote-inbound-rtp", "outbound-rtp"], k = [...u.values()].filter((nt) => E.includes(nt.type));
8515
8538
  let e = 0, n = 0, O = 0, $ = 0, N = 0, D = 0, q = [], P = [];
@@ -8519,23 +8542,23 @@ class RoomPeer extends RoomUsers {
8519
8542
  }
8520
8543
  this.reports = k;
8521
8544
  for (const nt of this.reports) {
8522
- const { bytesReceived: lt, bytesSent: it, packetsSent: st, packetsLost: ct, jitter: ot, roundTripTime: rt } = nt;
8523
- lt && (e = lt), it && (n = it), st && (N += st), ct && (D += ct), rt && q.push((rt * 100).toFixed(2)), ot && P.push(ot.toFixed(2));
8545
+ const { bytesReceived: lt, bytesSent: it, packetsSent: at, packetsLost: ct, jitter: ot, roundTripTime: rt } = nt;
8546
+ lt && (e = lt), it && (n = it), at && (N += at), ct && (D += ct), rt && q.push((rt * 100).toFixed(2)), ot && P.push(ot.toFixed(2));
8524
8547
  }
8525
8548
  P.sort().reverse(), q.sort().reverse();
8526
- const j = N - O, V = D - $, J = j === 0 ? "0.00" : (V / j).toFixed(2), [z = "0"] = q, [Y = "0"] = P, et = { inboundBytes: e, outboundBytes: n, lostRate: J, roundTripTime: z, jitter: Y };
8549
+ const j = N - O, V = D - $, Q = j === 0 ? "0.00" : (V / j).toFixed(2), [z = "0"] = q, [Y = "0"] = P, et = { inboundBytes: e, outboundBytes: n, lostRate: Q, roundTripTime: z, jitter: Y };
8527
8550
  this.peerNetwork = et;
8528
8551
  const tt = (nt, lt, it) => {
8529
- const st = Number(nt), ct = Number(lt), ot = Number(it);
8552
+ const at = Number(nt), ct = Number(lt), ot = Number(it);
8530
8553
  let rt = "0";
8531
- return st < 0.03 && ct < 100 && ot < 0.05 ? rt = "5" : st < 0.06 && ct < 160 && ot < 0.1 ? rt = "4" : st < 0.1 && ct < 250 && ot < 0.15 ? rt = "3" : st < 0.15 && ct < 400 && ot < 0.2 ? rt = "2" : rt = "1", Number(rt);
8554
+ return at < 0.03 && ct < 100 && ot < 0.05 ? rt = "5" : at < 0.06 && ct < 160 && ot < 0.1 ? rt = "4" : at < 0.1 && ct < 250 && ot < 0.15 ? rt = "3" : at < 0.15 && ct < 400 && ot < 0.2 ? rt = "2" : rt = "1", Number(rt);
8532
8555
  };
8533
8556
  {
8534
- const nt = tt(J, z, Y), lt = await this.getCaller(), { network: it } = lt, st = { egress: nt, ingress: nt }, ct = JSON.stringify(it) !== JSON.stringify(st);
8535
- if (await this.updateUserNetwork(this.options.userId, st), ct) {
8557
+ const nt = tt(Q, z, Y), lt = await this.getCaller(), { network: it } = lt, at = { egress: nt, ingress: nt }, ct = JSON.stringify(it) !== JSON.stringify(at);
8558
+ if (await this.updateUserNetwork(this.options.userId, at), ct) {
8536
8559
  this.emitNotifyUpdateUsers();
8537
8560
  const { userId: ot, roomId: rt } = this.options;
8538
- this.cwsIns.sendMessage({ event: "networkQualityChange", data: { ...st, userId: ot, roomId: rt } }, !1);
8561
+ this.cwsIns.sendMessage({ event: "networkQualityChange", data: { ...at, userId: ot, roomId: rt } }, !1);
8539
8562
  }
8540
8563
  }
8541
8564
  } catch (u) {
@@ -8545,9 +8568,9 @@ class RoomPeer extends RoomUsers {
8545
8568
  /**
8546
8569
  * 获取连接的所有轨道分析数据
8547
8570
  */
8548
- at(this, Qt, () => {
8571
+ st(this, Vt, () => {
8549
8572
  const u = async () => {
8550
- this.peerIns.connectionState !== "connected" || !this.options.roomId || Q(this, Gt).call(this);
8573
+ this.peerIns.connectionState !== "connected" || !this.options.roomId || J(this, Qt).call(this);
8551
8574
  };
8552
8575
  this.getPeerStatsTimer = setInterval(u, 1 * 1e3);
8553
8576
  });
@@ -8555,11 +8578,11 @@ class RoomPeer extends RoomUsers {
8555
8578
  * 停止网络报告分析
8556
8579
  */
8557
8580
  Z(this, "stopGetPeerStats", () => clearInterval(this.getPeerStatsTimer));
8558
- Q(this, Wt).call(this);
8581
+ J(this, Kt).call(this);
8559
8582
  }
8560
8583
  }
8561
- St = new WeakMap(), Wt = new WeakMap(), xt = new WeakMap(), Kt = new WeakMap(), Gt = new WeakMap(), Qt = new WeakMap();
8562
- var Vt, It, Nt, At, qt;
8584
+ Ot = new WeakMap(), Kt = new WeakMap(), Nt = new WeakMap(), Gt = new WeakMap(), Qt = new WeakMap(), Vt = new WeakMap();
8585
+ var Yt, Rt, At, qt, Dt;
8563
8586
  class RoomCalls extends RoomPeer {
8564
8587
  constructor(u) {
8565
8588
  super(u);
@@ -8569,7 +8592,7 @@ class RoomCalls extends RoomPeer {
8569
8592
  * 广播给房间其他人
8570
8593
  * 只有当自己建立了发射轨道 并且 加入房间后才进行广播
8571
8594
  */
8572
- at(this, Vt, async (u) => {
8595
+ st(this, Yt, async (u) => {
8573
8596
  const { roomId: E } = this.options;
8574
8597
  if (!E) return;
8575
8598
  const { id: _, tracks: k = [] } = await this.getCaller();
@@ -8580,7 +8603,7 @@ class RoomCalls extends RoomPeer {
8580
8603
  /**
8581
8604
  * 更新自己通话状态
8582
8605
  */
8583
- at(this, It, async (u) => new Promise(async (E, _) => {
8606
+ st(this, Rt, async (u) => new Promise(async (E, _) => {
8584
8607
  const { roomId: k, userId: e } = this.options, n = { roomId: k, user: { id: e, callAction: u } };
8585
8608
  await this.cwsIns.sendMessage({ event: "updateCall", data: n }).then(async (O) => {
8586
8609
  const { code: $ = 0 } = O;
@@ -8591,7 +8614,7 @@ class RoomCalls extends RoomPeer {
8591
8614
  /**
8592
8615
  * 创建连接
8593
8616
  */
8594
- at(this, Nt, () => new Promise(async (u, E) => {
8617
+ st(this, At, () => new Promise(async (u, E) => {
8595
8618
  try {
8596
8619
  if (["connecting", "connected"].includes(this.cwsIns.state)) return u(!0);
8597
8620
  this.taskQueue.setCondition("createWs", !1), this.cwsIns.clearEvents(), this.initPeer();
@@ -8618,7 +8641,7 @@ class RoomCalls extends RoomPeer {
8618
8641
  /**
8619
8642
  * 创建cf会话
8620
8643
  */
8621
- at(this, At, () => {
8644
+ st(this, qt, () => {
8622
8645
  if (!["connecting", "connected"].includes(this.roomState))
8623
8646
  return this.setRoomState("connecting"), new Promise((u) => {
8624
8647
  const E = async () => {
@@ -8654,12 +8677,12 @@ class RoomCalls extends RoomPeer {
8654
8677
  * @example quickvo.earlyConnect(['microphoneCamera_audio', 'microphoneCamera_video'])
8655
8678
  */
8656
8679
  Z(this, "earlyConnect", (u = []) => {
8657
- this.isEarly = !0, Q(this, Nt).call(this), Q(this, At).call(this), u.length === 0 && (u = ["microphoneCamera_audio", "microphoneCamera_video"]), Q(this, qt).call(this, u);
8680
+ this.isEarly = !0, J(this, At).call(this), J(this, qt).call(this), u.length === 0 && (u = ["microphoneCamera_audio", "microphoneCamera_video"]), J(this, Dt).call(this, u);
8658
8681
  });
8659
8682
  /**
8660
8683
  * 创建媒体轨道
8661
8684
  */
8662
- at(this, qt, async (u) => new Promise((E) => {
8685
+ st(this, Dt, async (u) => new Promise((E) => {
8663
8686
  const _ = async () => {
8664
8687
  try {
8665
8688
  this.taskQueue.setCondition("createTrack", !1);
@@ -8676,8 +8699,8 @@ class RoomCalls extends RoomPeer {
8676
8699
  const { remoteSdp: D } = N;
8677
8700
  await this.setRemoteDescription({ type: "answer", sdp: D }), this.taskQueue.setCondition("createTrack", !0), E(!0);
8678
8701
  });
8679
- } catch {
8680
- await this.removeSenders(u), this.taskQueue.setCondition("createTrack", !0), E(!0);
8702
+ } catch (k) {
8703
+ console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: createTrack is error.", k), await this.removeSenders(u), this.taskQueue.setCondition("createTrack", !0), E(!0);
8681
8704
  }
8682
8705
  };
8683
8706
  this.taskQueue.addTask(_, ["createWs", "createSession", "ice", "subscribe", "createTrack", "closeTrack"], { describe: "createTrack" });
@@ -8693,21 +8716,23 @@ class RoomCalls extends RoomPeer {
8693
8716
  Z(this, "setLocalStream", (u, E) => new Promise(async (_, k) => {
8694
8717
  try {
8695
8718
  typeof u == "string" && (u = [u]);
8696
- const { userId: e } = this.options;
8719
+ const { userId: e = "" } = this.options;
8697
8720
  for (const O of u)
8698
8721
  if (this.setLocalStreamActiveMap.set(O, E), E === !1) {
8699
8722
  this.removeUserMediaStreamContext(e, O);
8700
8723
  continue;
8701
8724
  }
8702
- if (u.includes("microphoneCamera_audio") && u.includes("microphoneCamera_video") && await this.initLocalStream("microphoneCamera"), u.includes("microphoneCamera_audio") && await this.initLocalStream("microphoneCamera_audio"), u.includes("microphoneCamera_video") && await this.initLocalStream("microphoneCamera_video"), u.includes("screenSharing_audio") && u.includes("screenSharing_video") && await this.initLocalStream("screenSharing"), u.includes("screenSharing_audio") && !u.includes("screenSharing_video") && await this.initLocalStream("screenSharing_audio"), u.includes("screenSharing_video") && !u.includes("screenSharing_audio") && await this.initLocalStream("screenSharing_video"), u.includes("screenSharing_audio")) {
8703
- const $ = this.getUserStream(e, "screenSharing_audio").getTracks();
8704
- for (const N of $)
8705
- N.onended = () => this.stopPublish(["screenSharing_audio"]);
8706
- }
8707
- if (u.includes("screenSharing_video")) {
8708
- const $ = this.getUserStream(e, "screenSharing_video").getTracks();
8709
- for (const N of $)
8710
- N.onended = () => this.stopPublish(["screenSharing_video"]);
8725
+ if (E) {
8726
+ if (u.includes("microphoneCamera_audio") && u.includes("microphoneCamera_video") && await this.initLocalStream("microphoneCamera"), u.includes("microphoneCamera_audio") && await this.initLocalStream("microphoneCamera_audio"), u.includes("microphoneCamera_video") && await this.initLocalStream("microphoneCamera_video"), u.includes("screenSharing_audio") && u.includes("screenSharing_video") && await this.initLocalStream("screenSharing"), u.includes("screenSharing_audio") && !u.includes("screenSharing_video") && await this.initLocalStream("screenSharing_audio"), u.includes("screenSharing_video") && !u.includes("screenSharing_audio") && await this.initLocalStream("screenSharing_video"), u.includes("screenSharing_audio")) {
8727
+ const $ = this.getUserStream(e, "screenSharing_audio").getTracks();
8728
+ for (const N of $)
8729
+ N.onended = () => this.stopPublish(["screenSharing_audio"]);
8730
+ }
8731
+ if (u.includes("screenSharing_video")) {
8732
+ const $ = this.getUserStream(e, "screenSharing_video").getTracks();
8733
+ for (const N of $)
8734
+ N.onended = () => this.stopPublish(["screenSharing_video"]);
8735
+ }
8711
8736
  }
8712
8737
  const n = this.getUserStreams(e);
8713
8738
  _(n);
@@ -8755,7 +8780,7 @@ class RoomCalls extends RoomPeer {
8755
8780
  * @example quickvo.joinRoom({ userId: '', roomId: '', sdkToken: '', callType: '1' , newPublishAutoSubscribe: true })
8756
8781
  * @returns Promise<boolean>
8757
8782
  */
8758
- Z(this, "joinRoom", async (u) => (this.setOptions(u), await Q(this, Nt).call(this), new Promise((E, _) => {
8783
+ Z(this, "joinRoom", async (u) => (this.setOptions(u), await J(this, At).call(this), new Promise((E, _) => {
8759
8784
  this.clearUsers();
8760
8785
  let k = "";
8761
8786
  const e = async () => {
@@ -8772,9 +8797,9 @@ class RoomCalls extends RoomPeer {
8772
8797
  }).then(async (D) => {
8773
8798
  const { code: q = 0, desc: P = "服务器繁忙", data: j } = D;
8774
8799
  if (q !== 200) return _(P);
8775
- const { roomId: V = "", roomUsers: J = [] } = j;
8800
+ const { roomId: V = "", roomUsers: Q = [] } = j;
8776
8801
  if (V !== O) return _("加入的房间不匹配");
8777
- this.isInRoom = !0, Q(this, At).call(this), await this.updateUsers(J), e();
8802
+ this.isInRoom = !0, J(this, qt).call(this), await this.updateUsers(Q), e();
8778
8803
  });
8779
8804
  } catch (O) {
8780
8805
  this.taskQueue.setCondition("joinRoom", !0), this.reportLogs("join_room_error", O.message || O), _(`加入房间失败: ${O.message || O || "服务器繁忙"}`);
@@ -8790,9 +8815,7 @@ class RoomCalls extends RoomPeer {
8790
8815
  Z(this, "quitRoom", () => new Promise(async (u) => {
8791
8816
  const { roomId: E, userId: _ } = this.options, k = { roomId: E, user: { id: _ } };
8792
8817
  try {
8793
- this.isInRoom = !1, this.stopPublish().then(() => {
8794
- this.stopSubscribe(), this.stopGetPeerStats(), this.clearUsers(), this.clearUserStreams(), this.cwsIns.clearEvents(), this.setRoomState("ready");
8795
- });
8818
+ this.isInRoom = !1, this.clearLocalStream(), this.stopSubscribe(), this.stopGetPeerStats(), this.clearUsers(), this.clearUserStreams(), this.cwsIns.clearEvents(), this.setRoomState("ready");
8796
8819
  } catch (e) {
8797
8820
  this.reportLogs("quit_room_error", e.message || e);
8798
8821
  }
@@ -8806,9 +8829,7 @@ class RoomCalls extends RoomPeer {
8806
8829
  Z(this, "quitRoomEx", () => new Promise(async (u) => {
8807
8830
  const { roomId: E, userId: _ } = this.options, k = { roomId: E, user: { id: _ } };
8808
8831
  try {
8809
- this.isInRoom = !1, this.stopPublish().then(() => {
8810
- this.stopSubscribe(), this.stopGetPeerStats(), this.clearUsers(), this.clearUserStreams();
8811
- });
8832
+ this.isInRoom = !1, this.clearLocalStream(), this.stopSubscribe(), this.stopGetPeerStats(), this.clearUsers(), this.clearUserStreams();
8812
8833
  } catch (e) {
8813
8834
  this.reportLogs("quit_room_error", e.message || e);
8814
8835
  }
@@ -8843,7 +8864,6 @@ class RoomCalls extends RoomPeer {
8843
8864
  const k = async () => {
8844
8865
  try {
8845
8866
  const e = await this.getCaller();
8846
- await this.replaceSenderStream(u, !1);
8847
8867
  try {
8848
8868
  await this.setLocalStream(u, !0);
8849
8869
  } catch {
@@ -8852,11 +8872,11 @@ class RoomCalls extends RoomPeer {
8852
8872
  for (const q of u)
8853
8873
  this.getUserStream(e.id, q).getTracks().length === 0 && n.push(q);
8854
8874
  const O = u.filter((q) => !n.includes(q) || ["microphoneCamera_audio", "microphoneCamera_video"].includes(q));
8855
- await Q(this, qt).call(this, O);
8875
+ await J(this, Dt).call(this, O);
8856
8876
  const $ = await this.getSenderTracks(O), N = [...e.tracks, ...$];
8857
8877
  await this.updateUsertracks(e.id, N, !0);
8858
8878
  const D = await this.getCallAction(N);
8859
- await Q(this, It).call(this, D), Q(this, Vt).call(this, u), await this.replaceSenderStream(u, !0), n.length !== 0 && await this.inactiveTracks(n, !1);
8879
+ await J(this, Rt).call(this, D), J(this, Yt).call(this, u), await this.replaceSenderStream(O, !0), n.length !== 0 && await this.inactiveTracks(n, !1);
8860
8880
  {
8861
8881
  await this.emitNotifyUpdateUsers();
8862
8882
  const q = await this.getCaller();
@@ -8889,7 +8909,7 @@ class RoomCalls extends RoomPeer {
8889
8909
  await this.replaceSenderStream(u, !1), await this.closeUserTracks(e.id, n, !0), await this.removeSenders(u);
8890
8910
  {
8891
8911
  const $ = await this.getCallAction(e.tracks);
8892
- await Q(this, It).call(this, $);
8912
+ await J(this, Rt).call(this, $);
8893
8913
  }
8894
8914
  await this.createOffer(), await this.cwsIns.sendMessage({
8895
8915
  event: "closeTrack",
@@ -8920,7 +8940,7 @@ class RoomCalls extends RoomPeer {
8920
8940
  for (const q of n) {
8921
8941
  const { isSelf: P, tracks: j = [] } = q;
8922
8942
  if (!P) {
8923
- const V = j.filter(({ trackName: J, mid: z = "" }) => z !== "" && (u.includes(J) || u.length === 0));
8943
+ const V = j.filter(({ trackName: Q, mid: z = "" }) => z !== "" && (u.includes(Q) || u.length === 0));
8924
8944
  V.length !== 0 && O.push({ ...q, tracks: V });
8925
8945
  }
8926
8946
  }
@@ -8931,8 +8951,8 @@ class RoomCalls extends RoomPeer {
8931
8951
  if (O.length === 0) return $();
8932
8952
  const N = [];
8933
8953
  for (const q of O) {
8934
- const { id: P, tracks: j } = q, V = ft(j, ["type", "trackName"]), J = { id: P, tracks: V };
8935
- N.push(J);
8954
+ const { id: P, tracks: j } = q, V = ft(j, ["type", "trackName"]), Q = { id: P, tracks: V };
8955
+ N.push(Q);
8936
8956
  }
8937
8957
  const D = async () => {
8938
8958
  this.options.debug && console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", `------->quickvo: surplus subscribe count is ${E}`), await this.cwsIns.sendMessage({
@@ -8945,10 +8965,10 @@ class RoomCalls extends RoomPeer {
8945
8965
  return await new Promise((Y) => setTimeout(() => Y(!0), 300)), E = E - 1, D();
8946
8966
  throw this.options.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: subscribe is error. count 0", { trackNames: u }), new Error(V);
8947
8967
  }
8948
- const { remoteSdp: J, users: z = [] } = j;
8968
+ const { remoteSdp: Q, users: z = [] } = j;
8949
8969
  this.onSubscribeUserTracks(z).then(async () => {
8950
8970
  await this.renegotiate(), $();
8951
- }), await this.setRemoteDescription({ type: "offer", sdp: J });
8971
+ }), await this.setRemoteDescription({ type: "offer", sdp: Q });
8952
8972
  });
8953
8973
  };
8954
8974
  await D();
@@ -8982,9 +9002,9 @@ class RoomCalls extends RoomPeer {
8982
9002
  for (const $ of e) {
8983
9003
  const { tracks: N = [] } = $;
8984
9004
  for (const D of N) {
8985
- const { type: q, mid: P, trackName: j, mediaType: V, msid: J } = D;
8986
- if (!(!V || !J) && (u.length === 0 || u.includes(j))) {
8987
- const z = { type: q, mid: P, trackName: J };
9005
+ const { type: q, mid: P, trackName: j, mediaType: V, msid: Q } = D;
9006
+ if (!(!V || !Q) && (u.length === 0 || u.includes(j))) {
9007
+ const z = { type: q, mid: P, trackName: Q };
8988
9008
  n.push(z), await this.closeUserTracks($.id, [D]);
8989
9009
  }
8990
9010
  }
@@ -9016,7 +9036,6 @@ class RoomCalls extends RoomPeer {
9016
9036
  const k = await this.getCaller();
9017
9037
  if (!k) return;
9018
9038
  const { tracks: e = [] } = k, n = [...e];
9019
- await this.replaceSenderStream(u, !0);
9020
9039
  for (let $ of n) {
9021
9040
  const { mediaType: N } = $;
9022
9041
  if (N && u.includes(N)) {
@@ -9027,7 +9046,7 @@ class RoomCalls extends RoomPeer {
9027
9046
  }
9028
9047
  }
9029
9048
  const O = await this.getCallAction(n);
9030
- await Q(this, It).call(this, O), await this.emitNotifyUpdateUsers(), _(!0);
9049
+ await J(this, Rt).call(this, O), await this.emitNotifyUpdateUsers(), _(!0);
9031
9050
  }));
9032
9051
  /**
9033
9052
  * 远端调试
@@ -9042,21 +9061,21 @@ class RoomCalls extends RoomPeer {
9042
9061
  }));
9043
9062
  }
9044
9063
  }
9045
- Vt = new WeakMap(), It = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), qt = new WeakMap();
9064
+ Yt = new WeakMap(), Rt = new WeakMap(), At = new WeakMap(), qt = new WeakMap(), Dt = new WeakMap();
9046
9065
  class Room extends RoomCalls {
9047
9066
  constructor(I) {
9048
9067
  super(I);
9049
9068
  }
9050
9069
  }
9051
- var gt, Yt, Xt, te, ee;
9070
+ var $t, Xt, te, ee, ie;
9052
9071
  class QuickVO extends Room {
9053
9072
  constructor(u) {
9054
9073
  super(u);
9055
- at(this, gt, /* @__PURE__ */ new Map());
9074
+ st(this, $t, /* @__PURE__ */ new Map());
9056
9075
  /**
9057
9076
  * 添加内部监听事件
9058
9077
  */
9059
- at(this, Yt, () => {
9078
+ st(this, Xt, () => {
9060
9079
  {
9061
9080
  const u = async (E) => {
9062
9081
  const { qualities: _ = [] } = E.data, [k] = _;
@@ -9137,12 +9156,12 @@ class QuickVO extends Room {
9137
9156
  /**
9138
9157
  * cwsIns 发送消息前
9139
9158
  */
9140
- at(this, Xt, () => {
9159
+ st(this, te, () => {
9141
9160
  });
9142
9161
  /**
9143
9162
  * 重连成功
9144
9163
  */
9145
- at(this, te, () => {
9164
+ st(this, ee, () => {
9146
9165
  this.cwsIns.onReconnectSuccess = async () => {
9147
9166
  await this.syncRoomInfo();
9148
9167
  };
@@ -9150,7 +9169,7 @@ class QuickVO extends Room {
9150
9169
  /**
9151
9170
  * 重连停止
9152
9171
  */
9153
- at(this, ee, async () => {
9172
+ st(this, ie, async () => {
9154
9173
  });
9155
9174
  /**
9156
9175
  * 添加 FrameRequestCallback
@@ -9159,13 +9178,13 @@ class QuickVO extends Room {
9159
9178
  */
9160
9179
  Z(this, "addRequestAnimationFrame", async (u, E) => {
9161
9180
  {
9162
- const k = Q(this, gt).get(u);
9181
+ const k = J(this, $t).get(u);
9163
9182
  k && cancelAnimationFrame(k);
9164
9183
  }
9165
9184
  const _ = (k = Date.now()) => {
9166
9185
  E(k);
9167
9186
  const e = requestAnimationFrame(_);
9168
- Q(this, gt).set(u, e);
9187
+ J(this, $t).set(u, e);
9169
9188
  };
9170
9189
  _();
9171
9190
  });
@@ -9174,10 +9193,10 @@ class QuickVO extends Room {
9174
9193
  * @param keys string[] = []
9175
9194
  */
9176
9195
  Z(this, "clearRequestAnimationFrame", async (u = []) => {
9177
- u.length === 0 && (u = [...Q(this, gt).keys()]);
9196
+ u.length === 0 && (u = [...J(this, $t).keys()]);
9178
9197
  const E = [];
9179
9198
  for (const _ of u) {
9180
- const k = Q(this, gt).get(_);
9199
+ const k = J(this, $t).get(_);
9181
9200
  k && (cancelAnimationFrame(k), E.push(k));
9182
9201
  }
9183
9202
  return E;
@@ -9189,10 +9208,10 @@ class QuickVO extends Room {
9189
9208
  Z(this, "destroy", async () => {
9190
9209
  this.options.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->quickvo: 销毁SDK"), this.stopGetPeerStats(), this.clearUsers(), this.clearUserStreams(), this.cwsIns.clearEvents(), this.cwsIns.emitNotify("onDestroy", { code: 200, data: {}, desc: "sdk is destroy." }), await this.cwsIns.close();
9191
9210
  });
9192
- Q(this, Xt).call(this), Q(this, te).call(this), Q(this, ee).call(this), Q(this, Yt).call(this);
9211
+ J(this, te).call(this), J(this, ee).call(this), J(this, ie).call(this), J(this, Xt).call(this);
9193
9212
  }
9194
9213
  }
9195
- gt = new WeakMap(), Yt = new WeakMap(), Xt = new WeakMap(), te = new WeakMap(), ee = new WeakMap();
9214
+ $t = new WeakMap(), Xt = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ie = new WeakMap();
9196
9215
  export {
9197
9216
  QuickVO,
9198
9217
  ignoreEvent