@streamlayer/sdk-web 0.28.21 → 0.28.23
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 +5 -5
- package/lib/es/index.js +305 -278
- package/package.json +4 -4
package/lib/es/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QuestionType as
|
|
1
|
+
import { QuestionType as Fe, SilenceSetting as Kr, QuestionStatus as dt } 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";
|
|
@@ -22,9 +22,9 @@ var O = {}, Xr = {}, Ot = {};
|
|
|
22
22
|
Ot.byteLength = ei;
|
|
23
23
|
Ot.toByteArray = ri;
|
|
24
24
|
Ot.fromByteArray = oi;
|
|
25
|
-
var we = [], se = [], Xn = typeof Uint8Array < "u" ? Uint8Array : Array,
|
|
26
|
-
for (var qe = 0, Zn =
|
|
27
|
-
we[qe] =
|
|
25
|
+
var we = [], se = [], Xn = typeof Uint8Array < "u" ? Uint8Array : Array, Lt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
26
|
+
for (var qe = 0, Zn = Lt.length; qe < Zn; ++qe)
|
|
27
|
+
we[qe] = Lt[qe], se[Lt.charCodeAt(qe)] = qe;
|
|
28
28
|
se["-".charCodeAt(0)] = 62;
|
|
29
29
|
se["_".charCodeAt(0)] = 63;
|
|
30
30
|
function Zr(t) {
|
|
@@ -69,8 +69,8 @@ function oi(t) {
|
|
|
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, f = s * 8 - o - 1, p = (1 << f) - 1, w = p >> 1, g = -7, m = r ? s - 1 : 0, E = r ? -1 : 1,
|
|
73
|
-
for (m += E, u =
|
|
72
|
+
var u, l, f = s * 8 - o - 1, p = (1 << f) - 1, w = p >> 1, g = -7, m = r ? s - 1 : 0, E = r ? -1 : 1, T = t[e + m];
|
|
73
|
+
for (m += E, u = T & (1 << -g) - 1, T >>= -g, g += f; 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
|
;
|
|
@@ -78,18 +78,18 @@ fr.read = function(t, e, r, o, s) {
|
|
|
78
78
|
u = 1 - w;
|
|
79
79
|
else {
|
|
80
80
|
if (u === p)
|
|
81
|
-
return l ? NaN : (
|
|
81
|
+
return l ? NaN : (T ? -1 : 1) * (1 / 0);
|
|
82
82
|
l = l + Math.pow(2, o), u = u - w;
|
|
83
83
|
}
|
|
84
|
-
return (
|
|
84
|
+
return (T ? -1 : 1) * l * Math.pow(2, u - o);
|
|
85
85
|
};
|
|
86
86
|
fr.write = function(t, e, r, o, s, u) {
|
|
87
|
-
var l, f, p, w = u * 8 - s - 1, g = (1 << w) - 1, m = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
|
|
88
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = 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 ? (f = 0, l = g) : l + m >= 1 ? (f = (e * p - 1) * Math.pow(2, s), l = l + m) : (f = e * Math.pow(2, m - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r +
|
|
87
|
+
var l, f, p, w = u * 8 - s - 1, g = (1 << w) - 1, m = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, T = o ? 0 : u - 1, N = o ? 1 : -1, P = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
88
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = 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 ? (f = 0, l = g) : l + m >= 1 ? (f = (e * p - 1) * Math.pow(2, s), l = l + m) : (f = e * Math.pow(2, m - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + T] = f & 255, T += N, f /= 256, s -= 8)
|
|
89
89
|
;
|
|
90
|
-
for (l = l << s | f, w += s; w > 0; t[r +
|
|
90
|
+
for (l = l << s | f, w += s; w > 0; t[r + T] = l & 255, T += N, l /= 256, w -= 8)
|
|
91
91
|
;
|
|
92
|
-
t[r +
|
|
92
|
+
t[r + T - N] |= P * 128;
|
|
93
93
|
};
|
|
94
94
|
/*!
|
|
95
95
|
* The buffer module from node.js, for the browser.
|
|
@@ -148,7 +148,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
148
148
|
if (typeof a == "string")
|
|
149
149
|
return E(a, n);
|
|
150
150
|
if (ArrayBuffer.isView(a))
|
|
151
|
-
return
|
|
151
|
+
return N(a);
|
|
152
152
|
if (a == null)
|
|
153
153
|
throw new TypeError(
|
|
154
154
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
|
|
@@ -202,18 +202,18 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
202
202
|
const h = c.write(a, n);
|
|
203
203
|
return h !== i && (c = c.slice(0, h)), c;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function T(a) {
|
|
206
206
|
const n = a.length < 0 ? 0 : I(a.length) | 0, i = l(n);
|
|
207
207
|
for (let c = 0; c < n; c += 1)
|
|
208
208
|
i[c] = a[c] & 255;
|
|
209
209
|
return i;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function N(a) {
|
|
212
212
|
if (ge(a, Uint8Array)) {
|
|
213
213
|
const n = new Uint8Array(a);
|
|
214
214
|
return P(n.buffer, n.byteOffset, n.byteLength);
|
|
215
215
|
}
|
|
216
|
-
return
|
|
216
|
+
return T(a);
|
|
217
217
|
}
|
|
218
218
|
function P(a, n, i) {
|
|
219
219
|
if (n < 0 || a.byteLength < n)
|
|
@@ -229,9 +229,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
229
229
|
return i.length === 0 || a.copy(i, 0, 0, n), i;
|
|
230
230
|
}
|
|
231
231
|
if (a.length !== void 0)
|
|
232
|
-
return typeof a.length != "number" ||
|
|
232
|
+
return typeof a.length != "number" || Nt(a.length) ? l(0) : T(a);
|
|
233
233
|
if (a.type === "Buffer" && Array.isArray(a.data))
|
|
234
|
-
return
|
|
234
|
+
return T(a.data);
|
|
235
235
|
}
|
|
236
236
|
function I(a) {
|
|
237
237
|
if (a >= s)
|
|
@@ -354,14 +354,14 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
354
354
|
return nt(this, n, i);
|
|
355
355
|
case "latin1":
|
|
356
356
|
case "binary":
|
|
357
|
-
return
|
|
357
|
+
return ke(this, n, i);
|
|
358
358
|
case "base64":
|
|
359
359
|
return rt(this, n, i);
|
|
360
360
|
case "ucs2":
|
|
361
361
|
case "ucs-2":
|
|
362
362
|
case "utf16le":
|
|
363
363
|
case "utf-16le":
|
|
364
|
-
return
|
|
364
|
+
return Pe(this, n, i);
|
|
365
365
|
default:
|
|
366
366
|
if (c)
|
|
367
367
|
throw new TypeError("Unknown encoding: " + a);
|
|
@@ -369,7 +369,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
f.prototype._isBuffer = !0;
|
|
372
|
-
function
|
|
372
|
+
function F(a, n, i) {
|
|
373
373
|
const c = a[n];
|
|
374
374
|
a[n] = a[i], a[i] = c;
|
|
375
375
|
}
|
|
@@ -378,21 +378,21 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
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
|
+
F(this, i, i + 1);
|
|
382
382
|
return this;
|
|
383
383
|
}, f.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
|
+
F(this, i, i + 3), F(this, i + 1, i + 2);
|
|
389
389
|
return this;
|
|
390
390
|
}, f.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
|
+
F(this, i, i + 7), F(this, i + 1, i + 6), F(this, i + 2, i + 5), F(this, i + 3, i + 4);
|
|
396
396
|
return this;
|
|
397
397
|
}, f.prototype.toString = function() {
|
|
398
398
|
const n = this.length;
|
|
@@ -432,7 +432,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
432
432
|
function x(a, n, i, c, h) {
|
|
433
433
|
if (a.length === 0)
|
|
434
434
|
return -1;
|
|
435
|
-
if (typeof i == "string" ? (c = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i,
|
|
435
|
+
if (typeof i == "string" ? (c = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, Nt(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;
|
|
@@ -495,7 +495,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
495
495
|
let b;
|
|
496
496
|
for (b = 0; b < c; ++b) {
|
|
497
497
|
const R = parseInt(n.substr(b * 2, 2), 16);
|
|
498
|
-
if (
|
|
498
|
+
if (Nt(R))
|
|
499
499
|
return b;
|
|
500
500
|
a[i + b] = R;
|
|
501
501
|
}
|
|
@@ -504,7 +504,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
504
504
|
function ie(a, n, i, c) {
|
|
505
505
|
return ot(it(n, a.length - i), a, i, c);
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function Oe(a, n, i, c) {
|
|
508
508
|
return ot(Rt(n), a, i, c);
|
|
509
509
|
}
|
|
510
510
|
function Se(a, n, i, c) {
|
|
@@ -539,7 +539,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
539
539
|
case "ascii":
|
|
540
540
|
case "latin1":
|
|
541
541
|
case "binary":
|
|
542
|
-
return
|
|
542
|
+
return Oe(this, n, i, c);
|
|
543
543
|
case "base64":
|
|
544
544
|
return Se(this, n, i, c);
|
|
545
545
|
case "ucs2":
|
|
@@ -586,18 +586,18 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
586
586
|
}
|
|
587
587
|
b === null ? (b = 65533, R = 1) : b > 65535 && (b -= 65536, c.push(b >>> 10 & 1023 | 55296), b = 56320 | b & 1023), c.push(b), h += R;
|
|
588
588
|
}
|
|
589
|
-
return
|
|
589
|
+
return Be(c);
|
|
590
590
|
}
|
|
591
|
-
const
|
|
592
|
-
function
|
|
591
|
+
const xe = 4096;
|
|
592
|
+
function Be(a) {
|
|
593
593
|
const n = a.length;
|
|
594
|
-
if (n <=
|
|
594
|
+
if (n <= xe)
|
|
595
595
|
return String.fromCharCode.apply(String, a);
|
|
596
596
|
let i = "", c = 0;
|
|
597
597
|
for (; c < n; )
|
|
598
598
|
i += String.fromCharCode.apply(
|
|
599
599
|
String,
|
|
600
|
-
a.slice(c, c +=
|
|
600
|
+
a.slice(c, c += xe)
|
|
601
601
|
);
|
|
602
602
|
return i;
|
|
603
603
|
}
|
|
@@ -608,7 +608,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
608
608
|
c += String.fromCharCode(a[h] & 127);
|
|
609
609
|
return c;
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function ke(a, n, i) {
|
|
612
612
|
let c = "";
|
|
613
613
|
i = Math.min(a.length, i);
|
|
614
614
|
for (let h = n; h < i; ++h)
|
|
@@ -623,7 +623,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
623
623
|
h += Vn[a[y]];
|
|
624
624
|
return h;
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function Pe(a, n, i) {
|
|
627
627
|
const c = a.slice(n, i);
|
|
628
628
|
let h = "";
|
|
629
629
|
for (let y = 0; y < c.length - 1; y += 2)
|
|
@@ -664,13 +664,13 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
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
|
}, f.prototype.readUint32BE = f.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
|
-
}, f.prototype.readBigUInt64LE =
|
|
667
|
+
}, f.prototype.readBigUInt64LE = Re(function(n) {
|
|
668
668
|
n = n >>> 0, he(n, "offset");
|
|
669
669
|
const i = this[n], c = this[n + 7];
|
|
670
670
|
(i === void 0 || c === void 0) && oe(n, this.length - 8);
|
|
671
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 + c * 2 ** 24;
|
|
672
672
|
return BigInt(h) + (BigInt(y) << BigInt(32));
|
|
673
|
-
}), f.prototype.readBigUInt64BE =
|
|
673
|
+
}), f.prototype.readBigUInt64BE = Re(function(n) {
|
|
674
674
|
n = n >>> 0, he(n, "offset");
|
|
675
675
|
const i = this[n], c = this[n + 7];
|
|
676
676
|
(i === void 0 || c === void 0) && oe(n, this.length - 8);
|
|
@@ -702,13 +702,13 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
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
|
}, f.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
|
-
}, f.prototype.readBigInt64LE =
|
|
705
|
+
}, f.prototype.readBigInt64LE = Re(function(n) {
|
|
706
706
|
n = n >>> 0, he(n, "offset");
|
|
707
707
|
const i = this[n], c = this[n + 7];
|
|
708
708
|
(i === void 0 || c === void 0) && oe(n, this.length - 8);
|
|
709
709
|
const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (c << 24);
|
|
710
710
|
return (BigInt(h) << BigInt(32)) + BigInt(i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
|
|
711
|
-
}), f.prototype.readBigInt64BE =
|
|
711
|
+
}), f.prototype.readBigInt64BE = Re(function(n) {
|
|
712
712
|
n = n >>> 0, he(n, "offset");
|
|
713
713
|
const i = this[n], c = this[n + 7];
|
|
714
714
|
(i === void 0 || c === void 0) && oe(n, this.length - 8);
|
|
@@ -775,9 +775,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
775
775
|
let b = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
776
776
|
return a[i + 3] = b, b = b >> 8, a[i + 2] = b, b = b >> 8, a[i + 1] = b, b = b >> 8, a[i] = b, i + 8;
|
|
777
777
|
}
|
|
778
|
-
f.prototype.writeBigUInt64LE =
|
|
778
|
+
f.prototype.writeBigUInt64LE = Re(function(n, i = 0) {
|
|
779
779
|
return v(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
780
|
-
}), f.prototype.writeBigUInt64BE =
|
|
780
|
+
}), f.prototype.writeBigUInt64BE = Re(function(n, i = 0) {
|
|
781
781
|
return A(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
782
782
|
}), f.prototype.writeIntLE = function(n, i, c, h) {
|
|
783
783
|
if (n = +n, i = i >>> 0, !h) {
|
|
@@ -807,9 +807,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
807
807
|
return n = +n, i = i >>> 0, c || 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
808
|
}, f.prototype.writeInt32BE = function(n, i, c) {
|
|
809
809
|
return n = +n, i = i >>> 0, c || 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
|
-
}, f.prototype.writeBigInt64LE =
|
|
810
|
+
}, f.prototype.writeBigInt64LE = Re(function(n, i = 0) {
|
|
811
811
|
return v(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
812
|
-
}), f.prototype.writeBigInt64BE =
|
|
812
|
+
}), f.prototype.writeBigInt64BE = Re(function(n, i = 0) {
|
|
813
813
|
return A(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
814
814
|
});
|
|
815
815
|
function C(a, n, i, c, h, y) {
|
|
@@ -882,7 +882,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
882
882
|
return this;
|
|
883
883
|
};
|
|
884
884
|
const B = {};
|
|
885
|
-
function
|
|
885
|
+
function L(a, n, i) {
|
|
886
886
|
B[a] = class extends i {
|
|
887
887
|
constructor() {
|
|
888
888
|
super(), Object.defineProperty(this, "message", {
|
|
@@ -907,19 +907,19 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
907
907
|
}
|
|
908
908
|
};
|
|
909
909
|
}
|
|
910
|
-
|
|
910
|
+
L(
|
|
911
911
|
"ERR_BUFFER_OUT_OF_BOUNDS",
|
|
912
912
|
function(a) {
|
|
913
913
|
return a ? `${a} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
914
914
|
},
|
|
915
915
|
RangeError
|
|
916
|
-
),
|
|
916
|
+
), L(
|
|
917
917
|
"ERR_INVALID_ARG_TYPE",
|
|
918
918
|
function(a, n) {
|
|
919
919
|
return `The "${a}" argument must be of type number. Received type ${typeof n}`;
|
|
920
920
|
},
|
|
921
921
|
TypeError
|
|
922
|
-
),
|
|
922
|
+
), L(
|
|
923
923
|
"ERR_OUT_OF_RANGE",
|
|
924
924
|
function(a, n, i) {
|
|
925
925
|
let c = `The value of "${a}" is out of range.`, h = i;
|
|
@@ -1048,7 +1048,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1048
1048
|
function ge(a, n) {
|
|
1049
1049
|
return a instanceof n || a != null && a.constructor != null && a.constructor.name != null && a.constructor.name === n.name;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function Nt(a) {
|
|
1052
1052
|
return a !== a;
|
|
1053
1053
|
}
|
|
1054
1054
|
const Vn = function() {
|
|
@@ -1060,7 +1060,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
return n;
|
|
1062
1062
|
}();
|
|
1063
|
-
function
|
|
1063
|
+
function Re(a) {
|
|
1064
1064
|
return typeof BigInt > "u" ? Mn : a;
|
|
1065
1065
|
}
|
|
1066
1066
|
function Mn() {
|
|
@@ -1116,20 +1116,20 @@ function si(t) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
-
var
|
|
1119
|
+
var _e = [], We = !1, Ue, yt = -1;
|
|
1120
1120
|
function ai() {
|
|
1121
|
-
!We || !
|
|
1121
|
+
!We || !Ue || (We = !1, Ue.length ? _e = Ue.concat(_e) : yt = -1, _e.length && rn());
|
|
1122
1122
|
}
|
|
1123
1123
|
function rn() {
|
|
1124
1124
|
if (!We) {
|
|
1125
1125
|
var t = tn(ai);
|
|
1126
1126
|
We = !0;
|
|
1127
|
-
for (var e =
|
|
1128
|
-
for (
|
|
1129
|
-
|
|
1130
|
-
yt = -1, e =
|
|
1127
|
+
for (var e = _e.length; e; ) {
|
|
1128
|
+
for (Ue = _e, _e = []; ++yt < e; )
|
|
1129
|
+
Ue && Ue[yt].run();
|
|
1130
|
+
yt = -1, e = _e.length;
|
|
1131
1131
|
}
|
|
1132
|
-
|
|
1132
|
+
Ue = null, We = !1, si(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
|
-
|
|
1140
|
+
_e.push(new nn(t, e)), _e.length === 1 && !We && tn(rn);
|
|
1141
1141
|
};
|
|
1142
1142
|
function nn(t, e) {
|
|
1143
1143
|
this.fun = t, this.array = e;
|
|
@@ -1151,17 +1151,17 @@ Y.env = {};
|
|
|
1151
1151
|
Y.argv = [];
|
|
1152
1152
|
Y.version = "";
|
|
1153
1153
|
Y.versions = {};
|
|
1154
|
-
function
|
|
1154
|
+
function Ce() {
|
|
1155
1155
|
}
|
|
1156
|
-
Y.on =
|
|
1157
|
-
Y.addListener =
|
|
1158
|
-
Y.once =
|
|
1159
|
-
Y.off =
|
|
1160
|
-
Y.removeListener =
|
|
1161
|
-
Y.removeAllListeners =
|
|
1162
|
-
Y.emit =
|
|
1163
|
-
Y.prependListener =
|
|
1164
|
-
Y.prependOnceListener =
|
|
1156
|
+
Y.on = Ce;
|
|
1157
|
+
Y.addListener = Ce;
|
|
1158
|
+
Y.once = Ce;
|
|
1159
|
+
Y.off = Ce;
|
|
1160
|
+
Y.removeListener = Ce;
|
|
1161
|
+
Y.removeAllListeners = Ce;
|
|
1162
|
+
Y.emit = Ce;
|
|
1163
|
+
Y.prependListener = Ce;
|
|
1164
|
+
Y.prependOnceListener = Ce;
|
|
1165
1165
|
Y.listeners = function(t) {
|
|
1166
1166
|
return [];
|
|
1167
1167
|
};
|
|
@@ -1213,7 +1213,7 @@ class at extends xt {
|
|
|
1213
1213
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
1214
1214
|
unsubscribe = () => this.getStore().off();
|
|
1215
1215
|
}
|
|
1216
|
-
const
|
|
1216
|
+
const $e = (t) => qn(t);
|
|
1217
1217
|
var Ie;
|
|
1218
1218
|
(function(t) {
|
|
1219
1219
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
@@ -1224,10 +1224,10 @@ const li = {
|
|
|
1224
1224
|
[ue.PUBLIC_CHAT]: "publicChat",
|
|
1225
1225
|
[ue.TWITTER]: "twitter"
|
|
1226
1226
|
};
|
|
1227
|
-
var
|
|
1227
|
+
var De;
|
|
1228
1228
|
(function(t) {
|
|
1229
1229
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
1230
|
-
})(
|
|
1230
|
+
})(De || (De = {}));
|
|
1231
1231
|
class lr {
|
|
1232
1232
|
status;
|
|
1233
1233
|
source;
|
|
@@ -1236,7 +1236,7 @@ class lr {
|
|
|
1236
1236
|
listeners = /* @__PURE__ */ new Set();
|
|
1237
1237
|
settingsKey;
|
|
1238
1238
|
constructor({ settings: e, ...r }, o) {
|
|
1239
|
-
this.settingsKey = li[r.type], this.status = Ct(
|
|
1239
|
+
this.settingsKey = li[r.type], this.status = Ct(De.Suspended), this.config = new at($e(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new at($e(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new at($e({}), `feature:settings:${this.settingsKey}`), this.source = o;
|
|
1240
1240
|
}
|
|
1241
1241
|
get featureConfig() {
|
|
1242
1242
|
return this.config.getStore();
|
|
@@ -1248,10 +1248,10 @@ class lr {
|
|
|
1248
1248
|
this.listeners.add(e);
|
|
1249
1249
|
}
|
|
1250
1250
|
enable = () => {
|
|
1251
|
-
this.status.set(
|
|
1251
|
+
this.status.set(De.Ready);
|
|
1252
1252
|
};
|
|
1253
1253
|
disable = () => {
|
|
1254
|
-
this.status.set(
|
|
1254
|
+
this.status.set(De.Suspended);
|
|
1255
1255
|
};
|
|
1256
1256
|
setFeatureConfig = ({ settings: e, ...r }) => {
|
|
1257
1257
|
let o;
|
|
@@ -1391,7 +1391,7 @@ class di {
|
|
|
1391
1391
|
ts: /* @__PURE__ */ new Date(),
|
|
1392
1392
|
log: []
|
|
1393
1393
|
};
|
|
1394
|
-
this.state = new at(
|
|
1394
|
+
this.state = new at($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(() => {
|
|
1395
1395
|
this.reconnect();
|
|
1396
1396
|
}), this.updateState(Ae.Ready);
|
|
1397
1397
|
}
|
|
@@ -1451,7 +1451,7 @@ class yi {
|
|
|
1451
1451
|
callbackClients;
|
|
1452
1452
|
subscriptions;
|
|
1453
1453
|
constructor(e) {
|
|
1454
|
-
this.host = e, this.$headers = new at(
|
|
1454
|
+
this.host = e, this.$headers = new at($e({
|
|
1455
1455
|
"sl-device-id": O.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
|
|
1456
1456
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
1457
1457
|
const [r, o, s] = Hn();
|
|
@@ -1644,10 +1644,10 @@ class Ke extends hr {
|
|
|
1644
1644
|
this.remove(Ee.TOKEN);
|
|
1645
1645
|
};
|
|
1646
1646
|
}
|
|
1647
|
-
var
|
|
1647
|
+
var Te;
|
|
1648
1648
|
(function(t) {
|
|
1649
1649
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
1650
|
-
})(
|
|
1650
|
+
})(Te || (Te = {}));
|
|
1651
1651
|
const Ii = (t) => {
|
|
1652
1652
|
const e = new Ke(), r = new de(ne(e.getExternalToken()), "userKey"), o = new de(ne(e.getToken()), "userToken"), s = new pe(bi(o.getStore(), t), "user", (l) => l?.data?.data?.id), u = new pe(vi(o.getStore(), t), "userSettings");
|
|
1653
1653
|
return {
|
|
@@ -1656,7 +1656,7 @@ const Ii = (t) => {
|
|
|
1656
1656
|
user: s,
|
|
1657
1657
|
userSettings: u
|
|
1658
1658
|
};
|
|
1659
|
-
},
|
|
1659
|
+
}, Ti = (t) => {
|
|
1660
1660
|
const e = new de(ne(void 0), "providerStreamId"), r = new pe(gi(e.getStore(), t), "slStreamId", (s) => s?.data), o = new pe(mi(r.getAtomStore(), t), "streamSettings");
|
|
1661
1661
|
return r.getAtomStore().listen((s) => {
|
|
1662
1662
|
(s === "" || s === void 0) && o.getStore().mutate(void 0);
|
|
@@ -1665,8 +1665,8 @@ const Ii = (t) => {
|
|
|
1665
1665
|
slStreamId: r,
|
|
1666
1666
|
streamSettings: o
|
|
1667
1667
|
};
|
|
1668
|
-
},
|
|
1669
|
-
const e = new de(ne(void 0), "enabled"), r = new de(ne(
|
|
1668
|
+
}, Fi = (t) => {
|
|
1669
|
+
const e = new de(ne(void 0), "enabled"), r = new de(ne(Te.DISABLED), "status"), o = new pe(Si(e.getStore(), t), "organizationSettings", (f) => f?.data?.id), s = new pe(Ai(o.getAtomStore(), t), "organizationAdvertising"), u = Ii(t), l = Ti(t);
|
|
1670
1670
|
return {
|
|
1671
1671
|
enabled: e,
|
|
1672
1672
|
status: r,
|
|
@@ -1684,7 +1684,7 @@ const Ii = (t) => {
|
|
|
1684
1684
|
class _i extends xt {
|
|
1685
1685
|
stores;
|
|
1686
1686
|
constructor(e) {
|
|
1687
|
-
const r =
|
|
1687
|
+
const r = Fi(e), o = fi(r);
|
|
1688
1688
|
super(o, "core"), this.stores = r;
|
|
1689
1689
|
}
|
|
1690
1690
|
getValue() {
|
|
@@ -1786,7 +1786,7 @@ class Ci extends ci {
|
|
|
1786
1786
|
}
|
|
1787
1787
|
const st = new Ke(), Oi = (t, e, r) => {
|
|
1788
1788
|
t.auth = new Ci(t.store, t.transport), t.stores.status.listen((o) => {
|
|
1789
|
-
o ===
|
|
1789
|
+
o === Te.READY && t.auth.reLogin();
|
|
1790
1790
|
}), t.sdk.authorizationBypass = async (o, s) => {
|
|
1791
1791
|
st.getSchema() === o && st.getExternalToken() === s && t.transport.getHeader("authorization") || (await t.auth.login(o, s), st.setSchema(o), st.setExternalToken(s));
|
|
1792
1792
|
}, t.sdk.logout = () => {
|
|
@@ -1800,15 +1800,15 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1800
1800
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async () => {
|
|
1801
1801
|
if (t.stores.enabled.get() === "on")
|
|
1802
1802
|
return { enabled: !0 };
|
|
1803
|
-
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(
|
|
1803
|
+
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(Te.INITIALIZATION);
|
|
1804
1804
|
try {
|
|
1805
1805
|
const o = await t.stores.organizationSettings.getValue();
|
|
1806
|
-
return o ? (t.stores.status.setValue(
|
|
1806
|
+
return o ? (t.stores.status.setValue(Te.READY), { enabled: !!o }) : (t.stores.status.setValue(Te.FAILED), { err: "failed" });
|
|
1807
1807
|
} catch (o) {
|
|
1808
|
-
return t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
1808
|
+
return t.stores.enabled.setValue(), t.stores.status.setValue(Te.FAILED), { err: `${o}` };
|
|
1809
1809
|
}
|
|
1810
1810
|
}, t.sdk.disableApp = () => {
|
|
1811
|
-
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
1811
|
+
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(Te.DISABLED), t.storeUnsubscribe());
|
|
1812
1812
|
}, t.sdk.createEventSession = (o) => {
|
|
1813
1813
|
t.stores.providerStreamId.setValue(o);
|
|
1814
1814
|
}, r();
|
|
@@ -1828,14 +1828,14 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1828
1828
|
}, Ri = (t) => {
|
|
1829
1829
|
const { client: e } = t.createPromiseClient(Jr, { method: "list" });
|
|
1830
1830
|
return (r) => e.list(r);
|
|
1831
|
-
},
|
|
1831
|
+
}, Ni = (t, e) => {
|
|
1832
1832
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "get", params: [t] });
|
|
1833
1833
|
return e.nanoquery.createFetcherStore(o, {
|
|
1834
1834
|
fetcher: async (s, u, l) => (await r.get({
|
|
1835
1835
|
eventId: l
|
|
1836
1836
|
})).data?.attributes
|
|
1837
1837
|
});
|
|
1838
|
-
},
|
|
1838
|
+
}, Li = (t, e) => {
|
|
1839
1839
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "syncQuestion", params: [t] });
|
|
1840
1840
|
return e.nanoquery.createFetcherStore(o, {
|
|
1841
1841
|
fetcher: async (s, u, l) => l ? (await r.syncQuestion({
|
|
@@ -1882,7 +1882,7 @@ function dr(t) {
|
|
|
1882
1882
|
let _ = 0;
|
|
1883
1883
|
const D = I.length, U = new Array(D);
|
|
1884
1884
|
for (_ = 0; _ < D; ++_)
|
|
1885
|
-
U[_] =
|
|
1885
|
+
U[_] = T(I[_]);
|
|
1886
1886
|
return U;
|
|
1887
1887
|
}
|
|
1888
1888
|
function o(I) {
|
|
@@ -1890,25 +1890,25 @@ function dr(t) {
|
|
|
1890
1890
|
if (p && Object.getPrototypeOf(I) !== Vi)
|
|
1891
1891
|
return p(I);
|
|
1892
1892
|
const D = f(I);
|
|
1893
|
-
let U,
|
|
1894
|
-
for (U = 0,
|
|
1895
|
-
e(x = D[U]) && (_[x] =
|
|
1893
|
+
let U, F, x;
|
|
1894
|
+
for (U = 0, F = D.length; U < F; ++U)
|
|
1895
|
+
e(x = D[U]) && (_[x] = T(I[x]));
|
|
1896
1896
|
return _;
|
|
1897
1897
|
}
|
|
1898
1898
|
function s(I, _) {
|
|
1899
1899
|
const D = I.length, U = _.length;
|
|
1900
|
-
let
|
|
1900
|
+
let F = 0;
|
|
1901
1901
|
const x = new Array(D + U);
|
|
1902
|
-
for (
|
|
1903
|
-
x[
|
|
1904
|
-
for (
|
|
1905
|
-
x[
|
|
1902
|
+
for (F = 0; F < D; ++F)
|
|
1903
|
+
x[F] = T(I[F]);
|
|
1904
|
+
for (F = 0; F < U; ++F)
|
|
1905
|
+
x[F + D] = T(_[F]);
|
|
1906
1906
|
return x;
|
|
1907
1907
|
}
|
|
1908
1908
|
const u = Object.prototype.propertyIsEnumerable;
|
|
1909
1909
|
function l(I) {
|
|
1910
1910
|
const _ = Object.keys(I), D = Object.getOwnPropertySymbols(I);
|
|
1911
|
-
for (let U = 0,
|
|
1911
|
+
for (let U = 0, F = D.length; U < F; ++U)
|
|
1912
1912
|
u.call(I, D[U]) && _.push(D[U]);
|
|
1913
1913
|
return _;
|
|
1914
1914
|
}
|
|
@@ -1919,30 +1919,30 @@ function dr(t) {
|
|
|
1919
1919
|
function g(I) {
|
|
1920
1920
|
return typeof I != "object" || I === null;
|
|
1921
1921
|
}
|
|
1922
|
-
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:
|
|
1923
|
-
function
|
|
1922
|
+
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: T, deepmerge: P, getKeys: f, isMergeableObject: w }) : s;
|
|
1923
|
+
function T(I) {
|
|
1924
1924
|
return w(I) ? Array.isArray(I) ? r(I) : o(I) : I;
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1927
|
-
const D = {}, U = f(I),
|
|
1926
|
+
function N(I, _) {
|
|
1927
|
+
const D = {}, U = f(I), F = f(_);
|
|
1928
1928
|
let x, k, G;
|
|
1929
1929
|
for (x = 0, k = U.length; x < k; ++x)
|
|
1930
|
-
e(G = U[x]) &&
|
|
1931
|
-
for (x = 0, k =
|
|
1932
|
-
e(G =
|
|
1933
|
-
(D[G] =
|
|
1930
|
+
e(G = U[x]) && F.indexOf(G) === -1 && (D[G] = T(I[G]));
|
|
1931
|
+
for (x = 0, k = F.length; x < k; ++x)
|
|
1932
|
+
e(G = F[x]) && (G in I && (U.indexOf(G) !== -1 && (D[G] = P(I[G], _[G])), !0) || // eslint-disable-line no-mixed-operators
|
|
1933
|
+
(D[G] = T(_[G])));
|
|
1934
1934
|
return D;
|
|
1935
1935
|
}
|
|
1936
1936
|
function P(I, _) {
|
|
1937
1937
|
const D = Array.isArray(_), U = Array.isArray(I);
|
|
1938
|
-
return g(_) ? _ : m(I) ?
|
|
1938
|
+
return g(_) ? _ : m(I) ? T(_) : D && U ? E(I, _) : D !== U ? T(_) : N(I, _);
|
|
1939
1939
|
}
|
|
1940
1940
|
function K() {
|
|
1941
1941
|
switch (arguments.length) {
|
|
1942
1942
|
case 0:
|
|
1943
1943
|
return {};
|
|
1944
1944
|
case 1:
|
|
1945
|
-
return
|
|
1945
|
+
return T(arguments[0]);
|
|
1946
1946
|
case 2:
|
|
1947
1947
|
return P(arguments[0], arguments[1]);
|
|
1948
1948
|
}
|
|
@@ -1966,7 +1966,7 @@ const qi = (t) => (e, r) => {
|
|
|
1966
1966
|
const o = Hr([e, r], (l, f) => {
|
|
1967
1967
|
if (l && f.data)
|
|
1968
1968
|
return f.data.find((p) => p.id === l);
|
|
1969
|
-
}), s =
|
|
1969
|
+
}), s = $e({
|
|
1970
1970
|
data: void 0,
|
|
1971
1971
|
loading: void 0,
|
|
1972
1972
|
error: void 0
|
|
@@ -2014,7 +2014,7 @@ class zi {
|
|
|
2014
2014
|
constructor(e) {
|
|
2015
2015
|
if (e.gamification)
|
|
2016
2016
|
throw new Error("GamificationBackground Singleton error");
|
|
2017
|
-
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(
|
|
2017
|
+
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(Ni(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new pe(Di(this.slStreamId, e.transport), "gamification:feedList"), this.activeQuestionId = new pe(Li(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = Gi(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
|
|
2018
2018
|
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = $i(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
|
|
2019
2019
|
window.requestAnimationFrame(() => {
|
|
2020
2020
|
this.openedQuestion.updateExtendedQuestion(o.data?.attributes?.question);
|
|
@@ -2141,10 +2141,10 @@ class Hi extends hr {
|
|
|
2141
2141
|
this.clear();
|
|
2142
2142
|
};
|
|
2143
2143
|
}
|
|
2144
|
-
var
|
|
2144
|
+
var Ne;
|
|
2145
2145
|
(function(t) {
|
|
2146
2146
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
2147
|
-
})(
|
|
2147
|
+
})(Ne || (Ne = {}));
|
|
2148
2148
|
class Wi {
|
|
2149
2149
|
queue;
|
|
2150
2150
|
storage;
|
|
@@ -2187,15 +2187,15 @@ class un extends hr {
|
|
|
2187
2187
|
};
|
|
2188
2188
|
getOnboardingStatus = ({ userId: e, eventId: r, organizationId: o }) => this.read(At.ONBOARDING, o, e, r);
|
|
2189
2189
|
}
|
|
2190
|
-
const
|
|
2190
|
+
const Tr = {
|
|
2191
2191
|
pageSize: 10
|
|
2192
2192
|
}, eo = (t, e, r) => {
|
|
2193
|
-
const o = ne({ pageSize: r?.pageSize ||
|
|
2193
|
+
const o = ne({ pageSize: r?.pageSize || Tr.pageSize, page: 0 }), s = $e({ data: [], loading: void 0, error: void 0 }), u = Ri(t), l = async (w) => {
|
|
2194
2194
|
if (w) {
|
|
2195
2195
|
s.setKey("loading", !0);
|
|
2196
2196
|
const g = {
|
|
2197
2197
|
eventId: w,
|
|
2198
|
-
pagination: { page: 0, pageSize: r?.pageSize ||
|
|
2198
|
+
pagination: { page: 0, pageSize: r?.pageSize || Tr.pageSize }
|
|
2199
2199
|
}, m = await u(g);
|
|
2200
2200
|
s.set({ data: m.data.map((E) => E.attributes), loading: !1 }), o.set(g.pagination);
|
|
2201
2201
|
}
|
|
@@ -2208,12 +2208,12 @@ const Fr = {
|
|
|
2208
2208
|
const g = e.get(), m = s.get().data?.length || 0;
|
|
2209
2209
|
if (w.page > 0 && g && m >= w.page * w.pageSize) {
|
|
2210
2210
|
s.setKey("loading", !0);
|
|
2211
|
-
const
|
|
2211
|
+
const T = await u({
|
|
2212
2212
|
eventId: g,
|
|
2213
2213
|
pagination: w
|
|
2214
|
-
}),
|
|
2214
|
+
}), N = s.get().data || [];
|
|
2215
2215
|
s.set({
|
|
2216
|
-
data: [...
|
|
2216
|
+
data: [...N, ...T.data.map((P) => P.attributes)],
|
|
2217
2217
|
loading: !1
|
|
2218
2218
|
});
|
|
2219
2219
|
}
|
|
@@ -2238,7 +2238,7 @@ const no = (t, e, r, o) => {
|
|
|
2238
2238
|
const s = new un(), u = ne(re.Completed), l = () => {
|
|
2239
2239
|
const { inplayGame: w = {} } = t.featureSettings.get(), g = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2240
2240
|
o.add({
|
|
2241
|
-
type:
|
|
2241
|
+
type: Ne.ONBOARDING,
|
|
2242
2242
|
id: g,
|
|
2243
2243
|
action: t.openFeature,
|
|
2244
2244
|
close: () => {
|
|
@@ -2246,7 +2246,7 @@ const no = (t, e, r, o) => {
|
|
|
2246
2246
|
},
|
|
2247
2247
|
autoHideDuration: 1e6,
|
|
2248
2248
|
data: {
|
|
2249
|
-
questionType:
|
|
2249
|
+
questionType: Fe.UNSET,
|
|
2250
2250
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2251
2251
|
// @ts-ignore
|
|
2252
2252
|
onboarding: { ...w }
|
|
@@ -2268,8 +2268,8 @@ const no = (t, e, r, o) => {
|
|
|
2268
2268
|
const m = await e.moderation.getValue();
|
|
2269
2269
|
if (u.get() === re.Completed)
|
|
2270
2270
|
return;
|
|
2271
|
-
const E = !!(m?.options?.onboardingEnabled && t.featureSettings.get().inplayGame?.onboarding?.completed),
|
|
2272
|
-
E ?
|
|
2271
|
+
const E = !!(m?.options?.onboardingEnabled && t.featureSettings.get().inplayGame?.onboarding?.completed), T = !!t.featureSettings.get().inplayGame?.titleCard?.optIn;
|
|
2272
|
+
E ? T ? u.set(re.Required) : u.set(re.Optional) : T ? u.set(re.Unavailable) : u.set(re.Disabled);
|
|
2273
2273
|
};
|
|
2274
2274
|
return f(), e.userId.subscribe((w) => {
|
|
2275
2275
|
w && f();
|
|
@@ -2283,7 +2283,7 @@ const no = (t, e, r, o) => {
|
|
|
2283
2283
|
eventId: w
|
|
2284
2284
|
}, re.Completed));
|
|
2285
2285
|
} };
|
|
2286
|
-
}, io = /* @__PURE__ */ new Set([
|
|
2286
|
+
}, io = /* @__PURE__ */ new Set([Fe.POLL, Fe.PREDICTION, Fe.TRIVIA]);
|
|
2287
2287
|
class oo extends lr {
|
|
2288
2288
|
/** user statistics (leaderboard panel) */
|
|
2289
2289
|
userSummary;
|
|
@@ -2298,6 +2298,8 @@ class oo extends lr {
|
|
|
2298
2298
|
onboardingStatus;
|
|
2299
2299
|
/** opened question */
|
|
2300
2300
|
openedQuestion;
|
|
2301
|
+
/** current user id */
|
|
2302
|
+
currentUserId;
|
|
2301
2303
|
/** pinned leaderboard id */
|
|
2302
2304
|
openedUser;
|
|
2303
2305
|
closeFeature;
|
|
@@ -2309,13 +2311,13 @@ class oo extends lr {
|
|
|
2309
2311
|
/** Browser cache */
|
|
2310
2312
|
storage;
|
|
2311
2313
|
constructor(e, r, o) {
|
|
2312
|
-
super(e, r), this.background = an(o), this.storage = new un(), this.userSummary = new pe(Pi(this.background.slStreamId, this.background.userId, o.transport), "gamification:userSummary"), this.feedList = this.background.feedList, this.openedUser = ne(void 0), this.leaderboardId = new de(ne(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = no(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 = ro(this.transport, this.background.slStreamId), this.leaderboardList = eo(this.transport, this.background.slStreamId), this.status.subscribe((s) => {
|
|
2313
|
-
s ===
|
|
2314
|
+
super(e, r), this.background = an(o), this.storage = new un(), this.userSummary = new pe(Pi(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 = no(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 = ro(this.transport, this.background.slStreamId), this.leaderboardList = eo(this.transport, this.background.slStreamId), this.status.subscribe((s) => {
|
|
2315
|
+
s === De.Ready ? this.connect(o.transport) : this.disconnect();
|
|
2314
2316
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2315
2317
|
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 === dt.ACTIVE) {
|
|
2316
2318
|
if (io.has(s.data.question.type))
|
|
2317
2319
|
this.notifications.add({
|
|
2318
|
-
type:
|
|
2320
|
+
type: Ne.QUESTION,
|
|
2319
2321
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2320
2322
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2321
2323
|
autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
|
|
@@ -2327,7 +2329,7 @@ class oo extends lr {
|
|
|
2327
2329
|
}
|
|
2328
2330
|
}
|
|
2329
2331
|
});
|
|
2330
|
-
else if (s.data.question.type ===
|
|
2332
|
+
else if (s.data.question.type === Fe.FACTOID) {
|
|
2331
2333
|
const u = s.data.question.options?.options.value, l = {
|
|
2332
2334
|
heading: s.data.question.notification.title,
|
|
2333
2335
|
body: s.data.question.notification.body,
|
|
@@ -2343,7 +2345,7 @@ class oo extends lr {
|
|
|
2343
2345
|
}
|
|
2344
2346
|
};
|
|
2345
2347
|
this.notifications.add({
|
|
2346
|
-
type:
|
|
2348
|
+
type: Ne.QUESTION,
|
|
2347
2349
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2348
2350
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2349
2351
|
autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
|
|
@@ -2353,6 +2355,31 @@ class oo extends lr {
|
|
|
2353
2355
|
insight: l
|
|
2354
2356
|
}
|
|
2355
2357
|
});
|
|
2358
|
+
} else if (s.data.question.type === Fe.TWEET) {
|
|
2359
|
+
const u = s.data.question.options?.options.value, l = {
|
|
2360
|
+
title: s.data.question.notification.title,
|
|
2361
|
+
body: s.data.question.notification.body,
|
|
2362
|
+
image: s.data.question.notification.image,
|
|
2363
|
+
account: {
|
|
2364
|
+
// ToDo: add later
|
|
2365
|
+
image: "",
|
|
2366
|
+
name: u?.tweetMeta?.account || "",
|
|
2367
|
+
// ToDo: add later
|
|
2368
|
+
userName: "",
|
|
2369
|
+
verified: !!u?.tweetMeta?.accountVerified
|
|
2370
|
+
}
|
|
2371
|
+
};
|
|
2372
|
+
this.notifications.add({
|
|
2373
|
+
type: Ne.QUESTION,
|
|
2374
|
+
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2375
|
+
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2376
|
+
autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
|
|
2377
|
+
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2378
|
+
data: {
|
|
2379
|
+
questionType: s.data.question.type,
|
|
2380
|
+
tweet: l
|
|
2381
|
+
}
|
|
2382
|
+
});
|
|
2356
2383
|
}
|
|
2357
2384
|
}
|
|
2358
2385
|
});
|
|
@@ -2364,18 +2391,18 @@ class oo extends lr {
|
|
|
2364
2391
|
if (!o)
|
|
2365
2392
|
return;
|
|
2366
2393
|
const { status: s, type: u, id: l } = o;
|
|
2367
|
-
if (s === dt.RESOLVED && u ===
|
|
2394
|
+
if (s === dt.RESOLVED && u === Fe.PREDICTION) {
|
|
2368
2395
|
const f = this.background.getCurrentSessionId({
|
|
2369
2396
|
prefix: `notification-id:${l}`
|
|
2370
2397
|
}), p = await sn(l, e), w = p?.answers.find(({ correct: m }) => m), g = p?.answers.find(({ youVoted: m }) => m);
|
|
2371
2398
|
this.notifications.add({
|
|
2372
|
-
type:
|
|
2399
|
+
type: Ne.QUESTION_RESOLVED,
|
|
2373
2400
|
action: () => this.openQuestion(l),
|
|
2374
2401
|
close: () => this.closeQuestion(l),
|
|
2375
2402
|
autoHideDuration: 35e3,
|
|
2376
2403
|
id: f,
|
|
2377
2404
|
data: {
|
|
2378
|
-
questionType:
|
|
2405
|
+
questionType: Fe.PREDICTION,
|
|
2379
2406
|
question: {
|
|
2380
2407
|
title: w?.youVoted ? `Congratulations! You answered correctly! You won ${w.points} pts!` : `Better luck next time! Correct: ${w?.text}!`,
|
|
2381
2408
|
votedAnswer: {
|
|
@@ -2425,10 +2452,10 @@ class so extends lr {
|
|
|
2425
2452
|
background;
|
|
2426
2453
|
constructor(e, r, o) {
|
|
2427
2454
|
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) => {
|
|
2428
|
-
s ===
|
|
2455
|
+
s === De.Ready ? this.connect() : this.disconnect();
|
|
2429
2456
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2430
|
-
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type ===
|
|
2431
|
-
type:
|
|
2457
|
+
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type === Fe.FACTOID && s.data.question.status === dt.ACTIVE && this.notifications.add({
|
|
2458
|
+
type: Ne.QUESTION,
|
|
2432
2459
|
action: () => s.data?.question && this.openHighlight(s.data.question.id),
|
|
2433
2460
|
close: () => s.data?.question && this.closeHighlight(s.data.question.id),
|
|
2434
2461
|
autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
|
|
@@ -2544,8 +2571,8 @@ function cn(t, e, r) {
|
|
|
2544
2571
|
paused: !1,
|
|
2545
2572
|
concurrency: r,
|
|
2546
2573
|
running: w,
|
|
2547
|
-
resume:
|
|
2548
|
-
idle:
|
|
2574
|
+
resume: T,
|
|
2575
|
+
idle: N,
|
|
2549
2576
|
length: m,
|
|
2550
2577
|
getQueue: E,
|
|
2551
2578
|
unshift: K,
|
|
@@ -2562,35 +2589,35 @@ function cn(t, e, r) {
|
|
|
2562
2589
|
p.paused = !0;
|
|
2563
2590
|
}
|
|
2564
2591
|
function m() {
|
|
2565
|
-
for (var
|
|
2566
|
-
|
|
2592
|
+
for (var F = s, x = 0; F; )
|
|
2593
|
+
F = F.next, x++;
|
|
2567
2594
|
return x;
|
|
2568
2595
|
}
|
|
2569
2596
|
function E() {
|
|
2570
|
-
for (var
|
|
2571
|
-
x.push(
|
|
2597
|
+
for (var F = s, x = []; F; )
|
|
2598
|
+
x.push(F.value), F = F.next;
|
|
2572
2599
|
return x;
|
|
2573
2600
|
}
|
|
2574
|
-
function
|
|
2601
|
+
function T() {
|
|
2575
2602
|
if (p.paused) {
|
|
2576
2603
|
p.paused = !1;
|
|
2577
|
-
for (var
|
|
2604
|
+
for (var F = 0; F < p.concurrency; F++)
|
|
2578
2605
|
l++, I();
|
|
2579
2606
|
}
|
|
2580
2607
|
}
|
|
2581
|
-
function
|
|
2608
|
+
function N() {
|
|
2582
2609
|
return l === 0 && p.length() === 0;
|
|
2583
2610
|
}
|
|
2584
|
-
function P(
|
|
2611
|
+
function P(F, x) {
|
|
2585
2612
|
var k = o.get();
|
|
2586
|
-
k.context = t, k.release = I, k.value =
|
|
2613
|
+
k.context = t, k.release = I, k.value = F, k.callback = x || ae, k.errorHandler = f, 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));
|
|
2587
2614
|
}
|
|
2588
|
-
function K(
|
|
2615
|
+
function K(F, x) {
|
|
2589
2616
|
var k = o.get();
|
|
2590
|
-
k.context = t, k.release = I, k.value =
|
|
2617
|
+
k.context = t, k.release = I, k.value = F, k.callback = x || ae, l === p.concurrency || p.paused ? s ? (k.next = s, s = k) : (s = k, u = k, p.saturated()) : (l++, e.call(t, k.value, k.worked));
|
|
2591
2618
|
}
|
|
2592
|
-
function I(
|
|
2593
|
-
|
|
2619
|
+
function I(F) {
|
|
2620
|
+
F && o.release(F);
|
|
2594
2621
|
var x = s;
|
|
2595
2622
|
x ? p.paused ? l-- : (u === s && (u = null), s = x.next, x.next = null, e.call(t, x.value, x.worked), u === null && p.empty()) : --l === 0 && p.drain();
|
|
2596
2623
|
}
|
|
@@ -2600,8 +2627,8 @@ function cn(t, e, r) {
|
|
|
2600
2627
|
function D() {
|
|
2601
2628
|
s = null, u = null, p.drain(), p.drain = ae;
|
|
2602
2629
|
}
|
|
2603
|
-
function U(
|
|
2604
|
-
f =
|
|
2630
|
+
function U(F) {
|
|
2631
|
+
f = F;
|
|
2605
2632
|
}
|
|
2606
2633
|
}
|
|
2607
2634
|
function ae() {
|
|
@@ -2624,10 +2651,10 @@ function yo(t, e, r) {
|
|
|
2624
2651
|
var s = cn(t, o, r), u = s.push, l = s.unshift;
|
|
2625
2652
|
return s.push = f, s.unshift = p, s.drained = w, s;
|
|
2626
2653
|
function f(g) {
|
|
2627
|
-
var m = new Promise(function(E,
|
|
2628
|
-
u(g, function(
|
|
2629
|
-
if (
|
|
2630
|
-
|
|
2654
|
+
var m = new Promise(function(E, T) {
|
|
2655
|
+
u(g, function(N, P) {
|
|
2656
|
+
if (N) {
|
|
2657
|
+
T(N);
|
|
2631
2658
|
return;
|
|
2632
2659
|
}
|
|
2633
2660
|
E(P);
|
|
@@ -2636,10 +2663,10 @@ function yo(t, e, r) {
|
|
|
2636
2663
|
return m.catch(ae), m;
|
|
2637
2664
|
}
|
|
2638
2665
|
function p(g) {
|
|
2639
|
-
var m = new Promise(function(E,
|
|
2640
|
-
l(g, function(
|
|
2641
|
-
if (
|
|
2642
|
-
|
|
2666
|
+
var m = new Promise(function(E, T) {
|
|
2667
|
+
l(g, function(N, P) {
|
|
2668
|
+
if (N) {
|
|
2669
|
+
T(N);
|
|
2643
2670
|
return;
|
|
2644
2671
|
}
|
|
2645
2672
|
E(P);
|
|
@@ -2662,7 +2689,7 @@ function yo(t, e, r) {
|
|
|
2662
2689
|
}
|
|
2663
2690
|
gr.exports = cn;
|
|
2664
2691
|
gr.exports.promise = yo;
|
|
2665
|
-
var fn = gr.exports, mr = { exports: {} }, Je = typeof Reflect == "object" ? Reflect : null,
|
|
2692
|
+
var fn = gr.exports, mr = { exports: {} }, Je = typeof Reflect == "object" ? Reflect : null, Fr = Je && typeof Je.apply == "function" ? Je.apply : function(e, r, o) {
|
|
2666
2693
|
return Function.prototype.apply.call(e, r, o);
|
|
2667
2694
|
}, gt;
|
|
2668
2695
|
Je && typeof Je.ownKeys == "function" ? gt = Je.ownKeys : Object.getOwnPropertySymbols ? gt = function(e) {
|
|
@@ -2734,10 +2761,10 @@ q.prototype.emit = function(e) {
|
|
|
2734
2761
|
if (p === void 0)
|
|
2735
2762
|
return !1;
|
|
2736
2763
|
if (typeof p == "function")
|
|
2737
|
-
|
|
2764
|
+
Fr(p, this, r);
|
|
2738
2765
|
else
|
|
2739
2766
|
for (var w = p.length, g = mn(p, w), o = 0; o < w; ++o)
|
|
2740
|
-
|
|
2767
|
+
Fr(g[o], this, r);
|
|
2741
2768
|
return !0;
|
|
2742
2769
|
};
|
|
2743
2770
|
function pn(t, e, r, o) {
|
|
@@ -2915,8 +2942,8 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2915
2942
|
return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Eo();
|
|
2916
2943
|
}, Or = {
|
|
2917
2944
|
foo: {}
|
|
2918
|
-
},
|
|
2919
|
-
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof
|
|
2945
|
+
}, To = Object, Fo = function() {
|
|
2946
|
+
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof To);
|
|
2920
2947
|
}, _o = "Function.prototype.bind called on incompatible ", Co = Object.prototype.toString, Oo = Math.max, xo = "[object Function]", xr = function(e, r) {
|
|
2921
2948
|
for (var o = [], s = 0; s < e.length; s += 1)
|
|
2922
2949
|
o[s] = e[s];
|
|
@@ -2955,7 +2982,7 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2955
2982
|
w.prototype = r.prototype, s.prototype = new w(), w.prototype = null;
|
|
2956
2983
|
}
|
|
2957
2984
|
return s;
|
|
2958
|
-
}, Ro = Po, An = Function.prototype.bind || Ro, Br = {}.hasOwnProperty, Ut = Function.prototype.call,
|
|
2985
|
+
}, Ro = Po, An = Function.prototype.bind || Ro, Br = {}.hasOwnProperty, Ut = Function.prototype.call, No = Ut.bind ? Ut.bind(Br) : function(t, e) {
|
|
2959
2986
|
return Ut.call(Br, t, e);
|
|
2960
2987
|
}, $, Xe = SyntaxError, En = Function, Ye = TypeError, $t = function(t) {
|
|
2961
2988
|
try {
|
|
@@ -2971,7 +2998,7 @@ if (je)
|
|
|
2971
2998
|
}
|
|
2972
2999
|
var Dt = function() {
|
|
2973
3000
|
throw new Ye();
|
|
2974
|
-
},
|
|
3001
|
+
}, Lo = je ? function() {
|
|
2975
3002
|
try {
|
|
2976
3003
|
return arguments.callee, Dt;
|
|
2977
3004
|
} catch {
|
|
@@ -2981,7 +3008,7 @@ var Dt = function() {
|
|
|
2981
3008
|
return Dt;
|
|
2982
3009
|
}
|
|
2983
3010
|
}
|
|
2984
|
-
}() : Dt, Qe = Io(), Uo =
|
|
3011
|
+
}() : Dt, Qe = Io(), Uo = Fo(), X = Object.getPrototypeOf || (Uo ? function(t) {
|
|
2985
3012
|
return t.__proto__;
|
|
2986
3013
|
} : null), ze = {}, $o = typeof Uint8Array > "u" || !X ? $ : X(Uint8Array), Ve = {
|
|
2987
3014
|
"%AggregateError%": typeof AggregateError > "u" ? $ : AggregateError,
|
|
@@ -3040,7 +3067,7 @@ var Dt = function() {
|
|
|
3040
3067
|
"%StringIteratorPrototype%": Qe && X ? X(""[Symbol.iterator]()) : $,
|
|
3041
3068
|
"%Symbol%": Qe ? Symbol : $,
|
|
3042
3069
|
"%SyntaxError%": Xe,
|
|
3043
|
-
"%ThrowTypeError%":
|
|
3070
|
+
"%ThrowTypeError%": Lo,
|
|
3044
3071
|
"%TypedArray%": $o,
|
|
3045
3072
|
"%TypeError%": Ye,
|
|
3046
3073
|
"%Uint8Array%": typeof Uint8Array > "u" ? $ : Uint8Array,
|
|
@@ -3127,7 +3154,7 @@ var jo = function t(e) {
|
|
|
3127
3154
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3128
3155
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3129
3156
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3130
|
-
}, lt = An, Et =
|
|
3157
|
+
}, lt = An, Et = No, Vo = lt.call(Function.call, Array.prototype.concat), Mo = lt.call(Function.apply, Array.prototype.splice), Pr = lt.call(Function.call, String.prototype.replace), It = lt.call(Function.call, String.prototype.slice), qo = lt.call(Function.call, RegExp.prototype.exec), Qo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Go = /\\(\\)?/g, zo = function(e) {
|
|
3131
3158
|
var r = It(e, 0, 1), o = It(e, -1);
|
|
3132
3159
|
if (r === "%" && o !== "%")
|
|
3133
3160
|
throw new Xe("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -3160,8 +3187,8 @@ var jo = function t(e) {
|
|
|
3160
3187
|
var o = zo(e), s = o.length > 0 ? o[0] : "", u = Ko("%" + s + "%", r), l = u.name, f = u.value, p = !1, w = u.alias;
|
|
3161
3188
|
w && (s = w[0], Mo(o, Vo([0, 1], w)));
|
|
3162
3189
|
for (var g = 1, m = !0; g < o.length; g += 1) {
|
|
3163
|
-
var E = o[g],
|
|
3164
|
-
if ((
|
|
3190
|
+
var E = o[g], T = It(E, 0, 1), N = It(E, -1);
|
|
3191
|
+
if ((T === '"' || T === "'" || T === "`" || N === '"' || N === "'" || N === "`") && T !== N)
|
|
3165
3192
|
throw new Xe("property names with quotes must have matching quotes");
|
|
3166
3193
|
if ((E === "constructor" || !m) && (p = !0), s += "." + E, l = "%" + s + "%", Et(Ve, l))
|
|
3167
3194
|
f = Ve[l];
|
|
@@ -3198,14 +3225,14 @@ tr.hasArrayLengthDefineBug = function() {
|
|
|
3198
3225
|
return !0;
|
|
3199
3226
|
}
|
|
3200
3227
|
};
|
|
3201
|
-
var
|
|
3228
|
+
var Tn = tr, Wo = et, mt = Wo("%Object.getOwnPropertyDescriptor%", !0);
|
|
3202
3229
|
if (mt)
|
|
3203
3230
|
try {
|
|
3204
3231
|
mt([], "length");
|
|
3205
3232
|
} catch {
|
|
3206
3233
|
mt = null;
|
|
3207
3234
|
}
|
|
3208
|
-
var wr = mt, Jo =
|
|
3235
|
+
var wr = mt, Jo = Tn(), vr = et, ut = Jo && vr("%Object.defineProperty%", !0);
|
|
3209
3236
|
if (ut)
|
|
3210
3237
|
try {
|
|
3211
3238
|
ut({}, "a", { value: 1 });
|
|
@@ -3237,17 +3264,17 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3237
3264
|
e[r] = o;
|
|
3238
3265
|
else
|
|
3239
3266
|
throw new Yo("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3240
|
-
},
|
|
3267
|
+
}, Fn = et, Nr = Xo, Zo = Tn(), Lr = wr, Ur = Fn("%TypeError%"), es = Fn("%Math.floor%"), ts = function(e, r) {
|
|
3241
3268
|
if (typeof e != "function")
|
|
3242
3269
|
throw new Ur("`fn` is not a function");
|
|
3243
3270
|
if (typeof r != "number" || r < 0 || r > 4294967295 || es(r) !== r)
|
|
3244
3271
|
throw new Ur("`length` must be a positive 32-bit integer");
|
|
3245
3272
|
var o = arguments.length > 2 && !!arguments[2], s = !0, u = !0;
|
|
3246
|
-
if ("length" in e &&
|
|
3247
|
-
var l =
|
|
3273
|
+
if ("length" in e && Lr) {
|
|
3274
|
+
var l = Lr(e, "length");
|
|
3248
3275
|
l && !l.configurable && (s = !1), l && !l.writable && (u = !1);
|
|
3249
3276
|
}
|
|
3250
|
-
return (s || u || !o) && (Zo ?
|
|
3277
|
+
return (s || u || !o) && (Zo ? Nr(e, "length", r, !0, !0) : Nr(e, "length", r)), e;
|
|
3251
3278
|
};
|
|
3252
3279
|
(function(t) {
|
|
3253
3280
|
var e = An, r = et, o = ts, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), f = r("%Reflect.apply%", !0) || e.call(l, u), p = r("%Object.defineProperty%", !0), w = r("%Math.max%");
|
|
@@ -3260,9 +3287,9 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3260
3287
|
t.exports = function(E) {
|
|
3261
3288
|
if (typeof E != "function")
|
|
3262
3289
|
throw new s("a function is required");
|
|
3263
|
-
var
|
|
3290
|
+
var T = f(e, l, arguments);
|
|
3264
3291
|
return o(
|
|
3265
|
-
|
|
3292
|
+
T,
|
|
3266
3293
|
1 + w(0, E.length - (arguments.length - 1)),
|
|
3267
3294
|
!0
|
|
3268
3295
|
);
|
|
@@ -3372,10 +3399,10 @@ var As = He ? function(e) {
|
|
|
3372
3399
|
return !1;
|
|
3373
3400
|
var r = wt.call(e);
|
|
3374
3401
|
return r !== ds && r !== ys && !/^\[object HTML/.test(r) ? !1 : Mt(e);
|
|
3375
|
-
}, Es = As, Is = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty,
|
|
3402
|
+
}, Es = As, Is = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty, Ts = function(e, r, o) {
|
|
3376
3403
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3377
3404
|
Rn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3378
|
-
},
|
|
3405
|
+
}, Fs = function(e, r, o) {
|
|
3379
3406
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3380
3407
|
o == null ? r(e.charAt(s), s, e) : r.call(o, e.charAt(s), s, e);
|
|
3381
3408
|
}, _s = function(e, r, o) {
|
|
@@ -3385,7 +3412,7 @@ var As = He ? function(e) {
|
|
|
3385
3412
|
if (!Es(r))
|
|
3386
3413
|
throw new TypeError("iterator must be a function");
|
|
3387
3414
|
var s;
|
|
3388
|
-
arguments.length >= 3 && (s = o), Is.call(e) === "[object Array]" ?
|
|
3415
|
+
arguments.length >= 3 && (s = o), Is.call(e) === "[object Array]" ? Ts(e, r, s) : typeof e == "string" ? Fs(e, r, s) : _s(e, r, s);
|
|
3389
3416
|
}, Os = Cs, qt = [
|
|
3390
3417
|
"BigInt64Array",
|
|
3391
3418
|
"BigUint64Array",
|
|
@@ -3402,13 +3429,13 @@ var As = He ? function(e) {
|
|
|
3402
3429
|
for (var e = [], r = 0; r < qt.length; r++)
|
|
3403
3430
|
typeof xs[qt[r]] == "function" && (e[e.length] = qt[r]);
|
|
3404
3431
|
return e;
|
|
3405
|
-
},
|
|
3432
|
+
}, Tt = Os, ks = Bs, $r = _n, Sr = xn, vt = wr, Ps = Sr("Object.prototype.toString"), Nn = br(), Dr = typeof globalThis > "u" ? Yr : globalThis, sr = ks(), Ar = Sr("String.prototype.slice"), Qt = Object.getPrototypeOf, Rs = Sr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3406
3433
|
for (var o = 0; o < e.length; o += 1)
|
|
3407
3434
|
if (e[o] === r)
|
|
3408
3435
|
return o;
|
|
3409
3436
|
return -1;
|
|
3410
|
-
},
|
|
3411
|
-
|
|
3437
|
+
}, Ft = { __proto__: null };
|
|
3438
|
+
Nn && vt && Qt ? Tt(sr, function(t) {
|
|
3412
3439
|
var e = new Dr[t]();
|
|
3413
3440
|
if (Symbol.toStringTag in e) {
|
|
3414
3441
|
var r = Qt(e), o = vt(r, Symbol.toStringTag);
|
|
@@ -3416,43 +3443,43 @@ Ln && vt && Qt ? Ft(sr, function(t) {
|
|
|
3416
3443
|
var s = Qt(r);
|
|
3417
3444
|
o = vt(s, Symbol.toStringTag);
|
|
3418
3445
|
}
|
|
3419
|
-
|
|
3446
|
+
Ft["$" + t] = $r(o.get);
|
|
3420
3447
|
}
|
|
3421
|
-
}) :
|
|
3448
|
+
}) : Tt(sr, function(t) {
|
|
3422
3449
|
var e = new Dr[t](), r = e.slice || e.set;
|
|
3423
|
-
r && (
|
|
3450
|
+
r && (Ft["$" + t] = $r(r));
|
|
3424
3451
|
});
|
|
3425
|
-
var
|
|
3452
|
+
var Ns = function(e) {
|
|
3426
3453
|
var r = !1;
|
|
3427
|
-
return Ft
|
|
3454
|
+
return Tt(Ft, function(o, s) {
|
|
3428
3455
|
if (!r)
|
|
3429
3456
|
try {
|
|
3430
3457
|
"$" + o(e) === s && (r = Ar(s, 1));
|
|
3431
3458
|
} catch {
|
|
3432
3459
|
}
|
|
3433
3460
|
}), r;
|
|
3434
|
-
},
|
|
3461
|
+
}, Ls = function(e) {
|
|
3435
3462
|
var r = !1;
|
|
3436
|
-
return Ft
|
|
3463
|
+
return Tt(Ft, function(o, s) {
|
|
3437
3464
|
if (!r)
|
|
3438
3465
|
try {
|
|
3439
3466
|
o(e), r = Ar(s, 1);
|
|
3440
3467
|
} catch {
|
|
3441
3468
|
}
|
|
3442
3469
|
}), r;
|
|
3443
|
-
},
|
|
3470
|
+
}, Ln = function(e) {
|
|
3444
3471
|
if (!e || typeof e != "object")
|
|
3445
3472
|
return !1;
|
|
3446
|
-
if (!
|
|
3473
|
+
if (!Nn) {
|
|
3447
3474
|
var r = Ar(Ps(e), 8, -1);
|
|
3448
|
-
return Rs(sr, r) > -1 ? r : r !== "Object" ? !1 :
|
|
3475
|
+
return Rs(sr, r) > -1 ? r : r !== "Object" ? !1 : Ls(e);
|
|
3449
3476
|
}
|
|
3450
|
-
return vt ?
|
|
3451
|
-
}, Us =
|
|
3477
|
+
return vt ? Ns(e) : null;
|
|
3478
|
+
}, Us = Ln, $s = function(e) {
|
|
3452
3479
|
return !!Us(e);
|
|
3453
3480
|
};
|
|
3454
3481
|
(function(t) {
|
|
3455
|
-
var e = ss, r = ls, o =
|
|
3482
|
+
var e = ss, r = ls, o = Ln, s = $s;
|
|
3456
3483
|
function u(S) {
|
|
3457
3484
|
return S.call.bind(S);
|
|
3458
3485
|
}
|
|
@@ -3460,8 +3487,8 @@ var Ls = function(e) {
|
|
|
3460
3487
|
if (l)
|
|
3461
3488
|
var E = u(BigInt.prototype.valueOf);
|
|
3462
3489
|
if (f)
|
|
3463
|
-
var
|
|
3464
|
-
function
|
|
3490
|
+
var T = u(Symbol.prototype.valueOf);
|
|
3491
|
+
function N(S, pt) {
|
|
3465
3492
|
if (typeof S != "object")
|
|
3466
3493
|
return !1;
|
|
3467
3494
|
try {
|
|
@@ -3495,10 +3522,10 @@ var Ls = function(e) {
|
|
|
3495
3522
|
return o(S) === "Uint32Array";
|
|
3496
3523
|
}
|
|
3497
3524
|
t.isUint32Array = U;
|
|
3498
|
-
function
|
|
3525
|
+
function F(S) {
|
|
3499
3526
|
return o(S) === "Int8Array";
|
|
3500
3527
|
}
|
|
3501
|
-
t.isInt8Array =
|
|
3528
|
+
t.isInt8Array = F;
|
|
3502
3529
|
function x(S) {
|
|
3503
3530
|
return o(S) === "Int16Array";
|
|
3504
3531
|
}
|
|
@@ -3515,10 +3542,10 @@ var Ls = function(e) {
|
|
|
3515
3542
|
return o(S) === "Float64Array";
|
|
3516
3543
|
}
|
|
3517
3544
|
t.isFloat64Array = ie;
|
|
3518
|
-
function
|
|
3545
|
+
function Oe(S) {
|
|
3519
3546
|
return o(S) === "BigInt64Array";
|
|
3520
3547
|
}
|
|
3521
|
-
t.isBigInt64Array =
|
|
3548
|
+
t.isBigInt64Array = Oe;
|
|
3522
3549
|
function Se(S) {
|
|
3523
3550
|
return o(S) === "BigUint64Array";
|
|
3524
3551
|
}
|
|
@@ -3535,32 +3562,32 @@ var Ls = function(e) {
|
|
|
3535
3562
|
return p(S) === "[object Set]";
|
|
3536
3563
|
}
|
|
3537
3564
|
fe.working = typeof Set < "u" && fe(/* @__PURE__ */ new Set());
|
|
3538
|
-
function
|
|
3565
|
+
function xe(S) {
|
|
3539
3566
|
return typeof Set > "u" ? !1 : fe.working ? fe(S) : S instanceof Set;
|
|
3540
3567
|
}
|
|
3541
|
-
t.isSet =
|
|
3542
|
-
function
|
|
3568
|
+
t.isSet = xe;
|
|
3569
|
+
function Be(S) {
|
|
3543
3570
|
return p(S) === "[object WeakMap]";
|
|
3544
3571
|
}
|
|
3545
|
-
|
|
3572
|
+
Be.working = typeof WeakMap < "u" && Be(/* @__PURE__ */ new WeakMap());
|
|
3546
3573
|
function nt(S) {
|
|
3547
|
-
return typeof WeakMap > "u" ? !1 :
|
|
3574
|
+
return typeof WeakMap > "u" ? !1 : Be.working ? Be(S) : S instanceof WeakMap;
|
|
3548
3575
|
}
|
|
3549
3576
|
t.isWeakMap = nt;
|
|
3550
|
-
function
|
|
3577
|
+
function ke(S) {
|
|
3551
3578
|
return p(S) === "[object WeakSet]";
|
|
3552
3579
|
}
|
|
3553
|
-
|
|
3580
|
+
ke.working = typeof WeakSet < "u" && ke(/* @__PURE__ */ new WeakSet());
|
|
3554
3581
|
function le(S) {
|
|
3555
|
-
return
|
|
3582
|
+
return ke(S);
|
|
3556
3583
|
}
|
|
3557
3584
|
t.isWeakSet = le;
|
|
3558
|
-
function
|
|
3585
|
+
function Pe(S) {
|
|
3559
3586
|
return p(S) === "[object ArrayBuffer]";
|
|
3560
3587
|
}
|
|
3561
|
-
|
|
3588
|
+
Pe.working = typeof ArrayBuffer < "u" && Pe(new ArrayBuffer());
|
|
3562
3589
|
function H(S) {
|
|
3563
|
-
return typeof ArrayBuffer > "u" ? !1 :
|
|
3590
|
+
return typeof ArrayBuffer > "u" ? !1 : Pe.working ? Pe(S) : S instanceof ArrayBuffer;
|
|
3564
3591
|
}
|
|
3565
3592
|
t.isArrayBuffer = H;
|
|
3566
3593
|
function d(S) {
|
|
@@ -3587,10 +3614,10 @@ var Ls = function(e) {
|
|
|
3587
3614
|
return p(S) === "[object Map Iterator]";
|
|
3588
3615
|
}
|
|
3589
3616
|
t.isMapIterator = B;
|
|
3590
|
-
function
|
|
3617
|
+
function L(S) {
|
|
3591
3618
|
return p(S) === "[object Set Iterator]";
|
|
3592
3619
|
}
|
|
3593
|
-
t.isSetIterator =
|
|
3620
|
+
t.isSetIterator = L;
|
|
3594
3621
|
function M(S) {
|
|
3595
3622
|
return p(S) === "[object Generator]";
|
|
3596
3623
|
}
|
|
@@ -3600,23 +3627,23 @@ var Ls = function(e) {
|
|
|
3600
3627
|
}
|
|
3601
3628
|
t.isWebAssemblyCompiledModule = te;
|
|
3602
3629
|
function ye(S) {
|
|
3603
|
-
return
|
|
3630
|
+
return N(S, w);
|
|
3604
3631
|
}
|
|
3605
3632
|
t.isNumberObject = ye;
|
|
3606
3633
|
function he(S) {
|
|
3607
|
-
return
|
|
3634
|
+
return N(S, g);
|
|
3608
3635
|
}
|
|
3609
3636
|
t.isStringObject = he;
|
|
3610
3637
|
function oe(S) {
|
|
3611
|
-
return
|
|
3638
|
+
return N(S, m);
|
|
3612
3639
|
}
|
|
3613
3640
|
t.isBooleanObject = oe;
|
|
3614
3641
|
function Me(S) {
|
|
3615
|
-
return l &&
|
|
3642
|
+
return l && N(S, E);
|
|
3616
3643
|
}
|
|
3617
3644
|
t.isBigIntObject = Me;
|
|
3618
3645
|
function ht(S) {
|
|
3619
|
-
return f &&
|
|
3646
|
+
return f && N(S, T);
|
|
3620
3647
|
}
|
|
3621
3648
|
t.isSymbolObject = ht;
|
|
3622
3649
|
function it(S) {
|
|
@@ -3663,17 +3690,17 @@ var js = ar.exports;
|
|
|
3663
3690
|
return C;
|
|
3664
3691
|
}, r = /%[sdj%]/g;
|
|
3665
3692
|
t.format = function(d) {
|
|
3666
|
-
if (!
|
|
3693
|
+
if (!F(d)) {
|
|
3667
3694
|
for (var v = [], A = 0; A < arguments.length; A++)
|
|
3668
3695
|
v.push(l(arguments[A]));
|
|
3669
3696
|
return v.join(" ");
|
|
3670
3697
|
}
|
|
3671
|
-
for (var A = 1, C = arguments, j = C.length, V = String(d).replace(r, function(
|
|
3672
|
-
if (
|
|
3698
|
+
for (var A = 1, C = arguments, j = C.length, V = String(d).replace(r, function(L) {
|
|
3699
|
+
if (L === "%%")
|
|
3673
3700
|
return "%";
|
|
3674
3701
|
if (A >= j)
|
|
3675
|
-
return
|
|
3676
|
-
switch (
|
|
3702
|
+
return L;
|
|
3703
|
+
switch (L) {
|
|
3677
3704
|
case "%s":
|
|
3678
3705
|
return String(C[A++]);
|
|
3679
3706
|
case "%d":
|
|
@@ -3685,7 +3712,7 @@ var js = ar.exports;
|
|
|
3685
3712
|
return "[Circular]";
|
|
3686
3713
|
}
|
|
3687
3714
|
default:
|
|
3688
|
-
return
|
|
3715
|
+
return L;
|
|
3689
3716
|
}
|
|
3690
3717
|
}), B = C[A]; A < j; B = C[++A])
|
|
3691
3718
|
_(B) || !ie(B) ? V += " " + B : V += " " + l(B);
|
|
@@ -3776,7 +3803,7 @@ var js = ar.exports;
|
|
|
3776
3803
|
v.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
3777
3804
|
!(v.constructor && v.constructor.prototype === v)) {
|
|
3778
3805
|
var C = v.inspect(A, d);
|
|
3779
|
-
return
|
|
3806
|
+
return F(C) || (C = g(d, C, A)), C;
|
|
3780
3807
|
}
|
|
3781
3808
|
var j = m(d, v);
|
|
3782
3809
|
if (j)
|
|
@@ -3786,12 +3813,12 @@ var js = ar.exports;
|
|
|
3786
3813
|
return E(v);
|
|
3787
3814
|
if (V.length === 0) {
|
|
3788
3815
|
if (ce(v)) {
|
|
3789
|
-
var
|
|
3790
|
-
return d.stylize("[Function" +
|
|
3816
|
+
var L = v.name ? ": " + v.name : "";
|
|
3817
|
+
return d.stylize("[Function" + L + "]", "special");
|
|
3791
3818
|
}
|
|
3792
3819
|
if (G(v))
|
|
3793
3820
|
return d.stylize(RegExp.prototype.toString.call(v), "regexp");
|
|
3794
|
-
if (
|
|
3821
|
+
if (Oe(v))
|
|
3795
3822
|
return d.stylize(Date.prototype.toString.call(v), "date");
|
|
3796
3823
|
if (Se(v))
|
|
3797
3824
|
return E(v);
|
|
@@ -3801,20 +3828,20 @@ var js = ar.exports;
|
|
|
3801
3828
|
var he = v.name ? ": " + v.name : "";
|
|
3802
3829
|
M = " [Function" + he + "]";
|
|
3803
3830
|
}
|
|
3804
|
-
if (G(v) && (M = " " + RegExp.prototype.toString.call(v)),
|
|
3831
|
+
if (G(v) && (M = " " + RegExp.prototype.toString.call(v)), Oe(v) && (M = " " + Date.prototype.toUTCString.call(v)), Se(v) && (M = " " + E(v)), V.length === 0 && (!te || v.length == 0))
|
|
3805
3832
|
return ye[0] + M + ye[1];
|
|
3806
3833
|
if (A < 0)
|
|
3807
3834
|
return G(v) ? d.stylize(RegExp.prototype.toString.call(v), "regexp") : d.stylize("[Object]", "special");
|
|
3808
3835
|
d.seen.push(v);
|
|
3809
3836
|
var oe;
|
|
3810
|
-
return te ? oe =
|
|
3811
|
-
return
|
|
3837
|
+
return te ? oe = T(d, v, A, B, V) : oe = V.map(function(Me) {
|
|
3838
|
+
return N(d, v, A, B, Me, te);
|
|
3812
3839
|
}), d.seen.pop(), P(oe, M, ye);
|
|
3813
3840
|
}
|
|
3814
3841
|
function m(d, v) {
|
|
3815
3842
|
if (k(v))
|
|
3816
3843
|
return d.stylize("undefined", "undefined");
|
|
3817
|
-
if (
|
|
3844
|
+
if (F(v)) {
|
|
3818
3845
|
var A = "'" + JSON.stringify(v).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
3819
3846
|
return d.stylize(A, "string");
|
|
3820
3847
|
}
|
|
@@ -3828,9 +3855,9 @@ var js = ar.exports;
|
|
|
3828
3855
|
function E(d) {
|
|
3829
3856
|
return "[" + Error.prototype.toString.call(d) + "]";
|
|
3830
3857
|
}
|
|
3831
|
-
function
|
|
3832
|
-
for (var V = [], B = 0,
|
|
3833
|
-
|
|
3858
|
+
function T(d, v, A, C, j) {
|
|
3859
|
+
for (var V = [], B = 0, L = v.length; B < L; ++B)
|
|
3860
|
+
ke(v, String(B)) ? V.push(N(
|
|
3834
3861
|
d,
|
|
3835
3862
|
v,
|
|
3836
3863
|
A,
|
|
@@ -3839,7 +3866,7 @@ var js = ar.exports;
|
|
|
3839
3866
|
!0
|
|
3840
3867
|
)) : V.push("");
|
|
3841
3868
|
return j.forEach(function(M) {
|
|
3842
|
-
M.match(/^\d+$/) || V.push(
|
|
3869
|
+
M.match(/^\d+$/) || V.push(N(
|
|
3843
3870
|
d,
|
|
3844
3871
|
v,
|
|
3845
3872
|
A,
|
|
@@ -3849,24 +3876,24 @@ var js = ar.exports;
|
|
|
3849
3876
|
));
|
|
3850
3877
|
}), V;
|
|
3851
3878
|
}
|
|
3852
|
-
function
|
|
3853
|
-
var B,
|
|
3854
|
-
if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ?
|
|
3855
|
-
`) > -1 && (V ?
|
|
3879
|
+
function N(d, v, A, C, j, V) {
|
|
3880
|
+
var B, L, M;
|
|
3881
|
+
if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ? L = d.stylize("[Getter/Setter]", "special") : L = d.stylize("[Getter]", "special") : M.set && (L = d.stylize("[Setter]", "special")), ke(C, j) || (B = "[" + j + "]"), L || (d.seen.indexOf(M.value) < 0 ? (_(A) ? L = g(d, M.value, null) : L = g(d, M.value, A - 1), L.indexOf(`
|
|
3882
|
+
`) > -1 && (V ? L = L.split(`
|
|
3856
3883
|
`).map(function(te) {
|
|
3857
3884
|
return " " + te;
|
|
3858
3885
|
}).join(`
|
|
3859
|
-
`).slice(2) :
|
|
3860
|
-
` +
|
|
3886
|
+
`).slice(2) : L = `
|
|
3887
|
+
` + L.split(`
|
|
3861
3888
|
`).map(function(te) {
|
|
3862
3889
|
return " " + te;
|
|
3863
3890
|
}).join(`
|
|
3864
|
-
`))) :
|
|
3891
|
+
`))) : L = d.stylize("[Circular]", "special")), k(B)) {
|
|
3865
3892
|
if (V && j.match(/^\d+$/))
|
|
3866
|
-
return
|
|
3893
|
+
return L;
|
|
3867
3894
|
B = JSON.stringify("" + j), B.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (B = B.slice(1, -1), B = d.stylize(B, "name")) : (B = B.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), B = d.stylize(B, "string"));
|
|
3868
3895
|
}
|
|
3869
|
-
return B + ": " +
|
|
3896
|
+
return B + ": " + L;
|
|
3870
3897
|
}
|
|
3871
3898
|
function P(d, v, A) {
|
|
3872
3899
|
var C = d.reduce(function(j, V) {
|
|
@@ -3898,10 +3925,10 @@ var js = ar.exports;
|
|
|
3898
3925
|
return typeof d == "number";
|
|
3899
3926
|
}
|
|
3900
3927
|
t.isNumber = U;
|
|
3901
|
-
function
|
|
3928
|
+
function F(d) {
|
|
3902
3929
|
return typeof d == "string";
|
|
3903
3930
|
}
|
|
3904
|
-
t.isString =
|
|
3931
|
+
t.isString = F;
|
|
3905
3932
|
function x(d) {
|
|
3906
3933
|
return typeof d == "symbol";
|
|
3907
3934
|
}
|
|
@@ -3918,10 +3945,10 @@ var js = ar.exports;
|
|
|
3918
3945
|
return typeof d == "object" && d !== null;
|
|
3919
3946
|
}
|
|
3920
3947
|
t.isObject = ie;
|
|
3921
|
-
function
|
|
3948
|
+
function Oe(d) {
|
|
3922
3949
|
return ie(d) && fe(d) === "[object Date]";
|
|
3923
3950
|
}
|
|
3924
|
-
t.isDate =
|
|
3951
|
+
t.isDate = Oe, t.types.isDate = Oe;
|
|
3925
3952
|
function Se(d) {
|
|
3926
3953
|
return ie(d) && (fe(d) === "[object Error]" || d instanceof Error);
|
|
3927
3954
|
}
|
|
@@ -3938,10 +3965,10 @@ var js = ar.exports;
|
|
|
3938
3965
|
function fe(d) {
|
|
3939
3966
|
return Object.prototype.toString.call(d);
|
|
3940
3967
|
}
|
|
3941
|
-
function
|
|
3968
|
+
function xe(d) {
|
|
3942
3969
|
return d < 10 ? "0" + d.toString(10) : d.toString(10);
|
|
3943
3970
|
}
|
|
3944
|
-
var
|
|
3971
|
+
var Be = [
|
|
3945
3972
|
"Jan",
|
|
3946
3973
|
"Feb",
|
|
3947
3974
|
"Mar",
|
|
@@ -3957,11 +3984,11 @@ var js = ar.exports;
|
|
|
3957
3984
|
];
|
|
3958
3985
|
function nt() {
|
|
3959
3986
|
var d = /* @__PURE__ */ new Date(), v = [
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3987
|
+
xe(d.getHours()),
|
|
3988
|
+
xe(d.getMinutes()),
|
|
3989
|
+
xe(d.getSeconds())
|
|
3963
3990
|
].join(":");
|
|
3964
|
-
return [d.getDate(),
|
|
3991
|
+
return [d.getDate(), Be[d.getMonth()], v].join(" ");
|
|
3965
3992
|
}
|
|
3966
3993
|
t.log = function() {
|
|
3967
3994
|
console.log("%s - %s", nt(), t.format.apply(t, arguments));
|
|
@@ -3972,7 +3999,7 @@ var js = ar.exports;
|
|
|
3972
3999
|
d[A[C]] = v[A[C]];
|
|
3973
4000
|
return d;
|
|
3974
4001
|
};
|
|
3975
|
-
function
|
|
4002
|
+
function ke(d, v) {
|
|
3976
4003
|
return Object.prototype.hasOwnProperty.call(d, v);
|
|
3977
4004
|
}
|
|
3978
4005
|
var le = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
|
|
@@ -3993,8 +4020,8 @@ var js = ar.exports;
|
|
|
3993
4020
|
function A() {
|
|
3994
4021
|
for (var C, j, V = new Promise(function(M, te) {
|
|
3995
4022
|
C = M, j = te;
|
|
3996
|
-
}), B = [],
|
|
3997
|
-
B.push(arguments[
|
|
4023
|
+
}), B = [], L = 0; L < arguments.length; L++)
|
|
4024
|
+
B.push(arguments[L]);
|
|
3998
4025
|
B.push(function(M, te) {
|
|
3999
4026
|
M ? j(M) : C(te);
|
|
4000
4027
|
});
|
|
@@ -4015,7 +4042,7 @@ var js = ar.exports;
|
|
|
4015
4042
|
e(v)
|
|
4016
4043
|
);
|
|
4017
4044
|
}, t.promisify.custom = le;
|
|
4018
|
-
function
|
|
4045
|
+
function Pe(d, v) {
|
|
4019
4046
|
if (!d) {
|
|
4020
4047
|
var A = new Error("Promise was rejected with a falsy value");
|
|
4021
4048
|
A.reason = d, d = A;
|
|
@@ -4035,11 +4062,11 @@ var js = ar.exports;
|
|
|
4035
4062
|
return j.apply(V, arguments);
|
|
4036
4063
|
};
|
|
4037
4064
|
d.apply(this, A).then(
|
|
4038
|
-
function(
|
|
4039
|
-
O.process.nextTick(B.bind(null, null,
|
|
4065
|
+
function(L) {
|
|
4066
|
+
O.process.nextTick(B.bind(null, null, L));
|
|
4040
4067
|
},
|
|
4041
|
-
function(
|
|
4042
|
-
O.process.nextTick(
|
|
4068
|
+
function(L) {
|
|
4069
|
+
O.process.nextTick(Pe.bind(null, L, B));
|
|
4043
4070
|
}
|
|
4044
4071
|
);
|
|
4045
4072
|
}
|
|
@@ -4194,8 +4221,8 @@ function zs() {
|
|
|
4194
4221
|
g
|
|
4195
4222
|
);
|
|
4196
4223
|
if (m) {
|
|
4197
|
-
var E = parseFloat(m[1]),
|
|
4198
|
-
switch (
|
|
4224
|
+
var E = parseFloat(m[1]), T = (m[2] || "ms").toLowerCase();
|
|
4225
|
+
switch (T) {
|
|
4199
4226
|
case "years":
|
|
4200
4227
|
case "year":
|
|
4201
4228
|
case "yrs":
|
|
@@ -4248,9 +4275,9 @@ function zs() {
|
|
|
4248
4275
|
var m = Math.abs(g);
|
|
4249
4276
|
return m >= o ? w(g, m, o, "day") : m >= r ? w(g, m, r, "hour") : m >= e ? w(g, m, e, "minute") : m >= t ? w(g, m, t, "second") : g + " ms";
|
|
4250
4277
|
}
|
|
4251
|
-
function w(g, m, E,
|
|
4252
|
-
var
|
|
4253
|
-
return Math.round(g / E) + " " +
|
|
4278
|
+
function w(g, m, E, T) {
|
|
4279
|
+
var N = m >= E * 1.5;
|
|
4280
|
+
return Math.round(g / E) + " " + T + (N ? "s" : "");
|
|
4254
4281
|
}
|
|
4255
4282
|
return Kt;
|
|
4256
4283
|
}
|
|
@@ -4266,7 +4293,7 @@ function Ks(t) {
|
|
|
4266
4293
|
}
|
|
4267
4294
|
r.selectColor = e;
|
|
4268
4295
|
function r(g) {
|
|
4269
|
-
let m, E = null,
|
|
4296
|
+
let m, E = null, T, N;
|
|
4270
4297
|
function P(...K) {
|
|
4271
4298
|
if (!P.enabled)
|
|
4272
4299
|
return;
|
|
@@ -4288,7 +4315,7 @@ function Ks(t) {
|
|
|
4288
4315
|
return P.namespace = g, P.useColors = r.useColors(), P.color = r.selectColor(g), P.extend = o, P.destroy = r.destroy, Object.defineProperty(P, "enabled", {
|
|
4289
4316
|
enumerable: !0,
|
|
4290
4317
|
configurable: !1,
|
|
4291
|
-
get: () => E !== null ? E : (
|
|
4318
|
+
get: () => E !== null ? E : (T !== r.namespaces && (T = r.namespaces, N = r.enabled(g)), N),
|
|
4292
4319
|
set: (K) => {
|
|
4293
4320
|
E = K;
|
|
4294
4321
|
}
|
|
@@ -4301,8 +4328,8 @@ function Ks(t) {
|
|
|
4301
4328
|
function s(g) {
|
|
4302
4329
|
r.save(g), r.namespaces = g, r.names = [], r.skips = [];
|
|
4303
4330
|
let m;
|
|
4304
|
-
const E = (typeof g == "string" ? g : "").split(/[\s,]+/),
|
|
4305
|
-
for (m = 0; m <
|
|
4331
|
+
const E = (typeof g == "string" ? g : "").split(/[\s,]+/), T = E.length;
|
|
4332
|
+
for (m = 0; m < T; m++)
|
|
4306
4333
|
E[m] && (g = E[m].replace(/\*/g, ".*?"), g[0] === "-" ? r.skips.push(new RegExp("^" + g.slice(1) + "$")) : r.names.push(new RegExp("^" + g + "$")));
|
|
4307
4334
|
}
|
|
4308
4335
|
function u() {
|
|
@@ -4824,7 +4851,7 @@ yr.exports.express = function(t) {
|
|
|
4824
4851
|
};
|
|
4825
4852
|
var ga = yr.exports;
|
|
4826
4853
|
const ma = /* @__PURE__ */ Yn(ga);
|
|
4827
|
-
function
|
|
4854
|
+
function La(t, e = !0, r = !0) {
|
|
4828
4855
|
const o = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", s = ma(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4829
4856
|
return s.use(Bi), s.use(Ei, { sdkKey: t, host: o }), s.use(xi), s.use(Oi), s.use(co), s.use(Ji), r && s.after(async (u, l, f) => {
|
|
4830
4857
|
if (u)
|
|
@@ -4835,5 +4862,5 @@ function Na(t, e = !0, r = !0) {
|
|
|
4835
4862
|
}), s;
|
|
4836
4863
|
}
|
|
4837
4864
|
export {
|
|
4838
|
-
|
|
4865
|
+
La as StreamLayer
|
|
4839
4866
|
};
|