@ikonai/sdk-ui 1.0.79 → 1.0.80
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-DDtsnLoq.js → audio-playback-worker-C9XXiFhK.js} +350 -349
- package/assets/{protocol-worker-BoZcMF0x.js → protocol-worker-1sGaGw11.js} +277 -277
- package/assets/{ui-worker-DzF549yi.js → ui-worker-y-VofSR0.js} +775 -787
- package/assets/video-capture-worker-zOxyU-q3.js +1126 -0
- package/assets/video-playback-worker-DfwfIoRw.js +1005 -0
- package/assets/viseme-worker-CFJdP6of.js +831 -0
- package/ikon-ui-core.d.ts +0 -1
- package/index.js +1500 -1512
- package/package.json +1 -1
- package/assets/video-capture-worker-DxgvFTcw.js +0 -1126
- package/assets/video-playback-worker-Ca4XVGqt.js +0 -1005
- package/assets/viseme-worker-DVWM4pRh.js +0 -831
package/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { createLogger as Z, readOpcode as
|
|
2
|
-
const
|
|
1
|
+
import { createLogger as Z, readOpcode as it, readProtocolMessageHeaders as ot } from "@ikonai/sdk";
|
|
2
|
+
const F = 27, at = {
|
|
3
3
|
Compressed: 8
|
|
4
4
|
};
|
|
5
|
-
function lt(
|
|
6
|
-
const
|
|
7
|
-
if (
|
|
5
|
+
function lt(t) {
|
|
6
|
+
const e = Y(t), s = new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
7
|
+
if (e.length < F)
|
|
8
8
|
throw new Error("Protocol payload too short");
|
|
9
|
-
const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0),
|
|
10
|
-
if (
|
|
9
|
+
const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), h = s.getUint32(20, !0), E = s.getUint8(24), l = s.getUint8(25), I = s.getUint8(26);
|
|
10
|
+
if (F + h * 4 > e.length)
|
|
11
11
|
throw new Error("Protocol header exceeds payload length");
|
|
12
12
|
const S = [];
|
|
13
|
-
let
|
|
14
|
-
for (let g = 0; g <
|
|
15
|
-
S.push(s.getUint32(
|
|
13
|
+
let y = F;
|
|
14
|
+
for (let g = 0; g < h; g++)
|
|
15
|
+
S.push(s.getUint32(y, !0)), y += 4;
|
|
16
16
|
return {
|
|
17
17
|
length: r,
|
|
18
18
|
opcode: n,
|
|
@@ -20,374 +20,374 @@ function lt(e) {
|
|
|
20
20
|
trackId: o,
|
|
21
21
|
sequenceId: a,
|
|
22
22
|
targetIds: S,
|
|
23
|
-
payloadVersion:
|
|
23
|
+
payloadVersion: E,
|
|
24
24
|
payloadType: l,
|
|
25
|
-
flags:
|
|
25
|
+
flags: I
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
async function x(
|
|
29
|
-
const r =
|
|
30
|
-
if (
|
|
28
|
+
async function x(t, e, s) {
|
|
29
|
+
const r = Y(t), n = lt(r);
|
|
30
|
+
if (e !== void 0 && n.opcode !== e)
|
|
31
31
|
throw new Error(`Unexpected opcode ${n.opcode}`);
|
|
32
32
|
if (n.payloadType !== 8)
|
|
33
33
|
throw new Error(`Unexpected payload type ${n.payloadType}`);
|
|
34
|
-
const i =
|
|
34
|
+
const i = F + n.targetIds.length * 4;
|
|
35
35
|
let o = r.subarray(i, n.length);
|
|
36
|
-
return (n.flags & at.Compressed) !== 0 && (o = await
|
|
36
|
+
return (n.flags & at.Compressed) !== 0 && (o = await ht(o)), o;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const i = n?.trackId ?? 0, o = n?.sequenceId ?? 0, a = n?.flags ?? 0,
|
|
40
|
-
S.setUint32(0,
|
|
41
|
-
let
|
|
42
|
-
for (let g = 0; g <
|
|
43
|
-
S.setUint32(
|
|
44
|
-
return
|
|
38
|
+
function Ee(t, e, s, r, n) {
|
|
39
|
+
const i = n?.trackId ?? 0, o = n?.sequenceId ?? 0, a = n?.flags ?? 0, h = n?.targetIds ?? [], E = n?.payloadType ?? 8, l = F + h.length * 4, I = l + e.length, u = new Uint8Array(I), S = new DataView(u.buffer);
|
|
40
|
+
S.setUint32(0, I, !0), S.setUint32(4, t >>> 0, !0), S.setUint32(8, r >>> 0, !0), S.setUint32(12, i >>> 0, !0), S.setUint32(16, o >>> 0, !0), S.setUint32(20, h.length >>> 0, !0), S.setUint8(24, s & 255), S.setUint8(25, E & 255), S.setUint8(26, a & 255);
|
|
41
|
+
let y = F;
|
|
42
|
+
for (let g = 0; g < h.length; g++)
|
|
43
|
+
S.setUint32(y, h[g] >>> 0, !0), y += 4;
|
|
44
|
+
return u.set(e, l), u;
|
|
45
45
|
}
|
|
46
|
-
async function
|
|
46
|
+
async function ht(t) {
|
|
47
47
|
if (typeof DecompressionStream > "u")
|
|
48
48
|
throw new Error("DecompressionStream not supported");
|
|
49
|
-
const
|
|
49
|
+
const e = new DecompressionStream("gzip"), s = e.writable.getWriter(), r = new Uint8Array(t);
|
|
50
50
|
s.write(r), s.close();
|
|
51
|
-
const n =
|
|
51
|
+
const n = e.readable.getReader(), i = [];
|
|
52
52
|
let o = 0;
|
|
53
53
|
for (; ; ) {
|
|
54
|
-
const { done:
|
|
55
|
-
if (
|
|
54
|
+
const { done: E, value: l } = await n.read();
|
|
55
|
+
if (E) break;
|
|
56
56
|
i.push(l), o += l.length;
|
|
57
57
|
}
|
|
58
58
|
const a = new Uint8Array(o);
|
|
59
|
-
let
|
|
60
|
-
for (let
|
|
61
|
-
a.set(i[
|
|
59
|
+
let h = 0;
|
|
60
|
+
for (let E = 0; E < i.length; E++)
|
|
61
|
+
a.set(i[E], h), h += i[E].length;
|
|
62
62
|
return a;
|
|
63
63
|
}
|
|
64
|
-
var C = /* @__PURE__ */ ((
|
|
65
|
-
const ue = 161, ce = 162, W = new TextEncoder(),
|
|
66
|
-
class
|
|
67
|
-
constructor(
|
|
68
|
-
this.version =
|
|
64
|
+
var C = /* @__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))(C || {});
|
|
65
|
+
const ue = 161, ce = 162, W = new TextEncoder(), It = new TextDecoder("utf-8", { fatal: !0 });
|
|
66
|
+
class v {
|
|
67
|
+
constructor(e = 1) {
|
|
68
|
+
this.version = e, this.buffer.writeByte(ue), this.buffer.writeVarUInt(e >>> 0);
|
|
69
69
|
}
|
|
70
|
-
buffer = new
|
|
70
|
+
buffer = new p();
|
|
71
71
|
closed = !1;
|
|
72
72
|
cached;
|
|
73
|
-
writeInt32Field(
|
|
74
|
-
this.writeFixedField(
|
|
73
|
+
writeInt32Field(e, s) {
|
|
74
|
+
this.writeFixedField(e, 3, () => this.buffer.writeInt32(s | 0));
|
|
75
75
|
}
|
|
76
|
-
writeUInt32Field(
|
|
77
|
-
this.writeFixedField(
|
|
76
|
+
writeUInt32Field(e, s) {
|
|
77
|
+
this.writeFixedField(e, 5, () => this.buffer.writeUInt32(s >>> 0));
|
|
78
78
|
}
|
|
79
|
-
writeInt64Field(
|
|
80
|
-
this.writeFixedField(
|
|
79
|
+
writeInt64Field(e, s) {
|
|
80
|
+
this.writeFixedField(e, 4, () => this.buffer.writeBigInt64(s));
|
|
81
81
|
}
|
|
82
|
-
writeUInt64Field(
|
|
83
|
-
this.writeFixedField(
|
|
82
|
+
writeUInt64Field(e, s) {
|
|
83
|
+
this.writeFixedField(e, 6, () => this.buffer.writeBigUInt64(s));
|
|
84
84
|
}
|
|
85
|
-
writeFloat32Field(
|
|
86
|
-
this.writeFixedField(
|
|
85
|
+
writeFloat32Field(e, s) {
|
|
86
|
+
this.writeFixedField(e, 7, () => this.buffer.writeFloat32(s));
|
|
87
87
|
}
|
|
88
|
-
writeFloat64Field(
|
|
89
|
-
this.writeFixedField(
|
|
88
|
+
writeFloat64Field(e, s) {
|
|
89
|
+
this.writeFixedField(e, 8, () => this.buffer.writeFloat64(s));
|
|
90
90
|
}
|
|
91
|
-
writeBoolField(
|
|
92
|
-
this.writeFixedField(
|
|
91
|
+
writeBoolField(e, s) {
|
|
92
|
+
this.writeFixedField(e, 2, () => this.buffer.writeByte(s ? 1 : 0));
|
|
93
93
|
}
|
|
94
|
-
writeGuidField(
|
|
95
|
-
const r = s instanceof
|
|
94
|
+
writeGuidField(e, s) {
|
|
95
|
+
const r = s instanceof _ ? s.asBytes() : s;
|
|
96
96
|
if (r.length !== 16)
|
|
97
97
|
throw new Error("Guid payload must be 16 bytes");
|
|
98
|
-
this.writeFixedField(
|
|
98
|
+
this.writeFixedField(e, 14, () => this.buffer.writeBytes(r));
|
|
99
99
|
}
|
|
100
|
-
writeStringField(
|
|
100
|
+
writeStringField(e, s) {
|
|
101
101
|
const r = W.encode(s ?? "");
|
|
102
|
-
this.writeVariableField(
|
|
102
|
+
this.writeVariableField(e, 12, r);
|
|
103
103
|
}
|
|
104
|
-
writeBinaryField(
|
|
105
|
-
this.writeVariableField(
|
|
104
|
+
writeBinaryField(e, s) {
|
|
105
|
+
this.writeVariableField(e, 13, s);
|
|
106
106
|
}
|
|
107
|
-
writeObjectField(
|
|
108
|
-
const n = new
|
|
107
|
+
writeObjectField(e, s, r) {
|
|
108
|
+
const n = new v(s);
|
|
109
109
|
r(n);
|
|
110
110
|
const i = n.finish();
|
|
111
|
-
this.writeVariableField(
|
|
111
|
+
this.writeVariableField(e, 11, i);
|
|
112
112
|
}
|
|
113
|
-
writeArrayField(
|
|
114
|
-
const n = new
|
|
113
|
+
writeArrayField(e, s, r) {
|
|
114
|
+
const n = new j(s);
|
|
115
115
|
r(n);
|
|
116
116
|
const i = n.finish();
|
|
117
|
-
this.writeVariableField(
|
|
117
|
+
this.writeVariableField(e, 9, i);
|
|
118
118
|
}
|
|
119
|
-
writeDictionaryField(
|
|
119
|
+
writeDictionaryField(e, s, r, n) {
|
|
120
120
|
const i = new ee(s, r);
|
|
121
121
|
n(i);
|
|
122
122
|
const o = i.finish();
|
|
123
|
-
this.writeVariableField(
|
|
123
|
+
this.writeVariableField(e, 10, o);
|
|
124
124
|
}
|
|
125
125
|
finish() {
|
|
126
126
|
return this.closed || (this.buffer.writeByte(ce), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
|
|
127
127
|
}
|
|
128
|
-
writeFixedField(
|
|
129
|
-
this.writeFieldHeader(
|
|
128
|
+
writeFixedField(e, s, r) {
|
|
129
|
+
this.writeFieldHeader(e, s, 0), r();
|
|
130
130
|
}
|
|
131
|
-
writeVariableField(
|
|
132
|
-
this.writeFieldHeader(
|
|
131
|
+
writeVariableField(e, s, r) {
|
|
132
|
+
this.writeFieldHeader(e, s, r.length), this.buffer.writeBytes(r);
|
|
133
133
|
}
|
|
134
|
-
writeFieldHeader(
|
|
135
|
-
this.buffer.writeUInt32(
|
|
134
|
+
writeFieldHeader(e, s, r) {
|
|
135
|
+
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(K(s)), ft(s) && this.buffer.writeVarUInt(r >>> 0);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
class
|
|
139
|
-
constructor(
|
|
140
|
-
this.elementType =
|
|
138
|
+
class j {
|
|
139
|
+
constructor(e) {
|
|
140
|
+
this.elementType = e;
|
|
141
141
|
}
|
|
142
|
-
payload = new
|
|
142
|
+
payload = new p();
|
|
143
143
|
count = 0;
|
|
144
|
-
writeInt32(
|
|
144
|
+
writeInt32(e) {
|
|
145
145
|
this.ensureElementType(
|
|
146
146
|
3
|
|
147
147
|
/* Int32 */
|
|
148
|
-
), this.count++, this.payload.writeInt32(
|
|
148
|
+
), this.count++, this.payload.writeInt32(e | 0);
|
|
149
149
|
}
|
|
150
|
-
writeUInt32(
|
|
150
|
+
writeUInt32(e) {
|
|
151
151
|
this.ensureElementType(
|
|
152
152
|
5
|
|
153
153
|
/* UInt32 */
|
|
154
|
-
), this.count++, this.payload.writeUInt32(
|
|
154
|
+
), this.count++, this.payload.writeUInt32(e >>> 0);
|
|
155
155
|
}
|
|
156
|
-
writeInt64(
|
|
156
|
+
writeInt64(e) {
|
|
157
157
|
this.ensureElementType(
|
|
158
158
|
4
|
|
159
159
|
/* Int64 */
|
|
160
|
-
), this.count++, this.payload.writeBigInt64(
|
|
160
|
+
), this.count++, this.payload.writeBigInt64(e);
|
|
161
161
|
}
|
|
162
|
-
writeUInt64(
|
|
162
|
+
writeUInt64(e) {
|
|
163
163
|
this.ensureElementType(
|
|
164
164
|
6
|
|
165
165
|
/* UInt64 */
|
|
166
|
-
), this.count++, this.payload.writeBigUInt64(
|
|
166
|
+
), this.count++, this.payload.writeBigUInt64(e);
|
|
167
167
|
}
|
|
168
|
-
writeFloat32(
|
|
168
|
+
writeFloat32(e) {
|
|
169
169
|
this.ensureElementType(
|
|
170
170
|
7
|
|
171
171
|
/* Float32 */
|
|
172
|
-
), this.count++, this.payload.writeFloat32(
|
|
172
|
+
), this.count++, this.payload.writeFloat32(e);
|
|
173
173
|
}
|
|
174
|
-
writeFloat64(
|
|
174
|
+
writeFloat64(e) {
|
|
175
175
|
this.ensureElementType(
|
|
176
176
|
8
|
|
177
177
|
/* Float64 */
|
|
178
|
-
), this.count++, this.payload.writeFloat64(
|
|
178
|
+
), this.count++, this.payload.writeFloat64(e);
|
|
179
179
|
}
|
|
180
|
-
writeBool(
|
|
180
|
+
writeBool(e) {
|
|
181
181
|
this.ensureElementType(
|
|
182
182
|
2
|
|
183
183
|
/* Bool */
|
|
184
|
-
), this.count++, this.payload.writeByte(
|
|
184
|
+
), this.count++, this.payload.writeByte(e ? 1 : 0);
|
|
185
185
|
}
|
|
186
|
-
writeGuid(
|
|
186
|
+
writeGuid(e) {
|
|
187
187
|
this.ensureElementType(
|
|
188
188
|
14
|
|
189
189
|
/* Guid */
|
|
190
190
|
), this.count++;
|
|
191
|
-
const s =
|
|
191
|
+
const s = e instanceof _ ? e.asBytes() : e;
|
|
192
192
|
if (s.length !== 16)
|
|
193
193
|
throw new Error("Guid payload must be 16 bytes");
|
|
194
194
|
this.payload.writeBytes(s);
|
|
195
195
|
}
|
|
196
|
-
writeString(
|
|
196
|
+
writeString(e) {
|
|
197
197
|
this.ensureElementType(
|
|
198
198
|
12
|
|
199
199
|
/* String */
|
|
200
200
|
), this.count++;
|
|
201
|
-
const s = W.encode(
|
|
201
|
+
const s = W.encode(e ?? "");
|
|
202
202
|
this.payload.writeVarUInt(s.length), this.payload.writeBytes(s);
|
|
203
203
|
}
|
|
204
|
-
writeBinary(
|
|
204
|
+
writeBinary(e) {
|
|
205
205
|
this.ensureElementType(
|
|
206
206
|
13
|
|
207
207
|
/* Binary */
|
|
208
|
-
), this.count++, this.payload.writeVarUInt(
|
|
208
|
+
), this.count++, this.payload.writeVarUInt(e.length), this.payload.writeBytes(e);
|
|
209
209
|
}
|
|
210
|
-
writeObject(
|
|
210
|
+
writeObject(e, s) {
|
|
211
211
|
this.ensureElementType(
|
|
212
212
|
11
|
|
213
213
|
/* Object */
|
|
214
214
|
), this.count++;
|
|
215
|
-
const r = new
|
|
215
|
+
const r = new v(e);
|
|
216
216
|
s(r);
|
|
217
217
|
const n = r.finish();
|
|
218
218
|
this.payload.writeVarUInt(n.length), this.payload.writeBytes(n);
|
|
219
219
|
}
|
|
220
|
-
writeArray(
|
|
220
|
+
writeArray(e, s) {
|
|
221
221
|
this.ensureElementType(
|
|
222
222
|
9
|
|
223
223
|
/* Array */
|
|
224
224
|
), this.count++;
|
|
225
|
-
const r = new
|
|
225
|
+
const r = new j(e);
|
|
226
226
|
s(r);
|
|
227
227
|
const n = r.finish();
|
|
228
228
|
this.payload.writeBytes(n);
|
|
229
229
|
}
|
|
230
|
-
writeDictionary(
|
|
230
|
+
writeDictionary(e, s, r) {
|
|
231
231
|
this.ensureElementType(
|
|
232
232
|
10
|
|
233
233
|
/* Dict */
|
|
234
234
|
), this.count++;
|
|
235
|
-
const n = new ee(
|
|
235
|
+
const n = new ee(e, s);
|
|
236
236
|
r(n);
|
|
237
237
|
const i = n.finish();
|
|
238
238
|
this.payload.writeBytes(i);
|
|
239
239
|
}
|
|
240
240
|
finish() {
|
|
241
|
-
const
|
|
242
|
-
return
|
|
241
|
+
const e = new p();
|
|
242
|
+
return e.writeByte(K(this.elementType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
|
|
243
243
|
}
|
|
244
|
-
ensureElementType(
|
|
245
|
-
if (this.elementType !==
|
|
246
|
-
throw new Error(`Array element type is ${C[this.elementType]}, expected ${C[
|
|
244
|
+
ensureElementType(e) {
|
|
245
|
+
if (this.elementType !== e)
|
|
246
|
+
throw new Error(`Array element type is ${C[this.elementType]}, expected ${C[e]}`);
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
class ee {
|
|
250
|
-
constructor(
|
|
251
|
-
this.keyType =
|
|
250
|
+
constructor(e, s) {
|
|
251
|
+
this.keyType = e, this.valueType = s, re(e);
|
|
252
252
|
}
|
|
253
|
-
payload = new
|
|
253
|
+
payload = new p();
|
|
254
254
|
count = 0;
|
|
255
255
|
entryOpen = !1;
|
|
256
256
|
beginEntry() {
|
|
257
257
|
if (this.entryOpen)
|
|
258
258
|
throw new Error("Previous dictionary entry not completed");
|
|
259
|
-
return this.count++, this.entryOpen = !0, new
|
|
259
|
+
return this.count++, this.entryOpen = !0, new Et(this.keyType, this.valueType, this.payload, () => {
|
|
260
260
|
this.entryOpen = !1;
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
263
|
finish() {
|
|
264
264
|
if (this.entryOpen)
|
|
265
265
|
throw new Error("Dictionary entry not completed");
|
|
266
|
-
const
|
|
267
|
-
return
|
|
266
|
+
const e = new p();
|
|
267
|
+
return e.writeByte(K(this.keyType)), e.writeByte(K(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
class
|
|
271
|
-
constructor(
|
|
272
|
-
this.keyType =
|
|
270
|
+
class Et {
|
|
271
|
+
constructor(e, s, r, n) {
|
|
272
|
+
this.keyType = e, this.valueType = s, this.payload = r, this.onComplete = n;
|
|
273
273
|
}
|
|
274
274
|
keyWritten = !1;
|
|
275
275
|
valueWritten = !1;
|
|
276
276
|
completed = !1;
|
|
277
|
-
writeKeyInt32(
|
|
277
|
+
writeKeyInt32(e) {
|
|
278
278
|
this.ensureKeyType(
|
|
279
279
|
3
|
|
280
280
|
/* Int32 */
|
|
281
|
-
), this.payload.writeInt32(
|
|
281
|
+
), this.payload.writeInt32(e | 0), this.keyWritten = !0;
|
|
282
282
|
}
|
|
283
|
-
writeKeyUInt32(
|
|
283
|
+
writeKeyUInt32(e) {
|
|
284
284
|
this.ensureKeyType(
|
|
285
285
|
5
|
|
286
286
|
/* UInt32 */
|
|
287
|
-
), this.payload.writeUInt32(
|
|
287
|
+
), this.payload.writeUInt32(e >>> 0), this.keyWritten = !0;
|
|
288
288
|
}
|
|
289
|
-
writeKeyInt64(
|
|
289
|
+
writeKeyInt64(e) {
|
|
290
290
|
this.ensureKeyType(
|
|
291
291
|
4
|
|
292
292
|
/* Int64 */
|
|
293
|
-
), this.payload.writeBigInt64(
|
|
293
|
+
), this.payload.writeBigInt64(e), this.keyWritten = !0;
|
|
294
294
|
}
|
|
295
|
-
writeKeyUInt64(
|
|
295
|
+
writeKeyUInt64(e) {
|
|
296
296
|
this.ensureKeyType(
|
|
297
297
|
6
|
|
298
298
|
/* UInt64 */
|
|
299
|
-
), this.payload.writeBigUInt64(
|
|
299
|
+
), this.payload.writeBigUInt64(e), this.keyWritten = !0;
|
|
300
300
|
}
|
|
301
|
-
writeKeyFloat32(
|
|
301
|
+
writeKeyFloat32(e) {
|
|
302
302
|
this.ensureKeyType(
|
|
303
303
|
7
|
|
304
304
|
/* Float32 */
|
|
305
|
-
), this.payload.writeFloat32(
|
|
305
|
+
), this.payload.writeFloat32(e), this.keyWritten = !0;
|
|
306
306
|
}
|
|
307
|
-
writeKeyFloat64(
|
|
307
|
+
writeKeyFloat64(e) {
|
|
308
308
|
this.ensureKeyType(
|
|
309
309
|
8
|
|
310
310
|
/* Float64 */
|
|
311
|
-
), this.payload.writeFloat64(
|
|
311
|
+
), this.payload.writeFloat64(e), this.keyWritten = !0;
|
|
312
312
|
}
|
|
313
|
-
writeKeyBool(
|
|
313
|
+
writeKeyBool(e) {
|
|
314
314
|
this.ensureKeyType(
|
|
315
315
|
2
|
|
316
316
|
/* Bool */
|
|
317
|
-
), this.payload.writeByte(
|
|
317
|
+
), this.payload.writeByte(e ? 1 : 0), this.keyWritten = !0;
|
|
318
318
|
}
|
|
319
|
-
writeKeyGuid(
|
|
319
|
+
writeKeyGuid(e) {
|
|
320
320
|
this.ensureKeyType(
|
|
321
321
|
14
|
|
322
322
|
/* Guid */
|
|
323
323
|
);
|
|
324
|
-
const s =
|
|
324
|
+
const s = e instanceof _ ? e.asBytes() : e;
|
|
325
325
|
if (s.length !== 16)
|
|
326
326
|
throw new Error("Guid payload must be 16 bytes");
|
|
327
327
|
this.payload.writeBytes(s), this.keyWritten = !0;
|
|
328
328
|
}
|
|
329
|
-
writeKeyString(
|
|
329
|
+
writeKeyString(e) {
|
|
330
330
|
this.ensureKeyType(
|
|
331
331
|
12
|
|
332
332
|
/* String */
|
|
333
333
|
);
|
|
334
|
-
const s = W.encode(
|
|
334
|
+
const s = W.encode(e ?? "");
|
|
335
335
|
this.payload.writeVarUInt(s.length), this.payload.writeBytes(s), this.keyWritten = !0;
|
|
336
336
|
}
|
|
337
|
-
writeKeyBinary(
|
|
337
|
+
writeKeyBinary(e) {
|
|
338
338
|
this.ensureKeyType(
|
|
339
339
|
13
|
|
340
340
|
/* Binary */
|
|
341
|
-
), this.payload.writeVarUInt(
|
|
341
|
+
), this.payload.writeVarUInt(e.length), this.payload.writeBytes(e), this.keyWritten = !0;
|
|
342
342
|
}
|
|
343
|
-
writeValueInt32(
|
|
343
|
+
writeValueInt32(e) {
|
|
344
344
|
this.ensureValueType(
|
|
345
345
|
3
|
|
346
346
|
/* Int32 */
|
|
347
|
-
), this.payload.writeInt32(
|
|
347
|
+
), this.payload.writeInt32(e | 0), this.valueWritten = !0;
|
|
348
348
|
}
|
|
349
|
-
writeValueUInt32(
|
|
349
|
+
writeValueUInt32(e) {
|
|
350
350
|
this.ensureValueType(
|
|
351
351
|
5
|
|
352
352
|
/* UInt32 */
|
|
353
|
-
), this.payload.writeUInt32(
|
|
353
|
+
), this.payload.writeUInt32(e >>> 0), this.valueWritten = !0;
|
|
354
354
|
}
|
|
355
|
-
writeValueInt64(
|
|
355
|
+
writeValueInt64(e) {
|
|
356
356
|
this.ensureValueType(
|
|
357
357
|
4
|
|
358
358
|
/* Int64 */
|
|
359
|
-
), this.payload.writeBigInt64(
|
|
359
|
+
), this.payload.writeBigInt64(e), this.valueWritten = !0;
|
|
360
360
|
}
|
|
361
|
-
writeValueUInt64(
|
|
361
|
+
writeValueUInt64(e) {
|
|
362
362
|
this.ensureValueType(
|
|
363
363
|
6
|
|
364
364
|
/* UInt64 */
|
|
365
|
-
), this.payload.writeBigUInt64(
|
|
365
|
+
), this.payload.writeBigUInt64(e), this.valueWritten = !0;
|
|
366
366
|
}
|
|
367
|
-
writeValueFloat32(
|
|
367
|
+
writeValueFloat32(e) {
|
|
368
368
|
this.ensureValueType(
|
|
369
369
|
7
|
|
370
370
|
/* Float32 */
|
|
371
|
-
), this.payload.writeFloat32(
|
|
371
|
+
), this.payload.writeFloat32(e), this.valueWritten = !0;
|
|
372
372
|
}
|
|
373
|
-
writeValueFloat64(
|
|
373
|
+
writeValueFloat64(e) {
|
|
374
374
|
this.ensureValueType(
|
|
375
375
|
8
|
|
376
376
|
/* Float64 */
|
|
377
|
-
), this.payload.writeFloat64(
|
|
377
|
+
), this.payload.writeFloat64(e), this.valueWritten = !0;
|
|
378
378
|
}
|
|
379
|
-
writeValueBool(
|
|
379
|
+
writeValueBool(e) {
|
|
380
380
|
this.ensureValueType(
|
|
381
381
|
2
|
|
382
382
|
/* Bool */
|
|
383
|
-
), this.payload.writeByte(
|
|
383
|
+
), this.payload.writeByte(e ? 1 : 0), this.valueWritten = !0;
|
|
384
384
|
}
|
|
385
|
-
writeValueGuid(
|
|
385
|
+
writeValueGuid(e) {
|
|
386
386
|
this.ensureValueType(
|
|
387
387
|
14
|
|
388
388
|
/* Guid */
|
|
389
389
|
);
|
|
390
|
-
const s =
|
|
390
|
+
const s = e instanceof _ ? e.asBytes() : e;
|
|
391
391
|
if (s.length !== 16)
|
|
392
392
|
throw new Error("Guid payload must be 16 bytes");
|
|
393
393
|
this.payload.writeBytes(s), this.valueWritten = !0;
|
|
@@ -398,46 +398,46 @@ class _t {
|
|
|
398
398
|
/* Null */
|
|
399
399
|
), this.valueWritten = !0;
|
|
400
400
|
}
|
|
401
|
-
writeValueBinary(
|
|
401
|
+
writeValueBinary(e) {
|
|
402
402
|
this.ensureValueType(
|
|
403
403
|
13
|
|
404
404
|
/* Binary */
|
|
405
|
-
), this.payload.writeVarUInt(
|
|
405
|
+
), this.payload.writeVarUInt(e.length), this.payload.writeBytes(e), this.valueWritten = !0;
|
|
406
406
|
}
|
|
407
|
-
writeValueString(
|
|
407
|
+
writeValueString(e) {
|
|
408
408
|
this.ensureValueType(
|
|
409
409
|
12
|
|
410
410
|
/* String */
|
|
411
411
|
);
|
|
412
|
-
const s = W.encode(
|
|
412
|
+
const s = W.encode(e ?? "");
|
|
413
413
|
this.payload.writeVarUInt(s.length), this.payload.writeBytes(s), this.valueWritten = !0;
|
|
414
414
|
}
|
|
415
|
-
writeValueObject(
|
|
415
|
+
writeValueObject(e, s) {
|
|
416
416
|
this.ensureValueType(
|
|
417
417
|
11
|
|
418
418
|
/* Object */
|
|
419
419
|
);
|
|
420
|
-
const r = new
|
|
420
|
+
const r = new v(e);
|
|
421
421
|
s(r);
|
|
422
422
|
const n = r.finish();
|
|
423
423
|
this.payload.writeVarUInt(n.length), this.payload.writeBytes(n), this.valueWritten = !0;
|
|
424
424
|
}
|
|
425
|
-
writeValueArray(
|
|
425
|
+
writeValueArray(e, s) {
|
|
426
426
|
this.ensureValueType(
|
|
427
427
|
9
|
|
428
428
|
/* Array */
|
|
429
429
|
);
|
|
430
|
-
const r = new
|
|
430
|
+
const r = new j(e);
|
|
431
431
|
s(r);
|
|
432
432
|
const n = r.finish();
|
|
433
433
|
this.payload.writeBytes(n), this.valueWritten = !0;
|
|
434
434
|
}
|
|
435
|
-
writeValueDictionary(
|
|
435
|
+
writeValueDictionary(e, s, r) {
|
|
436
436
|
this.ensureValueType(
|
|
437
437
|
10
|
|
438
438
|
/* Dict */
|
|
439
439
|
);
|
|
440
|
-
const n = new ee(
|
|
440
|
+
const n = new ee(e, s);
|
|
441
441
|
r(n);
|
|
442
442
|
const i = n.finish();
|
|
443
443
|
this.payload.writeBytes(i), this.valueWritten = !0;
|
|
@@ -449,28 +449,28 @@ class _t {
|
|
|
449
449
|
this.completed = !0, this.onComplete();
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
-
ensureKeyType(
|
|
453
|
-
if (this.keyType !==
|
|
454
|
-
throw new Error(`Dictionary key type is ${C[this.keyType]}, expected ${C[
|
|
452
|
+
ensureKeyType(e) {
|
|
453
|
+
if (this.keyType !== e)
|
|
454
|
+
throw new Error(`Dictionary key type is ${C[this.keyType]}, expected ${C[e]}`);
|
|
455
455
|
}
|
|
456
|
-
ensureValueType(
|
|
457
|
-
if (this.valueType !==
|
|
458
|
-
throw new Error(`Dictionary value type is ${C[this.valueType]}, expected ${C[
|
|
456
|
+
ensureValueType(e) {
|
|
457
|
+
if (this.valueType !== e)
|
|
458
|
+
throw new Error(`Dictionary value type is ${C[this.valueType]}, expected ${C[e]}`);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
class O {
|
|
462
|
-
constructor(
|
|
463
|
-
this.buffer =
|
|
462
|
+
constructor(e, s, r) {
|
|
463
|
+
this.buffer = e, this.version = s, this.offset = r, this.end = e.length - 1;
|
|
464
464
|
}
|
|
465
465
|
offset;
|
|
466
466
|
end;
|
|
467
|
-
static create(
|
|
468
|
-
const s =
|
|
467
|
+
static create(e) {
|
|
468
|
+
const s = Y(e);
|
|
469
469
|
if (s.length < 2)
|
|
470
470
|
throw new Error("Teleport payload too short");
|
|
471
471
|
if (s[0] !== ue || s[s.length - 1] !== ce)
|
|
472
472
|
throw new Error("Teleport object missing markers");
|
|
473
|
-
const r = { offset: 1 }, n =
|
|
473
|
+
const r = { offset: 1 }, n = N(s, r, "InvalidLength");
|
|
474
474
|
return new O(s, n, r.offset);
|
|
475
475
|
}
|
|
476
476
|
next() {
|
|
@@ -478,25 +478,25 @@ class O {
|
|
|
478
478
|
return null;
|
|
479
479
|
if (this.offset + 5 > this.buffer.length)
|
|
480
480
|
throw new Error("Teleport object truncated");
|
|
481
|
-
const
|
|
481
|
+
const e = dt(this.buffer, this.offset);
|
|
482
482
|
this.offset += 4;
|
|
483
483
|
const s = this.buffer[this.offset++], r = s >> 4 & 15;
|
|
484
484
|
if ((s & 15) !== 0)
|
|
485
485
|
throw new Error("Teleport field flags must be zero");
|
|
486
|
-
const n =
|
|
486
|
+
const n = P(r);
|
|
487
487
|
let i;
|
|
488
488
|
if (n >= 0)
|
|
489
|
-
|
|
489
|
+
T(this.buffer, this.offset, n), i = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
|
|
490
490
|
else {
|
|
491
|
-
const o = { offset: this.offset }, a =
|
|
492
|
-
|
|
491
|
+
const o = { offset: this.offset }, a = N(this.buffer, o, "InvalidLength");
|
|
492
|
+
T(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
|
|
493
493
|
}
|
|
494
|
-
return new
|
|
494
|
+
return new ut(e, r, i);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
class m {
|
|
498
|
-
constructor(
|
|
499
|
-
this.type =
|
|
498
|
+
constructor(e, s) {
|
|
499
|
+
this.type = e, this.payload = s;
|
|
500
500
|
}
|
|
501
501
|
asInt32() {
|
|
502
502
|
return this.ensureType(
|
|
@@ -556,13 +556,13 @@ class m {
|
|
|
556
556
|
return this.ensureType(
|
|
557
557
|
12
|
|
558
558
|
/* String */
|
|
559
|
-
),
|
|
559
|
+
), It.decode(this.payload);
|
|
560
560
|
}
|
|
561
561
|
asGuid() {
|
|
562
562
|
return this.ensureType(
|
|
563
563
|
14
|
|
564
564
|
/* Guid */
|
|
565
|
-
),
|
|
565
|
+
), _.fromBytes(this.payload);
|
|
566
566
|
}
|
|
567
567
|
asObject() {
|
|
568
568
|
return this.ensureType(
|
|
@@ -582,14 +582,14 @@ class m {
|
|
|
582
582
|
/* Dict */
|
|
583
583
|
), se.create(this.payload);
|
|
584
584
|
}
|
|
585
|
-
ensureType(
|
|
586
|
-
if (this.type !==
|
|
587
|
-
throw new Error(`Teleport value has type ${C[this.type]}, expected ${C[
|
|
585
|
+
ensureType(e) {
|
|
586
|
+
if (this.type !== e)
|
|
587
|
+
throw new Error(`Teleport value has type ${C[this.type]}, expected ${C[e]}`);
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
class
|
|
591
|
-
constructor(
|
|
592
|
-
super(s, r), this.fieldId =
|
|
590
|
+
class ut extends m {
|
|
591
|
+
constructor(e, s, r) {
|
|
592
|
+
super(s, r), this.fieldId = e;
|
|
593
593
|
}
|
|
594
594
|
get isNull() {
|
|
595
595
|
return this.type === 1;
|
|
@@ -601,17 +601,17 @@ class te {
|
|
|
601
601
|
count;
|
|
602
602
|
offset;
|
|
603
603
|
index = 0;
|
|
604
|
-
constructor(
|
|
605
|
-
if (this.payload =
|
|
604
|
+
constructor(e) {
|
|
605
|
+
if (this.payload = e, e.length === 0)
|
|
606
606
|
throw new Error("Array payload too short");
|
|
607
|
-
const s =
|
|
607
|
+
const s = e[0];
|
|
608
608
|
if (this.elementType = s >> 4 & 15, (s & 15) !== 0)
|
|
609
609
|
throw new Error("Array flags must be zero");
|
|
610
610
|
const r = { offset: 1 };
|
|
611
|
-
this.count =
|
|
611
|
+
this.count = N(e, r, "ArrayMalformed"), this.offset = r.offset;
|
|
612
612
|
}
|
|
613
|
-
static create(
|
|
614
|
-
return new te(
|
|
613
|
+
static create(e) {
|
|
614
|
+
return new te(Y(e));
|
|
615
615
|
}
|
|
616
616
|
next() {
|
|
617
617
|
if (this.index >= this.count) {
|
|
@@ -619,8 +619,8 @@ class te {
|
|
|
619
619
|
throw new Error("Array payload contains trailing data");
|
|
620
620
|
return null;
|
|
621
621
|
}
|
|
622
|
-
const
|
|
623
|
-
return this.index++,
|
|
622
|
+
const e = this.readValue();
|
|
623
|
+
return this.index++, e;
|
|
624
624
|
}
|
|
625
625
|
readValue() {
|
|
626
626
|
switch (this.elementType) {
|
|
@@ -632,40 +632,40 @@ class te {
|
|
|
632
632
|
case 4:
|
|
633
633
|
case 6:
|
|
634
634
|
case 14: {
|
|
635
|
-
const
|
|
636
|
-
|
|
637
|
-
const s = this.payload.subarray(this.offset, this.offset +
|
|
638
|
-
return this.offset +=
|
|
635
|
+
const e = P(this.elementType);
|
|
636
|
+
T(this.payload, this.offset, e);
|
|
637
|
+
const s = this.payload.subarray(this.offset, this.offset + e);
|
|
638
|
+
return this.offset += e, new M(this.elementType, s);
|
|
639
639
|
}
|
|
640
640
|
case 12:
|
|
641
641
|
case 13: {
|
|
642
|
-
const
|
|
643
|
-
|
|
644
|
-
const r = this.payload.subarray(
|
|
645
|
-
return this.offset =
|
|
642
|
+
const e = { offset: this.offset }, s = N(this.payload, e, "ArrayMalformed");
|
|
643
|
+
T(this.payload, e.offset, s);
|
|
644
|
+
const r = this.payload.subarray(e.offset, e.offset + s);
|
|
645
|
+
return this.offset = e.offset + s, new M(this.elementType, r);
|
|
646
646
|
}
|
|
647
647
|
case 11: {
|
|
648
|
-
const
|
|
649
|
-
|
|
650
|
-
const r = this.payload.subarray(
|
|
651
|
-
return this.offset =
|
|
648
|
+
const e = { offset: this.offset }, s = N(this.payload, e, "ArrayMalformed");
|
|
649
|
+
T(this.payload, e.offset, s);
|
|
650
|
+
const r = this.payload.subarray(e.offset, e.offset + s);
|
|
651
|
+
return this.offset = e.offset + s, new M(11, r);
|
|
652
652
|
}
|
|
653
653
|
case 9: {
|
|
654
|
-
const
|
|
655
|
-
return this.offset +=
|
|
654
|
+
const e = ne(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
|
|
655
|
+
return this.offset += e, new M(9, s);
|
|
656
656
|
}
|
|
657
657
|
case 10: {
|
|
658
|
-
const
|
|
659
|
-
return this.offset +=
|
|
658
|
+
const e = ie(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
|
|
659
|
+
return this.offset += e, new M(10, s);
|
|
660
660
|
}
|
|
661
661
|
default:
|
|
662
662
|
throw new Error(`Unsupported array element type ${C[this.elementType]}`);
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
class
|
|
667
|
-
constructor(
|
|
668
|
-
super(
|
|
666
|
+
class M extends m {
|
|
667
|
+
constructor(e, s) {
|
|
668
|
+
super(e, s);
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
class se {
|
|
@@ -675,17 +675,17 @@ class se {
|
|
|
675
675
|
count;
|
|
676
676
|
offset;
|
|
677
677
|
index = 0;
|
|
678
|
-
constructor(
|
|
679
|
-
if (this.payload =
|
|
678
|
+
constructor(e) {
|
|
679
|
+
if (this.payload = e, e.length < 2)
|
|
680
680
|
throw new Error("Dictionary payload too short");
|
|
681
|
-
if (this.keyType =
|
|
681
|
+
if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
|
|
682
682
|
throw new Error("Dictionary key/value flags must be zero");
|
|
683
683
|
re(this.keyType);
|
|
684
684
|
const s = { offset: 2 };
|
|
685
|
-
this.count =
|
|
685
|
+
this.count = N(e, s, "DictMalformed"), this.offset = s.offset;
|
|
686
686
|
}
|
|
687
|
-
static create(
|
|
688
|
-
return new se(
|
|
687
|
+
static create(e) {
|
|
688
|
+
return new se(Y(e));
|
|
689
689
|
}
|
|
690
690
|
next() {
|
|
691
691
|
if (this.index >= this.count) {
|
|
@@ -693,19 +693,19 @@ class se {
|
|
|
693
693
|
throw new Error("Dictionary payload contains trailing data");
|
|
694
694
|
return null;
|
|
695
695
|
}
|
|
696
|
-
const
|
|
697
|
-
return this.index++, new
|
|
696
|
+
const e = this.readKey(), s = this.readValue();
|
|
697
|
+
return this.index++, new ct(e, s);
|
|
698
698
|
}
|
|
699
699
|
readKey() {
|
|
700
|
-
const
|
|
701
|
-
if (
|
|
702
|
-
|
|
703
|
-
const s = this.payload.subarray(this.offset, this.offset +
|
|
704
|
-
return this.offset +=
|
|
700
|
+
const e = P(this.keyType);
|
|
701
|
+
if (e >= 0) {
|
|
702
|
+
T(this.payload, this.offset, e);
|
|
703
|
+
const s = this.payload.subarray(this.offset, this.offset + e);
|
|
704
|
+
return this.offset += e, new m(this.keyType, s);
|
|
705
705
|
}
|
|
706
706
|
if (this.keyType === 12 || this.keyType === 13) {
|
|
707
|
-
const s = { offset: this.offset }, r =
|
|
708
|
-
|
|
707
|
+
const s = { offset: this.offset }, r = N(this.payload, s, "DictMalformed");
|
|
708
|
+
T(this.payload, s.offset, r);
|
|
709
709
|
const n = this.payload.subarray(s.offset, s.offset + r);
|
|
710
710
|
return this.offset = s.offset + r, new m(this.keyType, n);
|
|
711
711
|
}
|
|
@@ -715,24 +715,24 @@ class se {
|
|
|
715
715
|
switch (this.valueType) {
|
|
716
716
|
case 12:
|
|
717
717
|
case 13: {
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
const r = this.payload.subarray(
|
|
721
|
-
return this.offset =
|
|
718
|
+
const e = { offset: this.offset }, s = N(this.payload, e, "DictMalformed");
|
|
719
|
+
T(this.payload, e.offset, s);
|
|
720
|
+
const r = this.payload.subarray(e.offset, e.offset + s);
|
|
721
|
+
return this.offset = e.offset + s, new m(this.valueType, r);
|
|
722
722
|
}
|
|
723
723
|
case 11: {
|
|
724
|
-
const
|
|
725
|
-
|
|
726
|
-
const r = this.payload.subarray(
|
|
727
|
-
return this.offset =
|
|
724
|
+
const e = { offset: this.offset }, s = N(this.payload, e, "DictMalformed");
|
|
725
|
+
T(this.payload, e.offset, s);
|
|
726
|
+
const r = this.payload.subarray(e.offset, e.offset + s);
|
|
727
|
+
return this.offset = e.offset + s, new m(11, r);
|
|
728
728
|
}
|
|
729
729
|
case 9: {
|
|
730
|
-
const
|
|
731
|
-
return this.offset +=
|
|
730
|
+
const e = ne(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
|
|
731
|
+
return this.offset += e, new m(9, s);
|
|
732
732
|
}
|
|
733
733
|
case 10: {
|
|
734
|
-
const
|
|
735
|
-
return this.offset +=
|
|
734
|
+
const e = ie(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
|
|
735
|
+
return this.offset += e, new m(10, s);
|
|
736
736
|
}
|
|
737
737
|
case 3:
|
|
738
738
|
case 5:
|
|
@@ -743,101 +743,101 @@ class se {
|
|
|
743
743
|
case 6:
|
|
744
744
|
case 14:
|
|
745
745
|
case 1: {
|
|
746
|
-
const
|
|
747
|
-
|
|
748
|
-
const s = this.payload.subarray(this.offset, this.offset +
|
|
749
|
-
return this.offset +=
|
|
746
|
+
const e = P(this.valueType);
|
|
747
|
+
T(this.payload, this.offset, e);
|
|
748
|
+
const s = this.payload.subarray(this.offset, this.offset + e);
|
|
749
|
+
return this.offset += e, new m(this.valueType, s);
|
|
750
750
|
}
|
|
751
751
|
default:
|
|
752
752
|
throw new Error(`Unsupported dictionary value type ${C[this.valueType]}`);
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
|
-
class
|
|
757
|
-
constructor(
|
|
758
|
-
this.key =
|
|
756
|
+
class ct {
|
|
757
|
+
constructor(e, s) {
|
|
758
|
+
this.key = e, this.value = s;
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
|
-
class
|
|
762
|
-
constructor(
|
|
763
|
-
this.bytes =
|
|
761
|
+
class _ {
|
|
762
|
+
constructor(e) {
|
|
763
|
+
this.bytes = e;
|
|
764
764
|
}
|
|
765
|
-
static fromString(
|
|
766
|
-
if (!
|
|
765
|
+
static fromString(e) {
|
|
766
|
+
if (!e)
|
|
767
767
|
throw new Error("Guid string is empty");
|
|
768
|
-
const s =
|
|
768
|
+
const s = e.replace(/-/g, "");
|
|
769
769
|
if (s.length !== 32)
|
|
770
770
|
throw new Error("Guid string must be 32 hex characters");
|
|
771
|
-
const r = new Uint8Array(16), n =
|
|
772
|
-
|
|
771
|
+
const r = new Uint8Array(16), n = _.parseHexSlice(s, 0, 8), i = _.parseHexSlice(s, 8, 4), o = _.parseHexSlice(s, 12, 4);
|
|
772
|
+
_.writeUInt32LE(r, 0, n), _.writeUInt16LE(r, 4, i), _.writeUInt16LE(r, 6, o);
|
|
773
773
|
for (let a = 0; a < 8; a++)
|
|
774
|
-
r[8 + a] =
|
|
775
|
-
return new
|
|
774
|
+
r[8 + a] = _.parseHexSlice(s, 16 + a * 2, 2);
|
|
775
|
+
return new _(r);
|
|
776
776
|
}
|
|
777
|
-
static fromBytes(
|
|
778
|
-
if (
|
|
777
|
+
static fromBytes(e) {
|
|
778
|
+
if (e.length !== 16)
|
|
779
779
|
throw new Error("Guid byte array must be 16 bytes");
|
|
780
|
-
return new
|
|
780
|
+
return new _(Uint8Array.from(e));
|
|
781
781
|
}
|
|
782
782
|
static createZero() {
|
|
783
|
-
return new
|
|
783
|
+
return new _(new Uint8Array(16));
|
|
784
784
|
}
|
|
785
785
|
static createRandom() {
|
|
786
|
-
const
|
|
786
|
+
const e = new Uint8Array(16), s = globalThis.crypto;
|
|
787
787
|
if (s?.getRandomValues)
|
|
788
|
-
s.getRandomValues(
|
|
788
|
+
s.getRandomValues(e);
|
|
789
789
|
else
|
|
790
|
-
for (let r = 0; r <
|
|
791
|
-
|
|
792
|
-
return
|
|
790
|
+
for (let r = 0; r < e.length; r++)
|
|
791
|
+
e[r] = Math.floor(Math.random() * 256);
|
|
792
|
+
return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, new _(e);
|
|
793
793
|
}
|
|
794
794
|
toString() {
|
|
795
|
-
const
|
|
795
|
+
const e = this.bytes;
|
|
796
796
|
return [
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
797
|
+
_.toHex(_.readUInt32LE(e, 0), 8),
|
|
798
|
+
_.toHex(_.readUInt16LE(e, 4), 4),
|
|
799
|
+
_.toHex(_.readUInt16LE(e, 6), 4),
|
|
800
|
+
ae(e.subarray(8, 10)),
|
|
801
|
+
ae(e.subarray(10, 16))
|
|
802
802
|
].join("-");
|
|
803
803
|
}
|
|
804
804
|
asBytes() {
|
|
805
805
|
return this.bytes.slice();
|
|
806
806
|
}
|
|
807
|
-
static parseHexSlice(
|
|
808
|
-
const n =
|
|
807
|
+
static parseHexSlice(e, s, r) {
|
|
808
|
+
const n = e.substr(s, r), i = Number.parseInt(n, 16);
|
|
809
809
|
if (Number.isNaN(i))
|
|
810
810
|
throw new Error("Guid string contains invalid characters");
|
|
811
811
|
return i >>> 0;
|
|
812
812
|
}
|
|
813
|
-
static writeUInt32LE(
|
|
813
|
+
static writeUInt32LE(e, s, r) {
|
|
814
814
|
const n = r >>> 0;
|
|
815
|
-
|
|
815
|
+
e[s] = n & 255, e[s + 1] = n >>> 8 & 255, e[s + 2] = n >>> 16 & 255, e[s + 3] = n >>> 24 & 255;
|
|
816
816
|
}
|
|
817
|
-
static writeUInt16LE(
|
|
817
|
+
static writeUInt16LE(e, s, r) {
|
|
818
818
|
const n = r & 65535;
|
|
819
|
-
|
|
819
|
+
e[s] = n & 255, e[s + 1] = n >>> 8 & 255;
|
|
820
820
|
}
|
|
821
|
-
static readUInt32LE(
|
|
822
|
-
return (
|
|
821
|
+
static readUInt32LE(e, s) {
|
|
822
|
+
return (e[s] | e[s + 1] << 8 | e[s + 2] << 16 | e[s + 3] << 24) >>> 0;
|
|
823
823
|
}
|
|
824
|
-
static readUInt16LE(
|
|
825
|
-
return (
|
|
824
|
+
static readUInt16LE(e, s) {
|
|
825
|
+
return (e[s] | e[s + 1] << 8) & 65535;
|
|
826
826
|
}
|
|
827
|
-
static toHex(
|
|
828
|
-
return (
|
|
827
|
+
static toHex(e, s) {
|
|
828
|
+
return (e >>> 0).toString(16).padStart(s, "0");
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
|
-
class
|
|
831
|
+
class p {
|
|
832
832
|
static INITIAL_CAPACITY = 256;
|
|
833
833
|
buffer;
|
|
834
834
|
dataView;
|
|
835
835
|
length = 0;
|
|
836
836
|
constructor() {
|
|
837
|
-
this.buffer = new Uint8Array(
|
|
837
|
+
this.buffer = new Uint8Array(p.INITIAL_CAPACITY), this.dataView = new DataView(this.buffer.buffer);
|
|
838
838
|
}
|
|
839
|
-
ensureCapacity(
|
|
840
|
-
const s = this.length +
|
|
839
|
+
ensureCapacity(e) {
|
|
840
|
+
const s = this.length + e;
|
|
841
841
|
if (s <= this.buffer.length)
|
|
842
842
|
return;
|
|
843
843
|
let r = this.buffer.length;
|
|
@@ -846,32 +846,32 @@ class b {
|
|
|
846
846
|
const n = new Uint8Array(r);
|
|
847
847
|
n.set(this.buffer.subarray(0, this.length)), this.buffer = n, this.dataView = new DataView(this.buffer.buffer);
|
|
848
848
|
}
|
|
849
|
-
writeByte(
|
|
850
|
-
this.ensureCapacity(1), this.buffer[this.length++] =
|
|
849
|
+
writeByte(e) {
|
|
850
|
+
this.ensureCapacity(1), this.buffer[this.length++] = e & 255;
|
|
851
851
|
}
|
|
852
|
-
writeBytes(
|
|
853
|
-
this.ensureCapacity(
|
|
852
|
+
writeBytes(e) {
|
|
853
|
+
this.ensureCapacity(e.length), this.buffer.set(e, this.length), this.length += e.length;
|
|
854
854
|
}
|
|
855
|
-
writeUInt32(
|
|
856
|
-
this.ensureCapacity(4), this.dataView.setUint32(this.length,
|
|
855
|
+
writeUInt32(e) {
|
|
856
|
+
this.ensureCapacity(4), this.dataView.setUint32(this.length, e >>> 0, !0), this.length += 4;
|
|
857
857
|
}
|
|
858
|
-
writeInt32(
|
|
859
|
-
this.ensureCapacity(4), this.dataView.setInt32(this.length,
|
|
858
|
+
writeInt32(e) {
|
|
859
|
+
this.ensureCapacity(4), this.dataView.setInt32(this.length, e | 0, !0), this.length += 4;
|
|
860
860
|
}
|
|
861
|
-
writeFloat32(
|
|
862
|
-
this.ensureCapacity(4), this.dataView.setFloat32(this.length,
|
|
861
|
+
writeFloat32(e) {
|
|
862
|
+
this.ensureCapacity(4), this.dataView.setFloat32(this.length, e, !0), this.length += 4;
|
|
863
863
|
}
|
|
864
|
-
writeFloat64(
|
|
865
|
-
this.ensureCapacity(8), this.dataView.setFloat64(this.length,
|
|
864
|
+
writeFloat64(e) {
|
|
865
|
+
this.ensureCapacity(8), this.dataView.setFloat64(this.length, e, !0), this.length += 8;
|
|
866
866
|
}
|
|
867
|
-
writeBigInt64(
|
|
868
|
-
this.ensureCapacity(8), this.dataView.setBigInt64(this.length,
|
|
867
|
+
writeBigInt64(e) {
|
|
868
|
+
this.ensureCapacity(8), this.dataView.setBigInt64(this.length, e, !0), this.length += 8;
|
|
869
869
|
}
|
|
870
|
-
writeBigUInt64(
|
|
871
|
-
this.ensureCapacity(8), this.dataView.setBigUint64(this.length,
|
|
870
|
+
writeBigUInt64(e) {
|
|
871
|
+
this.ensureCapacity(8), this.dataView.setBigUint64(this.length, e, !0), this.length += 8;
|
|
872
872
|
}
|
|
873
|
-
writeVarUInt(
|
|
874
|
-
let s =
|
|
873
|
+
writeVarUInt(e) {
|
|
874
|
+
let s = e >>> 0;
|
|
875
875
|
for (; s >= 128; )
|
|
876
876
|
this.ensureCapacity(1), this.buffer[this.length++] = s & 127 | 128, s >>>= 7;
|
|
877
877
|
this.ensureCapacity(1), this.buffer[this.length++] = s & 127;
|
|
@@ -880,14 +880,14 @@ class b {
|
|
|
880
880
|
return this.buffer.slice(0, this.length);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
function
|
|
884
|
-
if (
|
|
883
|
+
function N(t, e, s) {
|
|
884
|
+
if (e.offset >= t.length)
|
|
885
885
|
throw new Error(s);
|
|
886
886
|
let r = 0, n = 0, i = 0;
|
|
887
|
-
for (;
|
|
888
|
-
const o = e
|
|
887
|
+
for (; e.offset < t.length; ) {
|
|
888
|
+
const o = t[e.offset++];
|
|
889
889
|
if (i++, r |= (o & 127) << n, (o & 128) === 0) {
|
|
890
|
-
if (i !==
|
|
890
|
+
if (i !== _t(r))
|
|
891
891
|
throw new Error("Teleport VarUInt is not canonical");
|
|
892
892
|
return r >>> 0;
|
|
893
893
|
}
|
|
@@ -896,19 +896,19 @@ function y(e, t, s) {
|
|
|
896
896
|
}
|
|
897
897
|
throw new Error(s);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
900
|
-
return
|
|
899
|
+
function _t(t) {
|
|
900
|
+
return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
|
|
901
901
|
}
|
|
902
|
-
function K(
|
|
903
|
-
if ((
|
|
902
|
+
function K(t, e = 0) {
|
|
903
|
+
if ((e & 240) !== 0)
|
|
904
904
|
throw new Error("Teleport flags must fit into 4 bits");
|
|
905
|
-
return (
|
|
905
|
+
return (t & 15) << 4 | e & 15;
|
|
906
906
|
}
|
|
907
|
-
function ft(
|
|
908
|
-
return
|
|
907
|
+
function ft(t) {
|
|
908
|
+
return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
switch (
|
|
910
|
+
function P(t) {
|
|
911
|
+
switch (t) {
|
|
912
912
|
case 3:
|
|
913
913
|
case 5:
|
|
914
914
|
case 7:
|
|
@@ -927,1357 +927,1352 @@ function p(e) {
|
|
|
927
927
|
return -1;
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
|
-
function re(
|
|
931
|
-
if (
|
|
930
|
+
function re(t) {
|
|
931
|
+
if (t === 9 || t === 11 || t === 10 || t === 1)
|
|
932
932
|
throw new Error("Dictionary keys must be primitive Teleport types");
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
if (
|
|
934
|
+
function T(t, e, s) {
|
|
935
|
+
if (e < 0 || s < 0 || e + s > t.length)
|
|
936
936
|
throw new Error("Teleport payload exceeds bounds");
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
return (e
|
|
938
|
+
function dt(t, e) {
|
|
939
|
+
return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
|
|
940
940
|
}
|
|
941
|
-
function ne(
|
|
942
|
-
if (
|
|
941
|
+
function ne(t, e) {
|
|
942
|
+
if (e >= t.length)
|
|
943
943
|
throw new Error("Array payload exceeds bounds");
|
|
944
|
-
const s = e
|
|
944
|
+
const s = t[e], r = s >> 4 & 15;
|
|
945
945
|
if ((s & 15) !== 0)
|
|
946
946
|
throw new Error("Array flags must be zero");
|
|
947
|
-
const n = { offset:
|
|
947
|
+
const n = { offset: e + 1 }, i = N(t, n, "ArrayMalformed"), o = P(r);
|
|
948
948
|
if (o >= 0) {
|
|
949
|
-
const
|
|
950
|
-
return
|
|
949
|
+
const h = o * i;
|
|
950
|
+
return T(t, n.offset, h), n.offset + h - e;
|
|
951
951
|
}
|
|
952
952
|
let a = n.offset;
|
|
953
|
-
for (let
|
|
954
|
-
a = q(r,
|
|
955
|
-
return a -
|
|
953
|
+
for (let h = 0; h < i; h++)
|
|
954
|
+
a = q(r, t, a, "ArrayMalformed");
|
|
955
|
+
return a - e;
|
|
956
956
|
}
|
|
957
|
-
function ie(
|
|
958
|
-
if (
|
|
957
|
+
function ie(t, e) {
|
|
958
|
+
if (e + 2 > t.length)
|
|
959
959
|
throw new Error("Dictionary payload too short");
|
|
960
|
-
const s = e
|
|
961
|
-
if ((e
|
|
960
|
+
const s = t[e] >> 4 & 15, r = t[e + 1] >> 4 & 15;
|
|
961
|
+
if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
|
|
962
962
|
throw new Error("Dictionary key/value flags must be zero");
|
|
963
963
|
re(s);
|
|
964
|
-
const n = { offset:
|
|
964
|
+
const n = { offset: e + 2 }, i = N(t, n, "DictMalformed");
|
|
965
965
|
let o = n.offset;
|
|
966
966
|
for (let a = 0; a < i; a++)
|
|
967
|
-
o = q(s,
|
|
968
|
-
return o -
|
|
967
|
+
o = q(s, t, o, "DictMalformed"), o = q(r, t, o, "DictMalformed");
|
|
968
|
+
return o - e;
|
|
969
969
|
}
|
|
970
|
-
function q(
|
|
971
|
-
const n =
|
|
970
|
+
function q(t, e, s, r) {
|
|
971
|
+
const n = P(t);
|
|
972
972
|
if (n >= 0)
|
|
973
|
-
return
|
|
974
|
-
switch (
|
|
973
|
+
return T(e, s, n), s + n;
|
|
974
|
+
switch (t) {
|
|
975
975
|
case 12:
|
|
976
976
|
case 13: {
|
|
977
|
-
const i = { offset: s }, o =
|
|
978
|
-
return
|
|
977
|
+
const i = { offset: s }, o = N(e, i, r);
|
|
978
|
+
return T(e, i.offset, o), i.offset + o;
|
|
979
979
|
}
|
|
980
980
|
case 11: {
|
|
981
|
-
const i = { offset: s }, o =
|
|
982
|
-
return
|
|
981
|
+
const i = { offset: s }, o = N(e, i, r);
|
|
982
|
+
return T(e, i.offset, o), i.offset + o;
|
|
983
983
|
}
|
|
984
984
|
case 9:
|
|
985
|
-
return s + ne(
|
|
985
|
+
return s + ne(e, s);
|
|
986
986
|
case 10:
|
|
987
|
-
return s + ie(
|
|
987
|
+
return s + ie(e, s);
|
|
988
988
|
default:
|
|
989
|
-
throw new Error(`Unsupported Teleport type ${C[
|
|
989
|
+
throw new Error(`Unsupported Teleport type ${C[t]}`);
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
|
-
function
|
|
993
|
-
return Array.from(
|
|
992
|
+
function ae(t) {
|
|
993
|
+
return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
994
994
|
}
|
|
995
|
-
function
|
|
996
|
-
return
|
|
995
|
+
function Y(t) {
|
|
996
|
+
return t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
997
997
|
}
|
|
998
|
-
var fe = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Opus = 1] = "Opus", e[e.Mp3 = 2] = "Mp3", e[e.RawPcm16 = 3] = "RawPcm16", e))(fe || {}), Te = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MobileWeb = 1] = "MobileWeb", e[e.MobileApp = 2] = "MobileApp", e[e.DesktopWeb = 3] = "DesktopWeb", e[e.DesktopApp = 4] = "DesktopApp", e))(Te || {}), Se = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Backend = 2] = "Backend", e[e.Server = 4] = "Server", e[e.Plugin = 8] = "Plugin", e[e.Browser = 16] = "Browser", e[e.Native = 32] = "Native", e))(Se || {}), de = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MessagePack = 1] = "MessagePack", e[e.MemoryPack = 2] = "MemoryPack", e[e.Json = 4] = "Json", e[e.Teleport = 8] = "Teleport", e[e.All = 15] = "All", e))(de || {}), Ae = /* @__PURE__ */ ((e) => (e[e.Face = 0] = "Face", e[e.Hands = 1] = "Hands", e[e.Pose = 2] = "Pose", e[e.All = 3] = "All", e))(Ae || {}), Ne = /* @__PURE__ */ ((e) => (e[e.Css = 0] = "Css", e[e.Flutter = 1] = "Flutter", e))(Ne || {}), ye = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Machine = 1] = "Machine", e[e.Human = 2] = "Human", e))(ye || {}), we = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.H264 = 1] = "H264", e[e.Vp8 = 2] = "Vp8", e[e.Vp9 = 3] = "Vp9", e[e.Av1 = 4] = "Av1", e))(we || {}), Ce = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.DotNet = 1] = "DotNet", e[e.TypeScript = 2] = "TypeScript", e[e.Cpp = 3] = "Cpp", e[e.Dart = 4] = "Dart", e[e.Rust = 5] = "Rust", e))(Ce || {}), Ue = /* @__PURE__ */ ((e) => (e[e.Local = 0] = "Local", e[e.Cloud = 1] = "Cloud", e))(Ue || {}), Re = /* @__PURE__ */ ((e) => (e[e.Bundle = 0] = "Bundle", e[e.GitSource = 1] = "GitSource", e))(Re || {}), L = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", e[e.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", e[e.GROUP_CORE = 65536] = "GROUP_CORE", e[e.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", e[e.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", e[e.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", e[e.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", e[e.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", e[e.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", e[e.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", e[e.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", e[e.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", e[e.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", e[e.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", e[e.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", e[e.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", e[e.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", e[e.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", e[e.CORE_SERVER_START = 65552] = "CORE_SERVER_START", e[e.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", e[e.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", e[e.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", e[e.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", e[e.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", e[e.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", e[e.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", e[e.CORE_RESET_IDLE = 65560] = "CORE_RESET_IDLE", e[e.CORE_CLIENT_DISCONNECTING = 65561] = "CORE_CLIENT_DISCONNECTING", e[e.CORE_ON_APP_READY = 65562] = "CORE_ON_APP_READY", e[e.CORE_ON_FRONTEND_RELOADED = 65563] = "CORE_ON_FRONTEND_RELOADED", e[e.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", e[e.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", e[e.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", e[e.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", e[e.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", e[e.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", e[e.CORE_WEBRTC_VIDEO_CAPTURE = 65572] = "CORE_WEBRTC_VIDEO_CAPTURE", e[e.CORE_WEBRTC_ICE_SERVERS_REQUEST = 65573] = "CORE_WEBRTC_ICE_SERVERS_REQUEST", e[e.CORE_WEBRTC_ICE_SERVERS_RESPONSE = 65574] = "CORE_WEBRTC_ICE_SERVERS_RESPONSE", e[e.CORE_WEBRTC_CLOSE = 65575] = "CORE_WEBRTC_CLOSE", e[e.CORE_RELAY_AGENT_AUTH = 65576] = "CORE_RELAY_AGENT_AUTH", e[e.CORE_RELAY_AGENT_AUTH_RESULT = 65577] = "CORE_RELAY_AGENT_AUTH_RESULT", e[e.CORE_RELAY_HEARTBEAT = 65578] = "CORE_RELAY_HEARTBEAT", e[e.CORE_RELAY_TCP_CONNECTION_OPENED = 65579] = "CORE_RELAY_TCP_CONNECTION_OPENED", e[e.CORE_RELAY_TCP_CONNECTION_CLOSED = 65580] = "CORE_RELAY_TCP_CONNECTION_CLOSED", e[e.CORE_RELAY_TCP_DATA = 65581] = "CORE_RELAY_TCP_DATA", e[e.CORE_RELAY_UDP_DATA = 65582] = "CORE_RELAY_UDP_DATA", e[e.CORE_RELAY_ADD_TUNNEL = 65583] = "CORE_RELAY_ADD_TUNNEL", e[e.CORE_RELAY_TUNNEL_ADDED = 65584] = "CORE_RELAY_TUNNEL_ADDED", e[e.CORE_RELAY_REMOVE_TUNNEL = 65585] = "CORE_RELAY_REMOVE_TUNNEL", e[e.CORE_IKON_SERVER_ENDPOINT_HOST_INFO = 65586] = "CORE_IKON_SERVER_ENDPOINT_HOST_INFO", e[e.CORE_CLIENT_INITIALIZATION = 65587] = "CORE_CLIENT_INITIALIZATION", e[e.CORE_CLIENT_LIFECYCLE_BATCH = 65588] = "CORE_CLIENT_LIFECYCLE_BATCH", e[e.CORE_APP_CONFIG = 65589] = "CORE_APP_CONFIG", e[e.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", e[e.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", e[e.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", e[e.GROUP_EVENTS = 262144] = "GROUP_EVENTS", e[e.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", e[e.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", e[e.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", e[e.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", e[e.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", e[e.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", e[e.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", e[e.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", e[e.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", e[e.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", e[e.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", e[e.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", e[e.ANALYTICS_IKON_RELAY_SERVER_STATS = 524297] = "ANALYTICS_IKON_RELAY_SERVER_STATS", e[e.ANALYTICS_IKON_TURN_SERVER_STATS = 524298] = "ANALYTICS_IKON_TURN_SERVER_STATS", e[e.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", e[e.ACTION_CALL = 1048577] = "ACTION_CALL", e[e.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", e[e.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", e[e.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", e[e.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", e[e.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", e[e.ACTION_TAP = 1048583] = "ACTION_TAP", e[e.ACTION_PAN = 1048584] = "ACTION_PAN", e[e.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", e[e.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", e[e.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", e[e.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", e[e.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", e[e.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", e[e.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", e[e.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", e[e.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", e[e.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", e[e.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", e[e.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", e[e.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", e[e.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", e[e.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", e[e.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", e[e.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", e[e.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", e[e.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", e[e.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", e[e.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", e[e.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", e[e.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", e[e.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", e[e.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", e[e.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", e[e.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", e[e.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", e[e.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", e[e.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", e[e.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", e[e.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", e[e.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", e[e.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", e[e.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", e[e.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", e[e.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", e[e.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", e[e.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", e[e.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", e[e.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", e[e.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", e[e.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", e[e.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", e[e.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", e[e.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", e[e.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", e[e.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", e[e.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", e[e.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", e[e.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", e[e.ACTION_CALL2 = 1048637] = "ACTION_CALL2", e[e.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", e[e.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", e[e.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", e[e.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", e[e.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", e[e.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", e[e.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", e[e.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", e[e.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", e[e.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", e[e.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", e[e.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", e[e.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", e[e.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", e[e.ACTION_CALL_ACK = 1048652] = "ACTION_CALL_ACK", e[e.ACTION_TRIGGER_CRON = 1048653] = "ACTION_TRIGGER_CRON", e[e.ACTION_RESULT = 1048654] = "ACTION_RESULT", e[e.UI_RESYNC_REQUEST = 1048655] = "UI_RESYNC_REQUEST", e[e.GROUP_UI = 2097152] = "GROUP_UI", e[e.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", e[e.UI_STREAM_END = 2097154] = "UI_STREAM_END", e[e.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", e[e.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", e[e.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", e[e.UI_SECTION_END = 2097158] = "UI_SECTION_END", e[e.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", e[e.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", e[e.UI_LIST_END = 2097161] = "UI_LIST_END", e[e.UI_TEXT = 2097162] = "UI_TEXT", e[e.UI_HEADER = 2097163] = "UI_HEADER", e[e.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", e[e.UI_BUTTON = 2097165] = "UI_BUTTON", e[e.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", e[e.UI_IMAGE = 2097167] = "UI_IMAGE", e[e.UI_FILE = 2097168] = "UI_FILE", e[e.UI_BADGE = 2097169] = "UI_BADGE", e[e.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", e[e.UI_MAP = 2097171] = "UI_MAP", e[e.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", e[e.UI_ICON = 2097173] = "UI_ICON", e[e.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", e[e.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", e[e.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", e[e.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", e[e.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", e[e.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", e[e.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", e[e.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", e[e.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", e[e.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", e[e.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", e[e.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", e[e.UI_QS = 2097186] = "UI_QS", e[e.UI_ELEMENT = 2097187] = "UI_ELEMENT", e[e.UI_STYLES = 2097188] = "UI_STYLES", e[e.UI_SVG = 2097189] = "UI_SVG", e[e.UI_UPDATE = 2097190] = "UI_UPDATE", e[e.UI_INIT = 2097191] = "UI_INIT", e[e.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", e[e.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", e[e.GROUP_COMMON = 4128768] = "GROUP_COMMON", e[e.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", e[e.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", e[e.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", e[e.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", e[e.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", e[e.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", e[e.AUDIO_SHAPE_FRAME = 4194310] = "AUDIO_SHAPE_FRAME", e[e.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", e[e.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", e[e.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", e[e.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", e[e.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", e[e.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", e[e.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", e[e.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", e[e.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", e[e.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", e[e.GROUP_SCENE = 33554432] = "GROUP_SCENE", e[e.SCENE_MESH = 33554433] = "SCENE_MESH", e[e.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", e[e.GROUP_ALL = 67043328] = "GROUP_ALL", e[e.GROUP_APP_LOCAL = 1073741824] = "GROUP_APP_LOCAL", e[e.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", e))(L || {});
|
|
999
|
-
const St = 161083277,
|
|
1000
|
-
function De(
|
|
1001
|
-
const
|
|
1002
|
-
return
|
|
998
|
+
var _e = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(_e || {}), fe = /* @__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))(fe || {}), de = /* @__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[t.Native = 32] = "Native", t))(de || {}), Se = /* @__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))(Se || {}), Te = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Te || {}), ye = /* @__PURE__ */ ((t) => (t[t.Css = 0] = "Css", t[t.Flutter = 1] = "Flutter", t))(ye || {}), Ae = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Ae || {}), Ne = /* @__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))(Ne || {}), we = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t[t.Dart = 4] = "Dart", t[t.Rust = 5] = "Rust", t))(we || {}), Ce = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(Ce || {}), Re = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(Re || {}), L = /* @__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.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_RESET_IDLE = 65560] = "CORE_RESET_IDLE", t[t.CORE_CLIENT_DISCONNECTING = 65561] = "CORE_CLIENT_DISCONNECTING", t[t.CORE_ON_APP_READY = 65562] = "CORE_ON_APP_READY", t[t.CORE_ON_FRONTEND_RELOADED = 65563] = "CORE_ON_FRONTEND_RELOADED", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", t[t.CORE_WEBRTC_VIDEO_CAPTURE = 65572] = "CORE_WEBRTC_VIDEO_CAPTURE", t[t.CORE_WEBRTC_ICE_SERVERS_REQUEST = 65573] = "CORE_WEBRTC_ICE_SERVERS_REQUEST", t[t.CORE_WEBRTC_ICE_SERVERS_RESPONSE = 65574] = "CORE_WEBRTC_ICE_SERVERS_RESPONSE", t[t.CORE_WEBRTC_CLOSE = 65575] = "CORE_WEBRTC_CLOSE", t[t.CORE_RELAY_AGENT_AUTH = 65576] = "CORE_RELAY_AGENT_AUTH", t[t.CORE_RELAY_AGENT_AUTH_RESULT = 65577] = "CORE_RELAY_AGENT_AUTH_RESULT", t[t.CORE_RELAY_HEARTBEAT = 65578] = "CORE_RELAY_HEARTBEAT", t[t.CORE_RELAY_TCP_CONNECTION_OPENED = 65579] = "CORE_RELAY_TCP_CONNECTION_OPENED", t[t.CORE_RELAY_TCP_CONNECTION_CLOSED = 65580] = "CORE_RELAY_TCP_CONNECTION_CLOSED", t[t.CORE_RELAY_TCP_DATA = 65581] = "CORE_RELAY_TCP_DATA", t[t.CORE_RELAY_UDP_DATA = 65582] = "CORE_RELAY_UDP_DATA", t[t.CORE_RELAY_ADD_TUNNEL = 65583] = "CORE_RELAY_ADD_TUNNEL", t[t.CORE_RELAY_TUNNEL_ADDED = 65584] = "CORE_RELAY_TUNNEL_ADDED", t[t.CORE_RELAY_REMOVE_TUNNEL = 65585] = "CORE_RELAY_REMOVE_TUNNEL", t[t.CORE_IKON_SERVER_ENDPOINT_HOST_INFO = 65586] = "CORE_IKON_SERVER_ENDPOINT_HOST_INFO", t[t.CORE_CLIENT_INITIALIZATION = 65587] = "CORE_CLIENT_INITIALIZATION", t[t.CORE_CLIENT_LIFECYCLE_BATCH = 65588] = "CORE_CLIENT_LIFECYCLE_BATCH", t[t.CORE_APP_CONFIG = 65589] = "CORE_APP_CONFIG", 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_IKON_RELAY_SERVER_STATS = 524297] = "ANALYTICS_IKON_RELAY_SERVER_STATS", t[t.ANALYTICS_IKON_TURN_SERVER_STATS = 524298] = "ANALYTICS_IKON_TURN_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_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_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", 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_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.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", t[t.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", t[t.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", t[t.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", t[t.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", t[t.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", t[t.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", t[t.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", t[t.ACTION_CALL_ACK = 1048652] = "ACTION_CALL_ACK", t[t.ACTION_TRIGGER_CRON = 1048653] = "ACTION_TRIGGER_CRON", t[t.ACTION_RESULT = 1048654] = "ACTION_RESULT", t[t.UI_RESYNC_REQUEST = 1048655] = "UI_RESYNC_REQUEST", 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_STYLES = 2097188] = "UI_STYLES", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", 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.AUDIO_SHAPE_FRAME = 4194310] = "AUDIO_SHAPE_FRAME", 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.GROUP_APP_LOCAL = 1073741824] = "GROUP_APP_LOCAL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(L || {});
|
|
999
|
+
const St = 161083277, Tt = 265814330, yt = 1368629611, At = 2431514951, Nt = 2514959030, wt = 2745379226, Ct = 3282782683, Rt = 3284746250, Dt = 4101844078;
|
|
1000
|
+
function De(t) {
|
|
1001
|
+
const e = {};
|
|
1002
|
+
return Ue(e), e;
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1005
|
-
return
|
|
1004
|
+
function Ue(t) {
|
|
1005
|
+
return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = _e.Unknown, t.CodecDetails = "", t.SampleRate = 0, t.Channels = 0, t.ShapeSets = void 0, t.CorrelationId = void 0, t;
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1008
|
-
const s =
|
|
1009
|
-
return
|
|
1007
|
+
function Ut(t, e) {
|
|
1008
|
+
const s = e ?? De();
|
|
1009
|
+
return Ue(s), Lt(t, s), s;
|
|
1010
1010
|
}
|
|
1011
|
-
function Lt(
|
|
1011
|
+
function Lt(t, e) {
|
|
1012
1012
|
let s;
|
|
1013
|
-
for (; (s =
|
|
1013
|
+
for (; (s = t.next()) !== null; )
|
|
1014
1014
|
switch (s.fieldId) {
|
|
1015
1015
|
case St: {
|
|
1016
1016
|
if (s.isNull) throw new Error();
|
|
1017
|
-
|
|
1017
|
+
e.StreamId = s.asString();
|
|
1018
1018
|
break;
|
|
1019
1019
|
}
|
|
1020
|
-
case
|
|
1020
|
+
case Tt: {
|
|
1021
1021
|
if (s.isNull) {
|
|
1022
|
-
|
|
1022
|
+
e.ShapeSets = void 0;
|
|
1023
1023
|
break;
|
|
1024
1024
|
}
|
|
1025
|
-
|
|
1025
|
+
e.ShapeSets = mt(s.asArray());
|
|
1026
1026
|
break;
|
|
1027
1027
|
}
|
|
1028
|
-
case
|
|
1028
|
+
case yt: {
|
|
1029
1029
|
if (s.isNull) throw new Error();
|
|
1030
|
-
|
|
1030
|
+
e.Description = s.asString();
|
|
1031
1031
|
break;
|
|
1032
1032
|
}
|
|
1033
|
-
case
|
|
1033
|
+
case At: {
|
|
1034
1034
|
if (s.isNull) throw new Error();
|
|
1035
|
-
|
|
1035
|
+
e.Channels = s.asInt32();
|
|
1036
1036
|
break;
|
|
1037
1037
|
}
|
|
1038
|
-
case
|
|
1038
|
+
case Nt: {
|
|
1039
1039
|
if (s.isNull) {
|
|
1040
|
-
|
|
1040
|
+
e.CorrelationId = void 0;
|
|
1041
1041
|
break;
|
|
1042
1042
|
}
|
|
1043
|
-
|
|
1043
|
+
e.CorrelationId = s.asString();
|
|
1044
1044
|
break;
|
|
1045
1045
|
}
|
|
1046
1046
|
case wt: {
|
|
1047
1047
|
if (s.isNull) throw new Error();
|
|
1048
|
-
|
|
1048
|
+
e.CodecDetails = s.asString();
|
|
1049
1049
|
break;
|
|
1050
1050
|
}
|
|
1051
1051
|
case Ct: {
|
|
1052
1052
|
if (s.isNull) throw new Error();
|
|
1053
|
-
|
|
1053
|
+
e.SourceType = s.asString();
|
|
1054
1054
|
break;
|
|
1055
1055
|
}
|
|
1056
|
-
case
|
|
1056
|
+
case Rt: {
|
|
1057
1057
|
if (s.isNull) throw new Error();
|
|
1058
|
-
|
|
1058
|
+
e.Codec = s.asInt32();
|
|
1059
1059
|
break;
|
|
1060
1060
|
}
|
|
1061
|
-
case
|
|
1061
|
+
case Dt: {
|
|
1062
1062
|
if (s.isNull) throw new Error();
|
|
1063
|
-
|
|
1063
|
+
e.SampleRate = s.asInt32();
|
|
1064
1064
|
break;
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
|
-
function mt(
|
|
1069
|
-
const
|
|
1068
|
+
function mt(t) {
|
|
1069
|
+
const e = [];
|
|
1070
1070
|
let s;
|
|
1071
|
-
for (; (s =
|
|
1072
|
-
|
|
1073
|
-
return
|
|
1071
|
+
for (; (s = t.next()) !== null; )
|
|
1072
|
+
e.push(Ft(s.asObject()));
|
|
1073
|
+
return e;
|
|
1074
1074
|
}
|
|
1075
|
-
const Ot = 1107713536, gt = 1154362099,
|
|
1076
|
-
function
|
|
1077
|
-
const
|
|
1078
|
-
return
|
|
1075
|
+
const Ot = 1107713536, gt = 1154362099, pt = 1185721362;
|
|
1076
|
+
function bt(t) {
|
|
1077
|
+
const e = {};
|
|
1078
|
+
return Le(e), e;
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1081
|
-
return
|
|
1080
|
+
function Le(t) {
|
|
1081
|
+
return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1084
|
-
const s =
|
|
1085
|
-
return
|
|
1083
|
+
function Ft(t, e) {
|
|
1084
|
+
const s = e ?? bt();
|
|
1085
|
+
return Le(s), Pt(t, s), s;
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1087
|
+
function Pt(t, e) {
|
|
1088
1088
|
let s;
|
|
1089
|
-
for (; (s =
|
|
1089
|
+
for (; (s = t.next()) !== null; )
|
|
1090
1090
|
switch (s.fieldId) {
|
|
1091
1091
|
case Ot: {
|
|
1092
1092
|
if (s.isNull) throw new Error();
|
|
1093
|
-
|
|
1093
|
+
e.Name = s.asString();
|
|
1094
1094
|
break;
|
|
1095
1095
|
}
|
|
1096
1096
|
case gt: {
|
|
1097
1097
|
if (s.isNull) throw new Error();
|
|
1098
|
-
|
|
1098
|
+
e.SetId = s.asUInt32();
|
|
1099
1099
|
break;
|
|
1100
1100
|
}
|
|
1101
|
-
case
|
|
1101
|
+
case pt: {
|
|
1102
1102
|
if (s.isNull) throw new Error();
|
|
1103
|
-
|
|
1103
|
+
e.ShapeNames = kt(s.asArray());
|
|
1104
1104
|
break;
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
|
-
function kt(
|
|
1109
|
-
const
|
|
1108
|
+
function kt(t) {
|
|
1109
|
+
const e = [];
|
|
1110
1110
|
let s;
|
|
1111
|
-
for (; (s =
|
|
1112
|
-
|
|
1113
|
-
return
|
|
1111
|
+
for (; (s = t.next()) !== null; )
|
|
1112
|
+
e.push(s.asString());
|
|
1113
|
+
return e;
|
|
1114
1114
|
}
|
|
1115
|
-
const
|
|
1116
|
-
function
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1115
|
+
const vt = 76337612, Mt = 185396121, Vt = 250031587, Bt = 388632637, Gt = 417197284, xt = 425972532, Yt = 469070965, Ht = 470595159, Wt = 594855258, Kt = 617065367, $t = 661691032, jt = 781727218, Xt = 834078886, zt = 1043273762, Jt = 1236999138, qt = 1286979607, Qt = 1368629611, Zt = 1437068682, es = 1668375353, ts = 1715899485, ss = 1942830531, rs = 1999510636, ns = 2033288346, is = 2079864626, os = 2142346422, as = 2228539873, ls = 2232517119, hs = 2598291686, Is = 2719718823, Es = 2810953526, us = 2840065720, cs = 2885165957, _s = 3542818975, fs = 3586157513, ds = 3717933110;
|
|
1116
|
+
function Ss(t) {
|
|
1117
|
+
const e = {};
|
|
1118
|
+
return me(e), e;
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1121
|
-
return
|
|
1120
|
+
function me(t) {
|
|
1121
|
+
return t.ContextType = de.Unknown, t.UserType = Ae.Unknown, t.PayloadType = Se.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsSnapshot = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = fe.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = we.Unknown, t.SdkCapability = 0, t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t.IsTouchDevice = !1, t.InitialPath = "", t.StyleFormat = ye.Css, t.SupportsCompression = !0, t.IsSoftDisconnected = !1, t.SoftDisconnectAt = 0n, t;
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1124
|
-
const s =
|
|
1125
|
-
return
|
|
1123
|
+
function Ts(t, e) {
|
|
1124
|
+
const s = e ?? Ss();
|
|
1125
|
+
return me(s), ys(t, s), s;
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1127
|
+
function ys(t, e) {
|
|
1128
1128
|
let s;
|
|
1129
|
-
for (; (s =
|
|
1129
|
+
for (; (s = t.next()) !== null; )
|
|
1130
1130
|
switch (s.fieldId) {
|
|
1131
|
-
case
|
|
1131
|
+
case vt: {
|
|
1132
1132
|
if (s.isNull) throw new Error();
|
|
1133
|
-
|
|
1133
|
+
e.DeviceId = s.asString();
|
|
1134
1134
|
break;
|
|
1135
1135
|
}
|
|
1136
|
-
case
|
|
1136
|
+
case Mt: {
|
|
1137
1137
|
if (s.isNull) throw new Error();
|
|
1138
|
-
|
|
1138
|
+
e.InstallId = s.asString();
|
|
1139
1139
|
break;
|
|
1140
1140
|
}
|
|
1141
|
-
case
|
|
1141
|
+
case Vt: {
|
|
1142
1142
|
if (s.isNull) throw new Error();
|
|
1143
|
-
|
|
1143
|
+
e.Theme = s.asString();
|
|
1144
1144
|
break;
|
|
1145
1145
|
}
|
|
1146
|
-
case
|
|
1146
|
+
case Bt: {
|
|
1147
1147
|
if (s.isNull) throw new Error();
|
|
1148
|
-
|
|
1148
|
+
e.UserAgent = s.asString();
|
|
1149
1149
|
break;
|
|
1150
1150
|
}
|
|
1151
1151
|
case Gt: {
|
|
1152
1152
|
if (s.isNull) throw new Error();
|
|
1153
|
-
|
|
1153
|
+
e.ContextType = s.asInt32();
|
|
1154
1154
|
break;
|
|
1155
1155
|
}
|
|
1156
1156
|
case xt: {
|
|
1157
1157
|
if (s.isNull) throw new Error();
|
|
1158
|
-
|
|
1158
|
+
e.SoftDisconnectAt = s.asUInt64();
|
|
1159
1159
|
break;
|
|
1160
1160
|
}
|
|
1161
|
-
case
|
|
1161
|
+
case Yt: {
|
|
1162
1162
|
if (s.isNull) throw new Error();
|
|
1163
|
-
|
|
1163
|
+
e.HasInput = s.asBool();
|
|
1164
1164
|
break;
|
|
1165
1165
|
}
|
|
1166
|
-
case
|
|
1166
|
+
case Ht: {
|
|
1167
1167
|
if (s.isNull) throw new Error();
|
|
1168
|
-
|
|
1168
|
+
e.UserType = s.asInt32();
|
|
1169
1169
|
break;
|
|
1170
1170
|
}
|
|
1171
1171
|
case Wt: {
|
|
1172
1172
|
if (s.isNull) throw new Error();
|
|
1173
|
-
|
|
1173
|
+
e.InitialPath = s.asString();
|
|
1174
1174
|
break;
|
|
1175
1175
|
}
|
|
1176
1176
|
case Kt: {
|
|
1177
1177
|
if (s.isNull) throw new Error();
|
|
1178
|
-
|
|
1178
|
+
e.IsSoftDisconnected = s.asBool();
|
|
1179
1179
|
break;
|
|
1180
1180
|
}
|
|
1181
1181
|
case $t: {
|
|
1182
1182
|
if (s.isNull) throw new Error();
|
|
1183
|
-
|
|
1183
|
+
e.SupportsCompression = s.asBool();
|
|
1184
1184
|
break;
|
|
1185
1185
|
}
|
|
1186
|
-
case
|
|
1186
|
+
case jt: {
|
|
1187
1187
|
if (s.isNull) throw new Error();
|
|
1188
|
-
|
|
1188
|
+
e.UserId = s.asString();
|
|
1189
1189
|
break;
|
|
1190
1190
|
}
|
|
1191
|
-
case
|
|
1191
|
+
case Xt: {
|
|
1192
1192
|
if (s.isNull) throw new Error();
|
|
1193
|
-
|
|
1193
|
+
e.ProductId = s.asString();
|
|
1194
1194
|
break;
|
|
1195
1195
|
}
|
|
1196
1196
|
case zt: {
|
|
1197
1197
|
if (s.isNull) throw new Error();
|
|
1198
|
-
|
|
1198
|
+
e.AuthSessionId = s.asString();
|
|
1199
1199
|
break;
|
|
1200
1200
|
}
|
|
1201
1201
|
case Jt: {
|
|
1202
1202
|
if (s.isNull) throw new Error();
|
|
1203
|
-
|
|
1203
|
+
e.ReceiveAllMessages = s.asBool();
|
|
1204
1204
|
break;
|
|
1205
1205
|
}
|
|
1206
1206
|
case qt: {
|
|
1207
1207
|
if (s.isNull) throw new Error();
|
|
1208
|
-
|
|
1208
|
+
e.ViewportHeight = s.asInt32();
|
|
1209
1209
|
break;
|
|
1210
1210
|
}
|
|
1211
1211
|
case Qt: {
|
|
1212
1212
|
if (s.isNull) throw new Error();
|
|
1213
|
-
|
|
1213
|
+
e.Description = s.asString();
|
|
1214
1214
|
break;
|
|
1215
1215
|
}
|
|
1216
1216
|
case Zt: {
|
|
1217
1217
|
if (s.isNull) throw new Error();
|
|
1218
|
-
|
|
1218
|
+
e.SdkCapability = s.asInt32();
|
|
1219
1219
|
break;
|
|
1220
1220
|
}
|
|
1221
1221
|
case es: {
|
|
1222
1222
|
if (s.isNull) throw new Error();
|
|
1223
|
-
|
|
1223
|
+
e.IsSnapshot = s.asBool();
|
|
1224
1224
|
break;
|
|
1225
1225
|
}
|
|
1226
1226
|
case ts: {
|
|
1227
1227
|
if (s.isNull) throw new Error();
|
|
1228
|
-
|
|
1228
|
+
e.Locale = s.asString();
|
|
1229
1229
|
break;
|
|
1230
1230
|
}
|
|
1231
1231
|
case ss: {
|
|
1232
1232
|
if (s.isNull) throw new Error();
|
|
1233
|
-
|
|
1233
|
+
e.SdkType = s.asInt32();
|
|
1234
1234
|
break;
|
|
1235
1235
|
}
|
|
1236
1236
|
case rs: {
|
|
1237
1237
|
if (s.isNull) throw new Error();
|
|
1238
|
-
|
|
1238
|
+
e.SessionId = s.asInt32();
|
|
1239
1239
|
break;
|
|
1240
1240
|
}
|
|
1241
1241
|
case ns: {
|
|
1242
1242
|
if (s.isNull) throw new Error();
|
|
1243
|
-
|
|
1243
|
+
e.ViewportWidth = s.asInt32();
|
|
1244
1244
|
break;
|
|
1245
1245
|
}
|
|
1246
1246
|
case is: {
|
|
1247
1247
|
if (s.isNull) throw new Error();
|
|
1248
|
-
|
|
1248
|
+
e.PreciseJoinedAt = s.asUInt64();
|
|
1249
1249
|
break;
|
|
1250
1250
|
}
|
|
1251
1251
|
case os: {
|
|
1252
1252
|
if (s.isNull) throw new Error();
|
|
1253
|
-
|
|
1253
|
+
e.PayloadType = s.asInt32();
|
|
1254
1254
|
break;
|
|
1255
1255
|
}
|
|
1256
1256
|
case as: {
|
|
1257
1257
|
if (s.isNull) throw new Error();
|
|
1258
|
-
|
|
1258
|
+
e.StyleFormat = s.asInt32();
|
|
1259
1259
|
break;
|
|
1260
1260
|
}
|
|
1261
1261
|
case ls: {
|
|
1262
1262
|
if (s.isNull) throw new Error();
|
|
1263
|
-
|
|
1264
|
-
break;
|
|
1265
|
-
}
|
|
1266
|
-
case Is: {
|
|
1267
|
-
if (s.isNull) throw new Error();
|
|
1268
|
-
t.VersionId = s.asString();
|
|
1263
|
+
e.IsTouchDevice = s.asBool();
|
|
1269
1264
|
break;
|
|
1270
1265
|
}
|
|
1271
|
-
case
|
|
1266
|
+
case hs: {
|
|
1272
1267
|
if (s.isNull) throw new Error();
|
|
1273
|
-
|
|
1268
|
+
e.VersionId = s.asString();
|
|
1274
1269
|
break;
|
|
1275
1270
|
}
|
|
1276
|
-
case
|
|
1271
|
+
case Is: {
|
|
1277
1272
|
if (s.isNull) throw new Error();
|
|
1278
|
-
|
|
1273
|
+
e.UniqueSessionId = s.asString();
|
|
1279
1274
|
break;
|
|
1280
1275
|
}
|
|
1281
|
-
case
|
|
1276
|
+
case Es: {
|
|
1282
1277
|
if (s.isNull) throw new Error();
|
|
1283
|
-
|
|
1278
|
+
e.ClientType = s.asInt32();
|
|
1284
1279
|
break;
|
|
1285
1280
|
}
|
|
1286
1281
|
case us: {
|
|
1287
1282
|
if (s.isNull) throw new Error();
|
|
1288
|
-
|
|
1283
|
+
e.IsReady = s.asBool();
|
|
1289
1284
|
break;
|
|
1290
1285
|
}
|
|
1291
1286
|
case cs: {
|
|
1292
1287
|
if (s.isNull) throw new Error();
|
|
1293
|
-
|
|
1288
|
+
e.Parameters = As(s.asDictionary());
|
|
1294
1289
|
break;
|
|
1295
1290
|
}
|
|
1296
|
-
case
|
|
1291
|
+
case _s: {
|
|
1297
1292
|
if (s.isNull) throw new Error();
|
|
1298
|
-
|
|
1293
|
+
e.Timezone = s.asString();
|
|
1299
1294
|
break;
|
|
1300
1295
|
}
|
|
1301
|
-
case
|
|
1296
|
+
case fs: {
|
|
1302
1297
|
if (s.isNull) throw new Error();
|
|
1303
|
-
|
|
1298
|
+
e.IsInternal = s.asBool();
|
|
1304
1299
|
break;
|
|
1305
1300
|
}
|
|
1306
|
-
case
|
|
1301
|
+
case ds: {
|
|
1307
1302
|
if (s.isNull) throw new Error();
|
|
1308
|
-
|
|
1303
|
+
e.ChannelLocale = s.asString();
|
|
1309
1304
|
break;
|
|
1310
1305
|
}
|
|
1311
1306
|
}
|
|
1312
1307
|
}
|
|
1313
|
-
function
|
|
1314
|
-
const
|
|
1308
|
+
function As(t) {
|
|
1309
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
1315
1310
|
let s;
|
|
1316
|
-
for (; (s =
|
|
1311
|
+
for (; (s = t.next()) !== null; ) {
|
|
1317
1312
|
const r = s.key.asString();
|
|
1318
|
-
|
|
1313
|
+
e[r] = s.value.asString();
|
|
1319
1314
|
}
|
|
1320
|
-
return
|
|
1315
|
+
return e;
|
|
1321
1316
|
}
|
|
1322
|
-
const
|
|
1323
|
-
function
|
|
1324
|
-
const
|
|
1325
|
-
return
|
|
1317
|
+
const Ns = 703025676, ws = 814454131, Cs = 972460562, Rs = 976255570, Ds = 1368629611, Us = 1479280922, Ls = 1533537016, ms = 1909301063, Os = 2274386296, gs = 2603556958, ps = 2885165957, bs = 3568439632;
|
|
1318
|
+
function Fs(t) {
|
|
1319
|
+
const e = {};
|
|
1320
|
+
return Oe(e), e;
|
|
1326
1321
|
}
|
|
1327
|
-
function
|
|
1328
|
-
return
|
|
1322
|
+
function Oe(t) {
|
|
1323
|
+
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.Versions = [], t;
|
|
1329
1324
|
}
|
|
1330
|
-
function
|
|
1331
|
-
const s =
|
|
1332
|
-
return
|
|
1325
|
+
function Ps(t, e) {
|
|
1326
|
+
const s = e ?? Fs();
|
|
1327
|
+
return Oe(s), ks(t, s), s;
|
|
1333
1328
|
}
|
|
1334
|
-
function
|
|
1329
|
+
function ks(t, e) {
|
|
1335
1330
|
let s;
|
|
1336
|
-
for (; (s =
|
|
1331
|
+
for (; (s = t.next()) !== null; )
|
|
1337
1332
|
switch (s.fieldId) {
|
|
1338
|
-
case
|
|
1333
|
+
case Ns: {
|
|
1339
1334
|
if (s.isNull) throw new Error();
|
|
1340
|
-
|
|
1335
|
+
e.ResultTypeName = s.asString();
|
|
1341
1336
|
break;
|
|
1342
1337
|
}
|
|
1343
|
-
case
|
|
1338
|
+
case ws: {
|
|
1344
1339
|
if (s.isNull) throw new Error();
|
|
1345
|
-
|
|
1340
|
+
e.FunctionName = s.asString();
|
|
1346
1341
|
break;
|
|
1347
1342
|
}
|
|
1348
|
-
case
|
|
1343
|
+
case Cs: {
|
|
1349
1344
|
if (s.isNull) throw new Error();
|
|
1350
|
-
|
|
1345
|
+
e.EnumerableItemTypeName = s.asString();
|
|
1351
1346
|
break;
|
|
1352
1347
|
}
|
|
1353
1348
|
case Rs: {
|
|
1354
1349
|
if (s.isNull) throw new Error();
|
|
1355
|
-
|
|
1350
|
+
e.FunctionId = s.asGuid();
|
|
1356
1351
|
break;
|
|
1357
1352
|
}
|
|
1358
1353
|
case Ds: {
|
|
1359
1354
|
if (s.isNull) throw new Error();
|
|
1360
|
-
|
|
1355
|
+
e.Description = s.asString();
|
|
1356
|
+
break;
|
|
1357
|
+
}
|
|
1358
|
+
case Us: {
|
|
1359
|
+
if (s.isNull) throw new Error();
|
|
1360
|
+
e.IsCancellable = s.asBool();
|
|
1361
1361
|
break;
|
|
1362
1362
|
}
|
|
1363
1363
|
case Ls: {
|
|
1364
1364
|
if (s.isNull) throw new Error();
|
|
1365
|
-
|
|
1365
|
+
e.RequiresInstance = s.asBool();
|
|
1366
1366
|
break;
|
|
1367
1367
|
}
|
|
1368
1368
|
case ms: {
|
|
1369
1369
|
if (s.isNull) throw new Error();
|
|
1370
|
-
|
|
1370
|
+
e.Versions = vs(s.asArray());
|
|
1371
1371
|
break;
|
|
1372
1372
|
}
|
|
1373
1373
|
case Os: {
|
|
1374
1374
|
if (s.isNull) throw new Error();
|
|
1375
|
-
|
|
1375
|
+
e.LlmInlineResult = s.asBool();
|
|
1376
1376
|
break;
|
|
1377
1377
|
}
|
|
1378
1378
|
case gs: {
|
|
1379
1379
|
if (s.isNull) throw new Error();
|
|
1380
|
-
|
|
1380
|
+
e.IsEnumerable = s.asBool();
|
|
1381
1381
|
break;
|
|
1382
1382
|
}
|
|
1383
|
-
case
|
|
1383
|
+
case ps: {
|
|
1384
1384
|
if (s.isNull) throw new Error();
|
|
1385
|
-
|
|
1385
|
+
e.Parameters = Ms(s.asArray());
|
|
1386
1386
|
break;
|
|
1387
1387
|
}
|
|
1388
|
-
case
|
|
1389
|
-
if (s.isNull) throw new Error();
|
|
1390
|
-
t.Parameters = Bs(s.asArray());
|
|
1391
|
-
break;
|
|
1392
|
-
}
|
|
1393
|
-
case Ps: {
|
|
1388
|
+
case bs: {
|
|
1394
1389
|
if (s.isNull) throw new Error();
|
|
1395
|
-
|
|
1390
|
+
e.LlmCallOnlyOnce = s.asBool();
|
|
1396
1391
|
break;
|
|
1397
1392
|
}
|
|
1398
1393
|
}
|
|
1399
1394
|
}
|
|
1400
|
-
function vs(
|
|
1401
|
-
const
|
|
1395
|
+
function vs(t) {
|
|
1396
|
+
const e = [];
|
|
1402
1397
|
let s;
|
|
1403
|
-
for (; (s =
|
|
1404
|
-
|
|
1405
|
-
return
|
|
1398
|
+
for (; (s = t.next()) !== null; )
|
|
1399
|
+
e.push(s.asString());
|
|
1400
|
+
return e;
|
|
1406
1401
|
}
|
|
1407
|
-
function
|
|
1408
|
-
const
|
|
1402
|
+
function Ms(t) {
|
|
1403
|
+
const e = [];
|
|
1409
1404
|
let s;
|
|
1410
|
-
for (; (s =
|
|
1411
|
-
|
|
1412
|
-
return
|
|
1405
|
+
for (; (s = t.next()) !== null; )
|
|
1406
|
+
e.push(Xs(s.asObject()));
|
|
1407
|
+
return e;
|
|
1413
1408
|
}
|
|
1414
|
-
const Vs = 607861992,
|
|
1415
|
-
function js(
|
|
1416
|
-
const
|
|
1417
|
-
return
|
|
1409
|
+
const Vs = 607861992, Bs = 894485888, Gs = 972460562, xs = 1368629611, Ys = 1883521406, Hs = 2603556958, Ws = 3609695522, Ks = 4075263697, $s = 4257460908;
|
|
1410
|
+
function js(t) {
|
|
1411
|
+
const e = {};
|
|
1412
|
+
return ge(e), e;
|
|
1418
1413
|
}
|
|
1419
|
-
function
|
|
1420
|
-
return
|
|
1414
|
+
function ge(t) {
|
|
1415
|
+
return t.ParameterIndex = 0, t.ParameterName = "", t.TypeName = "", t.HasDefaultValue = !1, t.DefaultValueJson = "", t.DefaultValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.Description = "", t;
|
|
1421
1416
|
}
|
|
1422
|
-
function
|
|
1423
|
-
const s =
|
|
1424
|
-
return
|
|
1417
|
+
function Xs(t, e) {
|
|
1418
|
+
const s = e ?? js();
|
|
1419
|
+
return ge(s), zs(t, s), s;
|
|
1425
1420
|
}
|
|
1426
|
-
function
|
|
1421
|
+
function zs(t, e) {
|
|
1427
1422
|
let s;
|
|
1428
|
-
for (; (s =
|
|
1423
|
+
for (; (s = t.next()) !== null; )
|
|
1429
1424
|
switch (s.fieldId) {
|
|
1430
1425
|
case Vs: {
|
|
1431
1426
|
if (s.isNull) throw new Error();
|
|
1432
|
-
|
|
1427
|
+
e.HasDefaultValue = s.asBool();
|
|
1428
|
+
break;
|
|
1429
|
+
}
|
|
1430
|
+
case Bs: {
|
|
1431
|
+
if (s.isNull) throw new Error();
|
|
1432
|
+
e.DefaultValueJson = s.asString();
|
|
1433
1433
|
break;
|
|
1434
1434
|
}
|
|
1435
1435
|
case Gs: {
|
|
1436
1436
|
if (s.isNull) throw new Error();
|
|
1437
|
-
|
|
1437
|
+
e.EnumerableItemTypeName = s.asString();
|
|
1438
1438
|
break;
|
|
1439
1439
|
}
|
|
1440
1440
|
case xs: {
|
|
1441
1441
|
if (s.isNull) throw new Error();
|
|
1442
|
-
|
|
1442
|
+
e.Description = s.asString();
|
|
1443
1443
|
break;
|
|
1444
1444
|
}
|
|
1445
|
-
case
|
|
1445
|
+
case Ys: {
|
|
1446
1446
|
if (s.isNull) throw new Error();
|
|
1447
|
-
|
|
1447
|
+
e.DefaultValueData = s.asBinary();
|
|
1448
1448
|
break;
|
|
1449
1449
|
}
|
|
1450
|
-
case
|
|
1450
|
+
case Hs: {
|
|
1451
1451
|
if (s.isNull) throw new Error();
|
|
1452
|
-
|
|
1452
|
+
e.IsEnumerable = s.asBool();
|
|
1453
1453
|
break;
|
|
1454
1454
|
}
|
|
1455
1455
|
case Ws: {
|
|
1456
1456
|
if (s.isNull) throw new Error();
|
|
1457
|
-
|
|
1457
|
+
e.TypeName = s.asString();
|
|
1458
1458
|
break;
|
|
1459
1459
|
}
|
|
1460
1460
|
case Ks: {
|
|
1461
1461
|
if (s.isNull) throw new Error();
|
|
1462
|
-
|
|
1462
|
+
e.ParameterName = s.asString();
|
|
1463
1463
|
break;
|
|
1464
1464
|
}
|
|
1465
1465
|
case $s: {
|
|
1466
1466
|
if (s.isNull) throw new Error();
|
|
1467
|
-
|
|
1468
|
-
break;
|
|
1469
|
-
}
|
|
1470
|
-
case Xs: {
|
|
1471
|
-
if (s.isNull) throw new Error();
|
|
1472
|
-
t.ParameterIndex = s.asInt32();
|
|
1467
|
+
e.ParameterIndex = s.asInt32();
|
|
1473
1468
|
break;
|
|
1474
1469
|
}
|
|
1475
1470
|
}
|
|
1476
1471
|
}
|
|
1477
|
-
const
|
|
1478
|
-
function
|
|
1479
|
-
const
|
|
1480
|
-
return
|
|
1472
|
+
const Js = 3167053791, qs = 3342364356, Qs = 3612929027;
|
|
1473
|
+
function pe(t) {
|
|
1474
|
+
const e = {};
|
|
1475
|
+
return be(e), e;
|
|
1481
1476
|
}
|
|
1482
|
-
function
|
|
1483
|
-
return
|
|
1477
|
+
function be(t) {
|
|
1478
|
+
return t.Category = "", t.Type = Te.Face, t.FaceBlendshapes = [], t;
|
|
1484
1479
|
}
|
|
1485
|
-
function
|
|
1486
|
-
const s =
|
|
1487
|
-
return
|
|
1480
|
+
function Zs(t, e) {
|
|
1481
|
+
const s = e ?? pe();
|
|
1482
|
+
return be(s), er(t, s), s;
|
|
1488
1483
|
}
|
|
1489
|
-
function
|
|
1484
|
+
function er(t, e) {
|
|
1490
1485
|
let s;
|
|
1491
|
-
for (; (s =
|
|
1486
|
+
for (; (s = t.next()) !== null; )
|
|
1492
1487
|
switch (s.fieldId) {
|
|
1493
|
-
case
|
|
1488
|
+
case Js: {
|
|
1494
1489
|
if (s.isNull) throw new Error();
|
|
1495
|
-
|
|
1490
|
+
e.Type = s.asInt32();
|
|
1496
1491
|
break;
|
|
1497
1492
|
}
|
|
1498
|
-
case
|
|
1493
|
+
case qs: {
|
|
1499
1494
|
if (s.isNull) throw new Error();
|
|
1500
|
-
|
|
1495
|
+
e.FaceBlendshapes = tr(s.asArray());
|
|
1501
1496
|
break;
|
|
1502
1497
|
}
|
|
1503
|
-
case
|
|
1498
|
+
case Qs: {
|
|
1504
1499
|
if (s.isNull) throw new Error();
|
|
1505
|
-
|
|
1500
|
+
e.Category = s.asString();
|
|
1506
1501
|
break;
|
|
1507
1502
|
}
|
|
1508
1503
|
}
|
|
1509
1504
|
}
|
|
1510
|
-
function
|
|
1511
|
-
const
|
|
1505
|
+
function tr(t) {
|
|
1506
|
+
const e = [];
|
|
1512
1507
|
let s;
|
|
1513
|
-
for (; (s =
|
|
1514
|
-
|
|
1515
|
-
return
|
|
1508
|
+
for (; (s = t.next()) !== null; )
|
|
1509
|
+
e.push(s.asString());
|
|
1510
|
+
return e;
|
|
1516
1511
|
}
|
|
1517
|
-
const
|
|
1518
|
-
function
|
|
1519
|
-
const
|
|
1520
|
-
return
|
|
1512
|
+
const sr = 1405462580, rr = 2968276160;
|
|
1513
|
+
function nr(t) {
|
|
1514
|
+
const e = {};
|
|
1515
|
+
return Fe(e), e;
|
|
1521
1516
|
}
|
|
1522
|
-
function
|
|
1523
|
-
return
|
|
1517
|
+
function Fe(t) {
|
|
1518
|
+
return t.MimeType = "", t.Value = new Uint8Array(0), t;
|
|
1524
1519
|
}
|
|
1525
|
-
function
|
|
1526
|
-
const s =
|
|
1527
|
-
return
|
|
1520
|
+
function ir(t, e) {
|
|
1521
|
+
const s = e ?? nr();
|
|
1522
|
+
return Fe(s), or(t, s), s;
|
|
1528
1523
|
}
|
|
1529
|
-
function
|
|
1524
|
+
function or(t, e) {
|
|
1530
1525
|
let s;
|
|
1531
|
-
for (; (s =
|
|
1526
|
+
for (; (s = t.next()) !== null; )
|
|
1532
1527
|
switch (s.fieldId) {
|
|
1533
|
-
case
|
|
1528
|
+
case sr: {
|
|
1534
1529
|
if (s.isNull) throw new Error();
|
|
1535
|
-
|
|
1530
|
+
e.Value = s.asBinary();
|
|
1536
1531
|
break;
|
|
1537
1532
|
}
|
|
1538
|
-
case
|
|
1533
|
+
case rr: {
|
|
1539
1534
|
if (s.isNull) throw new Error();
|
|
1540
|
-
|
|
1535
|
+
e.MimeType = s.asString();
|
|
1541
1536
|
break;
|
|
1542
1537
|
}
|
|
1543
1538
|
}
|
|
1544
1539
|
}
|
|
1545
|
-
const
|
|
1546
|
-
function
|
|
1547
|
-
const
|
|
1548
|
-
return
|
|
1540
|
+
const Pe = 1, ar = 1048655, lr = 3469892363;
|
|
1541
|
+
function hr(t) {
|
|
1542
|
+
const e = new v(Pe);
|
|
1543
|
+
return Ir(t, e), e.finish();
|
|
1549
1544
|
}
|
|
1550
|
-
function
|
|
1551
|
-
|
|
1545
|
+
function Ir(t, e) {
|
|
1546
|
+
e.writeInt32Field(lr, t.TrackId | 0);
|
|
1552
1547
|
}
|
|
1553
|
-
function
|
|
1554
|
-
const r =
|
|
1555
|
-
return
|
|
1548
|
+
function Er(t, e, s) {
|
|
1549
|
+
const r = hr(t);
|
|
1550
|
+
return Ee(ar, r, Pe, e, s);
|
|
1556
1551
|
}
|
|
1557
1552
|
const ur = 3612929027;
|
|
1558
|
-
function
|
|
1559
|
-
const
|
|
1560
|
-
return ve(
|
|
1553
|
+
function ke(t) {
|
|
1554
|
+
const e = {};
|
|
1555
|
+
return ve(e), e;
|
|
1561
1556
|
}
|
|
1562
|
-
function ve(
|
|
1563
|
-
return
|
|
1557
|
+
function ve(t) {
|
|
1558
|
+
return t.Category = "", t;
|
|
1564
1559
|
}
|
|
1565
|
-
function cr(
|
|
1566
|
-
const s =
|
|
1567
|
-
return ve(s),
|
|
1560
|
+
function cr(t, e) {
|
|
1561
|
+
const s = e ?? ke();
|
|
1562
|
+
return ve(s), _r(t, s), s;
|
|
1568
1563
|
}
|
|
1569
|
-
function
|
|
1564
|
+
function _r(t, e) {
|
|
1570
1565
|
let s;
|
|
1571
|
-
for (; (s =
|
|
1566
|
+
for (; (s = t.next()) !== null; )
|
|
1572
1567
|
switch (s.fieldId) {
|
|
1573
1568
|
case ur: {
|
|
1574
1569
|
if (s.isNull) throw new Error();
|
|
1575
|
-
|
|
1570
|
+
e.Category = s.asString();
|
|
1576
1571
|
break;
|
|
1577
1572
|
}
|
|
1578
1573
|
}
|
|
1579
1574
|
}
|
|
1580
|
-
const
|
|
1581
|
-
function
|
|
1582
|
-
const
|
|
1583
|
-
return
|
|
1575
|
+
const fr = 2097188, dr = 979822885, Sr = 2374537704;
|
|
1576
|
+
function Tr(t) {
|
|
1577
|
+
const e = {};
|
|
1578
|
+
return Me(e), e;
|
|
1584
1579
|
}
|
|
1585
|
-
function
|
|
1586
|
-
return
|
|
1580
|
+
function Me(t) {
|
|
1581
|
+
return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
|
|
1587
1582
|
}
|
|
1588
|
-
function
|
|
1589
|
-
const s = O.create(
|
|
1590
|
-
return
|
|
1583
|
+
function yr(t, e) {
|
|
1584
|
+
const s = O.create(t);
|
|
1585
|
+
return Ar(s, e);
|
|
1591
1586
|
}
|
|
1592
|
-
function
|
|
1593
|
-
const s =
|
|
1594
|
-
return
|
|
1587
|
+
function Ar(t, e) {
|
|
1588
|
+
const s = e ?? Tr();
|
|
1589
|
+
return Me(s), Nr(t, s), s;
|
|
1595
1590
|
}
|
|
1596
|
-
function
|
|
1591
|
+
function Nr(t, e) {
|
|
1597
1592
|
let s;
|
|
1598
|
-
for (; (s =
|
|
1593
|
+
for (; (s = t.next()) !== null; )
|
|
1599
1594
|
switch (s.fieldId) {
|
|
1600
|
-
case
|
|
1595
|
+
case dr: {
|
|
1601
1596
|
if (s.isNull) throw new Error();
|
|
1602
|
-
|
|
1597
|
+
e.StyleId = s.asString();
|
|
1603
1598
|
break;
|
|
1604
1599
|
}
|
|
1605
|
-
case
|
|
1600
|
+
case Sr: {
|
|
1606
1601
|
if (s.isNull) throw new Error();
|
|
1607
|
-
|
|
1602
|
+
e.Style = Cr(s.asDictionary());
|
|
1608
1603
|
break;
|
|
1609
1604
|
}
|
|
1610
1605
|
}
|
|
1611
1606
|
}
|
|
1612
|
-
async function
|
|
1613
|
-
const s = await x(
|
|
1614
|
-
return
|
|
1607
|
+
async function wr(t, e) {
|
|
1608
|
+
const s = await x(t, fr);
|
|
1609
|
+
return yr(s, e);
|
|
1615
1610
|
}
|
|
1616
|
-
function
|
|
1617
|
-
const
|
|
1611
|
+
function Cr(t) {
|
|
1612
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
1618
1613
|
let s;
|
|
1619
|
-
for (; (s =
|
|
1614
|
+
for (; (s = t.next()) !== null; ) {
|
|
1620
1615
|
const r = s.key.asString();
|
|
1621
|
-
|
|
1616
|
+
e[r] = s.value.asString();
|
|
1622
1617
|
}
|
|
1623
|
-
return
|
|
1618
|
+
return e;
|
|
1624
1619
|
}
|
|
1625
1620
|
const Rr = 2097192, Dr = 2136687806;
|
|
1626
|
-
function
|
|
1627
|
-
const
|
|
1628
|
-
return Ve(
|
|
1621
|
+
function Ur(t) {
|
|
1622
|
+
const e = {};
|
|
1623
|
+
return Ve(e), e;
|
|
1629
1624
|
}
|
|
1630
|
-
function Ve(
|
|
1631
|
-
return
|
|
1625
|
+
function Ve(t) {
|
|
1626
|
+
return t.Styles = [], t;
|
|
1632
1627
|
}
|
|
1633
|
-
function
|
|
1634
|
-
const s = O.create(
|
|
1635
|
-
return
|
|
1628
|
+
function Lr(t, e) {
|
|
1629
|
+
const s = O.create(t);
|
|
1630
|
+
return mr(s, e);
|
|
1636
1631
|
}
|
|
1637
|
-
function
|
|
1638
|
-
const s =
|
|
1639
|
-
return Ve(s),
|
|
1632
|
+
function mr(t, e) {
|
|
1633
|
+
const s = e ?? Ur();
|
|
1634
|
+
return Ve(s), Or(t, s), s;
|
|
1640
1635
|
}
|
|
1641
|
-
function
|
|
1636
|
+
function Or(t, e) {
|
|
1642
1637
|
let s;
|
|
1643
|
-
for (; (s =
|
|
1638
|
+
for (; (s = t.next()) !== null; )
|
|
1644
1639
|
switch (s.fieldId) {
|
|
1645
1640
|
case Dr: {
|
|
1646
1641
|
if (s.isNull) throw new Error();
|
|
1647
|
-
|
|
1642
|
+
e.Styles = pr(s.asArray());
|
|
1648
1643
|
break;
|
|
1649
1644
|
}
|
|
1650
1645
|
}
|
|
1651
1646
|
}
|
|
1652
|
-
async function
|
|
1653
|
-
const s = await x(
|
|
1654
|
-
return
|
|
1647
|
+
async function gr(t, e) {
|
|
1648
|
+
const s = await x(t, Rr);
|
|
1649
|
+
return Lr(s, e);
|
|
1655
1650
|
}
|
|
1656
|
-
function
|
|
1657
|
-
const
|
|
1651
|
+
function pr(t) {
|
|
1652
|
+
const e = [];
|
|
1658
1653
|
let s;
|
|
1659
|
-
for (; (s =
|
|
1660
|
-
|
|
1661
|
-
return
|
|
1654
|
+
for (; (s = t.next()) !== null; )
|
|
1655
|
+
e.push(kr(s.asObject()));
|
|
1656
|
+
return e;
|
|
1662
1657
|
}
|
|
1663
|
-
const
|
|
1664
|
-
function
|
|
1665
|
-
const
|
|
1666
|
-
return
|
|
1658
|
+
const br = 979822885, Fr = 2374537704;
|
|
1659
|
+
function Pr(t) {
|
|
1660
|
+
const e = {};
|
|
1661
|
+
return Be(e), e;
|
|
1667
1662
|
}
|
|
1668
|
-
function
|
|
1669
|
-
return
|
|
1663
|
+
function Be(t) {
|
|
1664
|
+
return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
|
|
1670
1665
|
}
|
|
1671
|
-
function
|
|
1672
|
-
const s =
|
|
1673
|
-
return
|
|
1666
|
+
function kr(t, e) {
|
|
1667
|
+
const s = e ?? Pr();
|
|
1668
|
+
return Be(s), vr(t, s), s;
|
|
1674
1669
|
}
|
|
1675
|
-
function vr(
|
|
1670
|
+
function vr(t, e) {
|
|
1676
1671
|
let s;
|
|
1677
|
-
for (; (s =
|
|
1672
|
+
for (; (s = t.next()) !== null; )
|
|
1678
1673
|
switch (s.fieldId) {
|
|
1679
|
-
case
|
|
1674
|
+
case br: {
|
|
1680
1675
|
if (s.isNull) throw new Error();
|
|
1681
|
-
|
|
1676
|
+
e.StyleId = s.asString();
|
|
1682
1677
|
break;
|
|
1683
1678
|
}
|
|
1684
|
-
case
|
|
1679
|
+
case Fr: {
|
|
1685
1680
|
if (s.isNull) throw new Error();
|
|
1686
|
-
|
|
1681
|
+
e.Style = Mr(s.asDictionary());
|
|
1687
1682
|
break;
|
|
1688
1683
|
}
|
|
1689
1684
|
}
|
|
1690
1685
|
}
|
|
1691
|
-
function
|
|
1692
|
-
const
|
|
1686
|
+
function Mr(t) {
|
|
1687
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
1693
1688
|
let s;
|
|
1694
|
-
for (; (s =
|
|
1689
|
+
for (; (s = t.next()) !== null; ) {
|
|
1695
1690
|
const r = s.key.asString();
|
|
1696
|
-
|
|
1691
|
+
e[r] = s.value.asString();
|
|
1697
1692
|
}
|
|
1698
|
-
return
|
|
1693
|
+
return e;
|
|
1699
1694
|
}
|
|
1700
|
-
const Vr = 2097193,
|
|
1701
|
-
function
|
|
1702
|
-
const
|
|
1703
|
-
return
|
|
1695
|
+
const Vr = 2097193, Br = 1415642792;
|
|
1696
|
+
function Gr(t) {
|
|
1697
|
+
const e = {};
|
|
1698
|
+
return Ge(e), e;
|
|
1704
1699
|
}
|
|
1705
|
-
function
|
|
1706
|
-
return
|
|
1700
|
+
function Ge(t) {
|
|
1701
|
+
return t.StyleIds = [], t;
|
|
1707
1702
|
}
|
|
1708
|
-
function
|
|
1709
|
-
const s = O.create(
|
|
1710
|
-
return Yr(s,
|
|
1703
|
+
function xr(t, e) {
|
|
1704
|
+
const s = O.create(t);
|
|
1705
|
+
return Yr(s, e);
|
|
1711
1706
|
}
|
|
1712
|
-
function Yr(
|
|
1713
|
-
const s =
|
|
1714
|
-
return
|
|
1707
|
+
function Yr(t, e) {
|
|
1708
|
+
const s = e ?? Gr();
|
|
1709
|
+
return Ge(s), Hr(t, s), s;
|
|
1715
1710
|
}
|
|
1716
|
-
function
|
|
1711
|
+
function Hr(t, e) {
|
|
1717
1712
|
let s;
|
|
1718
|
-
for (; (s =
|
|
1713
|
+
for (; (s = t.next()) !== null; )
|
|
1719
1714
|
switch (s.fieldId) {
|
|
1720
|
-
case
|
|
1715
|
+
case Br: {
|
|
1721
1716
|
if (s.isNull) throw new Error();
|
|
1722
|
-
|
|
1717
|
+
e.StyleIds = Kr(s.asArray());
|
|
1723
1718
|
break;
|
|
1724
1719
|
}
|
|
1725
1720
|
}
|
|
1726
1721
|
}
|
|
1727
|
-
async function
|
|
1728
|
-
const s = await x(
|
|
1729
|
-
return
|
|
1722
|
+
async function Wr(t, e) {
|
|
1723
|
+
const s = await x(t, Vr);
|
|
1724
|
+
return xr(s, e);
|
|
1730
1725
|
}
|
|
1731
|
-
function
|
|
1732
|
-
const
|
|
1726
|
+
function Kr(t) {
|
|
1727
|
+
const e = [];
|
|
1733
1728
|
let s;
|
|
1734
|
-
for (; (s =
|
|
1735
|
-
|
|
1736
|
-
return
|
|
1729
|
+
for (; (s = t.next()) !== null; )
|
|
1730
|
+
e.push(s.asString());
|
|
1731
|
+
return e;
|
|
1737
1732
|
}
|
|
1738
|
-
const
|
|
1739
|
-
function
|
|
1740
|
-
const
|
|
1741
|
-
return
|
|
1733
|
+
const $r = 2097190, jr = 425183262, Xr = 653781469;
|
|
1734
|
+
function zr(t) {
|
|
1735
|
+
const e = {};
|
|
1736
|
+
return xe(e), e;
|
|
1742
1737
|
}
|
|
1743
|
-
function
|
|
1744
|
-
return
|
|
1738
|
+
function xe(t) {
|
|
1739
|
+
return t.Json = "", t.Payloads = /* @__PURE__ */ Object.create(null), t;
|
|
1745
1740
|
}
|
|
1746
|
-
function
|
|
1747
|
-
const s = O.create(
|
|
1748
|
-
return
|
|
1741
|
+
function Jr(t, e) {
|
|
1742
|
+
const s = O.create(t);
|
|
1743
|
+
return qr(s, e);
|
|
1749
1744
|
}
|
|
1750
|
-
function
|
|
1751
|
-
const s =
|
|
1752
|
-
return
|
|
1745
|
+
function qr(t, e) {
|
|
1746
|
+
const s = e ?? zr();
|
|
1747
|
+
return xe(s), Qr(t, s), s;
|
|
1753
1748
|
}
|
|
1754
|
-
function
|
|
1749
|
+
function Qr(t, e) {
|
|
1755
1750
|
let s;
|
|
1756
|
-
for (; (s =
|
|
1751
|
+
for (; (s = t.next()) !== null; )
|
|
1757
1752
|
switch (s.fieldId) {
|
|
1758
1753
|
case jr: {
|
|
1759
1754
|
if (s.isNull) throw new Error();
|
|
1760
|
-
|
|
1755
|
+
e.Json = s.asString();
|
|
1761
1756
|
break;
|
|
1762
1757
|
}
|
|
1763
|
-
case
|
|
1758
|
+
case Xr: {
|
|
1764
1759
|
if (s.isNull) throw new Error();
|
|
1765
|
-
|
|
1760
|
+
e.Payloads = en(s.asDictionary());
|
|
1766
1761
|
break;
|
|
1767
1762
|
}
|
|
1768
1763
|
}
|
|
1769
1764
|
}
|
|
1770
|
-
async function
|
|
1771
|
-
const s = await x(
|
|
1772
|
-
return
|
|
1765
|
+
async function Zr(t, e) {
|
|
1766
|
+
const s = await x(t, $r);
|
|
1767
|
+
return Jr(s, e);
|
|
1773
1768
|
}
|
|
1774
|
-
function
|
|
1775
|
-
const
|
|
1769
|
+
function en(t) {
|
|
1770
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
1776
1771
|
let s;
|
|
1777
|
-
for (; (s =
|
|
1772
|
+
for (; (s = t.next()) !== null; ) {
|
|
1778
1773
|
const r = s.key.asString();
|
|
1779
|
-
|
|
1774
|
+
e[r] = ir(s.value.asObject());
|
|
1780
1775
|
}
|
|
1781
|
-
return
|
|
1776
|
+
return e;
|
|
1782
1777
|
}
|
|
1783
|
-
const Ye = 1,
|
|
1784
|
-
function
|
|
1785
|
-
const
|
|
1786
|
-
return
|
|
1778
|
+
const Ye = 1, tn = 1048636, sn = 2610786289;
|
|
1779
|
+
function rn(t) {
|
|
1780
|
+
const e = new v(Ye);
|
|
1781
|
+
return nn(t, e), e.finish();
|
|
1787
1782
|
}
|
|
1788
|
-
function
|
|
1789
|
-
|
|
1783
|
+
function nn(t, e) {
|
|
1784
|
+
e.writeUInt32Field(sn, t.Version >>> 0);
|
|
1790
1785
|
}
|
|
1791
|
-
function
|
|
1792
|
-
const r =
|
|
1793
|
-
return
|
|
1786
|
+
function on(t, e, s) {
|
|
1787
|
+
const r = rn(t);
|
|
1788
|
+
return Ee(tn, r, Ye, e, s);
|
|
1794
1789
|
}
|
|
1795
|
-
const
|
|
1796
|
-
function
|
|
1797
|
-
const
|
|
1798
|
-
return
|
|
1790
|
+
const an = 161083277, ln = 164808083, hn = 1368629611, In = 2514959030, En = 2745379226, un = 2950031986, cn = 3282782683, _n = 3284746250, fn = 4065070594;
|
|
1791
|
+
function He(t) {
|
|
1792
|
+
const e = {};
|
|
1793
|
+
return We(e), e;
|
|
1799
1794
|
}
|
|
1800
|
-
function
|
|
1801
|
-
return
|
|
1795
|
+
function We(t) {
|
|
1796
|
+
return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = Ne.H264, t.CodecDetails = "", t.Width = 0, t.Height = 0, t.Framerate = 30, t.CorrelationId = void 0, t;
|
|
1802
1797
|
}
|
|
1803
|
-
function
|
|
1804
|
-
const s =
|
|
1805
|
-
return
|
|
1798
|
+
function dn(t, e) {
|
|
1799
|
+
const s = e ?? He();
|
|
1800
|
+
return We(s), Sn(t, s), s;
|
|
1806
1801
|
}
|
|
1807
|
-
function
|
|
1802
|
+
function Sn(t, e) {
|
|
1808
1803
|
let s;
|
|
1809
|
-
for (; (s =
|
|
1804
|
+
for (; (s = t.next()) !== null; )
|
|
1810
1805
|
switch (s.fieldId) {
|
|
1811
|
-
case
|
|
1806
|
+
case an: {
|
|
1812
1807
|
if (s.isNull) throw new Error();
|
|
1813
|
-
|
|
1808
|
+
e.StreamId = s.asString();
|
|
1814
1809
|
break;
|
|
1815
1810
|
}
|
|
1816
|
-
case
|
|
1811
|
+
case ln: {
|
|
1817
1812
|
if (s.isNull) throw new Error();
|
|
1818
|
-
|
|
1813
|
+
e.Framerate = s.asFloat64();
|
|
1819
1814
|
break;
|
|
1820
1815
|
}
|
|
1821
|
-
case
|
|
1816
|
+
case hn: {
|
|
1822
1817
|
if (s.isNull) throw new Error();
|
|
1823
|
-
|
|
1818
|
+
e.Description = s.asString();
|
|
1824
1819
|
break;
|
|
1825
1820
|
}
|
|
1826
|
-
case
|
|
1821
|
+
case In: {
|
|
1827
1822
|
if (s.isNull) {
|
|
1828
|
-
|
|
1823
|
+
e.CorrelationId = void 0;
|
|
1829
1824
|
break;
|
|
1830
1825
|
}
|
|
1831
|
-
|
|
1826
|
+
e.CorrelationId = s.asString();
|
|
1832
1827
|
break;
|
|
1833
1828
|
}
|
|
1834
|
-
case
|
|
1829
|
+
case En: {
|
|
1835
1830
|
if (s.isNull) throw new Error();
|
|
1836
|
-
|
|
1831
|
+
e.CodecDetails = s.asString();
|
|
1837
1832
|
break;
|
|
1838
1833
|
}
|
|
1839
1834
|
case un: {
|
|
1840
1835
|
if (s.isNull) throw new Error();
|
|
1841
|
-
|
|
1836
|
+
e.Height = s.asInt32();
|
|
1842
1837
|
break;
|
|
1843
1838
|
}
|
|
1844
1839
|
case cn: {
|
|
1845
1840
|
if (s.isNull) throw new Error();
|
|
1846
|
-
|
|
1841
|
+
e.SourceType = s.asString();
|
|
1847
1842
|
break;
|
|
1848
1843
|
}
|
|
1849
|
-
case
|
|
1844
|
+
case _n: {
|
|
1850
1845
|
if (s.isNull) throw new Error();
|
|
1851
|
-
|
|
1846
|
+
e.Codec = s.asInt32();
|
|
1852
1847
|
break;
|
|
1853
1848
|
}
|
|
1854
|
-
case
|
|
1849
|
+
case fn: {
|
|
1855
1850
|
if (s.isNull) throw new Error();
|
|
1856
|
-
|
|
1851
|
+
e.Width = s.asInt32();
|
|
1857
1852
|
break;
|
|
1858
1853
|
}
|
|
1859
1854
|
}
|
|
1860
1855
|
}
|
|
1861
|
-
const
|
|
1862
|
-
function
|
|
1863
|
-
const
|
|
1864
|
-
return
|
|
1856
|
+
const Tn = 65539, yn = 693643444, An = 976837618, Nn = 1144553441, wn = 1497620243, Cn = 1559330978, Rn = 1976546434, Dn = 2271236852, Un = 2277643855, Ln = 2469008121, mn = 3042922213, On = 3064612128, gn = 3219210453, pn = 3504054055, bn = 3678477544, Fn = 3696445035, Pn = 3707543140, kn = 3712281496, vn = 3895362455, Mn = 3897397815, Vn = 3914217035, Bn = 4225107827;
|
|
1857
|
+
function Gn(t) {
|
|
1858
|
+
const e = {};
|
|
1859
|
+
return Ke(e), e;
|
|
1865
1860
|
}
|
|
1866
|
-
function
|
|
1867
|
-
return
|
|
1861
|
+
function Ke(t) {
|
|
1862
|
+
return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__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.ChannelId = "", t.ServerSessionId = "", t.SessionHash = "", t.ChannelUrl = "", t.SessionChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = Ce.Local, t.AppSourceType = Re.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
|
|
1868
1863
|
}
|
|
1869
|
-
function
|
|
1870
|
-
const s = O.create(
|
|
1871
|
-
return Yn(s,
|
|
1864
|
+
function xn(t, e) {
|
|
1865
|
+
const s = O.create(t);
|
|
1866
|
+
return Yn(s, e);
|
|
1872
1867
|
}
|
|
1873
|
-
function Yn(
|
|
1874
|
-
const s =
|
|
1875
|
-
return
|
|
1868
|
+
function Yn(t, e) {
|
|
1869
|
+
const s = e ?? Gn();
|
|
1870
|
+
return Ke(s), Hn(t, s), s;
|
|
1876
1871
|
}
|
|
1877
|
-
function
|
|
1872
|
+
function Hn(t, e) {
|
|
1878
1873
|
let s;
|
|
1879
|
-
for (; (s =
|
|
1874
|
+
for (; (s = t.next()) !== null; )
|
|
1880
1875
|
switch (s.fieldId) {
|
|
1881
|
-
case
|
|
1876
|
+
case yn: {
|
|
1882
1877
|
if (s.isNull) throw new Error();
|
|
1883
|
-
|
|
1878
|
+
e.FirstUserId = s.asString();
|
|
1884
1879
|
break;
|
|
1885
1880
|
}
|
|
1886
|
-
case
|
|
1881
|
+
case An: {
|
|
1887
1882
|
if (s.isNull) throw new Error();
|
|
1888
|
-
|
|
1883
|
+
e.SessionHash = s.asString();
|
|
1889
1884
|
break;
|
|
1890
1885
|
}
|
|
1891
|
-
case
|
|
1886
|
+
case Nn: {
|
|
1892
1887
|
if (s.isNull) throw new Error();
|
|
1893
|
-
|
|
1888
|
+
e.Clients = Kn(s.asDictionary());
|
|
1894
1889
|
break;
|
|
1895
1890
|
}
|
|
1896
|
-
case
|
|
1891
|
+
case wn: {
|
|
1897
1892
|
if (s.isNull) throw new Error();
|
|
1898
|
-
|
|
1893
|
+
e.TrackingStreams = $n(s.asDictionary());
|
|
1899
1894
|
break;
|
|
1900
1895
|
}
|
|
1901
|
-
case
|
|
1896
|
+
case Cn: {
|
|
1902
1897
|
if (s.isNull) throw new Error();
|
|
1903
|
-
|
|
1898
|
+
e.ChannelId = s.asString();
|
|
1904
1899
|
break;
|
|
1905
1900
|
}
|
|
1906
1901
|
case Rn: {
|
|
1907
1902
|
if (s.isNull) throw new Error();
|
|
1908
|
-
|
|
1903
|
+
e.AppSourceType = s.asInt32();
|
|
1909
1904
|
break;
|
|
1910
1905
|
}
|
|
1911
1906
|
case Dn: {
|
|
1912
1907
|
if (s.isNull) throw new Error();
|
|
1913
|
-
|
|
1908
|
+
e.SessionChannelUrl = s.asString();
|
|
1909
|
+
break;
|
|
1910
|
+
}
|
|
1911
|
+
case Un: {
|
|
1912
|
+
if (s.isNull) throw new Error();
|
|
1913
|
+
e.ChannelUrl = s.asString();
|
|
1914
1914
|
break;
|
|
1915
1915
|
}
|
|
1916
1916
|
case Ln: {
|
|
1917
1917
|
if (s.isNull) throw new Error();
|
|
1918
|
-
|
|
1918
|
+
e.ChannelName = s.asString();
|
|
1919
1919
|
break;
|
|
1920
1920
|
}
|
|
1921
1921
|
case mn: {
|
|
1922
1922
|
if (s.isNull) throw new Error();
|
|
1923
|
-
|
|
1923
|
+
e.PublicAccess = s.asBool();
|
|
1924
1924
|
break;
|
|
1925
1925
|
}
|
|
1926
1926
|
case On: {
|
|
1927
1927
|
if (s.isNull) throw new Error();
|
|
1928
|
-
|
|
1928
|
+
e.ServerRunType = s.asInt32();
|
|
1929
1929
|
break;
|
|
1930
1930
|
}
|
|
1931
1931
|
case gn: {
|
|
1932
1932
|
if (s.isNull) throw new Error();
|
|
1933
|
-
|
|
1933
|
+
e.OrganisationName = s.asString();
|
|
1934
1934
|
break;
|
|
1935
1935
|
}
|
|
1936
|
-
case
|
|
1936
|
+
case pn: {
|
|
1937
1937
|
if (s.isNull) throw new Error();
|
|
1938
|
-
|
|
1938
|
+
e.DebugMode = s.asBool();
|
|
1939
1939
|
break;
|
|
1940
1940
|
}
|
|
1941
|
-
case
|
|
1941
|
+
case bn: {
|
|
1942
1942
|
if (s.isNull) throw new Error();
|
|
1943
|
-
|
|
1943
|
+
e.Functions = jn(s.asDictionary());
|
|
1944
1944
|
break;
|
|
1945
1945
|
}
|
|
1946
|
-
case
|
|
1946
|
+
case Fn: {
|
|
1947
1947
|
if (s.isNull) throw new Error();
|
|
1948
|
-
|
|
1948
|
+
e.UIStreams = Xn(s.asDictionary());
|
|
1949
1949
|
break;
|
|
1950
1950
|
}
|
|
1951
|
-
case
|
|
1951
|
+
case Pn: {
|
|
1952
1952
|
if (s.isNull) throw new Error();
|
|
1953
|
-
|
|
1953
|
+
e.SpaceId = s.asString();
|
|
1954
1954
|
break;
|
|
1955
1955
|
}
|
|
1956
1956
|
case kn: {
|
|
1957
1957
|
if (s.isNull) throw new Error();
|
|
1958
|
-
|
|
1959
|
-
break;
|
|
1960
|
-
}
|
|
1961
|
-
case Mn: {
|
|
1962
|
-
if (s.isNull) throw new Error();
|
|
1963
|
-
t.PrimaryUserId = s.asString();
|
|
1958
|
+
e.PrimaryUserId = s.asString();
|
|
1964
1959
|
break;
|
|
1965
1960
|
}
|
|
1966
1961
|
case vn: {
|
|
1967
1962
|
if (s.isNull) throw new Error();
|
|
1968
|
-
|
|
1963
|
+
e.AudioStreams = zn(s.asDictionary());
|
|
1969
1964
|
break;
|
|
1970
1965
|
}
|
|
1971
|
-
case
|
|
1966
|
+
case Mn: {
|
|
1972
1967
|
if (s.isNull) throw new Error();
|
|
1973
|
-
|
|
1968
|
+
e.VideoStreams = Jn(s.asDictionary());
|
|
1974
1969
|
break;
|
|
1975
1970
|
}
|
|
1976
1971
|
case Vn: {
|
|
1977
1972
|
if (s.isNull) throw new Error();
|
|
1978
|
-
|
|
1973
|
+
e.ServerSessionId = s.asString();
|
|
1979
1974
|
break;
|
|
1980
1975
|
}
|
|
1981
|
-
case
|
|
1976
|
+
case Bn: {
|
|
1982
1977
|
if (s.isNull) throw new Error();
|
|
1983
|
-
|
|
1978
|
+
e.SpaceName = s.asString();
|
|
1984
1979
|
break;
|
|
1985
1980
|
}
|
|
1986
1981
|
}
|
|
1987
1982
|
}
|
|
1988
|
-
async function
|
|
1989
|
-
const s = await x(
|
|
1990
|
-
return
|
|
1983
|
+
async function Wn(t, e) {
|
|
1984
|
+
const s = await x(t, Tn);
|
|
1985
|
+
return xn(s, e);
|
|
1991
1986
|
}
|
|
1992
|
-
function
|
|
1993
|
-
const
|
|
1987
|
+
function Kn(t) {
|
|
1988
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
1994
1989
|
let s;
|
|
1995
|
-
for (; (s =
|
|
1990
|
+
for (; (s = t.next()) !== null; ) {
|
|
1996
1991
|
const r = s.key.asInt32();
|
|
1997
|
-
|
|
1992
|
+
e[r] = Ts(s.value.asObject());
|
|
1998
1993
|
}
|
|
1999
|
-
return
|
|
1994
|
+
return e;
|
|
2000
1995
|
}
|
|
2001
|
-
function
|
|
2002
|
-
const
|
|
1996
|
+
function $n(t) {
|
|
1997
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
2003
1998
|
let s;
|
|
2004
|
-
for (; (s =
|
|
1999
|
+
for (; (s = t.next()) !== null; ) {
|
|
2005
2000
|
const r = s.key.asString();
|
|
2006
|
-
|
|
2001
|
+
e[r] = Ri(s.value.asObject());
|
|
2007
2002
|
}
|
|
2008
|
-
return
|
|
2003
|
+
return e;
|
|
2009
2004
|
}
|
|
2010
|
-
function jn(
|
|
2011
|
-
const
|
|
2005
|
+
function jn(t) {
|
|
2006
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
2012
2007
|
let s;
|
|
2013
|
-
for (; (s =
|
|
2008
|
+
for (; (s = t.next()) !== null; ) {
|
|
2014
2009
|
const r = s.key.asInt32();
|
|
2015
|
-
|
|
2010
|
+
e[r] = qn(s.value.asArray());
|
|
2016
2011
|
}
|
|
2017
|
-
return
|
|
2012
|
+
return e;
|
|
2018
2013
|
}
|
|
2019
|
-
function
|
|
2020
|
-
const
|
|
2014
|
+
function Xn(t) {
|
|
2015
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
2021
2016
|
let s;
|
|
2022
|
-
for (; (s =
|
|
2017
|
+
for (; (s = t.next()) !== null; ) {
|
|
2023
2018
|
const r = s.key.asString();
|
|
2024
|
-
|
|
2019
|
+
e[r] = ri(s.value.asObject());
|
|
2025
2020
|
}
|
|
2026
|
-
return
|
|
2021
|
+
return e;
|
|
2027
2022
|
}
|
|
2028
|
-
function
|
|
2029
|
-
const
|
|
2023
|
+
function zn(t) {
|
|
2024
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
2030
2025
|
let s;
|
|
2031
|
-
for (; (s =
|
|
2026
|
+
for (; (s = t.next()) !== null; ) {
|
|
2032
2027
|
const r = s.key.asString();
|
|
2033
|
-
|
|
2028
|
+
e[r] = Ii(s.value.asObject());
|
|
2034
2029
|
}
|
|
2035
|
-
return
|
|
2030
|
+
return e;
|
|
2036
2031
|
}
|
|
2037
|
-
function
|
|
2038
|
-
const
|
|
2032
|
+
function Jn(t) {
|
|
2033
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
2039
2034
|
let s;
|
|
2040
|
-
for (; (s =
|
|
2035
|
+
for (; (s = t.next()) !== null; ) {
|
|
2041
2036
|
const r = s.key.asString();
|
|
2042
|
-
|
|
2037
|
+
e[r] = Si(s.value.asObject());
|
|
2043
2038
|
}
|
|
2044
|
-
return
|
|
2039
|
+
return e;
|
|
2045
2040
|
}
|
|
2046
|
-
function
|
|
2047
|
-
const
|
|
2041
|
+
function qn(t) {
|
|
2042
|
+
const e = [];
|
|
2048
2043
|
let s;
|
|
2049
|
-
for (; (s =
|
|
2050
|
-
|
|
2051
|
-
return
|
|
2044
|
+
for (; (s = t.next()) !== null; )
|
|
2045
|
+
e.push(Ps(s.asObject()));
|
|
2046
|
+
return e;
|
|
2052
2047
|
}
|
|
2053
|
-
const
|
|
2054
|
-
function
|
|
2055
|
-
const
|
|
2056
|
-
return
|
|
2048
|
+
const Qn = 161083277, Zn = 325678206, ei = 3469892363, ti = 3645544153;
|
|
2049
|
+
function si(t) {
|
|
2050
|
+
const e = {};
|
|
2051
|
+
return $e(e), e;
|
|
2057
2052
|
}
|
|
2058
|
-
function
|
|
2059
|
-
return
|
|
2053
|
+
function $e(t) {
|
|
2054
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = ke(), t;
|
|
2060
2055
|
}
|
|
2061
|
-
function
|
|
2062
|
-
const s =
|
|
2063
|
-
return
|
|
2056
|
+
function ri(t, e) {
|
|
2057
|
+
const s = e ?? si();
|
|
2058
|
+
return $e(s), ni(t, s), s;
|
|
2064
2059
|
}
|
|
2065
|
-
function
|
|
2060
|
+
function ni(t, e) {
|
|
2066
2061
|
let s;
|
|
2067
|
-
for (; (s =
|
|
2062
|
+
for (; (s = t.next()) !== null; )
|
|
2068
2063
|
switch (s.fieldId) {
|
|
2069
|
-
case
|
|
2064
|
+
case Qn: {
|
|
2070
2065
|
if (s.isNull) throw new Error();
|
|
2071
|
-
|
|
2066
|
+
e.StreamId = s.asString();
|
|
2072
2067
|
break;
|
|
2073
2068
|
}
|
|
2074
|
-
case
|
|
2069
|
+
case Zn: {
|
|
2075
2070
|
if (s.isNull) throw new Error();
|
|
2076
|
-
|
|
2071
|
+
e.ClientSessionId = s.asInt32();
|
|
2077
2072
|
break;
|
|
2078
2073
|
}
|
|
2079
|
-
case
|
|
2074
|
+
case ei: {
|
|
2080
2075
|
if (s.isNull) throw new Error();
|
|
2081
|
-
|
|
2076
|
+
e.TrackId = s.asInt32();
|
|
2082
2077
|
break;
|
|
2083
2078
|
}
|
|
2084
|
-
case
|
|
2079
|
+
case ti: {
|
|
2085
2080
|
if (s.isNull) throw new Error();
|
|
2086
|
-
|
|
2081
|
+
e.Info = cr(s.asObject());
|
|
2087
2082
|
break;
|
|
2088
2083
|
}
|
|
2089
2084
|
}
|
|
2090
2085
|
}
|
|
2091
|
-
const
|
|
2092
|
-
function
|
|
2093
|
-
const
|
|
2094
|
-
return je(
|
|
2086
|
+
const ii = 161083277, oi = 325678206, ai = 3469892363, li = 3645544153;
|
|
2087
|
+
function hi(t) {
|
|
2088
|
+
const e = {};
|
|
2089
|
+
return je(e), e;
|
|
2095
2090
|
}
|
|
2096
|
-
function je(
|
|
2097
|
-
return
|
|
2091
|
+
function je(t) {
|
|
2092
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = De(), t;
|
|
2098
2093
|
}
|
|
2099
|
-
function
|
|
2100
|
-
const s =
|
|
2101
|
-
return je(s),
|
|
2094
|
+
function Ii(t, e) {
|
|
2095
|
+
const s = e ?? hi();
|
|
2096
|
+
return je(s), Ei(t, s), s;
|
|
2102
2097
|
}
|
|
2103
|
-
function
|
|
2098
|
+
function Ei(t, e) {
|
|
2104
2099
|
let s;
|
|
2105
|
-
for (; (s =
|
|
2100
|
+
for (; (s = t.next()) !== null; )
|
|
2106
2101
|
switch (s.fieldId) {
|
|
2107
|
-
case
|
|
2102
|
+
case ii: {
|
|
2108
2103
|
if (s.isNull) throw new Error();
|
|
2109
|
-
|
|
2104
|
+
e.StreamId = s.asString();
|
|
2110
2105
|
break;
|
|
2111
2106
|
}
|
|
2112
|
-
case
|
|
2107
|
+
case oi: {
|
|
2113
2108
|
if (s.isNull) throw new Error();
|
|
2114
|
-
|
|
2109
|
+
e.ClientSessionId = s.asInt32();
|
|
2115
2110
|
break;
|
|
2116
2111
|
}
|
|
2117
|
-
case
|
|
2112
|
+
case ai: {
|
|
2118
2113
|
if (s.isNull) throw new Error();
|
|
2119
|
-
|
|
2114
|
+
e.TrackId = s.asInt32();
|
|
2120
2115
|
break;
|
|
2121
2116
|
}
|
|
2122
|
-
case
|
|
2117
|
+
case li: {
|
|
2123
2118
|
if (s.isNull) throw new Error();
|
|
2124
|
-
|
|
2119
|
+
e.Info = Ut(s.asObject());
|
|
2125
2120
|
break;
|
|
2126
2121
|
}
|
|
2127
2122
|
}
|
|
2128
2123
|
}
|
|
2129
|
-
const ui = 161083277, ci = 325678206,
|
|
2130
|
-
function
|
|
2131
|
-
const
|
|
2132
|
-
return
|
|
2124
|
+
const ui = 161083277, ci = 325678206, _i = 3469892363, fi = 3645544153;
|
|
2125
|
+
function di(t) {
|
|
2126
|
+
const e = {};
|
|
2127
|
+
return Xe(e), e;
|
|
2133
2128
|
}
|
|
2134
|
-
function
|
|
2135
|
-
return
|
|
2129
|
+
function Xe(t) {
|
|
2130
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = He(), t;
|
|
2136
2131
|
}
|
|
2137
|
-
function
|
|
2138
|
-
const s =
|
|
2139
|
-
return
|
|
2132
|
+
function Si(t, e) {
|
|
2133
|
+
const s = e ?? di();
|
|
2134
|
+
return Xe(s), Ti(t, s), s;
|
|
2140
2135
|
}
|
|
2141
|
-
function
|
|
2136
|
+
function Ti(t, e) {
|
|
2142
2137
|
let s;
|
|
2143
|
-
for (; (s =
|
|
2138
|
+
for (; (s = t.next()) !== null; )
|
|
2144
2139
|
switch (s.fieldId) {
|
|
2145
2140
|
case ui: {
|
|
2146
2141
|
if (s.isNull) throw new Error();
|
|
2147
|
-
|
|
2142
|
+
e.StreamId = s.asString();
|
|
2148
2143
|
break;
|
|
2149
2144
|
}
|
|
2150
2145
|
case ci: {
|
|
2151
2146
|
if (s.isNull) throw new Error();
|
|
2152
|
-
|
|
2147
|
+
e.ClientSessionId = s.asInt32();
|
|
2153
2148
|
break;
|
|
2154
2149
|
}
|
|
2155
|
-
case
|
|
2150
|
+
case _i: {
|
|
2156
2151
|
if (s.isNull) throw new Error();
|
|
2157
|
-
|
|
2152
|
+
e.TrackId = s.asInt32();
|
|
2158
2153
|
break;
|
|
2159
2154
|
}
|
|
2160
|
-
case
|
|
2155
|
+
case fi: {
|
|
2161
2156
|
if (s.isNull) throw new Error();
|
|
2162
|
-
|
|
2157
|
+
e.Info = dn(s.asObject());
|
|
2163
2158
|
break;
|
|
2164
2159
|
}
|
|
2165
2160
|
}
|
|
2166
2161
|
}
|
|
2167
|
-
const
|
|
2168
|
-
function
|
|
2169
|
-
const
|
|
2170
|
-
return
|
|
2162
|
+
const yi = 161083277, Ai = 325678206, Ni = 3469892363, wi = 3645544153;
|
|
2163
|
+
function Ci(t) {
|
|
2164
|
+
const e = {};
|
|
2165
|
+
return ze(e), e;
|
|
2171
2166
|
}
|
|
2172
|
-
function
|
|
2173
|
-
return
|
|
2167
|
+
function ze(t) {
|
|
2168
|
+
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = pe(), t;
|
|
2174
2169
|
}
|
|
2175
|
-
function Ri(
|
|
2176
|
-
const s =
|
|
2177
|
-
return
|
|
2170
|
+
function Ri(t, e) {
|
|
2171
|
+
const s = e ?? Ci();
|
|
2172
|
+
return ze(s), Di(t, s), s;
|
|
2178
2173
|
}
|
|
2179
|
-
function Di(
|
|
2174
|
+
function Di(t, e) {
|
|
2180
2175
|
let s;
|
|
2181
|
-
for (; (s =
|
|
2176
|
+
for (; (s = t.next()) !== null; )
|
|
2182
2177
|
switch (s.fieldId) {
|
|
2183
|
-
case
|
|
2178
|
+
case yi: {
|
|
2184
2179
|
if (s.isNull) throw new Error();
|
|
2185
|
-
|
|
2180
|
+
e.StreamId = s.asString();
|
|
2186
2181
|
break;
|
|
2187
2182
|
}
|
|
2188
|
-
case
|
|
2183
|
+
case Ai: {
|
|
2189
2184
|
if (s.isNull) throw new Error();
|
|
2190
|
-
|
|
2185
|
+
e.ClientSessionId = s.asInt32();
|
|
2191
2186
|
break;
|
|
2192
2187
|
}
|
|
2193
|
-
case
|
|
2188
|
+
case Ni: {
|
|
2194
2189
|
if (s.isNull) throw new Error();
|
|
2195
|
-
|
|
2190
|
+
e.TrackId = s.asInt32();
|
|
2196
2191
|
break;
|
|
2197
2192
|
}
|
|
2198
|
-
case
|
|
2193
|
+
case wi: {
|
|
2199
2194
|
if (s.isNull) throw new Error();
|
|
2200
|
-
|
|
2195
|
+
e.Info = Zs(s.asObject());
|
|
2201
2196
|
break;
|
|
2202
2197
|
}
|
|
2203
2198
|
}
|
|
2204
2199
|
}
|
|
2205
|
-
function
|
|
2206
|
-
return typeof
|
|
2200
|
+
function R(t) {
|
|
2201
|
+
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
2207
2202
|
}
|
|
2208
|
-
function
|
|
2209
|
-
const
|
|
2203
|
+
function Je(t) {
|
|
2204
|
+
const e = {}, s = Object.keys(t);
|
|
2210
2205
|
for (let r = 0; r < s.length; r++) {
|
|
2211
2206
|
const n = s[r];
|
|
2212
|
-
|
|
2207
|
+
e[n] = t[n];
|
|
2213
2208
|
}
|
|
2214
|
-
return
|
|
2209
|
+
return e;
|
|
2215
2210
|
}
|
|
2216
|
-
function
|
|
2217
|
-
if (!(
|
|
2218
|
-
if (Array.isArray(
|
|
2211
|
+
function qe(t, e, s, r) {
|
|
2212
|
+
if (!(t === void 0 && r)) {
|
|
2213
|
+
if (Array.isArray(t)) {
|
|
2219
2214
|
const n = [];
|
|
2220
|
-
for (let i = 0; i <
|
|
2221
|
-
const o =
|
|
2215
|
+
for (let i = 0; i < t.length; i++) {
|
|
2216
|
+
const o = t[i];
|
|
2222
2217
|
if (typeof o != "string")
|
|
2223
|
-
throw new Error(`Invalid styleIds entry at ${
|
|
2218
|
+
throw new Error(`Invalid styleIds entry at ${e}.styleIds[${i}] for element ${s}`);
|
|
2224
2219
|
const a = o.trim();
|
|
2225
2220
|
a.length !== 0 && n.push(a);
|
|
2226
2221
|
}
|
|
2227
2222
|
return n;
|
|
2228
2223
|
}
|
|
2229
|
-
if (
|
|
2224
|
+
if (t != null)
|
|
2230
2225
|
throw new Error(`Invalid styleIds for element ${s}`);
|
|
2231
2226
|
return [];
|
|
2232
2227
|
}
|
|
2233
2228
|
}
|
|
2234
|
-
function oe(
|
|
2235
|
-
if (!
|
|
2236
|
-
throw new Error(`Invalid UI node at ${
|
|
2237
|
-
const s =
|
|
2229
|
+
function oe(t, e) {
|
|
2230
|
+
if (!t || typeof t != "object")
|
|
2231
|
+
throw new Error(`Invalid UI node at ${e}`);
|
|
2232
|
+
const s = t.Id, r = t.Type, n = t.Props, i = t.Children, o = t.StyleIds;
|
|
2238
2233
|
if (typeof s != "string")
|
|
2239
|
-
throw new Error(`Invalid or missing node id at ${
|
|
2234
|
+
throw new Error(`Invalid or missing node id at ${e}`);
|
|
2240
2235
|
if (typeof r != "string")
|
|
2241
2236
|
throw new Error(`Invalid or missing node type for ${s}`);
|
|
2242
2237
|
let a = {};
|
|
2243
2238
|
if (n != null) {
|
|
2244
|
-
if (!
|
|
2239
|
+
if (!R(n))
|
|
2245
2240
|
throw new Error(`Invalid props for node ${s}`);
|
|
2246
|
-
a =
|
|
2241
|
+
a = Je(n);
|
|
2247
2242
|
}
|
|
2248
|
-
let
|
|
2249
|
-
Array.isArray(i) && (
|
|
2250
|
-
(
|
|
2243
|
+
let h = [];
|
|
2244
|
+
Array.isArray(i) && (h = i.map(
|
|
2245
|
+
(I, u) => oe(I ?? {}, `${e}.children[${u}]`)
|
|
2251
2246
|
));
|
|
2252
|
-
const
|
|
2247
|
+
const E = qe(o, e, s, !1), l = typeof t.SourceMarker == "string" ? t.SourceMarker : void 0;
|
|
2253
2248
|
return {
|
|
2254
2249
|
id: s,
|
|
2255
2250
|
type: r,
|
|
2256
2251
|
props: a,
|
|
2257
|
-
children:
|
|
2258
|
-
styleIds:
|
|
2252
|
+
children: h,
|
|
2253
|
+
styleIds: E ?? [],
|
|
2259
2254
|
...l ? { sourceMarker: l } : {}
|
|
2260
2255
|
};
|
|
2261
2256
|
}
|
|
2262
|
-
function
|
|
2263
|
-
if (!
|
|
2264
|
-
throw new Error(`Invalid text delta at ${
|
|
2265
|
-
const s =
|
|
2257
|
+
function Ui(t, e) {
|
|
2258
|
+
if (!R(t))
|
|
2259
|
+
throw new Error(`Invalid text delta at ${e}`);
|
|
2260
|
+
const s = t.NodeId, r = t.PropertyName, n = t.Start, i = t.End, o = t.InsertedText;
|
|
2266
2261
|
if (typeof s != "string" || s.length === 0)
|
|
2267
|
-
throw new Error(`Invalid text delta node id at ${
|
|
2262
|
+
throw new Error(`Invalid text delta node id at ${e}`);
|
|
2268
2263
|
if (typeof r != "string" || r.length === 0)
|
|
2269
|
-
throw new Error(`Invalid text delta property name at ${
|
|
2264
|
+
throw new Error(`Invalid text delta property name at ${e}`);
|
|
2270
2265
|
if (typeof n != "number" || !Number.isFinite(n))
|
|
2271
|
-
throw new Error(`Invalid text delta start at ${
|
|
2266
|
+
throw new Error(`Invalid text delta start at ${e}`);
|
|
2272
2267
|
if (typeof o != "string")
|
|
2273
|
-
throw new Error(`Invalid text delta inserted text at ${
|
|
2268
|
+
throw new Error(`Invalid text delta inserted text at ${e}`);
|
|
2274
2269
|
let a;
|
|
2275
2270
|
if (typeof i == "number") {
|
|
2276
2271
|
if (!Number.isFinite(i))
|
|
2277
|
-
throw new Error(`Invalid text delta end at ${
|
|
2272
|
+
throw new Error(`Invalid text delta end at ${e}`);
|
|
2278
2273
|
a = i;
|
|
2279
2274
|
} else if (i != null)
|
|
2280
|
-
throw new Error(`Invalid text delta end at ${
|
|
2275
|
+
throw new Error(`Invalid text delta end at ${e}`);
|
|
2281
2276
|
return {
|
|
2282
2277
|
nodeId: s,
|
|
2283
2278
|
propertyName: r,
|
|
@@ -2286,74 +2281,74 @@ function Li(e, t) {
|
|
|
2286
2281
|
insertedText: o
|
|
2287
2282
|
};
|
|
2288
2283
|
}
|
|
2289
|
-
function
|
|
2290
|
-
if (!
|
|
2291
|
-
throw new Error(`Invalid child insert at ${
|
|
2292
|
-
const s =
|
|
2284
|
+
function Li(t, e) {
|
|
2285
|
+
if (!R(t))
|
|
2286
|
+
throw new Error(`Invalid child insert at ${e}`);
|
|
2287
|
+
const s = t.Index, r = t.Node;
|
|
2293
2288
|
if (typeof s != "number" || !Number.isFinite(s))
|
|
2294
|
-
throw new Error(`Invalid child insert index at ${
|
|
2295
|
-
if (!
|
|
2296
|
-
throw new Error(`Invalid child insert node at ${
|
|
2289
|
+
throw new Error(`Invalid child insert index at ${e}`);
|
|
2290
|
+
if (!R(r))
|
|
2291
|
+
throw new Error(`Invalid child insert node at ${e}`);
|
|
2297
2292
|
return {
|
|
2298
2293
|
index: s,
|
|
2299
|
-
node: oe(r, `${
|
|
2294
|
+
node: oe(r, `${e}.node`)
|
|
2300
2295
|
};
|
|
2301
2296
|
}
|
|
2302
|
-
function
|
|
2303
|
-
if (!
|
|
2304
|
-
throw new Error(`Invalid child move at ${
|
|
2305
|
-
const s =
|
|
2297
|
+
function mi(t, e) {
|
|
2298
|
+
if (!R(t))
|
|
2299
|
+
throw new Error(`Invalid child move at ${e}`);
|
|
2300
|
+
const s = t.NodeId, r = t.FromIndex, n = t.ToIndex;
|
|
2306
2301
|
if (typeof s != "string" || s.length === 0)
|
|
2307
|
-
throw new Error(`Invalid child move nodeId at ${
|
|
2302
|
+
throw new Error(`Invalid child move nodeId at ${e}`);
|
|
2308
2303
|
if (typeof r != "number" || !Number.isFinite(r))
|
|
2309
|
-
throw new Error(`Invalid child move fromIndex at ${
|
|
2304
|
+
throw new Error(`Invalid child move fromIndex at ${e}`);
|
|
2310
2305
|
if (typeof n != "number" || !Number.isFinite(n))
|
|
2311
|
-
throw new Error(`Invalid child move toIndex at ${
|
|
2306
|
+
throw new Error(`Invalid child move toIndex at ${e}`);
|
|
2312
2307
|
return {
|
|
2313
2308
|
nodeId: s,
|
|
2314
2309
|
fromIndex: r,
|
|
2315
2310
|
toIndex: n
|
|
2316
2311
|
};
|
|
2317
2312
|
}
|
|
2318
|
-
function
|
|
2319
|
-
if (!
|
|
2320
|
-
throw new Error(`Invalid child remove at ${
|
|
2321
|
-
const s =
|
|
2313
|
+
function Oi(t, e) {
|
|
2314
|
+
if (!R(t))
|
|
2315
|
+
throw new Error(`Invalid child remove at ${e}`);
|
|
2316
|
+
const s = t.NodeId, r = t.Index;
|
|
2322
2317
|
if (typeof s != "string" || s.length === 0)
|
|
2323
|
-
throw new Error(`Invalid child remove nodeId at ${
|
|
2318
|
+
throw new Error(`Invalid child remove nodeId at ${e}`);
|
|
2324
2319
|
if (typeof r != "number" || !Number.isFinite(r))
|
|
2325
|
-
throw new Error(`Invalid child remove index at ${
|
|
2320
|
+
throw new Error(`Invalid child remove index at ${e}`);
|
|
2326
2321
|
return {
|
|
2327
2322
|
nodeId: s,
|
|
2328
2323
|
index: r
|
|
2329
2324
|
};
|
|
2330
2325
|
}
|
|
2331
|
-
function
|
|
2332
|
-
if (!
|
|
2333
|
-
throw new Error(`Invalid node change at ${
|
|
2334
|
-
const s =
|
|
2326
|
+
function gi(t, e) {
|
|
2327
|
+
if (!R(t))
|
|
2328
|
+
throw new Error(`Invalid node change at ${e}`);
|
|
2329
|
+
const s = t.nodeId;
|
|
2335
2330
|
if (typeof s != "string" || s.length === 0)
|
|
2336
|
-
throw new Error(`Invalid node change nodeId at ${
|
|
2337
|
-
const r = Array.isArray(
|
|
2338
|
-
(l,
|
|
2339
|
-
) : void 0, n = Array.isArray(
|
|
2340
|
-
(l,
|
|
2341
|
-
) : void 0, i = Array.isArray(
|
|
2342
|
-
(l,
|
|
2331
|
+
throw new Error(`Invalid node change nodeId at ${e}`);
|
|
2332
|
+
const r = Array.isArray(t.inserts) ? t.inserts.map(
|
|
2333
|
+
(l, I) => Li(l ?? {}, `${e}.inserts[${I}]`)
|
|
2334
|
+
) : void 0, n = Array.isArray(t.moves) ? t.moves.map(
|
|
2335
|
+
(l, I) => mi(l ?? {}, `${e}.moves[${I}]`)
|
|
2336
|
+
) : void 0, i = Array.isArray(t.removals) ? t.removals.map(
|
|
2337
|
+
(l, I) => Oi(l ?? {}, `${e}.removals[${I}]`)
|
|
2343
2338
|
) : void 0;
|
|
2344
2339
|
let o;
|
|
2345
|
-
if (
|
|
2340
|
+
if (R(t.changedProps)) {
|
|
2346
2341
|
o = /* @__PURE__ */ new Map();
|
|
2347
|
-
for (const [l,
|
|
2348
|
-
if (!
|
|
2342
|
+
for (const [l, I] of Object.entries(t.changedProps)) {
|
|
2343
|
+
if (!R(I))
|
|
2349
2344
|
continue;
|
|
2350
|
-
const
|
|
2351
|
-
|
|
2345
|
+
const u = I.New;
|
|
2346
|
+
u == null ? o.set(l, void 0) : R(u) ? o.set(l, Je(u)) : o.set(l, u);
|
|
2352
2347
|
}
|
|
2353
2348
|
}
|
|
2354
|
-
const a = Array.isArray(
|
|
2355
|
-
(l,
|
|
2356
|
-
) : void 0,
|
|
2349
|
+
const a = Array.isArray(t.textUpdates) ? t.textUpdates.map(
|
|
2350
|
+
(l, I) => Ui(l ?? {}, `${e}.textUpdates[${I}]`)
|
|
2351
|
+
) : void 0, h = t.styleIds, E = h !== void 0 ? qe(h, e, s, !0) : void 0;
|
|
2357
2352
|
return {
|
|
2358
2353
|
nodeId: s,
|
|
2359
2354
|
...r && r.length > 0 ? { inserts: r } : {},
|
|
@@ -2361,22 +2356,22 @@ function bi(e, t) {
|
|
|
2361
2356
|
...i && i.length > 0 ? { removals: i } : {},
|
|
2362
2357
|
...o && o.size > 0 ? { changedProps: o } : {},
|
|
2363
2358
|
...a && a.length > 0 ? { textUpdates: a } : {},
|
|
2364
|
-
...
|
|
2359
|
+
...E !== void 0 ? { styleIds: E } : {}
|
|
2365
2360
|
};
|
|
2366
2361
|
}
|
|
2367
|
-
function
|
|
2368
|
-
const
|
|
2369
|
-
for (const [s, r] of Object.entries(
|
|
2370
|
-
|
|
2371
|
-
return
|
|
2362
|
+
function pi(t) {
|
|
2363
|
+
const e = /* @__PURE__ */ new Map();
|
|
2364
|
+
for (const [s, r] of Object.entries(t))
|
|
2365
|
+
e.set(s, r);
|
|
2366
|
+
return e;
|
|
2372
2367
|
}
|
|
2373
|
-
function
|
|
2374
|
-
if (!
|
|
2375
|
-
throw new
|
|
2376
|
-
const r = oe(
|
|
2368
|
+
function bi(t, e, s) {
|
|
2369
|
+
if (!t || typeof t != "object")
|
|
2370
|
+
throw new U("UI update graph is missing");
|
|
2371
|
+
const r = oe(t, "graph");
|
|
2377
2372
|
if (r.type !== "root")
|
|
2378
|
-
throw new
|
|
2379
|
-
const n =
|
|
2373
|
+
throw new U('UI update root element must have type "root"');
|
|
2374
|
+
const n = Pi(r.props, e);
|
|
2380
2375
|
return {
|
|
2381
2376
|
type: "full",
|
|
2382
2377
|
version: s,
|
|
@@ -2384,17 +2379,17 @@ function Pi(e, t, s) {
|
|
|
2384
2379
|
metadata: n
|
|
2385
2380
|
};
|
|
2386
2381
|
}
|
|
2387
|
-
function
|
|
2388
|
-
if (!Array.isArray(
|
|
2389
|
-
throw new
|
|
2390
|
-
if (!
|
|
2391
|
-
throw new
|
|
2392
|
-
const r =
|
|
2382
|
+
function Fi(t, e, s) {
|
|
2383
|
+
if (!Array.isArray(t))
|
|
2384
|
+
throw new U("UI diff changes must be an array");
|
|
2385
|
+
if (!R(e))
|
|
2386
|
+
throw new U("UI diff metadata must be an object");
|
|
2387
|
+
const r = e.viewId;
|
|
2393
2388
|
if (typeof r != "string" || r.length === 0)
|
|
2394
|
-
throw new
|
|
2395
|
-
const n =
|
|
2396
|
-
(a,
|
|
2397
|
-
), i = typeof
|
|
2389
|
+
throw new U("UI diff metadata is missing viewId");
|
|
2390
|
+
const n = t.map(
|
|
2391
|
+
(a, h) => gi(a ?? {}, `changes[${h}]`)
|
|
2392
|
+
), i = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0, o = {
|
|
2398
2393
|
viewId: r,
|
|
2399
2394
|
...i !== void 0 ? { isUpdate: i } : {}
|
|
2400
2395
|
};
|
|
@@ -2405,50 +2400,50 @@ function pi(e, t, s) {
|
|
|
2405
2400
|
metadata: o
|
|
2406
2401
|
};
|
|
2407
2402
|
}
|
|
2408
|
-
function
|
|
2409
|
-
const s =
|
|
2403
|
+
function Pi(t, e) {
|
|
2404
|
+
const s = t.viewId;
|
|
2410
2405
|
if (typeof s != "string" || s.length === 0)
|
|
2411
|
-
throw new
|
|
2412
|
-
let r = s, n = typeof
|
|
2413
|
-
return
|
|
2406
|
+
throw new U("UI update root is missing viewId");
|
|
2407
|
+
let r = s, n = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0;
|
|
2408
|
+
return R(e) && (typeof e.viewId == "string" && e.viewId.length > 0 && (r = e.viewId), typeof e.isUpdate == "boolean" && (n = e.isUpdate)), {
|
|
2414
2409
|
viewId: r,
|
|
2415
2410
|
...n !== void 0 ? { isUpdate: n } : {}
|
|
2416
2411
|
};
|
|
2417
2412
|
}
|
|
2418
|
-
class
|
|
2419
|
-
constructor(
|
|
2420
|
-
super(
|
|
2413
|
+
class U extends Error {
|
|
2414
|
+
constructor(e, s) {
|
|
2415
|
+
super(e), this.causeError = s, this.name = "UiUpdateParseError", s instanceof Error && (this.stack = s.stack);
|
|
2421
2416
|
}
|
|
2422
2417
|
}
|
|
2423
|
-
function
|
|
2424
|
-
let
|
|
2418
|
+
function le(t) {
|
|
2419
|
+
let e;
|
|
2425
2420
|
try {
|
|
2426
|
-
|
|
2421
|
+
e = JSON.parse(t.Json);
|
|
2427
2422
|
} catch (o) {
|
|
2428
|
-
throw new
|
|
2423
|
+
throw new U("Failed to parse UIUpdate.Json payload", o);
|
|
2429
2424
|
}
|
|
2430
|
-
if (!
|
|
2431
|
-
throw new
|
|
2432
|
-
const { type: s, version: r } =
|
|
2425
|
+
if (!e || typeof e != "object")
|
|
2426
|
+
throw new U("UI update snapshot must be an object");
|
|
2427
|
+
const { type: s, version: r } = e;
|
|
2433
2428
|
if (s !== "full" && s !== "diff")
|
|
2434
|
-
throw new
|
|
2429
|
+
throw new U(`Unknown UI update type: ${String(s)}`);
|
|
2435
2430
|
if (typeof r != "number")
|
|
2436
|
-
throw new
|
|
2437
|
-
const n = s === "full" ?
|
|
2431
|
+
throw new U("UI update version must be a number");
|
|
2432
|
+
const n = s === "full" ? bi(e.graph, e.metadata, r) : Fi(e.changes, e.metadata, r), i = t.Payloads ? pi(t.Payloads) : /* @__PURE__ */ new Map();
|
|
2438
2433
|
return {
|
|
2439
2434
|
snapshot: n,
|
|
2440
2435
|
payloads: i
|
|
2441
2436
|
};
|
|
2442
2437
|
}
|
|
2443
|
-
class
|
|
2438
|
+
class ki {
|
|
2444
2439
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2445
2440
|
cache = /* @__PURE__ */ new Map();
|
|
2446
2441
|
/**
|
|
2447
2442
|
* Get a cached void handler (no payload) for a node/action combination.
|
|
2448
2443
|
* Creates and caches the handler if it doesn't exist.
|
|
2449
2444
|
*/
|
|
2450
|
-
getHandler(
|
|
2451
|
-
const n = `${
|
|
2445
|
+
getHandler(e, s, r) {
|
|
2446
|
+
const n = `${e}:${s}`;
|
|
2452
2447
|
let i = this.cache.get(n);
|
|
2453
2448
|
return i || (i = () => r(s), this.cache.set(n, i)), i;
|
|
2454
2449
|
}
|
|
@@ -2456,40 +2451,40 @@ class Mi {
|
|
|
2456
2451
|
* Get a cached handler that accepts a payload.
|
|
2457
2452
|
* Creates and caches the handler if it doesn't exist.
|
|
2458
2453
|
*/
|
|
2459
|
-
getHandlerWithPayload(
|
|
2460
|
-
const n = `${
|
|
2454
|
+
getHandlerWithPayload(e, s, r) {
|
|
2455
|
+
const n = `${e}:${s}:payload`;
|
|
2461
2456
|
let i = this.cache.get(n);
|
|
2462
2457
|
return i || (i = (o) => r(s, o), this.cache.set(n, i)), i;
|
|
2463
2458
|
}
|
|
2464
2459
|
/**
|
|
2465
2460
|
* Get a cached handler for boolean payloads.
|
|
2466
2461
|
*/
|
|
2467
|
-
getBooleanHandler(
|
|
2468
|
-
return this.getHandlerWithPayload(
|
|
2462
|
+
getBooleanHandler(e, s, r) {
|
|
2463
|
+
return this.getHandlerWithPayload(e, s, r);
|
|
2469
2464
|
}
|
|
2470
2465
|
/**
|
|
2471
2466
|
* Get a cached handler for string payloads.
|
|
2472
2467
|
*/
|
|
2473
|
-
getStringHandler(
|
|
2474
|
-
return this.getHandlerWithPayload(
|
|
2468
|
+
getStringHandler(e, s, r) {
|
|
2469
|
+
return this.getHandlerWithPayload(e, s, r);
|
|
2475
2470
|
}
|
|
2476
2471
|
/**
|
|
2477
2472
|
* Get a cached handler for number payloads.
|
|
2478
2473
|
*/
|
|
2479
|
-
getNumberHandler(
|
|
2480
|
-
return this.getHandlerWithPayload(
|
|
2474
|
+
getNumberHandler(e, s, r) {
|
|
2475
|
+
return this.getHandlerWithPayload(e, s, r);
|
|
2481
2476
|
}
|
|
2482
2477
|
/**
|
|
2483
2478
|
* Get a cached handler for number array payloads.
|
|
2484
2479
|
*/
|
|
2485
|
-
getNumberArrayHandler(
|
|
2486
|
-
return this.getHandlerWithPayload(
|
|
2480
|
+
getNumberArrayHandler(e, s, r) {
|
|
2481
|
+
return this.getHandlerWithPayload(e, s, r);
|
|
2487
2482
|
}
|
|
2488
2483
|
/**
|
|
2489
2484
|
* Get a cached handler for nullable boolean payloads.
|
|
2490
2485
|
*/
|
|
2491
|
-
getNullableBooleanHandler(
|
|
2492
|
-
const n = `${
|
|
2486
|
+
getNullableBooleanHandler(e, s, r) {
|
|
2487
|
+
const n = `${e}:${s}:nullable-bool`;
|
|
2493
2488
|
let i = this.cache.get(n);
|
|
2494
2489
|
return i || (i = (o) => r(s, o ?? null), this.cache.set(n, i)), i;
|
|
2495
2490
|
}
|
|
@@ -2497,16 +2492,16 @@ class Mi {
|
|
|
2497
2492
|
* Invalidate all cached handlers for a specific node.
|
|
2498
2493
|
* Call this when a node is removed from the tree.
|
|
2499
2494
|
*/
|
|
2500
|
-
invalidateNode(
|
|
2501
|
-
const s = `${
|
|
2495
|
+
invalidateNode(e) {
|
|
2496
|
+
const s = `${e}:`;
|
|
2502
2497
|
for (const r of this.cache.keys())
|
|
2503
2498
|
r.startsWith(s) && this.cache.delete(r);
|
|
2504
2499
|
}
|
|
2505
2500
|
/**
|
|
2506
2501
|
* Invalidate a specific handler.
|
|
2507
2502
|
*/
|
|
2508
|
-
invalidateHandler(
|
|
2509
|
-
this.cache.delete(`${
|
|
2503
|
+
invalidateHandler(e, s) {
|
|
2504
|
+
this.cache.delete(`${e}:${s}`), this.cache.delete(`${e}:${s}:payload`), this.cache.delete(`${e}:${s}:nullable-bool`);
|
|
2510
2505
|
}
|
|
2511
2506
|
/**
|
|
2512
2507
|
* Clear all cached handlers.
|
|
@@ -2522,7 +2517,7 @@ class Mi {
|
|
|
2522
2517
|
}
|
|
2523
2518
|
}
|
|
2524
2519
|
const vi = Z("UiStreamStore");
|
|
2525
|
-
class
|
|
2520
|
+
class Mi {
|
|
2526
2521
|
views = /* @__PURE__ */ new Map();
|
|
2527
2522
|
listeners = /* @__PURE__ */ new Set();
|
|
2528
2523
|
payloads = /* @__PURE__ */ new Map();
|
|
@@ -2547,7 +2542,7 @@ class Bi {
|
|
|
2547
2542
|
viewsDirty = !0;
|
|
2548
2543
|
payloadsDirty = !0;
|
|
2549
2544
|
// Handler cache for stable event handlers
|
|
2550
|
-
handlerCache = new
|
|
2545
|
+
handlerCache = new ki();
|
|
2551
2546
|
// id -> node lookup index for O(1) getNode. Rebuilt lazily from the committed snapshot's view
|
|
2552
2547
|
// trees. Node trees are immutable (a change replaces every node on the changed path with a new
|
|
2553
2548
|
// object and yields a new views Map), so the index is valid exactly while it points at the same
|
|
@@ -2555,9 +2550,9 @@ class Bi {
|
|
|
2555
2550
|
// covers every mutation path (apply, replaceSnapshot, patchFromOp, clear) without touching them.
|
|
2556
2551
|
nodeIndex = /* @__PURE__ */ new Map();
|
|
2557
2552
|
indexedViews;
|
|
2558
|
-
apply(
|
|
2553
|
+
apply(e) {
|
|
2559
2554
|
if (this.snapshotMode) {
|
|
2560
|
-
if (
|
|
2555
|
+
if (e.snapshot.type !== "full")
|
|
2561
2556
|
return !1;
|
|
2562
2557
|
this.snapshotMode = !1, this.views.clear(), this.payloads.clear(), this.rootViewId = void 0, this.viewsDirty = !0, this.payloadsDirty = !0, this.snapshot = {
|
|
2563
2558
|
views: /* @__PURE__ */ new Map(),
|
|
@@ -2565,7 +2560,7 @@ class Bi {
|
|
|
2565
2560
|
version: -1
|
|
2566
2561
|
};
|
|
2567
2562
|
}
|
|
2568
|
-
const { snapshot: s, payloads: r } =
|
|
2563
|
+
const { snapshot: s, payloads: r } = e, { metadata: n } = s, { viewId: i } = n;
|
|
2569
2564
|
let o = this.views.get(i);
|
|
2570
2565
|
o || (o = {
|
|
2571
2566
|
version: 0
|
|
@@ -2577,20 +2572,20 @@ class Bi {
|
|
|
2577
2572
|
return this.resyncNeeded = !0, !1;
|
|
2578
2573
|
if (s.version === o.version && !a)
|
|
2579
2574
|
return !1;
|
|
2580
|
-
let
|
|
2581
|
-
this.rootViewId || (this.rootViewId = i,
|
|
2582
|
-
const
|
|
2575
|
+
let h = !1;
|
|
2576
|
+
this.rootViewId || (this.rootViewId = i, h = !0, this.structureChanged = !0);
|
|
2577
|
+
const E = o.root;
|
|
2583
2578
|
if (s.type === "full")
|
|
2584
|
-
o.root = s.root, o.version = s.version,
|
|
2579
|
+
o.root = s.root, o.version = s.version, h = !0, this.viewsDirty = !0, this.structureChanged = !0, s.root && G(s.root, this.changedNodeIds);
|
|
2585
2580
|
else {
|
|
2586
|
-
if (!
|
|
2581
|
+
if (!E)
|
|
2587
2582
|
return this.resyncNeeded = !0, !1;
|
|
2588
|
-
const l =
|
|
2589
|
-
l !==
|
|
2583
|
+
const l = Bi(E, s.changes);
|
|
2584
|
+
l !== E ? (o.root = l, h = !0, this.viewsDirty = !0, X(E, l, this.changedNodeIds)) : o.root = l, o.version = s.version;
|
|
2590
2585
|
}
|
|
2591
|
-
for (const [l,
|
|
2592
|
-
this.payloads.get(l) !==
|
|
2593
|
-
return
|
|
2586
|
+
for (const [l, I] of r)
|
|
2587
|
+
this.payloads.get(l) !== I && (this.payloads.set(l, I), h = !0, this.payloadsDirty = !0);
|
|
2588
|
+
return h ? (this.commitSnapshot(), this.notify(), !0) : (o.version = s.version, !1);
|
|
2594
2589
|
}
|
|
2595
2590
|
// Ignore further diffs (keeping the current tree visible) until the next full snapshot arrives,
|
|
2596
2591
|
// which then replaces the tree wholesale. Used on soft reconnect: the cached tree may be missing
|
|
@@ -2601,66 +2596,66 @@ class Bi {
|
|
|
2601
2596
|
}
|
|
2602
2597
|
// Returns whether a diff was dropped as unrecoverable since the last call, clearing the flag.
|
|
2603
2598
|
consumeResyncNeeded() {
|
|
2604
|
-
const
|
|
2605
|
-
return this.resyncNeeded = !1,
|
|
2599
|
+
const e = this.resyncNeeded;
|
|
2600
|
+
return this.resyncNeeded = !1, e;
|
|
2606
2601
|
}
|
|
2607
|
-
replaceFromWire(
|
|
2602
|
+
replaceFromWire(e) {
|
|
2608
2603
|
const s = {
|
|
2609
|
-
rootViewId:
|
|
2610
|
-
views: new Map(
|
|
2611
|
-
payloads: new Map(
|
|
2612
|
-
version:
|
|
2604
|
+
rootViewId: e.rootViewId,
|
|
2605
|
+
views: new Map(e.views),
|
|
2606
|
+
payloads: new Map(e.payloads),
|
|
2607
|
+
version: e.version
|
|
2613
2608
|
};
|
|
2614
2609
|
return this.replaceSnapshot(s);
|
|
2615
2610
|
}
|
|
2616
|
-
patchFromOp(
|
|
2611
|
+
patchFromOp(e) {
|
|
2617
2612
|
this.snapshotMode = !0;
|
|
2618
|
-
const s =
|
|
2613
|
+
const s = e.expectedBaseVersion;
|
|
2619
2614
|
if (s !== void 0 && this.snapshot.version !== s)
|
|
2620
2615
|
return !1;
|
|
2621
2616
|
let r = !1, n = null, i = null;
|
|
2622
2617
|
const o = () => (n || (n = new Map(this.snapshot.views)), n), a = () => (i || (i = new Map(this.snapshot.payloads)), i);
|
|
2623
|
-
if (
|
|
2624
|
-
for (const l of
|
|
2618
|
+
if (e.deleteViews && e.deleteViews.length > 0)
|
|
2619
|
+
for (const l of e.deleteViews)
|
|
2625
2620
|
o().delete(l) && (r = !0, this.structureChanged = !0);
|
|
2626
|
-
if (
|
|
2627
|
-
for (const [l,
|
|
2628
|
-
const
|
|
2629
|
-
S !==
|
|
2621
|
+
if (e.upsertViews && e.upsertViews.length > 0)
|
|
2622
|
+
for (const [l, I] of e.upsertViews) {
|
|
2623
|
+
const u = o(), S = u.get(l);
|
|
2624
|
+
S !== I && (u.set(l, I), r = !0, S ? X(S, I, this.changedNodeIds) : (G(I, this.changedNodeIds), this.structureChanged = !0));
|
|
2630
2625
|
}
|
|
2631
|
-
if (
|
|
2632
|
-
for (const l of
|
|
2626
|
+
if (e.deletePayloads && e.deletePayloads.length > 0)
|
|
2627
|
+
for (const l of e.deletePayloads)
|
|
2633
2628
|
a().delete(l) && (r = !0);
|
|
2634
|
-
if (
|
|
2635
|
-
for (const [l,
|
|
2636
|
-
const
|
|
2637
|
-
|
|
2638
|
-
}
|
|
2639
|
-
const
|
|
2640
|
-
|
|
2641
|
-
const
|
|
2642
|
-
if (
|
|
2643
|
-
return this.snapshot = { ...this.snapshot, version:
|
|
2629
|
+
if (e.upsertPayloads && e.upsertPayloads.length > 0)
|
|
2630
|
+
for (const [l, I] of e.upsertPayloads) {
|
|
2631
|
+
const u = a();
|
|
2632
|
+
u.get(l) !== I && (u.set(l, I), r = !0);
|
|
2633
|
+
}
|
|
2634
|
+
const h = e.rootViewId ?? this.snapshot.rootViewId;
|
|
2635
|
+
h !== this.snapshot.rootViewId && (r = !0, this.structureChanged = !0);
|
|
2636
|
+
const E = e.nextVersion;
|
|
2637
|
+
if (E !== this.snapshot.version && (r = !0), !r)
|
|
2638
|
+
return this.snapshot = { ...this.snapshot, version: E }, !1;
|
|
2644
2639
|
for (const l of this.changedNodeIds)
|
|
2645
2640
|
this.nodeVersions.set(l, (this.nodeVersions.get(l) ?? 0) + 1);
|
|
2646
2641
|
return this.snapshot = {
|
|
2647
|
-
rootViewId:
|
|
2642
|
+
rootViewId: h,
|
|
2648
2643
|
views: n ?? new Map(this.snapshot.views),
|
|
2649
2644
|
payloads: i ?? new Map(this.snapshot.payloads),
|
|
2650
|
-
version:
|
|
2645
|
+
version: E
|
|
2651
2646
|
}, this.notify(), !0;
|
|
2652
2647
|
}
|
|
2653
|
-
replaceSnapshot(
|
|
2648
|
+
replaceSnapshot(e) {
|
|
2654
2649
|
this.snapshotMode = !0;
|
|
2655
|
-
const s = this.snapshot, r = s.version !==
|
|
2656
|
-
(s.rootViewId !==
|
|
2657
|
-
for (const [n, i] of
|
|
2650
|
+
const s = this.snapshot, r = s.version !== e.version || s.rootViewId !== e.rootViewId || s.views.size !== e.views.size || s.payloads.size !== e.payloads.size;
|
|
2651
|
+
(s.rootViewId !== e.rootViewId || s.views.size !== e.views.size) && (this.structureChanged = !0);
|
|
2652
|
+
for (const [n, i] of e.views) {
|
|
2658
2653
|
const o = s.views.get(n);
|
|
2659
|
-
o ?
|
|
2654
|
+
o ? X(o, i, this.changedNodeIds) : (G(i, this.changedNodeIds), this.structureChanged = !0);
|
|
2660
2655
|
}
|
|
2661
2656
|
for (const n of this.changedNodeIds)
|
|
2662
2657
|
this.nodeVersions.set(n, (this.nodeVersions.get(n) ?? 0) + 1);
|
|
2663
|
-
return this.snapshot =
|
|
2658
|
+
return this.snapshot = e, r && this.notify(), r;
|
|
2664
2659
|
}
|
|
2665
2660
|
clear() {
|
|
2666
2661
|
(this.snapshot.rootViewId === void 0 || this.snapshot.rootViewId.length === 0) && this.snapshot.views.size === 0 && this.snapshot.payloads.size === 0 || (this.snapshotMode = !0, this.views.clear(), this.payloads.clear(), this.rootViewId = void 0, this.viewsDirty = !0, this.payloadsDirty = !0, this.snapshot = {
|
|
@@ -2672,39 +2667,39 @@ class Bi {
|
|
|
2672
2667
|
getSnapshot() {
|
|
2673
2668
|
return this.snapshot;
|
|
2674
2669
|
}
|
|
2675
|
-
subscribe(
|
|
2676
|
-
return this.listeners.add(
|
|
2677
|
-
this.listeners.delete(
|
|
2670
|
+
subscribe(e) {
|
|
2671
|
+
return this.listeners.add(e), () => {
|
|
2672
|
+
this.listeners.delete(e);
|
|
2678
2673
|
};
|
|
2679
2674
|
}
|
|
2680
|
-
subscribeNode(
|
|
2681
|
-
let r = this.nodeListeners.get(
|
|
2682
|
-
return r || (r = /* @__PURE__ */ new Set(), this.nodeListeners.set(
|
|
2683
|
-
r && (r.delete(s), r.size === 0 && this.nodeListeners.delete(
|
|
2675
|
+
subscribeNode(e, s) {
|
|
2676
|
+
let r = this.nodeListeners.get(e);
|
|
2677
|
+
return r || (r = /* @__PURE__ */ new Set(), this.nodeListeners.set(e, r)), r.add(s), () => {
|
|
2678
|
+
r && (r.delete(s), r.size === 0 && this.nodeListeners.delete(e));
|
|
2684
2679
|
};
|
|
2685
2680
|
}
|
|
2686
|
-
getNode(
|
|
2681
|
+
getNode(e) {
|
|
2687
2682
|
const s = this.snapshot.views;
|
|
2688
|
-
return this.indexedViews !== s && this.rebuildNodeIndex(s), this.nodeIndex.get(
|
|
2683
|
+
return this.indexedViews !== s && this.rebuildNodeIndex(s), this.nodeIndex.get(e);
|
|
2689
2684
|
}
|
|
2690
|
-
rebuildNodeIndex(
|
|
2685
|
+
rebuildNodeIndex(e) {
|
|
2691
2686
|
this.nodeIndex.clear();
|
|
2692
|
-
for (const s of
|
|
2693
|
-
|
|
2694
|
-
for (const [s, r] of
|
|
2687
|
+
for (const s of e.values())
|
|
2688
|
+
Ze(s, this.nodeIndex);
|
|
2689
|
+
for (const [s, r] of e)
|
|
2695
2690
|
this.nodeIndex.set(s, r);
|
|
2696
|
-
this.indexedViews =
|
|
2691
|
+
this.indexedViews = e;
|
|
2697
2692
|
}
|
|
2698
|
-
getNodeVersion(
|
|
2699
|
-
return this.nodeVersions.get(
|
|
2693
|
+
getNodeVersion(e) {
|
|
2694
|
+
return this.nodeVersions.get(e) ?? 0;
|
|
2700
2695
|
}
|
|
2701
2696
|
notifyNodes() {
|
|
2702
2697
|
if (this.changedNodeIds.size === 0 || this.nodeListeners.size === 0) {
|
|
2703
2698
|
this.changedNodeIds.clear();
|
|
2704
2699
|
return;
|
|
2705
2700
|
}
|
|
2706
|
-
for (const
|
|
2707
|
-
const s = this.nodeListeners.get(
|
|
2701
|
+
for (const e of this.changedNodeIds) {
|
|
2702
|
+
const s = this.nodeListeners.get(e);
|
|
2708
2703
|
if (s)
|
|
2709
2704
|
for (const r of s)
|
|
2710
2705
|
r();
|
|
@@ -2712,14 +2707,14 @@ class Bi {
|
|
|
2712
2707
|
this.changedNodeIds.clear();
|
|
2713
2708
|
}
|
|
2714
2709
|
commitSnapshot() {
|
|
2715
|
-
let
|
|
2710
|
+
let e, s;
|
|
2716
2711
|
if (this.viewsDirty) {
|
|
2717
2712
|
const n = /* @__PURE__ */ new Map();
|
|
2718
2713
|
for (const [i, o] of this.views)
|
|
2719
2714
|
o.root && n.set(i, o.root);
|
|
2720
|
-
|
|
2715
|
+
e = n, this.viewsDirty = !1;
|
|
2721
2716
|
} else
|
|
2722
|
-
|
|
2717
|
+
e = this.snapshot.views;
|
|
2723
2718
|
this.payloadsDirty ? (s = new Map(this.payloads), this.payloadsDirty = !1) : s = this.snapshot.payloads;
|
|
2724
2719
|
let r = this.rootViewId && this.views.has(this.rootViewId) ? this.views.get(this.rootViewId)?.version : void 0;
|
|
2725
2720
|
if (r === void 0)
|
|
@@ -2727,7 +2722,7 @@ class Bi {
|
|
|
2727
2722
|
r = r === void 0 ? n.version : Math.max(r, n.version);
|
|
2728
2723
|
this.snapshot = {
|
|
2729
2724
|
rootViewId: this.rootViewId,
|
|
2730
|
-
views:
|
|
2725
|
+
views: e,
|
|
2731
2726
|
payloads: s,
|
|
2732
2727
|
version: r
|
|
2733
2728
|
};
|
|
@@ -2737,339 +2732,339 @@ class Bi {
|
|
|
2737
2732
|
notify() {
|
|
2738
2733
|
if (this.notifyNodes(), this.structureChanged) {
|
|
2739
2734
|
this.structureChanged = !1;
|
|
2740
|
-
for (const
|
|
2741
|
-
|
|
2735
|
+
for (const e of this.listeners)
|
|
2736
|
+
e();
|
|
2742
2737
|
}
|
|
2743
2738
|
}
|
|
2744
2739
|
}
|
|
2745
2740
|
class Vi {
|
|
2746
2741
|
streams = /* @__PURE__ */ new Map();
|
|
2747
2742
|
listeners = /* @__PURE__ */ new Set();
|
|
2748
|
-
apply(
|
|
2749
|
-
const n = this.getOrCreateStreamEntry(
|
|
2750
|
-
return n && this.notify(
|
|
2743
|
+
apply(e, s) {
|
|
2744
|
+
const n = this.getOrCreateStreamEntry(e).store.apply(s);
|
|
2745
|
+
return n && this.notify(e), n;
|
|
2751
2746
|
}
|
|
2752
2747
|
// Whether the given stream dropped an unrecoverable diff since the last check (clears the flag).
|
|
2753
|
-
needsResync(
|
|
2754
|
-
const s = this.streams.get(
|
|
2748
|
+
needsResync(e) {
|
|
2749
|
+
const s = this.streams.get(e);
|
|
2755
2750
|
return s ? s.store.consumeResyncNeeded() : !1;
|
|
2756
2751
|
}
|
|
2757
|
-
applyStoreOp(
|
|
2758
|
-
if (
|
|
2759
|
-
const s = this.getOrCreateStreamEntry(
|
|
2760
|
-
return s.category =
|
|
2752
|
+
applyStoreOp(e) {
|
|
2753
|
+
if (e.type === "ReplaceStreamSnapshot") {
|
|
2754
|
+
const s = this.getOrCreateStreamEntry(e.snapshot.streamId), r = s.category !== e.snapshot.category;
|
|
2755
|
+
return s.category = e.snapshot.category, s.store.replaceFromWire(e.snapshot) || r ? (this.notify(e.snapshot.streamId), !0) : !1;
|
|
2761
2756
|
}
|
|
2762
|
-
if (
|
|
2763
|
-
const s = this.getOrCreateStreamEntry(
|
|
2764
|
-
return
|
|
2757
|
+
if (e.type === "PatchStreamSnapshot") {
|
|
2758
|
+
const s = this.getOrCreateStreamEntry(e.streamId), r = e.category !== void 0 && s.category !== e.category;
|
|
2759
|
+
return e.category !== void 0 && (s.category = e.category), s.store.patchFromOp(e) || r ? (this.notify(e.streamId), !0) : !1;
|
|
2765
2760
|
}
|
|
2766
|
-
if (
|
|
2767
|
-
const s = this.streams.get(
|
|
2768
|
-
return s ? (s.store.clear(), this.notify(
|
|
2761
|
+
if (e.type === "ClearStream") {
|
|
2762
|
+
const s = this.streams.get(e.streamId);
|
|
2763
|
+
return s ? (s.store.clear(), this.notify(e.streamId), !0) : !1;
|
|
2769
2764
|
}
|
|
2770
|
-
return
|
|
2765
|
+
return e.type === "RemoveStream" ? this.streams.delete(e.streamId) ? (this.notify(e.streamId), !0) : !1 : e.type === "SetStreamCategory" ? (this.setCategory(e.streamId, e.category), !0) : !1;
|
|
2771
2766
|
}
|
|
2772
|
-
applyStoreOps(
|
|
2773
|
-
for (const s of
|
|
2767
|
+
applyStoreOps(e) {
|
|
2768
|
+
for (const s of e)
|
|
2774
2769
|
this.applyStoreOp(s);
|
|
2775
2770
|
}
|
|
2776
|
-
clear(
|
|
2777
|
-
const s = this.streams.get(
|
|
2778
|
-
s && (s.store.clear(), this.notify(
|
|
2771
|
+
clear(e) {
|
|
2772
|
+
const s = this.streams.get(e);
|
|
2773
|
+
s && (s.store.clear(), this.notify(e));
|
|
2779
2774
|
}
|
|
2780
|
-
remove(
|
|
2781
|
-
this.streams.delete(
|
|
2775
|
+
remove(e) {
|
|
2776
|
+
this.streams.delete(e) && this.notify(e);
|
|
2782
2777
|
}
|
|
2783
2778
|
// Puts every existing stream into snapshot mode (see UiStreamStore.enterSnapshotMode) so each one
|
|
2784
2779
|
// keeps its current tree visible and ignores diffs until the server's next full snapshot resyncs it.
|
|
2785
2780
|
enterSnapshotModeAll() {
|
|
2786
|
-
for (const
|
|
2787
|
-
|
|
2781
|
+
for (const e of this.streams.values())
|
|
2782
|
+
e.store.enterSnapshotMode();
|
|
2788
2783
|
}
|
|
2789
|
-
setCategory(
|
|
2790
|
-
const r = this.getOrCreateStreamEntry(
|
|
2791
|
-
r.category !== s && (r.category = s, this.notify(
|
|
2784
|
+
setCategory(e, s) {
|
|
2785
|
+
const r = this.getOrCreateStreamEntry(e);
|
|
2786
|
+
r.category !== s && (r.category = s, this.notify(e));
|
|
2792
2787
|
}
|
|
2793
|
-
getSnapshot(
|
|
2794
|
-
const s = this.streams.get(
|
|
2788
|
+
getSnapshot(e) {
|
|
2789
|
+
const s = this.streams.get(e);
|
|
2795
2790
|
return s ? {
|
|
2796
2791
|
...s.store.getSnapshot(),
|
|
2797
|
-
streamId:
|
|
2792
|
+
streamId: e,
|
|
2798
2793
|
category: s.category
|
|
2799
2794
|
} : void 0;
|
|
2800
2795
|
}
|
|
2801
2796
|
getSnapshots() {
|
|
2802
|
-
const
|
|
2797
|
+
const e = [];
|
|
2803
2798
|
for (const [s, r] of this.streams) {
|
|
2804
2799
|
const n = r.store.getSnapshot();
|
|
2805
|
-
|
|
2800
|
+
e.push({
|
|
2806
2801
|
...n,
|
|
2807
2802
|
streamId: s,
|
|
2808
2803
|
category: r.category
|
|
2809
2804
|
});
|
|
2810
2805
|
}
|
|
2811
|
-
return
|
|
2806
|
+
return e;
|
|
2812
2807
|
}
|
|
2813
|
-
subscribe(
|
|
2814
|
-
return this.listeners.add(
|
|
2815
|
-
this.listeners.delete(
|
|
2808
|
+
subscribe(e) {
|
|
2809
|
+
return this.listeners.add(e), () => {
|
|
2810
|
+
this.listeners.delete(e);
|
|
2816
2811
|
};
|
|
2817
2812
|
}
|
|
2818
|
-
getOrCreateStreamEntry(
|
|
2819
|
-
let s = this.streams.get(
|
|
2820
|
-
return s || (s = { store: new
|
|
2813
|
+
getOrCreateStreamEntry(e) {
|
|
2814
|
+
let s = this.streams.get(e);
|
|
2815
|
+
return s || (s = { store: new Mi() }, this.streams.set(e, s)), s;
|
|
2821
2816
|
}
|
|
2822
|
-
notify(
|
|
2817
|
+
notify(e) {
|
|
2823
2818
|
for (const s of this.listeners)
|
|
2824
|
-
s(
|
|
2819
|
+
s(e);
|
|
2825
2820
|
}
|
|
2826
2821
|
}
|
|
2827
|
-
function
|
|
2828
|
-
if (
|
|
2829
|
-
return
|
|
2822
|
+
function Bi(t, e, s) {
|
|
2823
|
+
if (e.length === 0)
|
|
2824
|
+
return t;
|
|
2830
2825
|
const r = /* @__PURE__ */ new Map();
|
|
2831
|
-
for (const n of
|
|
2826
|
+
for (const n of e)
|
|
2832
2827
|
r.set(n.nodeId, n);
|
|
2833
|
-
return
|
|
2828
|
+
return Qe(t, r, s);
|
|
2834
2829
|
}
|
|
2835
|
-
function
|
|
2836
|
-
const r =
|
|
2837
|
-
let n =
|
|
2830
|
+
function Qe(t, e, s) {
|
|
2831
|
+
const r = e.get(t.id);
|
|
2832
|
+
let n = t, i = !1;
|
|
2838
2833
|
if (r?.textUpdates && r.textUpdates.length > 0) {
|
|
2839
|
-
const
|
|
2840
|
-
n =
|
|
2834
|
+
const c = Hi(t, r.textUpdates);
|
|
2835
|
+
n = c.node, i = c.changed;
|
|
2841
2836
|
}
|
|
2842
2837
|
let o = !1, a = n.props;
|
|
2843
2838
|
if (r?.changedProps && r.changedProps.size > 0)
|
|
2844
|
-
for (const [
|
|
2845
|
-
const
|
|
2839
|
+
for (const [c, w] of r.changedProps.entries()) {
|
|
2840
|
+
const D = a[c];
|
|
2846
2841
|
if (w === void 0)
|
|
2847
|
-
(
|
|
2842
|
+
(D !== void 0 || c in a) && (o || (a = B(a), o = !0), delete a[c]);
|
|
2848
2843
|
else if (Q(w)) {
|
|
2849
|
-
const f =
|
|
2850
|
-
k(f,
|
|
2844
|
+
const f = B(w);
|
|
2845
|
+
k(f, D) || (o || (a = B(a), o = !0), a[c] = f);
|
|
2851
2846
|
} else
|
|
2852
|
-
k(w,
|
|
2847
|
+
k(w, D) || (o || (a = B(a), o = !0), a[c] = w);
|
|
2853
2848
|
}
|
|
2854
|
-
let
|
|
2855
|
-
r?.styleIds !== void 0 && (
|
|
2849
|
+
let h = !1, E = n.styleIds;
|
|
2850
|
+
r?.styleIds !== void 0 && (tt(n.styleIds, r.styleIds) || (E = r.styleIds, h = !0));
|
|
2856
2851
|
const l = n.children ?? [];
|
|
2857
|
-
let
|
|
2852
|
+
let I = l, u = !1;
|
|
2858
2853
|
if (r?.removals && r.removals.length > 0 || r?.moves && r.moves.length > 0 || r?.inserts && r.inserts.length > 0) {
|
|
2859
|
-
const
|
|
2854
|
+
const c = I.slice();
|
|
2860
2855
|
if (r?.removals && r.removals.length > 0) {
|
|
2861
|
-
const f = [...r.removals].sort((
|
|
2862
|
-
for (const
|
|
2863
|
-
if (
|
|
2864
|
-
|
|
2856
|
+
const f = [...r.removals].sort((d, b) => b.index - d.index);
|
|
2857
|
+
for (const d of f)
|
|
2858
|
+
if (d.index >= 0 && d.index < c.length && c[d.index].id === d.nodeId)
|
|
2859
|
+
c.splice(d.index, 1);
|
|
2865
2860
|
else {
|
|
2866
|
-
const
|
|
2867
|
-
|
|
2861
|
+
const b = c.findIndex((nt) => nt.id === d.nodeId);
|
|
2862
|
+
b >= 0 && c.splice(b, 1);
|
|
2868
2863
|
}
|
|
2869
|
-
|
|
2864
|
+
u = !0;
|
|
2870
2865
|
}
|
|
2871
2866
|
const w = /* @__PURE__ */ new Map();
|
|
2872
2867
|
if (r?.moves && r.moves.length > 0) {
|
|
2873
2868
|
for (const f of r.moves) {
|
|
2874
|
-
const
|
|
2875
|
-
|
|
2869
|
+
const d = c.findIndex((b) => b.id === f.nodeId);
|
|
2870
|
+
d >= 0 && (w.set(f.nodeId, c[d]), c.splice(d, 1));
|
|
2876
2871
|
}
|
|
2877
|
-
|
|
2872
|
+
u = !0;
|
|
2878
2873
|
}
|
|
2879
|
-
const
|
|
2874
|
+
const D = [];
|
|
2880
2875
|
if (r?.moves)
|
|
2881
2876
|
for (const f of r.moves) {
|
|
2882
|
-
const
|
|
2883
|
-
|
|
2877
|
+
const d = w.get(f.nodeId);
|
|
2878
|
+
d && D.push({ index: f.toIndex, node: d, isInsert: !1 });
|
|
2884
2879
|
}
|
|
2885
2880
|
if (r?.inserts) {
|
|
2886
2881
|
for (const f of r.inserts)
|
|
2887
|
-
(
|
|
2888
|
-
|
|
2882
|
+
(c.some((d) => d.id === f.node.id) || w.has(f.node.id)) && vi.warn(`Duplicate node id '${f.node.id}' (type '${f.node.type}') inserted next to an existing sibling — UI tree diverged from the server`), D.push({ index: f.index, node: f.node, isInsert: !0 });
|
|
2883
|
+
u = !0;
|
|
2889
2884
|
}
|
|
2890
|
-
|
|
2891
|
-
for (const f of
|
|
2892
|
-
const
|
|
2893
|
-
|
|
2885
|
+
D.sort((f, d) => f.index - d.index);
|
|
2886
|
+
for (const f of D) {
|
|
2887
|
+
const d = Math.min(f.index, c.length);
|
|
2888
|
+
c.splice(d, 0, f.node), f.isInsert;
|
|
2894
2889
|
}
|
|
2895
|
-
|
|
2890
|
+
I = c;
|
|
2896
2891
|
}
|
|
2897
|
-
let
|
|
2898
|
-
for (let
|
|
2899
|
-
const w =
|
|
2900
|
-
|
|
2892
|
+
let y;
|
|
2893
|
+
for (let c = 0; c < I.length; c++) {
|
|
2894
|
+
const w = I[c], D = Qe(w, e, s);
|
|
2895
|
+
D !== w && (y || (y = I.slice()), y[c] = D);
|
|
2901
2896
|
}
|
|
2902
|
-
return
|
|
2903
|
-
id:
|
|
2904
|
-
type:
|
|
2897
|
+
return y && (I = y, u = !0), i || o || h || u ? !o && !u && !h ? n : {
|
|
2898
|
+
id: t.id,
|
|
2899
|
+
type: t.type,
|
|
2905
2900
|
props: o ? a : n.props,
|
|
2906
|
-
children:
|
|
2907
|
-
styleIds:
|
|
2908
|
-
...
|
|
2909
|
-
} :
|
|
2910
|
-
}
|
|
2911
|
-
function G(
|
|
2912
|
-
if (
|
|
2913
|
-
for (const s of
|
|
2914
|
-
G(s,
|
|
2915
|
-
}
|
|
2916
|
-
function
|
|
2917
|
-
if (
|
|
2918
|
-
for (const s of
|
|
2919
|
-
|
|
2920
|
-
}
|
|
2921
|
-
const
|
|
2922
|
-
function
|
|
2923
|
-
for (;
|
|
2924
|
-
|
|
2925
|
-
return
|
|
2926
|
-
}
|
|
2927
|
-
function
|
|
2928
|
-
|
|
2929
|
-
}
|
|
2930
|
-
function
|
|
2931
|
-
if (
|
|
2901
|
+
children: u ? I : l,
|
|
2902
|
+
styleIds: h ? E : n.styleIds,
|
|
2903
|
+
...t.sourceMarker ? { sourceMarker: t.sourceMarker } : {}
|
|
2904
|
+
} : t;
|
|
2905
|
+
}
|
|
2906
|
+
function G(t, e) {
|
|
2907
|
+
if (e.add(t.id), t.children)
|
|
2908
|
+
for (const s of t.children)
|
|
2909
|
+
G(s, e);
|
|
2910
|
+
}
|
|
2911
|
+
function Ze(t, e) {
|
|
2912
|
+
if (e.set(t.id, t), t.children)
|
|
2913
|
+
for (const s of t.children)
|
|
2914
|
+
Ze(s, e);
|
|
2915
|
+
}
|
|
2916
|
+
const H = [];
|
|
2917
|
+
function Gi(t) {
|
|
2918
|
+
for (; H.length <= t; )
|
|
2919
|
+
H.push(/* @__PURE__ */ new Map());
|
|
2920
|
+
return H[t].clear(), H[t];
|
|
2921
|
+
}
|
|
2922
|
+
function X(t, e, s) {
|
|
2923
|
+
et(t, e, s, 0);
|
|
2924
|
+
}
|
|
2925
|
+
function et(t, e, s, r) {
|
|
2926
|
+
if (t === e)
|
|
2932
2927
|
return;
|
|
2933
|
-
(
|
|
2934
|
-
const i =
|
|
2928
|
+
(t.type !== e.type || !xi(t.props, e.props) || !tt(t.styleIds, e.styleIds)) && s.add(e.id);
|
|
2929
|
+
const i = t.children ?? [], o = e.children ?? [];
|
|
2935
2930
|
if (i !== o) {
|
|
2936
|
-
const a =
|
|
2937
|
-
for (const
|
|
2938
|
-
a.set(
|
|
2939
|
-
let
|
|
2940
|
-
for (let
|
|
2941
|
-
const l = o[
|
|
2942
|
-
|
|
2931
|
+
const a = Gi(r);
|
|
2932
|
+
for (const E of i)
|
|
2933
|
+
a.set(E.id, E);
|
|
2934
|
+
let h = !1;
|
|
2935
|
+
for (let E = 0; E < o.length; E++) {
|
|
2936
|
+
const l = o[E], I = a.get(l.id);
|
|
2937
|
+
I ? (et(I, l, s, r + 1), !h && E < i.length && i[E].id !== l.id && (h = !0)) : (G(l, s), h = !0);
|
|
2943
2938
|
}
|
|
2944
|
-
(i.length !== o.length ||
|
|
2939
|
+
(i.length !== o.length || h) && s.add(e.id);
|
|
2945
2940
|
}
|
|
2946
2941
|
}
|
|
2947
|
-
function
|
|
2948
|
-
return k(
|
|
2942
|
+
function xi(t, e) {
|
|
2943
|
+
return k(t, e);
|
|
2949
2944
|
}
|
|
2950
|
-
function
|
|
2951
|
-
return k(
|
|
2945
|
+
function tt(t, e) {
|
|
2946
|
+
return k(t, e);
|
|
2952
2947
|
}
|
|
2953
|
-
function Yi(
|
|
2954
|
-
if (
|
|
2955
|
-
return
|
|
2956
|
-
const s = [...
|
|
2957
|
-
let r =
|
|
2948
|
+
function Yi(t, e) {
|
|
2949
|
+
if (e.length === 0)
|
|
2950
|
+
return t;
|
|
2951
|
+
const s = [...e].sort((i, o) => i.start - o.start);
|
|
2952
|
+
let r = t, n = 0;
|
|
2958
2953
|
for (const i of s) {
|
|
2959
|
-
const o =
|
|
2954
|
+
const o = he(i.start + n, 0, r.length);
|
|
2960
2955
|
if (i.end == null) {
|
|
2961
|
-
const l = r.slice(o),
|
|
2962
|
-
r = r.slice(0, o) + i.insertedText + l.slice(
|
|
2956
|
+
const l = r.slice(o), I = Wi(l, i.insertedText);
|
|
2957
|
+
r = r.slice(0, o) + i.insertedText + l.slice(I), n += i.insertedText.length - I;
|
|
2963
2958
|
continue;
|
|
2964
2959
|
}
|
|
2965
|
-
const a = i.end + n,
|
|
2966
|
-
r = r.slice(0, o) + i.insertedText + r.slice(
|
|
2960
|
+
const a = i.end + n, h = he(a, o, r.length), E = h - o;
|
|
2961
|
+
r = r.slice(0, o) + i.insertedText + r.slice(h), n += i.insertedText.length - E;
|
|
2967
2962
|
}
|
|
2968
2963
|
return r;
|
|
2969
2964
|
}
|
|
2970
|
-
function
|
|
2971
|
-
if (
|
|
2972
|
-
return { node:
|
|
2965
|
+
function Hi(t, e, s) {
|
|
2966
|
+
if (e.length === 0)
|
|
2967
|
+
return { node: t, changed: !1 };
|
|
2973
2968
|
const r = /* @__PURE__ */ new Map();
|
|
2974
|
-
for (const n of
|
|
2969
|
+
for (const n of e) {
|
|
2975
2970
|
const i = r.get(n.nodeId);
|
|
2976
2971
|
i ? i.push(n) : r.set(n.nodeId, [n]);
|
|
2977
2972
|
}
|
|
2978
|
-
return
|
|
2973
|
+
return st(t, r);
|
|
2979
2974
|
}
|
|
2980
|
-
function
|
|
2981
|
-
const r =
|
|
2982
|
-
let n = !1, i =
|
|
2975
|
+
function st(t, e, s) {
|
|
2976
|
+
const r = e.get(t.id) ?? [];
|
|
2977
|
+
let n = !1, i = t.props;
|
|
2983
2978
|
if (r.length > 0) {
|
|
2984
|
-
const
|
|
2979
|
+
const E = /* @__PURE__ */ new Map();
|
|
2985
2980
|
for (const l of r) {
|
|
2986
|
-
const
|
|
2987
|
-
|
|
2981
|
+
const I = E.get(l.propertyName);
|
|
2982
|
+
I ? I.push(l) : E.set(l.propertyName, [l]);
|
|
2988
2983
|
}
|
|
2989
|
-
for (const [l,
|
|
2990
|
-
const
|
|
2991
|
-
n || (i =
|
|
2984
|
+
for (const [l, I] of E.entries()) {
|
|
2985
|
+
const u = i[l], y = Yi(typeof u == "string" ? u : "", I);
|
|
2986
|
+
n || (i = B(i), n = !0), i[l] = y;
|
|
2992
2987
|
}
|
|
2993
2988
|
}
|
|
2994
2989
|
let o = !1;
|
|
2995
|
-
const a =
|
|
2996
|
-
let
|
|
2990
|
+
const a = t.children ?? [];
|
|
2991
|
+
let h = a;
|
|
2997
2992
|
if (a.length > 0) {
|
|
2998
|
-
let
|
|
2993
|
+
let E;
|
|
2999
2994
|
for (let l = 0; l < a.length; l++) {
|
|
3000
|
-
const
|
|
3001
|
-
|
|
2995
|
+
const I = a[l], u = st(I, e);
|
|
2996
|
+
u.changed && (E || (E = [...a]), E[l] = u.node);
|
|
3002
2997
|
}
|
|
3003
|
-
|
|
2998
|
+
E && (h = E, o = !0);
|
|
3004
2999
|
}
|
|
3005
|
-
return !n && !o ? { node:
|
|
3000
|
+
return !n && !o ? { node: t, changed: !1 } : {
|
|
3006
3001
|
node: {
|
|
3007
|
-
id:
|
|
3008
|
-
type:
|
|
3009
|
-
props: n ? i :
|
|
3010
|
-
children: o ?
|
|
3011
|
-
styleIds:
|
|
3012
|
-
...
|
|
3002
|
+
id: t.id,
|
|
3003
|
+
type: t.type,
|
|
3004
|
+
props: n ? i : t.props,
|
|
3005
|
+
children: o ? h : a,
|
|
3006
|
+
styleIds: t.styleIds,
|
|
3007
|
+
...t.sourceMarker ? { sourceMarker: t.sourceMarker } : {}
|
|
3013
3008
|
},
|
|
3014
3009
|
changed: !0
|
|
3015
3010
|
};
|
|
3016
3011
|
}
|
|
3017
|
-
function
|
|
3018
|
-
return Math.max(
|
|
3012
|
+
function he(t, e, s) {
|
|
3013
|
+
return Math.max(e, Math.min(s, t));
|
|
3019
3014
|
}
|
|
3020
|
-
function
|
|
3021
|
-
const s = Math.min(
|
|
3015
|
+
function Wi(t, e) {
|
|
3016
|
+
const s = Math.min(t.length, e.length);
|
|
3022
3017
|
let r = 0;
|
|
3023
|
-
for (; r < s &&
|
|
3018
|
+
for (; r < s && t.charCodeAt(r) === e.charCodeAt(r); )
|
|
3024
3019
|
r++;
|
|
3025
3020
|
return r;
|
|
3026
3021
|
}
|
|
3027
|
-
function
|
|
3028
|
-
const
|
|
3022
|
+
function B(t) {
|
|
3023
|
+
const e = {}, s = Object.keys(t);
|
|
3029
3024
|
for (let r = 0; r < s.length; r++) {
|
|
3030
3025
|
const n = s[r];
|
|
3031
|
-
|
|
3026
|
+
e[n] = t[n];
|
|
3032
3027
|
}
|
|
3033
|
-
return
|
|
3028
|
+
return e;
|
|
3034
3029
|
}
|
|
3035
|
-
function Q(
|
|
3036
|
-
return typeof
|
|
3030
|
+
function Q(t) {
|
|
3031
|
+
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
3037
3032
|
}
|
|
3038
|
-
function k(
|
|
3039
|
-
if (Object.is(
|
|
3033
|
+
function k(t, e) {
|
|
3034
|
+
if (Object.is(t, e))
|
|
3040
3035
|
return !0;
|
|
3041
|
-
if (Array.isArray(
|
|
3042
|
-
if (
|
|
3036
|
+
if (Array.isArray(t) && Array.isArray(e)) {
|
|
3037
|
+
if (t.length !== e.length)
|
|
3043
3038
|
return !1;
|
|
3044
|
-
for (let s = 0; s <
|
|
3045
|
-
if (!k(
|
|
3039
|
+
for (let s = 0; s < t.length; s++)
|
|
3040
|
+
if (!k(t[s], e[s]))
|
|
3046
3041
|
return !1;
|
|
3047
3042
|
return !0;
|
|
3048
3043
|
}
|
|
3049
|
-
if (Q(
|
|
3050
|
-
const s = Object.keys(
|
|
3044
|
+
if (Q(t) && Q(e)) {
|
|
3045
|
+
const s = Object.keys(t), r = Object.keys(e);
|
|
3051
3046
|
if (s.length !== r.length)
|
|
3052
3047
|
return !1;
|
|
3053
3048
|
for (const n of s)
|
|
3054
|
-
if (!k(
|
|
3049
|
+
if (!k(t[n], e[n]))
|
|
3055
3050
|
return !1;
|
|
3056
3051
|
return !0;
|
|
3057
3052
|
}
|
|
3058
3053
|
return !1;
|
|
3059
3054
|
}
|
|
3060
|
-
const z = Z("LiveSnapshot"),
|
|
3061
|
-
function
|
|
3055
|
+
const z = Z("LiveSnapshot"), Ie = 1, J = "ikon-live-snapshot", Ki = 300 * 1e3, $i = 5e6, ji = 1e3;
|
|
3056
|
+
function V() {
|
|
3062
3057
|
try {
|
|
3063
3058
|
return typeof localStorage > "u" ? null : localStorage;
|
|
3064
3059
|
} catch {
|
|
3065
3060
|
return null;
|
|
3066
3061
|
}
|
|
3067
3062
|
}
|
|
3068
|
-
function
|
|
3069
|
-
const
|
|
3070
|
-
|
|
3063
|
+
function Xi(t) {
|
|
3064
|
+
const e = typeof requestIdleCallback < "u" ? requestIdleCallback : null;
|
|
3065
|
+
e ? e(() => t(), { timeout: 2e3 }) : setTimeout(t, 0);
|
|
3071
3066
|
}
|
|
3072
|
-
class
|
|
3067
|
+
class zi {
|
|
3073
3068
|
key;
|
|
3074
3069
|
appId;
|
|
3075
3070
|
userId;
|
|
@@ -3081,29 +3076,29 @@ class Ji {
|
|
|
3081
3076
|
pending = null;
|
|
3082
3077
|
/** Remove every stored live snapshot (all apps and users) from localStorage. Call on logout. */
|
|
3083
3078
|
static clearAll() {
|
|
3084
|
-
const
|
|
3085
|
-
if (!
|
|
3079
|
+
const e = V();
|
|
3080
|
+
if (!e) return;
|
|
3086
3081
|
const s = `${J}:`, r = [];
|
|
3087
3082
|
try {
|
|
3088
|
-
for (let n = 0; n <
|
|
3089
|
-
const i =
|
|
3083
|
+
for (let n = 0; n < e.length; n++) {
|
|
3084
|
+
const i = e.key(n);
|
|
3090
3085
|
i && i.startsWith(s) && r.push(i);
|
|
3091
3086
|
}
|
|
3092
3087
|
for (const n of r)
|
|
3093
|
-
|
|
3088
|
+
e.removeItem(n);
|
|
3094
3089
|
} catch {
|
|
3095
3090
|
}
|
|
3096
3091
|
}
|
|
3097
|
-
constructor(
|
|
3098
|
-
this.appId =
|
|
3092
|
+
constructor(e) {
|
|
3093
|
+
this.appId = e.appId, this.userId = e.userId, this.disabled = !this.userId, this.maxAgeMs = e.maxAgeMs ?? Ki, this.maxBytes = e.maxBytes ?? $i, this.debounceMs = e.debounceMs ?? ji, this.key = `${J}:${this.appId}:${this.userId}`, this.disabled || this.pruneOtherUsers();
|
|
3099
3094
|
}
|
|
3100
3095
|
load() {
|
|
3101
3096
|
if (this.disabled) return null;
|
|
3102
|
-
const
|
|
3103
|
-
if (!
|
|
3097
|
+
const e = V();
|
|
3098
|
+
if (!e) return null;
|
|
3104
3099
|
let s;
|
|
3105
3100
|
try {
|
|
3106
|
-
s =
|
|
3101
|
+
s = e.getItem(this.key);
|
|
3107
3102
|
} catch {
|
|
3108
3103
|
return null;
|
|
3109
3104
|
}
|
|
@@ -3114,12 +3109,12 @@ class Ji {
|
|
|
3114
3109
|
} catch {
|
|
3115
3110
|
return this.remove(), null;
|
|
3116
3111
|
}
|
|
3117
|
-
if (r.schemaVersion !==
|
|
3112
|
+
if (r.schemaVersion !== Ie || r.appId !== this.appId || r.userId !== this.userId)
|
|
3118
3113
|
return this.remove(), null;
|
|
3119
3114
|
if (!Number.isFinite(r.savedAtMs) || Date.now() - r.savedAtMs > this.maxAgeMs)
|
|
3120
3115
|
return this.remove(), null;
|
|
3121
3116
|
try {
|
|
3122
|
-
return { streams: r.streams.map(
|
|
3117
|
+
return { streams: r.streams.map(qi), styles: r.styles ?? [] };
|
|
3123
3118
|
} catch (n) {
|
|
3124
3119
|
return z.warn("Failed to deserialize stored live snapshot, dropping it", n), this.remove(), null;
|
|
3125
3120
|
}
|
|
@@ -3128,9 +3123,9 @@ class Ji {
|
|
|
3128
3123
|
* Schedule a throttled write of the current UI state (at most one write per window, captured at
|
|
3129
3124
|
* the trailing edge). Streams with no root are skipped. The actual write runs at idle time.
|
|
3130
3125
|
*/
|
|
3131
|
-
save(
|
|
3132
|
-
this.disabled || (this.pending = { streams:
|
|
3133
|
-
this.writeTimer = null,
|
|
3126
|
+
save(e, s) {
|
|
3127
|
+
this.disabled || (this.pending = { streams: e, styles: s }, this.writeTimer === null && (this.writeTimer = setTimeout(() => {
|
|
3128
|
+
this.writeTimer = null, Xi(() => this.writePending());
|
|
3134
3129
|
}, this.debounceMs)));
|
|
3135
3130
|
}
|
|
3136
3131
|
/** Write any pending state immediately and synchronously (used on dispose / unmount). */
|
|
@@ -3141,18 +3136,18 @@ class Ji {
|
|
|
3141
3136
|
this.writeTimer !== null && (clearTimeout(this.writeTimer), this.writeTimer = null), this.pending = null;
|
|
3142
3137
|
}
|
|
3143
3138
|
writePending() {
|
|
3144
|
-
const
|
|
3145
|
-
this.pending = null,
|
|
3139
|
+
const e = this.pending;
|
|
3140
|
+
this.pending = null, e && this.writeNow(e.streams, e.styles);
|
|
3146
3141
|
}
|
|
3147
|
-
writeNow(
|
|
3148
|
-
const r =
|
|
3142
|
+
writeNow(e, s) {
|
|
3143
|
+
const r = V();
|
|
3149
3144
|
if (!r) return;
|
|
3150
3145
|
const n = [];
|
|
3151
|
-
for (const a of
|
|
3152
|
-
!a.rootViewId || !a.views.has(a.rootViewId) || n.push(
|
|
3146
|
+
for (const a of e)
|
|
3147
|
+
!a.rootViewId || !a.views.has(a.rootViewId) || n.push(Ji(a));
|
|
3153
3148
|
if (n.length === 0) return;
|
|
3154
3149
|
const i = {
|
|
3155
|
-
schemaVersion:
|
|
3150
|
+
schemaVersion: Ie,
|
|
3156
3151
|
savedAtMs: Date.now(),
|
|
3157
3152
|
appId: this.appId,
|
|
3158
3153
|
userId: this.userId,
|
|
@@ -3176,69 +3171,69 @@ class Ji {
|
|
|
3176
3171
|
}
|
|
3177
3172
|
}
|
|
3178
3173
|
remove() {
|
|
3179
|
-
const
|
|
3180
|
-
if (
|
|
3174
|
+
const e = V();
|
|
3175
|
+
if (e)
|
|
3181
3176
|
try {
|
|
3182
|
-
|
|
3177
|
+
e.removeItem(this.key);
|
|
3183
3178
|
} catch {
|
|
3184
3179
|
}
|
|
3185
3180
|
}
|
|
3186
3181
|
pruneOtherUsers() {
|
|
3187
|
-
const
|
|
3188
|
-
if (!
|
|
3182
|
+
const e = V();
|
|
3183
|
+
if (!e) return;
|
|
3189
3184
|
const s = `${J}:${this.appId}:`, r = [];
|
|
3190
3185
|
try {
|
|
3191
|
-
for (let n = 0; n <
|
|
3192
|
-
const i =
|
|
3186
|
+
for (let n = 0; n < e.length; n++) {
|
|
3187
|
+
const i = e.key(n);
|
|
3193
3188
|
i && i.startsWith(s) && i !== this.key && r.push(i);
|
|
3194
3189
|
}
|
|
3195
3190
|
for (const n of r)
|
|
3196
|
-
|
|
3191
|
+
e.removeItem(n);
|
|
3197
3192
|
} catch {
|
|
3198
3193
|
}
|
|
3199
3194
|
}
|
|
3200
3195
|
}
|
|
3201
|
-
function
|
|
3196
|
+
function Ji(t) {
|
|
3202
3197
|
return {
|
|
3203
|
-
streamId:
|
|
3204
|
-
category:
|
|
3205
|
-
version:
|
|
3206
|
-
rootViewId:
|
|
3207
|
-
views: [...
|
|
3198
|
+
streamId: t.streamId,
|
|
3199
|
+
category: t.category,
|
|
3200
|
+
version: t.version ?? 0,
|
|
3201
|
+
rootViewId: t.rootViewId,
|
|
3202
|
+
views: [...t.views.entries()]
|
|
3208
3203
|
};
|
|
3209
3204
|
}
|
|
3210
|
-
function
|
|
3205
|
+
function qi(t) {
|
|
3211
3206
|
return {
|
|
3212
|
-
streamId:
|
|
3213
|
-
category:
|
|
3214
|
-
version:
|
|
3215
|
-
rootViewId:
|
|
3216
|
-
views:
|
|
3207
|
+
streamId: t.streamId,
|
|
3208
|
+
category: t.category,
|
|
3209
|
+
version: t.version,
|
|
3210
|
+
rootViewId: t.rootViewId,
|
|
3211
|
+
views: t.views,
|
|
3217
3212
|
// Binary payloads are intentionally not stored; they arrive with the first live update.
|
|
3218
3213
|
payloads: []
|
|
3219
3214
|
};
|
|
3220
3215
|
}
|
|
3221
|
-
function
|
|
3216
|
+
function Qi(t) {
|
|
3222
3217
|
return new Worker(
|
|
3223
|
-
"" + new URL("assets/ui-worker-
|
|
3218
|
+
"" + new URL("assets/ui-worker-y-VofSR0.js", import.meta.url).href,
|
|
3224
3219
|
{
|
|
3225
3220
|
type: "module",
|
|
3226
|
-
name:
|
|
3221
|
+
name: t?.name
|
|
3227
3222
|
}
|
|
3228
3223
|
);
|
|
3229
3224
|
}
|
|
3230
|
-
const
|
|
3231
|
-
function
|
|
3225
|
+
const A = Z("IkonUiCore"), Zi = 250;
|
|
3226
|
+
function rt() {
|
|
3232
3227
|
if (!(typeof window > "u"))
|
|
3233
3228
|
return window.__IKON_BOOT_SNAPSHOT_FILE__ || void 0;
|
|
3234
3229
|
}
|
|
3235
3230
|
let $ = null;
|
|
3236
|
-
function
|
|
3231
|
+
function so() {
|
|
3237
3232
|
if ($) return;
|
|
3238
|
-
const
|
|
3239
|
-
|
|
3233
|
+
const t = rt();
|
|
3234
|
+
t && ($ = fetch(`/${t}`).then((e) => e, () => null));
|
|
3240
3235
|
}
|
|
3241
|
-
class
|
|
3236
|
+
class ro {
|
|
3242
3237
|
unsubscribeProtocolMessages;
|
|
3243
3238
|
unsubscribeState;
|
|
3244
3239
|
client = null;
|
|
@@ -3263,20 +3258,20 @@ class no {
|
|
|
3263
3258
|
// Debounce timers keyed by stream (senderId_trackId): a burst of unrecoverable diffs collapses
|
|
3264
3259
|
// into a single resync request per stream instead of one per dropped diff.
|
|
3265
3260
|
resyncDebounceTimers = /* @__PURE__ */ new Map();
|
|
3266
|
-
constructor(
|
|
3267
|
-
const s =
|
|
3268
|
-
this.useUiWorker = s !== "disabled" && typeof Worker < "u",
|
|
3261
|
+
constructor(e) {
|
|
3262
|
+
const s = e?.threading?.uiWorker ?? "auto";
|
|
3263
|
+
this.useUiWorker = s !== "disabled" && typeof Worker < "u", e?.liveSnapshot?.enabled && (this.liveSnapshot = new zi(e.liveSnapshot)), e?.client && this.initialize(e.client, e);
|
|
3269
3264
|
}
|
|
3270
3265
|
dispose() {
|
|
3271
3266
|
this.unsubscribeProtocolMessages?.(), this.unsubscribeState?.(), this.unsubscribeLiveSnapshotCapture?.(), this.liveSnapshot?.dispose(), this.liveSnapshot = null, this.uiWorker?.terminate(), this.uiWorker = null;
|
|
3272
|
-
for (const
|
|
3273
|
-
clearTimeout(
|
|
3267
|
+
for (const e of this.resyncDebounceTimers.values())
|
|
3268
|
+
clearTimeout(e);
|
|
3274
3269
|
this.resyncDebounceTimers.clear(), this.client = null, this.uiStyleListeners.clear(), this.uiStyleDeleteListeners.clear(), this.uiStyles.clear();
|
|
3275
3270
|
}
|
|
3276
3271
|
clearAllState() {
|
|
3277
3272
|
this.uiWorker && this.uiWorker.postMessage({ type: "clear" });
|
|
3278
|
-
for (const
|
|
3279
|
-
this.uiStore.remove(
|
|
3273
|
+
for (const e of this.uiStore.getSnapshots())
|
|
3274
|
+
this.uiStore.remove(e.streamId), this.notifyUiStreamCleared(e.streamId);
|
|
3280
3275
|
this.uiStyles.clear();
|
|
3281
3276
|
}
|
|
3282
3277
|
// Keeps the current tree on screen but makes every stream ignore diffs until the next full
|
|
@@ -3284,64 +3279,64 @@ class no {
|
|
|
3284
3279
|
enterSnapshotMode() {
|
|
3285
3280
|
this.uiWorker && this.uiWorker.postMessage({ type: "snapshotMode" }), this.uiStore.enterSnapshotModeAll();
|
|
3286
3281
|
}
|
|
3287
|
-
subscribeToUiUpdates(
|
|
3288
|
-
return this.uiUpdateListeners.add(
|
|
3289
|
-
this.uiUpdateListeners.delete(
|
|
3282
|
+
subscribeToUiUpdates(e) {
|
|
3283
|
+
return this.uiUpdateListeners.add(e), () => {
|
|
3284
|
+
this.uiUpdateListeners.delete(e);
|
|
3290
3285
|
};
|
|
3291
3286
|
}
|
|
3292
|
-
subscribeToUiStreamCleared(
|
|
3293
|
-
return this.uiStreamClearedListeners.add(
|
|
3294
|
-
this.uiStreamClearedListeners.delete(
|
|
3287
|
+
subscribeToUiStreamCleared(e) {
|
|
3288
|
+
return this.uiStreamClearedListeners.add(e), () => {
|
|
3289
|
+
this.uiStreamClearedListeners.delete(e);
|
|
3295
3290
|
};
|
|
3296
3291
|
}
|
|
3297
|
-
subscribeToUiStyles(
|
|
3298
|
-
return this.uiStyleListeners.add(
|
|
3299
|
-
this.uiStyleListeners.delete(
|
|
3292
|
+
subscribeToUiStyles(e) {
|
|
3293
|
+
return this.uiStyleListeners.add(e), () => {
|
|
3294
|
+
this.uiStyleListeners.delete(e);
|
|
3300
3295
|
};
|
|
3301
3296
|
}
|
|
3302
|
-
subscribeToUiStyleDeletes(
|
|
3303
|
-
return this.uiStyleDeleteListeners.add(
|
|
3304
|
-
this.uiStyleDeleteListeners.delete(
|
|
3297
|
+
subscribeToUiStyleDeletes(e) {
|
|
3298
|
+
return this.uiStyleDeleteListeners.add(e), () => {
|
|
3299
|
+
this.uiStyleDeleteListeners.delete(e);
|
|
3305
3300
|
};
|
|
3306
3301
|
}
|
|
3307
3302
|
getUiStyles() {
|
|
3308
3303
|
return Array.from(this.uiStyles.values());
|
|
3309
3304
|
}
|
|
3310
3305
|
/** True while the given stream's content comes from a seed (boot/live snapshot), not a live update. */
|
|
3311
|
-
isSeedStream(
|
|
3312
|
-
return this.seededStreamIds.has(
|
|
3306
|
+
isSeedStream(e) {
|
|
3307
|
+
return this.seededStreamIds.has(e);
|
|
3313
3308
|
}
|
|
3314
|
-
initialize(
|
|
3315
|
-
this.client =
|
|
3309
|
+
initialize(e, s) {
|
|
3310
|
+
this.client = e, this.useUiWorker && this.startUiWorker(s), !this.seedFromLiveSnapshot() && s?.bootSnapshot !== !1 && this.seedFromBootSnapshot(), this.subscribeLiveSnapshotCapture();
|
|
3316
3311
|
const n = {
|
|
3317
3312
|
opcodeGroupsMask: L.GROUP_CORE | L.GROUP_UI | L.GROUP_ACTIONS
|
|
3318
3313
|
};
|
|
3319
|
-
this.unsubscribeProtocolMessages =
|
|
3314
|
+
this.unsubscribeProtocolMessages = e.subscribeToProtocolMessages((i) => {
|
|
3320
3315
|
if (this.uiWorker) {
|
|
3321
3316
|
this.forwardMessageToWorker(i);
|
|
3322
3317
|
return;
|
|
3323
3318
|
}
|
|
3324
3319
|
this.handleProtocolMessage(i);
|
|
3325
|
-
}, n), this.unsubscribeState =
|
|
3320
|
+
}, n), this.unsubscribeState = e.subscribeToState((i) => {
|
|
3326
3321
|
if (i === "offline" || i === "offlineError") {
|
|
3327
3322
|
this.clearAllState(), this.lastConnectedSessionId = void 0;
|
|
3328
3323
|
return;
|
|
3329
3324
|
}
|
|
3330
3325
|
if (i === "connected") {
|
|
3331
3326
|
const o = this.client?.sessionId;
|
|
3332
|
-
this.lastConnectedSessionId !== void 0 && (o !== this.lastConnectedSessionId ? (
|
|
3327
|
+
this.lastConnectedSessionId !== void 0 && (o !== this.lastConnectedSessionId ? (A.info(`SessionId changed (${this.lastConnectedSessionId} → ${o}), clearing UI cache so the server can resend a fresh snapshot under the new SessionId`), this.clearAllState()) : (A.info("Soft reconnect (same SessionId), gating UI store on the server resync snapshot"), this.enterSnapshotMode())), this.lastConnectedSessionId = o;
|
|
3333
3328
|
}
|
|
3334
3329
|
});
|
|
3335
3330
|
}
|
|
3336
3331
|
seedFromLiveSnapshot() {
|
|
3337
3332
|
if (!this.liveSnapshot) return !1;
|
|
3338
|
-
const
|
|
3339
|
-
if (!
|
|
3333
|
+
const e = this.liveSnapshot.load();
|
|
3334
|
+
if (!e || e.streams.length === 0) return !1;
|
|
3340
3335
|
if (this.uiWorker)
|
|
3341
|
-
return this.uiWorker.postMessage({ type: "seed", liveStreams:
|
|
3342
|
-
for (const s of
|
|
3336
|
+
return this.uiWorker.postMessage({ type: "seed", liveStreams: e.streams, styles: e.styles }), !0;
|
|
3337
|
+
for (const s of e.styles)
|
|
3343
3338
|
this.uiStyles.set(s.styleId, s), this.notifyUiStyle(s);
|
|
3344
|
-
for (const s of
|
|
3339
|
+
for (const s of e.streams)
|
|
3345
3340
|
this.uiStore.applyStoreOp({ type: "ReplaceStreamSnapshot", snapshot: s });
|
|
3346
3341
|
return !0;
|
|
3347
3342
|
}
|
|
@@ -3351,12 +3346,12 @@ class no {
|
|
|
3351
3346
|
// a live update, gated into snapshot mode so the first live full snapshot atomically replaces it. The
|
|
3352
3347
|
// hashed filename is the cache-buster — a redeploy with a different UI fetches a different URL.
|
|
3353
3348
|
seedFromBootSnapshot() {
|
|
3354
|
-
const
|
|
3355
|
-
|
|
3349
|
+
const e = rt();
|
|
3350
|
+
e && this.loadBootSnapshotAsync(e);
|
|
3356
3351
|
}
|
|
3357
|
-
async loadBootSnapshotAsync(
|
|
3352
|
+
async loadBootSnapshotAsync(e) {
|
|
3358
3353
|
try {
|
|
3359
|
-
const s = ($ ? await $ : null) ?? await fetch(`/${
|
|
3354
|
+
const s = ($ ? await $ : null) ?? await fetch(`/${e}`);
|
|
3360
3355
|
if (!s.ok) return;
|
|
3361
3356
|
const r = await s.json();
|
|
3362
3357
|
if (!r?.json) return;
|
|
@@ -3369,99 +3364,99 @@ class no {
|
|
|
3369
3364
|
const a = { styleId: o.styleId, css: o.css, common: o.common };
|
|
3370
3365
|
this.uiStyles.set(a.styleId, a), this.notifyUiStyle(a);
|
|
3371
3366
|
}
|
|
3372
|
-
const n =
|
|
3367
|
+
const n = le({ Json: r.json }), i = r.streamId ?? "boot";
|
|
3373
3368
|
this.uiStore.apply(i, n), this.seedStreamIds.add(i), this.seededStreamIds.add(i), this.uiStore.enterSnapshotModeAll();
|
|
3374
3369
|
} catch {
|
|
3375
3370
|
}
|
|
3376
3371
|
}
|
|
3377
3372
|
subscribeLiveSnapshotCapture() {
|
|
3378
|
-
const
|
|
3379
|
-
|
|
3380
|
-
|
|
3373
|
+
const e = this.liveSnapshot;
|
|
3374
|
+
e && (this.unsubscribeLiveSnapshotCapture = this.uiStore.subscribe(() => {
|
|
3375
|
+
e.save(this.uiStore.getSnapshots(), this.getUiStyles());
|
|
3381
3376
|
}));
|
|
3382
3377
|
}
|
|
3383
|
-
startUiWorker(
|
|
3378
|
+
startUiWorker(e) {
|
|
3384
3379
|
try {
|
|
3385
|
-
this.uiWorker = new
|
|
3380
|
+
this.uiWorker = new Qi();
|
|
3386
3381
|
} catch (n) {
|
|
3387
|
-
|
|
3382
|
+
A.warn("Failed to create UI worker, falling back to main thread", n), this.uiWorker = null;
|
|
3388
3383
|
return;
|
|
3389
3384
|
}
|
|
3390
|
-
const s =
|
|
3385
|
+
const s = e?.threading?.flushIntervalMs, r = e?.threading?.maxLatencyMs;
|
|
3391
3386
|
this.uiWorker.postMessage({ type: "configure", flushIntervalMs: s, maxLatencyMs: r }), this.uiWorker.addEventListener("message", (n) => {
|
|
3392
3387
|
this.handleUiStoreOpBatch(n.data);
|
|
3393
3388
|
}), this.uiWorker.addEventListener("error", (n) => {
|
|
3394
3389
|
const i = [n.message, n.filename, n.lineno, n.colno].filter((o) => o != null && String(o).length > 0);
|
|
3395
|
-
|
|
3390
|
+
A.warn(`UI worker failed, falling back to main thread: ${i.join(" ")}`.trim()), this.uiWorker?.terminate(), this.uiWorker = null, this.rehydrateStoresForMainThread();
|
|
3396
3391
|
});
|
|
3397
3392
|
}
|
|
3398
3393
|
rehydrateStoresForMainThread() {
|
|
3399
|
-
for (const
|
|
3400
|
-
if (!
|
|
3394
|
+
for (const e of this.uiStore.getSnapshots()) {
|
|
3395
|
+
if (!e.rootViewId)
|
|
3401
3396
|
continue;
|
|
3402
|
-
const s =
|
|
3397
|
+
const s = e.views.get(e.rootViewId);
|
|
3403
3398
|
if (!s)
|
|
3404
3399
|
continue;
|
|
3405
3400
|
const r = {
|
|
3406
3401
|
snapshot: {
|
|
3407
3402
|
type: "full",
|
|
3408
|
-
version:
|
|
3409
|
-
metadata: { viewId:
|
|
3403
|
+
version: e.version ?? 0,
|
|
3404
|
+
metadata: { viewId: e.rootViewId },
|
|
3410
3405
|
root: s
|
|
3411
3406
|
},
|
|
3412
|
-
payloads:
|
|
3407
|
+
payloads: e.payloads
|
|
3413
3408
|
};
|
|
3414
|
-
this.uiStore.apply(
|
|
3409
|
+
this.uiStore.apply(e.streamId, r);
|
|
3415
3410
|
}
|
|
3416
3411
|
}
|
|
3417
|
-
forwardMessageToWorker(
|
|
3412
|
+
forwardMessageToWorker(e) {
|
|
3418
3413
|
if (this.uiWorker)
|
|
3419
3414
|
try {
|
|
3420
|
-
const s =
|
|
3415
|
+
const s = e.slice().buffer;
|
|
3421
3416
|
this.uiWorker.postMessage({ type: "protocol", message: s }, [s]);
|
|
3422
3417
|
} catch (s) {
|
|
3423
|
-
|
|
3418
|
+
A.warn("Failed to forward message to UI worker", s);
|
|
3424
3419
|
}
|
|
3425
3420
|
}
|
|
3426
|
-
handleUiStoreOpBatch(
|
|
3427
|
-
for (const s of
|
|
3421
|
+
handleUiStoreOpBatch(e) {
|
|
3422
|
+
for (const s of e.ops)
|
|
3428
3423
|
this.applyUiStoreOp(s);
|
|
3429
|
-
if (
|
|
3430
|
-
for (const s of
|
|
3424
|
+
if (e.acks && e.acks.length > 0)
|
|
3425
|
+
for (const s of e.acks)
|
|
3431
3426
|
this.sendUiUpdateAck(s.trackId, s.version, s.senderId);
|
|
3432
|
-
if (
|
|
3433
|
-
for (const s of
|
|
3427
|
+
if (e.resyncs && e.resyncs.length > 0)
|
|
3428
|
+
for (const s of e.resyncs)
|
|
3434
3429
|
this.requestResync(s.trackId, s.senderId);
|
|
3435
3430
|
}
|
|
3436
|
-
applyUiStoreOp(
|
|
3437
|
-
if (
|
|
3438
|
-
this.uiStyles.set(
|
|
3431
|
+
applyUiStoreOp(e) {
|
|
3432
|
+
if (e.type === "UpsertUiStyle") {
|
|
3433
|
+
this.uiStyles.set(e.style.styleId, e.style), this.notifyUiStyle(e.style);
|
|
3439
3434
|
return;
|
|
3440
3435
|
}
|
|
3441
|
-
if (
|
|
3442
|
-
this.uiStyles.delete(
|
|
3436
|
+
if (e.type === "RemoveUiStyle") {
|
|
3437
|
+
this.uiStyles.delete(e.styleId) && this.notifyUiStyleDelete([e.styleId]);
|
|
3443
3438
|
return;
|
|
3444
3439
|
}
|
|
3445
|
-
if (
|
|
3446
|
-
this.uiStore.applyStoreOp(
|
|
3440
|
+
if (e.type === "ClearStream") {
|
|
3441
|
+
this.uiStore.applyStoreOp(e), this.seededStreamIds.delete(e.streamId), this.notifyUiStreamCleared(e.streamId);
|
|
3447
3442
|
return;
|
|
3448
3443
|
}
|
|
3449
|
-
if (
|
|
3450
|
-
this.uiStore.applyStoreOp(
|
|
3444
|
+
if (e.type === "RemoveStream") {
|
|
3445
|
+
this.uiStore.applyStoreOp(e), this.seededStreamIds.delete(e.streamId), this.notifyUiStreamCleared(e.streamId);
|
|
3451
3446
|
return;
|
|
3452
3447
|
}
|
|
3453
|
-
if (
|
|
3454
|
-
this.uiStore.applyStoreOp(
|
|
3448
|
+
if (e.type === "SetStreamCategory") {
|
|
3449
|
+
this.uiStore.applyStoreOp(e);
|
|
3455
3450
|
return;
|
|
3456
3451
|
}
|
|
3457
|
-
if (
|
|
3458
|
-
if (!this.uiStore.applyStoreOp(
|
|
3452
|
+
if (e.type === "ReplaceStreamSnapshot" || e.type === "PatchStreamSnapshot") {
|
|
3453
|
+
if (!this.uiStore.applyStoreOp(e))
|
|
3459
3454
|
return;
|
|
3460
|
-
if (
|
|
3461
|
-
this.seededStreamIds.add(
|
|
3455
|
+
if (e.type === "ReplaceStreamSnapshot" && e.fromSeed) {
|
|
3456
|
+
this.seededStreamIds.add(e.snapshot.streamId);
|
|
3462
3457
|
return;
|
|
3463
3458
|
}
|
|
3464
|
-
const r =
|
|
3459
|
+
const r = e.type === "ReplaceStreamSnapshot" ? e.snapshot.streamId : e.streamId;
|
|
3465
3460
|
this.seededStreamIds.delete(r);
|
|
3466
3461
|
const n = this.uiStore.getSnapshot(r);
|
|
3467
3462
|
if (!n?.rootViewId)
|
|
@@ -3482,61 +3477,58 @@ class no {
|
|
|
3482
3477
|
return;
|
|
3483
3478
|
}
|
|
3484
3479
|
}
|
|
3485
|
-
handleProtocolMessage(
|
|
3486
|
-
switch (
|
|
3480
|
+
handleProtocolMessage(e) {
|
|
3481
|
+
switch (it(e)) {
|
|
3487
3482
|
case L.CORE_GLOBAL_STATE:
|
|
3488
|
-
this.handleGlobalState(
|
|
3483
|
+
this.handleGlobalState(e);
|
|
3489
3484
|
return;
|
|
3490
3485
|
case L.UI_UPDATE:
|
|
3491
|
-
this.handleUiUpdate(
|
|
3486
|
+
this.handleUiUpdate(e);
|
|
3492
3487
|
return;
|
|
3493
3488
|
case L.UI_STYLES:
|
|
3494
|
-
this.handleUiStyles(
|
|
3489
|
+
this.handleUiStyles(e);
|
|
3495
3490
|
return;
|
|
3496
3491
|
case L.UI_STYLES_BATCH:
|
|
3497
|
-
this.handleUiStylesBatch(
|
|
3492
|
+
this.handleUiStylesBatch(e);
|
|
3498
3493
|
return;
|
|
3499
3494
|
case L.UI_STYLES_DELETE:
|
|
3500
|
-
this.handleUiStylesDelete(
|
|
3501
|
-
return;
|
|
3502
|
-
case L.ACTION_UI_CLEAR_STREAM:
|
|
3503
|
-
this.handleClearStream(t);
|
|
3495
|
+
this.handleUiStylesDelete(e);
|
|
3504
3496
|
return;
|
|
3505
3497
|
default:
|
|
3506
3498
|
return;
|
|
3507
3499
|
}
|
|
3508
3500
|
}
|
|
3509
|
-
handleGlobalState(
|
|
3510
|
-
|
|
3501
|
+
handleGlobalState(e) {
|
|
3502
|
+
Wn(e).then((s) => {
|
|
3511
3503
|
const r = /* @__PURE__ */ new Set();
|
|
3512
3504
|
for (const n of Object.values(s.UIStreams ?? {}))
|
|
3513
3505
|
r.add(n.StreamId), this.uiStore.setCategory(n.StreamId, n.Info?.Category);
|
|
3514
3506
|
for (const n of this.uiStore.getSnapshots())
|
|
3515
3507
|
this.seedStreamIds.has(n.streamId) || r.has(n.streamId) || (this.uiStore.remove(n.streamId), this.notifyUiStreamCleared(n.streamId));
|
|
3516
3508
|
}).catch((s) => {
|
|
3517
|
-
|
|
3509
|
+
A.error("Failed to handle global state", s);
|
|
3518
3510
|
});
|
|
3519
3511
|
}
|
|
3520
3512
|
// Retire orphan boot seeds once a live update has rendered (main-thread twin of the worker's
|
|
3521
3513
|
// evictSeedStreamsExcept). A seed sharing the live id is replaced in place, not removed.
|
|
3522
|
-
evictSeedStreams(
|
|
3514
|
+
evictSeedStreams(e) {
|
|
3523
3515
|
if (this.seedStreamIds.size !== 0) {
|
|
3524
3516
|
for (const s of this.seedStreamIds)
|
|
3525
|
-
s !==
|
|
3517
|
+
s !== e && (this.uiStore.remove(s), this.notifyUiStreamCleared(s));
|
|
3526
3518
|
this.seedStreamIds.clear();
|
|
3527
3519
|
}
|
|
3528
3520
|
}
|
|
3529
|
-
handleUiUpdate(
|
|
3530
|
-
const s =
|
|
3531
|
-
|
|
3532
|
-
const i =
|
|
3521
|
+
handleUiUpdate(e) {
|
|
3522
|
+
const s = ot(e), r = `${s.senderId}_${s.trackId}`;
|
|
3523
|
+
Zr(e).then((n) => {
|
|
3524
|
+
const i = le(n);
|
|
3533
3525
|
this.notifyUiUpdate(r, i), this.uiStore.apply(r, i) && this.evictSeedStreams(r), this.uiStore.needsResync(r) && this.requestResync(s.trackId, s.senderId), this.sendUiUpdateAck(s.trackId, i.snapshot.version, s.senderId);
|
|
3534
3526
|
}).catch((n) => {
|
|
3535
|
-
n instanceof
|
|
3527
|
+
n instanceof U ? A.warn("Failed to parse UI update", n.causeError ?? n) : A.error("Failed to apply UI update", n);
|
|
3536
3528
|
});
|
|
3537
3529
|
}
|
|
3538
|
-
handleUiStyles(
|
|
3539
|
-
|
|
3530
|
+
handleUiStyles(e) {
|
|
3531
|
+
wr(e).then((s) => {
|
|
3540
3532
|
if (!s.StyleId) return;
|
|
3541
3533
|
const r = {
|
|
3542
3534
|
styleId: s.StyleId,
|
|
@@ -3545,11 +3537,11 @@ class no {
|
|
|
3545
3537
|
};
|
|
3546
3538
|
this.uiStyles.set(r.styleId, r), this.notifyUiStyle(r);
|
|
3547
3539
|
}).catch((s) => {
|
|
3548
|
-
|
|
3540
|
+
A.error("Failed to handle UI styles", s);
|
|
3549
3541
|
});
|
|
3550
3542
|
}
|
|
3551
|
-
handleUiStylesBatch(
|
|
3552
|
-
|
|
3543
|
+
handleUiStylesBatch(e) {
|
|
3544
|
+
gr(e).then((s) => {
|
|
3553
3545
|
if (s.Styles)
|
|
3554
3546
|
for (const r of s.Styles) {
|
|
3555
3547
|
if (!r.StyleId) continue;
|
|
@@ -3561,75 +3553,71 @@ class no {
|
|
|
3561
3553
|
this.uiStyles.set(n.styleId, n), this.notifyUiStyle(n);
|
|
3562
3554
|
}
|
|
3563
3555
|
}).catch((s) => {
|
|
3564
|
-
|
|
3556
|
+
A.error("Failed to handle UI styles batch", s);
|
|
3565
3557
|
});
|
|
3566
3558
|
}
|
|
3567
|
-
handleUiStylesDelete(
|
|
3568
|
-
|
|
3559
|
+
handleUiStylesDelete(e) {
|
|
3560
|
+
Wr(e).then((s) => {
|
|
3569
3561
|
if (!(!s.StyleIds || s.StyleIds.length === 0)) {
|
|
3570
3562
|
for (const r of s.StyleIds)
|
|
3571
3563
|
this.uiStyles.delete(r);
|
|
3572
3564
|
this.notifyUiStyleDelete(s.StyleIds);
|
|
3573
3565
|
}
|
|
3574
3566
|
}).catch((s) => {
|
|
3575
|
-
|
|
3567
|
+
A.error("Failed to handle UI styles delete", s);
|
|
3576
3568
|
});
|
|
3577
3569
|
}
|
|
3578
|
-
|
|
3579
|
-
const s = ae(t), r = `${s.senderId}_${s.trackId}`;
|
|
3580
|
-
this.uiStore.clear(r), this.notifyUiStreamCleared(r);
|
|
3581
|
-
}
|
|
3582
|
-
notifyUiUpdate(t, s) {
|
|
3570
|
+
notifyUiUpdate(e, s) {
|
|
3583
3571
|
for (const r of this.uiUpdateListeners)
|
|
3584
|
-
r(
|
|
3572
|
+
r(e, s);
|
|
3585
3573
|
}
|
|
3586
|
-
notifyUiStyle(
|
|
3574
|
+
notifyUiStyle(e) {
|
|
3587
3575
|
for (const s of this.uiStyleListeners)
|
|
3588
|
-
s(
|
|
3576
|
+
s(e);
|
|
3589
3577
|
}
|
|
3590
|
-
notifyUiStyleDelete(
|
|
3578
|
+
notifyUiStyleDelete(e) {
|
|
3591
3579
|
for (const s of this.uiStyleDeleteListeners)
|
|
3592
|
-
s(
|
|
3580
|
+
s(e);
|
|
3593
3581
|
}
|
|
3594
|
-
notifyUiStreamCleared(
|
|
3582
|
+
notifyUiStreamCleared(e) {
|
|
3595
3583
|
for (const s of this.uiStreamClearedListeners)
|
|
3596
|
-
s(
|
|
3584
|
+
s(e);
|
|
3597
3585
|
}
|
|
3598
|
-
sendUiUpdateAck(
|
|
3586
|
+
sendUiUpdateAck(e, s, r) {
|
|
3599
3587
|
if (this.client && !(!Number.isFinite(s) || s < 0))
|
|
3600
3588
|
try {
|
|
3601
|
-
const n = r !== void 0 ? { trackId:
|
|
3589
|
+
const n = r !== void 0 ? { trackId: e, targetIds: [r] } : { trackId: e }, i = on({ Version: s }, this.client.sessionId ?? 0, n);
|
|
3602
3590
|
this.client.sendProtocolMessage(i);
|
|
3603
3591
|
} catch (n) {
|
|
3604
|
-
|
|
3592
|
+
A.warn("Failed to send UI update ack", n);
|
|
3605
3593
|
}
|
|
3606
3594
|
}
|
|
3607
|
-
requestResync(
|
|
3608
|
-
const r = `${s}_${
|
|
3595
|
+
requestResync(e, s) {
|
|
3596
|
+
const r = `${s}_${e}`;
|
|
3609
3597
|
if (this.resyncDebounceTimers.has(r))
|
|
3610
3598
|
return;
|
|
3611
3599
|
const n = setTimeout(() => {
|
|
3612
|
-
this.resyncDebounceTimers.delete(r), this.sendResyncRequest(
|
|
3613
|
-
},
|
|
3600
|
+
this.resyncDebounceTimers.delete(r), this.sendResyncRequest(e, s);
|
|
3601
|
+
}, Zi);
|
|
3614
3602
|
this.resyncDebounceTimers.set(r, n);
|
|
3615
3603
|
}
|
|
3616
|
-
sendResyncRequest(
|
|
3604
|
+
sendResyncRequest(e, s) {
|
|
3617
3605
|
if (this.client)
|
|
3618
3606
|
try {
|
|
3619
|
-
const r =
|
|
3607
|
+
const r = Er({ TrackId: e }, this.client.sessionId ?? 0, { trackId: e, targetIds: [s] });
|
|
3620
3608
|
this.client.sendProtocolMessage(r);
|
|
3621
3609
|
} catch (r) {
|
|
3622
|
-
|
|
3610
|
+
A.warn("Failed to send UI resync request", r);
|
|
3623
3611
|
}
|
|
3624
3612
|
}
|
|
3625
3613
|
}
|
|
3626
3614
|
export {
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3615
|
+
ki as HandlerCache,
|
|
3616
|
+
ro as IkonUiCore,
|
|
3617
|
+
zi as LiveSnapshotCache,
|
|
3630
3618
|
Vi as UiStore,
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3619
|
+
Mi as UiStreamStore,
|
|
3620
|
+
U as UiUpdateParseError,
|
|
3621
|
+
le as parseUiUpdate,
|
|
3622
|
+
so as prefetchBootSnapshot
|
|
3635
3623
|
};
|