@opencloud-eu/web-client 5.0.0 → 6.0.0

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