@sawport/peers-caller 1.0.0-alpha.1 → 1.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/CallMediaStream.d.ts +34 -3
- package/dist/core/CallMediaStream.d.ts.map +1 -1
- package/dist/core/CallParticipant.d.ts +2 -0
- package/dist/core/CallParticipant.d.ts.map +1 -1
- package/dist/core/CallPeerConnection.d.ts +8 -0
- package/dist/core/CallPeerConnection.d.ts.map +1 -1
- package/dist/core/CallSocket.d.ts +7 -0
- package/dist/core/CallSocket.d.ts.map +1 -1
- package/dist/core/PeersCaller.d.ts +4 -0
- package/dist/core/PeersCaller.d.ts.map +1 -1
- package/dist/peers-caller.es.js +1246 -1080
- package/dist/peers-caller.es.js.map +1 -1
- package/dist/peers-caller.umd.js +11 -11
- 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.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/peers-caller.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var Eo = Object.defineProperty, Ro = Object.defineProperties;
|
|
2
2
|
var Po = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var tt = Object.getOwnPropertySymbols;
|
|
4
4
|
var un = Object.prototype.hasOwnProperty, fn = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var ne = Math.pow, mt = (n, e, t) => e in n ? Eo(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, He = (n, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
7
|
un.call(e, t) && mt(n, t, e[t]);
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
8
|
+
if (tt)
|
|
9
|
+
for (var t of tt(e))
|
|
10
10
|
fn.call(e, t) && mt(n, t, e[t]);
|
|
11
11
|
return n;
|
|
12
12
|
}, vt = (n, e) => Ro(n, Po(e));
|
|
@@ -14,8 +14,8 @@ var bt = (n, e) => {
|
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var o in n)
|
|
16
16
|
un.call(n, o) && e.indexOf(o) < 0 && (t[o] = n[o]);
|
|
17
|
-
if (n != null &&
|
|
18
|
-
for (var o of
|
|
17
|
+
if (n != null && tt)
|
|
18
|
+
for (var o of tt(n))
|
|
19
19
|
e.indexOf(o) < 0 && fn.call(n, o) && (t[o] = n[o]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
@@ -35,7 +35,7 @@ typeof wt == "undefined" ? globalThis.process = {
|
|
|
35
35
|
setTimeout(() => n(...e), 0);
|
|
36
36
|
});
|
|
37
37
|
typeof globalThis == "undefined" && (globalThis.global = globalThis);
|
|
38
|
-
var Oo = Object.defineProperty, ko = (n, e, t) => e in n ? Oo(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t,
|
|
38
|
+
var Oo = Object.defineProperty, ko = (n, e, t) => e in n ? Oo(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Me = (n, e, t) => ko(n, typeof e != "symbol" ? e + "" : e, t), Ae = (n, e, t) => new Promise((o, l) => {
|
|
39
39
|
var c = (f) => {
|
|
40
40
|
try {
|
|
41
41
|
a(t.next(f));
|
|
@@ -51,15 +51,15 @@ var Oo = Object.defineProperty, ko = (n, e, t) => e in n ? Oo(n, e, { enumerable
|
|
|
51
51
|
}, a = (f) => f.done ? o(f.value) : Promise.resolve(f.value).then(c, E);
|
|
52
52
|
a((t = t.apply(n, e)).next());
|
|
53
53
|
});
|
|
54
|
-
class
|
|
54
|
+
class Mo {
|
|
55
55
|
constructor(e, t, o = "/apis/video-call") {
|
|
56
|
-
|
|
56
|
+
Me(this, "socket", null), Me(this, "serverUrl"), Me(this, "socketPath"), Me(this, "token"), Me(this, "connected", !1), Me(this, "reconnectAttempts", 0), Me(this, "maxReconnectAttempts", 5), this.serverUrl = e, this.token = t, this.socketPath = o;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
59
|
* Connect to the WebSocket server
|
|
60
60
|
*/
|
|
61
61
|
connect() {
|
|
62
|
-
return
|
|
62
|
+
return Ae(this, null, function* () {
|
|
63
63
|
return this.socket && this.socket.connected ? Promise.resolve() : (this.socket && (this.socket.removeAllListeners(), this.socket.disconnect(), this.socket = null), new Promise((e, t) => {
|
|
64
64
|
try {
|
|
65
65
|
this.socket = Ao(this.serverUrl, {
|
|
@@ -116,7 +116,7 @@ class Bo {
|
|
|
116
116
|
* Emit a signaling event and wait for response
|
|
117
117
|
*/
|
|
118
118
|
emitWithResponse(e, t, o = 1e4) {
|
|
119
|
-
return
|
|
119
|
+
return Ae(this, null, function* () {
|
|
120
120
|
if (!this.isConnected())
|
|
121
121
|
throw new Error("Socket not connected");
|
|
122
122
|
return console.log(`[CallSocket] Emitting ${e} with response:`, t), new Promise((l, c) => {
|
|
@@ -148,7 +148,7 @@ class Bo {
|
|
|
148
148
|
* Start a new call
|
|
149
149
|
*/
|
|
150
150
|
startCall(e) {
|
|
151
|
-
return
|
|
151
|
+
return Ae(this, null, function* () {
|
|
152
152
|
return this.emitWithResponse("call.start", { roomId: e });
|
|
153
153
|
});
|
|
154
154
|
}
|
|
@@ -156,7 +156,7 @@ class Bo {
|
|
|
156
156
|
* Join a call room for signaling
|
|
157
157
|
*/
|
|
158
158
|
joinRoom(e) {
|
|
159
|
-
return
|
|
159
|
+
return Ae(this, null, function* () {
|
|
160
160
|
return this.emitWithResponse("call.join", { roomId: e });
|
|
161
161
|
});
|
|
162
162
|
}
|
|
@@ -164,7 +164,7 @@ class Bo {
|
|
|
164
164
|
* Leave a call
|
|
165
165
|
*/
|
|
166
166
|
leaveCall(e) {
|
|
167
|
-
return
|
|
167
|
+
return Ae(this, null, function* () {
|
|
168
168
|
return this.emitWithResponse("call.leave", { roomId: e });
|
|
169
169
|
});
|
|
170
170
|
}
|
|
@@ -202,7 +202,7 @@ class Bo {
|
|
|
202
202
|
* End call for all participants
|
|
203
203
|
*/
|
|
204
204
|
endCallForAll(e) {
|
|
205
|
-
return
|
|
205
|
+
return Ae(this, null, function* () {
|
|
206
206
|
this.emit("call.end", { roomId: e });
|
|
207
207
|
});
|
|
208
208
|
}
|
|
@@ -210,7 +210,7 @@ class Bo {
|
|
|
210
210
|
* Start recording
|
|
211
211
|
*/
|
|
212
212
|
startRecording(e, t) {
|
|
213
|
-
return
|
|
213
|
+
return Ae(this, null, function* () {
|
|
214
214
|
return this.emitWithResponse("call.recording.start", {
|
|
215
215
|
roomId: e,
|
|
216
216
|
recordingId: t
|
|
@@ -227,7 +227,7 @@ class Bo {
|
|
|
227
227
|
* End recording
|
|
228
228
|
*/
|
|
229
229
|
endRecording(e, t) {
|
|
230
|
-
return
|
|
230
|
+
return Ae(this, null, function* () {
|
|
231
231
|
return this.emitWithResponse("call.recording.end", {
|
|
232
232
|
roomId: e,
|
|
233
233
|
recordingId: t
|
|
@@ -248,10 +248,18 @@ class Bo {
|
|
|
248
248
|
* Check call status
|
|
249
249
|
*/
|
|
250
250
|
checkCallStatus(e) {
|
|
251
|
-
return
|
|
251
|
+
return Ae(this, null, function* () {
|
|
252
252
|
return this.emitWithResponse("call.status", { roomId: e });
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
|
+
/**
|
|
256
|
+
* Get ICE servers from backend
|
|
257
|
+
*/
|
|
258
|
+
getIceServers(e) {
|
|
259
|
+
return Ae(this, null, function* () {
|
|
260
|
+
return this.emitWithResponse("call.ice-servers", { roomId: e });
|
|
261
|
+
});
|
|
262
|
+
}
|
|
255
263
|
/**
|
|
256
264
|
* Handle disconnection scenarios
|
|
257
265
|
*/
|
|
@@ -279,7 +287,7 @@ class Bo {
|
|
|
279
287
|
};
|
|
280
288
|
}
|
|
281
289
|
}
|
|
282
|
-
var
|
|
290
|
+
var Bo = Object.defineProperty, Lo = (n, e, t) => e in n ? Bo(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Je = (n, e, t) => Lo(n, typeof e != "symbol" ? e + "" : e, t), rt = (n, e, t) => new Promise((o, l) => {
|
|
283
291
|
var c = (f) => {
|
|
284
292
|
try {
|
|
285
293
|
a(t.next(f));
|
|
@@ -297,7 +305,7 @@ var Mo = Object.defineProperty, Lo = (n, e, t) => e in n ? Mo(n, e, { enumerable
|
|
|
297
305
|
});
|
|
298
306
|
class No {
|
|
299
307
|
constructor(e = { video: !0, audio: !0 }) {
|
|
300
|
-
|
|
308
|
+
Je(this, "cameraStream", null), Je(this, "screenStream", null), Je(this, "videoElement", null), Je(this, "constraints"), Je(this, "isScreenShare", !1), this.constraints = e;
|
|
301
309
|
}
|
|
302
310
|
/**
|
|
303
311
|
* Initialize media stream with camera and microphone
|
|
@@ -308,7 +316,9 @@ class No {
|
|
|
308
316
|
return console.log(
|
|
309
317
|
"[CallMediaStream] Initializing media stream with constraints:",
|
|
310
318
|
this.constraints
|
|
311
|
-
), this.
|
|
319
|
+
), this.cameraStream = yield navigator.mediaDevices.getUserMedia(
|
|
320
|
+
this.constraints
|
|
321
|
+
), console.log("[CallMediaStream] Media stream initialized successfully"), this.cameraStream;
|
|
312
322
|
} catch (e) {
|
|
313
323
|
throw console.error(
|
|
314
324
|
"[CallMediaStream] Failed to initialize media stream:",
|
|
@@ -323,14 +333,12 @@ class No {
|
|
|
323
333
|
startScreenShare() {
|
|
324
334
|
return rt(this, arguments, function* (e = { video: !0, audio: !1 }) {
|
|
325
335
|
try {
|
|
326
|
-
console.log("[CallMediaStream] Starting screen share")
|
|
327
|
-
const t = yield navigator.mediaDevices.getDisplayMedia({
|
|
336
|
+
return console.log("[CallMediaStream] Starting screen share"), this.screenStream = yield navigator.mediaDevices.getDisplayMedia({
|
|
328
337
|
video: e.video,
|
|
329
338
|
audio: e.audio
|
|
330
|
-
}),
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
}), console.log("[CallMediaStream] Screen share started successfully"), t;
|
|
339
|
+
}), this.isScreenShare = !0, this.screenStream.getVideoTracks()[0].addEventListener("ended", () => {
|
|
340
|
+
console.log("[CallMediaStream] Screen share ended by user"), this.stopScreenShare();
|
|
341
|
+
}), console.log("[CallMediaStream] Screen share started successfully"), this.screenStream;
|
|
334
342
|
} catch (t) {
|
|
335
343
|
throw console.error("[CallMediaStream] Failed to start screen share:", t), this.handleMediaError(t);
|
|
336
344
|
}
|
|
@@ -339,12 +347,20 @@ class No {
|
|
|
339
347
|
/**
|
|
340
348
|
* Stop screen sharing and revert to camera
|
|
341
349
|
*/
|
|
342
|
-
stopScreenShare(
|
|
350
|
+
stopScreenShare() {
|
|
343
351
|
return rt(this, null, function* () {
|
|
344
352
|
try {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
353
|
+
if (console.log("[CallMediaStream] Stopping screen share"), this.screenStream && this.isScreenShare && (this.screenStream.getTracks().forEach((e) => e.stop()), this.screenStream = null), !this.cameraStream)
|
|
354
|
+
this.cameraStream = yield this.initialize();
|
|
355
|
+
else {
|
|
356
|
+
const e = this.cameraStream.getVideoTracks();
|
|
357
|
+
(e.length === 0 || e[0].readyState === "ended") && (console.log(
|
|
358
|
+
"[CallMediaStream] Camera stream is inactive, reinitializing"
|
|
359
|
+
), this.cameraStream = yield this.initialize());
|
|
360
|
+
}
|
|
361
|
+
return this.isScreenShare = !1, console.log("[CallMediaStream] Reverted to camera stream"), this.cameraStream;
|
|
362
|
+
} catch (e) {
|
|
363
|
+
throw console.error("[CallMediaStream] Failed to stop screen share:", e), this.handleMediaError(e);
|
|
348
364
|
}
|
|
349
365
|
});
|
|
350
366
|
}
|
|
@@ -352,24 +368,26 @@ class No {
|
|
|
352
368
|
* Toggle audio track
|
|
353
369
|
*/
|
|
354
370
|
toggleAudio(e) {
|
|
355
|
-
|
|
371
|
+
const t = this.getCurrentStream();
|
|
372
|
+
if (!t) {
|
|
356
373
|
console.warn("[CallMediaStream] No stream available for audio toggle");
|
|
357
374
|
return;
|
|
358
375
|
}
|
|
359
|
-
|
|
360
|
-
|
|
376
|
+
t.getAudioTracks().forEach((l) => {
|
|
377
|
+
l.enabled = e;
|
|
361
378
|
}), console.log(`[CallMediaStream] Audio ${e ? "enabled" : "disabled"}`);
|
|
362
379
|
}
|
|
363
380
|
/**
|
|
364
381
|
* Toggle video track
|
|
365
382
|
*/
|
|
366
383
|
toggleVideo(e) {
|
|
367
|
-
|
|
384
|
+
const t = this.getCurrentStream();
|
|
385
|
+
if (!t) {
|
|
368
386
|
console.warn("[CallMediaStream] No stream available for video toggle");
|
|
369
387
|
return;
|
|
370
388
|
}
|
|
371
|
-
|
|
372
|
-
|
|
389
|
+
t.getVideoTracks().forEach((l) => {
|
|
390
|
+
l.enabled = e;
|
|
373
391
|
}), console.log(`[CallMediaStream] Video ${e ? "enabled" : "disabled"}`);
|
|
374
392
|
}
|
|
375
393
|
/**
|
|
@@ -377,25 +395,47 @@ class No {
|
|
|
377
395
|
*/
|
|
378
396
|
createVideoElement() {
|
|
379
397
|
const e = document.createElement("video");
|
|
380
|
-
|
|
398
|
+
e.autoplay = !0, e.playsInline = !0, e.muted = !0;
|
|
399
|
+
const t = this.getCurrentStream();
|
|
400
|
+
return t && (e.srcObject = t), this.videoElement = e, e;
|
|
381
401
|
}
|
|
382
402
|
/**
|
|
383
403
|
* Attach stream to an existing video element
|
|
384
404
|
*/
|
|
385
405
|
attachToVideoElement(e) {
|
|
386
|
-
|
|
406
|
+
const t = this.getCurrentStream();
|
|
407
|
+
t && (e.srcObject = t, this.videoElement = e);
|
|
387
408
|
}
|
|
388
409
|
/**
|
|
389
410
|
* Replace the current stream (useful for switching between camera and screen)
|
|
390
411
|
*/
|
|
391
412
|
replaceStream(e) {
|
|
392
|
-
|
|
413
|
+
const t = this.getCurrentStream();
|
|
414
|
+
t && t.getTracks().forEach((o) => o.stop()), this.isScreenShare ? this.screenStream = e : this.cameraStream = e, this.videoElement && (this.videoElement.srcObject = e), console.log("[CallMediaStream] Stream replaced successfully");
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Get current active stream (screen or camera)
|
|
418
|
+
*/
|
|
419
|
+
getCurrentStream() {
|
|
420
|
+
return this.isScreenShare ? this.screenStream : this.cameraStream;
|
|
393
421
|
}
|
|
394
422
|
/**
|
|
395
|
-
* Get current stream
|
|
423
|
+
* Get current stream (for backward compatibility)
|
|
396
424
|
*/
|
|
397
425
|
getStream() {
|
|
398
|
-
return this.
|
|
426
|
+
return this.getCurrentStream();
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Get camera stream
|
|
430
|
+
*/
|
|
431
|
+
getCameraStream() {
|
|
432
|
+
return this.cameraStream;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Get screen stream
|
|
436
|
+
*/
|
|
437
|
+
getScreenStream() {
|
|
438
|
+
return this.screenStream;
|
|
399
439
|
}
|
|
400
440
|
/**
|
|
401
441
|
* Get video element
|
|
@@ -413,42 +453,83 @@ class No {
|
|
|
413
453
|
* Get audio track enabled state
|
|
414
454
|
*/
|
|
415
455
|
isAudioEnabled() {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
456
|
+
const e = this.getCurrentStream();
|
|
457
|
+
if (!e) return !1;
|
|
458
|
+
const t = e.getAudioTracks();
|
|
459
|
+
return t.length > 0 && t[0].enabled;
|
|
419
460
|
}
|
|
420
461
|
/**
|
|
421
462
|
* Get video track enabled state
|
|
422
463
|
*/
|
|
423
464
|
isVideoEnabled() {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
465
|
+
const e = this.getCurrentStream();
|
|
466
|
+
if (!e) return !1;
|
|
467
|
+
const t = e.getVideoTracks();
|
|
468
|
+
return t.length > 0 && t[0].enabled;
|
|
427
469
|
}
|
|
428
470
|
/**
|
|
429
471
|
* Get stream information
|
|
430
472
|
*/
|
|
431
473
|
getStreamInfo() {
|
|
432
|
-
|
|
433
|
-
|
|
474
|
+
const e = this.getCurrentStream();
|
|
475
|
+
if (!e) return null;
|
|
476
|
+
const t = e.getVideoTracks(), o = e.getAudioTracks();
|
|
434
477
|
return {
|
|
435
|
-
id:
|
|
436
|
-
videoTracks:
|
|
437
|
-
audioTracks:
|
|
478
|
+
id: e.id,
|
|
479
|
+
videoTracks: t.length,
|
|
480
|
+
audioTracks: o.length,
|
|
438
481
|
isScreenShare: this.isScreenShare,
|
|
439
|
-
videoEnabled:
|
|
440
|
-
audioEnabled:
|
|
441
|
-
videoConstraints:
|
|
442
|
-
audioConstraints:
|
|
482
|
+
videoEnabled: t.length > 0 ? t[0].enabled : !1,
|
|
483
|
+
audioEnabled: o.length > 0 ? o[0].enabled : !1,
|
|
484
|
+
videoConstraints: t.length > 0 ? t[0].getSettings() : null,
|
|
485
|
+
audioConstraints: o.length > 0 ? o[0].getSettings() : null,
|
|
486
|
+
hasCameraStream: !!this.cameraStream,
|
|
487
|
+
hasScreenStream: !!this.screenStream
|
|
443
488
|
};
|
|
444
489
|
}
|
|
490
|
+
/**
|
|
491
|
+
* Get video track from current stream
|
|
492
|
+
*/
|
|
493
|
+
getVideoTrack() {
|
|
494
|
+
const e = this.getCurrentStream();
|
|
495
|
+
if (!e) return null;
|
|
496
|
+
const t = e.getVideoTracks();
|
|
497
|
+
return t.length > 0 ? t[0] : null;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Get audio track from current stream
|
|
501
|
+
*/
|
|
502
|
+
getAudioTrack() {
|
|
503
|
+
const e = this.getCurrentStream();
|
|
504
|
+
if (!e) return null;
|
|
505
|
+
const t = e.getAudioTracks();
|
|
506
|
+
return t.length > 0 ? t[0] : null;
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Get video track from camera stream
|
|
510
|
+
*/
|
|
511
|
+
getCameraVideoTrack() {
|
|
512
|
+
if (!this.cameraStream) return null;
|
|
513
|
+
const e = this.cameraStream.getVideoTracks();
|
|
514
|
+
return e.length > 0 ? e[0] : null;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Get video track from screen stream
|
|
518
|
+
*/
|
|
519
|
+
getScreenVideoTrack() {
|
|
520
|
+
if (!this.screenStream) return null;
|
|
521
|
+
const e = this.screenStream.getVideoTracks();
|
|
522
|
+
return e.length > 0 ? e[0] : null;
|
|
523
|
+
}
|
|
445
524
|
/**
|
|
446
525
|
* Stop all tracks and cleanup
|
|
447
526
|
*/
|
|
448
527
|
cleanup() {
|
|
449
|
-
console.log("[CallMediaStream] Cleaning up media stream"), this.
|
|
528
|
+
console.log("[CallMediaStream] Cleaning up media stream"), this.cameraStream && (this.cameraStream.getTracks().forEach((e) => {
|
|
450
529
|
e.stop();
|
|
451
|
-
}), this.
|
|
530
|
+
}), this.cameraStream = null), this.screenStream && (this.screenStream.getTracks().forEach((e) => {
|
|
531
|
+
e.stop();
|
|
532
|
+
}), this.screenStream = null), this.videoElement && (this.videoElement.srcObject = null, this.videoElement = null), this.isScreenShare = !1;
|
|
452
533
|
}
|
|
453
534
|
/**
|
|
454
535
|
* Handle media errors and provide user-friendly messages
|
|
@@ -490,12 +571,12 @@ class No {
|
|
|
490
571
|
function Qr(n) {
|
|
491
572
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
492
573
|
}
|
|
493
|
-
var nt = { exports: {} },
|
|
574
|
+
var nt = { exports: {} }, St, dn;
|
|
494
575
|
function Do() {
|
|
495
|
-
if (dn) return
|
|
576
|
+
if (dn) return St;
|
|
496
577
|
dn = 1;
|
|
497
578
|
var n = 1e3, e = n * 60, t = e * 60, o = t * 24, l = o * 7, c = o * 365.25;
|
|
498
|
-
|
|
579
|
+
St = function(w, A) {
|
|
499
580
|
A = A || {};
|
|
500
581
|
var C = typeof w;
|
|
501
582
|
if (C === "string" && w.length > 0)
|
|
@@ -570,11 +651,11 @@ function Do() {
|
|
|
570
651
|
var y = A >= C * 1.5;
|
|
571
652
|
return Math.round(w / C) + " " + j + (y ? "s" : "");
|
|
572
653
|
}
|
|
573
|
-
return
|
|
654
|
+
return St;
|
|
574
655
|
}
|
|
575
|
-
var
|
|
656
|
+
var _t, hn;
|
|
576
657
|
function Fo() {
|
|
577
|
-
if (hn) return
|
|
658
|
+
if (hn) return _t;
|
|
578
659
|
hn = 1;
|
|
579
660
|
function n(e) {
|
|
580
661
|
o.debug = o, o.default = o, o.coerce = u, o.disable = a, o.enable = c, o.enabled = f, o.humanize = Do(), o.destroy = w, Object.keys(e).forEach((A) => {
|
|
@@ -589,32 +670,32 @@ function Fo() {
|
|
|
589
670
|
o.selectColor = t;
|
|
590
671
|
function o(A) {
|
|
591
672
|
let C, j = null, y, I;
|
|
592
|
-
function
|
|
593
|
-
if (!
|
|
673
|
+
function _(...h) {
|
|
674
|
+
if (!_.enabled)
|
|
594
675
|
return;
|
|
595
|
-
const b =
|
|
596
|
-
b.diff =
|
|
676
|
+
const b = _, P = Number(/* @__PURE__ */ new Date()), S = P - (C || P);
|
|
677
|
+
b.diff = S, b.prev = C, b.curr = P, C = P, h[0] = o.coerce(h[0]), typeof h[0] != "string" && h.unshift("%O");
|
|
597
678
|
let R = 0;
|
|
598
|
-
h[0] = h[0].replace(/%([a-zA-Z%])/g, (
|
|
599
|
-
if (
|
|
679
|
+
h[0] = h[0].replace(/%([a-zA-Z%])/g, (p, B) => {
|
|
680
|
+
if (p === "%%")
|
|
600
681
|
return "%";
|
|
601
682
|
R++;
|
|
602
|
-
const U = o.formatters[
|
|
683
|
+
const U = o.formatters[B];
|
|
603
684
|
if (typeof U == "function") {
|
|
604
685
|
const F = h[R];
|
|
605
|
-
|
|
686
|
+
p = U.call(b, F), h.splice(R, 1), R--;
|
|
606
687
|
}
|
|
607
|
-
return
|
|
688
|
+
return p;
|
|
608
689
|
}), o.formatArgs.call(b, h), (b.log || o.log).apply(b, h);
|
|
609
690
|
}
|
|
610
|
-
return
|
|
691
|
+
return _.namespace = A, _.useColors = o.useColors(), _.color = o.selectColor(A), _.extend = l, _.destroy = o.destroy, Object.defineProperty(_, "enabled", {
|
|
611
692
|
enumerable: !0,
|
|
612
693
|
configurable: !1,
|
|
613
694
|
get: () => j !== null ? j : (y !== o.namespaces && (y = o.namespaces, I = o.enabled(A)), I),
|
|
614
695
|
set: (h) => {
|
|
615
696
|
j = h;
|
|
616
697
|
}
|
|
617
|
-
}), typeof o.init == "function" && o.init(
|
|
698
|
+
}), typeof o.init == "function" && o.init(_), _;
|
|
618
699
|
}
|
|
619
700
|
function l(A, C) {
|
|
620
701
|
const j = o(this.namespace + (typeof C == "undefined" ? ":" : C) + A);
|
|
@@ -627,12 +708,12 @@ function Fo() {
|
|
|
627
708
|
j[0] === "-" ? o.skips.push(j.slice(1)) : o.names.push(j);
|
|
628
709
|
}
|
|
629
710
|
function E(A, C) {
|
|
630
|
-
let j = 0, y = 0, I = -1,
|
|
711
|
+
let j = 0, y = 0, I = -1, _ = 0;
|
|
631
712
|
for (; j < A.length; )
|
|
632
713
|
if (y < C.length && (C[y] === A[j] || C[y] === "*"))
|
|
633
|
-
C[y] === "*" ? (I = y,
|
|
714
|
+
C[y] === "*" ? (I = y, _ = j, y++) : (j++, y++);
|
|
634
715
|
else if (I !== -1)
|
|
635
|
-
y = I + 1,
|
|
716
|
+
y = I + 1, _++, j = _;
|
|
636
717
|
else
|
|
637
718
|
return !1;
|
|
638
719
|
for (; y < C.length && C[y] === "*"; )
|
|
@@ -663,7 +744,7 @@ function Fo() {
|
|
|
663
744
|
}
|
|
664
745
|
return o.enable(o.load()), o;
|
|
665
746
|
}
|
|
666
|
-
return
|
|
747
|
+
return _t = n, _t;
|
|
667
748
|
}
|
|
668
749
|
var pn;
|
|
669
750
|
function jo() {
|
|
@@ -820,7 +901,7 @@ function $o() {
|
|
|
820
901
|
}), Ct;
|
|
821
902
|
}
|
|
822
903
|
var it = { exports: {} }, ot = { exports: {} }, Et = {}, yn;
|
|
823
|
-
function
|
|
904
|
+
function Ke() {
|
|
824
905
|
return yn || (yn = 1, function(n) {
|
|
825
906
|
Object.defineProperties(n, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } });
|
|
826
907
|
var e = {}, t = {};
|
|
@@ -832,64 +913,64 @@ function Ye() {
|
|
|
832
913
|
var P = b.length;
|
|
833
914
|
if (P % 4 > 0)
|
|
834
915
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
835
|
-
var
|
|
836
|
-
|
|
837
|
-
var R =
|
|
838
|
-
return [
|
|
916
|
+
var S = b.indexOf("=");
|
|
917
|
+
S === -1 && (S = P);
|
|
918
|
+
var R = S === P ? 0 : 4 - S % 4;
|
|
919
|
+
return [S, R];
|
|
839
920
|
}
|
|
840
921
|
function w(b) {
|
|
841
|
-
var P = u(b),
|
|
842
|
-
return (
|
|
922
|
+
var P = u(b), S = P[0], R = P[1];
|
|
923
|
+
return (S + R) * 3 / 4 - R;
|
|
843
924
|
}
|
|
844
|
-
function A(b, P,
|
|
845
|
-
return (P +
|
|
925
|
+
function A(b, P, S) {
|
|
926
|
+
return (P + S) * 3 / 4 - S;
|
|
846
927
|
}
|
|
847
928
|
function C(b) {
|
|
848
|
-
var P,
|
|
929
|
+
var P, S = u(b), R = S[0], v = S[1], p = new c(A(b, R, v)), B = 0, U = v > 0 ? R - 4 : R, F;
|
|
849
930
|
for (F = 0; F < U; F += 4)
|
|
850
|
-
P = l[b.charCodeAt(F)] << 18 | l[b.charCodeAt(F + 1)] << 12 | l[b.charCodeAt(F + 2)] << 6 | l[b.charCodeAt(F + 3)],
|
|
851
|
-
return v === 2 && (P = l[b.charCodeAt(F)] << 2 | l[b.charCodeAt(F + 1)] >> 4,
|
|
931
|
+
P = l[b.charCodeAt(F)] << 18 | l[b.charCodeAt(F + 1)] << 12 | l[b.charCodeAt(F + 2)] << 6 | l[b.charCodeAt(F + 3)], p[B++] = P >> 16 & 255, p[B++] = P >> 8 & 255, p[B++] = P & 255;
|
|
932
|
+
return v === 2 && (P = l[b.charCodeAt(F)] << 2 | l[b.charCodeAt(F + 1)] >> 4, p[B++] = P & 255), v === 1 && (P = l[b.charCodeAt(F)] << 10 | l[b.charCodeAt(F + 1)] << 4 | l[b.charCodeAt(F + 2)] >> 2, p[B++] = P >> 8 & 255, p[B++] = P & 255), p;
|
|
852
933
|
}
|
|
853
934
|
function j(b) {
|
|
854
935
|
return o[b >> 18 & 63] + o[b >> 12 & 63] + o[b >> 6 & 63] + o[b & 63];
|
|
855
936
|
}
|
|
856
|
-
function y(b, P,
|
|
857
|
-
for (var R, v = [],
|
|
858
|
-
R = (b[
|
|
937
|
+
function y(b, P, S) {
|
|
938
|
+
for (var R, v = [], p = P; p < S; p += 3)
|
|
939
|
+
R = (b[p] << 16 & 16711680) + (b[p + 1] << 8 & 65280) + (b[p + 2] & 255), v.push(j(R));
|
|
859
940
|
return v.join("");
|
|
860
941
|
}
|
|
861
942
|
function I(b) {
|
|
862
|
-
for (var P,
|
|
863
|
-
v.push(y(b,
|
|
864
|
-
return R === 1 ? (P = b[
|
|
943
|
+
for (var P, S = b.length, R = S % 3, v = [], p = 16383, B = 0, U = S - R; B < U; B += p)
|
|
944
|
+
v.push(y(b, B, B + p > U ? U : B + p));
|
|
945
|
+
return R === 1 ? (P = b[S - 1], v.push(
|
|
865
946
|
o[P >> 2] + o[P << 4 & 63] + "=="
|
|
866
|
-
)) : R === 2 && (P = (b[
|
|
947
|
+
)) : R === 2 && (P = (b[S - 2] << 8) + b[S - 1], v.push(
|
|
867
948
|
o[P >> 10] + o[P >> 4 & 63] + o[P << 2 & 63] + "="
|
|
868
949
|
)), v.join("");
|
|
869
950
|
}
|
|
870
|
-
var
|
|
951
|
+
var _ = {};
|
|
871
952
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
872
|
-
|
|
873
|
-
var
|
|
874
|
-
for (te += ee,
|
|
953
|
+
_.read = function(b, P, S, R, v) {
|
|
954
|
+
var p, B, U = v * 8 - R - 1, F = (1 << U) - 1, J = F >> 1, k = -7, te = S ? v - 1 : 0, ee = S ? -1 : 1, ae = b[P + te];
|
|
955
|
+
for (te += ee, p = ae & (1 << -k) - 1, ae >>= -k, k += U; k > 0; p = p * 256 + b[P + te], te += ee, k -= 8)
|
|
875
956
|
;
|
|
876
|
-
for (
|
|
957
|
+
for (B = p & (1 << -k) - 1, p >>= -k, k += R; k > 0; B = B * 256 + b[P + te], te += ee, k -= 8)
|
|
877
958
|
;
|
|
878
|
-
if (
|
|
879
|
-
|
|
959
|
+
if (p === 0)
|
|
960
|
+
p = 1 - J;
|
|
880
961
|
else {
|
|
881
|
-
if (
|
|
882
|
-
return
|
|
883
|
-
|
|
884
|
-
}
|
|
885
|
-
return (ae ? -1 : 1) *
|
|
886
|
-
},
|
|
887
|
-
var
|
|
888
|
-
for (P = Math.abs(P), isNaN(P) || P === 1 / 0 ? (U = isNaN(P) ? 1 : 0,
|
|
962
|
+
if (p === F)
|
|
963
|
+
return B ? NaN : (ae ? -1 : 1) * (1 / 0);
|
|
964
|
+
B = B + Math.pow(2, R), p = p - J;
|
|
965
|
+
}
|
|
966
|
+
return (ae ? -1 : 1) * B * Math.pow(2, p - R);
|
|
967
|
+
}, _.write = function(b, P, S, R, v, p) {
|
|
968
|
+
var B, U, F, J = p * 8 - v - 1, k = (1 << J) - 1, te = k >> 1, ee = v === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, ae = R ? 0 : p - 1, le = R ? 1 : -1, me = P < 0 || P === 0 && 1 / P < 0 ? 1 : 0;
|
|
969
|
+
for (P = Math.abs(P), isNaN(P) || P === 1 / 0 ? (U = isNaN(P) ? 1 : 0, B = k) : (B = Math.floor(Math.log(P) / Math.LN2), P * (F = Math.pow(2, -B)) < 1 && (B--, F *= 2), B + te >= 1 ? P += ee / F : P += ee * Math.pow(2, 1 - te), P * F >= 2 && (B++, F /= 2), B + te >= k ? (U = 0, B = k) : B + te >= 1 ? (U = (P * F - 1) * Math.pow(2, v), B = B + te) : (U = P * Math.pow(2, te - 1) * Math.pow(2, v), B = 0)); v >= 8; b[S + ae] = U & 255, ae += le, U /= 256, v -= 8)
|
|
889
970
|
;
|
|
890
|
-
for (
|
|
971
|
+
for (B = B << v | U, J += v; J > 0; b[S + ae] = B & 255, ae += le, B /= 256, J -= 8)
|
|
891
972
|
;
|
|
892
|
-
b[
|
|
973
|
+
b[S + ae - le] |= me * 128;
|
|
893
974
|
};
|
|
894
975
|
/*!
|
|
895
976
|
* The buffer module from node.js, for the browser.
|
|
@@ -898,20 +979,20 @@ function Ye() {
|
|
|
898
979
|
* @license MIT
|
|
899
980
|
*/
|
|
900
981
|
(function(b) {
|
|
901
|
-
const P = t,
|
|
982
|
+
const P = t, S = _, R = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
902
983
|
b.Buffer = k, b.SlowBuffer = L, b.INSPECT_MAX_BYTES = 50;
|
|
903
984
|
const v = 2147483647;
|
|
904
985
|
b.kMaxLength = v;
|
|
905
|
-
const { Uint8Array:
|
|
986
|
+
const { Uint8Array: p, ArrayBuffer: B, SharedArrayBuffer: U } = globalThis;
|
|
906
987
|
k.TYPED_ARRAY_SUPPORT = F(), !k.TYPED_ARRAY_SUPPORT && typeof console != "undefined" && typeof console.error == "function" && console.error(
|
|
907
988
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
908
989
|
);
|
|
909
990
|
function F() {
|
|
910
991
|
try {
|
|
911
|
-
const s = new
|
|
992
|
+
const s = new p(1), r = { foo: function() {
|
|
912
993
|
return 42;
|
|
913
994
|
} };
|
|
914
|
-
return Object.setPrototypeOf(r,
|
|
995
|
+
return Object.setPrototypeOf(r, p.prototype), Object.setPrototypeOf(s, r), s.foo() === 42;
|
|
915
996
|
} catch (s) {
|
|
916
997
|
return !1;
|
|
917
998
|
}
|
|
@@ -932,7 +1013,7 @@ function Ye() {
|
|
|
932
1013
|
function J(s) {
|
|
933
1014
|
if (s > v)
|
|
934
1015
|
throw new RangeError('The value "' + s + '" is invalid for option "size"');
|
|
935
|
-
const r = new
|
|
1016
|
+
const r = new p(s);
|
|
936
1017
|
return Object.setPrototypeOf(r, k.prototype), r;
|
|
937
1018
|
}
|
|
938
1019
|
function k(s, r, i) {
|
|
@@ -949,13 +1030,13 @@ function Ye() {
|
|
|
949
1030
|
function te(s, r, i) {
|
|
950
1031
|
if (typeof s == "string")
|
|
951
1032
|
return me(s, r);
|
|
952
|
-
if (
|
|
953
|
-
return
|
|
1033
|
+
if (B.isView(s))
|
|
1034
|
+
return ge(s);
|
|
954
1035
|
if (s == null)
|
|
955
1036
|
throw new TypeError(
|
|
956
1037
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof s
|
|
957
1038
|
);
|
|
958
|
-
if (Pe(s,
|
|
1039
|
+
if (Pe(s, B) || s && Pe(s.buffer, B) || typeof U != "undefined" && (Pe(s, U) || s && Pe(s.buffer, U)))
|
|
959
1040
|
return ie(s, r, i);
|
|
960
1041
|
if (typeof s == "number")
|
|
961
1042
|
throw new TypeError(
|
|
@@ -964,7 +1045,7 @@ function Ye() {
|
|
|
964
1045
|
const m = s.valueOf && s.valueOf();
|
|
965
1046
|
if (m != null && m !== s)
|
|
966
1047
|
return k.from(m, r, i);
|
|
967
|
-
const T =
|
|
1048
|
+
const T = Se(s);
|
|
968
1049
|
if (T) return T;
|
|
969
1050
|
if (typeof Symbol != "undefined" && Symbol.toPrimitive != null && typeof s[Symbol.toPrimitive] == "function")
|
|
970
1051
|
return k.from(s[Symbol.toPrimitive]("string"), r, i);
|
|
@@ -974,7 +1055,7 @@ function Ye() {
|
|
|
974
1055
|
}
|
|
975
1056
|
k.from = function(s, r, i) {
|
|
976
1057
|
return te(s, r, i);
|
|
977
|
-
}, Object.setPrototypeOf(k.prototype,
|
|
1058
|
+
}, Object.setPrototypeOf(k.prototype, p.prototype), Object.setPrototypeOf(k, p);
|
|
978
1059
|
function ee(s) {
|
|
979
1060
|
if (typeof s != "number")
|
|
980
1061
|
throw new TypeError('"size" argument must be of type number');
|
|
@@ -1009,9 +1090,9 @@ function Ye() {
|
|
|
1009
1090
|
i[m] = s[m] & 255;
|
|
1010
1091
|
return i;
|
|
1011
1092
|
}
|
|
1012
|
-
function
|
|
1013
|
-
if (Pe(s,
|
|
1014
|
-
const r = new
|
|
1093
|
+
function ge(s) {
|
|
1094
|
+
if (Pe(s, p)) {
|
|
1095
|
+
const r = new p(s);
|
|
1015
1096
|
return ie(r.buffer, r.byteOffset, r.byteLength);
|
|
1016
1097
|
}
|
|
1017
1098
|
return ce(s);
|
|
@@ -1022,9 +1103,9 @@ function Ye() {
|
|
|
1022
1103
|
if (s.byteLength < r + (i || 0))
|
|
1023
1104
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
1024
1105
|
let m;
|
|
1025
|
-
return r === void 0 && i === void 0 ? m = new
|
|
1106
|
+
return r === void 0 && i === void 0 ? m = new p(s) : i === void 0 ? m = new p(s, r) : m = new p(s, r, i), Object.setPrototypeOf(m, k.prototype), m;
|
|
1026
1107
|
}
|
|
1027
|
-
function
|
|
1108
|
+
function Se(s) {
|
|
1028
1109
|
if (k.isBuffer(s)) {
|
|
1029
1110
|
const r = he(s.length) | 0, i = J(r);
|
|
1030
1111
|
return i.length === 0 || s.copy(i, 0, 0, r), i;
|
|
@@ -1045,7 +1126,7 @@ function Ye() {
|
|
|
1045
1126
|
k.isBuffer = function(r) {
|
|
1046
1127
|
return r != null && r._isBuffer === !0 && r !== k.prototype;
|
|
1047
1128
|
}, k.compare = function(r, i) {
|
|
1048
|
-
if (Pe(r,
|
|
1129
|
+
if (Pe(r, p) && (r = k.from(r, r.offset, r.byteLength)), Pe(i, p) && (i = k.from(i, i.offset, i.byteLength)), !k.isBuffer(r) || !k.isBuffer(i))
|
|
1049
1130
|
throw new TypeError(
|
|
1050
1131
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
1051
1132
|
);
|
|
@@ -1087,8 +1168,8 @@ function Ye() {
|
|
|
1087
1168
|
let N = 0;
|
|
1088
1169
|
for (m = 0; m < r.length; ++m) {
|
|
1089
1170
|
let W = r[m];
|
|
1090
|
-
if (Pe(W,
|
|
1091
|
-
N + W.length > T.length ? (k.isBuffer(W) || (W = k.from(W)), W.copy(T, N)) :
|
|
1171
|
+
if (Pe(W, p))
|
|
1172
|
+
N + W.length > T.length ? (k.isBuffer(W) || (W = k.from(W)), W.copy(T, N)) : p.prototype.set.call(
|
|
1092
1173
|
T,
|
|
1093
1174
|
W,
|
|
1094
1175
|
N
|
|
@@ -1104,7 +1185,7 @@ function Ye() {
|
|
|
1104
1185
|
function $(s, r) {
|
|
1105
1186
|
if (k.isBuffer(s))
|
|
1106
1187
|
return s.length;
|
|
1107
|
-
if (
|
|
1188
|
+
if (B.isView(s) || Pe(s, B))
|
|
1108
1189
|
return s.byteLength;
|
|
1109
1190
|
if (typeof s != "string")
|
|
1110
1191
|
throw new TypeError(
|
|
@@ -1203,7 +1284,7 @@ function Ye() {
|
|
|
1203
1284
|
const i = b.INSPECT_MAX_BYTES;
|
|
1204
1285
|
return r = this.toString("hex", 0, i).replace(/(.{2})/g, "$1 ").trim(), this.length > i && (r += " ... "), "<Buffer " + r + ">";
|
|
1205
1286
|
}, R && (k.prototype[R] = k.prototype.inspect), k.prototype.compare = function(r, i, m, T, N) {
|
|
1206
|
-
if (Pe(r,
|
|
1287
|
+
if (Pe(r, p) && (r = k.from(r, r.offset, r.byteLength)), !k.isBuffer(r))
|
|
1207
1288
|
throw new TypeError(
|
|
1208
1289
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof r
|
|
1209
1290
|
);
|
|
@@ -1225,7 +1306,7 @@ function Ye() {
|
|
|
1225
1306
|
}
|
|
1226
1307
|
return W < Z ? -1 : Z < W ? 1 : 0;
|
|
1227
1308
|
};
|
|
1228
|
-
function
|
|
1309
|
+
function M(s, r, i, m, T) {
|
|
1229
1310
|
if (s.length === 0) return -1;
|
|
1230
1311
|
if (typeof i == "string" ? (m = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, yt(i) && (i = T ? 0 : s.length - 1), i < 0 && (i = s.length + i), i >= s.length) {
|
|
1231
1312
|
if (T) return -1;
|
|
@@ -1236,7 +1317,7 @@ function Ye() {
|
|
|
1236
1317
|
if (typeof r == "string" && (r = k.from(r, m)), k.isBuffer(r))
|
|
1237
1318
|
return r.length === 0 ? -1 : O(s, r, i, m, T);
|
|
1238
1319
|
if (typeof r == "number")
|
|
1239
|
-
return r = r & 255, typeof
|
|
1320
|
+
return r = r & 255, typeof p.prototype.indexOf == "function" ? T ? p.prototype.indexOf.call(s, r, i) : p.prototype.lastIndexOf.call(s, r, i) : O(s, [r], i, m, T);
|
|
1240
1321
|
throw new TypeError("val must be string, number or Buffer");
|
|
1241
1322
|
}
|
|
1242
1323
|
function O(s, r, i, m, T) {
|
|
@@ -1272,9 +1353,9 @@ function Ye() {
|
|
|
1272
1353
|
k.prototype.includes = function(r, i, m) {
|
|
1273
1354
|
return this.indexOf(r, i, m) !== -1;
|
|
1274
1355
|
}, k.prototype.indexOf = function(r, i, m) {
|
|
1275
|
-
return
|
|
1356
|
+
return M(this, r, i, m, !0);
|
|
1276
1357
|
}, k.prototype.lastIndexOf = function(r, i, m) {
|
|
1277
|
-
return
|
|
1358
|
+
return M(this, r, i, m, !1);
|
|
1278
1359
|
};
|
|
1279
1360
|
function D(s, r, i, m) {
|
|
1280
1361
|
i = Number(i) || 0;
|
|
@@ -1290,17 +1371,17 @@ function Ye() {
|
|
|
1290
1371
|
}
|
|
1291
1372
|
return W;
|
|
1292
1373
|
}
|
|
1293
|
-
function G(s, r, i, m) {
|
|
1294
|
-
return Qe(gt(r, s.length - i), s, i, m);
|
|
1295
|
-
}
|
|
1296
1374
|
function V(s, r, i, m) {
|
|
1297
|
-
return
|
|
1375
|
+
return et(gt(r, s.length - i), s, i, m);
|
|
1376
|
+
}
|
|
1377
|
+
function G(s, r, i, m) {
|
|
1378
|
+
return et(wo(r), s, i, m);
|
|
1298
1379
|
}
|
|
1299
1380
|
function d(s, r, i, m) {
|
|
1300
|
-
return
|
|
1381
|
+
return et(cn(r), s, i, m);
|
|
1301
1382
|
}
|
|
1302
|
-
function
|
|
1303
|
-
return
|
|
1383
|
+
function g(s, r, i, m) {
|
|
1384
|
+
return et(So(r, s.length - i), s, i, m);
|
|
1304
1385
|
}
|
|
1305
1386
|
k.prototype.write = function(r, i, m, T) {
|
|
1306
1387
|
if (i === void 0)
|
|
@@ -1324,18 +1405,18 @@ function Ye() {
|
|
|
1324
1405
|
return D(this, r, i, m);
|
|
1325
1406
|
case "utf8":
|
|
1326
1407
|
case "utf-8":
|
|
1327
|
-
return
|
|
1408
|
+
return V(this, r, i, m);
|
|
1328
1409
|
case "ascii":
|
|
1329
1410
|
case "latin1":
|
|
1330
1411
|
case "binary":
|
|
1331
|
-
return
|
|
1412
|
+
return G(this, r, i, m);
|
|
1332
1413
|
case "base64":
|
|
1333
1414
|
return d(this, r, i, m);
|
|
1334
1415
|
case "ucs2":
|
|
1335
1416
|
case "ucs-2":
|
|
1336
1417
|
case "utf16le":
|
|
1337
1418
|
case "utf-16le":
|
|
1338
|
-
return
|
|
1419
|
+
return g(this, r, i, m);
|
|
1339
1420
|
default:
|
|
1340
1421
|
if (W) throw new TypeError("Unknown encoding: " + T);
|
|
1341
1422
|
T = ("" + T).toLowerCase(), W = !0;
|
|
@@ -1408,7 +1489,7 @@ function Ye() {
|
|
|
1408
1489
|
(!r || r < 0) && (r = 0), (!i || i < 0 || i > m) && (i = m);
|
|
1409
1490
|
let T = "";
|
|
1410
1491
|
for (let N = r; N < i; ++N)
|
|
1411
|
-
T +=
|
|
1492
|
+
T += _o[s[N]];
|
|
1412
1493
|
return T;
|
|
1413
1494
|
}
|
|
1414
1495
|
function ye(s, r, i) {
|
|
@@ -1453,13 +1534,13 @@ function Ye() {
|
|
|
1453
1534
|
}, k.prototype.readBigUInt64LE = ke(function(r) {
|
|
1454
1535
|
r = r >>> 0, je(r, "offset");
|
|
1455
1536
|
const i = this[r], m = this[r + 7];
|
|
1456
|
-
(i === void 0 || m === void 0) &&
|
|
1537
|
+
(i === void 0 || m === void 0) && Ge(r, this.length - 8);
|
|
1457
1538
|
const T = i + this[++r] * ne(2, 8) + this[++r] * ne(2, 16) + this[++r] * ne(2, 24), N = this[++r] + this[++r] * ne(2, 8) + this[++r] * ne(2, 16) + m * ne(2, 24);
|
|
1458
1539
|
return BigInt(T) + (BigInt(N) << BigInt(32));
|
|
1459
1540
|
}), k.prototype.readBigUInt64BE = ke(function(r) {
|
|
1460
1541
|
r = r >>> 0, je(r, "offset");
|
|
1461
1542
|
const i = this[r], m = this[r + 7];
|
|
1462
|
-
(i === void 0 || m === void 0) &&
|
|
1543
|
+
(i === void 0 || m === void 0) && Ge(r, this.length - 8);
|
|
1463
1544
|
const T = i * ne(2, 24) + this[++r] * ne(2, 16) + this[++r] * ne(2, 8) + this[++r], N = this[++r] * ne(2, 24) + this[++r] * ne(2, 16) + this[++r] * ne(2, 8) + m;
|
|
1464
1545
|
return (BigInt(T) << BigInt(32)) + BigInt(N);
|
|
1465
1546
|
}), k.prototype.readIntLE = function(r, i, m) {
|
|
@@ -1491,24 +1572,24 @@ function Ye() {
|
|
|
1491
1572
|
}, k.prototype.readBigInt64LE = ke(function(r) {
|
|
1492
1573
|
r = r >>> 0, je(r, "offset");
|
|
1493
1574
|
const i = this[r], m = this[r + 7];
|
|
1494
|
-
(i === void 0 || m === void 0) &&
|
|
1575
|
+
(i === void 0 || m === void 0) && Ge(r, this.length - 8);
|
|
1495
1576
|
const T = this[r + 4] + this[r + 5] * ne(2, 8) + this[r + 6] * ne(2, 16) + (m << 24);
|
|
1496
1577
|
return (BigInt(T) << BigInt(32)) + BigInt(i + this[++r] * ne(2, 8) + this[++r] * ne(2, 16) + this[++r] * ne(2, 24));
|
|
1497
1578
|
}), k.prototype.readBigInt64BE = ke(function(r) {
|
|
1498
1579
|
r = r >>> 0, je(r, "offset");
|
|
1499
1580
|
const i = this[r], m = this[r + 7];
|
|
1500
|
-
(i === void 0 || m === void 0) &&
|
|
1581
|
+
(i === void 0 || m === void 0) && Ge(r, this.length - 8);
|
|
1501
1582
|
const T = (i << 24) + // Overflow
|
|
1502
1583
|
this[++r] * ne(2, 16) + this[++r] * ne(2, 8) + this[++r];
|
|
1503
1584
|
return (BigInt(T) << BigInt(32)) + BigInt(this[++r] * ne(2, 24) + this[++r] * ne(2, 16) + this[++r] * ne(2, 8) + m);
|
|
1504
1585
|
}), k.prototype.readFloatLE = function(r, i) {
|
|
1505
|
-
return r = r >>> 0, i || oe(r, 4, this.length),
|
|
1586
|
+
return r = r >>> 0, i || oe(r, 4, this.length), S.read(this, r, !0, 23, 4);
|
|
1506
1587
|
}, k.prototype.readFloatBE = function(r, i) {
|
|
1507
|
-
return r = r >>> 0, i || oe(r, 4, this.length),
|
|
1588
|
+
return r = r >>> 0, i || oe(r, 4, this.length), S.read(this, r, !1, 23, 4);
|
|
1508
1589
|
}, k.prototype.readDoubleLE = function(r, i) {
|
|
1509
|
-
return r = r >>> 0, i || oe(r, 8, this.length),
|
|
1590
|
+
return r = r >>> 0, i || oe(r, 8, this.length), S.read(this, r, !0, 52, 8);
|
|
1510
1591
|
}, k.prototype.readDoubleBE = function(r, i) {
|
|
1511
|
-
return r = r >>> 0, i || oe(r, 8, this.length),
|
|
1592
|
+
return r = r >>> 0, i || oe(r, 8, this.length), S.read(this, r, !1, 52, 8);
|
|
1512
1593
|
};
|
|
1513
1594
|
function ue(s, r, i, m, T, N) {
|
|
1514
1595
|
if (!k.isBuffer(s)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
@@ -1600,20 +1681,20 @@ function Ye() {
|
|
|
1600
1681
|
if (i < 0) throw new RangeError("Index out of range");
|
|
1601
1682
|
}
|
|
1602
1683
|
function Oe(s, r, i, m, T) {
|
|
1603
|
-
return r = +r, i = i >>> 0, T || Fe(s, r, i, 4),
|
|
1684
|
+
return r = +r, i = i >>> 0, T || Fe(s, r, i, 4), S.write(s, r, i, m, 23, 4), i + 4;
|
|
1604
1685
|
}
|
|
1605
1686
|
k.prototype.writeFloatLE = function(r, i, m) {
|
|
1606
1687
|
return Oe(this, r, i, !0, m);
|
|
1607
1688
|
}, k.prototype.writeFloatBE = function(r, i, m) {
|
|
1608
1689
|
return Oe(this, r, i, !1, m);
|
|
1609
1690
|
};
|
|
1610
|
-
function
|
|
1611
|
-
return r = +r, i = i >>> 0, T || Fe(s, r, i, 8),
|
|
1691
|
+
function Ie(s, r, i, m, T) {
|
|
1692
|
+
return r = +r, i = i >>> 0, T || Fe(s, r, i, 8), S.write(s, r, i, m, 52, 8), i + 8;
|
|
1612
1693
|
}
|
|
1613
1694
|
k.prototype.writeDoubleLE = function(r, i, m) {
|
|
1614
|
-
return
|
|
1695
|
+
return Ie(this, r, i, !0, m);
|
|
1615
1696
|
}, k.prototype.writeDoubleBE = function(r, i, m) {
|
|
1616
|
-
return
|
|
1697
|
+
return Ie(this, r, i, !1, m);
|
|
1617
1698
|
}, k.prototype.copy = function(r, i, m, T) {
|
|
1618
1699
|
if (!k.isBuffer(r)) throw new TypeError("argument should be a Buffer");
|
|
1619
1700
|
if (m || (m = 0), !T && T !== 0 && (T = this.length), i >= r.length && (i = r.length), i || (i = 0), T > 0 && T < m && (T = m), T === m || r.length === 0 || this.length === 0) return 0;
|
|
@@ -1623,7 +1704,7 @@ function Ye() {
|
|
|
1623
1704
|
if (T < 0) throw new RangeError("sourceEnd out of bounds");
|
|
1624
1705
|
T > this.length && (T = this.length), r.length - i < T - m && (T = r.length - i + m);
|
|
1625
1706
|
const N = T - m;
|
|
1626
|
-
return this === r && typeof
|
|
1707
|
+
return this === r && typeof p.prototype.copyWithin == "function" ? this.copyWithin(i, m, T) : p.prototype.set.call(
|
|
1627
1708
|
r,
|
|
1628
1709
|
this.subarray(m, T),
|
|
1629
1710
|
i
|
|
@@ -1657,9 +1738,9 @@ function Ye() {
|
|
|
1657
1738
|
}
|
|
1658
1739
|
return this;
|
|
1659
1740
|
};
|
|
1660
|
-
const
|
|
1741
|
+
const _e = {};
|
|
1661
1742
|
function pt(s, r, i) {
|
|
1662
|
-
|
|
1743
|
+
_e[s] = class extends i {
|
|
1663
1744
|
constructor() {
|
|
1664
1745
|
super(), Object.defineProperty(this, "message", {
|
|
1665
1746
|
value: r.apply(this, arguments),
|
|
@@ -1711,22 +1792,22 @@ function Ye() {
|
|
|
1711
1792
|
return `${s.slice(0, i)}${r}`;
|
|
1712
1793
|
}
|
|
1713
1794
|
function mo(s, r, i) {
|
|
1714
|
-
je(r, "offset"), (s[r] === void 0 || s[r + i] === void 0) &&
|
|
1795
|
+
je(r, "offset"), (s[r] === void 0 || s[r + i] === void 0) && Ge(r, s.length - (i + 1));
|
|
1715
1796
|
}
|
|
1716
1797
|
function ln(s, r, i, m, T, N) {
|
|
1717
1798
|
if (s > i || s < r) {
|
|
1718
1799
|
const W = typeof r == "bigint" ? "n" : "";
|
|
1719
1800
|
let Z;
|
|
1720
|
-
throw r === 0 || r === BigInt(0) ? Z = `>= 0${W} and < 2${W} ** ${(N + 1) * 8}${W}` : Z = `>= -(2${W} ** ${(N + 1) * 8 - 1}${W}) and < 2 ** ${(N + 1) * 8 - 1}${W}`, new
|
|
1801
|
+
throw r === 0 || r === BigInt(0) ? Z = `>= 0${W} and < 2${W} ** ${(N + 1) * 8}${W}` : Z = `>= -(2${W} ** ${(N + 1) * 8 - 1}${W}) and < 2 ** ${(N + 1) * 8 - 1}${W}`, new _e.ERR_OUT_OF_RANGE("value", Z, s);
|
|
1721
1802
|
}
|
|
1722
1803
|
mo(m, T, N);
|
|
1723
1804
|
}
|
|
1724
1805
|
function je(s, r) {
|
|
1725
1806
|
if (typeof s != "number")
|
|
1726
|
-
throw new
|
|
1807
|
+
throw new _e.ERR_INVALID_ARG_TYPE(r, "number", s);
|
|
1727
1808
|
}
|
|
1728
|
-
function
|
|
1729
|
-
throw Math.floor(s) !== s ? (je(s, i), new
|
|
1809
|
+
function Ge(s, r, i) {
|
|
1810
|
+
throw Math.floor(s) !== s ? (je(s, i), new _e.ERR_OUT_OF_RANGE("offset", "an integer", s)) : r < 0 ? new _e.ERR_BUFFER_OUT_OF_BOUNDS() : new _e.ERR_OUT_OF_RANGE(
|
|
1730
1811
|
"offset",
|
|
1731
1812
|
`>= 0 and <= ${r}`,
|
|
1732
1813
|
s
|
|
@@ -1799,7 +1880,7 @@ function Ye() {
|
|
|
1799
1880
|
r.push(s.charCodeAt(i) & 255);
|
|
1800
1881
|
return r;
|
|
1801
1882
|
}
|
|
1802
|
-
function
|
|
1883
|
+
function So(s, r) {
|
|
1803
1884
|
let i, m, T;
|
|
1804
1885
|
const N = [];
|
|
1805
1886
|
for (let W = 0; W < s.length && !((r -= 2) < 0); ++W)
|
|
@@ -1809,7 +1890,7 @@ function Ye() {
|
|
|
1809
1890
|
function cn(s) {
|
|
1810
1891
|
return P.toByteArray(bo(s));
|
|
1811
1892
|
}
|
|
1812
|
-
function
|
|
1893
|
+
function et(s, r, i, m) {
|
|
1813
1894
|
let T;
|
|
1814
1895
|
for (T = 0; T < m && !(T + i >= r.length || T >= s.length); ++T)
|
|
1815
1896
|
r[T + i] = s[T];
|
|
@@ -1821,7 +1902,7 @@ function Ye() {
|
|
|
1821
1902
|
function yt(s) {
|
|
1822
1903
|
return s !== s;
|
|
1823
1904
|
}
|
|
1824
|
-
const
|
|
1905
|
+
const _o = function() {
|
|
1825
1906
|
const s = "0123456789abcdef", r = new Array(256);
|
|
1826
1907
|
for (let i = 0; i < 16; ++i) {
|
|
1827
1908
|
const m = i * 16;
|
|
@@ -1845,7 +1926,7 @@ function Ye() {
|
|
|
1845
1926
|
var mn;
|
|
1846
1927
|
function Ki() {
|
|
1847
1928
|
return mn || (mn = 1, function(n, e) {
|
|
1848
|
-
var t =
|
|
1929
|
+
var t = Ke(), o = t.Buffer;
|
|
1849
1930
|
function l(E, a) {
|
|
1850
1931
|
for (var f in E)
|
|
1851
1932
|
a[f] = E[f];
|
|
@@ -1904,16 +1985,16 @@ var at = { exports: {} }, st = { exports: {} }, bn;
|
|
|
1904
1985
|
function en() {
|
|
1905
1986
|
if (bn) return st.exports;
|
|
1906
1987
|
bn = 1;
|
|
1907
|
-
var n = typeof Reflect == "object" ? Reflect : null, e = n && typeof n.apply == "function" ? n.apply : function(R, v,
|
|
1908
|
-
return Function.prototype.apply.call(R, v,
|
|
1988
|
+
var n = typeof Reflect == "object" ? Reflect : null, e = n && typeof n.apply == "function" ? n.apply : function(R, v, p) {
|
|
1989
|
+
return Function.prototype.apply.call(R, v, p);
|
|
1909
1990
|
}, t;
|
|
1910
1991
|
n && typeof n.ownKeys == "function" ? t = n.ownKeys : Object.getOwnPropertySymbols ? t = function(R) {
|
|
1911
1992
|
return Object.getOwnPropertyNames(R).concat(Object.getOwnPropertySymbols(R));
|
|
1912
1993
|
} : t = function(R) {
|
|
1913
1994
|
return Object.getOwnPropertyNames(R);
|
|
1914
1995
|
};
|
|
1915
|
-
function o(
|
|
1916
|
-
console && console.warn && console.warn(
|
|
1996
|
+
function o(S) {
|
|
1997
|
+
console && console.warn && console.warn(S);
|
|
1917
1998
|
}
|
|
1918
1999
|
var l = Number.isNaN || function(R) {
|
|
1919
2000
|
return R !== R;
|
|
@@ -1923,19 +2004,19 @@ function en() {
|
|
|
1923
2004
|
}
|
|
1924
2005
|
st.exports = c, st.exports.once = h, c.EventEmitter = c, c.prototype._events = void 0, c.prototype._eventsCount = 0, c.prototype._maxListeners = void 0;
|
|
1925
2006
|
var E = 10;
|
|
1926
|
-
function a(
|
|
1927
|
-
if (typeof
|
|
1928
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof
|
|
2007
|
+
function a(S) {
|
|
2008
|
+
if (typeof S != "function")
|
|
2009
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof S);
|
|
1929
2010
|
}
|
|
1930
2011
|
Object.defineProperty(c, "defaultMaxListeners", {
|
|
1931
2012
|
enumerable: !0,
|
|
1932
2013
|
get: function() {
|
|
1933
2014
|
return E;
|
|
1934
2015
|
},
|
|
1935
|
-
set: function(
|
|
1936
|
-
if (typeof
|
|
1937
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' +
|
|
1938
|
-
E =
|
|
2016
|
+
set: function(S) {
|
|
2017
|
+
if (typeof S != "number" || S < 0 || l(S))
|
|
2018
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + S + ".");
|
|
2019
|
+
E = S;
|
|
1939
2020
|
}
|
|
1940
2021
|
}), c.init = function() {
|
|
1941
2022
|
(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;
|
|
@@ -1944,19 +2025,19 @@ function en() {
|
|
|
1944
2025
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + R + ".");
|
|
1945
2026
|
return this._maxListeners = R, this;
|
|
1946
2027
|
};
|
|
1947
|
-
function f(
|
|
1948
|
-
return
|
|
2028
|
+
function f(S) {
|
|
2029
|
+
return S._maxListeners === void 0 ? c.defaultMaxListeners : S._maxListeners;
|
|
1949
2030
|
}
|
|
1950
2031
|
c.prototype.getMaxListeners = function() {
|
|
1951
2032
|
return f(this);
|
|
1952
2033
|
}, c.prototype.emit = function(R) {
|
|
1953
|
-
for (var v = [],
|
|
1954
|
-
var
|
|
2034
|
+
for (var v = [], p = 1; p < arguments.length; p++) v.push(arguments[p]);
|
|
2035
|
+
var B = R === "error", U = this._events;
|
|
1955
2036
|
if (U !== void 0)
|
|
1956
|
-
|
|
1957
|
-
else if (!
|
|
2037
|
+
B = B && U.error === void 0;
|
|
2038
|
+
else if (!B)
|
|
1958
2039
|
return !1;
|
|
1959
|
-
if (
|
|
2040
|
+
if (B) {
|
|
1960
2041
|
var F;
|
|
1961
2042
|
if (v.length > 0 && (F = v[0]), F instanceof Error)
|
|
1962
2043
|
throw F;
|
|
@@ -1969,24 +2050,24 @@ function en() {
|
|
|
1969
2050
|
if (typeof k == "function")
|
|
1970
2051
|
e(k, this, v);
|
|
1971
2052
|
else
|
|
1972
|
-
for (var te = k.length, ee = y(k, te),
|
|
1973
|
-
e(ee[
|
|
2053
|
+
for (var te = k.length, ee = y(k, te), p = 0; p < te; ++p)
|
|
2054
|
+
e(ee[p], this, v);
|
|
1974
2055
|
return !0;
|
|
1975
2056
|
};
|
|
1976
|
-
function u(
|
|
1977
|
-
var
|
|
1978
|
-
if (a(v), U =
|
|
2057
|
+
function u(S, R, v, p) {
|
|
2058
|
+
var B, U, F;
|
|
2059
|
+
if (a(v), U = S._events, U === void 0 ? (U = S._events = /* @__PURE__ */ Object.create(null), S._eventsCount = 0) : (U.newListener !== void 0 && (S.emit(
|
|
1979
2060
|
"newListener",
|
|
1980
2061
|
R,
|
|
1981
2062
|
v.listener ? v.listener : v
|
|
1982
|
-
), U =
|
|
1983
|
-
F = U[R] = v, ++
|
|
1984
|
-
else if (typeof F == "function" ? F = U[R] =
|
|
2063
|
+
), U = S._events), F = U[R]), F === void 0)
|
|
2064
|
+
F = U[R] = v, ++S._eventsCount;
|
|
2065
|
+
else if (typeof F == "function" ? F = U[R] = p ? [v, F] : [F, v] : p ? F.unshift(v) : F.push(v), B = f(S), B > 0 && F.length > B && !F.warned) {
|
|
1985
2066
|
F.warned = !0;
|
|
1986
2067
|
var J = new Error("Possible EventEmitter memory leak detected. " + F.length + " " + String(R) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
1987
|
-
J.name = "MaxListenersExceededWarning", J.emitter =
|
|
2068
|
+
J.name = "MaxListenersExceededWarning", J.emitter = S, J.type = R, J.count = F.length, o(J);
|
|
1988
2069
|
}
|
|
1989
|
-
return
|
|
2070
|
+
return S;
|
|
1990
2071
|
}
|
|
1991
2072
|
c.prototype.addListener = function(R, v) {
|
|
1992
2073
|
return u(this, R, v, !1);
|
|
@@ -1997,70 +2078,70 @@ function en() {
|
|
|
1997
2078
|
if (!this.fired)
|
|
1998
2079
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
1999
2080
|
}
|
|
2000
|
-
function A(
|
|
2001
|
-
var
|
|
2002
|
-
return
|
|
2081
|
+
function A(S, R, v) {
|
|
2082
|
+
var p = { fired: !1, wrapFn: void 0, target: S, type: R, listener: v }, B = w.bind(p);
|
|
2083
|
+
return B.listener = v, p.wrapFn = B, B;
|
|
2003
2084
|
}
|
|
2004
2085
|
c.prototype.once = function(R, v) {
|
|
2005
2086
|
return a(v), this.on(R, A(this, R, v)), this;
|
|
2006
2087
|
}, c.prototype.prependOnceListener = function(R, v) {
|
|
2007
2088
|
return a(v), this.prependListener(R, A(this, R, v)), this;
|
|
2008
2089
|
}, c.prototype.removeListener = function(R, v) {
|
|
2009
|
-
var
|
|
2010
|
-
if (a(v),
|
|
2090
|
+
var p, B, U, F, J;
|
|
2091
|
+
if (a(v), B = this._events, B === void 0)
|
|
2011
2092
|
return this;
|
|
2012
|
-
if (
|
|
2093
|
+
if (p = B[R], p === void 0)
|
|
2013
2094
|
return this;
|
|
2014
|
-
if (
|
|
2015
|
-
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete
|
|
2016
|
-
else if (typeof
|
|
2017
|
-
for (U = -1, F =
|
|
2018
|
-
if (
|
|
2019
|
-
J =
|
|
2095
|
+
if (p === v || p.listener === v)
|
|
2096
|
+
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete B[R], B.removeListener && this.emit("removeListener", R, p.listener || v));
|
|
2097
|
+
else if (typeof p != "function") {
|
|
2098
|
+
for (U = -1, F = p.length - 1; F >= 0; F--)
|
|
2099
|
+
if (p[F] === v || p[F].listener === v) {
|
|
2100
|
+
J = p[F].listener, U = F;
|
|
2020
2101
|
break;
|
|
2021
2102
|
}
|
|
2022
2103
|
if (U < 0)
|
|
2023
2104
|
return this;
|
|
2024
|
-
U === 0 ?
|
|
2105
|
+
U === 0 ? p.shift() : I(p, U), p.length === 1 && (B[R] = p[0]), B.removeListener !== void 0 && this.emit("removeListener", R, J || v);
|
|
2025
2106
|
}
|
|
2026
2107
|
return this;
|
|
2027
2108
|
}, c.prototype.off = c.prototype.removeListener, c.prototype.removeAllListeners = function(R) {
|
|
2028
|
-
var v,
|
|
2029
|
-
if (
|
|
2109
|
+
var v, p, B;
|
|
2110
|
+
if (p = this._events, p === void 0)
|
|
2030
2111
|
return this;
|
|
2031
|
-
if (
|
|
2032
|
-
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) :
|
|
2112
|
+
if (p.removeListener === void 0)
|
|
2113
|
+
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : p[R] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete p[R]), this;
|
|
2033
2114
|
if (arguments.length === 0) {
|
|
2034
|
-
var U = Object.keys(
|
|
2035
|
-
for (
|
|
2036
|
-
F = U[
|
|
2115
|
+
var U = Object.keys(p), F;
|
|
2116
|
+
for (B = 0; B < U.length; ++B)
|
|
2117
|
+
F = U[B], F !== "removeListener" && this.removeAllListeners(F);
|
|
2037
2118
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
2038
2119
|
}
|
|
2039
|
-
if (v =
|
|
2120
|
+
if (v = p[R], typeof v == "function")
|
|
2040
2121
|
this.removeListener(R, v);
|
|
2041
2122
|
else if (v !== void 0)
|
|
2042
|
-
for (
|
|
2043
|
-
this.removeListener(R, v[
|
|
2123
|
+
for (B = v.length - 1; B >= 0; B--)
|
|
2124
|
+
this.removeListener(R, v[B]);
|
|
2044
2125
|
return this;
|
|
2045
2126
|
};
|
|
2046
|
-
function C(
|
|
2047
|
-
var
|
|
2048
|
-
if (
|
|
2127
|
+
function C(S, R, v) {
|
|
2128
|
+
var p = S._events;
|
|
2129
|
+
if (p === void 0)
|
|
2049
2130
|
return [];
|
|
2050
|
-
var
|
|
2051
|
-
return
|
|
2131
|
+
var B = p[R];
|
|
2132
|
+
return B === void 0 ? [] : typeof B == "function" ? v ? [B.listener || B] : [B] : v ? _(B) : y(B, B.length);
|
|
2052
2133
|
}
|
|
2053
2134
|
c.prototype.listeners = function(R) {
|
|
2054
2135
|
return C(this, R, !0);
|
|
2055
2136
|
}, c.prototype.rawListeners = function(R) {
|
|
2056
2137
|
return C(this, R, !1);
|
|
2057
|
-
}, c.listenerCount = function(
|
|
2058
|
-
return typeof
|
|
2138
|
+
}, c.listenerCount = function(S, R) {
|
|
2139
|
+
return typeof S.listenerCount == "function" ? S.listenerCount(R) : j.call(S, R);
|
|
2059
2140
|
}, c.prototype.listenerCount = j;
|
|
2060
|
-
function j(
|
|
2141
|
+
function j(S) {
|
|
2061
2142
|
var R = this._events;
|
|
2062
2143
|
if (R !== void 0) {
|
|
2063
|
-
var v = R[
|
|
2144
|
+
var v = R[S];
|
|
2064
2145
|
if (typeof v == "function")
|
|
2065
2146
|
return 1;
|
|
2066
2147
|
if (v !== void 0)
|
|
@@ -2071,44 +2152,44 @@ function en() {
|
|
|
2071
2152
|
c.prototype.eventNames = function() {
|
|
2072
2153
|
return this._eventsCount > 0 ? t(this._events) : [];
|
|
2073
2154
|
};
|
|
2074
|
-
function y(
|
|
2075
|
-
for (var v = new Array(R),
|
|
2076
|
-
v[
|
|
2155
|
+
function y(S, R) {
|
|
2156
|
+
for (var v = new Array(R), p = 0; p < R; ++p)
|
|
2157
|
+
v[p] = S[p];
|
|
2077
2158
|
return v;
|
|
2078
2159
|
}
|
|
2079
|
-
function I(
|
|
2080
|
-
for (; R + 1 <
|
|
2081
|
-
|
|
2082
|
-
|
|
2160
|
+
function I(S, R) {
|
|
2161
|
+
for (; R + 1 < S.length; R++)
|
|
2162
|
+
S[R] = S[R + 1];
|
|
2163
|
+
S.pop();
|
|
2083
2164
|
}
|
|
2084
|
-
function S
|
|
2085
|
-
for (var R = new Array(
|
|
2086
|
-
R[v] =
|
|
2165
|
+
function _(S) {
|
|
2166
|
+
for (var R = new Array(S.length), v = 0; v < R.length; ++v)
|
|
2167
|
+
R[v] = S[v].listener || S[v];
|
|
2087
2168
|
return R;
|
|
2088
2169
|
}
|
|
2089
|
-
function h(
|
|
2090
|
-
return new Promise(function(v,
|
|
2091
|
-
function
|
|
2092
|
-
|
|
2170
|
+
function h(S, R) {
|
|
2171
|
+
return new Promise(function(v, p) {
|
|
2172
|
+
function B(F) {
|
|
2173
|
+
S.removeListener(R, U), p(F);
|
|
2093
2174
|
}
|
|
2094
2175
|
function U() {
|
|
2095
|
-
typeof
|
|
2176
|
+
typeof S.removeListener == "function" && S.removeListener("error", B), v([].slice.call(arguments));
|
|
2096
2177
|
}
|
|
2097
|
-
P(
|
|
2178
|
+
P(S, R, U, { once: !0 }), R !== "error" && b(S, B, { once: !0 });
|
|
2098
2179
|
});
|
|
2099
2180
|
}
|
|
2100
|
-
function b(
|
|
2101
|
-
typeof
|
|
2181
|
+
function b(S, R, v) {
|
|
2182
|
+
typeof S.on == "function" && P(S, "error", R, v);
|
|
2102
2183
|
}
|
|
2103
|
-
function P(
|
|
2104
|
-
if (typeof
|
|
2105
|
-
|
|
2106
|
-
else if (typeof
|
|
2107
|
-
|
|
2108
|
-
|
|
2184
|
+
function P(S, R, v, p) {
|
|
2185
|
+
if (typeof S.on == "function")
|
|
2186
|
+
p.once ? S.once(R, v) : S.on(R, v);
|
|
2187
|
+
else if (typeof S.addEventListener == "function")
|
|
2188
|
+
S.addEventListener(R, function B(U) {
|
|
2189
|
+
p.once && S.removeEventListener(R, B), v(U);
|
|
2109
2190
|
});
|
|
2110
2191
|
else
|
|
2111
|
-
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof
|
|
2192
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof S);
|
|
2112
2193
|
}
|
|
2113
2194
|
return st.exports;
|
|
2114
2195
|
}
|
|
@@ -2116,9 +2197,9 @@ var Rt, wn;
|
|
|
2116
2197
|
function Xi() {
|
|
2117
2198
|
return wn || (wn = 1, Rt = en().EventEmitter), Rt;
|
|
2118
2199
|
}
|
|
2119
|
-
var Pt = {}, At = {}, Tt,
|
|
2200
|
+
var Pt = {}, At = {}, Tt, Sn;
|
|
2120
2201
|
function Zi() {
|
|
2121
|
-
return
|
|
2202
|
+
return Sn || (Sn = 1, Tt = function() {
|
|
2122
2203
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2123
2204
|
return !1;
|
|
2124
2205
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2146,10 +2227,10 @@ function Zi() {
|
|
|
2146
2227
|
return !0;
|
|
2147
2228
|
}), Tt;
|
|
2148
2229
|
}
|
|
2149
|
-
var It,
|
|
2230
|
+
var It, _n;
|
|
2150
2231
|
function dt() {
|
|
2151
|
-
if (
|
|
2152
|
-
|
|
2232
|
+
if (_n) return It;
|
|
2233
|
+
_n = 1;
|
|
2153
2234
|
var n = Zi();
|
|
2154
2235
|
return It = function() {
|
|
2155
2236
|
return n() && !!Symbol.toStringTag;
|
|
@@ -2163,16 +2244,16 @@ var kt, En;
|
|
|
2163
2244
|
function qo() {
|
|
2164
2245
|
return En || (En = 1, kt = Error), kt;
|
|
2165
2246
|
}
|
|
2166
|
-
var
|
|
2247
|
+
var Mt, Rn;
|
|
2167
2248
|
function xo() {
|
|
2168
|
-
return Rn || (Rn = 1,
|
|
2249
|
+
return Rn || (Rn = 1, Mt = EvalError), Mt;
|
|
2169
2250
|
}
|
|
2170
|
-
var
|
|
2251
|
+
var Bt, Pn;
|
|
2171
2252
|
function Wo() {
|
|
2172
|
-
return Pn || (Pn = 1,
|
|
2253
|
+
return Pn || (Pn = 1, Bt = RangeError), Bt;
|
|
2173
2254
|
}
|
|
2174
2255
|
var Lt, An;
|
|
2175
|
-
function
|
|
2256
|
+
function Vo() {
|
|
2176
2257
|
return An || (An = 1, Lt = ReferenceError), Lt;
|
|
2177
2258
|
}
|
|
2178
2259
|
var Nt, Tn;
|
|
@@ -2180,7 +2261,7 @@ function eo() {
|
|
|
2180
2261
|
return Tn || (Tn = 1, Nt = SyntaxError), Nt;
|
|
2181
2262
|
}
|
|
2182
2263
|
var Dt, In;
|
|
2183
|
-
function
|
|
2264
|
+
function Xe() {
|
|
2184
2265
|
return In || (In = 1, Dt = TypeError), Dt;
|
|
2185
2266
|
}
|
|
2186
2267
|
var Ft, On;
|
|
@@ -2188,16 +2269,16 @@ function zo() {
|
|
|
2188
2269
|
return On || (On = 1, Ft = URIError), Ft;
|
|
2189
2270
|
}
|
|
2190
2271
|
var jt, kn;
|
|
2191
|
-
function
|
|
2272
|
+
function Go() {
|
|
2192
2273
|
return kn || (kn = 1, jt = Math.abs), jt;
|
|
2193
2274
|
}
|
|
2194
|
-
var $t,
|
|
2275
|
+
var $t, Mn;
|
|
2195
2276
|
function Ho() {
|
|
2196
|
-
return
|
|
2277
|
+
return Mn || (Mn = 1, $t = Math.floor), $t;
|
|
2197
2278
|
}
|
|
2198
|
-
var Ut,
|
|
2279
|
+
var Ut, Bn;
|
|
2199
2280
|
function Jo() {
|
|
2200
|
-
return
|
|
2281
|
+
return Bn || (Bn = 1, Ut = Math.max), Ut;
|
|
2201
2282
|
}
|
|
2202
2283
|
var qt, Ln;
|
|
2203
2284
|
function Yo() {
|
|
@@ -2211,11 +2292,11 @@ var Wt, Dn;
|
|
|
2211
2292
|
function Xo() {
|
|
2212
2293
|
return Dn || (Dn = 1, Wt = Math.round), Wt;
|
|
2213
2294
|
}
|
|
2214
|
-
var
|
|
2295
|
+
var Vt, Fn;
|
|
2215
2296
|
function Zo() {
|
|
2216
|
-
return Fn || (Fn = 1,
|
|
2297
|
+
return Fn || (Fn = 1, Vt = Number.isNaN || function(e) {
|
|
2217
2298
|
return e !== e;
|
|
2218
|
-
}),
|
|
2299
|
+
}), Vt;
|
|
2219
2300
|
}
|
|
2220
2301
|
var zt, jn;
|
|
2221
2302
|
function Qo() {
|
|
@@ -2226,9 +2307,9 @@ function Qo() {
|
|
|
2226
2307
|
return n(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
2227
2308
|
}, zt;
|
|
2228
2309
|
}
|
|
2229
|
-
var
|
|
2310
|
+
var Gt, $n;
|
|
2230
2311
|
function ea() {
|
|
2231
|
-
return $n || ($n = 1,
|
|
2312
|
+
return $n || ($n = 1, Gt = Object.getOwnPropertyDescriptor), Gt;
|
|
2232
2313
|
}
|
|
2233
2314
|
var Ht, Un;
|
|
2234
2315
|
function We() {
|
|
@@ -2269,10 +2350,10 @@ var Kt, Wn;
|
|
|
2269
2350
|
function to() {
|
|
2270
2351
|
return Wn || (Wn = 1, Kt = typeof Reflect != "undefined" && Reflect.getPrototypeOf || null), Kt;
|
|
2271
2352
|
}
|
|
2272
|
-
var Xt,
|
|
2353
|
+
var Xt, Vn;
|
|
2273
2354
|
function ro() {
|
|
2274
|
-
if (
|
|
2275
|
-
|
|
2355
|
+
if (Vn) return Xt;
|
|
2356
|
+
Vn = 1;
|
|
2276
2357
|
var n = /* @__PURE__ */ Qi();
|
|
2277
2358
|
return Xt = n.getPrototypeOf || null, Xt;
|
|
2278
2359
|
}
|
|
@@ -2314,17 +2395,17 @@ function ra() {
|
|
|
2314
2395
|
}, j = t(0, u.length - w.length), y = [], I = 0; I < j; I++)
|
|
2315
2396
|
y[I] = "$" + I;
|
|
2316
2397
|
if (A = Function("binder", "return function (" + E(y, ",") + "){ return binder.apply(this,arguments); }")(C), u.prototype) {
|
|
2317
|
-
var
|
|
2398
|
+
var _ = function() {
|
|
2318
2399
|
};
|
|
2319
|
-
|
|
2400
|
+
_.prototype = u.prototype, A.prototype = new _(), _.prototype = null;
|
|
2320
2401
|
}
|
|
2321
2402
|
return A;
|
|
2322
2403
|
}, Zt;
|
|
2323
2404
|
}
|
|
2324
|
-
var Qt,
|
|
2325
|
-
function
|
|
2326
|
-
if (
|
|
2327
|
-
|
|
2405
|
+
var Qt, Gn;
|
|
2406
|
+
function Ze() {
|
|
2407
|
+
if (Gn) return Qt;
|
|
2408
|
+
Gn = 1;
|
|
2328
2409
|
var n = ra();
|
|
2329
2410
|
return Qt = Function.prototype.bind || n, Qt;
|
|
2330
2411
|
}
|
|
@@ -2344,14 +2425,14 @@ var nr, Kn;
|
|
|
2344
2425
|
function no() {
|
|
2345
2426
|
if (Kn) return nr;
|
|
2346
2427
|
Kn = 1;
|
|
2347
|
-
var n =
|
|
2428
|
+
var n = Ze(), e = rn(), t = tn(), o = na();
|
|
2348
2429
|
return nr = o || n.call(t, e), nr;
|
|
2349
2430
|
}
|
|
2350
2431
|
var ir, Xn;
|
|
2351
2432
|
function nn() {
|
|
2352
2433
|
if (Xn) return ir;
|
|
2353
2434
|
Xn = 1;
|
|
2354
|
-
var n =
|
|
2435
|
+
var n = Ze(), e = /* @__PURE__ */ Xe(), t = tn(), o = no();
|
|
2355
2436
|
return ir = function(c) {
|
|
2356
2437
|
if (c.length < 1 || typeof c[0] != "function")
|
|
2357
2438
|
throw new e("a function is required");
|
|
@@ -2401,36 +2482,36 @@ var sr, ei;
|
|
|
2401
2482
|
function io() {
|
|
2402
2483
|
if (ei) return sr;
|
|
2403
2484
|
ei = 1;
|
|
2404
|
-
var n = Function.prototype.call, e = Object.prototype.hasOwnProperty, t =
|
|
2485
|
+
var n = Function.prototype.call, e = Object.prototype.hasOwnProperty, t = Ze();
|
|
2405
2486
|
return sr = t.call(n, e), sr;
|
|
2406
2487
|
}
|
|
2407
2488
|
var lr, ti;
|
|
2408
2489
|
function oo() {
|
|
2409
2490
|
if (ti) return lr;
|
|
2410
2491
|
ti = 1;
|
|
2411
|
-
var n, e = /* @__PURE__ */ Qi(), t = /* @__PURE__ */ qo(), o = /* @__PURE__ */ xo(), l = /* @__PURE__ */ Wo(), c = /* @__PURE__ */
|
|
2492
|
+
var n, e = /* @__PURE__ */ Qi(), t = /* @__PURE__ */ qo(), o = /* @__PURE__ */ xo(), l = /* @__PURE__ */ Wo(), c = /* @__PURE__ */ Vo(), E = /* @__PURE__ */ eo(), a = /* @__PURE__ */ Xe(), f = /* @__PURE__ */ zo(), u = /* @__PURE__ */ Go(), w = /* @__PURE__ */ Ho(), A = /* @__PURE__ */ Jo(), C = /* @__PURE__ */ Yo(), j = /* @__PURE__ */ Ko(), y = /* @__PURE__ */ Xo(), I = /* @__PURE__ */ Qo(), _ = Function, h = function(D) {
|
|
2412
2493
|
try {
|
|
2413
|
-
return
|
|
2414
|
-
} catch (
|
|
2494
|
+
return _('"use strict"; return (' + D + ").constructor;")();
|
|
2495
|
+
} catch (V) {
|
|
2415
2496
|
}
|
|
2416
|
-
}, b = /* @__PURE__ */ We(), P = /* @__PURE__ */ ht(),
|
|
2497
|
+
}, b = /* @__PURE__ */ We(), P = /* @__PURE__ */ ht(), S = function() {
|
|
2417
2498
|
throw new a();
|
|
2418
2499
|
}, R = b ? function() {
|
|
2419
2500
|
try {
|
|
2420
|
-
return arguments.callee,
|
|
2501
|
+
return arguments.callee, S;
|
|
2421
2502
|
} catch (D) {
|
|
2422
2503
|
try {
|
|
2423
2504
|
return b(arguments, "callee").get;
|
|
2424
|
-
} catch (
|
|
2425
|
-
return
|
|
2505
|
+
} catch (V) {
|
|
2506
|
+
return S;
|
|
2426
2507
|
}
|
|
2427
2508
|
}
|
|
2428
|
-
}() :
|
|
2509
|
+
}() : S, v = ta()(), p = on(), B = ro(), U = to(), F = rn(), J = tn(), k = {}, te = typeof Uint8Array == "undefined" || !p ? n : p(Uint8Array), ee = {
|
|
2429
2510
|
__proto__: null,
|
|
2430
2511
|
"%AggregateError%": typeof AggregateError == "undefined" ? n : AggregateError,
|
|
2431
2512
|
"%Array%": Array,
|
|
2432
2513
|
"%ArrayBuffer%": typeof ArrayBuffer == "undefined" ? n : ArrayBuffer,
|
|
2433
|
-
"%ArrayIteratorPrototype%": v &&
|
|
2514
|
+
"%ArrayIteratorPrototype%": v && p ? p([][Symbol.iterator]()) : n,
|
|
2434
2515
|
"%AsyncFromSyncIteratorPrototype%": n,
|
|
2435
2516
|
"%AsyncFunction%": k,
|
|
2436
2517
|
"%AsyncGenerator%": k,
|
|
@@ -2455,17 +2536,17 @@ function oo() {
|
|
|
2455
2536
|
"%Float32Array%": typeof Float32Array == "undefined" ? n : Float32Array,
|
|
2456
2537
|
"%Float64Array%": typeof Float64Array == "undefined" ? n : Float64Array,
|
|
2457
2538
|
"%FinalizationRegistry%": typeof FinalizationRegistry == "undefined" ? n : FinalizationRegistry,
|
|
2458
|
-
"%Function%":
|
|
2539
|
+
"%Function%": _,
|
|
2459
2540
|
"%GeneratorFunction%": k,
|
|
2460
2541
|
"%Int8Array%": typeof Int8Array == "undefined" ? n : Int8Array,
|
|
2461
2542
|
"%Int16Array%": typeof Int16Array == "undefined" ? n : Int16Array,
|
|
2462
2543
|
"%Int32Array%": typeof Int32Array == "undefined" ? n : Int32Array,
|
|
2463
2544
|
"%isFinite%": isFinite,
|
|
2464
2545
|
"%isNaN%": isNaN,
|
|
2465
|
-
"%IteratorPrototype%": v &&
|
|
2546
|
+
"%IteratorPrototype%": v && p ? p(p([][Symbol.iterator]())) : n,
|
|
2466
2547
|
"%JSON%": typeof JSON == "object" ? JSON : n,
|
|
2467
2548
|
"%Map%": typeof Map == "undefined" ? n : Map,
|
|
2468
|
-
"%MapIteratorPrototype%": typeof Map == "undefined" || !v || !
|
|
2549
|
+
"%MapIteratorPrototype%": typeof Map == "undefined" || !v || !p ? n : p((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2469
2550
|
"%Math%": Math,
|
|
2470
2551
|
"%Number%": Number,
|
|
2471
2552
|
"%Object%": e,
|
|
@@ -2479,10 +2560,10 @@ function oo() {
|
|
|
2479
2560
|
"%Reflect%": typeof Reflect == "undefined" ? n : Reflect,
|
|
2480
2561
|
"%RegExp%": RegExp,
|
|
2481
2562
|
"%Set%": typeof Set == "undefined" ? n : Set,
|
|
2482
|
-
"%SetIteratorPrototype%": typeof Set == "undefined" || !v || !
|
|
2563
|
+
"%SetIteratorPrototype%": typeof Set == "undefined" || !v || !p ? n : p((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
2483
2564
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer == "undefined" ? n : SharedArrayBuffer,
|
|
2484
2565
|
"%String%": String,
|
|
2485
|
-
"%StringIteratorPrototype%": v &&
|
|
2566
|
+
"%StringIteratorPrototype%": v && p ? p(""[Symbol.iterator]()) : n,
|
|
2486
2567
|
"%Symbol%": v ? Symbol : n,
|
|
2487
2568
|
"%SyntaxError%": E,
|
|
2488
2569
|
"%ThrowTypeError%": R,
|
|
@@ -2499,7 +2580,7 @@ function oo() {
|
|
|
2499
2580
|
"%Function.prototype.call%": J,
|
|
2500
2581
|
"%Function.prototype.apply%": F,
|
|
2501
2582
|
"%Object.defineProperty%": P,
|
|
2502
|
-
"%Object.getPrototypeOf%":
|
|
2583
|
+
"%Object.getPrototypeOf%": B,
|
|
2503
2584
|
"%Math.abs%": u,
|
|
2504
2585
|
"%Math.floor%": w,
|
|
2505
2586
|
"%Math.max%": A,
|
|
@@ -2509,29 +2590,29 @@ function oo() {
|
|
|
2509
2590
|
"%Math.sign%": I,
|
|
2510
2591
|
"%Reflect.getPrototypeOf%": U
|
|
2511
2592
|
};
|
|
2512
|
-
if (
|
|
2593
|
+
if (p)
|
|
2513
2594
|
try {
|
|
2514
2595
|
null.error;
|
|
2515
2596
|
} catch (D) {
|
|
2516
|
-
var ae =
|
|
2597
|
+
var ae = p(p(D));
|
|
2517
2598
|
ee["%Error.prototype%"] = ae;
|
|
2518
2599
|
}
|
|
2519
|
-
var le = function D(
|
|
2520
|
-
var
|
|
2521
|
-
if (
|
|
2522
|
-
|
|
2523
|
-
else if (
|
|
2524
|
-
|
|
2525
|
-
else if (
|
|
2526
|
-
|
|
2527
|
-
else if (
|
|
2600
|
+
var le = function D(V) {
|
|
2601
|
+
var G;
|
|
2602
|
+
if (V === "%AsyncFunction%")
|
|
2603
|
+
G = h("async function () {}");
|
|
2604
|
+
else if (V === "%GeneratorFunction%")
|
|
2605
|
+
G = h("function* () {}");
|
|
2606
|
+
else if (V === "%AsyncGeneratorFunction%")
|
|
2607
|
+
G = h("async function* () {}");
|
|
2608
|
+
else if (V === "%AsyncGenerator%") {
|
|
2528
2609
|
var d = D("%AsyncGeneratorFunction%");
|
|
2529
|
-
d && (
|
|
2530
|
-
} else if (
|
|
2531
|
-
var
|
|
2532
|
-
|
|
2610
|
+
d && (G = d.prototype);
|
|
2611
|
+
} else if (V === "%AsyncIteratorPrototype%") {
|
|
2612
|
+
var g = D("%AsyncGenerator%");
|
|
2613
|
+
g && p && (G = p(g.prototype));
|
|
2533
2614
|
}
|
|
2534
|
-
return ee[
|
|
2615
|
+
return ee[V] = G, G;
|
|
2535
2616
|
}, me = {
|
|
2536
2617
|
__proto__: null,
|
|
2537
2618
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
@@ -2585,56 +2666,56 @@ function oo() {
|
|
|
2585
2666
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2586
2667
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2587
2668
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2588
|
-
}, ce =
|
|
2589
|
-
var
|
|
2590
|
-
if (
|
|
2669
|
+
}, ce = Ze(), ge = /* @__PURE__ */ io(), ie = ce.call(J, Array.prototype.concat), Se = ce.call(F, Array.prototype.splice), he = ce.call(J, String.prototype.replace), L = ce.call(J, String.prototype.slice), $ = ce.call(J, RegExp.prototype.exec), z = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Y = /\\(\\)?/g, M = function(V) {
|
|
2670
|
+
var G = L(V, 0, 1), d = L(V, -1);
|
|
2671
|
+
if (G === "%" && d !== "%")
|
|
2591
2672
|
throw new E("invalid intrinsic syntax, expected closing `%`");
|
|
2592
|
-
if (d === "%" &&
|
|
2673
|
+
if (d === "%" && G !== "%")
|
|
2593
2674
|
throw new E("invalid intrinsic syntax, expected opening `%`");
|
|
2594
|
-
var
|
|
2595
|
-
return he(
|
|
2596
|
-
|
|
2597
|
-
}),
|
|
2598
|
-
}, O = function(
|
|
2599
|
-
var d =
|
|
2600
|
-
if (
|
|
2675
|
+
var g = [];
|
|
2676
|
+
return he(V, z, function(x, H, K, X) {
|
|
2677
|
+
g[g.length] = K ? he(X, Y, "$1") : H || x;
|
|
2678
|
+
}), g;
|
|
2679
|
+
}, O = function(V, G) {
|
|
2680
|
+
var d = V, g;
|
|
2681
|
+
if (ge(me, d) && (g = me[d], d = "%" + g[0] + "%"), ge(ee, d)) {
|
|
2601
2682
|
var x = ee[d];
|
|
2602
|
-
if (x === k && (x = le(d)), typeof x == "undefined" && !
|
|
2603
|
-
throw new a("intrinsic " +
|
|
2683
|
+
if (x === k && (x = le(d)), typeof x == "undefined" && !G)
|
|
2684
|
+
throw new a("intrinsic " + V + " exists, but is not available. Please file an issue!");
|
|
2604
2685
|
return {
|
|
2605
|
-
alias:
|
|
2686
|
+
alias: g,
|
|
2606
2687
|
name: d,
|
|
2607
2688
|
value: x
|
|
2608
2689
|
};
|
|
2609
2690
|
}
|
|
2610
|
-
throw new E("intrinsic " +
|
|
2691
|
+
throw new E("intrinsic " + V + " does not exist!");
|
|
2611
2692
|
};
|
|
2612
|
-
return lr = function(
|
|
2613
|
-
if (typeof
|
|
2693
|
+
return lr = function(V, G) {
|
|
2694
|
+
if (typeof V != "string" || V.length === 0)
|
|
2614
2695
|
throw new a("intrinsic name must be a non-empty string");
|
|
2615
|
-
if (arguments.length > 1 && typeof
|
|
2696
|
+
if (arguments.length > 1 && typeof G != "boolean")
|
|
2616
2697
|
throw new a('"allowMissing" argument must be a boolean');
|
|
2617
|
-
if ($(/^%?[^%]*%?$/,
|
|
2698
|
+
if ($(/^%?[^%]*%?$/, V) === null)
|
|
2618
2699
|
throw new E("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2619
|
-
var d =
|
|
2620
|
-
Q && (
|
|
2700
|
+
var d = M(V), g = d.length > 0 ? d[0] : "", x = O("%" + g + "%", G), H = x.name, K = x.value, X = !1, Q = x.alias;
|
|
2701
|
+
Q && (g = Q[0], Se(d, ie([0, 1], Q)));
|
|
2621
2702
|
for (var q = 1, ve = !0; q < d.length; q += 1) {
|
|
2622
2703
|
var ye = d[q], oe = L(ye, 0, 1), ue = L(ye, -1);
|
|
2623
2704
|
if ((oe === '"' || oe === "'" || oe === "`" || ue === '"' || ue === "'" || ue === "`") && oe !== ue)
|
|
2624
2705
|
throw new E("property names with quotes must have matching quotes");
|
|
2625
|
-
if ((ye === "constructor" || !ve) && (X = !0),
|
|
2706
|
+
if ((ye === "constructor" || !ve) && (X = !0), g += "." + ye, H = "%" + g + "%", ge(ee, H))
|
|
2626
2707
|
K = ee[H];
|
|
2627
2708
|
else if (K != null) {
|
|
2628
2709
|
if (!(ye in K)) {
|
|
2629
|
-
if (!
|
|
2630
|
-
throw new a("base intrinsic for " +
|
|
2710
|
+
if (!G)
|
|
2711
|
+
throw new a("base intrinsic for " + V + " exists, but the property is not available.");
|
|
2631
2712
|
return;
|
|
2632
2713
|
}
|
|
2633
2714
|
if (b && q + 1 >= d.length) {
|
|
2634
2715
|
var Ce = b(K, ye);
|
|
2635
2716
|
ve = !!Ce, ve && "get" in Ce && !("originalValue" in Ce.get) ? K = Ce.get : K = K[ye];
|
|
2636
2717
|
} else
|
|
2637
|
-
ve =
|
|
2718
|
+
ve = ge(K, ye), K = K[ye];
|
|
2638
2719
|
ve && !X && (ee[H] = K);
|
|
2639
2720
|
}
|
|
2640
2721
|
}
|
|
@@ -2642,7 +2723,7 @@ function oo() {
|
|
|
2642
2723
|
}, lr;
|
|
2643
2724
|
}
|
|
2644
2725
|
var cr, ri;
|
|
2645
|
-
function
|
|
2726
|
+
function Qe() {
|
|
2646
2727
|
if (ri) return cr;
|
|
2647
2728
|
ri = 1;
|
|
2648
2729
|
var n = /* @__PURE__ */ oo(), e = nn(), t = e([n("%String.prototype.indexOf%")]);
|
|
@@ -2661,7 +2742,7 @@ var ur, ni;
|
|
|
2661
2742
|
function oa() {
|
|
2662
2743
|
if (ni) return ur;
|
|
2663
2744
|
ni = 1;
|
|
2664
|
-
var n = dt()(), e = /* @__PURE__ */
|
|
2745
|
+
var n = dt()(), e = /* @__PURE__ */ Qe(), t = e("Object.prototype.toString"), o = function(a) {
|
|
2665
2746
|
return n && a && typeof a == "object" && Symbol.toStringTag in a ? !1 : t(a) === "[object Arguments]";
|
|
2666
2747
|
}, l = function(a) {
|
|
2667
2748
|
return o(a) ? !0 : a !== null && typeof a == "object" && "length" in a && typeof a.length == "number" && a.length >= 0 && t(a) !== "[object Array]" && "callee" in a && t(a.callee) === "[object Function]";
|
|
@@ -2674,7 +2755,7 @@ var fr, ii;
|
|
|
2674
2755
|
function aa() {
|
|
2675
2756
|
if (ii) return fr;
|
|
2676
2757
|
ii = 1;
|
|
2677
|
-
var n = /* @__PURE__ */
|
|
2758
|
+
var n = /* @__PURE__ */ Qe(), e = dt()(), t = /* @__PURE__ */ io(), o = /* @__PURE__ */ We(), l;
|
|
2678
2759
|
if (e) {
|
|
2679
2760
|
var c = n("RegExp.prototype.exec"), E = {}, a = function() {
|
|
2680
2761
|
throw E;
|
|
@@ -2718,7 +2799,7 @@ var dr, oi;
|
|
|
2718
2799
|
function sa() {
|
|
2719
2800
|
if (oi) return dr;
|
|
2720
2801
|
oi = 1;
|
|
2721
|
-
var n = /* @__PURE__ */
|
|
2802
|
+
var n = /* @__PURE__ */ Qe(), e = aa(), t = n("RegExp.prototype.exec"), o = /* @__PURE__ */ Xe();
|
|
2722
2803
|
return dr = function(c) {
|
|
2723
2804
|
if (!e(c))
|
|
2724
2805
|
throw new o("`regex` must be a RegExp");
|
|
@@ -2731,7 +2812,7 @@ var hr, ai;
|
|
|
2731
2812
|
function la() {
|
|
2732
2813
|
if (ai) return hr;
|
|
2733
2814
|
ai = 1;
|
|
2734
|
-
var n = /* @__PURE__ */
|
|
2815
|
+
var n = /* @__PURE__ */ Qe(), e = /* @__PURE__ */ sa(), t = e(/^\s*(?:function)?\*/), o = dt()(), l = on(), c = n("Object.prototype.toString"), E = n("Function.prototype.toString"), a = function() {
|
|
2735
2816
|
if (!o)
|
|
2736
2817
|
return !1;
|
|
2737
2818
|
try {
|
|
@@ -2781,46 +2862,46 @@ function ca() {
|
|
|
2781
2862
|
e = null;
|
|
2782
2863
|
var l = /^\s*class\b/, c = function(P) {
|
|
2783
2864
|
try {
|
|
2784
|
-
var
|
|
2785
|
-
return l.test(
|
|
2865
|
+
var S = n.call(P);
|
|
2866
|
+
return l.test(S);
|
|
2786
2867
|
} catch (R) {
|
|
2787
2868
|
return !1;
|
|
2788
2869
|
}
|
|
2789
2870
|
}, E = function(P) {
|
|
2790
2871
|
try {
|
|
2791
2872
|
return c(P) ? !1 : (n.call(P), !0);
|
|
2792
|
-
} catch (
|
|
2873
|
+
} catch (S) {
|
|
2793
2874
|
return !1;
|
|
2794
2875
|
}
|
|
2795
|
-
}, a = Object.prototype.toString, f = "[object Object]", u = "[object Function]", w = "[object GeneratorFunction]", A = "[object HTMLAllCollection]", C = "[object HTML document.all class]", j = "[object HTMLCollection]", y = typeof Symbol == "function" && !!Symbol.toStringTag, I = !(0 in [,]),
|
|
2876
|
+
}, a = Object.prototype.toString, f = "[object Object]", u = "[object Function]", w = "[object GeneratorFunction]", A = "[object HTMLAllCollection]", C = "[object HTML document.all class]", j = "[object HTMLCollection]", y = typeof Symbol == "function" && !!Symbol.toStringTag, I = !(0 in [,]), _ = function() {
|
|
2796
2877
|
return !1;
|
|
2797
2878
|
};
|
|
2798
2879
|
if (typeof document == "object") {
|
|
2799
2880
|
var h = document.all;
|
|
2800
|
-
a.call(h) === a.call(document.all) && (
|
|
2881
|
+
a.call(h) === a.call(document.all) && (_ = function(P) {
|
|
2801
2882
|
if ((I || !P) && (typeof P == "undefined" || typeof P == "object"))
|
|
2802
2883
|
try {
|
|
2803
|
-
var
|
|
2804
|
-
return (
|
|
2884
|
+
var S = a.call(P);
|
|
2885
|
+
return (S === A || S === C || S === j || S === f) && P("") == null;
|
|
2805
2886
|
} catch (R) {
|
|
2806
2887
|
}
|
|
2807
2888
|
return !1;
|
|
2808
2889
|
});
|
|
2809
2890
|
}
|
|
2810
2891
|
return pr = e ? function(P) {
|
|
2811
|
-
if (
|
|
2892
|
+
if (_(P))
|
|
2812
2893
|
return !0;
|
|
2813
2894
|
if (!P || typeof P != "function" && typeof P != "object")
|
|
2814
2895
|
return !1;
|
|
2815
2896
|
try {
|
|
2816
2897
|
e(P, null, t);
|
|
2817
|
-
} catch (
|
|
2818
|
-
if (
|
|
2898
|
+
} catch (S) {
|
|
2899
|
+
if (S !== o)
|
|
2819
2900
|
return !1;
|
|
2820
2901
|
}
|
|
2821
2902
|
return !c(P) && E(P);
|
|
2822
2903
|
} : function(P) {
|
|
2823
|
-
if (
|
|
2904
|
+
if (_(P))
|
|
2824
2905
|
return !0;
|
|
2825
2906
|
if (!P || typeof P != "function" && typeof P != "object")
|
|
2826
2907
|
return !1;
|
|
@@ -2828,8 +2909,8 @@ function ca() {
|
|
|
2828
2909
|
return E(P);
|
|
2829
2910
|
if (c(P))
|
|
2830
2911
|
return !1;
|
|
2831
|
-
var
|
|
2832
|
-
return
|
|
2912
|
+
var S = a.call(P);
|
|
2913
|
+
return S !== u && S !== w && !/^\[object HTML/.test(S) ? !1 : E(P);
|
|
2833
2914
|
}, pr;
|
|
2834
2915
|
}
|
|
2835
2916
|
var gr, li;
|
|
@@ -2888,7 +2969,7 @@ var vr = { exports: {} }, br, fi;
|
|
|
2888
2969
|
function ha() {
|
|
2889
2970
|
if (fi) return br;
|
|
2890
2971
|
fi = 1;
|
|
2891
|
-
var n = /* @__PURE__ */ ht(), e = /* @__PURE__ */ eo(), t = /* @__PURE__ */
|
|
2972
|
+
var n = /* @__PURE__ */ ht(), e = /* @__PURE__ */ eo(), t = /* @__PURE__ */ Xe(), o = /* @__PURE__ */ We();
|
|
2892
2973
|
return br = function(c, E, a) {
|
|
2893
2974
|
if (!c || typeof c != "object" && typeof c != "function")
|
|
2894
2975
|
throw new t("`obj` must be an object or a function`");
|
|
@@ -2933,12 +3014,12 @@ function pa() {
|
|
|
2933
3014
|
}
|
|
2934
3015
|
}, wr = e, wr;
|
|
2935
3016
|
}
|
|
2936
|
-
var
|
|
3017
|
+
var Sr, hi;
|
|
2937
3018
|
function ga() {
|
|
2938
|
-
if (hi) return
|
|
3019
|
+
if (hi) return Sr;
|
|
2939
3020
|
hi = 1;
|
|
2940
|
-
var n = /* @__PURE__ */ oo(), e = /* @__PURE__ */ ha(), t = /* @__PURE__ */ pa()(), o = /* @__PURE__ */ We(), l = /* @__PURE__ */
|
|
2941
|
-
return
|
|
3021
|
+
var n = /* @__PURE__ */ oo(), e = /* @__PURE__ */ ha(), t = /* @__PURE__ */ pa()(), o = /* @__PURE__ */ We(), l = /* @__PURE__ */ Xe(), c = n("%Math.floor%");
|
|
3022
|
+
return Sr = function(a, f) {
|
|
2942
3023
|
if (typeof a != "function")
|
|
2943
3024
|
throw new l("`fn` is not a function");
|
|
2944
3025
|
if (typeof f != "number" || f < 0 || f > 4294967295 || c(f) !== f)
|
|
@@ -2961,16 +3042,16 @@ function ga() {
|
|
|
2961
3042
|
"length",
|
|
2962
3043
|
f
|
|
2963
3044
|
)), a;
|
|
2964
|
-
},
|
|
3045
|
+
}, Sr;
|
|
2965
3046
|
}
|
|
2966
|
-
var
|
|
3047
|
+
var _r, pi;
|
|
2967
3048
|
function ya() {
|
|
2968
|
-
if (pi) return
|
|
3049
|
+
if (pi) return _r;
|
|
2969
3050
|
pi = 1;
|
|
2970
|
-
var n =
|
|
2971
|
-
return
|
|
3051
|
+
var n = Ze(), e = rn(), t = no();
|
|
3052
|
+
return _r = function() {
|
|
2972
3053
|
return t(n, e, arguments);
|
|
2973
|
-
},
|
|
3054
|
+
}, _r;
|
|
2974
3055
|
}
|
|
2975
3056
|
var gi;
|
|
2976
3057
|
function ma() {
|
|
@@ -2990,16 +3071,16 @@ var Cr, yi;
|
|
|
2990
3071
|
function ao() {
|
|
2991
3072
|
if (yi) return Cr;
|
|
2992
3073
|
yi = 1;
|
|
2993
|
-
var n = ua(), e = /* @__PURE__ */ da(), t = ma(), o = /* @__PURE__ */
|
|
2994
|
-
for (var b = 0; b <
|
|
2995
|
-
if (
|
|
3074
|
+
var n = ua(), e = /* @__PURE__ */ da(), t = ma(), o = /* @__PURE__ */ Qe(), l = /* @__PURE__ */ We(), c = on(), E = o("Object.prototype.toString"), a = dt()(), f = globalThis, u = e(), w = o("String.prototype.slice"), A = o("Array.prototype.indexOf", !0) || function(_, h) {
|
|
3075
|
+
for (var b = 0; b < _.length; b += 1)
|
|
3076
|
+
if (_[b] === h)
|
|
2996
3077
|
return b;
|
|
2997
3078
|
return -1;
|
|
2998
3079
|
}, C = { __proto__: null };
|
|
2999
3080
|
a && l && c ? n(u, function(I) {
|
|
3000
|
-
var
|
|
3001
|
-
if (Symbol.toStringTag in
|
|
3002
|
-
var h = c(
|
|
3081
|
+
var _ = new f[I]();
|
|
3082
|
+
if (Symbol.toStringTag in _ && c) {
|
|
3083
|
+
var h = c(_), b = l(h, Symbol.toStringTag);
|
|
3003
3084
|
if (!b && h) {
|
|
3004
3085
|
var P = c(h);
|
|
3005
3086
|
b = l(P, Symbol.toStringTag);
|
|
@@ -3007,7 +3088,7 @@ function ao() {
|
|
|
3007
3088
|
C["$" + I] = t(b.get);
|
|
3008
3089
|
}
|
|
3009
3090
|
}) : n(u, function(I) {
|
|
3010
|
-
var
|
|
3091
|
+
var _ = new f[I](), h = _.slice || _.set;
|
|
3011
3092
|
h && (C[
|
|
3012
3093
|
/** @type {`$${import('.').TypedArrayName}`} */
|
|
3013
3094
|
"$" + I
|
|
@@ -3015,7 +3096,7 @@ function ao() {
|
|
|
3015
3096
|
// @ts-expect-error TODO FIXME
|
|
3016
3097
|
t(h));
|
|
3017
3098
|
});
|
|
3018
|
-
var j = function(
|
|
3099
|
+
var j = function(_) {
|
|
3019
3100
|
var h = !1;
|
|
3020
3101
|
return n(
|
|
3021
3102
|
/** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */
|
|
@@ -3024,13 +3105,13 @@ function ao() {
|
|
|
3024
3105
|
function(b, P) {
|
|
3025
3106
|
if (!h)
|
|
3026
3107
|
try {
|
|
3027
|
-
"$" + b(
|
|
3108
|
+
"$" + b(_) === P && (h = /** @type {import('.').TypedArrayName} */
|
|
3028
3109
|
w(P, 1));
|
|
3029
|
-
} catch (
|
|
3110
|
+
} catch (S) {
|
|
3030
3111
|
}
|
|
3031
3112
|
}
|
|
3032
3113
|
), h;
|
|
3033
|
-
}, y = function(
|
|
3114
|
+
}, y = function(_) {
|
|
3034
3115
|
var h = !1;
|
|
3035
3116
|
return n(
|
|
3036
3117
|
/** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */
|
|
@@ -3039,21 +3120,21 @@ function ao() {
|
|
|
3039
3120
|
function(b, P) {
|
|
3040
3121
|
if (!h)
|
|
3041
3122
|
try {
|
|
3042
|
-
b(
|
|
3123
|
+
b(_), h = /** @type {import('.').TypedArrayName} */
|
|
3043
3124
|
w(P, 1);
|
|
3044
|
-
} catch (
|
|
3125
|
+
} catch (S) {
|
|
3045
3126
|
}
|
|
3046
3127
|
}
|
|
3047
3128
|
), h;
|
|
3048
3129
|
};
|
|
3049
|
-
return Cr = function(
|
|
3050
|
-
if (!
|
|
3130
|
+
return Cr = function(_) {
|
|
3131
|
+
if (!_ || typeof _ != "object")
|
|
3051
3132
|
return !1;
|
|
3052
3133
|
if (!a) {
|
|
3053
|
-
var h = w(E(
|
|
3054
|
-
return A(u, h) > -1 ? h : h !== "Object" ? !1 : y(
|
|
3134
|
+
var h = w(E(_), 8, -1);
|
|
3135
|
+
return A(u, h) > -1 ? h : h !== "Object" ? !1 : y(_);
|
|
3055
3136
|
}
|
|
3056
|
-
return l ? j(
|
|
3137
|
+
return l ? j(_) : null;
|
|
3057
3138
|
}, Cr;
|
|
3058
3139
|
}
|
|
3059
3140
|
var Er, mi;
|
|
@@ -3091,10 +3172,10 @@ function ba() {
|
|
|
3091
3172
|
return typeof Promise != "undefined" && q instanceof Promise || q !== null && typeof q == "object" && typeof q.then == "function" && typeof q.catch == "function";
|
|
3092
3173
|
}
|
|
3093
3174
|
n.isPromise = I;
|
|
3094
|
-
function
|
|
3175
|
+
function _(q) {
|
|
3095
3176
|
return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? ArrayBuffer.isView(q) : l(q) || L(q);
|
|
3096
3177
|
}
|
|
3097
|
-
n.isArrayBufferView =
|
|
3178
|
+
n.isArrayBufferView = _;
|
|
3098
3179
|
function h(q) {
|
|
3099
3180
|
return o(q) === "Uint8Array";
|
|
3100
3181
|
}
|
|
@@ -3107,10 +3188,10 @@ function ba() {
|
|
|
3107
3188
|
return o(q) === "Uint16Array";
|
|
3108
3189
|
}
|
|
3109
3190
|
n.isUint16Array = P;
|
|
3110
|
-
function
|
|
3191
|
+
function S(q) {
|
|
3111
3192
|
return o(q) === "Uint32Array";
|
|
3112
3193
|
}
|
|
3113
|
-
n.isUint32Array =
|
|
3194
|
+
n.isUint32Array = S;
|
|
3114
3195
|
function R(q) {
|
|
3115
3196
|
return o(q) === "Int8Array";
|
|
3116
3197
|
}
|
|
@@ -3119,14 +3200,14 @@ function ba() {
|
|
|
3119
3200
|
return o(q) === "Int16Array";
|
|
3120
3201
|
}
|
|
3121
3202
|
n.isInt16Array = v;
|
|
3122
|
-
function
|
|
3203
|
+
function p(q) {
|
|
3123
3204
|
return o(q) === "Int32Array";
|
|
3124
3205
|
}
|
|
3125
|
-
n.isInt32Array =
|
|
3126
|
-
function
|
|
3206
|
+
n.isInt32Array = p;
|
|
3207
|
+
function B(q) {
|
|
3127
3208
|
return o(q) === "Float32Array";
|
|
3128
3209
|
}
|
|
3129
|
-
n.isFloat32Array =
|
|
3210
|
+
n.isFloat32Array = B;
|
|
3130
3211
|
function U(q) {
|
|
3131
3212
|
return o(q) === "Float64Array";
|
|
3132
3213
|
}
|
|
@@ -3167,18 +3248,18 @@ function ba() {
|
|
|
3167
3248
|
return f(q) === "[object WeakSet]";
|
|
3168
3249
|
}
|
|
3169
3250
|
ce.working = typeof WeakSet != "undefined" && ce(/* @__PURE__ */ new WeakSet());
|
|
3170
|
-
function
|
|
3251
|
+
function ge(q) {
|
|
3171
3252
|
return ce(q);
|
|
3172
3253
|
}
|
|
3173
|
-
n.isWeakSet =
|
|
3254
|
+
n.isWeakSet = ge;
|
|
3174
3255
|
function ie(q) {
|
|
3175
3256
|
return f(q) === "[object ArrayBuffer]";
|
|
3176
3257
|
}
|
|
3177
3258
|
ie.working = typeof ArrayBuffer != "undefined" && ie(new ArrayBuffer());
|
|
3178
|
-
function
|
|
3259
|
+
function Se(q) {
|
|
3179
3260
|
return typeof ArrayBuffer == "undefined" ? !1 : ie.working ? ie(q) : q instanceof ArrayBuffer;
|
|
3180
3261
|
}
|
|
3181
|
-
n.isArrayBuffer =
|
|
3262
|
+
n.isArrayBuffer = Se;
|
|
3182
3263
|
function he(q) {
|
|
3183
3264
|
return f(q) === "[object DataView]";
|
|
3184
3265
|
}
|
|
@@ -3195,10 +3276,10 @@ function ba() {
|
|
|
3195
3276
|
return typeof $ == "undefined" ? !1 : (typeof z.working == "undefined" && (z.working = z(new $())), z.working ? z(q) : q instanceof $);
|
|
3196
3277
|
}
|
|
3197
3278
|
n.isSharedArrayBuffer = Y;
|
|
3198
|
-
function
|
|
3279
|
+
function M(q) {
|
|
3199
3280
|
return f(q) === "[object AsyncFunction]";
|
|
3200
3281
|
}
|
|
3201
|
-
n.isAsyncFunction =
|
|
3282
|
+
n.isAsyncFunction = M;
|
|
3202
3283
|
function O(q) {
|
|
3203
3284
|
return f(q) === "[object Map Iterator]";
|
|
3204
3285
|
}
|
|
@@ -3207,22 +3288,22 @@ function ba() {
|
|
|
3207
3288
|
return f(q) === "[object Set Iterator]";
|
|
3208
3289
|
}
|
|
3209
3290
|
n.isSetIterator = D;
|
|
3210
|
-
function
|
|
3291
|
+
function V(q) {
|
|
3211
3292
|
return f(q) === "[object Generator]";
|
|
3212
3293
|
}
|
|
3213
|
-
n.isGeneratorObject =
|
|
3214
|
-
function
|
|
3294
|
+
n.isGeneratorObject = V;
|
|
3295
|
+
function G(q) {
|
|
3215
3296
|
return f(q) === "[object WebAssembly.Module]";
|
|
3216
3297
|
}
|
|
3217
|
-
n.isWebAssemblyCompiledModule =
|
|
3298
|
+
n.isWebAssemblyCompiledModule = G;
|
|
3218
3299
|
function d(q) {
|
|
3219
3300
|
return y(q, u);
|
|
3220
3301
|
}
|
|
3221
3302
|
n.isNumberObject = d;
|
|
3222
|
-
function
|
|
3303
|
+
function g(q) {
|
|
3223
3304
|
return y(q, w);
|
|
3224
3305
|
}
|
|
3225
|
-
n.isStringObject =
|
|
3306
|
+
n.isStringObject = g;
|
|
3226
3307
|
function x(q) {
|
|
3227
3308
|
return y(q, A);
|
|
3228
3309
|
}
|
|
@@ -3236,11 +3317,11 @@ function ba() {
|
|
|
3236
3317
|
}
|
|
3237
3318
|
n.isSymbolObject = K;
|
|
3238
3319
|
function X(q) {
|
|
3239
|
-
return d(q) ||
|
|
3320
|
+
return d(q) || g(q) || x(q) || H(q) || K(q);
|
|
3240
3321
|
}
|
|
3241
3322
|
n.isBoxedPrimitive = X;
|
|
3242
3323
|
function Q(q) {
|
|
3243
|
-
return typeof Uint8Array != "undefined" && (
|
|
3324
|
+
return typeof Uint8Array != "undefined" && (Se(q) || Y(q));
|
|
3244
3325
|
}
|
|
3245
3326
|
n.isAnyArrayBuffer = Q, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(q) {
|
|
3246
3327
|
Object.defineProperty(n, q, {
|
|
@@ -3259,7 +3340,7 @@ function wa() {
|
|
|
3259
3340
|
}), Rr;
|
|
3260
3341
|
}
|
|
3261
3342
|
var lt = { exports: {} }, wi;
|
|
3262
|
-
function
|
|
3343
|
+
function Ve() {
|
|
3263
3344
|
return wi || (wi = 1, typeof Object.create == "function" ? lt.exports = function(e, t) {
|
|
3264
3345
|
t && (e.super_ = t, e.prototype = Object.create(t.prototype, {
|
|
3265
3346
|
constructor: {
|
|
@@ -3278,12 +3359,12 @@ function Ge() {
|
|
|
3278
3359
|
}
|
|
3279
3360
|
}), lt.exports;
|
|
3280
3361
|
}
|
|
3281
|
-
var
|
|
3362
|
+
var Si;
|
|
3282
3363
|
function so() {
|
|
3283
|
-
return
|
|
3364
|
+
return Si || (Si = 1, function(n) {
|
|
3284
3365
|
var e = { env: {} }, t = Object.getOwnPropertyDescriptors || function($) {
|
|
3285
|
-
for (var z = Object.keys($), Y = {},
|
|
3286
|
-
Y[z[
|
|
3366
|
+
for (var z = Object.keys($), Y = {}, M = 0; M < z.length; M++)
|
|
3367
|
+
Y[z[M]] = Object.getOwnPropertyDescriptor($, z[M]);
|
|
3287
3368
|
return Y;
|
|
3288
3369
|
}, o = /%[sdj%]/g;
|
|
3289
3370
|
n.format = function(L) {
|
|
@@ -3292,10 +3373,10 @@ function so() {
|
|
|
3292
3373
|
$.push(a(arguments[z]));
|
|
3293
3374
|
return $.join(" ");
|
|
3294
3375
|
}
|
|
3295
|
-
for (var z = 1, Y = arguments,
|
|
3296
|
-
if (
|
|
3297
|
-
if (z >=
|
|
3298
|
-
switch (
|
|
3376
|
+
for (var z = 1, Y = arguments, M = Y.length, O = String(L).replace(o, function(V) {
|
|
3377
|
+
if (V === "%%") return "%";
|
|
3378
|
+
if (z >= M) return V;
|
|
3379
|
+
switch (V) {
|
|
3299
3380
|
case "%s":
|
|
3300
3381
|
return String(Y[z++]);
|
|
3301
3382
|
case "%d":
|
|
@@ -3303,13 +3384,13 @@ function so() {
|
|
|
3303
3384
|
case "%j":
|
|
3304
3385
|
try {
|
|
3305
3386
|
return JSON.stringify(Y[z++]);
|
|
3306
|
-
} catch (
|
|
3387
|
+
} catch (G) {
|
|
3307
3388
|
return "[Circular]";
|
|
3308
3389
|
}
|
|
3309
3390
|
default:
|
|
3310
|
-
return
|
|
3391
|
+
return V;
|
|
3311
3392
|
}
|
|
3312
|
-
}), D = Y[z]; z <
|
|
3393
|
+
}), D = Y[z]; z < M; D = Y[++z])
|
|
3313
3394
|
P(D) || !F(D) ? O += " " + D : O += " " + a(D);
|
|
3314
3395
|
return O;
|
|
3315
3396
|
}, n.deprecate = function(L, $) {
|
|
@@ -3353,7 +3434,7 @@ function so() {
|
|
|
3353
3434
|
seen: [],
|
|
3354
3435
|
stylize: u
|
|
3355
3436
|
};
|
|
3356
|
-
return arguments.length >= 3 && (z.depth = arguments[2]), arguments.length >= 4 && (z.colors = arguments[3]), b($) ? z.showHidden = $ : $ && n._extend(z, $),
|
|
3437
|
+
return arguments.length >= 3 && (z.depth = arguments[2]), arguments.length >= 4 && (z.colors = arguments[3]), b($) ? z.showHidden = $ : $ && n._extend(z, $), B(z.showHidden) && (z.showHidden = !1), B(z.depth) && (z.depth = 2), B(z.colors) && (z.colors = !1), B(z.customInspect) && (z.customInspect = !0), z.colors && (z.stylize = f), A(z, L, z.depth);
|
|
3357
3438
|
}
|
|
3358
3439
|
n.inspect = a, a.colors = {
|
|
3359
3440
|
bold: [1, 22],
|
|
@@ -3400,16 +3481,16 @@ function so() {
|
|
|
3400
3481
|
var Y = $.inspect(z, L);
|
|
3401
3482
|
return v(Y) || (Y = A(L, Y, z)), Y;
|
|
3402
3483
|
}
|
|
3403
|
-
var
|
|
3404
|
-
if (
|
|
3405
|
-
return
|
|
3484
|
+
var M = C(L, $);
|
|
3485
|
+
if (M)
|
|
3486
|
+
return M;
|
|
3406
3487
|
var O = Object.keys($), D = w(O);
|
|
3407
3488
|
if (L.showHidden && (O = Object.getOwnPropertyNames($)), k($) && (O.indexOf("message") >= 0 || O.indexOf("description") >= 0))
|
|
3408
3489
|
return j($);
|
|
3409
3490
|
if (O.length === 0) {
|
|
3410
3491
|
if (te($)) {
|
|
3411
|
-
var
|
|
3412
|
-
return L.stylize("[Function" +
|
|
3492
|
+
var V = $.name ? ": " + $.name : "";
|
|
3493
|
+
return L.stylize("[Function" + V + "]", "special");
|
|
3413
3494
|
}
|
|
3414
3495
|
if (U($))
|
|
3415
3496
|
return L.stylize(RegExp.prototype.toString.call($), "regexp");
|
|
@@ -3418,23 +3499,23 @@ function so() {
|
|
|
3418
3499
|
if (k($))
|
|
3419
3500
|
return j($);
|
|
3420
3501
|
}
|
|
3421
|
-
var
|
|
3422
|
-
if (h($) && (d = !0,
|
|
3502
|
+
var G = "", d = !1, g = ["{", "}"];
|
|
3503
|
+
if (h($) && (d = !0, g = ["[", "]"]), te($)) {
|
|
3423
3504
|
var x = $.name ? ": " + $.name : "";
|
|
3424
|
-
|
|
3505
|
+
G = " [Function" + x + "]";
|
|
3425
3506
|
}
|
|
3426
|
-
if (U($) && (
|
|
3427
|
-
return
|
|
3507
|
+
if (U($) && (G = " " + RegExp.prototype.toString.call($)), J($) && (G = " " + Date.prototype.toUTCString.call($)), k($) && (G = " " + j($)), O.length === 0 && (!d || $.length == 0))
|
|
3508
|
+
return g[0] + G + g[1];
|
|
3428
3509
|
if (z < 0)
|
|
3429
3510
|
return U($) ? L.stylize(RegExp.prototype.toString.call($), "regexp") : L.stylize("[Object]", "special");
|
|
3430
3511
|
L.seen.push($);
|
|
3431
3512
|
var H;
|
|
3432
3513
|
return d ? H = y(L, $, z, D, O) : H = O.map(function(K) {
|
|
3433
3514
|
return I(L, $, z, D, K, d);
|
|
3434
|
-
}), L.seen.pop(),
|
|
3515
|
+
}), L.seen.pop(), _(H, G, g);
|
|
3435
3516
|
}
|
|
3436
3517
|
function C(L, $) {
|
|
3437
|
-
if (
|
|
3518
|
+
if (B($))
|
|
3438
3519
|
return L.stylize("undefined", "undefined");
|
|
3439
3520
|
if (v($)) {
|
|
3440
3521
|
var z = "'" + JSON.stringify($).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
@@ -3450,9 +3531,9 @@ function so() {
|
|
|
3450
3531
|
function j(L) {
|
|
3451
3532
|
return "[" + Error.prototype.toString.call(L) + "]";
|
|
3452
3533
|
}
|
|
3453
|
-
function y(L, $, z, Y,
|
|
3454
|
-
for (var O = [], D = 0,
|
|
3455
|
-
|
|
3534
|
+
function y(L, $, z, Y, M) {
|
|
3535
|
+
for (var O = [], D = 0, V = $.length; D < V; ++D)
|
|
3536
|
+
ge($, String(D)) ? O.push(I(
|
|
3456
3537
|
L,
|
|
3457
3538
|
$,
|
|
3458
3539
|
z,
|
|
@@ -3460,40 +3541,40 @@ function so() {
|
|
|
3460
3541
|
String(D),
|
|
3461
3542
|
!0
|
|
3462
3543
|
)) : O.push("");
|
|
3463
|
-
return
|
|
3464
|
-
|
|
3544
|
+
return M.forEach(function(G) {
|
|
3545
|
+
G.match(/^\d+$/) || O.push(I(
|
|
3465
3546
|
L,
|
|
3466
3547
|
$,
|
|
3467
3548
|
z,
|
|
3468
3549
|
Y,
|
|
3469
|
-
|
|
3550
|
+
G,
|
|
3470
3551
|
!0
|
|
3471
3552
|
));
|
|
3472
3553
|
}), O;
|
|
3473
3554
|
}
|
|
3474
|
-
function I(L, $, z, Y,
|
|
3475
|
-
var D,
|
|
3476
|
-
if (
|
|
3477
|
-
`) > -1 && (O ?
|
|
3555
|
+
function I(L, $, z, Y, M, O) {
|
|
3556
|
+
var D, V, G;
|
|
3557
|
+
if (G = Object.getOwnPropertyDescriptor($, M) || { value: $[M] }, G.get ? G.set ? V = L.stylize("[Getter/Setter]", "special") : V = L.stylize("[Getter]", "special") : G.set && (V = L.stylize("[Setter]", "special")), ge(Y, M) || (D = "[" + M + "]"), V || (L.seen.indexOf(G.value) < 0 ? (P(z) ? V = A(L, G.value, null) : V = A(L, G.value, z - 1), V.indexOf(`
|
|
3558
|
+
`) > -1 && (O ? V = V.split(`
|
|
3478
3559
|
`).map(function(d) {
|
|
3479
3560
|
return " " + d;
|
|
3480
3561
|
}).join(`
|
|
3481
|
-
`).slice(2) :
|
|
3482
|
-
` +
|
|
3562
|
+
`).slice(2) : V = `
|
|
3563
|
+
` + V.split(`
|
|
3483
3564
|
`).map(function(d) {
|
|
3484
3565
|
return " " + d;
|
|
3485
3566
|
}).join(`
|
|
3486
|
-
`))) :
|
|
3487
|
-
if (O &&
|
|
3488
|
-
return
|
|
3489
|
-
D = JSON.stringify("" +
|
|
3567
|
+
`))) : V = L.stylize("[Circular]", "special")), B(D)) {
|
|
3568
|
+
if (O && M.match(/^\d+$/))
|
|
3569
|
+
return V;
|
|
3570
|
+
D = JSON.stringify("" + M), D.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (D = D.slice(1, -1), D = L.stylize(D, "name")) : (D = D.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), D = L.stylize(D, "string"));
|
|
3490
3571
|
}
|
|
3491
|
-
return D + ": " +
|
|
3572
|
+
return D + ": " + V;
|
|
3492
3573
|
}
|
|
3493
|
-
function
|
|
3494
|
-
var Y = L.reduce(function(
|
|
3574
|
+
function _(L, $, z) {
|
|
3575
|
+
var Y = L.reduce(function(M, O) {
|
|
3495
3576
|
return O.indexOf(`
|
|
3496
|
-
`) >= 0,
|
|
3577
|
+
`) >= 0, M + O.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
3497
3578
|
}, 0);
|
|
3498
3579
|
return Y > 60 ? z[0] + ($ === "" ? "" : $ + `
|
|
3499
3580
|
`) + " " + L.join(`,
|
|
@@ -3512,10 +3593,10 @@ function so() {
|
|
|
3512
3593
|
return L === null;
|
|
3513
3594
|
}
|
|
3514
3595
|
n.isNull = P;
|
|
3515
|
-
function
|
|
3596
|
+
function S(L) {
|
|
3516
3597
|
return L == null;
|
|
3517
3598
|
}
|
|
3518
|
-
n.isNullOrUndefined =
|
|
3599
|
+
n.isNullOrUndefined = S;
|
|
3519
3600
|
function R(L) {
|
|
3520
3601
|
return typeof L == "number";
|
|
3521
3602
|
}
|
|
@@ -3524,14 +3605,14 @@ function so() {
|
|
|
3524
3605
|
return typeof L == "string";
|
|
3525
3606
|
}
|
|
3526
3607
|
n.isString = v;
|
|
3527
|
-
function
|
|
3608
|
+
function p(L) {
|
|
3528
3609
|
return typeof L == "symbol";
|
|
3529
3610
|
}
|
|
3530
|
-
n.isSymbol =
|
|
3531
|
-
function
|
|
3611
|
+
n.isSymbol = p;
|
|
3612
|
+
function B(L) {
|
|
3532
3613
|
return L === void 0;
|
|
3533
3614
|
}
|
|
3534
|
-
n.isUndefined =
|
|
3615
|
+
n.isUndefined = B;
|
|
3535
3616
|
function U(L) {
|
|
3536
3617
|
return F(L) && ae(L) === "[object RegExp]";
|
|
3537
3618
|
}
|
|
@@ -3587,13 +3668,13 @@ function so() {
|
|
|
3587
3668
|
}
|
|
3588
3669
|
n.log = function() {
|
|
3589
3670
|
console.log("%s - %s", ce(), n.format.apply(n, arguments));
|
|
3590
|
-
}, n.inherits =
|
|
3671
|
+
}, n.inherits = Ve(), n._extend = function(L, $) {
|
|
3591
3672
|
if (!$ || !F($)) return L;
|
|
3592
3673
|
for (var z = Object.keys($), Y = z.length; Y--; )
|
|
3593
3674
|
L[z[Y]] = $[z[Y]];
|
|
3594
3675
|
return L;
|
|
3595
3676
|
};
|
|
3596
|
-
function
|
|
3677
|
+
function ge(L, $) {
|
|
3597
3678
|
return Object.prototype.hasOwnProperty.call(L, $);
|
|
3598
3679
|
}
|
|
3599
3680
|
var ie = typeof Symbol != "undefined" ? Symbol("util.promisify.custom") : void 0;
|
|
@@ -3612,17 +3693,17 @@ function so() {
|
|
|
3612
3693
|
}), z;
|
|
3613
3694
|
}
|
|
3614
3695
|
function z() {
|
|
3615
|
-
for (var Y,
|
|
3616
|
-
Y =
|
|
3617
|
-
}), D = [],
|
|
3618
|
-
D.push(arguments[
|
|
3619
|
-
D.push(function(
|
|
3620
|
-
|
|
3696
|
+
for (var Y, M, O = new Promise(function(G, d) {
|
|
3697
|
+
Y = G, M = d;
|
|
3698
|
+
}), D = [], V = 0; V < arguments.length; V++)
|
|
3699
|
+
D.push(arguments[V]);
|
|
3700
|
+
D.push(function(G, d) {
|
|
3701
|
+
G ? M(G) : Y(d);
|
|
3621
3702
|
});
|
|
3622
3703
|
try {
|
|
3623
3704
|
$.apply(this, D);
|
|
3624
|
-
} catch (
|
|
3625
|
-
|
|
3705
|
+
} catch (G) {
|
|
3706
|
+
M(G);
|
|
3626
3707
|
}
|
|
3627
3708
|
return O;
|
|
3628
3709
|
}
|
|
@@ -3636,7 +3717,7 @@ function so() {
|
|
|
3636
3717
|
t($)
|
|
3637
3718
|
);
|
|
3638
3719
|
}, n.promisify.custom = ie;
|
|
3639
|
-
function
|
|
3720
|
+
function Se(L, $) {
|
|
3640
3721
|
if (!L) {
|
|
3641
3722
|
var z = new Error("Promise was rejected with a falsy value");
|
|
3642
3723
|
z.reason = L, L = z;
|
|
@@ -3649,18 +3730,18 @@ function so() {
|
|
|
3649
3730
|
function $() {
|
|
3650
3731
|
for (var z = [], Y = 0; Y < arguments.length; Y++)
|
|
3651
3732
|
z.push(arguments[Y]);
|
|
3652
|
-
var
|
|
3653
|
-
if (typeof
|
|
3733
|
+
var M = z.pop();
|
|
3734
|
+
if (typeof M != "function")
|
|
3654
3735
|
throw new TypeError("The last argument must be of type Function");
|
|
3655
3736
|
var O = this, D = function() {
|
|
3656
|
-
return
|
|
3737
|
+
return M.apply(O, arguments);
|
|
3657
3738
|
};
|
|
3658
3739
|
L.apply(this, z).then(
|
|
3659
|
-
function(
|
|
3660
|
-
e.nextTick(D.bind(null, null,
|
|
3740
|
+
function(V) {
|
|
3741
|
+
e.nextTick(D.bind(null, null, V));
|
|
3661
3742
|
},
|
|
3662
|
-
function(
|
|
3663
|
-
e.nextTick(
|
|
3743
|
+
function(V) {
|
|
3744
|
+
e.nextTick(Se.bind(null, V, D));
|
|
3664
3745
|
}
|
|
3665
3746
|
);
|
|
3666
3747
|
}
|
|
@@ -3672,45 +3753,45 @@ function so() {
|
|
|
3672
3753
|
n.callbackify = he;
|
|
3673
3754
|
}(Pt)), Pt;
|
|
3674
3755
|
}
|
|
3675
|
-
var Pr,
|
|
3676
|
-
function
|
|
3677
|
-
if (
|
|
3678
|
-
|
|
3756
|
+
var Pr, _i;
|
|
3757
|
+
function Sa() {
|
|
3758
|
+
if (_i) return Pr;
|
|
3759
|
+
_i = 1;
|
|
3679
3760
|
function n(y, I) {
|
|
3680
|
-
var
|
|
3761
|
+
var _ = Object.keys(y);
|
|
3681
3762
|
if (Object.getOwnPropertySymbols) {
|
|
3682
3763
|
var h = Object.getOwnPropertySymbols(y);
|
|
3683
3764
|
I && (h = h.filter(function(b) {
|
|
3684
3765
|
return Object.getOwnPropertyDescriptor(y, b).enumerable;
|
|
3685
|
-
})),
|
|
3766
|
+
})), _.push.apply(_, h);
|
|
3686
3767
|
}
|
|
3687
|
-
return
|
|
3768
|
+
return _;
|
|
3688
3769
|
}
|
|
3689
3770
|
function e(y) {
|
|
3690
3771
|
for (var I = 1; I < arguments.length; I++) {
|
|
3691
|
-
var
|
|
3692
|
-
I % 2 ? n(Object(
|
|
3693
|
-
t(y, h,
|
|
3694
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(y, Object.getOwnPropertyDescriptors(
|
|
3695
|
-
Object.defineProperty(y, h, Object.getOwnPropertyDescriptor(
|
|
3772
|
+
var _ = arguments[I] != null ? arguments[I] : {};
|
|
3773
|
+
I % 2 ? n(Object(_), !0).forEach(function(h) {
|
|
3774
|
+
t(y, h, _[h]);
|
|
3775
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(y, Object.getOwnPropertyDescriptors(_)) : n(Object(_)).forEach(function(h) {
|
|
3776
|
+
Object.defineProperty(y, h, Object.getOwnPropertyDescriptor(_, h));
|
|
3696
3777
|
});
|
|
3697
3778
|
}
|
|
3698
3779
|
return y;
|
|
3699
3780
|
}
|
|
3700
|
-
function t(y, I,
|
|
3701
|
-
return I = E(I), I in y ? Object.defineProperty(y, I, { value:
|
|
3781
|
+
function t(y, I, _) {
|
|
3782
|
+
return I = E(I), I in y ? Object.defineProperty(y, I, { value: _, enumerable: !0, configurable: !0, writable: !0 }) : y[I] = _, y;
|
|
3702
3783
|
}
|
|
3703
3784
|
function o(y, I) {
|
|
3704
3785
|
if (!(y instanceof I))
|
|
3705
3786
|
throw new TypeError("Cannot call a class as a function");
|
|
3706
3787
|
}
|
|
3707
3788
|
function l(y, I) {
|
|
3708
|
-
for (var
|
|
3709
|
-
var h = I[
|
|
3789
|
+
for (var _ = 0; _ < I.length; _++) {
|
|
3790
|
+
var h = I[_];
|
|
3710
3791
|
h.enumerable = h.enumerable || !1, h.configurable = !0, "value" in h && (h.writable = !0), Object.defineProperty(y, E(h.key), h);
|
|
3711
3792
|
}
|
|
3712
3793
|
}
|
|
3713
|
-
function c(y, I,
|
|
3794
|
+
function c(y, I, _) {
|
|
3714
3795
|
return I && l(y.prototype, I), Object.defineProperty(y, "prototype", { writable: !1 }), y;
|
|
3715
3796
|
}
|
|
3716
3797
|
function E(y) {
|
|
@@ -3719,17 +3800,17 @@ function _a() {
|
|
|
3719
3800
|
}
|
|
3720
3801
|
function a(y, I) {
|
|
3721
3802
|
if (typeof y != "object" || y === null) return y;
|
|
3722
|
-
var
|
|
3723
|
-
if (
|
|
3724
|
-
var h =
|
|
3803
|
+
var _ = y[Symbol.toPrimitive];
|
|
3804
|
+
if (_ !== void 0) {
|
|
3805
|
+
var h = _.call(y, I);
|
|
3725
3806
|
if (typeof h != "object") return h;
|
|
3726
3807
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3727
3808
|
}
|
|
3728
3809
|
return String(y);
|
|
3729
3810
|
}
|
|
3730
|
-
var f =
|
|
3731
|
-
function j(y, I,
|
|
3732
|
-
u.prototype.copy.call(y, I,
|
|
3811
|
+
var f = Ke(), u = f.Buffer, w = so(), A = w.inspect, C = A && A.custom || "inspect";
|
|
3812
|
+
function j(y, I, _) {
|
|
3813
|
+
u.prototype.copy.call(y, I, _);
|
|
3733
3814
|
}
|
|
3734
3815
|
return Pr = /* @__PURE__ */ function() {
|
|
3735
3816
|
function y() {
|
|
@@ -3737,18 +3818,18 @@ function _a() {
|
|
|
3737
3818
|
}
|
|
3738
3819
|
return c(y, [{
|
|
3739
3820
|
key: "push",
|
|
3740
|
-
value: function(
|
|
3821
|
+
value: function(_) {
|
|
3741
3822
|
var h = {
|
|
3742
|
-
data:
|
|
3823
|
+
data: _,
|
|
3743
3824
|
next: null
|
|
3744
3825
|
};
|
|
3745
3826
|
this.length > 0 ? this.tail.next = h : this.head = h, this.tail = h, ++this.length;
|
|
3746
3827
|
}
|
|
3747
3828
|
}, {
|
|
3748
3829
|
key: "unshift",
|
|
3749
|
-
value: function(
|
|
3830
|
+
value: function(_) {
|
|
3750
3831
|
var h = {
|
|
3751
|
-
data:
|
|
3832
|
+
data: _,
|
|
3752
3833
|
next: this.head
|
|
3753
3834
|
};
|
|
3754
3835
|
this.length === 0 && (this.tail = h), this.head = h, ++this.length;
|
|
@@ -3757,8 +3838,8 @@ function _a() {
|
|
|
3757
3838
|
key: "shift",
|
|
3758
3839
|
value: function() {
|
|
3759
3840
|
if (this.length !== 0) {
|
|
3760
|
-
var
|
|
3761
|
-
return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length,
|
|
3841
|
+
var _ = this.head.data;
|
|
3842
|
+
return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, _;
|
|
3762
3843
|
}
|
|
3763
3844
|
}
|
|
3764
3845
|
}, {
|
|
@@ -3768,25 +3849,25 @@ function _a() {
|
|
|
3768
3849
|
}
|
|
3769
3850
|
}, {
|
|
3770
3851
|
key: "join",
|
|
3771
|
-
value: function(
|
|
3852
|
+
value: function(_) {
|
|
3772
3853
|
if (this.length === 0) return "";
|
|
3773
|
-
for (var h = this.head, b = "" + h.data; h = h.next; ) b +=
|
|
3854
|
+
for (var h = this.head, b = "" + h.data; h = h.next; ) b += _ + h.data;
|
|
3774
3855
|
return b;
|
|
3775
3856
|
}
|
|
3776
3857
|
}, {
|
|
3777
3858
|
key: "concat",
|
|
3778
|
-
value: function(
|
|
3859
|
+
value: function(_) {
|
|
3779
3860
|
if (this.length === 0) return u.alloc(0);
|
|
3780
|
-
for (var h = u.allocUnsafe(
|
|
3861
|
+
for (var h = u.allocUnsafe(_ >>> 0), b = this.head, P = 0; b; )
|
|
3781
3862
|
j(b.data, h, P), P += b.data.length, b = b.next;
|
|
3782
3863
|
return h;
|
|
3783
3864
|
}
|
|
3784
3865
|
// Consumes a specified amount of bytes or characters from the buffered data.
|
|
3785
3866
|
}, {
|
|
3786
3867
|
key: "consume",
|
|
3787
|
-
value: function(
|
|
3868
|
+
value: function(_, h) {
|
|
3788
3869
|
var b;
|
|
3789
|
-
return
|
|
3870
|
+
return _ < this.head.data.length ? (b = this.head.data.slice(0, _), this.head.data = this.head.data.slice(_)) : _ === this.head.data.length ? b = this.shift() : b = h ? this._getString(_) : this._getBuffer(_), b;
|
|
3790
3871
|
}
|
|
3791
3872
|
}, {
|
|
3792
3873
|
key: "first",
|
|
@@ -3796,12 +3877,12 @@ function _a() {
|
|
|
3796
3877
|
// Consumes a specified amount of characters from the buffered data.
|
|
3797
3878
|
}, {
|
|
3798
3879
|
key: "_getString",
|
|
3799
|
-
value: function(
|
|
3880
|
+
value: function(_) {
|
|
3800
3881
|
var h = this.head, b = 1, P = h.data;
|
|
3801
|
-
for (
|
|
3802
|
-
var
|
|
3803
|
-
if (R ===
|
|
3804
|
-
R ===
|
|
3882
|
+
for (_ -= P.length; h = h.next; ) {
|
|
3883
|
+
var S = h.data, R = _ > S.length ? S.length : _;
|
|
3884
|
+
if (R === S.length ? P += S : P += S.slice(0, _), _ -= R, _ === 0) {
|
|
3885
|
+
R === S.length ? (++b, h.next ? this.head = h.next : this.head = this.tail = null) : (this.head = h, h.data = S.slice(R));
|
|
3805
3886
|
break;
|
|
3806
3887
|
}
|
|
3807
3888
|
++b;
|
|
@@ -3811,12 +3892,12 @@ function _a() {
|
|
|
3811
3892
|
// Consumes a specified amount of bytes from the buffered data.
|
|
3812
3893
|
}, {
|
|
3813
3894
|
key: "_getBuffer",
|
|
3814
|
-
value: function(
|
|
3815
|
-
var h = u.allocUnsafe(
|
|
3816
|
-
for (b.data.copy(h),
|
|
3817
|
-
var
|
|
3818
|
-
if (
|
|
3819
|
-
R ===
|
|
3895
|
+
value: function(_) {
|
|
3896
|
+
var h = u.allocUnsafe(_), b = this.head, P = 1;
|
|
3897
|
+
for (b.data.copy(h), _ -= b.data.length; b = b.next; ) {
|
|
3898
|
+
var S = b.data, R = _ > S.length ? S.length : _;
|
|
3899
|
+
if (S.copy(h, h.length - _, 0, R), _ -= R, _ === 0) {
|
|
3900
|
+
R === S.length ? (++P, b.next ? this.head = b.next : this.head = this.tail = null) : (this.head = b, b.data = S.slice(R));
|
|
3820
3901
|
break;
|
|
3821
3902
|
}
|
|
3822
3903
|
++P;
|
|
@@ -3826,7 +3907,7 @@ function _a() {
|
|
|
3826
3907
|
// Make sure the linked list only shows the minimal necessary information.
|
|
3827
3908
|
}, {
|
|
3828
3909
|
key: C,
|
|
3829
|
-
value: function(
|
|
3910
|
+
value: function(_, h) {
|
|
3830
3911
|
return A(this, e(e({}, h), {}, {
|
|
3831
3912
|
// Only inspect one level.
|
|
3832
3913
|
depth: 0,
|
|
@@ -3885,8 +3966,8 @@ function ze() {
|
|
|
3885
3966
|
}
|
|
3886
3967
|
var A = /* @__PURE__ */ function(C) {
|
|
3887
3968
|
n(j, C);
|
|
3888
|
-
function j(y, I,
|
|
3889
|
-
return C.call(this, w(y, I,
|
|
3969
|
+
function j(y, I, _) {
|
|
3970
|
+
return C.call(this, w(y, I, _)) || this;
|
|
3890
3971
|
}
|
|
3891
3972
|
return j;
|
|
3892
3973
|
}(u);
|
|
@@ -3955,7 +4036,7 @@ function co() {
|
|
|
3955
4036
|
}, Ir;
|
|
3956
4037
|
}
|
|
3957
4038
|
var Or, Pi;
|
|
3958
|
-
function
|
|
4039
|
+
function _a() {
|
|
3959
4040
|
if (Pi) return Or;
|
|
3960
4041
|
Pi = 1, Or = n;
|
|
3961
4042
|
function n(t, o) {
|
|
@@ -3989,84 +4070,84 @@ function uo() {
|
|
|
3989
4070
|
Ai = 1;
|
|
3990
4071
|
var n = { env: {} };
|
|
3991
4072
|
kr = U;
|
|
3992
|
-
function e(
|
|
4073
|
+
function e(M) {
|
|
3993
4074
|
var O = this;
|
|
3994
4075
|
this.next = null, this.entry = null, this.finish = function() {
|
|
3995
|
-
Y(O,
|
|
4076
|
+
Y(O, M);
|
|
3996
4077
|
};
|
|
3997
4078
|
}
|
|
3998
4079
|
var t;
|
|
3999
|
-
U.WritableState =
|
|
4080
|
+
U.WritableState = p;
|
|
4000
4081
|
var o = {
|
|
4001
|
-
deprecate:
|
|
4002
|
-
}, l = Xi(), c =
|
|
4082
|
+
deprecate: _a()
|
|
4083
|
+
}, l = Xi(), c = Ke().Buffer, E = (typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof self != "undefined" ? self : {}).Uint8Array || function() {
|
|
4003
4084
|
};
|
|
4004
|
-
function a(
|
|
4005
|
-
return c.from(
|
|
4085
|
+
function a(M) {
|
|
4086
|
+
return c.from(M);
|
|
4006
4087
|
}
|
|
4007
|
-
function f(
|
|
4008
|
-
return c.isBuffer(
|
|
4088
|
+
function f(M) {
|
|
4089
|
+
return c.isBuffer(M) || M instanceof E;
|
|
4009
4090
|
}
|
|
4010
|
-
var u = lo(), w = co(), A = w.getHighWaterMark, C = ze().codes, j = C.ERR_INVALID_ARG_TYPE, y = C.ERR_METHOD_NOT_IMPLEMENTED, I = C.ERR_MULTIPLE_CALLBACK,
|
|
4011
|
-
|
|
4091
|
+
var u = lo(), w = co(), A = w.getHighWaterMark, C = ze().codes, j = C.ERR_INVALID_ARG_TYPE, y = C.ERR_METHOD_NOT_IMPLEMENTED, I = C.ERR_MULTIPLE_CALLBACK, _ = C.ERR_STREAM_CANNOT_PIPE, h = C.ERR_STREAM_DESTROYED, b = C.ERR_STREAM_NULL_VALUES, P = C.ERR_STREAM_WRITE_AFTER_END, S = C.ERR_UNKNOWN_ENCODING, R = u.errorOrDestroy;
|
|
4092
|
+
Ve()(U, l);
|
|
4012
4093
|
function v() {
|
|
4013
4094
|
}
|
|
4014
|
-
function
|
|
4015
|
-
t = t || xe(),
|
|
4016
|
-
var
|
|
4017
|
-
this.decodeStrings = !
|
|
4018
|
-
me(O,
|
|
4019
|
-
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose =
|
|
4095
|
+
function p(M, O, D) {
|
|
4096
|
+
t = t || xe(), M = M || {}, typeof D != "boolean" && (D = O instanceof t), this.objectMode = !!M.objectMode, D && (this.objectMode = this.objectMode || !!M.writableObjectMode), this.highWaterMark = A(this, M, "writableHighWaterMark", D), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
|
4097
|
+
var V = M.decodeStrings === !1;
|
|
4098
|
+
this.decodeStrings = !V, this.defaultEncoding = M.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(G) {
|
|
4099
|
+
me(O, G);
|
|
4100
|
+
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = M.emitClose !== !1, this.autoDestroy = !!M.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new e(this);
|
|
4020
4101
|
}
|
|
4021
|
-
|
|
4102
|
+
p.prototype.getBuffer = function() {
|
|
4022
4103
|
for (var O = this.bufferedRequest, D = []; O; )
|
|
4023
4104
|
D.push(O), O = O.next;
|
|
4024
4105
|
return D;
|
|
4025
4106
|
}, function() {
|
|
4026
4107
|
try {
|
|
4027
|
-
Object.defineProperty(
|
|
4108
|
+
Object.defineProperty(p.prototype, "buffer", {
|
|
4028
4109
|
get: o.deprecate(function() {
|
|
4029
4110
|
return this.getBuffer();
|
|
4030
4111
|
}, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
|
|
4031
4112
|
});
|
|
4032
|
-
} catch (
|
|
4113
|
+
} catch (M) {
|
|
4033
4114
|
}
|
|
4034
4115
|
}();
|
|
4035
|
-
var
|
|
4036
|
-
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (
|
|
4116
|
+
var B;
|
|
4117
|
+
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (B = Function.prototype[Symbol.hasInstance], Object.defineProperty(U, Symbol.hasInstance, {
|
|
4037
4118
|
value: function(O) {
|
|
4038
|
-
return
|
|
4119
|
+
return B.call(this, O) ? !0 : this !== U ? !1 : O && O._writableState instanceof p;
|
|
4039
4120
|
}
|
|
4040
|
-
})) :
|
|
4121
|
+
})) : B = function(O) {
|
|
4041
4122
|
return O instanceof this;
|
|
4042
4123
|
};
|
|
4043
|
-
function U(
|
|
4124
|
+
function U(M) {
|
|
4044
4125
|
t = t || xe();
|
|
4045
4126
|
var O = this instanceof t;
|
|
4046
|
-
if (!O && !
|
|
4047
|
-
this._writableState = new
|
|
4127
|
+
if (!O && !B.call(U, this)) return new U(M);
|
|
4128
|
+
this._writableState = new p(M, this, O), this.writable = !0, M && (typeof M.write == "function" && (this._write = M.write), typeof M.writev == "function" && (this._writev = M.writev), typeof M.destroy == "function" && (this._destroy = M.destroy), typeof M.final == "function" && (this._final = M.final)), l.call(this);
|
|
4048
4129
|
}
|
|
4049
4130
|
U.prototype.pipe = function() {
|
|
4050
|
-
R(this, new
|
|
4131
|
+
R(this, new _());
|
|
4051
4132
|
};
|
|
4052
|
-
function F(
|
|
4133
|
+
function F(M, O) {
|
|
4053
4134
|
var D = new P();
|
|
4054
|
-
R(
|
|
4135
|
+
R(M, D), n.nextTick(O, D);
|
|
4055
4136
|
}
|
|
4056
|
-
function J(
|
|
4057
|
-
var
|
|
4058
|
-
return D === null ?
|
|
4137
|
+
function J(M, O, D, V) {
|
|
4138
|
+
var G;
|
|
4139
|
+
return D === null ? G = new b() : typeof D != "string" && !O.objectMode && (G = new j("chunk", ["string", "Buffer"], D)), G ? (R(M, G), n.nextTick(V, G), !1) : !0;
|
|
4059
4140
|
}
|
|
4060
|
-
U.prototype.write = function(
|
|
4061
|
-
var
|
|
4062
|
-
return d && !c.isBuffer(
|
|
4141
|
+
U.prototype.write = function(M, O, D) {
|
|
4142
|
+
var V = this._writableState, G = !1, d = !V.objectMode && f(M);
|
|
4143
|
+
return d && !c.isBuffer(M) && (M = a(M)), typeof O == "function" && (D = O, O = null), d ? O = "buffer" : O || (O = V.defaultEncoding), typeof D != "function" && (D = v), V.ending ? F(this, D) : (d || J(this, V, M, D)) && (V.pendingcb++, G = te(this, V, d, M, O, D)), G;
|
|
4063
4144
|
}, U.prototype.cork = function() {
|
|
4064
4145
|
this._writableState.corked++;
|
|
4065
4146
|
}, U.prototype.uncork = function() {
|
|
4066
|
-
var
|
|
4067
|
-
|
|
4147
|
+
var M = this._writableState;
|
|
4148
|
+
M.corked && (M.corked--, !M.writing && !M.corked && !M.bufferProcessing && M.bufferedRequest && ie(this, M));
|
|
4068
4149
|
}, U.prototype.setDefaultEncoding = function(O) {
|
|
4069
|
-
if (typeof O == "string" && (O = O.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((O + "").toLowerCase()) > -1)) throw new
|
|
4150
|
+
if (typeof O == "string" && (O = O.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((O + "").toLowerCase()) > -1)) throw new S(O);
|
|
4070
4151
|
return this._writableState.defaultEncoding = O, this;
|
|
4071
4152
|
}, Object.defineProperty(U.prototype, "writableBuffer", {
|
|
4072
4153
|
// making it explicit this property is not enumerable
|
|
@@ -4077,8 +4158,8 @@ function uo() {
|
|
|
4077
4158
|
return this._writableState && this._writableState.getBuffer();
|
|
4078
4159
|
}
|
|
4079
4160
|
});
|
|
4080
|
-
function k(
|
|
4081
|
-
return !
|
|
4161
|
+
function k(M, O, D) {
|
|
4162
|
+
return !M.objectMode && M.decodeStrings !== !1 && typeof O == "string" && (O = c.from(O, D)), O;
|
|
4082
4163
|
}
|
|
4083
4164
|
Object.defineProperty(U.prototype, "writableHighWaterMark", {
|
|
4084
4165
|
// making it explicit this property is not enumerable
|
|
@@ -4089,75 +4170,75 @@ function uo() {
|
|
|
4089
4170
|
return this._writableState.highWaterMark;
|
|
4090
4171
|
}
|
|
4091
4172
|
});
|
|
4092
|
-
function te(
|
|
4173
|
+
function te(M, O, D, V, G, d) {
|
|
4093
4174
|
if (!D) {
|
|
4094
|
-
var
|
|
4095
|
-
|
|
4175
|
+
var g = k(O, V, G);
|
|
4176
|
+
V !== g && (D = !0, G = "buffer", V = g);
|
|
4096
4177
|
}
|
|
4097
|
-
var x = O.objectMode ? 1 :
|
|
4178
|
+
var x = O.objectMode ? 1 : V.length;
|
|
4098
4179
|
O.length += x;
|
|
4099
4180
|
var H = O.length < O.highWaterMark;
|
|
4100
4181
|
if (H || (O.needDrain = !0), O.writing || O.corked) {
|
|
4101
4182
|
var K = O.lastBufferedRequest;
|
|
4102
4183
|
O.lastBufferedRequest = {
|
|
4103
|
-
chunk:
|
|
4104
|
-
encoding:
|
|
4184
|
+
chunk: V,
|
|
4185
|
+
encoding: G,
|
|
4105
4186
|
isBuf: D,
|
|
4106
4187
|
callback: d,
|
|
4107
4188
|
next: null
|
|
4108
4189
|
}, K ? K.next = O.lastBufferedRequest : O.bufferedRequest = O.lastBufferedRequest, O.bufferedRequestCount += 1;
|
|
4109
4190
|
} else
|
|
4110
|
-
ee(
|
|
4191
|
+
ee(M, O, !1, x, V, G, d);
|
|
4111
4192
|
return H;
|
|
4112
4193
|
}
|
|
4113
|
-
function ee(
|
|
4114
|
-
O.writelen =
|
|
4194
|
+
function ee(M, O, D, V, G, d, g) {
|
|
4195
|
+
O.writelen = V, O.writecb = g, O.writing = !0, O.sync = !0, O.destroyed ? O.onwrite(new h("write")) : D ? M._writev(G, O.onwrite) : M._write(G, d, O.onwrite), O.sync = !1;
|
|
4115
4196
|
}
|
|
4116
|
-
function ae(
|
|
4117
|
-
--O.pendingcb, D ? (n.nextTick(
|
|
4197
|
+
function ae(M, O, D, V, G) {
|
|
4198
|
+
--O.pendingcb, D ? (n.nextTick(G, V), n.nextTick($, M, O), M._writableState.errorEmitted = !0, R(M, V)) : (G(V), M._writableState.errorEmitted = !0, R(M, V), $(M, O));
|
|
4118
4199
|
}
|
|
4119
|
-
function le(
|
|
4120
|
-
|
|
4200
|
+
function le(M) {
|
|
4201
|
+
M.writing = !1, M.writecb = null, M.length -= M.writelen, M.writelen = 0;
|
|
4121
4202
|
}
|
|
4122
|
-
function me(
|
|
4123
|
-
var D =
|
|
4124
|
-
if (typeof
|
|
4125
|
-
if (le(D), O) ae(
|
|
4203
|
+
function me(M, O) {
|
|
4204
|
+
var D = M._writableState, V = D.sync, G = D.writecb;
|
|
4205
|
+
if (typeof G != "function") throw new I();
|
|
4206
|
+
if (le(D), O) ae(M, D, V, O, G);
|
|
4126
4207
|
else {
|
|
4127
|
-
var d =
|
|
4128
|
-
!d && !D.corked && !D.bufferProcessing && D.bufferedRequest && ie(
|
|
4208
|
+
var d = Se(D) || M.destroyed;
|
|
4209
|
+
!d && !D.corked && !D.bufferProcessing && D.bufferedRequest && ie(M, D), V ? n.nextTick(ce, M, D, d, G) : ce(M, D, d, G);
|
|
4129
4210
|
}
|
|
4130
4211
|
}
|
|
4131
|
-
function ce(
|
|
4132
|
-
D ||
|
|
4212
|
+
function ce(M, O, D, V) {
|
|
4213
|
+
D || ge(M, O), O.pendingcb--, V(), $(M, O);
|
|
4133
4214
|
}
|
|
4134
|
-
function
|
|
4135
|
-
O.length === 0 && O.needDrain && (O.needDrain = !1,
|
|
4215
|
+
function ge(M, O) {
|
|
4216
|
+
O.length === 0 && O.needDrain && (O.needDrain = !1, M.emit("drain"));
|
|
4136
4217
|
}
|
|
4137
|
-
function ie(
|
|
4218
|
+
function ie(M, O) {
|
|
4138
4219
|
O.bufferProcessing = !0;
|
|
4139
4220
|
var D = O.bufferedRequest;
|
|
4140
|
-
if (
|
|
4141
|
-
var
|
|
4221
|
+
if (M._writev && D && D.next) {
|
|
4222
|
+
var V = O.bufferedRequestCount, G = new Array(V), d = O.corkedRequestsFree;
|
|
4142
4223
|
d.entry = D;
|
|
4143
|
-
for (var
|
|
4144
|
-
|
|
4145
|
-
|
|
4224
|
+
for (var g = 0, x = !0; D; )
|
|
4225
|
+
G[g] = D, D.isBuf || (x = !1), D = D.next, g += 1;
|
|
4226
|
+
G.allBuffers = x, ee(M, O, !0, O.length, G, "", d.finish), O.pendingcb++, O.lastBufferedRequest = null, d.next ? (O.corkedRequestsFree = d.next, d.next = null) : O.corkedRequestsFree = new e(O), O.bufferedRequestCount = 0;
|
|
4146
4227
|
} else {
|
|
4147
4228
|
for (; D; ) {
|
|
4148
4229
|
var H = D.chunk, K = D.encoding, X = D.callback, Q = O.objectMode ? 1 : H.length;
|
|
4149
|
-
if (ee(
|
|
4230
|
+
if (ee(M, O, !1, Q, H, K, X), D = D.next, O.bufferedRequestCount--, O.writing)
|
|
4150
4231
|
break;
|
|
4151
4232
|
}
|
|
4152
4233
|
D === null && (O.lastBufferedRequest = null);
|
|
4153
4234
|
}
|
|
4154
4235
|
O.bufferedRequest = D, O.bufferProcessing = !1;
|
|
4155
4236
|
}
|
|
4156
|
-
U.prototype._write = function(
|
|
4237
|
+
U.prototype._write = function(M, O, D) {
|
|
4157
4238
|
D(new y("_write()"));
|
|
4158
|
-
}, U.prototype._writev = null, U.prototype.end = function(
|
|
4159
|
-
var
|
|
4160
|
-
return typeof
|
|
4239
|
+
}, U.prototype._writev = null, U.prototype.end = function(M, O, D) {
|
|
4240
|
+
var V = this._writableState;
|
|
4241
|
+
return typeof M == "function" ? (D = M, M = null, O = null) : typeof O == "function" && (D = O, O = null), M != null && this.write(M, O), V.corked && (V.corked = 1, this.uncork()), V.ending || z(this, V, D), this;
|
|
4161
4242
|
}, Object.defineProperty(U.prototype, "writableLength", {
|
|
4162
4243
|
// making it explicit this property is not enumerable
|
|
4163
4244
|
// because otherwise some prototype manipulation in
|
|
@@ -4167,35 +4248,35 @@ function uo() {
|
|
|
4167
4248
|
return this._writableState.length;
|
|
4168
4249
|
}
|
|
4169
4250
|
});
|
|
4170
|
-
function
|
|
4171
|
-
return
|
|
4251
|
+
function Se(M) {
|
|
4252
|
+
return M.ending && M.length === 0 && M.bufferedRequest === null && !M.finished && !M.writing;
|
|
4172
4253
|
}
|
|
4173
|
-
function he(
|
|
4174
|
-
|
|
4175
|
-
O.pendingcb--, D && R(
|
|
4254
|
+
function he(M, O) {
|
|
4255
|
+
M._final(function(D) {
|
|
4256
|
+
O.pendingcb--, D && R(M, D), O.prefinished = !0, M.emit("prefinish"), $(M, O);
|
|
4176
4257
|
});
|
|
4177
4258
|
}
|
|
4178
|
-
function L(
|
|
4179
|
-
!O.prefinished && !O.finalCalled && (typeof
|
|
4259
|
+
function L(M, O) {
|
|
4260
|
+
!O.prefinished && !O.finalCalled && (typeof M._final == "function" && !O.destroyed ? (O.pendingcb++, O.finalCalled = !0, n.nextTick(he, M, O)) : (O.prefinished = !0, M.emit("prefinish")));
|
|
4180
4261
|
}
|
|
4181
|
-
function $(
|
|
4182
|
-
var D =
|
|
4183
|
-
if (D && (L(
|
|
4184
|
-
var
|
|
4185
|
-
(!
|
|
4262
|
+
function $(M, O) {
|
|
4263
|
+
var D = Se(O);
|
|
4264
|
+
if (D && (L(M, O), O.pendingcb === 0 && (O.finished = !0, M.emit("finish"), O.autoDestroy))) {
|
|
4265
|
+
var V = M._readableState;
|
|
4266
|
+
(!V || V.autoDestroy && V.endEmitted) && M.destroy();
|
|
4186
4267
|
}
|
|
4187
4268
|
return D;
|
|
4188
4269
|
}
|
|
4189
|
-
function z(
|
|
4190
|
-
O.ending = !0, $(
|
|
4270
|
+
function z(M, O, D) {
|
|
4271
|
+
O.ending = !0, $(M, O), D && (O.finished ? n.nextTick(D) : M.once("finish", D)), O.ended = !0, M.writable = !1;
|
|
4191
4272
|
}
|
|
4192
|
-
function Y(
|
|
4193
|
-
var
|
|
4194
|
-
for (
|
|
4195
|
-
var
|
|
4196
|
-
O.pendingcb--,
|
|
4273
|
+
function Y(M, O, D) {
|
|
4274
|
+
var V = M.entry;
|
|
4275
|
+
for (M.entry = null; V; ) {
|
|
4276
|
+
var G = V.callback;
|
|
4277
|
+
O.pendingcb--, G(D), V = V.next;
|
|
4197
4278
|
}
|
|
4198
|
-
O.corkedRequestsFree.next =
|
|
4279
|
+
O.corkedRequestsFree.next = M;
|
|
4199
4280
|
}
|
|
4200
4281
|
return Object.defineProperty(U.prototype, "destroyed", {
|
|
4201
4282
|
// making it explicit this property is not enumerable
|
|
@@ -4208,22 +4289,22 @@ function uo() {
|
|
|
4208
4289
|
set: function(O) {
|
|
4209
4290
|
this._writableState && (this._writableState.destroyed = O);
|
|
4210
4291
|
}
|
|
4211
|
-
}), U.prototype.destroy = u.destroy, U.prototype._undestroy = u.undestroy, U.prototype._destroy = function(
|
|
4212
|
-
O(
|
|
4292
|
+
}), U.prototype.destroy = u.destroy, U.prototype._undestroy = u.undestroy, U.prototype._destroy = function(M, O) {
|
|
4293
|
+
O(M);
|
|
4213
4294
|
}, kr;
|
|
4214
4295
|
}
|
|
4215
|
-
var
|
|
4296
|
+
var Mr, Ti;
|
|
4216
4297
|
function xe() {
|
|
4217
|
-
if (Ti) return
|
|
4298
|
+
if (Ti) return Mr;
|
|
4218
4299
|
Ti = 1;
|
|
4219
4300
|
var n = { env: {} }, e = Object.keys || function(w) {
|
|
4220
4301
|
var A = [];
|
|
4221
4302
|
for (var C in w) A.push(C);
|
|
4222
4303
|
return A;
|
|
4223
4304
|
};
|
|
4224
|
-
|
|
4305
|
+
Mr = a;
|
|
4225
4306
|
var t = fo(), o = uo();
|
|
4226
|
-
|
|
4307
|
+
Ve()(a, t);
|
|
4227
4308
|
for (var l = e(o.prototype), c = 0; c < l.length; c++) {
|
|
4228
4309
|
var E = l[c];
|
|
4229
4310
|
a.prototype[E] || (a.prototype[E] = o.prototype[E]);
|
|
@@ -4274,11 +4355,11 @@ function xe() {
|
|
|
4274
4355
|
set: function(A) {
|
|
4275
4356
|
this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = A, this._writableState.destroyed = A);
|
|
4276
4357
|
}
|
|
4277
|
-
}),
|
|
4358
|
+
}), Mr;
|
|
4278
4359
|
}
|
|
4279
|
-
var
|
|
4360
|
+
var Br = {}, Ii;
|
|
4280
4361
|
function Oi() {
|
|
4281
|
-
if (Ii) return
|
|
4362
|
+
if (Ii) return Br;
|
|
4282
4363
|
Ii = 1;
|
|
4283
4364
|
var n = Ki().Buffer, e = n.isEncoding || function(h) {
|
|
4284
4365
|
switch (h = "" + h, h && h.toLowerCase()) {
|
|
@@ -4327,7 +4408,7 @@ function Oi() {
|
|
|
4327
4408
|
if (typeof b != "string" && (n.isEncoding === e || !e(h))) throw new Error("Unknown encoding: " + h);
|
|
4328
4409
|
return b || h;
|
|
4329
4410
|
}
|
|
4330
|
-
|
|
4411
|
+
Br.StringDecoder = l;
|
|
4331
4412
|
function l(h) {
|
|
4332
4413
|
this.encoding = o(h);
|
|
4333
4414
|
var b;
|
|
@@ -4342,7 +4423,7 @@ function Oi() {
|
|
|
4342
4423
|
this.text = j, this.end = y, b = 3;
|
|
4343
4424
|
break;
|
|
4344
4425
|
default:
|
|
4345
|
-
this.write = I, this.end =
|
|
4426
|
+
this.write = I, this.end = _;
|
|
4346
4427
|
return;
|
|
4347
4428
|
}
|
|
4348
4429
|
this.lastNeed = 0, this.lastTotal = 0, this.lastChar = n.allocUnsafe(b);
|
|
@@ -4365,10 +4446,10 @@ function Oi() {
|
|
|
4365
4446
|
return h <= 127 ? 0 : h >> 5 === 6 ? 2 : h >> 4 === 14 ? 3 : h >> 3 === 30 ? 4 : h >> 6 === 2 ? -1 : -2;
|
|
4366
4447
|
}
|
|
4367
4448
|
function E(h, b, P) {
|
|
4368
|
-
var
|
|
4369
|
-
if (
|
|
4370
|
-
var R = c(b[
|
|
4371
|
-
return R >= 0 ? (R > 0 && (h.lastNeed = R - 1), R) : --
|
|
4449
|
+
var S = b.length - 1;
|
|
4450
|
+
if (S < P) return 0;
|
|
4451
|
+
var R = c(b[S]);
|
|
4452
|
+
return R >= 0 ? (R > 0 && (h.lastNeed = R - 1), R) : --S < P || R === -2 ? 0 : (R = c(b[S]), R >= 0 ? (R > 0 && (h.lastNeed = R - 2), R) : --S < P || R === -2 ? 0 : (R = c(b[S]), R >= 0 ? (R > 0 && (R === 2 ? R = 0 : h.lastNeed = R - 3), R) : 0));
|
|
4372
4453
|
}
|
|
4373
4454
|
function a(h, b, P) {
|
|
4374
4455
|
if ((b[0] & 192) !== 128)
|
|
@@ -4391,8 +4472,8 @@ function Oi() {
|
|
|
4391
4472
|
var P = E(this, h, b);
|
|
4392
4473
|
if (!this.lastNeed) return h.toString("utf8", b);
|
|
4393
4474
|
this.lastTotal = P;
|
|
4394
|
-
var
|
|
4395
|
-
return h.copy(this.lastChar, 0,
|
|
4475
|
+
var S = h.length - (P - this.lastNeed);
|
|
4476
|
+
return h.copy(this.lastChar, 0, S), h.toString("utf8", b, S);
|
|
4396
4477
|
}
|
|
4397
4478
|
function w(h) {
|
|
4398
4479
|
var b = h && h.length ? this.write(h) : "";
|
|
@@ -4402,8 +4483,8 @@ function Oi() {
|
|
|
4402
4483
|
if ((h.length - b) % 2 === 0) {
|
|
4403
4484
|
var P = h.toString("utf16le", b);
|
|
4404
4485
|
if (P) {
|
|
4405
|
-
var
|
|
4406
|
-
if (
|
|
4486
|
+
var S = P.charCodeAt(P.length - 1);
|
|
4487
|
+
if (S >= 55296 && S <= 56319)
|
|
4407
4488
|
return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = h[h.length - 2], this.lastChar[1] = h[h.length - 1], P.slice(0, -1);
|
|
4408
4489
|
}
|
|
4409
4490
|
return P;
|
|
@@ -4429,10 +4510,10 @@ function Oi() {
|
|
|
4429
4510
|
function I(h) {
|
|
4430
4511
|
return h.toString(this.encoding);
|
|
4431
4512
|
}
|
|
4432
|
-
function
|
|
4513
|
+
function _(h) {
|
|
4433
4514
|
return h && h.length ? this.write(h) : "";
|
|
4434
4515
|
}
|
|
4435
|
-
return
|
|
4516
|
+
return Br;
|
|
4436
4517
|
}
|
|
4437
4518
|
var Lr, ki;
|
|
4438
4519
|
function an() {
|
|
@@ -4466,7 +4547,7 @@ function an() {
|
|
|
4466
4547
|
f = !1, j = !0, u || a.call(c);
|
|
4467
4548
|
}, I = function(P) {
|
|
4468
4549
|
a.call(c, P);
|
|
4469
|
-
},
|
|
4550
|
+
}, _ = function() {
|
|
4470
4551
|
var P;
|
|
4471
4552
|
if (f && !j)
|
|
4472
4553
|
return (!c._readableState || !c._readableState.ended) && (P = new n()), a.call(c, P);
|
|
@@ -4475,60 +4556,60 @@ function an() {
|
|
|
4475
4556
|
}, h = function() {
|
|
4476
4557
|
c.req.on("finish", C);
|
|
4477
4558
|
};
|
|
4478
|
-
return o(c) ? (c.on("complete", C), c.on("abort",
|
|
4479
|
-
c.removeListener("complete", C), c.removeListener("abort",
|
|
4559
|
+
return o(c) ? (c.on("complete", C), c.on("abort", _), c.req ? h() : c.on("request", h)) : u && !c._writableState && (c.on("end", w), c.on("close", w)), c.on("end", y), c.on("finish", C), E.error !== !1 && c.on("error", I), c.on("close", _), function() {
|
|
4560
|
+
c.removeListener("complete", C), c.removeListener("abort", _), c.removeListener("request", h), c.req && c.req.removeListener("finish", C), c.removeListener("end", w), c.removeListener("close", w), c.removeListener("finish", C), c.removeListener("end", y), c.removeListener("error", I), c.removeListener("close", _);
|
|
4480
4561
|
};
|
|
4481
4562
|
}
|
|
4482
4563
|
return Lr = l, Lr;
|
|
4483
4564
|
}
|
|
4484
|
-
var Nr,
|
|
4565
|
+
var Nr, Mi;
|
|
4485
4566
|
function Ca() {
|
|
4486
|
-
if (
|
|
4487
|
-
|
|
4567
|
+
if (Mi) return Nr;
|
|
4568
|
+
Mi = 1;
|
|
4488
4569
|
var n = { env: {} }, e;
|
|
4489
|
-
function t(
|
|
4490
|
-
return R = o(R), R in
|
|
4570
|
+
function t(S, R, v) {
|
|
4571
|
+
return R = o(R), R in S ? Object.defineProperty(S, R, { value: v, enumerable: !0, configurable: !0, writable: !0 }) : S[R] = v, S;
|
|
4491
4572
|
}
|
|
4492
|
-
function o(
|
|
4493
|
-
var R = l(
|
|
4573
|
+
function o(S) {
|
|
4574
|
+
var R = l(S, "string");
|
|
4494
4575
|
return typeof R == "symbol" ? R : String(R);
|
|
4495
4576
|
}
|
|
4496
|
-
function l(
|
|
4497
|
-
if (typeof
|
|
4498
|
-
var v =
|
|
4577
|
+
function l(S, R) {
|
|
4578
|
+
if (typeof S != "object" || S === null) return S;
|
|
4579
|
+
var v = S[Symbol.toPrimitive];
|
|
4499
4580
|
if (v !== void 0) {
|
|
4500
|
-
var
|
|
4501
|
-
if (typeof
|
|
4581
|
+
var p = v.call(S, R);
|
|
4582
|
+
if (typeof p != "object") return p;
|
|
4502
4583
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
4503
4584
|
}
|
|
4504
|
-
return (R === "string" ? String : Number)(
|
|
4585
|
+
return (R === "string" ? String : Number)(S);
|
|
4505
4586
|
}
|
|
4506
4587
|
var c = an(), E = Symbol("lastResolve"), a = Symbol("lastReject"), f = Symbol("error"), u = Symbol("ended"), w = Symbol("lastPromise"), A = Symbol("handlePromise"), C = Symbol("stream");
|
|
4507
|
-
function j(
|
|
4588
|
+
function j(S, R) {
|
|
4508
4589
|
return {
|
|
4509
|
-
value:
|
|
4590
|
+
value: S,
|
|
4510
4591
|
done: R
|
|
4511
4592
|
};
|
|
4512
4593
|
}
|
|
4513
|
-
function y(
|
|
4514
|
-
var R =
|
|
4594
|
+
function y(S) {
|
|
4595
|
+
var R = S[E];
|
|
4515
4596
|
if (R !== null) {
|
|
4516
|
-
var v =
|
|
4517
|
-
v !== null && (
|
|
4597
|
+
var v = S[C].read();
|
|
4598
|
+
v !== null && (S[w] = null, S[E] = null, S[a] = null, R(j(v, !1)));
|
|
4518
4599
|
}
|
|
4519
4600
|
}
|
|
4520
|
-
function I(
|
|
4521
|
-
n.nextTick(y,
|
|
4601
|
+
function I(S) {
|
|
4602
|
+
n.nextTick(y, S);
|
|
4522
4603
|
}
|
|
4523
|
-
function S
|
|
4524
|
-
return function(v,
|
|
4525
|
-
|
|
4604
|
+
function _(S, R) {
|
|
4605
|
+
return function(v, p) {
|
|
4606
|
+
S.then(function() {
|
|
4526
4607
|
if (R[u]) {
|
|
4527
4608
|
v(j(void 0, !0));
|
|
4528
4609
|
return;
|
|
4529
4610
|
}
|
|
4530
|
-
R[A](v,
|
|
4531
|
-
},
|
|
4611
|
+
R[A](v, p);
|
|
4612
|
+
}, p);
|
|
4532
4613
|
};
|
|
4533
4614
|
}
|
|
4534
4615
|
var h = Object.getPrototypeOf(function() {
|
|
@@ -4548,32 +4629,32 @@ function Ca() {
|
|
|
4548
4629
|
R[f] ? J(R[f]) : F(j(void 0, !0));
|
|
4549
4630
|
});
|
|
4550
4631
|
});
|
|
4551
|
-
var
|
|
4552
|
-
if (
|
|
4553
|
-
|
|
4632
|
+
var p = this[w], B;
|
|
4633
|
+
if (p)
|
|
4634
|
+
B = new Promise(_(p, this));
|
|
4554
4635
|
else {
|
|
4555
4636
|
var U = this[C].read();
|
|
4556
4637
|
if (U !== null)
|
|
4557
4638
|
return Promise.resolve(j(U, !1));
|
|
4558
|
-
|
|
4639
|
+
B = new Promise(this[A]);
|
|
4559
4640
|
}
|
|
4560
|
-
return this[w] =
|
|
4641
|
+
return this[w] = B, B;
|
|
4561
4642
|
}
|
|
4562
4643
|
}, t(e, Symbol.asyncIterator, function() {
|
|
4563
4644
|
return this;
|
|
4564
4645
|
}), t(e, "return", function() {
|
|
4565
4646
|
var R = this;
|
|
4566
|
-
return new Promise(function(v,
|
|
4567
|
-
R[C].destroy(null, function(
|
|
4568
|
-
if (
|
|
4569
|
-
|
|
4647
|
+
return new Promise(function(v, p) {
|
|
4648
|
+
R[C].destroy(null, function(B) {
|
|
4649
|
+
if (B) {
|
|
4650
|
+
p(B);
|
|
4570
4651
|
return;
|
|
4571
4652
|
}
|
|
4572
4653
|
v(j(void 0, !0));
|
|
4573
4654
|
});
|
|
4574
4655
|
});
|
|
4575
4656
|
}), e), h), P = function(R) {
|
|
4576
|
-
var v,
|
|
4657
|
+
var v, p = Object.create(b, (v = {}, t(v, C, {
|
|
4577
4658
|
value: R,
|
|
4578
4659
|
writable: !0
|
|
4579
4660
|
}), t(v, E, {
|
|
@@ -4590,26 +4671,26 @@ function Ca() {
|
|
|
4590
4671
|
writable: !0
|
|
4591
4672
|
}), t(v, A, {
|
|
4592
4673
|
value: function(U, F) {
|
|
4593
|
-
var J =
|
|
4594
|
-
J ? (
|
|
4674
|
+
var J = p[C].read();
|
|
4675
|
+
J ? (p[w] = null, p[E] = null, p[a] = null, U(j(J, !1))) : (p[E] = U, p[a] = F);
|
|
4595
4676
|
},
|
|
4596
4677
|
writable: !0
|
|
4597
4678
|
}), v));
|
|
4598
|
-
return
|
|
4599
|
-
if (
|
|
4600
|
-
var U =
|
|
4601
|
-
U !== null && (
|
|
4679
|
+
return p[w] = null, c(R, function(B) {
|
|
4680
|
+
if (B && B.code !== "ERR_STREAM_PREMATURE_CLOSE") {
|
|
4681
|
+
var U = p[a];
|
|
4682
|
+
U !== null && (p[w] = null, p[E] = null, p[a] = null, U(B)), p[f] = B;
|
|
4602
4683
|
return;
|
|
4603
4684
|
}
|
|
4604
|
-
var F =
|
|
4605
|
-
F !== null && (
|
|
4606
|
-
}), R.on("readable", I.bind(null,
|
|
4685
|
+
var F = p[E];
|
|
4686
|
+
F !== null && (p[w] = null, p[E] = null, p[a] = null, F(j(void 0, !0))), p[u] = !0;
|
|
4687
|
+
}), R.on("readable", I.bind(null, p)), p;
|
|
4607
4688
|
};
|
|
4608
4689
|
return Nr = P, Nr;
|
|
4609
4690
|
}
|
|
4610
|
-
var Dr,
|
|
4691
|
+
var Dr, Bi;
|
|
4611
4692
|
function Ea() {
|
|
4612
|
-
return
|
|
4693
|
+
return Bi || (Bi = 1, Dr = function() {
|
|
4613
4694
|
throw new Error("Readable.from is not available in the browser");
|
|
4614
4695
|
}), Dr;
|
|
4615
4696
|
}
|
|
@@ -4621,9 +4702,9 @@ function fo() {
|
|
|
4621
4702
|
Fr = F;
|
|
4622
4703
|
var e;
|
|
4623
4704
|
F.ReadableState = U, en().EventEmitter;
|
|
4624
|
-
var t = function(
|
|
4625
|
-
return
|
|
4626
|
-
}, o = Xi(), l =
|
|
4705
|
+
var t = function(g, x) {
|
|
4706
|
+
return g.listeners(x).length;
|
|
4707
|
+
}, o = Xi(), l = Ke().Buffer, c = (typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof self != "undefined" ? self : {}).Uint8Array || function() {
|
|
4627
4708
|
};
|
|
4628
4709
|
function E(d) {
|
|
4629
4710
|
return l.from(d);
|
|
@@ -4634,20 +4715,20 @@ function fo() {
|
|
|
4634
4715
|
var f = so(), u;
|
|
4635
4716
|
f && f.debuglog ? u = f.debuglog("stream") : u = function() {
|
|
4636
4717
|
};
|
|
4637
|
-
var w =
|
|
4638
|
-
|
|
4639
|
-
var v = A.errorOrDestroy,
|
|
4640
|
-
function
|
|
4641
|
-
if (typeof d.prependListener == "function") return d.prependListener(
|
|
4642
|
-
!d._events || !d._events[
|
|
4718
|
+
var w = Sa(), A = lo(), C = co(), j = C.getHighWaterMark, y = ze().codes, I = y.ERR_INVALID_ARG_TYPE, _ = y.ERR_STREAM_PUSH_AFTER_EOF, h = y.ERR_METHOD_NOT_IMPLEMENTED, b = y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, P, S, R;
|
|
4719
|
+
Ve()(F, o);
|
|
4720
|
+
var v = A.errorOrDestroy, p = ["error", "close", "destroy", "pause", "resume"];
|
|
4721
|
+
function B(d, g, x) {
|
|
4722
|
+
if (typeof d.prependListener == "function") return d.prependListener(g, x);
|
|
4723
|
+
!d._events || !d._events[g] ? d.on(g, x) : Array.isArray(d._events[g]) ? d._events[g].unshift(x) : d._events[g] = [x, d._events[g]];
|
|
4643
4724
|
}
|
|
4644
|
-
function U(d,
|
|
4645
|
-
e = e || xe(), d = d || {}, typeof x != "boolean" && (x =
|
|
4725
|
+
function U(d, g, x) {
|
|
4726
|
+
e = e || xe(), d = d || {}, typeof x != "boolean" && (x = g instanceof e), this.objectMode = !!d.objectMode, x && (this.objectMode = this.objectMode || !!d.readableObjectMode), this.highWaterMark = j(this, d, "readableHighWaterMark", x), this.buffer = new w(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = d.emitClose !== !1, this.autoDestroy = !!d.autoDestroy, this.destroyed = !1, this.defaultEncoding = d.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, d.encoding && (P || (P = Oi().StringDecoder), this.decoder = new P(d.encoding), this.encoding = d.encoding);
|
|
4646
4727
|
}
|
|
4647
4728
|
function F(d) {
|
|
4648
4729
|
if (e = e || xe(), !(this instanceof F)) return new F(d);
|
|
4649
|
-
var
|
|
4650
|
-
this._readableState = new U(d, this,
|
|
4730
|
+
var g = this instanceof e;
|
|
4731
|
+
this._readableState = new U(d, this, g), this.readable = !0, d && (typeof d.read == "function" && (this._read = d.read), typeof d.destroy == "function" && (this._destroy = d.destroy)), o.call(this);
|
|
4651
4732
|
}
|
|
4652
4733
|
Object.defineProperty(F.prototype, "destroyed", {
|
|
4653
4734
|
// making it explicit this property is not enumerable
|
|
@@ -4657,107 +4738,107 @@ function fo() {
|
|
|
4657
4738
|
get: function() {
|
|
4658
4739
|
return this._readableState === void 0 ? !1 : this._readableState.destroyed;
|
|
4659
4740
|
},
|
|
4660
|
-
set: function(
|
|
4661
|
-
this._readableState && (this._readableState.destroyed =
|
|
4741
|
+
set: function(g) {
|
|
4742
|
+
this._readableState && (this._readableState.destroyed = g);
|
|
4662
4743
|
}
|
|
4663
|
-
}), F.prototype.destroy = A.destroy, F.prototype._undestroy = A.undestroy, F.prototype._destroy = function(d,
|
|
4664
|
-
|
|
4665
|
-
}, F.prototype.push = function(d,
|
|
4744
|
+
}), F.prototype.destroy = A.destroy, F.prototype._undestroy = A.undestroy, F.prototype._destroy = function(d, g) {
|
|
4745
|
+
g(d);
|
|
4746
|
+
}, F.prototype.push = function(d, g) {
|
|
4666
4747
|
var x = this._readableState, H;
|
|
4667
|
-
return x.objectMode ? H = !0 : typeof d == "string" && (
|
|
4748
|
+
return x.objectMode ? H = !0 : typeof d == "string" && (g = g || x.defaultEncoding, g !== x.encoding && (d = l.from(d, g), g = ""), H = !0), J(this, d, g, !1, H);
|
|
4668
4749
|
}, F.prototype.unshift = function(d) {
|
|
4669
4750
|
return J(this, d, null, !0, !1);
|
|
4670
4751
|
};
|
|
4671
|
-
function J(d,
|
|
4672
|
-
u("readableAddChunk",
|
|
4752
|
+
function J(d, g, x, H, K) {
|
|
4753
|
+
u("readableAddChunk", g);
|
|
4673
4754
|
var X = d._readableState;
|
|
4674
|
-
if (
|
|
4755
|
+
if (g === null)
|
|
4675
4756
|
X.reading = !1, me(d, X);
|
|
4676
4757
|
else {
|
|
4677
4758
|
var Q;
|
|
4678
|
-
if (K || (Q = te(X,
|
|
4759
|
+
if (K || (Q = te(X, g)), Q)
|
|
4679
4760
|
v(d, Q);
|
|
4680
|
-
else if (X.objectMode ||
|
|
4681
|
-
if (typeof
|
|
4682
|
-
X.endEmitted ? v(d, new b()) : k(d, X,
|
|
4761
|
+
else if (X.objectMode || g && g.length > 0)
|
|
4762
|
+
if (typeof g != "string" && !X.objectMode && Object.getPrototypeOf(g) !== l.prototype && (g = E(g)), H)
|
|
4763
|
+
X.endEmitted ? v(d, new b()) : k(d, X, g, !0);
|
|
4683
4764
|
else if (X.ended)
|
|
4684
|
-
v(d, new
|
|
4765
|
+
v(d, new _());
|
|
4685
4766
|
else {
|
|
4686
4767
|
if (X.destroyed)
|
|
4687
4768
|
return !1;
|
|
4688
|
-
X.reading = !1, X.decoder && !x ? (
|
|
4769
|
+
X.reading = !1, X.decoder && !x ? (g = X.decoder.write(g), X.objectMode || g.length !== 0 ? k(d, X, g, !1) : ie(d, X)) : k(d, X, g, !1);
|
|
4689
4770
|
}
|
|
4690
4771
|
else H || (X.reading = !1, ie(d, X));
|
|
4691
4772
|
}
|
|
4692
4773
|
return !X.ended && (X.length < X.highWaterMark || X.length === 0);
|
|
4693
4774
|
}
|
|
4694
|
-
function k(d,
|
|
4695
|
-
|
|
4775
|
+
function k(d, g, x, H) {
|
|
4776
|
+
g.flowing && g.length === 0 && !g.sync ? (g.awaitDrain = 0, d.emit("data", x)) : (g.length += g.objectMode ? 1 : x.length, H ? g.buffer.unshift(x) : g.buffer.push(x), g.needReadable && ce(d)), ie(d, g);
|
|
4696
4777
|
}
|
|
4697
|
-
function te(d,
|
|
4778
|
+
function te(d, g) {
|
|
4698
4779
|
var x;
|
|
4699
|
-
return !a(
|
|
4780
|
+
return !a(g) && typeof g != "string" && g !== void 0 && !d.objectMode && (x = new I("chunk", ["string", "Buffer", "Uint8Array"], g)), x;
|
|
4700
4781
|
}
|
|
4701
4782
|
F.prototype.isPaused = function() {
|
|
4702
4783
|
return this._readableState.flowing === !1;
|
|
4703
4784
|
}, F.prototype.setEncoding = function(d) {
|
|
4704
4785
|
P || (P = Oi().StringDecoder);
|
|
4705
|
-
var
|
|
4706
|
-
this._readableState.decoder =
|
|
4786
|
+
var g = new P(d);
|
|
4787
|
+
this._readableState.decoder = g, this._readableState.encoding = this._readableState.decoder.encoding;
|
|
4707
4788
|
for (var x = this._readableState.buffer.head, H = ""; x !== null; )
|
|
4708
|
-
H +=
|
|
4789
|
+
H += g.write(x.data), x = x.next;
|
|
4709
4790
|
return this._readableState.buffer.clear(), H !== "" && this._readableState.buffer.push(H), this._readableState.length = H.length, this;
|
|
4710
4791
|
};
|
|
4711
4792
|
var ee = 1073741824;
|
|
4712
4793
|
function ae(d) {
|
|
4713
4794
|
return d >= ee ? d = ee : (d--, d |= d >>> 1, d |= d >>> 2, d |= d >>> 4, d |= d >>> 8, d |= d >>> 16, d++), d;
|
|
4714
4795
|
}
|
|
4715
|
-
function le(d,
|
|
4716
|
-
return d <= 0 ||
|
|
4796
|
+
function le(d, g) {
|
|
4797
|
+
return d <= 0 || g.length === 0 && g.ended ? 0 : g.objectMode ? 1 : d !== d ? g.flowing && g.length ? g.buffer.head.data.length : g.length : (d > g.highWaterMark && (g.highWaterMark = ae(d)), d <= g.length ? d : g.ended ? g.length : (g.needReadable = !0, 0));
|
|
4717
4798
|
}
|
|
4718
4799
|
F.prototype.read = function(d) {
|
|
4719
4800
|
u("read", d), d = parseInt(d, 10);
|
|
4720
|
-
var
|
|
4721
|
-
if (d !== 0 && (
|
|
4722
|
-
return u("read: emitReadable",
|
|
4723
|
-
if (d = le(d,
|
|
4724
|
-
return
|
|
4725
|
-
var H =
|
|
4726
|
-
u("need readable", H), (
|
|
4801
|
+
var g = this._readableState, x = d;
|
|
4802
|
+
if (d !== 0 && (g.emittedReadable = !1), d === 0 && g.needReadable && ((g.highWaterMark !== 0 ? g.length >= g.highWaterMark : g.length > 0) || g.ended))
|
|
4803
|
+
return u("read: emitReadable", g.length, g.ended), g.length === 0 && g.ended ? D(this) : ce(this), null;
|
|
4804
|
+
if (d = le(d, g), d === 0 && g.ended)
|
|
4805
|
+
return g.length === 0 && D(this), null;
|
|
4806
|
+
var H = g.needReadable;
|
|
4807
|
+
u("need readable", H), (g.length === 0 || g.length - d < g.highWaterMark) && (H = !0, u("length less than watermark", H)), g.ended || g.reading ? (H = !1, u("reading or ended", H)) : H && (u("do read"), g.reading = !0, g.sync = !0, g.length === 0 && (g.needReadable = !0), this._read(g.highWaterMark), g.sync = !1, g.reading || (d = le(x, g)));
|
|
4727
4808
|
var K;
|
|
4728
|
-
return d > 0 ? K = O(d,
|
|
4809
|
+
return d > 0 ? K = O(d, g) : K = null, K === null ? (g.needReadable = g.length <= g.highWaterMark, d = 0) : (g.length -= d, g.awaitDrain = 0), g.length === 0 && (g.ended || (g.needReadable = !0), x !== d && g.ended && D(this)), K !== null && this.emit("data", K), K;
|
|
4729
4810
|
};
|
|
4730
|
-
function me(d,
|
|
4731
|
-
if (u("onEofChunk"), !
|
|
4732
|
-
if (
|
|
4733
|
-
var x =
|
|
4734
|
-
x && x.length && (
|
|
4811
|
+
function me(d, g) {
|
|
4812
|
+
if (u("onEofChunk"), !g.ended) {
|
|
4813
|
+
if (g.decoder) {
|
|
4814
|
+
var x = g.decoder.end();
|
|
4815
|
+
x && x.length && (g.buffer.push(x), g.length += g.objectMode ? 1 : x.length);
|
|
4735
4816
|
}
|
|
4736
|
-
|
|
4817
|
+
g.ended = !0, g.sync ? ce(d) : (g.needReadable = !1, g.emittedReadable || (g.emittedReadable = !0, ge(d)));
|
|
4737
4818
|
}
|
|
4738
4819
|
}
|
|
4739
4820
|
function ce(d) {
|
|
4740
|
-
var
|
|
4741
|
-
u("emitReadable",
|
|
4821
|
+
var g = d._readableState;
|
|
4822
|
+
u("emitReadable", g.needReadable, g.emittedReadable), g.needReadable = !1, g.emittedReadable || (u("emitReadable", g.flowing), g.emittedReadable = !0, n.nextTick(ge, d));
|
|
4742
4823
|
}
|
|
4743
|
-
function
|
|
4744
|
-
var
|
|
4745
|
-
u("emitReadable_",
|
|
4824
|
+
function ge(d) {
|
|
4825
|
+
var g = d._readableState;
|
|
4826
|
+
u("emitReadable_", g.destroyed, g.length, g.ended), !g.destroyed && (g.length || g.ended) && (d.emit("readable"), g.emittedReadable = !1), g.needReadable = !g.flowing && !g.ended && g.length <= g.highWaterMark, M(d);
|
|
4746
4827
|
}
|
|
4747
|
-
function ie(d,
|
|
4748
|
-
|
|
4828
|
+
function ie(d, g) {
|
|
4829
|
+
g.readingMore || (g.readingMore = !0, n.nextTick(Se, d, g));
|
|
4749
4830
|
}
|
|
4750
|
-
function
|
|
4751
|
-
for (; !
|
|
4752
|
-
var x =
|
|
4753
|
-
if (u("maybeReadMore read 0"), d.read(0), x ===
|
|
4831
|
+
function Se(d, g) {
|
|
4832
|
+
for (; !g.reading && !g.ended && (g.length < g.highWaterMark || g.flowing && g.length === 0); ) {
|
|
4833
|
+
var x = g.length;
|
|
4834
|
+
if (u("maybeReadMore read 0"), d.read(0), x === g.length)
|
|
4754
4835
|
break;
|
|
4755
4836
|
}
|
|
4756
|
-
|
|
4837
|
+
g.readingMore = !1;
|
|
4757
4838
|
}
|
|
4758
4839
|
F.prototype._read = function(d) {
|
|
4759
4840
|
v(this, new h("_read()"));
|
|
4760
|
-
}, F.prototype.pipe = function(d,
|
|
4841
|
+
}, F.prototype.pipe = function(d, g) {
|
|
4761
4842
|
var x = this, H = this._readableState;
|
|
4762
4843
|
switch (H.pipesCount) {
|
|
4763
4844
|
case 0:
|
|
@@ -4770,11 +4851,11 @@ function fo() {
|
|
|
4770
4851
|
H.pipes.push(d);
|
|
4771
4852
|
break;
|
|
4772
4853
|
}
|
|
4773
|
-
H.pipesCount += 1, u("pipe count=%d opts=%j", H.pipesCount,
|
|
4774
|
-
var K = (!
|
|
4854
|
+
H.pipesCount += 1, u("pipe count=%d opts=%j", H.pipesCount, g);
|
|
4855
|
+
var K = (!g || g.end !== !1) && d !== n.stdout && d !== n.stderr, X = K ? q : Oe;
|
|
4775
4856
|
H.endEmitted ? n.nextTick(X) : x.once("end", X), d.on("unpipe", Q);
|
|
4776
|
-
function Q(
|
|
4777
|
-
u("onunpipe"),
|
|
4857
|
+
function Q(Ie, _e) {
|
|
4858
|
+
u("onunpipe"), Ie === x && _e && _e.hasUnpiped === !1 && (_e.hasUnpiped = !0, oe());
|
|
4778
4859
|
}
|
|
4779
4860
|
function q() {
|
|
4780
4861
|
u("onend"), d.end();
|
|
@@ -4786,15 +4867,15 @@ function fo() {
|
|
|
4786
4867
|
u("cleanup"), d.removeListener("close", De), d.removeListener("finish", Fe), d.removeListener("drain", ve), d.removeListener("error", Ce), d.removeListener("unpipe", Q), x.removeListener("end", q), x.removeListener("end", Oe), x.removeListener("data", ue), ye = !0, H.awaitDrain && (!d._writableState || d._writableState.needDrain) && ve();
|
|
4787
4868
|
}
|
|
4788
4869
|
x.on("data", ue);
|
|
4789
|
-
function ue(
|
|
4870
|
+
function ue(Ie) {
|
|
4790
4871
|
u("ondata");
|
|
4791
|
-
var
|
|
4792
|
-
u("dest.write",
|
|
4872
|
+
var _e = d.write(Ie);
|
|
4873
|
+
u("dest.write", _e), _e === !1 && ((H.pipesCount === 1 && H.pipes === d || H.pipesCount > 1 && G(H.pipes, d) !== -1) && !ye && (u("false write response, pause", H.awaitDrain), H.awaitDrain++), x.pause());
|
|
4793
4874
|
}
|
|
4794
|
-
function Ce(
|
|
4795
|
-
u("onerror",
|
|
4875
|
+
function Ce(Ie) {
|
|
4876
|
+
u("onerror", Ie), Oe(), d.removeListener("error", Ce), t(d, "error") === 0 && v(d, Ie);
|
|
4796
4877
|
}
|
|
4797
|
-
|
|
4878
|
+
B(d, "error", Ce);
|
|
4798
4879
|
function De() {
|
|
4799
4880
|
d.removeListener("finish", Fe), Oe();
|
|
4800
4881
|
}
|
|
@@ -4811,39 +4892,39 @@ function fo() {
|
|
|
4811
4892
|
function he(d) {
|
|
4812
4893
|
return function() {
|
|
4813
4894
|
var x = d._readableState;
|
|
4814
|
-
u("pipeOnDrain", x.awaitDrain), x.awaitDrain && x.awaitDrain--, x.awaitDrain === 0 && t(d, "data") && (x.flowing = !0,
|
|
4895
|
+
u("pipeOnDrain", x.awaitDrain), x.awaitDrain && x.awaitDrain--, x.awaitDrain === 0 && t(d, "data") && (x.flowing = !0, M(d));
|
|
4815
4896
|
};
|
|
4816
4897
|
}
|
|
4817
4898
|
F.prototype.unpipe = function(d) {
|
|
4818
|
-
var
|
|
4899
|
+
var g = this._readableState, x = {
|
|
4819
4900
|
hasUnpiped: !1
|
|
4820
4901
|
};
|
|
4821
|
-
if (
|
|
4822
|
-
if (
|
|
4823
|
-
return d && d !==
|
|
4902
|
+
if (g.pipesCount === 0) return this;
|
|
4903
|
+
if (g.pipesCount === 1)
|
|
4904
|
+
return d && d !== g.pipes ? this : (d || (d = g.pipes), g.pipes = null, g.pipesCount = 0, g.flowing = !1, d && d.emit("unpipe", this, x), this);
|
|
4824
4905
|
if (!d) {
|
|
4825
|
-
var H =
|
|
4826
|
-
|
|
4906
|
+
var H = g.pipes, K = g.pipesCount;
|
|
4907
|
+
g.pipes = null, g.pipesCount = 0, g.flowing = !1;
|
|
4827
4908
|
for (var X = 0; X < K; X++) H[X].emit("unpipe", this, {
|
|
4828
4909
|
hasUnpiped: !1
|
|
4829
4910
|
});
|
|
4830
4911
|
return this;
|
|
4831
4912
|
}
|
|
4832
|
-
var Q =
|
|
4833
|
-
return Q === -1 ? this : (
|
|
4834
|
-
}, F.prototype.on = function(d,
|
|
4835
|
-
var x = o.prototype.on.call(this, d,
|
|
4913
|
+
var Q = G(g.pipes, d);
|
|
4914
|
+
return Q === -1 ? this : (g.pipes.splice(Q, 1), g.pipesCount -= 1, g.pipesCount === 1 && (g.pipes = g.pipes[0]), d.emit("unpipe", this, x), this);
|
|
4915
|
+
}, F.prototype.on = function(d, g) {
|
|
4916
|
+
var x = o.prototype.on.call(this, d, g), H = this._readableState;
|
|
4836
4917
|
return d === "data" ? (H.readableListening = this.listenerCount("readable") > 0, H.flowing !== !1 && this.resume()) : d === "readable" && !H.endEmitted && !H.readableListening && (H.readableListening = H.needReadable = !0, H.flowing = !1, H.emittedReadable = !1, u("on readable", H.length, H.reading), H.length ? ce(this) : H.reading || n.nextTick($, this)), x;
|
|
4837
|
-
}, F.prototype.addListener = F.prototype.on, F.prototype.removeListener = function(d,
|
|
4838
|
-
var x = o.prototype.removeListener.call(this, d,
|
|
4918
|
+
}, F.prototype.addListener = F.prototype.on, F.prototype.removeListener = function(d, g) {
|
|
4919
|
+
var x = o.prototype.removeListener.call(this, d, g);
|
|
4839
4920
|
return d === "readable" && n.nextTick(L, this), x;
|
|
4840
4921
|
}, F.prototype.removeAllListeners = function(d) {
|
|
4841
|
-
var
|
|
4842
|
-
return (d === "readable" || d === void 0) && n.nextTick(L, this),
|
|
4922
|
+
var g = o.prototype.removeAllListeners.apply(this, arguments);
|
|
4923
|
+
return (d === "readable" || d === void 0) && n.nextTick(L, this), g;
|
|
4843
4924
|
};
|
|
4844
4925
|
function L(d) {
|
|
4845
|
-
var
|
|
4846
|
-
|
|
4926
|
+
var g = d._readableState;
|
|
4927
|
+
g.readableListening = d.listenerCount("readable") > 0, g.resumeScheduled && !g.paused ? g.flowing = !0 : d.listenerCount("data") > 0 && d.resume();
|
|
4847
4928
|
}
|
|
4848
4929
|
function $(d) {
|
|
4849
4930
|
u("readable nexttick read 0"), d.read(0);
|
|
@@ -4852,30 +4933,30 @@ function fo() {
|
|
|
4852
4933
|
var d = this._readableState;
|
|
4853
4934
|
return d.flowing || (u("resume"), d.flowing = !d.readableListening, z(this, d)), d.paused = !1, this;
|
|
4854
4935
|
};
|
|
4855
|
-
function z(d,
|
|
4856
|
-
|
|
4936
|
+
function z(d, g) {
|
|
4937
|
+
g.resumeScheduled || (g.resumeScheduled = !0, n.nextTick(Y, d, g));
|
|
4857
4938
|
}
|
|
4858
|
-
function Y(d,
|
|
4859
|
-
u("resume",
|
|
4939
|
+
function Y(d, g) {
|
|
4940
|
+
u("resume", g.reading), g.reading || d.read(0), g.resumeScheduled = !1, d.emit("resume"), M(d), g.flowing && !g.reading && d.read(0);
|
|
4860
4941
|
}
|
|
4861
4942
|
F.prototype.pause = function() {
|
|
4862
4943
|
return u("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (u("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
|
|
4863
4944
|
};
|
|
4864
|
-
function
|
|
4865
|
-
var
|
|
4866
|
-
for (u("flow",
|
|
4945
|
+
function M(d) {
|
|
4946
|
+
var g = d._readableState;
|
|
4947
|
+
for (u("flow", g.flowing); g.flowing && d.read() !== null; ) ;
|
|
4867
4948
|
}
|
|
4868
4949
|
F.prototype.wrap = function(d) {
|
|
4869
|
-
var
|
|
4950
|
+
var g = this, x = this._readableState, H = !1;
|
|
4870
4951
|
d.on("end", function() {
|
|
4871
4952
|
if (u("wrapped end"), x.decoder && !x.ended) {
|
|
4872
4953
|
var Q = x.decoder.end();
|
|
4873
|
-
Q && Q.length &&
|
|
4954
|
+
Q && Q.length && g.push(Q);
|
|
4874
4955
|
}
|
|
4875
|
-
|
|
4956
|
+
g.push(null);
|
|
4876
4957
|
}), d.on("data", function(Q) {
|
|
4877
4958
|
if (u("wrapped data"), x.decoder && (Q = x.decoder.write(Q)), !(x.objectMode && Q == null) && !(!x.objectMode && (!Q || !Q.length))) {
|
|
4878
|
-
var q =
|
|
4959
|
+
var q = g.push(Q);
|
|
4879
4960
|
q || (H = !0, d.pause());
|
|
4880
4961
|
}
|
|
4881
4962
|
});
|
|
@@ -4885,13 +4966,13 @@ function fo() {
|
|
|
4885
4966
|
return d[q].apply(d, arguments);
|
|
4886
4967
|
};
|
|
4887
4968
|
}(K));
|
|
4888
|
-
for (var X = 0; X <
|
|
4889
|
-
d.on(
|
|
4969
|
+
for (var X = 0; X < p.length; X++)
|
|
4970
|
+
d.on(p[X], this.emit.bind(this, p[X]));
|
|
4890
4971
|
return this._read = function(Q) {
|
|
4891
4972
|
u("wrapped _read", Q), H && (H = !1, d.resume());
|
|
4892
4973
|
}, this;
|
|
4893
4974
|
}, typeof Symbol == "function" && (F.prototype[Symbol.asyncIterator] = function() {
|
|
4894
|
-
return
|
|
4975
|
+
return S === void 0 && (S = Ca()), S(this);
|
|
4895
4976
|
}), Object.defineProperty(F.prototype, "readableHighWaterMark", {
|
|
4896
4977
|
// making it explicit this property is not enumerable
|
|
4897
4978
|
// because otherwise some prototype manipulation in
|
|
@@ -4916,8 +4997,8 @@ function fo() {
|
|
|
4916
4997
|
get: function() {
|
|
4917
4998
|
return this._readableState.flowing;
|
|
4918
4999
|
},
|
|
4919
|
-
set: function(
|
|
4920
|
-
this._readableState && (this._readableState.flowing =
|
|
5000
|
+
set: function(g) {
|
|
5001
|
+
this._readableState && (this._readableState.flowing = g);
|
|
4921
5002
|
}
|
|
4922
5003
|
}), F._fromList = O, Object.defineProperty(F.prototype, "readableLength", {
|
|
4923
5004
|
// making it explicit this property is not enumerable
|
|
@@ -4928,27 +5009,27 @@ function fo() {
|
|
|
4928
5009
|
return this._readableState.length;
|
|
4929
5010
|
}
|
|
4930
5011
|
});
|
|
4931
|
-
function O(d,
|
|
4932
|
-
if (
|
|
5012
|
+
function O(d, g) {
|
|
5013
|
+
if (g.length === 0) return null;
|
|
4933
5014
|
var x;
|
|
4934
|
-
return
|
|
5015
|
+
return g.objectMode ? x = g.buffer.shift() : !d || d >= g.length ? (g.decoder ? x = g.buffer.join("") : g.buffer.length === 1 ? x = g.buffer.first() : x = g.buffer.concat(g.length), g.buffer.clear()) : x = g.buffer.consume(d, g.decoder), x;
|
|
4935
5016
|
}
|
|
4936
5017
|
function D(d) {
|
|
4937
|
-
var
|
|
4938
|
-
u("endReadable",
|
|
5018
|
+
var g = d._readableState;
|
|
5019
|
+
u("endReadable", g.endEmitted), g.endEmitted || (g.ended = !0, n.nextTick(V, g, d));
|
|
4939
5020
|
}
|
|
4940
|
-
function
|
|
4941
|
-
if (u("endReadableNT", d.endEmitted, d.length), !d.endEmitted && d.length === 0 && (d.endEmitted = !0,
|
|
4942
|
-
var x =
|
|
4943
|
-
(!x || x.autoDestroy && x.finished) &&
|
|
5021
|
+
function V(d, g) {
|
|
5022
|
+
if (u("endReadableNT", d.endEmitted, d.length), !d.endEmitted && d.length === 0 && (d.endEmitted = !0, g.readable = !1, g.emit("end"), d.autoDestroy)) {
|
|
5023
|
+
var x = g._writableState;
|
|
5024
|
+
(!x || x.autoDestroy && x.finished) && g.destroy();
|
|
4944
5025
|
}
|
|
4945
5026
|
}
|
|
4946
|
-
typeof Symbol == "function" && (F.from = function(d,
|
|
4947
|
-
return R === void 0 && (R = Ea()), R(F, d,
|
|
5027
|
+
typeof Symbol == "function" && (F.from = function(d, g) {
|
|
5028
|
+
return R === void 0 && (R = Ea()), R(F, d, g);
|
|
4948
5029
|
});
|
|
4949
|
-
function
|
|
5030
|
+
function G(d, g) {
|
|
4950
5031
|
for (var x = 0, H = d.length; x < H; x++)
|
|
4951
|
-
if (d[x] ===
|
|
5032
|
+
if (d[x] === g) return x;
|
|
4952
5033
|
return -1;
|
|
4953
5034
|
}
|
|
4954
5035
|
return Fr;
|
|
@@ -4958,7 +5039,7 @@ function ho() {
|
|
|
4958
5039
|
if (Ni) return jr;
|
|
4959
5040
|
Ni = 1, jr = a;
|
|
4960
5041
|
var n = ze().codes, e = n.ERR_METHOD_NOT_IMPLEMENTED, t = n.ERR_MULTIPLE_CALLBACK, o = n.ERR_TRANSFORM_ALREADY_TRANSFORMING, l = n.ERR_TRANSFORM_WITH_LENGTH_0, c = xe();
|
|
4961
|
-
|
|
5042
|
+
Ve()(a, c);
|
|
4962
5043
|
function E(w, A) {
|
|
4963
5044
|
var C = this._transformState;
|
|
4964
5045
|
C.transforming = !1;
|
|
@@ -5017,7 +5098,7 @@ function Ra() {
|
|
|
5017
5098
|
if (Di) return $r;
|
|
5018
5099
|
Di = 1, $r = e;
|
|
5019
5100
|
var n = ho();
|
|
5020
|
-
|
|
5101
|
+
Ve()(e, n);
|
|
5021
5102
|
function e(t) {
|
|
5022
5103
|
if (!(this instanceof e)) return new e(t);
|
|
5023
5104
|
n.call(this, t);
|
|
@@ -5046,19 +5127,19 @@ function Pa() {
|
|
|
5046
5127
|
}
|
|
5047
5128
|
function a(C, j, y, I) {
|
|
5048
5129
|
I = e(I);
|
|
5049
|
-
var
|
|
5130
|
+
var _ = !1;
|
|
5050
5131
|
C.on("close", function() {
|
|
5051
|
-
|
|
5132
|
+
_ = !0;
|
|
5052
5133
|
}), n === void 0 && (n = an()), n(C, {
|
|
5053
5134
|
readable: j,
|
|
5054
5135
|
writable: y
|
|
5055
5136
|
}, function(b) {
|
|
5056
5137
|
if (b) return I(b);
|
|
5057
|
-
|
|
5138
|
+
_ = !0, I();
|
|
5058
5139
|
});
|
|
5059
5140
|
var h = !1;
|
|
5060
5141
|
return function(b) {
|
|
5061
|
-
if (!
|
|
5142
|
+
if (!_ && !h) {
|
|
5062
5143
|
if (h = !0, E(C)) return C.abort();
|
|
5063
5144
|
if (typeof C.destroy == "function") return C.destroy();
|
|
5064
5145
|
I(b || new l("pipe"));
|
|
@@ -5080,10 +5161,10 @@ function Pa() {
|
|
|
5080
5161
|
var I = w(j);
|
|
5081
5162
|
if (Array.isArray(j[0]) && (j = j[0]), j.length < 2)
|
|
5082
5163
|
throw new o("streams");
|
|
5083
|
-
var
|
|
5084
|
-
var
|
|
5085
|
-
return a(b,
|
|
5086
|
-
|
|
5164
|
+
var _, h = j.map(function(b, P) {
|
|
5165
|
+
var S = P < j.length - 1, R = P > 0;
|
|
5166
|
+
return a(b, S, R, function(v) {
|
|
5167
|
+
_ || (_ = v), v && h.forEach(f), !S && (h.forEach(f), I(_));
|
|
5087
5168
|
});
|
|
5088
5169
|
});
|
|
5089
5170
|
return j.reduce(u);
|
|
@@ -5139,7 +5220,7 @@ var Wr, qi;
|
|
|
5139
5220
|
function Oa() {
|
|
5140
5221
|
if (qi) return Wr;
|
|
5141
5222
|
qi = 1;
|
|
5142
|
-
const n = jo()("simple-peer"), e = $o(), t = Uo(), o = Aa(), l = Ta(), c = Ia(), { Buffer: E } =
|
|
5223
|
+
const n = jo()("simple-peer"), e = $o(), t = Uo(), o = Aa(), l = Ta(), c = Ia(), { Buffer: E } = Ke(), a = 64 * 1024, f = 5 * 1e3, u = 5 * 1e3;
|
|
5143
5224
|
function w(j) {
|
|
5144
5225
|
return j.replace(/a=ice-options:trickle\s\n/g, "");
|
|
5145
5226
|
}
|
|
@@ -5214,8 +5295,8 @@ function Oa() {
|
|
|
5214
5295
|
}
|
|
5215
5296
|
_addIceCandidate(y) {
|
|
5216
5297
|
const I = new this._wrtc.RTCIceCandidate(y);
|
|
5217
|
-
this._pc.addIceCandidate(I).catch((
|
|
5218
|
-
!I.address || I.address.endsWith(".local") ? A("Ignoring unsupported ICE candidate.") : this.destroy(c(
|
|
5298
|
+
this._pc.addIceCandidate(I).catch((_) => {
|
|
5299
|
+
!I.address || I.address.endsWith(".local") ? A("Ignoring unsupported ICE candidate.") : this.destroy(c(_, "ERR_ADD_ICE_CANDIDATE"));
|
|
5219
5300
|
});
|
|
5220
5301
|
}
|
|
5221
5302
|
/**
|
|
@@ -5239,8 +5320,8 @@ function Oa() {
|
|
|
5239
5320
|
if (this._debug("addTransceiver()"), this.initiator)
|
|
5240
5321
|
try {
|
|
5241
5322
|
this._pc.addTransceiver(y, I), this._needsNegotiation();
|
|
5242
|
-
} catch (
|
|
5243
|
-
this.destroy(c(
|
|
5323
|
+
} catch (_) {
|
|
5324
|
+
this.destroy(c(_, "ERR_ADD_TRANSCEIVER"));
|
|
5244
5325
|
}
|
|
5245
5326
|
else
|
|
5246
5327
|
this.emit("signal", {
|
|
@@ -5271,10 +5352,10 @@ function Oa() {
|
|
|
5271
5352
|
if (this.destroying) return;
|
|
5272
5353
|
if (this.destroyed) throw c(new Error("cannot addTrack after peer is destroyed"), "ERR_DESTROYED");
|
|
5273
5354
|
this._debug("addTrack()");
|
|
5274
|
-
const
|
|
5275
|
-
let h =
|
|
5355
|
+
const _ = this._senderMap.get(y) || /* @__PURE__ */ new Map();
|
|
5356
|
+
let h = _.get(I);
|
|
5276
5357
|
if (!h)
|
|
5277
|
-
h = this._pc.addTrack(y, I),
|
|
5358
|
+
h = this._pc.addTrack(y, I), _.set(I, h), this._senderMap.set(y, _), this._needsNegotiation();
|
|
5278
5359
|
else throw h.removed ? c(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."), "ERR_SENDER_REMOVED") : c(new Error("Track has already been added to that stream."), "ERR_SENDER_ALREADY_ADDED");
|
|
5279
5360
|
}
|
|
5280
5361
|
/**
|
|
@@ -5283,11 +5364,11 @@ function Oa() {
|
|
|
5283
5364
|
* @param {MediaStreamTrack} newTrack
|
|
5284
5365
|
* @param {MediaStream} stream
|
|
5285
5366
|
*/
|
|
5286
|
-
replaceTrack(y, I,
|
|
5367
|
+
replaceTrack(y, I, _) {
|
|
5287
5368
|
if (this.destroying) return;
|
|
5288
5369
|
if (this.destroyed) throw c(new Error("cannot replaceTrack after peer is destroyed"), "ERR_DESTROYED");
|
|
5289
5370
|
this._debug("replaceTrack()");
|
|
5290
|
-
const h = this._senderMap.get(y), b = h ? h.get(
|
|
5371
|
+
const h = this._senderMap.get(y), b = h ? h.get(_) : null;
|
|
5291
5372
|
if (!b)
|
|
5292
5373
|
throw c(new Error("Cannot replace track that was never added."), "ERR_TRACK_NOT_ADDED");
|
|
5293
5374
|
I && this._senderMap.set(I, h), b.replaceTrack != null ? b.replaceTrack(I) : this.destroy(c(new Error("replaceTrack is not supported in this browser"), "ERR_UNSUPPORTED_REPLACETRACK"));
|
|
@@ -5301,7 +5382,7 @@ function Oa() {
|
|
|
5301
5382
|
if (this.destroying) return;
|
|
5302
5383
|
if (this.destroyed) throw c(new Error("cannot removeTrack after peer is destroyed"), "ERR_DESTROYED");
|
|
5303
5384
|
this._debug("removeSender()");
|
|
5304
|
-
const
|
|
5385
|
+
const _ = this._senderMap.get(y), h = _ ? _.get(I) : null;
|
|
5305
5386
|
if (!h)
|
|
5306
5387
|
throw c(new Error("Cannot remove track that was never added."), "ERR_TRACK_NOT_ADDED");
|
|
5307
5388
|
try {
|
|
@@ -5352,14 +5433,14 @@ function Oa() {
|
|
|
5352
5433
|
if (this.destroyed = !0, this.destroying = !1, this._debug("destroy (error: %s)", y && (y.message || y)), 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) {
|
|
5353
5434
|
try {
|
|
5354
5435
|
this._channel.close();
|
|
5355
|
-
} catch (
|
|
5436
|
+
} catch (_) {
|
|
5356
5437
|
}
|
|
5357
5438
|
this._channel.onmessage = null, this._channel.onopen = null, this._channel.onclose = null, this._channel.onerror = null;
|
|
5358
5439
|
}
|
|
5359
5440
|
if (this._pc) {
|
|
5360
5441
|
try {
|
|
5361
5442
|
this._pc.close();
|
|
5362
|
-
} catch (
|
|
5443
|
+
} catch (_) {
|
|
5363
5444
|
}
|
|
5364
5445
|
this._pc.oniceconnectionstatechange = null, this._pc.onicegatheringstatechange = null, this._pc.onsignalingstatechange = null, this._pc.onicecandidate = null, this._pc.ontrack = null, this._pc.ondatachannel = null;
|
|
5365
5446
|
}
|
|
@@ -5369,16 +5450,16 @@ function Oa() {
|
|
|
5369
5450
|
_setupData(y) {
|
|
5370
5451
|
if (!y.channel)
|
|
5371
5452
|
return this.destroy(c(new Error("Data channel event is missing `channel` property"), "ERR_DATA_CHANNEL"));
|
|
5372
|
-
this._channel = y.channel, this._channel.binaryType = "arraybuffer", typeof this._channel.bufferedAmountLowThreshold == "number" && (this._channel.bufferedAmountLowThreshold = a), this.channelName = this._channel.label, this._channel.onmessage = (
|
|
5373
|
-
this._onChannelMessage(
|
|
5453
|
+
this._channel = y.channel, this._channel.binaryType = "arraybuffer", typeof this._channel.bufferedAmountLowThreshold == "number" && (this._channel.bufferedAmountLowThreshold = a), this.channelName = this._channel.label, this._channel.onmessage = (_) => {
|
|
5454
|
+
this._onChannelMessage(_);
|
|
5374
5455
|
}, this._channel.onbufferedamountlow = () => {
|
|
5375
5456
|
this._onChannelBufferedAmountLow();
|
|
5376
5457
|
}, this._channel.onopen = () => {
|
|
5377
5458
|
this._onChannelOpen();
|
|
5378
5459
|
}, this._channel.onclose = () => {
|
|
5379
5460
|
this._onChannelClose();
|
|
5380
|
-
}, this._channel.onerror = (
|
|
5381
|
-
const h =
|
|
5461
|
+
}, this._channel.onerror = (_) => {
|
|
5462
|
+
const h = _.error instanceof Error ? _.error : new Error(`Datachannel error: ${_.message} ${_.filename}:${_.lineno}:${_.colno}`);
|
|
5382
5463
|
this.destroy(c(h, "ERR_DATA_CHANNEL"));
|
|
5383
5464
|
};
|
|
5384
5465
|
let I = !1;
|
|
@@ -5388,17 +5469,17 @@ function Oa() {
|
|
|
5388
5469
|
}
|
|
5389
5470
|
_read() {
|
|
5390
5471
|
}
|
|
5391
|
-
_write(y, I,
|
|
5392
|
-
if (this.destroyed) return
|
|
5472
|
+
_write(y, I, _) {
|
|
5473
|
+
if (this.destroyed) return _(c(new Error("cannot write after peer is destroyed"), "ERR_DATA_CHANNEL"));
|
|
5393
5474
|
if (this._connected) {
|
|
5394
5475
|
try {
|
|
5395
5476
|
this.send(y);
|
|
5396
5477
|
} catch (h) {
|
|
5397
5478
|
return this.destroy(c(h, "ERR_DATA_CHANNEL"));
|
|
5398
5479
|
}
|
|
5399
|
-
this._channel.bufferedAmount > a ? (this._debug("start backpressure: bufferedAmount %d", this._channel.bufferedAmount), this._cb =
|
|
5480
|
+
this._channel.bufferedAmount > a ? (this._debug("start backpressure: bufferedAmount %d", this._channel.bufferedAmount), this._cb = _) : _(null);
|
|
5400
5481
|
} else
|
|
5401
|
-
this._debug("write before connect"), this._chunk = y, this._cb =
|
|
5482
|
+
this._debug("write before connect"), this._chunk = y, this._cb = _;
|
|
5402
5483
|
}
|
|
5403
5484
|
// When stream finishes writing, close socket. Half open connections are not
|
|
5404
5485
|
// supported.
|
|
@@ -5425,12 +5506,12 @@ function Oa() {
|
|
|
5425
5506
|
type: b.type,
|
|
5426
5507
|
sdp: b.sdp
|
|
5427
5508
|
});
|
|
5428
|
-
},
|
|
5509
|
+
}, _ = () => {
|
|
5429
5510
|
this._debug("createOffer success"), !this.destroyed && (this.trickle || this._iceComplete ? I() : this.once("_iceComplete", I));
|
|
5430
5511
|
}, h = (b) => {
|
|
5431
5512
|
this.destroy(c(b, "ERR_SET_LOCAL_DESCRIPTION"));
|
|
5432
5513
|
};
|
|
5433
|
-
this._pc.setLocalDescription(y).then(
|
|
5514
|
+
this._pc.setLocalDescription(y).then(_).catch(h);
|
|
5434
5515
|
}).catch((y) => {
|
|
5435
5516
|
this.destroy(c(y, "ERR_CREATE_OFFER"));
|
|
5436
5517
|
});
|
|
@@ -5451,12 +5532,12 @@ function Oa() {
|
|
|
5451
5532
|
type: b.type,
|
|
5452
5533
|
sdp: b.sdp
|
|
5453
5534
|
}), this.initiator || this._requestMissingTransceivers();
|
|
5454
|
-
},
|
|
5535
|
+
}, _ = () => {
|
|
5455
5536
|
this.destroyed || (this.trickle || this._iceComplete ? I() : this.once("_iceComplete", I));
|
|
5456
5537
|
}, h = (b) => {
|
|
5457
5538
|
this.destroy(c(b, "ERR_SET_LOCAL_DESCRIPTION"));
|
|
5458
5539
|
};
|
|
5459
|
-
this._pc.setLocalDescription(y).then(
|
|
5540
|
+
this._pc.setLocalDescription(y).then(_).catch(h);
|
|
5460
5541
|
}).catch((y) => {
|
|
5461
5542
|
this.destroy(c(y, "ERR_CREATE_ANSWER"));
|
|
5462
5543
|
});
|
|
@@ -5474,43 +5555,43 @@ function Oa() {
|
|
|
5474
5555
|
), this.emit("iceStateChange", y, I), (y === "connected" || y === "completed") && (this._pcReady = !0, this._maybeReady()), y === "failed" && this.destroy(c(new Error("Ice connection failed."), "ERR_ICE_CONNECTION_FAILURE")), y === "closed" && this.destroy(c(new Error("Ice connection closed."), "ERR_ICE_CONNECTION_CLOSED"));
|
|
5475
5556
|
}
|
|
5476
5557
|
getStats(y) {
|
|
5477
|
-
const I = (
|
|
5478
|
-
Object.assign(
|
|
5479
|
-
}),
|
|
5480
|
-
this._pc.getStats.length === 0 || this._isReactNativeWebrtc ? this._pc.getStats().then((
|
|
5558
|
+
const I = (_) => (Object.prototype.toString.call(_.values) === "[object Array]" && _.values.forEach((h) => {
|
|
5559
|
+
Object.assign(_, h);
|
|
5560
|
+
}), _);
|
|
5561
|
+
this._pc.getStats.length === 0 || this._isReactNativeWebrtc ? this._pc.getStats().then((_) => {
|
|
5481
5562
|
const h = [];
|
|
5482
|
-
|
|
5563
|
+
_.forEach((b) => {
|
|
5483
5564
|
h.push(I(b));
|
|
5484
5565
|
}), y(null, h);
|
|
5485
|
-
}, (
|
|
5566
|
+
}, (_) => y(_)) : this._pc.getStats.length > 0 ? this._pc.getStats((_) => {
|
|
5486
5567
|
if (this.destroyed) return;
|
|
5487
5568
|
const h = [];
|
|
5488
|
-
|
|
5569
|
+
_.result().forEach((b) => {
|
|
5489
5570
|
const P = {};
|
|
5490
|
-
b.names().forEach((
|
|
5491
|
-
P[
|
|
5571
|
+
b.names().forEach((S) => {
|
|
5572
|
+
P[S] = b.stat(S);
|
|
5492
5573
|
}), P.id = b.id, P.type = b.type, P.timestamp = b.timestamp, h.push(I(P));
|
|
5493
5574
|
}), y(null, h);
|
|
5494
|
-
}, (
|
|
5575
|
+
}, (_) => y(_)) : y(null, []);
|
|
5495
5576
|
}
|
|
5496
5577
|
_maybeReady() {
|
|
5497
5578
|
if (this._debug("maybeReady pc %s channel %s", this._pcReady, this._channelReady), this._connected || this._connecting || !this._pcReady || !this._channelReady) return;
|
|
5498
5579
|
this._connecting = !0;
|
|
5499
5580
|
const y = () => {
|
|
5500
|
-
this.destroyed || this.getStats((I,
|
|
5581
|
+
this.destroyed || this.getStats((I, _) => {
|
|
5501
5582
|
if (this.destroyed) return;
|
|
5502
|
-
I && (
|
|
5583
|
+
I && (_ = []);
|
|
5503
5584
|
const h = {}, b = {}, P = {};
|
|
5504
|
-
let
|
|
5505
|
-
|
|
5585
|
+
let S = !1;
|
|
5586
|
+
_.forEach((v) => {
|
|
5506
5587
|
(v.type === "remotecandidate" || v.type === "remote-candidate") && (h[v.id] = v), (v.type === "localcandidate" || v.type === "local-candidate") && (b[v.id] = v), (v.type === "candidatepair" || v.type === "candidate-pair") && (P[v.id] = v);
|
|
5507
5588
|
});
|
|
5508
5589
|
const R = (v) => {
|
|
5509
|
-
|
|
5510
|
-
let
|
|
5511
|
-
|
|
5512
|
-
let
|
|
5513
|
-
|
|
5590
|
+
S = !0;
|
|
5591
|
+
let p = b[v.localCandidateId];
|
|
5592
|
+
p && (p.ip || p.address) ? (this.localAddress = p.ip || p.address, this.localPort = Number(p.port)) : p && p.ipAddress ? (this.localAddress = p.ipAddress, this.localPort = Number(p.portNumber)) : typeof v.googLocalAddress == "string" && (p = v.googLocalAddress.split(":"), this.localAddress = p[0], this.localPort = Number(p[1])), this.localAddress && (this.localFamily = this.localAddress.includes(":") ? "IPv6" : "IPv4");
|
|
5593
|
+
let B = h[v.remoteCandidateId];
|
|
5594
|
+
B && (B.ip || B.address) ? (this.remoteAddress = B.ip || B.address, this.remotePort = Number(B.port)) : B && B.ipAddress ? (this.remoteAddress = B.ipAddress, this.remotePort = Number(B.portNumber)) : typeof v.googRemoteAddress == "string" && (B = v.googRemoteAddress.split(":"), this.remoteAddress = B[0], this.remotePort = Number(B[1])), this.remoteAddress && (this.remoteFamily = this.remoteAddress.includes(":") ? "IPv6" : "IPv4"), this._debug(
|
|
5514
5595
|
"connect local: %s:%s remote: %s:%s",
|
|
5515
5596
|
this.localAddress,
|
|
5516
5597
|
this.localPort,
|
|
@@ -5518,9 +5599,9 @@ function Oa() {
|
|
|
5518
5599
|
this.remotePort
|
|
5519
5600
|
);
|
|
5520
5601
|
};
|
|
5521
|
-
if (
|
|
5602
|
+
if (_.forEach((v) => {
|
|
5522
5603
|
v.type === "transport" && v.selectedCandidatePairId && R(P[v.selectedCandidatePairId]), (v.type === "googCandidatePair" && v.googActiveConnection === "true" || (v.type === "candidatepair" || v.type === "candidate-pair") && v.selected) && R(v);
|
|
5523
|
-
}), !
|
|
5604
|
+
}), !S && (!Object.keys(P).length || Object.keys(b).length)) {
|
|
5524
5605
|
setTimeout(y, 100);
|
|
5525
5606
|
return;
|
|
5526
5607
|
} else
|
|
@@ -5528,8 +5609,8 @@ function Oa() {
|
|
|
5528
5609
|
if (this._chunk) {
|
|
5529
5610
|
try {
|
|
5530
5611
|
this.send(this._chunk);
|
|
5531
|
-
} catch (
|
|
5532
|
-
return this.destroy(c(
|
|
5612
|
+
} catch (p) {
|
|
5613
|
+
return this.destroy(c(p, "ERR_DATA_CHANNEL"));
|
|
5533
5614
|
}
|
|
5534
5615
|
this._chunk = null, this._debug('sent chunk from "write before connect"');
|
|
5535
5616
|
const v = this._cb;
|
|
@@ -5580,7 +5661,7 @@ function Oa() {
|
|
|
5580
5661
|
this._debug("on track"), this.emit("track", y.track, I), this._remoteTracks.push({
|
|
5581
5662
|
track: y.track,
|
|
5582
5663
|
stream: I
|
|
5583
|
-
}), !this._remoteStreams.some((
|
|
5664
|
+
}), !this._remoteStreams.some((_) => _.id === I.id) && (this._remoteStreams.push(I), l(() => {
|
|
5584
5665
|
this._debug("on stream"), this.emit("stream", I);
|
|
5585
5666
|
}));
|
|
5586
5667
|
});
|
|
@@ -5603,8 +5684,8 @@ function Oa() {
|
|
|
5603
5684
|
}, C.channelConfig = {}, Wr = C, Wr;
|
|
5604
5685
|
}
|
|
5605
5686
|
var ka = Oa();
|
|
5606
|
-
const
|
|
5607
|
-
var
|
|
5687
|
+
const Ma = /* @__PURE__ */ Qr(ka);
|
|
5688
|
+
var Ba = Object.defineProperty, La = (n, e, t) => e in n ? Ba(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Be = (n, e, t) => La(n, typeof e != "symbol" ? e + "" : e, t), Vr = (n, e, t) => new Promise((o, l) => {
|
|
5608
5689
|
var c = (f) => {
|
|
5609
5690
|
try {
|
|
5610
5691
|
a(t.next(f));
|
|
@@ -5622,13 +5703,13 @@ var Ma = Object.defineProperty, La = (n, e, t) => e in n ? Ma(n, e, { enumerable
|
|
|
5622
5703
|
});
|
|
5623
5704
|
class Na {
|
|
5624
5705
|
constructor(e, t, o = {}) {
|
|
5625
|
-
|
|
5706
|
+
Be(this, "peer", null), Be(this, "config"), Be(this, "events"), Be(this, "connectionState", "new"), Be(this, "isInitiator"), Be(this, "remoteUserId"), Be(this, "localStream", null), this.remoteUserId = e, this.config = t, this.events = o, this.isInitiator = t.initiator || !1;
|
|
5626
5707
|
}
|
|
5627
5708
|
/**
|
|
5628
5709
|
* Create and initialize the peer connection
|
|
5629
5710
|
*/
|
|
5630
5711
|
createConnection(e) {
|
|
5631
|
-
return
|
|
5712
|
+
return Vr(this, null, function* () {
|
|
5632
5713
|
try {
|
|
5633
5714
|
console.log(
|
|
5634
5715
|
`[CallPeerConnection] Creating connection to ${this.remoteUserId}, initiator: ${this.isInitiator}`
|
|
@@ -5641,7 +5722,7 @@ class Na {
|
|
|
5641
5722
|
iceServers: this.config.iceServers
|
|
5642
5723
|
}
|
|
5643
5724
|
};
|
|
5644
|
-
this.peer = new
|
|
5725
|
+
this.peer = new Ma(t), this.setupPeerEventListeners(), console.log(
|
|
5645
5726
|
`[CallPeerConnection] Peer connection created for ${this.remoteUserId}`
|
|
5646
5727
|
);
|
|
5647
5728
|
} catch (t) {
|
|
@@ -5728,17 +5809,49 @@ class Na {
|
|
|
5728
5809
|
);
|
|
5729
5810
|
return;
|
|
5730
5811
|
}
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
`[CallPeerConnection]
|
|
5812
|
+
if (!this.localStream) {
|
|
5813
|
+
console.error(
|
|
5814
|
+
`[CallPeerConnection] Cannot replace track for ${this.remoteUserId}: no local stream`
|
|
5734
5815
|
);
|
|
5735
|
-
|
|
5816
|
+
return;
|
|
5817
|
+
}
|
|
5818
|
+
if (e.kind !== t.kind) {
|
|
5736
5819
|
console.error(
|
|
5820
|
+
`[CallPeerConnection] Cannot replace track for ${this.remoteUserId}: track kinds don't match (${e.kind} vs ${t.kind})`
|
|
5821
|
+
);
|
|
5822
|
+
return;
|
|
5823
|
+
}
|
|
5824
|
+
const E = this.localStream.getTracks().some((a) => a.id === e.id);
|
|
5825
|
+
E || console.warn(
|
|
5826
|
+
`[CallPeerConnection] Old track not found in local stream for ${this.remoteUserId}, attempting replacement anyway`
|
|
5827
|
+
);
|
|
5828
|
+
try {
|
|
5829
|
+
this.peer.replaceTrack(e, t, this.localStream), E && this.localStream.removeTrack(e), this.localStream.addTrack(t), console.log(
|
|
5830
|
+
`[CallPeerConnection] ${t.kind} track replaced for ${this.remoteUserId} (${e.id} -> ${t.id})`
|
|
5831
|
+
);
|
|
5832
|
+
} catch (a) {
|
|
5833
|
+
throw console.error(
|
|
5737
5834
|
`[CallPeerConnection] Failed to replace track for ${this.remoteUserId}:`,
|
|
5738
|
-
|
|
5739
|
-
), (l = (o = this.events).onError) == null || l.call(o,
|
|
5835
|
+
a
|
|
5836
|
+
), (l = (o = this.events).onError) == null || l.call(o, a), a;
|
|
5740
5837
|
}
|
|
5741
5838
|
}
|
|
5839
|
+
/**
|
|
5840
|
+
* Get video track from local stream
|
|
5841
|
+
*/
|
|
5842
|
+
getVideoTrack() {
|
|
5843
|
+
if (!this.localStream) return null;
|
|
5844
|
+
const e = this.localStream.getVideoTracks();
|
|
5845
|
+
return e.length > 0 ? e[0] : null;
|
|
5846
|
+
}
|
|
5847
|
+
/**
|
|
5848
|
+
* Get audio track from local stream
|
|
5849
|
+
*/
|
|
5850
|
+
getAudioTrack() {
|
|
5851
|
+
if (!this.localStream) return null;
|
|
5852
|
+
const e = this.localStream.getAudioTracks();
|
|
5853
|
+
return e.length > 0 ? e[0] : null;
|
|
5854
|
+
}
|
|
5742
5855
|
/**
|
|
5743
5856
|
* Send data through the data channel
|
|
5744
5857
|
*/
|
|
@@ -5769,7 +5882,7 @@ class Na {
|
|
|
5769
5882
|
* Set bandwidth limits
|
|
5770
5883
|
*/
|
|
5771
5884
|
setBandwidthLimit(e) {
|
|
5772
|
-
return
|
|
5885
|
+
return Vr(this, null, function* () {
|
|
5773
5886
|
if (!this.peer) {
|
|
5774
5887
|
console.warn(
|
|
5775
5888
|
`[CallPeerConnection] Cannot set bandwidth for ${this.remoteUserId}: peer connection not available`
|
|
@@ -5813,7 +5926,7 @@ class Na {
|
|
|
5813
5926
|
* Get connection statistics
|
|
5814
5927
|
*/
|
|
5815
5928
|
getStats() {
|
|
5816
|
-
return
|
|
5929
|
+
return Vr(this, null, function* () {
|
|
5817
5930
|
if (!this.peer)
|
|
5818
5931
|
return null;
|
|
5819
5932
|
try {
|
|
@@ -5928,8 +6041,8 @@ class Na {
|
|
|
5928
6041
|
};
|
|
5929
6042
|
}
|
|
5930
6043
|
}
|
|
5931
|
-
const xi = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 },
|
|
5932
|
-
const e =
|
|
6044
|
+
const xi = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, Ye = /* @__PURE__ */ new Map(), ct = (n) => {
|
|
6045
|
+
const e = Ye.get(n);
|
|
5933
6046
|
return e ? Object.fromEntries(
|
|
5934
6047
|
Object.entries(e.stores).map(([t, o]) => [t, o.getState()])
|
|
5935
6048
|
) : {};
|
|
@@ -5939,18 +6052,18 @@ const xi = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, Je
|
|
|
5939
6052
|
type: "untracked",
|
|
5940
6053
|
connection: e.connect(t)
|
|
5941
6054
|
};
|
|
5942
|
-
const o =
|
|
6055
|
+
const o = Ye.get(t.name);
|
|
5943
6056
|
if (o)
|
|
5944
6057
|
return He({ type: "tracked", store: n }, o);
|
|
5945
6058
|
const l = {
|
|
5946
6059
|
connection: e.connect(t),
|
|
5947
6060
|
stores: {}
|
|
5948
6061
|
};
|
|
5949
|
-
return
|
|
6062
|
+
return Ye.set(t.name, l), He({ type: "tracked", store: n }, l);
|
|
5950
6063
|
}, Fa = (n, e) => {
|
|
5951
6064
|
if (e === void 0) return;
|
|
5952
|
-
const t =
|
|
5953
|
-
t && (delete t.stores[e], Object.keys(t.stores).length === 0 &&
|
|
6065
|
+
const t = Ye.get(n);
|
|
6066
|
+
t && (delete t.stores[e], Object.keys(t.stores).length === 0 && Ye.delete(n));
|
|
5954
6067
|
}, ja = (n) => {
|
|
5955
6068
|
var e, t;
|
|
5956
6069
|
if (!n) return;
|
|
@@ -5970,22 +6083,22 @@ const xi = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, Je
|
|
|
5970
6083
|
}
|
|
5971
6084
|
if (!u)
|
|
5972
6085
|
return n(t, o, l);
|
|
5973
|
-
const
|
|
6086
|
+
const _ = Da(a, u, f), { connection: w } = _, A = bt(_, ["connection"]);
|
|
5974
6087
|
let C = !0;
|
|
5975
6088
|
l.setState = (h, b, P) => {
|
|
5976
|
-
const
|
|
5977
|
-
if (!C) return
|
|
6089
|
+
const S = t(h, b);
|
|
6090
|
+
if (!C) return S;
|
|
5978
6091
|
const R = P === void 0 ? {
|
|
5979
6092
|
type: E || ja(new Error().stack) || "anonymous"
|
|
5980
6093
|
} : typeof P == "string" ? { type: P } : P;
|
|
5981
|
-
return a === void 0 ? (w == null || w.send(R, o()),
|
|
6094
|
+
return a === void 0 ? (w == null || w.send(R, o()), S) : (w == null || w.send(
|
|
5982
6095
|
vt(He({}, R), {
|
|
5983
6096
|
type: `${a}/${R.type}`
|
|
5984
6097
|
}),
|
|
5985
6098
|
vt(He({}, ct(f.name)), {
|
|
5986
6099
|
[a]: l.getState()
|
|
5987
6100
|
})
|
|
5988
|
-
),
|
|
6101
|
+
), S);
|
|
5989
6102
|
}, l.devtools = {
|
|
5990
6103
|
cleanup: () => {
|
|
5991
6104
|
w && typeof w.unsubscribe == "function" && w.unsubscribe(), Fa(f.name, a);
|
|
@@ -6036,10 +6149,10 @@ const xi = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, Je
|
|
|
6036
6149
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
6037
6150
|
`
|
|
6038
6151
|
);
|
|
6039
|
-
const
|
|
6040
|
-
if (
|
|
6152
|
+
const S = P.state[a];
|
|
6153
|
+
if (S == null)
|
|
6041
6154
|
return;
|
|
6042
|
-
JSON.stringify(l.getState()) !== JSON.stringify(
|
|
6155
|
+
JSON.stringify(l.getState()) !== JSON.stringify(S) && j(S);
|
|
6043
6156
|
return;
|
|
6044
6157
|
}
|
|
6045
6158
|
l.dispatchFromDevtools && typeof l.dispatch == "function" && l.dispatch(P);
|
|
@@ -6073,9 +6186,9 @@ const xi = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, Je
|
|
|
6073
6186
|
JSON.stringify(l.getState()) !== JSON.stringify(P[a]) && j(P[a]);
|
|
6074
6187
|
});
|
|
6075
6188
|
case "IMPORT_STATE": {
|
|
6076
|
-
const { nextLiftedState: P } = h.payload,
|
|
6077
|
-
if (!
|
|
6078
|
-
j(a === void 0 ?
|
|
6189
|
+
const { nextLiftedState: P } = h.payload, S = (b = P.computedStates.slice(-1)[0]) == null ? void 0 : b.state;
|
|
6190
|
+
if (!S) return;
|
|
6191
|
+
j(a === void 0 ? S : S[a]), w == null || w.send(
|
|
6079
6192
|
null,
|
|
6080
6193
|
// FIXME no-any
|
|
6081
6194
|
P
|
|
@@ -6100,14 +6213,14 @@ const xi = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, Je
|
|
|
6100
6213
|
}
|
|
6101
6214
|
t !== void 0 && e(t);
|
|
6102
6215
|
};
|
|
6103
|
-
var qa = { env: {} }, xa = Object.defineProperty, Wa = Object.defineProperties,
|
|
6216
|
+
var qa = { env: {} }, xa = Object.defineProperty, Wa = Object.defineProperties, Va = Object.getOwnPropertyDescriptors, ft = Object.getOwnPropertySymbols, po = Object.prototype.hasOwnProperty, go = Object.prototype.propertyIsEnumerable, Wi = (n, e, t) => e in n ? xa(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Le = (n, e) => {
|
|
6104
6217
|
for (var t in e || (e = {}))
|
|
6105
6218
|
po.call(e, t) && Wi(n, t, e[t]);
|
|
6106
6219
|
if (ft)
|
|
6107
6220
|
for (var t of ft(e))
|
|
6108
6221
|
go.call(e, t) && Wi(n, t, e[t]);
|
|
6109
6222
|
return n;
|
|
6110
|
-
},
|
|
6223
|
+
}, Gr = (n, e) => Wa(n, Va(e)), za = (n) => typeof n == "symbol" ? n : n + "", Ga = (n, e) => {
|
|
6111
6224
|
var t = {};
|
|
6112
6225
|
for (var o in n)
|
|
6113
6226
|
po.call(n, o) && e.indexOf(o) < 0 && (t[o] = n[o]);
|
|
@@ -6116,7 +6229,7 @@ var qa = { env: {} }, xa = Object.defineProperty, Wa = Object.defineProperties,
|
|
|
6116
6229
|
e.indexOf(o) < 0 && go.call(n, o) && (t[o] = n[o]);
|
|
6117
6230
|
return t;
|
|
6118
6231
|
};
|
|
6119
|
-
const
|
|
6232
|
+
const Vi = {
|
|
6120
6233
|
roomId: "",
|
|
6121
6234
|
participants: {},
|
|
6122
6235
|
localParticipant: null,
|
|
@@ -6130,14 +6243,14 @@ const Gi = {
|
|
|
6130
6243
|
callStatusError: null
|
|
6131
6244
|
}, we = To()(
|
|
6132
6245
|
Ua(
|
|
6133
|
-
(n) =>
|
|
6246
|
+
(n) => Gr(Le({}, Vi), {
|
|
6134
6247
|
// Room management
|
|
6135
6248
|
setRoomId: (e) => n({ roomId: e }, !1, "setRoomId"),
|
|
6136
6249
|
// Participant management
|
|
6137
6250
|
setLocalParticipant: (e) => n({ localParticipant: e }, !1, "setLocalParticipant"),
|
|
6138
6251
|
addParticipant: (e) => n(
|
|
6139
6252
|
(t) => ({
|
|
6140
|
-
participants:
|
|
6253
|
+
participants: Gr(Le({}, t.participants), {
|
|
6141
6254
|
[e.userId]: e
|
|
6142
6255
|
})
|
|
6143
6256
|
}),
|
|
@@ -6147,14 +6260,14 @@ const Gi = {
|
|
|
6147
6260
|
removeParticipant: (e) => n(
|
|
6148
6261
|
(t) => {
|
|
6149
6262
|
const o = t.participants, { [e]: l } = o;
|
|
6150
|
-
return { participants:
|
|
6263
|
+
return { participants: Ga(o, [za(e)]) };
|
|
6151
6264
|
},
|
|
6152
6265
|
!1,
|
|
6153
6266
|
"removeParticipant"
|
|
6154
6267
|
),
|
|
6155
6268
|
updateParticipant: (e, t) => n(
|
|
6156
6269
|
(o) => ({
|
|
6157
|
-
participants:
|
|
6270
|
+
participants: Gr(Le({}, o.participants), {
|
|
6158
6271
|
[e]: o.participants[e] ? Le(Le({}, o.participants[e]), t) : Le({
|
|
6159
6272
|
userId: e,
|
|
6160
6273
|
videoOn: !0,
|
|
@@ -6181,14 +6294,14 @@ const Gi = {
|
|
|
6181
6294
|
setCallStatusLoading: (e) => n({ callStatusLoading: e }, !1, "setCallStatusLoading"),
|
|
6182
6295
|
setCallStatusError: (e) => n({ callStatusError: e }, !1, "setCallStatusError"),
|
|
6183
6296
|
// Reset store
|
|
6184
|
-
resetCall: () => n(Le({},
|
|
6297
|
+
resetCall: () => n(Le({}, Vi), !1, "resetCall")
|
|
6185
6298
|
}),
|
|
6186
6299
|
{
|
|
6187
6300
|
name: "peers-caller-store",
|
|
6188
6301
|
enabled: qa.env.NODE_ENV === "development"
|
|
6189
6302
|
}
|
|
6190
6303
|
)
|
|
6191
|
-
), Ts = (n) => n.participants, Ha = (n) => Object.keys(n.participants).length, Is = (n) => n.localParticipant, Os = (n) => n.callStatus, ks = (n) => n.callStatus === "connected",
|
|
6304
|
+
), Ts = (n) => n.participants, Ha = (n) => Object.keys(n.participants).length, Is = (n) => n.localParticipant, Os = (n) => n.callStatus, ks = (n) => n.callStatus === "connected", Ms = (n) => n.error, Bs = (n) => n.callStatusInfo, Ls = (n) => n.callStatusLoading, Ns = (n) => n.callStatusError, Ds = (n) => {
|
|
6192
6305
|
var e;
|
|
6193
6306
|
return ((e = n.callStatusInfo) == null ? void 0 : e.canJoin) || !1;
|
|
6194
6307
|
}, Fs = (n) => {
|
|
@@ -6241,7 +6354,7 @@ var Za = Object.defineProperty, Qa = Object.defineProperties, es = Object.getOwn
|
|
|
6241
6354
|
}, a = (f) => f.done ? o(f.value) : Promise.resolve(f.value).then(c, E);
|
|
6242
6355
|
a((t = t.apply(n, e)).next());
|
|
6243
6356
|
});
|
|
6244
|
-
class
|
|
6357
|
+
class Gi extends yo {
|
|
6245
6358
|
constructor(e, t = {}, o = !1) {
|
|
6246
6359
|
super(we), $e(this, "userId"), $e(this, "mediaStream", null), $e(this, "peerConnections", /* @__PURE__ */ new Map()), $e(this, "remoteStreams", /* @__PURE__ */ new Map()), $e(this, "isLocalParticipant", !1), $e(this, "callbacks"), this.userId = e, this.callbacks = t, this.isLocalParticipant = o;
|
|
6247
6360
|
const l = {
|
|
@@ -6374,10 +6487,14 @@ class Vi extends yo {
|
|
|
6374
6487
|
if (!this.mediaStream)
|
|
6375
6488
|
throw new Error("Media stream not initialized");
|
|
6376
6489
|
console.log(`[CallParticipant] Starting screen share for ${this.userId}`);
|
|
6377
|
-
const o = yield this.mediaStream.startScreenShare();
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6490
|
+
const o = yield this.mediaStream.startScreenShare(), l = this.mediaStream.getScreenVideoTrack(), c = this.mediaStream.getCameraVideoTrack();
|
|
6491
|
+
if (!l)
|
|
6492
|
+
throw new Error("Failed to get screen video track");
|
|
6493
|
+
for (const [E, a] of this.peerConnections)
|
|
6494
|
+
c ? (a.replaceTrack(c, l), console.log(
|
|
6495
|
+
`[CallParticipant] Screen video track replaced for connection with ${E}`
|
|
6496
|
+
)) : console.warn(
|
|
6497
|
+
`[CallParticipant] No camera video track to replace for ${E}`
|
|
6381
6498
|
);
|
|
6382
6499
|
this.updateState({
|
|
6383
6500
|
screenSharing: !0,
|
|
@@ -6403,15 +6520,37 @@ class Vi extends yo {
|
|
|
6403
6520
|
if (!this.mediaStream)
|
|
6404
6521
|
throw new Error("Media stream not initialized");
|
|
6405
6522
|
console.log(`[CallParticipant] Stopping screen share for ${this.userId}`);
|
|
6406
|
-
const o =
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
this.
|
|
6523
|
+
const o = this.mediaStream.getScreenVideoTrack();
|
|
6524
|
+
console.log(
|
|
6525
|
+
"[CallParticipant] Screen video track found:",
|
|
6526
|
+
!!o
|
|
6527
|
+
);
|
|
6528
|
+
const l = yield this.mediaStream.stopScreenShare(), c = this.mediaStream.getCameraVideoTrack();
|
|
6529
|
+
if (console.log("[CallParticipant] Camera stream:", !!l), console.log("[CallParticipant] Camera video track:", !!c), !c)
|
|
6530
|
+
throw new Error("Failed to get camera video track");
|
|
6531
|
+
for (const [E, a] of this.peerConnections)
|
|
6532
|
+
try {
|
|
6533
|
+
o && c ? (a.replaceTrack(o, c), console.log(
|
|
6534
|
+
`[CallParticipant] Camera video track restored for connection with ${E}`
|
|
6535
|
+
)) : (console.log(
|
|
6536
|
+
`[CallParticipant] Updating entire stream for connection with ${E}`
|
|
6537
|
+
), a.addStream(l));
|
|
6538
|
+
} catch (f) {
|
|
6539
|
+
console.warn(
|
|
6540
|
+
`[CallParticipant] Failed to replace track for ${E}, trying stream replacement:`,
|
|
6541
|
+
f
|
|
6542
|
+
);
|
|
6543
|
+
}
|
|
6544
|
+
if (this.updateState({
|
|
6412
6545
|
screenSharing: !1,
|
|
6413
|
-
stream:
|
|
6414
|
-
}),
|
|
6546
|
+
stream: l
|
|
6547
|
+
}), this.isLocalParticipant && this.mediaStream) {
|
|
6548
|
+
const E = this.mediaStream.getVideoElement();
|
|
6549
|
+
E && (E.srcObject = l, console.log(
|
|
6550
|
+
`[CallParticipant] Updated local video element for ${this.userId}`
|
|
6551
|
+
));
|
|
6552
|
+
}
|
|
6553
|
+
console.log(
|
|
6415
6554
|
`[CallParticipant] Screen sharing stopped for ${this.userId}`
|
|
6416
6555
|
);
|
|
6417
6556
|
} catch (o) {
|
|
@@ -6557,9 +6696,9 @@ function is() {
|
|
|
6557
6696
|
}
|
|
6558
6697
|
}
|
|
6559
6698
|
}, document.createElement = document.captureStream = document.mozCaptureStream = function() {
|
|
6560
|
-
var
|
|
6699
|
+
var p = {
|
|
6561
6700
|
getContext: function() {
|
|
6562
|
-
return
|
|
6701
|
+
return p;
|
|
6563
6702
|
},
|
|
6564
6703
|
play: function() {
|
|
6565
6704
|
},
|
|
@@ -6572,7 +6711,7 @@ function is() {
|
|
|
6572
6711
|
},
|
|
6573
6712
|
style: {}
|
|
6574
6713
|
};
|
|
6575
|
-
return
|
|
6714
|
+
return p;
|
|
6576
6715
|
}, v.HTMLVideoElement = function() {
|
|
6577
6716
|
}), typeof location == "undefined" && (v.location = {
|
|
6578
6717
|
protocol: "file:",
|
|
@@ -6604,100 +6743,100 @@ function is() {
|
|
|
6604
6743
|
});
|
|
6605
6744
|
var j = {};
|
|
6606
6745
|
typeof w != "undefined" ? j.AudioContext = w : typeof webkitAudioContext != "undefined" && (j.AudioContext = webkitAudioContext);
|
|
6607
|
-
function y(v,
|
|
6608
|
-
"srcObject" in
|
|
6746
|
+
function y(v, p) {
|
|
6747
|
+
"srcObject" in p ? p.srcObject = v : "mozSrcObject" in p ? p.mozSrcObject = v : p.srcObject = v;
|
|
6609
6748
|
}
|
|
6610
6749
|
this.startDrawingFrames = function() {
|
|
6611
6750
|
I();
|
|
6612
6751
|
};
|
|
6613
6752
|
function I() {
|
|
6614
6753
|
if (!E) {
|
|
6615
|
-
var v = c.length,
|
|
6754
|
+
var v = c.length, p = !1, B = [];
|
|
6616
6755
|
if (c.forEach(function(F) {
|
|
6617
|
-
F.stream || (F.stream = {}), F.stream.fullcanvas ?
|
|
6618
|
-
}),
|
|
6619
|
-
a.width =
|
|
6620
|
-
else if (
|
|
6621
|
-
a.width = v > 1 ?
|
|
6756
|
+
F.stream || (F.stream = {}), F.stream.fullcanvas ? p = F : B.push(F);
|
|
6757
|
+
}), p)
|
|
6758
|
+
a.width = p.stream.width, a.height = p.stream.height;
|
|
6759
|
+
else if (B.length) {
|
|
6760
|
+
a.width = v > 1 ? B[0].width * 2 : B[0].width;
|
|
6622
6761
|
var U = 1;
|
|
6623
|
-
(v === 3 || v === 4) && (U = 2), (v === 5 || v === 6) && (U = 3), (v === 7 || v === 8) && (U = 4), (v === 9 || v === 10) && (U = 5), a.height =
|
|
6762
|
+
(v === 3 || v === 4) && (U = 2), (v === 5 || v === 6) && (U = 3), (v === 7 || v === 8) && (U = 4), (v === 9 || v === 10) && (U = 5), a.height = B[0].height * U;
|
|
6624
6763
|
} else
|
|
6625
6764
|
a.width = u.width || 360, a.height = u.height || 240;
|
|
6626
|
-
|
|
6627
|
-
|
|
6765
|
+
p && p instanceof HTMLVideoElement && _(p), B.forEach(function(F, J) {
|
|
6766
|
+
_(F, J);
|
|
6628
6767
|
}), setTimeout(I, u.frameInterval);
|
|
6629
6768
|
}
|
|
6630
6769
|
}
|
|
6631
|
-
function
|
|
6770
|
+
function _(v, p) {
|
|
6632
6771
|
if (!E) {
|
|
6633
|
-
var
|
|
6634
|
-
|
|
6772
|
+
var B = 0, U = 0, F = v.width, J = v.height;
|
|
6773
|
+
p === 1 && (B = v.width), p === 2 && (U = v.height), p === 3 && (B = v.width, U = v.height), p === 4 && (U = v.height * 2), p === 5 && (B = v.width, U = v.height * 2), p === 6 && (U = v.height * 3), p === 7 && (B = v.width, U = v.height * 3), typeof v.stream.left != "undefined" && (B = v.stream.left), typeof v.stream.top != "undefined" && (U = v.stream.top), typeof v.stream.width != "undefined" && (F = v.stream.width), typeof v.stream.height != "undefined" && (J = v.stream.height), f.drawImage(v, B, U, F, J), typeof v.stream.onRender == "function" && v.stream.onRender(f, B, U, F, J, p);
|
|
6635
6774
|
}
|
|
6636
6775
|
}
|
|
6637
6776
|
function h() {
|
|
6638
6777
|
E = !1;
|
|
6639
|
-
var v = b(),
|
|
6640
|
-
return
|
|
6641
|
-
return
|
|
6642
|
-
}).forEach(function(
|
|
6643
|
-
v.addTrack(
|
|
6644
|
-
}), t.forEach(function(
|
|
6645
|
-
|
|
6778
|
+
var v = b(), p = P();
|
|
6779
|
+
return p && p.getTracks().filter(function(B) {
|
|
6780
|
+
return B.kind === "audio";
|
|
6781
|
+
}).forEach(function(B) {
|
|
6782
|
+
v.addTrack(B);
|
|
6783
|
+
}), t.forEach(function(B) {
|
|
6784
|
+
B.fullcanvas;
|
|
6646
6785
|
}), v;
|
|
6647
6786
|
}
|
|
6648
6787
|
function b() {
|
|
6649
6788
|
R();
|
|
6650
6789
|
var v;
|
|
6651
6790
|
"captureStream" in a ? v = a.captureStream() : "mozCaptureStream" in a ? v = a.mozCaptureStream() : u.disableLogs || console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");
|
|
6652
|
-
var
|
|
6653
|
-
return v.getTracks().filter(function(
|
|
6654
|
-
return
|
|
6655
|
-
}).forEach(function(
|
|
6656
|
-
|
|
6657
|
-
}), a.stream =
|
|
6791
|
+
var p = new C();
|
|
6792
|
+
return v.getTracks().filter(function(B) {
|
|
6793
|
+
return B.kind === "video";
|
|
6794
|
+
}).forEach(function(B) {
|
|
6795
|
+
p.addTrack(B);
|
|
6796
|
+
}), a.stream = p, p;
|
|
6658
6797
|
}
|
|
6659
6798
|
function P() {
|
|
6660
6799
|
j.AudioContextConstructor || (j.AudioContextConstructor = new j.AudioContext()), u.audioContext = j.AudioContextConstructor, u.audioSources = [], u.useGainNode === !0 && (u.gainNode = u.audioContext.createGain(), u.gainNode.connect(u.audioContext.destination), u.gainNode.gain.value = 0);
|
|
6661
6800
|
var v = 0;
|
|
6662
|
-
if (t.forEach(function(
|
|
6663
|
-
if (
|
|
6801
|
+
if (t.forEach(function(p) {
|
|
6802
|
+
if (p.getTracks().filter(function(U) {
|
|
6664
6803
|
return U.kind === "audio";
|
|
6665
6804
|
}).length) {
|
|
6666
6805
|
v++;
|
|
6667
|
-
var
|
|
6668
|
-
u.useGainNode === !0 &&
|
|
6806
|
+
var B = u.audioContext.createMediaStreamSource(p);
|
|
6807
|
+
u.useGainNode === !0 && B.connect(u.gainNode), u.audioSources.push(B);
|
|
6669
6808
|
}
|
|
6670
6809
|
}), !!v)
|
|
6671
|
-
return u.audioDestination = u.audioContext.createMediaStreamDestination(), u.audioSources.forEach(function(
|
|
6672
|
-
|
|
6810
|
+
return u.audioDestination = u.audioContext.createMediaStreamDestination(), u.audioSources.forEach(function(p) {
|
|
6811
|
+
p.connect(u.audioDestination);
|
|
6673
6812
|
}), u.audioDestination.stream;
|
|
6674
6813
|
}
|
|
6675
|
-
function
|
|
6676
|
-
var
|
|
6677
|
-
return y(v,
|
|
6814
|
+
function S(v) {
|
|
6815
|
+
var p = document.createElement("video");
|
|
6816
|
+
return y(v, p), p.className = o, p.muted = !0, p.volume = 0, p.width = v.width || u.width || 360, p.height = v.height || u.height || 240, p.play(), p;
|
|
6678
6817
|
}
|
|
6679
6818
|
this.appendStreams = function(v) {
|
|
6680
6819
|
if (!v)
|
|
6681
6820
|
throw "First parameter is required.";
|
|
6682
|
-
v instanceof Array || (v = [v]), v.forEach(function(
|
|
6683
|
-
var
|
|
6684
|
-
if (
|
|
6821
|
+
v instanceof Array || (v = [v]), v.forEach(function(p) {
|
|
6822
|
+
var B = new C();
|
|
6823
|
+
if (p.getTracks().filter(function(J) {
|
|
6685
6824
|
return J.kind === "video";
|
|
6686
6825
|
}).length) {
|
|
6687
|
-
var U =
|
|
6688
|
-
U.stream =
|
|
6826
|
+
var U = S(p);
|
|
6827
|
+
U.stream = p, c.push(U), B.addTrack(p.getTracks().filter(function(J) {
|
|
6689
6828
|
return J.kind === "video";
|
|
6690
6829
|
})[0]);
|
|
6691
6830
|
}
|
|
6692
|
-
if (
|
|
6831
|
+
if (p.getTracks().filter(function(J) {
|
|
6693
6832
|
return J.kind === "audio";
|
|
6694
6833
|
}).length) {
|
|
6695
|
-
var F = u.audioContext.createMediaStreamSource(
|
|
6696
|
-
u.audioDestination = u.audioContext.createMediaStreamDestination(), F.connect(u.audioDestination),
|
|
6834
|
+
var F = u.audioContext.createMediaStreamSource(p);
|
|
6835
|
+
u.audioDestination = u.audioContext.createMediaStreamDestination(), F.connect(u.audioDestination), B.addTrack(u.audioDestination.stream.getTracks().filter(function(J) {
|
|
6697
6836
|
return J.kind === "audio";
|
|
6698
6837
|
})[0]);
|
|
6699
6838
|
}
|
|
6700
|
-
t.push(
|
|
6839
|
+
t.push(B);
|
|
6701
6840
|
});
|
|
6702
6841
|
}, this.releaseStreams = function() {
|
|
6703
6842
|
c = [], E = !0, u.gainNode && (u.gainNode.disconnect(), u.gainNode = null), u.audioSources.length && (u.audioSources.forEach(function(v) {
|
|
@@ -6707,12 +6846,12 @@ function is() {
|
|
|
6707
6846
|
v && !(v instanceof Array) && (v = [v]), R(v);
|
|
6708
6847
|
};
|
|
6709
6848
|
function R(v) {
|
|
6710
|
-
c = [], v = v || t, v.forEach(function(
|
|
6711
|
-
if (
|
|
6849
|
+
c = [], v = v || t, v.forEach(function(p) {
|
|
6850
|
+
if (p.getTracks().filter(function(U) {
|
|
6712
6851
|
return U.kind === "video";
|
|
6713
6852
|
}).length) {
|
|
6714
|
-
var
|
|
6715
|
-
|
|
6853
|
+
var B = S(p);
|
|
6854
|
+
B.stream = p, c.push(B);
|
|
6716
6855
|
}
|
|
6717
6856
|
});
|
|
6718
6857
|
}
|
|
@@ -6926,7 +7065,7 @@ var gs = Object.defineProperty, ys = Object.defineProperties, ms = Object.getOwn
|
|
|
6926
7065
|
for (var t of Yi(e))
|
|
6927
7066
|
bs.call(e, t) && Zr(n, t, e[t]);
|
|
6928
7067
|
return n;
|
|
6929
|
-
},
|
|
7068
|
+
}, Ss = (n, e) => ys(n, ms(e)), Re = (n, e, t) => Zr(n, typeof e != "symbol" ? e + "" : e, t), pe = (n, e, t) => new Promise((o, l) => {
|
|
6930
7069
|
var c = (f) => {
|
|
6931
7070
|
try {
|
|
6932
7071
|
a(t.next(f));
|
|
@@ -6942,11 +7081,11 @@ var gs = Object.defineProperty, ys = Object.defineProperties, ms = Object.getOwn
|
|
|
6942
7081
|
}, a = (f) => f.done ? o(f.value) : Promise.resolve(f.value).then(c, E);
|
|
6943
7082
|
a((t = t.apply(n, e)).next());
|
|
6944
7083
|
});
|
|
6945
|
-
class
|
|
7084
|
+
class _s extends yo {
|
|
6946
7085
|
constructor(e, t = {}) {
|
|
6947
7086
|
if (super(we), Re(this, "config"), Re(this, "callbacks"), Re(this, "socket"), Re(this, "localParticipant", null), Re(this, "participants", /* @__PURE__ */ new Map()), Re(this, "recorder", null), Re(this, "iceServers", []), Re(this, "isInitialized", !1), Re(this, "listenersSetup", !1), Re(this, "roomId"), Re(this, "eventListeners", /* @__PURE__ */ new Map()), this.roomId = e.roomId, !this.roomId)
|
|
6948
7087
|
throw new Error("roomId must be provided in config");
|
|
6949
|
-
this.config =
|
|
7088
|
+
this.config = Ss(ws({
|
|
6950
7089
|
maxParticipants: 4,
|
|
6951
7090
|
debug: !1,
|
|
6952
7091
|
socketPath: "/apis/video-call",
|
|
@@ -6954,7 +7093,7 @@ class Ss extends yo {
|
|
|
6954
7093
|
}, e), {
|
|
6955
7094
|
roomId: this.roomId
|
|
6956
7095
|
// Ensure roomId is set
|
|
6957
|
-
}), this.callbacks = t, this.socket = new
|
|
7096
|
+
}), this.callbacks = t, this.socket = new Mo(
|
|
6958
7097
|
this.config.socketUrl,
|
|
6959
7098
|
this.config.token,
|
|
6960
7099
|
this.config.socketPath
|
|
@@ -6971,13 +7110,13 @@ class Ss extends yo {
|
|
|
6971
7110
|
* Initialize the PeersCaller and establish WebSocket connection
|
|
6972
7111
|
*/
|
|
6973
7112
|
initialize() {
|
|
6974
|
-
return
|
|
7113
|
+
return pe(this, null, function* () {
|
|
6975
7114
|
try {
|
|
6976
7115
|
if (console.log("[PeersCaller] Initializing..."), this.isInitialized) {
|
|
6977
7116
|
console.warn("[PeersCaller] Already initialized");
|
|
6978
7117
|
return;
|
|
6979
7118
|
}
|
|
6980
|
-
yield this.socket.connect(), this.setupSocketListeners(), yield this.initializeLocalParticipant(), this.isInitialized = !0, this.state.setCallStatus("idle"), console.log(
|
|
7119
|
+
yield this.socket.connect(), yield this.fetchIceServers(), this.setupSocketListeners(), yield this.initializeLocalParticipant(), this.isInitialized = !0, this.state.setCallStatus("idle"), console.log(
|
|
6981
7120
|
"[PeersCaller] Initialization completed successfully (ready to start/join call)"
|
|
6982
7121
|
);
|
|
6983
7122
|
} catch (e) {
|
|
@@ -6989,7 +7128,7 @@ class Ss extends yo {
|
|
|
6989
7128
|
* Start a new call
|
|
6990
7129
|
*/
|
|
6991
7130
|
startCall() {
|
|
6992
|
-
return
|
|
7131
|
+
return pe(this, arguments, function* (e = this.config.mediaConfig) {
|
|
6993
7132
|
var t, o;
|
|
6994
7133
|
try {
|
|
6995
7134
|
if (console.log("[PeersCaller] Starting call..."), this.isInitialized || (yield this.initialize()), this.localParticipant && !this.localParticipant.getCurrentStream()) {
|
|
@@ -7019,7 +7158,7 @@ class Ss extends yo {
|
|
|
7019
7158
|
* Join an existing call
|
|
7020
7159
|
*/
|
|
7021
7160
|
joinCall() {
|
|
7022
|
-
return
|
|
7161
|
+
return pe(this, arguments, function* (e = this.config.mediaConfig) {
|
|
7023
7162
|
try {
|
|
7024
7163
|
console.log("[PeersCaller] Joining call..."), this.isInitialized || (yield this.initialize());
|
|
7025
7164
|
const t = yield this.checkCallStatus();
|
|
@@ -7054,7 +7193,7 @@ class Ss extends yo {
|
|
|
7054
7193
|
* This sends a request to the server to end the call for all participants
|
|
7055
7194
|
*/
|
|
7056
7195
|
endCall() {
|
|
7057
|
-
return
|
|
7196
|
+
return pe(this, null, function* () {
|
|
7058
7197
|
try {
|
|
7059
7198
|
console.log("[PeersCaller] Ending call..."), this.recorder && this.state.isRecording && (yield this.stopRecording());
|
|
7060
7199
|
try {
|
|
@@ -7075,7 +7214,7 @@ class Ss extends yo {
|
|
|
7075
7214
|
* Leave the call gracefully (with server acknowledgement)
|
|
7076
7215
|
*/
|
|
7077
7216
|
leaveCall() {
|
|
7078
|
-
return
|
|
7217
|
+
return pe(this, null, function* () {
|
|
7079
7218
|
try {
|
|
7080
7219
|
console.log("[PeersCaller] Leaving call..."), console.log("[PeersCaller] Leaving call for room:", this.config.roomId);
|
|
7081
7220
|
const e = yield this.socket.leaveCall(this.config.roomId);
|
|
@@ -7106,7 +7245,7 @@ class Ss extends yo {
|
|
|
7106
7245
|
* Start screen sharing
|
|
7107
7246
|
*/
|
|
7108
7247
|
startScreenShare() {
|
|
7109
|
-
return
|
|
7248
|
+
return pe(this, null, function* () {
|
|
7110
7249
|
try {
|
|
7111
7250
|
if (!this.localParticipant)
|
|
7112
7251
|
throw new Error("Local participant not initialized");
|
|
@@ -7123,7 +7262,7 @@ class Ss extends yo {
|
|
|
7123
7262
|
* Stop screen sharing
|
|
7124
7263
|
*/
|
|
7125
7264
|
stopScreenShare() {
|
|
7126
|
-
return
|
|
7265
|
+
return pe(this, null, function* () {
|
|
7127
7266
|
try {
|
|
7128
7267
|
if (!this.localParticipant)
|
|
7129
7268
|
throw new Error("Local participant not initialized");
|
|
@@ -7137,7 +7276,7 @@ class Ss extends yo {
|
|
|
7137
7276
|
* Start recording the call
|
|
7138
7277
|
*/
|
|
7139
7278
|
startRecording(e, t) {
|
|
7140
|
-
return
|
|
7279
|
+
return pe(this, null, function* () {
|
|
7141
7280
|
var o;
|
|
7142
7281
|
try {
|
|
7143
7282
|
if (console.log("[PeersCaller] Starting recording..."), this.state.isRecording) {
|
|
@@ -7185,7 +7324,7 @@ class Ss extends yo {
|
|
|
7185
7324
|
* Stop recording
|
|
7186
7325
|
*/
|
|
7187
7326
|
stopRecording() {
|
|
7188
|
-
return
|
|
7327
|
+
return pe(this, null, function* () {
|
|
7189
7328
|
try {
|
|
7190
7329
|
if (console.log("[PeersCaller] Stopping recording..."), !this.recorder || !this.state.isRecording) {
|
|
7191
7330
|
console.warn("[PeersCaller] No active recording to stop");
|
|
@@ -7254,18 +7393,14 @@ class Ss extends yo {
|
|
|
7254
7393
|
* Initialize local participant
|
|
7255
7394
|
*/
|
|
7256
7395
|
initializeLocalParticipant() {
|
|
7257
|
-
return
|
|
7258
|
-
this.localParticipant = new
|
|
7396
|
+
return pe(this, null, function* () {
|
|
7397
|
+
this.localParticipant = new Gi(
|
|
7259
7398
|
this.config.userId,
|
|
7260
7399
|
{
|
|
7261
|
-
onStateChanged: () => {
|
|
7262
|
-
},
|
|
7263
7400
|
onSignal: (e, t, o) => {
|
|
7264
7401
|
this.forwardSignalToServer(e, t, o);
|
|
7265
7402
|
},
|
|
7266
|
-
onError: (e) =>
|
|
7267
|
-
this.handleError("UNKNOWN_ERROR", e.message);
|
|
7268
|
-
}
|
|
7403
|
+
onError: (e) => this.handleError("UNKNOWN_ERROR", e.message)
|
|
7269
7404
|
},
|
|
7270
7405
|
!0
|
|
7271
7406
|
// isLocalParticipant = true
|
|
@@ -7283,19 +7418,19 @@ class Ss extends yo {
|
|
|
7283
7418
|
return;
|
|
7284
7419
|
}
|
|
7285
7420
|
this.cleanupSocketListeners(), console.log("[PeersCaller] Setting up socket listeners...");
|
|
7286
|
-
const e = (
|
|
7287
|
-
this.handleParticipantJoined(
|
|
7421
|
+
const e = (_) => {
|
|
7422
|
+
this.handleParticipantJoined(_.userId);
|
|
7288
7423
|
};
|
|
7289
7424
|
this.socket.on("call.participant.joined", e), this.eventListeners.set(
|
|
7290
7425
|
"call.participant.joined",
|
|
7291
7426
|
e
|
|
7292
7427
|
);
|
|
7293
|
-
const t = (
|
|
7294
|
-
this.handleParticipantLeft(
|
|
7428
|
+
const t = (_) => {
|
|
7429
|
+
this.handleParticipantLeft(_.userId);
|
|
7295
7430
|
};
|
|
7296
7431
|
this.socket.on("call.participant.left", t), this.eventListeners.set("call.participant.left", t);
|
|
7297
|
-
const o = (
|
|
7298
|
-
|
|
7432
|
+
const o = (_) => {
|
|
7433
|
+
_.participants.forEach((h) => {
|
|
7299
7434
|
h !== this.config.userId && this.handleParticipantJoined(h);
|
|
7300
7435
|
});
|
|
7301
7436
|
};
|
|
@@ -7304,52 +7439,52 @@ class Ss extends yo {
|
|
|
7304
7439
|
this.state.setIsCalling(!1);
|
|
7305
7440
|
};
|
|
7306
7441
|
this.socket.on("call.left", l), this.eventListeners.set("call.left", l);
|
|
7307
|
-
const c = (
|
|
7442
|
+
const c = (_) => {
|
|
7308
7443
|
var h, b;
|
|
7309
|
-
console.error("[PeersCaller] Server error:",
|
|
7444
|
+
console.error("[PeersCaller] Server error:", _), (b = (h = this.callbacks).onError) == null || b.call(h, _.error, _.message);
|
|
7310
7445
|
};
|
|
7311
7446
|
this.socket.on("call.error", c), this.eventListeners.set("call.error", c);
|
|
7312
|
-
const E = (
|
|
7313
|
-
this.handleOffer(
|
|
7447
|
+
const E = (_) => {
|
|
7448
|
+
this.handleOffer(_.from, _.offer);
|
|
7314
7449
|
};
|
|
7315
7450
|
this.socket.on("call.offer", E), this.eventListeners.set("call.offer", E);
|
|
7316
|
-
const a = (
|
|
7317
|
-
this.handleAnswer(
|
|
7451
|
+
const a = (_) => {
|
|
7452
|
+
this.handleAnswer(_.from, _.answer);
|
|
7318
7453
|
};
|
|
7319
7454
|
this.socket.on("call.answer", a), this.eventListeners.set("call.answer", a);
|
|
7320
|
-
const f = (
|
|
7321
|
-
this.handleCandidate(
|
|
7455
|
+
const f = (_) => {
|
|
7456
|
+
this.handleCandidate(_.from, _.candidate);
|
|
7322
7457
|
};
|
|
7323
7458
|
this.socket.on("call.candidate", f), this.eventListeners.set("call.candidate", f);
|
|
7324
|
-
const u = (
|
|
7325
|
-
this.handleParticipantStateUpdate(
|
|
7459
|
+
const u = (_) => {
|
|
7460
|
+
this.handleParticipantStateUpdate(_.from, _.state);
|
|
7326
7461
|
};
|
|
7327
7462
|
this.socket.on("call.state", u), this.eventListeners.set("call.state", u);
|
|
7328
|
-
const w = (
|
|
7329
|
-
this.handleCallEnded(
|
|
7463
|
+
const w = (_) => {
|
|
7464
|
+
this.handleCallEnded(_);
|
|
7330
7465
|
};
|
|
7331
7466
|
this.socket.on("call.ended", w), this.eventListeners.set("call.ended", w);
|
|
7332
|
-
const A = (
|
|
7333
|
-
this.handleCallStatusChanged(
|
|
7467
|
+
const A = (_) => {
|
|
7468
|
+
this.handleCallStatusChanged(_);
|
|
7334
7469
|
};
|
|
7335
7470
|
this.socket.on("call.status.changed", A), this.eventListeners.set("call.status.changed", A);
|
|
7336
|
-
const C = (
|
|
7337
|
-
console.log("[PeersCaller] Recording started:",
|
|
7471
|
+
const C = (_) => {
|
|
7472
|
+
console.log("[PeersCaller] Recording started:", _.recordingId), this.state.setIsRecording(!0);
|
|
7338
7473
|
};
|
|
7339
7474
|
this.socket.on("call.recording.start", C), this.eventListeners.set("call.recording.start", C);
|
|
7340
|
-
const j = (
|
|
7341
|
-
console.log("[PeersCaller] Recording chunk received:",
|
|
7475
|
+
const j = (_) => {
|
|
7476
|
+
console.log("[PeersCaller] Recording chunk received:", _);
|
|
7342
7477
|
};
|
|
7343
7478
|
this.socket.on("call.recording.chunk.received", j), this.eventListeners.set(
|
|
7344
7479
|
"call.recording.chunk.received",
|
|
7345
7480
|
j
|
|
7346
7481
|
);
|
|
7347
|
-
const y = (
|
|
7348
|
-
console.log("[PeersCaller] Recording ended:",
|
|
7482
|
+
const y = (_) => {
|
|
7483
|
+
console.log("[PeersCaller] Recording ended:", _.recordingId), this.state.setIsRecording(!1);
|
|
7349
7484
|
};
|
|
7350
7485
|
this.socket.on("call.recording.end", y), this.eventListeners.set("call.recording.end", y);
|
|
7351
|
-
const I = (
|
|
7352
|
-
console.log("[PeersCaller] Transcript received:",
|
|
7486
|
+
const I = (_) => {
|
|
7487
|
+
console.log("[PeersCaller] Transcript received:", _);
|
|
7353
7488
|
};
|
|
7354
7489
|
this.socket.on("call.transcript", I), this.eventListeners.set("call.transcript", I), this.listenersSetup = !0, console.log("[PeersCaller] Socket listeners set up successfully");
|
|
7355
7490
|
}
|
|
@@ -7368,7 +7503,7 @@ class Ss extends yo {
|
|
|
7368
7503
|
* Handle participant joined
|
|
7369
7504
|
*/
|
|
7370
7505
|
handleParticipantJoined(e) {
|
|
7371
|
-
return
|
|
7506
|
+
return pe(this, null, function* () {
|
|
7372
7507
|
var t, o;
|
|
7373
7508
|
try {
|
|
7374
7509
|
if (e === this.config.userId || this.participants.has(e))
|
|
@@ -7378,7 +7513,7 @@ class Ss extends yo {
|
|
|
7378
7513
|
return;
|
|
7379
7514
|
}
|
|
7380
7515
|
console.log(`[PeersCaller] Participant ${e} joined`);
|
|
7381
|
-
const l = new
|
|
7516
|
+
const l = new Gi(
|
|
7382
7517
|
e,
|
|
7383
7518
|
{
|
|
7384
7519
|
onStreamReceived: (a, f) => {
|
|
@@ -7436,7 +7571,7 @@ class Ss extends yo {
|
|
|
7436
7571
|
* Check call status for the conversation
|
|
7437
7572
|
*/
|
|
7438
7573
|
checkCallStatus() {
|
|
7439
|
-
return
|
|
7574
|
+
return pe(this, null, function* () {
|
|
7440
7575
|
try {
|
|
7441
7576
|
if (console.log("[PeersCaller] Checking call status..."), !this.socket.isConnected())
|
|
7442
7577
|
throw new Error("Socket not connected");
|
|
@@ -7457,7 +7592,7 @@ class Ss extends yo {
|
|
|
7457
7592
|
* Handle WebRTC offer
|
|
7458
7593
|
*/
|
|
7459
7594
|
handleOffer(e, t) {
|
|
7460
|
-
return
|
|
7595
|
+
return pe(this, null, function* () {
|
|
7461
7596
|
try {
|
|
7462
7597
|
if (!this.localParticipant) {
|
|
7463
7598
|
console.warn(
|
|
@@ -7481,7 +7616,7 @@ class Ss extends yo {
|
|
|
7481
7616
|
* Handle WebRTC answer
|
|
7482
7617
|
*/
|
|
7483
7618
|
handleAnswer(e, t) {
|
|
7484
|
-
return
|
|
7619
|
+
return pe(this, null, function* () {
|
|
7485
7620
|
try {
|
|
7486
7621
|
if (!this.localParticipant) {
|
|
7487
7622
|
console.warn(
|
|
@@ -7505,7 +7640,7 @@ class Ss extends yo {
|
|
|
7505
7640
|
* Handle ICE candidate
|
|
7506
7641
|
*/
|
|
7507
7642
|
handleCandidate(e, t) {
|
|
7508
|
-
return
|
|
7643
|
+
return pe(this, null, function* () {
|
|
7509
7644
|
try {
|
|
7510
7645
|
if (!this.localParticipant) {
|
|
7511
7646
|
console.warn(
|
|
@@ -7548,7 +7683,7 @@ class Ss extends yo {
|
|
|
7548
7683
|
* Handle call ended notification from server
|
|
7549
7684
|
*/
|
|
7550
7685
|
handleCallEnded(e) {
|
|
7551
|
-
return
|
|
7686
|
+
return pe(this, null, function* () {
|
|
7552
7687
|
var t, o;
|
|
7553
7688
|
console.log(
|
|
7554
7689
|
`[PeersCaller] Call ended by ${e.endedBy}, reason: ${e.reason}`
|
|
@@ -7589,6 +7724,29 @@ class Ss extends yo {
|
|
|
7589
7724
|
var o, l;
|
|
7590
7725
|
console.error(`[PeersCaller] ${e}: ${t}`), this.state.setError(e, t), (l = (o = this.callbacks).onError) == null || l.call(o, e, t);
|
|
7591
7726
|
}
|
|
7727
|
+
/**
|
|
7728
|
+
* Fetch ICE servers from the backend
|
|
7729
|
+
*/
|
|
7730
|
+
fetchIceServers() {
|
|
7731
|
+
return pe(this, null, function* () {
|
|
7732
|
+
try {
|
|
7733
|
+
console.log("[PeersCaller] Fetching ICE servers from backend...");
|
|
7734
|
+
const e = yield this.socket.getIceServers(this.roomId);
|
|
7735
|
+
if (e.error) {
|
|
7736
|
+
console.warn(
|
|
7737
|
+
"[PeersCaller] Failed to fetch ICE servers from backend:",
|
|
7738
|
+
e.error
|
|
7739
|
+
), console.log("[PeersCaller] Using default ICE servers");
|
|
7740
|
+
return;
|
|
7741
|
+
}
|
|
7742
|
+
e.iceServers && e.iceServers.length > 0 ? this.iceServers = e.iceServers : console.log(
|
|
7743
|
+
"[PeersCaller] No ICE servers received from backend, using defaults"
|
|
7744
|
+
);
|
|
7745
|
+
} catch (e) {
|
|
7746
|
+
console.warn("[PeersCaller] Error fetching ICE servers:", e);
|
|
7747
|
+
}
|
|
7748
|
+
});
|
|
7749
|
+
}
|
|
7592
7750
|
/**
|
|
7593
7751
|
* Forward WebRTC signaling data to the server
|
|
7594
7752
|
*/
|
|
@@ -7611,8 +7769,16 @@ class Ss extends yo {
|
|
|
7611
7769
|
this.config.roomId
|
|
7612
7770
|
);
|
|
7613
7771
|
break;
|
|
7772
|
+
case "renegotiate":
|
|
7773
|
+
console.log(
|
|
7774
|
+
`[PeersCaller] Renegotiation signal from ${e} to ${t} - handled locally`
|
|
7775
|
+
);
|
|
7776
|
+
break;
|
|
7614
7777
|
default:
|
|
7615
|
-
console.warn(
|
|
7778
|
+
console.warn(
|
|
7779
|
+
`[PeersCaller] Unknown signal type: ${o.type} - this may indicate a new signal type that needs handling`
|
|
7780
|
+
), this.config.debug && console.log("[PeersCaller] Unknown signal data:", o);
|
|
7781
|
+
break;
|
|
7616
7782
|
}
|
|
7617
7783
|
} catch (l) {
|
|
7618
7784
|
console.error(
|
|
@@ -7622,7 +7788,7 @@ class Ss extends yo {
|
|
|
7622
7788
|
}
|
|
7623
7789
|
}
|
|
7624
7790
|
}
|
|
7625
|
-
var
|
|
7791
|
+
var Te = (n, e, t) => new Promise((o, l) => {
|
|
7626
7792
|
var c = (f) => {
|
|
7627
7793
|
try {
|
|
7628
7794
|
a(t.next(f));
|
|
@@ -7639,60 +7805,60 @@ var Ae = (n, e, t) => new Promise((o, l) => {
|
|
|
7639
7805
|
a((t = t.apply(n, e)).next());
|
|
7640
7806
|
});
|
|
7641
7807
|
function qs(n) {
|
|
7642
|
-
const [e, t] = Ne(null), [o, l] = Ne(!1), c = Io(!1), E = we
|
|
7643
|
-
we((
|
|
7644
|
-
), f = we((
|
|
7808
|
+
const [e, t] = Ne(null), [o, l] = Ne(!1), c = Io(!1), E = we((p) => p), a = Object.values(
|
|
7809
|
+
we((p) => p.participants)
|
|
7810
|
+
), f = we((p) => p.localParticipant), u = we((p) => p.callStatus === "connected"), w = we((p) => p.isRecording), A = we((p) => p.error), C = be(() => Te(null, null, function* () {
|
|
7645
7811
|
if (!(c.current || e))
|
|
7646
7812
|
try {
|
|
7647
7813
|
c.current = !0;
|
|
7648
|
-
const
|
|
7649
|
-
yield
|
|
7650
|
-
} catch (
|
|
7651
|
-
throw console.error("[useVideoCall] Failed to initialize:",
|
|
7814
|
+
const p = new _s(n, n.callbacks);
|
|
7815
|
+
yield p.initialize(), t(p), l(!0);
|
|
7816
|
+
} catch (p) {
|
|
7817
|
+
throw console.error("[useVideoCall] Failed to initialize:", p), c.current = !1, p;
|
|
7652
7818
|
}
|
|
7653
7819
|
}), [n, e]), j = be(
|
|
7654
|
-
(
|
|
7820
|
+
(p) => Te(null, null, function* () {
|
|
7655
7821
|
if (!e) {
|
|
7656
7822
|
yield C();
|
|
7657
7823
|
return;
|
|
7658
7824
|
}
|
|
7659
|
-
return e.startCall(
|
|
7825
|
+
return e.startCall(p);
|
|
7660
7826
|
}),
|
|
7661
7827
|
[e, C]
|
|
7662
7828
|
), y = be(
|
|
7663
|
-
(
|
|
7829
|
+
(p) => Te(null, null, function* () {
|
|
7664
7830
|
if (!e) {
|
|
7665
7831
|
yield C();
|
|
7666
7832
|
return;
|
|
7667
7833
|
}
|
|
7668
|
-
return e.joinCall(
|
|
7834
|
+
return e.joinCall(p);
|
|
7669
7835
|
}),
|
|
7670
7836
|
[e, C]
|
|
7671
7837
|
), I = be(() => {
|
|
7672
7838
|
e == null || e.endCall();
|
|
7673
|
-
}, [e]),
|
|
7674
|
-
(
|
|
7675
|
-
e == null || e.toggleAudio(
|
|
7839
|
+
}, [e]), _ = be(
|
|
7840
|
+
(p) => {
|
|
7841
|
+
e == null || e.toggleAudio(p);
|
|
7676
7842
|
},
|
|
7677
7843
|
[e]
|
|
7678
7844
|
), h = be(
|
|
7679
|
-
(
|
|
7680
|
-
e == null || e.toggleVideo(
|
|
7845
|
+
(p) => {
|
|
7846
|
+
e == null || e.toggleVideo(p);
|
|
7681
7847
|
},
|
|
7682
7848
|
[e]
|
|
7683
|
-
), b = be(() =>
|
|
7849
|
+
), b = be(() => Te(null, null, function* () {
|
|
7684
7850
|
if (!e) throw new Error("PeersCaller not initialized");
|
|
7685
7851
|
return e.startScreenShare();
|
|
7686
|
-
}), [e]), P = be(() =>
|
|
7852
|
+
}), [e]), P = be(() => Te(null, null, function* () {
|
|
7687
7853
|
if (!e) throw new Error("PeersCaller not initialized");
|
|
7688
7854
|
return e.stopScreenShare();
|
|
7689
|
-
}), [e]),
|
|
7690
|
-
(
|
|
7855
|
+
}), [e]), S = be(
|
|
7856
|
+
(p) => Te(null, null, function* () {
|
|
7691
7857
|
if (!e) throw new Error("PeersCaller not initialized");
|
|
7692
|
-
return e.startRecording(
|
|
7858
|
+
return e.startRecording(p);
|
|
7693
7859
|
}),
|
|
7694
7860
|
[e]
|
|
7695
|
-
), R = be(() =>
|
|
7861
|
+
), R = be(() => Te(null, null, function* () {
|
|
7696
7862
|
if (!e) throw new Error("PeersCaller not initialized");
|
|
7697
7863
|
return e.stopRecording();
|
|
7698
7864
|
}), [e]), v = be(() => {
|
|
@@ -7709,12 +7875,12 @@ function qs(n) {
|
|
|
7709
7875
|
joinCall: y,
|
|
7710
7876
|
endCall: I,
|
|
7711
7877
|
// Media controls
|
|
7712
|
-
toggleAudio:
|
|
7878
|
+
toggleAudio: _,
|
|
7713
7879
|
toggleVideo: h,
|
|
7714
7880
|
startScreenShare: b,
|
|
7715
7881
|
stopScreenShare: P,
|
|
7716
7882
|
// Recording
|
|
7717
|
-
startRecording:
|
|
7883
|
+
startRecording: S,
|
|
7718
7884
|
stopRecording: R,
|
|
7719
7885
|
// State
|
|
7720
7886
|
callState: E,
|
|
@@ -7766,8 +7932,8 @@ function Ws() {
|
|
|
7766
7932
|
hasError: !!n.error
|
|
7767
7933
|
};
|
|
7768
7934
|
}
|
|
7769
|
-
function
|
|
7770
|
-
const [n, e] = Ne({ videoDevices: [], audioDevices: [] }), [t, o] = Ne({ camera: null, microphone: null }), l = be(() =>
|
|
7935
|
+
function Vs() {
|
|
7936
|
+
const [n, e] = Ne({ videoDevices: [], audioDevices: [] }), [t, o] = Ne({ camera: null, microphone: null }), l = be(() => Te(null, null, function* () {
|
|
7771
7937
|
try {
|
|
7772
7938
|
const a = yield navigator.mediaDevices.enumerateDevices();
|
|
7773
7939
|
e({
|
|
@@ -7777,7 +7943,7 @@ function Gs() {
|
|
|
7777
7943
|
} catch (a) {
|
|
7778
7944
|
console.error("[useMediaDevices] Failed to get devices:", a);
|
|
7779
7945
|
}
|
|
7780
|
-
}), []), c = be(() =>
|
|
7946
|
+
}), []), c = be(() => Te(null, null, function* () {
|
|
7781
7947
|
try {
|
|
7782
7948
|
if ("permissions" in navigator) {
|
|
7783
7949
|
const a = yield navigator.permissions.query({
|
|
@@ -7793,7 +7959,7 @@ function Gs() {
|
|
|
7793
7959
|
} catch (a) {
|
|
7794
7960
|
console.error("[useMediaDevices] Failed to check permissions:", a);
|
|
7795
7961
|
}
|
|
7796
|
-
}), []), E = be(() =>
|
|
7962
|
+
}), []), E = be(() => Te(null, null, function* () {
|
|
7797
7963
|
try {
|
|
7798
7964
|
return (yield navigator.mediaDevices.getUserMedia({
|
|
7799
7965
|
video: !0,
|
|
@@ -7849,7 +8015,7 @@ function zs() {
|
|
|
7849
8015
|
unsupportedFeatures: Object.entries(n).filter(([, t]) => !t).map(([t]) => t)
|
|
7850
8016
|
};
|
|
7851
8017
|
}
|
|
7852
|
-
function
|
|
8018
|
+
function Gs(n = "") {
|
|
7853
8019
|
const e = Date.now().toString(36), t = Math.random().toString(36).substring(2, 8);
|
|
7854
8020
|
return n ? `${n}_${e}_${t}` : `${e}_${t}`;
|
|
7855
8021
|
}
|
|
@@ -7895,16 +8061,16 @@ function Qs() {
|
|
|
7895
8061
|
}
|
|
7896
8062
|
export {
|
|
7897
8063
|
No as CallMediaStream,
|
|
7898
|
-
|
|
8064
|
+
Gi as CallParticipant,
|
|
7899
8065
|
Na as CallPeerConnection,
|
|
7900
8066
|
ps as CallRecorder,
|
|
7901
|
-
|
|
7902
|
-
|
|
8067
|
+
Mo as CallSocket,
|
|
8068
|
+
_s as PeersCaller,
|
|
7903
8069
|
Us as canAcceptMoreParticipants,
|
|
7904
8070
|
Xs as checkWebRTCSupport,
|
|
7905
8071
|
Ks as formatError,
|
|
7906
8072
|
Ys as formatMediaConstraints,
|
|
7907
|
-
|
|
8073
|
+
Gs as generateId,
|
|
7908
8074
|
Hs as generatePeerId,
|
|
7909
8075
|
Qs as getDefaultIceServers,
|
|
7910
8076
|
Ja as getParticipant,
|
|
@@ -7914,10 +8080,10 @@ export {
|
|
|
7914
8080
|
Zs as isWebRTCSupported,
|
|
7915
8081
|
Os as selectCallStatus,
|
|
7916
8082
|
Ns as selectCallStatusError,
|
|
7917
|
-
|
|
8083
|
+
Bs as selectCallStatusInfo,
|
|
7918
8084
|
Ls as selectCallStatusLoading,
|
|
7919
8085
|
Ds as selectCanJoinCall,
|
|
7920
|
-
|
|
8086
|
+
Ms as selectError,
|
|
7921
8087
|
Fs as selectIsCallActive,
|
|
7922
8088
|
ks as selectIsConnected,
|
|
7923
8089
|
Is as selectLocalParticipant,
|
|
@@ -7926,7 +8092,7 @@ export {
|
|
|
7926
8092
|
zs as useBrowserSupport,
|
|
7927
8093
|
Ws as useCallState,
|
|
7928
8094
|
we as useCallStore,
|
|
7929
|
-
|
|
8095
|
+
Vs as useMediaDevices,
|
|
7930
8096
|
xs as useParticipantVideo,
|
|
7931
8097
|
qs as useVideoCall
|
|
7932
8098
|
};
|