@streamlayer/react-ui 0.84.0 → 0.85.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.
Files changed (40) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/index-39a0b9b6.js +1168 -0
  3. package/lib/index-ba93b6b2.js +19529 -0
  4. package/lib/styles_hxnaic-4ed993c7.js +1 -0
  5. package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +3 -1
  6. package/lib/ui/app/Features/Gamification/Leaderboard.js +18 -21
  7. package/lib/ui/app/Features/Gamification/Tabs.d.ts +4 -0
  8. package/lib/ui/app/Features/Gamification/Tabs.js +40 -78
  9. package/lib/ui/app/Features/Gamification/gamification-feature.js +7 -5
  10. package/lib/ui/app/Features/Gamification/index.d.ts +4 -0
  11. package/lib/ui/app/Features/Gamification/index.js +44 -40
  12. package/lib/ui/app/Features/index.d.ts +4 -0
  13. package/lib/ui/app/Features/index.js +19 -14
  14. package/lib/ui/app/Navigation/MastersNavigation/index.js +1 -1
  15. package/lib/ui/app/Notifications/index.d.ts +4 -0
  16. package/lib/ui/app/Notifications/index.js +105 -53
  17. package/lib/ui/app/Notifications/styles.d.ts +1 -0
  18. package/lib/ui/app/Notifications/styles.js +17 -8
  19. package/lib/ui/app/masters.js +60 -47
  20. package/lib/ui/app/useMastersApp.js +1 -1
  21. package/lib/ui/app/useSdkScroll.d.ts +9 -0
  22. package/lib/ui/app/useSdkScroll.js +93 -0
  23. package/lib/ui/gamification/leaderboard/index.d.ts +1 -1
  24. package/lib/ui/gamification/leaderboard/index.js +24 -20
  25. package/lib/ui/gamification/leaderboard/static.d.ts +14 -0
  26. package/lib/ui/gamification/leaderboard/static.js +36 -0
  27. package/lib/ui/gamification/leaderboard/styles.js +3 -2
  28. package/lib/ui/gamification/question/notification/pill/index.d.ts +2 -0
  29. package/lib/ui/gamification/question/notification/pill/index.js +7 -7
  30. package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +1 -1
  31. package/lib/ui/gamification/vote/index.js +22 -22
  32. package/lib/ui/gamification/vote/vote-option/index.js +18 -18
  33. package/lib/ui/gamification/vote/vote-option/styles.js +2 -2
  34. package/lib/ui/gamification/vote/win-bar/index.js +19 -19
  35. package/lib/ui/gamification/vote/win-bar/styles.js +6 -6
  36. package/lib/ui/navigation/masters.js +1 -1
  37. package/lib/ui/show-in/index.js +2 -2
  38. package/lib/ui/theme/theme.js +19 -18
  39. package/package.json +8 -6
  40. /package/lib/{masters_k70xsy-4ed993c7.js → masters_1wv7w2k-4ed993c7.js} +0 -0
