@streamlayer/sdk-web 0.28.29 → 0.29.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/lib/cjs/index.js +12 -12
- package/lib/es/index.js +973 -924
- package/package.json +2 -2
package/lib/es/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuestionStatus as We, QuestionType as Te, SilenceSetting as Kr } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
2
2
|
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
3
3
|
import { SdkOverlayType as ue } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
4
4
|
import { computed as Hr, map as qn, atom as Ct } from "nanostores";
|
|
5
|
-
import "@nanostores/logger";
|
|
6
|
-
import "microdiff";
|
|
7
|
-
import { Code as
|
|
8
|
-
import { createGrpcWebTransport as
|
|
9
|
-
import { nanoquery as
|
|
10
|
-
import { Events as
|
|
11
|
-
import { Client as
|
|
5
|
+
import { buildLogger as Qn } from "@nanostores/logger";
|
|
6
|
+
import Gn from "microdiff";
|
|
7
|
+
import { Code as zn, createPromiseClient as Kn, createCallbackClient as Hn } from "@connectrpc/connect";
|
|
8
|
+
import { createGrpcWebTransport as Wn } from "@connectrpc/connect-web";
|
|
9
|
+
import { nanoquery as Jn } from "@nanostores/query";
|
|
10
|
+
import { Events as Yn } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
11
|
+
import { Client as lt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
12
12
|
import { Users as Wr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
13
|
-
import { pino as
|
|
13
|
+
import { pino as Xn } from "pino";
|
|
14
14
|
import { Feed as ve } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
15
|
import { Leaderboard as Jr } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
17
|
var Yr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
18
|
-
function
|
|
18
|
+
function Zn(t) {
|
|
19
19
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
20
20
|
}
|
|
21
|
-
var
|
|
22
|
-
Ot.byteLength =
|
|
23
|
-
Ot.toByteArray =
|
|
24
|
-
Ot.fromByteArray =
|
|
25
|
-
var
|
|
26
|
-
for (var qe = 0,
|
|
27
|
-
|
|
21
|
+
var O = {}, Xr = {}, Ot = {};
|
|
22
|
+
Ot.byteLength = ri;
|
|
23
|
+
Ot.toByteArray = ii;
|
|
24
|
+
Ot.fromByteArray = ai;
|
|
25
|
+
var be = [], se = [], ei = typeof Uint8Array < "u" ? Uint8Array : Array, Nt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
26
|
+
for (var qe = 0, ti = Nt.length; qe < ti; ++qe)
|
|
27
|
+
be[qe] = Nt[qe], se[Nt.charCodeAt(qe)] = qe;
|
|
28
28
|
se["-".charCodeAt(0)] = 62;
|
|
29
29
|
se["_".charCodeAt(0)] = 63;
|
|
30
30
|
function Zr(t) {
|
|
@@ -36,58 +36,58 @@ function Zr(t) {
|
|
|
36
36
|
var o = r === e ? 0 : 4 - r % 4;
|
|
37
37
|
return [r, o];
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ri(t) {
|
|
40
40
|
var e = Zr(t), r = e[0], o = e[1];
|
|
41
41
|
return (r + o) * 3 / 4 - o;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ni(t, e, r) {
|
|
44
44
|
return (e + r) * 3 / 4 - r;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
var e, r = Zr(t), o = r[0], s = r[1], u = new
|
|
48
|
-
for (p = 0; p <
|
|
46
|
+
function ii(t) {
|
|
47
|
+
var e, r = Zr(t), o = r[0], s = r[1], u = new ei(ni(t, o, s)), l = 0, c = s > 0 ? o - 4 : o, p;
|
|
48
|
+
for (p = 0; p < c; p += 4)
|
|
49
49
|
e = se[t.charCodeAt(p)] << 18 | se[t.charCodeAt(p + 1)] << 12 | se[t.charCodeAt(p + 2)] << 6 | se[t.charCodeAt(p + 3)], u[l++] = e >> 16 & 255, u[l++] = e >> 8 & 255, u[l++] = e & 255;
|
|
50
50
|
return s === 2 && (e = se[t.charCodeAt(p)] << 2 | se[t.charCodeAt(p + 1)] >> 4, u[l++] = e & 255), s === 1 && (e = se[t.charCodeAt(p)] << 10 | se[t.charCodeAt(p + 1)] << 4 | se[t.charCodeAt(p + 2)] >> 2, u[l++] = e >> 8 & 255, u[l++] = e & 255), u;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
52
|
+
function oi(t) {
|
|
53
|
+
return be[t >> 18 & 63] + be[t >> 12 & 63] + be[t >> 6 & 63] + be[t & 63];
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function si(t, e, r) {
|
|
56
56
|
for (var o, s = [], u = e; u < r; u += 3)
|
|
57
|
-
o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(
|
|
57
|
+
o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(oi(o));
|
|
58
58
|
return s.join("");
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
for (var e, r = t.length, o = r % 3, s = [], u = 16383, l = 0,
|
|
62
|
-
s.push(
|
|
60
|
+
function ai(t) {
|
|
61
|
+
for (var e, r = t.length, o = r % 3, s = [], u = 16383, l = 0, c = r - o; l < c; l += u)
|
|
62
|
+
s.push(si(t, l, l + u > c ? c : l + u));
|
|
63
63
|
return o === 1 ? (e = t[r - 1], s.push(
|
|
64
|
-
|
|
64
|
+
be[e >> 2] + be[e << 4 & 63] + "=="
|
|
65
65
|
)) : o === 2 && (e = (t[r - 2] << 8) + t[r - 1], s.push(
|
|
66
|
-
|
|
66
|
+
be[e >> 10] + be[e >> 4 & 63] + be[e << 2 & 63] + "="
|
|
67
67
|
)), s.join("");
|
|
68
68
|
}
|
|
69
69
|
var fr = {};
|
|
70
70
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
71
71
|
fr.read = function(t, e, r, o, s) {
|
|
72
|
-
var u, l,
|
|
73
|
-
for (m += E, u = F & (1 << -g) - 1, F >>= -g, g +=
|
|
72
|
+
var u, l, c = s * 8 - o - 1, p = (1 << c) - 1, b = p >> 1, g = -7, m = r ? s - 1 : 0, E = r ? -1 : 1, F = t[e + m];
|
|
73
|
+
for (m += E, u = F & (1 << -g) - 1, F >>= -g, g += c; g > 0; u = u * 256 + t[e + m], m += E, g -= 8)
|
|
74
74
|
;
|
|
75
75
|
for (l = u & (1 << -g) - 1, u >>= -g, g += o; g > 0; l = l * 256 + t[e + m], m += E, g -= 8)
|
|
76
76
|
;
|
|
77
77
|
if (u === 0)
|
|
78
|
-
u = 1 -
|
|
78
|
+
u = 1 - b;
|
|
79
79
|
else {
|
|
80
80
|
if (u === p)
|
|
81
81
|
return l ? NaN : (F ? -1 : 1) * (1 / 0);
|
|
82
|
-
l = l + Math.pow(2, o), u = u -
|
|
82
|
+
l = l + Math.pow(2, o), u = u - b;
|
|
83
83
|
}
|
|
84
84
|
return (F ? -1 : 1) * l * Math.pow(2, u - o);
|
|
85
85
|
};
|
|
86
86
|
fr.write = function(t, e, r, o, s, u) {
|
|
87
|
-
var l,
|
|
88
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (
|
|
87
|
+
var l, c, p, b = u * 8 - s - 1, g = (1 << b) - 1, m = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = o ? 0 : u - 1, L = o ? 1 : -1, P = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
88
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (c = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (p = Math.pow(2, -l)) < 1 && (l--, p *= 2), l + m >= 1 ? e += E / p : e += E * Math.pow(2, 1 - m), e * p >= 2 && (l++, p /= 2), l + m >= g ? (c = 0, l = g) : l + m >= 1 ? (c = (e * p - 1) * Math.pow(2, s), l = l + m) : (c = e * Math.pow(2, m - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + F] = c & 255, F += L, c /= 256, s -= 8)
|
|
89
89
|
;
|
|
90
|
-
for (l = l << s |
|
|
90
|
+
for (l = l << s | c, b += s; b > 0; t[r + F] = l & 255, F += L, l /= 256, b -= 8)
|
|
91
91
|
;
|
|
92
92
|
t[r + F - L] |= P * 128;
|
|
93
93
|
};
|
|
@@ -99,9 +99,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
99
99
|
*/
|
|
100
100
|
(function(t) {
|
|
101
101
|
const e = Ot, r = fr, o = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
102
|
-
t.Buffer =
|
|
102
|
+
t.Buffer = c, t.SlowBuffer = _, t.INSPECT_MAX_BYTES = 50;
|
|
103
103
|
const s = 2147483647;
|
|
104
|
-
t.kMaxLength = s,
|
|
104
|
+
t.kMaxLength = s, c.TYPED_ARRAY_SUPPORT = u(), !c.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
105
105
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
106
106
|
);
|
|
107
107
|
function u() {
|
|
@@ -114,16 +114,16 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
114
114
|
return !1;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
Object.defineProperty(
|
|
117
|
+
Object.defineProperty(c.prototype, "parent", {
|
|
118
118
|
enumerable: !0,
|
|
119
119
|
get: function() {
|
|
120
|
-
if (
|
|
120
|
+
if (c.isBuffer(this))
|
|
121
121
|
return this.buffer;
|
|
122
122
|
}
|
|
123
|
-
}), Object.defineProperty(
|
|
123
|
+
}), Object.defineProperty(c.prototype, "offset", {
|
|
124
124
|
enumerable: !0,
|
|
125
125
|
get: function() {
|
|
126
|
-
if (
|
|
126
|
+
if (c.isBuffer(this))
|
|
127
127
|
return this.byteOffset;
|
|
128
128
|
}
|
|
129
129
|
});
|
|
@@ -131,9 +131,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
131
131
|
if (a > s)
|
|
132
132
|
throw new RangeError('The value "' + a + '" is invalid for option "size"');
|
|
133
133
|
const n = new Uint8Array(a);
|
|
134
|
-
return Object.setPrototypeOf(n,
|
|
134
|
+
return Object.setPrototypeOf(n, c.prototype), n;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function c(a, n, i) {
|
|
137
137
|
if (typeof a == "number") {
|
|
138
138
|
if (typeof n == "string")
|
|
139
139
|
throw new TypeError(
|
|
@@ -143,7 +143,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
143
143
|
}
|
|
144
144
|
return p(a, n, i);
|
|
145
145
|
}
|
|
146
|
-
|
|
146
|
+
c.poolSize = 8192;
|
|
147
147
|
function p(a, n, i) {
|
|
148
148
|
if (typeof a == "string")
|
|
149
149
|
return E(a, n);
|
|
@@ -159,53 +159,53 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
159
159
|
throw new TypeError(
|
|
160
160
|
'The "value" argument must not be of type number. Received type number'
|
|
161
161
|
);
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
164
|
-
return
|
|
162
|
+
const f = a.valueOf && a.valueOf();
|
|
163
|
+
if (f != null && f !== a)
|
|
164
|
+
return c.from(f, n, i);
|
|
165
165
|
const h = K(a);
|
|
166
166
|
if (h)
|
|
167
167
|
return h;
|
|
168
168
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof a[Symbol.toPrimitive] == "function")
|
|
169
|
-
return
|
|
169
|
+
return c.from(a[Symbol.toPrimitive]("string"), n, i);
|
|
170
170
|
throw new TypeError(
|
|
171
171
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
c.from = function(a, n, i) {
|
|
175
175
|
return p(a, n, i);
|
|
176
|
-
}, Object.setPrototypeOf(
|
|
177
|
-
function
|
|
176
|
+
}, Object.setPrototypeOf(c.prototype, Uint8Array.prototype), Object.setPrototypeOf(c, Uint8Array);
|
|
177
|
+
function b(a) {
|
|
178
178
|
if (typeof a != "number")
|
|
179
179
|
throw new TypeError('"size" argument must be of type number');
|
|
180
180
|
if (a < 0)
|
|
181
181
|
throw new RangeError('The value "' + a + '" is invalid for option "size"');
|
|
182
182
|
}
|
|
183
183
|
function g(a, n, i) {
|
|
184
|
-
return
|
|
184
|
+
return b(a), a <= 0 ? l(a) : n !== void 0 ? typeof i == "string" ? l(a).fill(n, i) : l(a).fill(n) : l(a);
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
c.alloc = function(a, n, i) {
|
|
187
187
|
return g(a, n, i);
|
|
188
188
|
};
|
|
189
189
|
function m(a) {
|
|
190
|
-
return
|
|
190
|
+
return b(a), l(a < 0 ? 0 : I(a) | 0);
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
c.allocUnsafe = function(a) {
|
|
193
193
|
return m(a);
|
|
194
|
-
},
|
|
194
|
+
}, c.allocUnsafeSlow = function(a) {
|
|
195
195
|
return m(a);
|
|
196
196
|
};
|
|
197
197
|
function E(a, n) {
|
|
198
|
-
if ((typeof n != "string" || n === "") && (n = "utf8"), !
|
|
198
|
+
if ((typeof n != "string" || n === "") && (n = "utf8"), !c.isEncoding(n))
|
|
199
199
|
throw new TypeError("Unknown encoding: " + n);
|
|
200
200
|
const i = D(a, n) | 0;
|
|
201
|
-
let
|
|
202
|
-
const h =
|
|
203
|
-
return h !== i && (
|
|
201
|
+
let f = l(i);
|
|
202
|
+
const h = f.write(a, n);
|
|
203
|
+
return h !== i && (f = f.slice(0, h)), f;
|
|
204
204
|
}
|
|
205
205
|
function F(a) {
|
|
206
206
|
const n = a.length < 0 ? 0 : I(a.length) | 0, i = l(n);
|
|
207
|
-
for (let
|
|
208
|
-
i[
|
|
207
|
+
for (let f = 0; f < n; f += 1)
|
|
208
|
+
i[f] = a[f] & 255;
|
|
209
209
|
return i;
|
|
210
210
|
}
|
|
211
211
|
function L(a) {
|
|
@@ -220,11 +220,11 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
220
220
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
221
221
|
if (a.byteLength < n + (i || 0))
|
|
222
222
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
223
|
-
let
|
|
224
|
-
return n === void 0 && i === void 0 ?
|
|
223
|
+
let f;
|
|
224
|
+
return n === void 0 && i === void 0 ? f = new Uint8Array(a) : i === void 0 ? f = new Uint8Array(a, n) : f = new Uint8Array(a, n, i), Object.setPrototypeOf(f, c.prototype), f;
|
|
225
225
|
}
|
|
226
226
|
function K(a) {
|
|
227
|
-
if (
|
|
227
|
+
if (c.isBuffer(a)) {
|
|
228
228
|
const n = I(a.length) | 0, i = l(n);
|
|
229
229
|
return i.length === 0 || a.copy(i, 0, 0, n), i;
|
|
230
230
|
}
|
|
@@ -239,25 +239,25 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
239
239
|
return a | 0;
|
|
240
240
|
}
|
|
241
241
|
function _(a) {
|
|
242
|
-
return +a != a && (a = 0),
|
|
242
|
+
return +a != a && (a = 0), c.alloc(+a);
|
|
243
243
|
}
|
|
244
|
-
|
|
245
|
-
return n != null && n._isBuffer === !0 && n !==
|
|
246
|
-
},
|
|
247
|
-
if (ge(n, Uint8Array) && (n =
|
|
244
|
+
c.isBuffer = function(n) {
|
|
245
|
+
return n != null && n._isBuffer === !0 && n !== c.prototype;
|
|
246
|
+
}, c.compare = function(n, i) {
|
|
247
|
+
if (ge(n, Uint8Array) && (n = c.from(n, n.offset, n.byteLength)), ge(i, Uint8Array) && (i = c.from(i, i.offset, i.byteLength)), !c.isBuffer(n) || !c.isBuffer(i))
|
|
248
248
|
throw new TypeError(
|
|
249
249
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
250
250
|
);
|
|
251
251
|
if (n === i)
|
|
252
252
|
return 0;
|
|
253
|
-
let
|
|
254
|
-
for (let y = 0,
|
|
253
|
+
let f = n.length, h = i.length;
|
|
254
|
+
for (let y = 0, w = Math.min(f, h); y < w; ++y)
|
|
255
255
|
if (n[y] !== i[y]) {
|
|
256
|
-
|
|
256
|
+
f = n[y], h = i[y];
|
|
257
257
|
break;
|
|
258
258
|
}
|
|
259
|
-
return
|
|
260
|
-
},
|
|
259
|
+
return f < h ? -1 : h < f ? 1 : 0;
|
|
260
|
+
}, c.isEncoding = function(n) {
|
|
261
261
|
switch (String(n).toLowerCase()) {
|
|
262
262
|
case "hex":
|
|
263
263
|
case "utf8":
|
|
@@ -274,35 +274,35 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
274
274
|
default:
|
|
275
275
|
return !1;
|
|
276
276
|
}
|
|
277
|
-
},
|
|
277
|
+
}, c.concat = function(n, i) {
|
|
278
278
|
if (!Array.isArray(n))
|
|
279
279
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
280
280
|
if (n.length === 0)
|
|
281
|
-
return
|
|
282
|
-
let
|
|
281
|
+
return c.alloc(0);
|
|
282
|
+
let f;
|
|
283
283
|
if (i === void 0)
|
|
284
|
-
for (i = 0,
|
|
285
|
-
i += n[
|
|
286
|
-
const h =
|
|
284
|
+
for (i = 0, f = 0; f < n.length; ++f)
|
|
285
|
+
i += n[f].length;
|
|
286
|
+
const h = c.allocUnsafe(i);
|
|
287
287
|
let y = 0;
|
|
288
|
-
for (
|
|
289
|
-
let
|
|
290
|
-
if (ge(
|
|
291
|
-
y +
|
|
288
|
+
for (f = 0; f < n.length; ++f) {
|
|
289
|
+
let w = n[f];
|
|
290
|
+
if (ge(w, Uint8Array))
|
|
291
|
+
y + w.length > h.length ? (c.isBuffer(w) || (w = c.from(w)), w.copy(h, y)) : Uint8Array.prototype.set.call(
|
|
292
292
|
h,
|
|
293
|
-
|
|
293
|
+
w,
|
|
294
294
|
y
|
|
295
295
|
);
|
|
296
|
-
else if (
|
|
297
|
-
|
|
296
|
+
else if (c.isBuffer(w))
|
|
297
|
+
w.copy(h, y);
|
|
298
298
|
else
|
|
299
299
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
300
|
-
y +=
|
|
300
|
+
y += w.length;
|
|
301
301
|
}
|
|
302
302
|
return h;
|
|
303
303
|
};
|
|
304
304
|
function D(a, n) {
|
|
305
|
-
if (
|
|
305
|
+
if (c.isBuffer(a))
|
|
306
306
|
return a.length;
|
|
307
307
|
if (ArrayBuffer.isView(a) || ge(a, ArrayBuffer))
|
|
308
308
|
return a.byteLength;
|
|
@@ -310,8 +310,8 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
310
310
|
throw new TypeError(
|
|
311
311
|
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof a
|
|
312
312
|
);
|
|
313
|
-
const i = a.length,
|
|
314
|
-
if (!
|
|
313
|
+
const i = a.length, f = arguments.length > 2 && arguments[2] === !0;
|
|
314
|
+
if (!f && i === 0)
|
|
315
315
|
return 0;
|
|
316
316
|
let h = !1;
|
|
317
317
|
for (; ; )
|
|
@@ -322,7 +322,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
322
322
|
return i;
|
|
323
323
|
case "utf8":
|
|
324
324
|
case "utf-8":
|
|
325
|
-
return
|
|
325
|
+
return ot(a).length;
|
|
326
326
|
case "ucs2":
|
|
327
327
|
case "ucs-2":
|
|
328
328
|
case "utf16le":
|
|
@@ -331,16 +331,16 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
331
331
|
case "hex":
|
|
332
332
|
return i >>> 1;
|
|
333
333
|
case "base64":
|
|
334
|
-
return
|
|
334
|
+
return dt(a).length;
|
|
335
335
|
default:
|
|
336
336
|
if (h)
|
|
337
|
-
return
|
|
337
|
+
return f ? -1 : ot(a).length;
|
|
338
338
|
n = ("" + n).toLowerCase(), h = !0;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
|
|
341
|
+
c.byteLength = D;
|
|
342
342
|
function U(a, n, i) {
|
|
343
|
-
let
|
|
343
|
+
let f = !1;
|
|
344
344
|
if ((n === void 0 || n < 0) && (n = 0), n > this.length || ((i === void 0 || i > this.length) && (i = this.length), i <= 0) || (i >>>= 0, n >>>= 0, i <= n))
|
|
345
345
|
return "";
|
|
346
346
|
for (a || (a = "utf8"); ; )
|
|
@@ -351,88 +351,88 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
351
351
|
case "utf-8":
|
|
352
352
|
return fe(this, n, i);
|
|
353
353
|
case "ascii":
|
|
354
|
-
return
|
|
354
|
+
return it(this, n, i);
|
|
355
355
|
case "latin1":
|
|
356
356
|
case "binary":
|
|
357
357
|
return ke(this, n, i);
|
|
358
358
|
case "base64":
|
|
359
|
-
return
|
|
359
|
+
return nt(this, n, i);
|
|
360
360
|
case "ucs2":
|
|
361
361
|
case "ucs-2":
|
|
362
362
|
case "utf16le":
|
|
363
363
|
case "utf-16le":
|
|
364
364
|
return Pe(this, n, i);
|
|
365
365
|
default:
|
|
366
|
-
if (
|
|
366
|
+
if (f)
|
|
367
367
|
throw new TypeError("Unknown encoding: " + a);
|
|
368
|
-
a = (a + "").toLowerCase(),
|
|
368
|
+
a = (a + "").toLowerCase(), f = !0;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
|
|
371
|
+
c.prototype._isBuffer = !0;
|
|
372
372
|
function T(a, n, i) {
|
|
373
|
-
const
|
|
374
|
-
a[n] = a[i], a[i] =
|
|
373
|
+
const f = a[n];
|
|
374
|
+
a[n] = a[i], a[i] = f;
|
|
375
375
|
}
|
|
376
|
-
|
|
376
|
+
c.prototype.swap16 = function() {
|
|
377
377
|
const n = this.length;
|
|
378
378
|
if (n % 2 !== 0)
|
|
379
379
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
380
380
|
for (let i = 0; i < n; i += 2)
|
|
381
381
|
T(this, i, i + 1);
|
|
382
382
|
return this;
|
|
383
|
-
},
|
|
383
|
+
}, c.prototype.swap32 = function() {
|
|
384
384
|
const n = this.length;
|
|
385
385
|
if (n % 4 !== 0)
|
|
386
386
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
387
387
|
for (let i = 0; i < n; i += 4)
|
|
388
388
|
T(this, i, i + 3), T(this, i + 1, i + 2);
|
|
389
389
|
return this;
|
|
390
|
-
},
|
|
390
|
+
}, c.prototype.swap64 = function() {
|
|
391
391
|
const n = this.length;
|
|
392
392
|
if (n % 8 !== 0)
|
|
393
393
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
394
394
|
for (let i = 0; i < n; i += 8)
|
|
395
395
|
T(this, i, i + 7), T(this, i + 1, i + 6), T(this, i + 2, i + 5), T(this, i + 3, i + 4);
|
|
396
396
|
return this;
|
|
397
|
-
},
|
|
397
|
+
}, c.prototype.toString = function() {
|
|
398
398
|
const n = this.length;
|
|
399
399
|
return n === 0 ? "" : arguments.length === 0 ? fe(this, 0, n) : U.apply(this, arguments);
|
|
400
|
-
},
|
|
401
|
-
if (!
|
|
400
|
+
}, c.prototype.toLocaleString = c.prototype.toString, c.prototype.equals = function(n) {
|
|
401
|
+
if (!c.isBuffer(n))
|
|
402
402
|
throw new TypeError("Argument must be a Buffer");
|
|
403
|
-
return this === n ? !0 :
|
|
404
|
-
},
|
|
403
|
+
return this === n ? !0 : c.compare(this, n) === 0;
|
|
404
|
+
}, c.prototype.inspect = function() {
|
|
405
405
|
let n = "";
|
|
406
406
|
const i = t.INSPECT_MAX_BYTES;
|
|
407
407
|
return n = this.toString("hex", 0, i).replace(/(.{2})/g, "$1 ").trim(), this.length > i && (n += " ... "), "<Buffer " + n + ">";
|
|
408
|
-
}, o && (
|
|
409
|
-
if (ge(n, Uint8Array) && (n =
|
|
408
|
+
}, o && (c.prototype[o] = c.prototype.inspect), c.prototype.compare = function(n, i, f, h, y) {
|
|
409
|
+
if (ge(n, Uint8Array) && (n = c.from(n, n.offset, n.byteLength)), !c.isBuffer(n))
|
|
410
410
|
throw new TypeError(
|
|
411
411
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof n
|
|
412
412
|
);
|
|
413
|
-
if (i === void 0 && (i = 0),
|
|
413
|
+
if (i === void 0 && (i = 0), f === void 0 && (f = n ? n.length : 0), h === void 0 && (h = 0), y === void 0 && (y = this.length), i < 0 || f > n.length || h < 0 || y > this.length)
|
|
414
414
|
throw new RangeError("out of range index");
|
|
415
|
-
if (h >= y && i >=
|
|
415
|
+
if (h >= y && i >= f)
|
|
416
416
|
return 0;
|
|
417
417
|
if (h >= y)
|
|
418
418
|
return -1;
|
|
419
|
-
if (i >=
|
|
419
|
+
if (i >= f)
|
|
420
420
|
return 1;
|
|
421
|
-
if (i >>>= 0,
|
|
421
|
+
if (i >>>= 0, f >>>= 0, h >>>= 0, y >>>= 0, this === n)
|
|
422
422
|
return 0;
|
|
423
|
-
let
|
|
424
|
-
const W = Math.min(
|
|
423
|
+
let w = y - h, R = f - i;
|
|
424
|
+
const W = Math.min(w, R), z = this.slice(h, y), J = n.slice(i, f);
|
|
425
425
|
for (let Q = 0; Q < W; ++Q)
|
|
426
426
|
if (z[Q] !== J[Q]) {
|
|
427
|
-
|
|
427
|
+
w = z[Q], R = J[Q];
|
|
428
428
|
break;
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return w < R ? -1 : R < w ? 1 : 0;
|
|
431
431
|
};
|
|
432
|
-
function x(a, n, i,
|
|
432
|
+
function x(a, n, i, f, h) {
|
|
433
433
|
if (a.length === 0)
|
|
434
434
|
return -1;
|
|
435
|
-
if (typeof i == "string" ? (
|
|
435
|
+
if (typeof i == "string" ? (f = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, Lt(i) && (i = h ? 0 : a.length - 1), i < 0 && (i = a.length + i), i >= a.length) {
|
|
436
436
|
if (h)
|
|
437
437
|
return -1;
|
|
438
438
|
i = a.length - 1;
|
|
@@ -441,18 +441,18 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
441
441
|
i = 0;
|
|
442
442
|
else
|
|
443
443
|
return -1;
|
|
444
|
-
if (typeof n == "string" && (n =
|
|
445
|
-
return n.length === 0 ? -1 : k(a, n, i,
|
|
444
|
+
if (typeof n == "string" && (n = c.from(n, f)), c.isBuffer(n))
|
|
445
|
+
return n.length === 0 ? -1 : k(a, n, i, f, h);
|
|
446
446
|
if (typeof n == "number")
|
|
447
|
-
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? h ? Uint8Array.prototype.indexOf.call(a, n, i) : Uint8Array.prototype.lastIndexOf.call(a, n, i) : k(a, [n], i,
|
|
447
|
+
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? h ? Uint8Array.prototype.indexOf.call(a, n, i) : Uint8Array.prototype.lastIndexOf.call(a, n, i) : k(a, [n], i, f, h);
|
|
448
448
|
throw new TypeError("val must be string, number or Buffer");
|
|
449
449
|
}
|
|
450
|
-
function k(a, n, i,
|
|
451
|
-
let y = 1,
|
|
452
|
-
if (
|
|
450
|
+
function k(a, n, i, f, h) {
|
|
451
|
+
let y = 1, w = a.length, R = n.length;
|
|
452
|
+
if (f !== void 0 && (f = String(f).toLowerCase(), f === "ucs2" || f === "ucs-2" || f === "utf16le" || f === "utf-16le")) {
|
|
453
453
|
if (a.length < 2 || n.length < 2)
|
|
454
454
|
return -1;
|
|
455
|
-
y = 2,
|
|
455
|
+
y = 2, w /= 2, R /= 2, i /= 2;
|
|
456
456
|
}
|
|
457
457
|
function W(J, Q) {
|
|
458
458
|
return y === 1 ? J[Q] : J.readUInt16BE(Q * y);
|
|
@@ -460,14 +460,14 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
460
460
|
let z;
|
|
461
461
|
if (h) {
|
|
462
462
|
let J = -1;
|
|
463
|
-
for (z = i; z <
|
|
463
|
+
for (z = i; z < w; z++)
|
|
464
464
|
if (W(a, z) === W(n, J === -1 ? 0 : z - J)) {
|
|
465
465
|
if (J === -1 && (J = z), z - J + 1 === R)
|
|
466
466
|
return J * y;
|
|
467
467
|
} else
|
|
468
468
|
J !== -1 && (z -= z - J), J = -1;
|
|
469
469
|
} else
|
|
470
|
-
for (i + R >
|
|
470
|
+
for (i + R > w && (i = w - R), z = i; z >= 0; z--) {
|
|
471
471
|
let J = !0;
|
|
472
472
|
for (let Q = 0; Q < R; Q++)
|
|
473
473
|
if (W(a, z + Q) !== W(n, Q)) {
|
|
@@ -479,162 +479,162 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
479
479
|
}
|
|
480
480
|
return -1;
|
|
481
481
|
}
|
|
482
|
-
|
|
483
|
-
return this.indexOf(n, i,
|
|
484
|
-
},
|
|
485
|
-
return x(this, n, i,
|
|
486
|
-
},
|
|
487
|
-
return x(this, n, i,
|
|
482
|
+
c.prototype.includes = function(n, i, f) {
|
|
483
|
+
return this.indexOf(n, i, f) !== -1;
|
|
484
|
+
}, c.prototype.indexOf = function(n, i, f) {
|
|
485
|
+
return x(this, n, i, f, !0);
|
|
486
|
+
}, c.prototype.lastIndexOf = function(n, i, f) {
|
|
487
|
+
return x(this, n, i, f, !1);
|
|
488
488
|
};
|
|
489
|
-
function G(a, n, i,
|
|
489
|
+
function G(a, n, i, f) {
|
|
490
490
|
i = Number(i) || 0;
|
|
491
491
|
const h = a.length - i;
|
|
492
|
-
|
|
492
|
+
f ? (f = Number(f), f > h && (f = h)) : f = h;
|
|
493
493
|
const y = n.length;
|
|
494
|
-
|
|
495
|
-
let
|
|
496
|
-
for (
|
|
497
|
-
const R = parseInt(n.substr(
|
|
494
|
+
f > y / 2 && (f = y / 2);
|
|
495
|
+
let w;
|
|
496
|
+
for (w = 0; w < f; ++w) {
|
|
497
|
+
const R = parseInt(n.substr(w * 2, 2), 16);
|
|
498
498
|
if (Lt(R))
|
|
499
|
-
return
|
|
500
|
-
a[i +
|
|
499
|
+
return w;
|
|
500
|
+
a[i + w] = R;
|
|
501
501
|
}
|
|
502
|
-
return
|
|
502
|
+
return w;
|
|
503
503
|
}
|
|
504
|
-
function ie(a, n, i,
|
|
505
|
-
return ot(
|
|
504
|
+
function ie(a, n, i, f) {
|
|
505
|
+
return st(ot(n, a.length - i), a, i, f);
|
|
506
506
|
}
|
|
507
|
-
function Oe(a, n, i,
|
|
508
|
-
return
|
|
507
|
+
function Oe(a, n, i, f) {
|
|
508
|
+
return st(Rt(n), a, i, f);
|
|
509
509
|
}
|
|
510
|
-
function Se(a, n, i,
|
|
511
|
-
return
|
|
510
|
+
function Se(a, n, i, f) {
|
|
511
|
+
return st(dt(n), a, i, f);
|
|
512
512
|
}
|
|
513
|
-
function ce(a, n, i,
|
|
514
|
-
return
|
|
513
|
+
function ce(a, n, i, f) {
|
|
514
|
+
return st(S(n, a.length - i), a, i, f);
|
|
515
515
|
}
|
|
516
|
-
|
|
516
|
+
c.prototype.write = function(n, i, f, h) {
|
|
517
517
|
if (i === void 0)
|
|
518
|
-
h = "utf8",
|
|
519
|
-
else if (
|
|
520
|
-
h = i,
|
|
518
|
+
h = "utf8", f = this.length, i = 0;
|
|
519
|
+
else if (f === void 0 && typeof i == "string")
|
|
520
|
+
h = i, f = this.length, i = 0;
|
|
521
521
|
else if (isFinite(i))
|
|
522
|
-
i = i >>> 0, isFinite(
|
|
522
|
+
i = i >>> 0, isFinite(f) ? (f = f >>> 0, h === void 0 && (h = "utf8")) : (h = f, f = void 0);
|
|
523
523
|
else
|
|
524
524
|
throw new Error(
|
|
525
525
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
526
526
|
);
|
|
527
527
|
const y = this.length - i;
|
|
528
|
-
if ((
|
|
528
|
+
if ((f === void 0 || f > y) && (f = y), n.length > 0 && (f < 0 || i < 0) || i > this.length)
|
|
529
529
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
530
530
|
h || (h = "utf8");
|
|
531
|
-
let
|
|
531
|
+
let w = !1;
|
|
532
532
|
for (; ; )
|
|
533
533
|
switch (h) {
|
|
534
534
|
case "hex":
|
|
535
|
-
return G(this, n, i,
|
|
535
|
+
return G(this, n, i, f);
|
|
536
536
|
case "utf8":
|
|
537
537
|
case "utf-8":
|
|
538
|
-
return ie(this, n, i,
|
|
538
|
+
return ie(this, n, i, f);
|
|
539
539
|
case "ascii":
|
|
540
540
|
case "latin1":
|
|
541
541
|
case "binary":
|
|
542
|
-
return Oe(this, n, i,
|
|
542
|
+
return Oe(this, n, i, f);
|
|
543
543
|
case "base64":
|
|
544
|
-
return Se(this, n, i,
|
|
544
|
+
return Se(this, n, i, f);
|
|
545
545
|
case "ucs2":
|
|
546
546
|
case "ucs-2":
|
|
547
547
|
case "utf16le":
|
|
548
548
|
case "utf-16le":
|
|
549
|
-
return ce(this, n, i,
|
|
549
|
+
return ce(this, n, i, f);
|
|
550
550
|
default:
|
|
551
|
-
if (
|
|
551
|
+
if (w)
|
|
552
552
|
throw new TypeError("Unknown encoding: " + h);
|
|
553
|
-
h = ("" + h).toLowerCase(),
|
|
553
|
+
h = ("" + h).toLowerCase(), w = !0;
|
|
554
554
|
}
|
|
555
|
-
},
|
|
555
|
+
}, c.prototype.toJSON = function() {
|
|
556
556
|
return {
|
|
557
557
|
type: "Buffer",
|
|
558
558
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
559
559
|
};
|
|
560
560
|
};
|
|
561
|
-
function
|
|
561
|
+
function nt(a, n, i) {
|
|
562
562
|
return n === 0 && i === a.length ? e.fromByteArray(a) : e.fromByteArray(a.slice(n, i));
|
|
563
563
|
}
|
|
564
564
|
function fe(a, n, i) {
|
|
565
565
|
i = Math.min(a.length, i);
|
|
566
|
-
const
|
|
566
|
+
const f = [];
|
|
567
567
|
let h = n;
|
|
568
568
|
for (; h < i; ) {
|
|
569
569
|
const y = a[h];
|
|
570
|
-
let
|
|
570
|
+
let w = null, R = y > 239 ? 4 : y > 223 ? 3 : y > 191 ? 2 : 1;
|
|
571
571
|
if (h + R <= i) {
|
|
572
572
|
let W, z, J, Q;
|
|
573
573
|
switch (R) {
|
|
574
574
|
case 1:
|
|
575
|
-
y < 128 && (
|
|
575
|
+
y < 128 && (w = y);
|
|
576
576
|
break;
|
|
577
577
|
case 2:
|
|
578
|
-
W = a[h + 1], (W & 192) === 128 && (Q = (y & 31) << 6 | W & 63, Q > 127 && (
|
|
578
|
+
W = a[h + 1], (W & 192) === 128 && (Q = (y & 31) << 6 | W & 63, Q > 127 && (w = Q));
|
|
579
579
|
break;
|
|
580
580
|
case 3:
|
|
581
|
-
W = a[h + 1], z = a[h + 2], (W & 192) === 128 && (z & 192) === 128 && (Q = (y & 15) << 12 | (W & 63) << 6 | z & 63, Q > 2047 && (Q < 55296 || Q > 57343) && (
|
|
581
|
+
W = a[h + 1], z = a[h + 2], (W & 192) === 128 && (z & 192) === 128 && (Q = (y & 15) << 12 | (W & 63) << 6 | z & 63, Q > 2047 && (Q < 55296 || Q > 57343) && (w = Q));
|
|
582
582
|
break;
|
|
583
583
|
case 4:
|
|
584
|
-
W = a[h + 1], z = a[h + 2], J = a[h + 3], (W & 192) === 128 && (z & 192) === 128 && (J & 192) === 128 && (Q = (y & 15) << 18 | (W & 63) << 12 | (z & 63) << 6 | J & 63, Q > 65535 && Q < 1114112 && (
|
|
584
|
+
W = a[h + 1], z = a[h + 2], J = a[h + 3], (W & 192) === 128 && (z & 192) === 128 && (J & 192) === 128 && (Q = (y & 15) << 18 | (W & 63) << 12 | (z & 63) << 6 | J & 63, Q > 65535 && Q < 1114112 && (w = Q));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
|
|
587
|
+
w === null ? (w = 65533, R = 1) : w > 65535 && (w -= 65536, f.push(w >>> 10 & 1023 | 55296), w = 56320 | w & 1023), f.push(w), h += R;
|
|
588
588
|
}
|
|
589
|
-
return Be(
|
|
589
|
+
return Be(f);
|
|
590
590
|
}
|
|
591
591
|
const xe = 4096;
|
|
592
592
|
function Be(a) {
|
|
593
593
|
const n = a.length;
|
|
594
594
|
if (n <= xe)
|
|
595
595
|
return String.fromCharCode.apply(String, a);
|
|
596
|
-
let i = "",
|
|
597
|
-
for (;
|
|
596
|
+
let i = "", f = 0;
|
|
597
|
+
for (; f < n; )
|
|
598
598
|
i += String.fromCharCode.apply(
|
|
599
599
|
String,
|
|
600
|
-
a.slice(
|
|
600
|
+
a.slice(f, f += xe)
|
|
601
601
|
);
|
|
602
602
|
return i;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
let
|
|
604
|
+
function it(a, n, i) {
|
|
605
|
+
let f = "";
|
|
606
606
|
i = Math.min(a.length, i);
|
|
607
607
|
for (let h = n; h < i; ++h)
|
|
608
|
-
|
|
609
|
-
return
|
|
608
|
+
f += String.fromCharCode(a[h] & 127);
|
|
609
|
+
return f;
|
|
610
610
|
}
|
|
611
611
|
function ke(a, n, i) {
|
|
612
|
-
let
|
|
612
|
+
let f = "";
|
|
613
613
|
i = Math.min(a.length, i);
|
|
614
614
|
for (let h = n; h < i; ++h)
|
|
615
|
-
|
|
616
|
-
return
|
|
615
|
+
f += String.fromCharCode(a[h]);
|
|
616
|
+
return f;
|
|
617
617
|
}
|
|
618
618
|
function le(a, n, i) {
|
|
619
|
-
const
|
|
620
|
-
(!n || n < 0) && (n = 0), (!i || i < 0 || i >
|
|
619
|
+
const f = a.length;
|
|
620
|
+
(!n || n < 0) && (n = 0), (!i || i < 0 || i > f) && (i = f);
|
|
621
621
|
let h = "";
|
|
622
622
|
for (let y = n; y < i; ++y)
|
|
623
623
|
h += Vn[a[y]];
|
|
624
624
|
return h;
|
|
625
625
|
}
|
|
626
626
|
function Pe(a, n, i) {
|
|
627
|
-
const
|
|
627
|
+
const f = a.slice(n, i);
|
|
628
628
|
let h = "";
|
|
629
|
-
for (let y = 0; y <
|
|
630
|
-
h += String.fromCharCode(
|
|
629
|
+
for (let y = 0; y < f.length - 1; y += 2)
|
|
630
|
+
h += String.fromCharCode(f[y] + f[y + 1] * 256);
|
|
631
631
|
return h;
|
|
632
632
|
}
|
|
633
|
-
|
|
634
|
-
const
|
|
635
|
-
n = ~~n, i = i === void 0 ?
|
|
633
|
+
c.prototype.slice = function(n, i) {
|
|
634
|
+
const f = this.length;
|
|
635
|
+
n = ~~n, i = i === void 0 ? f : ~~i, n < 0 ? (n += f, n < 0 && (n = 0)) : n > f && (n = f), i < 0 ? (i += f, i < 0 && (i = 0)) : i > f && (i = f), i < n && (i = n);
|
|
636
636
|
const h = this.subarray(n, i);
|
|
637
|
-
return Object.setPrototypeOf(h,
|
|
637
|
+
return Object.setPrototypeOf(h, c.prototype), h;
|
|
638
638
|
};
|
|
639
639
|
function H(a, n, i) {
|
|
640
640
|
if (a % 1 !== 0 || a < 0)
|
|
@@ -642,242 +642,242 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
642
642
|
if (a + n > i)
|
|
643
643
|
throw new RangeError("Trying to access beyond buffer length");
|
|
644
644
|
}
|
|
645
|
-
|
|
646
|
-
n = n >>> 0, i = i >>> 0,
|
|
647
|
-
let h = this[n], y = 1,
|
|
648
|
-
for (; ++
|
|
649
|
-
h += this[n +
|
|
645
|
+
c.prototype.readUintLE = c.prototype.readUIntLE = function(n, i, f) {
|
|
646
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
647
|
+
let h = this[n], y = 1, w = 0;
|
|
648
|
+
for (; ++w < i && (y *= 256); )
|
|
649
|
+
h += this[n + w] * y;
|
|
650
650
|
return h;
|
|
651
|
-
},
|
|
652
|
-
n = n >>> 0, i = i >>> 0,
|
|
651
|
+
}, c.prototype.readUintBE = c.prototype.readUIntBE = function(n, i, f) {
|
|
652
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
653
653
|
let h = this[n + --i], y = 1;
|
|
654
654
|
for (; i > 0 && (y *= 256); )
|
|
655
655
|
h += this[n + --i] * y;
|
|
656
656
|
return h;
|
|
657
|
-
},
|
|
657
|
+
}, c.prototype.readUint8 = c.prototype.readUInt8 = function(n, i) {
|
|
658
658
|
return n = n >>> 0, i || H(n, 1, this.length), this[n];
|
|
659
|
-
},
|
|
659
|
+
}, c.prototype.readUint16LE = c.prototype.readUInt16LE = function(n, i) {
|
|
660
660
|
return n = n >>> 0, i || H(n, 2, this.length), this[n] | this[n + 1] << 8;
|
|
661
|
-
},
|
|
661
|
+
}, c.prototype.readUint16BE = c.prototype.readUInt16BE = function(n, i) {
|
|
662
662
|
return n = n >>> 0, i || H(n, 2, this.length), this[n] << 8 | this[n + 1];
|
|
663
|
-
},
|
|
663
|
+
}, c.prototype.readUint32LE = c.prototype.readUInt32LE = function(n, i) {
|
|
664
664
|
return n = n >>> 0, i || H(n, 4, this.length), (this[n] | this[n + 1] << 8 | this[n + 2] << 16) + this[n + 3] * 16777216;
|
|
665
|
-
},
|
|
665
|
+
}, c.prototype.readUint32BE = c.prototype.readUInt32BE = function(n, i) {
|
|
666
666
|
return n = n >>> 0, i || H(n, 4, this.length), this[n] * 16777216 + (this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3]);
|
|
667
|
-
},
|
|
667
|
+
}, c.prototype.readBigUInt64LE = Re(function(n) {
|
|
668
668
|
n = n >>> 0, he(n, "offset");
|
|
669
|
-
const i = this[n],
|
|
670
|
-
(i === void 0 ||
|
|
671
|
-
const h = i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24, y = this[++n] + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 +
|
|
669
|
+
const i = this[n], f = this[n + 7];
|
|
670
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
671
|
+
const h = i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24, y = this[++n] + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + f * 2 ** 24;
|
|
672
672
|
return BigInt(h) + (BigInt(y) << BigInt(32));
|
|
673
|
-
}),
|
|
673
|
+
}), c.prototype.readBigUInt64BE = Re(function(n) {
|
|
674
674
|
n = n >>> 0, he(n, "offset");
|
|
675
|
-
const i = this[n],
|
|
676
|
-
(i === void 0 ||
|
|
677
|
-
const h = i * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n], y = this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 +
|
|
675
|
+
const i = this[n], f = this[n + 7];
|
|
676
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
677
|
+
const h = i * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n], y = this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + f;
|
|
678
678
|
return (BigInt(h) << BigInt(32)) + BigInt(y);
|
|
679
|
-
}),
|
|
680
|
-
n = n >>> 0, i = i >>> 0,
|
|
681
|
-
let h = this[n], y = 1,
|
|
682
|
-
for (; ++
|
|
683
|
-
h += this[n +
|
|
679
|
+
}), c.prototype.readIntLE = function(n, i, f) {
|
|
680
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
681
|
+
let h = this[n], y = 1, w = 0;
|
|
682
|
+
for (; ++w < i && (y *= 256); )
|
|
683
|
+
h += this[n + w] * y;
|
|
684
684
|
return y *= 128, h >= y && (h -= Math.pow(2, 8 * i)), h;
|
|
685
|
-
},
|
|
686
|
-
n = n >>> 0, i = i >>> 0,
|
|
687
|
-
let h = i, y = 1,
|
|
685
|
+
}, c.prototype.readIntBE = function(n, i, f) {
|
|
686
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
687
|
+
let h = i, y = 1, w = this[n + --h];
|
|
688
688
|
for (; h > 0 && (y *= 256); )
|
|
689
|
-
|
|
690
|
-
return y *= 128,
|
|
691
|
-
},
|
|
689
|
+
w += this[n + --h] * y;
|
|
690
|
+
return y *= 128, w >= y && (w -= Math.pow(2, 8 * i)), w;
|
|
691
|
+
}, c.prototype.readInt8 = function(n, i) {
|
|
692
692
|
return n = n >>> 0, i || H(n, 1, this.length), this[n] & 128 ? (255 - this[n] + 1) * -1 : this[n];
|
|
693
|
-
},
|
|
693
|
+
}, c.prototype.readInt16LE = function(n, i) {
|
|
694
694
|
n = n >>> 0, i || H(n, 2, this.length);
|
|
695
|
-
const
|
|
696
|
-
return
|
|
697
|
-
},
|
|
695
|
+
const f = this[n] | this[n + 1] << 8;
|
|
696
|
+
return f & 32768 ? f | 4294901760 : f;
|
|
697
|
+
}, c.prototype.readInt16BE = function(n, i) {
|
|
698
698
|
n = n >>> 0, i || H(n, 2, this.length);
|
|
699
|
-
const
|
|
700
|
-
return
|
|
701
|
-
},
|
|
699
|
+
const f = this[n + 1] | this[n] << 8;
|
|
700
|
+
return f & 32768 ? f | 4294901760 : f;
|
|
701
|
+
}, c.prototype.readInt32LE = function(n, i) {
|
|
702
702
|
return n = n >>> 0, i || H(n, 4, this.length), this[n] | this[n + 1] << 8 | this[n + 2] << 16 | this[n + 3] << 24;
|
|
703
|
-
},
|
|
703
|
+
}, c.prototype.readInt32BE = function(n, i) {
|
|
704
704
|
return n = n >>> 0, i || H(n, 4, this.length), this[n] << 24 | this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3];
|
|
705
|
-
},
|
|
705
|
+
}, c.prototype.readBigInt64LE = Re(function(n) {
|
|
706
706
|
n = n >>> 0, he(n, "offset");
|
|
707
|
-
const i = this[n],
|
|
708
|
-
(i === void 0 ||
|
|
709
|
-
const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (
|
|
707
|
+
const i = this[n], f = this[n + 7];
|
|
708
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
709
|
+
const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (f << 24);
|
|
710
710
|
return (BigInt(h) << BigInt(32)) + BigInt(i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
|
|
711
|
-
}),
|
|
711
|
+
}), c.prototype.readBigInt64BE = Re(function(n) {
|
|
712
712
|
n = n >>> 0, he(n, "offset");
|
|
713
|
-
const i = this[n],
|
|
714
|
-
(i === void 0 ||
|
|
713
|
+
const i = this[n], f = this[n + 7];
|
|
714
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
715
715
|
const h = (i << 24) + // Overflow
|
|
716
716
|
this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n];
|
|
717
|
-
return (BigInt(h) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 +
|
|
718
|
-
}),
|
|
717
|
+
return (BigInt(h) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + f);
|
|
718
|
+
}), c.prototype.readFloatLE = function(n, i) {
|
|
719
719
|
return n = n >>> 0, i || H(n, 4, this.length), r.read(this, n, !0, 23, 4);
|
|
720
|
-
},
|
|
720
|
+
}, c.prototype.readFloatBE = function(n, i) {
|
|
721
721
|
return n = n >>> 0, i || H(n, 4, this.length), r.read(this, n, !1, 23, 4);
|
|
722
|
-
},
|
|
722
|
+
}, c.prototype.readDoubleLE = function(n, i) {
|
|
723
723
|
return n = n >>> 0, i || H(n, 8, this.length), r.read(this, n, !0, 52, 8);
|
|
724
|
-
},
|
|
724
|
+
}, c.prototype.readDoubleBE = function(n, i) {
|
|
725
725
|
return n = n >>> 0, i || H(n, 8, this.length), r.read(this, n, !1, 52, 8);
|
|
726
726
|
};
|
|
727
|
-
function d(a, n, i,
|
|
728
|
-
if (!
|
|
727
|
+
function d(a, n, i, f, h, y) {
|
|
728
|
+
if (!c.isBuffer(a))
|
|
729
729
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
730
730
|
if (n > h || n < y)
|
|
731
731
|
throw new RangeError('"value" argument is out of bounds');
|
|
732
|
-
if (i +
|
|
732
|
+
if (i + f > a.length)
|
|
733
733
|
throw new RangeError("Index out of range");
|
|
734
734
|
}
|
|
735
|
-
|
|
736
|
-
if (n = +n, i = i >>> 0,
|
|
737
|
-
const R = Math.pow(2, 8 *
|
|
738
|
-
d(this, n, i,
|
|
735
|
+
c.prototype.writeUintLE = c.prototype.writeUIntLE = function(n, i, f, h) {
|
|
736
|
+
if (n = +n, i = i >>> 0, f = f >>> 0, !h) {
|
|
737
|
+
const R = Math.pow(2, 8 * f) - 1;
|
|
738
|
+
d(this, n, i, f, R, 0);
|
|
739
739
|
}
|
|
740
|
-
let y = 1,
|
|
741
|
-
for (this[i] = n & 255; ++
|
|
742
|
-
this[i +
|
|
743
|
-
return i +
|
|
744
|
-
},
|
|
745
|
-
if (n = +n, i = i >>> 0,
|
|
746
|
-
const R = Math.pow(2, 8 *
|
|
747
|
-
d(this, n, i,
|
|
740
|
+
let y = 1, w = 0;
|
|
741
|
+
for (this[i] = n & 255; ++w < f && (y *= 256); )
|
|
742
|
+
this[i + w] = n / y & 255;
|
|
743
|
+
return i + f;
|
|
744
|
+
}, c.prototype.writeUintBE = c.prototype.writeUIntBE = function(n, i, f, h) {
|
|
745
|
+
if (n = +n, i = i >>> 0, f = f >>> 0, !h) {
|
|
746
|
+
const R = Math.pow(2, 8 * f) - 1;
|
|
747
|
+
d(this, n, i, f, R, 0);
|
|
748
748
|
}
|
|
749
|
-
let y =
|
|
750
|
-
for (this[i + y] = n & 255; --y >= 0 && (
|
|
751
|
-
this[i + y] = n /
|
|
752
|
-
return i +
|
|
753
|
-
},
|
|
754
|
-
return n = +n, i = i >>> 0,
|
|
755
|
-
},
|
|
756
|
-
return n = +n, i = i >>> 0,
|
|
757
|
-
},
|
|
758
|
-
return n = +n, i = i >>> 0,
|
|
759
|
-
},
|
|
760
|
-
return n = +n, i = i >>> 0,
|
|
761
|
-
},
|
|
762
|
-
return n = +n, i = i >>> 0,
|
|
749
|
+
let y = f - 1, w = 1;
|
|
750
|
+
for (this[i + y] = n & 255; --y >= 0 && (w *= 256); )
|
|
751
|
+
this[i + y] = n / w & 255;
|
|
752
|
+
return i + f;
|
|
753
|
+
}, c.prototype.writeUint8 = c.prototype.writeUInt8 = function(n, i, f) {
|
|
754
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 1, 255, 0), this[i] = n & 255, i + 1;
|
|
755
|
+
}, c.prototype.writeUint16LE = c.prototype.writeUInt16LE = function(n, i, f) {
|
|
756
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 65535, 0), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
|
|
757
|
+
}, c.prototype.writeUint16BE = c.prototype.writeUInt16BE = function(n, i, f) {
|
|
758
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 65535, 0), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
|
|
759
|
+
}, c.prototype.writeUint32LE = c.prototype.writeUInt32LE = function(n, i, f) {
|
|
760
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 4, 4294967295, 0), this[i + 3] = n >>> 24, this[i + 2] = n >>> 16, this[i + 1] = n >>> 8, this[i] = n & 255, i + 4;
|
|
761
|
+
}, c.prototype.writeUint32BE = c.prototype.writeUInt32BE = function(n, i, f) {
|
|
762
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 4, 4294967295, 0), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
|
|
763
763
|
};
|
|
764
|
-
function v(a, n, i,
|
|
765
|
-
ye(n,
|
|
764
|
+
function v(a, n, i, f, h) {
|
|
765
|
+
ye(n, f, h, a, i, 7);
|
|
766
766
|
let y = Number(n & BigInt(4294967295));
|
|
767
767
|
a[i++] = y, y = y >> 8, a[i++] = y, y = y >> 8, a[i++] = y, y = y >> 8, a[i++] = y;
|
|
768
|
-
let
|
|
769
|
-
return a[i++] =
|
|
768
|
+
let w = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
769
|
+
return a[i++] = w, w = w >> 8, a[i++] = w, w = w >> 8, a[i++] = w, w = w >> 8, a[i++] = w, i;
|
|
770
770
|
}
|
|
771
|
-
function A(a, n, i,
|
|
772
|
-
ye(n,
|
|
771
|
+
function A(a, n, i, f, h) {
|
|
772
|
+
ye(n, f, h, a, i, 7);
|
|
773
773
|
let y = Number(n & BigInt(4294967295));
|
|
774
774
|
a[i + 7] = y, y = y >> 8, a[i + 6] = y, y = y >> 8, a[i + 5] = y, y = y >> 8, a[i + 4] = y;
|
|
775
|
-
let
|
|
776
|
-
return a[i + 3] =
|
|
775
|
+
let w = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
776
|
+
return a[i + 3] = w, w = w >> 8, a[i + 2] = w, w = w >> 8, a[i + 1] = w, w = w >> 8, a[i] = w, i + 8;
|
|
777
777
|
}
|
|
778
|
-
|
|
778
|
+
c.prototype.writeBigUInt64LE = Re(function(n, i = 0) {
|
|
779
779
|
return v(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
780
|
-
}),
|
|
780
|
+
}), c.prototype.writeBigUInt64BE = Re(function(n, i = 0) {
|
|
781
781
|
return A(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
782
|
-
}),
|
|
782
|
+
}), c.prototype.writeIntLE = function(n, i, f, h) {
|
|
783
783
|
if (n = +n, i = i >>> 0, !h) {
|
|
784
|
-
const W = Math.pow(2, 8 *
|
|
785
|
-
d(this, n, i,
|
|
784
|
+
const W = Math.pow(2, 8 * f - 1);
|
|
785
|
+
d(this, n, i, f, W - 1, -W);
|
|
786
786
|
}
|
|
787
|
-
let y = 0,
|
|
788
|
-
for (this[i] = n & 255; ++y <
|
|
789
|
-
n < 0 && R === 0 && this[i + y - 1] !== 0 && (R = 1), this[i + y] = (n /
|
|
790
|
-
return i +
|
|
791
|
-
},
|
|
787
|
+
let y = 0, w = 1, R = 0;
|
|
788
|
+
for (this[i] = n & 255; ++y < f && (w *= 256); )
|
|
789
|
+
n < 0 && R === 0 && this[i + y - 1] !== 0 && (R = 1), this[i + y] = (n / w >> 0) - R & 255;
|
|
790
|
+
return i + f;
|
|
791
|
+
}, c.prototype.writeIntBE = function(n, i, f, h) {
|
|
792
792
|
if (n = +n, i = i >>> 0, !h) {
|
|
793
|
-
const W = Math.pow(2, 8 *
|
|
794
|
-
d(this, n, i,
|
|
793
|
+
const W = Math.pow(2, 8 * f - 1);
|
|
794
|
+
d(this, n, i, f, W - 1, -W);
|
|
795
795
|
}
|
|
796
|
-
let y =
|
|
797
|
-
for (this[i + y] = n & 255; --y >= 0 && (
|
|
798
|
-
n < 0 && R === 0 && this[i + y + 1] !== 0 && (R = 1), this[i + y] = (n /
|
|
799
|
-
return i +
|
|
800
|
-
},
|
|
801
|
-
return n = +n, i = i >>> 0,
|
|
802
|
-
},
|
|
803
|
-
return n = +n, i = i >>> 0,
|
|
804
|
-
},
|
|
805
|
-
return n = +n, i = i >>> 0,
|
|
806
|
-
},
|
|
807
|
-
return n = +n, i = i >>> 0,
|
|
808
|
-
},
|
|
809
|
-
return n = +n, i = i >>> 0,
|
|
810
|
-
},
|
|
796
|
+
let y = f - 1, w = 1, R = 0;
|
|
797
|
+
for (this[i + y] = n & 255; --y >= 0 && (w *= 256); )
|
|
798
|
+
n < 0 && R === 0 && this[i + y + 1] !== 0 && (R = 1), this[i + y] = (n / w >> 0) - R & 255;
|
|
799
|
+
return i + f;
|
|
800
|
+
}, c.prototype.writeInt8 = function(n, i, f) {
|
|
801
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[i] = n & 255, i + 1;
|
|
802
|
+
}, c.prototype.writeInt16LE = function(n, i, f) {
|
|
803
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 32767, -32768), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
|
|
804
|
+
}, c.prototype.writeInt16BE = function(n, i, f) {
|
|
805
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 32767, -32768), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
|
|
806
|
+
}, c.prototype.writeInt32LE = function(n, i, f) {
|
|
807
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 4, 2147483647, -2147483648), this[i] = n & 255, this[i + 1] = n >>> 8, this[i + 2] = n >>> 16, this[i + 3] = n >>> 24, i + 4;
|
|
808
|
+
}, c.prototype.writeInt32BE = function(n, i, f) {
|
|
809
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
|
|
810
|
+
}, c.prototype.writeBigInt64LE = Re(function(n, i = 0) {
|
|
811
811
|
return v(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
812
|
-
}),
|
|
812
|
+
}), c.prototype.writeBigInt64BE = Re(function(n, i = 0) {
|
|
813
813
|
return A(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
814
814
|
});
|
|
815
|
-
function
|
|
816
|
-
if (i +
|
|
815
|
+
function C(a, n, i, f, h, y) {
|
|
816
|
+
if (i + f > a.length)
|
|
817
817
|
throw new RangeError("Index out of range");
|
|
818
818
|
if (i < 0)
|
|
819
819
|
throw new RangeError("Index out of range");
|
|
820
820
|
}
|
|
821
|
-
function j(a, n, i,
|
|
822
|
-
return n = +n, i = i >>> 0, h ||
|
|
821
|
+
function j(a, n, i, f, h) {
|
|
822
|
+
return n = +n, i = i >>> 0, h || C(a, n, i, 4), r.write(a, n, i, f, 23, 4), i + 4;
|
|
823
823
|
}
|
|
824
|
-
|
|
825
|
-
return j(this, n, i, !0,
|
|
826
|
-
},
|
|
827
|
-
return j(this, n, i, !1,
|
|
824
|
+
c.prototype.writeFloatLE = function(n, i, f) {
|
|
825
|
+
return j(this, n, i, !0, f);
|
|
826
|
+
}, c.prototype.writeFloatBE = function(n, i, f) {
|
|
827
|
+
return j(this, n, i, !1, f);
|
|
828
828
|
};
|
|
829
|
-
function V(a, n, i,
|
|
830
|
-
return n = +n, i = i >>> 0, h ||
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
return V(this, n, i, !0,
|
|
834
|
-
},
|
|
835
|
-
return V(this, n, i, !1,
|
|
836
|
-
},
|
|
837
|
-
if (!
|
|
829
|
+
function V(a, n, i, f, h) {
|
|
830
|
+
return n = +n, i = i >>> 0, h || C(a, n, i, 8), r.write(a, n, i, f, 52, 8), i + 8;
|
|
831
|
+
}
|
|
832
|
+
c.prototype.writeDoubleLE = function(n, i, f) {
|
|
833
|
+
return V(this, n, i, !0, f);
|
|
834
|
+
}, c.prototype.writeDoubleBE = function(n, i, f) {
|
|
835
|
+
return V(this, n, i, !1, f);
|
|
836
|
+
}, c.prototype.copy = function(n, i, f, h) {
|
|
837
|
+
if (!c.isBuffer(n))
|
|
838
838
|
throw new TypeError("argument should be a Buffer");
|
|
839
|
-
if (
|
|
839
|
+
if (f || (f = 0), !h && h !== 0 && (h = this.length), i >= n.length && (i = n.length), i || (i = 0), h > 0 && h < f && (h = f), h === f || n.length === 0 || this.length === 0)
|
|
840
840
|
return 0;
|
|
841
841
|
if (i < 0)
|
|
842
842
|
throw new RangeError("targetStart out of bounds");
|
|
843
|
-
if (
|
|
843
|
+
if (f < 0 || f >= this.length)
|
|
844
844
|
throw new RangeError("Index out of range");
|
|
845
845
|
if (h < 0)
|
|
846
846
|
throw new RangeError("sourceEnd out of bounds");
|
|
847
|
-
h > this.length && (h = this.length), n.length - i < h -
|
|
848
|
-
const y = h -
|
|
849
|
-
return this === n && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(i,
|
|
847
|
+
h > this.length && (h = this.length), n.length - i < h - f && (h = n.length - i + f);
|
|
848
|
+
const y = h - f;
|
|
849
|
+
return this === n && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(i, f, h) : Uint8Array.prototype.set.call(
|
|
850
850
|
n,
|
|
851
|
-
this.subarray(
|
|
851
|
+
this.subarray(f, h),
|
|
852
852
|
i
|
|
853
853
|
), y;
|
|
854
|
-
},
|
|
854
|
+
}, c.prototype.fill = function(n, i, f, h) {
|
|
855
855
|
if (typeof n == "string") {
|
|
856
|
-
if (typeof i == "string" ? (h = i, i = 0,
|
|
856
|
+
if (typeof i == "string" ? (h = i, i = 0, f = this.length) : typeof f == "string" && (h = f, f = this.length), h !== void 0 && typeof h != "string")
|
|
857
857
|
throw new TypeError("encoding must be a string");
|
|
858
|
-
if (typeof h == "string" && !
|
|
858
|
+
if (typeof h == "string" && !c.isEncoding(h))
|
|
859
859
|
throw new TypeError("Unknown encoding: " + h);
|
|
860
860
|
if (n.length === 1) {
|
|
861
|
-
const
|
|
862
|
-
(h === "utf8" &&
|
|
861
|
+
const w = n.charCodeAt(0);
|
|
862
|
+
(h === "utf8" && w < 128 || h === "latin1") && (n = w);
|
|
863
863
|
}
|
|
864
864
|
} else
|
|
865
865
|
typeof n == "number" ? n = n & 255 : typeof n == "boolean" && (n = Number(n));
|
|
866
|
-
if (i < 0 || this.length < i || this.length <
|
|
866
|
+
if (i < 0 || this.length < i || this.length < f)
|
|
867
867
|
throw new RangeError("Out of range index");
|
|
868
|
-
if (
|
|
868
|
+
if (f <= i)
|
|
869
869
|
return this;
|
|
870
|
-
i = i >>> 0,
|
|
870
|
+
i = i >>> 0, f = f === void 0 ? this.length : f >>> 0, n || (n = 0);
|
|
871
871
|
let y;
|
|
872
872
|
if (typeof n == "number")
|
|
873
|
-
for (y = i; y <
|
|
873
|
+
for (y = i; y < f; ++y)
|
|
874
874
|
this[y] = n;
|
|
875
875
|
else {
|
|
876
|
-
const
|
|
876
|
+
const w = c.isBuffer(n) ? n : c.from(n, h), R = w.length;
|
|
877
877
|
if (R === 0)
|
|
878
878
|
throw new TypeError('The value "' + n + '" is invalid for argument "value"');
|
|
879
|
-
for (y = 0; y <
|
|
880
|
-
this[y + i] =
|
|
879
|
+
for (y = 0; y < f - i; ++y)
|
|
880
|
+
this[y + i] = w[y % R];
|
|
881
881
|
}
|
|
882
882
|
return this;
|
|
883
883
|
};
|
|
@@ -922,28 +922,28 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
922
922
|
), N(
|
|
923
923
|
"ERR_OUT_OF_RANGE",
|
|
924
924
|
function(a, n, i) {
|
|
925
|
-
let
|
|
926
|
-
return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h = M(String(i)) : typeof i == "bigint" && (h = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (h = M(h)), h += "n"),
|
|
925
|
+
let f = `The value of "${a}" is out of range.`, h = i;
|
|
926
|
+
return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h = M(String(i)) : typeof i == "bigint" && (h = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (h = M(h)), h += "n"), f += ` It must be ${n}. Received ${h}`, f;
|
|
927
927
|
},
|
|
928
928
|
RangeError
|
|
929
929
|
);
|
|
930
930
|
function M(a) {
|
|
931
931
|
let n = "", i = a.length;
|
|
932
|
-
const
|
|
933
|
-
for (; i >=
|
|
932
|
+
const f = a[0] === "-" ? 1 : 0;
|
|
933
|
+
for (; i >= f + 4; i -= 3)
|
|
934
934
|
n = `_${a.slice(i - 3, i)}${n}`;
|
|
935
935
|
return `${a.slice(0, i)}${n}`;
|
|
936
936
|
}
|
|
937
937
|
function te(a, n, i) {
|
|
938
938
|
he(n, "offset"), (a[n] === void 0 || a[n + i] === void 0) && oe(n, a.length - (i + 1));
|
|
939
939
|
}
|
|
940
|
-
function ye(a, n, i,
|
|
940
|
+
function ye(a, n, i, f, h, y) {
|
|
941
941
|
if (a > i || a < n) {
|
|
942
|
-
const
|
|
942
|
+
const w = typeof n == "bigint" ? "n" : "";
|
|
943
943
|
let R;
|
|
944
|
-
throw y > 3 ? n === 0 || n === BigInt(0) ? R = `>= 0${
|
|
944
|
+
throw y > 3 ? n === 0 || n === BigInt(0) ? R = `>= 0${w} and < 2${w} ** ${(y + 1) * 8}${w}` : R = `>= -(2${w} ** ${(y + 1) * 8 - 1}${w}) and < 2 ** ${(y + 1) * 8 - 1}${w}` : R = `>= ${n}${w} and <= ${i}${w}`, new B.ERR_OUT_OF_RANGE("value", R, a);
|
|
945
945
|
}
|
|
946
|
-
te(
|
|
946
|
+
te(f, h, y);
|
|
947
947
|
}
|
|
948
948
|
function he(a, n) {
|
|
949
949
|
if (typeof a != "number")
|
|
@@ -957,26 +957,26 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
957
957
|
);
|
|
958
958
|
}
|
|
959
959
|
const Me = /[^+/0-9A-Za-z-_]/g;
|
|
960
|
-
function
|
|
960
|
+
function pt(a) {
|
|
961
961
|
if (a = a.split("=")[0], a = a.trim().replace(Me, ""), a.length < 2)
|
|
962
962
|
return "";
|
|
963
963
|
for (; a.length % 4 !== 0; )
|
|
964
964
|
a = a + "=";
|
|
965
965
|
return a;
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function ot(a, n) {
|
|
968
968
|
n = n || 1 / 0;
|
|
969
969
|
let i;
|
|
970
|
-
const
|
|
970
|
+
const f = a.length;
|
|
971
971
|
let h = null;
|
|
972
972
|
const y = [];
|
|
973
|
-
for (let
|
|
974
|
-
if (i = a.charCodeAt(
|
|
973
|
+
for (let w = 0; w < f; ++w) {
|
|
974
|
+
if (i = a.charCodeAt(w), i > 55295 && i < 57344) {
|
|
975
975
|
if (!h) {
|
|
976
976
|
if (i > 56319) {
|
|
977
977
|
(n -= 3) > -1 && y.push(239, 191, 189);
|
|
978
978
|
continue;
|
|
979
|
-
} else if (
|
|
979
|
+
} else if (w + 1 === f) {
|
|
980
980
|
(n -= 3) > -1 && y.push(239, 191, 189);
|
|
981
981
|
continue;
|
|
982
982
|
}
|
|
@@ -1030,18 +1030,18 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1030
1030
|
return n;
|
|
1031
1031
|
}
|
|
1032
1032
|
function S(a, n) {
|
|
1033
|
-
let i,
|
|
1033
|
+
let i, f, h;
|
|
1034
1034
|
const y = [];
|
|
1035
|
-
for (let
|
|
1036
|
-
i = a.charCodeAt(
|
|
1035
|
+
for (let w = 0; w < a.length && !((n -= 2) < 0); ++w)
|
|
1036
|
+
i = a.charCodeAt(w), f = i >> 8, h = i % 256, y.push(h), y.push(f);
|
|
1037
1037
|
return y;
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1040
|
-
return e.toByteArray(
|
|
1039
|
+
function dt(a) {
|
|
1040
|
+
return e.toByteArray(pt(a));
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function st(a, n, i, f) {
|
|
1043
1043
|
let h;
|
|
1044
|
-
for (h = 0; h <
|
|
1044
|
+
for (h = 0; h < f && !(h + i >= n.length || h >= a.length); ++h)
|
|
1045
1045
|
n[h + i] = a[h];
|
|
1046
1046
|
return h;
|
|
1047
1047
|
}
|
|
@@ -1054,9 +1054,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1054
1054
|
const Vn = function() {
|
|
1055
1055
|
const a = "0123456789abcdef", n = new Array(256);
|
|
1056
1056
|
for (let i = 0; i < 16; ++i) {
|
|
1057
|
-
const
|
|
1057
|
+
const f = i * 16;
|
|
1058
1058
|
for (let h = 0; h < 16; ++h)
|
|
1059
|
-
n[
|
|
1059
|
+
n[f + h] = a[i] + a[h];
|
|
1060
1060
|
}
|
|
1061
1061
|
return n;
|
|
1062
1062
|
}();
|
|
@@ -1067,7 +1067,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1067
1067
|
throw new Error("BigInt not supported");
|
|
1068
1068
|
}
|
|
1069
1069
|
})(Xr);
|
|
1070
|
-
var en = { exports: {} }, Y = en.exports = {}, me,
|
|
1070
|
+
var en = { exports: {} }, Y = en.exports = {}, me, we;
|
|
1071
1071
|
function Xt() {
|
|
1072
1072
|
throw new Error("setTimeout has not been defined");
|
|
1073
1073
|
}
|
|
@@ -1081,9 +1081,9 @@ function Zt() {
|
|
|
1081
1081
|
me = Xt;
|
|
1082
1082
|
}
|
|
1083
1083
|
try {
|
|
1084
|
-
typeof clearTimeout == "function" ?
|
|
1084
|
+
typeof clearTimeout == "function" ? we = clearTimeout : we = Zt;
|
|
1085
1085
|
} catch {
|
|
1086
|
-
|
|
1086
|
+
we = Zt;
|
|
1087
1087
|
}
|
|
1088
1088
|
})();
|
|
1089
1089
|
function tn(t) {
|
|
@@ -1101,35 +1101,35 @@ function tn(t) {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1105
|
-
if (
|
|
1104
|
+
function ui(t) {
|
|
1105
|
+
if (we === clearTimeout)
|
|
1106
1106
|
return clearTimeout(t);
|
|
1107
|
-
if ((
|
|
1108
|
-
return
|
|
1107
|
+
if ((we === Zt || !we) && clearTimeout)
|
|
1108
|
+
return we = clearTimeout, clearTimeout(t);
|
|
1109
1109
|
try {
|
|
1110
|
-
return
|
|
1110
|
+
return we(t);
|
|
1111
1111
|
} catch {
|
|
1112
1112
|
try {
|
|
1113
|
-
return
|
|
1113
|
+
return we.call(null, t);
|
|
1114
1114
|
} catch {
|
|
1115
|
-
return
|
|
1115
|
+
return we.call(this, t);
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
-
var _e = [],
|
|
1120
|
-
function
|
|
1121
|
-
!
|
|
1119
|
+
var _e = [], Je = !1, Ue, yt = -1;
|
|
1120
|
+
function ci() {
|
|
1121
|
+
!Je || !Ue || (Je = !1, Ue.length ? _e = Ue.concat(_e) : yt = -1, _e.length && rn());
|
|
1122
1122
|
}
|
|
1123
1123
|
function rn() {
|
|
1124
|
-
if (!
|
|
1125
|
-
var t = tn(
|
|
1126
|
-
|
|
1124
|
+
if (!Je) {
|
|
1125
|
+
var t = tn(ci);
|
|
1126
|
+
Je = !0;
|
|
1127
1127
|
for (var e = _e.length; e; ) {
|
|
1128
1128
|
for (Ue = _e, _e = []; ++yt < e; )
|
|
1129
1129
|
Ue && Ue[yt].run();
|
|
1130
1130
|
yt = -1, e = _e.length;
|
|
1131
1131
|
}
|
|
1132
|
-
Ue = null,
|
|
1132
|
+
Ue = null, Je = !1, ui(t);
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
1135
|
Y.nextTick = function(t) {
|
|
@@ -1137,7 +1137,7 @@ Y.nextTick = function(t) {
|
|
|
1137
1137
|
if (arguments.length > 1)
|
|
1138
1138
|
for (var r = 1; r < arguments.length; r++)
|
|
1139
1139
|
e[r - 1] = arguments[r];
|
|
1140
|
-
_e.push(new nn(t, e)), _e.length === 1 && !
|
|
1140
|
+
_e.push(new nn(t, e)), _e.length === 1 && !Je && tn(rn);
|
|
1141
1141
|
};
|
|
1142
1142
|
function nn(t, e) {
|
|
1143
1143
|
this.fun = t, this.array = e;
|
|
@@ -1177,15 +1177,57 @@ Y.chdir = function(t) {
|
|
|
1177
1177
|
Y.umask = function() {
|
|
1178
1178
|
return 0;
|
|
1179
1179
|
};
|
|
1180
|
-
var
|
|
1180
|
+
var fi = en.exports;
|
|
1181
1181
|
(function(t) {
|
|
1182
1182
|
Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
|
|
1183
|
-
const e = Xr, r =
|
|
1183
|
+
const e = Xr, r = fi, o = (l) => l && l.__esModule ? l : { default: l }, s = o(r), u = globalThis || void 0 || self;
|
|
1184
1184
|
Object.defineProperty(t, "Buffer", { enumerable: !0, get: () => e.Buffer }), Object.defineProperty(t, "process", { enumerable: !0, get: () => s.default }), t.global = u;
|
|
1185
|
-
})(
|
|
1186
|
-
class
|
|
1185
|
+
})(O);
|
|
1186
|
+
class li {
|
|
1187
1187
|
}
|
|
1188
1188
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
1189
|
+
const hi = (t, e) => Qn(t, e, {
|
|
1190
|
+
mount: ({ storeName: r }) => {
|
|
1191
|
+
window.slStore[r] || (window.slStore[r] = { mounted: !0, history: [{ type: "mount" }] }), window.slStore[r].store = t;
|
|
1192
|
+
},
|
|
1193
|
+
unmount: ({ storeName: r }) => {
|
|
1194
|
+
window.slStore[r].mounted = !1, window.slStore[r]?.history.push({ type: "unmount" });
|
|
1195
|
+
},
|
|
1196
|
+
change: ({ actionName: r, storeName: o, changed: s, newValue: u, oldValue: l, valueMessage: c }) => {
|
|
1197
|
+
window.slStore[o]?.history.push({
|
|
1198
|
+
type: "change",
|
|
1199
|
+
changed: s,
|
|
1200
|
+
newValue: u,
|
|
1201
|
+
oldValue: l,
|
|
1202
|
+
diff: Gn({ ...l }, { ...u }, { cyclesFix: !1 }),
|
|
1203
|
+
actionName: r,
|
|
1204
|
+
valueMessage: c
|
|
1205
|
+
});
|
|
1206
|
+
},
|
|
1207
|
+
action: {
|
|
1208
|
+
start: ({ actionName: r, args: o, storeName: s }) => {
|
|
1209
|
+
window.slStore[s]?.history.push({
|
|
1210
|
+
type: "action:start",
|
|
1211
|
+
actionName: r,
|
|
1212
|
+
args: o,
|
|
1213
|
+
storeName: s
|
|
1214
|
+
});
|
|
1215
|
+
},
|
|
1216
|
+
error: ({ actionName: r, error: o, storeName: s }) => {
|
|
1217
|
+
window.slStore[s]?.history.push({
|
|
1218
|
+
type: "action:error",
|
|
1219
|
+
actionName: r,
|
|
1220
|
+
error: o
|
|
1221
|
+
});
|
|
1222
|
+
},
|
|
1223
|
+
end: ({ actionName: r, storeName: o }) => {
|
|
1224
|
+
window.slStore[o]?.history.push({
|
|
1225
|
+
type: "action:end",
|
|
1226
|
+
actionName: r
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
});
|
|
1189
1231
|
class xt {
|
|
1190
1232
|
/**
|
|
1191
1233
|
* store instance (nanostores)
|
|
@@ -1193,7 +1235,7 @@ class xt {
|
|
|
1193
1235
|
store;
|
|
1194
1236
|
name;
|
|
1195
1237
|
constructor(e, r) {
|
|
1196
|
-
this.store = e, this.name = r;
|
|
1238
|
+
this.store = e, this.name = r, hi(this.store, this.name);
|
|
1197
1239
|
}
|
|
1198
1240
|
/**
|
|
1199
1241
|
* return store instance
|
|
@@ -1202,11 +1244,11 @@ class xt {
|
|
|
1202
1244
|
return this.store;
|
|
1203
1245
|
}
|
|
1204
1246
|
}
|
|
1205
|
-
const
|
|
1247
|
+
const pi = (t) => {
|
|
1206
1248
|
const e = Object.keys(t);
|
|
1207
1249
|
return Hr(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((o, s) => [o, r[s]])));
|
|
1208
1250
|
};
|
|
1209
|
-
class
|
|
1251
|
+
class ut extends xt {
|
|
1210
1252
|
getValues = () => this.getStore().get();
|
|
1211
1253
|
getValue = (e) => this.getStore().get()[e];
|
|
1212
1254
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
@@ -1218,7 +1260,7 @@ var Ie;
|
|
|
1218
1260
|
(function(t) {
|
|
1219
1261
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
1220
1262
|
})(Ie || (Ie = {}));
|
|
1221
|
-
const
|
|
1263
|
+
const di = {
|
|
1222
1264
|
[ue.BETTING]: "betting",
|
|
1223
1265
|
[ue.GAMES]: "games",
|
|
1224
1266
|
[ue.PUBLIC_CHAT]: "publicChat",
|
|
@@ -1236,7 +1278,7 @@ class lr {
|
|
|
1236
1278
|
listeners = /* @__PURE__ */ new Set();
|
|
1237
1279
|
settingsKey;
|
|
1238
1280
|
constructor({ settings: e, ...r }, o) {
|
|
1239
|
-
this.settingsKey =
|
|
1281
|
+
this.settingsKey = di[r.type], this.status = Ct(De.Suspended), this.config = new ut($e(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new ut($e(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new ut($e({}), `feature:settings:${this.settingsKey}`), this.source = o;
|
|
1240
1282
|
}
|
|
1241
1283
|
get featureConfig() {
|
|
1242
1284
|
return this.config.getStore();
|
|
@@ -1327,7 +1369,7 @@ class pe extends xt {
|
|
|
1327
1369
|
key = () => this.getStore().key;
|
|
1328
1370
|
off = () => this.getStore().off();
|
|
1329
1371
|
}
|
|
1330
|
-
async function*
|
|
1372
|
+
async function* yi(t, e) {
|
|
1331
1373
|
for await (const r of e) {
|
|
1332
1374
|
t.response.message = r, t.received_at = Date.now();
|
|
1333
1375
|
const o = {
|
|
@@ -1337,7 +1379,7 @@ async function* hi(t, e) {
|
|
|
1337
1379
|
window.postMessage(o), yield r;
|
|
1338
1380
|
}
|
|
1339
1381
|
}
|
|
1340
|
-
const
|
|
1382
|
+
const gi = () => (t) => async (e) => {
|
|
1341
1383
|
const r = {
|
|
1342
1384
|
name: e.url,
|
|
1343
1385
|
request: {},
|
|
@@ -1349,7 +1391,7 @@ const pi = () => (t) => async (e) => {
|
|
|
1349
1391
|
if (r.received_at = Date.now(), r.stream = o.stream, r.response.header = Object.fromEntries(o.header.entries()), r.response.trailer = Object.fromEntries(o.trailer.entries()), o.stream)
|
|
1350
1392
|
return {
|
|
1351
1393
|
...o,
|
|
1352
|
-
message:
|
|
1394
|
+
message: yi(r, o.message)
|
|
1353
1395
|
};
|
|
1354
1396
|
{
|
|
1355
1397
|
r.request.message = e.message, r.response.message = o.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -1377,7 +1419,7 @@ var Ae;
|
|
|
1377
1419
|
(function(t) {
|
|
1378
1420
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnecting = "reconnecting";
|
|
1379
1421
|
})(Ae || (Ae = {}));
|
|
1380
|
-
class
|
|
1422
|
+
class mi {
|
|
1381
1423
|
params;
|
|
1382
1424
|
stream;
|
|
1383
1425
|
method;
|
|
@@ -1392,7 +1434,7 @@ class di {
|
|
|
1392
1434
|
ts: /* @__PURE__ */ new Date(),
|
|
1393
1435
|
log: []
|
|
1394
1436
|
};
|
|
1395
|
-
this.state = new
|
|
1437
|
+
this.state = new ut($e(u), `subscription:${s.name}:state`), this.name = s.name, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = o, this.method = r, s.withStore && (this.store = new de(ne(null), `subscription:${s.name}:store`)), "subscribe" in o && typeof o.subscribe == "function" && o.subscribe(() => {
|
|
1396
1438
|
this.reconnect();
|
|
1397
1439
|
}), this.updateState(Ae.Ready);
|
|
1398
1440
|
}
|
|
@@ -1434,10 +1476,10 @@ class di {
|
|
|
1434
1476
|
this.addStateLog(`data routed to ${this.listeners.size} listeners`);
|
|
1435
1477
|
};
|
|
1436
1478
|
onStreamError = (e) => {
|
|
1437
|
-
e !== void 0 && (e.code !==
|
|
1479
|
+
e !== void 0 && (e.code !== zn.Canceled && e.rawMessage !== "[canceled] BodyStreamBuffer was aborted" ? (this.updateState(Ae.Failed), this.state.setValue("error", e)) : this.disconnect());
|
|
1438
1480
|
};
|
|
1439
1481
|
}
|
|
1440
|
-
class
|
|
1482
|
+
class wi {
|
|
1441
1483
|
toJsonOptions = {
|
|
1442
1484
|
emitDefaultValues: !1,
|
|
1443
1485
|
enumAsInteger: !0,
|
|
@@ -1452,11 +1494,11 @@ class yi {
|
|
|
1452
1494
|
callbackClients;
|
|
1453
1495
|
subscriptions;
|
|
1454
1496
|
constructor(e) {
|
|
1455
|
-
this.host = e, this.$headers = new
|
|
1456
|
-
"sl-device-id":
|
|
1497
|
+
this.host = e, this.$headers = new ut($e({
|
|
1498
|
+
"sl-device-id": O.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
|
|
1457
1499
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
1458
|
-
const [r, o, s] =
|
|
1459
|
-
this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport =
|
|
1500
|
+
const [r, o, s] = Jn();
|
|
1501
|
+
this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport = Wn({
|
|
1460
1502
|
baseUrl: e,
|
|
1461
1503
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1462
1504
|
// @ts-ignore
|
|
@@ -1471,7 +1513,7 @@ class yi {
|
|
|
1471
1513
|
const s = this.subscriptions.get(r);
|
|
1472
1514
|
if (s)
|
|
1473
1515
|
return s;
|
|
1474
|
-
const u = new
|
|
1516
|
+
const u = new mi(this.$headers, e, r, o);
|
|
1475
1517
|
return this.subscriptions.set(r, u), u;
|
|
1476
1518
|
};
|
|
1477
1519
|
removeSubscription = (e) => {
|
|
@@ -1492,14 +1534,14 @@ class yi {
|
|
|
1492
1534
|
const r = e.typeName;
|
|
1493
1535
|
if (this.clients.has(r))
|
|
1494
1536
|
return this.clients.get(r);
|
|
1495
|
-
const o =
|
|
1537
|
+
const o = Kn(e, this.transport);
|
|
1496
1538
|
return this.clients.set(r, o), o;
|
|
1497
1539
|
};
|
|
1498
1540
|
getCallbackClient = (e) => {
|
|
1499
1541
|
const r = e.typeName;
|
|
1500
1542
|
if (this.callbackClients.has(r))
|
|
1501
1543
|
return this.callbackClients.get(r);
|
|
1502
|
-
const o =
|
|
1544
|
+
const o = Hn(e, this.transport);
|
|
1503
1545
|
return this.callbackClients.set(r, o), o;
|
|
1504
1546
|
};
|
|
1505
1547
|
// create unary client, used for query request
|
|
@@ -1508,8 +1550,8 @@ class yi {
|
|
|
1508
1550
|
e.typeName,
|
|
1509
1551
|
u.charAt(0).toLowerCase() + u.slice(1),
|
|
1510
1552
|
...Array.isArray(r) ? r : [r]
|
|
1511
|
-
],
|
|
1512
|
-
return { client: s, queryKey: l, queryKeyStr:
|
|
1553
|
+
], c = [e.typeName, u.charAt(0).toLowerCase() + u.slice(1)];
|
|
1554
|
+
return { client: s, queryKey: l, queryKeyStr: c.join("") };
|
|
1513
1555
|
};
|
|
1514
1556
|
// create callback client, used for server stream subscriptions
|
|
1515
1557
|
createCallbackClient = (e) => ({ client: this.getCallbackClient(e) });
|
|
@@ -1531,11 +1573,11 @@ class yi {
|
|
|
1531
1573
|
o.header.set(u, s[u]);
|
|
1532
1574
|
return r(o);
|
|
1533
1575
|
};
|
|
1534
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
1576
|
+
this.interceptors.push(e), this.interceptors.push(gi());
|
|
1535
1577
|
};
|
|
1536
1578
|
}
|
|
1537
|
-
const
|
|
1538
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1579
|
+
const bi = (t, e) => {
|
|
1580
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Yn, {
|
|
1539
1581
|
method: "retrieveEventId",
|
|
1540
1582
|
params: [t]
|
|
1541
1583
|
});
|
|
@@ -1552,29 +1594,29 @@ const gi = (t, e) => {
|
|
|
1552
1594
|
}
|
|
1553
1595
|
}
|
|
1554
1596
|
});
|
|
1555
|
-
},
|
|
1556
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1597
|
+
}, vi = (t, e) => {
|
|
1598
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, { method: "getStream", params: [t] });
|
|
1557
1599
|
return e.nanoquery.createFetcherStore(o, {
|
|
1558
1600
|
fetcher: async (s, u, l) => l ? (await r.getStream({
|
|
1559
1601
|
id: l
|
|
1560
1602
|
// we are sure that id is a string
|
|
1561
1603
|
})).data?.attributes : void 0
|
|
1562
1604
|
});
|
|
1563
|
-
},
|
|
1605
|
+
}, Si = (t, e) => {
|
|
1564
1606
|
const { queryKey: r, client: o } = e.createPromiseClient(Wr, { method: "me", params: [t] });
|
|
1565
1607
|
return e.nanoquery.createFetcherStore(r, {
|
|
1566
1608
|
fetcher: () => o.me({})
|
|
1567
1609
|
});
|
|
1568
|
-
},
|
|
1610
|
+
}, Ai = (t) => {
|
|
1569
1611
|
const { client: e } = t.createPromiseClient(Wr, { method: "bypassAuth" });
|
|
1570
1612
|
return ({ userKey: r, schema: o, init: s }) => e.bypassAuth({ userKey: r, schema: o, init: s });
|
|
1571
|
-
},
|
|
1572
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1613
|
+
}, Ei = (t, e) => {
|
|
1614
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, { method: "get", params: [t] });
|
|
1573
1615
|
return e.nanoquery.createFetcherStore(o, {
|
|
1574
1616
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
1575
1617
|
});
|
|
1576
|
-
},
|
|
1577
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1618
|
+
}, Ii = (t, e) => {
|
|
1619
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, { method: "getOrganization", params: [t] });
|
|
1578
1620
|
return e.nanoquery.createFetcherStore(o, {
|
|
1579
1621
|
fetcher: async () => {
|
|
1580
1622
|
const s = await r.getOrganization({});
|
|
@@ -1584,16 +1626,16 @@ const gi = (t, e) => {
|
|
|
1584
1626
|
} : void 0;
|
|
1585
1627
|
}
|
|
1586
1628
|
});
|
|
1587
|
-
},
|
|
1588
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1629
|
+
}, Fi = (t, e) => {
|
|
1630
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, {
|
|
1589
1631
|
method: "getOrganizationAdvertising",
|
|
1590
1632
|
params: [t]
|
|
1591
1633
|
});
|
|
1592
1634
|
return e.nanoquery.createFetcherStore(o, {
|
|
1593
1635
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
1594
1636
|
});
|
|
1595
|
-
},
|
|
1596
|
-
t.transport = new
|
|
1637
|
+
}, Ti = (t, e, r) => {
|
|
1638
|
+
t.transport = new wi(e.host), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), r();
|
|
1597
1639
|
};
|
|
1598
1640
|
class hr {
|
|
1599
1641
|
delimiter = ":";
|
|
@@ -1649,19 +1691,19 @@ var Fe;
|
|
|
1649
1691
|
(function(t) {
|
|
1650
1692
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
1651
1693
|
})(Fe || (Fe = {}));
|
|
1652
|
-
const
|
|
1653
|
-
const e = new Ke(), r = new de(ne(e.getExternalToken()), "userKey"), o = new de(ne(e.getToken()), "userToken"), s = new pe(
|
|
1654
|
-
if (!
|
|
1655
|
-
return l?.data?.id ? l.data.id : p === !1 ? void 0 :
|
|
1656
|
-
}), u = new pe(
|
|
1694
|
+
const _i = (t) => {
|
|
1695
|
+
const e = new Ke(), r = new de(ne(e.getExternalToken()), "userKey"), o = new de(ne(e.getToken()), "userToken"), s = new pe(Si(o.getStore(), t), "user", ({ data: l, error: c, loading: p }, b) => {
|
|
1696
|
+
if (!c)
|
|
1697
|
+
return l?.data?.id ? l.data.id : p === !1 ? void 0 : b;
|
|
1698
|
+
}), u = new pe(Ei(o.getStore(), t), "userSettings");
|
|
1657
1699
|
return {
|
|
1658
1700
|
userKey: r,
|
|
1659
1701
|
userToken: o,
|
|
1660
1702
|
user: s,
|
|
1661
1703
|
userSettings: u
|
|
1662
1704
|
};
|
|
1663
|
-
},
|
|
1664
|
-
const e = new de(ne(void 0), "providerStreamId"), r = new pe(
|
|
1705
|
+
}, Ci = (t) => {
|
|
1706
|
+
const e = new de(ne(void 0), "providerStreamId"), r = new pe(bi(e.getStore(), t), "slStreamId", (s) => s?.data), o = new pe(vi(r.getAtomStore(), t), "streamSettings");
|
|
1665
1707
|
return r.getAtomStore().listen((s) => {
|
|
1666
1708
|
(s === "" || s === void 0) && o.getStore().mutate(void 0);
|
|
1667
1709
|
}), {
|
|
@@ -1669,8 +1711,8 @@ const Ii = (t) => {
|
|
|
1669
1711
|
slStreamId: r,
|
|
1670
1712
|
streamSettings: o
|
|
1671
1713
|
};
|
|
1672
|
-
},
|
|
1673
|
-
const e = new de(ne(void 0), "enabled"), r = new de(ne(Fe.DISABLED), "status"), o = new pe(
|
|
1714
|
+
}, Oi = (t) => {
|
|
1715
|
+
const e = new de(ne(void 0), "enabled"), r = new de(ne(Fe.DISABLED), "status"), o = new pe(Ii(e.getStore(), t), "organizationSettings", (c) => c?.data?.id), s = new pe(Fi(o.getAtomStore(), t), "organizationAdvertising"), u = _i(t), l = Ci(t);
|
|
1674
1716
|
return {
|
|
1675
1717
|
enabled: e,
|
|
1676
1718
|
status: r,
|
|
@@ -1685,10 +1727,10 @@ const Ii = (t) => {
|
|
|
1685
1727
|
organizationAdvertising: s
|
|
1686
1728
|
};
|
|
1687
1729
|
};
|
|
1688
|
-
class
|
|
1730
|
+
class xi extends xt {
|
|
1689
1731
|
stores;
|
|
1690
1732
|
constructor(e) {
|
|
1691
|
-
const r =
|
|
1733
|
+
const r = Oi(e), o = pi(r);
|
|
1692
1734
|
super(o, "core"), this.stores = r;
|
|
1693
1735
|
}
|
|
1694
1736
|
getValue() {
|
|
@@ -1709,12 +1751,12 @@ class _i extends xt {
|
|
|
1709
1751
|
};
|
|
1710
1752
|
unsubscribe = () => this.getStore().off();
|
|
1711
1753
|
}
|
|
1712
|
-
class
|
|
1754
|
+
class Bi extends li {
|
|
1713
1755
|
$coreStore;
|
|
1714
1756
|
transport;
|
|
1715
1757
|
bypassLogin;
|
|
1716
1758
|
constructor(e, r) {
|
|
1717
|
-
super(), this.$coreStore = e, this.transport = r, this.bypassLogin =
|
|
1759
|
+
super(), this.$coreStore = e, this.transport = r, this.bypassLogin = Ai(this.transport), this.connect();
|
|
1718
1760
|
}
|
|
1719
1761
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1720
1762
|
/**
|
|
@@ -1788,24 +1830,24 @@ class Ci extends ci {
|
|
|
1788
1830
|
});
|
|
1789
1831
|
};
|
|
1790
1832
|
}
|
|
1791
|
-
const
|
|
1792
|
-
t.auth = new
|
|
1833
|
+
const at = new Ke(), ki = (t, e, r) => {
|
|
1834
|
+
t.auth = new Bi(t.store, t.transport), t.stores.status.listen((o) => {
|
|
1793
1835
|
o === Fe.READY && t.auth.reLogin();
|
|
1794
1836
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (o, s) => {
|
|
1795
|
-
if (!(
|
|
1837
|
+
if (!(at.getSchema() === o && at.getExternalToken() === s && t.transport.getHeader("authorization")))
|
|
1796
1838
|
try {
|
|
1797
|
-
await t.auth.login(o, s),
|
|
1839
|
+
await t.auth.login(o, s), at.setSchema(o), at.setExternalToken(s);
|
|
1798
1840
|
} catch {
|
|
1799
1841
|
t.sdk.logout();
|
|
1800
1842
|
}
|
|
1801
1843
|
}, t.sdk.logout = () => {
|
|
1802
|
-
t.auth.logout(),
|
|
1844
|
+
t.auth.logout(), at.clear();
|
|
1803
1845
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1804
|
-
},
|
|
1805
|
-
t.store = new
|
|
1846
|
+
}, Pi = (t, e, r) => {
|
|
1847
|
+
t.store = new xi(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([o, s]) => [o, s.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.storeUnsubscribe = () => {
|
|
1806
1848
|
t.store.unsubscribe();
|
|
1807
1849
|
}, r();
|
|
1808
|
-
},
|
|
1850
|
+
}, Ri = (t, e, r) => {
|
|
1809
1851
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async () => {
|
|
1810
1852
|
if (t.stores.enabled.get() === "on")
|
|
1811
1853
|
return { enabled: !0 };
|
|
@@ -1821,36 +1863,36 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1821
1863
|
}, t.sdk.createEventSession = (o) => {
|
|
1822
1864
|
t.stores.providerStreamId.setValue(o);
|
|
1823
1865
|
}, r();
|
|
1824
|
-
},
|
|
1866
|
+
}, Li = Xn({
|
|
1825
1867
|
level: "trace",
|
|
1826
|
-
enabled:
|
|
1868
|
+
enabled: !1,
|
|
1827
1869
|
browser: {
|
|
1828
1870
|
write: (t) => {
|
|
1829
1871
|
console.log(t);
|
|
1830
1872
|
}
|
|
1831
1873
|
}
|
|
1832
|
-
}), on = (t, e) =>
|
|
1874
|
+
}), on = (t, e) => Li.child({ name: t }, e), Ni = (t, e, r) => {
|
|
1833
1875
|
const { client: o, queryKey: s } = r.createPromiseClient(Jr, {
|
|
1834
1876
|
method: "summary",
|
|
1835
1877
|
params: [t, e]
|
|
1836
1878
|
});
|
|
1837
1879
|
return r.nanoquery.createFetcherStore(s, {
|
|
1838
|
-
fetcher: async (u, l,
|
|
1839
|
-
eventId:
|
|
1880
|
+
fetcher: async (u, l, c, p) => (await o.summary({
|
|
1881
|
+
eventId: c,
|
|
1840
1882
|
userId: p
|
|
1841
1883
|
})).data?.attributes
|
|
1842
1884
|
});
|
|
1843
|
-
},
|
|
1885
|
+
}, Ui = (t) => {
|
|
1844
1886
|
const { client: e } = t.createPromiseClient(Jr, { method: "list" });
|
|
1845
1887
|
return (r) => e.list(r);
|
|
1846
|
-
},
|
|
1888
|
+
}, $i = (t, e) => {
|
|
1847
1889
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "get", params: [t] });
|
|
1848
1890
|
return e.nanoquery.createFetcherStore(o, {
|
|
1849
1891
|
fetcher: async (s, u, l) => (await r.get({
|
|
1850
1892
|
eventId: l
|
|
1851
1893
|
})).data?.attributes
|
|
1852
1894
|
});
|
|
1853
|
-
},
|
|
1895
|
+
}, Di = (t, e) => {
|
|
1854
1896
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "syncQuestion", params: [t] });
|
|
1855
1897
|
return e.nanoquery.createFetcherStore(o, {
|
|
1856
1898
|
fetcher: async (s, u, l) => l ? (await r.syncQuestion({
|
|
@@ -1859,12 +1901,12 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1859
1901
|
}
|
|
1860
1902
|
})).data?.attributes : void 0
|
|
1861
1903
|
});
|
|
1862
|
-
},
|
|
1904
|
+
}, ji = (t, e) => {
|
|
1863
1905
|
const { client: r } = e.createCallbackClient(ve), o = Ct({ eventId: t.get() || "", feedId: "" });
|
|
1864
1906
|
return t.subscribe((u = "") => {
|
|
1865
1907
|
o.set({ eventId: u, feedId: "" });
|
|
1866
1908
|
}), e.addSubscription(r.subscription, o, { name: "feedSubscription" });
|
|
1867
|
-
},
|
|
1909
|
+
}, Vi = (t, e) => {
|
|
1868
1910
|
const { client: r } = e.createCallbackClient(ve);
|
|
1869
1911
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
1870
1912
|
}, sn = async (t, e) => {
|
|
@@ -1872,14 +1914,17 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1872
1914
|
return (await r.questionByUser({
|
|
1873
1915
|
questionId: t
|
|
1874
1916
|
})).data?.attributes?.question;
|
|
1875
|
-
},
|
|
1917
|
+
}, Mi = (t, e) => {
|
|
1876
1918
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "list", params: [t] });
|
|
1877
1919
|
return e.nanoquery.createFetcherStore(o, {
|
|
1878
1920
|
fetcher: async (s, u, l) => l ? (await r.list({
|
|
1879
|
-
eventId: l
|
|
1921
|
+
eventId: l,
|
|
1922
|
+
filter: {
|
|
1923
|
+
statuses: [We.ACTIVE, We.RESOLVED]
|
|
1924
|
+
}
|
|
1880
1925
|
})).data : []
|
|
1881
1926
|
});
|
|
1882
|
-
},
|
|
1927
|
+
}, qi = (t, e) => {
|
|
1883
1928
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "insightHistory", params: [t] });
|
|
1884
1929
|
return e.nanoquery.createFetcherStore(o, {
|
|
1885
1930
|
fetcher: async (s, u, l) => l ? (await r.insightHistory({
|
|
@@ -1888,7 +1933,7 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1888
1933
|
});
|
|
1889
1934
|
};
|
|
1890
1935
|
var pr = { exports: {} };
|
|
1891
|
-
const
|
|
1936
|
+
const Qi = Object.getPrototypeOf({});
|
|
1892
1937
|
function dr(t) {
|
|
1893
1938
|
function e(I) {
|
|
1894
1939
|
return I !== "constructor" && I !== "prototype" && I !== "__proto__";
|
|
@@ -1902,9 +1947,9 @@ function dr(t) {
|
|
|
1902
1947
|
}
|
|
1903
1948
|
function o(I) {
|
|
1904
1949
|
const _ = {};
|
|
1905
|
-
if (p && Object.getPrototypeOf(I) !==
|
|
1950
|
+
if (p && Object.getPrototypeOf(I) !== Qi)
|
|
1906
1951
|
return p(I);
|
|
1907
|
-
const D =
|
|
1952
|
+
const D = c(I);
|
|
1908
1953
|
let U, T, x;
|
|
1909
1954
|
for (U = 0, T = D.length; U < T; ++U)
|
|
1910
1955
|
e(x = D[U]) && (_[x] = F(I[x]));
|
|
@@ -1927,19 +1972,19 @@ function dr(t) {
|
|
|
1927
1972
|
u.call(I, D[U]) && _.push(D[U]);
|
|
1928
1973
|
return _;
|
|
1929
1974
|
}
|
|
1930
|
-
const
|
|
1931
|
-
function
|
|
1975
|
+
const c = t && t.symbols ? l : Object.keys, p = typeof t?.cloneProtoObject == "function" ? t.cloneProtoObject : void 0;
|
|
1976
|
+
function b(I) {
|
|
1932
1977
|
return typeof I == "object" && I !== null && !(I instanceof RegExp) && !(I instanceof Date);
|
|
1933
1978
|
}
|
|
1934
1979
|
function g(I) {
|
|
1935
1980
|
return typeof I != "object" || I === null;
|
|
1936
1981
|
}
|
|
1937
|
-
const m = typeof
|
|
1982
|
+
const m = typeof O.Buffer < "u" ? (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date || I instanceof O.Buffer : (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date, E = t && typeof t.mergeArray == "function" ? t.mergeArray({ clone: F, deepmerge: P, getKeys: c, isMergeableObject: b }) : s;
|
|
1938
1983
|
function F(I) {
|
|
1939
|
-
return
|
|
1984
|
+
return b(I) ? Array.isArray(I) ? r(I) : o(I) : I;
|
|
1940
1985
|
}
|
|
1941
1986
|
function L(I, _) {
|
|
1942
|
-
const D = {}, U =
|
|
1987
|
+
const D = {}, U = c(I), T = c(_);
|
|
1943
1988
|
let x, k, G;
|
|
1944
1989
|
for (x = 0, k = U.length; x < k; ++x)
|
|
1945
1990
|
e(G = U[x]) && T.indexOf(G) === -1 && (D[G] = F(I[G]));
|
|
@@ -1970,17 +2015,17 @@ function dr(t) {
|
|
|
1970
2015
|
}
|
|
1971
2016
|
pr.exports = dr;
|
|
1972
2017
|
pr.exports.default = dr;
|
|
1973
|
-
var
|
|
1974
|
-
const
|
|
2018
|
+
var Gi = pr.exports.deepmerge = dr;
|
|
2019
|
+
const zi = (t) => (e, r) => {
|
|
1975
2020
|
let o = 0;
|
|
1976
|
-
const s = e.length, u = r.length, l = Math.max(s, u),
|
|
2021
|
+
const s = e.length, u = r.length, l = Math.max(s, u), c = new Array(l);
|
|
1977
2022
|
for (o = 0; o < l; ++o)
|
|
1978
|
-
o < u ?
|
|
1979
|
-
return
|
|
1980
|
-
},
|
|
1981
|
-
const o = Hr([e, r], (l,
|
|
1982
|
-
if (l &&
|
|
1983
|
-
return
|
|
2023
|
+
o < u ? c[o] = t.deepmerge(e[o], r[o]) : c[o] = t.clone(e[o]);
|
|
2024
|
+
return c;
|
|
2025
|
+
}, Ki = Gi({ mergeArray: zi }), Hi = (t, e, r) => {
|
|
2026
|
+
const o = Hr([e, r], (l, c) => {
|
|
2027
|
+
if (l && c.data)
|
|
2028
|
+
return c.data.find((p) => p.id === l);
|
|
1984
2029
|
}), s = $e({
|
|
1985
2030
|
data: void 0,
|
|
1986
2031
|
loading: void 0,
|
|
@@ -1989,20 +2034,20 @@ const qi = (t) => (e, r) => {
|
|
|
1989
2034
|
return o.subscribe(async (l) => {
|
|
1990
2035
|
if (l && l.type === "question") {
|
|
1991
2036
|
s.setKey("loading", !0);
|
|
1992
|
-
const
|
|
1993
|
-
s.set({ data:
|
|
2037
|
+
const c = await sn(l.id, t);
|
|
2038
|
+
s.set({ data: c, loading: !1 });
|
|
1994
2039
|
return;
|
|
1995
2040
|
}
|
|
1996
2041
|
s.set({ data: void 0, loading: !1 });
|
|
1997
2042
|
}), { $store: o, $extendedStore: s, updateExtendedQuestion: (l) => {
|
|
1998
|
-
const
|
|
1999
|
-
if (
|
|
2043
|
+
const c = s.get().data;
|
|
2044
|
+
if (c)
|
|
2000
2045
|
for (const p of l?.answers || [])
|
|
2001
2046
|
p.youVoted !== !0 && delete p.youVoted;
|
|
2002
|
-
s.set({ data:
|
|
2047
|
+
s.set({ data: Ki(c, l) });
|
|
2003
2048
|
} };
|
|
2004
|
-
}, an = (t) => (t.gamification || (t.gamification = new
|
|
2005
|
-
class
|
|
2049
|
+
}, an = (t) => (t.gamification || (t.gamification = new Wi(t)), t.gamification);
|
|
2050
|
+
class Wi {
|
|
2006
2051
|
/** sl event id */
|
|
2007
2052
|
slStreamId;
|
|
2008
2053
|
/** organization id */
|
|
@@ -2029,13 +2074,13 @@ class zi {
|
|
|
2029
2074
|
constructor(e) {
|
|
2030
2075
|
if (e.gamification)
|
|
2031
2076
|
throw new Error("GamificationBackground Singleton error");
|
|
2032
|
-
this.log = on("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new de(ne(void 0), "moderationId").getStore(), this.openedQuestionId = new de(ne(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new pe(
|
|
2033
|
-
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription =
|
|
2077
|
+
this.log = on("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new de(ne(void 0), "moderationId").getStore(), this.openedQuestionId = new de(ne(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new pe($i(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new pe(Mi(this.slStreamId, e.transport), "gamification:feedList"), this.activeQuestionId = new pe(Di(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = Hi(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
|
|
2078
|
+
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = Vi(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
|
|
2034
2079
|
window.requestAnimationFrame(() => {
|
|
2035
2080
|
this.openedQuestion.updateExtendedQuestion(o.data?.attributes?.question);
|
|
2036
2081
|
});
|
|
2037
2082
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
2038
|
-
}), this.feedSubscription =
|
|
2083
|
+
}), this.feedSubscription = ji(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
2039
2084
|
window.requestAnimationFrame(() => {
|
|
2040
2085
|
const o = this.activeQuestionId.getStore();
|
|
2041
2086
|
o && o.mutate(r.data?.attributes);
|
|
@@ -2070,7 +2115,7 @@ class zi {
|
|
|
2070
2115
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
2071
2116
|
};
|
|
2072
2117
|
}
|
|
2073
|
-
class
|
|
2118
|
+
class Ji {
|
|
2074
2119
|
notificationsList;
|
|
2075
2120
|
notifications;
|
|
2076
2121
|
store;
|
|
@@ -2088,7 +2133,7 @@ class Ki {
|
|
|
2088
2133
|
return;
|
|
2089
2134
|
}
|
|
2090
2135
|
const r = e.close, o = e.action;
|
|
2091
|
-
this.store.set(e.id, {
|
|
2136
|
+
if (this.store.set(e.id, {
|
|
2092
2137
|
...e,
|
|
2093
2138
|
close: (...s) => {
|
|
2094
2139
|
r && r(...s), this.closeNotification(e.id);
|
|
@@ -2096,7 +2141,11 @@ class Ki {
|
|
|
2096
2141
|
action: (...s) => {
|
|
2097
2142
|
o && o(...s), this.closeNotification(e.id);
|
|
2098
2143
|
}
|
|
2099
|
-
}), this.waitingQueue.add(e.id), this.
|
|
2144
|
+
}), this.waitingQueue.add(e.id), this.activeQueue.size === this.options.concurrency) {
|
|
2145
|
+
const [s] = this.activeQueue;
|
|
2146
|
+
this.closeNotification(s);
|
|
2147
|
+
} else
|
|
2148
|
+
this.tickWaitingQueue();
|
|
2100
2149
|
};
|
|
2101
2150
|
tickWaitingQueue = () => {
|
|
2102
2151
|
if (this.activeQueue.size < this.options.concurrency) {
|
|
@@ -2144,7 +2193,7 @@ var St;
|
|
|
2144
2193
|
(function(t) {
|
|
2145
2194
|
t.OPENED = "opened";
|
|
2146
2195
|
})(St || (St = {}));
|
|
2147
|
-
class
|
|
2196
|
+
class Yi extends hr {
|
|
2148
2197
|
constructor() {
|
|
2149
2198
|
super("notification");
|
|
2150
2199
|
}
|
|
@@ -2160,11 +2209,11 @@ var Le;
|
|
|
2160
2209
|
(function(t) {
|
|
2161
2210
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
2162
2211
|
})(Le || (Le = {}));
|
|
2163
|
-
class
|
|
2212
|
+
class Xi {
|
|
2164
2213
|
queue;
|
|
2165
2214
|
storage;
|
|
2166
2215
|
constructor(e = {}) {
|
|
2167
|
-
this.storage = new
|
|
2216
|
+
this.storage = new Yi(), this.queue = new Ji({ concurrency: 1, animationDelay: 1600, ...e });
|
|
2168
2217
|
}
|
|
2169
2218
|
add = (e) => {
|
|
2170
2219
|
this.storage.isOpened(e.id) || this.queue.addToQueue(e);
|
|
@@ -2177,15 +2226,15 @@ class Wi {
|
|
|
2177
2226
|
this.storage.setOpened(e);
|
|
2178
2227
|
};
|
|
2179
2228
|
}
|
|
2180
|
-
const
|
|
2181
|
-
t.notifications = new
|
|
2182
|
-
},
|
|
2229
|
+
const Zi = (t, e, r) => {
|
|
2230
|
+
t.notifications = new Xi(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
|
|
2231
|
+
}, eo = (t, e) => {
|
|
2183
2232
|
const { client: r } = t.createPromiseClient(ve, { method: "submitAnswer" });
|
|
2184
2233
|
return r.submitAnswer({ data: e });
|
|
2185
|
-
},
|
|
2234
|
+
}, to = (t, e) => {
|
|
2186
2235
|
const { client: r } = t.createPromiseClient(ve, { method: "submitInplay" });
|
|
2187
2236
|
return r.submitInplay({ data: { eventId: +e } });
|
|
2188
|
-
},
|
|
2237
|
+
}, ro = (t, e) => {
|
|
2189
2238
|
const { client: r } = t.createPromiseClient(ve, { method: "skipQuestion" });
|
|
2190
2239
|
return r.skipQuestion({ data: { id: e } });
|
|
2191
2240
|
};
|
|
@@ -2204,28 +2253,28 @@ class un extends hr {
|
|
|
2204
2253
|
}
|
|
2205
2254
|
const Fr = {
|
|
2206
2255
|
pageSize: 10
|
|
2207
|
-
},
|
|
2208
|
-
const o = ne({ pageSize: r?.pageSize || Fr.pageSize, page: 0 }), s = $e({ data: [], loading: void 0, error: void 0 }), u =
|
|
2209
|
-
if (
|
|
2256
|
+
}, no = (t, e, r) => {
|
|
2257
|
+
const o = ne({ pageSize: r?.pageSize || Fr.pageSize, page: 0 }), s = $e({ data: [], loading: void 0, error: void 0 }), u = Ui(t), l = async (b) => {
|
|
2258
|
+
if (b) {
|
|
2210
2259
|
s.setKey("loading", !0);
|
|
2211
2260
|
const g = {
|
|
2212
|
-
eventId:
|
|
2261
|
+
eventId: b,
|
|
2213
2262
|
pagination: { page: 0, pageSize: r?.pageSize || Fr.pageSize }
|
|
2214
2263
|
}, m = await u(g);
|
|
2215
2264
|
s.set({ data: m.data.map((E) => E.attributes), loading: !1 }), o.set(g.pagination);
|
|
2216
2265
|
}
|
|
2217
2266
|
};
|
|
2218
2267
|
e.listen(l);
|
|
2219
|
-
const
|
|
2268
|
+
const c = () => {
|
|
2220
2269
|
l(e.get());
|
|
2221
2270
|
};
|
|
2222
|
-
return o.listen(async (
|
|
2271
|
+
return o.listen(async (b) => {
|
|
2223
2272
|
const g = e.get(), m = s.get().data?.length || 0;
|
|
2224
|
-
if (
|
|
2273
|
+
if (b.page > 0 && g && m >= b.page * b.pageSize) {
|
|
2225
2274
|
s.setKey("loading", !0);
|
|
2226
2275
|
const F = await u({
|
|
2227
2276
|
eventId: g,
|
|
2228
|
-
pagination:
|
|
2277
|
+
pagination: b
|
|
2229
2278
|
}), L = s.get().data || [];
|
|
2230
2279
|
s.set({
|
|
2231
2280
|
data: [...L, ...F.data.map((P) => P.attributes)],
|
|
@@ -2233,26 +2282,26 @@ const Fr = {
|
|
|
2233
2282
|
});
|
|
2234
2283
|
}
|
|
2235
2284
|
}), { $store: s, fetchMore: () => {
|
|
2236
|
-
const
|
|
2237
|
-
o.set({ ...
|
|
2238
|
-
}, invalidate:
|
|
2239
|
-
},
|
|
2240
|
-
const { client: r, queryKey: o } = t.createPromiseClient(
|
|
2285
|
+
const b = o.get();
|
|
2286
|
+
o.set({ ...b, page: b.page + 1 });
|
|
2287
|
+
}, invalidate: c };
|
|
2288
|
+
}, io = (t, e) => {
|
|
2289
|
+
const { client: r, queryKey: o } = t.createPromiseClient(lt, {
|
|
2241
2290
|
method: "generateDeepLink",
|
|
2242
2291
|
params: e
|
|
2243
2292
|
});
|
|
2244
2293
|
return t.nanoquery.createFetcherStore(o, {
|
|
2245
2294
|
fetcher: async (s, u, l) => l ? (await r.generateDeepLink({ data: { eventId: l } })).data?.attributes : {}
|
|
2246
2295
|
});
|
|
2247
|
-
},
|
|
2296
|
+
}, oo = (t, e) => ({ $store: io(t, [e]), fetch });
|
|
2248
2297
|
var re;
|
|
2249
2298
|
(function(t) {
|
|
2250
2299
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2251
2300
|
})(re || (re = {}));
|
|
2252
|
-
const
|
|
2301
|
+
const so = (t, e, r, o) => {
|
|
2253
2302
|
const s = new un(), u = ne(re.Unset), l = () => {
|
|
2254
|
-
const { inplayGame:
|
|
2255
|
-
|
|
2303
|
+
const { inplayGame: b } = t.featureSettings.get(), g = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2304
|
+
b && o.add({
|
|
2256
2305
|
type: Le.ONBOARDING,
|
|
2257
2306
|
id: g,
|
|
2258
2307
|
action: t.openFeature,
|
|
@@ -2264,21 +2313,21 @@ const no = (t, e, r, o) => {
|
|
|
2264
2313
|
questionType: Te.UNSET,
|
|
2265
2314
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2266
2315
|
// @ts-ignore
|
|
2267
|
-
onboarding: { ...
|
|
2316
|
+
onboarding: { ...b }
|
|
2268
2317
|
}
|
|
2269
2318
|
});
|
|
2270
2319
|
};
|
|
2271
|
-
u.subscribe((
|
|
2272
|
-
(
|
|
2320
|
+
u.subscribe((b) => {
|
|
2321
|
+
(b === re.Optional || re.Required) && l(), b === re.Completed && e.activeQuestionId.invalidate();
|
|
2273
2322
|
});
|
|
2274
|
-
const
|
|
2275
|
-
const
|
|
2276
|
-
if (!
|
|
2323
|
+
const c = async () => {
|
|
2324
|
+
const b = e.userId.get();
|
|
2325
|
+
if (!b) {
|
|
2277
2326
|
u.set(re.Unset);
|
|
2278
2327
|
return;
|
|
2279
2328
|
}
|
|
2280
2329
|
s.getOnboardingStatus({
|
|
2281
|
-
userId:
|
|
2330
|
+
userId: b,
|
|
2282
2331
|
organizationId: e.organizationId.get() || "",
|
|
2283
2332
|
eventId: e.slStreamId.get() || ""
|
|
2284
2333
|
}) === re.Completed && u.set(re.Completed);
|
|
@@ -2288,20 +2337,20 @@ const no = (t, e, r, o) => {
|
|
|
2288
2337
|
const E = !!(m?.options?.onboardingEnabled && t.featureSettings.get().inplayGame?.onboarding?.completed), F = !!t.featureSettings.get().inplayGame?.titleCard?.optIn;
|
|
2289
2338
|
E ? F ? u.set(re.Required) : u.set(re.Optional) : F ? u.set(re.Unavailable) : u.set(re.Disabled);
|
|
2290
2339
|
};
|
|
2291
|
-
return
|
|
2292
|
-
|
|
2293
|
-
}), e.moderation.subscribe((
|
|
2294
|
-
|
|
2340
|
+
return c(), e.userId.subscribe((b) => {
|
|
2341
|
+
b && c();
|
|
2342
|
+
}), e.moderation.subscribe((b) => {
|
|
2343
|
+
b.data && c();
|
|
2295
2344
|
}), { $store: u, submitInplay: async () => {
|
|
2296
|
-
const
|
|
2297
|
-
|
|
2345
|
+
const b = e.slStreamId.get();
|
|
2346
|
+
b && (await to(r, b), u.set(re.Completed), s.saveOnboardingStatus({
|
|
2298
2347
|
organizationId: e.organizationId.get() || "",
|
|
2299
2348
|
userId: e.userId.get() || "",
|
|
2300
|
-
eventId:
|
|
2349
|
+
eventId: b
|
|
2301
2350
|
}, re.Completed));
|
|
2302
2351
|
} };
|
|
2303
|
-
},
|
|
2304
|
-
class
|
|
2352
|
+
}, ao = /* @__PURE__ */ new Set([Te.POLL, Te.PREDICTION, Te.TRIVIA]);
|
|
2353
|
+
class uo extends lr {
|
|
2305
2354
|
/** user statistics (leaderboard panel) */
|
|
2306
2355
|
userSummary;
|
|
2307
2356
|
/** feed list (pick history) */
|
|
@@ -2328,16 +2377,16 @@ class oo extends lr {
|
|
|
2328
2377
|
/** Browser cache */
|
|
2329
2378
|
storage;
|
|
2330
2379
|
constructor(e, r, o) {
|
|
2331
|
-
super(e, r), this.background = an(o), this.storage = new un(), this.userSummary = new pe(
|
|
2380
|
+
super(e, r), this.background = an(o), this.storage = new un(), this.userSummary = new pe(Ni(this.background.slStreamId, this.background.userId, o.transport), "gamification:userSummary"), this.feedList = this.background.feedList, this.currentUserId = this.background.userId, this.openedUser = ne(void 0), this.leaderboardId = new de(ne(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = so(this, this.background, o.transport, o.notifications), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ue.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = oo(this.transport, this.background.slStreamId), this.leaderboardList = no(this.transport, this.background.slStreamId), this.status.subscribe((s) => {
|
|
2332
2381
|
s === De.Ready ? this.connect(o.transport) : this.disconnect();
|
|
2333
2382
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2334
|
-
if (s && s.data && this.onboardingStatus.$store.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.status ===
|
|
2335
|
-
if (
|
|
2383
|
+
if (s && s.data && this.onboardingStatus.$store.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.status === We.ACTIVE) {
|
|
2384
|
+
if (ao.has(s.data.question.type))
|
|
2336
2385
|
this.notifications.add({
|
|
2337
2386
|
type: Le.QUESTION,
|
|
2338
2387
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2339
2388
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2340
|
-
autoHideDuration: 1e3 *
|
|
2389
|
+
autoHideDuration: 1e3 * 60,
|
|
2341
2390
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2342
2391
|
data: {
|
|
2343
2392
|
questionType: s.data.question.type,
|
|
@@ -2365,7 +2414,7 @@ class oo extends lr {
|
|
|
2365
2414
|
type: Le.QUESTION,
|
|
2366
2415
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2367
2416
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2368
|
-
autoHideDuration: 1e3 *
|
|
2417
|
+
autoHideDuration: 1e3 * 120,
|
|
2369
2418
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2370
2419
|
data: {
|
|
2371
2420
|
questionType: s.data.question.type,
|
|
@@ -2390,7 +2439,7 @@ class oo extends lr {
|
|
|
2390
2439
|
type: Le.QUESTION,
|
|
2391
2440
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2392
2441
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2393
|
-
autoHideDuration: 1e3 *
|
|
2442
|
+
autoHideDuration: 1e3 * 120,
|
|
2394
2443
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2395
2444
|
data: {
|
|
2396
2445
|
questionType: s.data.question.type,
|
|
@@ -2408,10 +2457,10 @@ class oo extends lr {
|
|
|
2408
2457
|
if (!o)
|
|
2409
2458
|
return;
|
|
2410
2459
|
const { status: s, type: u, id: l } = o;
|
|
2411
|
-
if (s ===
|
|
2412
|
-
const
|
|
2460
|
+
if (s === We.RESOLVED && u === Te.PREDICTION) {
|
|
2461
|
+
const c = this.background.getCurrentSessionId({
|
|
2413
2462
|
prefix: `notification-id:${l}`
|
|
2414
|
-
}), p = await sn(l, e),
|
|
2463
|
+
}), p = await sn(l, e), b = p?.answers.find(({ correct: m }) => m), g = p?.answers.find(({ youVoted: m }) => m);
|
|
2415
2464
|
if (!g)
|
|
2416
2465
|
return;
|
|
2417
2466
|
this.notifications.add({
|
|
@@ -2419,18 +2468,18 @@ class oo extends lr {
|
|
|
2419
2468
|
action: () => this.openQuestion(l),
|
|
2420
2469
|
close: () => this.closeQuestion(l),
|
|
2421
2470
|
autoHideDuration: 35e3,
|
|
2422
|
-
id:
|
|
2471
|
+
id: c,
|
|
2423
2472
|
data: {
|
|
2424
2473
|
questionType: Te.PREDICTION,
|
|
2425
2474
|
question: {
|
|
2426
|
-
title:
|
|
2475
|
+
title: b?.youVoted ? `Congratulations! You answered correctly! You won ${b.points} pts!` : `Better luck next time! Correct: ${b?.text}!`,
|
|
2427
2476
|
votedAnswer: {
|
|
2428
2477
|
title: g?.text,
|
|
2429
2478
|
points: g?.points
|
|
2430
2479
|
},
|
|
2431
|
-
correctAnswerTitle:
|
|
2432
|
-
correct:
|
|
2433
|
-
predictionResult: s ===
|
|
2480
|
+
correctAnswerTitle: b?.text,
|
|
2481
|
+
correct: b?.youVoted,
|
|
2482
|
+
predictionResult: s === We.RESOLVED
|
|
2434
2483
|
}
|
|
2435
2484
|
}
|
|
2436
2485
|
});
|
|
@@ -2446,10 +2495,10 @@ class oo extends lr {
|
|
|
2446
2495
|
this.background.feedSubscription.removeListener("feed-subscription-questions-list");
|
|
2447
2496
|
};
|
|
2448
2497
|
submitAnswer = async (e, r) => {
|
|
2449
|
-
await
|
|
2498
|
+
await eo(this.transport, { questionId: e, answerId: r }), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2450
2499
|
};
|
|
2451
2500
|
skipQuestion = async (e) => {
|
|
2452
|
-
await
|
|
2501
|
+
await ro(this.transport, e), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2453
2502
|
};
|
|
2454
2503
|
openQuestion = (e) => (this.openFeature(), this.background.openQuestion(e));
|
|
2455
2504
|
closeQuestion = (e) => this.background.closeQuestion(e);
|
|
@@ -2461,7 +2510,7 @@ class oo extends lr {
|
|
|
2461
2510
|
this.openedUser.set(void 0);
|
|
2462
2511
|
};
|
|
2463
2512
|
}
|
|
2464
|
-
class
|
|
2513
|
+
class co extends lr {
|
|
2465
2514
|
insights;
|
|
2466
2515
|
closeFeature;
|
|
2467
2516
|
openFeature;
|
|
@@ -2473,7 +2522,7 @@ class so extends lr {
|
|
|
2473
2522
|
super(e, r), this.background = an(o), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ue.HIGHLIGHTS), this.status.subscribe((s) => {
|
|
2474
2523
|
s === De.Ready ? this.connect() : this.disconnect();
|
|
2475
2524
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2476
|
-
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type === Te.FACTOID && s.data.question.status ===
|
|
2525
|
+
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type === Te.FACTOID && s.data.question.status === We.ACTIVE && this.notifications.add({
|
|
2477
2526
|
type: Le.QUESTION,
|
|
2478
2527
|
action: () => s.data?.question && this.openHighlight(s.data.question.id),
|
|
2479
2528
|
close: () => s.data?.question && this.closeHighlight(s.data.question.id),
|
|
@@ -2489,7 +2538,7 @@ class so extends lr {
|
|
|
2489
2538
|
}), this.openedInsight = this.background.openedQuestion;
|
|
2490
2539
|
}
|
|
2491
2540
|
connect = () => {
|
|
2492
|
-
this.insights ? this.insights.invalidate() : this.insights = new pe(
|
|
2541
|
+
this.insights ? this.insights.invalidate() : this.insights = new pe(qi(this.background.slStreamId, this.transport), "gamification:insights"), this.background.feedSubscription.addListener("feed-subscription-insights-list", () => {
|
|
2493
2542
|
window.requestAnimationFrame(() => {
|
|
2494
2543
|
this.insights?.invalidate();
|
|
2495
2544
|
});
|
|
@@ -2502,18 +2551,18 @@ class so extends lr {
|
|
|
2502
2551
|
closeHighlight = (e) => this.background.closeQuestion(e);
|
|
2503
2552
|
}
|
|
2504
2553
|
ue.GAMES + "", ue.HIGHLIGHTS + "";
|
|
2505
|
-
class
|
|
2554
|
+
class fo extends lr {
|
|
2506
2555
|
constructor(e, r) {
|
|
2507
2556
|
super(e, r);
|
|
2508
2557
|
}
|
|
2509
2558
|
}
|
|
2510
|
-
const
|
|
2559
|
+
const lo = (t, e, r) => t.type === ue.GAMES ? new uo(t, e, r) : t.type === ue.HIGHLIGHTS ? new co(t, e, r) : new fo(t, e), ho = (t, e, r) => {
|
|
2511
2560
|
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new de(ne(ue.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (o) => t.features.get(o), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (o) => {
|
|
2512
2561
|
t.activeFeature.setValue(o);
|
|
2513
2562
|
}, t.sdk.closeFeature = () => {
|
|
2514
2563
|
t.activeFeature.setValue(ue.UNSET);
|
|
2515
2564
|
}, t.initFeature = (o, s = Ie.ORGANIZATION) => {
|
|
2516
|
-
const u =
|
|
2565
|
+
const u = lo(o, s, t);
|
|
2517
2566
|
t.features.set(o.type, u);
|
|
2518
2567
|
}, t.updateFeature = (o, s) => {
|
|
2519
2568
|
t.features.get(o.type)?.update(o, s);
|
|
@@ -2530,8 +2579,8 @@ const uo = (t, e, r) => t.type === ue.GAMES ? new oo(t, e, r) : t.type === ue.HI
|
|
|
2530
2579
|
const o = (u, l) => {
|
|
2531
2580
|
if (l?.overlays) {
|
|
2532
2581
|
u === Ie.STREAM && t.features.clear();
|
|
2533
|
-
for (const
|
|
2534
|
-
|
|
2582
|
+
for (const c of l.overlays)
|
|
2583
|
+
c.sdkEnable === !0 && (t.features.has(c.type) ? t.updateFeature(c, u) : t.initFeature(c, u));
|
|
2535
2584
|
}
|
|
2536
2585
|
}, s = {
|
|
2537
2586
|
/**
|
|
@@ -2564,7 +2613,7 @@ const uo = (t, e, r) => t.type === ue.GAMES ? new oo(t, e, r) : t.type === ue.HI
|
|
|
2564
2613
|
}, r();
|
|
2565
2614
|
};
|
|
2566
2615
|
var yr = { exports: {} }, gr = { exports: {} };
|
|
2567
|
-
function
|
|
2616
|
+
function po(t) {
|
|
2568
2617
|
var e = new t(), r = e;
|
|
2569
2618
|
function o() {
|
|
2570
2619
|
var u = e;
|
|
@@ -2578,18 +2627,18 @@ function fo(t) {
|
|
|
2578
2627
|
release: s
|
|
2579
2628
|
};
|
|
2580
2629
|
}
|
|
2581
|
-
var
|
|
2630
|
+
var yo = po, go = yo;
|
|
2582
2631
|
function cn(t, e, r) {
|
|
2583
2632
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2584
2633
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2585
|
-
var o =
|
|
2634
|
+
var o = go(mo), s = null, u = null, l = 0, c = null, p = {
|
|
2586
2635
|
push: P,
|
|
2587
2636
|
drain: ae,
|
|
2588
2637
|
saturated: ae,
|
|
2589
2638
|
pause: g,
|
|
2590
2639
|
paused: !1,
|
|
2591
2640
|
concurrency: r,
|
|
2592
|
-
running:
|
|
2641
|
+
running: b,
|
|
2593
2642
|
resume: F,
|
|
2594
2643
|
idle: L,
|
|
2595
2644
|
length: m,
|
|
@@ -2601,7 +2650,7 @@ function cn(t, e, r) {
|
|
|
2601
2650
|
error: U
|
|
2602
2651
|
};
|
|
2603
2652
|
return p;
|
|
2604
|
-
function
|
|
2653
|
+
function b() {
|
|
2605
2654
|
return l;
|
|
2606
2655
|
}
|
|
2607
2656
|
function g() {
|
|
@@ -2629,7 +2678,7 @@ function cn(t, e, r) {
|
|
|
2629
2678
|
}
|
|
2630
2679
|
function P(T, x) {
|
|
2631
2680
|
var k = o.get();
|
|
2632
|
-
k.context = t, k.release = I, k.value = T, k.callback = x || ae, k.errorHandler =
|
|
2681
|
+
k.context = t, k.release = I, k.value = T, k.callback = x || ae, k.errorHandler = c, l === p.concurrency || p.paused ? u ? (u.next = k, u = k) : (s = k, u = k, p.saturated()) : (l++, e.call(t, k.value, k.worked));
|
|
2633
2682
|
}
|
|
2634
2683
|
function K(T, x) {
|
|
2635
2684
|
var k = o.get();
|
|
@@ -2647,12 +2696,12 @@ function cn(t, e, r) {
|
|
|
2647
2696
|
s = null, u = null, p.drain(), p.drain = ae;
|
|
2648
2697
|
}
|
|
2649
2698
|
function U(T) {
|
|
2650
|
-
|
|
2699
|
+
c = T;
|
|
2651
2700
|
}
|
|
2652
2701
|
}
|
|
2653
2702
|
function ae() {
|
|
2654
2703
|
}
|
|
2655
|
-
function
|
|
2704
|
+
function mo() {
|
|
2656
2705
|
this.value = null, this.callback = ae, this.next = null, this.release = ae, this.context = null, this.errorHandler = null;
|
|
2657
2706
|
var t = this;
|
|
2658
2707
|
this.worked = function(r, o) {
|
|
@@ -2660,7 +2709,7 @@ function po() {
|
|
|
2660
2709
|
t.value = null, t.callback = ae, t.errorHandler && u(r, l), s.call(t.context, r, o), t.release(t);
|
|
2661
2710
|
};
|
|
2662
2711
|
}
|
|
2663
|
-
function
|
|
2712
|
+
function wo(t, e, r) {
|
|
2664
2713
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2665
2714
|
function o(g, m) {
|
|
2666
2715
|
e.call(this, g).then(function(E) {
|
|
@@ -2668,8 +2717,8 @@ function yo(t, e, r) {
|
|
|
2668
2717
|
}, m);
|
|
2669
2718
|
}
|
|
2670
2719
|
var s = cn(t, o, r), u = s.push, l = s.unshift;
|
|
2671
|
-
return s.push =
|
|
2672
|
-
function
|
|
2720
|
+
return s.push = c, s.unshift = p, s.drained = b, s;
|
|
2721
|
+
function c(g) {
|
|
2673
2722
|
var m = new Promise(function(E, F) {
|
|
2674
2723
|
u(g, function(L, P) {
|
|
2675
2724
|
if (L) {
|
|
@@ -2693,7 +2742,7 @@ function yo(t, e, r) {
|
|
|
2693
2742
|
});
|
|
2694
2743
|
return m.catch(ae), m;
|
|
2695
2744
|
}
|
|
2696
|
-
function
|
|
2745
|
+
function b() {
|
|
2697
2746
|
if (s.idle())
|
|
2698
2747
|
return new Promise(function(E) {
|
|
2699
2748
|
E();
|
|
@@ -2707,16 +2756,16 @@ function yo(t, e, r) {
|
|
|
2707
2756
|
}
|
|
2708
2757
|
}
|
|
2709
2758
|
gr.exports = cn;
|
|
2710
|
-
gr.exports.promise =
|
|
2711
|
-
var fn = gr.exports, mr = { exports: {} },
|
|
2759
|
+
gr.exports.promise = wo;
|
|
2760
|
+
var fn = gr.exports, mr = { exports: {} }, Ye = typeof Reflect == "object" ? Reflect : null, Tr = Ye && typeof Ye.apply == "function" ? Ye.apply : function(e, r, o) {
|
|
2712
2761
|
return Function.prototype.apply.call(e, r, o);
|
|
2713
2762
|
}, gt;
|
|
2714
|
-
|
|
2763
|
+
Ye && typeof Ye.ownKeys == "function" ? gt = Ye.ownKeys : Object.getOwnPropertySymbols ? gt = function(e) {
|
|
2715
2764
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
2716
2765
|
} : gt = function(e) {
|
|
2717
2766
|
return Object.getOwnPropertyNames(e);
|
|
2718
2767
|
};
|
|
2719
|
-
function
|
|
2768
|
+
function bo(t) {
|
|
2720
2769
|
console && console.warn && console.warn(t);
|
|
2721
2770
|
}
|
|
2722
2771
|
var ln = Number.isNaN || function(e) {
|
|
@@ -2726,7 +2775,7 @@ function q() {
|
|
|
2726
2775
|
q.init.call(this);
|
|
2727
2776
|
}
|
|
2728
2777
|
mr.exports = q;
|
|
2729
|
-
mr.exports.once =
|
|
2778
|
+
mr.exports.once = Eo;
|
|
2730
2779
|
q.EventEmitter = q;
|
|
2731
2780
|
q.prototype._events = void 0;
|
|
2732
2781
|
q.prototype._eventsCount = 0;
|
|
@@ -2773,8 +2822,8 @@ q.prototype.emit = function(e) {
|
|
|
2773
2822
|
var l;
|
|
2774
2823
|
if (r.length > 0 && (l = r[0]), l instanceof Error)
|
|
2775
2824
|
throw l;
|
|
2776
|
-
var
|
|
2777
|
-
throw
|
|
2825
|
+
var c = new Error("Unhandled error." + (l ? " (" + l.message + ")" : ""));
|
|
2826
|
+
throw c.context = l, c;
|
|
2778
2827
|
}
|
|
2779
2828
|
var p = u[e];
|
|
2780
2829
|
if (p === void 0)
|
|
@@ -2782,7 +2831,7 @@ q.prototype.emit = function(e) {
|
|
|
2782
2831
|
if (typeof p == "function")
|
|
2783
2832
|
Tr(p, this, r);
|
|
2784
2833
|
else
|
|
2785
|
-
for (var
|
|
2834
|
+
for (var b = p.length, g = mn(p, b), o = 0; o < b; ++o)
|
|
2786
2835
|
Tr(g[o], this, r);
|
|
2787
2836
|
return !0;
|
|
2788
2837
|
};
|
|
@@ -2796,8 +2845,8 @@ function pn(t, e, r, o) {
|
|
|
2796
2845
|
l = u[e] = r, ++t._eventsCount;
|
|
2797
2846
|
else if (typeof l == "function" ? l = u[e] = o ? [r, l] : [l, r] : o ? l.unshift(r) : l.push(r), s = hn(t), s > 0 && l.length > s && !l.warned) {
|
|
2798
2847
|
l.warned = !0;
|
|
2799
|
-
var
|
|
2800
|
-
|
|
2848
|
+
var c = new Error("Possible EventEmitter memory leak detected. " + l.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2849
|
+
c.name = "MaxListenersExceededWarning", c.emitter = t, c.type = e, c.count = l.length, bo(c);
|
|
2801
2850
|
}
|
|
2802
2851
|
return t;
|
|
2803
2852
|
}
|
|
@@ -2808,12 +2857,12 @@ q.prototype.on = q.prototype.addListener;
|
|
|
2808
2857
|
q.prototype.prependListener = function(e, r) {
|
|
2809
2858
|
return pn(this, e, r, !0);
|
|
2810
2859
|
};
|
|
2811
|
-
function
|
|
2860
|
+
function vo() {
|
|
2812
2861
|
if (!this.fired)
|
|
2813
2862
|
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);
|
|
2814
2863
|
}
|
|
2815
2864
|
function dn(t, e, r) {
|
|
2816
|
-
var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s =
|
|
2865
|
+
var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = vo.bind(o);
|
|
2817
2866
|
return s.listener = r, o.wrapFn = s, s;
|
|
2818
2867
|
}
|
|
2819
2868
|
q.prototype.once = function(e, r) {
|
|
@@ -2823,7 +2872,7 @@ q.prototype.prependOnceListener = function(e, r) {
|
|
|
2823
2872
|
return Bt(r), this.prependListener(e, dn(this, e, r)), this;
|
|
2824
2873
|
};
|
|
2825
2874
|
q.prototype.removeListener = function(e, r) {
|
|
2826
|
-
var o, s, u, l,
|
|
2875
|
+
var o, s, u, l, c;
|
|
2827
2876
|
if (Bt(r), s = this._events, s === void 0)
|
|
2828
2877
|
return this;
|
|
2829
2878
|
if (o = s[e], o === void 0)
|
|
@@ -2833,12 +2882,12 @@ q.prototype.removeListener = function(e, r) {
|
|
|
2833
2882
|
else if (typeof o != "function") {
|
|
2834
2883
|
for (u = -1, l = o.length - 1; l >= 0; l--)
|
|
2835
2884
|
if (o[l] === r || o[l].listener === r) {
|
|
2836
|
-
|
|
2885
|
+
c = o[l].listener, u = l;
|
|
2837
2886
|
break;
|
|
2838
2887
|
}
|
|
2839
2888
|
if (u < 0)
|
|
2840
2889
|
return this;
|
|
2841
|
-
u === 0 ? o.shift() :
|
|
2890
|
+
u === 0 ? o.shift() : So(o, u), o.length === 1 && (s[e] = o[0]), s.removeListener !== void 0 && this.emit("removeListener", e, c || r);
|
|
2842
2891
|
}
|
|
2843
2892
|
return this;
|
|
2844
2893
|
};
|
|
@@ -2867,7 +2916,7 @@ function yn(t, e, r) {
|
|
|
2867
2916
|
if (o === void 0)
|
|
2868
2917
|
return [];
|
|
2869
2918
|
var s = o[e];
|
|
2870
|
-
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ?
|
|
2919
|
+
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? Ao(s) : mn(s, s.length);
|
|
2871
2920
|
}
|
|
2872
2921
|
q.prototype.listeners = function(e) {
|
|
2873
2922
|
return yn(this, e, !0);
|
|
@@ -2898,17 +2947,17 @@ function mn(t, e) {
|
|
|
2898
2947
|
r[o] = t[o];
|
|
2899
2948
|
return r;
|
|
2900
2949
|
}
|
|
2901
|
-
function
|
|
2950
|
+
function So(t, e) {
|
|
2902
2951
|
for (; e + 1 < t.length; e++)
|
|
2903
2952
|
t[e] = t[e + 1];
|
|
2904
2953
|
t.pop();
|
|
2905
2954
|
}
|
|
2906
|
-
function
|
|
2955
|
+
function Ao(t) {
|
|
2907
2956
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
2908
2957
|
e[r] = t[r].listener || t[r];
|
|
2909
2958
|
return e;
|
|
2910
2959
|
}
|
|
2911
|
-
function
|
|
2960
|
+
function Eo(t, e) {
|
|
2912
2961
|
return new Promise(function(r, o) {
|
|
2913
2962
|
function s(l) {
|
|
2914
2963
|
t.removeListener(e, u), o(l);
|
|
@@ -2916,13 +2965,13 @@ function vo(t, e) {
|
|
|
2916
2965
|
function u() {
|
|
2917
2966
|
typeof t.removeListener == "function" && t.removeListener("error", s), r([].slice.call(arguments));
|
|
2918
2967
|
}
|
|
2919
|
-
|
|
2968
|
+
wn(t, e, u, { once: !0 }), e !== "error" && Io(t, s, { once: !0 });
|
|
2920
2969
|
});
|
|
2921
2970
|
}
|
|
2922
|
-
function
|
|
2923
|
-
typeof t.on == "function" &&
|
|
2971
|
+
function Io(t, e, r) {
|
|
2972
|
+
typeof t.on == "function" && wn(t, "error", e, r);
|
|
2924
2973
|
}
|
|
2925
|
-
function
|
|
2974
|
+
function wn(t, e, r, o) {
|
|
2926
2975
|
if (typeof t.on == "function")
|
|
2927
2976
|
o.once ? t.once(e, r) : t.on(e, r);
|
|
2928
2977
|
else if (typeof t.addEventListener == "function")
|
|
@@ -2932,7 +2981,7 @@ function bn(t, e, r, o) {
|
|
|
2932
2981
|
else
|
|
2933
2982
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
2934
2983
|
}
|
|
2935
|
-
var
|
|
2984
|
+
var bn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
2936
2985
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2937
2986
|
return !1;
|
|
2938
2987
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2955,33 +3004,33 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2955
3004
|
return !1;
|
|
2956
3005
|
}
|
|
2957
3006
|
return !0;
|
|
2958
|
-
},
|
|
2959
|
-
return
|
|
2960
|
-
}, Cr = typeof Symbol < "u" && Symbol,
|
|
2961
|
-
return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
3007
|
+
}, Fo = Sn, wr = function() {
|
|
3008
|
+
return Fo() && !!Symbol.toStringTag;
|
|
3009
|
+
}, Cr = typeof Symbol < "u" && Symbol, To = Sn, _o = function() {
|
|
3010
|
+
return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : To();
|
|
2962
3011
|
}, Or = {
|
|
2963
3012
|
foo: {}
|
|
2964
|
-
},
|
|
2965
|
-
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof
|
|
2966
|
-
},
|
|
3013
|
+
}, Co = Object, Oo = function() {
|
|
3014
|
+
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof Co);
|
|
3015
|
+
}, xo = "Function.prototype.bind called on incompatible ", Bo = Object.prototype.toString, ko = Math.max, Po = "[object Function]", xr = function(e, r) {
|
|
2967
3016
|
for (var o = [], s = 0; s < e.length; s += 1)
|
|
2968
3017
|
o[s] = e[s];
|
|
2969
3018
|
for (var u = 0; u < r.length; u += 1)
|
|
2970
3019
|
o[u + e.length] = r[u];
|
|
2971
3020
|
return o;
|
|
2972
|
-
},
|
|
3021
|
+
}, Ro = function(e, r) {
|
|
2973
3022
|
for (var o = [], s = r || 0, u = 0; s < e.length; s += 1, u += 1)
|
|
2974
3023
|
o[u] = e[s];
|
|
2975
3024
|
return o;
|
|
2976
|
-
},
|
|
3025
|
+
}, Lo = function(t, e) {
|
|
2977
3026
|
for (var r = "", o = 0; o < t.length; o += 1)
|
|
2978
3027
|
r += t[o], o + 1 < t.length && (r += e);
|
|
2979
3028
|
return r;
|
|
2980
|
-
},
|
|
3029
|
+
}, No = function(e) {
|
|
2981
3030
|
var r = this;
|
|
2982
|
-
if (typeof r != "function" ||
|
|
2983
|
-
throw new TypeError(
|
|
2984
|
-
for (var o =
|
|
3031
|
+
if (typeof r != "function" || Bo.apply(r) !== Po)
|
|
3032
|
+
throw new TypeError(xo + r);
|
|
3033
|
+
for (var o = Ro(arguments, 1), s, u = function() {
|
|
2985
3034
|
if (this instanceof s) {
|
|
2986
3035
|
var g = r.apply(
|
|
2987
3036
|
this,
|
|
@@ -2993,17 +3042,17 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2993
3042
|
e,
|
|
2994
3043
|
xr(o, arguments)
|
|
2995
3044
|
);
|
|
2996
|
-
}, l =
|
|
2997
|
-
|
|
2998
|
-
if (s = Function("binder", "return function (" +
|
|
2999
|
-
var
|
|
3045
|
+
}, l = ko(0, r.length - o.length), c = [], p = 0; p < l; p++)
|
|
3046
|
+
c[p] = "$" + p;
|
|
3047
|
+
if (s = Function("binder", "return function (" + Lo(c, ",") + "){ return binder.apply(this,arguments); }")(u), r.prototype) {
|
|
3048
|
+
var b = function() {
|
|
3000
3049
|
};
|
|
3001
|
-
|
|
3050
|
+
b.prototype = r.prototype, s.prototype = new b(), b.prototype = null;
|
|
3002
3051
|
}
|
|
3003
3052
|
return s;
|
|
3004
|
-
},
|
|
3053
|
+
}, Uo = No, An = Function.prototype.bind || Uo, Br = {}.hasOwnProperty, Ut = Function.prototype.call, $o = Ut.bind ? Ut.bind(Br) : function(t, e) {
|
|
3005
3054
|
return Ut.call(Br, t, e);
|
|
3006
|
-
}, $,
|
|
3055
|
+
}, $, Ze = SyntaxError, En = Function, Xe = TypeError, $t = function(t) {
|
|
3007
3056
|
try {
|
|
3008
3057
|
return En('"use strict"; return (' + t + ").constructor;")();
|
|
3009
3058
|
} catch {
|
|
@@ -3016,8 +3065,8 @@ if (je)
|
|
|
3016
3065
|
je = null;
|
|
3017
3066
|
}
|
|
3018
3067
|
var Dt = function() {
|
|
3019
|
-
throw new
|
|
3020
|
-
},
|
|
3068
|
+
throw new Xe();
|
|
3069
|
+
}, Do = je ? function() {
|
|
3021
3070
|
try {
|
|
3022
3071
|
return arguments.callee, Dt;
|
|
3023
3072
|
} catch {
|
|
@@ -3027,9 +3076,9 @@ var Dt = function() {
|
|
|
3027
3076
|
return Dt;
|
|
3028
3077
|
}
|
|
3029
3078
|
}
|
|
3030
|
-
}() : Dt, Qe =
|
|
3079
|
+
}() : Dt, Qe = _o(), jo = Oo(), X = Object.getPrototypeOf || (jo ? function(t) {
|
|
3031
3080
|
return t.__proto__;
|
|
3032
|
-
} : null), ze = {},
|
|
3081
|
+
} : null), ze = {}, Vo = typeof Uint8Array > "u" || !X ? $ : X(Uint8Array), Ve = {
|
|
3033
3082
|
"%AggregateError%": typeof AggregateError > "u" ? $ : AggregateError,
|
|
3034
3083
|
"%Array%": Array,
|
|
3035
3084
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? $ : ArrayBuffer,
|
|
@@ -3085,10 +3134,10 @@ var Dt = function() {
|
|
|
3085
3134
|
"%String%": String,
|
|
3086
3135
|
"%StringIteratorPrototype%": Qe && X ? X(""[Symbol.iterator]()) : $,
|
|
3087
3136
|
"%Symbol%": Qe ? Symbol : $,
|
|
3088
|
-
"%SyntaxError%":
|
|
3089
|
-
"%ThrowTypeError%":
|
|
3090
|
-
"%TypedArray%":
|
|
3091
|
-
"%TypeError%":
|
|
3137
|
+
"%SyntaxError%": Ze,
|
|
3138
|
+
"%ThrowTypeError%": Do,
|
|
3139
|
+
"%TypedArray%": Vo,
|
|
3140
|
+
"%TypeError%": Xe,
|
|
3092
3141
|
"%Uint8Array%": typeof Uint8Array > "u" ? $ : Uint8Array,
|
|
3093
3142
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? $ : Uint8ClampedArray,
|
|
3094
3143
|
"%Uint16Array%": typeof Uint16Array > "u" ? $ : Uint16Array,
|
|
@@ -3102,10 +3151,10 @@ if (X)
|
|
|
3102
3151
|
try {
|
|
3103
3152
|
null.error;
|
|
3104
3153
|
} catch (t) {
|
|
3105
|
-
var
|
|
3106
|
-
Ve["%Error.prototype%"] =
|
|
3154
|
+
var Mo = X(X(t));
|
|
3155
|
+
Ve["%Error.prototype%"] = Mo;
|
|
3107
3156
|
}
|
|
3108
|
-
var
|
|
3157
|
+
var qo = function t(e) {
|
|
3109
3158
|
var r;
|
|
3110
3159
|
if (e === "%AsyncFunction%")
|
|
3111
3160
|
r = $t("async function () {}");
|
|
@@ -3173,60 +3222,60 @@ var jo = function t(e) {
|
|
|
3173
3222
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3174
3223
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3175
3224
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3176
|
-
},
|
|
3225
|
+
}, ht = An, Et = $o, Qo = ht.call(Function.call, Array.prototype.concat), Go = ht.call(Function.apply, Array.prototype.splice), Pr = ht.call(Function.call, String.prototype.replace), It = ht.call(Function.call, String.prototype.slice), zo = ht.call(Function.call, RegExp.prototype.exec), Ko = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Ho = /\\(\\)?/g, Wo = function(e) {
|
|
3177
3226
|
var r = It(e, 0, 1), o = It(e, -1);
|
|
3178
3227
|
if (r === "%" && o !== "%")
|
|
3179
|
-
throw new
|
|
3228
|
+
throw new Ze("invalid intrinsic syntax, expected closing `%`");
|
|
3180
3229
|
if (o === "%" && r !== "%")
|
|
3181
|
-
throw new
|
|
3230
|
+
throw new Ze("invalid intrinsic syntax, expected opening `%`");
|
|
3182
3231
|
var s = [];
|
|
3183
|
-
return Pr(e,
|
|
3184
|
-
s[s.length] =
|
|
3232
|
+
return Pr(e, Ko, function(u, l, c, p) {
|
|
3233
|
+
s[s.length] = c ? Pr(p, Ho, "$1") : l || u;
|
|
3185
3234
|
}), s;
|
|
3186
|
-
},
|
|
3235
|
+
}, Jo = function(e, r) {
|
|
3187
3236
|
var o = e, s;
|
|
3188
3237
|
if (Et(kr, o) && (s = kr[o], o = "%" + s[0] + "%"), Et(Ve, o)) {
|
|
3189
3238
|
var u = Ve[o];
|
|
3190
|
-
if (u === ze && (u =
|
|
3191
|
-
throw new
|
|
3239
|
+
if (u === ze && (u = qo(o)), typeof u > "u" && !r)
|
|
3240
|
+
throw new Xe("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3192
3241
|
return {
|
|
3193
3242
|
alias: s,
|
|
3194
3243
|
name: o,
|
|
3195
3244
|
value: u
|
|
3196
3245
|
};
|
|
3197
3246
|
}
|
|
3198
|
-
throw new
|
|
3199
|
-
},
|
|
3247
|
+
throw new Ze("intrinsic " + e + " does not exist!");
|
|
3248
|
+
}, tt = function(e, r) {
|
|
3200
3249
|
if (typeof e != "string" || e.length === 0)
|
|
3201
|
-
throw new
|
|
3250
|
+
throw new Xe("intrinsic name must be a non-empty string");
|
|
3202
3251
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3203
|
-
throw new
|
|
3204
|
-
if (
|
|
3205
|
-
throw new
|
|
3206
|
-
var o =
|
|
3207
|
-
|
|
3252
|
+
throw new Xe('"allowMissing" argument must be a boolean');
|
|
3253
|
+
if (zo(/^%?[^%]*%?$/, e) === null)
|
|
3254
|
+
throw new Ze("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3255
|
+
var o = Wo(e), s = o.length > 0 ? o[0] : "", u = Jo("%" + s + "%", r), l = u.name, c = u.value, p = !1, b = u.alias;
|
|
3256
|
+
b && (s = b[0], Go(o, Qo([0, 1], b)));
|
|
3208
3257
|
for (var g = 1, m = !0; g < o.length; g += 1) {
|
|
3209
3258
|
var E = o[g], F = It(E, 0, 1), L = It(E, -1);
|
|
3210
3259
|
if ((F === '"' || F === "'" || F === "`" || L === '"' || L === "'" || L === "`") && F !== L)
|
|
3211
|
-
throw new
|
|
3260
|
+
throw new Ze("property names with quotes must have matching quotes");
|
|
3212
3261
|
if ((E === "constructor" || !m) && (p = !0), s += "." + E, l = "%" + s + "%", Et(Ve, l))
|
|
3213
|
-
|
|
3214
|
-
else if (
|
|
3215
|
-
if (!(E in
|
|
3262
|
+
c = Ve[l];
|
|
3263
|
+
else if (c != null) {
|
|
3264
|
+
if (!(E in c)) {
|
|
3216
3265
|
if (!r)
|
|
3217
|
-
throw new
|
|
3266
|
+
throw new Xe("base intrinsic for " + e + " exists, but the property is not available.");
|
|
3218
3267
|
return;
|
|
3219
3268
|
}
|
|
3220
3269
|
if (je && g + 1 >= o.length) {
|
|
3221
|
-
var P = je(
|
|
3222
|
-
m = !!P, m && "get" in P && !("originalValue" in P.get) ?
|
|
3270
|
+
var P = je(c, E);
|
|
3271
|
+
m = !!P, m && "get" in P && !("originalValue" in P.get) ? c = P.get : c = c[E];
|
|
3223
3272
|
} else
|
|
3224
|
-
m = Et(
|
|
3225
|
-
m && !p && (Ve[l] =
|
|
3273
|
+
m = Et(c, E), c = c[E];
|
|
3274
|
+
m && !p && (Ve[l] = c);
|
|
3226
3275
|
}
|
|
3227
3276
|
}
|
|
3228
|
-
return
|
|
3229
|
-
}, In = { exports: {} },
|
|
3277
|
+
return c;
|
|
3278
|
+
}, In = { exports: {} }, Yo = tt, er = Yo("%Object.defineProperty%", !0), tr = function() {
|
|
3230
3279
|
if (er)
|
|
3231
3280
|
try {
|
|
3232
3281
|
return er({}, "a", { value: 1 }), !0;
|
|
@@ -3244,21 +3293,21 @@ tr.hasArrayLengthDefineBug = function() {
|
|
|
3244
3293
|
return !0;
|
|
3245
3294
|
}
|
|
3246
3295
|
};
|
|
3247
|
-
var Fn = tr,
|
|
3296
|
+
var Fn = tr, Xo = tt, mt = Xo("%Object.getOwnPropertyDescriptor%", !0);
|
|
3248
3297
|
if (mt)
|
|
3249
3298
|
try {
|
|
3250
3299
|
mt([], "length");
|
|
3251
3300
|
} catch {
|
|
3252
3301
|
mt = null;
|
|
3253
3302
|
}
|
|
3254
|
-
var
|
|
3255
|
-
if (
|
|
3303
|
+
var br = mt, Zo = Fn(), vr = tt, ct = Zo && vr("%Object.defineProperty%", !0);
|
|
3304
|
+
if (ct)
|
|
3256
3305
|
try {
|
|
3257
|
-
|
|
3306
|
+
ct({}, "a", { value: 1 });
|
|
3258
3307
|
} catch {
|
|
3259
|
-
|
|
3308
|
+
ct = !1;
|
|
3260
3309
|
}
|
|
3261
|
-
var
|
|
3310
|
+
var es = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = br, ts = function(e, r, o) {
|
|
3262
3311
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3263
3312
|
throw new Ge("`obj` must be an object or a function`");
|
|
3264
3313
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3271,32 +3320,32 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3271
3320
|
throw new Ge("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3272
3321
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3273
3322
|
throw new Ge("`loose`, if provided, must be a boolean");
|
|
3274
|
-
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null,
|
|
3275
|
-
if (
|
|
3276
|
-
|
|
3323
|
+
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, c = arguments.length > 6 ? arguments[6] : !1, p = !!Rr && Rr(e, r);
|
|
3324
|
+
if (ct)
|
|
3325
|
+
ct(e, r, {
|
|
3277
3326
|
configurable: l === null && p ? p.configurable : !l,
|
|
3278
3327
|
enumerable: s === null && p ? p.enumerable : !s,
|
|
3279
3328
|
value: o,
|
|
3280
3329
|
writable: u === null && p ? p.writable : !u
|
|
3281
3330
|
});
|
|
3282
|
-
else if (
|
|
3331
|
+
else if (c || !s && !u && !l)
|
|
3283
3332
|
e[r] = o;
|
|
3284
3333
|
else
|
|
3285
|
-
throw new
|
|
3286
|
-
}, Tn =
|
|
3334
|
+
throw new es("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3335
|
+
}, Tn = tt, Lr = ts, rs = Fn(), Nr = br, Ur = Tn("%TypeError%"), ns = Tn("%Math.floor%"), is = function(e, r) {
|
|
3287
3336
|
if (typeof e != "function")
|
|
3288
3337
|
throw new Ur("`fn` is not a function");
|
|
3289
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3338
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || ns(r) !== r)
|
|
3290
3339
|
throw new Ur("`length` must be a positive 32-bit integer");
|
|
3291
3340
|
var o = arguments.length > 2 && !!arguments[2], s = !0, u = !0;
|
|
3292
3341
|
if ("length" in e && Nr) {
|
|
3293
3342
|
var l = Nr(e, "length");
|
|
3294
3343
|
l && !l.configurable && (s = !1), l && !l.writable && (u = !1);
|
|
3295
3344
|
}
|
|
3296
|
-
return (s || u || !o) && (
|
|
3345
|
+
return (s || u || !o) && (rs ? Lr(e, "length", r, !0, !0) : Lr(e, "length", r)), e;
|
|
3297
3346
|
};
|
|
3298
3347
|
(function(t) {
|
|
3299
|
-
var e = An, r =
|
|
3348
|
+
var e = An, r = tt, o = is, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), c = r("%Reflect.apply%", !0) || e.call(l, u), p = r("%Object.defineProperty%", !0), b = r("%Math.max%");
|
|
3300
3349
|
if (p)
|
|
3301
3350
|
try {
|
|
3302
3351
|
p({}, "a", { value: 1 });
|
|
@@ -3306,71 +3355,71 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3306
3355
|
t.exports = function(E) {
|
|
3307
3356
|
if (typeof E != "function")
|
|
3308
3357
|
throw new s("a function is required");
|
|
3309
|
-
var F =
|
|
3358
|
+
var F = c(e, l, arguments);
|
|
3310
3359
|
return o(
|
|
3311
3360
|
F,
|
|
3312
|
-
1 +
|
|
3361
|
+
1 + b(0, E.length - (arguments.length - 1)),
|
|
3313
3362
|
!0
|
|
3314
3363
|
);
|
|
3315
3364
|
};
|
|
3316
3365
|
var g = function() {
|
|
3317
|
-
return
|
|
3366
|
+
return c(e, u, arguments);
|
|
3318
3367
|
};
|
|
3319
3368
|
p ? p(t.exports, "apply", { value: g }) : t.exports.apply = g;
|
|
3320
3369
|
})(In);
|
|
3321
|
-
var _n = In.exports, Cn =
|
|
3370
|
+
var _n = In.exports, Cn = tt, On = _n, os = On(Cn("String.prototype.indexOf")), xn = function(e, r) {
|
|
3322
3371
|
var o = Cn(e, !!r);
|
|
3323
|
-
return typeof o == "function" &&
|
|
3324
|
-
},
|
|
3325
|
-
return
|
|
3372
|
+
return typeof o == "function" && os(e, ".prototype.") > -1 ? On(o) : o;
|
|
3373
|
+
}, ss = wr(), as = xn, rr = as("Object.prototype.toString"), Pt = function(e) {
|
|
3374
|
+
return ss && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : rr(e) === "[object Arguments]";
|
|
3326
3375
|
}, Bn = function(e) {
|
|
3327
3376
|
return Pt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && rr(e) !== "[object Array]" && rr(e.callee) === "[object Function]";
|
|
3328
|
-
},
|
|
3377
|
+
}, us = function() {
|
|
3329
3378
|
return Pt(arguments);
|
|
3330
3379
|
}();
|
|
3331
3380
|
Pt.isLegacyArguments = Bn;
|
|
3332
|
-
var
|
|
3381
|
+
var cs = us ? Pt : Bn, fs = Object.prototype.toString, ls = Function.prototype.toString, hs = /^\s*(?:function)?\*/, kn = wr(), jt = Object.getPrototypeOf, ps = function() {
|
|
3333
3382
|
if (!kn)
|
|
3334
3383
|
return !1;
|
|
3335
3384
|
try {
|
|
3336
3385
|
return Function("return function*() {}")();
|
|
3337
3386
|
} catch {
|
|
3338
3387
|
}
|
|
3339
|
-
}, Vt,
|
|
3388
|
+
}, Vt, ds = function(e) {
|
|
3340
3389
|
if (typeof e != "function")
|
|
3341
3390
|
return !1;
|
|
3342
|
-
if (
|
|
3391
|
+
if (hs.test(ls.call(e)))
|
|
3343
3392
|
return !0;
|
|
3344
3393
|
if (!kn) {
|
|
3345
|
-
var r =
|
|
3394
|
+
var r = fs.call(e);
|
|
3346
3395
|
return r === "[object GeneratorFunction]";
|
|
3347
3396
|
}
|
|
3348
3397
|
if (!jt)
|
|
3349
3398
|
return !1;
|
|
3350
3399
|
if (typeof Vt > "u") {
|
|
3351
|
-
var o =
|
|
3400
|
+
var o = ps();
|
|
3352
3401
|
Vt = o ? jt(o) : !1;
|
|
3353
3402
|
}
|
|
3354
3403
|
return jt(e) === Vt;
|
|
3355
|
-
}, Pn = Function.prototype.toString, He = typeof Reflect == "object" && Reflect !== null && Reflect.apply, nr,
|
|
3404
|
+
}, Pn = Function.prototype.toString, He = typeof Reflect == "object" && Reflect !== null && Reflect.apply, nr, wt;
|
|
3356
3405
|
if (typeof He == "function" && typeof Object.defineProperty == "function")
|
|
3357
3406
|
try {
|
|
3358
3407
|
nr = Object.defineProperty({}, "length", {
|
|
3359
3408
|
get: function() {
|
|
3360
|
-
throw
|
|
3409
|
+
throw wt;
|
|
3361
3410
|
}
|
|
3362
|
-
}),
|
|
3411
|
+
}), wt = {}, He(function() {
|
|
3363
3412
|
throw 42;
|
|
3364
3413
|
}, null, nr);
|
|
3365
3414
|
} catch (t) {
|
|
3366
|
-
t !==
|
|
3415
|
+
t !== wt && (He = null);
|
|
3367
3416
|
}
|
|
3368
3417
|
else
|
|
3369
3418
|
He = null;
|
|
3370
|
-
var
|
|
3419
|
+
var ys = /^\s*class\b/, ir = function(e) {
|
|
3371
3420
|
try {
|
|
3372
3421
|
var r = Pn.call(e);
|
|
3373
|
-
return
|
|
3422
|
+
return ys.test(r);
|
|
3374
3423
|
} catch {
|
|
3375
3424
|
return !1;
|
|
3376
3425
|
}
|
|
@@ -3380,22 +3429,22 @@ var hs = /^\s*class\b/, ir = function(e) {
|
|
|
3380
3429
|
} catch {
|
|
3381
3430
|
return !1;
|
|
3382
3431
|
}
|
|
3383
|
-
},
|
|
3432
|
+
}, bt = Object.prototype.toString, gs = "[object Object]", ms = "[object Function]", ws = "[object GeneratorFunction]", bs = "[object HTMLAllCollection]", vs = "[object HTML document.all class]", Ss = "[object HTMLCollection]", As = typeof Symbol == "function" && !!Symbol.toStringTag, Es = !(0 in [,]), or = function() {
|
|
3384
3433
|
return !1;
|
|
3385
3434
|
};
|
|
3386
3435
|
if (typeof document == "object") {
|
|
3387
|
-
var
|
|
3388
|
-
|
|
3389
|
-
if ((
|
|
3436
|
+
var Is = document.all;
|
|
3437
|
+
bt.call(Is) === bt.call(document.all) && (or = function(e) {
|
|
3438
|
+
if ((Es || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3390
3439
|
try {
|
|
3391
|
-
var r =
|
|
3392
|
-
return (r ===
|
|
3440
|
+
var r = bt.call(e);
|
|
3441
|
+
return (r === bs || r === vs || r === Ss || r === gs) && e("") == null;
|
|
3393
3442
|
} catch {
|
|
3394
3443
|
}
|
|
3395
3444
|
return !1;
|
|
3396
3445
|
});
|
|
3397
3446
|
}
|
|
3398
|
-
var
|
|
3447
|
+
var Fs = He ? function(e) {
|
|
3399
3448
|
if (or(e))
|
|
3400
3449
|
return !0;
|
|
3401
3450
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
@@ -3403,7 +3452,7 @@ var As = He ? function(e) {
|
|
|
3403
3452
|
try {
|
|
3404
3453
|
He(e, null, nr);
|
|
3405
3454
|
} catch (r) {
|
|
3406
|
-
if (r !==
|
|
3455
|
+
if (r !== wt)
|
|
3407
3456
|
return !1;
|
|
3408
3457
|
}
|
|
3409
3458
|
return !ir(e) && Mt(e);
|
|
@@ -3412,27 +3461,27 @@ var As = He ? function(e) {
|
|
|
3412
3461
|
return !0;
|
|
3413
3462
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3414
3463
|
return !1;
|
|
3415
|
-
if (
|
|
3464
|
+
if (As)
|
|
3416
3465
|
return Mt(e);
|
|
3417
3466
|
if (ir(e))
|
|
3418
3467
|
return !1;
|
|
3419
|
-
var r =
|
|
3420
|
-
return r !==
|
|
3421
|
-
},
|
|
3468
|
+
var r = bt.call(e);
|
|
3469
|
+
return r !== ms && r !== ws && !/^\[object HTML/.test(r) ? !1 : Mt(e);
|
|
3470
|
+
}, Ts = Fs, _s = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty, Cs = function(e, r, o) {
|
|
3422
3471
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3423
3472
|
Rn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3424
|
-
},
|
|
3473
|
+
}, Os = function(e, r, o) {
|
|
3425
3474
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3426
3475
|
o == null ? r(e.charAt(s), s, e) : r.call(o, e.charAt(s), s, e);
|
|
3427
|
-
},
|
|
3476
|
+
}, xs = function(e, r, o) {
|
|
3428
3477
|
for (var s in e)
|
|
3429
3478
|
Rn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3430
|
-
},
|
|
3431
|
-
if (!
|
|
3479
|
+
}, Bs = function(e, r, o) {
|
|
3480
|
+
if (!Ts(r))
|
|
3432
3481
|
throw new TypeError("iterator must be a function");
|
|
3433
3482
|
var s;
|
|
3434
|
-
arguments.length >= 3 && (s = o),
|
|
3435
|
-
},
|
|
3483
|
+
arguments.length >= 3 && (s = o), _s.call(e) === "[object Array]" ? Cs(e, r, s) : typeof e == "string" ? Os(e, r, s) : xs(e, r, s);
|
|
3484
|
+
}, ks = Bs, qt = [
|
|
3436
3485
|
"BigInt64Array",
|
|
3437
3486
|
"BigUint64Array",
|
|
3438
3487
|
"Float32Array",
|
|
@@ -3444,11 +3493,11 @@ var As = He ? function(e) {
|
|
|
3444
3493
|
"Uint32Array",
|
|
3445
3494
|
"Uint8Array",
|
|
3446
3495
|
"Uint8ClampedArray"
|
|
3447
|
-
],
|
|
3496
|
+
], Ps = typeof globalThis > "u" ? Yr : globalThis, Rs = function() {
|
|
3448
3497
|
for (var e = [], r = 0; r < qt.length; r++)
|
|
3449
|
-
typeof
|
|
3498
|
+
typeof Ps[qt[r]] == "function" && (e[e.length] = qt[r]);
|
|
3450
3499
|
return e;
|
|
3451
|
-
}, Ft =
|
|
3500
|
+
}, Ft = ks, Ls = Rs, $r = _n, Sr = xn, vt = br, Ns = Sr("Object.prototype.toString"), Ln = wr(), Dr = typeof globalThis > "u" ? Yr : globalThis, sr = Ls(), Ar = Sr("String.prototype.slice"), Qt = Object.getPrototypeOf, Us = Sr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3452
3501
|
for (var o = 0; o < e.length; o += 1)
|
|
3453
3502
|
if (e[o] === r)
|
|
3454
3503
|
return o;
|
|
@@ -3468,7 +3517,7 @@ Ln && vt && Qt ? Ft(sr, function(t) {
|
|
|
3468
3517
|
var e = new Dr[t](), r = e.slice || e.set;
|
|
3469
3518
|
r && (Tt["$" + t] = $r(r));
|
|
3470
3519
|
});
|
|
3471
|
-
var
|
|
3520
|
+
var $s = function(e) {
|
|
3472
3521
|
var r = !1;
|
|
3473
3522
|
return Ft(Tt, function(o, s) {
|
|
3474
3523
|
if (!r)
|
|
@@ -3477,7 +3526,7 @@ var Ls = function(e) {
|
|
|
3477
3526
|
} catch {
|
|
3478
3527
|
}
|
|
3479
3528
|
}), r;
|
|
3480
|
-
},
|
|
3529
|
+
}, Ds = function(e) {
|
|
3481
3530
|
var r = !1;
|
|
3482
3531
|
return Ft(Tt, function(o, s) {
|
|
3483
3532
|
if (!r)
|
|
@@ -3490,28 +3539,28 @@ var Ls = function(e) {
|
|
|
3490
3539
|
if (!e || typeof e != "object")
|
|
3491
3540
|
return !1;
|
|
3492
3541
|
if (!Ln) {
|
|
3493
|
-
var r = Ar(
|
|
3494
|
-
return
|
|
3542
|
+
var r = Ar(Ns(e), 8, -1);
|
|
3543
|
+
return Us(sr, r) > -1 ? r : r !== "Object" ? !1 : Ds(e);
|
|
3495
3544
|
}
|
|
3496
|
-
return vt ?
|
|
3497
|
-
},
|
|
3498
|
-
return !!
|
|
3545
|
+
return vt ? $s(e) : null;
|
|
3546
|
+
}, js = Nn, Vs = function(e) {
|
|
3547
|
+
return !!js(e);
|
|
3499
3548
|
};
|
|
3500
3549
|
(function(t) {
|
|
3501
|
-
var e =
|
|
3550
|
+
var e = cs, r = ds, o = Nn, s = Vs;
|
|
3502
3551
|
function u(S) {
|
|
3503
3552
|
return S.call.bind(S);
|
|
3504
3553
|
}
|
|
3505
|
-
var l = typeof BigInt < "u",
|
|
3554
|
+
var l = typeof BigInt < "u", c = typeof Symbol < "u", p = u(Object.prototype.toString), b = u(Number.prototype.valueOf), g = u(String.prototype.valueOf), m = u(Boolean.prototype.valueOf);
|
|
3506
3555
|
if (l)
|
|
3507
3556
|
var E = u(BigInt.prototype.valueOf);
|
|
3508
|
-
if (
|
|
3557
|
+
if (c)
|
|
3509
3558
|
var F = u(Symbol.prototype.valueOf);
|
|
3510
|
-
function L(S,
|
|
3559
|
+
function L(S, dt) {
|
|
3511
3560
|
if (typeof S != "object")
|
|
3512
3561
|
return !1;
|
|
3513
3562
|
try {
|
|
3514
|
-
return
|
|
3563
|
+
return dt(S), !0;
|
|
3515
3564
|
} catch {
|
|
3516
3565
|
return !1;
|
|
3517
3566
|
}
|
|
@@ -3573,10 +3622,10 @@ var Ls = function(e) {
|
|
|
3573
3622
|
return p(S) === "[object Map]";
|
|
3574
3623
|
}
|
|
3575
3624
|
ce.working = typeof Map < "u" && ce(/* @__PURE__ */ new Map());
|
|
3576
|
-
function
|
|
3625
|
+
function nt(S) {
|
|
3577
3626
|
return typeof Map > "u" ? !1 : ce.working ? ce(S) : S instanceof Map;
|
|
3578
3627
|
}
|
|
3579
|
-
t.isMap =
|
|
3628
|
+
t.isMap = nt;
|
|
3580
3629
|
function fe(S) {
|
|
3581
3630
|
return p(S) === "[object Set]";
|
|
3582
3631
|
}
|
|
@@ -3589,10 +3638,10 @@ var Ls = function(e) {
|
|
|
3589
3638
|
return p(S) === "[object WeakMap]";
|
|
3590
3639
|
}
|
|
3591
3640
|
Be.working = typeof WeakMap < "u" && Be(/* @__PURE__ */ new WeakMap());
|
|
3592
|
-
function
|
|
3641
|
+
function it(S) {
|
|
3593
3642
|
return typeof WeakMap > "u" ? !1 : Be.working ? Be(S) : S instanceof WeakMap;
|
|
3594
3643
|
}
|
|
3595
|
-
t.isWeakMap =
|
|
3644
|
+
t.isWeakMap = it;
|
|
3596
3645
|
function ke(S) {
|
|
3597
3646
|
return p(S) === "[object WeakSet]";
|
|
3598
3647
|
}
|
|
@@ -3618,11 +3667,11 @@ var Ls = function(e) {
|
|
|
3618
3667
|
}
|
|
3619
3668
|
t.isDataView = v;
|
|
3620
3669
|
var A = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
|
|
3621
|
-
function
|
|
3670
|
+
function C(S) {
|
|
3622
3671
|
return p(S) === "[object SharedArrayBuffer]";
|
|
3623
3672
|
}
|
|
3624
3673
|
function j(S) {
|
|
3625
|
-
return typeof A > "u" ? !1 : (typeof
|
|
3674
|
+
return typeof A > "u" ? !1 : (typeof C.working > "u" && (C.working = C(new A())), C.working ? C(S) : S instanceof A);
|
|
3626
3675
|
}
|
|
3627
3676
|
t.isSharedArrayBuffer = j;
|
|
3628
3677
|
function V(S) {
|
|
@@ -3646,7 +3695,7 @@ var Ls = function(e) {
|
|
|
3646
3695
|
}
|
|
3647
3696
|
t.isWebAssemblyCompiledModule = te;
|
|
3648
3697
|
function ye(S) {
|
|
3649
|
-
return L(S,
|
|
3698
|
+
return L(S, b);
|
|
3650
3699
|
}
|
|
3651
3700
|
t.isNumberObject = ye;
|
|
3652
3701
|
function he(S) {
|
|
@@ -3661,14 +3710,14 @@ var Ls = function(e) {
|
|
|
3661
3710
|
return l && L(S, E);
|
|
3662
3711
|
}
|
|
3663
3712
|
t.isBigIntObject = Me;
|
|
3664
|
-
function
|
|
3665
|
-
return
|
|
3713
|
+
function pt(S) {
|
|
3714
|
+
return c && L(S, F);
|
|
3666
3715
|
}
|
|
3667
|
-
t.isSymbolObject =
|
|
3668
|
-
function
|
|
3669
|
-
return ye(S) || he(S) || oe(S) || Me(S) ||
|
|
3716
|
+
t.isSymbolObject = pt;
|
|
3717
|
+
function ot(S) {
|
|
3718
|
+
return ye(S) || he(S) || oe(S) || Me(S) || pt(S);
|
|
3670
3719
|
}
|
|
3671
|
-
t.isBoxedPrimitive =
|
|
3720
|
+
t.isBoxedPrimitive = ot;
|
|
3672
3721
|
function Rt(S) {
|
|
3673
3722
|
return typeof Uint8Array < "u" && (H(S) || j(S));
|
|
3674
3723
|
}
|
|
@@ -3681,7 +3730,7 @@ var Ls = function(e) {
|
|
|
3681
3730
|
});
|
|
3682
3731
|
});
|
|
3683
3732
|
})(vn);
|
|
3684
|
-
var
|
|
3733
|
+
var Ms = function(e) {
|
|
3685
3734
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3686
3735
|
}, ar = { exports: {} };
|
|
3687
3736
|
typeof Object.create == "function" ? ar.exports = function(e, r) {
|
|
@@ -3701,12 +3750,12 @@ typeof Object.create == "function" ? ar.exports = function(e, r) {
|
|
|
3701
3750
|
o.prototype = r.prototype, e.prototype = new o(), e.prototype.constructor = e;
|
|
3702
3751
|
}
|
|
3703
3752
|
};
|
|
3704
|
-
var
|
|
3753
|
+
var qs = ar.exports;
|
|
3705
3754
|
(function(t) {
|
|
3706
3755
|
var e = Object.getOwnPropertyDescriptors || function(v) {
|
|
3707
|
-
for (var A = Object.keys(v),
|
|
3708
|
-
|
|
3709
|
-
return
|
|
3756
|
+
for (var A = Object.keys(v), C = {}, j = 0; j < A.length; j++)
|
|
3757
|
+
C[A[j]] = Object.getOwnPropertyDescriptor(v, A[j]);
|
|
3758
|
+
return C;
|
|
3710
3759
|
}, r = /%[sdj%]/g;
|
|
3711
3760
|
t.format = function(d) {
|
|
3712
3761
|
if (!T(d)) {
|
|
@@ -3714,55 +3763,55 @@ var js = ar.exports;
|
|
|
3714
3763
|
v.push(l(arguments[A]));
|
|
3715
3764
|
return v.join(" ");
|
|
3716
3765
|
}
|
|
3717
|
-
for (var A = 1,
|
|
3766
|
+
for (var A = 1, C = arguments, j = C.length, V = String(d).replace(r, function(N) {
|
|
3718
3767
|
if (N === "%%")
|
|
3719
3768
|
return "%";
|
|
3720
3769
|
if (A >= j)
|
|
3721
3770
|
return N;
|
|
3722
3771
|
switch (N) {
|
|
3723
3772
|
case "%s":
|
|
3724
|
-
return String(
|
|
3773
|
+
return String(C[A++]);
|
|
3725
3774
|
case "%d":
|
|
3726
|
-
return Number(
|
|
3775
|
+
return Number(C[A++]);
|
|
3727
3776
|
case "%j":
|
|
3728
3777
|
try {
|
|
3729
|
-
return JSON.stringify(
|
|
3778
|
+
return JSON.stringify(C[A++]);
|
|
3730
3779
|
} catch {
|
|
3731
3780
|
return "[Circular]";
|
|
3732
3781
|
}
|
|
3733
3782
|
default:
|
|
3734
3783
|
return N;
|
|
3735
3784
|
}
|
|
3736
|
-
}), B =
|
|
3785
|
+
}), B = C[A]; A < j; B = C[++A])
|
|
3737
3786
|
_(B) || !ie(B) ? V += " " + B : V += " " + l(B);
|
|
3738
3787
|
return V;
|
|
3739
3788
|
}, t.deprecate = function(d, v) {
|
|
3740
|
-
if (typeof
|
|
3789
|
+
if (typeof O.process < "u" && O.process.noDeprecation === !0)
|
|
3741
3790
|
return d;
|
|
3742
|
-
if (typeof
|
|
3791
|
+
if (typeof O.process > "u")
|
|
3743
3792
|
return function() {
|
|
3744
3793
|
return t.deprecate(d, v).apply(this, arguments);
|
|
3745
3794
|
};
|
|
3746
3795
|
var A = !1;
|
|
3747
|
-
function
|
|
3796
|
+
function C() {
|
|
3748
3797
|
if (!A) {
|
|
3749
|
-
if (
|
|
3798
|
+
if (O.process.throwDeprecation)
|
|
3750
3799
|
throw new Error(v);
|
|
3751
|
-
|
|
3800
|
+
O.process.traceDeprecation ? console.trace(v) : console.error(v), A = !0;
|
|
3752
3801
|
}
|
|
3753
3802
|
return d.apply(this, arguments);
|
|
3754
3803
|
}
|
|
3755
|
-
return
|
|
3804
|
+
return C;
|
|
3756
3805
|
};
|
|
3757
3806
|
var o = {}, s = /^$/;
|
|
3758
|
-
if (
|
|
3759
|
-
var u =
|
|
3807
|
+
if (O.process.env.NODE_DEBUG) {
|
|
3808
|
+
var u = O.process.env.NODE_DEBUG;
|
|
3760
3809
|
u = u.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), s = new RegExp("^" + u + "$", "i");
|
|
3761
3810
|
}
|
|
3762
3811
|
t.debuglog = function(d) {
|
|
3763
3812
|
if (d = d.toUpperCase(), !o[d])
|
|
3764
3813
|
if (s.test(d)) {
|
|
3765
|
-
var v =
|
|
3814
|
+
var v = O.process.pid;
|
|
3766
3815
|
o[d] = function() {
|
|
3767
3816
|
var A = t.format.apply(t, arguments);
|
|
3768
3817
|
console.error("%s %d: %s", d, v, A);
|
|
@@ -3777,7 +3826,7 @@ var js = ar.exports;
|
|
|
3777
3826
|
seen: [],
|
|
3778
3827
|
stylize: p
|
|
3779
3828
|
};
|
|
3780
|
-
return arguments.length >= 3 && (A.depth = arguments[2]), arguments.length >= 4 && (A.colors = arguments[3]), I(v) ? A.showHidden = v : v && t._extend(A, v), k(A.showHidden) && (A.showHidden = !1), k(A.depth) && (A.depth = 2), k(A.colors) && (A.colors = !1), k(A.customInspect) && (A.customInspect = !0), A.colors && (A.stylize =
|
|
3829
|
+
return arguments.length >= 3 && (A.depth = arguments[2]), arguments.length >= 4 && (A.colors = arguments[3]), I(v) ? A.showHidden = v : v && t._extend(A, v), k(A.showHidden) && (A.showHidden = !1), k(A.depth) && (A.depth = 2), k(A.colors) && (A.colors = !1), k(A.customInspect) && (A.customInspect = !0), A.colors && (A.stylize = c), g(A, d, A.depth);
|
|
3781
3830
|
}
|
|
3782
3831
|
t.inspect = l, l.colors = {
|
|
3783
3832
|
bold: [1, 22],
|
|
@@ -3804,16 +3853,16 @@ var js = ar.exports;
|
|
|
3804
3853
|
// "name": intentionally not styling
|
|
3805
3854
|
regexp: "red"
|
|
3806
3855
|
};
|
|
3807
|
-
function
|
|
3856
|
+
function c(d, v) {
|
|
3808
3857
|
var A = l.styles[v];
|
|
3809
3858
|
return A ? "\x1B[" + l.colors[A][0] + "m" + d + "\x1B[" + l.colors[A][1] + "m" : d;
|
|
3810
3859
|
}
|
|
3811
3860
|
function p(d, v) {
|
|
3812
3861
|
return d;
|
|
3813
3862
|
}
|
|
3814
|
-
function
|
|
3863
|
+
function b(d) {
|
|
3815
3864
|
var v = {};
|
|
3816
|
-
return d.forEach(function(A,
|
|
3865
|
+
return d.forEach(function(A, C) {
|
|
3817
3866
|
v[A] = !0;
|
|
3818
3867
|
}), v;
|
|
3819
3868
|
}
|
|
@@ -3821,13 +3870,13 @@ var js = ar.exports;
|
|
|
3821
3870
|
if (d.customInspect && v && ce(v.inspect) && // Filter out the util module, it's inspect function is special
|
|
3822
3871
|
v.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
3823
3872
|
!(v.constructor && v.constructor.prototype === v)) {
|
|
3824
|
-
var
|
|
3825
|
-
return T(
|
|
3873
|
+
var C = v.inspect(A, d);
|
|
3874
|
+
return T(C) || (C = g(d, C, A)), C;
|
|
3826
3875
|
}
|
|
3827
3876
|
var j = m(d, v);
|
|
3828
3877
|
if (j)
|
|
3829
3878
|
return j;
|
|
3830
|
-
var V = Object.keys(v), B =
|
|
3879
|
+
var V = Object.keys(v), B = b(V);
|
|
3831
3880
|
if (d.showHidden && (V = Object.getOwnPropertyNames(v)), Se(v) && (V.indexOf("message") >= 0 || V.indexOf("description") >= 0))
|
|
3832
3881
|
return E(v);
|
|
3833
3882
|
if (V.length === 0) {
|
|
@@ -3874,13 +3923,13 @@ var js = ar.exports;
|
|
|
3874
3923
|
function E(d) {
|
|
3875
3924
|
return "[" + Error.prototype.toString.call(d) + "]";
|
|
3876
3925
|
}
|
|
3877
|
-
function F(d, v, A,
|
|
3926
|
+
function F(d, v, A, C, j) {
|
|
3878
3927
|
for (var V = [], B = 0, N = v.length; B < N; ++B)
|
|
3879
3928
|
ke(v, String(B)) ? V.push(L(
|
|
3880
3929
|
d,
|
|
3881
3930
|
v,
|
|
3882
3931
|
A,
|
|
3883
|
-
|
|
3932
|
+
C,
|
|
3884
3933
|
String(B),
|
|
3885
3934
|
!0
|
|
3886
3935
|
)) : V.push("");
|
|
@@ -3889,15 +3938,15 @@ var js = ar.exports;
|
|
|
3889
3938
|
d,
|
|
3890
3939
|
v,
|
|
3891
3940
|
A,
|
|
3892
|
-
|
|
3941
|
+
C,
|
|
3893
3942
|
M,
|
|
3894
3943
|
!0
|
|
3895
3944
|
));
|
|
3896
3945
|
}), V;
|
|
3897
3946
|
}
|
|
3898
|
-
function L(d, v, A,
|
|
3947
|
+
function L(d, v, A, C, j, V) {
|
|
3899
3948
|
var B, N, M;
|
|
3900
|
-
if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ? N = d.stylize("[Getter/Setter]", "special") : N = d.stylize("[Getter]", "special") : M.set && (N = d.stylize("[Setter]", "special")), ke(
|
|
3949
|
+
if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ? N = d.stylize("[Getter/Setter]", "special") : N = d.stylize("[Getter]", "special") : M.set && (N = d.stylize("[Setter]", "special")), ke(C, j) || (B = "[" + j + "]"), N || (d.seen.indexOf(M.value) < 0 ? (_(A) ? N = g(d, M.value, null) : N = g(d, M.value, A - 1), N.indexOf(`
|
|
3901
3950
|
`) > -1 && (V ? N = N.split(`
|
|
3902
3951
|
`).map(function(te) {
|
|
3903
3952
|
return " " + te;
|
|
@@ -3915,11 +3964,11 @@ var js = ar.exports;
|
|
|
3915
3964
|
return B + ": " + N;
|
|
3916
3965
|
}
|
|
3917
3966
|
function P(d, v, A) {
|
|
3918
|
-
var
|
|
3967
|
+
var C = d.reduce(function(j, V) {
|
|
3919
3968
|
return V.indexOf(`
|
|
3920
3969
|
`) >= 0, j + V.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
3921
3970
|
}, 0);
|
|
3922
|
-
return
|
|
3971
|
+
return C > 60 ? A[0] + (v === "" ? "" : v + `
|
|
3923
3972
|
`) + " " + d.join(`,
|
|
3924
3973
|
`) + " " + A[1] : A[0] + v + " " + d.join(", ") + " " + A[1];
|
|
3925
3974
|
}
|
|
@@ -3976,11 +4025,11 @@ var js = ar.exports;
|
|
|
3976
4025
|
return typeof d == "function";
|
|
3977
4026
|
}
|
|
3978
4027
|
t.isFunction = ce;
|
|
3979
|
-
function
|
|
4028
|
+
function nt(d) {
|
|
3980
4029
|
return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
|
|
3981
4030
|
typeof d > "u";
|
|
3982
4031
|
}
|
|
3983
|
-
t.isPrimitive =
|
|
4032
|
+
t.isPrimitive = nt, t.isBuffer = Ms;
|
|
3984
4033
|
function fe(d) {
|
|
3985
4034
|
return Object.prototype.toString.call(d);
|
|
3986
4035
|
}
|
|
@@ -4001,7 +4050,7 @@ var js = ar.exports;
|
|
|
4001
4050
|
"Nov",
|
|
4002
4051
|
"Dec"
|
|
4003
4052
|
];
|
|
4004
|
-
function
|
|
4053
|
+
function it() {
|
|
4005
4054
|
var d = /* @__PURE__ */ new Date(), v = [
|
|
4006
4055
|
xe(d.getHours()),
|
|
4007
4056
|
xe(d.getMinutes()),
|
|
@@ -4010,12 +4059,12 @@ var js = ar.exports;
|
|
|
4010
4059
|
return [d.getDate(), Be[d.getMonth()], v].join(" ");
|
|
4011
4060
|
}
|
|
4012
4061
|
t.log = function() {
|
|
4013
|
-
console.log("%s - %s",
|
|
4014
|
-
}, t.inherits =
|
|
4062
|
+
console.log("%s - %s", it(), t.format.apply(t, arguments));
|
|
4063
|
+
}, t.inherits = qs, t._extend = function(d, v) {
|
|
4015
4064
|
if (!v || !ie(v))
|
|
4016
4065
|
return d;
|
|
4017
|
-
for (var A = Object.keys(v),
|
|
4018
|
-
d[A[
|
|
4066
|
+
for (var A = Object.keys(v), C = A.length; C--; )
|
|
4067
|
+
d[A[C]] = v[A[C]];
|
|
4019
4068
|
return d;
|
|
4020
4069
|
};
|
|
4021
4070
|
function ke(d, v) {
|
|
@@ -4037,12 +4086,12 @@ var js = ar.exports;
|
|
|
4037
4086
|
}), A;
|
|
4038
4087
|
}
|
|
4039
4088
|
function A() {
|
|
4040
|
-
for (var
|
|
4041
|
-
|
|
4089
|
+
for (var C, j, V = new Promise(function(M, te) {
|
|
4090
|
+
C = M, j = te;
|
|
4042
4091
|
}), B = [], N = 0; N < arguments.length; N++)
|
|
4043
4092
|
B.push(arguments[N]);
|
|
4044
4093
|
B.push(function(M, te) {
|
|
4045
|
-
M ? j(M) :
|
|
4094
|
+
M ? j(M) : C(te);
|
|
4046
4095
|
});
|
|
4047
4096
|
try {
|
|
4048
4097
|
v.apply(this, B);
|
|
@@ -4072,8 +4121,8 @@ var js = ar.exports;
|
|
|
4072
4121
|
if (typeof d != "function")
|
|
4073
4122
|
throw new TypeError('The "original" argument must be of type Function');
|
|
4074
4123
|
function v() {
|
|
4075
|
-
for (var A = [],
|
|
4076
|
-
A.push(arguments[
|
|
4124
|
+
for (var A = [], C = 0; C < arguments.length; C++)
|
|
4125
|
+
A.push(arguments[C]);
|
|
4077
4126
|
var j = A.pop();
|
|
4078
4127
|
if (typeof j != "function")
|
|
4079
4128
|
throw new TypeError("The last argument must be of type Function");
|
|
@@ -4082,10 +4131,10 @@ var js = ar.exports;
|
|
|
4082
4131
|
};
|
|
4083
4132
|
d.apply(this, A).then(
|
|
4084
4133
|
function(N) {
|
|
4085
|
-
|
|
4134
|
+
O.process.nextTick(B.bind(null, null, N));
|
|
4086
4135
|
},
|
|
4087
4136
|
function(N) {
|
|
4088
|
-
|
|
4137
|
+
O.process.nextTick(Pe.bind(null, N, B));
|
|
4089
4138
|
}
|
|
4090
4139
|
);
|
|
4091
4140
|
}
|
|
@@ -4096,7 +4145,7 @@ var js = ar.exports;
|
|
|
4096
4145
|
}
|
|
4097
4146
|
t.callbackify = H;
|
|
4098
4147
|
})(kt);
|
|
4099
|
-
const { inherits:
|
|
4148
|
+
const { inherits: Qs, format: Gt } = kt;
|
|
4100
4149
|
function Ne(t, e, r = Error) {
|
|
4101
4150
|
if (!t)
|
|
4102
4151
|
throw new Error("Avvio error code must not be empty");
|
|
@@ -4109,7 +4158,7 @@ function Ne(t, e, r = Error) {
|
|
|
4109
4158
|
}
|
|
4110
4159
|
return o.prototype[Symbol.toStringTag] = "Error", o.prototype.toString = function() {
|
|
4111
4160
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4112
|
-
},
|
|
4161
|
+
}, Qs(o, r), o;
|
|
4113
4162
|
}
|
|
4114
4163
|
var Un = {
|
|
4115
4164
|
createError: Ne,
|
|
@@ -4137,30 +4186,30 @@ var Un = {
|
|
|
4137
4186
|
"AVV_ERR_READY_TIMEOUT",
|
|
4138
4187
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4139
4188
|
)
|
|
4140
|
-
},
|
|
4189
|
+
}, Gs = function t(e, r, o) {
|
|
4141
4190
|
r === void 0 && (r = ""), o || (o = {});
|
|
4142
4191
|
var s = function(p) {
|
|
4143
|
-
var
|
|
4192
|
+
var b = {
|
|
4144
4193
|
"│": "|",
|
|
4145
4194
|
"└": "`",
|
|
4146
4195
|
"├": "+",
|
|
4147
4196
|
"─": "-",
|
|
4148
4197
|
"┬": "-"
|
|
4149
4198
|
};
|
|
4150
|
-
return o.unicode === !1 ?
|
|
4199
|
+
return o.unicode === !1 ? b[p] : p;
|
|
4151
4200
|
};
|
|
4152
4201
|
typeof e == "string" && (e = { label: e });
|
|
4153
4202
|
var u = e.nodes || [], l = (e.label || "").split(`
|
|
4154
|
-
`),
|
|
4203
|
+
`), c = `
|
|
4155
4204
|
` + r + (u.length ? s("│") : " ") + " ";
|
|
4156
|
-
return r + l.join(
|
|
4157
|
-
` + u.map(function(p,
|
|
4158
|
-
var g =
|
|
4205
|
+
return r + l.join(c) + `
|
|
4206
|
+
` + u.map(function(p, b) {
|
|
4207
|
+
var g = b === u.length - 1, m = p.nodes && p.nodes.length, E = r + (g ? " " : s("│")) + " ";
|
|
4159
4208
|
return r + s(g ? "└" : "├") + s("─") + s(m ? "┬" : "─") + " " + t(p, E, o).slice(r.length + 2);
|
|
4160
4209
|
}).join("");
|
|
4161
4210
|
};
|
|
4162
|
-
const
|
|
4163
|
-
let
|
|
4211
|
+
const zs = Gs, jr = Symbol("avvio.TimeTree.untrackNode"), zt = Symbol("avvio.TimeTree.trackNode"), Vr = Symbol("avvio.TimeTree.getParent"), Mr = Symbol("avvio.TimeTree.getNode"), qr = Symbol("avvio.TimeTree.addNode");
|
|
4212
|
+
let Ks = class {
|
|
4164
4213
|
constructor() {
|
|
4165
4214
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4166
4215
|
}
|
|
@@ -4193,14 +4242,14 @@ let Qs = class {
|
|
|
4193
4242
|
start: o,
|
|
4194
4243
|
nodes: []
|
|
4195
4244
|
}, this[zt](this.root), this.root.id;
|
|
4196
|
-
const u = this[Vr](e), l = `${r}-${Math.random()}`,
|
|
4245
|
+
const u = this[Vr](e), l = `${r}-${Math.random()}`, c = {
|
|
4197
4246
|
id: l,
|
|
4198
4247
|
parent: e,
|
|
4199
4248
|
start: o,
|
|
4200
4249
|
label: r,
|
|
4201
4250
|
nodes: []
|
|
4202
4251
|
};
|
|
4203
|
-
return u.nodes.push(
|
|
4252
|
+
return u.nodes.push(c), this[zt](c), l;
|
|
4204
4253
|
}
|
|
4205
4254
|
start(e, r, o = Date.now()) {
|
|
4206
4255
|
return this[qr](e, r, o);
|
|
@@ -4214,11 +4263,11 @@ let Qs = class {
|
|
|
4214
4263
|
}
|
|
4215
4264
|
prittyPrint() {
|
|
4216
4265
|
const e = (o) => (o.label = `${o.label} ${o.diff} ms`, o.nodes.length > 0 && (o.nodes = o.nodes.map((s) => e(s))), o), r = e(this.toJSON());
|
|
4217
|
-
return
|
|
4266
|
+
return zs(r);
|
|
4218
4267
|
}
|
|
4219
4268
|
};
|
|
4220
|
-
var
|
|
4221
|
-
function
|
|
4269
|
+
var Hs = Ks, Er = { exports: {} }, ur = { exports: {} }, Kt, Qr;
|
|
4270
|
+
function Ws() {
|
|
4222
4271
|
if (Qr)
|
|
4223
4272
|
return Kt;
|
|
4224
4273
|
Qr = 1;
|
|
@@ -4229,7 +4278,7 @@ function zs() {
|
|
|
4229
4278
|
if (E === "string" && g.length > 0)
|
|
4230
4279
|
return l(g);
|
|
4231
4280
|
if (E === "number" && isFinite(g))
|
|
4232
|
-
return m.long ? p(g) :
|
|
4281
|
+
return m.long ? p(g) : c(g);
|
|
4233
4282
|
throw new Error(
|
|
4234
4283
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(g)
|
|
4235
4284
|
);
|
|
@@ -4286,22 +4335,22 @@ function zs() {
|
|
|
4286
4335
|
}
|
|
4287
4336
|
}
|
|
4288
4337
|
}
|
|
4289
|
-
function
|
|
4338
|
+
function c(g) {
|
|
4290
4339
|
var m = Math.abs(g);
|
|
4291
4340
|
return m >= o ? Math.round(g / o) + "d" : m >= r ? Math.round(g / r) + "h" : m >= e ? Math.round(g / e) + "m" : m >= t ? Math.round(g / t) + "s" : g + "ms";
|
|
4292
4341
|
}
|
|
4293
4342
|
function p(g) {
|
|
4294
4343
|
var m = Math.abs(g);
|
|
4295
|
-
return m >= o ?
|
|
4344
|
+
return m >= o ? b(g, m, o, "day") : m >= r ? b(g, m, r, "hour") : m >= e ? b(g, m, e, "minute") : m >= t ? b(g, m, t, "second") : g + " ms";
|
|
4296
4345
|
}
|
|
4297
|
-
function
|
|
4346
|
+
function b(g, m, E, F) {
|
|
4298
4347
|
var L = m >= E * 1.5;
|
|
4299
4348
|
return Math.round(g / E) + " " + F + (L ? "s" : "");
|
|
4300
4349
|
}
|
|
4301
4350
|
return Kt;
|
|
4302
4351
|
}
|
|
4303
|
-
function
|
|
4304
|
-
r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = l, r.humanize =
|
|
4352
|
+
function Js(t) {
|
|
4353
|
+
r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = l, r.humanize = Ws(), r.destroy = b, Object.keys(t).forEach((g) => {
|
|
4305
4354
|
r[g] = t[g];
|
|
4306
4355
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4307
4356
|
function e(g) {
|
|
@@ -4353,8 +4402,8 @@ function Ks(t) {
|
|
|
4353
4402
|
}
|
|
4354
4403
|
function u() {
|
|
4355
4404
|
const g = [
|
|
4356
|
-
...r.names.map(
|
|
4357
|
-
...r.skips.map(
|
|
4405
|
+
...r.names.map(c),
|
|
4406
|
+
...r.skips.map(c).map((m) => "-" + m)
|
|
4358
4407
|
].join(",");
|
|
4359
4408
|
return r.enable(""), g;
|
|
4360
4409
|
}
|
|
@@ -4370,18 +4419,18 @@ function Ks(t) {
|
|
|
4370
4419
|
return !0;
|
|
4371
4420
|
return !1;
|
|
4372
4421
|
}
|
|
4373
|
-
function
|
|
4422
|
+
function c(g) {
|
|
4374
4423
|
return g.toString().substring(2, g.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
4375
4424
|
}
|
|
4376
4425
|
function p(g) {
|
|
4377
4426
|
return g instanceof Error ? g.stack || g.message : g;
|
|
4378
4427
|
}
|
|
4379
|
-
function
|
|
4428
|
+
function b() {
|
|
4380
4429
|
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
4381
4430
|
}
|
|
4382
4431
|
return r.enable(r.load()), r;
|
|
4383
4432
|
}
|
|
4384
|
-
var
|
|
4433
|
+
var Ys = Js;
|
|
4385
4434
|
(function(t, e) {
|
|
4386
4435
|
e.formatArgs = o, e.save = s, e.load = u, e.useColors = r, e.storage = l(), e.destroy = (() => {
|
|
4387
4436
|
let p = !1;
|
|
@@ -4476,12 +4525,12 @@ var Hs = Ks;
|
|
|
4476
4525
|
function o(p) {
|
|
4477
4526
|
if (p[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + p[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
|
|
4478
4527
|
return;
|
|
4479
|
-
const
|
|
4480
|
-
p.splice(1, 0,
|
|
4528
|
+
const b = "color: " + this.color;
|
|
4529
|
+
p.splice(1, 0, b, "color: inherit");
|
|
4481
4530
|
let g = 0, m = 0;
|
|
4482
4531
|
p[0].replace(/%[a-zA-Z%]/g, (E) => {
|
|
4483
4532
|
E !== "%%" && (g++, E === "%c" && (m = g));
|
|
4484
|
-
}), p.splice(m, 0,
|
|
4533
|
+
}), p.splice(m, 0, b);
|
|
4485
4534
|
}
|
|
4486
4535
|
e.log = console.debug || console.log || (() => {
|
|
4487
4536
|
});
|
|
@@ -4497,7 +4546,7 @@ var Hs = Ks;
|
|
|
4497
4546
|
p = e.storage.getItem("debug");
|
|
4498
4547
|
} catch {
|
|
4499
4548
|
}
|
|
4500
|
-
return !p && typeof
|
|
4549
|
+
return !p && typeof O.process < "u" && "env" in O.process && (p = O.process.env.DEBUG), p;
|
|
4501
4550
|
}
|
|
4502
4551
|
function l() {
|
|
4503
4552
|
try {
|
|
@@ -4505,38 +4554,38 @@ var Hs = Ks;
|
|
|
4505
4554
|
} catch {
|
|
4506
4555
|
}
|
|
4507
4556
|
}
|
|
4508
|
-
t.exports =
|
|
4509
|
-
const { formatters:
|
|
4510
|
-
|
|
4557
|
+
t.exports = Ys(e);
|
|
4558
|
+
const { formatters: c } = t.exports;
|
|
4559
|
+
c.j = function(p) {
|
|
4511
4560
|
try {
|
|
4512
4561
|
return JSON.stringify(p);
|
|
4513
|
-
} catch (
|
|
4514
|
-
return "[UnexpectedJSONParseError]: " +
|
|
4562
|
+
} catch (b) {
|
|
4563
|
+
return "[UnexpectedJSONParseError]: " + b.message;
|
|
4515
4564
|
}
|
|
4516
4565
|
};
|
|
4517
4566
|
})(ur, ur.exports);
|
|
4518
4567
|
var $n = ur.exports;
|
|
4519
|
-
const
|
|
4520
|
-
function
|
|
4568
|
+
const Xs = fn, Zs = bn.EventEmitter, ea = kt.inherits, Z = $n("avvio"), { AVV_ERR_READY_TIMEOUT: ta } = Un, Ht = Symbol.for("plugin-meta");
|
|
4569
|
+
function ra(t, e) {
|
|
4521
4570
|
return t[Ht] && t[Ht].name ? t[Ht].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4522
4571
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4523
4572
|
}
|
|
4524
|
-
function
|
|
4573
|
+
function na() {
|
|
4525
4574
|
const t = {};
|
|
4526
4575
|
return t.promise = new Promise((e, r) => {
|
|
4527
4576
|
t.resolve = e, t.reject = r;
|
|
4528
4577
|
}), t;
|
|
4529
4578
|
}
|
|
4530
|
-
function
|
|
4531
|
-
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name =
|
|
4579
|
+
function rt(t, e, r, o, s) {
|
|
4580
|
+
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name = ra(e, r), this.isAfter = o, this.q = Xs(t, ia, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4532
4581
|
}
|
|
4533
|
-
|
|
4534
|
-
|
|
4582
|
+
ea(rt, Zs);
|
|
4583
|
+
rt.prototype.exec = function(t, e) {
|
|
4535
4584
|
const r = this.func;
|
|
4536
4585
|
let o = !1;
|
|
4537
4586
|
const s = this.name;
|
|
4538
4587
|
if (this.parent._error && !this.isAfter) {
|
|
4539
|
-
Z("skipping loading of plugin as parent errored and it is not an after", s),
|
|
4588
|
+
Z("skipping loading of plugin as parent errored and it is not an after", s), O.process.nextTick(e);
|
|
4540
4589
|
return;
|
|
4541
4590
|
}
|
|
4542
4591
|
if (this.isAfter)
|
|
@@ -4558,30 +4607,30 @@ tt.prototype.exec = function(t, e) {
|
|
|
4558
4607
|
};
|
|
4559
4608
|
this.timeout > 0 && (Z("setting up timeout", s, this.timeout), u = setTimeout(function() {
|
|
4560
4609
|
Z("timed out", s), u = null;
|
|
4561
|
-
const p = new
|
|
4610
|
+
const p = new ta(s);
|
|
4562
4611
|
p.fn = r, l(p);
|
|
4563
4612
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4564
|
-
const
|
|
4565
|
-
|
|
4566
|
-
() =>
|
|
4567
|
-
(p) =>
|
|
4613
|
+
const c = r(this.server, this.opts, l);
|
|
4614
|
+
c && typeof c.then == "function" && (Z("exec: resolving promise", s), c.then(
|
|
4615
|
+
() => O.process.nextTick(l),
|
|
4616
|
+
(p) => O.process.nextTick(l, p)
|
|
4568
4617
|
));
|
|
4569
4618
|
};
|
|
4570
|
-
|
|
4619
|
+
rt.prototype.loadedSoFar = function() {
|
|
4571
4620
|
if (this.loaded)
|
|
4572
4621
|
return Promise.resolve();
|
|
4573
4622
|
const t = () => {
|
|
4574
4623
|
this.server.after((r, o) => {
|
|
4575
|
-
this._error = r, this.q.pause(), r ? (Z("rejecting promise", this.name, r), this._promise.reject(r)) : (Z("resolving promise", this.name), this._promise.resolve()), this._promise = null,
|
|
4624
|
+
this._error = r, this.q.pause(), r ? (Z("rejecting promise", this.name, r), this._promise.reject(r)) : (Z("resolving promise", this.name), this._promise.resolve()), this._promise = null, O.process.nextTick(o, r);
|
|
4576
4625
|
}), this.q.resume();
|
|
4577
4626
|
};
|
|
4578
4627
|
let e;
|
|
4579
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4628
|
+
return this._promise ? e = Promise.resolve() : (this._promise = na(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4580
4629
|
};
|
|
4581
|
-
|
|
4630
|
+
rt.prototype.enqueue = function(t, e) {
|
|
4582
4631
|
Z("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
4583
4632
|
};
|
|
4584
|
-
|
|
4633
|
+
rt.prototype.finish = function(t, e) {
|
|
4585
4634
|
Z("finish", this.name, t);
|
|
4586
4635
|
const r = () => {
|
|
4587
4636
|
this.loaded || (Z("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
|
|
@@ -4601,14 +4650,14 @@ tt.prototype.finish = function(t, e) {
|
|
|
4601
4650
|
r();
|
|
4602
4651
|
else
|
|
4603
4652
|
Z("delayed", this.name), this.q.drain = () => {
|
|
4604
|
-
Z("drain", this.name), this.q.drain =
|
|
4653
|
+
Z("drain", this.name), this.q.drain = oa, queueMicrotask(o);
|
|
4605
4654
|
};
|
|
4606
4655
|
};
|
|
4607
4656
|
queueMicrotask(o), this.q.resume();
|
|
4608
4657
|
};
|
|
4609
|
-
function
|
|
4658
|
+
function ia(t, e) {
|
|
4610
4659
|
const r = this;
|
|
4611
|
-
|
|
4660
|
+
O.process.nextTick(Ir.bind(r), t, e);
|
|
4612
4661
|
}
|
|
4613
4662
|
function Ir(t, e) {
|
|
4614
4663
|
if (typeof t.func.then == "function") {
|
|
@@ -4624,60 +4673,60 @@ function Ir(t, e) {
|
|
|
4624
4673
|
});
|
|
4625
4674
|
});
|
|
4626
4675
|
}
|
|
4627
|
-
function
|
|
4676
|
+
function oa() {
|
|
4628
4677
|
}
|
|
4629
|
-
Er.exports =
|
|
4678
|
+
Er.exports = rt;
|
|
4630
4679
|
Er.exports.loadPlugin = Ir;
|
|
4631
|
-
var
|
|
4632
|
-
const Gr = fn,
|
|
4680
|
+
var sa = Er.exports;
|
|
4681
|
+
const Gr = fn, aa = bn.EventEmitter, ua = kt.inherits, {
|
|
4633
4682
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: Wt,
|
|
4634
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
4635
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4636
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4637
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4638
|
-
} = Un,
|
|
4639
|
-
function
|
|
4640
|
-
const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready",
|
|
4683
|
+
AVV_ERR_CALLBACK_NOT_FN: ft,
|
|
4684
|
+
AVV_ERR_PLUGIN_NOT_VALID: ca,
|
|
4685
|
+
AVV_ERR_ROOT_PLG_BOOTED: fa,
|
|
4686
|
+
AVV_ERR_READY_TIMEOUT: la
|
|
4687
|
+
} = Un, ha = Hs, cr = sa, et = $n("avvio"), _t = Symbol("kAvvio"), Jt = Symbol("kThenifyDoNotWrap");
|
|
4688
|
+
function pa(t, e, r) {
|
|
4689
|
+
const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready", c = o.onClose || "onClose", p = o.close || "close";
|
|
4641
4690
|
if (t[s])
|
|
4642
4691
|
throw new Wt(s);
|
|
4643
4692
|
if (t[u])
|
|
4644
4693
|
throw new Wt(u);
|
|
4645
4694
|
if (t[l])
|
|
4646
4695
|
throw new Wt(l);
|
|
4647
|
-
t[s] = function(
|
|
4648
|
-
return r.use(
|
|
4649
|
-
}, Object.defineProperty(t, "then", { get: Dn.bind(r) }), t[_t] = !0, t[u] = function(
|
|
4650
|
-
return typeof
|
|
4651
|
-
}, t[l] = function(
|
|
4652
|
-
if (
|
|
4653
|
-
throw new
|
|
4654
|
-
return r.ready(
|
|
4655
|
-
}, t[
|
|
4656
|
-
if (typeof
|
|
4657
|
-
throw new
|
|
4658
|
-
return r.onClose(
|
|
4659
|
-
}, t[p] = function(
|
|
4660
|
-
if (
|
|
4661
|
-
throw new
|
|
4662
|
-
return
|
|
4696
|
+
t[s] = function(b, g) {
|
|
4697
|
+
return r.use(b, g), this;
|
|
4698
|
+
}, Object.defineProperty(t, "then", { get: Dn.bind(r) }), t[_t] = !0, t[u] = function(b) {
|
|
4699
|
+
return typeof b != "function" ? r._loadRegistered() : (r.after(Yt(b, this)), this);
|
|
4700
|
+
}, t[l] = function(b) {
|
|
4701
|
+
if (b && typeof b != "function")
|
|
4702
|
+
throw new ft(l, typeof b);
|
|
4703
|
+
return r.ready(b ? Yt(b, this) : void 0);
|
|
4704
|
+
}, t[c] = function(b) {
|
|
4705
|
+
if (typeof b != "function")
|
|
4706
|
+
throw new ft(c, typeof b);
|
|
4707
|
+
return r.onClose(wa(b, this)), this;
|
|
4708
|
+
}, t[p] = function(b) {
|
|
4709
|
+
if (b && typeof b != "function")
|
|
4710
|
+
throw new ft(p, typeof b);
|
|
4711
|
+
return b ? (r.close(Yt(b, this)), this) : r.close();
|
|
4663
4712
|
};
|
|
4664
4713
|
}
|
|
4665
4714
|
function ee(t, e, r) {
|
|
4666
4715
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof ee)) {
|
|
4667
4716
|
const o = new ee(t, e, r);
|
|
4668
|
-
return t &&
|
|
4717
|
+
return t && pa(t, e, o), o;
|
|
4669
4718
|
}
|
|
4670
|
-
e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new
|
|
4719
|
+
e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new ha(), this._readyQ = Gr(this, jn, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4671
4720
|
this.emit("start"), this._readyQ.drain = zr;
|
|
4672
|
-
}, this._closeQ = Gr(this,
|
|
4721
|
+
}, this._closeQ = Gr(this, ma, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4673
4722
|
this.emit("close"), this._closeQ.drain = zr;
|
|
4674
|
-
}, this._doStart = null, this._root = new cr(this,
|
|
4723
|
+
}, this._doStart = null, this._root = new cr(this, da.bind(this), e, !1, 0), this._root.once("start", (o, s, u) => {
|
|
4675
4724
|
const l = this.pluginTree.start(null, s, u);
|
|
4676
|
-
this._root.once("loaded", (
|
|
4677
|
-
this.pluginTree.stop(l,
|
|
4725
|
+
this._root.once("loaded", (c, p, b) => {
|
|
4726
|
+
this.pluginTree.stop(l, b);
|
|
4678
4727
|
});
|
|
4679
4728
|
}), cr.loadPlugin.call(this, this._root, (o) => {
|
|
4680
|
-
|
|
4729
|
+
et("root plugin ready");
|
|
4681
4730
|
try {
|
|
4682
4731
|
this.emit("preReady"), this._root = null;
|
|
4683
4732
|
} catch (s) {
|
|
@@ -4691,19 +4740,19 @@ function ee(t, e, r) {
|
|
|
4691
4740
|
this._readyQ.resume();
|
|
4692
4741
|
});
|
|
4693
4742
|
}
|
|
4694
|
-
function
|
|
4743
|
+
function da(t, e, r) {
|
|
4695
4744
|
this._doStart = r, e.autostart && this.start();
|
|
4696
4745
|
}
|
|
4697
|
-
|
|
4746
|
+
ua(ee, aa);
|
|
4698
4747
|
ee.prototype.start = function() {
|
|
4699
|
-
return this.started = !0,
|
|
4748
|
+
return this.started = !0, O.process.nextTick(this._doStart), this;
|
|
4700
4749
|
};
|
|
4701
4750
|
ee.prototype.override = function(t, e, r) {
|
|
4702
4751
|
return t;
|
|
4703
4752
|
};
|
|
4704
|
-
function
|
|
4753
|
+
function ya(t) {
|
|
4705
4754
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4706
|
-
throw new
|
|
4755
|
+
throw new ca(typeof t);
|
|
4707
4756
|
return t;
|
|
4708
4757
|
}
|
|
4709
4758
|
ee.prototype[_t] = !0;
|
|
@@ -4712,16 +4761,16 @@ ee.prototype.use = function(t, e) {
|
|
|
4712
4761
|
};
|
|
4713
4762
|
ee.prototype._loadRegistered = function() {
|
|
4714
4763
|
const t = this._current[0];
|
|
4715
|
-
return !this.started && !this.booted &&
|
|
4764
|
+
return !this.started && !this.booted && O.process.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4716
4765
|
};
|
|
4717
4766
|
Object.defineProperty(ee.prototype, "then", { get: Dn });
|
|
4718
4767
|
ee.prototype._addPlugin = function(t, e, r) {
|
|
4719
|
-
if (t =
|
|
4720
|
-
throw new
|
|
4768
|
+
if (t = ya(t), e = e || {}, this.booted)
|
|
4769
|
+
throw new fa();
|
|
4721
4770
|
const o = this._current[0], s = new cr(this, t, e, r);
|
|
4722
|
-
if (s.once("start", (u, l,
|
|
4723
|
-
const p = this.pluginTree.start(o.name, l,
|
|
4724
|
-
s.once("loaded", (
|
|
4771
|
+
if (s.once("start", (u, l, c) => {
|
|
4772
|
+
const p = this.pluginTree.start(o.name, l, c);
|
|
4773
|
+
s.once("loaded", (b, g, m) => {
|
|
4725
4774
|
this.pluginTree.stop(p, m);
|
|
4726
4775
|
});
|
|
4727
4776
|
}), o.loaded)
|
|
@@ -4752,7 +4801,7 @@ ee.prototype.close = function(t) {
|
|
|
4752
4801
|
let e;
|
|
4753
4802
|
if (t) {
|
|
4754
4803
|
if (typeof t != "function")
|
|
4755
|
-
throw new
|
|
4804
|
+
throw new ft("close", typeof t);
|
|
4756
4805
|
} else
|
|
4757
4806
|
e = new Promise(function(r, o) {
|
|
4758
4807
|
t = function(s) {
|
|
@@ -4762,21 +4811,21 @@ ee.prototype.close = function(t) {
|
|
|
4762
4811
|
};
|
|
4763
4812
|
});
|
|
4764
4813
|
return this.ready(() => {
|
|
4765
|
-
this._error = null, this._closeQ.push(t),
|
|
4814
|
+
this._error = null, this._closeQ.push(t), O.process.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
4766
4815
|
}), e;
|
|
4767
4816
|
};
|
|
4768
4817
|
ee.prototype.ready = function(t) {
|
|
4769
4818
|
if (t) {
|
|
4770
4819
|
if (typeof t != "function")
|
|
4771
|
-
throw new
|
|
4820
|
+
throw new ft("ready", typeof t);
|
|
4772
4821
|
this._readyQ.push(t), queueMicrotask(this.start.bind(this));
|
|
4773
4822
|
return;
|
|
4774
4823
|
}
|
|
4775
4824
|
return new Promise((e, r) => {
|
|
4776
4825
|
this._readyQ.push(s), this.start();
|
|
4777
4826
|
const o = this._current[0].server;
|
|
4778
|
-
function s(u, l,
|
|
4779
|
-
u ? r(u) : e(o),
|
|
4827
|
+
function s(u, l, c) {
|
|
4828
|
+
u ? r(u) : e(o), O.process.nextTick(c);
|
|
4780
4829
|
}
|
|
4781
4830
|
});
|
|
4782
4831
|
};
|
|
@@ -4790,63 +4839,63 @@ function zr() {
|
|
|
4790
4839
|
}
|
|
4791
4840
|
function Dn() {
|
|
4792
4841
|
if (this.booted) {
|
|
4793
|
-
|
|
4842
|
+
et("thenify returning null because we are already booted");
|
|
4794
4843
|
return;
|
|
4795
4844
|
}
|
|
4796
4845
|
if (this[Jt]) {
|
|
4797
4846
|
this[Jt] = !1;
|
|
4798
4847
|
return;
|
|
4799
4848
|
}
|
|
4800
|
-
return
|
|
4849
|
+
return et("thenify"), (t, e) => this._loadRegistered().then(() => (this[Jt] = !0, t(this._server)), e);
|
|
4801
4850
|
}
|
|
4802
4851
|
function jn(t, e) {
|
|
4803
4852
|
const r = this._server, o = this._error;
|
|
4804
4853
|
let s;
|
|
4805
4854
|
if (this._error = null, t.length === 0)
|
|
4806
|
-
this._error = o, s = t(), s && !s[_t] && typeof s.then == "function" ? s.then(() =>
|
|
4855
|
+
this._error = o, s = t(), s && !s[_t] && typeof s.then == "function" ? s.then(() => O.process.nextTick(e), (u) => O.process.nextTick(e, u)) : O.process.nextTick(e);
|
|
4807
4856
|
else if (t.length === 1)
|
|
4808
|
-
s = t(o), s && !s[_t] && typeof s.then == "function" ? s.then(() =>
|
|
4857
|
+
s = t(o), s && !s[_t] && typeof s.then == "function" ? s.then(() => O.process.nextTick(e), (u) => O.process.nextTick(e, u)) : O.process.nextTick(e);
|
|
4809
4858
|
else if (this._timeout === 0) {
|
|
4810
4859
|
const u = (l) => {
|
|
4811
4860
|
this._error = l, e(this._error);
|
|
4812
4861
|
};
|
|
4813
4862
|
t.length === 2 ? t(o, u) : t(o, r, u);
|
|
4814
4863
|
} else
|
|
4815
|
-
|
|
4864
|
+
ga.call(this, t, o, r, e);
|
|
4816
4865
|
}
|
|
4817
|
-
function
|
|
4866
|
+
function ga(t, e, r, o) {
|
|
4818
4867
|
const s = t.name;
|
|
4819
|
-
|
|
4868
|
+
et("setting up ready timeout", s, this._timeout);
|
|
4820
4869
|
let u = setTimeout(() => {
|
|
4821
|
-
|
|
4822
|
-
const
|
|
4823
|
-
|
|
4870
|
+
et("timed out", s), u = null;
|
|
4871
|
+
const c = new la(s);
|
|
4872
|
+
c.fn = t, this._error = c, o(c);
|
|
4824
4873
|
}, this._timeout);
|
|
4825
4874
|
t.length === 2 ? t(e, l.bind(this)) : t(e, r, l.bind(this));
|
|
4826
|
-
function l(
|
|
4827
|
-
u && (clearTimeout(u), this._error =
|
|
4875
|
+
function l(c) {
|
|
4876
|
+
u && (clearTimeout(u), this._error = c, o(this._error));
|
|
4828
4877
|
}
|
|
4829
4878
|
}
|
|
4830
|
-
function
|
|
4879
|
+
function ma(t, e) {
|
|
4831
4880
|
const r = this._server, o = t[this._isOnCloseHandlerKey];
|
|
4832
4881
|
if (t.length === 0 || t.length === 1) {
|
|
4833
4882
|
let s;
|
|
4834
|
-
o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (
|
|
4835
|
-
() =>
|
|
4836
|
-
(u) =>
|
|
4837
|
-
)) :
|
|
4883
|
+
o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (et("resolving close/onClose promise"), s.then(
|
|
4884
|
+
() => O.process.nextTick(e),
|
|
4885
|
+
(u) => O.process.nextTick(e, u)
|
|
4886
|
+
)) : O.process.nextTick(e);
|
|
4838
4887
|
} else
|
|
4839
4888
|
t.length === 2 ? t(o ? r : this._error, e) : o ? t(r, e) : t(this._error, r, e);
|
|
4840
4889
|
}
|
|
4841
|
-
function
|
|
4890
|
+
function wa(t, e) {
|
|
4842
4891
|
return r.bind(e);
|
|
4843
4892
|
function r(o, s) {
|
|
4844
4893
|
let u;
|
|
4845
4894
|
t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
|
|
4846
|
-
|
|
4847
|
-
}, s) :
|
|
4848
|
-
|
|
4849
|
-
}, s) :
|
|
4895
|
+
O.process.nextTick(s);
|
|
4896
|
+
}, s) : O.process.nextTick(s)) : t.length === 1 ? (u = t(this), u && u.then ? u.then(function() {
|
|
4897
|
+
O.process.nextTick(s);
|
|
4898
|
+
}, s) : O.process.nextTick(s)) : t(this, s);
|
|
4850
4899
|
}
|
|
4851
4900
|
}
|
|
4852
4901
|
function Yt(t, e) {
|
|
@@ -4854,10 +4903,10 @@ function Yt(t, e) {
|
|
|
4854
4903
|
function r(o, s) {
|
|
4855
4904
|
let u;
|
|
4856
4905
|
t ? t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
|
|
4857
|
-
|
|
4858
|
-
}, s) :
|
|
4859
|
-
|
|
4860
|
-
}, s) :
|
|
4906
|
+
O.process.nextTick(s, o);
|
|
4907
|
+
}, s) : O.process.nextTick(s, o)) : t.length === 1 ? (u = t(o), u && u.then ? u.then(function() {
|
|
4908
|
+
O.process.nextTick(s);
|
|
4909
|
+
}, s) : O.process.nextTick(s)) : t.length === 2 ? t(o, s) : t(o, this, s) : O.process.nextTick(s);
|
|
4861
4910
|
}
|
|
4862
4911
|
}
|
|
4863
4912
|
yr.exports = ee;
|
|
@@ -4868,18 +4917,18 @@ yr.exports.express = function(t) {
|
|
|
4868
4917
|
}
|
|
4869
4918
|
});
|
|
4870
4919
|
};
|
|
4871
|
-
var
|
|
4872
|
-
const
|
|
4873
|
-
function
|
|
4874
|
-
const o = e ? "https://grpc-
|
|
4875
|
-
return s.use(
|
|
4920
|
+
var ba = yr.exports;
|
|
4921
|
+
const va = /* @__PURE__ */ Zn(ba);
|
|
4922
|
+
function Da(t, e = !0, r = !0) {
|
|
4923
|
+
const o = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", s = va(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4924
|
+
return s.use(Ri), s.use(Ti, { sdkKey: t, host: o }), s.use(Pi), s.use(ki), s.use(ho), s.use(Zi), r && s.after(async (u, l, c) => {
|
|
4876
4925
|
if (u)
|
|
4877
4926
|
throw u;
|
|
4878
|
-
await l.sdk.initializeApp(),
|
|
4927
|
+
await l.sdk.initializeApp(), c();
|
|
4879
4928
|
}), s.onClose(() => {
|
|
4880
4929
|
console.log("close");
|
|
4881
4930
|
}), s;
|
|
4882
4931
|
}
|
|
4883
4932
|
export {
|
|
4884
|
-
|
|
4933
|
+
Da as StreamLayer
|
|
4885
4934
|
};
|