@sawport/peers-caller 1.0.0-alpha.6 → 1.0.0-alpha.8
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/core/PeersCaller.d.ts.map +1 -1
- package/dist/peers-caller.es.js +541 -541
- package/dist/peers-caller.es.js.map +1 -1
- package/dist/peers-caller.umd.js +7 -7
- package/dist/peers-caller.umd.js.map +1 -1
- package/dist/tester/App.d.ts.map +1 -1
- package/dist/tester/components/ConfigPanel.d.ts +1 -0
- package/dist/tester/components/ConfigPanel.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/config-validation.d.ts +25 -0
- package/dist/utils/config-validation.d.ts.map +1 -0
- package/dist/utils/recording-api.d.ts +20 -0
- package/dist/utils/recording-api.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/peers-caller.es.js
CHANGED
|
@@ -183,33 +183,33 @@ function oa(r, e, t) {
|
|
|
183
183
|
return (e + t) * 3 / 4 - t;
|
|
184
184
|
}
|
|
185
185
|
function aa(r) {
|
|
186
|
-
var e, t = Eo(r), s = t[0],
|
|
187
|
-
for (c = 0; c <
|
|
186
|
+
var e, t = Eo(r), s = t[0], f = t[1], l = new ra(oa(r, s, f)), g = 0, u = f > 0 ? s - 4 : s, c;
|
|
187
|
+
for (c = 0; c < u; c += 4)
|
|
188
188
|
e = je[r.charCodeAt(c)] << 18 | je[r.charCodeAt(c + 1)] << 12 | je[r.charCodeAt(c + 2)] << 6 | je[r.charCodeAt(c + 3)], l[g++] = e >> 16 & 255, l[g++] = e >> 8 & 255, l[g++] = e & 255;
|
|
189
|
-
return
|
|
189
|
+
return f === 2 && (e = je[r.charCodeAt(c)] << 2 | je[r.charCodeAt(c + 1)] >> 4, l[g++] = e & 255), f === 1 && (e = je[r.charCodeAt(c)] << 10 | je[r.charCodeAt(c + 1)] << 4 | je[r.charCodeAt(c + 2)] >> 2, l[g++] = e >> 8 & 255, l[g++] = e & 255), l;
|
|
190
190
|
}
|
|
191
191
|
function sa(r) {
|
|
192
192
|
return Ye[r >> 18 & 63] + Ye[r >> 12 & 63] + Ye[r >> 6 & 63] + Ye[r & 63];
|
|
193
193
|
}
|
|
194
194
|
function la(r, e, t) {
|
|
195
|
-
for (var s,
|
|
196
|
-
s = (r[l] << 16 & 16711680) + (r[l + 1] << 8 & 65280) + (r[l + 2] & 255),
|
|
197
|
-
return
|
|
195
|
+
for (var s, f = [], l = e; l < t; l += 3)
|
|
196
|
+
s = (r[l] << 16 & 16711680) + (r[l + 1] << 8 & 65280) + (r[l + 2] & 255), f.push(sa(s));
|
|
197
|
+
return f.join("");
|
|
198
198
|
}
|
|
199
199
|
function ca(r) {
|
|
200
|
-
for (var e, t = r.length, s = t % 3,
|
|
201
|
-
|
|
202
|
-
return s === 1 ? (e = r[t - 1],
|
|
200
|
+
for (var e, t = r.length, s = t % 3, f = [], l = 16383, g = 0, u = t - s; g < u; g += l)
|
|
201
|
+
f.push(la(r, g, g + l > u ? u : g + l));
|
|
202
|
+
return s === 1 ? (e = r[t - 1], f.push(
|
|
203
203
|
Ye[e >> 2] + Ye[e << 4 & 63] + "=="
|
|
204
|
-
)) : s === 2 && (e = (r[t - 2] << 8) + r[t - 1],
|
|
204
|
+
)) : s === 2 && (e = (r[t - 2] << 8) + r[t - 1], f.push(
|
|
205
205
|
Ye[e >> 10] + Ye[e >> 4 & 63] + Ye[e << 2 & 63] + "="
|
|
206
|
-
)),
|
|
206
|
+
)), f.join("");
|
|
207
207
|
}
|
|
208
208
|
var En = {};
|
|
209
209
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
210
|
-
En.read = function(r, e, t, s,
|
|
211
|
-
var l, g,
|
|
212
|
-
for (I += B, l = q & (1 << -h) - 1, q >>= -h, h +=
|
|
210
|
+
En.read = function(r, e, t, s, f) {
|
|
211
|
+
var l, g, u = f * 8 - s - 1, c = (1 << u) - 1, v = c >> 1, h = -7, I = t ? f - 1 : 0, B = t ? -1 : 1, q = r[e + I];
|
|
212
|
+
for (I += B, l = q & (1 << -h) - 1, q >>= -h, h += u; h > 0; l = l * 256 + r[e + I], I += B, h -= 8)
|
|
213
213
|
;
|
|
214
214
|
for (g = l & (1 << -h) - 1, l >>= -h, h += s; h > 0; g = g * 256 + r[e + I], I += B, h -= 8)
|
|
215
215
|
;
|
|
@@ -222,11 +222,11 @@ En.read = function(r, e, t, s, u) {
|
|
|
222
222
|
}
|
|
223
223
|
return (q ? -1 : 1) * g * Math.pow(2, l - s);
|
|
224
224
|
};
|
|
225
|
-
En.write = function(r, e, t, s,
|
|
226
|
-
var g,
|
|
227
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (
|
|
225
|
+
En.write = function(r, e, t, s, f, l) {
|
|
226
|
+
var g, u, c, v = l * 8 - f - 1, h = (1 << v) - 1, I = h >> 1, B = f === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, q = s ? 0 : l - 1, b = s ? 1 : -1, N = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
227
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (u = isNaN(e) ? 1 : 0, g = h) : (g = Math.floor(Math.log(e) / Math.LN2), e * (c = Math.pow(2, -g)) < 1 && (g--, c *= 2), g + I >= 1 ? e += B / c : e += B * Math.pow(2, 1 - I), e * c >= 2 && (g++, c /= 2), g + I >= h ? (u = 0, g = h) : g + I >= 1 ? (u = (e * c - 1) * Math.pow(2, f), g = g + I) : (u = e * Math.pow(2, I - 1) * Math.pow(2, f), g = 0)); f >= 8; r[t + q] = u & 255, q += b, u /= 256, f -= 8)
|
|
228
228
|
;
|
|
229
|
-
for (g = g <<
|
|
229
|
+
for (g = g << f | u, v += f; v > 0; r[t + q] = g & 255, q += b, g /= 256, v -= 8)
|
|
230
230
|
;
|
|
231
231
|
r[t + q - b] |= N * 128;
|
|
232
232
|
};
|
|
@@ -239,9 +239,9 @@ En.write = function(r, e, t, s, u, l) {
|
|
|
239
239
|
(function(r) {
|
|
240
240
|
const e = Lt, t = En, s = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
241
241
|
r.Buffer = h, r.SlowBuffer = k, r.INSPECT_MAX_BYTES = 50;
|
|
242
|
-
const
|
|
243
|
-
r.kMaxLength =
|
|
244
|
-
const { Uint8Array: l, ArrayBuffer: g, SharedArrayBuffer:
|
|
242
|
+
const f = 2147483647;
|
|
243
|
+
r.kMaxLength = f;
|
|
244
|
+
const { Uint8Array: l, ArrayBuffer: g, SharedArrayBuffer: u } = globalThis;
|
|
245
245
|
h.TYPED_ARRAY_SUPPORT = c(), !h.TYPED_ARRAY_SUPPORT && typeof console != "undefined" && typeof console.error == "function" && console.error(
|
|
246
246
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
247
247
|
);
|
|
@@ -269,7 +269,7 @@ En.write = function(r, e, t, s, u, l) {
|
|
|
269
269
|
}
|
|
270
270
|
});
|
|
271
271
|
function v(d) {
|
|
272
|
-
if (d >
|
|
272
|
+
if (d > f)
|
|
273
273
|
throw new RangeError('The value "' + d + '" is invalid for option "size"');
|
|
274
274
|
const n = new l(d);
|
|
275
275
|
return Object.setPrototypeOf(n, h.prototype), n;
|
|
@@ -294,7 +294,7 @@ En.write = function(r, e, t, s, u, l) {
|
|
|
294
294
|
throw new TypeError(
|
|
295
295
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof d
|
|
296
296
|
);
|
|
297
|
-
if (Be(d, g) || d && Be(d.buffer, g) || typeof
|
|
297
|
+
if (Be(d, g) || d && Be(d.buffer, g) || typeof u != "undefined" && (Be(d, u) || d && Be(d.buffer, u)))
|
|
298
298
|
return R(d, n, o);
|
|
299
299
|
if (typeof d == "number")
|
|
300
300
|
throw new TypeError(
|
|
@@ -374,8 +374,8 @@ En.write = function(r, e, t, s, u, l) {
|
|
|
374
374
|
return T(d.data);
|
|
375
375
|
}
|
|
376
376
|
function P(d) {
|
|
377
|
-
if (d >=
|
|
378
|
-
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" +
|
|
377
|
+
if (d >= f)
|
|
378
|
+
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + f.toString(16) + " bytes");
|
|
379
379
|
return d | 0;
|
|
380
380
|
}
|
|
381
381
|
function k(d) {
|
|
@@ -1260,21 +1260,21 @@ typeof setImmediate == "undefined" && (globalThis.setImmediate = (r, ...e) => se
|
|
|
1260
1260
|
typeof clearImmediate == "undefined" && (globalThis.clearImmediate = (r) => {
|
|
1261
1261
|
clearTimeout(r);
|
|
1262
1262
|
});
|
|
1263
|
-
var fa = Object.defineProperty, ha = (r, e, t) => e in r ? fa(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, et = (r, e, t) => ha(r, typeof e != "symbol" ? e + "" : e, t), Ve = (r, e, t) => new Promise((s,
|
|
1263
|
+
var fa = Object.defineProperty, ha = (r, e, t) => e in r ? fa(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, et = (r, e, t) => ha(r, typeof e != "symbol" ? e + "" : e, t), Ve = (r, e, t) => new Promise((s, f) => {
|
|
1264
1264
|
var l = (c) => {
|
|
1265
1265
|
try {
|
|
1266
|
-
|
|
1266
|
+
u(t.next(c));
|
|
1267
1267
|
} catch (v) {
|
|
1268
|
-
|
|
1268
|
+
f(v);
|
|
1269
1269
|
}
|
|
1270
1270
|
}, g = (c) => {
|
|
1271
1271
|
try {
|
|
1272
|
-
|
|
1272
|
+
u(t.throw(c));
|
|
1273
1273
|
} catch (v) {
|
|
1274
|
-
|
|
1274
|
+
f(v);
|
|
1275
1275
|
}
|
|
1276
|
-
},
|
|
1277
|
-
|
|
1276
|
+
}, u = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(l, g);
|
|
1277
|
+
u((t = t.apply(r, e)).next());
|
|
1278
1278
|
});
|
|
1279
1279
|
class da {
|
|
1280
1280
|
constructor(e, t, s = "/apis/video-call") {
|
|
@@ -1333,8 +1333,8 @@ class da {
|
|
|
1333
1333
|
var s;
|
|
1334
1334
|
if (!this.isConnected())
|
|
1335
1335
|
throw new Error("Socket not connected");
|
|
1336
|
-
console.log(`[CallSocket] Emitting ${e}:`, t), (s = this.socket) == null || s.emit(e, t, (
|
|
1337
|
-
|
|
1336
|
+
console.log(`[CallSocket] Emitting ${e}:`, t), (s = this.socket) == null || s.emit(e, t, (f) => {
|
|
1337
|
+
f != null && f.error && console.error(`[CallSocket] Error in ${e}:`, f.error);
|
|
1338
1338
|
});
|
|
1339
1339
|
}
|
|
1340
1340
|
/**
|
|
@@ -1344,13 +1344,13 @@ class da {
|
|
|
1344
1344
|
return Ve(this, null, function* () {
|
|
1345
1345
|
if (!this.isConnected())
|
|
1346
1346
|
throw new Error("Socket not connected");
|
|
1347
|
-
return console.log(`[CallSocket] Emitting ${e} with response:`, t), new Promise((
|
|
1347
|
+
return console.log(`[CallSocket] Emitting ${e} with response:`, t), new Promise((f, l) => {
|
|
1348
1348
|
var g;
|
|
1349
|
-
const
|
|
1349
|
+
const u = setTimeout(() => {
|
|
1350
1350
|
l(new Error(`Timeout waiting for response to ${e}`));
|
|
1351
1351
|
}, s);
|
|
1352
1352
|
console.log(`[CallSocket] about to emit: ${e}...`), (g = this.socket) == null || g.emit(e, t, (c) => {
|
|
1353
|
-
clearTimeout(
|
|
1353
|
+
clearTimeout(u), c != null && c.error ? (console.error(`[CallSocket] Error in ${e}:`, c.error), l(new Error(c.error))) : (console.log(`[CallSocket] Response for ${e}:`, c), f(c));
|
|
1354
1354
|
});
|
|
1355
1355
|
});
|
|
1356
1356
|
});
|
|
@@ -1512,21 +1512,21 @@ class da {
|
|
|
1512
1512
|
};
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
|
-
var pa = Object.defineProperty, ga = (r, e, t) => e in r ? pa(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, gt = (r, e, t) => ga(r, typeof e != "symbol" ? e + "" : e, t), Et = (r, e, t) => new Promise((s,
|
|
1515
|
+
var pa = Object.defineProperty, ga = (r, e, t) => e in r ? pa(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, gt = (r, e, t) => ga(r, typeof e != "symbol" ? e + "" : e, t), Et = (r, e, t) => new Promise((s, f) => {
|
|
1516
1516
|
var l = (c) => {
|
|
1517
1517
|
try {
|
|
1518
|
-
|
|
1518
|
+
u(t.next(c));
|
|
1519
1519
|
} catch (v) {
|
|
1520
|
-
|
|
1520
|
+
f(v);
|
|
1521
1521
|
}
|
|
1522
1522
|
}, g = (c) => {
|
|
1523
1523
|
try {
|
|
1524
|
-
|
|
1524
|
+
u(t.throw(c));
|
|
1525
1525
|
} catch (v) {
|
|
1526
|
-
|
|
1526
|
+
f(v);
|
|
1527
1527
|
}
|
|
1528
|
-
},
|
|
1529
|
-
|
|
1528
|
+
}, u = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(l, g);
|
|
1529
|
+
u((t = t.apply(r, e)).next());
|
|
1530
1530
|
});
|
|
1531
1531
|
class ya {
|
|
1532
1532
|
constructor(e = { video: !0, audio: !0 }) {
|
|
@@ -1598,8 +1598,8 @@ class ya {
|
|
|
1598
1598
|
console.warn("[CallMediaStream] No stream available for audio toggle");
|
|
1599
1599
|
return;
|
|
1600
1600
|
}
|
|
1601
|
-
t.getAudioTracks().forEach((
|
|
1602
|
-
|
|
1601
|
+
t.getAudioTracks().forEach((f) => {
|
|
1602
|
+
f.enabled = e;
|
|
1603
1603
|
}), console.log(`[CallMediaStream] Audio ${e ? "enabled" : "disabled"}`);
|
|
1604
1604
|
}
|
|
1605
1605
|
/**
|
|
@@ -1611,8 +1611,8 @@ class ya {
|
|
|
1611
1611
|
console.warn("[CallMediaStream] No stream available for video toggle");
|
|
1612
1612
|
return;
|
|
1613
1613
|
}
|
|
1614
|
-
t.getVideoTracks().forEach((
|
|
1615
|
-
|
|
1614
|
+
t.getVideoTracks().forEach((f) => {
|
|
1615
|
+
f.enabled = e;
|
|
1616
1616
|
}), console.log(`[CallMediaStream] Video ${e ? "enabled" : "disabled"}`);
|
|
1617
1617
|
}
|
|
1618
1618
|
/**
|
|
@@ -1800,14 +1800,14 @@ var Ct = { exports: {} }, qt, Mn;
|
|
|
1800
1800
|
function ma() {
|
|
1801
1801
|
if (Mn) return qt;
|
|
1802
1802
|
Mn = 1;
|
|
1803
|
-
var r = 1e3, e = r * 60, t = e * 60, s = t * 24,
|
|
1803
|
+
var r = 1e3, e = r * 60, t = e * 60, s = t * 24, f = s * 7, l = s * 365.25;
|
|
1804
1804
|
qt = function(h, I) {
|
|
1805
1805
|
I = I || {};
|
|
1806
1806
|
var B = typeof h;
|
|
1807
1807
|
if (B === "string" && h.length > 0)
|
|
1808
1808
|
return g(h);
|
|
1809
1809
|
if (B === "number" && isFinite(h))
|
|
1810
|
-
return I.long ? c(h) :
|
|
1810
|
+
return I.long ? c(h) : u(h);
|
|
1811
1811
|
throw new Error(
|
|
1812
1812
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(h)
|
|
1813
1813
|
);
|
|
@@ -1829,7 +1829,7 @@ function ma() {
|
|
|
1829
1829
|
case "weeks":
|
|
1830
1830
|
case "week":
|
|
1831
1831
|
case "w":
|
|
1832
|
-
return B *
|
|
1832
|
+
return B * f;
|
|
1833
1833
|
case "days":
|
|
1834
1834
|
case "day":
|
|
1835
1835
|
case "d":
|
|
@@ -1864,7 +1864,7 @@ function ma() {
|
|
|
1864
1864
|
}
|
|
1865
1865
|
}
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1867
|
+
function u(h) {
|
|
1868
1868
|
var I = Math.abs(h);
|
|
1869
1869
|
return I >= s ? Math.round(h / s) + "d" : I >= t ? Math.round(h / t) + "h" : I >= e ? Math.round(h / e) + "m" : I >= r ? Math.round(h / r) + "s" : h + "ms";
|
|
1870
1870
|
}
|
|
@@ -1883,7 +1883,7 @@ function va() {
|
|
|
1883
1883
|
if (Ln) return Wt;
|
|
1884
1884
|
Ln = 1;
|
|
1885
1885
|
function r(e) {
|
|
1886
|
-
s.debug = s, s.default = s, s.coerce = v, s.disable =
|
|
1886
|
+
s.debug = s, s.default = s, s.coerce = v, s.disable = u, s.enable = l, s.enabled = c, s.humanize = ma(), s.destroy = h, Object.keys(e).forEach((I) => {
|
|
1887
1887
|
s[I] = e[I];
|
|
1888
1888
|
}), s.names = [], s.skips = [], s.formatters = {};
|
|
1889
1889
|
function t(I) {
|
|
@@ -1913,7 +1913,7 @@ function va() {
|
|
|
1913
1913
|
return C;
|
|
1914
1914
|
}), s.formatArgs.call(R, m), (R.log || s.log).apply(R, m);
|
|
1915
1915
|
}
|
|
1916
|
-
return T.namespace = I, T.useColors = s.useColors(), T.color = s.selectColor(I), T.extend =
|
|
1916
|
+
return T.namespace = I, T.useColors = s.useColors(), T.color = s.selectColor(I), T.extend = f, T.destroy = s.destroy, Object.defineProperty(T, "enabled", {
|
|
1917
1917
|
enumerable: !0,
|
|
1918
1918
|
configurable: !1,
|
|
1919
1919
|
get: () => q !== null ? q : (b !== s.namespaces && (b = s.namespaces, N = s.enabled(I)), N),
|
|
@@ -1922,7 +1922,7 @@ function va() {
|
|
|
1922
1922
|
}
|
|
1923
1923
|
}), typeof s.init == "function" && s.init(T), T;
|
|
1924
1924
|
}
|
|
1925
|
-
function
|
|
1925
|
+
function f(I, B) {
|
|
1926
1926
|
const q = s(this.namespace + (typeof B == "undefined" ? ":" : B) + I);
|
|
1927
1927
|
return q.log = this.log, q;
|
|
1928
1928
|
}
|
|
@@ -1945,7 +1945,7 @@ function va() {
|
|
|
1945
1945
|
b++;
|
|
1946
1946
|
return b === B.length;
|
|
1947
1947
|
}
|
|
1948
|
-
function
|
|
1948
|
+
function u() {
|
|
1949
1949
|
const I = [
|
|
1950
1950
|
...s.names,
|
|
1951
1951
|
...s.skips.map((B) => "-" + B)
|
|
@@ -1974,7 +1974,7 @@ function va() {
|
|
|
1974
1974
|
var Nn;
|
|
1975
1975
|
function wa() {
|
|
1976
1976
|
return Nn || (Nn = 1, function(r, e) {
|
|
1977
|
-
e.formatArgs = s, e.save =
|
|
1977
|
+
e.formatArgs = s, e.save = f, e.load = l, e.useColors = t, e.storage = g(), e.destroy = /* @__PURE__ */ (() => {
|
|
1978
1978
|
let c = !1;
|
|
1979
1979
|
return () => {
|
|
1980
1980
|
c || (c = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
|
|
@@ -2081,7 +2081,7 @@ function wa() {
|
|
|
2081
2081
|
}
|
|
2082
2082
|
e.log = console.debug || console.log || (() => {
|
|
2083
2083
|
});
|
|
2084
|
-
function
|
|
2084
|
+
function f(c) {
|
|
2085
2085
|
try {
|
|
2086
2086
|
c ? e.storage.setItem("debug", c) : e.storage.removeItem("debug");
|
|
2087
2087
|
} catch (v) {
|
|
@@ -2102,8 +2102,8 @@ function wa() {
|
|
|
2102
2102
|
}
|
|
2103
2103
|
}
|
|
2104
2104
|
r.exports = va()(e);
|
|
2105
|
-
const { formatters:
|
|
2106
|
-
|
|
2105
|
+
const { formatters: u } = r.exports;
|
|
2106
|
+
u.j = function(c) {
|
|
2107
2107
|
try {
|
|
2108
2108
|
return JSON.stringify(c);
|
|
2109
2109
|
} catch (v) {
|
|
@@ -2130,9 +2130,9 @@ function mt() {
|
|
|
2130
2130
|
Object.defineProperties(r, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } });
|
|
2131
2131
|
var e = {}, t = {};
|
|
2132
2132
|
t.byteLength = h, t.toByteArray = B, t.fromByteArray = N;
|
|
2133
|
-
for (var s = [],
|
|
2134
|
-
s[
|
|
2135
|
-
|
|
2133
|
+
for (var s = [], f = [], l = typeof Uint8Array != "undefined" ? Uint8Array : Array, g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", u = 0, c = g.length; u < c; ++u)
|
|
2134
|
+
s[u] = g[u], f[g.charCodeAt(u)] = u;
|
|
2135
|
+
f[45] = 62, f[95] = 63;
|
|
2136
2136
|
function v(R) {
|
|
2137
2137
|
var A = R.length;
|
|
2138
2138
|
if (A % 4 > 0)
|
|
@@ -2152,8 +2152,8 @@ function mt() {
|
|
|
2152
2152
|
function B(R) {
|
|
2153
2153
|
var A, P = v(R), k = P[0], S = P[1], C = new l(I(R, k, S)), M = 0, W = S > 0 ? k - 4 : k, X;
|
|
2154
2154
|
for (X = 0; X < W; X += 4)
|
|
2155
|
-
A =
|
|
2156
|
-
return S === 2 && (A =
|
|
2155
|
+
A = f[R.charCodeAt(X)] << 18 | f[R.charCodeAt(X + 1)] << 12 | f[R.charCodeAt(X + 2)] << 6 | f[R.charCodeAt(X + 3)], C[M++] = A >> 16 & 255, C[M++] = A >> 8 & 255, C[M++] = A & 255;
|
|
2156
|
+
return S === 2 && (A = f[R.charCodeAt(X)] << 2 | f[R.charCodeAt(X + 1)] >> 4, C[M++] = A & 255), S === 1 && (A = f[R.charCodeAt(X)] << 10 | f[R.charCodeAt(X + 1)] << 4 | f[R.charCodeAt(X + 2)] >> 2, C[M++] = A >> 8 & 255, C[M++] = A & 255), C;
|
|
2157
2157
|
}
|
|
2158
2158
|
function q(R) {
|
|
2159
2159
|
return s[R >> 18 & 63] + s[R >> 12 & 63] + s[R >> 6 & 63] + s[R & 63];
|
|
@@ -3151,23 +3151,23 @@ var Un;
|
|
|
3151
3151
|
function Co() {
|
|
3152
3152
|
return Un || (Un = 1, function(r, e) {
|
|
3153
3153
|
var t = mt(), s = t.Buffer;
|
|
3154
|
-
function
|
|
3154
|
+
function f(g, u) {
|
|
3155
3155
|
for (var c in g)
|
|
3156
|
-
|
|
3156
|
+
u[c] = g[c];
|
|
3157
3157
|
}
|
|
3158
|
-
s.from && s.alloc && s.allocUnsafe && s.allocUnsafeSlow ? r.exports = t : (
|
|
3159
|
-
function l(g,
|
|
3160
|
-
return s(g,
|
|
3158
|
+
s.from && s.alloc && s.allocUnsafe && s.allocUnsafeSlow ? r.exports = t : (f(t, e), e.Buffer = l);
|
|
3159
|
+
function l(g, u, c) {
|
|
3160
|
+
return s(g, u, c);
|
|
3161
3161
|
}
|
|
3162
|
-
l.prototype = Object.create(s.prototype),
|
|
3162
|
+
l.prototype = Object.create(s.prototype), f(s, l), l.from = function(g, u, c) {
|
|
3163
3163
|
if (typeof g == "number")
|
|
3164
3164
|
throw new TypeError("Argument must not be a number");
|
|
3165
|
-
return s(g,
|
|
3166
|
-
}, l.alloc = function(g,
|
|
3165
|
+
return s(g, u, c);
|
|
3166
|
+
}, l.alloc = function(g, u, c) {
|
|
3167
3167
|
if (typeof g != "number")
|
|
3168
3168
|
throw new TypeError("Argument must be a number");
|
|
3169
3169
|
var v = s(g);
|
|
3170
|
-
return
|
|
3170
|
+
return u !== void 0 ? typeof c == "string" ? v.fill(u, c) : v.fill(u) : v.fill(0), v;
|
|
3171
3171
|
}, l.allocUnsafe = function(g) {
|
|
3172
3172
|
if (typeof g != "number")
|
|
3173
3173
|
throw new TypeError("Argument must be a number");
|
|
@@ -3188,19 +3188,19 @@ function Sa() {
|
|
|
3188
3188
|
throw new Error(`Secure random number generation is not supported by this browser.
|
|
3189
3189
|
Use Chrome, Firefox or Internet Explorer 11`);
|
|
3190
3190
|
}
|
|
3191
|
-
var s = Co().Buffer,
|
|
3192
|
-
|
|
3193
|
-
function l(g,
|
|
3191
|
+
var s = Co().Buffer, f = globalThis.crypto || globalThis.msCrypto;
|
|
3192
|
+
f && f.getRandomValues ? Rt.exports = l : Rt.exports = t;
|
|
3193
|
+
function l(g, u) {
|
|
3194
3194
|
if (g > e) throw new RangeError("requested too many random bytes");
|
|
3195
3195
|
var c = s.allocUnsafe(g);
|
|
3196
3196
|
if (g > 0)
|
|
3197
3197
|
if (g > r)
|
|
3198
3198
|
for (var v = 0; v < g; v += r)
|
|
3199
|
-
|
|
3199
|
+
f.getRandomValues(c.slice(v, v + r));
|
|
3200
3200
|
else
|
|
3201
|
-
|
|
3202
|
-
return typeof
|
|
3203
|
-
|
|
3201
|
+
f.getRandomValues(c);
|
|
3202
|
+
return typeof u == "function" ? oe.nextTick(function() {
|
|
3203
|
+
u(null, c);
|
|
3204
3204
|
}) : c;
|
|
3205
3205
|
}
|
|
3206
3206
|
return Rt.exports;
|
|
@@ -3220,7 +3220,7 @@ function Rn() {
|
|
|
3220
3220
|
function s(P) {
|
|
3221
3221
|
console && console.warn && console.warn(P);
|
|
3222
3222
|
}
|
|
3223
|
-
var
|
|
3223
|
+
var f = Number.isNaN || function(k) {
|
|
3224
3224
|
return k !== k;
|
|
3225
3225
|
};
|
|
3226
3226
|
function l() {
|
|
@@ -3228,7 +3228,7 @@ function Rn() {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
At.exports = l, At.exports.once = m, l.EventEmitter = l, l.prototype._events = void 0, l.prototype._eventsCount = 0, l.prototype._maxListeners = void 0;
|
|
3230
3230
|
var g = 10;
|
|
3231
|
-
function
|
|
3231
|
+
function u(P) {
|
|
3232
3232
|
if (typeof P != "function")
|
|
3233
3233
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof P);
|
|
3234
3234
|
}
|
|
@@ -3238,14 +3238,14 @@ function Rn() {
|
|
|
3238
3238
|
return g;
|
|
3239
3239
|
},
|
|
3240
3240
|
set: function(P) {
|
|
3241
|
-
if (typeof P != "number" || P < 0 ||
|
|
3241
|
+
if (typeof P != "number" || P < 0 || f(P))
|
|
3242
3242
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + P + ".");
|
|
3243
3243
|
g = P;
|
|
3244
3244
|
}
|
|
3245
3245
|
}), l.init = function() {
|
|
3246
3246
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
3247
3247
|
}, l.prototype.setMaxListeners = function(k) {
|
|
3248
|
-
if (typeof k != "number" || k < 0 ||
|
|
3248
|
+
if (typeof k != "number" || k < 0 || f(k))
|
|
3249
3249
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + k + ".");
|
|
3250
3250
|
return this._maxListeners = k, this;
|
|
3251
3251
|
};
|
|
@@ -3280,7 +3280,7 @@ function Rn() {
|
|
|
3280
3280
|
};
|
|
3281
3281
|
function v(P, k, S, C) {
|
|
3282
3282
|
var M, W, X;
|
|
3283
|
-
if (
|
|
3283
|
+
if (u(S), W = P._events, W === void 0 ? (W = P._events = /* @__PURE__ */ Object.create(null), P._eventsCount = 0) : (W.newListener !== void 0 && (P.emit(
|
|
3284
3284
|
"newListener",
|
|
3285
3285
|
k,
|
|
3286
3286
|
S.listener ? S.listener : S
|
|
@@ -3307,12 +3307,12 @@ function Rn() {
|
|
|
3307
3307
|
return M.listener = S, C.wrapFn = M, M;
|
|
3308
3308
|
}
|
|
3309
3309
|
l.prototype.once = function(k, S) {
|
|
3310
|
-
return
|
|
3310
|
+
return u(S), this.on(k, I(this, k, S)), this;
|
|
3311
3311
|
}, l.prototype.prependOnceListener = function(k, S) {
|
|
3312
|
-
return
|
|
3312
|
+
return u(S), this.prependListener(k, I(this, k, S)), this;
|
|
3313
3313
|
}, l.prototype.removeListener = function(k, S) {
|
|
3314
3314
|
var C, M, W, X, te;
|
|
3315
|
-
if (
|
|
3315
|
+
if (u(S), M = this._events, M === void 0)
|
|
3316
3316
|
return this;
|
|
3317
3317
|
if (C = M[k], C === void 0)
|
|
3318
3318
|
return this;
|
|
@@ -3431,8 +3431,8 @@ function Po() {
|
|
|
3431
3431
|
var e = {}, t = Symbol("test"), s = Object(t);
|
|
3432
3432
|
if (typeof t == "string" || Object.prototype.toString.call(t) !== "[object Symbol]" || Object.prototype.toString.call(s) !== "[object Symbol]")
|
|
3433
3433
|
return !1;
|
|
3434
|
-
var
|
|
3435
|
-
e[t] =
|
|
3434
|
+
var f = 42;
|
|
3435
|
+
e[t] = f;
|
|
3436
3436
|
for (var l in e)
|
|
3437
3437
|
return !1;
|
|
3438
3438
|
if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
|
|
@@ -3441,11 +3441,11 @@ function Po() {
|
|
|
3441
3441
|
if (g.length !== 1 || g[0] !== t || !Object.prototype.propertyIsEnumerable.call(e, t))
|
|
3442
3442
|
return !1;
|
|
3443
3443
|
if (typeof Object.getOwnPropertyDescriptor == "function") {
|
|
3444
|
-
var
|
|
3444
|
+
var u = (
|
|
3445
3445
|
/** @type {PropertyDescriptor} */
|
|
3446
3446
|
Object.getOwnPropertyDescriptor(e, t)
|
|
3447
3447
|
);
|
|
3448
|
-
if (
|
|
3448
|
+
if (u.value !== f || u.enumerable !== !0)
|
|
3449
3449
|
return !1;
|
|
3450
3450
|
}
|
|
3451
3451
|
return !0;
|
|
@@ -3585,7 +3585,7 @@ var wr, hi;
|
|
|
3585
3585
|
function Fa() {
|
|
3586
3586
|
if (hi) return wr;
|
|
3587
3587
|
hi = 1;
|
|
3588
|
-
var r = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, t = Math.max, s = "[object Function]",
|
|
3588
|
+
var r = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, t = Math.max, s = "[object Function]", f = function(c, v) {
|
|
3589
3589
|
for (var h = [], I = 0; I < c.length; I += 1)
|
|
3590
3590
|
h[I] = c[I];
|
|
3591
3591
|
for (var B = 0; B < v.length; B += 1)
|
|
@@ -3595,9 +3595,9 @@ function Fa() {
|
|
|
3595
3595
|
for (var h = [], I = v, B = 0; I < c.length; I += 1, B += 1)
|
|
3596
3596
|
h[B] = c[I];
|
|
3597
3597
|
return h;
|
|
3598
|
-
}, g = function(
|
|
3599
|
-
for (var v = "", h = 0; h <
|
|
3600
|
-
v +=
|
|
3598
|
+
}, g = function(u, c) {
|
|
3599
|
+
for (var v = "", h = 0; h < u.length; h += 1)
|
|
3600
|
+
v += u[h], h + 1 < u.length && (v += c);
|
|
3601
3601
|
return v;
|
|
3602
3602
|
};
|
|
3603
3603
|
return wr = function(c) {
|
|
@@ -3608,13 +3608,13 @@ function Fa() {
|
|
|
3608
3608
|
if (this instanceof I) {
|
|
3609
3609
|
var m = v.apply(
|
|
3610
3610
|
this,
|
|
3611
|
-
|
|
3611
|
+
f(h, arguments)
|
|
3612
3612
|
);
|
|
3613
3613
|
return Object(m) === m ? m : this;
|
|
3614
3614
|
}
|
|
3615
3615
|
return v.apply(
|
|
3616
3616
|
c,
|
|
3617
|
-
|
|
3617
|
+
f(h, arguments)
|
|
3618
3618
|
);
|
|
3619
3619
|
}, q = t(0, v.length - h.length), b = [], N = 0; N < q; N++)
|
|
3620
3620
|
b[N] = "$" + N;
|
|
@@ -3679,11 +3679,11 @@ function $a() {
|
|
|
3679
3679
|
Object.prototype,
|
|
3680
3680
|
/** @type {keyof typeof Object.prototype} */
|
|
3681
3681
|
"__proto__"
|
|
3682
|
-
),
|
|
3682
|
+
), f = Object, l = f.getPrototypeOf;
|
|
3683
3683
|
return Pr = s && typeof s.get == "function" ? r([s.get]) : typeof l == "function" ? (
|
|
3684
3684
|
/** @type {import('./get')} */
|
|
3685
|
-
function(
|
|
3686
|
-
return l(
|
|
3685
|
+
function(u) {
|
|
3686
|
+
return l(u == null ? u : f(u));
|
|
3687
3687
|
}
|
|
3688
3688
|
) : !1, Pr;
|
|
3689
3689
|
}
|
|
@@ -3692,14 +3692,14 @@ function In() {
|
|
|
3692
3692
|
if (bi) return Tr;
|
|
3693
3693
|
bi = 1;
|
|
3694
3694
|
var r = Io(), e = Bo(), t = /* @__PURE__ */ $a();
|
|
3695
|
-
return Tr = r ? function(
|
|
3696
|
-
return r(
|
|
3697
|
-
} : e ? function(
|
|
3698
|
-
if (!
|
|
3695
|
+
return Tr = r ? function(f) {
|
|
3696
|
+
return r(f);
|
|
3697
|
+
} : e ? function(f) {
|
|
3698
|
+
if (!f || typeof f != "object" && typeof f != "function")
|
|
3699
3699
|
throw new TypeError("getProto: not an object");
|
|
3700
|
-
return e(
|
|
3701
|
-
} : t ? function(
|
|
3702
|
-
return t(
|
|
3700
|
+
return e(f);
|
|
3701
|
+
} : t ? function(f) {
|
|
3702
|
+
return t(f);
|
|
3703
3703
|
} : null, Tr;
|
|
3704
3704
|
}
|
|
3705
3705
|
var Ar, Si;
|
|
@@ -3713,13 +3713,13 @@ var Ir, _i;
|
|
|
3713
3713
|
function Mo() {
|
|
3714
3714
|
if (_i) return Ir;
|
|
3715
3715
|
_i = 1;
|
|
3716
|
-
var r, e = /* @__PURE__ */ To(), t = /* @__PURE__ */ _a(), s = /* @__PURE__ */ Ea(),
|
|
3716
|
+
var r, e = /* @__PURE__ */ To(), t = /* @__PURE__ */ _a(), s = /* @__PURE__ */ Ea(), f = /* @__PURE__ */ Ca(), l = /* @__PURE__ */ Ra(), g = /* @__PURE__ */ Ao(), u = /* @__PURE__ */ vt(), c = /* @__PURE__ */ Pa(), v = /* @__PURE__ */ Ta(), h = /* @__PURE__ */ Aa(), I = /* @__PURE__ */ Ia(), B = /* @__PURE__ */ Ba(), q = /* @__PURE__ */ ka(), b = /* @__PURE__ */ Oa(), N = /* @__PURE__ */ La(), T = Function, m = function(Z) {
|
|
3717
3717
|
try {
|
|
3718
3718
|
return T('"use strict"; return (' + Z + ").constructor;")();
|
|
3719
3719
|
} catch (Q) {
|
|
3720
3720
|
}
|
|
3721
3721
|
}, R = /* @__PURE__ */ ft(), A = /* @__PURE__ */ Dt(), P = function() {
|
|
3722
|
-
throw new
|
|
3722
|
+
throw new u();
|
|
3723
3723
|
}, k = R ? function() {
|
|
3724
3724
|
try {
|
|
3725
3725
|
return arguments.callee, P;
|
|
@@ -3779,7 +3779,7 @@ function Mo() {
|
|
|
3779
3779
|
"%parseInt%": parseInt,
|
|
3780
3780
|
"%Promise%": typeof Promise == "undefined" ? r : Promise,
|
|
3781
3781
|
"%Proxy%": typeof Proxy == "undefined" ? r : Proxy,
|
|
3782
|
-
"%RangeError%":
|
|
3782
|
+
"%RangeError%": f,
|
|
3783
3783
|
"%ReferenceError%": l,
|
|
3784
3784
|
"%Reflect%": typeof Reflect == "undefined" ? r : Reflect,
|
|
3785
3785
|
"%RegExp%": RegExp,
|
|
@@ -3792,7 +3792,7 @@ function Mo() {
|
|
|
3792
3792
|
"%SyntaxError%": g,
|
|
3793
3793
|
"%ThrowTypeError%": k,
|
|
3794
3794
|
"%TypedArray%": ue,
|
|
3795
|
-
"%TypeError%":
|
|
3795
|
+
"%TypeError%": u,
|
|
3796
3796
|
"%Uint8Array%": typeof Uint8Array == "undefined" ? r : Uint8Array,
|
|
3797
3797
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray == "undefined" ? r : Uint8ClampedArray,
|
|
3798
3798
|
"%Uint16Array%": typeof Uint16Array == "undefined" ? r : Uint16Array,
|
|
@@ -3905,7 +3905,7 @@ function Mo() {
|
|
|
3905
3905
|
if (we(Te, w) && (z = Te[w], w = "%" + z[0] + "%"), we(fe, w)) {
|
|
3906
3906
|
var ee = fe[w];
|
|
3907
3907
|
if (ee === U && (ee = Ee(w)), typeof ee == "undefined" && !y)
|
|
3908
|
-
throw new
|
|
3908
|
+
throw new u("intrinsic " + Q + " exists, but is not available. Please file an issue!");
|
|
3909
3909
|
return {
|
|
3910
3910
|
alias: z,
|
|
3911
3911
|
name: w,
|
|
@@ -3916,9 +3916,9 @@ function Mo() {
|
|
|
3916
3916
|
};
|
|
3917
3917
|
return Ir = function(Q, y) {
|
|
3918
3918
|
if (typeof Q != "string" || Q.length === 0)
|
|
3919
|
-
throw new
|
|
3919
|
+
throw new u("intrinsic name must be a non-empty string");
|
|
3920
3920
|
if (arguments.length > 1 && typeof y != "boolean")
|
|
3921
|
-
throw new
|
|
3921
|
+
throw new u('"allowMissing" argument must be a boolean');
|
|
3922
3922
|
if (J(/^%?[^%]*%?$/, Q) === null)
|
|
3923
3923
|
throw new g("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3924
3924
|
var w = F(Q), z = w.length > 0 ? w[0] : "", ee = G("%" + z + "%", y), se = ee.name, ne = ee.value, ae = !1, Oe = ee.alias;
|
|
@@ -3932,7 +3932,7 @@ function Mo() {
|
|
|
3932
3932
|
else if (ne != null) {
|
|
3933
3933
|
if (!(Le in ne)) {
|
|
3934
3934
|
if (!y)
|
|
3935
|
-
throw new
|
|
3935
|
+
throw new u("base intrinsic for " + Q + " exists, but the property is not available.");
|
|
3936
3936
|
return;
|
|
3937
3937
|
}
|
|
3938
3938
|
if (R && H + 1 >= w.length) {
|
|
@@ -3951,12 +3951,12 @@ function bt() {
|
|
|
3951
3951
|
if (Ei) return Br;
|
|
3952
3952
|
Ei = 1;
|
|
3953
3953
|
var r = /* @__PURE__ */ Mo(), e = An(), t = e([r("%String.prototype.indexOf%")]);
|
|
3954
|
-
return Br = function(
|
|
3954
|
+
return Br = function(f, l) {
|
|
3955
3955
|
var g = (
|
|
3956
3956
|
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
3957
|
-
r(
|
|
3957
|
+
r(f, !!l)
|
|
3958
3958
|
);
|
|
3959
|
-
return typeof g == "function" && t(
|
|
3959
|
+
return typeof g == "function" && t(f, ".prototype.") > -1 ? e(
|
|
3960
3960
|
/** @type {const} */
|
|
3961
3961
|
[g]
|
|
3962
3962
|
) : g;
|
|
@@ -3966,28 +3966,28 @@ var kr, Ci;
|
|
|
3966
3966
|
function ja() {
|
|
3967
3967
|
if (Ci) return kr;
|
|
3968
3968
|
Ci = 1;
|
|
3969
|
-
var r = Nt()(), e = /* @__PURE__ */ bt(), t = e("Object.prototype.toString"), s = function(
|
|
3970
|
-
return r &&
|
|
3971
|
-
},
|
|
3972
|
-
return s(
|
|
3969
|
+
var r = Nt()(), e = /* @__PURE__ */ bt(), t = e("Object.prototype.toString"), s = function(u) {
|
|
3970
|
+
return r && u && typeof u == "object" && Symbol.toStringTag in u ? !1 : t(u) === "[object Arguments]";
|
|
3971
|
+
}, f = function(u) {
|
|
3972
|
+
return s(u) ? !0 : u !== null && typeof u == "object" && "length" in u && typeof u.length == "number" && u.length >= 0 && t(u) !== "[object Array]" && "callee" in u && t(u.callee) === "[object Function]";
|
|
3973
3973
|
}, l = function() {
|
|
3974
3974
|
return s(arguments);
|
|
3975
3975
|
}();
|
|
3976
|
-
return s.isLegacyArguments =
|
|
3976
|
+
return s.isLegacyArguments = f, kr = l ? s : f, kr;
|
|
3977
3977
|
}
|
|
3978
3978
|
var Or, Ri;
|
|
3979
3979
|
function xa() {
|
|
3980
3980
|
if (Ri) return Or;
|
|
3981
3981
|
Ri = 1;
|
|
3982
|
-
var r = /* @__PURE__ */ bt(), e = Nt()(), t = /* @__PURE__ */ Oo(), s = /* @__PURE__ */ ft(),
|
|
3982
|
+
var r = /* @__PURE__ */ bt(), e = Nt()(), t = /* @__PURE__ */ Oo(), s = /* @__PURE__ */ ft(), f;
|
|
3983
3983
|
if (e) {
|
|
3984
|
-
var l = r("RegExp.prototype.exec"), g = {},
|
|
3984
|
+
var l = r("RegExp.prototype.exec"), g = {}, u = function() {
|
|
3985
3985
|
throw g;
|
|
3986
3986
|
}, c = {
|
|
3987
|
-
toString:
|
|
3988
|
-
valueOf:
|
|
3987
|
+
toString: u,
|
|
3988
|
+
valueOf: u
|
|
3989
3989
|
};
|
|
3990
|
-
typeof Symbol.toPrimitive == "symbol" && (c[Symbol.toPrimitive] =
|
|
3990
|
+
typeof Symbol.toPrimitive == "symbol" && (c[Symbol.toPrimitive] = u), f = function(B) {
|
|
3991
3991
|
if (!B || typeof B != "object")
|
|
3992
3992
|
return !1;
|
|
3993
3993
|
var q = (
|
|
@@ -4013,11 +4013,11 @@ function xa() {
|
|
|
4013
4013
|
};
|
|
4014
4014
|
} else {
|
|
4015
4015
|
var v = r("Object.prototype.toString"), h = "[object RegExp]";
|
|
4016
|
-
|
|
4016
|
+
f = function(B) {
|
|
4017
4017
|
return !B || typeof B != "object" && typeof B != "function" ? !1 : v(B) === h;
|
|
4018
4018
|
};
|
|
4019
4019
|
}
|
|
4020
|
-
return Or =
|
|
4020
|
+
return Or = f, Or;
|
|
4021
4021
|
}
|
|
4022
4022
|
var Mr, Pi;
|
|
4023
4023
|
function qa() {
|
|
@@ -4027,8 +4027,8 @@ function qa() {
|
|
|
4027
4027
|
return Mr = function(l) {
|
|
4028
4028
|
if (!e(l))
|
|
4029
4029
|
throw new s("`regex` must be a RegExp");
|
|
4030
|
-
return function(
|
|
4031
|
-
return t(l,
|
|
4030
|
+
return function(u) {
|
|
4031
|
+
return t(l, u) !== null;
|
|
4032
4032
|
};
|
|
4033
4033
|
}, Mr;
|
|
4034
4034
|
}
|
|
@@ -4036,7 +4036,7 @@ var Lr, Ti;
|
|
|
4036
4036
|
function Wa() {
|
|
4037
4037
|
if (Ti) return Lr;
|
|
4038
4038
|
Ti = 1;
|
|
4039
|
-
var r = /* @__PURE__ */ bt(), e = /* @__PURE__ */ qa(), t = e(/^\s*(?:function)?\*/), s = Nt()(),
|
|
4039
|
+
var r = /* @__PURE__ */ bt(), e = /* @__PURE__ */ qa(), t = e(/^\s*(?:function)?\*/), s = Nt()(), f = In(), l = r("Object.prototype.toString"), g = r("Function.prototype.toString"), u = function() {
|
|
4040
4040
|
if (!s)
|
|
4041
4041
|
return !1;
|
|
4042
4042
|
try {
|
|
@@ -4053,16 +4053,16 @@ function Wa() {
|
|
|
4053
4053
|
var I = l(h);
|
|
4054
4054
|
return I === "[object GeneratorFunction]";
|
|
4055
4055
|
}
|
|
4056
|
-
if (!
|
|
4056
|
+
if (!f)
|
|
4057
4057
|
return !1;
|
|
4058
4058
|
if (typeof c == "undefined") {
|
|
4059
|
-
var B =
|
|
4059
|
+
var B = u();
|
|
4060
4060
|
c = B ? (
|
|
4061
4061
|
/** @type {GeneratorFunctionConstructor} */
|
|
4062
|
-
|
|
4062
|
+
f(B)
|
|
4063
4063
|
) : !1;
|
|
4064
4064
|
}
|
|
4065
|
-
return
|
|
4065
|
+
return f(h) === c;
|
|
4066
4066
|
}, Lr;
|
|
4067
4067
|
}
|
|
4068
4068
|
var Nr, Ai;
|
|
@@ -4084,10 +4084,10 @@ function Ga() {
|
|
|
4084
4084
|
}
|
|
4085
4085
|
else
|
|
4086
4086
|
e = null;
|
|
4087
|
-
var
|
|
4087
|
+
var f = /^\s*class\b/, l = function(A) {
|
|
4088
4088
|
try {
|
|
4089
4089
|
var P = r.call(A);
|
|
4090
|
-
return
|
|
4090
|
+
return f.test(P);
|
|
4091
4091
|
} catch (k) {
|
|
4092
4092
|
return !1;
|
|
4093
4093
|
}
|
|
@@ -4097,15 +4097,15 @@ function Ga() {
|
|
|
4097
4097
|
} catch (P) {
|
|
4098
4098
|
return !1;
|
|
4099
4099
|
}
|
|
4100
|
-
},
|
|
4100
|
+
}, u = Object.prototype.toString, c = "[object Object]", v = "[object Function]", h = "[object GeneratorFunction]", I = "[object HTMLAllCollection]", B = "[object HTML document.all class]", q = "[object HTMLCollection]", b = typeof Symbol == "function" && !!Symbol.toStringTag, N = !(0 in [,]), T = function() {
|
|
4101
4101
|
return !1;
|
|
4102
4102
|
};
|
|
4103
4103
|
if (typeof document == "object") {
|
|
4104
4104
|
var m = document.all;
|
|
4105
|
-
|
|
4105
|
+
u.call(m) === u.call(document.all) && (T = function(A) {
|
|
4106
4106
|
if ((N || !A) && (typeof A == "undefined" || typeof A == "object"))
|
|
4107
4107
|
try {
|
|
4108
|
-
var P =
|
|
4108
|
+
var P = u.call(A);
|
|
4109
4109
|
return (P === I || P === B || P === q || P === c) && A("") == null;
|
|
4110
4110
|
} catch (k) {
|
|
4111
4111
|
}
|
|
@@ -4133,7 +4133,7 @@ function Ga() {
|
|
|
4133
4133
|
return g(A);
|
|
4134
4134
|
if (l(A))
|
|
4135
4135
|
return !1;
|
|
4136
|
-
var P =
|
|
4136
|
+
var P = u.call(A);
|
|
4137
4137
|
return P !== v && P !== h && !/^\[object HTML/.test(P) ? !1 : g(A);
|
|
4138
4138
|
}, Nr;
|
|
4139
4139
|
}
|
|
@@ -4144,21 +4144,21 @@ function Va() {
|
|
|
4144
4144
|
var r = Ga(), e = Object.prototype.toString, t = Object.prototype.hasOwnProperty, s = function(c, v, h) {
|
|
4145
4145
|
for (var I = 0, B = c.length; I < B; I++)
|
|
4146
4146
|
t.call(c, I) && (h == null ? v(c[I], I, c) : v.call(h, c[I], I, c));
|
|
4147
|
-
},
|
|
4147
|
+
}, f = function(c, v, h) {
|
|
4148
4148
|
for (var I = 0, B = c.length; I < B; I++)
|
|
4149
4149
|
h == null ? v(c.charAt(I), I, c) : v.call(h, c.charAt(I), I, c);
|
|
4150
4150
|
}, l = function(c, v, h) {
|
|
4151
4151
|
for (var I in c)
|
|
4152
4152
|
t.call(c, I) && (h == null ? v(c[I], I, c) : v.call(h, c[I], I, c));
|
|
4153
4153
|
};
|
|
4154
|
-
function g(
|
|
4155
|
-
return e.call(
|
|
4154
|
+
function g(u) {
|
|
4155
|
+
return e.call(u) === "[object Array]";
|
|
4156
4156
|
}
|
|
4157
4157
|
return Dr = function(c, v, h) {
|
|
4158
4158
|
if (!r(v))
|
|
4159
4159
|
throw new TypeError("iterator must be a function");
|
|
4160
4160
|
var I;
|
|
4161
|
-
arguments.length >= 3 && (I = h), g(c) ? s(c, v, I) : typeof c == "string" ?
|
|
4161
|
+
arguments.length >= 3 && (I = h), g(c) ? s(c, v, I) : typeof c == "string" ? f(c, v, I) : l(c, v, I);
|
|
4162
4162
|
}, Dr;
|
|
4163
4163
|
}
|
|
4164
4164
|
var Fr, Bi;
|
|
@@ -4184,8 +4184,8 @@ function Ha() {
|
|
|
4184
4184
|
ki = 1;
|
|
4185
4185
|
var r = /* @__PURE__ */ za(), e = globalThis;
|
|
4186
4186
|
return Ur = function() {
|
|
4187
|
-
for (var s = [],
|
|
4188
|
-
typeof e[r[
|
|
4187
|
+
for (var s = [], f = 0; f < r.length; f++)
|
|
4188
|
+
typeof e[r[f]] == "function" && (s[s.length] = r[f]);
|
|
4189
4189
|
return s;
|
|
4190
4190
|
}, Ur;
|
|
4191
4191
|
}
|
|
@@ -4194,7 +4194,7 @@ function Ja() {
|
|
|
4194
4194
|
if (Oi) return jr;
|
|
4195
4195
|
Oi = 1;
|
|
4196
4196
|
var r = /* @__PURE__ */ Dt(), e = /* @__PURE__ */ Ao(), t = /* @__PURE__ */ vt(), s = /* @__PURE__ */ ft();
|
|
4197
|
-
return jr = function(l, g,
|
|
4197
|
+
return jr = function(l, g, u) {
|
|
4198
4198
|
if (!l || typeof l != "object" && typeof l != "function")
|
|
4199
4199
|
throw new t("`obj` must be an object or a function`");
|
|
4200
4200
|
if (typeof g != "string" && typeof g != "symbol")
|
|
@@ -4212,11 +4212,11 @@ function Ja() {
|
|
|
4212
4212
|
r(l, g, {
|
|
4213
4213
|
configurable: h === null && B ? B.configurable : !h,
|
|
4214
4214
|
enumerable: c === null && B ? B.enumerable : !c,
|
|
4215
|
-
value:
|
|
4215
|
+
value: u,
|
|
4216
4216
|
writable: v === null && B ? B.writable : !v
|
|
4217
4217
|
});
|
|
4218
4218
|
else if (I || !c && !v && !h)
|
|
4219
|
-
l[g] =
|
|
4219
|
+
l[g] = u;
|
|
4220
4220
|
else
|
|
4221
4221
|
throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
4222
4222
|
}, jr;
|
|
@@ -4242,30 +4242,30 @@ var qr, Li;
|
|
|
4242
4242
|
function Ka() {
|
|
4243
4243
|
if (Li) return qr;
|
|
4244
4244
|
Li = 1;
|
|
4245
|
-
var r = /* @__PURE__ */ Mo(), e = /* @__PURE__ */ Ja(), t = /* @__PURE__ */ Ya()(), s = /* @__PURE__ */ ft(),
|
|
4246
|
-
return qr = function(
|
|
4247
|
-
if (typeof
|
|
4248
|
-
throw new
|
|
4245
|
+
var r = /* @__PURE__ */ Mo(), e = /* @__PURE__ */ Ja(), t = /* @__PURE__ */ Ya()(), s = /* @__PURE__ */ ft(), f = /* @__PURE__ */ vt(), l = r("%Math.floor%");
|
|
4246
|
+
return qr = function(u, c) {
|
|
4247
|
+
if (typeof u != "function")
|
|
4248
|
+
throw new f("`fn` is not a function");
|
|
4249
4249
|
if (typeof c != "number" || c < 0 || c > 4294967295 || l(c) !== c)
|
|
4250
|
-
throw new
|
|
4250
|
+
throw new f("`length` must be a positive 32-bit integer");
|
|
4251
4251
|
var v = arguments.length > 2 && !!arguments[2], h = !0, I = !0;
|
|
4252
|
-
if ("length" in
|
|
4253
|
-
var B = s(
|
|
4252
|
+
if ("length" in u && s) {
|
|
4253
|
+
var B = s(u, "length");
|
|
4254
4254
|
B && !B.configurable && (h = !1), B && !B.writable && (I = !1);
|
|
4255
4255
|
}
|
|
4256
4256
|
return (h || I || !v) && (t ? e(
|
|
4257
4257
|
/** @type {Parameters<define>[0]} */
|
|
4258
|
-
|
|
4258
|
+
u,
|
|
4259
4259
|
"length",
|
|
4260
4260
|
c,
|
|
4261
4261
|
!0,
|
|
4262
4262
|
!0
|
|
4263
4263
|
) : e(
|
|
4264
4264
|
/** @type {Parameters<define>[0]} */
|
|
4265
|
-
|
|
4265
|
+
u,
|
|
4266
4266
|
"length",
|
|
4267
4267
|
c
|
|
4268
|
-
)),
|
|
4268
|
+
)), u;
|
|
4269
4269
|
}, qr;
|
|
4270
4270
|
}
|
|
4271
4271
|
var Wr, Ni;
|
|
@@ -4280,34 +4280,34 @@ function Xa() {
|
|
|
4280
4280
|
var Di;
|
|
4281
4281
|
function Za() {
|
|
4282
4282
|
return Di || (Di = 1, function(r) {
|
|
4283
|
-
var e = /* @__PURE__ */ Ka(), t = /* @__PURE__ */ Dt(), s = An(),
|
|
4283
|
+
var e = /* @__PURE__ */ Ka(), t = /* @__PURE__ */ Dt(), s = An(), f = Xa();
|
|
4284
4284
|
r.exports = function(g) {
|
|
4285
|
-
var
|
|
4285
|
+
var u = s(arguments), c = g.length - (arguments.length - 1);
|
|
4286
4286
|
return e(
|
|
4287
|
-
|
|
4287
|
+
u,
|
|
4288
4288
|
1 + (c > 0 ? c : 0),
|
|
4289
4289
|
!0
|
|
4290
4290
|
);
|
|
4291
|
-
}, t ? t(r.exports, "apply", { value:
|
|
4291
|
+
}, t ? t(r.exports, "apply", { value: f }) : r.exports.apply = f;
|
|
4292
4292
|
}($r)), $r.exports;
|
|
4293
4293
|
}
|
|
4294
4294
|
var Gr, Fi;
|
|
4295
4295
|
function Lo() {
|
|
4296
4296
|
if (Fi) return Gr;
|
|
4297
4297
|
Fi = 1;
|
|
4298
|
-
var r = Va(), e = /* @__PURE__ */ Ha(), t = Za(), s = /* @__PURE__ */ bt(),
|
|
4298
|
+
var r = Va(), e = /* @__PURE__ */ Ha(), t = Za(), s = /* @__PURE__ */ bt(), f = /* @__PURE__ */ ft(), l = In(), g = s("Object.prototype.toString"), u = Nt()(), c = globalThis, v = e(), h = s("String.prototype.slice"), I = s("Array.prototype.indexOf", !0) || function(T, m) {
|
|
4299
4299
|
for (var R = 0; R < T.length; R += 1)
|
|
4300
4300
|
if (T[R] === m)
|
|
4301
4301
|
return R;
|
|
4302
4302
|
return -1;
|
|
4303
4303
|
}, B = { __proto__: null };
|
|
4304
|
-
|
|
4304
|
+
u && f && l ? r(v, function(N) {
|
|
4305
4305
|
var T = new c[N]();
|
|
4306
4306
|
if (Symbol.toStringTag in T && l) {
|
|
4307
|
-
var m = l(T), R =
|
|
4307
|
+
var m = l(T), R = f(m, Symbol.toStringTag);
|
|
4308
4308
|
if (!R && m) {
|
|
4309
4309
|
var A = l(m);
|
|
4310
|
-
R =
|
|
4310
|
+
R = f(A, Symbol.toStringTag);
|
|
4311
4311
|
}
|
|
4312
4312
|
B["$" + N] = t(R.get);
|
|
4313
4313
|
}
|
|
@@ -4354,11 +4354,11 @@ function Lo() {
|
|
|
4354
4354
|
return Gr = function(T) {
|
|
4355
4355
|
if (!T || typeof T != "object")
|
|
4356
4356
|
return !1;
|
|
4357
|
-
if (!
|
|
4357
|
+
if (!u) {
|
|
4358
4358
|
var m = h(g(T), 8, -1);
|
|
4359
4359
|
return I(v, m) > -1 ? m : m !== "Object" ? !1 : b(T);
|
|
4360
4360
|
}
|
|
4361
|
-
return
|
|
4361
|
+
return f ? q(T) : null;
|
|
4362
4362
|
}, Gr;
|
|
4363
4363
|
}
|
|
4364
4364
|
var Vr, Ui;
|
|
@@ -4373,14 +4373,14 @@ function Qa() {
|
|
|
4373
4373
|
var $i;
|
|
4374
4374
|
function es() {
|
|
4375
4375
|
return $i || ($i = 1, function(r) {
|
|
4376
|
-
var e = /* @__PURE__ */ ja(), t = Wa(), s = /* @__PURE__ */ Lo(),
|
|
4376
|
+
var e = /* @__PURE__ */ ja(), t = Wa(), s = /* @__PURE__ */ Lo(), f = /* @__PURE__ */ Qa();
|
|
4377
4377
|
function l(H) {
|
|
4378
4378
|
return H.call.bind(H);
|
|
4379
4379
|
}
|
|
4380
|
-
var g = typeof BigInt != "undefined",
|
|
4380
|
+
var g = typeof BigInt != "undefined", u = typeof Symbol != "undefined", c = l(Object.prototype.toString), v = l(Number.prototype.valueOf), h = l(String.prototype.valueOf), I = l(Boolean.prototype.valueOf);
|
|
4381
4381
|
if (g)
|
|
4382
4382
|
var B = l(BigInt.prototype.valueOf);
|
|
4383
|
-
if (
|
|
4383
|
+
if (u)
|
|
4384
4384
|
var q = l(Symbol.prototype.valueOf);
|
|
4385
4385
|
function b(H, Me) {
|
|
4386
4386
|
if (typeof H != "object")
|
|
@@ -4391,13 +4391,13 @@ function es() {
|
|
|
4391
4391
|
return !1;
|
|
4392
4392
|
}
|
|
4393
4393
|
}
|
|
4394
|
-
r.isArgumentsObject = e, r.isGeneratorFunction = t, r.isTypedArray =
|
|
4394
|
+
r.isArgumentsObject = e, r.isGeneratorFunction = t, r.isTypedArray = f;
|
|
4395
4395
|
function N(H) {
|
|
4396
4396
|
return typeof Promise != "undefined" && H instanceof Promise || H !== null && typeof H == "object" && typeof H.then == "function" && typeof H.catch == "function";
|
|
4397
4397
|
}
|
|
4398
4398
|
r.isPromise = N;
|
|
4399
4399
|
function T(H) {
|
|
4400
|
-
return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? ArrayBuffer.isView(H) :
|
|
4400
|
+
return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? ArrayBuffer.isView(H) : f(H) || V(H);
|
|
4401
4401
|
}
|
|
4402
4402
|
r.isArrayBufferView = T;
|
|
4403
4403
|
function m(H) {
|
|
@@ -4537,7 +4537,7 @@ function es() {
|
|
|
4537
4537
|
}
|
|
4538
4538
|
r.isBigIntObject = se;
|
|
4539
4539
|
function ne(H) {
|
|
4540
|
-
return
|
|
4540
|
+
return u && b(H, q);
|
|
4541
4541
|
}
|
|
4542
4542
|
r.isSymbolObject = ne;
|
|
4543
4543
|
function ae(H) {
|
|
@@ -4635,14 +4635,14 @@ function No() {
|
|
|
4635
4635
|
}
|
|
4636
4636
|
return re;
|
|
4637
4637
|
};
|
|
4638
|
-
var s = {},
|
|
4638
|
+
var s = {}, f = /^$/;
|
|
4639
4639
|
if (oe.env.NODE_DEBUG) {
|
|
4640
4640
|
var l = oe.env.NODE_DEBUG;
|
|
4641
|
-
l = l.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(),
|
|
4641
|
+
l = l.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), f = new RegExp("^" + l + "$", "i");
|
|
4642
4642
|
}
|
|
4643
4643
|
r.debuglog = function($) {
|
|
4644
4644
|
if ($ = $.toUpperCase(), !s[$])
|
|
4645
|
-
if (
|
|
4645
|
+
if (f.test($)) {
|
|
4646
4646
|
var V = oe.pid;
|
|
4647
4647
|
s[$] = function() {
|
|
4648
4648
|
var J = r.format.apply(r, arguments);
|
|
@@ -4658,7 +4658,7 @@ function No() {
|
|
|
4658
4658
|
seen: [],
|
|
4659
4659
|
stylize: c
|
|
4660
4660
|
};
|
|
4661
|
-
return arguments.length >= 3 && (J.depth = arguments[2]), arguments.length >= 4 && (J.colors = arguments[3]), m(V) ? J.showHidden = V : V && r._extend(J, V), C(J.showHidden) && (J.showHidden = !1), C(J.depth) && (J.depth = 2), C(J.colors) && (J.colors = !1), C(J.customInspect) && (J.customInspect = !0), J.colors && (J.stylize =
|
|
4661
|
+
return arguments.length >= 3 && (J.depth = arguments[2]), arguments.length >= 4 && (J.colors = arguments[3]), m(V) ? J.showHidden = V : V && r._extend(J, V), C(J.showHidden) && (J.showHidden = !1), C(J.depth) && (J.depth = 2), C(J.colors) && (J.colors = !1), C(J.customInspect) && (J.customInspect = !0), J.colors && (J.stylize = u), h(J, $, J.depth);
|
|
4662
4662
|
}
|
|
4663
4663
|
r.inspect = g, g.colors = {
|
|
4664
4664
|
bold: [1, 22],
|
|
@@ -4685,7 +4685,7 @@ function No() {
|
|
|
4685
4685
|
// "name": intentionally not styling
|
|
4686
4686
|
regexp: "red"
|
|
4687
4687
|
};
|
|
4688
|
-
function
|
|
4688
|
+
function u($, V) {
|
|
4689
4689
|
var J = g.styles[V];
|
|
4690
4690
|
return J ? "\x1B[" + g.colors[J][0] + "m" + $ + "\x1B[" + g.colors[J][1] + "m" : $;
|
|
4691
4691
|
}
|
|
@@ -5009,20 +5009,20 @@ function rs() {
|
|
|
5009
5009
|
if (!(b instanceof N))
|
|
5010
5010
|
throw new TypeError("Cannot call a class as a function");
|
|
5011
5011
|
}
|
|
5012
|
-
function
|
|
5012
|
+
function f(b, N) {
|
|
5013
5013
|
for (var T = 0; T < N.length; T++) {
|
|
5014
5014
|
var m = N[T];
|
|
5015
5015
|
m.enumerable = m.enumerable || !1, m.configurable = !0, "value" in m && (m.writable = !0), Object.defineProperty(b, g(m.key), m);
|
|
5016
5016
|
}
|
|
5017
5017
|
}
|
|
5018
5018
|
function l(b, N, T) {
|
|
5019
|
-
return N &&
|
|
5019
|
+
return N && f(b.prototype, N), Object.defineProperty(b, "prototype", { writable: !1 }), b;
|
|
5020
5020
|
}
|
|
5021
5021
|
function g(b) {
|
|
5022
|
-
var N =
|
|
5022
|
+
var N = u(b, "string");
|
|
5023
5023
|
return typeof N == "symbol" ? N : String(N);
|
|
5024
5024
|
}
|
|
5025
|
-
function
|
|
5025
|
+
function u(b, N) {
|
|
5026
5026
|
if (typeof b != "object" || b === null) return b;
|
|
5027
5027
|
var T = b[Symbol.toPrimitive];
|
|
5028
5028
|
if (T !== void 0) {
|
|
@@ -5146,14 +5146,14 @@ var Jr, Gi;
|
|
|
5146
5146
|
function Do() {
|
|
5147
5147
|
if (Gi) return Jr;
|
|
5148
5148
|
Gi = 1;
|
|
5149
|
-
function r(g,
|
|
5149
|
+
function r(g, u) {
|
|
5150
5150
|
var c = this, v = this._readableState && this._readableState.destroyed, h = this._writableState && this._writableState.destroyed;
|
|
5151
|
-
return v || h ? (
|
|
5152
|
-
!
|
|
5151
|
+
return v || h ? (u ? u(g) : g && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, oe.nextTick(f, this, g)) : oe.nextTick(f, this, g)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(g || null, function(I) {
|
|
5152
|
+
!u && I ? c._writableState ? c._writableState.errorEmitted ? oe.nextTick(t, c) : (c._writableState.errorEmitted = !0, oe.nextTick(e, c, I)) : oe.nextTick(e, c, I) : u ? (oe.nextTick(t, c), u(I)) : oe.nextTick(t, c);
|
|
5153
5153
|
}), this);
|
|
5154
5154
|
}
|
|
5155
|
-
function e(g,
|
|
5156
|
-
|
|
5155
|
+
function e(g, u) {
|
|
5156
|
+
f(g, u), t(g);
|
|
5157
5157
|
}
|
|
5158
5158
|
function t(g) {
|
|
5159
5159
|
g._writableState && !g._writableState.emitClose || g._readableState && !g._readableState.emitClose || g.emit("close");
|
|
@@ -5161,12 +5161,12 @@ function Do() {
|
|
|
5161
5161
|
function s() {
|
|
5162
5162
|
this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
|
|
5163
5163
|
}
|
|
5164
|
-
function
|
|
5165
|
-
g.emit("error",
|
|
5164
|
+
function f(g, u) {
|
|
5165
|
+
g.emit("error", u);
|
|
5166
5166
|
}
|
|
5167
|
-
function l(g,
|
|
5167
|
+
function l(g, u) {
|
|
5168
5168
|
var c = g._readableState, v = g._writableState;
|
|
5169
|
-
c && c.autoDestroy || v && v.autoDestroy ? g.destroy(
|
|
5169
|
+
c && c.autoDestroy || v && v.autoDestroy ? g.destroy(u) : g.emit("error", u);
|
|
5170
5170
|
}
|
|
5171
5171
|
return Jr = {
|
|
5172
5172
|
destroy: r,
|
|
@@ -5178,11 +5178,11 @@ var Yr = {}, Vi;
|
|
|
5178
5178
|
function dt() {
|
|
5179
5179
|
if (Vi) return Yr;
|
|
5180
5180
|
Vi = 1;
|
|
5181
|
-
function r(
|
|
5182
|
-
|
|
5181
|
+
function r(u, c) {
|
|
5182
|
+
u.prototype = Object.create(c.prototype), u.prototype.constructor = u, u.__proto__ = c;
|
|
5183
5183
|
}
|
|
5184
5184
|
var e = {};
|
|
5185
|
-
function t(
|
|
5185
|
+
function t(u, c, v) {
|
|
5186
5186
|
v || (v = Error);
|
|
5187
5187
|
function h(B, q, b) {
|
|
5188
5188
|
return typeof c == "string" ? c : c(B, q, b);
|
|
@@ -5194,45 +5194,45 @@ function dt() {
|
|
|
5194
5194
|
}
|
|
5195
5195
|
return q;
|
|
5196
5196
|
}(v);
|
|
5197
|
-
I.prototype.name = v.name, I.prototype.code =
|
|
5197
|
+
I.prototype.name = v.name, I.prototype.code = u, e[u] = I;
|
|
5198
5198
|
}
|
|
5199
|
-
function s(
|
|
5200
|
-
if (Array.isArray(
|
|
5201
|
-
var v =
|
|
5202
|
-
return
|
|
5199
|
+
function s(u, c) {
|
|
5200
|
+
if (Array.isArray(u)) {
|
|
5201
|
+
var v = u.length;
|
|
5202
|
+
return u = u.map(function(h) {
|
|
5203
5203
|
return String(h);
|
|
5204
|
-
}), v > 2 ? "one of ".concat(c, " ").concat(
|
|
5204
|
+
}), v > 2 ? "one of ".concat(c, " ").concat(u.slice(0, v - 1).join(", "), ", or ") + u[v - 1] : v === 2 ? "one of ".concat(c, " ").concat(u[0], " or ").concat(u[1]) : "of ".concat(c, " ").concat(u[0]);
|
|
5205
5205
|
} else
|
|
5206
|
-
return "of ".concat(c, " ").concat(String(
|
|
5206
|
+
return "of ".concat(c, " ").concat(String(u));
|
|
5207
5207
|
}
|
|
5208
|
-
function u
|
|
5209
|
-
return
|
|
5208
|
+
function f(u, c, v) {
|
|
5209
|
+
return u.substr(0, c.length) === c;
|
|
5210
5210
|
}
|
|
5211
|
-
function l(
|
|
5212
|
-
return (v === void 0 || v >
|
|
5211
|
+
function l(u, c, v) {
|
|
5212
|
+
return (v === void 0 || v > u.length) && (v = u.length), u.substring(v - c.length, v) === c;
|
|
5213
5213
|
}
|
|
5214
|
-
function g(
|
|
5215
|
-
return typeof v != "number" && (v = 0), v + c.length >
|
|
5214
|
+
function g(u, c, v) {
|
|
5215
|
+
return typeof v != "number" && (v = 0), v + c.length > u.length ? !1 : u.indexOf(c, v) !== -1;
|
|
5216
5216
|
}
|
|
5217
|
-
return t("ERR_INVALID_OPT_VALUE", function(
|
|
5218
|
-
return 'The value "' + c + '" is invalid for option "' +
|
|
5219
|
-
}, TypeError), t("ERR_INVALID_ARG_TYPE", function(
|
|
5217
|
+
return t("ERR_INVALID_OPT_VALUE", function(u, c) {
|
|
5218
|
+
return 'The value "' + c + '" is invalid for option "' + u + '"';
|
|
5219
|
+
}, TypeError), t("ERR_INVALID_ARG_TYPE", function(u, c, v) {
|
|
5220
5220
|
var h;
|
|
5221
|
-
typeof c == "string" &&
|
|
5221
|
+
typeof c == "string" && f(c, "not ") ? (h = "must not be", c = c.replace(/^not /, "")) : h = "must be";
|
|
5222
5222
|
var I;
|
|
5223
|
-
if (l(
|
|
5224
|
-
I = "The ".concat(
|
|
5223
|
+
if (l(u, " argument"))
|
|
5224
|
+
I = "The ".concat(u, " ").concat(h, " ").concat(s(c, "type"));
|
|
5225
5225
|
else {
|
|
5226
|
-
var B = g(
|
|
5227
|
-
I = 'The "'.concat(
|
|
5226
|
+
var B = g(u, ".") ? "property" : "argument";
|
|
5227
|
+
I = 'The "'.concat(u, '" ').concat(B, " ").concat(h, " ").concat(s(c, "type"));
|
|
5228
5228
|
}
|
|
5229
5229
|
return I += ". Received type ".concat(typeof v), I;
|
|
5230
|
-
}, TypeError), t("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), t("ERR_METHOD_NOT_IMPLEMENTED", function(
|
|
5231
|
-
return "The " +
|
|
5232
|
-
}), t("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), t("ERR_STREAM_DESTROYED", function(
|
|
5233
|
-
return "Cannot call " +
|
|
5234
|
-
}), t("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), t("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), t("ERR_STREAM_WRITE_AFTER_END", "write after end"), t("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), t("ERR_UNKNOWN_ENCODING", function(
|
|
5235
|
-
return "Unknown encoding: " +
|
|
5230
|
+
}, TypeError), t("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), t("ERR_METHOD_NOT_IMPLEMENTED", function(u) {
|
|
5231
|
+
return "The " + u + " method is not implemented";
|
|
5232
|
+
}), t("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), t("ERR_STREAM_DESTROYED", function(u) {
|
|
5233
|
+
return "Cannot call " + u + " after a stream was destroyed";
|
|
5234
|
+
}), t("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), t("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), t("ERR_STREAM_WRITE_AFTER_END", "write after end"), t("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), t("ERR_UNKNOWN_ENCODING", function(u) {
|
|
5235
|
+
return "Unknown encoding: " + u;
|
|
5236
5236
|
}, TypeError), t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), Yr.codes = e, Yr;
|
|
5237
5237
|
}
|
|
5238
5238
|
var Kr, zi;
|
|
@@ -5240,17 +5240,17 @@ function Fo() {
|
|
|
5240
5240
|
if (zi) return Kr;
|
|
5241
5241
|
zi = 1;
|
|
5242
5242
|
var r = dt().codes.ERR_INVALID_OPT_VALUE;
|
|
5243
|
-
function e(s,
|
|
5244
|
-
return s.highWaterMark != null ? s.highWaterMark :
|
|
5243
|
+
function e(s, f, l) {
|
|
5244
|
+
return s.highWaterMark != null ? s.highWaterMark : f ? s[l] : null;
|
|
5245
5245
|
}
|
|
5246
|
-
function t(s,
|
|
5247
|
-
var
|
|
5248
|
-
if (
|
|
5249
|
-
if (!(isFinite(
|
|
5246
|
+
function t(s, f, l, g) {
|
|
5247
|
+
var u = e(f, g, l);
|
|
5248
|
+
if (u != null) {
|
|
5249
|
+
if (!(isFinite(u) && Math.floor(u) === u) || u < 0) {
|
|
5250
5250
|
var c = g ? l : "highWaterMark";
|
|
5251
|
-
throw new r(c,
|
|
5251
|
+
throw new r(c, u);
|
|
5252
5252
|
}
|
|
5253
|
-
return Math.floor(
|
|
5253
|
+
return Math.floor(u);
|
|
5254
5254
|
}
|
|
5255
5255
|
return s.objectMode ? 16 : 16 * 1024;
|
|
5256
5256
|
}
|
|
@@ -5265,12 +5265,12 @@ function ns() {
|
|
|
5265
5265
|
function r(t, s) {
|
|
5266
5266
|
if (e("noDeprecation"))
|
|
5267
5267
|
return t;
|
|
5268
|
-
var
|
|
5268
|
+
var f = !1;
|
|
5269
5269
|
function l() {
|
|
5270
|
-
if (!
|
|
5270
|
+
if (!f) {
|
|
5271
5271
|
if (e("throwDeprecation"))
|
|
5272
5272
|
throw new Error(s);
|
|
5273
|
-
e("traceDeprecation") ? console.trace(s) : console.warn(s),
|
|
5273
|
+
e("traceDeprecation") ? console.trace(s) : console.warn(s), f = !0;
|
|
5274
5274
|
}
|
|
5275
5275
|
return t.apply(this, arguments);
|
|
5276
5276
|
}
|
|
@@ -5279,7 +5279,7 @@ function ns() {
|
|
|
5279
5279
|
function e(t) {
|
|
5280
5280
|
try {
|
|
5281
5281
|
if (!globalThis.localStorage) return !1;
|
|
5282
|
-
} catch (
|
|
5282
|
+
} catch (f) {
|
|
5283
5283
|
return !1;
|
|
5284
5284
|
}
|
|
5285
5285
|
var s = globalThis.localStorage[t];
|
|
@@ -5301,13 +5301,13 @@ function Uo() {
|
|
|
5301
5301
|
M.WritableState = S;
|
|
5302
5302
|
var t = {
|
|
5303
5303
|
deprecate: ns()
|
|
5304
|
-
}, s = Ro(),
|
|
5304
|
+
}, s = Ro(), f = mt().Buffer, l = (typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof self != "undefined" ? self : {}).Uint8Array || function() {
|
|
5305
5305
|
};
|
|
5306
5306
|
function g(D) {
|
|
5307
|
-
return
|
|
5307
|
+
return f.from(D);
|
|
5308
5308
|
}
|
|
5309
|
-
function
|
|
5310
|
-
return
|
|
5309
|
+
function u(D) {
|
|
5310
|
+
return f.isBuffer(D) || D instanceof l;
|
|
5311
5311
|
}
|
|
5312
5312
|
var c = Do(), v = Fo(), h = v.getHighWaterMark, I = dt().codes, B = I.ERR_INVALID_ARG_TYPE, q = I.ERR_METHOD_NOT_IMPLEMENTED, b = I.ERR_MULTIPLE_CALLBACK, N = I.ERR_STREAM_CANNOT_PIPE, T = I.ERR_STREAM_DESTROYED, m = I.ERR_STREAM_NULL_VALUES, R = I.ERR_STREAM_WRITE_AFTER_END, A = I.ERR_UNKNOWN_ENCODING, P = c.errorOrDestroy;
|
|
5313
5313
|
ht()(M, s);
|
|
@@ -5360,8 +5360,8 @@ function Uo() {
|
|
|
5360
5360
|
return G === null ? Q = new m() : typeof G != "string" && !F.objectMode && (Q = new B("chunk", ["string", "Buffer"], G)), Q ? (P(D, Q), oe.nextTick(Z, Q), !1) : !0;
|
|
5361
5361
|
}
|
|
5362
5362
|
M.prototype.write = function(D, F, G) {
|
|
5363
|
-
var Z = this._writableState, Q = !1, y = !Z.objectMode &&
|
|
5364
|
-
return y && !
|
|
5363
|
+
var Z = this._writableState, Q = !1, y = !Z.objectMode && u(D);
|
|
5364
|
+
return y && !f.isBuffer(D) && (D = g(D)), typeof F == "function" && (G = F, F = null), y ? F = "buffer" : F || (F = Z.defaultEncoding), typeof G != "function" && (G = k), Z.ending ? W(this, G) : (y || X(this, Z, D, G)) && (Z.pendingcb++, Q = U(this, Z, y, D, F, G)), Q;
|
|
5365
5365
|
}, M.prototype.cork = function() {
|
|
5366
5366
|
this._writableState.corked++;
|
|
5367
5367
|
}, M.prototype.uncork = function() {
|
|
@@ -5380,7 +5380,7 @@ function Uo() {
|
|
|
5380
5380
|
}
|
|
5381
5381
|
});
|
|
5382
5382
|
function te(D, F, G) {
|
|
5383
|
-
return !D.objectMode && D.decodeStrings !== !1 && typeof F == "string" && (F =
|
|
5383
|
+
return !D.objectMode && D.decodeStrings !== !1 && typeof F == "string" && (F = f.from(F, G)), F;
|
|
5384
5384
|
}
|
|
5385
5385
|
Object.defineProperty(M.prototype, "writableHighWaterMark", {
|
|
5386
5386
|
// making it explicit this property is not enumerable
|
|
@@ -5526,13 +5526,13 @@ function ut() {
|
|
|
5526
5526
|
Qr = g;
|
|
5527
5527
|
var e = $o(), t = Uo();
|
|
5528
5528
|
ht()(g, e);
|
|
5529
|
-
for (var s = r(t.prototype),
|
|
5530
|
-
var l = s[
|
|
5529
|
+
for (var s = r(t.prototype), f = 0; f < s.length; f++) {
|
|
5530
|
+
var l = s[f];
|
|
5531
5531
|
g.prototype[l] || (g.prototype[l] = t.prototype[l]);
|
|
5532
5532
|
}
|
|
5533
5533
|
function g(v) {
|
|
5534
5534
|
if (!(this instanceof g)) return new g(v);
|
|
5535
|
-
e.call(this, v), t.call(this, v), this.allowHalfOpen = !0, v && (v.readable === !1 && (this.readable = !1), v.writable === !1 && (this.writable = !1), v.allowHalfOpen === !1 && (this.allowHalfOpen = !1, this.once("end",
|
|
5535
|
+
e.call(this, v), t.call(this, v), this.allowHalfOpen = !0, v && (v.readable === !1 && (this.readable = !1), v.writable === !1 && (this.writable = !1), v.allowHalfOpen === !1 && (this.allowHalfOpen = !1, this.once("end", u)));
|
|
5536
5536
|
}
|
|
5537
5537
|
Object.defineProperty(g.prototype, "writableHighWaterMark", {
|
|
5538
5538
|
// making it explicit this property is not enumerable
|
|
@@ -5559,7 +5559,7 @@ function ut() {
|
|
|
5559
5559
|
return this._writableState.length;
|
|
5560
5560
|
}
|
|
5561
5561
|
});
|
|
5562
|
-
function
|
|
5562
|
+
function u() {
|
|
5563
5563
|
this._writableState.ended || oe.nextTick(c, this);
|
|
5564
5564
|
}
|
|
5565
5565
|
function c(v) {
|
|
@@ -5629,8 +5629,8 @@ function Xi() {
|
|
|
5629
5629
|
if (typeof R != "string" && (r.isEncoding === e || !e(m))) throw new Error("Unknown encoding: " + m);
|
|
5630
5630
|
return R || m;
|
|
5631
5631
|
}
|
|
5632
|
-
en.StringDecoder =
|
|
5633
|
-
function
|
|
5632
|
+
en.StringDecoder = f;
|
|
5633
|
+
function f(m) {
|
|
5634
5634
|
this.encoding = s(m);
|
|
5635
5635
|
var R;
|
|
5636
5636
|
switch (this.encoding) {
|
|
@@ -5649,7 +5649,7 @@ function Xi() {
|
|
|
5649
5649
|
}
|
|
5650
5650
|
this.lastNeed = 0, this.lastTotal = 0, this.lastChar = r.allocUnsafe(R);
|
|
5651
5651
|
}
|
|
5652
|
-
|
|
5652
|
+
f.prototype.write = function(m) {
|
|
5653
5653
|
if (m.length === 0) return "";
|
|
5654
5654
|
var R, A;
|
|
5655
5655
|
if (this.lastNeed) {
|
|
@@ -5658,7 +5658,7 @@ function Xi() {
|
|
|
5658
5658
|
} else
|
|
5659
5659
|
A = 0;
|
|
5660
5660
|
return A < m.length ? R ? R + this.text(m, A) : this.text(m, A) : R || "";
|
|
5661
|
-
},
|
|
5661
|
+
}, f.prototype.end = h, f.prototype.text = v, f.prototype.fillLast = function(m) {
|
|
5662
5662
|
if (this.lastNeed <= m.length)
|
|
5663
5663
|
return m.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
5664
5664
|
m.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, m.length), this.lastNeed -= m.length;
|
|
@@ -5672,7 +5672,7 @@ function Xi() {
|
|
|
5672
5672
|
var k = l(R[P]);
|
|
5673
5673
|
return k >= 0 ? (k > 0 && (m.lastNeed = k - 1), k) : --P < A || k === -2 ? 0 : (k = l(R[P]), k >= 0 ? (k > 0 && (m.lastNeed = k - 2), k) : --P < A || k === -2 ? 0 : (k = l(R[P]), k >= 0 ? (k > 0 && (k === 2 ? k = 0 : m.lastNeed = k - 3), k) : 0));
|
|
5674
5674
|
}
|
|
5675
|
-
function
|
|
5675
|
+
function u(m, R, A) {
|
|
5676
5676
|
if ((R[0] & 192) !== 128)
|
|
5677
5677
|
return m.lastNeed = 0, "�";
|
|
5678
5678
|
if (m.lastNeed > 1 && R.length > 1) {
|
|
@@ -5683,7 +5683,7 @@ function Xi() {
|
|
|
5683
5683
|
}
|
|
5684
5684
|
}
|
|
5685
5685
|
function c(m) {
|
|
5686
|
-
var R = this.lastTotal - this.lastNeed, A =
|
|
5686
|
+
var R = this.lastTotal - this.lastNeed, A = u(this, m);
|
|
5687
5687
|
if (A !== void 0) return A;
|
|
5688
5688
|
if (this.lastNeed <= m.length)
|
|
5689
5689
|
return m.copy(this.lastChar, R, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
@@ -5746,7 +5746,7 @@ function Bn() {
|
|
|
5746
5746
|
return function() {
|
|
5747
5747
|
if (!g) {
|
|
5748
5748
|
g = !0;
|
|
5749
|
-
for (var
|
|
5749
|
+
for (var u = arguments.length, c = new Array(u), v = 0; v < u; v++)
|
|
5750
5750
|
c[v] = arguments[v];
|
|
5751
5751
|
l.apply(this, c);
|
|
5752
5752
|
}
|
|
@@ -5757,23 +5757,23 @@ function Bn() {
|
|
|
5757
5757
|
function s(l) {
|
|
5758
5758
|
return l.setHeader && typeof l.abort == "function";
|
|
5759
5759
|
}
|
|
5760
|
-
function
|
|
5761
|
-
if (typeof g == "function") return
|
|
5762
|
-
g || (g = {}),
|
|
5760
|
+
function f(l, g, u) {
|
|
5761
|
+
if (typeof g == "function") return f(l, null, g);
|
|
5762
|
+
g || (g = {}), u = e(u || t);
|
|
5763
5763
|
var c = g.readable || g.readable !== !1 && l.readable, v = g.writable || g.writable !== !1 && l.writable, h = function() {
|
|
5764
5764
|
l.writable || B();
|
|
5765
5765
|
}, I = l._writableState && l._writableState.finished, B = function() {
|
|
5766
|
-
v = !1, I = !0, c ||
|
|
5766
|
+
v = !1, I = !0, c || u.call(l);
|
|
5767
5767
|
}, q = l._readableState && l._readableState.endEmitted, b = function() {
|
|
5768
|
-
c = !1, q = !0, v ||
|
|
5768
|
+
c = !1, q = !0, v || u.call(l);
|
|
5769
5769
|
}, N = function(A) {
|
|
5770
|
-
|
|
5770
|
+
u.call(l, A);
|
|
5771
5771
|
}, T = function() {
|
|
5772
5772
|
var A;
|
|
5773
5773
|
if (c && !q)
|
|
5774
|
-
return (!l._readableState || !l._readableState.ended) && (A = new r()),
|
|
5774
|
+
return (!l._readableState || !l._readableState.ended) && (A = new r()), u.call(l, A);
|
|
5775
5775
|
if (v && !I)
|
|
5776
|
-
return (!l._writableState || !l._writableState.ended) && (A = new r()),
|
|
5776
|
+
return (!l._writableState || !l._writableState.ended) && (A = new r()), u.call(l, A);
|
|
5777
5777
|
}, m = function() {
|
|
5778
5778
|
l.req.on("finish", B);
|
|
5779
5779
|
};
|
|
@@ -5781,7 +5781,7 @@ function Bn() {
|
|
|
5781
5781
|
l.removeListener("complete", B), l.removeListener("abort", T), l.removeListener("request", m), l.req && l.req.removeListener("finish", B), l.removeListener("end", h), l.removeListener("close", h), l.removeListener("finish", B), l.removeListener("end", b), l.removeListener("error", N), l.removeListener("close", T);
|
|
5782
5782
|
};
|
|
5783
5783
|
}
|
|
5784
|
-
return tn =
|
|
5784
|
+
return tn = f, tn;
|
|
5785
5785
|
}
|
|
5786
5786
|
var rn, Qi;
|
|
5787
5787
|
function is() {
|
|
@@ -5805,7 +5805,7 @@ function is() {
|
|
|
5805
5805
|
}
|
|
5806
5806
|
return (P === "string" ? String : Number)(A);
|
|
5807
5807
|
}
|
|
5808
|
-
var
|
|
5808
|
+
var f = Bn(), l = Symbol("lastResolve"), g = Symbol("lastReject"), u = Symbol("error"), c = Symbol("ended"), v = Symbol("lastPromise"), h = Symbol("handlePromise"), I = Symbol("stream");
|
|
5809
5809
|
function B(A, P) {
|
|
5810
5810
|
return {
|
|
5811
5811
|
value: A,
|
|
@@ -5839,7 +5839,7 @@ function is() {
|
|
|
5839
5839
|
return this[I];
|
|
5840
5840
|
},
|
|
5841
5841
|
next: function() {
|
|
5842
|
-
var P = this, k = this[
|
|
5842
|
+
var P = this, k = this[u];
|
|
5843
5843
|
if (k !== null)
|
|
5844
5844
|
return Promise.reject(k);
|
|
5845
5845
|
if (this[c])
|
|
@@ -5847,7 +5847,7 @@ function is() {
|
|
|
5847
5847
|
if (this[I].destroyed)
|
|
5848
5848
|
return new Promise(function(W, X) {
|
|
5849
5849
|
oe.nextTick(function() {
|
|
5850
|
-
P[
|
|
5850
|
+
P[u] ? X(P[u]) : W(B(void 0, !0));
|
|
5851
5851
|
});
|
|
5852
5852
|
});
|
|
5853
5853
|
var S = this[v], C;
|
|
@@ -5884,7 +5884,7 @@ function is() {
|
|
|
5884
5884
|
}), e(k, g, {
|
|
5885
5885
|
value: null,
|
|
5886
5886
|
writable: !0
|
|
5887
|
-
}), e(k,
|
|
5887
|
+
}), e(k, u, {
|
|
5888
5888
|
value: null,
|
|
5889
5889
|
writable: !0
|
|
5890
5890
|
}), e(k, c, {
|
|
@@ -5897,10 +5897,10 @@ function is() {
|
|
|
5897
5897
|
},
|
|
5898
5898
|
writable: !0
|
|
5899
5899
|
}), k));
|
|
5900
|
-
return S[v] = null,
|
|
5900
|
+
return S[v] = null, f(P, function(C) {
|
|
5901
5901
|
if (C && C.code !== "ERR_STREAM_PREMATURE_CLOSE") {
|
|
5902
5902
|
var M = S[g];
|
|
5903
|
-
M !== null && (S[v] = null, S[l] = null, S[g] = null, M(C)), S[
|
|
5903
|
+
M !== null && (S[v] = null, S[l] = null, S[g] = null, M(C)), S[u] = C;
|
|
5904
5904
|
return;
|
|
5905
5905
|
}
|
|
5906
5906
|
var W = S[l];
|
|
@@ -5923,16 +5923,16 @@ function $o() {
|
|
|
5923
5923
|
W.ReadableState = M, Rn().EventEmitter;
|
|
5924
5924
|
var e = function(w, z) {
|
|
5925
5925
|
return w.listeners(z).length;
|
|
5926
|
-
}, t = Ro(), s = mt().Buffer,
|
|
5926
|
+
}, t = Ro(), s = mt().Buffer, f = (typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof self != "undefined" ? self : {}).Uint8Array || function() {
|
|
5927
5927
|
};
|
|
5928
5928
|
function l(y) {
|
|
5929
5929
|
return s.from(y);
|
|
5930
5930
|
}
|
|
5931
5931
|
function g(y) {
|
|
5932
|
-
return s.isBuffer(y) || y instanceof
|
|
5932
|
+
return s.isBuffer(y) || y instanceof f;
|
|
5933
5933
|
}
|
|
5934
|
-
var
|
|
5935
|
-
|
|
5934
|
+
var u = No(), c;
|
|
5935
|
+
u && u.debuglog ? c = u.debuglog("stream") : c = function() {
|
|
5936
5936
|
};
|
|
5937
5937
|
var v = rs(), h = Do(), I = Fo(), B = I.getHighWaterMark, q = dt().codes, b = q.ERR_INVALID_ARG_TYPE, N = q.ERR_STREAM_PUSH_AFTER_EOF, T = q.ERR_METHOD_NOT_IMPLEMENTED, m = q.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, R, A, P;
|
|
5938
5938
|
ht()(W, t);
|
|
@@ -6256,9 +6256,9 @@ function $o() {
|
|
|
6256
6256
|
var an, ro;
|
|
6257
6257
|
function jo() {
|
|
6258
6258
|
if (ro) return an;
|
|
6259
|
-
ro = 1, an =
|
|
6260
|
-
var r = dt().codes, e = r.ERR_METHOD_NOT_IMPLEMENTED, t = r.ERR_MULTIPLE_CALLBACK, s = r.ERR_TRANSFORM_ALREADY_TRANSFORMING,
|
|
6261
|
-
ht()(
|
|
6259
|
+
ro = 1, an = u;
|
|
6260
|
+
var r = dt().codes, e = r.ERR_METHOD_NOT_IMPLEMENTED, t = r.ERR_MULTIPLE_CALLBACK, s = r.ERR_TRANSFORM_ALREADY_TRANSFORMING, f = r.ERR_TRANSFORM_WITH_LENGTH_0, l = ut();
|
|
6261
|
+
ht()(u, l);
|
|
6262
6262
|
function g(h, I) {
|
|
6263
6263
|
var B = this._transformState;
|
|
6264
6264
|
B.transforming = !1;
|
|
@@ -6269,8 +6269,8 @@ function jo() {
|
|
|
6269
6269
|
var b = this._readableState;
|
|
6270
6270
|
b.reading = !1, (b.needReadable || b.length < b.highWaterMark) && this._read(b.highWaterMark);
|
|
6271
6271
|
}
|
|
6272
|
-
function
|
|
6273
|
-
if (!(this instanceof
|
|
6272
|
+
function u(h) {
|
|
6273
|
+
if (!(this instanceof u)) return new u(h);
|
|
6274
6274
|
l.call(this, h), this._transformState = {
|
|
6275
6275
|
afterTransform: g.bind(this),
|
|
6276
6276
|
needTransform: !1,
|
|
@@ -6286,27 +6286,27 @@ function jo() {
|
|
|
6286
6286
|
v(h, I, B);
|
|
6287
6287
|
}) : v(this, null, null);
|
|
6288
6288
|
}
|
|
6289
|
-
|
|
6289
|
+
u.prototype.push = function(h, I) {
|
|
6290
6290
|
return this._transformState.needTransform = !1, l.prototype.push.call(this, h, I);
|
|
6291
|
-
},
|
|
6291
|
+
}, u.prototype._transform = function(h, I, B) {
|
|
6292
6292
|
B(new e("_transform()"));
|
|
6293
|
-
},
|
|
6293
|
+
}, u.prototype._write = function(h, I, B) {
|
|
6294
6294
|
var q = this._transformState;
|
|
6295
6295
|
if (q.writecb = B, q.writechunk = h, q.writeencoding = I, !q.transforming) {
|
|
6296
6296
|
var b = this._readableState;
|
|
6297
6297
|
(q.needTransform || b.needReadable || b.length < b.highWaterMark) && this._read(b.highWaterMark);
|
|
6298
6298
|
}
|
|
6299
|
-
},
|
|
6299
|
+
}, u.prototype._read = function(h) {
|
|
6300
6300
|
var I = this._transformState;
|
|
6301
6301
|
I.writechunk !== null && !I.transforming ? (I.transforming = !0, this._transform(I.writechunk, I.writeencoding, I.afterTransform)) : I.needTransform = !0;
|
|
6302
|
-
},
|
|
6302
|
+
}, u.prototype._destroy = function(h, I) {
|
|
6303
6303
|
l.prototype._destroy.call(this, h, function(B) {
|
|
6304
6304
|
I(B);
|
|
6305
6305
|
});
|
|
6306
6306
|
};
|
|
6307
6307
|
function v(h, I, B) {
|
|
6308
6308
|
if (I) return h.emit("error", I);
|
|
6309
|
-
if (B != null && h.push(B), h._writableState.length) throw new
|
|
6309
|
+
if (B != null && h.push(B), h._writableState.length) throw new f();
|
|
6310
6310
|
if (h._transformState.transforming) throw new s();
|
|
6311
6311
|
return h.push(null);
|
|
6312
6312
|
}
|
|
@@ -6322,8 +6322,8 @@ function as() {
|
|
|
6322
6322
|
if (!(this instanceof e)) return new e(t);
|
|
6323
6323
|
r.call(this, t);
|
|
6324
6324
|
}
|
|
6325
|
-
return e.prototype._transform = function(t, s,
|
|
6326
|
-
|
|
6325
|
+
return e.prototype._transform = function(t, s, f) {
|
|
6326
|
+
f(null, t);
|
|
6327
6327
|
}, sn;
|
|
6328
6328
|
}
|
|
6329
6329
|
var ln, io;
|
|
@@ -6337,14 +6337,14 @@ function ss() {
|
|
|
6337
6337
|
q || (q = !0, B.apply(void 0, arguments));
|
|
6338
6338
|
};
|
|
6339
6339
|
}
|
|
6340
|
-
var t = dt().codes, s = t.ERR_MISSING_ARGS,
|
|
6340
|
+
var t = dt().codes, s = t.ERR_MISSING_ARGS, f = t.ERR_STREAM_DESTROYED;
|
|
6341
6341
|
function l(B) {
|
|
6342
6342
|
if (B) throw B;
|
|
6343
6343
|
}
|
|
6344
6344
|
function g(B) {
|
|
6345
6345
|
return B.setHeader && typeof B.abort == "function";
|
|
6346
6346
|
}
|
|
6347
|
-
function
|
|
6347
|
+
function u(B, q, b, N) {
|
|
6348
6348
|
N = e(N);
|
|
6349
6349
|
var T = !1;
|
|
6350
6350
|
B.on("close", function() {
|
|
@@ -6361,7 +6361,7 @@ function ss() {
|
|
|
6361
6361
|
if (!T && !m) {
|
|
6362
6362
|
if (m = !0, g(B)) return B.abort();
|
|
6363
6363
|
if (typeof B.destroy == "function") return B.destroy();
|
|
6364
|
-
N(R || new
|
|
6364
|
+
N(R || new f("pipe"));
|
|
6365
6365
|
}
|
|
6366
6366
|
};
|
|
6367
6367
|
}
|
|
@@ -6382,7 +6382,7 @@ function ss() {
|
|
|
6382
6382
|
throw new s("streams");
|
|
6383
6383
|
var T, m = q.map(function(R, A) {
|
|
6384
6384
|
var P = A < q.length - 1, k = A > 0;
|
|
6385
|
-
return
|
|
6385
|
+
return u(R, P, k, function(S) {
|
|
6386
6386
|
T || (T = S), S && m.forEach(c), !P && (m.forEach(c), N(T));
|
|
6387
6387
|
});
|
|
6388
6388
|
});
|
|
@@ -6411,25 +6411,25 @@ function us() {
|
|
|
6411
6411
|
if (so) return un;
|
|
6412
6412
|
so = 1;
|
|
6413
6413
|
function r(t, s) {
|
|
6414
|
-
for (const
|
|
6415
|
-
Object.defineProperty(t,
|
|
6416
|
-
value: s[
|
|
6414
|
+
for (const f in s)
|
|
6415
|
+
Object.defineProperty(t, f, {
|
|
6416
|
+
value: s[f],
|
|
6417
6417
|
enumerable: !0,
|
|
6418
6418
|
configurable: !0
|
|
6419
6419
|
});
|
|
6420
6420
|
return t;
|
|
6421
6421
|
}
|
|
6422
|
-
function e(t, s,
|
|
6422
|
+
function e(t, s, f) {
|
|
6423
6423
|
if (!t || typeof t == "string")
|
|
6424
6424
|
throw new TypeError("Please pass an Error to err-code");
|
|
6425
|
-
|
|
6425
|
+
f || (f = {}), typeof s == "object" && (f = s, s = ""), s && (f.code = s);
|
|
6426
6426
|
try {
|
|
6427
|
-
return r(t,
|
|
6427
|
+
return r(t, f);
|
|
6428
6428
|
} catch (l) {
|
|
6429
|
-
|
|
6429
|
+
f.message = t.message, f.stack = t.stack;
|
|
6430
6430
|
const g = function() {
|
|
6431
6431
|
};
|
|
6432
|
-
return g.prototype = Object.create(Object.getPrototypeOf(t)), r(new g(),
|
|
6432
|
+
return g.prototype = Object.create(Object.getPrototypeOf(t)), r(new g(), f);
|
|
6433
6433
|
}
|
|
6434
6434
|
}
|
|
6435
6435
|
return un = e, un;
|
|
@@ -6439,7 +6439,7 @@ var fn, lo;
|
|
|
6439
6439
|
function fs() {
|
|
6440
6440
|
if (lo) return fn;
|
|
6441
6441
|
lo = 1;
|
|
6442
|
-
const r = wa()("simple-peer"), e = ba(), t = Sa(), s = ls(),
|
|
6442
|
+
const r = wa()("simple-peer"), e = ba(), t = Sa(), s = ls(), f = cs(), l = us(), { Buffer: g } = mt(), u = 64 * 1024, c = 5 * 1e3, v = 5 * 1e3;
|
|
6443
6443
|
function h(q) {
|
|
6444
6444
|
return q.replace(/a=ice-options:trickle\s\n/g, "");
|
|
6445
6445
|
}
|
|
@@ -6624,7 +6624,7 @@ function fs() {
|
|
|
6624
6624
|
}
|
|
6625
6625
|
}
|
|
6626
6626
|
_needsNegotiation() {
|
|
6627
|
-
this._debug("_needsNegotiation"), !this._batchedNegotiation && (this._batchedNegotiation = !0,
|
|
6627
|
+
this._debug("_needsNegotiation"), !this._batchedNegotiation && (this._batchedNegotiation = !0, f(() => {
|
|
6628
6628
|
this._batchedNegotiation = !1, this.initiator || !this._firstNegotiation ? (this._debug("starting batched negotiation"), this.negotiate()) : this._debug("non-initiator initial negotiation request discarded"), this._firstNegotiation = !1;
|
|
6629
6629
|
}));
|
|
6630
6630
|
}
|
|
@@ -6648,7 +6648,7 @@ function fs() {
|
|
|
6648
6648
|
});
|
|
6649
6649
|
}
|
|
6650
6650
|
_destroy(b, N) {
|
|
6651
|
-
this.destroyed || this.destroying || (this.destroying = !0, this._debug("destroying (error: %s)", b && (b.message || b)),
|
|
6651
|
+
this.destroyed || this.destroying || (this.destroying = !0, this._debug("destroying (error: %s)", b && (b.message || b)), f(() => {
|
|
6652
6652
|
if (this.destroyed = !0, this.destroying = !1, this._debug("destroy (error: %s)", b && (b.message || b)), this.readable = this.writable = !1, this._readableState.ended || this.push(null), this._writableState.finished || this.end(), this._connected = !1, this._pcReady = !1, this._channelReady = !1, this._remoteTracks = null, this._remoteStreams = null, this._senderMap = null, clearInterval(this._closingInterval), this._closingInterval = null, clearInterval(this._interval), this._interval = null, this._chunk = null, this._cb = null, this._onFinishBound && this.removeListener("finish", this._onFinishBound), this._onFinishBound = null, this._channel) {
|
|
6653
6653
|
try {
|
|
6654
6654
|
this._channel.close();
|
|
@@ -6669,7 +6669,7 @@ function fs() {
|
|
|
6669
6669
|
_setupData(b) {
|
|
6670
6670
|
if (!b.channel)
|
|
6671
6671
|
return this.destroy(l(new Error("Data channel event is missing `channel` property"), "ERR_DATA_CHANNEL"));
|
|
6672
|
-
this._channel = b.channel, this._channel.binaryType = "arraybuffer", typeof this._channel.bufferedAmountLowThreshold == "number" && (this._channel.bufferedAmountLowThreshold =
|
|
6672
|
+
this._channel = b.channel, this._channel.binaryType = "arraybuffer", typeof this._channel.bufferedAmountLowThreshold == "number" && (this._channel.bufferedAmountLowThreshold = u), this.channelName = this._channel.label, this._channel.onmessage = (T) => {
|
|
6673
6673
|
this._onChannelMessage(T);
|
|
6674
6674
|
}, this._channel.onbufferedamountlow = () => {
|
|
6675
6675
|
this._onChannelBufferedAmountLow();
|
|
@@ -6696,7 +6696,7 @@ function fs() {
|
|
|
6696
6696
|
} catch (m) {
|
|
6697
6697
|
return this.destroy(l(m, "ERR_DATA_CHANNEL"));
|
|
6698
6698
|
}
|
|
6699
|
-
this._channel.bufferedAmount >
|
|
6699
|
+
this._channel.bufferedAmount > u ? (this._debug("start backpressure: bufferedAmount %d", this._channel.bufferedAmount), this._cb = T) : T(null);
|
|
6700
6700
|
} else
|
|
6701
6701
|
this._debug("write before connect"), this._chunk = b, this._cb = T;
|
|
6702
6702
|
}
|
|
@@ -6841,7 +6841,7 @@ function fs() {
|
|
|
6841
6841
|
b();
|
|
6842
6842
|
}
|
|
6843
6843
|
_onInterval() {
|
|
6844
|
-
!this._cb || !this._channel || this._channel.bufferedAmount >
|
|
6844
|
+
!this._cb || !this._channel || this._channel.bufferedAmount > u || this._onChannelBufferedAmountLow();
|
|
6845
6845
|
}
|
|
6846
6846
|
_onSignalingStateChange() {
|
|
6847
6847
|
this.destroyed || (this._pc.signalingState === "stable" && (this._isNegotiating = !1, this._debug("flushing sender queue", this._sendersAwaitingStable), this._sendersAwaitingStable.forEach((b) => {
|
|
@@ -6880,7 +6880,7 @@ function fs() {
|
|
|
6880
6880
|
this._debug("on track"), this.emit("track", b.track, N), this._remoteTracks.push({
|
|
6881
6881
|
track: b.track,
|
|
6882
6882
|
stream: N
|
|
6883
|
-
}), !this._remoteStreams.some((T) => T.id === N.id) && (this._remoteStreams.push(N),
|
|
6883
|
+
}), !this._remoteStreams.some((T) => T.id === N.id) && (this._remoteStreams.push(N), f(() => {
|
|
6884
6884
|
this._debug("on stream"), this.emit("stream", N);
|
|
6885
6885
|
}));
|
|
6886
6886
|
});
|
|
@@ -6904,21 +6904,21 @@ function fs() {
|
|
|
6904
6904
|
}
|
|
6905
6905
|
var hs = fs();
|
|
6906
6906
|
const ds = /* @__PURE__ */ Cn(hs);
|
|
6907
|
-
var ps = Object.defineProperty, gs = (r, e, t) => e in r ? ps(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, tt = (r, e, t) => gs(r, typeof e != "symbol" ? e + "" : e, t), hn = (r, e, t) => new Promise((s,
|
|
6907
|
+
var ps = Object.defineProperty, gs = (r, e, t) => e in r ? ps(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, tt = (r, e, t) => gs(r, typeof e != "symbol" ? e + "" : e, t), hn = (r, e, t) => new Promise((s, f) => {
|
|
6908
6908
|
var l = (c) => {
|
|
6909
6909
|
try {
|
|
6910
|
-
|
|
6910
|
+
u(t.next(c));
|
|
6911
6911
|
} catch (v) {
|
|
6912
|
-
|
|
6912
|
+
f(v);
|
|
6913
6913
|
}
|
|
6914
6914
|
}, g = (c) => {
|
|
6915
6915
|
try {
|
|
6916
|
-
|
|
6916
|
+
u(t.throw(c));
|
|
6917
6917
|
} catch (v) {
|
|
6918
|
-
|
|
6918
|
+
f(v);
|
|
6919
6919
|
}
|
|
6920
|
-
},
|
|
6921
|
-
|
|
6920
|
+
}, u = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(l, g);
|
|
6921
|
+
u((t = t.apply(r, e)).next());
|
|
6922
6922
|
});
|
|
6923
6923
|
class ys {
|
|
6924
6924
|
constructor(e, t, s = {}) {
|
|
@@ -6968,11 +6968,11 @@ class ys {
|
|
|
6968
6968
|
`[CallPeerConnection] Signaling to ${this.remoteUserId}:`,
|
|
6969
6969
|
e.type
|
|
6970
6970
|
), this.peer.signal(e);
|
|
6971
|
-
} catch (
|
|
6971
|
+
} catch (f) {
|
|
6972
6972
|
console.error(
|
|
6973
6973
|
`[CallPeerConnection] Failed to signal to ${this.remoteUserId}:`,
|
|
6974
|
-
|
|
6975
|
-
), (s = (t = this.events).onError) == null || s.call(t,
|
|
6974
|
+
f
|
|
6975
|
+
), (s = (t = this.events).onError) == null || s.call(t, f);
|
|
6976
6976
|
}
|
|
6977
6977
|
}
|
|
6978
6978
|
/**
|
|
@@ -6988,11 +6988,11 @@ class ys {
|
|
|
6988
6988
|
}
|
|
6989
6989
|
try {
|
|
6990
6990
|
this.localStream && this.removeStream(this.localStream), this.localStream = e, this.peer.addStream(e), console.log(`[CallPeerConnection] Stream added to ${this.remoteUserId}`);
|
|
6991
|
-
} catch (
|
|
6991
|
+
} catch (f) {
|
|
6992
6992
|
console.error(
|
|
6993
6993
|
`[CallPeerConnection] Failed to add stream to ${this.remoteUserId}:`,
|
|
6994
|
-
|
|
6995
|
-
), (s = (t = this.events).onError) == null || s.call(t,
|
|
6994
|
+
f
|
|
6995
|
+
), (s = (t = this.events).onError) == null || s.call(t, f);
|
|
6996
6996
|
}
|
|
6997
6997
|
}
|
|
6998
6998
|
/**
|
|
@@ -7010,18 +7010,18 @@ class ys {
|
|
|
7010
7010
|
this.peer.removeStream(e), this.localStream === e && (this.localStream = null), console.log(
|
|
7011
7011
|
`[CallPeerConnection] Stream removed from ${this.remoteUserId}`
|
|
7012
7012
|
);
|
|
7013
|
-
} catch (
|
|
7013
|
+
} catch (f) {
|
|
7014
7014
|
console.error(
|
|
7015
7015
|
`[CallPeerConnection] Failed to remove stream from ${this.remoteUserId}:`,
|
|
7016
|
-
|
|
7017
|
-
), (s = (t = this.events).onError) == null || s.call(t,
|
|
7016
|
+
f
|
|
7017
|
+
), (s = (t = this.events).onError) == null || s.call(t, f);
|
|
7018
7018
|
}
|
|
7019
7019
|
}
|
|
7020
7020
|
/**
|
|
7021
7021
|
* Replace a track in the peer connection (useful for screen sharing)
|
|
7022
7022
|
*/
|
|
7023
7023
|
replaceTrack(e, t) {
|
|
7024
|
-
var s,
|
|
7024
|
+
var s, f;
|
|
7025
7025
|
if (!this.peer) {
|
|
7026
7026
|
console.error(
|
|
7027
7027
|
`[CallPeerConnection] Cannot replace track for ${this.remoteUserId}: peer not initialized`
|
|
@@ -7040,7 +7040,7 @@ class ys {
|
|
|
7040
7040
|
);
|
|
7041
7041
|
return;
|
|
7042
7042
|
}
|
|
7043
|
-
const g = this.localStream.getTracks().some((
|
|
7043
|
+
const g = this.localStream.getTracks().some((u) => u.id === e.id);
|
|
7044
7044
|
g || console.warn(
|
|
7045
7045
|
`[CallPeerConnection] Old track not found in local stream for ${this.remoteUserId}, attempting replacement anyway`
|
|
7046
7046
|
);
|
|
@@ -7048,11 +7048,11 @@ class ys {
|
|
|
7048
7048
|
this.peer.replaceTrack(e, t, this.localStream), g && this.localStream.removeTrack(e), this.localStream.addTrack(t), console.log(
|
|
7049
7049
|
`[CallPeerConnection] ${t.kind} track replaced for ${this.remoteUserId} (${e.id} -> ${t.id})`
|
|
7050
7050
|
);
|
|
7051
|
-
} catch (
|
|
7051
|
+
} catch (u) {
|
|
7052
7052
|
throw console.error(
|
|
7053
7053
|
`[CallPeerConnection] Failed to replace track for ${this.remoteUserId}:`,
|
|
7054
|
-
|
|
7055
|
-
), (
|
|
7054
|
+
u
|
|
7055
|
+
), (f = (s = this.events).onError) == null || f.call(s, u), u;
|
|
7056
7056
|
}
|
|
7057
7057
|
}
|
|
7058
7058
|
/**
|
|
@@ -7090,11 +7090,11 @@ class ys {
|
|
|
7090
7090
|
}
|
|
7091
7091
|
try {
|
|
7092
7092
|
this.peer.send(JSON.stringify(e));
|
|
7093
|
-
} catch (
|
|
7093
|
+
} catch (f) {
|
|
7094
7094
|
console.error(
|
|
7095
7095
|
`[CallPeerConnection] Failed to send data to ${this.remoteUserId}:`,
|
|
7096
|
-
|
|
7097
|
-
), (s = (t = this.events).onError) == null || s.call(t,
|
|
7096
|
+
f
|
|
7097
|
+
), (s = (t = this.events).onError) == null || s.call(t, f);
|
|
7098
7098
|
}
|
|
7099
7099
|
}
|
|
7100
7100
|
/**
|
|
@@ -7112,10 +7112,10 @@ class ys {
|
|
|
7112
7112
|
const t = this.peer._pc;
|
|
7113
7113
|
if (!t) return;
|
|
7114
7114
|
const s = t.getSenders();
|
|
7115
|
-
for (const
|
|
7116
|
-
if (
|
|
7117
|
-
const l =
|
|
7118
|
-
l.encodings || (l.encodings = [{}]), l.encodings[0].maxBitrate = e * 1e3, yield
|
|
7115
|
+
for (const f of s)
|
|
7116
|
+
if (f.track) {
|
|
7117
|
+
const l = f.getParameters();
|
|
7118
|
+
l.encodings || (l.encodings = [{}]), l.encodings[0].maxBitrate = e * 1e3, yield f.setParameters(l);
|
|
7119
7119
|
}
|
|
7120
7120
|
console.log(
|
|
7121
7121
|
`[CallPeerConnection] Bandwidth limit set to ${e}kbps for ${this.remoteUserId}`
|
|
@@ -7190,19 +7190,19 @@ class ys {
|
|
|
7190
7190
|
setupPeerEventListeners() {
|
|
7191
7191
|
if (!this.peer) return;
|
|
7192
7192
|
this.peer.on("signal", (t) => {
|
|
7193
|
-
var s,
|
|
7193
|
+
var s, f;
|
|
7194
7194
|
console.log(
|
|
7195
7195
|
`[CallPeerConnection] Signal from ${this.remoteUserId}:`,
|
|
7196
7196
|
t.type
|
|
7197
|
-
), (
|
|
7197
|
+
), (f = (s = this.events).onSignal) == null || f.call(s, t);
|
|
7198
7198
|
}), this.peer.on("connect", () => {
|
|
7199
7199
|
var t, s;
|
|
7200
7200
|
console.log(`[CallPeerConnection] Connected to ${this.remoteUserId}`), this.connectionState = "connected", (s = (t = this.events).onConnect) == null || s.call(t);
|
|
7201
7201
|
}), this.peer.on("data", (t) => {
|
|
7202
|
-
var s,
|
|
7202
|
+
var s, f;
|
|
7203
7203
|
try {
|
|
7204
7204
|
const l = JSON.parse(t.toString());
|
|
7205
|
-
(
|
|
7205
|
+
(f = (s = this.events).onData) == null || f.call(s, l);
|
|
7206
7206
|
} catch (l) {
|
|
7207
7207
|
console.error(
|
|
7208
7208
|
`[CallPeerConnection] Failed to parse data from ${this.remoteUserId}:`,
|
|
@@ -7210,27 +7210,27 @@ class ys {
|
|
|
7210
7210
|
);
|
|
7211
7211
|
}
|
|
7212
7212
|
}), this.peer.on("stream", (t) => {
|
|
7213
|
-
var s,
|
|
7213
|
+
var s, f;
|
|
7214
7214
|
console.log(
|
|
7215
7215
|
`[CallPeerConnection] Stream received from ${this.remoteUserId}`
|
|
7216
|
-
), (
|
|
7216
|
+
), (f = (s = this.events).onStream) == null || f.call(s, t);
|
|
7217
7217
|
}), this.peer.on("track", (t, s) => {
|
|
7218
|
-
var
|
|
7218
|
+
var f, l;
|
|
7219
7219
|
console.log(
|
|
7220
7220
|
`[CallPeerConnection] Track received from ${this.remoteUserId}:`,
|
|
7221
7221
|
t.kind
|
|
7222
|
-
), (l = (
|
|
7222
|
+
), (l = (f = this.events).onTrack) == null || l.call(f, t, s);
|
|
7223
7223
|
}), this.peer.on("close", () => {
|
|
7224
7224
|
var t, s;
|
|
7225
7225
|
console.log(
|
|
7226
7226
|
`[CallPeerConnection] Connection closed with ${this.remoteUserId}`
|
|
7227
7227
|
), this.connectionState = "closed", (s = (t = this.events).onClose) == null || s.call(t);
|
|
7228
7228
|
}), this.peer.on("error", (t) => {
|
|
7229
|
-
var s,
|
|
7229
|
+
var s, f;
|
|
7230
7230
|
console.error(
|
|
7231
7231
|
`[CallPeerConnection] Error with ${this.remoteUserId}:`,
|
|
7232
7232
|
t
|
|
7233
|
-
), this.connectionState = "failed", (
|
|
7233
|
+
), this.connectionState = "failed", (f = (s = this.events).onError) == null || f.call(s, t);
|
|
7234
7234
|
});
|
|
7235
7235
|
const e = this.peer._pc;
|
|
7236
7236
|
e && e.addEventListener("connectionstatechange", () => {
|
|
@@ -7274,11 +7274,11 @@ const co = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, yt
|
|
|
7274
7274
|
const s = yt.get(t.name);
|
|
7275
7275
|
if (s)
|
|
7276
7276
|
return pt({ type: "tracked", store: r }, s);
|
|
7277
|
-
const
|
|
7277
|
+
const f = {
|
|
7278
7278
|
connection: e.connect(t),
|
|
7279
7279
|
stores: {}
|
|
7280
7280
|
};
|
|
7281
|
-
return yt.set(t.name,
|
|
7281
|
+
return yt.set(t.name, f), pt({ type: "tracked", store: r }, f);
|
|
7282
7282
|
}, vs = (r, e) => {
|
|
7283
7283
|
if (e === void 0) return;
|
|
7284
7284
|
const t = yt.get(r);
|
|
@@ -7287,57 +7287,57 @@ const co = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, yt
|
|
|
7287
7287
|
var e, t;
|
|
7288
7288
|
if (!r) return;
|
|
7289
7289
|
const s = r.split(`
|
|
7290
|
-
`),
|
|
7290
|
+
`), f = s.findIndex(
|
|
7291
7291
|
(g) => g.includes("api.setState")
|
|
7292
7292
|
);
|
|
7293
|
-
if (
|
|
7294
|
-
const l = ((e = s[
|
|
7293
|
+
if (f < 0) return;
|
|
7294
|
+
const l = ((e = s[f + 1]) == null ? void 0 : e.trim()) || "";
|
|
7295
7295
|
return (t = /.+ (.+) .+/.exec(l)) == null ? void 0 : t[1];
|
|
7296
|
-
}, bs = (r, e = {}) => (t, s,
|
|
7297
|
-
const N = e, { enabled: l, anonymousActionType: g, store:
|
|
7296
|
+
}, bs = (r, e = {}) => (t, s, f) => {
|
|
7297
|
+
const N = e, { enabled: l, anonymousActionType: g, store: u } = N, c = jt(N, ["enabled", "anonymousActionType", "store"]);
|
|
7298
7298
|
let v;
|
|
7299
7299
|
try {
|
|
7300
7300
|
v = (l != null ? l : (co ? "production" : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
7301
7301
|
} catch (m) {
|
|
7302
7302
|
}
|
|
7303
7303
|
if (!v)
|
|
7304
|
-
return r(t, s,
|
|
7305
|
-
const T = ms(
|
|
7304
|
+
return r(t, s, f);
|
|
7305
|
+
const T = ms(u, v, c), { connection: h } = T, I = jt(T, ["connection"]);
|
|
7306
7306
|
let B = !0;
|
|
7307
|
-
|
|
7307
|
+
f.setState = (m, R, A) => {
|
|
7308
7308
|
const P = t(m, R);
|
|
7309
7309
|
if (!B) return P;
|
|
7310
7310
|
const k = A === void 0 ? {
|
|
7311
7311
|
type: g || ws(new Error().stack) || "anonymous"
|
|
7312
7312
|
} : typeof A == "string" ? { type: A } : A;
|
|
7313
|
-
return
|
|
7313
|
+
return u === void 0 ? (h == null || h.send(k, s()), P) : (h == null || h.send(
|
|
7314
7314
|
$t(pt({}, k), {
|
|
7315
|
-
type: `${
|
|
7315
|
+
type: `${u}/${k.type}`
|
|
7316
7316
|
}),
|
|
7317
7317
|
$t(pt({}, Bt(c.name)), {
|
|
7318
|
-
[
|
|
7318
|
+
[u]: f.getState()
|
|
7319
7319
|
})
|
|
7320
7320
|
), P);
|
|
7321
|
-
},
|
|
7321
|
+
}, f.devtools = {
|
|
7322
7322
|
cleanup: () => {
|
|
7323
|
-
h && typeof h.unsubscribe == "function" && h.unsubscribe(), vs(c.name,
|
|
7323
|
+
h && typeof h.unsubscribe == "function" && h.unsubscribe(), vs(c.name, u);
|
|
7324
7324
|
}
|
|
7325
7325
|
};
|
|
7326
7326
|
const q = (...m) => {
|
|
7327
7327
|
const R = B;
|
|
7328
7328
|
B = !1, t(...m), B = R;
|
|
7329
|
-
}, b = r(
|
|
7330
|
-
if (I.type === "untracked" ? h == null || h.init(b) : (I.stores[I.store] =
|
|
7329
|
+
}, b = r(f.setState, s, f);
|
|
7330
|
+
if (I.type === "untracked" ? h == null || h.init(b) : (I.stores[I.store] = f, h == null || h.init(
|
|
7331
7331
|
Object.fromEntries(
|
|
7332
7332
|
Object.entries(I.stores).map(([m, R]) => [
|
|
7333
7333
|
m,
|
|
7334
7334
|
m === I.store ? b : R.getState()
|
|
7335
7335
|
])
|
|
7336
7336
|
)
|
|
7337
|
-
)),
|
|
7337
|
+
)), f.dispatchFromDevtools && typeof f.dispatch == "function") {
|
|
7338
7338
|
let m = !1;
|
|
7339
|
-
const R =
|
|
7340
|
-
|
|
7339
|
+
const R = f.dispatch;
|
|
7340
|
+
f.dispatch = (...A) => {
|
|
7341
7341
|
(co ? "production" : void 0) !== "production" && A[0].type === "__setState" && !m && (console.warn(
|
|
7342
7342
|
'[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'
|
|
7343
7343
|
), m = !0), R(...A);
|
|
@@ -7357,7 +7357,7 @@ const co = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, yt
|
|
|
7357
7357
|
m.payload,
|
|
7358
7358
|
(A) => {
|
|
7359
7359
|
if (A.type === "__setState") {
|
|
7360
|
-
if (
|
|
7360
|
+
if (u === void 0) {
|
|
7361
7361
|
q(A.state);
|
|
7362
7362
|
return;
|
|
7363
7363
|
}
|
|
@@ -7368,46 +7368,46 @@ const co = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, yt
|
|
|
7368
7368
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
7369
7369
|
`
|
|
7370
7370
|
);
|
|
7371
|
-
const P = A.state[
|
|
7371
|
+
const P = A.state[u];
|
|
7372
7372
|
if (P == null)
|
|
7373
7373
|
return;
|
|
7374
|
-
JSON.stringify(
|
|
7374
|
+
JSON.stringify(f.getState()) !== JSON.stringify(P) && q(P);
|
|
7375
7375
|
return;
|
|
7376
7376
|
}
|
|
7377
|
-
|
|
7377
|
+
f.dispatchFromDevtools && typeof f.dispatch == "function" && f.dispatch(A);
|
|
7378
7378
|
}
|
|
7379
7379
|
);
|
|
7380
7380
|
case "DISPATCH":
|
|
7381
7381
|
switch (m.payload.type) {
|
|
7382
7382
|
case "RESET":
|
|
7383
|
-
return q(b),
|
|
7383
|
+
return q(b), u === void 0 ? h == null ? void 0 : h.init(f.getState()) : h == null ? void 0 : h.init(Bt(c.name));
|
|
7384
7384
|
case "COMMIT":
|
|
7385
|
-
if (
|
|
7386
|
-
h == null || h.init(
|
|
7385
|
+
if (u === void 0) {
|
|
7386
|
+
h == null || h.init(f.getState());
|
|
7387
7387
|
return;
|
|
7388
7388
|
}
|
|
7389
7389
|
return h == null ? void 0 : h.init(Bt(c.name));
|
|
7390
7390
|
case "ROLLBACK":
|
|
7391
7391
|
return dn(m.state, (A) => {
|
|
7392
|
-
if (
|
|
7393
|
-
q(A), h == null || h.init(
|
|
7392
|
+
if (u === void 0) {
|
|
7393
|
+
q(A), h == null || h.init(f.getState());
|
|
7394
7394
|
return;
|
|
7395
7395
|
}
|
|
7396
|
-
q(A[
|
|
7396
|
+
q(A[u]), h == null || h.init(Bt(c.name));
|
|
7397
7397
|
});
|
|
7398
7398
|
case "JUMP_TO_STATE":
|
|
7399
7399
|
case "JUMP_TO_ACTION":
|
|
7400
7400
|
return dn(m.state, (A) => {
|
|
7401
|
-
if (
|
|
7401
|
+
if (u === void 0) {
|
|
7402
7402
|
q(A);
|
|
7403
7403
|
return;
|
|
7404
7404
|
}
|
|
7405
|
-
JSON.stringify(
|
|
7405
|
+
JSON.stringify(f.getState()) !== JSON.stringify(A[u]) && q(A[u]);
|
|
7406
7406
|
});
|
|
7407
7407
|
case "IMPORT_STATE": {
|
|
7408
7408
|
const { nextLiftedState: A } = m.payload, P = (R = A.computedStates.slice(-1)[0]) == null ? void 0 : R.state;
|
|
7409
7409
|
if (!P) return;
|
|
7410
|
-
q(
|
|
7410
|
+
q(u === void 0 ? P : P[u]), h == null || h.send(
|
|
7411
7411
|
null,
|
|
7412
7412
|
// FIXME no-any
|
|
7413
7413
|
A
|
|
@@ -7478,7 +7478,7 @@ const fo = {
|
|
|
7478
7478
|
),
|
|
7479
7479
|
removeParticipant: (e) => r(
|
|
7480
7480
|
(t) => {
|
|
7481
|
-
const s = t.participants, { [e]:
|
|
7481
|
+
const s = t.participants, { [e]: f } = s;
|
|
7482
7482
|
return { participants: Ps(s, [Rs(e)]) };
|
|
7483
7483
|
},
|
|
7484
7484
|
!1,
|
|
@@ -7557,32 +7557,32 @@ var Os = Object.defineProperty, Ms = Object.defineProperties, Ls = Object.getOwn
|
|
|
7557
7557
|
for (var t of ho(e))
|
|
7558
7558
|
Ds.call(e, t) && bn(r, t, e[t]);
|
|
7559
7559
|
return r;
|
|
7560
|
-
}, Fs = (r, e) => Ms(r, Ls(e)), at = (r, e, t) => bn(r, typeof e != "symbol" ? e + "" : e, t), kt = (r, e, t) => new Promise((s,
|
|
7560
|
+
}, Fs = (r, e) => Ms(r, Ls(e)), at = (r, e, t) => bn(r, typeof e != "symbol" ? e + "" : e, t), kt = (r, e, t) => new Promise((s, f) => {
|
|
7561
7561
|
var l = (c) => {
|
|
7562
7562
|
try {
|
|
7563
|
-
|
|
7563
|
+
u(t.next(c));
|
|
7564
7564
|
} catch (v) {
|
|
7565
|
-
|
|
7565
|
+
f(v);
|
|
7566
7566
|
}
|
|
7567
7567
|
}, g = (c) => {
|
|
7568
7568
|
try {
|
|
7569
|
-
|
|
7569
|
+
u(t.throw(c));
|
|
7570
7570
|
} catch (v) {
|
|
7571
|
-
|
|
7571
|
+
f(v);
|
|
7572
7572
|
}
|
|
7573
|
-
},
|
|
7574
|
-
|
|
7573
|
+
}, u = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(l, g);
|
|
7574
|
+
u((t = t.apply(r, e)).next());
|
|
7575
7575
|
});
|
|
7576
7576
|
class po extends Wo {
|
|
7577
7577
|
constructor(e, t = {}, s = !1) {
|
|
7578
7578
|
super(Ue), at(this, "userId"), at(this, "mediaStream", null), at(this, "peerConnections", /* @__PURE__ */ new Map()), at(this, "remoteStreams", /* @__PURE__ */ new Map()), at(this, "isLocalParticipant", !1), at(this, "callbacks"), this.userId = e, this.callbacks = t, this.isLocalParticipant = s;
|
|
7579
|
-
const
|
|
7579
|
+
const f = {
|
|
7580
7580
|
userId: e,
|
|
7581
7581
|
videoOn: !0,
|
|
7582
7582
|
audioOn: !0,
|
|
7583
7583
|
screenSharing: !1
|
|
7584
7584
|
};
|
|
7585
|
-
this.isLocalParticipant && this.state.setLocalParticipant(
|
|
7585
|
+
this.isLocalParticipant && this.state.setLocalParticipant(f), this.state.addParticipant(f);
|
|
7586
7586
|
}
|
|
7587
7587
|
/**
|
|
7588
7588
|
* Initialize participant with media stream
|
|
@@ -7599,11 +7599,11 @@ class po extends Wo {
|
|
|
7599
7599
|
this.updateState(l), console.log(
|
|
7600
7600
|
`[CallParticipant] Participant ${this.userId} initialized successfully`
|
|
7601
7601
|
);
|
|
7602
|
-
} catch (
|
|
7602
|
+
} catch (f) {
|
|
7603
7603
|
throw console.error(
|
|
7604
7604
|
`[CallParticipant] Failed to initialize participant ${this.userId}:`,
|
|
7605
|
-
|
|
7606
|
-
), (s = (t = this.callbacks).onError) == null || s.call(t,
|
|
7605
|
+
f
|
|
7606
|
+
), (s = (t = this.callbacks).onError) == null || s.call(t, f), f;
|
|
7607
7607
|
}
|
|
7608
7608
|
});
|
|
7609
7609
|
}
|
|
@@ -7612,7 +7612,7 @@ class po extends Wo {
|
|
|
7612
7612
|
*/
|
|
7613
7613
|
createPeerConnection(e, t, s) {
|
|
7614
7614
|
return kt(this, null, function* () {
|
|
7615
|
-
var
|
|
7615
|
+
var f, l;
|
|
7616
7616
|
try {
|
|
7617
7617
|
if (console.log(
|
|
7618
7618
|
`[CallParticipant] Creating peer connection from ${this.userId} to ${e}`
|
|
@@ -7655,17 +7655,17 @@ class po extends Wo {
|
|
|
7655
7655
|
c
|
|
7656
7656
|
), (h = (v = this.callbacks).onError) == null || h.call(v, c);
|
|
7657
7657
|
}
|
|
7658
|
-
},
|
|
7658
|
+
}, u = new ys(
|
|
7659
7659
|
e,
|
|
7660
7660
|
Fs(gn({}, t), { initiator: s }),
|
|
7661
7661
|
g
|
|
7662
7662
|
);
|
|
7663
|
-
yield
|
|
7663
|
+
yield u.createConnection(this.getCurrentStream()), this.peerConnections.set(e, u);
|
|
7664
7664
|
} catch (g) {
|
|
7665
7665
|
throw console.error(
|
|
7666
7666
|
`[CallParticipant] Failed to create peer connection from ${this.userId} to ${e}:`,
|
|
7667
7667
|
g
|
|
7668
|
-
), (l = (
|
|
7668
|
+
), (l = (f = this.callbacks).onError) == null || l.call(f, g), g;
|
|
7669
7669
|
}
|
|
7670
7670
|
});
|
|
7671
7671
|
}
|
|
@@ -7706,11 +7706,11 @@ class po extends Wo {
|
|
|
7706
7706
|
if (!this.mediaStream)
|
|
7707
7707
|
throw new Error("Media stream not initialized");
|
|
7708
7708
|
console.log(`[CallParticipant] Starting screen share for ${this.userId}`);
|
|
7709
|
-
const s = yield this.mediaStream.startScreenShare(),
|
|
7710
|
-
if (!
|
|
7709
|
+
const s = yield this.mediaStream.startScreenShare(), f = this.mediaStream.getScreenVideoTrack(), l = this.mediaStream.getCameraVideoTrack();
|
|
7710
|
+
if (!f)
|
|
7711
7711
|
throw new Error("Failed to get screen video track");
|
|
7712
|
-
for (const [g,
|
|
7713
|
-
l ? (
|
|
7712
|
+
for (const [g, u] of this.peerConnections)
|
|
7713
|
+
l ? (u.replaceTrack(l, f), console.log(
|
|
7714
7714
|
`[CallParticipant] Screen video track replaced for connection with ${g}`
|
|
7715
7715
|
)) : console.warn(
|
|
7716
7716
|
`[CallParticipant] No camera video track to replace for ${g}`
|
|
@@ -7744,16 +7744,16 @@ class po extends Wo {
|
|
|
7744
7744
|
"[CallParticipant] Screen video track found:",
|
|
7745
7745
|
!!s
|
|
7746
7746
|
);
|
|
7747
|
-
const
|
|
7748
|
-
if (console.log("[CallParticipant] Camera stream:", !!
|
|
7747
|
+
const f = yield this.mediaStream.stopScreenShare(), l = this.mediaStream.getCameraVideoTrack();
|
|
7748
|
+
if (console.log("[CallParticipant] Camera stream:", !!f), console.log("[CallParticipant] Camera video track:", !!l), !l)
|
|
7749
7749
|
throw new Error("Failed to get camera video track");
|
|
7750
|
-
for (const [g,
|
|
7750
|
+
for (const [g, u] of this.peerConnections)
|
|
7751
7751
|
try {
|
|
7752
|
-
s && l ? (
|
|
7752
|
+
s && l ? (u.replaceTrack(s, l), console.log(
|
|
7753
7753
|
`[CallParticipant] Camera video track restored for connection with ${g}`
|
|
7754
7754
|
)) : (console.log(
|
|
7755
7755
|
`[CallParticipant] Updating entire stream for connection with ${g}`
|
|
7756
|
-
),
|
|
7756
|
+
), u.addStream(f));
|
|
7757
7757
|
} catch (c) {
|
|
7758
7758
|
console.warn(
|
|
7759
7759
|
`[CallParticipant] Failed to replace track for ${g}, trying stream replacement:`,
|
|
@@ -7762,10 +7762,10 @@ class po extends Wo {
|
|
|
7762
7762
|
}
|
|
7763
7763
|
if (this.updateState({
|
|
7764
7764
|
screenSharing: !1,
|
|
7765
|
-
stream:
|
|
7765
|
+
stream: f
|
|
7766
7766
|
}), this.isLocalParticipant && this.mediaStream) {
|
|
7767
7767
|
const g = this.mediaStream.getVideoElement();
|
|
7768
|
-
g && (g.srcObject =
|
|
7768
|
+
g && (g.srcObject = f, console.log(
|
|
7769
7769
|
`[CallParticipant] Updated local video element for ${this.userId}`
|
|
7770
7770
|
));
|
|
7771
7771
|
}
|
|
@@ -7862,11 +7862,11 @@ class po extends Wo {
|
|
|
7862
7862
|
*/
|
|
7863
7863
|
updateState(e) {
|
|
7864
7864
|
var t, s;
|
|
7865
|
-
const
|
|
7865
|
+
const f = this.getState();
|
|
7866
7866
|
if (Object.keys(e).some(
|
|
7867
|
-
(g) =>
|
|
7867
|
+
(g) => f[g] !== e[g]
|
|
7868
7868
|
)) {
|
|
7869
|
-
const g = gn(gn({},
|
|
7869
|
+
const g = gn(gn({}, f), e);
|
|
7870
7870
|
this.isLocalParticipant && this.state.setLocalParticipant(g), this.state.updateParticipant(this.userId, e), (s = (t = this.callbacks).onStateChanged) == null || s.call(t, this.userId, e);
|
|
7871
7871
|
}
|
|
7872
7872
|
}
|
|
@@ -7900,10 +7900,10 @@ var yn = { exports: {} }, go;
|
|
|
7900
7900
|
function Us() {
|
|
7901
7901
|
return go || (go = 1, function(r) {
|
|
7902
7902
|
function e(t, s) {
|
|
7903
|
-
var
|
|
7903
|
+
var f = "Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";
|
|
7904
7904
|
(function(S) {
|
|
7905
7905
|
typeof RecordRTC == "undefined" && S && typeof window == "undefined" && typeof globalThis != "undefined" && (globalThis.navigator = {
|
|
7906
|
-
userAgent:
|
|
7906
|
+
userAgent: f,
|
|
7907
7907
|
getUserMedia: function() {
|
|
7908
7908
|
}
|
|
7909
7909
|
}, globalThis.console || (globalThis.console = {}), (typeof globalThis.console.log == "undefined" || typeof globalThis.console.error == "undefined") && (globalThis.console.error = globalThis.console.log = globalThis.console.log || function() {
|
|
@@ -7948,8 +7948,8 @@ function Us() {
|
|
|
7948
7948
|
}
|
|
7949
7949
|
}), S.window = globalThis);
|
|
7950
7950
|
})(typeof globalThis != "undefined" ? globalThis : null), s = s || "multi-streams-mixer";
|
|
7951
|
-
var l = [], g = !1,
|
|
7952
|
-
|
|
7951
|
+
var l = [], g = !1, u = document.createElement("canvas"), c = u.getContext("2d");
|
|
7952
|
+
u.style.opacity = 0, u.style.position = "absolute", u.style.zIndex = -1, u.style.top = "-1000em", u.style.left = "-1000em", u.className = s, (document.body || document.documentElement).appendChild(u), this.disableLogs = !1, this.frameInterval = 10, this.width = 360, this.height = 240, this.useGainNode = !0;
|
|
7953
7953
|
var v = this, h = window.AudioContext;
|
|
7954
7954
|
typeof h == "undefined" && (typeof webkitAudioContext != "undefined" && (h = webkitAudioContext), typeof mozAudioContext != "undefined" && (h = mozAudioContext));
|
|
7955
7955
|
var I = window.URL;
|
|
@@ -7974,13 +7974,13 @@ function Us() {
|
|
|
7974
7974
|
if (l.forEach(function(X) {
|
|
7975
7975
|
X.stream || (X.stream = {}), X.stream.fullcanvas ? C = X : M.push(X);
|
|
7976
7976
|
}), C)
|
|
7977
|
-
|
|
7977
|
+
u.width = C.stream.width, u.height = C.stream.height;
|
|
7978
7978
|
else if (M.length) {
|
|
7979
|
-
|
|
7979
|
+
u.width = S > 1 ? M[0].width * 2 : M[0].width;
|
|
7980
7980
|
var W = 1;
|
|
7981
|
-
(S === 3 || S === 4) && (W = 2), (S === 5 || S === 6) && (W = 3), (S === 7 || S === 8) && (W = 4), (S === 9 || S === 10) && (W = 5),
|
|
7981
|
+
(S === 3 || S === 4) && (W = 2), (S === 5 || S === 6) && (W = 3), (S === 7 || S === 8) && (W = 4), (S === 9 || S === 10) && (W = 5), u.height = M[0].height * W;
|
|
7982
7982
|
} else
|
|
7983
|
-
|
|
7983
|
+
u.width = v.width || 360, u.height = v.height || 240;
|
|
7984
7984
|
C && C instanceof HTMLVideoElement && T(C), M.forEach(function(X, te) {
|
|
7985
7985
|
T(X, te);
|
|
7986
7986
|
}), setTimeout(N, v.frameInterval);
|
|
@@ -8006,13 +8006,13 @@ function Us() {
|
|
|
8006
8006
|
function R() {
|
|
8007
8007
|
k();
|
|
8008
8008
|
var S;
|
|
8009
|
-
"captureStream" in
|
|
8009
|
+
"captureStream" in u ? S = u.captureStream() : "mozCaptureStream" in u ? S = u.mozCaptureStream() : v.disableLogs || console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");
|
|
8010
8010
|
var C = new B();
|
|
8011
8011
|
return S.getTracks().filter(function(M) {
|
|
8012
8012
|
return M.kind === "video";
|
|
8013
8013
|
}).forEach(function(M) {
|
|
8014
8014
|
C.addTrack(M);
|
|
8015
|
-
}),
|
|
8015
|
+
}), u.stream = C, C;
|
|
8016
8016
|
}
|
|
8017
8017
|
function A() {
|
|
8018
8018
|
q.AudioContextConstructor || (q.AudioContextConstructor = new q.AudioContext()), v.audioContext = q.AudioContextConstructor, v.audioSources = [], v.useGainNode === !0 && (v.gainNode = v.audioContext.createGain(), v.gainNode.connect(v.audioContext.destination), v.gainNode.gain.value = 0);
|
|
@@ -8060,7 +8060,7 @@ function Us() {
|
|
|
8060
8060
|
}, this.releaseStreams = function() {
|
|
8061
8061
|
l = [], g = !0, v.gainNode && (v.gainNode.disconnect(), v.gainNode = null), v.audioSources.length && (v.audioSources.forEach(function(S) {
|
|
8062
8062
|
S.disconnect();
|
|
8063
|
-
}), v.audioSources = []), v.audioDestination && (v.audioDestination.disconnect(), v.audioDestination = null), v.audioContext && v.audioContext.close(), v.audioContext = null, c.clearRect(0, 0,
|
|
8063
|
+
}), v.audioSources = []), v.audioDestination && (v.audioDestination.disconnect(), v.audioDestination = null), v.audioContext && v.audioContext.close(), v.audioContext = null, c.clearRect(0, 0, u.width, u.height), u.stream && (u.stream.stop(), u.stream = null);
|
|
8064
8064
|
}, this.resetVideoStreams = function(S) {
|
|
8065
8065
|
S && !(S instanceof Array) && (S = [S]), k(S);
|
|
8066
8066
|
};
|
|
@@ -8098,9 +8098,9 @@ class Ws extends qs {
|
|
|
8098
8098
|
qe(this, "currentStamp", 0);
|
|
8099
8099
|
qe(this, "start", () => (this.recognition.start(), this.recognition.stream = this.track, this.recognizing = !0, this.startTime = performance.now(), this));
|
|
8100
8100
|
qe(this, "stop", () => (this.recognition.stop(), this.recognizing = !1, this.endTime = performance.now(), this));
|
|
8101
|
-
("webkitSpeechRecognition" in window || "SpeechRecognition" in window) && (this.recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)(), this.recognition.continuous = !0, this.recognition.interimResults = !0, this.recognition.lang = s, this.track = t, this.recognition.onstart = this.emit("start"), this.recognition.onend = () => this.emit("end"), this.recognition.onresult = (
|
|
8102
|
-
const { results: l, resultIndex: g } =
|
|
8103
|
-
let
|
|
8101
|
+
("webkitSpeechRecognition" in window || "SpeechRecognition" in window) && (this.recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)(), this.recognition.continuous = !0, this.recognition.interimResults = !0, this.recognition.lang = s, this.track = t, this.recognition.onstart = this.emit("start"), this.recognition.onend = () => this.emit("end"), this.recognition.onresult = (f) => {
|
|
8102
|
+
const { results: l, resultIndex: g } = f;
|
|
8103
|
+
let u = "";
|
|
8104
8104
|
if (l[g].isFinal && l[g][0].transcript) {
|
|
8105
8105
|
const c = {
|
|
8106
8106
|
sentence: l[g][0].transcript,
|
|
@@ -8110,11 +8110,11 @@ class Ws extends qs {
|
|
|
8110
8110
|
};
|
|
8111
8111
|
this.transcripts.push(c), this.emit("sentence", c);
|
|
8112
8112
|
} else
|
|
8113
|
-
this.currentStamp = (/* @__PURE__ */ new Date()).getTime(),
|
|
8114
|
-
sentence:
|
|
8113
|
+
this.currentStamp = (/* @__PURE__ */ new Date()).getTime(), u += l[g][0].transcript, this.emit("interim", {
|
|
8114
|
+
sentence: u,
|
|
8115
8115
|
timeStamp: this.currentStamp
|
|
8116
8116
|
});
|
|
8117
|
-
this.emit("result",
|
|
8117
|
+
this.emit("result", f);
|
|
8118
8118
|
});
|
|
8119
8119
|
}
|
|
8120
8120
|
}
|
|
@@ -8125,21 +8125,21 @@ var Gs = Object.defineProperty, yo = Object.getOwnPropertySymbols, Vs = Object.p
|
|
|
8125
8125
|
for (var t of yo(e))
|
|
8126
8126
|
zs.call(e, t) && Sn(r, t, e[t]);
|
|
8127
8127
|
return r;
|
|
8128
|
-
}, st = (r, e, t) => Sn(r, typeof e != "symbol" ? e + "" : e, t), mn = (r, e, t) => new Promise((s,
|
|
8128
|
+
}, st = (r, e, t) => Sn(r, typeof e != "symbol" ? e + "" : e, t), mn = (r, e, t) => new Promise((s, f) => {
|
|
8129
8129
|
var l = (c) => {
|
|
8130
8130
|
try {
|
|
8131
|
-
|
|
8131
|
+
u(t.next(c));
|
|
8132
8132
|
} catch (v) {
|
|
8133
|
-
|
|
8133
|
+
f(v);
|
|
8134
8134
|
}
|
|
8135
8135
|
}, g = (c) => {
|
|
8136
8136
|
try {
|
|
8137
|
-
|
|
8137
|
+
u(t.throw(c));
|
|
8138
8138
|
} catch (v) {
|
|
8139
|
-
|
|
8139
|
+
f(v);
|
|
8140
8140
|
}
|
|
8141
|
-
},
|
|
8142
|
-
|
|
8141
|
+
}, u = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(l, g);
|
|
8142
|
+
u((t = t.apply(r, e)).next());
|
|
8143
8143
|
});
|
|
8144
8144
|
class Js {
|
|
8145
8145
|
constructor(e = {}, t = {}) {
|
|
@@ -8157,7 +8157,7 @@ class Js {
|
|
|
8157
8157
|
*/
|
|
8158
8158
|
startRecording(e, t) {
|
|
8159
8159
|
return mn(this, null, function* () {
|
|
8160
|
-
var s,
|
|
8160
|
+
var s, f, l, g;
|
|
8161
8161
|
try {
|
|
8162
8162
|
if (console.log(
|
|
8163
8163
|
"[CallRecorder] Starting recording with",
|
|
@@ -8168,8 +8168,8 @@ class Js {
|
|
|
8168
8168
|
if (!t)
|
|
8169
8169
|
throw new Error("Recording data is required");
|
|
8170
8170
|
this.mixer = new js(e), this.mixer.frameInterval = 1, this.mixer.startDrawingFrames();
|
|
8171
|
-
const
|
|
8172
|
-
|
|
8171
|
+
const u = e[0];
|
|
8172
|
+
u && u.getAudioTracks().length > 0 && (this.localTranscriber = new Ws(u)), MediaRecorder.isTypeSupported(this.config.mimeType) || (console.warn(
|
|
8173
8173
|
"[CallRecorder] Preferred mime type not supported, falling back to default"
|
|
8174
8174
|
), this.config.mimeType = "video/webm");
|
|
8175
8175
|
const c = this.mixer.getMixedStream();
|
|
@@ -8177,9 +8177,9 @@ class Js {
|
|
|
8177
8177
|
mimeType: this.config.mimeType,
|
|
8178
8178
|
videoBitsPerSecond: this.config.videoBitsPerSecond,
|
|
8179
8179
|
audioBitsPerSecond: this.config.audioBitsPerSecond
|
|
8180
|
-
}), this.setupRecorderEventHandlers(t), this.recorder.start(this.config.interval), this.isRecording = !0, this.localTranscriber && this.localTranscriber.start(), (
|
|
8181
|
-
} catch (
|
|
8182
|
-
throw console.error("[CallRecorder] Failed to start recording:",
|
|
8180
|
+
}), this.setupRecorderEventHandlers(t), this.recorder.start(this.config.interval), this.isRecording = !0, this.localTranscriber && this.localTranscriber.start(), (f = (s = this.callbacks).onRecordingStarted) == null || f.call(s, t), console.log("[CallRecorder] Recording started successfully");
|
|
8181
|
+
} catch (u) {
|
|
8182
|
+
throw console.error("[CallRecorder] Failed to start recording:", u), (g = (l = this.callbacks).onError) == null || g.call(l, u), u;
|
|
8183
8183
|
}
|
|
8184
8184
|
});
|
|
8185
8185
|
}
|
|
@@ -8211,16 +8211,16 @@ class Js {
|
|
|
8211
8211
|
*/
|
|
8212
8212
|
setupRecorderEventHandlers(e) {
|
|
8213
8213
|
this.recorder && (this.recorder.ondataavailable = (t) => {
|
|
8214
|
-
var s,
|
|
8215
|
-
t.data && t.data.size > 0 && ((
|
|
8214
|
+
var s, f;
|
|
8215
|
+
t.data && t.data.size > 0 && ((f = (s = this.callbacks).onRecordingChunk) == null || f.call(s, t.data, e));
|
|
8216
8216
|
}, this.recorder.onstart = () => {
|
|
8217
8217
|
console.log("[CallRecorder] MediaRecorder started");
|
|
8218
8218
|
}, this.recorder.onstop = () => {
|
|
8219
8219
|
var t, s;
|
|
8220
8220
|
console.log("[CallRecorder] MediaRecorder stopped"), (s = (t = this.callbacks).onRecordingStopped) == null || s.call(t, e);
|
|
8221
8221
|
}, this.recorder.onerror = (t) => {
|
|
8222
|
-
var s,
|
|
8223
|
-
console.error("[CallRecorder] MediaRecorder error:", t), (
|
|
8222
|
+
var s, f;
|
|
8223
|
+
console.error("[CallRecorder] MediaRecorder error:", t), (f = (s = this.callbacks).onError) == null || f.call(s, new Error(`Recording error: ${t}`));
|
|
8224
8224
|
});
|
|
8225
8225
|
}
|
|
8226
8226
|
/**
|
|
@@ -8284,21 +8284,21 @@ var Ys = Object.defineProperty, Ks = Object.defineProperties, Xs = Object.getOwn
|
|
|
8284
8284
|
for (var t of mo(e))
|
|
8285
8285
|
Qs.call(e, t) && _n(r, t, e[t]);
|
|
8286
8286
|
return r;
|
|
8287
|
-
}, tl = (r, e) => Ks(r, Xs(e)), We = (r, e, t) => _n(r, typeof e != "symbol" ? e + "" : e, t), ke = (r, e, t) => new Promise((s,
|
|
8287
|
+
}, tl = (r, e) => Ks(r, Xs(e)), We = (r, e, t) => _n(r, typeof e != "symbol" ? e + "" : e, t), ke = (r, e, t) => new Promise((s, f) => {
|
|
8288
8288
|
var l = (c) => {
|
|
8289
8289
|
try {
|
|
8290
|
-
|
|
8290
|
+
u(t.next(c));
|
|
8291
8291
|
} catch (v) {
|
|
8292
|
-
|
|
8292
|
+
f(v);
|
|
8293
8293
|
}
|
|
8294
8294
|
}, g = (c) => {
|
|
8295
8295
|
try {
|
|
8296
|
-
|
|
8296
|
+
u(t.throw(c));
|
|
8297
8297
|
} catch (v) {
|
|
8298
|
-
|
|
8298
|
+
f(v);
|
|
8299
8299
|
}
|
|
8300
|
-
},
|
|
8301
|
-
|
|
8300
|
+
}, u = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(l, g);
|
|
8301
|
+
u((t = t.apply(r, e)).next());
|
|
8302
8302
|
});
|
|
8303
8303
|
class rl extends Wo {
|
|
8304
8304
|
constructor(e, t = {}) {
|
|
@@ -8358,18 +8358,18 @@ class rl extends Wo {
|
|
|
8358
8358
|
yield this.localParticipant.initialize(l);
|
|
8359
8359
|
}
|
|
8360
8360
|
this.state.setIsCalling(!0), this.state.setCallStatus("connecting"), console.log("[PeersCaller] Starting call for room:", this.config.roomId);
|
|
8361
|
-
const
|
|
8362
|
-
if (console.log("[PeersCaller] Received call.start response:",
|
|
8363
|
-
this.state.setCallStatus("connected"),
|
|
8361
|
+
const f = yield this.socket.startCall(this.config.roomId);
|
|
8362
|
+
if (console.log("[PeersCaller] Received call.start response:", f), f.success)
|
|
8363
|
+
this.state.setCallStatus("connected"), f.participants.forEach((l) => {
|
|
8364
8364
|
l !== this.config.userId && this.handleParticipantJoined(l);
|
|
8365
|
-
}), console.log("[PeersCaller] Call started successfully"), (s = (t = this.callbacks).onCallStarted) == null || s.call(t,
|
|
8365
|
+
}), console.log("[PeersCaller] Call started successfully"), (s = (t = this.callbacks).onCallStarted) == null || s.call(t, f);
|
|
8366
8366
|
else {
|
|
8367
8367
|
this.state.setIsCalling(!1), this.state.setCallStatus("idle");
|
|
8368
8368
|
const l = "Failed to start call on server";
|
|
8369
8369
|
throw this.handleError("SIGNALING_ERROR", l), console.error("[PeersCaller] Call start failed:", l), new Error(l);
|
|
8370
8370
|
}
|
|
8371
|
-
} catch (
|
|
8372
|
-
throw console.error("[PeersCaller] Failed to start call:",
|
|
8371
|
+
} catch (f) {
|
|
8372
|
+
throw console.error("[PeersCaller] Failed to start call:", f), this.handleError("MEDIA_ACCESS_DENIED", `Failed to start call: ${f}`), f;
|
|
8373
8373
|
}
|
|
8374
8374
|
});
|
|
8375
8375
|
}
|
|
@@ -8388,19 +8388,19 @@ class rl extends Wo {
|
|
|
8388
8388
|
`Cannot join call: ${t.status === "full" ? "Call is full" : "Unable to join"}`
|
|
8389
8389
|
);
|
|
8390
8390
|
if (this.state.setCallStatus("connecting"), this.localParticipant && !this.localParticipant.getCurrentStream()) {
|
|
8391
|
-
const
|
|
8391
|
+
const f = {
|
|
8392
8392
|
video: typeof (e == null ? void 0 : e.video) == "boolean" ? e.video : !0,
|
|
8393
8393
|
audio: typeof (e == null ? void 0 : e.audio) == "boolean" ? e.audio : !0
|
|
8394
8394
|
};
|
|
8395
8395
|
console.log(
|
|
8396
8396
|
"[PeersCaller] Initializing local media with config:",
|
|
8397
|
-
|
|
8398
|
-
), yield this.localParticipant.initialize(
|
|
8397
|
+
f
|
|
8398
|
+
), yield this.localParticipant.initialize(f);
|
|
8399
8399
|
}
|
|
8400
8400
|
console.log("[PeersCaller] Joining call for room:", this.config.roomId);
|
|
8401
8401
|
const s = yield this.socket.joinRoom(this.config.roomId);
|
|
8402
|
-
console.log("[PeersCaller] Received call.join response:", s), this.state.setCallStatus("connected"), this.state.setIsCalling(!0), s.participants.forEach((
|
|
8403
|
-
|
|
8402
|
+
console.log("[PeersCaller] Received call.join response:", s), this.state.setCallStatus("connected"), this.state.setIsCalling(!0), s.participants.forEach((f) => {
|
|
8403
|
+
f !== this.config.userId && this.handleParticipantJoined(f);
|
|
8404
8404
|
}), console.log("[PeersCaller] Joined call successfully");
|
|
8405
8405
|
} catch (t) {
|
|
8406
8406
|
throw console.error("[PeersCaller] Failed to join call:", t), this.state.setCallStatus("idle"), this.handleError("INVALID_ROOM_ID", `Failed to join call: ${t}`), t;
|
|
@@ -8502,22 +8502,22 @@ class rl extends Wo {
|
|
|
8502
8502
|
console.warn("[PeersCaller] Recording already in progress");
|
|
8503
8503
|
return;
|
|
8504
8504
|
}
|
|
8505
|
-
const
|
|
8506
|
-
l &&
|
|
8505
|
+
const f = [], l = (s = this.localParticipant) == null ? void 0 : s.getCurrentStream();
|
|
8506
|
+
l && f.push(l);
|
|
8507
8507
|
for (const g of this.participants.values()) {
|
|
8508
|
-
const
|
|
8509
|
-
u.push(
|
|
8508
|
+
const u = g.getCurrentStream();
|
|
8509
|
+
u && f.push(u);
|
|
8510
8510
|
}
|
|
8511
|
-
if (
|
|
8511
|
+
if (f.length === 0)
|
|
8512
8512
|
throw new Error("No streams available for recording");
|
|
8513
8513
|
this.recorder = new Js(t, {
|
|
8514
8514
|
onRecordingStarted: (g) => {
|
|
8515
8515
|
this.socket.startRecording(this.config.roomId, g.id);
|
|
8516
8516
|
},
|
|
8517
|
-
onRecordingChunk: (g,
|
|
8517
|
+
onRecordingChunk: (g, u) => {
|
|
8518
8518
|
this.socket.sendRecordingChunk(
|
|
8519
8519
|
this.config.roomId,
|
|
8520
|
-
|
|
8520
|
+
u.id,
|
|
8521
8521
|
g
|
|
8522
8522
|
);
|
|
8523
8523
|
},
|
|
@@ -8530,12 +8530,12 @@ class rl extends Wo {
|
|
|
8530
8530
|
onError: (g) => {
|
|
8531
8531
|
this.handleError("RECORDING_FAILED", g.message);
|
|
8532
8532
|
}
|
|
8533
|
-
}), yield this.recorder.startRecording(
|
|
8534
|
-
} catch (
|
|
8535
|
-
throw console.error("[PeersCaller] Failed to start recording:",
|
|
8533
|
+
}), yield this.recorder.startRecording(f, e), this.state.setIsRecording(!0), console.log("[PeersCaller] Recording started successfully");
|
|
8534
|
+
} catch (f) {
|
|
8535
|
+
throw console.error("[PeersCaller] Failed to start recording:", f), this.handleError(
|
|
8536
8536
|
"RECORDING_FAILED",
|
|
8537
|
-
`Failed to start recording: ${
|
|
8538
|
-
),
|
|
8537
|
+
`Failed to start recording: ${f}`
|
|
8538
|
+
), f;
|
|
8539
8539
|
}
|
|
8540
8540
|
});
|
|
8541
8541
|
}
|
|
@@ -8654,10 +8654,10 @@ class rl extends Wo {
|
|
|
8654
8654
|
});
|
|
8655
8655
|
};
|
|
8656
8656
|
this.socket.on("call.participants", s), this.eventListeners.set("call.participants", s);
|
|
8657
|
-
const
|
|
8657
|
+
const f = () => {
|
|
8658
8658
|
this.state.setIsCalling(!1);
|
|
8659
8659
|
};
|
|
8660
|
-
this.socket.on("call.left",
|
|
8660
|
+
this.socket.on("call.left", f), this.eventListeners.set("call.left", f);
|
|
8661
8661
|
const l = (T) => {
|
|
8662
8662
|
var m, R;
|
|
8663
8663
|
console.error("[PeersCaller] Server error:", T), (R = (m = this.callbacks).onError) == null || R.call(m, T.error, T.message);
|
|
@@ -8667,10 +8667,10 @@ class rl extends Wo {
|
|
|
8667
8667
|
this.handleOffer(T.from, T.offer);
|
|
8668
8668
|
};
|
|
8669
8669
|
this.socket.on("call.offer", g), this.eventListeners.set("call.offer", g);
|
|
8670
|
-
const
|
|
8670
|
+
const u = (T) => {
|
|
8671
8671
|
this.handleAnswer(T.from, T.answer);
|
|
8672
8672
|
};
|
|
8673
|
-
this.socket.on("call.answer",
|
|
8673
|
+
this.socket.on("call.answer", u), this.eventListeners.set("call.answer", u);
|
|
8674
8674
|
const c = (T) => {
|
|
8675
8675
|
this.handleCandidate(T.from, T.candidate);
|
|
8676
8676
|
};
|
|
@@ -8732,32 +8732,32 @@ class rl extends Wo {
|
|
|
8732
8732
|
return;
|
|
8733
8733
|
}
|
|
8734
8734
|
console.log(`[PeersCaller] Participant ${e} joined`);
|
|
8735
|
-
const
|
|
8735
|
+
const f = new po(
|
|
8736
8736
|
e,
|
|
8737
8737
|
{
|
|
8738
|
-
onStreamReceived: (
|
|
8738
|
+
onStreamReceived: (u, c) => {
|
|
8739
8739
|
var v, h;
|
|
8740
|
-
(h = (v = this.callbacks).onStreamReceived) == null || h.call(v,
|
|
8740
|
+
(h = (v = this.callbacks).onStreamReceived) == null || h.call(v, u, c);
|
|
8741
8741
|
},
|
|
8742
|
-
onPeerConnected: (
|
|
8742
|
+
onPeerConnected: (u) => {
|
|
8743
8743
|
console.log(
|
|
8744
|
-
`[PeersCaller] Peer connection established with ${
|
|
8744
|
+
`[PeersCaller] Peer connection established with ${u}`
|
|
8745
8745
|
);
|
|
8746
8746
|
},
|
|
8747
|
-
onPeerDisconnected: (
|
|
8748
|
-
this.handleParticipantLeft(
|
|
8747
|
+
onPeerDisconnected: (u) => {
|
|
8748
|
+
this.handleParticipantLeft(u);
|
|
8749
8749
|
},
|
|
8750
|
-
onSignal: (
|
|
8751
|
-
this.forwardSignalToServer(
|
|
8750
|
+
onSignal: (u, c, v) => {
|
|
8751
|
+
this.forwardSignalToServer(u, c, v);
|
|
8752
8752
|
},
|
|
8753
|
-
onError: (
|
|
8754
|
-
this.handleError("PEER_CONNECTION_FAILED",
|
|
8753
|
+
onError: (u) => {
|
|
8754
|
+
this.handleError("PEER_CONNECTION_FAILED", u.message);
|
|
8755
8755
|
}
|
|
8756
8756
|
},
|
|
8757
8757
|
!1
|
|
8758
8758
|
// isLocalParticipant = false
|
|
8759
8759
|
);
|
|
8760
|
-
if (this.participants.set(e,
|
|
8760
|
+
if (this.participants.set(e, f), !this.localParticipant) {
|
|
8761
8761
|
console.error(
|
|
8762
8762
|
"[PeersCaller] Cannot create peer connection - local participant not initialized"
|
|
8763
8763
|
);
|
|
@@ -8778,10 +8778,10 @@ class rl extends Wo {
|
|
|
8778
8778
|
audioOn: !0,
|
|
8779
8779
|
screenSharing: !1
|
|
8780
8780
|
});
|
|
8781
|
-
} catch (
|
|
8781
|
+
} catch (f) {
|
|
8782
8782
|
console.error(
|
|
8783
8783
|
`[PeersCaller] Failed to handle participant ${e} joining:`,
|
|
8784
|
-
|
|
8784
|
+
f
|
|
8785
8785
|
);
|
|
8786
8786
|
}
|
|
8787
8787
|
});
|
|
@@ -8886,8 +8886,8 @@ class rl extends Wo {
|
|
|
8886
8886
|
* Handle participant state update
|
|
8887
8887
|
*/
|
|
8888
8888
|
handleParticipantStateUpdate(e, t) {
|
|
8889
|
-
var s,
|
|
8890
|
-
this.state.updateParticipant(e, t), (
|
|
8889
|
+
var s, f;
|
|
8890
|
+
this.state.updateParticipant(e, t), (f = (s = this.callbacks).onParticipantStateChanged) == null || f.call(s, e, t);
|
|
8891
8891
|
}
|
|
8892
8892
|
/**
|
|
8893
8893
|
* Handle participant left
|
|
@@ -8895,8 +8895,8 @@ class rl extends Wo {
|
|
|
8895
8895
|
handleParticipantLeft(e) {
|
|
8896
8896
|
var t, s;
|
|
8897
8897
|
console.log(`[PeersCaller] Participant ${e} left`);
|
|
8898
|
-
const
|
|
8899
|
-
|
|
8898
|
+
const f = this.participants.get(e);
|
|
8899
|
+
f && (f.cleanup(), this.participants.delete(e)), this.state.removeParticipant(e), (s = (t = this.callbacks).onParticipantLeft) == null || s.call(t, e);
|
|
8900
8900
|
}
|
|
8901
8901
|
/**
|
|
8902
8902
|
* Handle call ended notification from server
|
|
@@ -8909,8 +8909,8 @@ class rl extends Wo {
|
|
|
8909
8909
|
);
|
|
8910
8910
|
try {
|
|
8911
8911
|
this.recorder && this.state.isRecording && (yield this.stopRecording()), this.cleanupAllParticipants(), this.state.setIsCalling(!1), this.state.setCallStatus("idle"), this.state.clearParticipants(), (s = (t = this.callbacks).onCallEnded) == null || s.call(t, e), console.log("[PeersCaller] Call ended cleanup completed");
|
|
8912
|
-
} catch (
|
|
8913
|
-
console.error("[PeersCaller] Error handling call ended:",
|
|
8912
|
+
} catch (f) {
|
|
8913
|
+
console.error("[PeersCaller] Error handling call ended:", f);
|
|
8914
8914
|
}
|
|
8915
8915
|
});
|
|
8916
8916
|
}
|
|
@@ -8940,8 +8940,8 @@ class rl extends Wo {
|
|
|
8940
8940
|
* Handle errors with proper categorization
|
|
8941
8941
|
*/
|
|
8942
8942
|
handleError(e, t) {
|
|
8943
|
-
var s,
|
|
8944
|
-
console.error(`[PeersCaller] ${e}: ${t}`), this.state.setError(e, t), (
|
|
8943
|
+
var s, f;
|
|
8944
|
+
console.error(`[PeersCaller] ${e}: ${t}`), this.state.setError(e, t), (f = (s = this.callbacks).onError) == null || f.call(s, e, t);
|
|
8945
8945
|
}
|
|
8946
8946
|
/**
|
|
8947
8947
|
* Fetch ICE servers from the backend
|
|
@@ -8999,39 +8999,39 @@ class rl extends Wo {
|
|
|
8999
8999
|
), this.config.debug && console.log("[PeersCaller] Unknown signal data:", s);
|
|
9000
9000
|
break;
|
|
9001
9001
|
}
|
|
9002
|
-
} catch (
|
|
9002
|
+
} catch (f) {
|
|
9003
9003
|
console.error(
|
|
9004
9004
|
`[PeersCaller] Failed to forward signal from ${e} to ${t}:`,
|
|
9005
|
-
|
|
9006
|
-
), this.handleError("SIGNALING_ERROR", `Failed to forward signal: ${
|
|
9005
|
+
f
|
|
9006
|
+
), this.handleError("SIGNALING_ERROR", `Failed to forward signal: ${f}`);
|
|
9007
9007
|
}
|
|
9008
9008
|
}
|
|
9009
9009
|
}
|
|
9010
|
-
var Je = (r, e, t) => new Promise((s,
|
|
9010
|
+
var Je = (r, e, t) => new Promise((s, f) => {
|
|
9011
9011
|
var l = (c) => {
|
|
9012
9012
|
try {
|
|
9013
|
-
|
|
9013
|
+
u(t.next(c));
|
|
9014
9014
|
} catch (v) {
|
|
9015
|
-
|
|
9015
|
+
f(v);
|
|
9016
9016
|
}
|
|
9017
9017
|
}, g = (c) => {
|
|
9018
9018
|
try {
|
|
9019
|
-
|
|
9019
|
+
u(t.throw(c));
|
|
9020
9020
|
} catch (v) {
|
|
9021
|
-
|
|
9021
|
+
f(v);
|
|
9022
9022
|
}
|
|
9023
|
-
},
|
|
9024
|
-
|
|
9023
|
+
}, u = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(l, g);
|
|
9024
|
+
u((t = t.apply(r, e)).next());
|
|
9025
9025
|
});
|
|
9026
9026
|
function _l(r) {
|
|
9027
|
-
const [e, t] = it(null), [s,
|
|
9027
|
+
const [e, t] = it(null), [s, f] = it(!1), l = Xo(!1), g = Ue((C) => C), u = Object.values(
|
|
9028
9028
|
Ue((C) => C.participants)
|
|
9029
9029
|
), c = Ue((C) => C.localParticipant), v = Ue((C) => C.callStatus === "connected"), h = Ue((C) => C.isRecording), I = Ue((C) => C.error), B = Fe(() => Je(null, null, function* () {
|
|
9030
9030
|
if (!(l.current || e))
|
|
9031
9031
|
try {
|
|
9032
9032
|
l.current = !0;
|
|
9033
9033
|
const C = new rl(r, r.callbacks);
|
|
9034
|
-
yield C.initialize(), t(C),
|
|
9034
|
+
yield C.initialize(), t(C), f(!0);
|
|
9035
9035
|
} catch (C) {
|
|
9036
9036
|
throw console.error("[useVideoCall] Failed to initialize:", C), l.current = !1, C;
|
|
9037
9037
|
}
|
|
@@ -9081,7 +9081,7 @@ function _l(r) {
|
|
|
9081
9081
|
if (!e) throw new Error("PeersCaller not initialized");
|
|
9082
9082
|
return e.stopRecording();
|
|
9083
9083
|
}), [e]), S = Fe(() => {
|
|
9084
|
-
e && (e.cleanup(), t(null),
|
|
9084
|
+
e && (e.cleanup(), t(null), f(!1), l.current = !1);
|
|
9085
9085
|
}, [e]);
|
|
9086
9086
|
return ct(() => {
|
|
9087
9087
|
r.autoInitialize && !s && !l.current && B().catch(console.error);
|
|
@@ -9103,7 +9103,7 @@ function _l(r) {
|
|
|
9103
9103
|
stopRecording: k,
|
|
9104
9104
|
// State
|
|
9105
9105
|
callState: g,
|
|
9106
|
-
participants:
|
|
9106
|
+
participants: u,
|
|
9107
9107
|
localParticipant: c,
|
|
9108
9108
|
isConnected: v,
|
|
9109
9109
|
isRecording: h,
|
|
@@ -9116,13 +9116,13 @@ function _l(r) {
|
|
|
9116
9116
|
function El(r) {
|
|
9117
9117
|
const [e, t] = it(
|
|
9118
9118
|
null
|
|
9119
|
-
), [s,
|
|
9119
|
+
), [s, f] = it(null), l = Ue((g) => g.participants[r]);
|
|
9120
9120
|
return ct(() => {
|
|
9121
9121
|
var g;
|
|
9122
9122
|
if (l != null && l.stream) {
|
|
9123
|
-
if (
|
|
9124
|
-
const
|
|
9125
|
-
|
|
9123
|
+
if (f(l.stream), !e) {
|
|
9124
|
+
const u = document.createElement("video");
|
|
9125
|
+
u.autoplay = !0, u.playsInline = !0, u.muted = r === ((g = Ue.getState().localParticipant) == null ? void 0 : g.userId), t(u);
|
|
9126
9126
|
}
|
|
9127
9127
|
e && (e.srcObject = l.stream);
|
|
9128
9128
|
}
|
|
@@ -9152,49 +9152,49 @@ function Cl() {
|
|
|
9152
9152
|
};
|
|
9153
9153
|
}
|
|
9154
9154
|
function Rl() {
|
|
9155
|
-
const [r, e] = it({ videoDevices: [], audioDevices: [] }), [t, s] = it({ camera: null, microphone: null }),
|
|
9155
|
+
const [r, e] = it({ videoDevices: [], audioDevices: [] }), [t, s] = it({ camera: null, microphone: null }), f = Fe(() => Je(null, null, function* () {
|
|
9156
9156
|
try {
|
|
9157
|
-
const
|
|
9157
|
+
const u = yield navigator.mediaDevices.enumerateDevices();
|
|
9158
9158
|
e({
|
|
9159
|
-
videoDevices:
|
|
9160
|
-
audioDevices:
|
|
9159
|
+
videoDevices: u.filter((c) => c.kind === "videoinput"),
|
|
9160
|
+
audioDevices: u.filter((c) => c.kind === "audioinput")
|
|
9161
9161
|
});
|
|
9162
|
-
} catch (
|
|
9163
|
-
console.error("[useMediaDevices] Failed to get devices:",
|
|
9162
|
+
} catch (u) {
|
|
9163
|
+
console.error("[useMediaDevices] Failed to get devices:", u);
|
|
9164
9164
|
}
|
|
9165
9165
|
}), []), l = Fe(() => Je(null, null, function* () {
|
|
9166
9166
|
try {
|
|
9167
9167
|
if ("permissions" in navigator) {
|
|
9168
|
-
const
|
|
9168
|
+
const u = yield navigator.permissions.query({
|
|
9169
9169
|
name: "camera"
|
|
9170
9170
|
}), c = yield navigator.permissions.query({
|
|
9171
9171
|
name: "microphone"
|
|
9172
9172
|
});
|
|
9173
9173
|
s({
|
|
9174
|
-
camera:
|
|
9174
|
+
camera: u.state,
|
|
9175
9175
|
microphone: c.state
|
|
9176
9176
|
});
|
|
9177
9177
|
}
|
|
9178
|
-
} catch (
|
|
9179
|
-
console.error("[useMediaDevices] Failed to check permissions:",
|
|
9178
|
+
} catch (u) {
|
|
9179
|
+
console.error("[useMediaDevices] Failed to check permissions:", u);
|
|
9180
9180
|
}
|
|
9181
9181
|
}), []), g = Fe(() => Je(null, null, function* () {
|
|
9182
9182
|
try {
|
|
9183
9183
|
return (yield navigator.mediaDevices.getUserMedia({
|
|
9184
9184
|
video: !0,
|
|
9185
9185
|
audio: !0
|
|
9186
|
-
})).getTracks().forEach((c) => c.stop()), yield l(), yield
|
|
9187
|
-
} catch (
|
|
9188
|
-
return console.error("[useMediaDevices] Failed to request permissions:",
|
|
9186
|
+
})).getTracks().forEach((c) => c.stop()), yield l(), yield f(), !0;
|
|
9187
|
+
} catch (u) {
|
|
9188
|
+
return console.error("[useMediaDevices] Failed to request permissions:", u), !1;
|
|
9189
9189
|
}
|
|
9190
|
-
}), [l,
|
|
9190
|
+
}), [l, f]);
|
|
9191
9191
|
return ct(() => {
|
|
9192
|
-
var
|
|
9193
|
-
|
|
9192
|
+
var u;
|
|
9193
|
+
f(), l();
|
|
9194
9194
|
const c = () => {
|
|
9195
|
-
|
|
9195
|
+
f();
|
|
9196
9196
|
};
|
|
9197
|
-
return (
|
|
9197
|
+
return (u = navigator.mediaDevices) == null || u.addEventListener(
|
|
9198
9198
|
"devicechange",
|
|
9199
9199
|
c
|
|
9200
9200
|
), () => {
|
|
@@ -9204,10 +9204,10 @@ function Rl() {
|
|
|
9204
9204
|
c
|
|
9205
9205
|
);
|
|
9206
9206
|
};
|
|
9207
|
-
}, [
|
|
9207
|
+
}, [f, l]), {
|
|
9208
9208
|
devices: r,
|
|
9209
9209
|
permissions: t,
|
|
9210
|
-
getDevices:
|
|
9210
|
+
getDevices: f,
|
|
9211
9211
|
checkPermissions: l,
|
|
9212
9212
|
requestPermissions: g
|
|
9213
9213
|
};
|
|
@@ -9246,8 +9246,8 @@ const Al = () => `peer_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`
|
|
|
9246
9246
|
};
|
|
9247
9247
|
};
|
|
9248
9248
|
function kl(r, e, t) {
|
|
9249
|
-
const s = `[${r}] ${e}`,
|
|
9250
|
-
return t && (
|
|
9249
|
+
const s = `[${r}] ${e}`, f = new Error(s);
|
|
9250
|
+
return t && (f.details = t), f;
|
|
9251
9251
|
}
|
|
9252
9252
|
function Ol() {
|
|
9253
9253
|
const r = {
|