pptx-svelte-viewer 1.3.0 → 2.0.0
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/CHANGELOG.md +446 -0
- package/README.md +175 -17
- package/dist/AiChatPanel-CssmoLYL.js +1110 -0
- package/dist/__vite-browser-external-DOmiXdGM.js +7 -0
- package/dist/{dist-JuzVOe21.js → dist-AHWCPEmj.js} +44997 -40276
- package/dist/export-DplwT6FC.js +96087 -0
- package/dist/i18n.d.ts +9 -7
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +6102 -4099
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -22
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/rolldown-runtime--_vEcKDh.js +29 -0
- package/dist/{translator-D4a_pxY4.js → translator-Ddi-liGk.js} +251 -7
- package/dist/viewer/ai/ai-bridge.d.ts +61 -0
- package/dist/viewer/ai/ai-bridge.d.ts.map +1 -0
- package/dist/viewer/ai/ai-history-persist.d.ts +13 -0
- package/dist/viewer/ai/ai-history-persist.d.ts.map +1 -0
- package/dist/viewer/ai/ai-log-export.d.ts +71 -0
- package/dist/viewer/ai/ai-log-export.d.ts.map +1 -0
- package/dist/viewer/ai/ai-panel-controller.svelte.d.ts +77 -0
- package/dist/viewer/ai/ai-panel-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/ai/chat.svelte.d.ts +43 -0
- package/dist/viewer/ai/chat.svelte.d.ts.map +1 -0
- package/dist/viewer/ai/focus-targets.d.ts +36 -0
- package/dist/viewer/ai/focus-targets.d.ts.map +1 -0
- package/dist/viewer/ai/index.d.ts +11 -0
- package/dist/viewer/ai/index.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-deps.d.ts +23 -0
- package/dist/viewer/collab/collaboration-deps.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-remote-sync.d.ts +13 -0
- package/dist/viewer/collab/collaboration-remote-sync.d.ts.map +1 -1
- package/dist/viewer/collab/collaboration.svelte.d.ts +9 -21
- package/dist/viewer/collab/collaboration.svelte.d.ts.map +1 -1
- package/dist/viewer/collab/components/props.d.ts +12 -0
- package/dist/viewer/collab/components/props.d.ts.map +1 -1
- package/dist/viewer/collab/components/remote-selection.d.ts +29 -0
- package/dist/viewer/collab/components/remote-selection.d.ts.map +1 -0
- package/dist/viewer/collab/components/share-helpers.d.ts +7 -28
- package/dist/viewer/collab/components/share-helpers.d.ts.map +1 -1
- package/dist/viewer/collab/index.d.ts +1 -1
- package/dist/viewer/collab/index.d.ts.map +1 -1
- package/dist/viewer/components/props.d.ts +72 -2
- package/dist/viewer/components/props.d.ts.map +1 -1
- package/dist/viewer/components/ribbon/anchored-popup.d.ts +21 -0
- package/dist/viewer/components/ribbon/anchored-popup.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/ribbon-types.d.ts +7 -0
- package/dist/viewer/components/ribbon/ribbon-types.d.ts.map +1 -1
- package/dist/viewer/components/typed-exports.d.ts +19 -0
- package/dist/viewer/components/typed-exports.d.ts.map +1 -0
- package/dist/viewer/editor/editor-controller-deps.d.ts +5 -0
- package/dist/viewer/editor/editor-controller-deps.d.ts.map +1 -1
- package/dist/viewer/editor/editor-slides-controller.d.ts +15 -0
- package/dist/viewer/editor/editor-slides-controller.d.ts.map +1 -1
- package/dist/viewer/editor/editor-state.svelte.d.ts +9 -0
- package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -1
- package/dist/viewer/export/export-ui.svelte.d.ts +5 -0
- package/dist/viewer/export/export-ui.svelte.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +7893 -5277
- package/dist/viewer/index.d.ts.map +1 -1
- package/dist/viewer/index.js +392 -14
- package/dist/viewer/presentation/animation-playback-helpers.d.ts +43 -0
- package/dist/viewer/presentation/animation-playback-helpers.d.ts.map +1 -0
- package/dist/viewer/presentation/animation-playback.svelte.d.ts +50 -40
- package/dist/viewer/presentation/animation-playback.svelte.d.ts.map +1 -1
- package/dist/viewer/presentation/animation-sound.d.ts +20 -0
- package/dist/viewer/presentation/animation-sound.d.ts.map +1 -0
- package/dist/viewer/presentation/apply-animation-styles.d.ts +6 -5
- package/dist/viewer/presentation/apply-animation-styles.d.ts.map +1 -1
- package/dist/viewer/presentation/index.d.ts +2 -1
- package/dist/viewer/presentation/index.d.ts.map +1 -1
- package/dist/viewer/presentation/keyframes.d.ts +9 -0
- package/dist/viewer/presentation/keyframes.d.ts.map +1 -1
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts +32 -10
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts.map +1 -1
- package/dist/viewer/presentation/presentation-effects.svelte.d.ts +6 -2
- package/dist/viewer/presentation/presentation-effects.svelte.d.ts.map +1 -1
- package/dist/viewer/presentation/presentation-triggers.d.ts +18 -0
- package/dist/viewer/presentation/presentation-triggers.d.ts.map +1 -0
- package/dist/viewer/presentation/transition-overlay.d.ts +23 -0
- package/dist/viewer/presentation/transition-overlay.d.ts.map +1 -0
- package/dist/viewer/render/smartart-view.d.ts +7 -2
- package/dist/viewer/render/smartart-view.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts +37 -0
- package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-editor-ui.svelte.d.ts +42 -0
- package/dist/viewer/state/create-viewer-state-editor-ui.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-export-notes.svelte.d.ts +36 -0
- package/dist/viewer/state/create-viewer-state-export-notes.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts +30 -0
- package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-types.d.ts +134 -0
- package/dist/viewer/state/create-viewer-state-types.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state.svelte.d.ts +30 -0
- package/dist/viewer/state/create-viewer-state.svelte.d.ts.map +1 -0
- package/dist/viewer/state/index.d.ts +2 -0
- package/dist/viewer/state/index.d.ts.map +1 -1
- package/dist/viewer/state/presentation-element-states-context.d.ts +37 -0
- package/dist/viewer/state/presentation-element-states-context.d.ts.map +1 -0
- package/dist/viewer/state/render-context.d.ts +3 -1
- package/dist/viewer/state/render-context.d.ts.map +1 -1
- package/dist/viewer/state/viewer-effects.svelte.d.ts +8 -0
- package/dist/viewer/state/viewer-effects.svelte.d.ts.map +1 -1
- package/dist/viewer/state/viewer-options-context.d.ts +10 -0
- package/dist/viewer/state/viewer-options-context.d.ts.map +1 -0
- package/dist/viewer/state/viewer-options-wiring.svelte.d.ts +31 -0
- package/dist/viewer/state/viewer-options-wiring.svelte.d.ts.map +1 -0
- package/dist/viewer/state/viewer-options.svelte.d.ts +55 -0
- package/dist/viewer/state/viewer-options.svelte.d.ts.map +1 -0
- package/dist/viewer/style/element-style.d.ts +3 -3
- package/dist/viewer/style/element-style.d.ts.map +1 -1
- package/dist/viewer/types.d.ts +16 -5
- package/dist/viewer/types.d.ts.map +1 -1
- package/dist/{y-webrtc-BdH40MC6.js → y-webrtc-BiViqyU2.js} +1079 -1101
- package/package.json +18 -5
- package/dist/export-D7pIn3W2.js +0 -38286
|
@@ -1,56 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (x && typeof x == "object" || typeof x == "function")
|
|
13
|
-
for (var F = Nt(x), R = 0, M = F.length, _; R < M; R++)
|
|
14
|
-
_ = F[R], !Mt.call(m, _) && _ !== j && Le(m, _, {
|
|
15
|
-
get: ((c) => x[c]).bind(null, _),
|
|
16
|
-
enumerable: !(U = xt(x, _)) || U.enumerable
|
|
17
|
-
});
|
|
18
|
-
return m;
|
|
19
|
-
}, jt = (m, x, j) => (j = m != null ? Lt(It(m)) : {}, Dt(x || !m || !m.__esModule ? Le(j, "default", {
|
|
20
|
-
value: m,
|
|
21
|
-
enumerable: !0
|
|
22
|
-
}) : j, m)), ke = /* @__PURE__ */ ((m) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(m, { get: (x, j) => (typeof require < "u" ? require : x)[j] }) : m)(function(m) {
|
|
23
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
24
|
-
throw Error('Calling `require` for "' + m + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
25
|
-
}), Bt = 1200, Ut = 2500, xe = 3e4, Be = (m) => {
|
|
26
|
-
if (m.shouldConnect && m.ws === null) {
|
|
27
|
-
const x = new WebSocket(m.url), j = m.binaryType;
|
|
28
|
-
let U = null;
|
|
29
|
-
j && (x.binaryType = j), m.ws = x, m.connecting = !0, m.connected = !1, x.onmessage = (M) => {
|
|
30
|
-
m.lastMessageReceived = Pe();
|
|
31
|
-
const _ = M.data, c = typeof _ == "string" ? JSON.parse(_) : _;
|
|
32
|
-
c && c.type === "pong" && (clearTimeout(U), U = setTimeout(R, xe / 2)), m.emit("message", [c, m]);
|
|
1
|
+
import { i as ot, r as ke, t as at } from "./rolldown-runtime--_vEcKDh.js";
|
|
2
|
+
import { a as ct, c as ut, d as ht, i as Ve, l as lt, n as ft, o as Ke, r as Oe, s as dt, t as pt, u as gt } from "./awareness-CkFlr7xx.js";
|
|
3
|
+
import { A as Re, B as yt, C as re, D as $e, E as bt, F as Me, I as mt, L as _t, M as wt, N as vt, O as je, P as Je, R as Et, S as De, T as ie, U as Pe, V as Ct, _ as Fe, a as Xe, b as Qe, i as ue, j as Ye, k as se, l as Rt, n as qe, o as Te, r as St, s as Ze, t as Tt, u as At, v as kt, x as Ot, y as Lt } from "./yjs-CE9F053g.js";
|
|
4
|
+
var xt = 1200, It = 2500, Le = 3e4, Be = (R) => {
|
|
5
|
+
if (R.shouldConnect && R.ws === null) {
|
|
6
|
+
const D = new WebSocket(R.url), U = R.binaryType;
|
|
7
|
+
let j = null;
|
|
8
|
+
U && (D.binaryType = U), R.ws = D, R.connecting = !0, R.connected = !1, D.onmessage = (N) => {
|
|
9
|
+
R.lastMessageReceived = Me();
|
|
10
|
+
const w = N.data, c = typeof w == "string" ? JSON.parse(w) : w;
|
|
11
|
+
c && c.type === "pong" && (clearTimeout(j), j = setTimeout(C, Le / 2)), R.emit("message", [c, R]);
|
|
33
12
|
};
|
|
34
|
-
const F = (
|
|
35
|
-
|
|
13
|
+
const F = (N) => {
|
|
14
|
+
R.ws !== null && (R.ws = null, R.connecting = !1, R.connected ? (R.connected = !1, R.emit("disconnect", [{
|
|
36
15
|
type: "disconnect",
|
|
37
|
-
error:
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
|
|
16
|
+
error: N
|
|
17
|
+
}, R])) : R.unsuccessfulReconnects++, setTimeout(Be, Et(_t(R.unsuccessfulReconnects + 1) * xt, It), R)), clearTimeout(j);
|
|
18
|
+
}, C = () => {
|
|
19
|
+
R.ws === D && R.send({ type: "ping" });
|
|
41
20
|
};
|
|
42
|
-
|
|
43
|
-
|
|
21
|
+
D.onclose = () => F(null), D.onerror = (N) => F(N), D.onopen = () => {
|
|
22
|
+
R.lastMessageReceived = Me(), R.connecting = !1, R.connected = !0, R.unsuccessfulReconnects = 0, R.emit("connect", [{ type: "connect" }, R]), j = setTimeout(C, Le / 2);
|
|
44
23
|
};
|
|
45
24
|
}
|
|
46
|
-
},
|
|
47
|
-
constructor(
|
|
48
|
-
super(), this.url =
|
|
49
|
-
this.connected &&
|
|
50
|
-
},
|
|
25
|
+
}, Nt = class extends yt {
|
|
26
|
+
constructor(R, { binaryType: D } = {}) {
|
|
27
|
+
super(), this.url = R, this.ws = null, this.binaryType = D || null, this.connected = !1, this.connecting = !1, this.unsuccessfulReconnects = 0, this.lastMessageReceived = 0, this.shouldConnect = !0, this._checkInterval = setInterval(() => {
|
|
28
|
+
this.connected && Le < Me() - this.lastMessageReceived && this.ws.close();
|
|
29
|
+
}, Le / 2), Be(this);
|
|
51
30
|
}
|
|
52
|
-
send(
|
|
53
|
-
this.ws && this.ws.send(JSON.stringify(
|
|
31
|
+
send(R) {
|
|
32
|
+
this.ws && this.ws.send(JSON.stringify(R));
|
|
54
33
|
}
|
|
55
34
|
destroy() {
|
|
56
35
|
clearInterval(this._checkInterval), this.disconnect(), super.destroy();
|
|
@@ -61,91 +40,91 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
61
40
|
connect() {
|
|
62
41
|
this.shouldConnect = !0, !this.connected && this.ws === null && Be(this);
|
|
63
42
|
}
|
|
64
|
-
},
|
|
65
|
-
let
|
|
66
|
-
return (
|
|
67
|
-
if (
|
|
68
|
-
|
|
43
|
+
}, Mt = () => {
|
|
44
|
+
let R = !0;
|
|
45
|
+
return (D, U) => {
|
|
46
|
+
if (R) {
|
|
47
|
+
R = !1;
|
|
69
48
|
try {
|
|
70
|
-
|
|
49
|
+
D();
|
|
71
50
|
} finally {
|
|
72
|
-
|
|
51
|
+
R = !0;
|
|
73
52
|
}
|
|
74
|
-
} else
|
|
53
|
+
} else U !== void 0 && U();
|
|
75
54
|
};
|
|
76
|
-
},
|
|
77
|
-
(function(
|
|
78
|
-
if (typeof
|
|
79
|
-
else if (typeof define == "function" && define.amd) define([],
|
|
55
|
+
}, Dt = /* @__PURE__ */ at(((R, D) => {
|
|
56
|
+
(function(U) {
|
|
57
|
+
if (typeof R == "object" && typeof D < "u") D.exports = U();
|
|
58
|
+
else if (typeof define == "function" && define.amd) define([], U);
|
|
80
59
|
else {
|
|
81
|
-
var
|
|
82
|
-
|
|
60
|
+
var j = typeof window > "u" ? typeof global > "u" ? typeof self > "u" ? this : self : global : window;
|
|
61
|
+
j.SimplePeer = U();
|
|
83
62
|
}
|
|
84
63
|
})(function() {
|
|
85
|
-
var
|
|
64
|
+
var U = Math.floor, j = Math.abs, F = Math.pow;
|
|
86
65
|
return (/* @__PURE__ */ (function() {
|
|
87
|
-
function
|
|
88
|
-
function S(
|
|
89
|
-
if (!
|
|
90
|
-
if (!
|
|
66
|
+
function C(N, w, c) {
|
|
67
|
+
function S(h, d) {
|
|
68
|
+
if (!w[h]) {
|
|
69
|
+
if (!N[h]) {
|
|
91
70
|
var a = typeof ke == "function" && ke;
|
|
92
|
-
if (!d && a) return a(
|
|
93
|
-
if (O) return O(
|
|
94
|
-
var g = /* @__PURE__ */ new Error("Cannot find module '" +
|
|
71
|
+
if (!d && a) return a(h, !0);
|
|
72
|
+
if (O) return O(h, !0);
|
|
73
|
+
var g = /* @__PURE__ */ new Error("Cannot find module '" + h + "'");
|
|
95
74
|
throw g.code = "MODULE_NOT_FOUND", g;
|
|
96
75
|
}
|
|
97
|
-
var L =
|
|
98
|
-
|
|
99
|
-
var b =
|
|
100
|
-
return S(b ||
|
|
101
|
-
}, L, L.exports,
|
|
76
|
+
var L = w[h] = { exports: {} };
|
|
77
|
+
N[h][0].call(L.exports, function(_) {
|
|
78
|
+
var b = N[h][1][_];
|
|
79
|
+
return S(b || _);
|
|
80
|
+
}, L, L.exports, C, N, w, c);
|
|
102
81
|
}
|
|
103
|
-
return
|
|
82
|
+
return w[h].exports;
|
|
104
83
|
}
|
|
105
84
|
for (var O = typeof ke == "function" && ke, i = 0; i < c.length; i++) S(c[i]);
|
|
106
85
|
return S;
|
|
107
86
|
}
|
|
108
|
-
return
|
|
87
|
+
return C;
|
|
109
88
|
})())({
|
|
110
|
-
1: [function(
|
|
89
|
+
1: [function(C, N, w) {
|
|
111
90
|
"use strict";
|
|
112
|
-
function c(
|
|
113
|
-
var y =
|
|
91
|
+
function c(l) {
|
|
92
|
+
var y = l.length;
|
|
114
93
|
if (0 < y % 4) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
115
|
-
var k =
|
|
94
|
+
var k = l.indexOf("=");
|
|
116
95
|
k === -1 && (k = y);
|
|
117
96
|
var f = k === y ? 0 : 4 - k % 4;
|
|
118
97
|
return [k, f];
|
|
119
98
|
}
|
|
120
|
-
function S(
|
|
99
|
+
function S(l, y, k) {
|
|
121
100
|
return 3 * (y + k) / 4 - k;
|
|
122
101
|
}
|
|
123
|
-
function O(
|
|
124
|
-
var y, k, f = c(
|
|
125
|
-
for (k = 0; k < I; k += 4) y = g[
|
|
126
|
-
return
|
|
102
|
+
function O(l) {
|
|
103
|
+
var y, k, f = c(l), T = f[0], M = f[1], p = new L(S(l, T, M)), m = 0, I = 0 < M ? T - 4 : T;
|
|
104
|
+
for (k = 0; k < I; k += 4) y = g[l.charCodeAt(k)] << 18 | g[l.charCodeAt(k + 1)] << 12 | g[l.charCodeAt(k + 2)] << 6 | g[l.charCodeAt(k + 3)], p[m++] = 255 & y >> 16, p[m++] = 255 & y >> 8, p[m++] = 255 & y;
|
|
105
|
+
return M === 2 && (y = g[l.charCodeAt(k)] << 2 | g[l.charCodeAt(k + 1)] >> 4, p[m++] = 255 & y), M === 1 && (y = g[l.charCodeAt(k)] << 10 | g[l.charCodeAt(k + 1)] << 4 | g[l.charCodeAt(k + 2)] >> 2, p[m++] = 255 & y >> 8, p[m++] = 255 & y), p;
|
|
127
106
|
}
|
|
128
|
-
function i(
|
|
129
|
-
return a[63 &
|
|
107
|
+
function i(l) {
|
|
108
|
+
return a[63 & l >> 18] + a[63 & l >> 12] + a[63 & l >> 6] + a[63 & l];
|
|
130
109
|
}
|
|
131
|
-
function l
|
|
132
|
-
for (var f, T = [],
|
|
110
|
+
function h(l, y, k) {
|
|
111
|
+
for (var f, T = [], M = y; M < k; M += 3) f = (16711680 & l[M] << 16) + (65280 & l[M + 1] << 8) + (255 & l[M + 2]), T.push(i(f));
|
|
133
112
|
return T.join("");
|
|
134
113
|
}
|
|
135
|
-
function d(
|
|
136
|
-
for (var y, k =
|
|
137
|
-
return f === 1 ? (y =
|
|
114
|
+
function d(l) {
|
|
115
|
+
for (var y, k = l.length, f = k % 3, T = [], M = 16383, p = 0, m = k - f; p < m; p += M) T.push(h(l, p, p + M > m ? m : p + M));
|
|
116
|
+
return f === 1 ? (y = l[k - 1], T.push(a[y >> 2] + a[63 & y << 4] + "==")) : f === 2 && (y = (l[k - 2] << 8) + l[k - 1], T.push(a[y >> 10] + a[63 & y >> 4] + a[63 & y << 2] + "=")), T.join("");
|
|
138
117
|
}
|
|
139
|
-
|
|
140
|
-
var y = c(
|
|
118
|
+
w.byteLength = function(l) {
|
|
119
|
+
var y = c(l), k = y[0], f = y[1];
|
|
141
120
|
return 3 * (k + f) / 4 - f;
|
|
142
|
-
},
|
|
143
|
-
for (var a = [], g = [], L = typeof Uint8Array > "u" ? Array : Uint8Array,
|
|
121
|
+
}, w.toByteArray = O, w.fromByteArray = d;
|
|
122
|
+
for (var a = [], g = [], L = typeof Uint8Array > "u" ? Array : Uint8Array, _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", b = 0, n = _.length; b < n; ++b) a[b] = _[b], g[_.charCodeAt(b)] = b;
|
|
144
123
|
g[45] = 62, g[95] = 63;
|
|
145
124
|
}, {}],
|
|
146
125
|
2: [function() {
|
|
147
126
|
}, {}],
|
|
148
|
-
3: [function(
|
|
127
|
+
3: [function(C, N, w) {
|
|
149
128
|
(function() {
|
|
150
129
|
(function() {
|
|
151
130
|
"use strict";
|
|
@@ -160,18 +139,18 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
160
139
|
if (typeof t == "string") throw new TypeError('The "string" argument must be of type string. Received type number');
|
|
161
140
|
return g(e);
|
|
162
141
|
}
|
|
163
|
-
return
|
|
142
|
+
return h(e, t, r);
|
|
164
143
|
}
|
|
165
|
-
function
|
|
144
|
+
function h(e, t, r) {
|
|
166
145
|
if (typeof e == "string") return L(e, t);
|
|
167
|
-
if (ArrayBuffer.isView(e)) return
|
|
146
|
+
if (ArrayBuffer.isView(e)) return _(e);
|
|
168
147
|
if (e == null) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
169
148
|
if (A(e, ArrayBuffer) || e && A(e.buffer, ArrayBuffer)) return b(e, t, r);
|
|
170
149
|
if (typeof e == "number") throw new TypeError('The "value" argument must not be of type number. Received type number');
|
|
171
150
|
var u = e.valueOf && e.valueOf();
|
|
172
151
|
if (u != null && u !== e) return i.from(u, t, r);
|
|
173
|
-
var
|
|
174
|
-
if (
|
|
152
|
+
var v = n(e);
|
|
153
|
+
if (v) return v;
|
|
175
154
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof e[Symbol.toPrimitive] == "function") return i.from(e[Symbol.toPrimitive]("string"), t, r);
|
|
176
155
|
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
177
156
|
}
|
|
@@ -183,15 +162,15 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
183
162
|
return d(e), 0 >= e || t === void 0 ? O(e) : typeof r == "string" ? O(e).fill(t, r) : O(e).fill(t);
|
|
184
163
|
}
|
|
185
164
|
function g(e) {
|
|
186
|
-
return d(e), O(0 > e ? 0 : 0 |
|
|
165
|
+
return d(e), O(0 > e ? 0 : 0 | l(e));
|
|
187
166
|
}
|
|
188
167
|
function L(e, t) {
|
|
189
168
|
if ((typeof t != "string" || t === "") && (t = "utf8"), !i.isEncoding(t)) throw new TypeError("Unknown encoding: " + t);
|
|
190
|
-
var r = 0 | y(e, t), u = O(r),
|
|
191
|
-
return
|
|
169
|
+
var r = 0 | y(e, t), u = O(r), v = u.write(e, t);
|
|
170
|
+
return v !== r && (u = u.slice(0, v)), u;
|
|
192
171
|
}
|
|
193
|
-
function
|
|
194
|
-
for (var t = 0 > e.length ? 0 : 0 |
|
|
172
|
+
function _(e) {
|
|
173
|
+
for (var t = 0 > e.length ? 0 : 0 | l(e.length), r = O(t), u = 0; u < t; u += 1) r[u] = 255 & e[u];
|
|
195
174
|
return r;
|
|
196
175
|
}
|
|
197
176
|
function b(e, t, r) {
|
|
@@ -202,12 +181,12 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
202
181
|
}
|
|
203
182
|
function n(e) {
|
|
204
183
|
if (i.isBuffer(e)) {
|
|
205
|
-
var t = 0 |
|
|
184
|
+
var t = 0 | l(e.length), r = O(t);
|
|
206
185
|
return r.length === 0 || e.copy(r, 0, 0, t), r;
|
|
207
186
|
}
|
|
208
|
-
return e.length === void 0 ? e.type === "Buffer" && Array.isArray(e.data) ?
|
|
187
|
+
return e.length === void 0 ? e.type === "Buffer" && Array.isArray(e.data) ? _(e.data) : void 0 : typeof e.length != "number" || P(e.length) ? O(0) : _(e);
|
|
209
188
|
}
|
|
210
|
-
function
|
|
189
|
+
function l(e) {
|
|
211
190
|
if (e >= 2147483647) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");
|
|
212
191
|
return 0 | e;
|
|
213
192
|
}
|
|
@@ -217,7 +196,7 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
217
196
|
if (typeof e != "string") throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e);
|
|
218
197
|
var r = e.length, u = 2 < arguments.length && arguments[2] === !0;
|
|
219
198
|
if (!u && r === 0) return 0;
|
|
220
|
-
for (var
|
|
199
|
+
for (var v = !1; ; ) switch (t) {
|
|
221
200
|
case "ascii":
|
|
222
201
|
case "latin1":
|
|
223
202
|
case "binary":
|
|
@@ -233,10 +212,10 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
233
212
|
case "hex":
|
|
234
213
|
return r >>> 1;
|
|
235
214
|
case "base64":
|
|
236
|
-
return
|
|
215
|
+
return he(e).length;
|
|
237
216
|
default:
|
|
238
|
-
if (
|
|
239
|
-
t = ("" + t).toLowerCase(),
|
|
217
|
+
if (v) return u ? -1 : _e(e).length;
|
|
218
|
+
t = ("" + t).toLowerCase(), v = !0;
|
|
240
219
|
}
|
|
241
220
|
}
|
|
242
221
|
function k(e, t, r) {
|
|
@@ -269,20 +248,20 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
269
248
|
var u = e[t];
|
|
270
249
|
e[t] = e[r], e[r] = u;
|
|
271
250
|
}
|
|
272
|
-
function T(e, t, r, u,
|
|
251
|
+
function T(e, t, r, u, v) {
|
|
273
252
|
if (e.length === 0) return -1;
|
|
274
|
-
if (typeof r == "string" ? (u = r, r = 0) : 2147483647 < r ? r = 2147483647 : -2147483648 > r && (r = -2147483648), r = +r,
|
|
275
|
-
if (
|
|
253
|
+
if (typeof r == "string" ? (u = r, r = 0) : 2147483647 < r ? r = 2147483647 : -2147483648 > r && (r = -2147483648), r = +r, P(r) && (r = v ? 0 : e.length - 1), 0 > r && (r = e.length + r), r >= e.length) {
|
|
254
|
+
if (v) return -1;
|
|
276
255
|
r = e.length - 1;
|
|
277
|
-
} else if (0 > r) if (
|
|
256
|
+
} else if (0 > r) if (v) r = 0;
|
|
278
257
|
else return -1;
|
|
279
|
-
if (typeof t == "string" && (t = i.from(t, u)), i.isBuffer(t)) return t.length === 0 ? -1 :
|
|
280
|
-
if (typeof t == "number") return t &= 255, typeof Uint8Array.prototype.indexOf == "function" ?
|
|
258
|
+
if (typeof t == "string" && (t = i.from(t, u)), i.isBuffer(t)) return t.length === 0 ? -1 : M(e, t, r, u, v);
|
|
259
|
+
if (typeof t == "number") return t &= 255, typeof Uint8Array.prototype.indexOf == "function" ? v ? Uint8Array.prototype.indexOf.call(e, t, r) : Uint8Array.prototype.lastIndexOf.call(e, t, r) : M(e, [t], r, u, v);
|
|
281
260
|
throw new TypeError("val must be string, number or Buffer");
|
|
282
261
|
}
|
|
283
|
-
function
|
|
284
|
-
function
|
|
285
|
-
return q === 1 ?
|
|
262
|
+
function M(e, t, r, u, v) {
|
|
263
|
+
function x(le, fe) {
|
|
264
|
+
return q === 1 ? le[fe] : le.readUInt16BE(fe * q);
|
|
286
265
|
}
|
|
287
266
|
var q = 1, G = e.length, $ = t.length;
|
|
288
267
|
if (u !== void 0 && (u = (u + "").toLowerCase(), u === "ucs2" || u === "ucs-2" || u === "utf16le" || u === "utf-16le")) {
|
|
@@ -290,12 +269,12 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
290
269
|
q = 2, G /= 2, $ /= 2, r /= 2;
|
|
291
270
|
}
|
|
292
271
|
var Y;
|
|
293
|
-
if (
|
|
272
|
+
if (v) {
|
|
294
273
|
var X = -1;
|
|
295
|
-
for (Y = r; Y < G; Y++) if (
|
|
274
|
+
for (Y = r; Y < G; Y++) if (x(e, Y) !== x(t, X === -1 ? 0 : Y - X)) X !== -1 && (Y -= Y - X), X = -1;
|
|
296
275
|
else if (X === -1 && (X = Y), Y - X + 1 === $) return X * q;
|
|
297
276
|
} else for (r + $ > G && (r = G - $), Y = r; 0 <= Y; Y--) {
|
|
298
|
-
for (var ee = !0,
|
|
277
|
+
for (var ee = !0, we = 0; we < $; we++) if (x(e, Y + we) !== x(t, we)) {
|
|
299
278
|
ee = !1;
|
|
300
279
|
break;
|
|
301
280
|
}
|
|
@@ -305,43 +284,43 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
305
284
|
}
|
|
306
285
|
function p(e, t, r, u) {
|
|
307
286
|
r = +r || 0;
|
|
308
|
-
var
|
|
309
|
-
u ? (u = +u, u >
|
|
310
|
-
var
|
|
311
|
-
u >
|
|
287
|
+
var v = e.length - r;
|
|
288
|
+
u ? (u = +u, u > v && (u = v)) : u = v;
|
|
289
|
+
var x = t.length;
|
|
290
|
+
u > x / 2 && (u = x / 2);
|
|
312
291
|
for (var q, G = 0; G < u; ++G) {
|
|
313
|
-
if (q = parseInt(t.substr(2 * G, 2), 16),
|
|
292
|
+
if (q = parseInt(t.substr(2 * G, 2), 16), P(q)) return G;
|
|
314
293
|
e[r + G] = q;
|
|
315
294
|
}
|
|
316
295
|
return G;
|
|
317
296
|
}
|
|
318
|
-
function
|
|
319
|
-
return
|
|
297
|
+
function m(e, t, r, u) {
|
|
298
|
+
return E(_e(t, e.length - r), e, r, u);
|
|
320
299
|
}
|
|
321
300
|
function I(e, t, r, u) {
|
|
322
|
-
return
|
|
301
|
+
return E(ye(t), e, r, u);
|
|
323
302
|
}
|
|
324
303
|
function B(e, t, r, u) {
|
|
325
304
|
return I(e, t, r, u);
|
|
326
305
|
}
|
|
327
306
|
function V(e, t, r, u) {
|
|
328
|
-
return
|
|
307
|
+
return E(he(t), e, r, u);
|
|
329
308
|
}
|
|
330
309
|
function z(e, t, r, u) {
|
|
331
|
-
return
|
|
310
|
+
return E(ce(t, e.length - r), e, r, u);
|
|
332
311
|
}
|
|
333
312
|
function K(e, t, r) {
|
|
334
313
|
return t === 0 && r === e.length ? W.fromByteArray(e) : W.fromByteArray(e.slice(t, r));
|
|
335
314
|
}
|
|
336
315
|
function Z(e, t, r) {
|
|
337
316
|
r = S(e.length, r);
|
|
338
|
-
for (var u = [],
|
|
339
|
-
var
|
|
340
|
-
if (
|
|
317
|
+
for (var u = [], v = t; v < r; ) {
|
|
318
|
+
var x = e[v], q = null, G = 239 < x ? 4 : 223 < x ? 3 : 191 < x ? 2 : 1;
|
|
319
|
+
if (v + G <= r) {
|
|
341
320
|
var $, Y, X, ee;
|
|
342
|
-
G === 1 ? 128 >
|
|
321
|
+
G === 1 ? 128 > x && (q = x) : G === 2 ? ($ = e[v + 1], (192 & $) == 128 && (ee = (31 & x) << 6 | 63 & $, 127 < ee && (q = ee))) : G === 3 ? ($ = e[v + 1], Y = e[v + 2], (192 & $) == 128 && (192 & Y) == 128 && (ee = (15 & x) << 12 | (63 & $) << 6 | 63 & Y, 2047 < ee && (55296 > ee || 57343 < ee) && (q = ee))) : G === 4 && ($ = e[v + 1], Y = e[v + 2], X = e[v + 3], (192 & $) == 128 && (192 & Y) == 128 && (192 & X) == 128 && (ee = (15 & x) << 18 | (63 & $) << 12 | (63 & Y) << 6 | 63 & X, 65535 < ee && 1114112 > ee && (q = ee)));
|
|
343
322
|
}
|
|
344
|
-
q === null ? (q = 65533, G = 1) : 65535 < q && (q -= 65536, u.push(55296 | 1023 & q >>> 10), q = 56320 | 1023 & q), u.push(q),
|
|
323
|
+
q === null ? (q = 65533, G = 1) : 65535 < q && (q -= 65536, u.push(55296 | 1023 & q >>> 10), q = 56320 | 1023 & q), u.push(q), v += G;
|
|
345
324
|
}
|
|
346
325
|
return te(u);
|
|
347
326
|
}
|
|
@@ -354,43 +333,43 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
354
333
|
function H(e, t, r) {
|
|
355
334
|
var u = "";
|
|
356
335
|
r = S(e.length, r);
|
|
357
|
-
for (var
|
|
336
|
+
for (var v = t; v < r; ++v) u += c(127 & e[v]);
|
|
358
337
|
return u;
|
|
359
338
|
}
|
|
360
339
|
function Ee(e, t, r) {
|
|
361
340
|
var u = "";
|
|
362
341
|
r = S(e.length, r);
|
|
363
|
-
for (var
|
|
342
|
+
for (var v = t; v < r; ++v) u += c(e[v]);
|
|
364
343
|
return u;
|
|
365
344
|
}
|
|
366
345
|
function oe(e, t, r) {
|
|
367
346
|
var u = e.length;
|
|
368
347
|
(!t || 0 > t) && (t = 0), (!r || 0 > r || r > u) && (r = u);
|
|
369
|
-
for (var
|
|
370
|
-
return
|
|
348
|
+
for (var v = "", x = t; x < r; ++x) v += me(e[x]);
|
|
349
|
+
return v;
|
|
371
350
|
}
|
|
372
351
|
function de(e, t, r) {
|
|
373
|
-
for (var u = e.slice(t, r),
|
|
374
|
-
return
|
|
352
|
+
for (var u = e.slice(t, r), v = "", x = 0; x < u.length; x += 2) v += c(u[x] + 256 * u[x + 1]);
|
|
353
|
+
return v;
|
|
375
354
|
}
|
|
376
355
|
function J(e, t, r) {
|
|
377
356
|
if (e % 1 != 0 || 0 > e) throw new RangeError("offset is not uint");
|
|
378
357
|
if (e + t > r) throw new RangeError("Trying to access beyond buffer length");
|
|
379
358
|
}
|
|
380
|
-
function Q(e, t, r, u,
|
|
359
|
+
function Q(e, t, r, u, v, x) {
|
|
381
360
|
if (!i.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
382
|
-
if (t >
|
|
361
|
+
if (t > v || t < x) throw new RangeError('"value" argument is out of bounds');
|
|
383
362
|
if (r + u > e.length) throw new RangeError("Index out of range");
|
|
384
363
|
}
|
|
385
364
|
function ae(e, t, r, u) {
|
|
386
365
|
if (r + u > e.length) throw new RangeError("Index out of range");
|
|
387
366
|
if (0 > r) throw new RangeError("Index out of range");
|
|
388
367
|
}
|
|
389
|
-
function pe(e, t, r, u,
|
|
390
|
-
return t = +t, r >>>= 0,
|
|
368
|
+
function pe(e, t, r, u, v) {
|
|
369
|
+
return t = +t, r >>>= 0, v || ae(e, t, r, 4, 34028234663852886e22, -34028234663852886e22), s.write(e, t, r, u, 23, 4), r + 4;
|
|
391
370
|
}
|
|
392
|
-
function ge(e, t, r, u,
|
|
393
|
-
return t = +t, r >>>= 0,
|
|
371
|
+
function ge(e, t, r, u, v) {
|
|
372
|
+
return t = +t, r >>>= 0, v || ae(e, t, r, 8, 17976931348623157e292, -17976931348623157e292), s.write(e, t, r, u, 52, 8), r + 8;
|
|
394
373
|
}
|
|
395
374
|
function Se(e) {
|
|
396
375
|
if (e = e.split("=")[0], e = e.trim().replace(o, ""), 2 > e.length) return "";
|
|
@@ -402,66 +381,66 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
402
381
|
}
|
|
403
382
|
function _e(e, t) {
|
|
404
383
|
t = t || 1 / 0;
|
|
405
|
-
for (var r, u = e.length,
|
|
384
|
+
for (var r, u = e.length, v = null, x = [], q = 0; q < u; ++q) {
|
|
406
385
|
if (r = e.charCodeAt(q), 55295 < r && 57344 > r) {
|
|
407
|
-
if (!
|
|
386
|
+
if (!v) {
|
|
408
387
|
if (56319 < r) {
|
|
409
|
-
-1 < (t -= 3) &&
|
|
388
|
+
-1 < (t -= 3) && x.push(239, 191, 189);
|
|
410
389
|
continue;
|
|
411
390
|
} else if (q + 1 === u) {
|
|
412
|
-
-1 < (t -= 3) &&
|
|
391
|
+
-1 < (t -= 3) && x.push(239, 191, 189);
|
|
413
392
|
continue;
|
|
414
393
|
}
|
|
415
|
-
|
|
394
|
+
v = r;
|
|
416
395
|
continue;
|
|
417
396
|
}
|
|
418
397
|
if (56320 > r) {
|
|
419
|
-
-1 < (t -= 3) &&
|
|
398
|
+
-1 < (t -= 3) && x.push(239, 191, 189), v = r;
|
|
420
399
|
continue;
|
|
421
400
|
}
|
|
422
|
-
r = (
|
|
423
|
-
} else
|
|
424
|
-
if (
|
|
401
|
+
r = (v - 55296 << 10 | r - 56320) + 65536;
|
|
402
|
+
} else v && -1 < (t -= 3) && x.push(239, 191, 189);
|
|
403
|
+
if (v = null, 128 > r) {
|
|
425
404
|
if (0 > (t -= 1)) break;
|
|
426
|
-
|
|
405
|
+
x.push(r);
|
|
427
406
|
} else if (2048 > r) {
|
|
428
407
|
if (0 > (t -= 2)) break;
|
|
429
|
-
|
|
408
|
+
x.push(192 | r >> 6, 128 | 63 & r);
|
|
430
409
|
} else if (65536 > r) {
|
|
431
410
|
if (0 > (t -= 3)) break;
|
|
432
|
-
|
|
411
|
+
x.push(224 | r >> 12, 128 | 63 & r >> 6, 128 | 63 & r);
|
|
433
412
|
} else if (1114112 > r) {
|
|
434
413
|
if (0 > (t -= 4)) break;
|
|
435
|
-
|
|
414
|
+
x.push(240 | r >> 18, 128 | 63 & r >> 12, 128 | 63 & r >> 6, 128 | 63 & r);
|
|
436
415
|
} else throw new Error("Invalid code point");
|
|
437
416
|
}
|
|
438
|
-
return
|
|
417
|
+
return x;
|
|
439
418
|
}
|
|
440
419
|
function ye(e) {
|
|
441
420
|
for (var t = [], r = 0; r < e.length; ++r) t.push(255 & e.charCodeAt(r));
|
|
442
421
|
return t;
|
|
443
422
|
}
|
|
444
423
|
function ce(e, t) {
|
|
445
|
-
for (var r, u,
|
|
446
|
-
return
|
|
424
|
+
for (var r, u, v, x = [], q = 0; q < e.length && !(0 > (t -= 2)); ++q) r = e.charCodeAt(q), u = r >> 8, v = r % 256, x.push(v), x.push(u);
|
|
425
|
+
return x;
|
|
447
426
|
}
|
|
448
|
-
function
|
|
427
|
+
function he(e) {
|
|
449
428
|
return W.toByteArray(Se(e));
|
|
450
429
|
}
|
|
451
|
-
function
|
|
452
|
-
for (var
|
|
453
|
-
return
|
|
430
|
+
function E(e, t, r, u) {
|
|
431
|
+
for (var v = 0; v < u && !(v + r >= t.length || v >= e.length); ++v) t[v + r] = e[v];
|
|
432
|
+
return v;
|
|
454
433
|
}
|
|
455
434
|
function A(e, t) {
|
|
456
435
|
return e instanceof t || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name;
|
|
457
436
|
}
|
|
458
|
-
function
|
|
437
|
+
function P(e) {
|
|
459
438
|
return e !== e;
|
|
460
439
|
}
|
|
461
|
-
var W =
|
|
462
|
-
|
|
440
|
+
var W = C("base64-js"), s = C("ieee754");
|
|
441
|
+
w.Buffer = i, w.SlowBuffer = function(e) {
|
|
463
442
|
return +e != e && (e = 0), i.alloc(+e);
|
|
464
|
-
},
|
|
443
|
+
}, w.INSPECT_MAX_BYTES = 50, w.kMaxLength = 2147483647, i.TYPED_ARRAY_SUPPORT = (function() {
|
|
465
444
|
try {
|
|
466
445
|
var e = /* @__PURE__ */ new Uint8Array(1);
|
|
467
446
|
return e.__proto__ = {
|
|
@@ -489,7 +468,7 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
489
468
|
enumerable: !1,
|
|
490
469
|
writable: !1
|
|
491
470
|
}), i.poolSize = 8192, i.from = function(e, t, r) {
|
|
492
|
-
return
|
|
471
|
+
return h(e, t, r);
|
|
493
472
|
}, i.prototype.__proto__ = Uint8Array.prototype, i.__proto__ = Uint8Array, i.alloc = function(e, t, r) {
|
|
494
473
|
return a(e, t, r);
|
|
495
474
|
}, i.allocUnsafe = function(e) {
|
|
@@ -501,8 +480,8 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
501
480
|
}, i.compare = function(e, t) {
|
|
502
481
|
if (A(e, Uint8Array) && (e = i.from(e, e.offset, e.byteLength)), A(t, Uint8Array) && (t = i.from(t, t.offset, t.byteLength)), !i.isBuffer(e) || !i.isBuffer(t)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
|
|
503
482
|
if (e === t) return 0;
|
|
504
|
-
for (var r = e.length, u = t.length,
|
|
505
|
-
r = e[
|
|
483
|
+
for (var r = e.length, u = t.length, v = 0, x = S(r, u); v < x; ++v) if (e[v] !== t[v]) {
|
|
484
|
+
r = e[v], u = t[v];
|
|
506
485
|
break;
|
|
507
486
|
}
|
|
508
487
|
return r < u ? -1 : u < r ? 1 : 0;
|
|
@@ -528,11 +507,11 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
528
507
|
if (e.length === 0) return i.alloc(0);
|
|
529
508
|
var r;
|
|
530
509
|
if (t === void 0) for (t = 0, r = 0; r < e.length; ++r) t += e[r].length;
|
|
531
|
-
var u = i.allocUnsafe(t),
|
|
510
|
+
var u = i.allocUnsafe(t), v = 0;
|
|
532
511
|
for (r = 0; r < e.length; ++r) {
|
|
533
|
-
var
|
|
534
|
-
if (A(
|
|
535
|
-
|
|
512
|
+
var x = e[r];
|
|
513
|
+
if (A(x, Uint8Array) && (x = i.from(x)), !i.isBuffer(x)) throw new TypeError('"list" argument must be an Array of Buffers');
|
|
514
|
+
x.copy(u, v), v += x.length;
|
|
536
515
|
}
|
|
537
516
|
return u;
|
|
538
517
|
}, i.byteLength = y, i.prototype._isBuffer = !0, i.prototype.swap16 = function() {
|
|
@@ -557,20 +536,20 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
557
536
|
if (!i.isBuffer(e)) throw new TypeError("Argument must be a Buffer");
|
|
558
537
|
return this === e || i.compare(this, e) === 0;
|
|
559
538
|
}, i.prototype.inspect = function() {
|
|
560
|
-
var e = "", t =
|
|
539
|
+
var e = "", t = w.INSPECT_MAX_BYTES;
|
|
561
540
|
return e = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (e += " ... "), "<Buffer " + e + ">";
|
|
562
|
-
}, i.prototype.compare = function(e, t, r, u,
|
|
541
|
+
}, i.prototype.compare = function(e, t, r, u, v) {
|
|
563
542
|
if (A(e, Uint8Array) && (e = i.from(e, e.offset, e.byteLength)), !i.isBuffer(e)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e);
|
|
564
|
-
if (t === void 0 && (t = 0), r === void 0 && (r = e ? e.length : 0), u === void 0 && (u = 0),
|
|
565
|
-
if (u >=
|
|
566
|
-
if (u >=
|
|
543
|
+
if (t === void 0 && (t = 0), r === void 0 && (r = e ? e.length : 0), u === void 0 && (u = 0), v === void 0 && (v = this.length), 0 > t || r > e.length || 0 > u || v > this.length) throw new RangeError("out of range index");
|
|
544
|
+
if (u >= v && t >= r) return 0;
|
|
545
|
+
if (u >= v) return -1;
|
|
567
546
|
if (t >= r) return 1;
|
|
568
|
-
if (t >>>= 0, r >>>= 0, u >>>= 0,
|
|
569
|
-
for (var
|
|
570
|
-
|
|
547
|
+
if (t >>>= 0, r >>>= 0, u >>>= 0, v >>>= 0, this === e) return 0;
|
|
548
|
+
for (var x = v - u, q = r - t, G = S(x, q), $ = this.slice(u, v), Y = e.slice(t, r), X = 0; X < G; ++X) if ($[X] !== Y[X]) {
|
|
549
|
+
x = $[X], q = Y[X];
|
|
571
550
|
break;
|
|
572
551
|
}
|
|
573
|
-
return
|
|
552
|
+
return x < q ? -1 : q < x ? 1 : 0;
|
|
574
553
|
}, i.prototype.includes = function(e, t, r) {
|
|
575
554
|
return this.indexOf(e, t, r) !== -1;
|
|
576
555
|
}, i.prototype.indexOf = function(e, t, r) {
|
|
@@ -582,15 +561,15 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
582
561
|
else if (r === void 0 && typeof t == "string") u = t, r = this.length, t = 0;
|
|
583
562
|
else if (isFinite(t)) t >>>= 0, isFinite(r) ? (r >>>= 0, u === void 0 && (u = "utf8")) : (u = r, r = void 0);
|
|
584
563
|
else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
|
|
585
|
-
var
|
|
586
|
-
if ((r === void 0 || r >
|
|
564
|
+
var v = this.length - t;
|
|
565
|
+
if ((r === void 0 || r > v) && (r = v), 0 < e.length && (0 > r || 0 > t) || t > this.length) throw new RangeError("Attempt to write outside buffer bounds");
|
|
587
566
|
u || (u = "utf8");
|
|
588
|
-
for (var
|
|
567
|
+
for (var x = !1; ; ) switch (u) {
|
|
589
568
|
case "hex":
|
|
590
569
|
return p(this, e, t, r);
|
|
591
570
|
case "utf8":
|
|
592
571
|
case "utf-8":
|
|
593
|
-
return
|
|
572
|
+
return m(this, e, t, r);
|
|
594
573
|
case "ascii":
|
|
595
574
|
return I(this, e, t, r);
|
|
596
575
|
case "latin1":
|
|
@@ -604,8 +583,8 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
604
583
|
case "utf-16le":
|
|
605
584
|
return z(this, e, t, r);
|
|
606
585
|
default:
|
|
607
|
-
if (
|
|
608
|
-
u = ("" + u).toLowerCase(),
|
|
586
|
+
if (x) throw new TypeError("Unknown encoding: " + u);
|
|
587
|
+
u = ("" + u).toLowerCase(), x = !0;
|
|
609
588
|
}
|
|
610
589
|
}, i.prototype.toJSON = function() {
|
|
611
590
|
return {
|
|
@@ -619,11 +598,11 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
619
598
|
return u.__proto__ = i.prototype, u;
|
|
620
599
|
}, i.prototype.readUIntLE = function(e, t, r) {
|
|
621
600
|
e >>>= 0, t >>>= 0, r || J(e, t, this.length);
|
|
622
|
-
for (var u = this[e],
|
|
601
|
+
for (var u = this[e], v = 1, x = 0; ++x < t && (v *= 256); ) u += this[e + x] * v;
|
|
623
602
|
return u;
|
|
624
603
|
}, i.prototype.readUIntBE = function(e, t, r) {
|
|
625
604
|
e >>>= 0, t >>>= 0, r || J(e, t, this.length);
|
|
626
|
-
for (var u = this[e + --t],
|
|
605
|
+
for (var u = this[e + --t], v = 1; 0 < t && (v *= 256); ) u += this[e + --t] * v;
|
|
627
606
|
return u;
|
|
628
607
|
}, i.prototype.readUInt8 = function(e, t) {
|
|
629
608
|
return e >>>= 0, t || J(e, 1, this.length), this[e];
|
|
@@ -637,12 +616,12 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
637
616
|
return e >>>= 0, t || J(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
638
617
|
}, i.prototype.readIntLE = function(e, t, r) {
|
|
639
618
|
e >>>= 0, t >>>= 0, r || J(e, t, this.length);
|
|
640
|
-
for (var u = this[e],
|
|
641
|
-
return
|
|
619
|
+
for (var u = this[e], v = 1, x = 0; ++x < t && (v *= 256); ) u += this[e + x] * v;
|
|
620
|
+
return v *= 128, u >= v && (u -= F(2, 8 * t)), u;
|
|
642
621
|
}, i.prototype.readIntBE = function(e, t, r) {
|
|
643
622
|
e >>>= 0, t >>>= 0, r || J(e, t, this.length);
|
|
644
|
-
for (var u = t,
|
|
645
|
-
return
|
|
623
|
+
for (var u = t, v = 1, x = this[e + --u]; 0 < u && (v *= 256); ) x += this[e + --u] * v;
|
|
624
|
+
return v *= 128, x >= v && (x -= F(2, 8 * t)), x;
|
|
646
625
|
}, i.prototype.readInt8 = function(e, t) {
|
|
647
626
|
return e >>>= 0, t || J(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e];
|
|
648
627
|
}, i.prototype.readInt16LE = function(e, t) {
|
|
@@ -667,19 +646,19 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
667
646
|
return e >>>= 0, t || J(e, 8, this.length), s.read(this, e, !1, 52, 8);
|
|
668
647
|
}, i.prototype.writeUIntLE = function(e, t, r, u) {
|
|
669
648
|
if (e = +e, t >>>= 0, r >>>= 0, !u) {
|
|
670
|
-
var
|
|
671
|
-
Q(this, e, t, r,
|
|
649
|
+
var v = F(2, 8 * r) - 1;
|
|
650
|
+
Q(this, e, t, r, v, 0);
|
|
672
651
|
}
|
|
673
|
-
var
|
|
674
|
-
for (this[t] = 255 & e; ++q < r && (
|
|
652
|
+
var x = 1, q = 0;
|
|
653
|
+
for (this[t] = 255 & e; ++q < r && (x *= 256); ) this[t + q] = 255 & e / x;
|
|
675
654
|
return t + r;
|
|
676
655
|
}, i.prototype.writeUIntBE = function(e, t, r, u) {
|
|
677
656
|
if (e = +e, t >>>= 0, r >>>= 0, !u) {
|
|
678
|
-
var
|
|
679
|
-
Q(this, e, t, r,
|
|
657
|
+
var v = F(2, 8 * r) - 1;
|
|
658
|
+
Q(this, e, t, r, v, 0);
|
|
680
659
|
}
|
|
681
|
-
var
|
|
682
|
-
for (this[t +
|
|
660
|
+
var x = r - 1, q = 1;
|
|
661
|
+
for (this[t + x] = 255 & e; 0 <= --x && (q *= 256); ) this[t + x] = 255 & e / q;
|
|
683
662
|
return t + r;
|
|
684
663
|
}, i.prototype.writeUInt8 = function(e, t, r) {
|
|
685
664
|
return e = +e, t >>>= 0, r || Q(this, e, t, 1, 255, 0), this[t] = 255 & e, t + 1;
|
|
@@ -693,19 +672,19 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
693
672
|
return e = +e, t >>>= 0, r || Q(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4;
|
|
694
673
|
}, i.prototype.writeIntLE = function(e, t, r, u) {
|
|
695
674
|
if (e = +e, t >>>= 0, !u) {
|
|
696
|
-
var
|
|
697
|
-
Q(this, e, t, r,
|
|
675
|
+
var v = F(2, 8 * r - 1);
|
|
676
|
+
Q(this, e, t, r, v - 1, -v);
|
|
698
677
|
}
|
|
699
|
-
var
|
|
700
|
-
for (this[t] = 255 & e; ++
|
|
678
|
+
var x = 0, q = 1, G = 0;
|
|
679
|
+
for (this[t] = 255 & e; ++x < r && (q *= 256); ) 0 > e && G === 0 && this[t + x - 1] !== 0 && (G = 1), this[t + x] = 255 & (e / q >> 0) - G;
|
|
701
680
|
return t + r;
|
|
702
681
|
}, i.prototype.writeIntBE = function(e, t, r, u) {
|
|
703
682
|
if (e = +e, t >>>= 0, !u) {
|
|
704
|
-
var
|
|
705
|
-
Q(this, e, t, r,
|
|
683
|
+
var v = F(2, 8 * r - 1);
|
|
684
|
+
Q(this, e, t, r, v - 1, -v);
|
|
706
685
|
}
|
|
707
|
-
var
|
|
708
|
-
for (this[t +
|
|
686
|
+
var x = r - 1, q = 1, G = 0;
|
|
687
|
+
for (this[t + x] = 255 & e; 0 <= --x && (q *= 256); ) 0 > e && G === 0 && this[t + x + 1] !== 0 && (G = 1), this[t + x] = 255 & (e / q >> 0) - G;
|
|
709
688
|
return t + r;
|
|
710
689
|
}, i.prototype.writeInt8 = function(e, t, r) {
|
|
711
690
|
return e = +e, t >>>= 0, r || Q(this, e, t, 1, 127, -128), 0 > e && (e = 255 + e + 1), this[t] = 255 & e, t + 1;
|
|
@@ -732,77 +711,77 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
732
711
|
if (0 > r || r >= this.length) throw new RangeError("Index out of range");
|
|
733
712
|
if (0 > u) throw new RangeError("sourceEnd out of bounds");
|
|
734
713
|
u > this.length && (u = this.length), e.length - t < u - r && (u = e.length - t + r);
|
|
735
|
-
var
|
|
714
|
+
var v = u - r;
|
|
736
715
|
if (this === e && typeof Uint8Array.prototype.copyWithin == "function") this.copyWithin(t, r, u);
|
|
737
|
-
else if (this === e && r < t && t < u) for (var
|
|
716
|
+
else if (this === e && r < t && t < u) for (var x = v - 1; 0 <= x; --x) e[x + t] = this[x + r];
|
|
738
717
|
else Uint8Array.prototype.set.call(e, this.subarray(r, u), t);
|
|
739
|
-
return
|
|
718
|
+
return v;
|
|
740
719
|
}, i.prototype.fill = function(e, t, r, u) {
|
|
741
720
|
if (typeof e == "string") {
|
|
742
721
|
if (typeof t == "string" ? (u = t, t = 0, r = this.length) : typeof r == "string" && (u = r, r = this.length), u !== void 0 && typeof u != "string") throw new TypeError("encoding must be a string");
|
|
743
722
|
if (typeof u == "string" && !i.isEncoding(u)) throw new TypeError("Unknown encoding: " + u);
|
|
744
723
|
if (e.length === 1) {
|
|
745
|
-
var
|
|
746
|
-
(u === "utf8" && 128 >
|
|
724
|
+
var v = e.charCodeAt(0);
|
|
725
|
+
(u === "utf8" && 128 > v || u === "latin1") && (e = v);
|
|
747
726
|
}
|
|
748
727
|
} else typeof e == "number" && (e &= 255);
|
|
749
728
|
if (0 > t || this.length < t || this.length < r) throw new RangeError("Out of range index");
|
|
750
729
|
if (r <= t) return this;
|
|
751
730
|
t >>>= 0, r = r === void 0 ? this.length : r >>> 0, e || (e = 0);
|
|
752
|
-
var
|
|
753
|
-
if (typeof e == "number") for (
|
|
731
|
+
var x;
|
|
732
|
+
if (typeof e == "number") for (x = t; x < r; ++x) this[x] = e;
|
|
754
733
|
else {
|
|
755
734
|
var q = i.isBuffer(e) ? e : i.from(e, u), G = q.length;
|
|
756
735
|
if (G === 0) throw new TypeError('The value "' + e + '" is invalid for argument "value"');
|
|
757
|
-
for (
|
|
736
|
+
for (x = 0; x < r - t; ++x) this[x + t] = q[x % G];
|
|
758
737
|
}
|
|
759
738
|
return this;
|
|
760
739
|
};
|
|
761
740
|
var o = /[^+/0-9A-Za-z-_]/g;
|
|
762
741
|
}).call(this);
|
|
763
|
-
}).call(this,
|
|
742
|
+
}).call(this, C("buffer").Buffer);
|
|
764
743
|
}, {
|
|
765
744
|
"base64-js": 1,
|
|
766
745
|
buffer: 3,
|
|
767
746
|
ieee754: 9
|
|
768
747
|
}],
|
|
769
|
-
4: [function(
|
|
748
|
+
4: [function(C, N, w) {
|
|
770
749
|
(function(c) {
|
|
771
750
|
(function() {
|
|
772
751
|
function S() {
|
|
773
752
|
let i;
|
|
774
753
|
try {
|
|
775
|
-
i =
|
|
754
|
+
i = w.storage.getItem("debug");
|
|
776
755
|
} catch {
|
|
777
756
|
}
|
|
778
757
|
return !i && typeof c < "u" && "env" in c && (i = c.env.DEBUG), i;
|
|
779
758
|
}
|
|
780
|
-
|
|
781
|
-
if (i[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + i[0] + (this.useColors ? "%c " : " ") + "+" +
|
|
782
|
-
const
|
|
783
|
-
i.splice(1, 0,
|
|
759
|
+
w.formatArgs = function(i) {
|
|
760
|
+
if (i[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + i[0] + (this.useColors ? "%c " : " ") + "+" + N.exports.humanize(this.diff), !this.useColors) return;
|
|
761
|
+
const h = "color: " + this.color;
|
|
762
|
+
i.splice(1, 0, h, "color: inherit");
|
|
784
763
|
let d = 0, a = 0;
|
|
785
764
|
i[0].replace(/%[a-zA-Z%]/g, (g) => {
|
|
786
765
|
g === "%%" || (d++, g === "%c" && (a = d));
|
|
787
|
-
}), i.splice(a, 0,
|
|
788
|
-
},
|
|
766
|
+
}), i.splice(a, 0, h);
|
|
767
|
+
}, w.save = function(i) {
|
|
789
768
|
try {
|
|
790
|
-
i ?
|
|
769
|
+
i ? w.storage.setItem("debug", i) : w.storage.removeItem("debug");
|
|
791
770
|
} catch {
|
|
792
771
|
}
|
|
793
|
-
},
|
|
772
|
+
}, w.load = S, w.useColors = function() {
|
|
794
773
|
return !!(typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) || !(typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && (typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && 31 <= parseInt(RegExp.$1, 10) || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
795
|
-
},
|
|
774
|
+
}, w.storage = (function() {
|
|
796
775
|
try {
|
|
797
776
|
return localStorage;
|
|
798
777
|
} catch {
|
|
799
778
|
}
|
|
800
|
-
})(),
|
|
779
|
+
})(), w.destroy = /* @__PURE__ */ (() => {
|
|
801
780
|
let i = !1;
|
|
802
781
|
return () => {
|
|
803
782
|
i || (i = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
|
|
804
783
|
};
|
|
805
|
-
})(),
|
|
784
|
+
})(), w.colors = [
|
|
806
785
|
"#0000CC",
|
|
807
786
|
"#0000FF",
|
|
808
787
|
"#0033CC",
|
|
@@ -879,34 +858,34 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
879
858
|
"#FF9933",
|
|
880
859
|
"#FFCC00",
|
|
881
860
|
"#FFCC33"
|
|
882
|
-
],
|
|
883
|
-
}),
|
|
884
|
-
const { formatters: O } =
|
|
861
|
+
], w.log = console.debug || console.log || (() => {
|
|
862
|
+
}), N.exports = C("./common")(w);
|
|
863
|
+
const { formatters: O } = N.exports;
|
|
885
864
|
O.j = function(i) {
|
|
886
865
|
try {
|
|
887
866
|
return JSON.stringify(i);
|
|
888
|
-
} catch (
|
|
889
|
-
return "[UnexpectedJSONParseError]: " +
|
|
867
|
+
} catch (h) {
|
|
868
|
+
return "[UnexpectedJSONParseError]: " + h.message;
|
|
890
869
|
}
|
|
891
870
|
};
|
|
892
871
|
}).call(this);
|
|
893
|
-
}).call(this,
|
|
872
|
+
}).call(this, C("_process"));
|
|
894
873
|
}, {
|
|
895
874
|
"./common": 5,
|
|
896
875
|
_process: 12
|
|
897
876
|
}],
|
|
898
|
-
5: [function(
|
|
899
|
-
|
|
877
|
+
5: [function(C, N) {
|
|
878
|
+
N.exports = function(w) {
|
|
900
879
|
function c(i) {
|
|
901
|
-
function
|
|
902
|
-
if (!
|
|
903
|
-
const L =
|
|
904
|
-
L.diff =
|
|
880
|
+
function h(...g) {
|
|
881
|
+
if (!h.enabled) return;
|
|
882
|
+
const L = h, _ = +/* @__PURE__ */ new Date();
|
|
883
|
+
L.diff = _ - (d || _), L.prev = d, L.curr = _, d = _, g[0] = c.coerce(g[0]), typeof g[0] != "string" && g.unshift("%O");
|
|
905
884
|
let b = 0;
|
|
906
|
-
g[0] = g[0].replace(/%([a-zA-Z%])/g, (n,
|
|
885
|
+
g[0] = g[0].replace(/%([a-zA-Z%])/g, (n, l) => {
|
|
907
886
|
if (n === "%%") return "%";
|
|
908
887
|
b++;
|
|
909
|
-
const y = c.formatters[
|
|
888
|
+
const y = c.formatters[l];
|
|
910
889
|
if (typeof y == "function") {
|
|
911
890
|
const k = g[b];
|
|
912
891
|
n = y.call(L, k), g.splice(b, 1), b--;
|
|
@@ -915,17 +894,17 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
915
894
|
}), c.formatArgs.call(L, g), (L.log || c.log).apply(L, g);
|
|
916
895
|
}
|
|
917
896
|
let d, a = null;
|
|
918
|
-
return
|
|
897
|
+
return h.namespace = i, h.useColors = c.useColors(), h.color = c.selectColor(i), h.extend = S, h.destroy = c.destroy, Object.defineProperty(h, "enabled", {
|
|
919
898
|
enumerable: !0,
|
|
920
899
|
configurable: !1,
|
|
921
900
|
get: () => a === null ? c.enabled(i) : a,
|
|
922
901
|
set: (g) => {
|
|
923
902
|
a = g;
|
|
924
903
|
}
|
|
925
|
-
}), typeof c.init == "function" && c.init(
|
|
904
|
+
}), typeof c.init == "function" && c.init(h), h;
|
|
926
905
|
}
|
|
927
|
-
function S(i,
|
|
928
|
-
const d = c(this.namespace + (typeof
|
|
906
|
+
function S(i, h) {
|
|
907
|
+
const d = c(this.namespace + (typeof h > "u" ? ":" : h) + i);
|
|
929
908
|
return d.log = this.log, d;
|
|
930
909
|
}
|
|
931
910
|
function O(i) {
|
|
@@ -934,33 +913,33 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
934
913
|
return c.debug = c, c.default = c, c.coerce = function(i) {
|
|
935
914
|
return i instanceof Error ? i.stack || i.message : i;
|
|
936
915
|
}, c.disable = function() {
|
|
937
|
-
const i = [...c.names.map(O), ...c.skips.map(O).map((
|
|
916
|
+
const i = [...c.names.map(O), ...c.skips.map(O).map((h) => "-" + h)].join(",");
|
|
938
917
|
return c.enable(""), i;
|
|
939
918
|
}, c.enable = function(i) {
|
|
940
919
|
c.save(i), c.names = [], c.skips = [];
|
|
941
|
-
let
|
|
920
|
+
let h;
|
|
942
921
|
const d = (typeof i == "string" ? i : "").split(/[\s,]+/), a = d.length;
|
|
943
|
-
for (
|
|
922
|
+
for (h = 0; h < a; h++) d[h] && (i = d[h].replace(/\*/g, ".*?"), i[0] === "-" ? c.skips.push(new RegExp("^" + i.substr(1) + "$")) : c.names.push(new RegExp("^" + i + "$")));
|
|
944
923
|
}, c.enabled = function(i) {
|
|
945
924
|
if (i[i.length - 1] === "*") return !0;
|
|
946
|
-
let
|
|
947
|
-
for (
|
|
948
|
-
for (
|
|
925
|
+
let h, d;
|
|
926
|
+
for (h = 0, d = c.skips.length; h < d; h++) if (c.skips[h].test(i)) return !1;
|
|
927
|
+
for (h = 0, d = c.names.length; h < d; h++) if (c.names[h].test(i)) return !0;
|
|
949
928
|
return !1;
|
|
950
|
-
}, c.humanize =
|
|
929
|
+
}, c.humanize = C("ms"), c.destroy = function() {
|
|
951
930
|
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
952
|
-
}, Object.keys(
|
|
953
|
-
c[i] =
|
|
931
|
+
}, Object.keys(w).forEach((i) => {
|
|
932
|
+
c[i] = w[i];
|
|
954
933
|
}), c.names = [], c.skips = [], c.formatters = {}, c.selectColor = function(i) {
|
|
955
|
-
let
|
|
956
|
-
for (let d = 0; d < i.length; d++)
|
|
957
|
-
return c.colors[
|
|
934
|
+
let h = 0;
|
|
935
|
+
for (let d = 0; d < i.length; d++) h = (h << 5) - h + i.charCodeAt(d), h |= 0;
|
|
936
|
+
return c.colors[j(h) % c.colors.length];
|
|
958
937
|
}, c.enable(c.load()), c;
|
|
959
938
|
};
|
|
960
939
|
}, { ms: 11 }],
|
|
961
|
-
6: [function(
|
|
940
|
+
6: [function(C, N) {
|
|
962
941
|
"use strict";
|
|
963
|
-
function
|
|
942
|
+
function w(c, S) {
|
|
964
943
|
for (const O in S) Object.defineProperty(c, O, {
|
|
965
944
|
value: S[O],
|
|
966
945
|
enumerable: !0,
|
|
@@ -968,22 +947,22 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
968
947
|
});
|
|
969
948
|
return c;
|
|
970
949
|
}
|
|
971
|
-
|
|
950
|
+
N.exports = function(c, S, O) {
|
|
972
951
|
if (!c || typeof c == "string") throw new TypeError("Please pass an Error to err-code");
|
|
973
952
|
O || (O = {}), typeof S == "object" && (O = S, S = ""), S && (O.code = S);
|
|
974
953
|
try {
|
|
975
|
-
return
|
|
954
|
+
return w(c, O);
|
|
976
955
|
} catch {
|
|
977
956
|
O.message = c.message, O.stack = c.stack;
|
|
978
|
-
const
|
|
957
|
+
const h = function() {
|
|
979
958
|
};
|
|
980
|
-
return
|
|
959
|
+
return h.prototype = Object.create(Object.getPrototypeOf(c)), w(new h(), O);
|
|
981
960
|
}
|
|
982
961
|
};
|
|
983
962
|
}, {}],
|
|
984
|
-
7: [function(
|
|
963
|
+
7: [function(C, N) {
|
|
985
964
|
"use strict";
|
|
986
|
-
function
|
|
965
|
+
function w(p) {
|
|
987
966
|
console && console.warn && console.warn(p);
|
|
988
967
|
}
|
|
989
968
|
function c() {
|
|
@@ -995,68 +974,68 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
995
974
|
function O(p) {
|
|
996
975
|
return p._maxListeners === void 0 ? c.defaultMaxListeners : p._maxListeners;
|
|
997
976
|
}
|
|
998
|
-
function i(p,
|
|
977
|
+
function i(p, m, I, B) {
|
|
999
978
|
var V, z, K;
|
|
1000
|
-
if (S(I), z = p._events, z === void 0 ? (z = p._events = /* @__PURE__ */ Object.create(null), p._eventsCount = 0) : (z.newListener !== void 0 && (p.emit("newListener",
|
|
1001
|
-
else if (typeof K == "function" ? K = z[
|
|
979
|
+
if (S(I), z = p._events, z === void 0 ? (z = p._events = /* @__PURE__ */ Object.create(null), p._eventsCount = 0) : (z.newListener !== void 0 && (p.emit("newListener", m, I.listener ? I.listener : I), z = p._events), K = z[m]), K === void 0) K = z[m] = I, ++p._eventsCount;
|
|
980
|
+
else if (typeof K == "function" ? K = z[m] = B ? [I, K] : [K, I] : B ? K.unshift(I) : K.push(I), V = O(p), 0 < V && K.length > V && !K.warned) {
|
|
1002
981
|
K.warned = !0;
|
|
1003
|
-
var Z = /* @__PURE__ */ new Error("Possible EventEmitter memory leak detected. " + K.length + " " + (
|
|
1004
|
-
Z.name = "MaxListenersExceededWarning", Z.emitter = p, Z.type =
|
|
982
|
+
var Z = /* @__PURE__ */ new Error("Possible EventEmitter memory leak detected. " + K.length + " " + (m + " listeners added. Use emitter.setMaxListeners() to increase limit"));
|
|
983
|
+
Z.name = "MaxListenersExceededWarning", Z.emitter = p, Z.type = m, Z.count = K.length, w(Z);
|
|
1005
984
|
}
|
|
1006
985
|
return p;
|
|
1007
986
|
}
|
|
1008
|
-
function
|
|
987
|
+
function h() {
|
|
1009
988
|
if (!this.fired) 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);
|
|
1010
989
|
}
|
|
1011
|
-
function d(p,
|
|
990
|
+
function d(p, m, I) {
|
|
1012
991
|
var B = {
|
|
1013
992
|
fired: !1,
|
|
1014
993
|
wrapFn: void 0,
|
|
1015
994
|
target: p,
|
|
1016
|
-
type:
|
|
995
|
+
type: m,
|
|
1017
996
|
listener: I
|
|
1018
|
-
}, V =
|
|
997
|
+
}, V = h.bind(B);
|
|
1019
998
|
return V.listener = I, B.wrapFn = V, V;
|
|
1020
999
|
}
|
|
1021
|
-
function a(p,
|
|
1000
|
+
function a(p, m, I) {
|
|
1022
1001
|
var B = p._events;
|
|
1023
1002
|
if (B === void 0) return [];
|
|
1024
|
-
var V = B[
|
|
1003
|
+
var V = B[m];
|
|
1025
1004
|
return V === void 0 ? [] : typeof V == "function" ? I ? [V.listener || V] : [V] : I ? b(V) : L(V, V.length);
|
|
1026
1005
|
}
|
|
1027
1006
|
function g(p) {
|
|
1028
|
-
var
|
|
1029
|
-
if (
|
|
1030
|
-
var I =
|
|
1007
|
+
var m = this._events;
|
|
1008
|
+
if (m !== void 0) {
|
|
1009
|
+
var I = m[p];
|
|
1031
1010
|
if (typeof I == "function") return 1;
|
|
1032
1011
|
if (I !== void 0) return I.length;
|
|
1033
1012
|
}
|
|
1034
1013
|
return 0;
|
|
1035
1014
|
}
|
|
1036
|
-
function L(p,
|
|
1037
|
-
for (var I = Array(
|
|
1015
|
+
function L(p, m) {
|
|
1016
|
+
for (var I = Array(m), B = 0; B < m; ++B) I[B] = p[B];
|
|
1038
1017
|
return I;
|
|
1039
1018
|
}
|
|
1040
|
-
function
|
|
1041
|
-
for (;
|
|
1019
|
+
function _(p, m) {
|
|
1020
|
+
for (; m + 1 < p.length; m++) p[m] = p[m + 1];
|
|
1042
1021
|
p.pop();
|
|
1043
1022
|
}
|
|
1044
1023
|
function b(p) {
|
|
1045
|
-
for (var
|
|
1046
|
-
return
|
|
1024
|
+
for (var m = Array(p.length), I = 0; I < m.length; ++I) m[I] = p[I].listener || p[I];
|
|
1025
|
+
return m;
|
|
1047
1026
|
}
|
|
1048
|
-
function n(p,
|
|
1049
|
-
typeof p.on == "function" &&
|
|
1027
|
+
function n(p, m, I) {
|
|
1028
|
+
typeof p.on == "function" && l(p, "error", m, I);
|
|
1050
1029
|
}
|
|
1051
|
-
function
|
|
1052
|
-
if (typeof p.on == "function") B.once ? p.once(
|
|
1053
|
-
else if (typeof p.addEventListener == "function") p.addEventListener(
|
|
1054
|
-
B.once && p.removeEventListener(
|
|
1030
|
+
function l(p, m, I, B) {
|
|
1031
|
+
if (typeof p.on == "function") B.once ? p.once(m, I) : p.on(m, I);
|
|
1032
|
+
else if (typeof p.addEventListener == "function") p.addEventListener(m, function V(z) {
|
|
1033
|
+
B.once && p.removeEventListener(m, V), I(z);
|
|
1055
1034
|
});
|
|
1056
1035
|
else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof p);
|
|
1057
1036
|
}
|
|
1058
|
-
var y, k = typeof Reflect == "object" ? Reflect : null, f = k && typeof k.apply == "function" ? k.apply : function(p,
|
|
1059
|
-
return Function.prototype.apply.call(p,
|
|
1037
|
+
var y, k = typeof Reflect == "object" ? Reflect : null, f = k && typeof k.apply == "function" ? k.apply : function(p, m, I) {
|
|
1038
|
+
return Function.prototype.apply.call(p, m, I);
|
|
1060
1039
|
};
|
|
1061
1040
|
y = k && typeof k.ownKeys == "function" ? k.ownKeys : Object.getOwnPropertySymbols ? function(p) {
|
|
1062
1041
|
return Object.getOwnPropertyNames(p).concat(Object.getOwnPropertySymbols(p));
|
|
@@ -1066,26 +1045,26 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
1066
1045
|
var T = Number.isNaN || function(p) {
|
|
1067
1046
|
return p !== p;
|
|
1068
1047
|
};
|
|
1069
|
-
|
|
1048
|
+
N.exports = c, N.exports.once = function(p, m) {
|
|
1070
1049
|
return new Promise(function(I, B) {
|
|
1071
1050
|
function V(K) {
|
|
1072
|
-
p.removeListener(
|
|
1051
|
+
p.removeListener(m, z), B(K);
|
|
1073
1052
|
}
|
|
1074
1053
|
function z() {
|
|
1075
1054
|
typeof p.removeListener == "function" && p.removeListener("error", V), I([].slice.call(arguments));
|
|
1076
1055
|
}
|
|
1077
|
-
|
|
1056
|
+
l(p, m, z, { once: !0 }), m !== "error" && n(p, V, { once: !0 });
|
|
1078
1057
|
});
|
|
1079
1058
|
}, c.EventEmitter = c, c.prototype._events = void 0, c.prototype._eventsCount = 0, c.prototype._maxListeners = void 0;
|
|
1080
|
-
var
|
|
1059
|
+
var M = 10;
|
|
1081
1060
|
Object.defineProperty(c, "defaultMaxListeners", {
|
|
1082
1061
|
enumerable: !0,
|
|
1083
1062
|
get: function() {
|
|
1084
|
-
return
|
|
1063
|
+
return M;
|
|
1085
1064
|
},
|
|
1086
1065
|
set: function(p) {
|
|
1087
1066
|
if (typeof p != "number" || 0 > p || T(p)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + p + ".");
|
|
1088
|
-
|
|
1067
|
+
M = p;
|
|
1089
1068
|
}
|
|
1090
1069
|
}), c.init = function() {
|
|
1091
1070
|
(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;
|
|
@@ -1095,45 +1074,45 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
1095
1074
|
}, c.prototype.getMaxListeners = function() {
|
|
1096
1075
|
return O(this);
|
|
1097
1076
|
}, c.prototype.emit = function(p) {
|
|
1098
|
-
for (var
|
|
1077
|
+
for (var m = [], I = 1; I < arguments.length; I++) m.push(arguments[I]);
|
|
1099
1078
|
var B = p === "error", V = this._events;
|
|
1100
1079
|
if (V !== void 0) B = B && V.error === void 0;
|
|
1101
1080
|
else if (!B) return !1;
|
|
1102
1081
|
if (B) {
|
|
1103
1082
|
var z;
|
|
1104
|
-
if (0 <
|
|
1083
|
+
if (0 < m.length && (z = m[0]), z instanceof Error) throw z;
|
|
1105
1084
|
var K = /* @__PURE__ */ new Error("Unhandled error." + (z ? " (" + z.message + ")" : ""));
|
|
1106
1085
|
throw K.context = z, K;
|
|
1107
1086
|
}
|
|
1108
1087
|
var Z = V[p];
|
|
1109
1088
|
if (Z === void 0) return !1;
|
|
1110
|
-
if (typeof Z == "function") f(Z, this,
|
|
1111
|
-
else for (var te = Z.length, H = L(Z, te), I = 0; I < te; ++I) f(H[I], this,
|
|
1089
|
+
if (typeof Z == "function") f(Z, this, m);
|
|
1090
|
+
else for (var te = Z.length, H = L(Z, te), I = 0; I < te; ++I) f(H[I], this, m);
|
|
1112
1091
|
return !0;
|
|
1113
|
-
}, c.prototype.addListener = function(p,
|
|
1114
|
-
return i(this, p,
|
|
1115
|
-
}, c.prototype.on = c.prototype.addListener, c.prototype.prependListener = function(p,
|
|
1116
|
-
return i(this, p,
|
|
1117
|
-
}, c.prototype.once = function(p,
|
|
1118
|
-
return S(
|
|
1119
|
-
}, c.prototype.prependOnceListener = function(p,
|
|
1120
|
-
return S(
|
|
1121
|
-
}, c.prototype.removeListener = function(p,
|
|
1092
|
+
}, c.prototype.addListener = function(p, m) {
|
|
1093
|
+
return i(this, p, m, !1);
|
|
1094
|
+
}, c.prototype.on = c.prototype.addListener, c.prototype.prependListener = function(p, m) {
|
|
1095
|
+
return i(this, p, m, !0);
|
|
1096
|
+
}, c.prototype.once = function(p, m) {
|
|
1097
|
+
return S(m), this.on(p, d(this, p, m)), this;
|
|
1098
|
+
}, c.prototype.prependOnceListener = function(p, m) {
|
|
1099
|
+
return S(m), this.prependListener(p, d(this, p, m)), this;
|
|
1100
|
+
}, c.prototype.removeListener = function(p, m) {
|
|
1122
1101
|
var I, B, V, z, K;
|
|
1123
|
-
if (S(
|
|
1102
|
+
if (S(m), B = this._events, B === void 0) return this;
|
|
1124
1103
|
if (I = B[p], I === void 0) return this;
|
|
1125
|
-
if (I ===
|
|
1104
|
+
if (I === m || I.listener === m) --this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete B[p], B.removeListener && this.emit("removeListener", p, I.listener || m));
|
|
1126
1105
|
else if (typeof I != "function") {
|
|
1127
|
-
for (V = -1, z = I.length - 1; 0 <= z; z--) if (I[z] ===
|
|
1106
|
+
for (V = -1, z = I.length - 1; 0 <= z; z--) if (I[z] === m || I[z].listener === m) {
|
|
1128
1107
|
K = I[z].listener, V = z;
|
|
1129
1108
|
break;
|
|
1130
1109
|
}
|
|
1131
1110
|
if (0 > V) return this;
|
|
1132
|
-
V === 0 ? I.shift() :
|
|
1111
|
+
V === 0 ? I.shift() : _(I, V), I.length === 1 && (B[p] = I[0]), B.removeListener !== void 0 && this.emit("removeListener", p, K || m);
|
|
1133
1112
|
}
|
|
1134
1113
|
return this;
|
|
1135
1114
|
}, c.prototype.off = c.prototype.removeListener, c.prototype.removeAllListeners = function(p) {
|
|
1136
|
-
var
|
|
1115
|
+
var m, I, B;
|
|
1137
1116
|
if (I = this._events, I === void 0) return this;
|
|
1138
1117
|
if (I.removeListener === void 0) return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : I[p] !== void 0 && (--this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete I[p]), this;
|
|
1139
1118
|
if (arguments.length === 0) {
|
|
@@ -1141,97 +1120,97 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
1141
1120
|
for (B = 0; B < z.length; ++B) V = z[B], V !== "removeListener" && this.removeAllListeners(V);
|
|
1142
1121
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
1143
1122
|
}
|
|
1144
|
-
if (
|
|
1145
|
-
else if (
|
|
1123
|
+
if (m = I[p], typeof m == "function") this.removeListener(p, m);
|
|
1124
|
+
else if (m !== void 0) for (B = m.length - 1; 0 <= B; B--) this.removeListener(p, m[B]);
|
|
1146
1125
|
return this;
|
|
1147
1126
|
}, c.prototype.listeners = function(p) {
|
|
1148
1127
|
return a(this, p, !0);
|
|
1149
1128
|
}, c.prototype.rawListeners = function(p) {
|
|
1150
1129
|
return a(this, p, !1);
|
|
1151
|
-
}, c.listenerCount = function(p,
|
|
1152
|
-
return typeof p.listenerCount == "function" ? p.listenerCount(
|
|
1130
|
+
}, c.listenerCount = function(p, m) {
|
|
1131
|
+
return typeof p.listenerCount == "function" ? p.listenerCount(m) : g.call(p, m);
|
|
1153
1132
|
}, c.prototype.listenerCount = g, c.prototype.eventNames = function() {
|
|
1154
1133
|
return 0 < this._eventsCount ? y(this._events) : [];
|
|
1155
1134
|
};
|
|
1156
1135
|
}, {}],
|
|
1157
|
-
8: [function(
|
|
1158
|
-
|
|
1136
|
+
8: [function(C, N) {
|
|
1137
|
+
N.exports = function() {
|
|
1159
1138
|
if (typeof globalThis > "u") return null;
|
|
1160
|
-
var
|
|
1139
|
+
var w = {
|
|
1161
1140
|
RTCPeerConnection: globalThis.RTCPeerConnection || globalThis.mozRTCPeerConnection || globalThis.webkitRTCPeerConnection,
|
|
1162
1141
|
RTCSessionDescription: globalThis.RTCSessionDescription || globalThis.mozRTCSessionDescription || globalThis.webkitRTCSessionDescription,
|
|
1163
1142
|
RTCIceCandidate: globalThis.RTCIceCandidate || globalThis.mozRTCIceCandidate || globalThis.webkitRTCIceCandidate
|
|
1164
1143
|
};
|
|
1165
|
-
return
|
|
1144
|
+
return w.RTCPeerConnection ? w : null;
|
|
1166
1145
|
};
|
|
1167
1146
|
}, {}],
|
|
1168
|
-
9: [function(
|
|
1169
|
-
|
|
1170
|
-
var d, a, g = 8 *
|
|
1171
|
-
for (n +=
|
|
1172
|
-
for (a = d & (1 << -b) - 1, d >>= -b, b += i; 0 < b; a = 256 * a + c[S + n], n +=
|
|
1173
|
-
if (d === 0) d = 1 -
|
|
1147
|
+
9: [function(C, N, w) {
|
|
1148
|
+
w.read = function(c, S, O, i, h) {
|
|
1149
|
+
var d, a, g = 8 * h - i - 1, L = (1 << g) - 1, _ = L >> 1, b = -7, n = O ? h - 1 : 0, l = O ? -1 : 1, y = c[S + n];
|
|
1150
|
+
for (n += l, d = y & (1 << -b) - 1, y >>= -b, b += g; 0 < b; d = 256 * d + c[S + n], n += l, b -= 8) ;
|
|
1151
|
+
for (a = d & (1 << -b) - 1, d >>= -b, b += i; 0 < b; a = 256 * a + c[S + n], n += l, b -= 8) ;
|
|
1152
|
+
if (d === 0) d = 1 - _;
|
|
1174
1153
|
else {
|
|
1175
1154
|
if (d === L) return a ? NaN : (y ? -1 : 1) * (1 / 0);
|
|
1176
|
-
a += F(2, i), d -=
|
|
1155
|
+
a += F(2, i), d -= _;
|
|
1177
1156
|
}
|
|
1178
1157
|
return (y ? -1 : 1) * a * F(2, d - i);
|
|
1179
|
-
},
|
|
1180
|
-
var a, g, L,
|
|
1181
|
-
for (S =
|
|
1182
|
-
for (a = a <<
|
|
1183
|
-
c[O + f - T] |= 128 *
|
|
1158
|
+
}, w.write = function(c, S, O, i, h, d) {
|
|
1159
|
+
var a, g, L, _ = Math.LN2, b = Math.log, n = 8 * d - h - 1, l = (1 << n) - 1, y = l >> 1, k = h === 23 ? F(2, -24) - F(2, -77) : 0, f = i ? 0 : d - 1, T = i ? 1 : -1, M = 0 > S || S === 0 && 0 > 1 / S ? 1 : 0;
|
|
1160
|
+
for (S = j(S), isNaN(S) || S === 1 / 0 ? (g = isNaN(S) ? 1 : 0, a = l) : (a = U(b(S) / _), 1 > S * (L = F(2, -a)) && (a--, L *= 2), S += 1 <= a + y ? k / L : k * F(2, 1 - y), 2 <= S * L && (a++, L /= 2), a + y >= l ? (g = 0, a = l) : 1 <= a + y ? (g = (S * L - 1) * F(2, h), a += y) : (g = S * F(2, y - 1) * F(2, h), a = 0)); 8 <= h; c[O + f] = 255 & g, f += T, g /= 256, h -= 8) ;
|
|
1161
|
+
for (a = a << h | g, n += h; 0 < n; c[O + f] = 255 & a, f += T, a /= 256, n -= 8) ;
|
|
1162
|
+
c[O + f - T] |= 128 * M;
|
|
1184
1163
|
};
|
|
1185
1164
|
}, {}],
|
|
1186
|
-
10: [function(
|
|
1187
|
-
|
|
1188
|
-
c && (
|
|
1189
|
-
value:
|
|
1165
|
+
10: [function(C, N) {
|
|
1166
|
+
N.exports = typeof Object.create == "function" ? function(w, c) {
|
|
1167
|
+
c && (w.super_ = c, w.prototype = Object.create(c.prototype, { constructor: {
|
|
1168
|
+
value: w,
|
|
1190
1169
|
enumerable: !1,
|
|
1191
1170
|
writable: !0,
|
|
1192
1171
|
configurable: !0
|
|
1193
1172
|
} }));
|
|
1194
|
-
} : function(
|
|
1173
|
+
} : function(w, c) {
|
|
1195
1174
|
if (c) {
|
|
1196
|
-
|
|
1175
|
+
w.super_ = c;
|
|
1197
1176
|
var S = function() {
|
|
1198
1177
|
};
|
|
1199
|
-
S.prototype = c.prototype,
|
|
1178
|
+
S.prototype = c.prototype, w.prototype = new S(), w.prototype.constructor = w;
|
|
1200
1179
|
}
|
|
1201
1180
|
};
|
|
1202
1181
|
}, {}],
|
|
1203
|
-
11: [function(
|
|
1204
|
-
var
|
|
1205
|
-
function c(
|
|
1206
|
-
if (
|
|
1207
|
-
var d = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
1182
|
+
11: [function(C, N) {
|
|
1183
|
+
var w = Math.round;
|
|
1184
|
+
function c(h) {
|
|
1185
|
+
if (h += "", !(100 < h.length)) {
|
|
1186
|
+
var d = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(h);
|
|
1208
1187
|
if (d) {
|
|
1209
1188
|
var a = parseFloat(d[1]), g = (d[2] || "ms").toLowerCase();
|
|
1210
1189
|
return g === "years" || g === "year" || g === "yrs" || g === "yr" || g === "y" ? 315576e5 * a : g === "weeks" || g === "week" || g === "w" ? 6048e5 * a : g === "days" || g === "day" || g === "d" ? 864e5 * a : g === "hours" || g === "hour" || g === "hrs" || g === "hr" || g === "h" ? 36e5 * a : g === "minutes" || g === "minute" || g === "mins" || g === "min" || g === "m" ? 6e4 * a : g === "seconds" || g === "second" || g === "secs" || g === "sec" || g === "s" ? 1e3 * a : g === "milliseconds" || g === "millisecond" || g === "msecs" || g === "msec" || g === "ms" ? a : void 0;
|
|
1211
1190
|
}
|
|
1212
1191
|
}
|
|
1213
1192
|
}
|
|
1214
|
-
function S(
|
|
1215
|
-
var d =
|
|
1216
|
-
return 864e5 <= d ?
|
|
1193
|
+
function S(h) {
|
|
1194
|
+
var d = j(h);
|
|
1195
|
+
return 864e5 <= d ? w(h / 864e5) + "d" : 36e5 <= d ? w(h / 36e5) + "h" : 6e4 <= d ? w(h / 6e4) + "m" : 1e3 <= d ? w(h / 1e3) + "s" : h + "ms";
|
|
1217
1196
|
}
|
|
1218
|
-
function O(
|
|
1219
|
-
var d =
|
|
1220
|
-
return 864e5 <= d ? i(
|
|
1197
|
+
function O(h) {
|
|
1198
|
+
var d = j(h);
|
|
1199
|
+
return 864e5 <= d ? i(h, d, 864e5, "day") : 36e5 <= d ? i(h, d, 36e5, "hour") : 6e4 <= d ? i(h, d, 6e4, "minute") : 1e3 <= d ? i(h, d, 1e3, "second") : h + " ms";
|
|
1221
1200
|
}
|
|
1222
|
-
function i(
|
|
1223
|
-
return
|
|
1201
|
+
function i(h, d, a, g) {
|
|
1202
|
+
return w(h / a) + " " + g + (d >= 1.5 * a ? "s" : "");
|
|
1224
1203
|
}
|
|
1225
|
-
|
|
1204
|
+
N.exports = function(h, d) {
|
|
1226
1205
|
d = d || {};
|
|
1227
|
-
var a = typeof
|
|
1228
|
-
if (a == "string" && 0 <
|
|
1229
|
-
if (a === "number" && isFinite(
|
|
1230
|
-
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(
|
|
1206
|
+
var a = typeof h;
|
|
1207
|
+
if (a == "string" && 0 < h.length) return c(h);
|
|
1208
|
+
if (a === "number" && isFinite(h)) return d.long ? O(h) : S(h);
|
|
1209
|
+
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(h));
|
|
1231
1210
|
};
|
|
1232
1211
|
}, {}],
|
|
1233
|
-
12: [function(
|
|
1234
|
-
function
|
|
1212
|
+
12: [function(C, N) {
|
|
1213
|
+
function w() {
|
|
1235
1214
|
throw new Error("setTimeout has not been defined");
|
|
1236
1215
|
}
|
|
1237
1216
|
function c() {
|
|
@@ -1239,7 +1218,7 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
1239
1218
|
}
|
|
1240
1219
|
function S(k) {
|
|
1241
1220
|
if (g === setTimeout) return setTimeout(k, 0);
|
|
1242
|
-
if ((g ===
|
|
1221
|
+
if ((g === w || !g) && setTimeout) return g = setTimeout, setTimeout(k, 0);
|
|
1243
1222
|
try {
|
|
1244
1223
|
return g(k, 0);
|
|
1245
1224
|
} catch {
|
|
@@ -1264,17 +1243,17 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
1264
1243
|
}
|
|
1265
1244
|
}
|
|
1266
1245
|
function i() {
|
|
1267
|
-
|
|
1246
|
+
l && b && (l = !1, b.length ? n = b.concat(n) : y = -1, n.length && h());
|
|
1268
1247
|
}
|
|
1269
|
-
function
|
|
1270
|
-
if (!
|
|
1248
|
+
function h() {
|
|
1249
|
+
if (!l) {
|
|
1271
1250
|
var k = S(i);
|
|
1272
|
-
|
|
1251
|
+
l = !0;
|
|
1273
1252
|
for (var f = n.length; f; ) {
|
|
1274
1253
|
for (b = n, n = []; ++y < f; ) b && b[y].run();
|
|
1275
1254
|
y = -1, f = n.length;
|
|
1276
1255
|
}
|
|
1277
|
-
b = null,
|
|
1256
|
+
b = null, l = !1, O(k);
|
|
1278
1257
|
}
|
|
1279
1258
|
}
|
|
1280
1259
|
function d(k, f) {
|
|
@@ -1282,12 +1261,12 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
1282
1261
|
}
|
|
1283
1262
|
function a() {
|
|
1284
1263
|
}
|
|
1285
|
-
var g, L,
|
|
1264
|
+
var g, L, _ = N.exports = {};
|
|
1286
1265
|
(function() {
|
|
1287
1266
|
try {
|
|
1288
|
-
g = typeof setTimeout == "function" ? setTimeout :
|
|
1267
|
+
g = typeof setTimeout == "function" ? setTimeout : w;
|
|
1289
1268
|
} catch {
|
|
1290
|
-
g =
|
|
1269
|
+
g = w;
|
|
1291
1270
|
}
|
|
1292
1271
|
try {
|
|
1293
1272
|
L = typeof clearTimeout == "function" ? clearTimeout : c;
|
|
@@ -1295,81 +1274,81 @@ var Lt = Object.create, Le = Object.defineProperty, xt = Object.getOwnPropertyDe
|
|
|
1295
1274
|
L = c;
|
|
1296
1275
|
}
|
|
1297
1276
|
})();
|
|
1298
|
-
var b, n = [],
|
|
1299
|
-
|
|
1277
|
+
var b, n = [], l = !1, y = -1;
|
|
1278
|
+
_.nextTick = function(k) {
|
|
1300
1279
|
var f = Array(arguments.length - 1);
|
|
1301
1280
|
if (1 < arguments.length) for (var T = 1; T < arguments.length; T++) f[T - 1] = arguments[T];
|
|
1302
|
-
n.push(new d(k, f)), n.length !== 1 ||
|
|
1281
|
+
n.push(new d(k, f)), n.length !== 1 || l || S(h);
|
|
1303
1282
|
}, d.prototype.run = function() {
|
|
1304
1283
|
this.fun.apply(null, this.array);
|
|
1305
|
-
},
|
|
1284
|
+
}, _.title = "browser", _.browser = !0, _.env = {}, _.argv = [], _.version = "", _.versions = {}, _.on = a, _.addListener = a, _.once = a, _.off = a, _.removeListener = a, _.removeAllListeners = a, _.emit = a, _.prependListener = a, _.prependOnceListener = a, _.listeners = function() {
|
|
1306
1285
|
return [];
|
|
1307
|
-
},
|
|
1286
|
+
}, _.binding = function() {
|
|
1308
1287
|
throw new Error("process.binding is not supported");
|
|
1309
|
-
},
|
|
1288
|
+
}, _.cwd = function() {
|
|
1310
1289
|
return "/";
|
|
1311
|
-
},
|
|
1290
|
+
}, _.chdir = function() {
|
|
1312
1291
|
throw new Error("process.chdir is not supported");
|
|
1313
|
-
},
|
|
1292
|
+
}, _.umask = function() {
|
|
1314
1293
|
return 0;
|
|
1315
1294
|
};
|
|
1316
1295
|
}, {}],
|
|
1317
|
-
13: [function(
|
|
1318
|
-
(function(
|
|
1296
|
+
13: [function(C, N) {
|
|
1297
|
+
(function(w) {
|
|
1319
1298
|
(function() {
|
|
1320
1299
|
let c;
|
|
1321
|
-
|
|
1300
|
+
N.exports = typeof queueMicrotask == "function" ? queueMicrotask.bind(typeof window > "u" ? w : window) : (S) => (c || (c = Promise.resolve())).then(S).catch((O) => setTimeout(() => {
|
|
1322
1301
|
throw O;
|
|
1323
1302
|
}, 0));
|
|
1324
1303
|
}).call(this);
|
|
1325
1304
|
}).call(this, typeof global > "u" ? typeof self > "u" ? typeof window > "u" ? {} : window : self : global);
|
|
1326
1305
|
}, {}],
|
|
1327
|
-
14: [function(
|
|
1328
|
-
(function(
|
|
1306
|
+
14: [function(C, N) {
|
|
1307
|
+
(function(w, c) {
|
|
1329
1308
|
(function() {
|
|
1330
1309
|
"use strict";
|
|
1331
|
-
var S =
|
|
1332
|
-
|
|
1310
|
+
var S = C("safe-buffer").Buffer, O = c.crypto || c.msCrypto;
|
|
1311
|
+
N.exports = O && O.getRandomValues ? function(i, h) {
|
|
1333
1312
|
if (i > 4294967295) throw new RangeError("requested too many random bytes");
|
|
1334
1313
|
var d = S.allocUnsafe(i);
|
|
1335
1314
|
if (0 < i) if (65536 < i) for (var a = 0; a < i; a += 65536) O.getRandomValues(d.slice(a, a + 65536));
|
|
1336
1315
|
else O.getRandomValues(d);
|
|
1337
|
-
return typeof
|
|
1338
|
-
|
|
1316
|
+
return typeof h == "function" ? w.nextTick(function() {
|
|
1317
|
+
h(null, d);
|
|
1339
1318
|
}) : d;
|
|
1340
1319
|
} : function() {
|
|
1341
1320
|
throw new Error(`Secure random number generation is not supported by this browser.
|
|
1342
1321
|
Use Chrome, Firefox or Internet Explorer 11`);
|
|
1343
1322
|
};
|
|
1344
1323
|
}).call(this);
|
|
1345
|
-
}).call(this,
|
|
1324
|
+
}).call(this, C("_process"), typeof global > "u" ? typeof self > "u" ? typeof window > "u" ? {} : window : self : global);
|
|
1346
1325
|
}, {
|
|
1347
1326
|
_process: 12,
|
|
1348
1327
|
"safe-buffer": 30
|
|
1349
1328
|
}],
|
|
1350
|
-
15: [function(
|
|
1329
|
+
15: [function(C, N) {
|
|
1351
1330
|
"use strict";
|
|
1352
|
-
function
|
|
1331
|
+
function w(a, g) {
|
|
1353
1332
|
a.prototype = Object.create(g.prototype), a.prototype.constructor = a, a.__proto__ = g;
|
|
1354
1333
|
}
|
|
1355
1334
|
function c(a, g, L) {
|
|
1356
|
-
function
|
|
1357
|
-
return typeof g == "string" ? g : g(n,
|
|
1335
|
+
function _(n, l, y) {
|
|
1336
|
+
return typeof g == "string" ? g : g(n, l, y);
|
|
1358
1337
|
}
|
|
1359
1338
|
L || (L = Error);
|
|
1360
1339
|
var b = (function(n) {
|
|
1361
|
-
function
|
|
1362
|
-
return n.call(this,
|
|
1340
|
+
function l(y, k, f) {
|
|
1341
|
+
return n.call(this, _(y, k, f)) || this;
|
|
1363
1342
|
}
|
|
1364
|
-
return
|
|
1343
|
+
return w(l, n), l;
|
|
1365
1344
|
})(L);
|
|
1366
1345
|
b.prototype.name = L.name, b.prototype.code = a, d[a] = b;
|
|
1367
1346
|
}
|
|
1368
1347
|
function S(a, g) {
|
|
1369
1348
|
if (Array.isArray(a)) {
|
|
1370
1349
|
var L = a.length;
|
|
1371
|
-
return a = a.map(function(
|
|
1372
|
-
return
|
|
1350
|
+
return a = a.map(function(_) {
|
|
1351
|
+
return _ + "";
|
|
1373
1352
|
}), 2 < L ? "one of ".concat(g, " ").concat(a.slice(0, L - 1).join(", "), ", or ") + a[L - 1] : L === 2 ? "one of ".concat(g, " ").concat(a[0], " or ").concat(a[1]) : "of ".concat(g, " ").concat(a[0]);
|
|
1374
1353
|
}
|
|
1375
1354
|
return "of ".concat(g, " ").concat(a + "");
|
|
@@ -1380,20 +1359,20 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1380
1359
|
function i(a, g, L) {
|
|
1381
1360
|
return (L === void 0 || L > a.length) && (L = a.length), a.substring(L - g.length, L) === g;
|
|
1382
1361
|
}
|
|
1383
|
-
function
|
|
1362
|
+
function h(a, g, L) {
|
|
1384
1363
|
return typeof L != "number" && (L = 0), !(L + g.length > a.length) && a.indexOf(g, L) !== -1;
|
|
1385
1364
|
}
|
|
1386
1365
|
var d = {};
|
|
1387
1366
|
c("ERR_INVALID_OPT_VALUE", function(a, g) {
|
|
1388
1367
|
return 'The value "' + g + '" is invalid for option "' + a + '"';
|
|
1389
1368
|
}, TypeError), c("ERR_INVALID_ARG_TYPE", function(a, g, L) {
|
|
1390
|
-
var
|
|
1391
|
-
typeof g == "string" && O(g, "not ") ? (
|
|
1369
|
+
var _;
|
|
1370
|
+
typeof g == "string" && O(g, "not ") ? (_ = "must not be", g = g.replace(/^not /, "")) : _ = "must be";
|
|
1392
1371
|
var b;
|
|
1393
|
-
if (i(a, " argument")) b = "The ".concat(a, " ").concat(
|
|
1372
|
+
if (i(a, " argument")) b = "The ".concat(a, " ").concat(_, " ").concat(S(g, "type"));
|
|
1394
1373
|
else {
|
|
1395
|
-
var n =
|
|
1396
|
-
b = 'The "'.concat(a, '" ').concat(n, " ").concat(
|
|
1374
|
+
var n = h(a, ".") ? "property" : "argument";
|
|
1375
|
+
b = 'The "'.concat(a, '" ').concat(n, " ").concat(_, " ").concat(S(g, "type"));
|
|
1397
1376
|
}
|
|
1398
1377
|
return b += ". Received type ".concat(typeof L), b;
|
|
1399
1378
|
}, TypeError), c("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), c("ERR_METHOD_NOT_IMPLEMENTED", function(a) {
|
|
@@ -1402,29 +1381,29 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1402
1381
|
return "Cannot call " + a + " after a stream was destroyed";
|
|
1403
1382
|
}), c("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), c("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), c("ERR_STREAM_WRITE_AFTER_END", "write after end"), c("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), c("ERR_UNKNOWN_ENCODING", function(a) {
|
|
1404
1383
|
return "Unknown encoding: " + a;
|
|
1405
|
-
}, TypeError), c("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"),
|
|
1384
|
+
}, TypeError), c("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), N.exports.codes = d;
|
|
1406
1385
|
}, {}],
|
|
1407
|
-
16: [function(
|
|
1408
|
-
(function(
|
|
1386
|
+
16: [function(C, N) {
|
|
1387
|
+
(function(w) {
|
|
1409
1388
|
(function() {
|
|
1410
1389
|
"use strict";
|
|
1411
|
-
function c(
|
|
1412
|
-
return this instanceof c ? (
|
|
1390
|
+
function c(_) {
|
|
1391
|
+
return this instanceof c ? (h.call(this, _), d.call(this, _), this.allowHalfOpen = !0, void (_ && (_.readable === !1 && (this.readable = !1), _.writable === !1 && (this.writable = !1), _.allowHalfOpen === !1 && (this.allowHalfOpen = !1, this.once("end", S))))) : new c(_);
|
|
1413
1392
|
}
|
|
1414
1393
|
function S() {
|
|
1415
|
-
this._writableState.ended ||
|
|
1394
|
+
this._writableState.ended || w.nextTick(O, this);
|
|
1416
1395
|
}
|
|
1417
|
-
function O(
|
|
1418
|
-
|
|
1396
|
+
function O(_) {
|
|
1397
|
+
_.end();
|
|
1419
1398
|
}
|
|
1420
|
-
var i = Object.keys || function(
|
|
1399
|
+
var i = Object.keys || function(_) {
|
|
1421
1400
|
var b = [];
|
|
1422
|
-
for (var n in
|
|
1401
|
+
for (var n in _) b.push(n);
|
|
1423
1402
|
return b;
|
|
1424
1403
|
};
|
|
1425
|
-
|
|
1426
|
-
var
|
|
1427
|
-
|
|
1404
|
+
N.exports = c;
|
|
1405
|
+
var h = C("./_stream_readable"), d = C("./_stream_writable");
|
|
1406
|
+
C("inherits")(c, h);
|
|
1428
1407
|
for (var a, g = i(d.prototype), L = 0; L < g.length; L++) a = g[L], c.prototype[a] || (c.prototype[a] = d.prototype[a]);
|
|
1429
1408
|
Object.defineProperty(c.prototype, "writableHighWaterMark", {
|
|
1430
1409
|
enumerable: !1,
|
|
@@ -1446,34 +1425,34 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1446
1425
|
get: function() {
|
|
1447
1426
|
return this._readableState !== void 0 && this._writableState !== void 0 && this._readableState.destroyed && this._writableState.destroyed;
|
|
1448
1427
|
},
|
|
1449
|
-
set: function(
|
|
1450
|
-
this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed =
|
|
1428
|
+
set: function(_) {
|
|
1429
|
+
this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = _, this._writableState.destroyed = _);
|
|
1451
1430
|
}
|
|
1452
1431
|
});
|
|
1453
1432
|
}).call(this);
|
|
1454
|
-
}).call(this,
|
|
1433
|
+
}).call(this, C("_process"));
|
|
1455
1434
|
}, {
|
|
1456
1435
|
"./_stream_readable": 18,
|
|
1457
1436
|
"./_stream_writable": 20,
|
|
1458
1437
|
_process: 12,
|
|
1459
1438
|
inherits: 10
|
|
1460
1439
|
}],
|
|
1461
|
-
17: [function(
|
|
1440
|
+
17: [function(C, N) {
|
|
1462
1441
|
"use strict";
|
|
1463
|
-
function
|
|
1464
|
-
return this instanceof
|
|
1442
|
+
function w(S) {
|
|
1443
|
+
return this instanceof w ? void c.call(this, S) : new w(S);
|
|
1465
1444
|
}
|
|
1466
|
-
|
|
1467
|
-
var c =
|
|
1468
|
-
|
|
1445
|
+
N.exports = w;
|
|
1446
|
+
var c = C("./_stream_transform");
|
|
1447
|
+
C("inherits")(w, c), w.prototype._transform = function(S, O, i) {
|
|
1469
1448
|
i(null, S);
|
|
1470
1449
|
};
|
|
1471
1450
|
}, {
|
|
1472
1451
|
"./_stream_transform": 19,
|
|
1473
1452
|
inherits: 10
|
|
1474
1453
|
}],
|
|
1475
|
-
18: [function(
|
|
1476
|
-
(function(
|
|
1454
|
+
18: [function(C, N) {
|
|
1455
|
+
(function(w, c) {
|
|
1477
1456
|
(function() {
|
|
1478
1457
|
"use strict";
|
|
1479
1458
|
function S(s) {
|
|
@@ -1485,24 +1464,24 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1485
1464
|
function i(s, o, e) {
|
|
1486
1465
|
return typeof s.prependListener == "function" ? s.prependListener(o, e) : void (s._events && s._events[o] ? Array.isArray(s._events[o]) ? s._events[o].unshift(e) : s._events[o] = [e, s._events[o]] : s.on(o, e));
|
|
1487
1466
|
}
|
|
1488
|
-
function
|
|
1489
|
-
te = te ||
|
|
1467
|
+
function h(s, o, e) {
|
|
1468
|
+
te = te || C("./_stream_duplex"), s = s || {}, typeof e != "boolean" && (e = o instanceof te), this.objectMode = !!s.objectMode, e && (this.objectMode = this.objectMode || !!s.readableObjectMode), this.highWaterMark = _e(this, s, "readableHighWaterMark", e), this.buffer = new Se(), 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 = s.emitClose !== !1, this.autoDestroy = !!s.autoDestroy, this.destroyed = !1, this.defaultEncoding = s.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, s.encoding && (!ae && (ae = C("string_decoder/").StringDecoder), this.decoder = new ae(s.encoding), this.encoding = s.encoding);
|
|
1490
1469
|
}
|
|
1491
1470
|
function d(s) {
|
|
1492
|
-
if (te = te ||
|
|
1471
|
+
if (te = te || C("./_stream_duplex"), !(this instanceof d)) return new d(s);
|
|
1493
1472
|
var o = this instanceof te;
|
|
1494
|
-
this._readableState = new
|
|
1473
|
+
this._readableState = new h(s, this, o), this.readable = !0, s && (typeof s.read == "function" && (this._read = s.read), typeof s.destroy == "function" && (this._destroy = s.destroy)), oe.call(this);
|
|
1495
1474
|
}
|
|
1496
1475
|
function a(s, o, e, t, r) {
|
|
1497
1476
|
H("readableAddChunk", o);
|
|
1498
1477
|
var u = s._readableState;
|
|
1499
1478
|
if (o === null) u.reading = !1, n(s, u);
|
|
1500
1479
|
else {
|
|
1501
|
-
var
|
|
1502
|
-
if (r || (
|
|
1480
|
+
var v;
|
|
1481
|
+
if (r || (v = L(u, o)), v) P(s, v);
|
|
1503
1482
|
else if (!(u.objectMode || o && 0 < o.length)) t || (u.reading = !1, k(s, u));
|
|
1504
|
-
else if (typeof o == "string" || u.objectMode || Object.getPrototypeOf(o) === de.prototype || (o = S(o)), t) u.endEmitted ?
|
|
1505
|
-
else if (u.ended)
|
|
1483
|
+
else if (typeof o == "string" || u.objectMode || Object.getPrototypeOf(o) === de.prototype || (o = S(o)), t) u.endEmitted ? P(s, new A()) : g(s, u, o, !0);
|
|
1484
|
+
else if (u.ended) P(s, new he());
|
|
1506
1485
|
else {
|
|
1507
1486
|
if (u.destroyed) return !1;
|
|
1508
1487
|
u.reading = !1, u.decoder && !e ? (o = u.decoder.write(o), u.objectMode || o.length !== 0 ? g(s, u, o, !1) : k(s, u)) : g(s, u, o, !1);
|
|
@@ -1511,7 +1490,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1511
1490
|
return !u.ended && (u.length < u.highWaterMark || u.length === 0);
|
|
1512
1491
|
}
|
|
1513
1492
|
function g(s, o, e, t) {
|
|
1514
|
-
o.flowing && o.length === 0 && !o.sync ? (o.awaitDrain = 0, s.emit("data", e)) : (o.length += o.objectMode ? 1 : e.length, t ? o.buffer.unshift(e) : o.buffer.push(e), o.needReadable &&
|
|
1493
|
+
o.flowing && o.length === 0 && !o.sync ? (o.awaitDrain = 0, s.emit("data", e)) : (o.length += o.objectMode ? 1 : e.length, t ? o.buffer.unshift(e) : o.buffer.push(e), o.needReadable && l(s)), k(s, o);
|
|
1515
1494
|
}
|
|
1516
1495
|
function L(s, o) {
|
|
1517
1496
|
var e;
|
|
@@ -1521,11 +1500,11 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1521
1500
|
"Uint8Array"
|
|
1522
1501
|
], o)), e;
|
|
1523
1502
|
}
|
|
1524
|
-
function
|
|
1503
|
+
function _(s) {
|
|
1525
1504
|
return 1073741824 <= s ? s = 1073741824 : (s--, s |= s >>> 1, s |= s >>> 2, s |= s >>> 4, s |= s >>> 8, s |= s >>> 16, s++), s;
|
|
1526
1505
|
}
|
|
1527
1506
|
function b(s, o) {
|
|
1528
|
-
return 0 >= s || o.length === 0 && o.ended ? 0 : o.objectMode ? 1 : s === s ? (s > o.highWaterMark && (o.highWaterMark =
|
|
1507
|
+
return 0 >= s || o.length === 0 && o.ended ? 0 : o.objectMode ? 1 : s === s ? (s > o.highWaterMark && (o.highWaterMark = _(s)), s <= o.length ? s : o.ended ? o.length : (o.needReadable = !0, 0)) : o.flowing && o.length ? o.buffer.head.data.length : o.length;
|
|
1529
1508
|
}
|
|
1530
1509
|
function n(s, o) {
|
|
1531
1510
|
if (H("onEofChunk"), !o.ended) {
|
|
@@ -1533,19 +1512,19 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1533
1512
|
var e = o.decoder.end();
|
|
1534
1513
|
e && e.length && (o.buffer.push(e), o.length += o.objectMode ? 1 : e.length);
|
|
1535
1514
|
}
|
|
1536
|
-
o.ended = !0, o.sync ?
|
|
1515
|
+
o.ended = !0, o.sync ? l(s) : (o.needReadable = !1, !o.emittedReadable && (o.emittedReadable = !0, y(s)));
|
|
1537
1516
|
}
|
|
1538
1517
|
}
|
|
1539
|
-
function
|
|
1518
|
+
function l(s) {
|
|
1540
1519
|
var o = s._readableState;
|
|
1541
|
-
H("emitReadable", o.needReadable, o.emittedReadable), o.needReadable = !1, o.emittedReadable || (H("emitReadable", o.flowing), o.emittedReadable = !0,
|
|
1520
|
+
H("emitReadable", o.needReadable, o.emittedReadable), o.needReadable = !1, o.emittedReadable || (H("emitReadable", o.flowing), o.emittedReadable = !0, w.nextTick(y, s));
|
|
1542
1521
|
}
|
|
1543
1522
|
function y(s) {
|
|
1544
1523
|
var o = s._readableState;
|
|
1545
1524
|
H("emitReadable_", o.destroyed, o.length, o.ended), !o.destroyed && (o.length || o.ended) && (s.emit("readable"), o.emittedReadable = !1), o.needReadable = !o.flowing && !o.ended && o.length <= o.highWaterMark, B(s);
|
|
1546
1525
|
}
|
|
1547
1526
|
function k(s, o) {
|
|
1548
|
-
o.readingMore || (o.readingMore = !0,
|
|
1527
|
+
o.readingMore || (o.readingMore = !0, w.nextTick(f, s, o));
|
|
1549
1528
|
}
|
|
1550
1529
|
function f(s, o) {
|
|
1551
1530
|
for (; !o.reading && !o.ended && (o.length < o.highWaterMark || o.flowing && o.length === 0); ) {
|
|
@@ -1560,15 +1539,15 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1560
1539
|
H("pipeOnDrain", o.awaitDrain), o.awaitDrain && o.awaitDrain--, o.awaitDrain === 0 && Ee(s, "data") && (o.flowing = !0, B(s));
|
|
1561
1540
|
};
|
|
1562
1541
|
}
|
|
1563
|
-
function
|
|
1542
|
+
function M(s) {
|
|
1564
1543
|
var o = s._readableState;
|
|
1565
1544
|
o.readableListening = 0 < s.listenerCount("readable"), o.resumeScheduled && !o.paused ? o.flowing = !0 : 0 < s.listenerCount("data") && s.resume();
|
|
1566
1545
|
}
|
|
1567
1546
|
function p(s) {
|
|
1568
1547
|
H("readable nexttick read 0"), s.read(0);
|
|
1569
1548
|
}
|
|
1570
|
-
function
|
|
1571
|
-
o.resumeScheduled || (o.resumeScheduled = !0,
|
|
1549
|
+
function m(s, o) {
|
|
1550
|
+
o.resumeScheduled || (o.resumeScheduled = !0, w.nextTick(I, s, o));
|
|
1572
1551
|
}
|
|
1573
1552
|
function I(s, o) {
|
|
1574
1553
|
H("resume", o.reading), o.reading || s.read(0), o.resumeScheduled = !1, s.emit("resume"), B(s), o.flowing && !o.reading && s.read(0);
|
|
@@ -1584,7 +1563,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1584
1563
|
}
|
|
1585
1564
|
function z(s) {
|
|
1586
1565
|
var o = s._readableState;
|
|
1587
|
-
H("endReadable", o.endEmitted), o.endEmitted || (o.ended = !0,
|
|
1566
|
+
H("endReadable", o.endEmitted), o.endEmitted || (o.ended = !0, w.nextTick(K, o, s));
|
|
1588
1567
|
}
|
|
1589
1568
|
function K(s, o) {
|
|
1590
1569
|
if (H("endReadableNT", s.endEmitted, s.length), !s.endEmitted && s.length === 0 && (s.endEmitted = !0, o.readable = !1, o.emit("end"), s.autoDestroy)) {
|
|
@@ -1596,20 +1575,20 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1596
1575
|
for (var e = 0, t = s.length; e < t; e++) if (s[e] === o) return e;
|
|
1597
1576
|
return -1;
|
|
1598
1577
|
}
|
|
1599
|
-
|
|
1578
|
+
N.exports = d;
|
|
1600
1579
|
var te;
|
|
1601
|
-
d.ReadableState =
|
|
1580
|
+
d.ReadableState = h;
|
|
1602
1581
|
var H;
|
|
1603
|
-
|
|
1582
|
+
C("events").EventEmitter;
|
|
1604
1583
|
var Ee = function(s, o) {
|
|
1605
1584
|
return s.listeners(o).length;
|
|
1606
|
-
}, oe =
|
|
1607
|
-
}, Q =
|
|
1585
|
+
}, oe = C("./internal/streams/stream"), de = C("buffer").Buffer, J = c.Uint8Array || function() {
|
|
1586
|
+
}, Q = C("util");
|
|
1608
1587
|
H = Q && Q.debuglog ? Q.debuglog("stream") : function() {
|
|
1609
1588
|
};
|
|
1610
|
-
var ae, pe, ge, Se =
|
|
1611
|
-
|
|
1612
|
-
var
|
|
1589
|
+
var ae, pe, ge, Se = C("./internal/streams/buffer_list"), me = C("./internal/streams/destroy"), _e = C("./internal/streams/state").getHighWaterMark, ye = C("../errors").codes, ce = ye.ERR_INVALID_ARG_TYPE, he = ye.ERR_STREAM_PUSH_AFTER_EOF, E = ye.ERR_METHOD_NOT_IMPLEMENTED, A = ye.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
1590
|
+
C("inherits")(d, oe);
|
|
1591
|
+
var P = me.errorOrDestroy, W = [
|
|
1613
1592
|
"error",
|
|
1614
1593
|
"close",
|
|
1615
1594
|
"destroy",
|
|
@@ -1634,7 +1613,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1634
1613
|
}, d.prototype.isPaused = function() {
|
|
1635
1614
|
return this._readableState.flowing === !1;
|
|
1636
1615
|
}, d.prototype.setEncoding = function(s) {
|
|
1637
|
-
ae || (ae =
|
|
1616
|
+
ae || (ae = C("string_decoder/").StringDecoder);
|
|
1638
1617
|
var o = new ae(s);
|
|
1639
1618
|
this._readableState.decoder = o, this._readableState.encoding = this._readableState.decoder.encoding;
|
|
1640
1619
|
for (var e = this._readableState.buffer.head, t = ""; e !== null; ) t += o.write(e.data), e = e.next;
|
|
@@ -1642,37 +1621,37 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1642
1621
|
}, d.prototype.read = function(s) {
|
|
1643
1622
|
H("read", s), s = parseInt(s, 10);
|
|
1644
1623
|
var o = this._readableState, e = s;
|
|
1645
|
-
if (s !== 0 && (o.emittedReadable = !1), s === 0 && o.needReadable && ((o.highWaterMark === 0 ? 0 < o.length : o.length >= o.highWaterMark) || o.ended)) return H("read: emitReadable", o.length, o.ended), o.length === 0 && o.ended ? z(this) :
|
|
1624
|
+
if (s !== 0 && (o.emittedReadable = !1), s === 0 && o.needReadable && ((o.highWaterMark === 0 ? 0 < o.length : o.length >= o.highWaterMark) || o.ended)) return H("read: emitReadable", o.length, o.ended), o.length === 0 && o.ended ? z(this) : l(this), null;
|
|
1646
1625
|
if (s = b(s, o), s === 0 && o.ended) return o.length === 0 && z(this), null;
|
|
1647
1626
|
var t = o.needReadable;
|
|
1648
1627
|
H("need readable", t), (o.length === 0 || o.length - s < o.highWaterMark) && (t = !0, H("length less than watermark", t)), o.ended || o.reading ? (t = !1, H("reading or ended", t)) : t && (H("do read"), o.reading = !0, o.sync = !0, o.length === 0 && (o.needReadable = !0), this._read(o.highWaterMark), o.sync = !1, !o.reading && (s = b(e, o)));
|
|
1649
1628
|
var r;
|
|
1650
1629
|
return r = 0 < s ? V(s, o) : null, r === null ? (o.needReadable = o.length <= o.highWaterMark, s = 0) : (o.length -= s, o.awaitDrain = 0), o.length === 0 && (!o.ended && (o.needReadable = !0), e !== s && o.ended && z(this)), r !== null && this.emit("data", r), r;
|
|
1651
1630
|
}, d.prototype._read = function() {
|
|
1652
|
-
|
|
1631
|
+
P(this, new E("_read()"));
|
|
1653
1632
|
}, d.prototype.pipe = function(s, o) {
|
|
1654
|
-
function e(
|
|
1655
|
-
H("onunpipe"),
|
|
1633
|
+
function e(le, fe) {
|
|
1634
|
+
H("onunpipe"), le === $ && fe && fe.hasUnpiped === !1 && (fe.hasUnpiped = !0, r());
|
|
1656
1635
|
}
|
|
1657
1636
|
function t() {
|
|
1658
1637
|
H("onend"), s.end();
|
|
1659
1638
|
}
|
|
1660
1639
|
function r() {
|
|
1661
|
-
H("cleanup"), s.removeListener("close",
|
|
1640
|
+
H("cleanup"), s.removeListener("close", x), s.removeListener("finish", q), s.removeListener("drain", ee), s.removeListener("error", v), s.removeListener("unpipe", e), $.removeListener("end", t), $.removeListener("end", G), $.removeListener("data", u), we = !0, Y.awaitDrain && (!s._writableState || s._writableState.needDrain) && ee();
|
|
1662
1641
|
}
|
|
1663
|
-
function u(
|
|
1642
|
+
function u(le) {
|
|
1664
1643
|
H("ondata");
|
|
1665
|
-
var fe = s.write(
|
|
1666
|
-
H("dest.write", fe), fe === !1 && ((Y.pipesCount === 1 && Y.pipes === s || 1 < Y.pipesCount && Z(Y.pipes, s) !== -1) && !
|
|
1644
|
+
var fe = s.write(le);
|
|
1645
|
+
H("dest.write", fe), fe === !1 && ((Y.pipesCount === 1 && Y.pipes === s || 1 < Y.pipesCount && Z(Y.pipes, s) !== -1) && !we && (H("false write response, pause", Y.awaitDrain), Y.awaitDrain++), $.pause());
|
|
1667
1646
|
}
|
|
1668
|
-
function
|
|
1669
|
-
H("onerror",
|
|
1647
|
+
function v(le) {
|
|
1648
|
+
H("onerror", le), G(), s.removeListener("error", v), Ee(s, "error") === 0 && P(s, le);
|
|
1670
1649
|
}
|
|
1671
|
-
function
|
|
1650
|
+
function x() {
|
|
1672
1651
|
s.removeListener("finish", q), G();
|
|
1673
1652
|
}
|
|
1674
1653
|
function q() {
|
|
1675
|
-
H("onfinish"), s.removeListener("close",
|
|
1654
|
+
H("onfinish"), s.removeListener("close", x), G();
|
|
1676
1655
|
}
|
|
1677
1656
|
function G() {
|
|
1678
1657
|
H("unpipe"), $.unpipe(s);
|
|
@@ -1689,12 +1668,12 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1689
1668
|
Y.pipes.push(s);
|
|
1690
1669
|
}
|
|
1691
1670
|
Y.pipesCount += 1, H("pipe count=%d opts=%j", Y.pipesCount, o);
|
|
1692
|
-
var X = (!o || o.end !== !1) && s !==
|
|
1693
|
-
Y.endEmitted ?
|
|
1671
|
+
var X = (!o || o.end !== !1) && s !== w.stdout && s !== w.stderr ? t : G;
|
|
1672
|
+
Y.endEmitted ? w.nextTick(X) : $.once("end", X), s.on("unpipe", e);
|
|
1694
1673
|
var ee = T($);
|
|
1695
1674
|
s.on("drain", ee);
|
|
1696
|
-
var
|
|
1697
|
-
return $.on("data", u), i(s, "error",
|
|
1675
|
+
var we = !1;
|
|
1676
|
+
return $.on("data", u), i(s, "error", v), s.once("close", x), s.once("finish", q), s.emit("pipe", $), Y.flowing || (H("pipe resume"), $.resume()), s;
|
|
1698
1677
|
}, d.prototype.unpipe = function(s) {
|
|
1699
1678
|
var o = this._readableState, e = { hasUnpiped: !1 };
|
|
1700
1679
|
if (o.pipesCount === 0) return this;
|
|
@@ -1705,43 +1684,43 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1705
1684
|
for (var u = 0; u < r; u++) t[u].emit("unpipe", this, { hasUnpiped: !1 });
|
|
1706
1685
|
return this;
|
|
1707
1686
|
}
|
|
1708
|
-
var
|
|
1709
|
-
return
|
|
1687
|
+
var v = Z(o.pipes, s);
|
|
1688
|
+
return v === -1 ? this : (o.pipes.splice(v, 1), o.pipesCount -= 1, o.pipesCount === 1 && (o.pipes = o.pipes[0]), s.emit("unpipe", this, e), this);
|
|
1710
1689
|
}, d.prototype.on = function(s, o) {
|
|
1711
1690
|
var e = oe.prototype.on.call(this, s, o), t = this._readableState;
|
|
1712
|
-
return s === "data" ? (t.readableListening = 0 < this.listenerCount("readable"), t.flowing !== !1 && this.resume()) : s == "readable" && !t.endEmitted && !t.readableListening && (t.readableListening = t.needReadable = !0, t.flowing = !1, t.emittedReadable = !1, H("on readable", t.length, t.reading), t.length ?
|
|
1691
|
+
return s === "data" ? (t.readableListening = 0 < this.listenerCount("readable"), t.flowing !== !1 && this.resume()) : s == "readable" && !t.endEmitted && !t.readableListening && (t.readableListening = t.needReadable = !0, t.flowing = !1, t.emittedReadable = !1, H("on readable", t.length, t.reading), t.length ? l(this) : !t.reading && w.nextTick(p, this)), e;
|
|
1713
1692
|
}, d.prototype.addListener = d.prototype.on, d.prototype.removeListener = function(s, o) {
|
|
1714
1693
|
var e = oe.prototype.removeListener.call(this, s, o);
|
|
1715
|
-
return s === "readable" &&
|
|
1694
|
+
return s === "readable" && w.nextTick(M, this), e;
|
|
1716
1695
|
}, d.prototype.removeAllListeners = function(s) {
|
|
1717
1696
|
var o = oe.prototype.removeAllListeners.apply(this, arguments);
|
|
1718
|
-
return (s === "readable" || s === void 0) &&
|
|
1697
|
+
return (s === "readable" || s === void 0) && w.nextTick(M, this), o;
|
|
1719
1698
|
}, d.prototype.resume = function() {
|
|
1720
1699
|
var s = this._readableState;
|
|
1721
|
-
return s.flowing || (H("resume"), s.flowing = !s.readableListening,
|
|
1700
|
+
return s.flowing || (H("resume"), s.flowing = !s.readableListening, m(this, s)), s.paused = !1, this;
|
|
1722
1701
|
}, d.prototype.pause = function() {
|
|
1723
1702
|
return H("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (H("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
|
|
1724
1703
|
}, d.prototype.wrap = function(s) {
|
|
1725
1704
|
var o = this, e = this._readableState, t = !1;
|
|
1726
1705
|
for (var r in s.on("end", function() {
|
|
1727
1706
|
if (H("wrapped end"), e.decoder && !e.ended) {
|
|
1728
|
-
var
|
|
1729
|
-
|
|
1707
|
+
var v = e.decoder.end();
|
|
1708
|
+
v && v.length && o.push(v);
|
|
1730
1709
|
}
|
|
1731
1710
|
o.push(null);
|
|
1732
|
-
}), s.on("data", function(
|
|
1733
|
-
H("wrapped data"), e.decoder && (
|
|
1734
|
-
}), s) this[r] === void 0 && typeof s[r] == "function" && (this[r] = /* @__PURE__ */ (function(
|
|
1711
|
+
}), s.on("data", function(v) {
|
|
1712
|
+
H("wrapped data"), e.decoder && (v = e.decoder.write(v)), !(e.objectMode && v == null) && (e.objectMode || v && v.length) && (o.push(v) || (t = !0, s.pause()));
|
|
1713
|
+
}), s) this[r] === void 0 && typeof s[r] == "function" && (this[r] = /* @__PURE__ */ (function(v) {
|
|
1735
1714
|
return function() {
|
|
1736
|
-
return s[
|
|
1715
|
+
return s[v].apply(s, arguments);
|
|
1737
1716
|
};
|
|
1738
1717
|
})(r));
|
|
1739
1718
|
for (var u = 0; u < W.length; u++) s.on(W[u], this.emit.bind(this, W[u]));
|
|
1740
|
-
return this._read = function(
|
|
1741
|
-
H("wrapped _read",
|
|
1719
|
+
return this._read = function(v) {
|
|
1720
|
+
H("wrapped _read", v), t && (t = !1, s.resume());
|
|
1742
1721
|
}, this;
|
|
1743
1722
|
}, typeof Symbol == "function" && (d.prototype[Symbol.asyncIterator] = function() {
|
|
1744
|
-
return pe === void 0 && (pe =
|
|
1723
|
+
return pe === void 0 && (pe = C("./internal/streams/async_iterator")), pe(this);
|
|
1745
1724
|
}), Object.defineProperty(d.prototype, "readableHighWaterMark", {
|
|
1746
1725
|
enumerable: !1,
|
|
1747
1726
|
get: function() {
|
|
@@ -1766,10 +1745,10 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1766
1745
|
return this._readableState.length;
|
|
1767
1746
|
}
|
|
1768
1747
|
}), typeof Symbol == "function" && (d.from = function(s, o) {
|
|
1769
|
-
return ge === void 0 && (ge =
|
|
1748
|
+
return ge === void 0 && (ge = C("./internal/streams/from")), ge(d, s, o);
|
|
1770
1749
|
});
|
|
1771
1750
|
}).call(this);
|
|
1772
|
-
}).call(this,
|
|
1751
|
+
}).call(this, C("_process"), typeof global > "u" ? typeof self > "u" ? typeof window > "u" ? {} : window : self : global);
|
|
1773
1752
|
}, {
|
|
1774
1753
|
"../errors": 15,
|
|
1775
1754
|
"./_stream_duplex": 16,
|
|
@@ -1786,56 +1765,56 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1786
1765
|
"string_decoder/": 31,
|
|
1787
1766
|
util: 2
|
|
1788
1767
|
}],
|
|
1789
|
-
19: [function(
|
|
1768
|
+
19: [function(C, N) {
|
|
1790
1769
|
"use strict";
|
|
1791
|
-
function _
|
|
1770
|
+
function w(_, b) {
|
|
1792
1771
|
var n = this._transformState;
|
|
1793
1772
|
n.transforming = !1;
|
|
1794
|
-
var
|
|
1795
|
-
if (
|
|
1796
|
-
n.writechunk = null, n.writecb = null, b != null && this.push(b),
|
|
1773
|
+
var l = n.writecb;
|
|
1774
|
+
if (l === null) return this.emit("error", new d());
|
|
1775
|
+
n.writechunk = null, n.writecb = null, b != null && this.push(b), l(_);
|
|
1797
1776
|
var y = this._readableState;
|
|
1798
1777
|
y.reading = !1, (y.needReadable || y.length < y.highWaterMark) && this._read(y.highWaterMark);
|
|
1799
1778
|
}
|
|
1800
|
-
function c(
|
|
1801
|
-
return this instanceof c ? (L.call(this,
|
|
1802
|
-
afterTransform:
|
|
1779
|
+
function c(_) {
|
|
1780
|
+
return this instanceof c ? (L.call(this, _), this._transformState = {
|
|
1781
|
+
afterTransform: w.bind(this),
|
|
1803
1782
|
needTransform: !1,
|
|
1804
1783
|
transforming: !1,
|
|
1805
1784
|
writecb: null,
|
|
1806
1785
|
writechunk: null,
|
|
1807
1786
|
writeencoding: null
|
|
1808
|
-
}, this._readableState.needReadable = !0, this._readableState.sync = !1,
|
|
1787
|
+
}, this._readableState.needReadable = !0, this._readableState.sync = !1, _ && (typeof _.transform == "function" && (this._transform = _.transform), typeof _.flush == "function" && (this._flush = _.flush)), void this.on("prefinish", S)) : new c(_);
|
|
1809
1788
|
}
|
|
1810
1789
|
function S() {
|
|
1811
|
-
var
|
|
1790
|
+
var _ = this;
|
|
1812
1791
|
typeof this._flush != "function" || this._readableState.destroyed ? O(this, null, null) : this._flush(function(b, n) {
|
|
1813
|
-
O(
|
|
1792
|
+
O(_, b, n);
|
|
1814
1793
|
});
|
|
1815
1794
|
}
|
|
1816
|
-
function O(
|
|
1817
|
-
if (b) return
|
|
1818
|
-
if (n != null &&
|
|
1819
|
-
if (
|
|
1820
|
-
return
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
var i =
|
|
1824
|
-
|
|
1825
|
-
return this._transformState.needTransform = !1, L.prototype.push.call(this,
|
|
1826
|
-
}, c.prototype._transform = function(
|
|
1827
|
-
n(new
|
|
1828
|
-
}, c.prototype._write = function(
|
|
1829
|
-
var
|
|
1830
|
-
if (
|
|
1795
|
+
function O(_, b, n) {
|
|
1796
|
+
if (b) return _.emit("error", b);
|
|
1797
|
+
if (n != null && _.push(n), _._writableState.length) throw new g();
|
|
1798
|
+
if (_._transformState.transforming) throw new a();
|
|
1799
|
+
return _.push(null);
|
|
1800
|
+
}
|
|
1801
|
+
N.exports = c;
|
|
1802
|
+
var i = C("../errors").codes, h = i.ERR_METHOD_NOT_IMPLEMENTED, d = i.ERR_MULTIPLE_CALLBACK, a = i.ERR_TRANSFORM_ALREADY_TRANSFORMING, g = i.ERR_TRANSFORM_WITH_LENGTH_0, L = C("./_stream_duplex");
|
|
1803
|
+
C("inherits")(c, L), c.prototype.push = function(_, b) {
|
|
1804
|
+
return this._transformState.needTransform = !1, L.prototype.push.call(this, _, b);
|
|
1805
|
+
}, c.prototype._transform = function(_, b, n) {
|
|
1806
|
+
n(new h("_transform()"));
|
|
1807
|
+
}, c.prototype._write = function(_, b, n) {
|
|
1808
|
+
var l = this._transformState;
|
|
1809
|
+
if (l.writecb = n, l.writechunk = _, l.writeencoding = b, !l.transforming) {
|
|
1831
1810
|
var y = this._readableState;
|
|
1832
|
-
(
|
|
1811
|
+
(l.needTransform || y.needReadable || y.length < y.highWaterMark) && this._read(y.highWaterMark);
|
|
1833
1812
|
}
|
|
1834
1813
|
}, c.prototype._read = function() {
|
|
1835
|
-
var
|
|
1836
|
-
|
|
1837
|
-
}, c.prototype._destroy = function(
|
|
1838
|
-
L.prototype._destroy.call(this,
|
|
1814
|
+
var _ = this._transformState;
|
|
1815
|
+
_.writechunk === null || _.transforming ? _.needTransform = !0 : (_.transforming = !0, this._transform(_.writechunk, _.writeencoding, _.afterTransform));
|
|
1816
|
+
}, c.prototype._destroy = function(_, b) {
|
|
1817
|
+
L.prototype._destroy.call(this, _, function(n) {
|
|
1839
1818
|
b(n);
|
|
1840
1819
|
});
|
|
1841
1820
|
};
|
|
@@ -1844,51 +1823,51 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1844
1823
|
"./_stream_duplex": 16,
|
|
1845
1824
|
inherits: 10
|
|
1846
1825
|
}],
|
|
1847
|
-
20: [function(
|
|
1848
|
-
(function(
|
|
1826
|
+
20: [function(C, N) {
|
|
1827
|
+
(function(w, c) {
|
|
1849
1828
|
(function() {
|
|
1850
1829
|
"use strict";
|
|
1851
|
-
function S(
|
|
1830
|
+
function S(E) {
|
|
1852
1831
|
var A = this;
|
|
1853
1832
|
this.next = null, this.entry = null, this.finish = function() {
|
|
1854
|
-
z(A,
|
|
1833
|
+
z(A, E);
|
|
1855
1834
|
};
|
|
1856
1835
|
}
|
|
1857
|
-
function O(
|
|
1858
|
-
return H.from(
|
|
1836
|
+
function O(E) {
|
|
1837
|
+
return H.from(E);
|
|
1859
1838
|
}
|
|
1860
|
-
function i(
|
|
1861
|
-
return H.isBuffer(
|
|
1839
|
+
function i(E) {
|
|
1840
|
+
return H.isBuffer(E) || E instanceof Ee;
|
|
1862
1841
|
}
|
|
1863
|
-
function
|
|
1842
|
+
function h() {
|
|
1864
1843
|
}
|
|
1865
|
-
function d(
|
|
1866
|
-
K = K ||
|
|
1867
|
-
var W =
|
|
1868
|
-
this.decodeStrings = !W, this.defaultEncoding =
|
|
1844
|
+
function d(E, A, P) {
|
|
1845
|
+
K = K || C("./_stream_duplex"), E = E || {}, typeof P != "boolean" && (P = A instanceof K), this.objectMode = !!E.objectMode, P && (this.objectMode = this.objectMode || !!E.writableObjectMode), this.highWaterMark = de(this, E, "writableHighWaterMark", P), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
|
1846
|
+
var W = E.decodeStrings === !1;
|
|
1847
|
+
this.decodeStrings = !W, this.defaultEncoding = E.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(s) {
|
|
1869
1848
|
k(A, s);
|
|
1870
|
-
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose =
|
|
1849
|
+
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = E.emitClose !== !1, this.autoDestroy = !!E.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new S(this);
|
|
1871
1850
|
}
|
|
1872
|
-
function a(
|
|
1873
|
-
K = K ||
|
|
1851
|
+
function a(E) {
|
|
1852
|
+
K = K || C("./_stream_duplex");
|
|
1874
1853
|
var A = this instanceof K;
|
|
1875
|
-
return A ||
|
|
1854
|
+
return A || he.call(a, this) ? (this._writableState = new d(E, this, A), this.writable = !0, E && (typeof E.write == "function" && (this._write = E.write), typeof E.writev == "function" && (this._writev = E.writev), typeof E.destroy == "function" && (this._destroy = E.destroy), typeof E.final == "function" && (this._final = E.final)), void te.call(this)) : new a(E);
|
|
1876
1855
|
}
|
|
1877
|
-
function g(
|
|
1878
|
-
var
|
|
1879
|
-
ce(
|
|
1856
|
+
function g(E, A) {
|
|
1857
|
+
var P = new _e();
|
|
1858
|
+
ce(E, P), w.nextTick(A, P);
|
|
1880
1859
|
}
|
|
1881
|
-
function L(
|
|
1860
|
+
function L(E, A, P, W) {
|
|
1882
1861
|
var s;
|
|
1883
|
-
return
|
|
1862
|
+
return P === null ? s = new me() : typeof P != "string" && !A.objectMode && (s = new Q("chunk", ["string", "Buffer"], P)), !s || (ce(E, s), w.nextTick(W, s), !1);
|
|
1884
1863
|
}
|
|
1885
|
-
function
|
|
1886
|
-
return
|
|
1864
|
+
function _(E, A, P) {
|
|
1865
|
+
return E.objectMode || E.decodeStrings === !1 || typeof A != "string" || (A = H.from(A, P)), A;
|
|
1887
1866
|
}
|
|
1888
|
-
function b(
|
|
1889
|
-
if (!
|
|
1890
|
-
var e =
|
|
1891
|
-
W !== e && (
|
|
1867
|
+
function b(E, A, P, W, s, o) {
|
|
1868
|
+
if (!P) {
|
|
1869
|
+
var e = _(A, W, s);
|
|
1870
|
+
W !== e && (P = !0, s = "buffer", W = e);
|
|
1892
1871
|
}
|
|
1893
1872
|
var t = A.objectMode ? 1 : W.length;
|
|
1894
1873
|
A.length += t;
|
|
@@ -1898,91 +1877,91 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1898
1877
|
A.lastBufferedRequest = {
|
|
1899
1878
|
chunk: W,
|
|
1900
1879
|
encoding: s,
|
|
1901
|
-
isBuf:
|
|
1880
|
+
isBuf: P,
|
|
1902
1881
|
callback: o,
|
|
1903
1882
|
next: null
|
|
1904
1883
|
}, u ? u.next = A.lastBufferedRequest : A.bufferedRequest = A.lastBufferedRequest, A.bufferedRequestCount += 1;
|
|
1905
|
-
} else n(
|
|
1884
|
+
} else n(E, A, !1, t, W, s, o);
|
|
1906
1885
|
return r;
|
|
1907
1886
|
}
|
|
1908
|
-
function n(
|
|
1909
|
-
A.writelen = W, A.writecb = e, A.writing = !0, A.sync = !0, A.destroyed ? A.onwrite(new Se("write")) :
|
|
1887
|
+
function n(E, A, P, W, s, o, e) {
|
|
1888
|
+
A.writelen = W, A.writecb = e, A.writing = !0, A.sync = !0, A.destroyed ? A.onwrite(new Se("write")) : P ? E._writev(s, A.onwrite) : E._write(s, o, A.onwrite), A.sync = !1;
|
|
1910
1889
|
}
|
|
1911
|
-
function
|
|
1912
|
-
--A.pendingcb,
|
|
1890
|
+
function l(E, A, P, W, s) {
|
|
1891
|
+
--A.pendingcb, P ? (w.nextTick(s, W), w.nextTick(B, E, A), E._writableState.errorEmitted = !0, ce(E, W)) : (s(W), E._writableState.errorEmitted = !0, ce(E, W), B(E, A));
|
|
1913
1892
|
}
|
|
1914
|
-
function y(
|
|
1915
|
-
|
|
1893
|
+
function y(E) {
|
|
1894
|
+
E.writing = !1, E.writecb = null, E.length -= E.writelen, E.writelen = 0;
|
|
1916
1895
|
}
|
|
1917
|
-
function k(
|
|
1918
|
-
var
|
|
1896
|
+
function k(E, A) {
|
|
1897
|
+
var P = E._writableState, W = P.sync, s = P.writecb;
|
|
1919
1898
|
if (typeof s != "function") throw new pe();
|
|
1920
|
-
if (y(
|
|
1899
|
+
if (y(P), A) l(E, P, W, A, s);
|
|
1921
1900
|
else {
|
|
1922
|
-
var o = p(
|
|
1923
|
-
o ||
|
|
1901
|
+
var o = p(P) || E.destroyed;
|
|
1902
|
+
o || P.corked || P.bufferProcessing || !P.bufferedRequest || M(E, P), W ? w.nextTick(f, E, P, o, s) : f(E, P, o, s);
|
|
1924
1903
|
}
|
|
1925
1904
|
}
|
|
1926
|
-
function f(
|
|
1927
|
-
|
|
1905
|
+
function f(E, A, P, W) {
|
|
1906
|
+
P || T(E, A), A.pendingcb--, W(), B(E, A);
|
|
1928
1907
|
}
|
|
1929
|
-
function T(
|
|
1930
|
-
A.length === 0 && A.needDrain && (A.needDrain = !1,
|
|
1908
|
+
function T(E, A) {
|
|
1909
|
+
A.length === 0 && A.needDrain && (A.needDrain = !1, E.emit("drain"));
|
|
1931
1910
|
}
|
|
1932
|
-
function
|
|
1911
|
+
function M(E, A) {
|
|
1933
1912
|
A.bufferProcessing = !0;
|
|
1934
|
-
var
|
|
1935
|
-
if (
|
|
1913
|
+
var P = A.bufferedRequest;
|
|
1914
|
+
if (E._writev && P && P.next) {
|
|
1936
1915
|
var W = A.bufferedRequestCount, s = Array(W), o = A.corkedRequestsFree;
|
|
1937
|
-
o.entry =
|
|
1938
|
-
for (var e = 0, t = !0;
|
|
1939
|
-
s.allBuffers = t, n(
|
|
1916
|
+
o.entry = P;
|
|
1917
|
+
for (var e = 0, t = !0; P; ) s[e] = P, P.isBuf || (t = !1), P = P.next, e += 1;
|
|
1918
|
+
s.allBuffers = t, n(E, A, !0, A.length, s, "", o.finish), A.pendingcb++, A.lastBufferedRequest = null, o.next ? (A.corkedRequestsFree = o.next, o.next = null) : A.corkedRequestsFree = new S(A), A.bufferedRequestCount = 0;
|
|
1940
1919
|
} else {
|
|
1941
|
-
for (;
|
|
1942
|
-
var r =
|
|
1943
|
-
if (n(
|
|
1920
|
+
for (; P; ) {
|
|
1921
|
+
var r = P.chunk, u = P.encoding, v = P.callback;
|
|
1922
|
+
if (n(E, A, !1, A.objectMode ? 1 : r.length, r, u, v), P = P.next, A.bufferedRequestCount--, A.writing) break;
|
|
1944
1923
|
}
|
|
1945
|
-
|
|
1924
|
+
P === null && (A.lastBufferedRequest = null);
|
|
1946
1925
|
}
|
|
1947
|
-
A.bufferedRequest =
|
|
1926
|
+
A.bufferedRequest = P, A.bufferProcessing = !1;
|
|
1948
1927
|
}
|
|
1949
|
-
function p(
|
|
1950
|
-
return
|
|
1928
|
+
function p(E) {
|
|
1929
|
+
return E.ending && E.length === 0 && E.bufferedRequest === null && !E.finished && !E.writing;
|
|
1951
1930
|
}
|
|
1952
|
-
function
|
|
1953
|
-
|
|
1954
|
-
A.pendingcb--,
|
|
1931
|
+
function m(E, A) {
|
|
1932
|
+
E._final(function(P) {
|
|
1933
|
+
A.pendingcb--, P && ce(E, P), A.prefinished = !0, E.emit("prefinish"), B(E, A);
|
|
1955
1934
|
});
|
|
1956
1935
|
}
|
|
1957
|
-
function I(
|
|
1958
|
-
A.prefinished || A.finalCalled || (typeof
|
|
1936
|
+
function I(E, A) {
|
|
1937
|
+
A.prefinished || A.finalCalled || (typeof E._final != "function" || A.destroyed ? (A.prefinished = !0, E.emit("prefinish")) : (A.pendingcb++, A.finalCalled = !0, w.nextTick(m, E, A)));
|
|
1959
1938
|
}
|
|
1960
|
-
function B(
|
|
1961
|
-
var
|
|
1962
|
-
if (
|
|
1963
|
-
var W =
|
|
1964
|
-
(!W || W.autoDestroy && W.endEmitted) &&
|
|
1939
|
+
function B(E, A) {
|
|
1940
|
+
var P = p(A);
|
|
1941
|
+
if (P && (I(E, A), A.pendingcb === 0 && (A.finished = !0, E.emit("finish"), A.autoDestroy))) {
|
|
1942
|
+
var W = E._readableState;
|
|
1943
|
+
(!W || W.autoDestroy && W.endEmitted) && E.destroy();
|
|
1965
1944
|
}
|
|
1966
|
-
return
|
|
1945
|
+
return P;
|
|
1967
1946
|
}
|
|
1968
|
-
function V(
|
|
1969
|
-
A.ending = !0, B(
|
|
1947
|
+
function V(E, A, P) {
|
|
1948
|
+
A.ending = !0, B(E, A), P && (A.finished ? w.nextTick(P) : E.once("finish", P)), A.ended = !0, E.writable = !1;
|
|
1970
1949
|
}
|
|
1971
|
-
function z(
|
|
1972
|
-
var W =
|
|
1973
|
-
for (
|
|
1950
|
+
function z(E, A, P) {
|
|
1951
|
+
var W = E.entry;
|
|
1952
|
+
for (E.entry = null; W; ) {
|
|
1974
1953
|
var s = W.callback;
|
|
1975
|
-
A.pendingcb--, s(
|
|
1954
|
+
A.pendingcb--, s(P), W = W.next;
|
|
1976
1955
|
}
|
|
1977
|
-
A.corkedRequestsFree.next =
|
|
1956
|
+
A.corkedRequestsFree.next = E;
|
|
1978
1957
|
}
|
|
1979
|
-
|
|
1958
|
+
N.exports = a;
|
|
1980
1959
|
var K;
|
|
1981
1960
|
a.WritableState = d;
|
|
1982
|
-
var Z = { deprecate:
|
|
1983
|
-
}, oe =
|
|
1984
|
-
|
|
1985
|
-
for (var
|
|
1961
|
+
var Z = { deprecate: C("util-deprecate") }, te = C("./internal/streams/stream"), H = C("buffer").Buffer, Ee = c.Uint8Array || function() {
|
|
1962
|
+
}, oe = C("./internal/streams/destroy"), de = C("./internal/streams/state").getHighWaterMark, J = C("../errors").codes, Q = J.ERR_INVALID_ARG_TYPE, ae = J.ERR_METHOD_NOT_IMPLEMENTED, pe = J.ERR_MULTIPLE_CALLBACK, ge = J.ERR_STREAM_CANNOT_PIPE, Se = J.ERR_STREAM_DESTROYED, me = J.ERR_STREAM_NULL_VALUES, _e = J.ERR_STREAM_WRITE_AFTER_END, ye = J.ERR_UNKNOWN_ENCODING, ce = oe.errorOrDestroy;
|
|
1963
|
+
C("inherits")(a, te), d.prototype.getBuffer = function() {
|
|
1964
|
+
for (var E = this.bufferedRequest, A = []; E; ) A.push(E), E = E.next;
|
|
1986
1965
|
return A;
|
|
1987
1966
|
}, (function() {
|
|
1988
1967
|
try {
|
|
@@ -1992,23 +1971,23 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
1992
1971
|
} catch {
|
|
1993
1972
|
}
|
|
1994
1973
|
})();
|
|
1995
|
-
var
|
|
1996
|
-
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (
|
|
1997
|
-
return !!
|
|
1998
|
-
} })) :
|
|
1999
|
-
return
|
|
1974
|
+
var he;
|
|
1975
|
+
typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (he = Function.prototype[Symbol.hasInstance], Object.defineProperty(a, Symbol.hasInstance, { value: function(E) {
|
|
1976
|
+
return !!he.call(this, E) || this === a && E && E._writableState instanceof d;
|
|
1977
|
+
} })) : he = function(E) {
|
|
1978
|
+
return E instanceof this;
|
|
2000
1979
|
}, a.prototype.pipe = function() {
|
|
2001
1980
|
ce(this, new ge());
|
|
2002
|
-
}, a.prototype.write = function(
|
|
2003
|
-
var W = this._writableState, s = !1, o = !W.objectMode && i(
|
|
2004
|
-
return o && !H.isBuffer(
|
|
1981
|
+
}, a.prototype.write = function(E, A, P) {
|
|
1982
|
+
var W = this._writableState, s = !1, o = !W.objectMode && i(E);
|
|
1983
|
+
return o && !H.isBuffer(E) && (E = O(E)), typeof A == "function" && (P = A, A = null), o ? A = "buffer" : !A && (A = W.defaultEncoding), typeof P != "function" && (P = h), W.ending ? g(this, P) : (o || L(this, W, E, P)) && (W.pendingcb++, s = b(this, W, o, E, A, P)), s;
|
|
2005
1984
|
}, a.prototype.cork = function() {
|
|
2006
1985
|
this._writableState.corked++;
|
|
2007
1986
|
}, a.prototype.uncork = function() {
|
|
2008
|
-
var
|
|
2009
|
-
|
|
2010
|
-
}, a.prototype.setDefaultEncoding = function(
|
|
2011
|
-
if (typeof
|
|
1987
|
+
var E = this._writableState;
|
|
1988
|
+
E.corked && (E.corked--, !E.writing && !E.corked && !E.bufferProcessing && E.bufferedRequest && M(this, E));
|
|
1989
|
+
}, a.prototype.setDefaultEncoding = function(E) {
|
|
1990
|
+
if (typeof E == "string" && (E = E.toLowerCase()), !(-1 < [
|
|
2012
1991
|
"hex",
|
|
2013
1992
|
"utf8",
|
|
2014
1993
|
"utf-8",
|
|
@@ -2020,8 +1999,8 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2020
1999
|
"utf16le",
|
|
2021
2000
|
"utf-16le",
|
|
2022
2001
|
"raw"
|
|
2023
|
-
].indexOf((
|
|
2024
|
-
return this._writableState.defaultEncoding =
|
|
2002
|
+
].indexOf((E + "").toLowerCase()))) throw new ye(E);
|
|
2003
|
+
return this._writableState.defaultEncoding = E, this;
|
|
2025
2004
|
}, Object.defineProperty(a.prototype, "writableBuffer", {
|
|
2026
2005
|
enumerable: !1,
|
|
2027
2006
|
get: function() {
|
|
@@ -2032,11 +2011,11 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2032
2011
|
get: function() {
|
|
2033
2012
|
return this._writableState.highWaterMark;
|
|
2034
2013
|
}
|
|
2035
|
-
}), a.prototype._write = function(
|
|
2036
|
-
|
|
2037
|
-
}, a.prototype._writev = null, a.prototype.end = function(
|
|
2014
|
+
}), a.prototype._write = function(E, A, P) {
|
|
2015
|
+
P(new ae("_write()"));
|
|
2016
|
+
}, a.prototype._writev = null, a.prototype.end = function(E, A, P) {
|
|
2038
2017
|
var W = this._writableState;
|
|
2039
|
-
return typeof
|
|
2018
|
+
return typeof E == "function" ? (P = E, E = null, A = null) : typeof A == "function" && (P = A, A = null), E != null && this.write(E, A), W.corked && (W.corked = 1, this.uncork()), W.ending || V(this, W, P), this;
|
|
2040
2019
|
}, Object.defineProperty(a.prototype, "writableLength", {
|
|
2041
2020
|
enumerable: !1,
|
|
2042
2021
|
get: function() {
|
|
@@ -2047,14 +2026,14 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2047
2026
|
get: function() {
|
|
2048
2027
|
return this._writableState !== void 0 && this._writableState.destroyed;
|
|
2049
2028
|
},
|
|
2050
|
-
set: function(
|
|
2051
|
-
this._writableState && (this._writableState.destroyed =
|
|
2029
|
+
set: function(E) {
|
|
2030
|
+
this._writableState && (this._writableState.destroyed = E);
|
|
2052
2031
|
}
|
|
2053
|
-
}), a.prototype.destroy = oe.destroy, a.prototype._undestroy = oe.undestroy, a.prototype._destroy = function(
|
|
2054
|
-
A(
|
|
2032
|
+
}), a.prototype.destroy = oe.destroy, a.prototype._undestroy = oe.undestroy, a.prototype._destroy = function(E, A) {
|
|
2033
|
+
A(E);
|
|
2055
2034
|
};
|
|
2056
2035
|
}).call(this);
|
|
2057
|
-
}).call(this,
|
|
2036
|
+
}).call(this, C("_process"), typeof global > "u" ? typeof self > "u" ? typeof window > "u" ? {} : window : self : global);
|
|
2058
2037
|
}, {
|
|
2059
2038
|
"../errors": 15,
|
|
2060
2039
|
"./_stream_duplex": 16,
|
|
@@ -2066,61 +2045,61 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2066
2045
|
inherits: 10,
|
|
2067
2046
|
"util-deprecate": 32
|
|
2068
2047
|
}],
|
|
2069
|
-
21: [function(
|
|
2070
|
-
(function(
|
|
2048
|
+
21: [function(C, N) {
|
|
2049
|
+
(function(w) {
|
|
2071
2050
|
(function() {
|
|
2072
2051
|
"use strict";
|
|
2073
|
-
function c(T,
|
|
2074
|
-
return
|
|
2052
|
+
function c(T, M, p) {
|
|
2053
|
+
return M in T ? Object.defineProperty(T, M, {
|
|
2075
2054
|
value: p,
|
|
2076
2055
|
enumerable: !0,
|
|
2077
2056
|
configurable: !0,
|
|
2078
2057
|
writable: !0
|
|
2079
|
-
}) : T[
|
|
2058
|
+
}) : T[M] = p, T;
|
|
2080
2059
|
}
|
|
2081
|
-
function S(T,
|
|
2060
|
+
function S(T, M) {
|
|
2082
2061
|
return {
|
|
2083
2062
|
value: T,
|
|
2084
|
-
done:
|
|
2063
|
+
done: M
|
|
2085
2064
|
};
|
|
2086
2065
|
}
|
|
2087
2066
|
function O(T) {
|
|
2088
|
-
var
|
|
2089
|
-
if (
|
|
2067
|
+
var M = T[g];
|
|
2068
|
+
if (M !== null) {
|
|
2090
2069
|
var p = T[y].read();
|
|
2091
|
-
p !== null && (T[n] = null, T[g] = null, T[L] = null,
|
|
2070
|
+
p !== null && (T[n] = null, T[g] = null, T[L] = null, M(S(p, !1)));
|
|
2092
2071
|
}
|
|
2093
2072
|
}
|
|
2094
2073
|
function i(T) {
|
|
2095
|
-
|
|
2074
|
+
w.nextTick(O, T);
|
|
2096
2075
|
}
|
|
2097
|
-
function
|
|
2098
|
-
return function(p,
|
|
2076
|
+
function h(T, M) {
|
|
2077
|
+
return function(p, m) {
|
|
2099
2078
|
T.then(function() {
|
|
2100
|
-
|
|
2101
|
-
},
|
|
2079
|
+
M[b] ? p(S(void 0, !0)) : M[l](p, m);
|
|
2080
|
+
}, m);
|
|
2102
2081
|
};
|
|
2103
2082
|
}
|
|
2104
|
-
var d, a =
|
|
2083
|
+
var d, a = C("./end-of-stream"), g = /* @__PURE__ */ Symbol("lastResolve"), L = /* @__PURE__ */ Symbol("lastReject"), _ = /* @__PURE__ */ Symbol("error"), b = /* @__PURE__ */ Symbol("ended"), n = /* @__PURE__ */ Symbol("lastPromise"), l = /* @__PURE__ */ Symbol("handlePromise"), y = /* @__PURE__ */ Symbol("stream"), k = Object.getPrototypeOf(function() {
|
|
2105
2084
|
}), f = Object.setPrototypeOf((d = {
|
|
2106
2085
|
get stream() {
|
|
2107
2086
|
return this[y];
|
|
2108
2087
|
},
|
|
2109
2088
|
next: function() {
|
|
2110
|
-
var T = this,
|
|
2111
|
-
if (
|
|
2089
|
+
var T = this, M = this[_];
|
|
2090
|
+
if (M !== null) return Promise.reject(M);
|
|
2112
2091
|
if (this[b]) return Promise.resolve(S(void 0, !0));
|
|
2113
2092
|
if (this[y].destroyed) return new Promise(function(B, V) {
|
|
2114
|
-
|
|
2115
|
-
T[
|
|
2093
|
+
w.nextTick(function() {
|
|
2094
|
+
T[_] ? V(T[_]) : B(S(void 0, !0));
|
|
2116
2095
|
});
|
|
2117
2096
|
});
|
|
2118
|
-
var p,
|
|
2119
|
-
if (
|
|
2097
|
+
var p, m = this[n];
|
|
2098
|
+
if (m) p = new Promise(h(m, this));
|
|
2120
2099
|
else {
|
|
2121
2100
|
var I = this[y].read();
|
|
2122
2101
|
if (I !== null) return Promise.resolve(S(I, !1));
|
|
2123
|
-
p = new Promise(this[
|
|
2102
|
+
p = new Promise(this[l]);
|
|
2124
2103
|
}
|
|
2125
2104
|
return this[n] = p, p;
|
|
2126
2105
|
}
|
|
@@ -2128,39 +2107,39 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2128
2107
|
return this;
|
|
2129
2108
|
}), c(d, "return", function() {
|
|
2130
2109
|
var T = this;
|
|
2131
|
-
return new Promise(function(
|
|
2132
|
-
T[y].destroy(null, function(
|
|
2133
|
-
|
|
2110
|
+
return new Promise(function(M, p) {
|
|
2111
|
+
T[y].destroy(null, function(m) {
|
|
2112
|
+
m ? p(m) : M(S(void 0, !0));
|
|
2134
2113
|
});
|
|
2135
2114
|
});
|
|
2136
2115
|
}), d), k);
|
|
2137
|
-
|
|
2138
|
-
var
|
|
2116
|
+
N.exports = function(T) {
|
|
2117
|
+
var M, p = Object.create(f, (M = {}, c(M, y, {
|
|
2139
2118
|
value: T,
|
|
2140
2119
|
writable: !0
|
|
2141
|
-
}), c(
|
|
2120
|
+
}), c(M, g, {
|
|
2142
2121
|
value: null,
|
|
2143
2122
|
writable: !0
|
|
2144
|
-
}), c(
|
|
2123
|
+
}), c(M, L, {
|
|
2145
2124
|
value: null,
|
|
2146
2125
|
writable: !0
|
|
2147
|
-
}), c(
|
|
2126
|
+
}), c(M, _, {
|
|
2148
2127
|
value: null,
|
|
2149
2128
|
writable: !0
|
|
2150
|
-
}), c(
|
|
2129
|
+
}), c(M, b, {
|
|
2151
2130
|
value: T._readableState.endEmitted,
|
|
2152
2131
|
writable: !0
|
|
2153
|
-
}), c(
|
|
2154
|
-
value: function(
|
|
2132
|
+
}), c(M, l, {
|
|
2133
|
+
value: function(m, I) {
|
|
2155
2134
|
var B = p[y].read();
|
|
2156
|
-
B ? (p[n] = null, p[g] = null, p[L] = null,
|
|
2135
|
+
B ? (p[n] = null, p[g] = null, p[L] = null, m(S(B, !1))) : (p[g] = m, p[L] = I);
|
|
2157
2136
|
},
|
|
2158
2137
|
writable: !0
|
|
2159
|
-
}),
|
|
2160
|
-
return p[n] = null, a(T, function(
|
|
2161
|
-
if (
|
|
2138
|
+
}), M));
|
|
2139
|
+
return p[n] = null, a(T, function(m) {
|
|
2140
|
+
if (m && m.code !== "ERR_STREAM_PREMATURE_CLOSE") {
|
|
2162
2141
|
var I = p[L];
|
|
2163
|
-
I !== null && (p[n] = null, p[g] = null, p[L] = null, I(
|
|
2142
|
+
I !== null && (p[n] = null, p[g] = null, p[L] = null, I(m)), p[_] = m;
|
|
2164
2143
|
return;
|
|
2165
2144
|
}
|
|
2166
2145
|
var B = p[g];
|
|
@@ -2168,57 +2147,57 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2168
2147
|
}), T.on("readable", i.bind(null, p)), p;
|
|
2169
2148
|
};
|
|
2170
2149
|
}).call(this);
|
|
2171
|
-
}).call(this,
|
|
2150
|
+
}).call(this, C("_process"));
|
|
2172
2151
|
}, {
|
|
2173
2152
|
"./end-of-stream": 24,
|
|
2174
2153
|
_process: 12
|
|
2175
2154
|
}],
|
|
2176
|
-
22: [function(
|
|
2155
|
+
22: [function(C, N) {
|
|
2177
2156
|
"use strict";
|
|
2178
|
-
function _
|
|
2179
|
-
var n = Object.keys(
|
|
2157
|
+
function w(_, b) {
|
|
2158
|
+
var n = Object.keys(_);
|
|
2180
2159
|
if (Object.getOwnPropertySymbols) {
|
|
2181
|
-
var
|
|
2182
|
-
b && (
|
|
2183
|
-
return Object.getOwnPropertyDescriptor(
|
|
2184
|
-
})), n.push.apply(n,
|
|
2160
|
+
var l = Object.getOwnPropertySymbols(_);
|
|
2161
|
+
b && (l = l.filter(function(y) {
|
|
2162
|
+
return Object.getOwnPropertyDescriptor(_, y).enumerable;
|
|
2163
|
+
})), n.push.apply(n, l);
|
|
2185
2164
|
}
|
|
2186
2165
|
return n;
|
|
2187
2166
|
}
|
|
2188
|
-
function c(
|
|
2189
|
-
for (var b, n = 1; n < arguments.length; n++) b = arguments[n] == null ? {} : arguments[n], n % 2 ?
|
|
2190
|
-
S(
|
|
2191
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
2192
|
-
Object.defineProperty(
|
|
2167
|
+
function c(_) {
|
|
2168
|
+
for (var b, n = 1; n < arguments.length; n++) b = arguments[n] == null ? {} : arguments[n], n % 2 ? w(Object(b), !0).forEach(function(l) {
|
|
2169
|
+
S(_, l, b[l]);
|
|
2170
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(_, Object.getOwnPropertyDescriptors(b)) : w(Object(b)).forEach(function(l) {
|
|
2171
|
+
Object.defineProperty(_, l, Object.getOwnPropertyDescriptor(b, l));
|
|
2193
2172
|
});
|
|
2194
|
-
return
|
|
2173
|
+
return _;
|
|
2195
2174
|
}
|
|
2196
|
-
function S(
|
|
2197
|
-
return b in
|
|
2175
|
+
function S(_, b, n) {
|
|
2176
|
+
return b in _ ? Object.defineProperty(_, b, {
|
|
2198
2177
|
value: n,
|
|
2199
2178
|
enumerable: !0,
|
|
2200
2179
|
configurable: !0,
|
|
2201
2180
|
writable: !0
|
|
2202
|
-
}) :
|
|
2181
|
+
}) : _[b] = n, _;
|
|
2203
2182
|
}
|
|
2204
|
-
function O(
|
|
2205
|
-
if (!(
|
|
2183
|
+
function O(_, b) {
|
|
2184
|
+
if (!(_ instanceof b)) throw new TypeError("Cannot call a class as a function");
|
|
2206
2185
|
}
|
|
2207
|
-
function i(
|
|
2208
|
-
for (var n,
|
|
2186
|
+
function i(_, b) {
|
|
2187
|
+
for (var n, l = 0; l < b.length; l++) n = b[l], n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(_, n.key, n);
|
|
2209
2188
|
}
|
|
2210
|
-
function
|
|
2211
|
-
return b && i(
|
|
2189
|
+
function h(_, b, n) {
|
|
2190
|
+
return b && i(_.prototype, b), n && i(_, n), _;
|
|
2212
2191
|
}
|
|
2213
|
-
function d(
|
|
2214
|
-
a.prototype.copy.call(
|
|
2192
|
+
function d(_, b, n) {
|
|
2193
|
+
a.prototype.copy.call(_, b, n);
|
|
2215
2194
|
}
|
|
2216
|
-
var a =
|
|
2217
|
-
|
|
2218
|
-
function
|
|
2219
|
-
O(this,
|
|
2195
|
+
var a = C("buffer").Buffer, g = C("util").inspect, L = g && g.custom || "inspect";
|
|
2196
|
+
N.exports = (function() {
|
|
2197
|
+
function _() {
|
|
2198
|
+
O(this, _), this.head = null, this.tail = null, this.length = 0;
|
|
2220
2199
|
}
|
|
2221
|
-
return
|
|
2200
|
+
return h(_, [
|
|
2222
2201
|
{
|
|
2223
2202
|
key: "push",
|
|
2224
2203
|
value: function(b) {
|
|
@@ -2258,23 +2237,23 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2258
2237
|
key: "join",
|
|
2259
2238
|
value: function(b) {
|
|
2260
2239
|
if (this.length === 0) return "";
|
|
2261
|
-
for (var n = this.head,
|
|
2262
|
-
return
|
|
2240
|
+
for (var n = this.head, l = "" + n.data; n = n.next; ) l += b + n.data;
|
|
2241
|
+
return l;
|
|
2263
2242
|
}
|
|
2264
2243
|
},
|
|
2265
2244
|
{
|
|
2266
2245
|
key: "concat",
|
|
2267
2246
|
value: function(b) {
|
|
2268
2247
|
if (this.length === 0) return a.alloc(0);
|
|
2269
|
-
for (var n = a.allocUnsafe(b >>> 0),
|
|
2248
|
+
for (var n = a.allocUnsafe(b >>> 0), l = this.head, y = 0; l; ) d(l.data, n, y), y += l.data.length, l = l.next;
|
|
2270
2249
|
return n;
|
|
2271
2250
|
}
|
|
2272
2251
|
},
|
|
2273
2252
|
{
|
|
2274
2253
|
key: "consume",
|
|
2275
2254
|
value: function(b, n) {
|
|
2276
|
-
var
|
|
2277
|
-
return b < this.head.data.length ? (
|
|
2255
|
+
var l;
|
|
2256
|
+
return b < this.head.data.length ? (l = this.head.data.slice(0, b), this.head.data = this.head.data.slice(b)) : b === this.head.data.length ? l = this.shift() : l = n ? this._getString(b) : this._getBuffer(b), l;
|
|
2278
2257
|
}
|
|
2279
2258
|
},
|
|
2280
2259
|
{
|
|
@@ -2286,26 +2265,26 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2286
2265
|
{
|
|
2287
2266
|
key: "_getString",
|
|
2288
2267
|
value: function(b) {
|
|
2289
|
-
var n = this.head,
|
|
2268
|
+
var n = this.head, l = 1, y = n.data;
|
|
2290
2269
|
for (b -= y.length; n = n.next; ) {
|
|
2291
2270
|
var k = n.data, f = b > k.length ? k.length : b;
|
|
2292
2271
|
if (y += f === k.length ? k : k.slice(0, b), b -= f, b === 0) {
|
|
2293
|
-
f === k.length ? (++
|
|
2272
|
+
f === k.length ? (++l, this.head = n.next ? n.next : this.tail = null) : (this.head = n, n.data = k.slice(f));
|
|
2294
2273
|
break;
|
|
2295
2274
|
}
|
|
2296
|
-
++
|
|
2275
|
+
++l;
|
|
2297
2276
|
}
|
|
2298
|
-
return this.length -=
|
|
2277
|
+
return this.length -= l, y;
|
|
2299
2278
|
}
|
|
2300
2279
|
},
|
|
2301
2280
|
{
|
|
2302
2281
|
key: "_getBuffer",
|
|
2303
2282
|
value: function(b) {
|
|
2304
|
-
var n = a.allocUnsafe(b),
|
|
2305
|
-
for (
|
|
2306
|
-
var k =
|
|
2283
|
+
var n = a.allocUnsafe(b), l = this.head, y = 1;
|
|
2284
|
+
for (l.data.copy(n), b -= l.data.length; l = l.next; ) {
|
|
2285
|
+
var k = l.data, f = b > k.length ? k.length : b;
|
|
2307
2286
|
if (k.copy(n, n.length - b, 0, f), b -= f, b === 0) {
|
|
2308
|
-
f === k.length ? (++y, this.head =
|
|
2287
|
+
f === k.length ? (++y, this.head = l.next ? l.next : this.tail = null) : (this.head = l, l.data = k.slice(f));
|
|
2309
2288
|
break;
|
|
2310
2289
|
}
|
|
2311
2290
|
++y;
|
|
@@ -2322,92 +2301,92 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2322
2301
|
}));
|
|
2323
2302
|
}
|
|
2324
2303
|
}
|
|
2325
|
-
]),
|
|
2304
|
+
]), _;
|
|
2326
2305
|
})();
|
|
2327
2306
|
}, {
|
|
2328
2307
|
buffer: 3,
|
|
2329
2308
|
util: 2
|
|
2330
2309
|
}],
|
|
2331
|
-
23: [function(
|
|
2332
|
-
(function(
|
|
2310
|
+
23: [function(C, N) {
|
|
2311
|
+
(function(w) {
|
|
2333
2312
|
(function() {
|
|
2334
2313
|
"use strict";
|
|
2335
|
-
function c(i,
|
|
2336
|
-
O(i,
|
|
2314
|
+
function c(i, h) {
|
|
2315
|
+
O(i, h), S(i);
|
|
2337
2316
|
}
|
|
2338
2317
|
function S(i) {
|
|
2339
2318
|
i._writableState && !i._writableState.emitClose || i._readableState && !i._readableState.emitClose || i.emit("close");
|
|
2340
2319
|
}
|
|
2341
|
-
function O(i,
|
|
2342
|
-
i.emit("error",
|
|
2320
|
+
function O(i, h) {
|
|
2321
|
+
i.emit("error", h);
|
|
2343
2322
|
}
|
|
2344
|
-
|
|
2345
|
-
destroy: function(i,
|
|
2323
|
+
N.exports = {
|
|
2324
|
+
destroy: function(i, h) {
|
|
2346
2325
|
var d = this, a = this._readableState && this._readableState.destroyed, g = this._writableState && this._writableState.destroyed;
|
|
2347
|
-
return a || g ? (
|
|
2348
|
-
!
|
|
2326
|
+
return a || g ? (h ? h(i) : i && (this._writableState ? !this._writableState.errorEmitted && (this._writableState.errorEmitted = !0, w.nextTick(O, this, i)) : w.nextTick(O, this, i)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(i || null, function(L) {
|
|
2327
|
+
!h && L ? d._writableState ? d._writableState.errorEmitted ? w.nextTick(S, d) : (d._writableState.errorEmitted = !0, w.nextTick(c, d, L)) : w.nextTick(c, d, L) : h ? (w.nextTick(S, d), h(L)) : w.nextTick(S, d);
|
|
2349
2328
|
}), this);
|
|
2350
2329
|
},
|
|
2351
2330
|
undestroy: function() {
|
|
2352
2331
|
this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
|
|
2353
2332
|
},
|
|
2354
|
-
errorOrDestroy: function(i,
|
|
2333
|
+
errorOrDestroy: function(i, h) {
|
|
2355
2334
|
var d = i._readableState, a = i._writableState;
|
|
2356
|
-
d && d.autoDestroy || a && a.autoDestroy ? i.destroy(
|
|
2335
|
+
d && d.autoDestroy || a && a.autoDestroy ? i.destroy(h) : i.emit("error", h);
|
|
2357
2336
|
}
|
|
2358
2337
|
};
|
|
2359
2338
|
}).call(this);
|
|
2360
|
-
}).call(this,
|
|
2339
|
+
}).call(this, C("_process"));
|
|
2361
2340
|
}, { _process: 12 }],
|
|
2362
|
-
24: [function(
|
|
2341
|
+
24: [function(C, N) {
|
|
2363
2342
|
"use strict";
|
|
2364
|
-
function
|
|
2343
|
+
function w(h) {
|
|
2365
2344
|
var d = !1;
|
|
2366
2345
|
return function() {
|
|
2367
2346
|
if (!d) {
|
|
2368
2347
|
d = !0;
|
|
2369
2348
|
for (var a = arguments.length, g = Array(a), L = 0; L < a; L++) g[L] = arguments[L];
|
|
2370
|
-
|
|
2349
|
+
h.apply(this, g);
|
|
2371
2350
|
}
|
|
2372
2351
|
};
|
|
2373
2352
|
}
|
|
2374
2353
|
function c() {
|
|
2375
2354
|
}
|
|
2376
|
-
function S(
|
|
2377
|
-
return
|
|
2378
|
-
}
|
|
2379
|
-
function O(
|
|
2380
|
-
if (typeof d == "function") return O(
|
|
2381
|
-
d || (d = {}), a =
|
|
2382
|
-
var g = d.readable || d.readable !== !1 &&
|
|
2383
|
-
|
|
2384
|
-
}, b =
|
|
2385
|
-
L = !1, b = !0, g || a.call(
|
|
2386
|
-
},
|
|
2387
|
-
g = !1,
|
|
2388
|
-
}, k = function(
|
|
2389
|
-
a.call(
|
|
2355
|
+
function S(h) {
|
|
2356
|
+
return h.setHeader && typeof h.abort == "function";
|
|
2357
|
+
}
|
|
2358
|
+
function O(h, d, a) {
|
|
2359
|
+
if (typeof d == "function") return O(h, null, d);
|
|
2360
|
+
d || (d = {}), a = w(a || c);
|
|
2361
|
+
var g = d.readable || d.readable !== !1 && h.readable, L = d.writable || d.writable !== !1 && h.writable, _ = function() {
|
|
2362
|
+
h.writable || n();
|
|
2363
|
+
}, b = h._writableState && h._writableState.finished, n = function() {
|
|
2364
|
+
L = !1, b = !0, g || a.call(h);
|
|
2365
|
+
}, l = h._readableState && h._readableState.endEmitted, y = function() {
|
|
2366
|
+
g = !1, l = !0, L || a.call(h);
|
|
2367
|
+
}, k = function(M) {
|
|
2368
|
+
a.call(h, M);
|
|
2390
2369
|
}, f = function() {
|
|
2391
|
-
var
|
|
2392
|
-
return g && !
|
|
2370
|
+
var M;
|
|
2371
|
+
return g && !l ? (h._readableState && h._readableState.ended || (M = new i()), a.call(h, M)) : L && !b ? (h._writableState && h._writableState.ended || (M = new i()), a.call(h, M)) : void 0;
|
|
2393
2372
|
}, T = function() {
|
|
2394
|
-
|
|
2373
|
+
h.req.on("finish", n);
|
|
2395
2374
|
};
|
|
2396
|
-
return S(
|
|
2397
|
-
|
|
2375
|
+
return S(h) ? (h.on("complete", n), h.on("abort", f), h.req ? T() : h.on("request", T)) : L && !h._writableState && (h.on("end", _), h.on("close", _)), h.on("end", y), h.on("finish", n), d.error !== !1 && h.on("error", k), h.on("close", f), function() {
|
|
2376
|
+
h.removeListener("complete", n), h.removeListener("abort", f), h.removeListener("request", T), h.req && h.req.removeListener("finish", n), h.removeListener("end", _), h.removeListener("close", _), h.removeListener("finish", n), h.removeListener("end", y), h.removeListener("error", k), h.removeListener("close", f);
|
|
2398
2377
|
};
|
|
2399
2378
|
}
|
|
2400
|
-
var i =
|
|
2401
|
-
|
|
2379
|
+
var i = C("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
2380
|
+
N.exports = O;
|
|
2402
2381
|
}, { "../../../errors": 15 }],
|
|
2403
|
-
25: [function(
|
|
2404
|
-
|
|
2382
|
+
25: [function(C, N) {
|
|
2383
|
+
N.exports = function() {
|
|
2405
2384
|
throw new Error("Readable.from is not available in the browser");
|
|
2406
2385
|
};
|
|
2407
2386
|
}, {}],
|
|
2408
|
-
26: [function(
|
|
2387
|
+
26: [function(C, N) {
|
|
2409
2388
|
"use strict";
|
|
2410
|
-
function
|
|
2389
|
+
function w(b) {
|
|
2411
2390
|
var n = !1;
|
|
2412
2391
|
return function() {
|
|
2413
2392
|
n || (n = !0, b.apply(void 0, arguments));
|
|
@@ -2419,68 +2398,68 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2419
2398
|
function S(b) {
|
|
2420
2399
|
return b.setHeader && typeof b.abort == "function";
|
|
2421
2400
|
}
|
|
2422
|
-
function O(b, n,
|
|
2423
|
-
y =
|
|
2401
|
+
function O(b, n, l, y) {
|
|
2402
|
+
y = w(y);
|
|
2424
2403
|
var k = !1;
|
|
2425
2404
|
b.on("close", function() {
|
|
2426
2405
|
k = !0;
|
|
2427
|
-
}), a === void 0 && (a =
|
|
2406
|
+
}), a === void 0 && (a = C("./end-of-stream")), a(b, {
|
|
2428
2407
|
readable: n,
|
|
2429
|
-
writable:
|
|
2408
|
+
writable: l
|
|
2430
2409
|
}, function(T) {
|
|
2431
2410
|
return T ? y(T) : (k = !0, void y());
|
|
2432
2411
|
});
|
|
2433
2412
|
var f = !1;
|
|
2434
2413
|
return function(T) {
|
|
2435
|
-
if (!k) return f ? void 0 : (f = !0, S(b) ? b.abort() : typeof b.destroy == "function" ? b.destroy() : void y(T || new
|
|
2414
|
+
if (!k) return f ? void 0 : (f = !0, S(b) ? b.abort() : typeof b.destroy == "function" ? b.destroy() : void y(T || new _("pipe")));
|
|
2436
2415
|
};
|
|
2437
2416
|
}
|
|
2438
2417
|
function i(b) {
|
|
2439
2418
|
b();
|
|
2440
2419
|
}
|
|
2441
|
-
function
|
|
2420
|
+
function h(b, n) {
|
|
2442
2421
|
return b.pipe(n);
|
|
2443
2422
|
}
|
|
2444
2423
|
function d(b) {
|
|
2445
2424
|
return b.length && typeof b[b.length - 1] == "function" ? b.pop() : c;
|
|
2446
2425
|
}
|
|
2447
|
-
var a, g =
|
|
2448
|
-
|
|
2449
|
-
for (var b = arguments.length, n = Array(b),
|
|
2426
|
+
var a, g = C("../../../errors").codes, L = g.ERR_MISSING_ARGS, _ = g.ERR_STREAM_DESTROYED;
|
|
2427
|
+
N.exports = function() {
|
|
2428
|
+
for (var b = arguments.length, n = Array(b), l = 0; l < b; l++) n[l] = arguments[l];
|
|
2450
2429
|
var y = d(n);
|
|
2451
2430
|
if (Array.isArray(n[0]) && (n = n[0]), 2 > n.length) throw new L("streams");
|
|
2452
|
-
var k, f = n.map(function(T,
|
|
2453
|
-
var p =
|
|
2454
|
-
return O(T, p, 0 <
|
|
2455
|
-
k || (k =
|
|
2431
|
+
var k, f = n.map(function(T, M) {
|
|
2432
|
+
var p = M < n.length - 1;
|
|
2433
|
+
return O(T, p, 0 < M, function(m) {
|
|
2434
|
+
k || (k = m), m && f.forEach(i), p || (f.forEach(i), y(k));
|
|
2456
2435
|
});
|
|
2457
2436
|
});
|
|
2458
|
-
return n.reduce(
|
|
2437
|
+
return n.reduce(h);
|
|
2459
2438
|
};
|
|
2460
2439
|
}, {
|
|
2461
2440
|
"../../../errors": 15,
|
|
2462
2441
|
"./end-of-stream": 24
|
|
2463
2442
|
}],
|
|
2464
|
-
27: [function(
|
|
2443
|
+
27: [function(C, N) {
|
|
2465
2444
|
"use strict";
|
|
2466
|
-
function
|
|
2445
|
+
function w(S, O, i) {
|
|
2467
2446
|
return S.highWaterMark == null ? O ? S[i] : null : S.highWaterMark;
|
|
2468
2447
|
}
|
|
2469
|
-
var c =
|
|
2470
|
-
|
|
2471
|
-
var d =
|
|
2448
|
+
var c = C("../../../errors").codes.ERR_INVALID_OPT_VALUE;
|
|
2449
|
+
N.exports = { getHighWaterMark: function(S, O, i, h) {
|
|
2450
|
+
var d = w(O, h, i);
|
|
2472
2451
|
if (d != null) {
|
|
2473
|
-
if (!(isFinite(d) &&
|
|
2474
|
-
return
|
|
2452
|
+
if (!(isFinite(d) && U(d) === d) || 0 > d) throw new c(h ? i : "highWaterMark", d);
|
|
2453
|
+
return U(d);
|
|
2475
2454
|
}
|
|
2476
2455
|
return S.objectMode ? 16 : 16384;
|
|
2477
2456
|
} };
|
|
2478
2457
|
}, { "../../../errors": 15 }],
|
|
2479
|
-
28: [function(
|
|
2480
|
-
|
|
2458
|
+
28: [function(C, N) {
|
|
2459
|
+
N.exports = C("events").EventEmitter;
|
|
2481
2460
|
}, { events: 7 }],
|
|
2482
|
-
29: [function(
|
|
2483
|
-
|
|
2461
|
+
29: [function(C, N, w) {
|
|
2462
|
+
w = N.exports = C("./lib/_stream_readable.js"), w.Stream = w, w.Readable = w, w.Writable = C("./lib/_stream_writable.js"), w.Duplex = C("./lib/_stream_duplex.js"), w.Transform = C("./lib/_stream_transform.js"), w.PassThrough = C("./lib/_stream_passthrough.js"), w.finished = C("./lib/internal/streams/end-of-stream.js"), w.pipeline = C("./lib/internal/streams/pipeline.js");
|
|
2484
2463
|
}, {
|
|
2485
2464
|
"./lib/_stream_duplex.js": 16,
|
|
2486
2465
|
"./lib/_stream_passthrough.js": 17,
|
|
@@ -2490,30 +2469,30 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2490
2469
|
"./lib/internal/streams/end-of-stream.js": 24,
|
|
2491
2470
|
"./lib/internal/streams/pipeline.js": 26
|
|
2492
2471
|
}],
|
|
2493
|
-
30: [function(
|
|
2494
|
-
function c(
|
|
2495
|
-
for (var a in
|
|
2496
|
-
}
|
|
2497
|
-
function S(
|
|
2498
|
-
return i(
|
|
2499
|
-
}
|
|
2500
|
-
var O =
|
|
2501
|
-
i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow ?
|
|
2502
|
-
if (typeof
|
|
2503
|
-
return i(
|
|
2504
|
-
}, S.alloc = function(
|
|
2505
|
-
if (typeof
|
|
2506
|
-
var g = i(
|
|
2472
|
+
30: [function(C, N, w) {
|
|
2473
|
+
function c(h, d) {
|
|
2474
|
+
for (var a in h) d[a] = h[a];
|
|
2475
|
+
}
|
|
2476
|
+
function S(h, d, a) {
|
|
2477
|
+
return i(h, d, a);
|
|
2478
|
+
}
|
|
2479
|
+
var O = C("buffer"), i = O.Buffer;
|
|
2480
|
+
i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow ? N.exports = O : (c(O, w), w.Buffer = S), S.prototype = Object.create(i.prototype), c(i, S), S.from = function(h, d, a) {
|
|
2481
|
+
if (typeof h == "number") throw new TypeError("Argument must not be a number");
|
|
2482
|
+
return i(h, d, a);
|
|
2483
|
+
}, S.alloc = function(h, d, a) {
|
|
2484
|
+
if (typeof h != "number") throw new TypeError("Argument must be a number");
|
|
2485
|
+
var g = i(h);
|
|
2507
2486
|
return d === void 0 ? g.fill(0) : typeof a == "string" ? g.fill(d, a) : g.fill(d), g;
|
|
2508
|
-
}, S.allocUnsafe = function(
|
|
2509
|
-
if (typeof
|
|
2510
|
-
return i(
|
|
2511
|
-
}, S.allocUnsafeSlow = function(
|
|
2512
|
-
if (typeof
|
|
2513
|
-
return O.SlowBuffer(
|
|
2487
|
+
}, S.allocUnsafe = function(h) {
|
|
2488
|
+
if (typeof h != "number") throw new TypeError("Argument must be a number");
|
|
2489
|
+
return i(h);
|
|
2490
|
+
}, S.allocUnsafeSlow = function(h) {
|
|
2491
|
+
if (typeof h != "number") throw new TypeError("Argument must be a number");
|
|
2492
|
+
return O.SlowBuffer(h);
|
|
2514
2493
|
};
|
|
2515
2494
|
}, { buffer: 3 }],
|
|
2516
|
-
31: [function(
|
|
2495
|
+
31: [function(C, N, w) {
|
|
2517
2496
|
"use strict";
|
|
2518
2497
|
function c(f) {
|
|
2519
2498
|
if (!f) return "utf8";
|
|
@@ -2554,10 +2533,10 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2554
2533
|
this.fillLast = a, T = 4;
|
|
2555
2534
|
break;
|
|
2556
2535
|
case "base64":
|
|
2557
|
-
this.text =
|
|
2536
|
+
this.text = _, this.end = b, T = 3;
|
|
2558
2537
|
break;
|
|
2559
2538
|
default:
|
|
2560
|
-
this.write = n, this.end =
|
|
2539
|
+
this.write = n, this.end = l;
|
|
2561
2540
|
return;
|
|
2562
2541
|
}
|
|
2563
2542
|
this.lastNeed = 0, this.lastTotal = 0, this.lastChar = y.allocUnsafe(T);
|
|
@@ -2565,11 +2544,11 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2565
2544
|
function i(f) {
|
|
2566
2545
|
return 127 >= f ? 0 : f >> 5 == 6 ? 2 : f >> 4 == 14 ? 3 : f >> 3 == 30 ? 4 : f >> 6 == 2 ? -1 : -2;
|
|
2567
2546
|
}
|
|
2568
|
-
function
|
|
2547
|
+
function h(f, T, M) {
|
|
2569
2548
|
var p = T.length - 1;
|
|
2570
|
-
if (p <
|
|
2571
|
-
var
|
|
2572
|
-
return 0 <=
|
|
2549
|
+
if (p < M) return 0;
|
|
2550
|
+
var m = i(T[p]);
|
|
2551
|
+
return 0 <= m ? (0 < m && (f.lastNeed = m - 1), m) : --p < M || m === -2 ? 0 : (m = i(T[p]), 0 <= m ? (0 < m && (f.lastNeed = m - 2), m) : --p < M || m === -2 ? 0 : (m = i(T[p]), 0 <= m ? (0 < m && (m === 2 ? m = 0 : f.lastNeed = m - 3), m) : 0));
|
|
2573
2552
|
}
|
|
2574
2553
|
function d(f, T) {
|
|
2575
2554
|
if ((192 & T[0]) != 128) return f.lastNeed = 0, "�";
|
|
@@ -2579,31 +2558,31 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2579
2558
|
}
|
|
2580
2559
|
}
|
|
2581
2560
|
function a(f) {
|
|
2582
|
-
var T = this.lastTotal - this.lastNeed,
|
|
2583
|
-
return
|
|
2561
|
+
var T = this.lastTotal - this.lastNeed, M = d(this, f, T);
|
|
2562
|
+
return M === void 0 ? this.lastNeed <= f.length ? (f.copy(this.lastChar, T, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (f.copy(this.lastChar, T, 0, f.length), void (this.lastNeed -= f.length)) : M;
|
|
2584
2563
|
}
|
|
2585
2564
|
function g(f, T) {
|
|
2586
2565
|
if ((f.length - T) % 2 == 0) {
|
|
2587
|
-
var
|
|
2588
|
-
if (
|
|
2589
|
-
var p =
|
|
2590
|
-
if (55296 <= p && 56319 >= p) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = f[f.length - 2], this.lastChar[1] = f[f.length - 1],
|
|
2566
|
+
var M = f.toString("utf16le", T);
|
|
2567
|
+
if (M) {
|
|
2568
|
+
var p = M.charCodeAt(M.length - 1);
|
|
2569
|
+
if (55296 <= p && 56319 >= p) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = f[f.length - 2], this.lastChar[1] = f[f.length - 1], M.slice(0, -1);
|
|
2591
2570
|
}
|
|
2592
|
-
return
|
|
2571
|
+
return M;
|
|
2593
2572
|
}
|
|
2594
2573
|
return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = f[f.length - 1], f.toString("utf16le", T, f.length - 1);
|
|
2595
2574
|
}
|
|
2596
2575
|
function L(f) {
|
|
2597
2576
|
var T = f && f.length ? this.write(f) : "";
|
|
2598
2577
|
if (this.lastNeed) {
|
|
2599
|
-
var
|
|
2600
|
-
return T + this.lastChar.toString("utf16le", 0,
|
|
2578
|
+
var M = this.lastTotal - this.lastNeed;
|
|
2579
|
+
return T + this.lastChar.toString("utf16le", 0, M);
|
|
2601
2580
|
}
|
|
2602
2581
|
return T;
|
|
2603
2582
|
}
|
|
2604
|
-
function
|
|
2605
|
-
var
|
|
2606
|
-
return
|
|
2583
|
+
function _(f, T) {
|
|
2584
|
+
var M = (f.length - T) % 3;
|
|
2585
|
+
return M == 0 ? f.toString("base64", T) : (this.lastNeed = 3 - M, this.lastTotal = 3, M == 1 ? this.lastChar[0] = f[f.length - 1] : (this.lastChar[0] = f[f.length - 2], this.lastChar[1] = f[f.length - 1]), f.toString("base64", T, f.length - M));
|
|
2607
2586
|
}
|
|
2608
2587
|
function b(f) {
|
|
2609
2588
|
var T = f && f.length ? this.write(f) : "";
|
|
@@ -2612,10 +2591,10 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2612
2591
|
function n(f) {
|
|
2613
2592
|
return f.toString(this.encoding);
|
|
2614
2593
|
}
|
|
2615
|
-
function
|
|
2594
|
+
function l(f) {
|
|
2616
2595
|
return f && f.length ? this.write(f) : "";
|
|
2617
2596
|
}
|
|
2618
|
-
var y =
|
|
2597
|
+
var y = C("safe-buffer").Buffer, k = y.isEncoding || function(f) {
|
|
2619
2598
|
switch (f = "" + f, f && f.toLowerCase()) {
|
|
2620
2599
|
case "hex":
|
|
2621
2600
|
case "utf8":
|
|
@@ -2633,70 +2612,70 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2633
2612
|
return !1;
|
|
2634
2613
|
}
|
|
2635
2614
|
};
|
|
2636
|
-
|
|
2615
|
+
w.StringDecoder = O, O.prototype.write = function(f) {
|
|
2637
2616
|
if (f.length === 0) return "";
|
|
2638
|
-
var T,
|
|
2617
|
+
var T, M;
|
|
2639
2618
|
if (this.lastNeed) {
|
|
2640
2619
|
if (T = this.fillLast(f), T === void 0) return "";
|
|
2641
|
-
|
|
2642
|
-
} else
|
|
2643
|
-
return
|
|
2620
|
+
M = this.lastNeed, this.lastNeed = 0;
|
|
2621
|
+
} else M = 0;
|
|
2622
|
+
return M < f.length ? T ? T + this.text(f, M) : this.text(f, M) : T || "";
|
|
2644
2623
|
}, O.prototype.end = function(f) {
|
|
2645
2624
|
var T = f && f.length ? this.write(f) : "";
|
|
2646
2625
|
return this.lastNeed ? T + "�" : T;
|
|
2647
2626
|
}, O.prototype.text = function(f, T) {
|
|
2648
|
-
var
|
|
2627
|
+
var M = h(this, f, T);
|
|
2649
2628
|
if (!this.lastNeed) return f.toString("utf8", T);
|
|
2650
|
-
this.lastTotal =
|
|
2651
|
-
var p = f.length - (
|
|
2629
|
+
this.lastTotal = M;
|
|
2630
|
+
var p = f.length - (M - this.lastNeed);
|
|
2652
2631
|
return f.copy(this.lastChar, 0, p), f.toString("utf8", T, p);
|
|
2653
2632
|
}, O.prototype.fillLast = function(f) {
|
|
2654
2633
|
return this.lastNeed <= f.length ? (f.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (f.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, f.length), void (this.lastNeed -= f.length));
|
|
2655
2634
|
};
|
|
2656
2635
|
}, { "safe-buffer": 30 }],
|
|
2657
|
-
32: [function(
|
|
2658
|
-
(function(
|
|
2636
|
+
32: [function(C, N) {
|
|
2637
|
+
(function(w) {
|
|
2659
2638
|
(function() {
|
|
2660
2639
|
function c(S) {
|
|
2661
2640
|
try {
|
|
2662
|
-
if (!
|
|
2641
|
+
if (!w.localStorage) return !1;
|
|
2663
2642
|
} catch {
|
|
2664
2643
|
return !1;
|
|
2665
2644
|
}
|
|
2666
|
-
var O =
|
|
2645
|
+
var O = w.localStorage[S];
|
|
2667
2646
|
return O != null && (O + "").toLowerCase() === "true";
|
|
2668
2647
|
}
|
|
2669
|
-
|
|
2648
|
+
N.exports = function(S, O) {
|
|
2670
2649
|
function i() {
|
|
2671
|
-
if (!
|
|
2650
|
+
if (!h) {
|
|
2672
2651
|
if (c("throwDeprecation")) throw new Error(O);
|
|
2673
|
-
c("traceDeprecation") ? console.trace(O) : console.warn(O),
|
|
2652
|
+
c("traceDeprecation") ? console.trace(O) : console.warn(O), h = !0;
|
|
2674
2653
|
}
|
|
2675
2654
|
return S.apply(this, arguments);
|
|
2676
2655
|
}
|
|
2677
2656
|
if (c("noDeprecation")) return S;
|
|
2678
|
-
var
|
|
2657
|
+
var h = !1;
|
|
2679
2658
|
return i;
|
|
2680
2659
|
};
|
|
2681
2660
|
}).call(this);
|
|
2682
2661
|
}).call(this, typeof global > "u" ? typeof self > "u" ? typeof window > "u" ? {} : window : self : global);
|
|
2683
2662
|
}, {}],
|
|
2684
|
-
"/": [function(
|
|
2685
|
-
function
|
|
2663
|
+
"/": [function(C, N) {
|
|
2664
|
+
function w(b) {
|
|
2686
2665
|
return b.replace(/a=ice-options:trickle\s\n/g, "");
|
|
2687
2666
|
}
|
|
2688
2667
|
function c(b) {
|
|
2689
2668
|
console.warn(b);
|
|
2690
2669
|
}
|
|
2691
|
-
const S =
|
|
2692
|
-
class
|
|
2670
|
+
const S = C("debug")("simple-peer"), O = C("get-browser-rtc"), i = C("randombytes"), h = C("readable-stream"), d = C("queue-microtask"), a = C("err-code"), { Buffer: g } = C("buffer"), L = 65536;
|
|
2671
|
+
class _ extends h.Duplex {
|
|
2693
2672
|
constructor(n) {
|
|
2694
|
-
if (n = Object.assign({ allowHalfOpen: !1 }, n), super(n), this._id = i(4).toString("hex").slice(0, 7), this._debug("new peer %o", n), this.channelName = n.initiator ? n.channelName || i(20).toString("hex") : null, this.initiator = n.initiator || !1, this.channelConfig = n.channelConfig ||
|
|
2673
|
+
if (n = Object.assign({ allowHalfOpen: !1 }, n), super(n), this._id = i(4).toString("hex").slice(0, 7), this._debug("new peer %o", n), this.channelName = n.initiator ? n.channelName || i(20).toString("hex") : null, this.initiator = n.initiator || !1, this.channelConfig = n.channelConfig || _.channelConfig, this.channelNegotiated = this.channelConfig.negotiated, this.config = Object.assign({}, _.config, n.config), this.offerOptions = n.offerOptions || {}, this.answerOptions = n.answerOptions || {}, this.sdpTransform = n.sdpTransform || ((l) => l), this.streams = n.streams || (n.stream ? [n.stream] : []), this.trickle = n.trickle === void 0 || n.trickle, this.allowHalfTrickle = n.allowHalfTrickle !== void 0 && n.allowHalfTrickle, this.iceCompleteTimeout = n.iceCompleteTimeout || 5e3, this.destroyed = !1, this.destroying = !1, this._connected = !1, this.remoteAddress = void 0, this.remoteFamily = void 0, this.remotePort = void 0, this.localAddress = void 0, this.localFamily = void 0, this.localPort = void 0, this._wrtc = n.wrtc && typeof n.wrtc == "object" ? n.wrtc : O(), !this._wrtc) throw a(typeof window > "u" ? /* @__PURE__ */ new Error("No WebRTC support: Specify `opts.wrtc` option in this environment") : /* @__PURE__ */ new Error("No WebRTC support: Not a supported browser"), "ERR_WEBRTC_SUPPORT");
|
|
2695
2674
|
this._pcReady = !1, this._channelReady = !1, this._iceComplete = !1, this._iceCompleteTimer = null, this._channel = null, this._pendingCandidates = [], this._isNegotiating = !1, this._firstNegotiation = !0, this._batchedNegotiation = !1, this._queuedNegotiation = !1, this._sendersAwaitingStable = [], this._senderMap = /* @__PURE__ */ new Map(), this._closingInterval = null, this._remoteTracks = [], this._remoteStreams = [], this._chunk = null, this._cb = null, this._interval = null;
|
|
2696
2675
|
try {
|
|
2697
2676
|
this._pc = new this._wrtc.RTCPeerConnection(this.config);
|
|
2698
|
-
} catch (
|
|
2699
|
-
this.destroy(a(
|
|
2677
|
+
} catch (l) {
|
|
2678
|
+
this.destroy(a(l, "ERR_PC_CONSTRUCTOR"));
|
|
2700
2679
|
return;
|
|
2701
2680
|
}
|
|
2702
2681
|
this._isReactNativeWebrtc = typeof this._pc._peerConnectionId == "number", this._pc.oniceconnectionstatechange = () => {
|
|
@@ -2707,16 +2686,16 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2707
2686
|
this._onConnectionStateChange();
|
|
2708
2687
|
}, this._pc.onsignalingstatechange = () => {
|
|
2709
2688
|
this._onSignalingStateChange();
|
|
2710
|
-
}, this._pc.onicecandidate = (
|
|
2711
|
-
this._onIceCandidate(
|
|
2712
|
-
}, typeof this._pc.peerIdentity == "object" && this._pc.peerIdentity.catch((
|
|
2713
|
-
this.destroy(a(
|
|
2714
|
-
}), this.initiator || this.channelNegotiated ? this._setupData({ channel: this._pc.createDataChannel(this.channelName, this.channelConfig) }) : this._pc.ondatachannel = (
|
|
2715
|
-
this._setupData(
|
|
2716
|
-
}, this.streams && this.streams.forEach((
|
|
2717
|
-
this.addStream(
|
|
2718
|
-
}), this._pc.ontrack = (
|
|
2719
|
-
this._onTrack(
|
|
2689
|
+
}, this._pc.onicecandidate = (l) => {
|
|
2690
|
+
this._onIceCandidate(l);
|
|
2691
|
+
}, typeof this._pc.peerIdentity == "object" && this._pc.peerIdentity.catch((l) => {
|
|
2692
|
+
this.destroy(a(l, "ERR_PC_PEER_IDENTITY"));
|
|
2693
|
+
}), this.initiator || this.channelNegotiated ? this._setupData({ channel: this._pc.createDataChannel(this.channelName, this.channelConfig) }) : this._pc.ondatachannel = (l) => {
|
|
2694
|
+
this._setupData(l);
|
|
2695
|
+
}, this.streams && this.streams.forEach((l) => {
|
|
2696
|
+
this.addStream(l);
|
|
2697
|
+
}), this._pc.ontrack = (l) => {
|
|
2698
|
+
this._onTrack(l);
|
|
2720
2699
|
}, this._debug("initial negotiation"), this._needsNegotiation(), this._onFinishBound = () => {
|
|
2721
2700
|
this._onFinish();
|
|
2722
2701
|
}, this.once("finish", this._onFinishBound);
|
|
@@ -2743,18 +2722,18 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2743
2722
|
n = {};
|
|
2744
2723
|
}
|
|
2745
2724
|
this._debug("signal()"), n.renegotiate && this.initiator && (this._debug("got request to renegotiate"), this._needsNegotiation()), n.transceiverRequest && this.initiator && (this._debug("got request for transceiver"), this.addTransceiver(n.transceiverRequest.kind, n.transceiverRequest.init)), n.candidate && (this._pc.remoteDescription && this._pc.remoteDescription.type ? this._addIceCandidate(n.candidate) : this._pendingCandidates.push(n.candidate)), n.sdp && this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(n)).then(() => {
|
|
2746
|
-
this.destroyed || (this._pendingCandidates.forEach((
|
|
2747
|
-
this._addIceCandidate(
|
|
2725
|
+
this.destroyed || (this._pendingCandidates.forEach((l) => {
|
|
2726
|
+
this._addIceCandidate(l);
|
|
2748
2727
|
}), this._pendingCandidates = [], this._pc.remoteDescription.type === "offer" && this._createAnswer());
|
|
2749
|
-
}).catch((
|
|
2750
|
-
this.destroy(a(
|
|
2728
|
+
}).catch((l) => {
|
|
2729
|
+
this.destroy(a(l, "ERR_SET_REMOTE_DESCRIPTION"));
|
|
2751
2730
|
}), n.sdp || n.candidate || n.renegotiate || n.transceiverRequest || this.destroy(a(/* @__PURE__ */ new Error("signal() called with invalid signal data"), "ERR_SIGNALING"));
|
|
2752
2731
|
}
|
|
2753
2732
|
}
|
|
2754
2733
|
_addIceCandidate(n) {
|
|
2755
|
-
const
|
|
2756
|
-
this._pc.addIceCandidate(
|
|
2757
|
-
!
|
|
2734
|
+
const l = new this._wrtc.RTCIceCandidate(n);
|
|
2735
|
+
this._pc.addIceCandidate(l).catch((y) => {
|
|
2736
|
+
!l.address || l.address.endsWith(".local") ? c("Ignoring unsupported ICE candidate.") : this.destroy(a(y, "ERR_ADD_ICE_CANDIDATE"));
|
|
2758
2737
|
});
|
|
2759
2738
|
}
|
|
2760
2739
|
send(n) {
|
|
@@ -2763,11 +2742,11 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2763
2742
|
this._channel.send(n);
|
|
2764
2743
|
}
|
|
2765
2744
|
}
|
|
2766
|
-
addTransceiver(n,
|
|
2745
|
+
addTransceiver(n, l) {
|
|
2767
2746
|
if (!this.destroying) {
|
|
2768
2747
|
if (this.destroyed) throw a(/* @__PURE__ */ new Error("cannot addTransceiver after peer is destroyed"), "ERR_DESTROYED");
|
|
2769
2748
|
if (this._debug("addTransceiver()"), this.initiator) try {
|
|
2770
|
-
this._pc.addTransceiver(n,
|
|
2749
|
+
this._pc.addTransceiver(n, l), this._needsNegotiation();
|
|
2771
2750
|
} catch (y) {
|
|
2772
2751
|
this.destroy(a(y, "ERR_ADD_TRANSCEIVER"));
|
|
2773
2752
|
}
|
|
@@ -2775,7 +2754,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2775
2754
|
type: "transceiverRequest",
|
|
2776
2755
|
transceiverRequest: {
|
|
2777
2756
|
kind: n,
|
|
2778
|
-
init:
|
|
2757
|
+
init: l
|
|
2779
2758
|
}
|
|
2780
2759
|
});
|
|
2781
2760
|
}
|
|
@@ -2783,33 +2762,33 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2783
2762
|
addStream(n) {
|
|
2784
2763
|
if (!this.destroying) {
|
|
2785
2764
|
if (this.destroyed) throw a(/* @__PURE__ */ new Error("cannot addStream after peer is destroyed"), "ERR_DESTROYED");
|
|
2786
|
-
this._debug("addStream()"), n.getTracks().forEach((
|
|
2787
|
-
this.addTrack(
|
|
2765
|
+
this._debug("addStream()"), n.getTracks().forEach((l) => {
|
|
2766
|
+
this.addTrack(l, n);
|
|
2788
2767
|
});
|
|
2789
2768
|
}
|
|
2790
2769
|
}
|
|
2791
|
-
addTrack(n,
|
|
2770
|
+
addTrack(n, l) {
|
|
2792
2771
|
if (this.destroying) return;
|
|
2793
2772
|
if (this.destroyed) throw a(/* @__PURE__ */ new Error("cannot addTrack after peer is destroyed"), "ERR_DESTROYED");
|
|
2794
2773
|
this._debug("addTrack()");
|
|
2795
2774
|
const y = this._senderMap.get(n) || /* @__PURE__ */ new Map();
|
|
2796
|
-
let k = y.get(
|
|
2797
|
-
if (!k) k = this._pc.addTrack(n,
|
|
2775
|
+
let k = y.get(l);
|
|
2776
|
+
if (!k) k = this._pc.addTrack(n, l), y.set(l, k), this._senderMap.set(n, y), this._needsNegotiation();
|
|
2798
2777
|
else throw k.removed ? a(/* @__PURE__ */ new Error("Track has been removed. You should enable/disable tracks that you want to re-add."), "ERR_SENDER_REMOVED") : a(/* @__PURE__ */ new Error("Track has already been added to that stream."), "ERR_SENDER_ALREADY_ADDED");
|
|
2799
2778
|
}
|
|
2800
|
-
replaceTrack(n,
|
|
2779
|
+
replaceTrack(n, l, y) {
|
|
2801
2780
|
if (this.destroying) return;
|
|
2802
2781
|
if (this.destroyed) throw a(/* @__PURE__ */ new Error("cannot replaceTrack after peer is destroyed"), "ERR_DESTROYED");
|
|
2803
2782
|
this._debug("replaceTrack()");
|
|
2804
2783
|
const k = this._senderMap.get(n), f = k ? k.get(y) : null;
|
|
2805
2784
|
if (!f) throw a(/* @__PURE__ */ new Error("Cannot replace track that was never added."), "ERR_TRACK_NOT_ADDED");
|
|
2806
|
-
|
|
2785
|
+
l && this._senderMap.set(l, k), f.replaceTrack == null ? this.destroy(a(/* @__PURE__ */ new Error("replaceTrack is not supported in this browser"), "ERR_UNSUPPORTED_REPLACETRACK")) : f.replaceTrack(l);
|
|
2807
2786
|
}
|
|
2808
|
-
removeTrack(n,
|
|
2787
|
+
removeTrack(n, l) {
|
|
2809
2788
|
if (this.destroying) return;
|
|
2810
2789
|
if (this.destroyed) throw a(/* @__PURE__ */ new Error("cannot removeTrack after peer is destroyed"), "ERR_DESTROYED");
|
|
2811
2790
|
this._debug("removeSender()");
|
|
2812
|
-
const y = this._senderMap.get(n), k = y ? y.get(
|
|
2791
|
+
const y = this._senderMap.get(n), k = y ? y.get(l) : null;
|
|
2813
2792
|
if (!k) throw a(/* @__PURE__ */ new Error("Cannot remove track that was never added."), "ERR_TRACK_NOT_ADDED");
|
|
2814
2793
|
try {
|
|
2815
2794
|
k.removed = !0, this._pc.removeTrack(k);
|
|
@@ -2821,8 +2800,8 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2821
2800
|
removeStream(n) {
|
|
2822
2801
|
if (!this.destroying) {
|
|
2823
2802
|
if (this.destroyed) throw a(/* @__PURE__ */ new Error("cannot removeStream after peer is destroyed"), "ERR_DESTROYED");
|
|
2824
|
-
this._debug("removeSenders()"), n.getTracks().forEach((
|
|
2825
|
-
this.removeTrack(
|
|
2803
|
+
this._debug("removeSenders()"), n.getTracks().forEach((l) => {
|
|
2804
|
+
this.removeTrack(l, n);
|
|
2826
2805
|
});
|
|
2827
2806
|
}
|
|
2828
2807
|
}
|
|
@@ -2846,7 +2825,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2846
2825
|
this._destroy(n, () => {
|
|
2847
2826
|
});
|
|
2848
2827
|
}
|
|
2849
|
-
_destroy(n,
|
|
2828
|
+
_destroy(n, l) {
|
|
2850
2829
|
this.destroyed || this.destroying || (this.destroying = !0, this._debug("destroying (error: %s)", n && (n.message || n)), d(() => {
|
|
2851
2830
|
if (this.destroyed = !0, this.destroying = !1, this._debug("destroy (error: %s)", n && (n.message || n)), 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) {
|
|
2852
2831
|
try {
|
|
@@ -2862,7 +2841,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2862
2841
|
}
|
|
2863
2842
|
this._pc.oniceconnectionstatechange = null, this._pc.onicegatheringstatechange = null, this._pc.onsignalingstatechange = null, this._pc.onicecandidate = null, this._pc.ontrack = null, this._pc.ondatachannel = null;
|
|
2864
2843
|
}
|
|
2865
|
-
this._pc = null, this._channel = null, n && this.emit("error", n), this.emit("close"),
|
|
2844
|
+
this._pc = null, this._channel = null, n && this.emit("error", n), this.emit("close"), l();
|
|
2866
2845
|
}));
|
|
2867
2846
|
}
|
|
2868
2847
|
_setupData(n) {
|
|
@@ -2879,14 +2858,14 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2879
2858
|
const k = y.error instanceof Error ? y.error : /* @__PURE__ */ new Error(`Datachannel error: ${y.message} ${y.filename}:${y.lineno}:${y.colno}`);
|
|
2880
2859
|
this.destroy(a(k, "ERR_DATA_CHANNEL"));
|
|
2881
2860
|
};
|
|
2882
|
-
let
|
|
2861
|
+
let l = !1;
|
|
2883
2862
|
this._closingInterval = setInterval(() => {
|
|
2884
|
-
this._channel && this._channel.readyState === "closing" ? (
|
|
2863
|
+
this._channel && this._channel.readyState === "closing" ? (l && this._onChannelClose(), l = !0) : l = !1;
|
|
2885
2864
|
}, 5e3);
|
|
2886
2865
|
}
|
|
2887
2866
|
_read() {
|
|
2888
2867
|
}
|
|
2889
|
-
_write(n,
|
|
2868
|
+
_write(n, l, y) {
|
|
2890
2869
|
if (this.destroyed) return y(a(/* @__PURE__ */ new Error("cannot write after peer is destroyed"), "ERR_DATA_CHANNEL"));
|
|
2891
2870
|
if (this._connected) {
|
|
2892
2871
|
try {
|
|
@@ -2913,8 +2892,8 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2913
2892
|
_createOffer() {
|
|
2914
2893
|
this.destroyed || this._pc.createOffer(this.offerOptions).then((n) => {
|
|
2915
2894
|
if (this.destroyed) return;
|
|
2916
|
-
this.trickle || this.allowHalfTrickle || (n.sdp =
|
|
2917
|
-
const
|
|
2895
|
+
this.trickle || this.allowHalfTrickle || (n.sdp = w(n.sdp)), n.sdp = this.sdpTransform(n.sdp);
|
|
2896
|
+
const l = () => {
|
|
2918
2897
|
if (!this.destroyed) {
|
|
2919
2898
|
const y = this._pc.localDescription || n;
|
|
2920
2899
|
this._debug("signal"), this.emit("signal", {
|
|
@@ -2924,7 +2903,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2924
2903
|
}
|
|
2925
2904
|
};
|
|
2926
2905
|
this._pc.setLocalDescription(n).then(() => {
|
|
2927
|
-
this._debug("createOffer success"), this.destroyed || (this.trickle || this._iceComplete ?
|
|
2906
|
+
this._debug("createOffer success"), this.destroyed || (this.trickle || this._iceComplete ? l() : this.once("_iceComplete", l));
|
|
2928
2907
|
}).catch((y) => {
|
|
2929
2908
|
this.destroy(a(y, "ERR_SET_LOCAL_DESCRIPTION"));
|
|
2930
2909
|
});
|
|
@@ -2940,8 +2919,8 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2940
2919
|
_createAnswer() {
|
|
2941
2920
|
this.destroyed || this._pc.createAnswer(this.answerOptions).then((n) => {
|
|
2942
2921
|
if (this.destroyed) return;
|
|
2943
|
-
this.trickle || this.allowHalfTrickle || (n.sdp =
|
|
2944
|
-
const
|
|
2922
|
+
this.trickle || this.allowHalfTrickle || (n.sdp = w(n.sdp)), n.sdp = this.sdpTransform(n.sdp);
|
|
2923
|
+
const l = () => {
|
|
2945
2924
|
if (!this.destroyed) {
|
|
2946
2925
|
const y = this._pc.localDescription || n;
|
|
2947
2926
|
this._debug("signal"), this.emit("signal", {
|
|
@@ -2951,7 +2930,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2951
2930
|
}
|
|
2952
2931
|
};
|
|
2953
2932
|
this._pc.setLocalDescription(n).then(() => {
|
|
2954
|
-
this.destroyed || (this.trickle || this._iceComplete ?
|
|
2933
|
+
this.destroyed || (this.trickle || this._iceComplete ? l() : this.once("_iceComplete", l));
|
|
2955
2934
|
}).catch((y) => {
|
|
2956
2935
|
this.destroy(a(y, "ERR_SET_LOCAL_DESCRIPTION"));
|
|
2957
2936
|
});
|
|
@@ -2964,26 +2943,26 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2964
2943
|
}
|
|
2965
2944
|
_onIceStateChange() {
|
|
2966
2945
|
if (this.destroyed) return;
|
|
2967
|
-
const n = this._pc.iceConnectionState,
|
|
2968
|
-
this._debug("iceStateChange (connection: %s) (gathering: %s)", n,
|
|
2946
|
+
const n = this._pc.iceConnectionState, l = this._pc.iceGatheringState;
|
|
2947
|
+
this._debug("iceStateChange (connection: %s) (gathering: %s)", n, l), this.emit("iceStateChange", n, l), (n === "connected" || n === "completed") && (this._pcReady = !0, this._maybeReady()), n === "failed" && this.destroy(a(/* @__PURE__ */ new Error("Ice connection failed."), "ERR_ICE_CONNECTION_FAILURE")), n === "closed" && this.destroy(a(/* @__PURE__ */ new Error("Ice connection closed."), "ERR_ICE_CONNECTION_CLOSED"));
|
|
2969
2948
|
}
|
|
2970
2949
|
getStats(n) {
|
|
2971
|
-
const
|
|
2950
|
+
const l = (y) => (Object.prototype.toString.call(y.values) === "[object Array]" && y.values.forEach((k) => {
|
|
2972
2951
|
Object.assign(y, k);
|
|
2973
2952
|
}), y);
|
|
2974
2953
|
this._pc.getStats.length === 0 || this._isReactNativeWebrtc ? this._pc.getStats().then((y) => {
|
|
2975
2954
|
const k = [];
|
|
2976
2955
|
y.forEach((f) => {
|
|
2977
|
-
k.push(
|
|
2956
|
+
k.push(l(f));
|
|
2978
2957
|
}), n(null, k);
|
|
2979
2958
|
}, (y) => n(y)) : 0 < this._pc.getStats.length ? this._pc.getStats((y) => {
|
|
2980
2959
|
if (this.destroyed) return;
|
|
2981
2960
|
const k = [];
|
|
2982
2961
|
y.result().forEach((f) => {
|
|
2983
2962
|
const T = {};
|
|
2984
|
-
f.names().forEach((
|
|
2985
|
-
T[
|
|
2986
|
-
}), T.id = f.id, T.type = f.type, T.timestamp = f.timestamp, k.push(
|
|
2963
|
+
f.names().forEach((M) => {
|
|
2964
|
+
T[M] = f.stat(M);
|
|
2965
|
+
}), T.id = f.id, T.type = f.type, T.timestamp = f.timestamp, k.push(l(T));
|
|
2987
2966
|
}), n(null, k);
|
|
2988
2967
|
}, (y) => n(y)) : n(null, []);
|
|
2989
2968
|
}
|
|
@@ -2991,24 +2970,24 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
2991
2970
|
if (this._debug("maybeReady pc %s channel %s", this._pcReady, this._channelReady), this._connected || this._connecting || !this._pcReady || !this._channelReady) return;
|
|
2992
2971
|
this._connecting = !0;
|
|
2993
2972
|
const n = () => {
|
|
2994
|
-
this.destroyed || this.getStats((
|
|
2973
|
+
this.destroyed || this.getStats((l, y) => {
|
|
2995
2974
|
if (this.destroyed) return;
|
|
2996
|
-
|
|
2975
|
+
l && (y = []);
|
|
2997
2976
|
const k = {}, f = {}, T = {};
|
|
2998
|
-
let
|
|
2999
|
-
y.forEach((
|
|
3000
|
-
(
|
|
2977
|
+
let M = !1;
|
|
2978
|
+
y.forEach((m) => {
|
|
2979
|
+
(m.type === "remotecandidate" || m.type === "remote-candidate") && (k[m.id] = m), (m.type === "localcandidate" || m.type === "local-candidate") && (f[m.id] = m), (m.type === "candidatepair" || m.type === "candidate-pair") && (T[m.id] = m);
|
|
3001
2980
|
});
|
|
3002
|
-
const p = (
|
|
3003
|
-
|
|
3004
|
-
let I = f[
|
|
3005
|
-
I && (I.ip || I.address) ? (this.localAddress = I.ip || I.address, this.localPort = +I.port) : I && I.ipAddress ? (this.localAddress = I.ipAddress, this.localPort = +I.portNumber) : typeof
|
|
3006
|
-
let B = k[
|
|
3007
|
-
B && (B.ip || B.address) ? (this.remoteAddress = B.ip || B.address, this.remotePort = +B.port) : B && B.ipAddress ? (this.remoteAddress = B.ipAddress, this.remotePort = +B.portNumber) : typeof
|
|
2981
|
+
const p = (m) => {
|
|
2982
|
+
M = !0;
|
|
2983
|
+
let I = f[m.localCandidateId];
|
|
2984
|
+
I && (I.ip || I.address) ? (this.localAddress = I.ip || I.address, this.localPort = +I.port) : I && I.ipAddress ? (this.localAddress = I.ipAddress, this.localPort = +I.portNumber) : typeof m.googLocalAddress == "string" && (I = m.googLocalAddress.split(":"), this.localAddress = I[0], this.localPort = +I[1]), this.localAddress && (this.localFamily = this.localAddress.includes(":") ? "IPv6" : "IPv4");
|
|
2985
|
+
let B = k[m.remoteCandidateId];
|
|
2986
|
+
B && (B.ip || B.address) ? (this.remoteAddress = B.ip || B.address, this.remotePort = +B.port) : B && B.ipAddress ? (this.remoteAddress = B.ipAddress, this.remotePort = +B.portNumber) : typeof m.googRemoteAddress == "string" && (B = m.googRemoteAddress.split(":"), this.remoteAddress = B[0], this.remotePort = +B[1]), this.remoteAddress && (this.remoteFamily = this.remoteAddress.includes(":") ? "IPv6" : "IPv4"), this._debug("connect local: %s:%s remote: %s:%s", this.localAddress, this.localPort, this.remoteAddress, this.remotePort);
|
|
3008
2987
|
};
|
|
3009
|
-
if (y.forEach((
|
|
3010
|
-
|
|
3011
|
-
}), !
|
|
2988
|
+
if (y.forEach((m) => {
|
|
2989
|
+
m.type === "transport" && m.selectedCandidatePairId && p(T[m.selectedCandidatePairId]), (m.type === "googCandidatePair" && m.googActiveConnection === "true" || (m.type === "candidatepair" || m.type === "candidate-pair") && m.selected) && p(m);
|
|
2990
|
+
}), !M && (!Object.keys(T).length || Object.keys(f).length)) return void setTimeout(n, 100);
|
|
3012
2991
|
if (this._connecting = !1, this._connected = !0, this._chunk) {
|
|
3013
2992
|
try {
|
|
3014
2993
|
this.send(this._chunk);
|
|
@@ -3016,8 +2995,8 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
3016
2995
|
return this.destroy(a(I, "ERR_DATA_CHANNEL"));
|
|
3017
2996
|
}
|
|
3018
2997
|
this._chunk = null, this._debug('sent chunk from "write before connect"');
|
|
3019
|
-
const
|
|
3020
|
-
this._cb = null,
|
|
2998
|
+
const m = this._cb;
|
|
2999
|
+
this._cb = null, m(null);
|
|
3021
3000
|
}
|
|
3022
3001
|
typeof this._channel.bufferedAmountLowThreshold != "number" && (this._interval = setInterval(() => this._onInterval(), 150), this._interval.unref && this._interval.unref()), this._debug("connect"), this.emit("connect");
|
|
3023
3002
|
});
|
|
@@ -3044,8 +3023,8 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
3044
3023
|
}
|
|
3045
3024
|
_onChannelMessage(n) {
|
|
3046
3025
|
if (this.destroyed) return;
|
|
3047
|
-
let
|
|
3048
|
-
|
|
3026
|
+
let l = n.data;
|
|
3027
|
+
l instanceof ArrayBuffer && (l = g.from(l)), this.push(l);
|
|
3049
3028
|
}
|
|
3050
3029
|
_onChannelBufferedAmountLow() {
|
|
3051
3030
|
if (!this.destroyed && this._cb) {
|
|
@@ -3061,12 +3040,12 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
3061
3040
|
this.destroyed || (this._debug("on channel close"), this.destroy());
|
|
3062
3041
|
}
|
|
3063
3042
|
_onTrack(n) {
|
|
3064
|
-
this.destroyed || n.streams.forEach((
|
|
3065
|
-
this._debug("on track"), this.emit("track", n.track,
|
|
3043
|
+
this.destroyed || n.streams.forEach((l) => {
|
|
3044
|
+
this._debug("on track"), this.emit("track", n.track, l), this._remoteTracks.push({
|
|
3066
3045
|
track: n.track,
|
|
3067
|
-
stream:
|
|
3068
|
-
}), this._remoteStreams.some((y) => y.id ===
|
|
3069
|
-
this._debug("on stream"), this.emit("stream",
|
|
3046
|
+
stream: l
|
|
3047
|
+
}), this._remoteStreams.some((y) => y.id === l.id) || (this._remoteStreams.push(l), d(() => {
|
|
3048
|
+
this._debug("on stream"), this.emit("stream", l);
|
|
3070
3049
|
}));
|
|
3071
3050
|
});
|
|
3072
3051
|
}
|
|
@@ -3075,10 +3054,10 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
3075
3054
|
n[0] = "[" + this._id + "] " + n[0], S.apply(null, n);
|
|
3076
3055
|
}
|
|
3077
3056
|
}
|
|
3078
|
-
|
|
3057
|
+
_.WEBRTC_SUPPORT = !!O(), _.config = {
|
|
3079
3058
|
iceServers: [{ urls: ["stun:stun.l.google.com:19302", "stun:global.stun.twilio.com:3478"] }],
|
|
3080
3059
|
sdpSemantics: "unified-plan"
|
|
3081
|
-
},
|
|
3060
|
+
}, _.channelConfig = {}, N.exports = _;
|
|
3082
3061
|
}, {
|
|
3083
3062
|
buffer: 3,
|
|
3084
3063
|
debug: 4,
|
|
@@ -3090,72 +3069,72 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
3090
3069
|
}]
|
|
3091
3070
|
}, {}, [])("/");
|
|
3092
3071
|
});
|
|
3093
|
-
})),
|
|
3094
|
-
const
|
|
3095
|
-
return crypto.subtle.importKey("raw",
|
|
3072
|
+
})), Pt = /* @__PURE__ */ ot(Dt(), 1), Bt = (R, D) => {
|
|
3073
|
+
const U = Ye(R).buffer, j = Ye(D).buffer;
|
|
3074
|
+
return crypto.subtle.importKey("raw", U, "PBKDF2", !1, ["deriveKey"]).then((F) => crypto.subtle.deriveKey({
|
|
3096
3075
|
name: "PBKDF2",
|
|
3097
|
-
salt:
|
|
3076
|
+
salt: j,
|
|
3098
3077
|
iterations: 1e5,
|
|
3099
3078
|
hash: "SHA-256"
|
|
3100
3079
|
}, F, {
|
|
3101
3080
|
name: "AES-GCM",
|
|
3102
3081
|
length: 256
|
|
3103
3082
|
}, !0, ["encrypt", "decrypt"]));
|
|
3104
|
-
},
|
|
3105
|
-
if (!
|
|
3106
|
-
const
|
|
3083
|
+
}, et = (R, D) => {
|
|
3084
|
+
if (!D) return qe(R);
|
|
3085
|
+
const U = crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(12));
|
|
3107
3086
|
return crypto.subtle.encrypt({
|
|
3108
3087
|
name: "AES-GCM",
|
|
3109
|
-
iv:
|
|
3110
|
-
},
|
|
3088
|
+
iv: U
|
|
3089
|
+
}, D, R).then((j) => {
|
|
3111
3090
|
const F = re();
|
|
3112
|
-
return
|
|
3091
|
+
return je(F, "AES-GCM"), Re(F, U), Re(F, new Uint8Array(j)), ie(F);
|
|
3113
3092
|
});
|
|
3114
|
-
},
|
|
3115
|
-
const
|
|
3116
|
-
return
|
|
3117
|
-
},
|
|
3118
|
-
if (!
|
|
3119
|
-
const
|
|
3120
|
-
|
|
3121
|
-
const
|
|
3093
|
+
}, Ut = (R, D) => {
|
|
3094
|
+
const U = re();
|
|
3095
|
+
return bt(U, R), et(ie(U), D);
|
|
3096
|
+
}, tt = (R, D) => {
|
|
3097
|
+
if (!D) return qe(R);
|
|
3098
|
+
const U = Fe(R);
|
|
3099
|
+
Qe(U) !== "AES-GCM" && Tt(Je("Unknown encryption algorithm"));
|
|
3100
|
+
const j = De(U), F = De(U);
|
|
3122
3101
|
return crypto.subtle.decrypt({
|
|
3123
3102
|
name: "AES-GCM",
|
|
3124
|
-
iv:
|
|
3125
|
-
},
|
|
3126
|
-
},
|
|
3127
|
-
let
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
}), (!
|
|
3131
|
-
},
|
|
3132
|
-
const
|
|
3133
|
-
if (
|
|
3134
|
-
const
|
|
3103
|
+
iv: j
|
|
3104
|
+
}, D, F).then((C) => new Uint8Array(C));
|
|
3105
|
+
}, jt = (R, D) => tt(R, D).then((U) => kt(Fe(new Uint8Array(U)))), ne = St("y-webrtc"), Ce = 0, rt = 3, Ae = 1, We = 4, xe = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), nt = (R) => {
|
|
3106
|
+
let D = !0;
|
|
3107
|
+
R.webrtcConns.forEach((U) => {
|
|
3108
|
+
U.synced || (D = !1);
|
|
3109
|
+
}), (!D && R.synced || D && !R.synced) && (R.synced = D, R.provider.emit("synced", [{ synced: D }]), ne("synced ", ue, R.name, Te, " with all peers"));
|
|
3110
|
+
}, it = (R, D, U) => {
|
|
3111
|
+
const j = Fe(D), F = re(), C = Ot(j);
|
|
3112
|
+
if (R === void 0) return null;
|
|
3113
|
+
const N = R.awareness, w = R.doc;
|
|
3135
3114
|
let c = !1;
|
|
3136
|
-
switch (
|
|
3115
|
+
switch (C) {
|
|
3137
3116
|
case Ce: {
|
|
3138
3117
|
se(F, Ce);
|
|
3139
|
-
const S =
|
|
3140
|
-
S === 1 && !
|
|
3118
|
+
const S = ct(j, F, w, R);
|
|
3119
|
+
S === 1 && !R.synced && U(), S === 0 && (c = !0);
|
|
3141
3120
|
break;
|
|
3142
3121
|
}
|
|
3143
|
-
case
|
|
3144
|
-
se(F, Ae), Re(F, Oe(
|
|
3122
|
+
case rt:
|
|
3123
|
+
se(F, Ae), Re(F, Oe(N, Array.from(N.getStates().keys()))), c = !0;
|
|
3145
3124
|
break;
|
|
3146
3125
|
case Ae:
|
|
3147
|
-
|
|
3126
|
+
ft(N, De(j), R);
|
|
3148
3127
|
break;
|
|
3149
|
-
case
|
|
3150
|
-
const S =
|
|
3151
|
-
if (O !==
|
|
3152
|
-
const i = [],
|
|
3153
|
-
S ? (
|
|
3154
|
-
added:
|
|
3128
|
+
case We: {
|
|
3129
|
+
const S = Lt(j) === 1, O = Qe(j);
|
|
3130
|
+
if (O !== R.peerId && (R.bcConns.has(O) && !S || !R.bcConns.has(O) && S)) {
|
|
3131
|
+
const i = [], h = [];
|
|
3132
|
+
S ? (R.bcConns.add(O), h.push(O)) : (R.bcConns.delete(O), i.push(O)), R.provider.emit("peers", [{
|
|
3133
|
+
added: h,
|
|
3155
3134
|
removed: i,
|
|
3156
|
-
webrtcPeers: Array.from(
|
|
3157
|
-
bcPeers: Array.from(
|
|
3158
|
-
}]),
|
|
3135
|
+
webrtcPeers: Array.from(R.webrtcConns.keys()),
|
|
3136
|
+
bcPeers: Array.from(R.bcConns)
|
|
3137
|
+
}]), st(R);
|
|
3159
3138
|
}
|
|
3160
3139
|
break;
|
|
3161
3140
|
}
|
|
@@ -3163,226 +3142,225 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
3163
3142
|
return console.error("Unable to compute message"), F;
|
|
3164
3143
|
}
|
|
3165
3144
|
return c ? F : null;
|
|
3166
|
-
},
|
|
3167
|
-
const
|
|
3168
|
-
return ne("received message from ", ue,
|
|
3169
|
-
|
|
3145
|
+
}, Ft = (R, D) => {
|
|
3146
|
+
const U = R.room;
|
|
3147
|
+
return ne("received message from ", ue, R.remotePeerId, Xe, " (", U.name, ")", Te, Ze), it(U, D, () => {
|
|
3148
|
+
R.synced = !0, ne("synced ", ue, U.name, Te, " with ", ue, R.remotePeerId), nt(U);
|
|
3170
3149
|
});
|
|
3171
|
-
}, Ie = (
|
|
3172
|
-
ne("send message to ", ue,
|
|
3150
|
+
}, Ie = (R, D) => {
|
|
3151
|
+
ne("send message to ", ue, R.remotePeerId, Te, Xe, " (", R.room.name, ")", Ze);
|
|
3173
3152
|
try {
|
|
3174
|
-
|
|
3153
|
+
R.peer.send(ie(D));
|
|
3175
3154
|
} catch {
|
|
3176
3155
|
}
|
|
3177
|
-
},
|
|
3178
|
-
ne("broadcast message in ", ue,
|
|
3156
|
+
}, qt = (R, D) => {
|
|
3157
|
+
ne("broadcast message in ", ue, R.name, Te), R.webrtcConns.forEach((U) => {
|
|
3179
3158
|
try {
|
|
3180
|
-
|
|
3159
|
+
U.peer.send(D);
|
|
3181
3160
|
} catch {
|
|
3182
3161
|
}
|
|
3183
3162
|
});
|
|
3184
|
-
},
|
|
3185
|
-
constructor(
|
|
3186
|
-
ne("establishing connection to ", ue,
|
|
3187
|
-
initiator:
|
|
3188
|
-
...
|
|
3163
|
+
}, ze = class {
|
|
3164
|
+
constructor(R, D, U, j) {
|
|
3165
|
+
ne("establishing connection to ", ue, U), this.room = j, this.remotePeerId = U, this.glareToken = void 0, this.closed = !1, this.connected = !1, this.synced = !1, this.peer = new Pt.default({
|
|
3166
|
+
initiator: D,
|
|
3167
|
+
...j.provider.peerOpts
|
|
3189
3168
|
}), this.peer.on("signal", (F) => {
|
|
3190
|
-
this.glareToken === void 0 && (this.glareToken = Date.now() + Math.random()),
|
|
3191
|
-
to:
|
|
3192
|
-
from:
|
|
3169
|
+
this.glareToken === void 0 && (this.glareToken = Date.now() + Math.random()), He(R, j, {
|
|
3170
|
+
to: U,
|
|
3171
|
+
from: j.peerId,
|
|
3193
3172
|
type: "signal",
|
|
3194
3173
|
token: this.glareToken,
|
|
3195
3174
|
signal: F
|
|
3196
3175
|
});
|
|
3197
3176
|
}), this.peer.on("connect", () => {
|
|
3198
|
-
ne("connected to ", ue,
|
|
3199
|
-
const F =
|
|
3200
|
-
se(
|
|
3201
|
-
const
|
|
3202
|
-
if (
|
|
3177
|
+
ne("connected to ", ue, U), this.connected = !0;
|
|
3178
|
+
const F = j.provider.doc, C = j.awareness, N = re();
|
|
3179
|
+
se(N, Ce), Ke(N, F), Ie(this, N);
|
|
3180
|
+
const w = C.getStates();
|
|
3181
|
+
if (w.size > 0) {
|
|
3203
3182
|
const c = re();
|
|
3204
|
-
se(c, Ae), Re(c, Oe(
|
|
3183
|
+
se(c, Ae), Re(c, Oe(C, Array.from(w.keys()))), Ie(this, c);
|
|
3205
3184
|
}
|
|
3206
3185
|
}), this.peer.on("close", () => {
|
|
3207
|
-
this.connected = !1, this.closed = !0,
|
|
3186
|
+
this.connected = !1, this.closed = !0, j.webrtcConns.has(this.remotePeerId) && (j.webrtcConns.delete(this.remotePeerId), j.provider.emit("peers", [{
|
|
3208
3187
|
removed: [this.remotePeerId],
|
|
3209
3188
|
added: [],
|
|
3210
|
-
webrtcPeers: Array.from(
|
|
3211
|
-
bcPeers: Array.from(
|
|
3212
|
-
}])),
|
|
3189
|
+
webrtcPeers: Array.from(j.webrtcConns.keys()),
|
|
3190
|
+
bcPeers: Array.from(j.bcConns)
|
|
3191
|
+
}])), nt(j), this.peer.destroy(), ne("closed connection to ", ue, U), Ue(j);
|
|
3213
3192
|
}), this.peer.on("error", (F) => {
|
|
3214
|
-
ne("Error in connection to ", ue,
|
|
3193
|
+
ne("Error in connection to ", ue, U, ": ", F), Ue(j);
|
|
3215
3194
|
}), this.peer.on("data", (F) => {
|
|
3216
|
-
const
|
|
3217
|
-
|
|
3195
|
+
const C = Ft(this, F);
|
|
3196
|
+
C !== null && Ie(this, C);
|
|
3218
3197
|
});
|
|
3219
3198
|
}
|
|
3220
3199
|
destroy() {
|
|
3221
3200
|
this.peer.destroy();
|
|
3222
3201
|
}
|
|
3223
|
-
}, be = (
|
|
3224
|
-
|
|
3225
|
-
}, Ue = (
|
|
3226
|
-
|
|
3227
|
-
|
|
3202
|
+
}, be = (R, D) => et(D, R.key).then((U) => R.mux(() => lt(R.name, U))), Ge = (R, D) => {
|
|
3203
|
+
R.bcconnected && be(R, D), qt(R, D);
|
|
3204
|
+
}, Ue = (R) => {
|
|
3205
|
+
xe.forEach((D) => {
|
|
3206
|
+
D.connected && (D.send({
|
|
3228
3207
|
type: "subscribe",
|
|
3229
|
-
topics: [
|
|
3230
|
-
}),
|
|
3208
|
+
topics: [R.name]
|
|
3209
|
+
}), R.webrtcConns.size < R.provider.maxConns && He(D, R, {
|
|
3231
3210
|
type: "announce",
|
|
3232
|
-
from:
|
|
3211
|
+
from: R.peerId
|
|
3233
3212
|
}));
|
|
3234
3213
|
});
|
|
3235
|
-
},
|
|
3236
|
-
if (
|
|
3237
|
-
const
|
|
3238
|
-
se(
|
|
3214
|
+
}, st = (R) => {
|
|
3215
|
+
if (R.provider.filterBcConns) {
|
|
3216
|
+
const D = re();
|
|
3217
|
+
se(D, We), $e(D, 1), je(D, R.peerId), be(R, ie(D));
|
|
3239
3218
|
}
|
|
3240
|
-
},
|
|
3241
|
-
constructor(
|
|
3242
|
-
this.peerId = vt(), this.doc =
|
|
3243
|
-
const
|
|
3219
|
+
}, Wt = class {
|
|
3220
|
+
constructor(R, D, U, j) {
|
|
3221
|
+
this.peerId = vt(), this.doc = R, this.awareness = D.awareness, this.provider = D, this.synced = !1, this.name = U, this.key = j, this.webrtcConns = /* @__PURE__ */ new Map(), this.bcConns = /* @__PURE__ */ new Set(), this.mux = Mt(), this.bcconnected = !1, this._bcSubscriber = (F) => tt(new Uint8Array(F), j).then((C) => this.mux(() => {
|
|
3222
|
+
const N = it(this, C, () => {
|
|
3244
3223
|
});
|
|
3245
|
-
|
|
3246
|
-
})), this._docUpdateHandler = (F,
|
|
3247
|
-
const
|
|
3248
|
-
se(
|
|
3249
|
-
}, this._awarenessUpdateHandler = ({ added: F, updated:
|
|
3250
|
-
const c = F.concat(
|
|
3251
|
-
se(S, Ae), Re(S, Oe(this.awareness, c)),
|
|
3224
|
+
N && be(this, ie(N));
|
|
3225
|
+
})), this._docUpdateHandler = (F, C) => {
|
|
3226
|
+
const N = re();
|
|
3227
|
+
se(N, Ce), ut(N, F), Ge(this, ie(N));
|
|
3228
|
+
}, this._awarenessUpdateHandler = ({ added: F, updated: C, removed: N }, w) => {
|
|
3229
|
+
const c = F.concat(C).concat(N), S = re();
|
|
3230
|
+
se(S, Ae), Re(S, Oe(this.awareness, c)), Ge(this, ie(S));
|
|
3252
3231
|
}, this._beforeUnloadHandler = () => {
|
|
3253
|
-
|
|
3232
|
+
Ve(this.awareness, [R.clientID], "window unload"), ve.forEach((F) => {
|
|
3254
3233
|
F.disconnect();
|
|
3255
3234
|
});
|
|
3256
3235
|
}, typeof window < "u" ? window.addEventListener("beforeunload", this._beforeUnloadHandler) : typeof process < "u" && process.on("exit", this._beforeUnloadHandler);
|
|
3257
3236
|
}
|
|
3258
3237
|
connect() {
|
|
3259
3238
|
this.doc.on("update", this._docUpdateHandler), this.awareness.on("update", this._awarenessUpdateHandler), Ue(this);
|
|
3260
|
-
const
|
|
3261
|
-
|
|
3262
|
-
const
|
|
3263
|
-
se(
|
|
3264
|
-
const j = re();
|
|
3265
|
-
se(j, Ce), ft(j, this.doc), be(this, ie(j));
|
|
3239
|
+
const R = this.name;
|
|
3240
|
+
gt(R, this._bcSubscriber), this.bcconnected = !0, st(this);
|
|
3241
|
+
const D = re();
|
|
3242
|
+
se(D, Ce), Ke(D, this.doc), be(this, ie(D));
|
|
3266
3243
|
const U = re();
|
|
3267
|
-
se(U,
|
|
3244
|
+
se(U, Ce), dt(U, this.doc), be(this, ie(U));
|
|
3245
|
+
const j = re();
|
|
3246
|
+
se(j, rt), be(this, ie(j));
|
|
3268
3247
|
const F = re();
|
|
3269
3248
|
se(F, Ae), Re(F, Oe(this.awareness, [this.doc.clientID])), be(this, ie(F));
|
|
3270
3249
|
}
|
|
3271
3250
|
disconnect() {
|
|
3272
|
-
|
|
3273
|
-
|
|
3251
|
+
xe.forEach((D) => {
|
|
3252
|
+
D.connected && D.send({
|
|
3274
3253
|
type: "unsubscribe",
|
|
3275
3254
|
topics: [this.name]
|
|
3276
3255
|
});
|
|
3277
|
-
}),
|
|
3278
|
-
const
|
|
3279
|
-
se(
|
|
3256
|
+
}), Ve(this.awareness, [this.doc.clientID], "disconnect");
|
|
3257
|
+
const R = re();
|
|
3258
|
+
se(R, We), $e(R, 0), je(R, this.peerId), be(this, ie(R)), ht(this.name, this._bcSubscriber), this.bcconnected = !1, this.doc.off("update", this._docUpdateHandler), this.awareness.off("update", this._awarenessUpdateHandler), this.webrtcConns.forEach((D) => D.destroy());
|
|
3280
3259
|
}
|
|
3281
3260
|
destroy() {
|
|
3282
3261
|
this.disconnect(), typeof window < "u" ? window.removeEventListener("beforeunload", this._beforeUnloadHandler) : typeof process < "u" && process.off("exit", this._beforeUnloadHandler);
|
|
3283
3262
|
}
|
|
3284
|
-
},
|
|
3285
|
-
if (
|
|
3286
|
-
const F = new
|
|
3287
|
-
return
|
|
3288
|
-
},
|
|
3289
|
-
|
|
3290
|
-
|
|
3263
|
+
}, Ht = (R, D, U, j) => {
|
|
3264
|
+
if (ve.has(U)) throw Je(`A Yjs Doc connected to room "${U}" already exists!`);
|
|
3265
|
+
const F = new Wt(R, D, U, j);
|
|
3266
|
+
return ve.set(U, F), F;
|
|
3267
|
+
}, He = (R, D, U) => {
|
|
3268
|
+
D.key ? Ut(U, D.key).then((j) => {
|
|
3269
|
+
R.send({
|
|
3291
3270
|
type: "publish",
|
|
3292
|
-
topic:
|
|
3293
|
-
data:
|
|
3271
|
+
topic: D.name,
|
|
3272
|
+
data: At(j)
|
|
3294
3273
|
});
|
|
3295
|
-
}) :
|
|
3274
|
+
}) : R.send({
|
|
3296
3275
|
type: "publish",
|
|
3297
|
-
topic:
|
|
3298
|
-
data:
|
|
3276
|
+
topic: D.name,
|
|
3277
|
+
data: U
|
|
3299
3278
|
});
|
|
3300
|
-
},
|
|
3301
|
-
constructor(
|
|
3302
|
-
super(
|
|
3303
|
-
ne(`connected (${
|
|
3304
|
-
const
|
|
3279
|
+
}, Vt = class extends Nt {
|
|
3280
|
+
constructor(R) {
|
|
3281
|
+
super(R), this.providers = /* @__PURE__ */ new Set(), this.on("connect", () => {
|
|
3282
|
+
ne(`connected (${R})`);
|
|
3283
|
+
const D = Array.from(ve.keys());
|
|
3305
3284
|
this.send({
|
|
3306
3285
|
type: "subscribe",
|
|
3307
|
-
topics:
|
|
3308
|
-
}),
|
|
3286
|
+
topics: D
|
|
3287
|
+
}), ve.forEach((U) => He(this, U, {
|
|
3309
3288
|
type: "announce",
|
|
3310
|
-
from:
|
|
3289
|
+
from: U.peerId
|
|
3311
3290
|
}));
|
|
3312
|
-
}), this.on("message", (
|
|
3313
|
-
switch (
|
|
3291
|
+
}), this.on("message", (D) => {
|
|
3292
|
+
switch (D.type) {
|
|
3314
3293
|
case "publish": {
|
|
3315
|
-
const
|
|
3316
|
-
if (
|
|
3317
|
-
const F = (
|
|
3318
|
-
const
|
|
3319
|
-
if (
|
|
3320
|
-
const c =
|
|
3321
|
-
} : () =>
|
|
3294
|
+
const U = D.topic, j = ve.get(U);
|
|
3295
|
+
if (j == null || typeof U != "string") return;
|
|
3296
|
+
const F = (C) => {
|
|
3297
|
+
const N = j.webrtcConns, w = j.peerId;
|
|
3298
|
+
if (C == null || C.from === w || C.to !== void 0 && C.to !== w || j.bcConns.has(C.from)) return;
|
|
3299
|
+
const c = N.has(C.from) ? () => {
|
|
3300
|
+
} : () => j.provider.emit("peers", [{
|
|
3322
3301
|
removed: [],
|
|
3323
|
-
added: [
|
|
3324
|
-
webrtcPeers: Array.from(
|
|
3325
|
-
bcPeers: Array.from(
|
|
3302
|
+
added: [C.from],
|
|
3303
|
+
webrtcPeers: Array.from(j.webrtcConns.keys()),
|
|
3304
|
+
bcPeers: Array.from(j.bcConns)
|
|
3326
3305
|
}]);
|
|
3327
|
-
switch (
|
|
3306
|
+
switch (C.type) {
|
|
3328
3307
|
case "announce":
|
|
3329
|
-
|
|
3308
|
+
N.size < j.provider.maxConns && (Pe(N, C.from, () => new ze(this, !0, C.from, j)), c());
|
|
3330
3309
|
break;
|
|
3331
3310
|
case "signal":
|
|
3332
|
-
if (
|
|
3333
|
-
const S =
|
|
3311
|
+
if (C.signal.type === "offer") {
|
|
3312
|
+
const S = N.get(C.from);
|
|
3334
3313
|
if (S) {
|
|
3335
|
-
const O =
|
|
3314
|
+
const O = C.token, i = S.glareToken;
|
|
3336
3315
|
if (i && i > O) {
|
|
3337
|
-
ne("offer rejected: ",
|
|
3316
|
+
ne("offer rejected: ", C.from);
|
|
3338
3317
|
return;
|
|
3339
3318
|
}
|
|
3340
3319
|
S.glareToken = void 0;
|
|
3341
3320
|
}
|
|
3342
3321
|
}
|
|
3343
|
-
if (
|
|
3344
|
-
ne("offer answered by: ",
|
|
3345
|
-
const S =
|
|
3322
|
+
if (C.signal.type === "answer") {
|
|
3323
|
+
ne("offer answered by: ", C.from);
|
|
3324
|
+
const S = N.get(C.from);
|
|
3346
3325
|
S.glareToken = void 0;
|
|
3347
3326
|
}
|
|
3348
|
-
|
|
3327
|
+
C.to === w && (Pe(N, C.from, () => new ze(this, !1, C.from, j)).peer.signal(C.signal), c());
|
|
3349
3328
|
break;
|
|
3350
3329
|
}
|
|
3351
3330
|
};
|
|
3352
|
-
|
|
3331
|
+
j.key ? typeof D.data == "string" && jt(Rt(D.data), j.key).then(F) : F(D.data);
|
|
3353
3332
|
}
|
|
3354
3333
|
}
|
|
3355
|
-
}), this.on("disconnect", () => ne(`disconnect (${
|
|
3334
|
+
}), this.on("disconnect", () => ne(`disconnect (${R})`));
|
|
3356
3335
|
}
|
|
3357
|
-
},
|
|
3358
|
-
|
|
3359
|
-
},
|
|
3360
|
-
constructor(
|
|
3361
|
-
super(), this.roomName =
|
|
3362
|
-
this.room =
|
|
3363
|
-
}), this.connect(), this.destroy = this.destroy.bind(this),
|
|
3336
|
+
}, Ne = (R) => {
|
|
3337
|
+
R.emit("status", [{ connected: R.connected }]);
|
|
3338
|
+
}, Kt = class extends Ct {
|
|
3339
|
+
constructor(R, D, { signaling: U = ["wss://y-webrtc-eu.fly.dev"], password: j = null, awareness: F = new pt(D), maxConns: C = 20 + mt(wt() * 15), filterBcConns: N = !0, peerOpts: w = {} } = {}) {
|
|
3340
|
+
super(), this.roomName = R, this.doc = D, this.filterBcConns = N, this.awareness = F, this.shouldConnect = !1, this.signalingUrls = U, this.signalingConns = [], this.maxConns = C, this.peerOpts = w, this.key = j ? Bt(j, R) : qe(null), this.room = null, this.key.then((c) => {
|
|
3341
|
+
this.room = Ht(D, this, R, c), this.shouldConnect ? this.room.connect() : this.room.disconnect(), Ne(this);
|
|
3342
|
+
}), this.connect(), this.destroy = this.destroy.bind(this), D.on("destroy", this.destroy);
|
|
3364
3343
|
}
|
|
3365
3344
|
get connected() {
|
|
3366
3345
|
return this.room !== null && this.shouldConnect;
|
|
3367
3346
|
}
|
|
3368
3347
|
connect() {
|
|
3369
|
-
this.shouldConnect = !0, this.signalingUrls.forEach((
|
|
3370
|
-
const
|
|
3371
|
-
this.signalingConns.push(
|
|
3372
|
-
}), this.room && (this.room.connect(),
|
|
3348
|
+
this.shouldConnect = !0, this.signalingUrls.forEach((R) => {
|
|
3349
|
+
const D = Pe(xe, R, () => new Vt(R));
|
|
3350
|
+
this.signalingConns.push(D), D.providers.add(this);
|
|
3351
|
+
}), this.room && (this.room.connect(), Ne(this));
|
|
3373
3352
|
}
|
|
3374
3353
|
disconnect() {
|
|
3375
|
-
this.shouldConnect = !1, this.signalingConns.forEach((
|
|
3376
|
-
|
|
3377
|
-
}), this.room && (this.room.disconnect(),
|
|
3354
|
+
this.shouldConnect = !1, this.signalingConns.forEach((R) => {
|
|
3355
|
+
R.providers.delete(this), R.providers.size === 0 && (R.destroy(), xe.delete(R.url));
|
|
3356
|
+
}), this.room && (this.room.disconnect(), Ne(this));
|
|
3378
3357
|
}
|
|
3379
3358
|
destroy() {
|
|
3380
3359
|
this.doc.off("destroy", this.destroy), this.key.then(() => {
|
|
3381
|
-
this.room.destroy(),
|
|
3360
|
+
this.room.destroy(), ve.delete(this.roomName);
|
|
3382
3361
|
}), super.destroy();
|
|
3383
3362
|
}
|
|
3384
3363
|
};
|
|
3385
3364
|
export {
|
|
3386
|
-
|
|
3387
|
-
er as t
|
|
3365
|
+
Kt as WebrtcProvider
|
|
3388
3366
|
};
|