@ikonai/sdk 1.0.3 → 1.0.5
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/assets/{audio-playback-worker-YOW1Tosq.js → audio-playback-worker-DPybcm1k.js} +174 -154
- package/assets/{protocol-worker-BnPqA34K.js → protocol-worker-DIKCgk1A.js} +69 -73
- package/assets/{video-capture-worker-y4Nlx7f9.js → video-capture-worker-DP3lFDjq.js} +62 -62
- package/assets/{video-playback-worker-CRGdbDmu.js → video-playback-worker-qauTQ7Et.js} +260 -240
- package/index.js +739 -719
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
const xr = {
|
|
2
|
+
Compressed: 8
|
|
3
|
+
};
|
|
4
|
+
function ml(t) {
|
|
2
5
|
return t;
|
|
3
6
|
}
|
|
4
7
|
function ue(t) {
|
|
@@ -13,7 +16,7 @@ function ne(t) {
|
|
|
13
16
|
const e = se(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
14
17
|
if (e.length < 27)
|
|
15
18
|
throw new Error("Protocol payload too short");
|
|
16
|
-
const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0),
|
|
19
|
+
const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0), l = r.getUint8(24), f = r.getUint8(25), d = r.getUint8(26);
|
|
17
20
|
if (27 + c * 4 > e.length)
|
|
18
21
|
throw new Error("Protocol header exceeds payload length");
|
|
19
22
|
const E = [];
|
|
@@ -27,32 +30,49 @@ function ne(t) {
|
|
|
27
30
|
trackId: o,
|
|
28
31
|
sequenceId: a,
|
|
29
32
|
targetIds: E,
|
|
30
|
-
payloadVersion:
|
|
33
|
+
payloadVersion: l,
|
|
31
34
|
payloadType: f,
|
|
32
35
|
flags: d
|
|
33
36
|
};
|
|
34
37
|
}
|
|
35
|
-
function Oe(t, e, r) {
|
|
38
|
+
async function Oe(t, e, r) {
|
|
36
39
|
const n = se(t), s = ne(n);
|
|
37
40
|
if (e !== void 0 && s.opcode !== e)
|
|
38
41
|
throw new Error(`Unexpected opcode ${s.opcode}`);
|
|
39
|
-
if (r !== void 0 && s.payloadVersion !== r)
|
|
40
|
-
throw new Error(`Unexpected payload version ${s.payloadVersion}`);
|
|
41
42
|
if (s.payloadType !== 8)
|
|
42
43
|
throw new Error(`Unexpected payload type ${s.payloadType}`);
|
|
43
44
|
const i = 27 + s.targetIds.length * 4;
|
|
44
|
-
|
|
45
|
+
let o = n.subarray(i, s.length);
|
|
46
|
+
return (s.flags & xr.Compressed) !== 0 && (o = await Vr(o)), o;
|
|
45
47
|
}
|
|
46
48
|
function F(t, e, r, n, s) {
|
|
47
|
-
const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [],
|
|
48
|
-
E.setUint32(0, d, !0), E.setUint32(4, t >>> 0, !0), E.setUint32(8, n >>> 0, !0), E.setUint32(12, i >>> 0, !0), E.setUint32(16, o >>> 0, !0), E.setUint32(20, c.length >>> 0, !0), E.setUint8(24, r & 255), E.setUint8(25,
|
|
49
|
+
const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], l = s?.payloadType ?? 8, f = 27 + c.length * 4, d = f + e.length, h = new Uint8Array(d), E = new DataView(h.buffer);
|
|
50
|
+
E.setUint32(0, d, !0), E.setUint32(4, t >>> 0, !0), E.setUint32(8, n >>> 0, !0), E.setUint32(12, i >>> 0, !0), E.setUint32(16, o >>> 0, !0), E.setUint32(20, c.length >>> 0, !0), E.setUint8(24, r & 255), E.setUint8(25, l & 255), E.setUint8(26, a & 255);
|
|
49
51
|
let m = 27;
|
|
50
52
|
for (let I = 0; I < c.length; I++)
|
|
51
53
|
E.setUint32(m, c[I] >>> 0, !0), m += 4;
|
|
52
54
|
return h.set(e, f), h;
|
|
53
55
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
async function Vr(t) {
|
|
57
|
+
if (typeof DecompressionStream > "u")
|
|
58
|
+
throw new Error("DecompressionStream not supported");
|
|
59
|
+
const e = new DecompressionStream("gzip"), r = e.writable.getWriter(), n = new Uint8Array(t);
|
|
60
|
+
r.write(n), r.close();
|
|
61
|
+
const s = e.readable.getReader(), i = [];
|
|
62
|
+
let o = 0;
|
|
63
|
+
for (; ; ) {
|
|
64
|
+
const { done: l, value: f } = await s.read();
|
|
65
|
+
if (l) break;
|
|
66
|
+
i.push(f), o += f.length;
|
|
67
|
+
}
|
|
68
|
+
const a = new Uint8Array(o);
|
|
69
|
+
let c = 0;
|
|
70
|
+
for (let l = 0; l < i.length; l++)
|
|
71
|
+
a.set(i[l], c), c += i[l].length;
|
|
72
|
+
return a;
|
|
73
|
+
}
|
|
74
|
+
var b = /* @__PURE__ */ ((t) => (t[t.Null = 1] = "Null", t[t.Bool = 2] = "Bool", t[t.Int32 = 3] = "Int32", t[t.Int64 = 4] = "Int64", t[t.UInt32 = 5] = "UInt32", t[t.UInt64 = 6] = "UInt64", t[t.Float32 = 7] = "Float32", t[t.Float64 = 8] = "Float64", t[t.Array = 9] = "Array", t[t.Dict = 10] = "Dict", t[t.Object = 11] = "Object", t[t.String = 12] = "String", t[t.Binary = 13] = "Binary", t[t.Guid = 14] = "Guid", t))(b || {});
|
|
75
|
+
const ht = 161, dt = 162, he = new TextEncoder(), Wr = new TextDecoder("utf-8", { fatal: !0 });
|
|
56
76
|
class D {
|
|
57
77
|
constructor(e = 1) {
|
|
58
78
|
this.version = e, this.buffer.writeByte(ht), this.buffer.writeVarUInt(e >>> 0);
|
|
@@ -107,7 +127,7 @@ class D {
|
|
|
107
127
|
this.writeVariableField(e, 9, i);
|
|
108
128
|
}
|
|
109
129
|
writeDictionaryField(e, r, n, s) {
|
|
110
|
-
const i = new
|
|
130
|
+
const i = new Le(r, n);
|
|
111
131
|
s(i);
|
|
112
132
|
const o = i.finish();
|
|
113
133
|
this.writeVariableField(e, 10, o);
|
|
@@ -122,7 +142,7 @@ class D {
|
|
|
122
142
|
this.writeFieldHeader(e, r, n.length), this.buffer.writeBytes(n);
|
|
123
143
|
}
|
|
124
144
|
writeFieldHeader(e, r, n) {
|
|
125
|
-
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(de(r)),
|
|
145
|
+
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(de(r)), jr(r) && this.buffer.writeVarUInt(n >>> 0);
|
|
126
146
|
}
|
|
127
147
|
}
|
|
128
148
|
class _e {
|
|
@@ -222,7 +242,7 @@ class _e {
|
|
|
222
242
|
10
|
|
223
243
|
/* Dict */
|
|
224
244
|
), this.count++;
|
|
225
|
-
const s = new
|
|
245
|
+
const s = new Le(e, r);
|
|
226
246
|
n(s);
|
|
227
247
|
const i = s.finish();
|
|
228
248
|
this.payload.writeBytes(i);
|
|
@@ -233,12 +253,12 @@ class _e {
|
|
|
233
253
|
}
|
|
234
254
|
ensureElementType(e) {
|
|
235
255
|
if (this.elementType !== e)
|
|
236
|
-
throw new Error(`Array element type is ${
|
|
256
|
+
throw new Error(`Array element type is ${b[this.elementType]}, expected ${b[e]}`);
|
|
237
257
|
}
|
|
238
258
|
}
|
|
239
|
-
class
|
|
259
|
+
class Le {
|
|
240
260
|
constructor(e, r) {
|
|
241
|
-
this.keyType = e, this.valueType = r,
|
|
261
|
+
this.keyType = e, this.valueType = r, Fe(e);
|
|
242
262
|
}
|
|
243
263
|
payload = new H();
|
|
244
264
|
count = 0;
|
|
@@ -246,7 +266,7 @@ class Me {
|
|
|
246
266
|
beginEntry() {
|
|
247
267
|
if (this.entryOpen)
|
|
248
268
|
throw new Error("Previous dictionary entry not completed");
|
|
249
|
-
return this.count++, this.entryOpen = !0, new
|
|
269
|
+
return this.count++, this.entryOpen = !0, new Hr(this.keyType, this.valueType, this.payload, () => {
|
|
250
270
|
this.entryOpen = !1;
|
|
251
271
|
});
|
|
252
272
|
}
|
|
@@ -257,7 +277,7 @@ class Me {
|
|
|
257
277
|
return e.writeByte(de(this.keyType)), e.writeByte(de(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
|
|
258
278
|
}
|
|
259
279
|
}
|
|
260
|
-
class
|
|
280
|
+
class Hr {
|
|
261
281
|
constructor(e, r, n, s) {
|
|
262
282
|
this.keyType = e, this.valueType = r, this.payload = n, this.onComplete = s;
|
|
263
283
|
}
|
|
@@ -427,7 +447,7 @@ class Vr {
|
|
|
427
447
|
10
|
|
428
448
|
/* Dict */
|
|
429
449
|
);
|
|
430
|
-
const s = new
|
|
450
|
+
const s = new Le(e, r);
|
|
431
451
|
n(s);
|
|
432
452
|
const i = s.finish();
|
|
433
453
|
this.payload.writeBytes(i), this.valueWritten = !0;
|
|
@@ -441,11 +461,11 @@ class Vr {
|
|
|
441
461
|
}
|
|
442
462
|
ensureKeyType(e) {
|
|
443
463
|
if (this.keyType !== e)
|
|
444
|
-
throw new Error(`Dictionary key type is ${
|
|
464
|
+
throw new Error(`Dictionary key type is ${b[this.keyType]}, expected ${b[e]}`);
|
|
445
465
|
}
|
|
446
466
|
ensureValueType(e) {
|
|
447
467
|
if (this.valueType !== e)
|
|
448
|
-
throw new Error(`Dictionary value type is ${
|
|
468
|
+
throw new Error(`Dictionary value type is ${b[this.valueType]}, expected ${b[e]}`);
|
|
449
469
|
}
|
|
450
470
|
}
|
|
451
471
|
class z {
|
|
@@ -468,7 +488,7 @@ class z {
|
|
|
468
488
|
return null;
|
|
469
489
|
if (this.offset + 5 > this.buffer.length)
|
|
470
490
|
throw new Error("Teleport object truncated");
|
|
471
|
-
const e =
|
|
491
|
+
const e = zr(this.buffer, this.offset);
|
|
472
492
|
this.offset += 4;
|
|
473
493
|
const r = this.buffer[this.offset++], n = r >> 4 & 15;
|
|
474
494
|
if ((r & 15) !== 0)
|
|
@@ -481,7 +501,7 @@ class z {
|
|
|
481
501
|
const o = { offset: this.offset }, a = U(this.buffer, o, "InvalidLength");
|
|
482
502
|
C(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
|
|
483
503
|
}
|
|
484
|
-
return new
|
|
504
|
+
return new $r(e, n, i);
|
|
485
505
|
}
|
|
486
506
|
}
|
|
487
507
|
class P {
|
|
@@ -546,7 +566,7 @@ class P {
|
|
|
546
566
|
return this.ensureType(
|
|
547
567
|
12
|
|
548
568
|
/* String */
|
|
549
|
-
),
|
|
569
|
+
), Wr.decode(this.payload);
|
|
550
570
|
}
|
|
551
571
|
asGuid() {
|
|
552
572
|
return this.ensureType(
|
|
@@ -564,20 +584,20 @@ class P {
|
|
|
564
584
|
return this.ensureType(
|
|
565
585
|
9
|
|
566
586
|
/* Array */
|
|
567
|
-
),
|
|
587
|
+
), ve.create(this.payload);
|
|
568
588
|
}
|
|
569
589
|
asDictionary() {
|
|
570
590
|
return this.ensureType(
|
|
571
591
|
10
|
|
572
592
|
/* Dict */
|
|
573
|
-
),
|
|
593
|
+
), Pe.create(this.payload);
|
|
574
594
|
}
|
|
575
595
|
ensureType(e) {
|
|
576
596
|
if (this.type !== e)
|
|
577
|
-
throw new Error(`Teleport value has type ${
|
|
597
|
+
throw new Error(`Teleport value has type ${b[this.type]}, expected ${b[e]}`);
|
|
578
598
|
}
|
|
579
599
|
}
|
|
580
|
-
class
|
|
600
|
+
class $r extends P {
|
|
581
601
|
constructor(e, r, n) {
|
|
582
602
|
super(r, n), this.fieldId = e;
|
|
583
603
|
}
|
|
@@ -585,7 +605,7 @@ class Wr extends P {
|
|
|
585
605
|
return this.type === 1;
|
|
586
606
|
}
|
|
587
607
|
}
|
|
588
|
-
class
|
|
608
|
+
class ve {
|
|
589
609
|
payload;
|
|
590
610
|
elementType;
|
|
591
611
|
count;
|
|
@@ -601,7 +621,7 @@ class Le {
|
|
|
601
621
|
this.count = U(e, n, "ArrayMalformed"), this.offset = n.offset;
|
|
602
622
|
}
|
|
603
623
|
static create(e) {
|
|
604
|
-
return new
|
|
624
|
+
return new ve(se(e));
|
|
605
625
|
}
|
|
606
626
|
next() {
|
|
607
627
|
if (this.index >= this.count) {
|
|
@@ -641,15 +661,15 @@ class Le {
|
|
|
641
661
|
return this.offset = e.offset + r, new q(11, n);
|
|
642
662
|
}
|
|
643
663
|
case 9: {
|
|
644
|
-
const e =
|
|
664
|
+
const e = Be(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
645
665
|
return this.offset += e, new q(9, r);
|
|
646
666
|
}
|
|
647
667
|
case 10: {
|
|
648
|
-
const e =
|
|
668
|
+
const e = Ge(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
649
669
|
return this.offset += e, new q(10, r);
|
|
650
670
|
}
|
|
651
671
|
default:
|
|
652
|
-
throw new Error(`Unsupported array element type ${
|
|
672
|
+
throw new Error(`Unsupported array element type ${b[this.elementType]}`);
|
|
653
673
|
}
|
|
654
674
|
}
|
|
655
675
|
}
|
|
@@ -658,7 +678,7 @@ class q extends P {
|
|
|
658
678
|
super(e, r);
|
|
659
679
|
}
|
|
660
680
|
}
|
|
661
|
-
class
|
|
681
|
+
class Pe {
|
|
662
682
|
payload;
|
|
663
683
|
keyType;
|
|
664
684
|
valueType;
|
|
@@ -670,12 +690,12 @@ class ve {
|
|
|
670
690
|
throw new Error("Dictionary payload too short");
|
|
671
691
|
if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
|
|
672
692
|
throw new Error("Dictionary key/value flags must be zero");
|
|
673
|
-
|
|
693
|
+
Fe(this.keyType);
|
|
674
694
|
const r = { offset: 2 };
|
|
675
695
|
this.count = U(e, r, "DictMalformed"), this.offset = r.offset;
|
|
676
696
|
}
|
|
677
697
|
static create(e) {
|
|
678
|
-
return new
|
|
698
|
+
return new Pe(se(e));
|
|
679
699
|
}
|
|
680
700
|
next() {
|
|
681
701
|
if (this.index >= this.count) {
|
|
@@ -684,7 +704,7 @@ class ve {
|
|
|
684
704
|
return null;
|
|
685
705
|
}
|
|
686
706
|
const e = this.readKey(), r = this.readValue();
|
|
687
|
-
return this.index++, new
|
|
707
|
+
return this.index++, new Kr(e, r);
|
|
688
708
|
}
|
|
689
709
|
readKey() {
|
|
690
710
|
const e = Y(this.keyType);
|
|
@@ -717,11 +737,11 @@ class ve {
|
|
|
717
737
|
return this.offset = e.offset + r, new P(11, n);
|
|
718
738
|
}
|
|
719
739
|
case 9: {
|
|
720
|
-
const e =
|
|
740
|
+
const e = Be(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
721
741
|
return this.offset += e, new P(9, r);
|
|
722
742
|
}
|
|
723
743
|
case 10: {
|
|
724
|
-
const e =
|
|
744
|
+
const e = Ge(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
|
|
725
745
|
return this.offset += e, new P(10, r);
|
|
726
746
|
}
|
|
727
747
|
case 3:
|
|
@@ -739,11 +759,11 @@ class ve {
|
|
|
739
759
|
return this.offset += e, new P(this.valueType, r);
|
|
740
760
|
}
|
|
741
761
|
default:
|
|
742
|
-
throw new Error(`Unsupported dictionary value type ${
|
|
762
|
+
throw new Error(`Unsupported dictionary value type ${b[this.valueType]}`);
|
|
743
763
|
}
|
|
744
764
|
}
|
|
745
765
|
}
|
|
746
|
-
class
|
|
766
|
+
class Kr {
|
|
747
767
|
constructor(e, r) {
|
|
748
768
|
this.key = e, this.value = r;
|
|
749
769
|
}
|
|
@@ -787,8 +807,8 @@ class _ {
|
|
|
787
807
|
_.toHex(_.readUInt32LE(e, 0), 8),
|
|
788
808
|
_.toHex(_.readUInt16LE(e, 4), 4),
|
|
789
809
|
_.toHex(_.readUInt16LE(e, 6), 4),
|
|
790
|
-
|
|
791
|
-
|
|
810
|
+
Xe(e.subarray(8, 10)),
|
|
811
|
+
Xe(e.subarray(10, 16))
|
|
792
812
|
].join("-");
|
|
793
813
|
}
|
|
794
814
|
asBytes() {
|
|
@@ -877,7 +897,7 @@ function U(t, e, r) {
|
|
|
877
897
|
for (; e.offset < t.length; ) {
|
|
878
898
|
const o = t[e.offset++];
|
|
879
899
|
if (i++, n |= (o & 127) << s, (o & 128) === 0) {
|
|
880
|
-
if (i !==
|
|
900
|
+
if (i !== Yr(n))
|
|
881
901
|
throw new Error("Teleport VarUInt is not canonical");
|
|
882
902
|
return n >>> 0;
|
|
883
903
|
}
|
|
@@ -886,7 +906,7 @@ function U(t, e, r) {
|
|
|
886
906
|
}
|
|
887
907
|
throw new Error(r);
|
|
888
908
|
}
|
|
889
|
-
function
|
|
909
|
+
function Yr(t) {
|
|
890
910
|
return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
|
|
891
911
|
}
|
|
892
912
|
function de(t, e = 0) {
|
|
@@ -894,7 +914,7 @@ function de(t, e = 0) {
|
|
|
894
914
|
throw new Error("Teleport flags must fit into 4 bits");
|
|
895
915
|
return (t & 15) << 4 | e & 15;
|
|
896
916
|
}
|
|
897
|
-
function
|
|
917
|
+
function jr(t) {
|
|
898
918
|
return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
|
|
899
919
|
}
|
|
900
920
|
function Y(t) {
|
|
@@ -917,7 +937,7 @@ function Y(t) {
|
|
|
917
937
|
return -1;
|
|
918
938
|
}
|
|
919
939
|
}
|
|
920
|
-
function
|
|
940
|
+
function Fe(t) {
|
|
921
941
|
if (t === 9 || t === 11 || t === 10 || t === 1)
|
|
922
942
|
throw new Error("Dictionary keys must be primitive Teleport types");
|
|
923
943
|
}
|
|
@@ -925,10 +945,10 @@ function C(t, e, r) {
|
|
|
925
945
|
if (e < 0 || r < 0 || e + r > t.length)
|
|
926
946
|
throw new Error("Teleport payload exceeds bounds");
|
|
927
947
|
}
|
|
928
|
-
function
|
|
948
|
+
function zr(t, e) {
|
|
929
949
|
return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
|
|
930
950
|
}
|
|
931
|
-
function
|
|
951
|
+
function Be(t, e) {
|
|
932
952
|
if (e >= t.length)
|
|
933
953
|
throw new Error("Array payload exceeds bounds");
|
|
934
954
|
const r = t[e], n = r >> 4 & 15;
|
|
@@ -941,23 +961,23 @@ function Fe(t, e) {
|
|
|
941
961
|
}
|
|
942
962
|
let a = s.offset;
|
|
943
963
|
for (let c = 0; c < i; c++)
|
|
944
|
-
a =
|
|
964
|
+
a = Ne(n, t, a, "ArrayMalformed");
|
|
945
965
|
return a - e;
|
|
946
966
|
}
|
|
947
|
-
function
|
|
967
|
+
function Ge(t, e) {
|
|
948
968
|
if (e + 2 > t.length)
|
|
949
969
|
throw new Error("Dictionary payload too short");
|
|
950
970
|
const r = t[e] >> 4 & 15, n = t[e + 1] >> 4 & 15;
|
|
951
971
|
if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
|
|
952
972
|
throw new Error("Dictionary key/value flags must be zero");
|
|
953
|
-
|
|
973
|
+
Fe(r);
|
|
954
974
|
const s = { offset: e + 2 }, i = U(t, s, "DictMalformed");
|
|
955
975
|
let o = s.offset;
|
|
956
976
|
for (let a = 0; a < i; a++)
|
|
957
|
-
o =
|
|
977
|
+
o = Ne(r, t, o, "DictMalformed"), o = Ne(n, t, o, "DictMalformed");
|
|
958
978
|
return o - e;
|
|
959
979
|
}
|
|
960
|
-
function
|
|
980
|
+
function Ne(t, e, r, n) {
|
|
961
981
|
const s = Y(t);
|
|
962
982
|
if (s >= 0)
|
|
963
983
|
return C(e, r, s), r + s;
|
|
@@ -972,86 +992,86 @@ function ye(t, e, r, n) {
|
|
|
972
992
|
return C(e, i.offset, o), i.offset + o;
|
|
973
993
|
}
|
|
974
994
|
case 9:
|
|
975
|
-
return r + Fe(e, r);
|
|
976
|
-
case 10:
|
|
977
995
|
return r + Be(e, r);
|
|
996
|
+
case 10:
|
|
997
|
+
return r + Ge(e, r);
|
|
978
998
|
default:
|
|
979
|
-
throw new Error(`Unsupported Teleport type ${
|
|
999
|
+
throw new Error(`Unsupported Teleport type ${b[t]}`);
|
|
980
1000
|
}
|
|
981
1001
|
}
|
|
982
|
-
function
|
|
1002
|
+
function Xe(t) {
|
|
983
1003
|
return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
984
1004
|
}
|
|
985
1005
|
function se(t) {
|
|
986
1006
|
return t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
987
1007
|
}
|
|
988
|
-
var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), X = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(X || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(J || {}), k = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(k || {}), Q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Q || {}), Et = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Et || {}), Z = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Z || {}), pt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(pt || {}), Ge = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(Ge || {}), S = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.ANALYTICS_DEVTOOLS_CONSOLE_OUTPUT = 524297] = "ANALYTICS_DEVTOOLS_CONSOLE_OUTPUT", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(S || {});
|
|
989
|
-
const It = 1,
|
|
990
|
-
function
|
|
1008
|
+
var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), X = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(X || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(J || {}), k = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(k || {}), Q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Q || {}), Et = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Et || {}), Z = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Z || {}), pt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(pt || {}), xe = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(xe || {}), S = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(S || {});
|
|
1009
|
+
const It = 1, Xr = 1048637, Jr = 727023925, Qr = 3395085689;
|
|
1010
|
+
function Zr(t) {
|
|
991
1011
|
const e = new D(It);
|
|
992
|
-
return
|
|
1012
|
+
return qr(t, e), e.finish();
|
|
993
1013
|
}
|
|
994
|
-
function
|
|
995
|
-
e.writeGuidField(
|
|
1014
|
+
function qr(t, e) {
|
|
1015
|
+
e.writeGuidField(Jr, t.ActionId), e.writeStringField(Qr, t.PayloadJson);
|
|
996
1016
|
}
|
|
997
|
-
function
|
|
998
|
-
const n =
|
|
999
|
-
return F(
|
|
1017
|
+
function en(t, e, r) {
|
|
1018
|
+
const n = Zr(t);
|
|
1019
|
+
return F(Xr, n, It, e, r);
|
|
1000
1020
|
}
|
|
1001
|
-
const
|
|
1002
|
-
function
|
|
1021
|
+
const tn = 467348717, rn = 972460562, nn = 1911490601, sn = 2603556958, on = 3609695522, an = 4094837378, cn = 4257460908;
|
|
1022
|
+
function ln(t) {
|
|
1003
1023
|
const e = {};
|
|
1004
1024
|
return mt(e), e;
|
|
1005
1025
|
}
|
|
1006
1026
|
function mt(t) {
|
|
1007
1027
|
return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId = _.fromBytes(new Uint8Array(16)), t;
|
|
1008
1028
|
}
|
|
1009
|
-
function
|
|
1010
|
-
const r = e ??
|
|
1011
|
-
return mt(r),
|
|
1029
|
+
function un(t, e) {
|
|
1030
|
+
const r = e ?? ln();
|
|
1031
|
+
return mt(r), hn(t, r), r;
|
|
1012
1032
|
}
|
|
1013
|
-
function
|
|
1033
|
+
function hn(t, e) {
|
|
1014
1034
|
let r;
|
|
1015
1035
|
for (; (r = t.next()) !== null; )
|
|
1016
1036
|
switch (r.fieldId) {
|
|
1017
|
-
case
|
|
1037
|
+
case tn: {
|
|
1018
1038
|
if (r.isNull) throw new Error();
|
|
1019
1039
|
e.EnumerationId = r.asGuid();
|
|
1020
1040
|
break;
|
|
1021
1041
|
}
|
|
1022
|
-
case
|
|
1042
|
+
case rn: {
|
|
1023
1043
|
if (r.isNull) throw new Error();
|
|
1024
1044
|
e.EnumerableItemTypeName = r.asString();
|
|
1025
1045
|
break;
|
|
1026
1046
|
}
|
|
1027
|
-
case
|
|
1047
|
+
case nn: {
|
|
1028
1048
|
if (r.isNull) throw new Error();
|
|
1029
1049
|
e.ValueJson = r.asString();
|
|
1030
1050
|
break;
|
|
1031
1051
|
}
|
|
1032
|
-
case
|
|
1052
|
+
case sn: {
|
|
1033
1053
|
if (r.isNull) throw new Error();
|
|
1034
1054
|
e.IsEnumerable = r.asBool();
|
|
1035
1055
|
break;
|
|
1036
1056
|
}
|
|
1037
|
-
case
|
|
1057
|
+
case on: {
|
|
1038
1058
|
if (r.isNull) throw new Error();
|
|
1039
1059
|
e.TypeName = r.asString();
|
|
1040
1060
|
break;
|
|
1041
1061
|
}
|
|
1042
|
-
case
|
|
1062
|
+
case an: {
|
|
1043
1063
|
if (r.isNull) throw new Error();
|
|
1044
1064
|
e.ValueData = r.asBinary();
|
|
1045
1065
|
break;
|
|
1046
1066
|
}
|
|
1047
|
-
case
|
|
1067
|
+
case cn: {
|
|
1048
1068
|
if (r.isNull) throw new Error();
|
|
1049
1069
|
e.ParameterIndex = r.asInt32();
|
|
1050
1070
|
break;
|
|
1051
1071
|
}
|
|
1052
1072
|
}
|
|
1053
1073
|
}
|
|
1054
|
-
const
|
|
1074
|
+
const dn = 265814330, fn = 1368629611, En = 2431514951, pn = 2914494629, In = 3284746250, mn = 4101844078;
|
|
1055
1075
|
function _t(t) {
|
|
1056
1076
|
const e = {};
|
|
1057
1077
|
return Tt(e), e;
|
|
@@ -1059,235 +1079,235 @@ function _t(t) {
|
|
|
1059
1079
|
function Tt(t) {
|
|
1060
1080
|
return t.Description = "", t.Codec = ft.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t.ShapeSets = void 0, t;
|
|
1061
1081
|
}
|
|
1062
|
-
function
|
|
1082
|
+
function _n(t, e) {
|
|
1063
1083
|
const r = e ?? _t();
|
|
1064
|
-
return Tt(r),
|
|
1084
|
+
return Tt(r), Tn(t, r), r;
|
|
1065
1085
|
}
|
|
1066
|
-
function
|
|
1086
|
+
function Tn(t, e) {
|
|
1067
1087
|
let r;
|
|
1068
1088
|
for (; (r = t.next()) !== null; )
|
|
1069
1089
|
switch (r.fieldId) {
|
|
1070
|
-
case
|
|
1090
|
+
case dn: {
|
|
1071
1091
|
if (r.isNull) {
|
|
1072
1092
|
e.ShapeSets = void 0;
|
|
1073
1093
|
break;
|
|
1074
1094
|
}
|
|
1075
|
-
e.ShapeSets =
|
|
1095
|
+
e.ShapeSets = Sn(r.asArray());
|
|
1076
1096
|
break;
|
|
1077
1097
|
}
|
|
1078
|
-
case
|
|
1098
|
+
case fn: {
|
|
1079
1099
|
if (r.isNull) throw new Error();
|
|
1080
1100
|
e.Description = r.asString();
|
|
1081
1101
|
break;
|
|
1082
1102
|
}
|
|
1083
|
-
case
|
|
1103
|
+
case En: {
|
|
1084
1104
|
if (r.isNull) throw new Error();
|
|
1085
1105
|
e.Channels = r.asInt32();
|
|
1086
1106
|
break;
|
|
1087
1107
|
}
|
|
1088
|
-
case
|
|
1108
|
+
case pn: {
|
|
1089
1109
|
if (r.isNull) throw new Error();
|
|
1090
1110
|
e.BitDepth = r.asInt32();
|
|
1091
1111
|
break;
|
|
1092
1112
|
}
|
|
1093
|
-
case
|
|
1113
|
+
case In: {
|
|
1094
1114
|
if (r.isNull) throw new Error();
|
|
1095
1115
|
e.Codec = r.asInt32();
|
|
1096
1116
|
break;
|
|
1097
1117
|
}
|
|
1098
|
-
case
|
|
1118
|
+
case mn: {
|
|
1099
1119
|
if (r.isNull) throw new Error();
|
|
1100
1120
|
e.SampleRate = r.asInt32();
|
|
1101
1121
|
break;
|
|
1102
1122
|
}
|
|
1103
1123
|
}
|
|
1104
1124
|
}
|
|
1105
|
-
function
|
|
1125
|
+
function Sn(t) {
|
|
1106
1126
|
const e = [];
|
|
1107
1127
|
let r;
|
|
1108
1128
|
for (; (r = t.next()) !== null; )
|
|
1109
|
-
e.push(
|
|
1129
|
+
e.push(gn(r.asObject()));
|
|
1110
1130
|
return e;
|
|
1111
1131
|
}
|
|
1112
|
-
const
|
|
1113
|
-
function
|
|
1132
|
+
const wn = 1107713536, An = 1154362099, yn = 1185721362;
|
|
1133
|
+
function Nn(t) {
|
|
1114
1134
|
const e = {};
|
|
1115
1135
|
return St(e), e;
|
|
1116
1136
|
}
|
|
1117
1137
|
function St(t) {
|
|
1118
1138
|
return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
|
|
1119
1139
|
}
|
|
1120
|
-
function
|
|
1121
|
-
const r = e ??
|
|
1122
|
-
return St(r),
|
|
1140
|
+
function gn(t, e) {
|
|
1141
|
+
const r = e ?? Nn();
|
|
1142
|
+
return St(r), Cn(t, r), r;
|
|
1123
1143
|
}
|
|
1124
|
-
function
|
|
1144
|
+
function Cn(t, e) {
|
|
1125
1145
|
let r;
|
|
1126
1146
|
for (; (r = t.next()) !== null; )
|
|
1127
1147
|
switch (r.fieldId) {
|
|
1128
|
-
case
|
|
1148
|
+
case wn: {
|
|
1129
1149
|
if (r.isNull) throw new Error();
|
|
1130
1150
|
e.Name = r.asString();
|
|
1131
1151
|
break;
|
|
1132
1152
|
}
|
|
1133
|
-
case
|
|
1153
|
+
case An: {
|
|
1134
1154
|
if (r.isNull) throw new Error();
|
|
1135
1155
|
e.SetId = r.asUInt32();
|
|
1136
1156
|
break;
|
|
1137
1157
|
}
|
|
1138
|
-
case
|
|
1158
|
+
case yn: {
|
|
1139
1159
|
if (r.isNull) throw new Error();
|
|
1140
|
-
e.ShapeNames =
|
|
1160
|
+
e.ShapeNames = bn(r.asArray());
|
|
1141
1161
|
break;
|
|
1142
1162
|
}
|
|
1143
1163
|
}
|
|
1144
1164
|
}
|
|
1145
|
-
function
|
|
1165
|
+
function bn(t) {
|
|
1146
1166
|
const e = [];
|
|
1147
1167
|
let r;
|
|
1148
1168
|
for (; (r = t.next()) !== null; )
|
|
1149
1169
|
e.push(r.asString());
|
|
1150
1170
|
return e;
|
|
1151
1171
|
}
|
|
1152
|
-
const
|
|
1153
|
-
function
|
|
1172
|
+
const Rn = 76337612, kn = 185396121, Un = 388632637, Dn = 417197284, Mn = 469070965, On = 470595159, Ln = 781727218, vn = 834078886, Pn = 1043273762, Fn = 1236999138, Bn = 1368629611, Gn = 1715899485, xn = 1942830531, Vn = 1999510636, Wn = 2079864626, Hn = 2142346422, $n = 2598291686, Kn = 2719718823, Yn = 2810953526, jn = 2840065720, zn = 2885165957, Xn = 3586157513, Jn = 3717933110, Qn = 4062655306;
|
|
1173
|
+
function ge(t) {
|
|
1154
1174
|
const e = {};
|
|
1155
1175
|
return wt(e), e;
|
|
1156
1176
|
}
|
|
1157
1177
|
function wt(t) {
|
|
1158
|
-
return t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = X.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType =
|
|
1178
|
+
return t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = X.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = xe.Unknown, t;
|
|
1159
1179
|
}
|
|
1160
|
-
function
|
|
1161
|
-
const r = e ??
|
|
1162
|
-
return wt(r),
|
|
1180
|
+
function Ce(t, e) {
|
|
1181
|
+
const r = e ?? ge();
|
|
1182
|
+
return wt(r), Zn(t, r), r;
|
|
1163
1183
|
}
|
|
1164
|
-
function
|
|
1184
|
+
function Zn(t, e) {
|
|
1165
1185
|
let r;
|
|
1166
1186
|
for (; (r = t.next()) !== null; )
|
|
1167
1187
|
switch (r.fieldId) {
|
|
1168
|
-
case
|
|
1188
|
+
case Rn: {
|
|
1169
1189
|
if (r.isNull) throw new Error();
|
|
1170
1190
|
e.DeviceId = r.asString();
|
|
1171
1191
|
break;
|
|
1172
1192
|
}
|
|
1173
|
-
case
|
|
1193
|
+
case kn: {
|
|
1174
1194
|
if (r.isNull) throw new Error();
|
|
1175
1195
|
e.InstallId = r.asString();
|
|
1176
1196
|
break;
|
|
1177
1197
|
}
|
|
1178
|
-
case
|
|
1198
|
+
case Un: {
|
|
1179
1199
|
if (r.isNull) throw new Error();
|
|
1180
1200
|
e.UserAgent = r.asString();
|
|
1181
1201
|
break;
|
|
1182
1202
|
}
|
|
1183
|
-
case
|
|
1203
|
+
case Dn: {
|
|
1184
1204
|
if (r.isNull) throw new Error();
|
|
1185
1205
|
e.ContextType = r.asInt32();
|
|
1186
1206
|
break;
|
|
1187
1207
|
}
|
|
1188
|
-
case
|
|
1208
|
+
case Mn: {
|
|
1189
1209
|
if (r.isNull) throw new Error();
|
|
1190
1210
|
e.HasInput = r.asBool();
|
|
1191
1211
|
break;
|
|
1192
1212
|
}
|
|
1193
|
-
case
|
|
1213
|
+
case On: {
|
|
1194
1214
|
if (r.isNull) throw new Error();
|
|
1195
1215
|
e.UserType = r.asInt32();
|
|
1196
1216
|
break;
|
|
1197
1217
|
}
|
|
1198
|
-
case
|
|
1218
|
+
case Ln: {
|
|
1199
1219
|
if (r.isNull) throw new Error();
|
|
1200
1220
|
e.UserId = r.asString();
|
|
1201
1221
|
break;
|
|
1202
1222
|
}
|
|
1203
|
-
case
|
|
1223
|
+
case vn: {
|
|
1204
1224
|
if (r.isNull) throw new Error();
|
|
1205
1225
|
e.ProductId = r.asString();
|
|
1206
1226
|
break;
|
|
1207
1227
|
}
|
|
1208
|
-
case
|
|
1228
|
+
case Pn: {
|
|
1209
1229
|
if (r.isNull) throw new Error();
|
|
1210
1230
|
e.AuthSessionId = r.asString();
|
|
1211
1231
|
break;
|
|
1212
1232
|
}
|
|
1213
|
-
case
|
|
1233
|
+
case Fn: {
|
|
1214
1234
|
if (r.isNull) throw new Error();
|
|
1215
1235
|
e.ReceiveAllMessages = r.asBool();
|
|
1216
1236
|
break;
|
|
1217
1237
|
}
|
|
1218
|
-
case
|
|
1238
|
+
case Bn: {
|
|
1219
1239
|
if (r.isNull) throw new Error();
|
|
1220
1240
|
e.Description = r.asString();
|
|
1221
1241
|
break;
|
|
1222
1242
|
}
|
|
1223
|
-
case
|
|
1243
|
+
case Gn: {
|
|
1224
1244
|
if (r.isNull) throw new Error();
|
|
1225
1245
|
e.Locale = r.asString();
|
|
1226
1246
|
break;
|
|
1227
1247
|
}
|
|
1228
|
-
case
|
|
1248
|
+
case xn: {
|
|
1229
1249
|
if (r.isNull) throw new Error();
|
|
1230
1250
|
e.SdkType = r.asInt32();
|
|
1231
1251
|
break;
|
|
1232
1252
|
}
|
|
1233
|
-
case
|
|
1253
|
+
case Vn: {
|
|
1234
1254
|
if (r.isNull) throw new Error();
|
|
1235
1255
|
e.SessionId = r.asInt32();
|
|
1236
1256
|
break;
|
|
1237
1257
|
}
|
|
1238
|
-
case
|
|
1258
|
+
case Wn: {
|
|
1239
1259
|
if (r.isNull) throw new Error();
|
|
1240
1260
|
e.PreciseJoinedAt = r.asUInt64();
|
|
1241
1261
|
break;
|
|
1242
1262
|
}
|
|
1243
|
-
case
|
|
1263
|
+
case Hn: {
|
|
1244
1264
|
if (r.isNull) throw new Error();
|
|
1245
1265
|
e.PayloadType = r.asInt32();
|
|
1246
1266
|
break;
|
|
1247
1267
|
}
|
|
1248
|
-
case
|
|
1268
|
+
case $n: {
|
|
1249
1269
|
if (r.isNull) throw new Error();
|
|
1250
1270
|
e.VersionId = r.asString();
|
|
1251
1271
|
break;
|
|
1252
1272
|
}
|
|
1253
|
-
case
|
|
1273
|
+
case Kn: {
|
|
1254
1274
|
if (r.isNull) throw new Error();
|
|
1255
1275
|
e.UniqueSessionId = r.asString();
|
|
1256
1276
|
break;
|
|
1257
1277
|
}
|
|
1258
|
-
case
|
|
1278
|
+
case Yn: {
|
|
1259
1279
|
if (r.isNull) throw new Error();
|
|
1260
1280
|
e.ClientType = r.asInt32();
|
|
1261
1281
|
break;
|
|
1262
1282
|
}
|
|
1263
|
-
case
|
|
1283
|
+
case jn: {
|
|
1264
1284
|
if (r.isNull) throw new Error();
|
|
1265
1285
|
e.IsReady = r.asBool();
|
|
1266
1286
|
break;
|
|
1267
1287
|
}
|
|
1268
|
-
case
|
|
1288
|
+
case zn: {
|
|
1269
1289
|
if (r.isNull) throw new Error();
|
|
1270
|
-
e.Parameters =
|
|
1290
|
+
e.Parameters = qn(r.asDictionary());
|
|
1271
1291
|
break;
|
|
1272
1292
|
}
|
|
1273
|
-
case
|
|
1293
|
+
case Xn: {
|
|
1274
1294
|
if (r.isNull) throw new Error();
|
|
1275
1295
|
e.IsInternal = r.asBool();
|
|
1276
1296
|
break;
|
|
1277
1297
|
}
|
|
1278
|
-
case
|
|
1298
|
+
case Jn: {
|
|
1279
1299
|
if (r.isNull) throw new Error();
|
|
1280
1300
|
e.ChannelLocale = r.asString();
|
|
1281
1301
|
break;
|
|
1282
1302
|
}
|
|
1283
|
-
case
|
|
1303
|
+
case Qn: {
|
|
1284
1304
|
if (r.isNull) throw new Error();
|
|
1285
1305
|
e.EmbeddedSpaceId = r.asString();
|
|
1286
1306
|
break;
|
|
1287
1307
|
}
|
|
1288
1308
|
}
|
|
1289
1309
|
}
|
|
1290
|
-
function
|
|
1310
|
+
function qn(t) {
|
|
1291
1311
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1292
1312
|
let r;
|
|
1293
1313
|
for (; (r = t.next()) !== null; ) {
|
|
@@ -1296,138 +1316,138 @@ function Qn(t) {
|
|
|
1296
1316
|
}
|
|
1297
1317
|
return e;
|
|
1298
1318
|
}
|
|
1299
|
-
const
|
|
1300
|
-
function
|
|
1319
|
+
const es = 746516514, ts = 877841741, rs = 1175184220, ns = 1368629611, ss = 2341021724, is = 3167053791, os = 3686066300;
|
|
1320
|
+
function as(t) {
|
|
1301
1321
|
const e = {};
|
|
1302
1322
|
return At(e), e;
|
|
1303
1323
|
}
|
|
1304
1324
|
function At(t) {
|
|
1305
1325
|
return t.Type = k.None, t.Uri = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t;
|
|
1306
1326
|
}
|
|
1307
|
-
function
|
|
1308
|
-
const r = e ??
|
|
1309
|
-
return At(r),
|
|
1327
|
+
function cs(t, e) {
|
|
1328
|
+
const r = e ?? as();
|
|
1329
|
+
return At(r), ls(t, r), r;
|
|
1310
1330
|
}
|
|
1311
|
-
function
|
|
1331
|
+
function ls(t, e) {
|
|
1312
1332
|
let r;
|
|
1313
1333
|
for (; (r = t.next()) !== null; )
|
|
1314
1334
|
switch (r.fieldId) {
|
|
1315
|
-
case
|
|
1335
|
+
case es: {
|
|
1316
1336
|
if (r.isNull) throw new Error();
|
|
1317
1337
|
e.AuthTicket = r.asBinary();
|
|
1318
1338
|
break;
|
|
1319
1339
|
}
|
|
1320
|
-
case
|
|
1340
|
+
case ts: {
|
|
1321
1341
|
if (r.isNull) throw new Error();
|
|
1322
1342
|
e.Priority = r.asInt32();
|
|
1323
1343
|
break;
|
|
1324
1344
|
}
|
|
1325
|
-
case
|
|
1345
|
+
case rs: {
|
|
1326
1346
|
if (r.isNull) throw new Error();
|
|
1327
1347
|
e.OpcodeGroupsFromServer = r.asInt32();
|
|
1328
1348
|
break;
|
|
1329
1349
|
}
|
|
1330
|
-
case
|
|
1350
|
+
case ns: {
|
|
1331
1351
|
if (r.isNull) throw new Error();
|
|
1332
1352
|
e.Description = r.asString();
|
|
1333
1353
|
break;
|
|
1334
1354
|
}
|
|
1335
|
-
case
|
|
1355
|
+
case ss: {
|
|
1336
1356
|
if (r.isNull) throw new Error();
|
|
1337
1357
|
e.Uri = r.asString();
|
|
1338
1358
|
break;
|
|
1339
1359
|
}
|
|
1340
|
-
case
|
|
1360
|
+
case is: {
|
|
1341
1361
|
if (r.isNull) throw new Error();
|
|
1342
1362
|
e.Type = r.asInt32();
|
|
1343
1363
|
break;
|
|
1344
1364
|
}
|
|
1345
|
-
case
|
|
1365
|
+
case os: {
|
|
1346
1366
|
if (r.isNull) throw new Error();
|
|
1347
1367
|
e.OpcodeGroupsToServer = r.asInt32();
|
|
1348
1368
|
break;
|
|
1349
1369
|
}
|
|
1350
1370
|
}
|
|
1351
1371
|
}
|
|
1352
|
-
const
|
|
1353
|
-
function
|
|
1372
|
+
const us = 65537, hs = 166277978, ds = 1482635149, fs = 1559330978, Es = 2802434353, ps = 3085883711, Is = 3669484338, ms = 3707543140, _s = 3712281496, Ts = 4160646707;
|
|
1373
|
+
function Ss(t) {
|
|
1354
1374
|
const e = {};
|
|
1355
1375
|
return yt(e), e;
|
|
1356
1376
|
}
|
|
1357
1377
|
function yt(t) {
|
|
1358
|
-
return t.ClientContext =
|
|
1359
|
-
}
|
|
1360
|
-
function Ss(t, e) {
|
|
1361
|
-
const r = z.create(t);
|
|
1362
|
-
return ws(r, e);
|
|
1378
|
+
return t.ClientContext = ge(), t.ServerContext = ge(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.PrimaryUserId = "", t.ChannelTemplateId = "", t;
|
|
1363
1379
|
}
|
|
1364
1380
|
function ws(t, e) {
|
|
1365
|
-
const r =
|
|
1366
|
-
return
|
|
1381
|
+
const r = z.create(t);
|
|
1382
|
+
return As(r, e);
|
|
1367
1383
|
}
|
|
1368
1384
|
function As(t, e) {
|
|
1385
|
+
const r = e ?? Ss();
|
|
1386
|
+
return yt(r), ys(t, r), r;
|
|
1387
|
+
}
|
|
1388
|
+
function ys(t, e) {
|
|
1369
1389
|
let r;
|
|
1370
1390
|
for (; (r = t.next()) !== null; )
|
|
1371
1391
|
switch (r.fieldId) {
|
|
1372
|
-
case us: {
|
|
1373
|
-
if (r.isNull) throw new Error();
|
|
1374
|
-
e.CertHash = r.asString();
|
|
1375
|
-
break;
|
|
1376
|
-
}
|
|
1377
1392
|
case hs: {
|
|
1378
1393
|
if (r.isNull) throw new Error();
|
|
1379
|
-
e.
|
|
1394
|
+
e.CertHash = r.asString();
|
|
1380
1395
|
break;
|
|
1381
1396
|
}
|
|
1382
1397
|
case ds: {
|
|
1383
1398
|
if (r.isNull) throw new Error();
|
|
1384
|
-
e.
|
|
1399
|
+
e.Entrypoints = gs(r.asArray());
|
|
1385
1400
|
break;
|
|
1386
1401
|
}
|
|
1387
1402
|
case fs: {
|
|
1388
1403
|
if (r.isNull) throw new Error();
|
|
1389
|
-
e.
|
|
1404
|
+
e.ChannelId = r.asString();
|
|
1390
1405
|
break;
|
|
1391
1406
|
}
|
|
1392
1407
|
case Es: {
|
|
1393
1408
|
if (r.isNull) throw new Error();
|
|
1394
|
-
e.
|
|
1409
|
+
e.ClientContext = Ce(r.asObject());
|
|
1395
1410
|
break;
|
|
1396
1411
|
}
|
|
1397
1412
|
case ps: {
|
|
1398
1413
|
if (r.isNull) throw new Error();
|
|
1399
|
-
e.
|
|
1414
|
+
e.ServerContext = Ce(r.asObject());
|
|
1400
1415
|
break;
|
|
1401
1416
|
}
|
|
1402
1417
|
case Is: {
|
|
1403
1418
|
if (r.isNull) throw new Error();
|
|
1404
|
-
e.
|
|
1419
|
+
e.FeatureFlags = Cs(r.asDictionary());
|
|
1405
1420
|
break;
|
|
1406
1421
|
}
|
|
1407
1422
|
case ms: {
|
|
1408
1423
|
if (r.isNull) throw new Error();
|
|
1409
|
-
e.
|
|
1424
|
+
e.SpaceId = r.asString();
|
|
1410
1425
|
break;
|
|
1411
1426
|
}
|
|
1412
1427
|
case _s: {
|
|
1428
|
+
if (r.isNull) throw new Error();
|
|
1429
|
+
e.PrimaryUserId = r.asString();
|
|
1430
|
+
break;
|
|
1431
|
+
}
|
|
1432
|
+
case Ts: {
|
|
1413
1433
|
if (r.isNull) throw new Error();
|
|
1414
1434
|
e.ChannelTemplateId = r.asString();
|
|
1415
1435
|
break;
|
|
1416
1436
|
}
|
|
1417
1437
|
}
|
|
1418
1438
|
}
|
|
1419
|
-
function
|
|
1420
|
-
const r = Oe(t,
|
|
1421
|
-
return
|
|
1439
|
+
async function Ns(t, e) {
|
|
1440
|
+
const r = await Oe(t, us);
|
|
1441
|
+
return ws(r, e);
|
|
1422
1442
|
}
|
|
1423
|
-
function
|
|
1443
|
+
function gs(t) {
|
|
1424
1444
|
const e = [];
|
|
1425
1445
|
let r;
|
|
1426
1446
|
for (; (r = t.next()) !== null; )
|
|
1427
|
-
e.push(
|
|
1447
|
+
e.push(cs(r.asObject()));
|
|
1428
1448
|
return e;
|
|
1429
1449
|
}
|
|
1430
|
-
function
|
|
1450
|
+
function Cs(t) {
|
|
1431
1451
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1432
1452
|
let r;
|
|
1433
1453
|
for (; (r = t.next()) !== null; ) {
|
|
@@ -1436,33 +1456,33 @@ function gs(t) {
|
|
|
1436
1456
|
}
|
|
1437
1457
|
return e;
|
|
1438
1458
|
}
|
|
1439
|
-
function
|
|
1459
|
+
function bs(t) {
|
|
1440
1460
|
const e = {};
|
|
1441
1461
|
return Rs(e), t && Object.assign(e, t), e;
|
|
1442
1462
|
}
|
|
1443
1463
|
function Rs(t) {
|
|
1444
|
-
return t.ServerSessionId = "", t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = X.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType =
|
|
1464
|
+
return t.ServerSessionId = "", t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = X.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = xe.Unknown, t;
|
|
1445
1465
|
}
|
|
1446
|
-
const Nt = 1,
|
|
1447
|
-
function
|
|
1466
|
+
const Nt = 1, ks = 1048632, Us = 3748161056, Ds = 4289118421;
|
|
1467
|
+
function Ms(t) {
|
|
1448
1468
|
const e = {};
|
|
1449
1469
|
return Os(e), t && Object.assign(e, t), e;
|
|
1450
1470
|
}
|
|
1451
1471
|
function Os(t) {
|
|
1452
1472
|
return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t;
|
|
1453
1473
|
}
|
|
1454
|
-
function
|
|
1474
|
+
function Ls(t) {
|
|
1455
1475
|
const e = new D(Nt);
|
|
1456
|
-
return
|
|
1476
|
+
return vs(t, e), e.finish();
|
|
1457
1477
|
}
|
|
1458
|
-
function
|
|
1459
|
-
e.writeGuidField(
|
|
1478
|
+
function vs(t, e) {
|
|
1479
|
+
e.writeGuidField(Us, t.CallId), e.writeGuidField(Ds, t.InstanceId);
|
|
1460
1480
|
}
|
|
1461
|
-
function
|
|
1462
|
-
const n =
|
|
1463
|
-
return F(
|
|
1481
|
+
function Ps(t, e, r) {
|
|
1482
|
+
const n = Ls(t);
|
|
1483
|
+
return F(ks, n, Nt, e, r);
|
|
1464
1484
|
}
|
|
1465
|
-
const
|
|
1485
|
+
const Fs = 1048601, Bs = 112005851, Gs = 814454131, xs = 976255570, Vs = 1123310456, Ws = 2885165957, Hs = 3748161056, $s = 4289118421;
|
|
1466
1486
|
function Ks(t) {
|
|
1467
1487
|
const e = {};
|
|
1468
1488
|
return gt(e), e;
|
|
@@ -1519,8 +1539,8 @@ function zs(t, e) {
|
|
|
1519
1539
|
}
|
|
1520
1540
|
}
|
|
1521
1541
|
}
|
|
1522
|
-
function Xs(t, e) {
|
|
1523
|
-
const r = Oe(t, Fs
|
|
1542
|
+
async function Xs(t, e) {
|
|
1543
|
+
const r = await Oe(t, Fs);
|
|
1524
1544
|
return Ys(r, e);
|
|
1525
1545
|
}
|
|
1526
1546
|
function Js(t) {
|
|
@@ -1534,7 +1554,7 @@ function Qs(t) {
|
|
|
1534
1554
|
const e = [];
|
|
1535
1555
|
let r;
|
|
1536
1556
|
for (; (r = t.next()) !== null; )
|
|
1537
|
-
e.push(
|
|
1557
|
+
e.push(un(r.asObject()));
|
|
1538
1558
|
return e;
|
|
1539
1559
|
}
|
|
1540
1560
|
const Zs = 2994044322, qs = 3167053791;
|
|
@@ -1565,7 +1585,7 @@ function ri(t, e) {
|
|
|
1565
1585
|
}
|
|
1566
1586
|
}
|
|
1567
1587
|
}
|
|
1568
|
-
const
|
|
1588
|
+
const bt = 1, ni = 1048631, si = 2205234621, ii = 2838554230, oi = 3748161056, ai = 4194102057, ci = 4289118421;
|
|
1569
1589
|
function li(t) {
|
|
1570
1590
|
const e = {};
|
|
1571
1591
|
return ui(e), t && Object.assign(e, t), e;
|
|
@@ -1574,7 +1594,7 @@ function ui(t) {
|
|
|
1574
1594
|
return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
|
|
1575
1595
|
}
|
|
1576
1596
|
function hi(t) {
|
|
1577
|
-
const e = new D(
|
|
1597
|
+
const e = new D(bt);
|
|
1578
1598
|
return di(t, e), e.finish();
|
|
1579
1599
|
}
|
|
1580
1600
|
function di(t, e) {
|
|
@@ -1582,9 +1602,9 @@ function di(t, e) {
|
|
|
1582
1602
|
}
|
|
1583
1603
|
function fi(t, e, r) {
|
|
1584
1604
|
const n = hi(t);
|
|
1585
|
-
return F(ni, n,
|
|
1605
|
+
return F(ni, n, bt, e, r);
|
|
1586
1606
|
}
|
|
1587
|
-
const
|
|
1607
|
+
const Ve = 1, Ei = 1048600, Rt = 703025676, kt = 814454131, Ut = 972460562, Dt = 976255570, Mt = 1368629611, Ot = 1479280922, Lt = 1533537016, vt = 2274386296, Pt = 2603556958, Ft = 2885165957, Bt = 3568439632;
|
|
1588
1608
|
function pi(t) {
|
|
1589
1609
|
const e = {};
|
|
1590
1610
|
return Gt(e), e;
|
|
@@ -1593,11 +1613,11 @@ function Gt(t) {
|
|
|
1593
1613
|
return t.FunctionId = _.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ResultTypeName = "", t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.IsCancellable = !1, t.Description = "", t.LlmInlineResult = !1, t.LlmCallOnlyOnce = !1, t.RequiresInstance = !1, t;
|
|
1594
1614
|
}
|
|
1595
1615
|
function Ii(t) {
|
|
1596
|
-
const e = new D(
|
|
1616
|
+
const e = new D(Ve);
|
|
1597
1617
|
return xt(t, e), e.finish();
|
|
1598
1618
|
}
|
|
1599
1619
|
function xt(t, e) {
|
|
1600
|
-
e.writeStringField(
|
|
1620
|
+
e.writeStringField(Rt, t.ResultTypeName), e.writeStringField(kt, t.FunctionName), e.writeStringField(Ut, t.EnumerableItemTypeName), e.writeGuidField(Dt, t.FunctionId), e.writeStringField(Mt, t.Description), e.writeBoolField(Ot, t.IsCancellable), e.writeBoolField(Lt, t.RequiresInstance), e.writeBoolField(vt, t.LlmInlineResult), e.writeBoolField(Pt, t.IsEnumerable), e.writeArrayField(Ft, b.Object, (r) => {
|
|
1601
1621
|
for (const n of t.Parameters)
|
|
1602
1622
|
r.writeObject(wi, (s) => {
|
|
1603
1623
|
yi(n, s);
|
|
@@ -1612,7 +1632,7 @@ function _i(t, e) {
|
|
|
1612
1632
|
let r;
|
|
1613
1633
|
for (; (r = t.next()) !== null; )
|
|
1614
1634
|
switch (r.fieldId) {
|
|
1615
|
-
case
|
|
1635
|
+
case Rt: {
|
|
1616
1636
|
if (r.isNull) throw new Error();
|
|
1617
1637
|
e.ResultTypeName = r.asString();
|
|
1618
1638
|
break;
|
|
@@ -1632,12 +1652,12 @@ function _i(t, e) {
|
|
|
1632
1652
|
e.FunctionId = r.asGuid();
|
|
1633
1653
|
break;
|
|
1634
1654
|
}
|
|
1635
|
-
case
|
|
1655
|
+
case Mt: {
|
|
1636
1656
|
if (r.isNull) throw new Error();
|
|
1637
1657
|
e.Description = r.asString();
|
|
1638
1658
|
break;
|
|
1639
1659
|
}
|
|
1640
|
-
case
|
|
1660
|
+
case Ot: {
|
|
1641
1661
|
if (r.isNull) throw new Error();
|
|
1642
1662
|
e.IsCancellable = r.asBool();
|
|
1643
1663
|
break;
|
|
@@ -1671,7 +1691,7 @@ function _i(t, e) {
|
|
|
1671
1691
|
}
|
|
1672
1692
|
function Ti(t, e, r) {
|
|
1673
1693
|
const n = Ii(t);
|
|
1674
|
-
return F(Ei, n,
|
|
1694
|
+
return F(Ei, n, Ve, e, r);
|
|
1675
1695
|
}
|
|
1676
1696
|
function Si(t) {
|
|
1677
1697
|
const e = [];
|
|
@@ -1746,8 +1766,8 @@ function gi(t, e) {
|
|
|
1746
1766
|
}
|
|
1747
1767
|
}
|
|
1748
1768
|
}
|
|
1749
|
-
const Qt = 1, Ci = 1048638,
|
|
1750
|
-
function
|
|
1769
|
+
const Qt = 1, Ci = 1048638, bi = 3678477544;
|
|
1770
|
+
function Ri(t) {
|
|
1751
1771
|
const e = {};
|
|
1752
1772
|
return ki(e), t && Object.assign(e, t), e;
|
|
1753
1773
|
}
|
|
@@ -1759,18 +1779,18 @@ function Ui(t) {
|
|
|
1759
1779
|
return Di(t, e), e.finish();
|
|
1760
1780
|
}
|
|
1761
1781
|
function Di(t, e) {
|
|
1762
|
-
e.writeArrayField(
|
|
1782
|
+
e.writeArrayField(bi, b.Object, (r) => {
|
|
1763
1783
|
for (const n of t.Functions)
|
|
1764
|
-
r.writeObject(
|
|
1784
|
+
r.writeObject(Ve, (s) => {
|
|
1765
1785
|
xt(n, s);
|
|
1766
1786
|
});
|
|
1767
1787
|
});
|
|
1768
1788
|
}
|
|
1769
|
-
function
|
|
1789
|
+
function Mi(t, e, r) {
|
|
1770
1790
|
const n = Ui(t);
|
|
1771
1791
|
return F(Ci, n, Qt, e, r);
|
|
1772
1792
|
}
|
|
1773
|
-
const Zt = 1,
|
|
1793
|
+
const Zt = 1, Oi = 1048602, Li = 349453957, vi = 703025676, Pi = 3403385840, Fi = 3748161056, Bi = 4289118421;
|
|
1774
1794
|
function Gi(t) {
|
|
1775
1795
|
const e = {};
|
|
1776
1796
|
return xi(e), t && Object.assign(e, t), e;
|
|
@@ -1787,16 +1807,16 @@ function Wi(t, e) {
|
|
|
1787
1807
|
}
|
|
1788
1808
|
function Hi(t, e, r) {
|
|
1789
1809
|
const n = Vi(t);
|
|
1790
|
-
return F(
|
|
1810
|
+
return F(Oi, n, Zt, e, r);
|
|
1791
1811
|
}
|
|
1792
1812
|
const qt = 1, $i = 65549;
|
|
1793
|
-
function
|
|
1813
|
+
function Je(t) {
|
|
1794
1814
|
return {};
|
|
1795
1815
|
}
|
|
1796
1816
|
function Ki(t) {
|
|
1797
1817
|
return new D(qt).finish();
|
|
1798
1818
|
}
|
|
1799
|
-
function
|
|
1819
|
+
function Qe(t, e, r) {
|
|
1800
1820
|
const n = Ki();
|
|
1801
1821
|
return F($i, n, qt, e, r);
|
|
1802
1822
|
}
|
|
@@ -1916,97 +1936,97 @@ function lo(t, e) {
|
|
|
1916
1936
|
}
|
|
1917
1937
|
}
|
|
1918
1938
|
}
|
|
1919
|
-
const uo =
|
|
1920
|
-
function
|
|
1939
|
+
const uo = 65539, ho = 414670648, fo = 693643444, Eo = 1144553441, po = 1497620243, Io = 1559330978, mo = 1999510636, _o = 2277643855, To = 2469008121, So = 3042922213, wo = 3219210453, Ao = 3504054055, yo = 3642827795, No = 3678477544, go = 3696445035, Co = 3707543140, bo = 3712281496, Ro = 3748214980, ko = 3823842552, Uo = 3895362455, Do = 3897397815, Mo = 4225107827;
|
|
1940
|
+
function Oo(t) {
|
|
1921
1941
|
const e = {};
|
|
1922
1942
|
return or(e), e;
|
|
1923
1943
|
}
|
|
1924
1944
|
function or(t) {
|
|
1925
1945
|
return t.Clients = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelInstanceId = "", t.FirstUserId = "", t.ChannelUrl = "", t.ChannelId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.SessionId = "", t.RunnerType = "", t.BootType = "", t.PublicAccess = !1, t.DebugMode = !1, t.IsGitSource = !1, t.Functions = /* @__PURE__ */ Object.create(null), t;
|
|
1926
1946
|
}
|
|
1927
|
-
function
|
|
1947
|
+
function Lo(t, e) {
|
|
1928
1948
|
const r = z.create(t);
|
|
1929
|
-
return
|
|
1949
|
+
return vo(r, e);
|
|
1930
1950
|
}
|
|
1931
|
-
function
|
|
1932
|
-
const r = e ??
|
|
1933
|
-
return or(r),
|
|
1951
|
+
function vo(t, e) {
|
|
1952
|
+
const r = e ?? Oo();
|
|
1953
|
+
return or(r), Po(t, r), r;
|
|
1934
1954
|
}
|
|
1935
|
-
function
|
|
1955
|
+
function Po(t, e) {
|
|
1936
1956
|
let r;
|
|
1937
1957
|
for (; (r = t.next()) !== null; )
|
|
1938
1958
|
switch (r.fieldId) {
|
|
1939
|
-
case
|
|
1959
|
+
case ho: {
|
|
1940
1960
|
if (r.isNull) throw new Error();
|
|
1941
1961
|
e.IsGitSource = r.asBool();
|
|
1942
1962
|
break;
|
|
1943
1963
|
}
|
|
1944
|
-
case
|
|
1964
|
+
case fo: {
|
|
1945
1965
|
if (r.isNull) throw new Error();
|
|
1946
1966
|
e.FirstUserId = r.asString();
|
|
1947
1967
|
break;
|
|
1948
1968
|
}
|
|
1969
|
+
case Eo: {
|
|
1970
|
+
if (r.isNull) throw new Error();
|
|
1971
|
+
e.Clients = Bo(r.asDictionary());
|
|
1972
|
+
break;
|
|
1973
|
+
}
|
|
1949
1974
|
case po: {
|
|
1950
1975
|
if (r.isNull) throw new Error();
|
|
1951
|
-
e.
|
|
1976
|
+
e.TrackingStreams = Go(r.asDictionary());
|
|
1952
1977
|
break;
|
|
1953
1978
|
}
|
|
1954
1979
|
case Io: {
|
|
1955
1980
|
if (r.isNull) throw new Error();
|
|
1956
|
-
e.
|
|
1981
|
+
e.ChannelId = r.asString();
|
|
1957
1982
|
break;
|
|
1958
1983
|
}
|
|
1959
1984
|
case mo: {
|
|
1960
1985
|
if (r.isNull) throw new Error();
|
|
1961
|
-
e.
|
|
1986
|
+
e.SessionId = r.asString();
|
|
1962
1987
|
break;
|
|
1963
1988
|
}
|
|
1964
1989
|
case _o: {
|
|
1965
1990
|
if (r.isNull) throw new Error();
|
|
1966
|
-
e.
|
|
1991
|
+
e.ChannelUrl = r.asString();
|
|
1967
1992
|
break;
|
|
1968
1993
|
}
|
|
1969
1994
|
case To: {
|
|
1970
1995
|
if (r.isNull) throw new Error();
|
|
1971
|
-
e.
|
|
1996
|
+
e.ChannelName = r.asString();
|
|
1972
1997
|
break;
|
|
1973
1998
|
}
|
|
1974
1999
|
case So: {
|
|
1975
2000
|
if (r.isNull) throw new Error();
|
|
1976
|
-
e.
|
|
2001
|
+
e.PublicAccess = r.asBool();
|
|
1977
2002
|
break;
|
|
1978
2003
|
}
|
|
1979
2004
|
case wo: {
|
|
1980
2005
|
if (r.isNull) throw new Error();
|
|
1981
|
-
e.
|
|
2006
|
+
e.OrganisationName = r.asString();
|
|
1982
2007
|
break;
|
|
1983
2008
|
}
|
|
1984
2009
|
case Ao: {
|
|
1985
2010
|
if (r.isNull) throw new Error();
|
|
1986
|
-
e.
|
|
2011
|
+
e.DebugMode = r.asBool();
|
|
1987
2012
|
break;
|
|
1988
2013
|
}
|
|
1989
2014
|
case yo: {
|
|
1990
2015
|
if (r.isNull) throw new Error();
|
|
1991
|
-
e.
|
|
2016
|
+
e.RunnerType = r.asString();
|
|
1992
2017
|
break;
|
|
1993
2018
|
}
|
|
1994
2019
|
case No: {
|
|
1995
2020
|
if (r.isNull) throw new Error();
|
|
1996
|
-
e.
|
|
2021
|
+
e.Functions = xo(r.asDictionary());
|
|
1997
2022
|
break;
|
|
1998
2023
|
}
|
|
1999
2024
|
case go: {
|
|
2000
2025
|
if (r.isNull) throw new Error();
|
|
2001
|
-
e.
|
|
2026
|
+
e.UIStreams = Vo(r.asDictionary());
|
|
2002
2027
|
break;
|
|
2003
2028
|
}
|
|
2004
2029
|
case Co: {
|
|
2005
|
-
if (r.isNull) throw new Error();
|
|
2006
|
-
e.UIStreams = Wo(r.asDictionary());
|
|
2007
|
-
break;
|
|
2008
|
-
}
|
|
2009
|
-
case Ro: {
|
|
2010
2030
|
if (r.isNull) throw new Error();
|
|
2011
2031
|
e.SpaceId = r.asString();
|
|
2012
2032
|
break;
|
|
@@ -2016,24 +2036,24 @@ function Fo(t, e) {
|
|
|
2016
2036
|
e.PrimaryUserId = r.asString();
|
|
2017
2037
|
break;
|
|
2018
2038
|
}
|
|
2019
|
-
case
|
|
2039
|
+
case Ro: {
|
|
2020
2040
|
if (r.isNull) throw new Error();
|
|
2021
2041
|
e.BootType = r.asString();
|
|
2022
2042
|
break;
|
|
2023
2043
|
}
|
|
2024
|
-
case
|
|
2044
|
+
case ko: {
|
|
2025
2045
|
if (r.isNull) throw new Error();
|
|
2026
2046
|
e.ChannelInstanceId = r.asString();
|
|
2027
2047
|
break;
|
|
2028
2048
|
}
|
|
2029
|
-
case
|
|
2049
|
+
case Uo: {
|
|
2030
2050
|
if (r.isNull) throw new Error();
|
|
2031
|
-
e.AudioStreams =
|
|
2051
|
+
e.AudioStreams = Wo(r.asDictionary());
|
|
2032
2052
|
break;
|
|
2033
2053
|
}
|
|
2034
|
-
case
|
|
2054
|
+
case Do: {
|
|
2035
2055
|
if (r.isNull) throw new Error();
|
|
2036
|
-
e.VideoStreams =
|
|
2056
|
+
e.VideoStreams = Ho(r.asDictionary());
|
|
2037
2057
|
break;
|
|
2038
2058
|
}
|
|
2039
2059
|
case Mo: {
|
|
@@ -2043,275 +2063,275 @@ function Fo(t, e) {
|
|
|
2043
2063
|
}
|
|
2044
2064
|
}
|
|
2045
2065
|
}
|
|
2046
|
-
function
|
|
2047
|
-
const r = Oe(t,
|
|
2048
|
-
return
|
|
2066
|
+
async function Fo(t, e) {
|
|
2067
|
+
const r = await Oe(t, uo);
|
|
2068
|
+
return Lo(r, e);
|
|
2049
2069
|
}
|
|
2050
|
-
function
|
|
2070
|
+
function Bo(t) {
|
|
2051
2071
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2052
2072
|
let r;
|
|
2053
2073
|
for (; (r = t.next()) !== null; ) {
|
|
2054
2074
|
const n = r.key.asInt32();
|
|
2055
|
-
e[n] =
|
|
2075
|
+
e[n] = Ce(r.value.asObject());
|
|
2056
2076
|
}
|
|
2057
2077
|
return e;
|
|
2058
2078
|
}
|
|
2059
|
-
function
|
|
2079
|
+
function Go(t) {
|
|
2060
2080
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2061
2081
|
let r;
|
|
2062
2082
|
for (; (r = t.next()) !== null; ) {
|
|
2063
2083
|
const n = r.key.asString();
|
|
2064
|
-
e[n] =
|
|
2084
|
+
e[n] = ma(r.value.asObject());
|
|
2065
2085
|
}
|
|
2066
2086
|
return e;
|
|
2067
2087
|
}
|
|
2068
|
-
function
|
|
2088
|
+
function xo(t) {
|
|
2069
2089
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2070
2090
|
let r;
|
|
2071
2091
|
for (; (r = t.next()) !== null; ) {
|
|
2072
2092
|
const n = r.key.asInt32();
|
|
2073
|
-
e[n] =
|
|
2093
|
+
e[n] = $o(r.value.asArray());
|
|
2074
2094
|
}
|
|
2075
2095
|
return e;
|
|
2076
2096
|
}
|
|
2077
|
-
function
|
|
2097
|
+
function Vo(t) {
|
|
2078
2098
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2079
2099
|
let r;
|
|
2080
2100
|
for (; (r = t.next()) !== null; ) {
|
|
2081
2101
|
const n = r.key.asString();
|
|
2082
|
-
e[n] =
|
|
2102
|
+
e[n] = Jo(r.value.asObject());
|
|
2083
2103
|
}
|
|
2084
2104
|
return e;
|
|
2085
2105
|
}
|
|
2086
|
-
function
|
|
2106
|
+
function Wo(t) {
|
|
2087
2107
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2088
2108
|
let r;
|
|
2089
2109
|
for (; (r = t.next()) !== null; ) {
|
|
2090
2110
|
const n = r.key.asString();
|
|
2091
|
-
e[n] =
|
|
2111
|
+
e[n] = na(r.value.asObject());
|
|
2092
2112
|
}
|
|
2093
2113
|
return e;
|
|
2094
2114
|
}
|
|
2095
|
-
function
|
|
2115
|
+
function Ho(t) {
|
|
2096
2116
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2097
2117
|
let r;
|
|
2098
2118
|
for (; (r = t.next()) !== null; ) {
|
|
2099
2119
|
const n = r.key.asString();
|
|
2100
|
-
e[n] =
|
|
2120
|
+
e[n] = ua(r.value.asObject());
|
|
2101
2121
|
}
|
|
2102
2122
|
return e;
|
|
2103
2123
|
}
|
|
2104
|
-
function
|
|
2124
|
+
function $o(t) {
|
|
2105
2125
|
const e = [];
|
|
2106
2126
|
let r;
|
|
2107
2127
|
for (; (r = t.next()) !== null; )
|
|
2108
2128
|
e.push(mi(r.asObject()));
|
|
2109
2129
|
return e;
|
|
2110
2130
|
}
|
|
2111
|
-
const
|
|
2112
|
-
function
|
|
2131
|
+
const Ko = 161083277, Yo = 325678206, jo = 3469892363, zo = 3645544153;
|
|
2132
|
+
function Xo(t) {
|
|
2113
2133
|
const e = {};
|
|
2114
2134
|
return ar(e), e;
|
|
2115
2135
|
}
|
|
2116
2136
|
function ar(t) {
|
|
2117
2137
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = rr(), t;
|
|
2118
2138
|
}
|
|
2119
|
-
function
|
|
2120
|
-
const r = e ??
|
|
2121
|
-
return ar(r),
|
|
2139
|
+
function Jo(t, e) {
|
|
2140
|
+
const r = e ?? Xo();
|
|
2141
|
+
return ar(r), Qo(t, r), r;
|
|
2122
2142
|
}
|
|
2123
|
-
function
|
|
2143
|
+
function Qo(t, e) {
|
|
2124
2144
|
let r;
|
|
2125
2145
|
for (; (r = t.next()) !== null; )
|
|
2126
2146
|
switch (r.fieldId) {
|
|
2127
|
-
case
|
|
2147
|
+
case Ko: {
|
|
2128
2148
|
if (r.isNull) throw new Error();
|
|
2129
2149
|
e.StreamId = r.asString();
|
|
2130
2150
|
break;
|
|
2131
2151
|
}
|
|
2132
|
-
case
|
|
2152
|
+
case Yo: {
|
|
2133
2153
|
if (r.isNull) throw new Error();
|
|
2134
2154
|
e.ClientSessionId = r.asInt32();
|
|
2135
2155
|
break;
|
|
2136
2156
|
}
|
|
2137
|
-
case
|
|
2157
|
+
case jo: {
|
|
2138
2158
|
if (r.isNull) throw new Error();
|
|
2139
2159
|
e.TrackId = r.asInt32();
|
|
2140
2160
|
break;
|
|
2141
2161
|
}
|
|
2142
|
-
case
|
|
2162
|
+
case zo: {
|
|
2143
2163
|
if (r.isNull) throw new Error();
|
|
2144
2164
|
e.Info = qi(r.asObject());
|
|
2145
2165
|
break;
|
|
2146
2166
|
}
|
|
2147
2167
|
}
|
|
2148
2168
|
}
|
|
2149
|
-
const
|
|
2150
|
-
function
|
|
2169
|
+
const Zo = 161083277, qo = 325678206, ea = 3469892363, ta = 3645544153;
|
|
2170
|
+
function ra(t) {
|
|
2151
2171
|
const e = {};
|
|
2152
2172
|
return cr(e), e;
|
|
2153
2173
|
}
|
|
2154
2174
|
function cr(t) {
|
|
2155
2175
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = _t(), t;
|
|
2156
2176
|
}
|
|
2157
|
-
function
|
|
2158
|
-
const r = e ??
|
|
2159
|
-
return cr(r),
|
|
2177
|
+
function na(t, e) {
|
|
2178
|
+
const r = e ?? ra();
|
|
2179
|
+
return cr(r), sa(t, r), r;
|
|
2160
2180
|
}
|
|
2161
|
-
function
|
|
2181
|
+
function sa(t, e) {
|
|
2162
2182
|
let r;
|
|
2163
2183
|
for (; (r = t.next()) !== null; )
|
|
2164
2184
|
switch (r.fieldId) {
|
|
2165
|
-
case
|
|
2185
|
+
case Zo: {
|
|
2166
2186
|
if (r.isNull) throw new Error();
|
|
2167
2187
|
e.StreamId = r.asString();
|
|
2168
2188
|
break;
|
|
2169
2189
|
}
|
|
2170
|
-
case
|
|
2190
|
+
case qo: {
|
|
2171
2191
|
if (r.isNull) throw new Error();
|
|
2172
2192
|
e.ClientSessionId = r.asInt32();
|
|
2173
2193
|
break;
|
|
2174
2194
|
}
|
|
2175
|
-
case
|
|
2195
|
+
case ea: {
|
|
2176
2196
|
if (r.isNull) throw new Error();
|
|
2177
2197
|
e.TrackId = r.asInt32();
|
|
2178
2198
|
break;
|
|
2179
2199
|
}
|
|
2180
|
-
case
|
|
2200
|
+
case ta: {
|
|
2181
2201
|
if (r.isNull) throw new Error();
|
|
2182
|
-
e.Info =
|
|
2202
|
+
e.Info = _n(r.asObject());
|
|
2183
2203
|
break;
|
|
2184
2204
|
}
|
|
2185
2205
|
}
|
|
2186
2206
|
}
|
|
2187
|
-
const
|
|
2188
|
-
function
|
|
2207
|
+
const ia = 161083277, oa = 325678206, aa = 3469892363, ca = 3645544153;
|
|
2208
|
+
function la(t) {
|
|
2189
2209
|
const e = {};
|
|
2190
2210
|
return lr(e), e;
|
|
2191
2211
|
}
|
|
2192
2212
|
function lr(t) {
|
|
2193
2213
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = sr(), t;
|
|
2194
2214
|
}
|
|
2195
|
-
function
|
|
2196
|
-
const r = e ??
|
|
2197
|
-
return lr(r),
|
|
2215
|
+
function ua(t, e) {
|
|
2216
|
+
const r = e ?? la();
|
|
2217
|
+
return lr(r), ha(t, r), r;
|
|
2198
2218
|
}
|
|
2199
|
-
function
|
|
2219
|
+
function ha(t, e) {
|
|
2200
2220
|
let r;
|
|
2201
2221
|
for (; (r = t.next()) !== null; )
|
|
2202
2222
|
switch (r.fieldId) {
|
|
2203
|
-
case
|
|
2223
|
+
case ia: {
|
|
2204
2224
|
if (r.isNull) throw new Error();
|
|
2205
2225
|
e.StreamId = r.asString();
|
|
2206
2226
|
break;
|
|
2207
2227
|
}
|
|
2208
|
-
case
|
|
2228
|
+
case oa: {
|
|
2209
2229
|
if (r.isNull) throw new Error();
|
|
2210
2230
|
e.ClientSessionId = r.asInt32();
|
|
2211
2231
|
break;
|
|
2212
2232
|
}
|
|
2213
|
-
case
|
|
2233
|
+
case aa: {
|
|
2214
2234
|
if (r.isNull) throw new Error();
|
|
2215
2235
|
e.TrackId = r.asInt32();
|
|
2216
2236
|
break;
|
|
2217
2237
|
}
|
|
2218
|
-
case
|
|
2238
|
+
case ca: {
|
|
2219
2239
|
if (r.isNull) throw new Error();
|
|
2220
2240
|
e.Info = co(r.asObject());
|
|
2221
2241
|
break;
|
|
2222
2242
|
}
|
|
2223
2243
|
}
|
|
2224
2244
|
}
|
|
2225
|
-
const
|
|
2226
|
-
function
|
|
2245
|
+
const da = 161083277, fa = 325678206, Ea = 3469892363, pa = 3645544153;
|
|
2246
|
+
function Ia(t) {
|
|
2227
2247
|
const e = {};
|
|
2228
2248
|
return ur(e), e;
|
|
2229
2249
|
}
|
|
2230
2250
|
function ur(t) {
|
|
2231
2251
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = er(), t;
|
|
2232
2252
|
}
|
|
2233
|
-
function
|
|
2234
|
-
const r = e ??
|
|
2235
|
-
return ur(r),
|
|
2253
|
+
function ma(t, e) {
|
|
2254
|
+
const r = e ?? Ia();
|
|
2255
|
+
return ur(r), _a(t, r), r;
|
|
2236
2256
|
}
|
|
2237
|
-
function
|
|
2257
|
+
function _a(t, e) {
|
|
2238
2258
|
let r;
|
|
2239
2259
|
for (; (r = t.next()) !== null; )
|
|
2240
2260
|
switch (r.fieldId) {
|
|
2241
|
-
case
|
|
2261
|
+
case da: {
|
|
2242
2262
|
if (r.isNull) throw new Error();
|
|
2243
2263
|
e.StreamId = r.asString();
|
|
2244
2264
|
break;
|
|
2245
2265
|
}
|
|
2246
|
-
case
|
|
2266
|
+
case fa: {
|
|
2247
2267
|
if (r.isNull) throw new Error();
|
|
2248
2268
|
e.ClientSessionId = r.asInt32();
|
|
2249
2269
|
break;
|
|
2250
2270
|
}
|
|
2251
|
-
case
|
|
2271
|
+
case Ea: {
|
|
2252
2272
|
if (r.isNull) throw new Error();
|
|
2253
2273
|
e.TrackId = r.asInt32();
|
|
2254
2274
|
break;
|
|
2255
2275
|
}
|
|
2256
|
-
case
|
|
2276
|
+
case pa: {
|
|
2257
2277
|
if (r.isNull) throw new Error();
|
|
2258
2278
|
e.Info = Xi(r.asObject());
|
|
2259
2279
|
break;
|
|
2260
2280
|
}
|
|
2261
2281
|
}
|
|
2262
2282
|
}
|
|
2263
|
-
const hr = 1,
|
|
2283
|
+
const hr = 1, Ta = 131074;
|
|
2264
2284
|
function dr(t) {
|
|
2265
2285
|
return {};
|
|
2266
2286
|
}
|
|
2267
|
-
function
|
|
2287
|
+
function Sa(t) {
|
|
2268
2288
|
return new D(hr).finish();
|
|
2269
2289
|
}
|
|
2270
2290
|
function fr(t, e, r) {
|
|
2271
|
-
const n =
|
|
2272
|
-
return F(
|
|
2291
|
+
const n = Sa();
|
|
2292
|
+
return F(Ta, n, hr, e, r);
|
|
2273
2293
|
}
|
|
2274
|
-
const Er = 1,
|
|
2275
|
-
function
|
|
2294
|
+
const Er = 1, wa = 8388612;
|
|
2295
|
+
function Aa(t) {
|
|
2276
2296
|
return {};
|
|
2277
2297
|
}
|
|
2278
|
-
function
|
|
2298
|
+
function ya(t) {
|
|
2279
2299
|
return new D(Er).finish();
|
|
2280
2300
|
}
|
|
2281
|
-
function
|
|
2282
|
-
const n =
|
|
2283
|
-
return F(
|
|
2301
|
+
function Na(t, e, r) {
|
|
2302
|
+
const n = ya();
|
|
2303
|
+
return F(wa, n, Er, e, r);
|
|
2284
2304
|
}
|
|
2285
|
-
function
|
|
2305
|
+
function ga(t) {
|
|
2286
2306
|
return new Worker(
|
|
2287
|
-
"" + new URL("assets/protocol-worker-
|
|
2307
|
+
"" + new URL("assets/protocol-worker-DIKCgk1A.js", import.meta.url).href,
|
|
2288
2308
|
{
|
|
2289
2309
|
type: "module",
|
|
2290
2310
|
name: t?.name
|
|
2291
2311
|
}
|
|
2292
2312
|
);
|
|
2293
2313
|
}
|
|
2294
|
-
class
|
|
2314
|
+
class We extends Error {
|
|
2295
2315
|
constructor(e, r) {
|
|
2296
2316
|
super(e), this.cause = r, this.name = "ConnectionError";
|
|
2297
2317
|
}
|
|
2298
2318
|
}
|
|
2299
|
-
class y extends
|
|
2319
|
+
class y extends We {
|
|
2300
2320
|
constructor(e, r) {
|
|
2301
2321
|
super(e, r), this.name = "AuthenticationError";
|
|
2302
2322
|
}
|
|
2303
2323
|
}
|
|
2304
|
-
class W extends
|
|
2324
|
+
class W extends We {
|
|
2305
2325
|
constructor(e, r) {
|
|
2306
2326
|
super(e, r), this.name = "TransportError";
|
|
2307
2327
|
}
|
|
2308
2328
|
}
|
|
2309
|
-
class
|
|
2329
|
+
class He extends W {
|
|
2310
2330
|
constructor(e) {
|
|
2311
2331
|
super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
|
|
2312
2332
|
}
|
|
2313
2333
|
}
|
|
2314
|
-
class
|
|
2334
|
+
class Ca extends We {
|
|
2315
2335
|
constructor(e) {
|
|
2316
2336
|
super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
|
|
2317
2337
|
}
|
|
@@ -2321,17 +2341,17 @@ class ba extends y {
|
|
|
2321
2341
|
super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
|
|
2322
2342
|
}
|
|
2323
2343
|
}
|
|
2324
|
-
class
|
|
2344
|
+
class _l extends y {
|
|
2325
2345
|
constructor(e) {
|
|
2326
2346
|
super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
|
|
2327
2347
|
}
|
|
2328
2348
|
}
|
|
2329
|
-
class
|
|
2349
|
+
class Tl extends y {
|
|
2330
2350
|
constructor(e) {
|
|
2331
2351
|
super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
|
|
2332
2352
|
}
|
|
2333
2353
|
}
|
|
2334
|
-
class
|
|
2354
|
+
class Sl extends y {
|
|
2335
2355
|
constructor() {
|
|
2336
2356
|
super("No channels available in this space"), this.name = "NoChannelsError";
|
|
2337
2357
|
}
|
|
@@ -2351,31 +2371,31 @@ function pr(t, e) {
|
|
|
2351
2371
|
});
|
|
2352
2372
|
}
|
|
2353
2373
|
var Ir = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(Ir || {});
|
|
2354
|
-
let
|
|
2355
|
-
function
|
|
2356
|
-
|
|
2374
|
+
let $e = 1, fe = null;
|
|
2375
|
+
function wl(t) {
|
|
2376
|
+
$e = t;
|
|
2357
2377
|
}
|
|
2358
|
-
function
|
|
2359
|
-
return
|
|
2378
|
+
function Al() {
|
|
2379
|
+
return $e;
|
|
2360
2380
|
}
|
|
2361
|
-
function
|
|
2381
|
+
function Ra(t) {
|
|
2362
2382
|
fe = t;
|
|
2363
2383
|
}
|
|
2364
|
-
function
|
|
2384
|
+
function yl() {
|
|
2365
2385
|
return fe;
|
|
2366
2386
|
}
|
|
2367
|
-
const
|
|
2387
|
+
const ka = {
|
|
2368
2388
|
0: "DEBUG",
|
|
2369
2389
|
1: "INFO",
|
|
2370
2390
|
2: "WARN",
|
|
2371
2391
|
3: "ERROR",
|
|
2372
2392
|
4: "NONE"
|
|
2373
2393
|
};
|
|
2374
|
-
function
|
|
2394
|
+
function Ua(t, e) {
|
|
2375
2395
|
return `[${t}] ${e}`;
|
|
2376
2396
|
}
|
|
2377
2397
|
function ie(t, e, r, n) {
|
|
2378
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
2398
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = ka[t];
|
|
2379
2399
|
if (fe && fe({
|
|
2380
2400
|
timestamp: s,
|
|
2381
2401
|
level: t,
|
|
@@ -2383,8 +2403,8 @@ function ie(t, e, r, n) {
|
|
|
2383
2403
|
component: e,
|
|
2384
2404
|
message: r,
|
|
2385
2405
|
args: n
|
|
2386
|
-
}),
|
|
2387
|
-
const o =
|
|
2406
|
+
}), $e <= t) {
|
|
2407
|
+
const o = Ua(e, r);
|
|
2388
2408
|
switch (t) {
|
|
2389
2409
|
case 0:
|
|
2390
2410
|
console.debug(o, ...n);
|
|
@@ -2417,7 +2437,7 @@ function L(t) {
|
|
|
2417
2437
|
}
|
|
2418
2438
|
};
|
|
2419
2439
|
}
|
|
2420
|
-
const oe = L("WebSocketTransport"),
|
|
2440
|
+
const oe = L("WebSocketTransport"), Da = 1e4;
|
|
2421
2441
|
class Ma {
|
|
2422
2442
|
ws = null;
|
|
2423
2443
|
keepaliveTimeout = null;
|
|
@@ -2436,8 +2456,8 @@ class Ma {
|
|
|
2436
2456
|
return new Promise((n, s) => {
|
|
2437
2457
|
try {
|
|
2438
2458
|
this.ws = new WebSocket(e), this.ws.binaryType = "arraybuffer";
|
|
2439
|
-
} catch (
|
|
2440
|
-
s(new W(`Failed to create WebSocket: ${
|
|
2459
|
+
} catch (l) {
|
|
2460
|
+
s(new W(`Failed to create WebSocket: ${l}`, l instanceof Error ? l : void 0));
|
|
2441
2461
|
return;
|
|
2442
2462
|
}
|
|
2443
2463
|
let i = !1, o = !1;
|
|
@@ -2445,20 +2465,20 @@ class Ma {
|
|
|
2445
2465
|
clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
|
|
2446
2466
|
}, c = setTimeout(() => {
|
|
2447
2467
|
o || (o = !0, a(), this.ws?.close(), s(new W("WebSocket connection timeout")));
|
|
2448
|
-
},
|
|
2468
|
+
}, Da);
|
|
2449
2469
|
this.ws.onopen = () => {
|
|
2450
2470
|
i = !0, clearTimeout(c), this.ws.send(r), this.resetKeepaliveTimeout(), o || (o = !0, n());
|
|
2451
2471
|
}, this.ws.onerror = () => {
|
|
2452
2472
|
clearTimeout(c), oe.error("WebSocket error"), o || (o = !0, a(), s(new W("WebSocket connection failed")));
|
|
2453
|
-
}, this.ws.onclose = (
|
|
2473
|
+
}, this.ws.onclose = (l) => {
|
|
2454
2474
|
if (this.clearKeepaliveTimeout(), !i && !o) {
|
|
2455
2475
|
o = !0, a(), s(new W("WebSocket connection closed before opening"));
|
|
2456
2476
|
return;
|
|
2457
2477
|
}
|
|
2458
|
-
const f =
|
|
2478
|
+
const f = l.wasClean && (l.code === 1e3 || l.code === 1001), d = l.code === 1e3 || l.code === 1001, h = l.reason || `code=${l.code}`;
|
|
2459
2479
|
this.callbacks.onClose(h, f, d);
|
|
2460
|
-
}, this.ws.onmessage = (
|
|
2461
|
-
this.handleProtocolMessage(new Uint8Array(
|
|
2480
|
+
}, this.ws.onmessage = (l) => {
|
|
2481
|
+
this.handleProtocolMessage(new Uint8Array(l.data));
|
|
2462
2482
|
};
|
|
2463
2483
|
});
|
|
2464
2484
|
}
|
|
@@ -2487,18 +2507,18 @@ class Ma {
|
|
|
2487
2507
|
}
|
|
2488
2508
|
resetKeepaliveTimeout() {
|
|
2489
2509
|
this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
|
|
2490
|
-
oe.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new
|
|
2510
|
+
oe.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new He(this.keepaliveTimeoutMs)), this.close();
|
|
2491
2511
|
}, this.keepaliveTimeoutMs);
|
|
2492
2512
|
}
|
|
2493
2513
|
clearKeepaliveTimeout() {
|
|
2494
2514
|
this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
|
|
2495
2515
|
}
|
|
2496
2516
|
}
|
|
2497
|
-
const B = L("WebTransportTransport"),
|
|
2517
|
+
const B = L("WebTransportTransport"), Ze = 4, Oa = 65536;
|
|
2498
2518
|
function mr() {
|
|
2499
2519
|
return typeof WebTransport < "u";
|
|
2500
2520
|
}
|
|
2501
|
-
class
|
|
2521
|
+
class La {
|
|
2502
2522
|
transport = null;
|
|
2503
2523
|
stream = null;
|
|
2504
2524
|
reader = null;
|
|
@@ -2506,7 +2526,7 @@ class va {
|
|
|
2506
2526
|
keepaliveTimeout = null;
|
|
2507
2527
|
readLoopActive = !1;
|
|
2508
2528
|
// Grow-only receive buffer with offset/length tracking to minimize allocations
|
|
2509
|
-
receiveBuffer = new Uint8Array(
|
|
2529
|
+
receiveBuffer = new Uint8Array(Oa);
|
|
2510
2530
|
receiveBufferOffset = 0;
|
|
2511
2531
|
receiveBufferLength = 0;
|
|
2512
2532
|
// Cached DataView to avoid allocation per message
|
|
@@ -2600,9 +2620,9 @@ class va {
|
|
|
2600
2620
|
*/
|
|
2601
2621
|
processBufferedMessages() {
|
|
2602
2622
|
const e = this.getReceiveDataView();
|
|
2603
|
-
for (; this.receiveBufferLength >=
|
|
2623
|
+
for (; this.receiveBufferLength >= Ze; ) {
|
|
2604
2624
|
const r = e.getUint32(this.receiveBufferOffset, !0);
|
|
2605
|
-
if (r <
|
|
2625
|
+
if (r < Ze) {
|
|
2606
2626
|
B.error(`Invalid message length: ${r}`), this.callbacks.onError(new Error(`Invalid protocol message length: ${r}`)), this.receiveBufferOffset = 0, this.receiveBufferLength = 0;
|
|
2607
2627
|
return;
|
|
2608
2628
|
}
|
|
@@ -2638,7 +2658,7 @@ class va {
|
|
|
2638
2658
|
*/
|
|
2639
2659
|
resetKeepaliveTimeout() {
|
|
2640
2660
|
this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
|
|
2641
|
-
B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new
|
|
2661
|
+
B.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new He(this.keepaliveTimeoutMs)), this.close();
|
|
2642
2662
|
}, this.keepaliveTimeoutMs);
|
|
2643
2663
|
}
|
|
2644
2664
|
/**
|
|
@@ -2661,7 +2681,7 @@ class va {
|
|
|
2661
2681
|
}
|
|
2662
2682
|
}
|
|
2663
2683
|
const ee = L("Channel");
|
|
2664
|
-
class
|
|
2684
|
+
class va {
|
|
2665
2685
|
state = "disconnected";
|
|
2666
2686
|
transport = null;
|
|
2667
2687
|
config;
|
|
@@ -2744,7 +2764,7 @@ class Pa {
|
|
|
2744
2764
|
case k.WebTransportProxy:
|
|
2745
2765
|
if (!mr())
|
|
2746
2766
|
throw new Error("WebTransport is not supported in this browser");
|
|
2747
|
-
this.transport = new
|
|
2767
|
+
this.transport = new La(r);
|
|
2748
2768
|
break;
|
|
2749
2769
|
default:
|
|
2750
2770
|
throw new Error(`Unsupported entrypoint type: ${k[e.Type]}`);
|
|
@@ -2776,7 +2796,7 @@ class Pa {
|
|
|
2776
2796
|
* Handle transport error.
|
|
2777
2797
|
*/
|
|
2778
2798
|
handleError(e) {
|
|
2779
|
-
ee.error("Channel error:", e), this.config.onError?.(e), e instanceof
|
|
2799
|
+
ee.error("Channel error:", e), this.config.onError?.(e), e instanceof He && this.handleClose("Keepalive timeout", !1);
|
|
2780
2800
|
}
|
|
2781
2801
|
/**
|
|
2782
2802
|
* Update and notify state change.
|
|
@@ -2786,7 +2806,7 @@ class Pa {
|
|
|
2786
2806
|
}
|
|
2787
2807
|
}
|
|
2788
2808
|
const G = L("ChannelManager");
|
|
2789
|
-
class
|
|
2809
|
+
class Pa {
|
|
2790
2810
|
channels = /* @__PURE__ */ new Map();
|
|
2791
2811
|
// keyed by opcode group
|
|
2792
2812
|
activeType = null;
|
|
@@ -2888,7 +2908,7 @@ class Fa {
|
|
|
2888
2908
|
* Connect a single channel.
|
|
2889
2909
|
*/
|
|
2890
2910
|
async connectChannel(e) {
|
|
2891
|
-
const r = new
|
|
2911
|
+
const r = new va({
|
|
2892
2912
|
entrypoint: e,
|
|
2893
2913
|
sessionId: this.config.sessionId,
|
|
2894
2914
|
keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
|
|
@@ -2943,7 +2963,7 @@ class Fa {
|
|
|
2943
2963
|
if (!this.shouldReconnect)
|
|
2944
2964
|
return;
|
|
2945
2965
|
if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
|
|
2946
|
-
G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new
|
|
2966
|
+
G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Ca(this.config.maxReconnectAttempts));
|
|
2947
2967
|
return;
|
|
2948
2968
|
}
|
|
2949
2969
|
this.setState("reconnecting"), this.reconnectAttempts++;
|
|
@@ -2970,25 +2990,25 @@ class Fa {
|
|
|
2970
2990
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
2971
2991
|
}
|
|
2972
2992
|
}
|
|
2973
|
-
const
|
|
2974
|
-
function
|
|
2993
|
+
const Fa = 5e3, Ba = 3e4, qe = 35e3, et = 500, tt = 6, _r = 6e4, be = "ikon_device_id";
|
|
2994
|
+
function Ke() {
|
|
2975
2995
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
2976
2996
|
return crypto.randomUUID();
|
|
2977
2997
|
try {
|
|
2978
|
-
let t = localStorage.getItem(
|
|
2979
|
-
return t || (t = crypto.randomUUID(), localStorage.setItem(
|
|
2998
|
+
let t = localStorage.getItem(be);
|
|
2999
|
+
return t || (t = crypto.randomUUID(), localStorage.setItem(be, t)), t;
|
|
2980
3000
|
} catch {
|
|
2981
3001
|
return crypto.randomUUID();
|
|
2982
3002
|
}
|
|
2983
3003
|
}
|
|
2984
|
-
function
|
|
3004
|
+
function Nl() {
|
|
2985
3005
|
if (!(typeof localStorage > "u"))
|
|
2986
3006
|
try {
|
|
2987
|
-
localStorage.removeItem(
|
|
3007
|
+
localStorage.removeItem(be);
|
|
2988
3008
|
} catch {
|
|
2989
3009
|
}
|
|
2990
3010
|
}
|
|
2991
|
-
function
|
|
3011
|
+
function gl(t) {
|
|
2992
3012
|
try {
|
|
2993
3013
|
const e = t.split(".");
|
|
2994
3014
|
return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
|
|
@@ -2996,24 +3016,24 @@ function Cl(t) {
|
|
|
2996
3016
|
return null;
|
|
2997
3017
|
}
|
|
2998
3018
|
}
|
|
2999
|
-
const Ee = {}, Re = "https://api.prod.ikon.live", pe = "https://api.dev.ikon.live",
|
|
3019
|
+
const Ee = {}, Re = "https://api.prod.ikon.live", pe = "https://api.dev.ikon.live", rt = "https://auth.ikonai.com", nt = "https://auth.dev.ikonai.com", Cl = "https://auth.ikonai.com";
|
|
3000
3020
|
function Tr(t) {
|
|
3001
3021
|
return t === "development" ? pe : Re;
|
|
3002
3022
|
}
|
|
3003
3023
|
function bl() {
|
|
3004
3024
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
|
|
3005
|
-
return t || (typeof window > "u" ? Re : !
|
|
3025
|
+
return t || (typeof window > "u" ? Re : !Ye() || window.location.hostname.includes(".dev.") ? pe : Re);
|
|
3006
3026
|
}
|
|
3007
|
-
function
|
|
3027
|
+
function Rl() {
|
|
3008
3028
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_TYPE : void 0;
|
|
3009
3029
|
if (t === "development" || t === "production")
|
|
3010
3030
|
return t;
|
|
3011
3031
|
const e = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
|
|
3012
|
-
return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" :
|
|
3032
|
+
return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : Ye() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
|
|
3013
3033
|
}
|
|
3014
|
-
function
|
|
3034
|
+
function kl() {
|
|
3015
3035
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_AUTH_URL : void 0;
|
|
3016
|
-
return t || (typeof window > "u" ?
|
|
3036
|
+
return t || (typeof window > "u" ? rt : !Ye() || window.location.hostname.includes(".dev.") ? nt : rt);
|
|
3017
3037
|
}
|
|
3018
3038
|
function Sr() {
|
|
3019
3039
|
if (typeof window > "u")
|
|
@@ -3023,8 +3043,8 @@ function Sr() {
|
|
|
3023
3043
|
e[r] = n;
|
|
3024
3044
|
return e;
|
|
3025
3045
|
}
|
|
3026
|
-
const
|
|
3027
|
-
function
|
|
3046
|
+
const Ga = ["ikon_token", "ikon_provider", "error"];
|
|
3047
|
+
function Ul() {
|
|
3028
3048
|
if (typeof window > "u")
|
|
3029
3049
|
return { parameters: {} };
|
|
3030
3050
|
const t = window.location.pathname;
|
|
@@ -3036,10 +3056,10 @@ function Dl() {
|
|
|
3036
3056
|
throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
|
|
3037
3057
|
const i = Sr(), o = {};
|
|
3038
3058
|
for (const [a, c] of Object.entries(i))
|
|
3039
|
-
|
|
3059
|
+
Ga.includes(a) || (o[a] = c);
|
|
3040
3060
|
return { sessionId: e, channelKey: r, parameters: o };
|
|
3041
3061
|
}
|
|
3042
|
-
function
|
|
3062
|
+
function Ye() {
|
|
3043
3063
|
if (typeof window > "u") return !1;
|
|
3044
3064
|
const t = window.location.hostname;
|
|
3045
3065
|
if (t === "localhost" || t === "127.0.0.1" || t === "::1" || t.startsWith("10.") || t.startsWith("192.168."))
|
|
@@ -3051,8 +3071,8 @@ function Ke() {
|
|
|
3051
3071
|
}
|
|
3052
3072
|
return !0;
|
|
3053
3073
|
}
|
|
3054
|
-
const Ie = L("Authenticator"), j = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO,
|
|
3055
|
-
async function
|
|
3074
|
+
const Ie = L("Authenticator"), j = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO | S.GROUP_ANALYTICS, xa = 1e3, Va = 5e3;
|
|
3075
|
+
async function Wa(t) {
|
|
3056
3076
|
try {
|
|
3057
3077
|
const e = await fetch(`${pe}/users/me`, {
|
|
3058
3078
|
credentials: "include",
|
|
@@ -3081,14 +3101,14 @@ async function Ar(t, e, r, n, s, i, o) {
|
|
|
3081
3101
|
...r ? { key: r } : {},
|
|
3082
3102
|
...n && Object.keys(n).length > 0 ? { params: n } : {},
|
|
3083
3103
|
...s ? { hash: s } : {}
|
|
3084
|
-
},
|
|
3085
|
-
if (!
|
|
3086
|
-
const d = await
|
|
3087
|
-
throw new y(`Failed to request channel: ${
|
|
3104
|
+
}, l = await fetch(a, wr(c, i, o));
|
|
3105
|
+
if (!l.ok) {
|
|
3106
|
+
const d = await l.text().catch(() => "Unknown error");
|
|
3107
|
+
throw new y(`Failed to request channel: ${l.status} ${d}`);
|
|
3088
3108
|
}
|
|
3089
|
-
return await
|
|
3109
|
+
return await l.json();
|
|
3090
3110
|
}
|
|
3091
|
-
async function
|
|
3111
|
+
async function Ha(t, e, r, n) {
|
|
3092
3112
|
const s = `${t}/rooms/connect`, i = await fetch(s, wr(e, r, n));
|
|
3093
3113
|
if (!i.ok) {
|
|
3094
3114
|
const o = await i.text().catch(() => "Unknown error");
|
|
@@ -3098,33 +3118,33 @@ async function $a(t, e, r, n) {
|
|
|
3098
3118
|
}
|
|
3099
3119
|
async function yr(t, e, r, n, s) {
|
|
3100
3120
|
const i = Date.now();
|
|
3101
|
-
let o =
|
|
3121
|
+
let o = xa;
|
|
3102
3122
|
for (; ; ) {
|
|
3103
3123
|
if (s?.aborted)
|
|
3104
3124
|
throw new y("Connection aborted");
|
|
3105
3125
|
if (Date.now() - i >= r)
|
|
3106
3126
|
throw new ba(r);
|
|
3107
|
-
const c = await
|
|
3108
|
-
if (
|
|
3127
|
+
const c = await Ha(t, e, n, s), l = c.state?.toLowerCase();
|
|
3128
|
+
if (l === "running")
|
|
3109
3129
|
return c;
|
|
3110
|
-
if (
|
|
3111
|
-
await pr(o, s), o = Math.min(o * 1.5,
|
|
3130
|
+
if (l === "provisioning") {
|
|
3131
|
+
await pr(o, s), o = Math.min(o * 1.5, Va);
|
|
3112
3132
|
continue;
|
|
3113
3133
|
}
|
|
3114
3134
|
throw new y(`Unexpected channel state: ${c.state}`);
|
|
3115
3135
|
}
|
|
3116
3136
|
}
|
|
3117
|
-
async function
|
|
3137
|
+
async function je(t, e) {
|
|
3118
3138
|
const r = await fetch(t, { signal: e });
|
|
3119
3139
|
if (!r.ok) {
|
|
3120
3140
|
const o = await r.text().catch(() => "Unknown error");
|
|
3121
3141
|
throw new y(`Failed to connect: ${r.status} ${o}`);
|
|
3122
3142
|
}
|
|
3123
3143
|
const n = await r.arrayBuffer(), s = new Uint8Array(n);
|
|
3124
|
-
return { authResponse:
|
|
3144
|
+
return { authResponse: await Ns(s) };
|
|
3125
3145
|
}
|
|
3126
|
-
function
|
|
3127
|
-
return
|
|
3146
|
+
function $a(t, e) {
|
|
3147
|
+
return bs({
|
|
3128
3148
|
ServerSessionId: "",
|
|
3129
3149
|
// Server will fill this in
|
|
3130
3150
|
ContextType: J.Browser,
|
|
@@ -3133,7 +3153,7 @@ function Ka(t, e) {
|
|
|
3133
3153
|
IsInternal: !1,
|
|
3134
3154
|
Description: t.description ?? "Ikon SDK TypeScript",
|
|
3135
3155
|
UserId: e,
|
|
3136
|
-
DeviceId: t.deviceId ??
|
|
3156
|
+
DeviceId: t.deviceId ?? Ke(),
|
|
3137
3157
|
ProductId: t.productId ?? "ikon-sdk",
|
|
3138
3158
|
VersionId: t.versionId ?? "1.0.0",
|
|
3139
3159
|
InstallId: t.installId ?? "",
|
|
@@ -3151,7 +3171,7 @@ function Ka(t, e) {
|
|
|
3151
3171
|
Parameters: t.parameters ?? {}
|
|
3152
3172
|
});
|
|
3153
3173
|
}
|
|
3154
|
-
function
|
|
3174
|
+
function Ka(t) {
|
|
3155
3175
|
return {
|
|
3156
3176
|
ServerSessionId: t.ServerSessionId,
|
|
3157
3177
|
ContextType: t.ContextType,
|
|
@@ -3178,13 +3198,13 @@ function Ya(t) {
|
|
|
3178
3198
|
Parameters: t.Parameters
|
|
3179
3199
|
};
|
|
3180
3200
|
}
|
|
3181
|
-
async function
|
|
3201
|
+
async function Ya(t, e) {
|
|
3182
3202
|
const r = `https://${t.host}:${t.httpsPort}`;
|
|
3183
3203
|
Ie.debug(`Authenticating with local server: ${r}`);
|
|
3184
3204
|
const s = { ...Sr(), ...t.parameters };
|
|
3185
3205
|
let i = t.userId;
|
|
3186
|
-
i || (i = await
|
|
3187
|
-
const o =
|
|
3206
|
+
i || (i = await Wa(e), i || (i = "local", Ie.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
|
|
3207
|
+
const o = $a({ ...t, parameters: s }, i), a = Ka(o), c = await fetch(`${r}/connect-token`, {
|
|
3188
3208
|
method: "POST",
|
|
3189
3209
|
headers: {
|
|
3190
3210
|
"Content-Type": "application/json"
|
|
@@ -3200,9 +3220,9 @@ async function ja(t, e) {
|
|
|
3200
3220
|
if (!f)
|
|
3201
3221
|
throw new y("Server did not return a token");
|
|
3202
3222
|
const d = `${r}/connect?token=${encodeURIComponent(f)}`;
|
|
3203
|
-
return
|
|
3223
|
+
return je(d, e);
|
|
3204
3224
|
}
|
|
3205
|
-
async function
|
|
3225
|
+
async function ja(t, e) {
|
|
3206
3226
|
if (t.sessionId && t.channelKey)
|
|
3207
3227
|
throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3208
3228
|
const r = Tr(t.backendType);
|
|
@@ -3244,7 +3264,7 @@ async function za(t, e) {
|
|
|
3244
3264
|
clientType: t.clientType ?? X.DesktopWeb,
|
|
3245
3265
|
payloadType: Q.Teleport,
|
|
3246
3266
|
description: t.description ?? "Ikon SDK TypeScript",
|
|
3247
|
-
deviceId: t.deviceId ??
|
|
3267
|
+
deviceId: t.deviceId ?? Ke(),
|
|
3248
3268
|
productId: t.productId ?? "",
|
|
3249
3269
|
versionId: t.versionId ?? "",
|
|
3250
3270
|
installId: t.installId ?? "",
|
|
@@ -3256,13 +3276,13 @@ async function za(t, e) {
|
|
|
3256
3276
|
launchParams: t.parameters,
|
|
3257
3277
|
hash: t.sessionId,
|
|
3258
3278
|
waitForRunning: !0
|
|
3259
|
-
},
|
|
3279
|
+
}, l = t.provisioningTimeoutMs ?? _r, f = await yr(r, c, l, i, e);
|
|
3260
3280
|
if (!f.configuration?.url)
|
|
3261
3281
|
throw new y("Backend did not return a connect URL");
|
|
3262
3282
|
const d = f.configuration.url;
|
|
3263
|
-
return
|
|
3283
|
+
return je(d, e);
|
|
3264
3284
|
}
|
|
3265
|
-
async function
|
|
3285
|
+
async function za(t, e) {
|
|
3266
3286
|
if (t.sessionId && t.channelKey)
|
|
3267
3287
|
throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3268
3288
|
const r = Tr(t.backendType), n = t.token;
|
|
@@ -3285,7 +3305,7 @@ async function Xa(t, e) {
|
|
|
3285
3305
|
clientType: X.DesktopWeb,
|
|
3286
3306
|
payloadType: Q.Teleport,
|
|
3287
3307
|
description: t.description ?? "Ikon SDK TypeScript",
|
|
3288
|
-
deviceId: t.deviceId ??
|
|
3308
|
+
deviceId: t.deviceId ?? Ke(),
|
|
3289
3309
|
productId: t.productId ?? "",
|
|
3290
3310
|
versionId: t.versionId ?? "",
|
|
3291
3311
|
installId: t.installId ?? "",
|
|
@@ -3300,25 +3320,25 @@ async function Xa(t, e) {
|
|
|
3300
3320
|
}, a = t.provisioningTimeoutMs ?? _r, c = await yr(r, o, a, n, e);
|
|
3301
3321
|
if (!c.configuration?.url)
|
|
3302
3322
|
throw new y("Backend did not return a connect URL");
|
|
3303
|
-
const
|
|
3304
|
-
return
|
|
3323
|
+
const l = c.configuration.url;
|
|
3324
|
+
return je(l, e);
|
|
3305
3325
|
}
|
|
3306
|
-
const Nr = "ikon.theme",
|
|
3326
|
+
const Nr = "ikon.theme", ke = "ikon.theme-user", Xa = "ikon.theme-change";
|
|
3307
3327
|
function gr(t) {
|
|
3308
3328
|
typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
|
|
3309
3329
|
}
|
|
3310
|
-
const
|
|
3330
|
+
const Ja = {
|
|
3311
3331
|
name: "ikon.client.getTheme",
|
|
3312
3332
|
description: "Get the currently selected client theme",
|
|
3313
3333
|
returnType: { kind: "string", nullable: !0 }
|
|
3314
3334
|
};
|
|
3315
|
-
function
|
|
3335
|
+
function Qa() {
|
|
3316
3336
|
if (typeof window > "u" || !window.localStorage)
|
|
3317
3337
|
return null;
|
|
3318
|
-
const t = window.localStorage.getItem(
|
|
3338
|
+
const t = window.localStorage.getItem(ke) ?? window.localStorage.getItem(Nr) ?? "light";
|
|
3319
3339
|
return gr(t), t;
|
|
3320
3340
|
}
|
|
3321
|
-
const
|
|
3341
|
+
const Za = {
|
|
3322
3342
|
name: "ikon.client.setTheme",
|
|
3323
3343
|
description: "Update the client UI theme",
|
|
3324
3344
|
returnType: { kind: "boolean" },
|
|
@@ -3327,49 +3347,49 @@ const qa = {
|
|
|
3327
3347
|
{ name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
|
|
3328
3348
|
]
|
|
3329
3349
|
};
|
|
3330
|
-
function
|
|
3350
|
+
function qa(t, e) {
|
|
3331
3351
|
if (typeof window > "u" || !window.localStorage || typeof t != "string")
|
|
3332
3352
|
return !1;
|
|
3333
3353
|
const r = t.trim().toLowerCase();
|
|
3334
3354
|
if (!r)
|
|
3335
3355
|
return !1;
|
|
3336
3356
|
const n = e === void 0 ? !0 : !!e, s = window.localStorage;
|
|
3337
|
-
n ? s.setItem(
|
|
3357
|
+
n ? s.setItem(ke, r) : s.removeItem(ke), s.setItem(Nr, r);
|
|
3338
3358
|
try {
|
|
3339
|
-
window.dispatchEvent(new CustomEvent(
|
|
3359
|
+
window.dispatchEvent(new CustomEvent(Xa, { detail: { mode: r } }));
|
|
3340
3360
|
} catch {
|
|
3341
3361
|
}
|
|
3342
3362
|
return gr(r), !0;
|
|
3343
3363
|
}
|
|
3344
|
-
const
|
|
3364
|
+
const ec = {
|
|
3345
3365
|
name: "ikon.client.getLanguage",
|
|
3346
3366
|
description: "Get the browser language preference",
|
|
3347
3367
|
returnType: { kind: "string" }
|
|
3348
3368
|
};
|
|
3349
|
-
function
|
|
3369
|
+
function tc() {
|
|
3350
3370
|
return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
|
|
3351
3371
|
}
|
|
3352
|
-
const
|
|
3372
|
+
const rc = {
|
|
3353
3373
|
name: "ikon.client.getTimezone",
|
|
3354
3374
|
description: "Get the browser timezone (IANA format)",
|
|
3355
3375
|
returnType: { kind: "string" }
|
|
3356
3376
|
};
|
|
3357
|
-
function
|
|
3377
|
+
function nc() {
|
|
3358
3378
|
try {
|
|
3359
3379
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3360
3380
|
} catch {
|
|
3361
3381
|
return "UTC";
|
|
3362
3382
|
}
|
|
3363
3383
|
}
|
|
3364
|
-
const
|
|
3384
|
+
const sc = {
|
|
3365
3385
|
name: "ikon.client.getUrl",
|
|
3366
3386
|
description: "Get the current browser URL path and query string",
|
|
3367
3387
|
returnType: { kind: "string", nullable: !0 }
|
|
3368
3388
|
};
|
|
3369
|
-
function
|
|
3389
|
+
function ic() {
|
|
3370
3390
|
return typeof window > "u" ? null : window.location.pathname + window.location.search;
|
|
3371
3391
|
}
|
|
3372
|
-
const
|
|
3392
|
+
const oc = {
|
|
3373
3393
|
name: "ikon.client.setUrl",
|
|
3374
3394
|
description: "Update the browser URL without triggering a page reload",
|
|
3375
3395
|
returnType: { kind: "boolean" },
|
|
@@ -3378,7 +3398,7 @@ const ac = {
|
|
|
3378
3398
|
{ name: "replace", type: { kind: "boolean", nullable: !0 }, description: "If true, replaces current history entry instead of adding new one" }
|
|
3379
3399
|
]
|
|
3380
3400
|
};
|
|
3381
|
-
function
|
|
3401
|
+
function ac(t, e) {
|
|
3382
3402
|
if (typeof window > "u" || !window.history || typeof t != "string")
|
|
3383
3403
|
return !1;
|
|
3384
3404
|
const r = t.trim();
|
|
@@ -3390,13 +3410,13 @@ function cc(t, e) {
|
|
|
3390
3410
|
return !1;
|
|
3391
3411
|
}
|
|
3392
3412
|
}
|
|
3393
|
-
const
|
|
3413
|
+
const cc = {
|
|
3394
3414
|
name: "ikon.client.vibrate",
|
|
3395
3415
|
description: "Trigger haptic feedback on supported devices",
|
|
3396
3416
|
returnType: { kind: "boolean" },
|
|
3397
3417
|
parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
|
|
3398
3418
|
};
|
|
3399
|
-
function
|
|
3419
|
+
function lc(t) {
|
|
3400
3420
|
if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
|
|
3401
3421
|
return !1;
|
|
3402
3422
|
try {
|
|
@@ -3407,13 +3427,13 @@ function uc(t) {
|
|
|
3407
3427
|
}
|
|
3408
3428
|
}
|
|
3409
3429
|
let te = null;
|
|
3410
|
-
const
|
|
3430
|
+
const uc = {
|
|
3411
3431
|
name: "ikon.client.keepScreenAwake",
|
|
3412
3432
|
description: "Prevent or allow the screen to sleep",
|
|
3413
3433
|
returnType: { kind: "boolean" },
|
|
3414
3434
|
parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
|
|
3415
3435
|
};
|
|
3416
|
-
async function
|
|
3436
|
+
async function hc(t) {
|
|
3417
3437
|
if (typeof navigator > "u" || !("wakeLock" in navigator))
|
|
3418
3438
|
return !1;
|
|
3419
3439
|
try {
|
|
@@ -3422,15 +3442,15 @@ async function dc(t) {
|
|
|
3422
3442
|
return !1;
|
|
3423
3443
|
}
|
|
3424
3444
|
}
|
|
3425
|
-
const
|
|
3445
|
+
const dc = {
|
|
3426
3446
|
name: "ikon.client.getVisibility",
|
|
3427
3447
|
description: "Get the current page visibility state",
|
|
3428
3448
|
returnType: { kind: "string", nullable: !0 }
|
|
3429
3449
|
};
|
|
3430
|
-
function
|
|
3450
|
+
function fc() {
|
|
3431
3451
|
return typeof document > "u" ? null : document.visibilityState || null;
|
|
3432
3452
|
}
|
|
3433
|
-
const
|
|
3453
|
+
const Ec = {
|
|
3434
3454
|
name: "ikon.client.scrollTo",
|
|
3435
3455
|
description: "Scroll the page to a specific position",
|
|
3436
3456
|
returnType: { kind: "boolean" },
|
|
@@ -3440,7 +3460,7 @@ const pc = {
|
|
|
3440
3460
|
{ name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
|
|
3441
3461
|
]
|
|
3442
3462
|
};
|
|
3443
|
-
function
|
|
3463
|
+
function pc(t, e, r) {
|
|
3444
3464
|
if (typeof window > "u" || typeof t != "number" || typeof e != "number")
|
|
3445
3465
|
return !1;
|
|
3446
3466
|
try {
|
|
@@ -3453,12 +3473,12 @@ function Ic(t, e, r) {
|
|
|
3453
3473
|
return !1;
|
|
3454
3474
|
}
|
|
3455
3475
|
}
|
|
3456
|
-
const
|
|
3476
|
+
const Ic = {
|
|
3457
3477
|
name: "ikon.client.getBatteryLevel",
|
|
3458
3478
|
description: "Get the current battery level (0-100)",
|
|
3459
3479
|
returnType: { kind: "number", nullable: !0 }
|
|
3460
3480
|
};
|
|
3461
|
-
async function
|
|
3481
|
+
async function mc() {
|
|
3462
3482
|
if (typeof navigator > "u" || !("getBattery" in navigator))
|
|
3463
3483
|
return null;
|
|
3464
3484
|
try {
|
|
@@ -3468,39 +3488,39 @@ async function _c() {
|
|
|
3468
3488
|
return null;
|
|
3469
3489
|
}
|
|
3470
3490
|
}
|
|
3471
|
-
const
|
|
3491
|
+
const _c = {
|
|
3472
3492
|
name: "ikon.client.getNetworkType",
|
|
3473
3493
|
description: "Get the current network connection type",
|
|
3474
3494
|
returnType: { kind: "string", nullable: !0 }
|
|
3475
3495
|
};
|
|
3476
|
-
function
|
|
3496
|
+
function Tc() {
|
|
3477
3497
|
if (typeof navigator > "u")
|
|
3478
3498
|
return null;
|
|
3479
3499
|
const t = navigator.connection;
|
|
3480
3500
|
return t && (t.effectiveType || t.type) || null;
|
|
3481
3501
|
}
|
|
3482
|
-
const
|
|
3483
|
-
{ definition:
|
|
3484
|
-
{ definition:
|
|
3485
|
-
{ definition:
|
|
3486
|
-
{ definition:
|
|
3487
|
-
{ definition:
|
|
3488
|
-
{ definition:
|
|
3489
|
-
{ definition:
|
|
3490
|
-
{ definition:
|
|
3491
|
-
{ definition:
|
|
3492
|
-
{ definition:
|
|
3493
|
-
{ definition:
|
|
3494
|
-
{ definition:
|
|
3502
|
+
const Sc = [
|
|
3503
|
+
{ definition: Ja, handler: Qa },
|
|
3504
|
+
{ definition: Za, handler: qa },
|
|
3505
|
+
{ definition: ec, handler: tc },
|
|
3506
|
+
{ definition: rc, handler: nc },
|
|
3507
|
+
{ definition: sc, handler: ic },
|
|
3508
|
+
{ definition: oc, handler: ac },
|
|
3509
|
+
{ definition: cc, handler: lc },
|
|
3510
|
+
{ definition: uc, handler: hc },
|
|
3511
|
+
{ definition: dc, handler: fc },
|
|
3512
|
+
{ definition: Ec, handler: pc },
|
|
3513
|
+
{ definition: Ic, handler: mc },
|
|
3514
|
+
{ definition: _c, handler: Tc }
|
|
3495
3515
|
];
|
|
3496
|
-
function
|
|
3497
|
-
const e =
|
|
3516
|
+
function wc(t) {
|
|
3517
|
+
const e = Sc.map(({ definition: r, handler: n }) => t.register(r, n));
|
|
3498
3518
|
return () => e.forEach((r) => r());
|
|
3499
3519
|
}
|
|
3500
|
-
function
|
|
3520
|
+
function st() {
|
|
3501
3521
|
return typeof window < "u" && typeof navigator < "u";
|
|
3502
3522
|
}
|
|
3503
|
-
const
|
|
3523
|
+
const Ac = new Uint8Array(0);
|
|
3504
3524
|
function me(t) {
|
|
3505
3525
|
switch (t.kind) {
|
|
3506
3526
|
case "array":
|
|
@@ -3539,7 +3559,7 @@ function re(t) {
|
|
|
3539
3559
|
return t;
|
|
3540
3560
|
}
|
|
3541
3561
|
}
|
|
3542
|
-
function
|
|
3562
|
+
function it(t, e) {
|
|
3543
3563
|
if (t === void 0 || t === "")
|
|
3544
3564
|
return;
|
|
3545
3565
|
const r = JSON.parse(t);
|
|
@@ -3560,7 +3580,7 @@ function Cr(t, e) {
|
|
|
3560
3580
|
}
|
|
3561
3581
|
return JSON.stringify(t);
|
|
3562
3582
|
}
|
|
3563
|
-
function
|
|
3583
|
+
function yc(t, e) {
|
|
3564
3584
|
const r = (t.parameters ?? []).map((i) => {
|
|
3565
3585
|
const o = me(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Cr(i.defaultValue, o) : "";
|
|
3566
3586
|
return {
|
|
@@ -3587,7 +3607,7 @@ function Nc(t, e) {
|
|
|
3587
3607
|
TypeName: re(i.descriptor),
|
|
3588
3608
|
HasDefaultValue: i.hasDefaultValue,
|
|
3589
3609
|
DefaultValueJson: i.defaultValueJson,
|
|
3590
|
-
DefaultValueData:
|
|
3610
|
+
DefaultValueData: Ac,
|
|
3591
3611
|
IsEnumerable: !1,
|
|
3592
3612
|
EnumerableItemTypeName: "",
|
|
3593
3613
|
Description: i.description ?? ""
|
|
@@ -3601,11 +3621,11 @@ function Nc(t, e) {
|
|
|
3601
3621
|
returnType: n
|
|
3602
3622
|
};
|
|
3603
3623
|
}
|
|
3604
|
-
const
|
|
3605
|
-
function
|
|
3624
|
+
const Se = L("FunctionRegistry"), Nc = new Uint8Array(0);
|
|
3625
|
+
function gc(t) {
|
|
3606
3626
|
return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
|
|
3607
3627
|
}
|
|
3608
|
-
class
|
|
3628
|
+
class Cc {
|
|
3609
3629
|
functions = /* @__PURE__ */ new Map();
|
|
3610
3630
|
config = null;
|
|
3611
3631
|
isConnected = !1;
|
|
@@ -3627,7 +3647,7 @@ class Rc {
|
|
|
3627
3647
|
* If already connected, sends registration to server immediately.
|
|
3628
3648
|
*/
|
|
3629
3649
|
register(e, r) {
|
|
3630
|
-
const n =
|
|
3650
|
+
const n = yc(e, r);
|
|
3631
3651
|
return this.functions.set(e.name, n), this.isConnected && this.config && this.sendRegistration(n), () => this.unregister(e.name);
|
|
3632
3652
|
}
|
|
3633
3653
|
/**
|
|
@@ -3661,7 +3681,9 @@ class Rc {
|
|
|
3661
3681
|
handleProtocolMessage(e, r) {
|
|
3662
3682
|
if (r === S.ACTION_FUNCTION_CALL) {
|
|
3663
3683
|
const n = ne(e);
|
|
3664
|
-
return this.handleFunctionCall(e, n.senderId)
|
|
3684
|
+
return this.handleFunctionCall(e, n.senderId).catch((s) => {
|
|
3685
|
+
Se.error("Failed to handle function call:", s);
|
|
3686
|
+
}), !0;
|
|
3665
3687
|
}
|
|
3666
3688
|
return !1;
|
|
3667
3689
|
}
|
|
@@ -3672,7 +3694,7 @@ class Rc {
|
|
|
3672
3694
|
sendAllRegistrations() {
|
|
3673
3695
|
if (!this.config || this.functions.size === 0)
|
|
3674
3696
|
return;
|
|
3675
|
-
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r =
|
|
3697
|
+
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = Ri({ Functions: e }), n = Mi(r, this.config.sessionId);
|
|
3676
3698
|
this.config.sendProtocolMessage(n);
|
|
3677
3699
|
}
|
|
3678
3700
|
/**
|
|
@@ -3687,10 +3709,10 @@ class Rc {
|
|
|
3687
3709
|
/**
|
|
3688
3710
|
* Handle an incoming function call.
|
|
3689
3711
|
*/
|
|
3690
|
-
handleFunctionCall(e, r) {
|
|
3691
|
-
const n = Xs(e), s = this.functions.get(n.FunctionName);
|
|
3712
|
+
async handleFunctionCall(e, r) {
|
|
3713
|
+
const n = await Xs(e), s = this.functions.get(n.FunctionName);
|
|
3692
3714
|
if (!s) {
|
|
3693
|
-
|
|
3715
|
+
Se.warn(`Received call for unknown function: ${n.FunctionName}`), this.sendError(n.CallId, n.InstanceId, r, new Error(`Unknown function: ${n.FunctionName}`));
|
|
3694
3716
|
return;
|
|
3695
3717
|
}
|
|
3696
3718
|
this.sendAck(n.CallId, n.InstanceId, r), this.executeFunction(s, n, r);
|
|
@@ -3701,17 +3723,17 @@ class Rc {
|
|
|
3701
3723
|
async executeFunction(e, r, n) {
|
|
3702
3724
|
try {
|
|
3703
3725
|
const s = [];
|
|
3704
|
-
for (let
|
|
3705
|
-
const f = e.parameters[
|
|
3706
|
-
h === void 0 || h === "" ? f.hasDefaultValue ? s.push(
|
|
3726
|
+
for (let l = 0; l < e.parameters.length; l++) {
|
|
3727
|
+
const f = e.parameters[l], h = r.Parameters?.[l]?.ValueJson;
|
|
3728
|
+
h === void 0 || h === "" ? f.hasDefaultValue ? s.push(it(f.defaultValueJson, f.descriptor)) : s.push(void 0) : s.push(it(h, f.descriptor));
|
|
3707
3729
|
}
|
|
3708
3730
|
const i = await e.handler(...s);
|
|
3709
|
-
let o = i, a =
|
|
3710
|
-
|
|
3731
|
+
let o = i, a = Nc;
|
|
3732
|
+
gc(i) && (o = i.value, a = new Uint8Array(i.data));
|
|
3711
3733
|
const c = Cr(o, e.returnType);
|
|
3712
3734
|
this.sendResult(r.CallId, r.InstanceId, n, e, c, a);
|
|
3713
3735
|
} catch (s) {
|
|
3714
|
-
|
|
3736
|
+
Se.error(`Function ${r.FunctionName} execution failed:`, s), this.sendError(r.CallId, r.InstanceId, n, s instanceof Error ? s : new Error(String(s)));
|
|
3715
3737
|
}
|
|
3716
3738
|
}
|
|
3717
3739
|
/**
|
|
@@ -3720,7 +3742,7 @@ class Rc {
|
|
|
3720
3742
|
sendAck(e, r, n) {
|
|
3721
3743
|
if (!this.config)
|
|
3722
3744
|
return;
|
|
3723
|
-
const s =
|
|
3745
|
+
const s = Ps(Ms({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
|
|
3724
3746
|
this.config.sendProtocolMessage(s);
|
|
3725
3747
|
}
|
|
3726
3748
|
/**
|
|
@@ -3765,7 +3787,7 @@ class Rc {
|
|
|
3765
3787
|
function bc(t, e) {
|
|
3766
3788
|
return { value: t, data: e };
|
|
3767
3789
|
}
|
|
3768
|
-
function
|
|
3790
|
+
function we(t) {
|
|
3769
3791
|
if (!(typeof t != "string" || !t.trim()))
|
|
3770
3792
|
try {
|
|
3771
3793
|
return JSON.parse(t);
|
|
@@ -3778,7 +3800,7 @@ const Te = {
|
|
|
3778
3800
|
StartAudioCapture: "ikon.client.startAudioCapture",
|
|
3779
3801
|
StopCapture: "ikon.client.stopCapture",
|
|
3780
3802
|
CaptureImage: "ikon.client.captureImage"
|
|
3781
|
-
},
|
|
3803
|
+
}, Rc = {
|
|
3782
3804
|
name: Te.StartVideoCapture,
|
|
3783
3805
|
description: "Start camera or screen capture and stream video frames to the server",
|
|
3784
3806
|
returnType: { kind: "string" },
|
|
@@ -3786,17 +3808,17 @@ const Te = {
|
|
|
3786
3808
|
{ name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
|
|
3787
3809
|
{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
|
|
3788
3810
|
]
|
|
3789
|
-
},
|
|
3811
|
+
}, kc = {
|
|
3790
3812
|
name: Te.StartAudioCapture,
|
|
3791
3813
|
description: "Start microphone capture and stream audio frames to the server",
|
|
3792
3814
|
returnType: { kind: "string" },
|
|
3793
3815
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
3794
|
-
},
|
|
3816
|
+
}, Uc = {
|
|
3795
3817
|
name: Te.StopCapture,
|
|
3796
3818
|
description: "Stop a previously started capture by captureId",
|
|
3797
3819
|
returnType: { kind: "boolean" },
|
|
3798
3820
|
parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
|
|
3799
|
-
},
|
|
3821
|
+
}, Dc = {
|
|
3800
3822
|
name: Te.CaptureImage,
|
|
3801
3823
|
description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
|
|
3802
3824
|
returnType: { kind: "string" },
|
|
@@ -3805,23 +3827,23 @@ const Te = {
|
|
|
3805
3827
|
function Mc(t, e) {
|
|
3806
3828
|
const r = [];
|
|
3807
3829
|
return r.push(
|
|
3808
|
-
t.register(
|
|
3830
|
+
t.register(Rc, async (n, s) => {
|
|
3809
3831
|
const i = e.mediaCapture;
|
|
3810
3832
|
if (!i)
|
|
3811
3833
|
throw new Error("Media capture is not available in this environment");
|
|
3812
|
-
const o =
|
|
3834
|
+
const o = we(s);
|
|
3813
3835
|
return ((typeof n == "string" && n.trim().toLowerCase() === "screen" ? "screen" : "camera") === "screen" ? await i.video.startScreen({ userGesture: !1, options: o, constraints: o?.constraints }) : await i.video.startCamera({ userGesture: !1, options: o, constraints: o?.constraints })).captureId;
|
|
3814
3836
|
})
|
|
3815
3837
|
), r.push(
|
|
3816
|
-
t.register(
|
|
3838
|
+
t.register(kc, async (n) => {
|
|
3817
3839
|
const s = e.mediaCapture;
|
|
3818
3840
|
if (!s)
|
|
3819
3841
|
throw new Error("Media capture is not available in this environment");
|
|
3820
|
-
const i =
|
|
3842
|
+
const i = we(n);
|
|
3821
3843
|
return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).captureId;
|
|
3822
3844
|
})
|
|
3823
3845
|
), r.push(
|
|
3824
|
-
t.register(
|
|
3846
|
+
t.register(Uc, async (n) => {
|
|
3825
3847
|
const s = e.mediaCapture;
|
|
3826
3848
|
if (!s || typeof n != "string" || !n.trim())
|
|
3827
3849
|
return !1;
|
|
@@ -3829,11 +3851,11 @@ function Mc(t, e) {
|
|
|
3829
3851
|
return i || o;
|
|
3830
3852
|
})
|
|
3831
3853
|
), r.push(
|
|
3832
|
-
t.register(
|
|
3854
|
+
t.register(Dc, async (n) => {
|
|
3833
3855
|
const s = e.mediaCapture;
|
|
3834
3856
|
if (!s)
|
|
3835
3857
|
throw new Error("Media capture is not available in this environment");
|
|
3836
|
-
const i =
|
|
3858
|
+
const i = we(n) ?? {}, o = await s.image.captureFromCamera({
|
|
3837
3859
|
userGesture: !1,
|
|
3838
3860
|
constraints: i.constraints,
|
|
3839
3861
|
mime: i.mime,
|
|
@@ -3848,14 +3870,14 @@ function Mc(t, e) {
|
|
|
3848
3870
|
n();
|
|
3849
3871
|
};
|
|
3850
3872
|
}
|
|
3851
|
-
const
|
|
3873
|
+
const br = () => {
|
|
3852
3874
|
if (typeof navigator > "u")
|
|
3853
3875
|
return !1;
|
|
3854
3876
|
const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
3855
3877
|
return e || r;
|
|
3856
|
-
},
|
|
3878
|
+
}, Oc = globalThis;
|
|
3857
3879
|
function le() {
|
|
3858
|
-
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" ||
|
|
3880
|
+
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || Oc.crossOriginIsolated === !1)
|
|
3859
3881
|
return !1;
|
|
3860
3882
|
try {
|
|
3861
3883
|
new SharedArrayBuffer(1);
|
|
@@ -3864,19 +3886,19 @@ function le() {
|
|
|
3864
3886
|
}
|
|
3865
3887
|
return !0;
|
|
3866
3888
|
}
|
|
3867
|
-
function
|
|
3889
|
+
function Rr(t) {
|
|
3868
3890
|
return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
|
|
3869
3891
|
}
|
|
3870
|
-
function
|
|
3892
|
+
function Lc(t) {
|
|
3871
3893
|
return new Worker(
|
|
3872
|
-
"" + new URL("assets/audio-playback-worker-
|
|
3894
|
+
"" + new URL("assets/audio-playback-worker-DPybcm1k.js", import.meta.url).href,
|
|
3873
3895
|
{
|
|
3874
3896
|
type: "module",
|
|
3875
3897
|
name: t?.name
|
|
3876
3898
|
}
|
|
3877
3899
|
);
|
|
3878
3900
|
}
|
|
3879
|
-
const ae = 48e3,
|
|
3901
|
+
const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", vc = 120, Pc = 300, Fc = 4, Bc = 200, Gc = 100, xc = 8e3, Vc = 10, Ur = 100, Ue = 50, Dr = 128, Wc = 20, Hc = !0, x = 1500, $c = -20, Kc = -100, Yc = 200, g = L("IkonAudioPlayback"), jc = () => {
|
|
3880
3902
|
if (typeof navigator > "u" || typeof window > "u")
|
|
3881
3903
|
return !1;
|
|
3882
3904
|
const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
@@ -3888,19 +3910,19 @@ const ae = 48e3, b = 2, kr = 1500, ot = 512, at = "playback", Pc = 120, Fc = 300
|
|
|
3888
3910
|
function K(t) {
|
|
3889
3911
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
3890
3912
|
}
|
|
3891
|
-
function
|
|
3913
|
+
function zc(t) {
|
|
3892
3914
|
return `
|
|
3893
3915
|
// Audio buffer constants
|
|
3894
3916
|
const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
|
|
3895
3917
|
const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
|
|
3896
|
-
const BUFFER_TARGET_MIN_MS = ${
|
|
3897
|
-
const BUFFER_TARGET_MAX_MS = ${
|
|
3898
|
-
const JITTER_MULTIPLIER = ${
|
|
3918
|
+
const BUFFER_TARGET_MIN_MS = ${vc};
|
|
3919
|
+
const BUFFER_TARGET_MAX_MS = ${Pc};
|
|
3920
|
+
const JITTER_MULTIPLIER = ${Fc};
|
|
3899
3921
|
const LOCAL_BUFFER_MAX_MS = ${kr};
|
|
3900
|
-
const CONTROL_PERIOD_MS = ${
|
|
3901
|
-
const UNDERRUN_JUMP_MS = ${
|
|
3902
|
-
const STABLE_TIME_TO_DECREASE_MS = ${
|
|
3903
|
-
const DECREASE_STEP_MS = ${
|
|
3922
|
+
const CONTROL_PERIOD_MS = ${Bc};
|
|
3923
|
+
const UNDERRUN_JUMP_MS = ${Gc};
|
|
3924
|
+
const STABLE_TIME_TO_DECREASE_MS = ${xc};
|
|
3925
|
+
const DECREASE_STEP_MS = ${Vc};
|
|
3904
3926
|
const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
|
|
3905
3927
|
|
|
3906
3928
|
// Pre-computed reciprocals for division-free calculations
|
|
@@ -3909,7 +3931,7 @@ const MS_PER_SAMPLE = 1000 * INV_OUTPUT_SAMPLE_RATE_HZ;
|
|
|
3909
3931
|
|
|
3910
3932
|
// Fade envelope constants
|
|
3911
3933
|
const FADE_IN_DURATION_MS = ${Ur};
|
|
3912
|
-
const FADE_OUT_DURATION_MS = ${
|
|
3934
|
+
const FADE_OUT_DURATION_MS = ${Ue};
|
|
3913
3935
|
const FADE_IN_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_IN_DURATION_MS / 1000);
|
|
3914
3936
|
const FADE_OUT_DURATION_SAMPLES = Math.round(OUTPUT_SAMPLE_RATE_HZ * FADE_OUT_DURATION_MS / 1000);
|
|
3915
3937
|
const FADE_IN_INCREMENT = 1.0 / FADE_IN_DURATION_SAMPLES;
|
|
@@ -3919,7 +3941,7 @@ const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
|
|
|
3919
3941
|
const RENDER_QUANTUM_SIZE = ${Dr};
|
|
3920
3942
|
|
|
3921
3943
|
// Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
|
|
3922
|
-
const BUFFER_REDUCTION_CROSSFADE_MS = ${
|
|
3944
|
+
const BUFFER_REDUCTION_CROSSFADE_MS = ${Wc};
|
|
3923
3945
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
|
|
3924
3946
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
|
|
3925
3947
|
|
|
@@ -4130,7 +4152,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
4130
4152
|
this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
|
|
4131
4153
|
|
|
4132
4154
|
// Normalization config (hardcoded)
|
|
4133
|
-
this.normalizationEnabled = ${
|
|
4155
|
+
this.normalizationEnabled = ${Hc};
|
|
4134
4156
|
|
|
4135
4157
|
// Stream states for audio buffer
|
|
4136
4158
|
this.streams = new Map();
|
|
@@ -4801,12 +4823,12 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
4801
4823
|
registerProcessor('ikon-audio-player', IkonAudioPlayerProcessor);
|
|
4802
4824
|
`;
|
|
4803
4825
|
}
|
|
4804
|
-
class
|
|
4826
|
+
class ze {
|
|
4805
4827
|
client;
|
|
4806
4828
|
config;
|
|
4807
4829
|
enabled = !1;
|
|
4808
4830
|
stateUnsubscribe = null;
|
|
4809
|
-
isMobile =
|
|
4831
|
+
isMobile = jc();
|
|
4810
4832
|
boundVisibilityChange = null;
|
|
4811
4833
|
boundPageHide = null;
|
|
4812
4834
|
unlockHandler = null;
|
|
@@ -4917,7 +4939,7 @@ class je {
|
|
|
4917
4939
|
* (e.g., button click/release) to ensure the AudioContext can be recreated.
|
|
4918
4940
|
*/
|
|
4919
4941
|
requestRecovery() {
|
|
4920
|
-
if (this.enabled &&
|
|
4942
|
+
if (this.enabled && br() && this.audioContext) {
|
|
4921
4943
|
this.stopAudioGraph();
|
|
4922
4944
|
try {
|
|
4923
4945
|
const e = new AudioContext({
|
|
@@ -5011,17 +5033,17 @@ class je {
|
|
|
5011
5033
|
const e = this.audioContext;
|
|
5012
5034
|
if (!e)
|
|
5013
5035
|
return null;
|
|
5014
|
-
const r = e.currentTime, n = e.sampleRate, s =
|
|
5036
|
+
const r = e.currentTime, n = e.sampleRate, s = R;
|
|
5015
5037
|
for (const i of this.visemeBuffers.values()) {
|
|
5016
5038
|
if (!i.timingEstablished || i.count === 0)
|
|
5017
5039
|
continue;
|
|
5018
5040
|
const o = r - i.playbackStartContextTime;
|
|
5019
5041
|
if (o < 0)
|
|
5020
5042
|
continue;
|
|
5021
|
-
const a = o * n * s, c = i.frames,
|
|
5043
|
+
const a = o * n * s, c = i.frames, l = i.count, d = (i.head - l + x) % x;
|
|
5022
5044
|
let h = null, E = null;
|
|
5023
|
-
for (let
|
|
5024
|
-
const N = (d +
|
|
5045
|
+
for (let u = 0; u < l; u++) {
|
|
5046
|
+
const N = (d + u) % x, w = c[N], v = w.samplePosition + Math.max(w.frameSamples, 1);
|
|
5025
5047
|
if (w.samplePosition <= a && (h = w), v > a && !E && (E = w, w.samplePosition <= a))
|
|
5026
5048
|
break;
|
|
5027
5049
|
}
|
|
@@ -5034,8 +5056,8 @@ class je {
|
|
|
5034
5056
|
return this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm, this._visemeResult;
|
|
5035
5057
|
const I = h.samplePosition, T = Math.max(h.frameSamples, 1), p = I + T;
|
|
5036
5058
|
if (h !== E && E.samplePosition > h.samplePosition && p > I) {
|
|
5037
|
-
const
|
|
5038
|
-
this._visemeResult.mouthOpenY = h.mouthOpenY +
|
|
5059
|
+
const u = Math.min(1, Math.max(0, (a - I) / (p - I)));
|
|
5060
|
+
this._visemeResult.mouthOpenY = h.mouthOpenY + u * (E.mouthOpenY - h.mouthOpenY), this._visemeResult.mouthForm = h.mouthForm + u * (E.mouthForm - h.mouthForm);
|
|
5039
5061
|
} else
|
|
5040
5062
|
this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm;
|
|
5041
5063
|
return this._visemeResult;
|
|
@@ -5063,7 +5085,7 @@ class je {
|
|
|
5063
5085
|
const a = ae, c = at;
|
|
5064
5086
|
try {
|
|
5065
5087
|
this.audioContext = new AudioContext({ sampleRate: a, latencyHint: c });
|
|
5066
|
-
} catch (
|
|
5088
|
+
} catch (l) {
|
|
5067
5089
|
try {
|
|
5068
5090
|
this.audioContext = new AudioContext({ latencyHint: c });
|
|
5069
5091
|
} catch (f) {
|
|
@@ -5075,12 +5097,12 @@ class je {
|
|
|
5075
5097
|
}
|
|
5076
5098
|
g.debug(`AudioContext latencyHint unsupported: ${K(f)}`);
|
|
5077
5099
|
}
|
|
5078
|
-
g.debug(`AudioContext sample rate request unsupported: ${K(
|
|
5100
|
+
g.debug(`AudioContext sample rate request unsupported: ${K(l)}`);
|
|
5079
5101
|
}
|
|
5080
5102
|
this.outputSampleRateHz = this.audioContext.sampleRate || ae, this.outputSampleRateHz !== a && g.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
|
|
5081
5103
|
}
|
|
5082
5104
|
const n = this.audioContext, s = this.resolveDiagnosticsConfig();
|
|
5083
|
-
if ((this.config.performance?.preferAudioWorklet ?? !0) &&
|
|
5105
|
+
if ((this.config.performance?.preferAudioWorklet ?? !0) && Rr(n)) {
|
|
5084
5106
|
await this.ensureAudioWorklet(n, s, e, r);
|
|
5085
5107
|
return;
|
|
5086
5108
|
}
|
|
@@ -5130,9 +5152,9 @@ class je {
|
|
|
5130
5152
|
setupMediaSession() {
|
|
5131
5153
|
if (!(typeof document > "u")) {
|
|
5132
5154
|
if (!this.silentAudioElement) {
|
|
5133
|
-
const s = new ArrayBuffer(882044), i = new DataView(s), o = (
|
|
5155
|
+
const s = new ArrayBuffer(882044), i = new DataView(s), o = (l, f) => {
|
|
5134
5156
|
for (let d = 0; d < f.length; d++)
|
|
5135
|
-
i.setUint8(
|
|
5157
|
+
i.setUint8(l + d, f.charCodeAt(d));
|
|
5136
5158
|
};
|
|
5137
5159
|
o(0, "RIFF"), i.setUint32(4, 36 + 441e3 * 2, !0), o(8, "WAVE"), o(12, "fmt "), i.setUint32(16, 16, !0), i.setUint16(20, 1, !0), i.setUint16(22, 1, !0), i.setUint32(24, 44100, !0), i.setUint32(28, 44100 * 2, !0), i.setUint16(32, 2, !0), i.setUint16(34, 16, !0), o(36, "data"), i.setUint32(40, 441e3 * 2, !0);
|
|
5138
5160
|
const a = new Blob([s], { type: "audio/wav" }), c = URL.createObjectURL(a);
|
|
@@ -5219,7 +5241,7 @@ class je {
|
|
|
5219
5241
|
*/
|
|
5220
5242
|
async resumeWithTimeout(e) {
|
|
5221
5243
|
const r = e.resume(), n = new Promise((s, i) => {
|
|
5222
|
-
setTimeout(() => i(new Error("AudioContext.resume() timed out")),
|
|
5244
|
+
setTimeout(() => i(new Error("AudioContext.resume() timed out")), ze.RESUME_TIMEOUT_MS);
|
|
5223
5245
|
});
|
|
5224
5246
|
await Promise.race([r, n]);
|
|
5225
5247
|
}
|
|
@@ -5233,14 +5255,14 @@ class je {
|
|
|
5233
5255
|
await this.resumeWithTimeout(e), this.getContextState(e) === "running" && this.removeUnlockHandler();
|
|
5234
5256
|
} catch {
|
|
5235
5257
|
}
|
|
5236
|
-
const i = `${this.outputSampleRateHz}_${
|
|
5258
|
+
const i = `${this.outputSampleRateHz}_${R}`;
|
|
5237
5259
|
if (!this.workletModuleUrl || this.workletModuleKey !== i) {
|
|
5238
5260
|
if (this.workletModuleUrl)
|
|
5239
5261
|
try {
|
|
5240
5262
|
URL.revokeObjectURL(this.workletModuleUrl);
|
|
5241
5263
|
} catch {
|
|
5242
5264
|
}
|
|
5243
|
-
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
5265
|
+
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([zc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: R })], { type: "text/javascript" }));
|
|
5244
5266
|
}
|
|
5245
5267
|
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((f) => {
|
|
5246
5268
|
throw g.warn(`Failed to load AudioWorklet module, falling back: ${K(f)}`), f;
|
|
@@ -5256,11 +5278,11 @@ class je {
|
|
|
5256
5278
|
this.audioWorkletNode = new AudioWorkletNode(e, "ikon-audio-player", {
|
|
5257
5279
|
numberOfInputs: 0,
|
|
5258
5280
|
numberOfOutputs: 1,
|
|
5259
|
-
outputChannelCount: [
|
|
5281
|
+
outputChannelCount: [R],
|
|
5260
5282
|
processorOptions: {
|
|
5261
5283
|
outputAudioConfig: { diagnostics: r },
|
|
5262
5284
|
useSharedArrayBuffer: a,
|
|
5263
|
-
outputChannels:
|
|
5285
|
+
outputChannels: R
|
|
5264
5286
|
}
|
|
5265
5287
|
}), this.audioWorkletNode.port.onmessage = (f) => {
|
|
5266
5288
|
const d = f.data;
|
|
@@ -5282,49 +5304,49 @@ class je {
|
|
|
5282
5304
|
const c = this.pendingWorkletMessages.splice(0);
|
|
5283
5305
|
for (const f of c)
|
|
5284
5306
|
this.postToWorklet(f);
|
|
5285
|
-
const
|
|
5286
|
-
this.notifyPlaybackActive(
|
|
5307
|
+
const l = this.getContextState(e) === "running";
|
|
5308
|
+
this.notifyPlaybackActive(l);
|
|
5287
5309
|
}
|
|
5288
5310
|
ensureScriptProcessor(e, r) {
|
|
5289
5311
|
if (this.scriptProcessorNode)
|
|
5290
5312
|
return;
|
|
5291
5313
|
this.stopAudioWorklet(), this.pendingWorkletMessages = [];
|
|
5292
|
-
const n = 1024, s = new Float32Array(n *
|
|
5314
|
+
const n = 1024, s = new Float32Array(n * R), i = Math.round(this.outputSampleRateHz * Ur / 1e3), o = Math.round(this.outputSampleRateHz * Ue / 1e3), a = 1 / i, c = 1 / o, l = new Array(R), f = [], d = e.createScriptProcessor(n, 0, R);
|
|
5293
5315
|
d.onaudioprocess = (h) => {
|
|
5294
5316
|
const E = h.outputBuffer, m = E.numberOfChannels, I = E.length;
|
|
5295
5317
|
for (let p = 0; p < m; p++) {
|
|
5296
|
-
const
|
|
5297
|
-
|
|
5318
|
+
const u = E.getChannelData(p);
|
|
5319
|
+
u.fill(0), l[p] = u;
|
|
5298
5320
|
}
|
|
5299
5321
|
let T = 0;
|
|
5300
5322
|
f.length = 0;
|
|
5301
|
-
for (const [p,
|
|
5302
|
-
|
|
5323
|
+
for (const [p, u] of this.fallbackQueues.entries()) {
|
|
5324
|
+
u.totalSamples > 0 && (T += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / m * 1e3 / this.outputSampleRateHz <= Ue * 2 && (u.fadeDirection = "out"), this.readFromFallbackQueue(u, s), (u.totalSamples > 0 || !u.hasLastOut) && ((!u.lastOut || u.lastOut.length !== s.length) && (u.lastOut = new Float32Array(s.length)), u.lastOut.set(s), u.hasLastOut = !0);
|
|
5303
5325
|
for (let w = 0; w < I; w++) {
|
|
5304
|
-
|
|
5326
|
+
u.fadeDirection === "in" ? (u.fadeGain = Math.min(1, u.fadeGain + a), u.fadeGain >= 1 && (u.fadeDirection = "none")) : u.fadeDirection === "out" && (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none"));
|
|
5305
5327
|
for (let v = 0; v < m; v++) {
|
|
5306
|
-
const
|
|
5307
|
-
|
|
5328
|
+
const M = s[w * m + v];
|
|
5329
|
+
l[v][w] += M * u.fadeGain;
|
|
5308
5330
|
}
|
|
5309
5331
|
}
|
|
5310
|
-
const N =
|
|
5311
|
-
if (N &&
|
|
5312
|
-
if (
|
|
5332
|
+
const N = u.ending || u.inputDrained;
|
|
5333
|
+
if (N && u.totalSamples <= 0) {
|
|
5334
|
+
if (u.fadeDirection === "out" && u.fadeGain > 1e-3) {
|
|
5313
5335
|
for (let w = 0; w < I; w++)
|
|
5314
|
-
if (
|
|
5315
|
-
|
|
5336
|
+
if (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 1e-3) {
|
|
5337
|
+
u.fadeGain = 0, u.fadeDirection = "none";
|
|
5316
5338
|
break;
|
|
5317
5339
|
}
|
|
5318
5340
|
}
|
|
5319
|
-
|
|
5320
|
-
} else if (!N &&
|
|
5321
|
-
|
|
5322
|
-
const w =
|
|
5323
|
-
for (let
|
|
5324
|
-
|
|
5341
|
+
u.fadeGain <= 1e-3 && u.ending && f.push(p);
|
|
5342
|
+
} else if (!N && u.totalSamples <= 0 && u.hasLastOut && u.lastOut && u.fadeGain > 1e-3) {
|
|
5343
|
+
u.fadeDirection = "out", u.underrunPending = !0;
|
|
5344
|
+
const w = u.lastOut, v = I - 1;
|
|
5345
|
+
for (let M = 0; M < I; M++) {
|
|
5346
|
+
u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none");
|
|
5325
5347
|
for (let $ = 0; $ < m; $++) {
|
|
5326
5348
|
const Gr = w[v * m + $];
|
|
5327
|
-
|
|
5349
|
+
l[$][M] += Gr * u.fadeGain;
|
|
5328
5350
|
}
|
|
5329
5351
|
}
|
|
5330
5352
|
}
|
|
@@ -5336,14 +5358,14 @@ class je {
|
|
|
5336
5358
|
}
|
|
5337
5359
|
if (T > 1) {
|
|
5338
5360
|
const p = 1 / Math.sqrt(T);
|
|
5339
|
-
for (let
|
|
5361
|
+
for (let u = 0; u < I; u++)
|
|
5340
5362
|
for (let N = 0; N < m; N++)
|
|
5341
|
-
|
|
5363
|
+
l[N][u] *= p;
|
|
5342
5364
|
}
|
|
5343
5365
|
for (let p = 0; p < I; p++)
|
|
5344
|
-
for (let
|
|
5345
|
-
const N = u
|
|
5346
|
-
u
|
|
5366
|
+
for (let u = 0; u < m; u++) {
|
|
5367
|
+
const N = l[u][p];
|
|
5368
|
+
l[u][p] = N > 1 ? 1 : N < -1 ? -1 : N;
|
|
5347
5369
|
}
|
|
5348
5370
|
}, d.connect(e.destination), this.scriptProcessorNode = d, this.ensureScriptProcessorDiagnostics(r);
|
|
5349
5371
|
}
|
|
@@ -5365,7 +5387,7 @@ class je {
|
|
|
5365
5387
|
e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
|
|
5366
5388
|
}
|
|
5367
5389
|
trimFallbackQueue(e) {
|
|
5368
|
-
const r = Math.floor(this.outputSampleRateHz *
|
|
5390
|
+
const r = Math.floor(this.outputSampleRateHz * R * kr / 1e3), n = e.totalSamples - r;
|
|
5369
5391
|
n <= 0 || this.skipFromFallbackQueue(e, n);
|
|
5370
5392
|
}
|
|
5371
5393
|
stopScriptProcessorDiagnostics() {
|
|
@@ -5384,7 +5406,7 @@ class je {
|
|
|
5384
5406
|
for (const [n, s] of this.fallbackQueues.entries()) {
|
|
5385
5407
|
if (s.totalSamples <= 0)
|
|
5386
5408
|
continue;
|
|
5387
|
-
const o = s.totalSamples /
|
|
5409
|
+
const o = s.totalSamples / R * 1e3 / this.outputSampleRateHz;
|
|
5388
5410
|
g.debug(`[Audio] stream=${n.substring(0, 8)} buffer=${o.toFixed(0)}ms renderer=ScriptProcessor`);
|
|
5389
5411
|
}
|
|
5390
5412
|
}, r);
|
|
@@ -5467,7 +5489,7 @@ class je {
|
|
|
5467
5489
|
type: "rebind",
|
|
5468
5490
|
transport: s,
|
|
5469
5491
|
outputSampleRate: this.outputSampleRateHz,
|
|
5470
|
-
outputChannels:
|
|
5492
|
+
outputChannels: R
|
|
5471
5493
|
});
|
|
5472
5494
|
} catch {
|
|
5473
5495
|
}
|
|
@@ -5486,7 +5508,7 @@ class je {
|
|
|
5486
5508
|
}
|
|
5487
5509
|
this.protocolPort = e;
|
|
5488
5510
|
try {
|
|
5489
|
-
this.audioWorker = new
|
|
5511
|
+
this.audioWorker = new Lc();
|
|
5490
5512
|
} catch (d) {
|
|
5491
5513
|
g.warn(`Failed to create audio worker: ${K(d)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
5492
5514
|
return;
|
|
@@ -5500,12 +5522,12 @@ class je {
|
|
|
5500
5522
|
type: "configure",
|
|
5501
5523
|
transport: s ? "sab" : "pcm",
|
|
5502
5524
|
outputSampleRate: this.outputSampleRateHz,
|
|
5503
|
-
outputChannels:
|
|
5525
|
+
outputChannels: R,
|
|
5504
5526
|
preferWebCodecs: i
|
|
5505
5527
|
};
|
|
5506
5528
|
r.postMessage(o), r.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
|
|
5507
5529
|
const a = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", c = s ? "SharedArrayBuffer" : "MessagePort", f = i && typeof AudioDecoder < "u" ? "WebCodecs" : "WASM Opus";
|
|
5508
|
-
g.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${f}, output=${this.outputSampleRateHz}Hz/${
|
|
5530
|
+
g.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${f}, output=${this.outputSampleRateHz}Hz/${R}ch`);
|
|
5509
5531
|
}
|
|
5510
5532
|
onAudioWorkerMessage(e) {
|
|
5511
5533
|
if (e.type === "streamBegin") {
|
|
@@ -5570,7 +5592,7 @@ class je {
|
|
|
5570
5592
|
s.epochTimestampSamples = e.timestampInterleavedSamples;
|
|
5571
5593
|
const c = this.audioContext;
|
|
5572
5594
|
if (c) {
|
|
5573
|
-
const
|
|
5595
|
+
const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f = $c + l * 1e3, d = Math.min(Yc, Math.max(Kc, f));
|
|
5574
5596
|
s.playbackStartContextTime = c.currentTime + d / 1e3;
|
|
5575
5597
|
}
|
|
5576
5598
|
s.timingEstablished = !0;
|
|
@@ -5693,9 +5715,9 @@ class je {
|
|
|
5693
5715
|
}));
|
|
5694
5716
|
}
|
|
5695
5717
|
}
|
|
5696
|
-
function
|
|
5718
|
+
function Xc(t) {
|
|
5697
5719
|
return new Worker(
|
|
5698
|
-
"" + new URL("assets/video-playback-worker-
|
|
5720
|
+
"" + new URL("assets/video-playback-worker-qauTQ7Et.js", import.meta.url).href,
|
|
5699
5721
|
{
|
|
5700
5722
|
type: "module",
|
|
5701
5723
|
name: t?.name
|
|
@@ -5703,10 +5725,10 @@ function Jc(t) {
|
|
|
5703
5725
|
);
|
|
5704
5726
|
}
|
|
5705
5727
|
const V = L("IkonVideoPlayback");
|
|
5706
|
-
function
|
|
5728
|
+
function Ae(t) {
|
|
5707
5729
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
5708
5730
|
}
|
|
5709
|
-
class
|
|
5731
|
+
class Jc {
|
|
5710
5732
|
client;
|
|
5711
5733
|
config;
|
|
5712
5734
|
enabled = !0;
|
|
@@ -5781,9 +5803,9 @@ class Qc {
|
|
|
5781
5803
|
}
|
|
5782
5804
|
let e;
|
|
5783
5805
|
try {
|
|
5784
|
-
e = new
|
|
5806
|
+
e = new Xc();
|
|
5785
5807
|
} catch (r) {
|
|
5786
|
-
V.warn(`Failed to create video worker: ${
|
|
5808
|
+
V.warn(`Failed to create video worker: ${Ae(r)}`);
|
|
5787
5809
|
return;
|
|
5788
5810
|
}
|
|
5789
5811
|
this.worker = e, e.addEventListener("message", (r) => this.onWorkerMessage(r.data)), e.addEventListener("error", (r) => {
|
|
@@ -5852,7 +5874,7 @@ class Qc {
|
|
|
5852
5874
|
const n = r.canvas.transferControlToOffscreen();
|
|
5853
5875
|
this.worker.postMessage({ type: "attachSurface", streamId: e, canvas: n }, [n]), r.attachedToWorker = !0;
|
|
5854
5876
|
} catch (n) {
|
|
5855
|
-
V.warn(`Failed to attach offscreen canvas for stream ${e}: ${
|
|
5877
|
+
V.warn(`Failed to attach offscreen canvas for stream ${e}: ${Ae(n)}`), r.mode = "bitmap", r.ctxBitmap = r.canvas.getContext("bitmaprenderer", { alpha: !1 }), r.ctxBitmap || (r.ctx2d = r.canvas.getContext("2d", { alpha: !1, desynchronized: !0 }));
|
|
5856
5878
|
try {
|
|
5857
5879
|
this.worker.postMessage({ type: "watchStream", streamId: e }), r.attachedToWorker = !0;
|
|
5858
5880
|
} catch {
|
|
@@ -5870,7 +5892,7 @@ class Qc {
|
|
|
5870
5892
|
const r = this.parseStreamId(e);
|
|
5871
5893
|
if (!r)
|
|
5872
5894
|
return;
|
|
5873
|
-
const n =
|
|
5895
|
+
const n = Na(Aa(), this.client.sessionId ?? 0, {
|
|
5874
5896
|
trackId: r.trackId,
|
|
5875
5897
|
targetIds: [r.senderId]
|
|
5876
5898
|
});
|
|
@@ -5901,7 +5923,7 @@ class Qc {
|
|
|
5901
5923
|
try {
|
|
5902
5924
|
this.worker.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
|
|
5903
5925
|
} catch (r) {
|
|
5904
|
-
V.warn(`Failed to attach video protocol port: ${
|
|
5926
|
+
V.warn(`Failed to attach video protocol port: ${Ae(r)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
5905
5927
|
}
|
|
5906
5928
|
}
|
|
5907
5929
|
}
|
|
@@ -5930,11 +5952,11 @@ class Qc {
|
|
|
5930
5952
|
}));
|
|
5931
5953
|
}
|
|
5932
5954
|
}
|
|
5933
|
-
class
|
|
5955
|
+
class Qc {
|
|
5934
5956
|
audio;
|
|
5935
5957
|
video;
|
|
5936
5958
|
constructor(e, r) {
|
|
5937
|
-
this.audio = new
|
|
5959
|
+
this.audio = new ze(e, r?.audio), this.video = new Jc(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
|
|
5938
5960
|
}
|
|
5939
5961
|
/**
|
|
5940
5962
|
* Releases media resources (workers, audio graph, decoders).
|
|
@@ -5945,7 +5967,7 @@ class Zc {
|
|
|
5945
5967
|
this.audio.dispose(), this.video.dispose();
|
|
5946
5968
|
}
|
|
5947
5969
|
}
|
|
5948
|
-
class
|
|
5970
|
+
class Zc {
|
|
5949
5971
|
static getStorageForCapacity(e, r) {
|
|
5950
5972
|
const n = Int32Array.BYTES_PER_ELEMENT * 2, s = r.BYTES_PER_ELEMENT * e;
|
|
5951
5973
|
return new SharedArrayBuffer(n + s);
|
|
@@ -5999,7 +6021,7 @@ class qc {
|
|
|
5999
6021
|
return n = (n + r) % this.capacity, Atomics.store(this.readWrite, 0, n), r;
|
|
6000
6022
|
}
|
|
6001
6023
|
}
|
|
6002
|
-
function
|
|
6024
|
+
function qc(t) {
|
|
6003
6025
|
return new Worker(
|
|
6004
6026
|
"" + new URL("assets/audio-capture-worker-kpORDYGU.js", import.meta.url).href,
|
|
6005
6027
|
{
|
|
@@ -6008,12 +6030,12 @@ function el(t) {
|
|
|
6008
6030
|
}
|
|
6009
6031
|
);
|
|
6010
6032
|
}
|
|
6011
|
-
const
|
|
6012
|
-
function
|
|
6033
|
+
const el = L("IkonAudioCapture");
|
|
6034
|
+
function tl() {
|
|
6013
6035
|
const t = globalThis.crypto;
|
|
6014
6036
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6015
6037
|
}
|
|
6016
|
-
function
|
|
6038
|
+
function rl() {
|
|
6017
6039
|
return `
|
|
6018
6040
|
class RingBuffer {
|
|
6019
6041
|
static getStorageForCapacity(capacity, type) {
|
|
@@ -6142,7 +6164,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
|
|
|
6142
6164
|
registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
|
|
6143
6165
|
`;
|
|
6144
6166
|
}
|
|
6145
|
-
class
|
|
6167
|
+
class nl {
|
|
6146
6168
|
constructor(e, r) {
|
|
6147
6169
|
this.client = e, this.config = r ?? {};
|
|
6148
6170
|
}
|
|
@@ -6162,12 +6184,12 @@ class sl {
|
|
|
6162
6184
|
ensureWorker() {
|
|
6163
6185
|
if (this.worker)
|
|
6164
6186
|
return this.worker;
|
|
6165
|
-
const e = new
|
|
6187
|
+
const e = new qc();
|
|
6166
6188
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6167
6189
|
const n = r.data;
|
|
6168
6190
|
if (n?.type === "error") {
|
|
6169
6191
|
const s = n.error;
|
|
6170
|
-
|
|
6192
|
+
el.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
|
|
6171
6193
|
}
|
|
6172
6194
|
}), e;
|
|
6173
6195
|
}
|
|
@@ -6203,9 +6225,9 @@ class sl {
|
|
|
6203
6225
|
return await navigator.mediaDevices.getUserMedia({ audio: n });
|
|
6204
6226
|
}
|
|
6205
6227
|
async ensureWorklet(e) {
|
|
6206
|
-
if (!
|
|
6228
|
+
if (!Rr(e))
|
|
6207
6229
|
throw new Error("AudioWorklet is not supported in this browser");
|
|
6208
|
-
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
6230
|
+
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([rl()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
|
|
6209
6231
|
try {
|
|
6210
6232
|
await this.workletReady;
|
|
6211
6233
|
} catch (r) {
|
|
@@ -6221,13 +6243,13 @@ class sl {
|
|
|
6221
6243
|
if (!i)
|
|
6222
6244
|
throw s.getTracks().forEach((p) => p.stop()), new Error("No audio track available");
|
|
6223
6245
|
await this.ensureWorklet(n);
|
|
6224
|
-
const o =
|
|
6225
|
-
|
|
6246
|
+
const o = tl(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), l = n.createGain();
|
|
6247
|
+
l.gain.value = 0, l.connect(n.destination);
|
|
6226
6248
|
const h = le() ? "sab" : "pcm";
|
|
6227
6249
|
let E;
|
|
6228
6250
|
if (h === "sab") {
|
|
6229
6251
|
const p = Math.floor(n.sampleRate * 2);
|
|
6230
|
-
E =
|
|
6252
|
+
E = Zc.getStorageForCapacity(p, Float32Array);
|
|
6231
6253
|
}
|
|
6232
6254
|
const m = this.ensureWorker();
|
|
6233
6255
|
m.postMessage({
|
|
@@ -6243,17 +6265,17 @@ class sl {
|
|
|
6243
6265
|
},
|
|
6244
6266
|
transport: h,
|
|
6245
6267
|
sharedArrayBuffer: E
|
|
6246
|
-
}), await new Promise((p,
|
|
6268
|
+
}), await new Promise((p, u) => {
|
|
6247
6269
|
const N = setTimeout(() => {
|
|
6248
|
-
m.removeEventListener("message", w),
|
|
6270
|
+
m.removeEventListener("message", w), u(new Error("Audio capture worker start timeout"));
|
|
6249
6271
|
}, 1e4), w = (v) => {
|
|
6250
|
-
const
|
|
6251
|
-
if (
|
|
6272
|
+
const M = v.data;
|
|
6273
|
+
if (M?.type === "started" && M.captureId === o)
|
|
6252
6274
|
clearTimeout(N), m.removeEventListener("message", w), p();
|
|
6253
|
-
else if (
|
|
6275
|
+
else if (M?.type === "error" && M.captureId === o) {
|
|
6254
6276
|
clearTimeout(N), m.removeEventListener("message", w);
|
|
6255
|
-
const $ =
|
|
6256
|
-
|
|
6277
|
+
const $ = M.error;
|
|
6278
|
+
u(new Error($?.message ?? "Audio capture failed to start"));
|
|
6257
6279
|
}
|
|
6258
6280
|
};
|
|
6259
6281
|
m.addEventListener("message", w);
|
|
@@ -6268,10 +6290,10 @@ class sl {
|
|
|
6268
6290
|
sharedArrayBuffer: E
|
|
6269
6291
|
}
|
|
6270
6292
|
});
|
|
6271
|
-
c.connect(I), I.connect(
|
|
6272
|
-
const
|
|
6273
|
-
if (!(!
|
|
6274
|
-
const N =
|
|
6293
|
+
c.connect(I), I.connect(l), h === "pcm" && (I.port.onmessage = (p) => {
|
|
6294
|
+
const u = p.data;
|
|
6295
|
+
if (!(!u || typeof u != "object") && u.type === "pcm" && u.pcm instanceof Float32Array) {
|
|
6296
|
+
const N = u.pcm;
|
|
6275
6297
|
m.postMessage({ type: "pcm", captureId: o, pcm: N }, [N.buffer]);
|
|
6276
6298
|
}
|
|
6277
6299
|
});
|
|
@@ -6283,13 +6305,13 @@ class sl {
|
|
|
6283
6305
|
ctx: n,
|
|
6284
6306
|
source: c,
|
|
6285
6307
|
worklet: I,
|
|
6286
|
-
gain:
|
|
6308
|
+
gain: l,
|
|
6287
6309
|
stopped: !1,
|
|
6288
6310
|
startSegment: () => {
|
|
6289
6311
|
T.stopped || m.postMessage({ type: "startSegment", captureId: o });
|
|
6290
6312
|
},
|
|
6291
6313
|
endSegment: () => {
|
|
6292
|
-
T.stopped || (m.postMessage({ type: "endSegment", captureId: o }),
|
|
6314
|
+
T.stopped || (m.postMessage({ type: "endSegment", captureId: o }), br() && T.stop());
|
|
6293
6315
|
},
|
|
6294
6316
|
stop: async () => {
|
|
6295
6317
|
if (!T.stopped) {
|
|
@@ -6303,7 +6325,7 @@ class sl {
|
|
|
6303
6325
|
} catch {
|
|
6304
6326
|
}
|
|
6305
6327
|
try {
|
|
6306
|
-
|
|
6328
|
+
l.disconnect();
|
|
6307
6329
|
} catch {
|
|
6308
6330
|
}
|
|
6309
6331
|
try {
|
|
@@ -6368,9 +6390,9 @@ class sl {
|
|
|
6368
6390
|
}
|
|
6369
6391
|
}
|
|
6370
6392
|
}
|
|
6371
|
-
const
|
|
6372
|
-
async function
|
|
6373
|
-
const r = e.mime ?? Lr, n = e.quality ??
|
|
6393
|
+
const Mr = 1280, Or = 720, sl = 30, Lr = "image/jpeg", il = 0.92;
|
|
6394
|
+
async function ol(t, e) {
|
|
6395
|
+
const r = e.mime ?? Lr, n = e.quality ?? il;
|
|
6374
6396
|
if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
|
|
6375
6397
|
try {
|
|
6376
6398
|
return await t.convertToBlob({ type: r, quality: n });
|
|
@@ -6387,7 +6409,7 @@ async function al(t, e) {
|
|
|
6387
6409
|
);
|
|
6388
6410
|
});
|
|
6389
6411
|
}
|
|
6390
|
-
class
|
|
6412
|
+
class al {
|
|
6391
6413
|
async acquireCameraStream(e) {
|
|
6392
6414
|
if (!navigator.mediaDevices)
|
|
6393
6415
|
throw new Error("Media devices are not available in this environment");
|
|
@@ -6412,19 +6434,19 @@ class cl {
|
|
|
6412
6434
|
await s.play();
|
|
6413
6435
|
} catch {
|
|
6414
6436
|
}
|
|
6415
|
-
const i = s.videoWidth || (n.getSettings().width ??
|
|
6416
|
-
let
|
|
6437
|
+
const i = s.videoWidth || (n.getSettings().width ?? Mr), o = s.videoHeight || (n.getSettings().height ?? Or), a = e.width ? Math.max(1, Math.floor(e.width)) : i, c = e.height ? Math.max(1, Math.floor(e.height)) : o;
|
|
6438
|
+
let l;
|
|
6417
6439
|
if (typeof OffscreenCanvas < "u")
|
|
6418
|
-
|
|
6440
|
+
l = new OffscreenCanvas(a, c);
|
|
6419
6441
|
else {
|
|
6420
6442
|
const E = document.createElement("canvas");
|
|
6421
|
-
E.width = a, E.height = c,
|
|
6443
|
+
E.width = a, E.height = c, l = E;
|
|
6422
6444
|
}
|
|
6423
|
-
const f =
|
|
6445
|
+
const f = l.getContext("2d", { alpha: !1 });
|
|
6424
6446
|
if (!f)
|
|
6425
6447
|
throw new Error("2D canvas context unavailable");
|
|
6426
6448
|
f.drawImage(s, 0, 0, a, c);
|
|
6427
|
-
const d = await
|
|
6449
|
+
const d = await ol(l, e), h = await d.arrayBuffer();
|
|
6428
6450
|
return {
|
|
6429
6451
|
mime: d.type || e.mime || Lr,
|
|
6430
6452
|
width: a,
|
|
@@ -6451,9 +6473,9 @@ class cl {
|
|
|
6451
6473
|
}
|
|
6452
6474
|
}
|
|
6453
6475
|
}
|
|
6454
|
-
function
|
|
6476
|
+
function cl(t) {
|
|
6455
6477
|
return new Worker(
|
|
6456
|
-
"" + new URL("assets/video-capture-worker-
|
|
6478
|
+
"" + new URL("assets/video-capture-worker-DP3lFDjq.js", import.meta.url).href,
|
|
6457
6479
|
{
|
|
6458
6480
|
type: "module",
|
|
6459
6481
|
name: t?.name
|
|
@@ -6461,17 +6483,17 @@ function ll(t) {
|
|
|
6461
6483
|
);
|
|
6462
6484
|
}
|
|
6463
6485
|
const lt = L("IkonVideoCapture");
|
|
6464
|
-
function
|
|
6486
|
+
function ll() {
|
|
6465
6487
|
const t = globalThis.crypto;
|
|
6466
6488
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6467
6489
|
}
|
|
6468
|
-
function
|
|
6490
|
+
function ul() {
|
|
6469
6491
|
const t = globalThis.MediaStreamTrackProcessor;
|
|
6470
6492
|
if (!t)
|
|
6471
6493
|
throw new Error("MediaStreamTrackProcessor is not available in this browser");
|
|
6472
6494
|
return t;
|
|
6473
6495
|
}
|
|
6474
|
-
class
|
|
6496
|
+
class hl {
|
|
6475
6497
|
constructor(e) {
|
|
6476
6498
|
this.client = e;
|
|
6477
6499
|
}
|
|
@@ -6487,7 +6509,7 @@ class dl {
|
|
|
6487
6509
|
ensureWorker() {
|
|
6488
6510
|
if (this.worker)
|
|
6489
6511
|
return this.worker;
|
|
6490
|
-
const e = new
|
|
6512
|
+
const e = new cl();
|
|
6491
6513
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6492
6514
|
const n = r.data;
|
|
6493
6515
|
if (n?.type === "error") {
|
|
@@ -6514,7 +6536,7 @@ class dl {
|
|
|
6514
6536
|
async getMediaStream(e) {
|
|
6515
6537
|
if (!navigator.mediaDevices)
|
|
6516
6538
|
throw new Error("Media devices are not available in this environment");
|
|
6517
|
-
const r = e.constraints ?? {}, n = e.options?.framerate ??
|
|
6539
|
+
const r = e.constraints ?? {}, n = e.options?.framerate ?? sl, s = {
|
|
6518
6540
|
...r,
|
|
6519
6541
|
frameRate: r.frameRate ?? { ideal: n }
|
|
6520
6542
|
};
|
|
@@ -6525,10 +6547,10 @@ class dl {
|
|
|
6525
6547
|
if (!r)
|
|
6526
6548
|
throw new Error("Cannot start video capture before client is connected");
|
|
6527
6549
|
this.ensurePorts();
|
|
6528
|
-
const n =
|
|
6550
|
+
const n = ll(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
|
|
6529
6551
|
if (!i)
|
|
6530
6552
|
throw s.getTracks().forEach((I) => I.stop()), new Error("No video track available");
|
|
6531
|
-
const o = i.getSettings(), a = e.options?.width ?? o.width ??
|
|
6553
|
+
const o = i.getSettings(), a = e.options?.width ?? o.width ?? Mr, c = e.options?.height ?? o.height ?? Or, l = ul(), d = new l({ track: i }).readable, h = this.allocateTrackId(), E = this.ensureWorker();
|
|
6532
6554
|
E.postMessage(
|
|
6533
6555
|
{
|
|
6534
6556
|
type: "start",
|
|
@@ -6596,12 +6618,12 @@ class dl {
|
|
|
6596
6618
|
this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
|
|
6597
6619
|
}
|
|
6598
6620
|
}
|
|
6599
|
-
class
|
|
6621
|
+
class dl {
|
|
6600
6622
|
audio;
|
|
6601
6623
|
video;
|
|
6602
6624
|
image;
|
|
6603
6625
|
constructor(e, r) {
|
|
6604
|
-
this.audio = new
|
|
6626
|
+
this.audio = new nl(e, r?.audio), this.video = new hl(e), this.image = new al();
|
|
6605
6627
|
}
|
|
6606
6628
|
dispose() {
|
|
6607
6629
|
this.audio.dispose(), this.video.dispose();
|
|
@@ -6612,8 +6634,8 @@ const ut = {
|
|
|
6612
6634
|
[k.WebSocket]: 1,
|
|
6613
6635
|
[k.WebTransportProxy]: 2,
|
|
6614
6636
|
[k.WebSocketProxy]: 3
|
|
6615
|
-
},
|
|
6616
|
-
class
|
|
6637
|
+
}, ye = "ikon_endpoint_type";
|
|
6638
|
+
class fl {
|
|
6617
6639
|
isLocal;
|
|
6618
6640
|
workingEndpointType = null;
|
|
6619
6641
|
constructor(e) {
|
|
@@ -6645,7 +6667,7 @@ class El {
|
|
|
6645
6667
|
if (!this.isLocal) {
|
|
6646
6668
|
this.workingEndpointType = e;
|
|
6647
6669
|
try {
|
|
6648
|
-
localStorage.setItem(
|
|
6670
|
+
localStorage.setItem(ye, String(e));
|
|
6649
6671
|
} catch {
|
|
6650
6672
|
}
|
|
6651
6673
|
}
|
|
@@ -6656,7 +6678,7 @@ class El {
|
|
|
6656
6678
|
clearRememberedType() {
|
|
6657
6679
|
this.workingEndpointType = null;
|
|
6658
6680
|
try {
|
|
6659
|
-
localStorage.removeItem(
|
|
6681
|
+
localStorage.removeItem(ye);
|
|
6660
6682
|
} catch {
|
|
6661
6683
|
}
|
|
6662
6684
|
}
|
|
@@ -6665,7 +6687,7 @@ class El {
|
|
|
6665
6687
|
*/
|
|
6666
6688
|
loadRememberedType() {
|
|
6667
6689
|
try {
|
|
6668
|
-
const e = localStorage.getItem(
|
|
6690
|
+
const e = localStorage.getItem(ye);
|
|
6669
6691
|
if (e !== null) {
|
|
6670
6692
|
const r = Number(e);
|
|
6671
6693
|
k[r] !== void 0 && (this.workingEndpointType = r);
|
|
@@ -6675,7 +6697,7 @@ class El {
|
|
|
6675
6697
|
}
|
|
6676
6698
|
}
|
|
6677
6699
|
const A = L("IkonClient");
|
|
6678
|
-
class
|
|
6700
|
+
class Dl {
|
|
6679
6701
|
channelManager = null;
|
|
6680
6702
|
protocolWorker = null;
|
|
6681
6703
|
workerManagerState = null;
|
|
@@ -6730,21 +6752,21 @@ class Ol {
|
|
|
6730
6752
|
return this._mediaCapture;
|
|
6731
6753
|
}
|
|
6732
6754
|
constructor(e) {
|
|
6733
|
-
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ??
|
|
6755
|
+
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? Fa, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? Ba;
|
|
6734
6756
|
const r = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
|
|
6735
6757
|
if (r === 0)
|
|
6736
6758
|
throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6737
6759
|
if (r > 1)
|
|
6738
6760
|
throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6739
|
-
this.endpointSelector = new
|
|
6761
|
+
this.endpointSelector = new fl({
|
|
6740
6762
|
local: e.local
|
|
6741
|
-
}), this._functionRegistry = new
|
|
6763
|
+
}), this._functionRegistry = new Cc(), st() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = wc(this._functionRegistry));
|
|
6742
6764
|
const n = e.audio ? {
|
|
6743
6765
|
performance: e.audio.performance,
|
|
6744
6766
|
background: e.audio.background,
|
|
6745
6767
|
diagnostics: e.audio.diagnostics
|
|
6746
6768
|
} : void 0, s = e.video ? { performance: e.video.performance } : void 0;
|
|
6747
|
-
this._media = new
|
|
6769
|
+
this._media = new Qc(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), st() && (this._mediaCapture = new dl(this, {
|
|
6748
6770
|
audio: {
|
|
6749
6771
|
performance: {
|
|
6750
6772
|
preferWebCodecs: e.audio?.performance?.preferWebCodecs
|
|
@@ -6815,7 +6837,7 @@ class Ol {
|
|
|
6815
6837
|
A.info("Disconnecting from Ikon server"), this.clearTimers(), this.cleanupLifecycleHandlers(), this._mediaCapture?.dispose(), this.unregisterMediaCaptureFunctions && (this.unregisterMediaCaptureFunctions(), this.unregisterMediaCaptureFunctions = null), this.unregisterBrowserFunctions && (this.unregisterBrowserFunctions(), this.unregisterBrowserFunctions = null), this.abortController?.abort(), this.abortController = null, this.disconnectProtocol(), this.authResponse = null, this._sessionId = void 0, this._globalState = null, this._globalStateReceived = !1, this._channelsConnected = !1, this._joinedHandled = !1, this._functionRegistry.detach(), this.setState("idle");
|
|
6816
6838
|
}
|
|
6817
6839
|
sendActionCall(e, r) {
|
|
6818
|
-
const n =
|
|
6840
|
+
const n = en(
|
|
6819
6841
|
{
|
|
6820
6842
|
ActionId: _.fromString(e),
|
|
6821
6843
|
PayloadJson: r ?? "{}"
|
|
@@ -6991,11 +7013,11 @@ class Ol {
|
|
|
6991
7013
|
async authenticate() {
|
|
6992
7014
|
const e = this.abortController?.signal;
|
|
6993
7015
|
if (this.config.local)
|
|
6994
|
-
return
|
|
7016
|
+
return Ya(this.config.local, e);
|
|
6995
7017
|
if (this.config.apiKey)
|
|
6996
|
-
return
|
|
7018
|
+
return ja(this.config.apiKey, e);
|
|
6997
7019
|
if (this.config.sessionToken)
|
|
6998
|
-
return
|
|
7020
|
+
return za(this.config.sessionToken, e);
|
|
6999
7021
|
throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
|
|
7000
7022
|
}
|
|
7001
7023
|
/**
|
|
@@ -7007,13 +7029,11 @@ class Ol {
|
|
|
7007
7029
|
this.notifyMessageSubscribers(e, r, n);
|
|
7008
7030
|
return;
|
|
7009
7031
|
}
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
}
|
|
7016
|
-
this.notifyMessageSubscribers(e, r, n);
|
|
7032
|
+
r === S.CORE_GLOBAL_STATE && Fo(e).then((s) => {
|
|
7033
|
+
this._globalState = s, this._globalState.DebugMode && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
|
|
7034
|
+
}).catch((s) => {
|
|
7035
|
+
A.error("Failed to parse GlobalState:", s);
|
|
7036
|
+
}), this.notifyMessageSubscribers(e, r, n);
|
|
7017
7037
|
}
|
|
7018
7038
|
/**
|
|
7019
7039
|
* Notify config callback and message subscribers.
|
|
@@ -7029,14 +7049,14 @@ class Ol {
|
|
|
7029
7049
|
if (c.opcodeGroupsMask !== void 0 && ((n ?? ce(e)) & c.opcodeGroupsMask) === 0)
|
|
7030
7050
|
continue;
|
|
7031
7051
|
if (c.opcodes && c.opcodes.length > 0) {
|
|
7032
|
-
const
|
|
7033
|
-
if (!c.opcodes.includes(
|
|
7052
|
+
const l = r ?? ue(e);
|
|
7053
|
+
if (!c.opcodes.includes(l))
|
|
7034
7054
|
continue;
|
|
7035
7055
|
}
|
|
7036
7056
|
}
|
|
7037
7057
|
s[a](e);
|
|
7038
|
-
} catch (
|
|
7039
|
-
A.error("Message subscriber error:",
|
|
7058
|
+
} catch (l) {
|
|
7059
|
+
A.error("Message subscriber error:", l);
|
|
7040
7060
|
}
|
|
7041
7061
|
}
|
|
7042
7062
|
}
|
|
@@ -7097,7 +7117,7 @@ class Ol {
|
|
|
7097
7117
|
}
|
|
7098
7118
|
let r;
|
|
7099
7119
|
try {
|
|
7100
|
-
r = new
|
|
7120
|
+
r = new ga();
|
|
7101
7121
|
} catch (h) {
|
|
7102
7122
|
A.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e);
|
|
7103
7123
|
return;
|
|
@@ -7114,25 +7134,25 @@ class Ol {
|
|
|
7114
7134
|
if (T?.type === "state") {
|
|
7115
7135
|
const p = T.state;
|
|
7116
7136
|
this.workerManagerState = p;
|
|
7117
|
-
const
|
|
7118
|
-
|
|
7137
|
+
const u = T.activeType;
|
|
7138
|
+
u !== void 0 && this.endpointSelector.rememberWorkingType(u), this.handleChannelManagerStateChange(p), p === "connected" && h();
|
|
7119
7139
|
return;
|
|
7120
7140
|
}
|
|
7121
7141
|
if (T?.type === "error") {
|
|
7122
|
-
const p = T.error,
|
|
7123
|
-
|
|
7142
|
+
const p = T.error, u = new Error(String(p?.message ?? "Worker error"));
|
|
7143
|
+
u.name = String(p?.name ?? "Error"), E(u);
|
|
7124
7144
|
}
|
|
7125
7145
|
};
|
|
7126
7146
|
r.addEventListener("message", m), r.addEventListener("error", (I) => {
|
|
7127
7147
|
const T = [I.message, I.filename, I.lineno, I.colno].filter((p) => p != null && String(p).length > 0);
|
|
7128
7148
|
E(new Error(`Protocol worker failed: ${T.join(" ")}`.trim()));
|
|
7129
7149
|
});
|
|
7130
|
-
}), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ??
|
|
7150
|
+
}), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ?? qe, o = this.config.timeouts?.reconnectBackoffMs ?? et, a = this.config.timeouts?.maxReconnectAttempts ?? tt;
|
|
7131
7151
|
this.updateWorkerInterestMask();
|
|
7132
|
-
const c = typeof window < "u" ? new URLSearchParams(window.location.search) : null,
|
|
7133
|
-
|
|
7152
|
+
const c = typeof window < "u" ? new URLSearchParams(window.location.search) : null, l = c?.get("devtools") === "true" || c?.get("debug") === "true";
|
|
7153
|
+
l && typeof sessionStorage < "u" && sessionStorage.setItem("ikon:devtools", "true");
|
|
7134
7154
|
const f = typeof sessionStorage < "u" && sessionStorage.getItem("ikon:devtools") === "true";
|
|
7135
|
-
(this.config.debug?.devtools ||
|
|
7155
|
+
(this.config.debug?.devtools || l || f) && r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({
|
|
7136
7156
|
type: "connect",
|
|
7137
7157
|
sessionId: this._sessionId,
|
|
7138
7158
|
entrypoints: e,
|
|
@@ -7148,11 +7168,11 @@ class Ol {
|
|
|
7148
7168
|
}
|
|
7149
7169
|
}
|
|
7150
7170
|
async connectProtocolOnMainThread(e) {
|
|
7151
|
-
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new
|
|
7171
|
+
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new Pa({
|
|
7152
7172
|
sessionId: this._sessionId,
|
|
7153
|
-
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ??
|
|
7154
|
-
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ??
|
|
7155
|
-
maxReconnectAttempts: this.config.timeouts?.maxReconnectAttempts ??
|
|
7173
|
+
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? qe,
|
|
7174
|
+
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? et,
|
|
7175
|
+
maxReconnectAttempts: this.config.timeouts?.maxReconnectAttempts ?? tt,
|
|
7156
7176
|
endpointSelector: this.endpointSelector,
|
|
7157
7177
|
onProtocolMessage: (r) => {
|
|
7158
7178
|
this.handleProtocolMessage(r);
|
|
@@ -7270,11 +7290,11 @@ class Ol {
|
|
|
7270
7290
|
sendProtocolMessage: (r) => this.sendProtocolMessage(r),
|
|
7271
7291
|
sessionId: this._sessionId
|
|
7272
7292
|
}), await this.config.onJoined?.();
|
|
7273
|
-
const e = Je(
|
|
7293
|
+
const e = Qe(Je(), this._sessionId ?? 0);
|
|
7274
7294
|
this.sendProtocolMessage(e);
|
|
7275
7295
|
} catch (e) {
|
|
7276
7296
|
A.error("onJoined callback error:", e);
|
|
7277
|
-
const r = Je(
|
|
7297
|
+
const r = Qe(Je(), this._sessionId ?? 0);
|
|
7278
7298
|
this.sendProtocolMessage(r);
|
|
7279
7299
|
}
|
|
7280
7300
|
}
|
|
@@ -7282,118 +7302,118 @@ class Ol {
|
|
|
7282
7302
|
function Ml(t) {
|
|
7283
7303
|
return t === "connecting" || t === "connectingSlow" || t === "reconnecting";
|
|
7284
7304
|
}
|
|
7285
|
-
function
|
|
7305
|
+
function Ol(t) {
|
|
7286
7306
|
return t === "connected";
|
|
7287
7307
|
}
|
|
7288
|
-
function
|
|
7308
|
+
function Ll(t) {
|
|
7289
7309
|
return t === "offline" || t === "offlineError" || t === "idle";
|
|
7290
7310
|
}
|
|
7291
|
-
function
|
|
7311
|
+
function vl(t) {
|
|
7292
7312
|
return t === "offlineError";
|
|
7293
7313
|
}
|
|
7294
7314
|
const vr = /* @__PURE__ */ new Map();
|
|
7295
7315
|
for (const [t, e] of Object.entries(S))
|
|
7296
7316
|
typeof e == "number" && vr.set(e, t);
|
|
7297
|
-
function
|
|
7317
|
+
function Pl(t) {
|
|
7298
7318
|
return vr.get(t) ?? `UNKNOWN_${t}`;
|
|
7299
7319
|
}
|
|
7300
7320
|
const Pr = 1e3, Fr = Ir.INFO;
|
|
7301
|
-
let
|
|
7321
|
+
let O = [], De = Pr, Br = Fr, Me = null;
|
|
7322
|
+
function El(t) {
|
|
7323
|
+
t.level < Br || (O.push(t), O.length > De && (O = O.slice(-De)));
|
|
7324
|
+
}
|
|
7302
7325
|
function pl(t) {
|
|
7303
|
-
t
|
|
7326
|
+
De = t?.maxBufferSize ?? Pr, Br = t?.minLevel ?? Fr, O = [], Ra(El);
|
|
7304
7327
|
}
|
|
7305
|
-
function
|
|
7306
|
-
|
|
7328
|
+
function Fl(t) {
|
|
7329
|
+
Me = t;
|
|
7307
7330
|
}
|
|
7308
|
-
function Bl(
|
|
7309
|
-
|
|
7331
|
+
function Bl() {
|
|
7332
|
+
return O;
|
|
7310
7333
|
}
|
|
7311
|
-
function
|
|
7312
|
-
|
|
7334
|
+
function Il() {
|
|
7335
|
+
const t = O;
|
|
7336
|
+
return O = [], t;
|
|
7313
7337
|
}
|
|
7314
|
-
function
|
|
7315
|
-
|
|
7316
|
-
|
|
7338
|
+
function Gl() {
|
|
7339
|
+
if (!Me || O.length === 0)
|
|
7340
|
+
return 0;
|
|
7341
|
+
const t = Il();
|
|
7342
|
+
return Me(t), t.length;
|
|
7317
7343
|
}
|
|
7318
7344
|
function xl() {
|
|
7319
|
-
|
|
7320
|
-
return 0;
|
|
7321
|
-
const t = ml();
|
|
7322
|
-
return De(t), t.length;
|
|
7345
|
+
O = [];
|
|
7323
7346
|
}
|
|
7324
7347
|
function Vl() {
|
|
7325
|
-
|
|
7326
|
-
}
|
|
7327
|
-
function Wl() {
|
|
7328
|
-
return M.length;
|
|
7348
|
+
return O.length;
|
|
7329
7349
|
}
|
|
7330
|
-
|
|
7350
|
+
pl();
|
|
7331
7351
|
export {
|
|
7332
7352
|
y as AuthenticationError,
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7353
|
+
va as Channel,
|
|
7354
|
+
Pa as ChannelManager,
|
|
7355
|
+
_l as ChannelNotFoundError,
|
|
7336
7356
|
X as ClientType,
|
|
7337
|
-
|
|
7357
|
+
We as ConnectionError,
|
|
7338
7358
|
J as ContextType,
|
|
7339
|
-
|
|
7359
|
+
fl as EndpointSelector,
|
|
7340
7360
|
k as EntrypointType,
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7361
|
+
Cc as FunctionRegistry,
|
|
7362
|
+
Cl as IKON_AUTH_BASE_URL,
|
|
7363
|
+
nt as IKON_AUTH_URL_DEV,
|
|
7364
|
+
rt as IKON_AUTH_URL_PROD,
|
|
7345
7365
|
pe as IKON_BACKEND_URL_DEV,
|
|
7346
7366
|
Re as IKON_BACKEND_URL_PROD,
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7367
|
+
nl as IkonAudioCapture,
|
|
7368
|
+
ze as IkonAudioPlayback,
|
|
7369
|
+
Dl as IkonClient,
|
|
7370
|
+
al as IkonImageCapture,
|
|
7371
|
+
Qc as IkonMedia,
|
|
7372
|
+
dl as IkonMediaCapture,
|
|
7373
|
+
hl as IkonVideoCapture,
|
|
7374
|
+
Jc as IkonVideoPlayback,
|
|
7375
|
+
He as KeepaliveTimeoutError,
|
|
7356
7376
|
Ir as LogLevel,
|
|
7357
|
-
|
|
7358
|
-
|
|
7377
|
+
Ca as MaxRetriesExceededError,
|
|
7378
|
+
Sl as NoChannelsError,
|
|
7359
7379
|
S as Opcode,
|
|
7360
7380
|
ba as ProvisioningTimeoutError,
|
|
7361
|
-
|
|
7381
|
+
Tl as SpaceNotFoundError,
|
|
7362
7382
|
W as TransportError,
|
|
7363
7383
|
Z as UserType,
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7384
|
+
ml as asProtocolMessage,
|
|
7385
|
+
Nl as clearDeviceId,
|
|
7386
|
+
xl as clearLogBuffer,
|
|
7367
7387
|
L as createLogger,
|
|
7368
|
-
|
|
7369
|
-
|
|
7388
|
+
kl as deriveAuthUrl,
|
|
7389
|
+
Rl as deriveBackendType,
|
|
7370
7390
|
bl as deriveBackendUrl,
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7391
|
+
gl as extractUserIdFromToken,
|
|
7392
|
+
Gl as flushLogs,
|
|
7393
|
+
Bl as getBufferedLogs,
|
|
7394
|
+
Vl as getLogBufferSize,
|
|
7395
|
+
Al as getLogLevel,
|
|
7396
|
+
yl as getLogSink,
|
|
7397
|
+
Pl as getOpcodeName,
|
|
7398
|
+
Ke as getOrCreateDeviceId,
|
|
7399
|
+
pl as initializeLogSink,
|
|
7400
|
+
Rr as isAudioWorkletSupported,
|
|
7401
|
+
st as isBrowserEnvironment,
|
|
7402
|
+
Ye as isCloudEnvironment,
|
|
7403
|
+
Ol as isConnected,
|
|
7384
7404
|
Ml as isConnecting,
|
|
7385
|
-
|
|
7386
|
-
|
|
7405
|
+
vl as isError,
|
|
7406
|
+
Ll as isOffline,
|
|
7387
7407
|
le as isSharedArrayBufferSupported,
|
|
7388
7408
|
mr as isWebTransportSupported,
|
|
7389
|
-
|
|
7409
|
+
Ul as parseUrlParams,
|
|
7390
7410
|
ue as readOpcode,
|
|
7391
7411
|
ce as readOpcodeGroup,
|
|
7392
7412
|
ne as readProtocolMessageHeaders,
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7413
|
+
wc as registerBrowserFunctions,
|
|
7414
|
+
wl as setLogLevel,
|
|
7415
|
+
Ra as setLogSink,
|
|
7416
|
+
Fl as setSendLogsCallback,
|
|
7417
|
+
Il as takeBufferedLogs,
|
|
7398
7418
|
bc as withResultData
|
|
7399
7419
|
};
|