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