@@ -0,0 +1,1168 @@
1
+ var qr = {}, xr = {}, J = {};
2
+ J.byteLength = Vr;
3
+ J.toByteArray = Jr;
4
+ J.fromByteArray = Kr;
5
+ var L = [], R = [], Wr = typeof Uint8Array < "u" ? Uint8Array : Array, v = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
6
+ for (var j = 0, Hr = v.length; j < Hr; ++j)
7
+ L[j] = v[j], R[v.charCodeAt(j)] = j;
8
+ R["-".charCodeAt(0)] = 62;
9
+ R["_".charCodeAt(0)] = 63;
10
+ function Br(c) {
11
+ var f = c.length;
12
+ if (f % 4 > 0)
13
+ throw new Error("Invalid string. Length must be a multiple of 4");
14
+ var l = c.indexOf("=");
15
+ l === -1 && (l = f);
16
+ var w = l === f ? 0 : 4 - l % 4;
17
+ return [l, w];
18
+ }
19
+ function Vr(c) {
20
+ var f = Br(c), l = f[0], w = f[1];
21
+ return (l + w) * 3 / 4 - w;
22
+ }
23
+ function Xr(c, f, l) {
24
+ return (f + l) * 3 / 4 - l;
25
+ }
26
+ function Jr(c) {
27
+ var f, l = Br(c), w = l[0], y = l[1], a = new Wr(Xr(c, w, y)), p = 0, o = y > 0 ? w - 4 : w, B;
28
+ for (B = 0; B < o; B += 4)
29
+ f = R[c.charCodeAt(B)] << 18 | R[c.charCodeAt(B + 1)] << 12 | R[c.charCodeAt(B + 2)] << 6 | R[c.charCodeAt(B + 3)], a[p++] = f >> 16 & 255, a[p++] = f >> 8 & 255, a[p++] = f & 255;
30
+ return y === 2 && (f = R[c.charCodeAt(B)] << 2 | R[c.charCodeAt(B + 1)] >> 4, a[p++] = f & 255), y === 1 && (f = R[c.charCodeAt(B)] << 10 | R[c.charCodeAt(B + 1)] << 4 | R[c.charCodeAt(B + 2)] >> 2, a[p++] = f >> 8 & 255, a[p++] = f & 255), a;
31
+ }
32
+ function zr(c) {
33
+ return L[c >> 18 & 63] + L[c >> 12 & 63] + L[c >> 6 & 63] + L[c & 63];
34
+ }
35
+ function Qr(c, f, l) {
36
+ for (var w, y = [], a = f; a < l; a += 3)
37
+ w = (c[a] << 16 & 16711680) + (c[a + 1] << 8 & 65280) + (c[a + 2] & 255), y.push(zr(w));
38
+ return y.join("");
39
+ }
40
+ function Kr(c) {
41
+ for (var f, l = c.length, w = l % 3, y = [], a = 16383, p = 0, o = l - w; p < o; p += a)
42
+ y.push(Qr(c, p, p + a > o ? o : p + a));
43
+ return w === 1 ? (f = c[l - 1], y.push(
44
+ L[f >> 2] + L[f << 4 & 63] + "=="
45
+ )) : w === 2 && (f = (c[l - 2] << 8) + c[l - 1], y.push(
46
+ L[f >> 10] + L[f >> 4 & 63] + L[f << 2 & 63] + "="
47
+ )), y.join("");
48
+ }
49
+ var er = {};
50
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
51
+ er.read = function(c, f, l, w, y) {
52
+ var a, p, o = y * 8 - w - 1, B = (1 << o) - 1, C = B >> 1, F = -7, A = l ? y - 1 : 0, k = l ? -1 : 1, U = c[f + A];
53
+ for (A += k, a = U & (1 << -F) - 1, U >>= -F, F += o; F > 0; a = a * 256 + c[f + A], A += k, F -= 8)
54
+ ;
55
+ for (p = a & (1 << -F) - 1, a >>= -F, F += w; F > 0; p = p * 256 + c[f + A], A += k, F -= 8)
56
+ ;
57
+ if (a === 0)
58
+ a = 1 - C;
59
+ else {
60
+ if (a === B)
61
+ return p ? NaN : (U ? -1 : 1) * (1 / 0);
62
+ p = p + Math.pow(2, w), a = a - C;
63
+ }
64
+ return (U ? -1 : 1) * p * Math.pow(2, a - w);
65
+ };
66
+ er.write = function(c, f, l, w, y, a) {
67
+ var p, o, B, C = a * 8 - y - 1, F = (1 << C) - 1, A = F >> 1, k = y === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, U = w ? 0 : a - 1, q = w ? 1 : -1, W = f < 0 || f === 0 && 1 / f < 0 ? 1 : 0;
68
+ for (f = Math.abs(f), isNaN(f) || f === 1 / 0 ? (o = isNaN(f) ? 1 : 0, p = F) : (p = Math.floor(Math.log(f) / Math.LN2), f * (B = Math.pow(2, -p)) < 1 && (p--, B *= 2), p + A >= 1 ? f += k / B : f += k * Math.pow(2, 1 - A), f * B >= 2 && (p++, B /= 2), p + A >= F ? (o = 0, p = F) : p + A >= 1 ? (o = (f * B - 1) * Math.pow(2, y), p = p + A) : (o = f * Math.pow(2, A - 1) * Math.pow(2, y), p = 0)); y >= 8; c[l + U] = o & 255, U += q, o /= 256, y -= 8)
69
+ ;
70
+ for (p = p << y | o, C += y; C > 0; c[l + U] = p & 255, U += q, p /= 256, C -= 8)
71
+ ;
72
+ c[l + U - q] |= W * 128;
73
+ };
74
+ /*!
75
+ * The buffer module from node.js, for the browser.
76
+ *
77
+ * @author Feross Aboukhadijeh <https://feross.org>
78
+ * @license MIT
79
+ */
80
+ (function(c) {
81
+ const f = J, l = er, w = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
82
+ c.Buffer = o, c.SlowBuffer = Fr, c.INSPECT_MAX_BYTES = 50;
83
+ const y = 2147483647;
84
+ c.kMaxLength = y, o.TYPED_ARRAY_SUPPORT = a(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
85
+ "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
86
+ );
87
+ function a() {
88
+ try {
89
+ const e = new Uint8Array(1), r = { foo: function() {
90
+ return 42;
91
+ } };
92
+ return Object.setPrototypeOf(r, Uint8Array.prototype), Object.setPrototypeOf(e, r), e.foo() === 42;
93
+ } catch {
94
+ return !1;
95
+ }
96
+ }
97
+ Object.defineProperty(o.prototype, "parent", {
98
+ enumerable: !0,
99
+ get: function() {
100
+ if (o.isBuffer(this))
101
+ return this.buffer;
102
+ }
103
+ }), Object.defineProperty(o.prototype, "offset", {
104
+ enumerable: !0,
105
+ get: function() {
106
+ if (o.isBuffer(this))
107
+ return this.byteOffset;
108
+ }
109
+ });
110
+ function p(e) {
111
+ if (e > y)
112
+ throw new RangeError('The value "' + e + '" is invalid for option "size"');
113
+ const r = new Uint8Array(e);
114
+ return Object.setPrototypeOf(r, o.prototype), r;
115
+ }
116
+ function o(e, r, t) {
117
+ if (typeof e == "number") {
118
+ if (typeof r == "string")
119
+ throw new TypeError(
120
+ 'The "string" argument must be of type string. Received type number'
121
+ );
122
+ return A(e);
123
+ }
124
+ return B(e, r, t);
125
+ }
126
+ o.poolSize = 8192;
127
+ function B(e, r, t) {
128
+ if (typeof e == "string")
129
+ return k(e, r);
130
+ if (ArrayBuffer.isView(e))
131
+ return q(e);
132
+ if (e == null)
133
+ throw new TypeError(
134
+ "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e
135
+ );
136
+ if (S(e, ArrayBuffer) || e && S(e.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (S(e, SharedArrayBuffer) || e && S(e.buffer, SharedArrayBuffer)))
137
+ return W(e, r, t);
138
+ if (typeof e == "number")
139
+ throw new TypeError(
140
+ 'The "value" argument must not be of type number. Received type number'
141
+ );
142
+ const i = e.valueOf && e.valueOf();
143
+ if (i != null && i !== e)
144
+ return o.from(i, r, t);
145
+ const n = Ir(e);
146
+ if (n)
147
+ return n;
148
+ if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof e[Symbol.toPrimitive] == "function")
149
+ return o.from(e[Symbol.toPrimitive]("string"), r, t);
150
+ throw new TypeError(
151
+ "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e
152
+ );
153
+ }
154
+ o.from = function(e, r, t) {
155
+ return B(e, r, t);
156
+ }, Object.setPrototypeOf(o.prototype, Uint8Array.prototype), Object.setPrototypeOf(o, Uint8Array);
157
+ function C(e) {
158
+ if (typeof e != "number")
159
+ throw new TypeError('"size" argument must be of type number');
160
+ if (e < 0)
161
+ throw new RangeError('The value "' + e + '" is invalid for option "size"');
162
+ }
163
+ function F(e, r, t) {
164
+ return C(e), e <= 0 ? p(e) : r !== void 0 ? typeof t == "string" ? p(e).fill(r, t) : p(e).fill(r) : p(e);
165
+ }
166
+ o.alloc = function(e, r, t) {
167
+ return F(e, r, t);
168
+ };
169
+ function A(e) {
170
+ return C(e), p(e < 0 ? 0 : z(e) | 0);
171
+ }
172
+ o.allocUnsafe = function(e) {
173
+ return A(e);
174
+ }, o.allocUnsafeSlow = function(e) {
175
+ return A(e);
176
+ };
177
+ function k(e, r) {
178
+ if ((typeof r != "string" || r === "") && (r = "utf8"), !o.isEncoding(r))
179
+ throw new TypeError("Unknown encoding: " + r);
180
+ const t = ir(e, r) | 0;
181
+ let i = p(t);
182
+ const n = i.write(e, r);
183
+ return n !== t && (i = i.slice(0, n)), i;
184
+ }
185
+ function U(e) {
186
+ const r = e.length < 0 ? 0 : z(e.length) | 0, t = p(r);
187
+ for (let i = 0; i < r; i += 1)
188
+ t[i] = e[i] & 255;
189
+ return t;
190
+ }
191
+ function q(e) {
192
+ if (S(e, Uint8Array)) {
193
+ const r = new Uint8Array(e);
194
+ return W(r.buffer, r.byteOffset, r.byteLength);
195
+ }
196
+ return U(e);
197
+ }
198
+ function W(e, r, t) {
199
+ if (r < 0 || e.byteLength < r)
200
+ throw new RangeError('"offset" is outside of buffer bounds');
201
+ if (e.byteLength < r + (t || 0))
202
+ throw new RangeError('"length" is outside of buffer bounds');
203
+ let i;
204
+ return r === void 0 && t === void 0 ? i = new Uint8Array(e) : t === void 0 ? i = new Uint8Array(e, r) : i = new Uint8Array(e, r, t), Object.setPrototypeOf(i, o.prototype), i;
205
+ }
206
+ function Ir(e) {
207
+ if (o.isBuffer(e)) {
208
+ const r = z(e.length) | 0, t = p(r);
209
+ return t.length === 0 || e.copy(t, 0, 0, r), t;
210
+ }
211
+ if (e.length !== void 0)
212
+ return typeof e.length != "number" || Z(e.length) ? p(0) : U(e);
213
+ if (e.type === "Buffer" && Array.isArray(e.data))
214
+ return U(e.data);
215
+ }
216
+ function z(e) {
217
+ if (e >= y)
218
+ throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + y.toString(16) + " bytes");
219
+ return e | 0;
220
+ }
221
+ function Fr(e) {
222
+ return +e != e && (e = 0), o.alloc(+e);
223
+ }
224
+ o.isBuffer = function(r) {
225
+ return r != null && r._isBuffer === !0 && r !== o.prototype;
226
+ }, o.compare = function(r, t) {
227
+ if (S(r, Uint8Array) && (r = o.from(r, r.offset, r.byteLength)), S(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), !o.isBuffer(r) || !o.isBuffer(t))
228
+ throw new TypeError(
229
+ 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
230
+ );
231
+ if (r === t)
232
+ return 0;
233
+ let i = r.length, n = t.length;
234
+ for (let u = 0, h = Math.min(i, n); u < h; ++u)
235
+ if (r[u] !== t[u]) {
236
+ i = r[u], n = t[u];
237
+ break;
238
+ }
239
+ return i < n ? -1 : n < i ? 1 : 0;
240
+ }, o.isEncoding = function(r) {
241
+ switch (String(r).toLowerCase()) {
242
+ case "hex":
243
+ case "utf8":
244
+ case "utf-8":
245
+ case "ascii":
246
+ case "latin1":
247
+ case "binary":
248
+ case "base64":
249
+ case "ucs2":
250
+ case "ucs-2":
251
+ case "utf16le":
252
+ case "utf-16le":
253
+ return !0;
254
+ default:
255
+ return !1;
256
+ }
257
+ }, o.concat = function(r, t) {
258
+ if (!Array.isArray(r))
259
+ throw new TypeError('"list" argument must be an Array of Buffers');
260
+ if (r.length === 0)
261
+ return o.alloc(0);
262
+ let i;
263
+ if (t === void 0)
264
+ for (t = 0, i = 0; i < r.length; ++i)
265
+ t += r[i].length;
266
+ const n = o.allocUnsafe(t);
267
+ let u = 0;
268
+ for (i = 0; i < r.length; ++i) {
269
+ let h = r[i];
270
+ if (S(h, Uint8Array))
271
+ u + h.length > n.length ? (o.isBuffer(h) || (h = o.from(h)), h.copy(n, u)) : Uint8Array.prototype.set.call(
272
+ n,
273
+ h,
274
+ u
275
+ );
276
+ else if (o.isBuffer(h))
277
+ h.copy(n, u);
278
+ else
279
+ throw new TypeError('"list" argument must be an Array of Buffers');
280
+ u += h.length;
281
+ }
282
+ return n;
283
+ };
284
+ function ir(e, r) {
285
+ if (o.isBuffer(e))
286
+ return e.length;
287
+ if (ArrayBuffer.isView(e) || S(e, ArrayBuffer))
288
+ return e.byteLength;
289
+ if (typeof e != "string")
290
+ throw new TypeError(
291
+ 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e
292
+ );
293
+ const t = e.length, i = arguments.length > 2 && arguments[2] === !0;
294
+ if (!i && t === 0)
295
+ return 0;
296
+ let n = !1;
297
+ for (; ; )
298
+ switch (r) {
299
+ case "ascii":
300
+ case "latin1":
301
+ case "binary":
302
+ return t;
303
+ case "utf8":
304
+ case "utf-8":
305
+ return K(e).length;
306
+ case "ucs2":
307
+ case "ucs-2":
308
+ case "utf16le":
309
+ case "utf-16le":
310
+ return t * 2;
311
+ case "hex":
312
+ return t >>> 1;
313
+ case "base64":
314
+ return wr(e).length;
315
+ default:
316
+ if (n)
317
+ return i ? -1 : K(e).length;
318
+ r = ("" + r).toLowerCase(), n = !0;
319
+ }
320
+ }
321
+ o.byteLength = ir;
322
+ function Ar(e, r, t) {
323
+ let i = !1;
324
+ if ((r === void 0 || r < 0) && (r = 0), r > this.length || ((t === void 0 || t > this.length) && (t = this.length), t <= 0) || (t >>>= 0, r >>>= 0, t <= r))
325
+ return "";
326
+ for (e || (e = "utf8"); ; )
327
+ switch (e) {
328
+ case "hex":
329
+ return Nr(this, r, t);
330
+ case "utf8":
331
+ case "utf-8":
332
+ return ur(this, r, t);
333
+ case "ascii":
334
+ return Lr(this, r, t);
335
+ case "latin1":
336
+ case "binary":
337
+ return Mr(this, r, t);
338
+ case "base64":
339
+ return _r(this, r, t);
340
+ case "ucs2":
341
+ case "ucs-2":
342
+ case "utf16le":
343
+ case "utf-16le":
344
+ return kr(this, r, t);
345
+ default:
346
+ if (i)
347
+ throw new TypeError("Unknown encoding: " + e);
348
+ e = (e + "").toLowerCase(), i = !0;
349
+ }
350
+ }
351
+ o.prototype._isBuffer = !0;
352
+ function $(e, r, t) {
353
+ const i = e[r];
354
+ e[r] = e[t], e[t] = i;
355
+ }
356
+ o.prototype.swap16 = function() {
357
+ const r = this.length;
358
+ if (r % 2 !== 0)
359
+ throw new RangeError("Buffer size must be a multiple of 16-bits");
360
+ for (let t = 0; t < r; t += 2)
361
+ $(this, t, t + 1);
362
+ return this;
363
+ }, o.prototype.swap32 = function() {
364
+ const r = this.length;
365
+ if (r % 4 !== 0)
366
+ throw new RangeError("Buffer size must be a multiple of 32-bits");
367
+ for (let t = 0; t < r; t += 4)
368
+ $(this, t, t + 3), $(this, t + 1, t + 2);
369
+ return this;
370
+ }, o.prototype.swap64 = function() {
371
+ const r = this.length;
372
+ if (r % 8 !== 0)
373
+ throw new RangeError("Buffer size must be a multiple of 64-bits");
374
+ for (let t = 0; t < r; t += 8)
375
+ $(this, t, t + 7), $(this, t + 1, t + 6), $(this, t + 2, t + 5), $(this, t + 3, t + 4);
376
+ return this;
377
+ }, o.prototype.toString = function() {
378
+ const r = this.length;
379
+ return r === 0 ? "" : arguments.length === 0 ? ur(this, 0, r) : Ar.apply(this, arguments);
380
+ }, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(r) {
381
+ if (!o.isBuffer(r))
382
+ throw new TypeError("Argument must be a Buffer");
383
+ return this === r ? !0 : o.compare(this, r) === 0;
384
+ }, o.prototype.inspect = function() {
385
+ let r = "";
386
+ const t = c.INSPECT_MAX_BYTES;
387
+ return r = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (r += " ... "), "<Buffer " + r + ">";
388
+ }, w && (o.prototype[w] = o.prototype.inspect), o.prototype.compare = function(r, t, i, n, u) {
389
+ if (S(r, Uint8Array) && (r = o.from(r, r.offset, r.byteLength)), !o.isBuffer(r))
390
+ throw new TypeError(
391
+ 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof r
392
+ );
393
+ if (t === void 0 && (t = 0), i === void 0 && (i = r ? r.length : 0), n === void 0 && (n = 0), u === void 0 && (u = this.length), t < 0 || i > r.length || n < 0 || u > this.length)
394
+ throw new RangeError("out of range index");
395
+ if (n >= u && t >= i)
396
+ return 0;
397
+ if (n >= u)
398
+ return -1;
399
+ if (t >= i)
400
+ return 1;
401
+ if (t >>>= 0, i >>>= 0, n >>>= 0, u >>>= 0, this === r)
402
+ return 0;
403
+ let h = u - n, s = i - t;
404
+ const E = Math.min(h, s), d = this.slice(n, u), m = r.slice(t, i);
405
+ for (let x = 0; x < E; ++x)
406
+ if (d[x] !== m[x]) {
407
+ h = d[x], s = m[x];
408
+ break;
409
+ }
410
+ return h < s ? -1 : s < h ? 1 : 0;
411
+ };
412
+ function nr(e, r, t, i, n) {
413
+ if (e.length === 0)
414
+ return -1;
415
+ if (typeof t == "string" ? (i = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t, Z(t) && (t = n ? 0 : e.length - 1), t < 0 && (t = e.length + t), t >= e.length) {
416
+ if (n)
417
+ return -1;
418
+ t = e.length - 1;
419
+ } else if (t < 0)
420
+ if (n)
421
+ t = 0;
422
+ else
423
+ return -1;
424
+ if (typeof r == "string" && (r = o.from(r, i)), o.isBuffer(r))
425
+ return r.length === 0 ? -1 : or(e, r, t, i, n);
426
+ if (typeof r == "number")
427
+ return r = r & 255, typeof Uint8Array.prototype.indexOf == "function" ? n ? Uint8Array.prototype.indexOf.call(e, r, t) : Uint8Array.prototype.lastIndexOf.call(e, r, t) : or(e, [r], t, i, n);
428
+ throw new TypeError("val must be string, number or Buffer");
429
+ }
430
+ function or(e, r, t, i, n) {
431
+ let u = 1, h = e.length, s = r.length;
432
+ if (i !== void 0 && (i = String(i).toLowerCase(), i === "ucs2" || i === "ucs-2" || i === "utf16le" || i === "utf-16le")) {
433
+ if (e.length < 2 || r.length < 2)
434
+ return -1;
435
+ u = 2, h /= 2, s /= 2, t /= 2;
436
+ }
437
+ function E(m, x) {
438
+ return u === 1 ? m[x] : m.readUInt16BE(x * u);
439
+ }
440
+ let d;
441
+ if (n) {
442
+ let m = -1;
443
+ for (d = t; d < h; d++)
444
+ if (E(e, d) === E(r, m === -1 ? 0 : d - m)) {
445
+ if (m === -1 && (m = d), d - m + 1 === s)
446
+ return m * u;
447
+ } else
448
+ m !== -1 && (d -= d - m), m = -1;
449
+ } else
450
+ for (t + s > h && (t = h - s), d = t; d >= 0; d--) {
451
+ let m = !0;
452
+ for (let x = 0; x < s; x++)
453
+ if (E(e, d + x) !== E(r, x)) {
454
+ m = !1;
455
+ break;
456
+ }
457
+ if (m)
458
+ return d;
459
+ }
460
+ return -1;
461
+ }
462
+ o.prototype.includes = function(r, t, i) {
463
+ return this.indexOf(r, t, i) !== -1;
464
+ }, o.prototype.indexOf = function(r, t, i) {
465
+ return nr(this, r, t, i, !0);
466
+ }, o.prototype.lastIndexOf = function(r, t, i) {
467
+ return nr(this, r, t, i, !1);
468
+ };
469
+ function Ur(e, r, t, i) {
470
+ t = Number(t) || 0;
471
+ const n = e.length - t;
472
+ i ? (i = Number(i), i > n && (i = n)) : i = n;
473
+ const u = r.length;
474
+ i > u / 2 && (i = u / 2);
475
+ let h;
476
+ for (h = 0; h < i; ++h) {
477
+ const s = parseInt(r.substr(h * 2, 2), 16);
478
+ if (Z(s))
479
+ return h;
480
+ e[t + h] = s;
481
+ }
482
+ return h;
483
+ }
484
+ function Tr(e, r, t, i) {
485
+ return V(K(r, e.length - t), e, t, i);
486
+ }
487
+ function Rr(e, r, t, i) {
488
+ return V(Or(r), e, t, i);
489
+ }
490
+ function Cr(e, r, t, i) {
491
+ return V(wr(r), e, t, i);
492
+ }
493
+ function Sr(e, r, t, i) {
494
+ return V(Gr(r, e.length - t), e, t, i);
495
+ }
496
+ o.prototype.write = function(r, t, i, n) {
497
+ if (t === void 0)
498
+ n = "utf8", i = this.length, t = 0;
499
+ else if (i === void 0 && typeof t == "string")
500
+ n = t, i = this.length, t = 0;
501
+ else if (isFinite(t))
502
+ t = t >>> 0, isFinite(i) ? (i = i >>> 0, n === void 0 && (n = "utf8")) : (n = i, i = void 0);
503
+ else
504
+ throw new Error(
505
+ "Buffer.write(string, encoding, offset[, length]) is no longer supported"
506
+ );
507
+ const u = this.length - t;
508
+ if ((i === void 0 || i > u) && (i = u), r.length > 0 && (i < 0 || t < 0) || t > this.length)
509
+ throw new RangeError("Attempt to write outside buffer bounds");
510
+ n || (n = "utf8");
511
+ let h = !1;
512
+ for (; ; )
513
+ switch (n) {
514
+ case "hex":
515
+ return Ur(this, r, t, i);
516
+ case "utf8":
517
+ case "utf-8":
518
+ return Tr(this, r, t, i);
519
+ case "ascii":
520
+ case "latin1":
521
+ case "binary":
522
+ return Rr(this, r, t, i);
523
+ case "base64":
524
+ return Cr(this, r, t, i);
525
+ case "ucs2":
526
+ case "ucs-2":
527
+ case "utf16le":
528
+ case "utf-16le":
529
+ return Sr(this, r, t, i);
530
+ default:
531
+ if (h)
532
+ throw new TypeError("Unknown encoding: " + n);
533
+ n = ("" + n).toLowerCase(), h = !0;
534
+ }
535
+ }, o.prototype.toJSON = function() {
536
+ return {
537
+ type: "Buffer",
538
+ data: Array.prototype.slice.call(this._arr || this, 0)
539
+ };
540
+ };
541
+ function _r(e, r, t) {
542
+ return r === 0 && t === e.length ? f.fromByteArray(e) : f.fromByteArray(e.slice(r, t));
543
+ }
544
+ function ur(e, r, t) {
545
+ t = Math.min(e.length, t);
546
+ const i = [];
547
+ let n = r;
548
+ for (; n < t; ) {
549
+ const u = e[n];
550
+ let h = null, s = u > 239 ? 4 : u > 223 ? 3 : u > 191 ? 2 : 1;
551
+ if (n + s <= t) {
552
+ let E, d, m, x;
553
+ switch (s) {
554
+ case 1:
555
+ u < 128 && (h = u);
556
+ break;
557
+ case 2:
558
+ E = e[n + 1], (E & 192) === 128 && (x = (u & 31) << 6 | E & 63, x > 127 && (h = x));
559
+ break;
560
+ case 3:
561
+ E = e[n + 1], d = e[n + 2], (E & 192) === 128 && (d & 192) === 128 && (x = (u & 15) << 12 | (E & 63) << 6 | d & 63, x > 2047 && (x < 55296 || x > 57343) && (h = x));
562
+ break;
563
+ case 4:
564
+ E = e[n + 1], d = e[n + 2], m = e[n + 3], (E & 192) === 128 && (d & 192) === 128 && (m & 192) === 128 && (x = (u & 15) << 18 | (E & 63) << 12 | (d & 63) << 6 | m & 63, x > 65535 && x < 1114112 && (h = x));
565
+ }
566
+ }
567
+ h === null ? (h = 65533, s = 1) : h > 65535 && (h -= 65536, i.push(h >>> 10 & 1023 | 55296), h = 56320 | h & 1023), i.push(h), n += s;
568
+ }
569
+ return br(i);
570
+ }
571
+ const hr = 4096;
572
+ function br(e) {
573
+ const r = e.length;
574
+ if (r <= hr)
575
+ return String.fromCharCode.apply(String, e);
576
+ let t = "", i = 0;
577
+ for (; i < r; )
578
+ t += String.fromCharCode.apply(
579
+ String,
580
+ e.slice(i, i += hr)
581
+ );
582
+ return t;
583
+ }
584
+ function Lr(e, r, t) {
585
+ let i = "";
586
+ t = Math.min(e.length, t);
587
+ for (let n = r; n < t; ++n)
588
+ i += String.fromCharCode(e[n] & 127);
589
+ return i;
590
+ }
591
+ function Mr(e, r, t) {
592
+ let i = "";
593
+ t = Math.min(e.length, t);
594
+ for (let n = r; n < t; ++n)
595
+ i += String.fromCharCode(e[n]);
596
+ return i;
597
+ }
598
+ function Nr(e, r, t) {
599
+ const i = e.length;
600
+ (!r || r < 0) && (r = 0), (!t || t < 0 || t > i) && (t = i);
601
+ let n = "";
602
+ for (let u = r; u < t; ++u)
603
+ n += jr[e[u]];
604
+ return n;
605
+ }
606
+ function kr(e, r, t) {
607
+ const i = e.slice(r, t);
608
+ let n = "";
609
+ for (let u = 0; u < i.length - 1; u += 2)
610
+ n += String.fromCharCode(i[u] + i[u + 1] * 256);
611
+ return n;
612
+ }
613
+ o.prototype.slice = function(r, t) {
614
+ const i = this.length;
615
+ r = ~~r, t = t === void 0 ? i : ~~t, r < 0 ? (r += i, r < 0 && (r = 0)) : r > i && (r = i), t < 0 ? (t += i, t < 0 && (t = 0)) : t > i && (t = i), t < r && (t = r);
616
+ const n = this.subarray(r, t);
617
+ return Object.setPrototypeOf(n, o.prototype), n;
618
+ };
619
+ function I(e, r, t) {
620
+ if (e % 1 !== 0 || e < 0)
621
+ throw new RangeError("offset is not uint");
622
+ if (e + r > t)
623
+ throw new RangeError("Trying to access beyond buffer length");
624
+ }
625
+ o.prototype.readUintLE = o.prototype.readUIntLE = function(r, t, i) {
626
+ r = r >>> 0, t = t >>> 0, i || I(r, t, this.length);
627
+ let n = this[r], u = 1, h = 0;
628
+ for (; ++h < t && (u *= 256); )
629
+ n += this[r + h] * u;
630
+ return n;
631
+ }, o.prototype.readUintBE = o.prototype.readUIntBE = function(r, t, i) {
632
+ r = r >>> 0, t = t >>> 0, i || I(r, t, this.length);
633
+ let n = this[r + --t], u = 1;
634
+ for (; t > 0 && (u *= 256); )
635
+ n += this[r + --t] * u;
636
+ return n;
637
+ }, o.prototype.readUint8 = o.prototype.readUInt8 = function(r, t) {
638
+ return r = r >>> 0, t || I(r, 1, this.length), this[r];
639
+ }, o.prototype.readUint16LE = o.prototype.readUInt16LE = function(r, t) {
640
+ return r = r >>> 0, t || I(r, 2, this.length), this[r] | this[r + 1] << 8;
641
+ }, o.prototype.readUint16BE = o.prototype.readUInt16BE = function(r, t) {
642
+ return r = r >>> 0, t || I(r, 2, this.length), this[r] << 8 | this[r + 1];
643
+ }, o.prototype.readUint32LE = o.prototype.readUInt32LE = function(r, t) {
644
+ return r = r >>> 0, t || I(r, 4, this.length), (this[r] | this[r + 1] << 8 | this[r + 2] << 16) + this[r + 3] * 16777216;
645
+ }, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(r, t) {
646
+ return r = r >>> 0, t || I(r, 4, this.length), this[r] * 16777216 + (this[r + 1] << 16 | this[r + 2] << 8 | this[r + 3]);
647
+ }, o.prototype.readBigUInt64LE = D(function(r) {
648
+ r = r >>> 0, G(r, "offset");
649
+ const t = this[r], i = this[r + 7];
650
+ (t === void 0 || i === void 0) && H(r, this.length - 8);
651
+ const n = t + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + this[++r] * 2 ** 24, u = this[++r] + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + i * 2 ** 24;
652
+ return BigInt(n) + (BigInt(u) << BigInt(32));
653
+ }), o.prototype.readBigUInt64BE = D(function(r) {
654
+ r = r >>> 0, G(r, "offset");
655
+ const t = this[r], i = this[r + 7];
656
+ (t === void 0 || i === void 0) && H(r, this.length - 8);
657
+ const n = t * 2 ** 24 + this[++r] * 2 ** 16 + this[++r] * 2 ** 8 + this[++r], u = this[++r] * 2 ** 24 + this[++r] * 2 ** 16 + this[++r] * 2 ** 8 + i;
658
+ return (BigInt(n) << BigInt(32)) + BigInt(u);
659
+ }), o.prototype.readIntLE = function(r, t, i) {
660
+ r = r >>> 0, t = t >>> 0, i || I(r, t, this.length);
661
+ let n = this[r], u = 1, h = 0;
662
+ for (; ++h < t && (u *= 256); )
663
+ n += this[r + h] * u;
664
+ return u *= 128, n >= u && (n -= Math.pow(2, 8 * t)), n;
665
+ }, o.prototype.readIntBE = function(r, t, i) {
666
+ r = r >>> 0, t = t >>> 0, i || I(r, t, this.length);
667
+ let n = t, u = 1, h = this[r + --n];
668
+ for (; n > 0 && (u *= 256); )
669
+ h += this[r + --n] * u;
670
+ return u *= 128, h >= u && (h -= Math.pow(2, 8 * t)), h;
671
+ }, o.prototype.readInt8 = function(r, t) {
672
+ return r = r >>> 0, t || I(r, 1, this.length), this[r] & 128 ? (255 - this[r] + 1) * -1 : this[r];
673
+ }, o.prototype.readInt16LE = function(r, t) {
674
+ r = r >>> 0, t || I(r, 2, this.length);
675
+ const i = this[r] | this[r + 1] << 8;
676
+ return i & 32768 ? i | 4294901760 : i;
677
+ }, o.prototype.readInt16BE = function(r, t) {
678
+ r = r >>> 0, t || I(r, 2, this.length);
679
+ const i = this[r + 1] | this[r] << 8;
680
+ return i & 32768 ? i | 4294901760 : i;
681
+ }, o.prototype.readInt32LE = function(r, t) {
682
+ return r = r >>> 0, t || I(r, 4, this.length), this[r] | this[r + 1] << 8 | this[r + 2] << 16 | this[r + 3] << 24;
683
+ }, o.prototype.readInt32BE = function(r, t) {
684
+ return r = r >>> 0, t || I(r, 4, this.length), this[r] << 24 | this[r + 1] << 16 | this[r + 2] << 8 | this[r + 3];
685
+ }, o.prototype.readBigInt64LE = D(function(r) {
686
+ r = r >>> 0, G(r, "offset");
687
+ const t = this[r], i = this[r + 7];
688
+ (t === void 0 || i === void 0) && H(r, this.length - 8);
689
+ const n = this[r + 4] + this[r + 5] * 2 ** 8 + this[r + 6] * 2 ** 16 + (i << 24);
690
+ return (BigInt(n) << BigInt(32)) + BigInt(t + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + this[++r] * 2 ** 24);
691
+ }), o.prototype.readBigInt64BE = D(function(r) {
692
+ r = r >>> 0, G(r, "offset");
693
+ const t = this[r], i = this[r + 7];
694
+ (t === void 0 || i === void 0) && H(r, this.length - 8);
695
+ const n = (t << 24) + // Overflow
696
+ this[++r] * 2 ** 16 + this[++r] * 2 ** 8 + this[++r];
697
+ return (BigInt(n) << BigInt(32)) + BigInt(this[++r] * 2 ** 24 + this[++r] * 2 ** 16 + this[++r] * 2 ** 8 + i);
698
+ }), o.prototype.readFloatLE = function(r, t) {
699
+ return r = r >>> 0, t || I(r, 4, this.length), l.read(this, r, !0, 23, 4);
700
+ }, o.prototype.readFloatBE = function(r, t) {
701
+ return r = r >>> 0, t || I(r, 4, this.length), l.read(this, r, !1, 23, 4);
702
+ }, o.prototype.readDoubleLE = function(r, t) {
703
+ return r = r >>> 0, t || I(r, 8, this.length), l.read(this, r, !0, 52, 8);
704
+ }, o.prototype.readDoubleBE = function(r, t) {
705
+ return r = r >>> 0, t || I(r, 8, this.length), l.read(this, r, !1, 52, 8);
706
+ };
707
+ function T(e, r, t, i, n, u) {
708
+ if (!o.isBuffer(e))
709
+ throw new TypeError('"buffer" argument must be a Buffer instance');
710
+ if (r > n || r < u)
711
+ throw new RangeError('"value" argument is out of bounds');
712
+ if (t + i > e.length)
713
+ throw new RangeError("Index out of range");
714
+ }
715
+ o.prototype.writeUintLE = o.prototype.writeUIntLE = function(r, t, i, n) {
716
+ if (r = +r, t = t >>> 0, i = i >>> 0, !n) {
717
+ const s = Math.pow(2, 8 * i) - 1;
718
+ T(this, r, t, i, s, 0);
719
+ }
720
+ let u = 1, h = 0;
721
+ for (this[t] = r & 255; ++h < i && (u *= 256); )
722
+ this[t + h] = r / u & 255;
723
+ return t + i;
724
+ }, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(r, t, i, n) {
725
+ if (r = +r, t = t >>> 0, i = i >>> 0, !n) {
726
+ const s = Math.pow(2, 8 * i) - 1;
727
+ T(this, r, t, i, s, 0);
728
+ }
729
+ let u = i - 1, h = 1;
730
+ for (this[t + u] = r & 255; --u >= 0 && (h *= 256); )
731
+ this[t + u] = r / h & 255;
732
+ return t + i;
733
+ }, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(r, t, i) {
734
+ return r = +r, t = t >>> 0, i || T(this, r, t, 1, 255, 0), this[t] = r & 255, t + 1;
735
+ }, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(r, t, i) {
736
+ return r = +r, t = t >>> 0, i || T(this, r, t, 2, 65535, 0), this[t] = r & 255, this[t + 1] = r >>> 8, t + 2;
737
+ }, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(r, t, i) {
738
+ return r = +r, t = t >>> 0, i || T(this, r, t, 2, 65535, 0), this[t] = r >>> 8, this[t + 1] = r & 255, t + 2;
739
+ }, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(r, t, i) {
740
+ return r = +r, t = t >>> 0, i || T(this, r, t, 4, 4294967295, 0), this[t + 3] = r >>> 24, this[t + 2] = r >>> 16, this[t + 1] = r >>> 8, this[t] = r & 255, t + 4;
741
+ }, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(r, t, i) {
742
+ return r = +r, t = t >>> 0, i || T(this, r, t, 4, 4294967295, 0), this[t] = r >>> 24, this[t + 1] = r >>> 16, this[t + 2] = r >>> 8, this[t + 3] = r & 255, t + 4;
743
+ };
744
+ function cr(e, r, t, i, n) {
745
+ yr(r, i, n, e, t, 7);
746
+ let u = Number(r & BigInt(4294967295));
747
+ e[t++] = u, u = u >> 8, e[t++] = u, u = u >> 8, e[t++] = u, u = u >> 8, e[t++] = u;
748
+ let h = Number(r >> BigInt(32) & BigInt(4294967295));
749
+ return e[t++] = h, h = h >> 8, e[t++] = h, h = h >> 8, e[t++] = h, h = h >> 8, e[t++] = h, t;
750
+ }
751
+ function fr(e, r, t, i, n) {
752
+ yr(r, i, n, e, t, 7);
753
+ let u = Number(r & BigInt(4294967295));
754
+ e[t + 7] = u, u = u >> 8, e[t + 6] = u, u = u >> 8, e[t + 5] = u, u = u >> 8, e[t + 4] = u;
755
+ let h = Number(r >> BigInt(32) & BigInt(4294967295));
756
+ return e[t + 3] = h, h = h >> 8, e[t + 2] = h, h = h >> 8, e[t + 1] = h, h = h >> 8, e[t] = h, t + 8;
757
+ }
758
+ o.prototype.writeBigUInt64LE = D(function(r, t = 0) {
759
+ return cr(this, r, t, BigInt(0), BigInt("0xffffffffffffffff"));
760
+ }), o.prototype.writeBigUInt64BE = D(function(r, t = 0) {
761
+ return fr(this, r, t, BigInt(0), BigInt("0xffffffffffffffff"));
762
+ }), o.prototype.writeIntLE = function(r, t, i, n) {
763
+ if (r = +r, t = t >>> 0, !n) {
764
+ const E = Math.pow(2, 8 * i - 1);
765
+ T(this, r, t, i, E - 1, -E);
766
+ }
767
+ let u = 0, h = 1, s = 0;
768
+ for (this[t] = r & 255; ++u < i && (h *= 256); )
769
+ r < 0 && s === 0 && this[t + u - 1] !== 0 && (s = 1), this[t + u] = (r / h >> 0) - s & 255;
770
+ return t + i;
771
+ }, o.prototype.writeIntBE = function(r, t, i, n) {
772
+ if (r = +r, t = t >>> 0, !n) {
773
+ const E = Math.pow(2, 8 * i - 1);
774
+ T(this, r, t, i, E - 1, -E);
775
+ }
776
+ let u = i - 1, h = 1, s = 0;
777
+ for (this[t + u] = r & 255; --u >= 0 && (h *= 256); )
778
+ r < 0 && s === 0 && this[t + u + 1] !== 0 && (s = 1), this[t + u] = (r / h >> 0) - s & 255;
779
+ return t + i;
780
+ }, o.prototype.writeInt8 = function(r, t, i) {
781
+ return r = +r, t = t >>> 0, i || T(this, r, t, 1, 127, -128), r < 0 && (r = 255 + r + 1), this[t] = r & 255, t + 1;
782
+ }, o.prototype.writeInt16LE = function(r, t, i) {
783
+ return r = +r, t = t >>> 0, i || T(this, r, t, 2, 32767, -32768), this[t] = r & 255, this[t + 1] = r >>> 8, t + 2;
784
+ }, o.prototype.writeInt16BE = function(r, t, i) {
785
+ return r = +r, t = t >>> 0, i || T(this, r, t, 2, 32767, -32768), this[t] = r >>> 8, this[t + 1] = r & 255, t + 2;
786
+ }, o.prototype.writeInt32LE = function(r, t, i) {
787
+ return r = +r, t = t >>> 0, i || T(this, r, t, 4, 2147483647, -2147483648), this[t] = r & 255, this[t + 1] = r >>> 8, this[t + 2] = r >>> 16, this[t + 3] = r >>> 24, t + 4;
788
+ }, o.prototype.writeInt32BE = function(r, t, i) {
789
+ return r = +r, t = t >>> 0, i || T(this, r, t, 4, 2147483647, -2147483648), r < 0 && (r = 4294967295 + r + 1), this[t] = r >>> 24, this[t + 1] = r >>> 16, this[t + 2] = r >>> 8, this[t + 3] = r & 255, t + 4;
790
+ }, o.prototype.writeBigInt64LE = D(function(r, t = 0) {
791
+ return cr(this, r, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
792
+ }), o.prototype.writeBigInt64BE = D(function(r, t = 0) {
793
+ return fr(this, r, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
794
+ });
795
+ function pr(e, r, t, i, n, u) {
796
+ if (t + i > e.length)
797
+ throw new RangeError("Index out of range");
798
+ if (t < 0)
799
+ throw new RangeError("Index out of range");
800
+ }
801
+ function lr(e, r, t, i, n) {
802
+ return r = +r, t = t >>> 0, n || pr(e, r, t, 4), l.write(e, r, t, i, 23, 4), t + 4;
803
+ }
804
+ o.prototype.writeFloatLE = function(r, t, i) {
805
+ return lr(this, r, t, !0, i);
806
+ }, o.prototype.writeFloatBE = function(r, t, i) {
807
+ return lr(this, r, t, !1, i);
808
+ };
809
+ function sr(e, r, t, i, n) {
810
+ return r = +r, t = t >>> 0, n || pr(e, r, t, 8), l.write(e, r, t, i, 52, 8), t + 8;
811
+ }
812
+ o.prototype.writeDoubleLE = function(r, t, i) {
813
+ return sr(this, r, t, !0, i);
814
+ }, o.prototype.writeDoubleBE = function(r, t, i) {
815
+ return sr(this, r, t, !1, i);
816
+ }, o.prototype.copy = function(r, t, i, n) {
817
+ if (!o.isBuffer(r))
818
+ throw new TypeError("argument should be a Buffer");
819
+ if (i || (i = 0), !n && n !== 0 && (n = this.length), t >= r.length && (t = r.length), t || (t = 0), n > 0 && n < i && (n = i), n === i || r.length === 0 || this.length === 0)
820
+ return 0;
821
+ if (t < 0)
822
+ throw new RangeError("targetStart out of bounds");
823
+ if (i < 0 || i >= this.length)
824
+ throw new RangeError("Index out of range");
825
+ if (n < 0)
826
+ throw new RangeError("sourceEnd out of bounds");
827
+ n > this.length && (n = this.length), r.length - t < n - i && (n = r.length - t + i);
828
+ const u = n - i;
829
+ return this === r && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(t, i, n) : Uint8Array.prototype.set.call(
830
+ r,
831
+ this.subarray(i, n),
832
+ t
833
+ ), u;
834
+ }, o.prototype.fill = function(r, t, i, n) {
835
+ if (typeof r == "string") {
836
+ if (typeof t == "string" ? (n = t, t = 0, i = this.length) : typeof i == "string" && (n = i, i = this.length), n !== void 0 && typeof n != "string")
837
+ throw new TypeError("encoding must be a string");
838
+ if (typeof n == "string" && !o.isEncoding(n))
839
+ throw new TypeError("Unknown encoding: " + n);
840
+ if (r.length === 1) {
841
+ const h = r.charCodeAt(0);
842
+ (n === "utf8" && h < 128 || n === "latin1") && (r = h);
843
+ }
844
+ } else
845
+ typeof r == "number" ? r = r & 255 : typeof r == "boolean" && (r = Number(r));
846
+ if (t < 0 || this.length < t || this.length < i)
847
+ throw new RangeError("Out of range index");
848
+ if (i <= t)
849
+ return this;
850
+ t = t >>> 0, i = i === void 0 ? this.length : i >>> 0, r || (r = 0);
851
+ let u;
852
+ if (typeof r == "number")
853
+ for (u = t; u < i; ++u)
854
+ this[u] = r;
855
+ else {
856
+ const h = o.isBuffer(r) ? r : o.from(r, n), s = h.length;
857
+ if (s === 0)
858
+ throw new TypeError('The value "' + r + '" is invalid for argument "value"');
859
+ for (u = 0; u < i - t; ++u)
860
+ this[u + t] = h[u % s];
861
+ }
862
+ return this;
863
+ };
864
+ const O = {};
865
+ function Q(e, r, t) {
866
+ O[e] = class extends t {
867
+ constructor() {
868
+ super(), Object.defineProperty(this, "message", {
869
+ value: r.apply(this, arguments),
870
+ writable: !0,
871
+ configurable: !0
872
+ }), this.name = `${this.name} [${e}]`, this.stack, delete this.name;
873
+ }
874
+ get code() {
875
+ return e;
876
+ }
877
+ set code(n) {
878
+ Object.defineProperty(this, "code", {
879
+ configurable: !0,
880
+ enumerable: !0,
881
+ value: n,
882
+ writable: !0
883
+ });
884
+ }
885
+ toString() {
886
+ return `${this.name} [${e}]: ${this.message}`;
887
+ }
888
+ };
889
+ }
890
+ Q(
891
+ "ERR_BUFFER_OUT_OF_BOUNDS",
892
+ function(e) {
893
+ return e ? `${e} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
894
+ },
895
+ RangeError
896
+ ), Q(
897
+ "ERR_INVALID_ARG_TYPE",
898
+ function(e, r) {
899
+ return `The "${e}" argument must be of type number. Received type ${typeof r}`;
900
+ },
901
+ TypeError
902
+ ), Q(
903
+ "ERR_OUT_OF_RANGE",
904
+ function(e, r, t) {
905
+ let i = `The value of "${e}" is out of range.`, n = t;
906
+ return Number.isInteger(t) && Math.abs(t) > 2 ** 32 ? n = ar(String(t)) : typeof t == "bigint" && (n = String(t), (t > BigInt(2) ** BigInt(32) || t < -(BigInt(2) ** BigInt(32))) && (n = ar(n)), n += "n"), i += ` It must be ${r}. Received ${n}`, i;
907
+ },
908
+ RangeError
909
+ );
910
+ function ar(e) {
911
+ let r = "", t = e.length;
912
+ const i = e[0] === "-" ? 1 : 0;
913
+ for (; t >= i + 4; t -= 3)
914
+ r = `_${e.slice(t - 3, t)}${r}`;
915
+ return `${e.slice(0, t)}${r}`;
916
+ }
917
+ function Dr(e, r, t) {
918
+ G(r, "offset"), (e[r] === void 0 || e[r + t] === void 0) && H(r, e.length - (t + 1));
919
+ }
920
+ function yr(e, r, t, i, n, u) {
921
+ if (e > t || e < r) {
922
+ const h = typeof r == "bigint" ? "n" : "";
923
+ let s;
924
+ throw u > 3 ? r === 0 || r === BigInt(0) ? s = `>= 0${h} and < 2${h} ** ${(u + 1) * 8}${h}` : s = `>= -(2${h} ** ${(u + 1) * 8 - 1}${h}) and < 2 ** ${(u + 1) * 8 - 1}${h}` : s = `>= ${r}${h} and <= ${t}${h}`, new O.ERR_OUT_OF_RANGE("value", s, e);
925
+ }
926
+ Dr(i, n, u);
927
+ }
928
+ function G(e, r) {
929
+ if (typeof e != "number")
930
+ throw new O.ERR_INVALID_ARG_TYPE(r, "number", e);
931
+ }
932
+ function H(e, r, t) {
933
+ throw Math.floor(e) !== e ? (G(e, t), new O.ERR_OUT_OF_RANGE(t || "offset", "an integer", e)) : r < 0 ? new O.ERR_BUFFER_OUT_OF_BOUNDS() : new O.ERR_OUT_OF_RANGE(
934
+ t || "offset",
935
+ `>= ${t ? 1 : 0} and <= ${r}`,
936
+ e
937
+ );
938
+ }
939
+ const $r = /[^+/0-9A-Za-z-_]/g;
940
+ function Pr(e) {
941
+ if (e = e.split("=")[0], e = e.trim().replace($r, ""), e.length < 2)
942
+ return "";
943
+ for (; e.length % 4 !== 0; )
944
+ e = e + "=";
945
+ return e;
946
+ }
947
+ function K(e, r) {
948
+ r = r || 1 / 0;
949
+ let t;
950
+ const i = e.length;
951
+ let n = null;
952
+ const u = [];
953
+ for (let h = 0; h < i; ++h) {
954
+ if (t = e.charCodeAt(h), t > 55295 && t < 57344) {
955
+ if (!n) {
956
+ if (t > 56319) {
957
+ (r -= 3) > -1 && u.push(239, 191, 189);
958
+ continue;
959
+ } else if (h + 1 === i) {
960
+ (r -= 3) > -1 && u.push(239, 191, 189);
961
+ continue;
962
+ }
963
+ n = t;
964
+ continue;
965
+ }
966
+ if (t < 56320) {
967
+ (r -= 3) > -1 && u.push(239, 191, 189), n = t;
968
+ continue;
969
+ }
970
+ t = (n - 55296 << 10 | t - 56320) + 65536;
971
+ } else
972
+ n && (r -= 3) > -1 && u.push(239, 191, 189);
973
+ if (n = null, t < 128) {
974
+ if ((r -= 1) < 0)
975
+ break;
976
+ u.push(t);
977
+ } else if (t < 2048) {
978
+ if ((r -= 2) < 0)
979
+ break;
980
+ u.push(
981
+ t >> 6 | 192,
982
+ t & 63 | 128
983
+ );
984
+ } else if (t < 65536) {
985
+ if ((r -= 3) < 0)
986
+ break;
987
+ u.push(
988
+ t >> 12 | 224,
989
+ t >> 6 & 63 | 128,
990
+ t & 63 | 128
991
+ );
992
+ } else if (t < 1114112) {
993
+ if ((r -= 4) < 0)
994
+ break;
995
+ u.push(
996
+ t >> 18 | 240,
997
+ t >> 12 & 63 | 128,
998
+ t >> 6 & 63 | 128,
999
+ t & 63 | 128
1000
+ );
1001
+ } else
1002
+ throw new Error("Invalid code point");
1003
+ }
1004
+ return u;
1005
+ }
1006
+ function Or(e) {
1007
+ const r = [];
1008
+ for (let t = 0; t < e.length; ++t)
1009
+ r.push(e.charCodeAt(t) & 255);
1010
+ return r;
1011
+ }
1012
+ function Gr(e, r) {
1013
+ let t, i, n;
1014
+ const u = [];
1015
+ for (let h = 0; h < e.length && !((r -= 2) < 0); ++h)
1016
+ t = e.charCodeAt(h), i = t >> 8, n = t % 256, u.push(n), u.push(i);
1017
+ return u;
1018
+ }
1019
+ function wr(e) {
1020
+ return f.toByteArray(Pr(e));
1021
+ }
1022
+ function V(e, r, t, i) {
1023
+ let n;
1024
+ for (n = 0; n < i && !(n + t >= r.length || n >= e.length); ++n)
1025
+ r[n + t] = e[n];
1026
+ return n;
1027
+ }
1028
+ function S(e, r) {
1029
+ return e instanceof r || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === r.name;
1030
+ }
1031
+ function Z(e) {
1032
+ return e !== e;
1033
+ }
1034
+ const jr = function() {
1035
+ const e = "0123456789abcdef", r = new Array(256);
1036
+ for (let t = 0; t < 16; ++t) {
1037
+ const i = t * 16;
1038
+ for (let n = 0; n < 16; ++n)
1039
+ r[i + n] = e[t] + e[n];
1040
+ }
1041
+ return r;
1042
+ }();
1043
+ function D(e) {
1044
+ return typeof BigInt > "u" ? Yr : e;
1045
+ }
1046
+ function Yr() {
1047
+ throw new Error("BigInt not supported");
1048
+ }
1049
+ })(xr);
1050
+ var dr = { exports: {} }, g = dr.exports = {}, _, b;
1051
+ function rr() {
1052
+ throw new Error("setTimeout has not been defined");
1053
+ }
1054
+ function tr() {
1055
+ throw new Error("clearTimeout has not been defined");
1056
+ }
1057
+ (function() {
1058
+ try {
1059
+ typeof setTimeout == "function" ? _ = setTimeout : _ = rr;
1060
+ } catch {
1061
+ _ = rr;
1062
+ }
1063
+ try {
1064
+ typeof clearTimeout == "function" ? b = clearTimeout : b = tr;
1065
+ } catch {
1066
+ b = tr;
1067
+ }
1068
+ })();
1069
+ function Er(c) {
1070
+ if (_ === setTimeout)
1071
+ return setTimeout(c, 0);
1072
+ if ((_ === rr || !_) && setTimeout)
1073
+ return _ = setTimeout, setTimeout(c, 0);
1074
+ try {
1075
+ return _(c, 0);
1076
+ } catch {
1077
+ try {
1078
+ return _.call(null, c, 0);
1079
+ } catch {
1080
+ return _.call(this, c, 0);
1081
+ }
1082
+ }
1083
+ }
1084
+ function Zr(c) {
1085
+ if (b === clearTimeout)
1086
+ return clearTimeout(c);
1087
+ if ((b === tr || !b) && clearTimeout)
1088
+ return b = clearTimeout, clearTimeout(c);
1089
+ try {
1090
+ return b(c);
1091
+ } catch {
1092
+ try {
1093
+ return b.call(null, c);
1094
+ } catch {
1095
+ return b.call(this, c);
1096
+ }
1097
+ }
1098
+ }
1099
+ var M = [], Y = !1, P, X = -1;
1100
+ function vr() {
1101
+ !Y || !P || (Y = !1, P.length ? M = P.concat(M) : X = -1, M.length && mr());
1102
+ }
1103
+ function mr() {
1104
+ if (!Y) {
1105
+ var c = Er(vr);
1106
+ Y = !0;
1107
+ for (var f = M.length; f; ) {
1108
+ for (P = M, M = []; ++X < f; )
1109
+ P && P[X].run();
1110
+ X = -1, f = M.length;
1111
+ }
1112
+ P = null, Y = !1, Zr(c);
1113
+ }
1114
+ }
1115
+ g.nextTick = function(c) {
1116
+ var f = new Array(arguments.length - 1);
1117
+ if (arguments.length > 1)
1118
+ for (var l = 1; l < arguments.length; l++)
1119
+ f[l - 1] = arguments[l];
1120
+ M.push(new gr(c, f)), M.length === 1 && !Y && Er(mr);
1121
+ };
1122
+ function gr(c, f) {
1123
+ this.fun = c, this.array = f;
1124
+ }
1125
+ gr.prototype.run = function() {
1126
+ this.fun.apply(null, this.array);
1127
+ };
1128
+ g.title = "browser";
1129
+ g.browser = !0;
1130
+ g.env = {};
1131
+ g.argv = [];
1132
+ g.version = "";
1133
+ g.versions = {};
1134
+ function N() {
1135
+ }
1136
+ g.on = N;
1137
+ g.addListener = N;
1138
+ g.once = N;
1139
+ g.off = N;
1140
+ g.removeListener = N;
1141
+ g.removeAllListeners = N;
1142
+ g.emit = N;
1143
+ g.prependListener = N;
1144
+ g.prependOnceListener = N;
1145
+ g.listeners = function(c) {
1146
+ return [];
1147
+ };
1148
+ g.binding = function(c) {
1149
+ throw new Error("process.binding is not supported");
1150
+ };
1151
+ g.cwd = function() {
1152
+ return "/";
1153
+ };
1154
+ g.chdir = function(c) {
1155
+ throw new Error("process.chdir is not supported");
1156
+ };
1157
+ g.umask = function() {
1158
+ return 0;
1159
+ };
1160
+ var rt = dr.exports;
1161
+ (function(c) {
1162
+ Object.defineProperty(c, Symbol.toStringTag, { value: "Module" });
1163
+ const f = xr, l = rt, w = (p) => p && p.__esModule ? p : { default: p }, y = w(l), a = globalThis || void 0 || self;
1164
+ Object.defineProperty(c, "Buffer", { enumerable: !0, get: () => f.Buffer }), Object.defineProperty(c, "process", { enumerable: !0, get: () => y.default }), c.global = a;
1165
+ })(qr);
1166
+ export {
1167
+ qr as d
1168
+ };