@ikonai/sdk-ui 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/ui-worker-DFpR4Ylf.js +1 -0
- package/index.js +436 -420
- package/package.json +1 -1
- package/assets/ui-worker-DoE1eBKO.js +0 -1
package/index.js
CHANGED
|
@@ -906,19 +906,19 @@ function Re(e) {
|
|
|
906
906
|
}
|
|
907
907
|
//#endregion
|
|
908
908
|
//#region ../../shared/protocol/src/messages/context.ts
|
|
909
|
-
var ze = 76337612, Be = 185396121, Ve = 227309410, He = 250031587, Ue = 388632637, We = 417197284, Ge = 425972532, Ke = 469070965, qe = 470595159, Je = 594855258, Ye = 617065367, Xe = 661691032, Ze = 781727218, Qe = 834078886, $e = 1043273762, et = 1236999138, tt = 1286979607, nt = 1368629611, rt = 1375701023, it = 1437068682, at = 1668375353, ot = 1715899485, st = 1719830747, ct = 1942830531, lt = 1999510636, ut = 2033288346, dt =
|
|
910
|
-
function
|
|
909
|
+
var ze = 76337612, Be = 185396121, Ve = 227309410, He = 250031587, Ue = 388632637, We = 417197284, Ge = 425972532, Ke = 469070965, qe = 470595159, Je = 594855258, Ye = 617065367, Xe = 661691032, Ze = 781727218, Qe = 834078886, $e = 1043273762, et = 1236999138, tt = 1286979607, nt = 1368629611, rt = 1375701023, it = 1437068682, at = 1668375353, ot = 1715899485, st = 1719830747, ct = 1942830531, lt = 1999510636, ut = 2033288346, dt = 2071248106, ft = 2079864626, pt = 2142346422, mt = 2228539873, ht = 2232517119, gt = 2336910329, _t = 2388060749, vt = 2504065971, yt = 2598291686, bt = 2611990833, xt = 2719718823, St = 2810953526, Ct = 2840065720, wt = 2885165957, Tt = 2950234668, Et = 3013611882, Dt = 3542818975, Ot = 3586157513, kt = 3964347758, At = 4046252454;
|
|
910
|
+
function jt(e) {
|
|
911
911
|
let t = {};
|
|
912
912
|
return F(t), e && Object.assign(t, e), t;
|
|
913
913
|
}
|
|
914
914
|
function F(e) {
|
|
915
|
-
return e.ContextType = pe.Unknown, e.UserType = ge.Unknown, e.PayloadType = me.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.SnapshotVariant = "", e.IsReady = !1, e.HasInput = !1, e.AuthSessionId = "", e.IsAnonymous = !1, e.IsGlobal = !1, e.AuthProvider = "", e.SsoConnectionId = "", e.TestLinkId = "", e.TestLinkName = "", e.ReceiveAllMessages = !1, e.PreciseJoinedAt = BigInt(0), e.UserAgent = "", e.ClientType = fe.Unknown, e.UniqueSessionId = "", e.Parameters = Object.create(null), e.SdkType = ve.Unknown, e.SdkCapability = 0, e.ViewportWidth = 0, e.ViewportHeight = 0, e.Theme = "", e.Timezone = "", e.IsTouchDevice = !1, e.InitialPath = "", e.InitialUrl = "", e.StyleFormat = he.Css, e.SupportsCompression = !0, e.IsSoftDisconnected = !1, e.SoftDisconnectAt = BigInt(0), e;
|
|
915
|
+
return e.ContextType = pe.Unknown, e.UserType = ge.Unknown, e.PayloadType = me.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.SnapshotVariant = "", e.IsReady = !1, e.HasInput = !1, e.AuthSessionId = "", e.IsAnonymous = !1, e.IsGlobal = !1, e.AuthProvider = "", e.SsoConnectionId = "", e.TestLinkId = "", e.TestLinkName = "", e.GeoCountry = "", e.GeoSubdivision = "", e.GeoCity = "", e.EdgeRttMsec = 0, e.ReceiveAllMessages = !1, e.PreciseJoinedAt = BigInt(0), e.UserAgent = "", e.ClientType = fe.Unknown, e.UniqueSessionId = "", e.Parameters = Object.create(null), e.SdkType = ve.Unknown, e.SdkCapability = 0, e.ViewportWidth = 0, e.ViewportHeight = 0, e.Theme = "", e.Timezone = "", e.IsTouchDevice = !1, e.InitialPath = "", e.InitialUrl = "", e.StyleFormat = he.Css, e.SupportsCompression = !0, e.IsSoftDisconnected = !1, e.SoftDisconnectAt = BigInt(0), e;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
918
|
-
let n = t ??
|
|
919
|
-
return F(n),
|
|
917
|
+
function Mt(e, t) {
|
|
918
|
+
let n = t ?? jt();
|
|
919
|
+
return F(n), Nt(e, n), n;
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function Nt(e, t) {
|
|
922
922
|
let n;
|
|
923
923
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
924
924
|
case ze:
|
|
@@ -1027,70 +1027,86 @@ function kt(e, t) {
|
|
|
1027
1027
|
break;
|
|
1028
1028
|
case dt:
|
|
1029
1029
|
if (n.isNull) throw Error();
|
|
1030
|
-
t.
|
|
1030
|
+
t.EdgeRttMsec = n.asInt32();
|
|
1031
1031
|
break;
|
|
1032
1032
|
case ft:
|
|
1033
1033
|
if (n.isNull) throw Error();
|
|
1034
|
-
t.
|
|
1034
|
+
t.PreciseJoinedAt = n.asUInt64();
|
|
1035
1035
|
break;
|
|
1036
1036
|
case pt:
|
|
1037
1037
|
if (n.isNull) throw Error();
|
|
1038
|
-
t.
|
|
1038
|
+
t.PayloadType = n.asInt32();
|
|
1039
1039
|
break;
|
|
1040
1040
|
case mt:
|
|
1041
1041
|
if (n.isNull) throw Error();
|
|
1042
|
-
t.
|
|
1042
|
+
t.StyleFormat = n.asInt32();
|
|
1043
1043
|
break;
|
|
1044
1044
|
case ht:
|
|
1045
1045
|
if (n.isNull) throw Error();
|
|
1046
|
-
t.
|
|
1046
|
+
t.IsTouchDevice = n.asBool();
|
|
1047
1047
|
break;
|
|
1048
1048
|
case gt:
|
|
1049
1049
|
if (n.isNull) throw Error();
|
|
1050
|
-
t.
|
|
1050
|
+
t.TestLinkId = n.asString();
|
|
1051
1051
|
break;
|
|
1052
1052
|
case _t:
|
|
1053
1053
|
if (n.isNull) throw Error();
|
|
1054
|
-
t.
|
|
1054
|
+
t.IsGlobal = n.asBool();
|
|
1055
1055
|
break;
|
|
1056
1056
|
case vt:
|
|
1057
1057
|
if (n.isNull) throw Error();
|
|
1058
|
-
t.
|
|
1058
|
+
t.SnapshotVariant = n.asString();
|
|
1059
1059
|
break;
|
|
1060
1060
|
case yt:
|
|
1061
1061
|
if (n.isNull) throw Error();
|
|
1062
|
-
t.
|
|
1062
|
+
t.VersionId = n.asString();
|
|
1063
1063
|
break;
|
|
1064
1064
|
case bt:
|
|
1065
1065
|
if (n.isNull) throw Error();
|
|
1066
|
-
t.
|
|
1066
|
+
t.GeoCity = n.asString();
|
|
1067
1067
|
break;
|
|
1068
1068
|
case xt:
|
|
1069
1069
|
if (n.isNull) throw Error();
|
|
1070
|
-
t.
|
|
1070
|
+
t.UniqueSessionId = n.asString();
|
|
1071
1071
|
break;
|
|
1072
1072
|
case St:
|
|
1073
1073
|
if (n.isNull) throw Error();
|
|
1074
|
-
t.
|
|
1074
|
+
t.ClientType = n.asInt32();
|
|
1075
1075
|
break;
|
|
1076
1076
|
case Ct:
|
|
1077
1077
|
if (n.isNull) throw Error();
|
|
1078
|
-
t.
|
|
1078
|
+
t.IsReady = n.asBool();
|
|
1079
1079
|
break;
|
|
1080
1080
|
case wt:
|
|
1081
1081
|
if (n.isNull) throw Error();
|
|
1082
|
-
t.
|
|
1082
|
+
t.Parameters = Pt(n.asDictionary());
|
|
1083
1083
|
break;
|
|
1084
1084
|
case Tt:
|
|
1085
1085
|
if (n.isNull) throw Error();
|
|
1086
|
-
t.
|
|
1086
|
+
t.TestLinkName = n.asString();
|
|
1087
1087
|
break;
|
|
1088
1088
|
case Et:
|
|
1089
|
+
if (n.isNull) throw Error();
|
|
1090
|
+
t.GeoSubdivision = n.asString();
|
|
1091
|
+
break;
|
|
1092
|
+
case Dt:
|
|
1093
|
+
if (n.isNull) throw Error();
|
|
1094
|
+
t.Timezone = n.asString();
|
|
1095
|
+
break;
|
|
1096
|
+
case Ot:
|
|
1097
|
+
if (n.isNull) throw Error();
|
|
1098
|
+
t.IsInternal = n.asBool();
|
|
1099
|
+
break;
|
|
1100
|
+
case kt:
|
|
1101
|
+
if (n.isNull) throw Error();
|
|
1102
|
+
t.GeoCountry = n.asString();
|
|
1103
|
+
break;
|
|
1104
|
+
case At:
|
|
1089
1105
|
if (n.isNull) throw Error();
|
|
1090
1106
|
t.AuthProvider = n.asString();
|
|
1091
1107
|
}
|
|
1092
1108
|
}
|
|
1093
|
-
function
|
|
1109
|
+
function Pt(e) {
|
|
1094
1110
|
let t = Object.create(null), n;
|
|
1095
1111
|
for (; (n = e.next()) !== null;) {
|
|
1096
1112
|
let e = n.key.asString();
|
|
@@ -1100,226 +1116,226 @@ function At(e) {
|
|
|
1100
1116
|
}
|
|
1101
1117
|
//#endregion
|
|
1102
1118
|
//#region ../../shared/protocol/src/messages/function.ts
|
|
1103
|
-
var
|
|
1104
|
-
function
|
|
1119
|
+
var Ft = 703025676, It = 814454131, Lt = 972460562, Rt = 976255570, zt = 1368629611, Bt = 1479280922, Vt = 1533537016, Ht = 1909301063, Ut = 2274386296, Wt = 2603556958, Gt = 2885165957, Kt = 3568439632;
|
|
1120
|
+
function qt(e) {
|
|
1105
1121
|
let t = {};
|
|
1106
1122
|
return I(t), e && Object.assign(t, e), t;
|
|
1107
1123
|
}
|
|
1108
1124
|
function I(e) {
|
|
1109
1125
|
return e.FunctionId = b.fromBytes(/* @__PURE__ */ 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;
|
|
1110
1126
|
}
|
|
1111
|
-
function
|
|
1112
|
-
let n = t ??
|
|
1113
|
-
return I(n),
|
|
1127
|
+
function Jt(e, t) {
|
|
1128
|
+
let n = t ?? qt();
|
|
1129
|
+
return I(n), Yt(e, n), n;
|
|
1114
1130
|
}
|
|
1115
|
-
function
|
|
1131
|
+
function Yt(e, t) {
|
|
1116
1132
|
let n;
|
|
1117
1133
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1118
|
-
case
|
|
1134
|
+
case Ft:
|
|
1119
1135
|
if (n.isNull) throw Error();
|
|
1120
1136
|
t.ResultTypeName = n.asString();
|
|
1121
1137
|
break;
|
|
1122
|
-
case
|
|
1138
|
+
case It:
|
|
1123
1139
|
if (n.isNull) throw Error();
|
|
1124
1140
|
t.FunctionName = n.asString();
|
|
1125
1141
|
break;
|
|
1126
|
-
case
|
|
1142
|
+
case Lt:
|
|
1127
1143
|
if (n.isNull) throw Error();
|
|
1128
1144
|
t.EnumerableItemTypeName = n.asString();
|
|
1129
1145
|
break;
|
|
1130
|
-
case
|
|
1146
|
+
case Rt:
|
|
1131
1147
|
if (n.isNull) throw Error();
|
|
1132
1148
|
t.FunctionId = n.asGuid();
|
|
1133
1149
|
break;
|
|
1134
|
-
case
|
|
1150
|
+
case zt:
|
|
1135
1151
|
if (n.isNull) throw Error();
|
|
1136
1152
|
t.Description = n.asString();
|
|
1137
1153
|
break;
|
|
1138
|
-
case
|
|
1154
|
+
case Bt:
|
|
1139
1155
|
if (n.isNull) throw Error();
|
|
1140
1156
|
t.IsCancellable = n.asBool();
|
|
1141
1157
|
break;
|
|
1142
|
-
case
|
|
1158
|
+
case Vt:
|
|
1143
1159
|
if (n.isNull) throw Error();
|
|
1144
1160
|
t.RequiresInstance = n.asBool();
|
|
1145
1161
|
break;
|
|
1146
|
-
case
|
|
1162
|
+
case Ht:
|
|
1147
1163
|
if (n.isNull) throw Error();
|
|
1148
|
-
t.Versions =
|
|
1164
|
+
t.Versions = Xt(n.asArray());
|
|
1149
1165
|
break;
|
|
1150
|
-
case
|
|
1166
|
+
case Ut:
|
|
1151
1167
|
if (n.isNull) throw Error();
|
|
1152
1168
|
t.LlmInlineResult = n.asBool();
|
|
1153
1169
|
break;
|
|
1154
|
-
case
|
|
1170
|
+
case Wt:
|
|
1155
1171
|
if (n.isNull) throw Error();
|
|
1156
1172
|
t.IsEnumerable = n.asBool();
|
|
1157
1173
|
break;
|
|
1158
|
-
case
|
|
1174
|
+
case Gt:
|
|
1159
1175
|
if (n.isNull) throw Error();
|
|
1160
|
-
t.Parameters =
|
|
1176
|
+
t.Parameters = Zt(n.asArray());
|
|
1161
1177
|
break;
|
|
1162
|
-
case
|
|
1178
|
+
case Kt:
|
|
1163
1179
|
if (n.isNull) throw Error();
|
|
1164
1180
|
t.LlmCallOnlyOnce = n.asBool();
|
|
1165
1181
|
}
|
|
1166
1182
|
}
|
|
1167
|
-
function
|
|
1183
|
+
function Xt(e) {
|
|
1168
1184
|
let t = [], n;
|
|
1169
1185
|
for (; (n = e.next()) !== null;) t.push(n.asString());
|
|
1170
1186
|
return t;
|
|
1171
1187
|
}
|
|
1172
|
-
function
|
|
1188
|
+
function Zt(e) {
|
|
1173
1189
|
let t = [], n;
|
|
1174
|
-
for (; (n = e.next()) !== null;) t.push(
|
|
1190
|
+
for (; (n = e.next()) !== null;) t.push(un(n.asObject()));
|
|
1175
1191
|
return t;
|
|
1176
1192
|
}
|
|
1177
|
-
var
|
|
1178
|
-
function
|
|
1193
|
+
var Qt = 607861992, $t = 894485888, en = 972460562, tn = 1368629611, nn = 1883521406, rn = 2603556958, an = 3609695522, on = 4075263697, sn = 4257460908;
|
|
1194
|
+
function cn(e) {
|
|
1179
1195
|
let t = {};
|
|
1180
|
-
return
|
|
1196
|
+
return ln(t), e && Object.assign(t, e), t;
|
|
1181
1197
|
}
|
|
1182
|
-
function
|
|
1198
|
+
function ln(e) {
|
|
1183
1199
|
return e.ParameterIndex = 0, e.ParameterName = "", e.TypeName = "", e.HasDefaultValue = !1, e.DefaultValueJson = "", e.DefaultValueData = /* @__PURE__ */ new Uint8Array(), e.IsEnumerable = !1, e.EnumerableItemTypeName = "", e.Description = "", e;
|
|
1184
1200
|
}
|
|
1185
|
-
function
|
|
1186
|
-
let n = t ??
|
|
1187
|
-
return
|
|
1201
|
+
function un(e, t) {
|
|
1202
|
+
let n = t ?? cn();
|
|
1203
|
+
return ln(n), dn(e, n), n;
|
|
1188
1204
|
}
|
|
1189
|
-
function
|
|
1205
|
+
function dn(e, t) {
|
|
1190
1206
|
let n;
|
|
1191
1207
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1192
|
-
case
|
|
1208
|
+
case Qt:
|
|
1193
1209
|
if (n.isNull) throw Error();
|
|
1194
1210
|
t.HasDefaultValue = n.asBool();
|
|
1195
1211
|
break;
|
|
1196
|
-
case
|
|
1212
|
+
case $t:
|
|
1197
1213
|
if (n.isNull) throw Error();
|
|
1198
1214
|
t.DefaultValueJson = n.asString();
|
|
1199
1215
|
break;
|
|
1200
|
-
case
|
|
1216
|
+
case en:
|
|
1201
1217
|
if (n.isNull) throw Error();
|
|
1202
1218
|
t.EnumerableItemTypeName = n.asString();
|
|
1203
1219
|
break;
|
|
1204
|
-
case
|
|
1220
|
+
case tn:
|
|
1205
1221
|
if (n.isNull) throw Error();
|
|
1206
1222
|
t.Description = n.asString();
|
|
1207
1223
|
break;
|
|
1208
|
-
case
|
|
1224
|
+
case nn:
|
|
1209
1225
|
if (n.isNull) throw Error();
|
|
1210
1226
|
t.DefaultValueData = n.asBinary();
|
|
1211
1227
|
break;
|
|
1212
|
-
case
|
|
1228
|
+
case rn:
|
|
1213
1229
|
if (n.isNull) throw Error();
|
|
1214
1230
|
t.IsEnumerable = n.asBool();
|
|
1215
1231
|
break;
|
|
1216
|
-
case
|
|
1232
|
+
case an:
|
|
1217
1233
|
if (n.isNull) throw Error();
|
|
1218
1234
|
t.TypeName = n.asString();
|
|
1219
1235
|
break;
|
|
1220
|
-
case
|
|
1236
|
+
case on:
|
|
1221
1237
|
if (n.isNull) throw Error();
|
|
1222
1238
|
t.ParameterName = n.asString();
|
|
1223
1239
|
break;
|
|
1224
|
-
case
|
|
1240
|
+
case sn:
|
|
1225
1241
|
if (n.isNull) throw Error();
|
|
1226
1242
|
t.ParameterIndex = n.asInt32();
|
|
1227
1243
|
}
|
|
1228
1244
|
}
|
|
1229
1245
|
//#endregion
|
|
1230
1246
|
//#region ../../shared/protocol/src/messages/ui.ts
|
|
1231
|
-
var
|
|
1232
|
-
function
|
|
1247
|
+
var fn = 1405462580, pn = 2968276160;
|
|
1248
|
+
function mn(e) {
|
|
1233
1249
|
let t = {};
|
|
1234
|
-
return
|
|
1250
|
+
return hn(t), e && Object.assign(t, e), t;
|
|
1235
1251
|
}
|
|
1236
|
-
function
|
|
1252
|
+
function hn(e) {
|
|
1237
1253
|
return e.MimeType = "", e.Value = /* @__PURE__ */ new Uint8Array(), e;
|
|
1238
1254
|
}
|
|
1239
|
-
function
|
|
1240
|
-
let n = t ??
|
|
1241
|
-
return
|
|
1255
|
+
function gn(e, t) {
|
|
1256
|
+
let n = t ?? mn();
|
|
1257
|
+
return hn(n), _n(e, n), n;
|
|
1242
1258
|
}
|
|
1243
|
-
function
|
|
1259
|
+
function _n(e, t) {
|
|
1244
1260
|
let n;
|
|
1245
1261
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1246
|
-
case
|
|
1262
|
+
case fn:
|
|
1247
1263
|
if (n.isNull) throw Error();
|
|
1248
1264
|
t.Value = n.asBinary();
|
|
1249
1265
|
break;
|
|
1250
|
-
case
|
|
1266
|
+
case pn:
|
|
1251
1267
|
if (n.isNull) throw Error();
|
|
1252
1268
|
t.MimeType = n.asString();
|
|
1253
1269
|
}
|
|
1254
1270
|
}
|
|
1255
|
-
var
|
|
1256
|
-
function
|
|
1271
|
+
var vn = 1048655, yn = 3469892363;
|
|
1272
|
+
function bn(e) {
|
|
1257
1273
|
let t = new h(1);
|
|
1258
|
-
return
|
|
1274
|
+
return xn(e, t), t.finish();
|
|
1259
1275
|
}
|
|
1260
|
-
function
|
|
1261
|
-
t.writeInt32Field(
|
|
1276
|
+
function xn(e, t) {
|
|
1277
|
+
t.writeInt32Field(yn, e.TrackId | 0);
|
|
1262
1278
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return c(
|
|
1279
|
+
function Sn(e, t, n) {
|
|
1280
|
+
return c(vn, bn(e), 1, t, n);
|
|
1265
1281
|
}
|
|
1266
|
-
var
|
|
1267
|
-
function
|
|
1282
|
+
var Cn = 2097153, wn = 3612929027;
|
|
1283
|
+
function Tn(e) {
|
|
1268
1284
|
let t = {};
|
|
1269
|
-
return
|
|
1285
|
+
return En(t), e && Object.assign(t, e), t;
|
|
1270
1286
|
}
|
|
1271
|
-
function
|
|
1287
|
+
function En(e) {
|
|
1272
1288
|
return e.Category = "", e;
|
|
1273
1289
|
}
|
|
1274
|
-
function
|
|
1275
|
-
return
|
|
1290
|
+
function Dn(e, t) {
|
|
1291
|
+
return On(_.create(e), t);
|
|
1276
1292
|
}
|
|
1277
|
-
function
|
|
1278
|
-
let n = t ??
|
|
1279
|
-
return
|
|
1293
|
+
function On(e, t) {
|
|
1294
|
+
let n = t ?? Tn();
|
|
1295
|
+
return En(n), kn(e, n), n;
|
|
1280
1296
|
}
|
|
1281
|
-
function
|
|
1297
|
+
function kn(e, t) {
|
|
1282
1298
|
let n;
|
|
1283
1299
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1284
|
-
case
|
|
1300
|
+
case wn:
|
|
1285
1301
|
if (n.isNull) throw Error();
|
|
1286
1302
|
t.Category = n.asString();
|
|
1287
1303
|
}
|
|
1288
1304
|
}
|
|
1289
|
-
async function
|
|
1290
|
-
return
|
|
1305
|
+
async function An(e, t) {
|
|
1306
|
+
return Dn(await s(e, Cn, 1), t);
|
|
1291
1307
|
}
|
|
1292
|
-
var
|
|
1293
|
-
function
|
|
1308
|
+
var jn = 2097188, Mn = 979822885, Nn = 2374537704;
|
|
1309
|
+
function Pn(e) {
|
|
1294
1310
|
let t = {};
|
|
1295
|
-
return
|
|
1311
|
+
return Fn(t), e && Object.assign(t, e), t;
|
|
1296
1312
|
}
|
|
1297
|
-
function
|
|
1313
|
+
function Fn(e) {
|
|
1298
1314
|
return e.StyleId = "", e.Style = Object.create(null), e;
|
|
1299
1315
|
}
|
|
1300
|
-
function
|
|
1301
|
-
return
|
|
1316
|
+
function In(e, t) {
|
|
1317
|
+
return Ln(_.create(e), t);
|
|
1302
1318
|
}
|
|
1303
|
-
function
|
|
1304
|
-
let n = t ??
|
|
1305
|
-
return
|
|
1319
|
+
function Ln(e, t) {
|
|
1320
|
+
let n = t ?? Pn();
|
|
1321
|
+
return Fn(n), Rn(e, n), n;
|
|
1306
1322
|
}
|
|
1307
|
-
function
|
|
1323
|
+
function Rn(e, t) {
|
|
1308
1324
|
let n;
|
|
1309
1325
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1310
|
-
case
|
|
1326
|
+
case Mn:
|
|
1311
1327
|
if (n.isNull) throw Error();
|
|
1312
1328
|
t.StyleId = n.asString();
|
|
1313
1329
|
break;
|
|
1314
|
-
case
|
|
1330
|
+
case Nn:
|
|
1315
1331
|
if (n.isNull) throw Error();
|
|
1316
|
-
t.Style =
|
|
1332
|
+
t.Style = Bn(n.asDictionary());
|
|
1317
1333
|
}
|
|
1318
1334
|
}
|
|
1319
|
-
async function
|
|
1320
|
-
return
|
|
1335
|
+
async function zn(e, t) {
|
|
1336
|
+
return In(await s(e, jn, 1), t);
|
|
1321
1337
|
}
|
|
1322
|
-
function
|
|
1338
|
+
function Bn(e) {
|
|
1323
1339
|
let t = Object.create(null), n;
|
|
1324
1340
|
for (; (n = e.next()) !== null;) {
|
|
1325
1341
|
let e = n.key.asString();
|
|
@@ -1327,62 +1343,62 @@ function In(e) {
|
|
|
1327
1343
|
}
|
|
1328
1344
|
return t;
|
|
1329
1345
|
}
|
|
1330
|
-
var
|
|
1331
|
-
function
|
|
1346
|
+
var Vn = 2097192, Hn = 2136687806;
|
|
1347
|
+
function Un(e) {
|
|
1332
1348
|
let t = {};
|
|
1333
|
-
return
|
|
1349
|
+
return Wn(t), e && Object.assign(t, e), t;
|
|
1334
1350
|
}
|
|
1335
|
-
function
|
|
1351
|
+
function Wn(e) {
|
|
1336
1352
|
return e.Styles = [], e;
|
|
1337
1353
|
}
|
|
1338
|
-
function
|
|
1339
|
-
return
|
|
1354
|
+
function Gn(e, t) {
|
|
1355
|
+
return Kn(_.create(e), t);
|
|
1340
1356
|
}
|
|
1341
|
-
function
|
|
1342
|
-
let n = t ??
|
|
1343
|
-
return
|
|
1357
|
+
function Kn(e, t) {
|
|
1358
|
+
let n = t ?? Un();
|
|
1359
|
+
return Wn(n), qn(e, n), n;
|
|
1344
1360
|
}
|
|
1345
|
-
function
|
|
1361
|
+
function qn(e, t) {
|
|
1346
1362
|
let n;
|
|
1347
1363
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1348
|
-
case
|
|
1364
|
+
case Hn:
|
|
1349
1365
|
if (n.isNull) throw Error();
|
|
1350
|
-
t.Styles =
|
|
1366
|
+
t.Styles = Yn(n.asArray());
|
|
1351
1367
|
}
|
|
1352
1368
|
}
|
|
1353
|
-
async function
|
|
1354
|
-
return
|
|
1369
|
+
async function Jn(e, t) {
|
|
1370
|
+
return Gn(await s(e, Vn, 1), t);
|
|
1355
1371
|
}
|
|
1356
|
-
function
|
|
1372
|
+
function Yn(e) {
|
|
1357
1373
|
let t = [], n;
|
|
1358
|
-
for (; (n = e.next()) !== null;) t.push(
|
|
1374
|
+
for (; (n = e.next()) !== null;) t.push(er(n.asObject()));
|
|
1359
1375
|
return t;
|
|
1360
1376
|
}
|
|
1361
|
-
var
|
|
1362
|
-
function
|
|
1377
|
+
var Xn = 979822885, Zn = 2374537704;
|
|
1378
|
+
function Qn(e) {
|
|
1363
1379
|
let t = {};
|
|
1364
|
-
return
|
|
1380
|
+
return $n(t), e && Object.assign(t, e), t;
|
|
1365
1381
|
}
|
|
1366
|
-
function
|
|
1382
|
+
function $n(e) {
|
|
1367
1383
|
return e.StyleId = "", e.Style = Object.create(null), e;
|
|
1368
1384
|
}
|
|
1369
|
-
function
|
|
1370
|
-
let n = t ??
|
|
1371
|
-
return
|
|
1385
|
+
function er(e, t) {
|
|
1386
|
+
let n = t ?? Qn();
|
|
1387
|
+
return $n(n), tr(e, n), n;
|
|
1372
1388
|
}
|
|
1373
|
-
function
|
|
1389
|
+
function tr(e, t) {
|
|
1374
1390
|
let n;
|
|
1375
1391
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1376
|
-
case
|
|
1392
|
+
case Xn:
|
|
1377
1393
|
if (n.isNull) throw Error();
|
|
1378
1394
|
t.StyleId = n.asString();
|
|
1379
1395
|
break;
|
|
1380
|
-
case
|
|
1396
|
+
case Zn:
|
|
1381
1397
|
if (n.isNull) throw Error();
|
|
1382
|
-
t.Style =
|
|
1398
|
+
t.Style = nr(n.asDictionary());
|
|
1383
1399
|
}
|
|
1384
1400
|
}
|
|
1385
|
-
function
|
|
1401
|
+
function nr(e) {
|
|
1386
1402
|
let t = Object.create(null), n;
|
|
1387
1403
|
for (; (n = e.next()) !== null;) {
|
|
1388
1404
|
let e = n.key.asString();
|
|
@@ -1390,392 +1406,392 @@ function Qn(e) {
|
|
|
1390
1406
|
}
|
|
1391
1407
|
return t;
|
|
1392
1408
|
}
|
|
1393
|
-
var
|
|
1394
|
-
function
|
|
1409
|
+
var rr = 2097193, ir = 1415642792;
|
|
1410
|
+
function ar(e) {
|
|
1395
1411
|
let t = {};
|
|
1396
|
-
return
|
|
1412
|
+
return or(t), e && Object.assign(t, e), t;
|
|
1397
1413
|
}
|
|
1398
|
-
function
|
|
1414
|
+
function or(e) {
|
|
1399
1415
|
return e.StyleIds = [], e;
|
|
1400
1416
|
}
|
|
1401
|
-
function
|
|
1402
|
-
return
|
|
1417
|
+
function sr(e, t) {
|
|
1418
|
+
return cr(_.create(e), t);
|
|
1403
1419
|
}
|
|
1404
|
-
function
|
|
1405
|
-
let n = t ??
|
|
1406
|
-
return
|
|
1420
|
+
function cr(e, t) {
|
|
1421
|
+
let n = t ?? ar();
|
|
1422
|
+
return or(n), lr(e, n), n;
|
|
1407
1423
|
}
|
|
1408
|
-
function
|
|
1424
|
+
function lr(e, t) {
|
|
1409
1425
|
let n;
|
|
1410
1426
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1411
|
-
case
|
|
1427
|
+
case ir:
|
|
1412
1428
|
if (n.isNull) throw Error();
|
|
1413
|
-
t.StyleIds =
|
|
1429
|
+
t.StyleIds = dr(n.asArray());
|
|
1414
1430
|
}
|
|
1415
1431
|
}
|
|
1416
|
-
async function
|
|
1417
|
-
return
|
|
1432
|
+
async function ur(e, t) {
|
|
1433
|
+
return sr(await s(e, rr, 1), t);
|
|
1418
1434
|
}
|
|
1419
|
-
function
|
|
1435
|
+
function dr(e) {
|
|
1420
1436
|
let t = [], n;
|
|
1421
1437
|
for (; (n = e.next()) !== null;) t.push(n.asString());
|
|
1422
1438
|
return t;
|
|
1423
1439
|
}
|
|
1424
|
-
var
|
|
1425
|
-
function
|
|
1440
|
+
var fr = 2097190, pr = 425183262, mr = 653781469;
|
|
1441
|
+
function hr(e) {
|
|
1426
1442
|
let t = {};
|
|
1427
|
-
return
|
|
1443
|
+
return gr(t), e && Object.assign(t, e), t;
|
|
1428
1444
|
}
|
|
1429
|
-
function
|
|
1445
|
+
function gr(e) {
|
|
1430
1446
|
return e.Json = "", e.Payloads = Object.create(null), e;
|
|
1431
1447
|
}
|
|
1432
|
-
function
|
|
1433
|
-
return
|
|
1448
|
+
function _r(e, t) {
|
|
1449
|
+
return vr(_.create(e), t);
|
|
1434
1450
|
}
|
|
1435
|
-
function
|
|
1436
|
-
let n = t ??
|
|
1437
|
-
return
|
|
1451
|
+
function vr(e, t) {
|
|
1452
|
+
let n = t ?? hr();
|
|
1453
|
+
return gr(n), yr(e, n), n;
|
|
1438
1454
|
}
|
|
1439
|
-
function
|
|
1455
|
+
function yr(e, t) {
|
|
1440
1456
|
let n;
|
|
1441
1457
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1442
|
-
case
|
|
1458
|
+
case pr:
|
|
1443
1459
|
if (n.isNull) throw Error();
|
|
1444
1460
|
t.Json = n.asString();
|
|
1445
1461
|
break;
|
|
1446
|
-
case
|
|
1462
|
+
case mr:
|
|
1447
1463
|
if (n.isNull) throw Error();
|
|
1448
|
-
t.Payloads =
|
|
1464
|
+
t.Payloads = xr(n.asDictionary());
|
|
1449
1465
|
}
|
|
1450
1466
|
}
|
|
1451
|
-
async function
|
|
1452
|
-
return
|
|
1467
|
+
async function br(e, t) {
|
|
1468
|
+
return _r(await s(e, fr, 1), t);
|
|
1453
1469
|
}
|
|
1454
|
-
function
|
|
1470
|
+
function xr(e) {
|
|
1455
1471
|
let t = Object.create(null), n;
|
|
1456
1472
|
for (; (n = e.next()) !== null;) {
|
|
1457
1473
|
let e = n.key.asString();
|
|
1458
|
-
t[e] =
|
|
1474
|
+
t[e] = gn(n.value.asObject());
|
|
1459
1475
|
}
|
|
1460
1476
|
return t;
|
|
1461
1477
|
}
|
|
1462
|
-
var
|
|
1463
|
-
function
|
|
1478
|
+
var Sr = 1048636, Cr = 2610786289;
|
|
1479
|
+
function wr(e) {
|
|
1464
1480
|
let t = new h(1);
|
|
1465
|
-
return
|
|
1481
|
+
return Tr(e, t), t.finish();
|
|
1466
1482
|
}
|
|
1467
|
-
function
|
|
1468
|
-
t.writeUInt32Field(
|
|
1483
|
+
function Tr(e, t) {
|
|
1484
|
+
t.writeUInt32Field(Cr, e.Version >>> 0);
|
|
1469
1485
|
}
|
|
1470
|
-
function
|
|
1471
|
-
return c(
|
|
1486
|
+
function Er(e, t, n) {
|
|
1487
|
+
return c(Sr, wr(e), 1, t, n);
|
|
1472
1488
|
}
|
|
1473
1489
|
//#endregion
|
|
1474
1490
|
//#region ../../shared/protocol/src/messages/video.ts
|
|
1475
|
-
var
|
|
1476
|
-
function
|
|
1491
|
+
var Dr = 161083277, Or = 164808083, kr = 1368629611, Ar = 2514959030, jr = 2745379226, Mr = 2950031986, Nr = 3282782683, Pr = 3284746250, Fr = 4065070594;
|
|
1492
|
+
function Ir(e) {
|
|
1477
1493
|
let t = {};
|
|
1478
|
-
return
|
|
1494
|
+
return Lr(t), e && Object.assign(t, e), t;
|
|
1479
1495
|
}
|
|
1480
|
-
function
|
|
1496
|
+
function Lr(e) {
|
|
1481
1497
|
return e.StreamId = "", e.Description = "", e.SourceType = "", e.Codec = _e.H264, e.CodecDetails = "", e.Width = 0, e.Height = 0, e.Framerate = 30, e.CorrelationId = void 0, e;
|
|
1482
1498
|
}
|
|
1483
|
-
function
|
|
1484
|
-
let n = t ??
|
|
1485
|
-
return
|
|
1499
|
+
function Rr(e, t) {
|
|
1500
|
+
let n = t ?? Ir();
|
|
1501
|
+
return Lr(n), zr(e, n), n;
|
|
1486
1502
|
}
|
|
1487
|
-
function
|
|
1503
|
+
function zr(e, t) {
|
|
1488
1504
|
let n;
|
|
1489
1505
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1490
|
-
case
|
|
1506
|
+
case Dr:
|
|
1491
1507
|
if (n.isNull) throw Error();
|
|
1492
1508
|
t.StreamId = n.asString();
|
|
1493
1509
|
break;
|
|
1494
|
-
case
|
|
1510
|
+
case Or:
|
|
1495
1511
|
if (n.isNull) throw Error();
|
|
1496
1512
|
t.Framerate = n.asFloat64();
|
|
1497
1513
|
break;
|
|
1498
|
-
case
|
|
1514
|
+
case kr:
|
|
1499
1515
|
if (n.isNull) throw Error();
|
|
1500
1516
|
t.Description = n.asString();
|
|
1501
1517
|
break;
|
|
1502
|
-
case
|
|
1518
|
+
case Ar:
|
|
1503
1519
|
if (n.isNull) {
|
|
1504
1520
|
t.CorrelationId = void 0;
|
|
1505
1521
|
break;
|
|
1506
1522
|
}
|
|
1507
1523
|
t.CorrelationId = n.asString();
|
|
1508
1524
|
break;
|
|
1509
|
-
case
|
|
1525
|
+
case jr:
|
|
1510
1526
|
if (n.isNull) throw Error();
|
|
1511
1527
|
t.CodecDetails = n.asString();
|
|
1512
1528
|
break;
|
|
1513
|
-
case
|
|
1529
|
+
case Mr:
|
|
1514
1530
|
if (n.isNull) throw Error();
|
|
1515
1531
|
t.Height = n.asInt32();
|
|
1516
1532
|
break;
|
|
1517
|
-
case
|
|
1533
|
+
case Nr:
|
|
1518
1534
|
if (n.isNull) throw Error();
|
|
1519
1535
|
t.SourceType = n.asString();
|
|
1520
1536
|
break;
|
|
1521
|
-
case
|
|
1537
|
+
case Pr:
|
|
1522
1538
|
if (n.isNull) throw Error();
|
|
1523
1539
|
t.Codec = n.asInt32();
|
|
1524
1540
|
break;
|
|
1525
|
-
case
|
|
1541
|
+
case Fr:
|
|
1526
1542
|
if (n.isNull) throw Error();
|
|
1527
1543
|
t.Width = n.asInt32();
|
|
1528
1544
|
}
|
|
1529
1545
|
}
|
|
1530
|
-
var
|
|
1531
|
-
function
|
|
1546
|
+
var Br = 65539, Vr = 620476198, Hr = 693643444, Ur = 1144553441, Wr = 1731742060, Gr = 1931178803, Kr = 2191393509, qr = 2563358196, Jr = 3042922213, Yr = 3064612128, Xr = 3219210453, Zr = 3504054055, Qr = 3678477544, $r = 3696445035, ei = 3707543140, ti = 3712281496, ni = 3895362455, ri = 3897397815, ii = 4225107827, ai = 976837618, oi = 2271236852, si = 2277643855, ci = 3914217035;
|
|
1547
|
+
function li(e) {
|
|
1532
1548
|
let t = {};
|
|
1533
|
-
return
|
|
1549
|
+
return ui(t), e && Object.assign(t, e), t;
|
|
1534
1550
|
}
|
|
1535
|
-
function
|
|
1551
|
+
function ui(e) {
|
|
1536
1552
|
return e.Clients = Object.create(null), e.Functions = Object.create(null), e.UIStreams = Object.create(null), e.AudioStreams = Object.create(null), e.VideoStreams = Object.create(null), e.SpaceId = "", e.IkonServerId = "", e.AppSessionId = "", e.SessionIdentityHash = "", e.SpaceUrl = "", e.SessionUrl = "", e.FirstUserId = "", e.PrimaryUserId = "", e.OrganisationName = "", e.SpaceName = "", e.ServerRunType = ye.Local, e.PublicAccess = !1, e.DebugMode = !1, e.retiredFields = void 0, e;
|
|
1537
1553
|
}
|
|
1538
|
-
function
|
|
1539
|
-
return
|
|
1554
|
+
function di(e, t) {
|
|
1555
|
+
return fi(_.create(e), t);
|
|
1540
1556
|
}
|
|
1541
|
-
function
|
|
1542
|
-
let n = t ??
|
|
1543
|
-
return
|
|
1557
|
+
function fi(e, t) {
|
|
1558
|
+
let n = t ?? li();
|
|
1559
|
+
return ui(n), pi(e, n), n;
|
|
1544
1560
|
}
|
|
1545
|
-
function
|
|
1561
|
+
function pi(e, t) {
|
|
1546
1562
|
let n;
|
|
1547
1563
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1548
|
-
case
|
|
1564
|
+
case Vr:
|
|
1549
1565
|
if (n.isNull) throw Error();
|
|
1550
1566
|
t.IkonServerId = n.asString();
|
|
1551
1567
|
break;
|
|
1552
|
-
case
|
|
1568
|
+
case Hr:
|
|
1553
1569
|
if (n.isNull) throw Error();
|
|
1554
1570
|
t.FirstUserId = n.asString();
|
|
1555
1571
|
break;
|
|
1556
|
-
case
|
|
1572
|
+
case Ur:
|
|
1557
1573
|
if (n.isNull) throw Error();
|
|
1558
|
-
t.Clients =
|
|
1574
|
+
t.Clients = hi(n.asDictionary());
|
|
1559
1575
|
break;
|
|
1560
|
-
case
|
|
1576
|
+
case Wr:
|
|
1561
1577
|
if (n.isNull) throw Error();
|
|
1562
1578
|
t.AppSessionId = n.asString();
|
|
1563
1579
|
break;
|
|
1564
|
-
case
|
|
1580
|
+
case Gr:
|
|
1565
1581
|
if (n.isNull) throw Error();
|
|
1566
1582
|
t.SessionIdentityHash = n.asString();
|
|
1567
1583
|
break;
|
|
1568
|
-
case
|
|
1584
|
+
case Kr:
|
|
1569
1585
|
if (n.isNull) throw Error();
|
|
1570
1586
|
t.SessionUrl = n.asString();
|
|
1571
1587
|
break;
|
|
1572
|
-
case
|
|
1588
|
+
case qr:
|
|
1573
1589
|
if (n.isNull) throw Error();
|
|
1574
1590
|
t.SpaceUrl = n.asString();
|
|
1575
1591
|
break;
|
|
1576
|
-
case
|
|
1592
|
+
case Jr:
|
|
1577
1593
|
if (n.isNull) throw Error();
|
|
1578
1594
|
t.PublicAccess = n.asBool();
|
|
1579
1595
|
break;
|
|
1580
|
-
case
|
|
1596
|
+
case Yr:
|
|
1581
1597
|
if (n.isNull) throw Error();
|
|
1582
1598
|
t.ServerRunType = n.asInt32();
|
|
1583
1599
|
break;
|
|
1584
|
-
case
|
|
1600
|
+
case Xr:
|
|
1585
1601
|
if (n.isNull) throw Error();
|
|
1586
1602
|
t.OrganisationName = n.asString();
|
|
1587
1603
|
break;
|
|
1588
|
-
case
|
|
1604
|
+
case Zr:
|
|
1589
1605
|
if (n.isNull) throw Error();
|
|
1590
1606
|
t.DebugMode = n.asBool();
|
|
1591
1607
|
break;
|
|
1592
|
-
case
|
|
1608
|
+
case Qr:
|
|
1593
1609
|
if (n.isNull) throw Error();
|
|
1594
|
-
t.Functions =
|
|
1610
|
+
t.Functions = gi(n.asDictionary());
|
|
1595
1611
|
break;
|
|
1596
|
-
case
|
|
1612
|
+
case $r:
|
|
1597
1613
|
if (n.isNull) throw Error();
|
|
1598
|
-
t.UIStreams =
|
|
1614
|
+
t.UIStreams = _i(n.asDictionary());
|
|
1599
1615
|
break;
|
|
1600
|
-
case
|
|
1616
|
+
case ei:
|
|
1601
1617
|
if (n.isNull) throw Error();
|
|
1602
1618
|
t.SpaceId = n.asString();
|
|
1603
1619
|
break;
|
|
1604
|
-
case
|
|
1620
|
+
case ti:
|
|
1605
1621
|
if (n.isNull) throw Error();
|
|
1606
1622
|
t.PrimaryUserId = n.asString();
|
|
1607
1623
|
break;
|
|
1608
|
-
case
|
|
1624
|
+
case ni:
|
|
1609
1625
|
if (n.isNull) throw Error();
|
|
1610
|
-
t.AudioStreams =
|
|
1626
|
+
t.AudioStreams = vi(n.asDictionary());
|
|
1611
1627
|
break;
|
|
1612
|
-
case
|
|
1628
|
+
case ri:
|
|
1613
1629
|
if (n.isNull) throw Error();
|
|
1614
|
-
t.VideoStreams =
|
|
1630
|
+
t.VideoStreams = yi(n.asDictionary());
|
|
1615
1631
|
break;
|
|
1616
|
-
case
|
|
1632
|
+
case ii:
|
|
1617
1633
|
if (n.isNull) throw Error();
|
|
1618
1634
|
t.SpaceName = n.asString();
|
|
1619
1635
|
break;
|
|
1620
|
-
case
|
|
1636
|
+
case ai:
|
|
1621
1637
|
if (n.isNull) break;
|
|
1622
1638
|
(t.retiredFields ??= {}).SessionHash = n.asString();
|
|
1623
1639
|
break;
|
|
1624
|
-
case
|
|
1640
|
+
case oi:
|
|
1625
1641
|
if (n.isNull) break;
|
|
1626
1642
|
(t.retiredFields ??= {}).SessionChannelUrl = n.asString();
|
|
1627
1643
|
break;
|
|
1628
|
-
case
|
|
1644
|
+
case si:
|
|
1629
1645
|
if (n.isNull) break;
|
|
1630
1646
|
(t.retiredFields ??= {}).ChannelUrl = n.asString();
|
|
1631
1647
|
break;
|
|
1632
|
-
case
|
|
1648
|
+
case ci:
|
|
1633
1649
|
if (n.isNull) break;
|
|
1634
1650
|
(t.retiredFields ??= {}).ServerSessionId = n.asString();
|
|
1635
1651
|
}
|
|
1636
1652
|
}
|
|
1637
|
-
async function
|
|
1638
|
-
return
|
|
1653
|
+
async function mi(e, t) {
|
|
1654
|
+
return di(await s(e, Br, 11), t);
|
|
1639
1655
|
}
|
|
1640
|
-
function
|
|
1656
|
+
function hi(e) {
|
|
1641
1657
|
let t = Object.create(null), n;
|
|
1642
1658
|
for (; (n = e.next()) !== null;) {
|
|
1643
1659
|
let e = n.key.asInt32();
|
|
1644
|
-
t[e] =
|
|
1660
|
+
t[e] = Mt(n.value.asObject());
|
|
1645
1661
|
}
|
|
1646
1662
|
return t;
|
|
1647
1663
|
}
|
|
1648
|
-
function
|
|
1664
|
+
function gi(e) {
|
|
1649
1665
|
let t = Object.create(null), n;
|
|
1650
1666
|
for (; (n = e.next()) !== null;) {
|
|
1651
1667
|
let e = n.key.asInt32();
|
|
1652
|
-
t[e] =
|
|
1668
|
+
t[e] = bi(n.value.asArray());
|
|
1653
1669
|
}
|
|
1654
1670
|
return t;
|
|
1655
1671
|
}
|
|
1656
|
-
function
|
|
1672
|
+
function _i(e) {
|
|
1657
1673
|
let t = Object.create(null), n;
|
|
1658
1674
|
for (; (n = e.next()) !== null;) {
|
|
1659
1675
|
let e = n.key.asString();
|
|
1660
|
-
t[e] =
|
|
1676
|
+
t[e] = Di(n.value.asObject());
|
|
1661
1677
|
}
|
|
1662
1678
|
return t;
|
|
1663
1679
|
}
|
|
1664
|
-
function
|
|
1680
|
+
function vi(e) {
|
|
1665
1681
|
let t = Object.create(null), n;
|
|
1666
1682
|
for (; (n = e.next()) !== null;) {
|
|
1667
1683
|
let e = n.key.asString();
|
|
1668
|
-
t[e] =
|
|
1684
|
+
t[e] = Fi(n.value.asObject());
|
|
1669
1685
|
}
|
|
1670
1686
|
return t;
|
|
1671
1687
|
}
|
|
1672
|
-
function
|
|
1688
|
+
function yi(e) {
|
|
1673
1689
|
let t = Object.create(null), n;
|
|
1674
1690
|
for (; (n = e.next()) !== null;) {
|
|
1675
1691
|
let e = n.key.asString();
|
|
1676
|
-
t[e] =
|
|
1692
|
+
t[e] = Ui(n.value.asObject());
|
|
1677
1693
|
}
|
|
1678
1694
|
return t;
|
|
1679
1695
|
}
|
|
1680
|
-
function
|
|
1696
|
+
function bi(e) {
|
|
1681
1697
|
let t = [], n;
|
|
1682
|
-
for (; (n = e.next()) !== null;) t.push(
|
|
1698
|
+
for (; (n = e.next()) !== null;) t.push(Jt(n.asObject()));
|
|
1683
1699
|
return t;
|
|
1684
1700
|
}
|
|
1685
|
-
var
|
|
1686
|
-
function
|
|
1701
|
+
var xi = 161083277, Si = 325678206, Ci = 3469892363, wi = 3645544153;
|
|
1702
|
+
function Ti(e) {
|
|
1687
1703
|
let t = {};
|
|
1688
|
-
return
|
|
1704
|
+
return Ei(t), e && Object.assign(t, e), t;
|
|
1689
1705
|
}
|
|
1690
|
-
function
|
|
1691
|
-
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info =
|
|
1706
|
+
function Ei(e) {
|
|
1707
|
+
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Tn(), e;
|
|
1692
1708
|
}
|
|
1693
|
-
function
|
|
1694
|
-
let n = t ??
|
|
1695
|
-
return
|
|
1709
|
+
function Di(e, t) {
|
|
1710
|
+
let n = t ?? Ti();
|
|
1711
|
+
return Ei(n), Oi(e, n), n;
|
|
1696
1712
|
}
|
|
1697
|
-
function
|
|
1713
|
+
function Oi(e, t) {
|
|
1698
1714
|
let n;
|
|
1699
1715
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1700
|
-
case
|
|
1716
|
+
case xi:
|
|
1701
1717
|
if (n.isNull) throw Error();
|
|
1702
1718
|
t.StreamId = n.asString();
|
|
1703
1719
|
break;
|
|
1704
|
-
case
|
|
1720
|
+
case Si:
|
|
1705
1721
|
if (n.isNull) throw Error();
|
|
1706
1722
|
t.ClientSessionId = n.asInt32();
|
|
1707
1723
|
break;
|
|
1708
|
-
case
|
|
1724
|
+
case Ci:
|
|
1709
1725
|
if (n.isNull) throw Error();
|
|
1710
1726
|
t.TrackId = n.asInt32();
|
|
1711
1727
|
break;
|
|
1712
|
-
case
|
|
1728
|
+
case wi:
|
|
1713
1729
|
if (n.isNull) throw Error();
|
|
1714
|
-
t.Info =
|
|
1730
|
+
t.Info = On(n.asObject());
|
|
1715
1731
|
}
|
|
1716
1732
|
}
|
|
1717
|
-
var
|
|
1718
|
-
function
|
|
1733
|
+
var ki = 161083277, Ai = 325678206, ji = 3469892363, Mi = 3645544153;
|
|
1734
|
+
function Ni(e) {
|
|
1719
1735
|
let t = {};
|
|
1720
|
-
return
|
|
1736
|
+
return Pi(t), e && Object.assign(t, e), t;
|
|
1721
1737
|
}
|
|
1722
|
-
function
|
|
1738
|
+
function Pi(e) {
|
|
1723
1739
|
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = M(), e;
|
|
1724
1740
|
}
|
|
1725
|
-
function
|
|
1726
|
-
let n = t ??
|
|
1727
|
-
return
|
|
1741
|
+
function Fi(e, t) {
|
|
1742
|
+
let n = t ?? Ni();
|
|
1743
|
+
return Pi(n), Ii(e, n), n;
|
|
1728
1744
|
}
|
|
1729
|
-
function
|
|
1745
|
+
function Ii(e, t) {
|
|
1730
1746
|
let n;
|
|
1731
1747
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1732
|
-
case
|
|
1748
|
+
case ki:
|
|
1733
1749
|
if (n.isNull) throw Error();
|
|
1734
1750
|
t.StreamId = n.asString();
|
|
1735
1751
|
break;
|
|
1736
|
-
case
|
|
1752
|
+
case Ai:
|
|
1737
1753
|
if (n.isNull) throw Error();
|
|
1738
1754
|
t.ClientSessionId = n.asInt32();
|
|
1739
1755
|
break;
|
|
1740
|
-
case
|
|
1756
|
+
case ji:
|
|
1741
1757
|
if (n.isNull) throw Error();
|
|
1742
1758
|
t.TrackId = n.asInt32();
|
|
1743
1759
|
break;
|
|
1744
|
-
case
|
|
1760
|
+
case Mi:
|
|
1745
1761
|
if (n.isNull) throw Error();
|
|
1746
1762
|
t.Info = ke(n.asObject());
|
|
1747
1763
|
}
|
|
1748
1764
|
}
|
|
1749
|
-
var
|
|
1750
|
-
function
|
|
1765
|
+
var Li = 161083277, Ri = 325678206, zi = 3469892363, Bi = 3645544153;
|
|
1766
|
+
function Vi(e) {
|
|
1751
1767
|
let t = {};
|
|
1752
|
-
return
|
|
1768
|
+
return Hi(t), e && Object.assign(t, e), t;
|
|
1753
1769
|
}
|
|
1754
|
-
function
|
|
1755
|
-
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info =
|
|
1770
|
+
function Hi(e) {
|
|
1771
|
+
return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Ir(), e;
|
|
1756
1772
|
}
|
|
1757
|
-
function
|
|
1758
|
-
let n = t ??
|
|
1759
|
-
return
|
|
1773
|
+
function Ui(e, t) {
|
|
1774
|
+
let n = t ?? Vi();
|
|
1775
|
+
return Hi(n), Wi(e, n), n;
|
|
1760
1776
|
}
|
|
1761
|
-
function
|
|
1777
|
+
function Wi(e, t) {
|
|
1762
1778
|
let n;
|
|
1763
1779
|
for (; (n = e.next()) !== null;) switch (n.fieldId) {
|
|
1764
|
-
case
|
|
1780
|
+
case Li:
|
|
1765
1781
|
if (n.isNull) throw Error();
|
|
1766
1782
|
t.StreamId = n.asString();
|
|
1767
1783
|
break;
|
|
1768
|
-
case
|
|
1784
|
+
case Ri:
|
|
1769
1785
|
if (n.isNull) throw Error();
|
|
1770
1786
|
t.ClientSessionId = n.asInt32();
|
|
1771
1787
|
break;
|
|
1772
|
-
case
|
|
1788
|
+
case zi:
|
|
1773
1789
|
if (n.isNull) throw Error();
|
|
1774
1790
|
t.TrackId = n.asInt32();
|
|
1775
1791
|
break;
|
|
1776
|
-
case
|
|
1792
|
+
case Bi:
|
|
1777
1793
|
if (n.isNull) throw Error();
|
|
1778
|
-
t.Info =
|
|
1794
|
+
t.Info = Rr(n.asObject());
|
|
1779
1795
|
}
|
|
1780
1796
|
}
|
|
1781
1797
|
//#endregion
|
|
@@ -1783,7 +1799,7 @@ function Bi(e, t) {
|
|
|
1783
1799
|
function L(e) {
|
|
1784
1800
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1785
1801
|
}
|
|
1786
|
-
function
|
|
1802
|
+
function Gi(e) {
|
|
1787
1803
|
let t = {}, n = Object.keys(e);
|
|
1788
1804
|
for (let r = 0; r < n.length; r++) {
|
|
1789
1805
|
let i = n[r];
|
|
@@ -1791,7 +1807,7 @@ function Vi(e) {
|
|
|
1791
1807
|
}
|
|
1792
1808
|
return t;
|
|
1793
1809
|
}
|
|
1794
|
-
function
|
|
1810
|
+
function Ki(e, t, n, r) {
|
|
1795
1811
|
if (!(e === void 0 && r)) {
|
|
1796
1812
|
if (Array.isArray(e)) {
|
|
1797
1813
|
let r = [];
|
|
@@ -1815,11 +1831,11 @@ function R(e, t) {
|
|
|
1815
1831
|
let s = {};
|
|
1816
1832
|
if (i != null) {
|
|
1817
1833
|
if (!L(i)) throw Error(`Invalid props for node ${n}`);
|
|
1818
|
-
s =
|
|
1834
|
+
s = Gi(i);
|
|
1819
1835
|
}
|
|
1820
1836
|
let c = [];
|
|
1821
1837
|
Array.isArray(a) && (c = a.map((e, n) => R(e ?? {}, `${t}.children[${n}]`)));
|
|
1822
|
-
let l =
|
|
1838
|
+
let l = Ki(o, t, n, !1), u = typeof e.SourceMarker == "string" ? e.SourceMarker : void 0;
|
|
1823
1839
|
return {
|
|
1824
1840
|
id: n,
|
|
1825
1841
|
type: r,
|
|
@@ -1829,7 +1845,7 @@ function R(e, t) {
|
|
|
1829
1845
|
...u ? { sourceMarker: u } : {}
|
|
1830
1846
|
};
|
|
1831
1847
|
}
|
|
1832
|
-
function
|
|
1848
|
+
function qi(e, t) {
|
|
1833
1849
|
if (!L(e)) throw Error(`Invalid text delta at ${t}`);
|
|
1834
1850
|
let n = e.NodeId, r = e.PropertyName, i = e.Start, a = e.End, o = e.InsertedText;
|
|
1835
1851
|
if (typeof n != "string" || n.length === 0) throw Error(`Invalid text delta node id at ${t}`);
|
|
@@ -1849,7 +1865,7 @@ function Ui(e, t) {
|
|
|
1849
1865
|
insertedText: o
|
|
1850
1866
|
};
|
|
1851
1867
|
}
|
|
1852
|
-
function
|
|
1868
|
+
function Ji(e, t) {
|
|
1853
1869
|
if (!L(e)) throw Error(`Invalid child insert at ${t}`);
|
|
1854
1870
|
let n = e.Index, r = e.Node;
|
|
1855
1871
|
if (typeof n != "number" || !Number.isFinite(n)) throw Error(`Invalid child insert index at ${t}`);
|
|
@@ -1859,7 +1875,7 @@ function Wi(e, t) {
|
|
|
1859
1875
|
node: R(r, `${t}.node`)
|
|
1860
1876
|
};
|
|
1861
1877
|
}
|
|
1862
|
-
function
|
|
1878
|
+
function Yi(e, t) {
|
|
1863
1879
|
if (!L(e)) throw Error(`Invalid child move at ${t}`);
|
|
1864
1880
|
let n = e.NodeId, r = e.FromIndex, i = e.ToIndex;
|
|
1865
1881
|
if (typeof n != "string" || n.length === 0) throw Error(`Invalid child move nodeId at ${t}`);
|
|
@@ -1871,7 +1887,7 @@ function Gi(e, t) {
|
|
|
1871
1887
|
toIndex: i
|
|
1872
1888
|
};
|
|
1873
1889
|
}
|
|
1874
|
-
function
|
|
1890
|
+
function Xi(e, t) {
|
|
1875
1891
|
if (!L(e)) throw Error(`Invalid child remove at ${t}`);
|
|
1876
1892
|
let n = e.NodeId, r = e.Index;
|
|
1877
1893
|
if (typeof n != "string" || n.length === 0) throw Error(`Invalid child remove nodeId at ${t}`);
|
|
@@ -1881,20 +1897,20 @@ function Ki(e, t) {
|
|
|
1881
1897
|
index: r
|
|
1882
1898
|
};
|
|
1883
1899
|
}
|
|
1884
|
-
function
|
|
1900
|
+
function Zi(e, t) {
|
|
1885
1901
|
if (!L(e)) throw Error(`Invalid node change at ${t}`);
|
|
1886
1902
|
let n = e.nodeId;
|
|
1887
1903
|
if (typeof n != "string" || n.length === 0) throw Error(`Invalid node change nodeId at ${t}`);
|
|
1888
|
-
let r = Array.isArray(e.inserts) ? e.inserts.map((e, n) =>
|
|
1904
|
+
let r = Array.isArray(e.inserts) ? e.inserts.map((e, n) => Ji(e ?? {}, `${t}.inserts[${n}]`)) : void 0, i = Array.isArray(e.moves) ? e.moves.map((e, n) => Yi(e ?? {}, `${t}.moves[${n}]`)) : void 0, a = Array.isArray(e.removals) ? e.removals.map((e, n) => Xi(e ?? {}, `${t}.removals[${n}]`)) : void 0, o;
|
|
1889
1905
|
if (L(e.changedProps)) {
|
|
1890
1906
|
o = /* @__PURE__ */ new Map();
|
|
1891
1907
|
for (let [t, n] of Object.entries(e.changedProps)) {
|
|
1892
1908
|
if (!L(n)) continue;
|
|
1893
1909
|
let e = n.New;
|
|
1894
|
-
e == null ? o.set(t, void 0) : L(e) ? o.set(t,
|
|
1910
|
+
e == null ? o.set(t, void 0) : L(e) ? o.set(t, Gi(e)) : o.set(t, e);
|
|
1895
1911
|
}
|
|
1896
1912
|
}
|
|
1897
|
-
let s = Array.isArray(e.textUpdates) ? e.textUpdates.map((e, n) =>
|
|
1913
|
+
let s = Array.isArray(e.textUpdates) ? e.textUpdates.map((e, n) => qi(e ?? {}, `${t}.textUpdates[${n}]`)) : void 0, c = e.styleIds, l = c === void 0 ? void 0 : Ki(c, t, n, !0);
|
|
1898
1914
|
return {
|
|
1899
1915
|
nodeId: n,
|
|
1900
1916
|
...r && r.length > 0 ? { inserts: r } : {},
|
|
@@ -1905,12 +1921,12 @@ function qi(e, t) {
|
|
|
1905
1921
|
...l === void 0 ? {} : { styleIds: l }
|
|
1906
1922
|
};
|
|
1907
1923
|
}
|
|
1908
|
-
function
|
|
1924
|
+
function Qi(e) {
|
|
1909
1925
|
let t = /* @__PURE__ */ new Map();
|
|
1910
1926
|
for (let [n, r] of Object.entries(e)) t.set(n, r);
|
|
1911
1927
|
return t;
|
|
1912
1928
|
}
|
|
1913
|
-
function
|
|
1929
|
+
function $i(e, t, n) {
|
|
1914
1930
|
if (!e || typeof e != "object") throw new z("UI update graph is missing");
|
|
1915
1931
|
let r = R(e, "graph");
|
|
1916
1932
|
if (r.type !== "root") throw new z("UI update root element must have type \"root\"");
|
|
@@ -1918,15 +1934,15 @@ function Yi(e, t, n) {
|
|
|
1918
1934
|
type: "full",
|
|
1919
1935
|
version: n,
|
|
1920
1936
|
root: r,
|
|
1921
|
-
metadata:
|
|
1937
|
+
metadata: ta(r.props, t)
|
|
1922
1938
|
};
|
|
1923
1939
|
}
|
|
1924
|
-
function
|
|
1940
|
+
function ea(e, t, n) {
|
|
1925
1941
|
if (!Array.isArray(e)) throw new z("UI diff changes must be an array");
|
|
1926
1942
|
if (!L(t)) throw new z("UI diff metadata must be an object");
|
|
1927
1943
|
let r = t.viewId;
|
|
1928
1944
|
if (typeof r != "string" || r.length === 0) throw new z("UI diff metadata is missing viewId");
|
|
1929
|
-
let i = e.map((e, t) =>
|
|
1945
|
+
let i = e.map((e, t) => Zi(e ?? {}, `changes[${t}]`)), a = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0;
|
|
1930
1946
|
return {
|
|
1931
1947
|
type: "diff",
|
|
1932
1948
|
version: n,
|
|
@@ -1937,7 +1953,7 @@ function Xi(e, t, n) {
|
|
|
1937
1953
|
}
|
|
1938
1954
|
};
|
|
1939
1955
|
}
|
|
1940
|
-
function
|
|
1956
|
+
function ta(e, t) {
|
|
1941
1957
|
let n = e.viewId;
|
|
1942
1958
|
if (typeof n != "string" || n.length === 0) throw new z("UI update root is missing viewId");
|
|
1943
1959
|
let r = n, i = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0;
|
|
@@ -1964,13 +1980,13 @@ function B(e) {
|
|
|
1964
1980
|
if (n !== "full" && n !== "diff") throw new z(`Unknown UI update type: ${String(n)}`);
|
|
1965
1981
|
if (typeof r != "number") throw new z("UI update version must be a number");
|
|
1966
1982
|
return {
|
|
1967
|
-
snapshot: n === "full" ?
|
|
1968
|
-
payloads: e.Payloads ?
|
|
1983
|
+
snapshot: n === "full" ? $i(t.graph, t.metadata, r) : ea(t.changes, t.metadata, r),
|
|
1984
|
+
payloads: e.Payloads ? Qi(e.Payloads) : /* @__PURE__ */ new Map()
|
|
1969
1985
|
};
|
|
1970
1986
|
}
|
|
1971
1987
|
//#endregion
|
|
1972
1988
|
//#region src/handler-cache.ts
|
|
1973
|
-
var
|
|
1989
|
+
var na = class {
|
|
1974
1990
|
cache = /* @__PURE__ */ new Map();
|
|
1975
1991
|
getHandler(e, t, n) {
|
|
1976
1992
|
let r = `${e}:${t}`, i = this.cache.get(r);
|
|
@@ -2009,7 +2025,7 @@ var Qi = class {
|
|
|
2009
2025
|
get size() {
|
|
2010
2026
|
return this.cache.size;
|
|
2011
2027
|
}
|
|
2012
|
-
},
|
|
2028
|
+
}, ra = e("UiStreamStore"), ia = class {
|
|
2013
2029
|
views = /* @__PURE__ */ new Map();
|
|
2014
2030
|
listeners = /* @__PURE__ */ new Set();
|
|
2015
2031
|
payloads = /* @__PURE__ */ new Map();
|
|
@@ -2027,7 +2043,7 @@ var Qi = class {
|
|
|
2027
2043
|
resyncNeeded = !1;
|
|
2028
2044
|
viewsDirty = !0;
|
|
2029
2045
|
payloadsDirty = !0;
|
|
2030
|
-
handlerCache = new
|
|
2046
|
+
handlerCache = new na();
|
|
2031
2047
|
nodeIndex = /* @__PURE__ */ new Map();
|
|
2032
2048
|
indexedViews;
|
|
2033
2049
|
apply(e) {
|
|
@@ -2047,11 +2063,11 @@ var Qi = class {
|
|
|
2047
2063
|
let s = !1;
|
|
2048
2064
|
this.rootViewId || (this.rootViewId = i, s = !0, this.structureChanged = !0);
|
|
2049
2065
|
let c = a.root;
|
|
2050
|
-
if (t.type === "full") a.root = t.root, a.version = t.version, s = !0, this.viewsDirty = !0, this.structureChanged = !0, t.root &&
|
|
2066
|
+
if (t.type === "full") a.root = t.root, a.version = t.version, s = !0, this.viewsDirty = !0, this.structureChanged = !0, t.root && H(t.root, this.changedNodeIds);
|
|
2051
2067
|
else {
|
|
2052
2068
|
if (!c) return this.resyncNeeded = !0, !1;
|
|
2053
|
-
let e =
|
|
2054
|
-
e === c ? a.root = e : (a.root = e, s = !0, this.viewsDirty = !0,
|
|
2069
|
+
let e = aa(c, t.changes);
|
|
2070
|
+
e === c ? a.root = e : (a.root = e, s = !0, this.viewsDirty = !0, W(c, e, this.changedNodeIds)), a.version = t.version;
|
|
2055
2071
|
}
|
|
2056
2072
|
for (let [e, t] of n) this.payloads.get(e) !== t && (this.payloads.set(e, t), s = !0, this.payloadsDirty = !0);
|
|
2057
2073
|
return s ? (this.commitSnapshot(), this.notify(), !0) : (a.version = t.version, !1);
|
|
@@ -2080,7 +2096,7 @@ var Qi = class {
|
|
|
2080
2096
|
if (e.deleteViews && e.deleteViews.length > 0) for (let t of e.deleteViews) a().delete(t) && (n = !0, this.structureChanged = !0);
|
|
2081
2097
|
if (e.upsertViews && e.upsertViews.length > 0) for (let [t, r] of e.upsertViews) {
|
|
2082
2098
|
let e = a(), i = e.get(t);
|
|
2083
|
-
i !== r && (e.set(t, r), n = !0, i ?
|
|
2099
|
+
i !== r && (e.set(t, r), n = !0, i ? W(i, r, this.changedNodeIds) : (H(r, this.changedNodeIds), this.structureChanged = !0));
|
|
2084
2100
|
}
|
|
2085
2101
|
if (e.deletePayloads && e.deletePayloads.length > 0) for (let t of e.deletePayloads) o().delete(t) && (n = !0);
|
|
2086
2102
|
if (e.upsertPayloads && e.upsertPayloads.length > 0) for (let [t, r] of e.upsertPayloads) {
|
|
@@ -2108,7 +2124,7 @@ var Qi = class {
|
|
|
2108
2124
|
(t.rootViewId !== e.rootViewId || t.views.size !== e.views.size) && (this.structureChanged = !0);
|
|
2109
2125
|
for (let [n, r] of e.views) {
|
|
2110
2126
|
let e = t.views.get(n);
|
|
2111
|
-
e ?
|
|
2127
|
+
e ? W(e, r, this.changedNodeIds) : (H(r, this.changedNodeIds), this.structureChanged = !0);
|
|
2112
2128
|
}
|
|
2113
2129
|
for (let e of this.changedNodeIds) this.nodeVersions.set(e, (this.nodeVersions.get(e) ?? 0) + 1);
|
|
2114
2130
|
return this.snapshot = e, n && this.notify(), n;
|
|
@@ -2140,7 +2156,7 @@ var Qi = class {
|
|
|
2140
2156
|
}
|
|
2141
2157
|
rebuildNodeIndex(e) {
|
|
2142
2158
|
this.nodeIndex.clear();
|
|
2143
|
-
for (let t of e.values())
|
|
2159
|
+
for (let t of e.values()) sa(t, this.nodeIndex);
|
|
2144
2160
|
for (let [t, n] of e) this.nodeIndex.set(t, n);
|
|
2145
2161
|
this.indexedViews = e;
|
|
2146
2162
|
}
|
|
@@ -2182,7 +2198,7 @@ var Qi = class {
|
|
|
2182
2198
|
for (let e of this.listeners) e();
|
|
2183
2199
|
}
|
|
2184
2200
|
}
|
|
2185
|
-
},
|
|
2201
|
+
}, V = class {
|
|
2186
2202
|
streams = /* @__PURE__ */ new Map();
|
|
2187
2203
|
listeners = /* @__PURE__ */ new Set();
|
|
2188
2204
|
apply(e, t) {
|
|
@@ -2252,35 +2268,35 @@ var Qi = class {
|
|
|
2252
2268
|
}
|
|
2253
2269
|
getOrCreateStreamEntry(e) {
|
|
2254
2270
|
let t = this.streams.get(e);
|
|
2255
|
-
return t || (t = { store: new
|
|
2271
|
+
return t || (t = { store: new ia() }, this.streams.set(e, t)), t;
|
|
2256
2272
|
}
|
|
2257
2273
|
notify(e) {
|
|
2258
2274
|
for (let t of this.listeners) t(e);
|
|
2259
2275
|
}
|
|
2260
2276
|
};
|
|
2261
|
-
function
|
|
2277
|
+
function aa(e, t, n) {
|
|
2262
2278
|
if (t.length === 0) return e;
|
|
2263
2279
|
let r = /* @__PURE__ */ new Map();
|
|
2264
2280
|
for (let e of t) r.set(e.nodeId, e);
|
|
2265
|
-
return
|
|
2281
|
+
return oa(e, r, n);
|
|
2266
2282
|
}
|
|
2267
|
-
function
|
|
2283
|
+
function oa(e, t, n) {
|
|
2268
2284
|
let r = t.get(e.id), i = e, a = !1;
|
|
2269
2285
|
if (r?.textUpdates && r.textUpdates.length > 0) {
|
|
2270
|
-
let t =
|
|
2286
|
+
let t = pa(e, r.textUpdates, n);
|
|
2271
2287
|
i = t.node, a = t.changed;
|
|
2272
2288
|
}
|
|
2273
2289
|
let o = !1, s = i.props;
|
|
2274
2290
|
if (r?.changedProps && r.changedProps.size > 0) for (let [e, t] of r.changedProps.entries()) {
|
|
2275
2291
|
let n = s[e];
|
|
2276
|
-
if (t === void 0) (n !== void 0 || e in s) && (o ||= (s =
|
|
2277
|
-
else if (
|
|
2278
|
-
let r =
|
|
2279
|
-
|
|
2280
|
-
} else
|
|
2292
|
+
if (t === void 0) (n !== void 0 || e in s) && (o ||= (s = G(s), !0), delete s[e]);
|
|
2293
|
+
else if (K(t)) {
|
|
2294
|
+
let r = G(t);
|
|
2295
|
+
q(r, n) || (o ||= (s = G(s), !0), s[e] = r);
|
|
2296
|
+
} else q(t, n) || (o ||= (s = G(s), !0), s[e] = t);
|
|
2281
2297
|
}
|
|
2282
2298
|
let c = !1, l = i.styleIds;
|
|
2283
|
-
r?.styleIds !== void 0 && (
|
|
2299
|
+
r?.styleIds !== void 0 && (da(i.styleIds, r.styleIds) || (l = r.styleIds, c = !0));
|
|
2284
2300
|
let u = i.children ?? [], d = u, f = !1;
|
|
2285
2301
|
if (r?.removals && r.removals.length > 0 || r?.moves && r.moves.length > 0 || r?.inserts && r.inserts.length > 0) {
|
|
2286
2302
|
let e = d.slice();
|
|
@@ -2311,7 +2327,7 @@ function ra(e, t, n) {
|
|
|
2311
2327
|
});
|
|
2312
2328
|
}
|
|
2313
2329
|
if (r?.inserts) {
|
|
2314
|
-
for (let n of r.inserts) (e.some((e) => e.id === n.node.id) || t.has(n.node.id)) &&
|
|
2330
|
+
for (let n of r.inserts) (e.some((e) => e.id === n.node.id) || t.has(n.node.id)) && ra.warn(`Duplicate node id '${n.node.id}' (type '${n.node.type}') inserted next to an existing sibling — UI tree diverged from the server`), i.push({
|
|
2315
2331
|
index: n.index,
|
|
2316
2332
|
node: n.node,
|
|
2317
2333
|
isInsert: !0
|
|
@@ -2321,13 +2337,13 @@ function ra(e, t, n) {
|
|
|
2321
2337
|
i.sort((e, t) => e.index - t.index);
|
|
2322
2338
|
for (let t of i) {
|
|
2323
2339
|
let r = Math.min(t.index, e.length);
|
|
2324
|
-
e.splice(r, 0, t.node), t.isInsert && n &&
|
|
2340
|
+
e.splice(r, 0, t.node), t.isInsert && n && H(t.node, n);
|
|
2325
2341
|
}
|
|
2326
2342
|
d = e;
|
|
2327
2343
|
}
|
|
2328
2344
|
let p;
|
|
2329
2345
|
for (let e = 0; e < d.length; e++) {
|
|
2330
|
-
let r = d[e], i =
|
|
2346
|
+
let r = d[e], i = oa(r, t, n);
|
|
2331
2347
|
i !== r && (p ||= d.slice(), p[e] = i);
|
|
2332
2348
|
}
|
|
2333
2349
|
p && (d = p, f = !0);
|
|
@@ -2341,57 +2357,57 @@ function ra(e, t, n) {
|
|
|
2341
2357
|
...e.sourceMarker ? { sourceMarker: e.sourceMarker } : {}
|
|
2342
2358
|
} : e;
|
|
2343
2359
|
}
|
|
2344
|
-
function
|
|
2345
|
-
if (t.add(e.id), e.children) for (let n of e.children)
|
|
2360
|
+
function H(e, t) {
|
|
2361
|
+
if (t.add(e.id), e.children) for (let n of e.children) H(n, t);
|
|
2346
2362
|
}
|
|
2347
|
-
function
|
|
2348
|
-
if (t.set(e.id, e), e.children) for (let n of e.children)
|
|
2363
|
+
function sa(e, t) {
|
|
2364
|
+
if (t.set(e.id, e), e.children) for (let n of e.children) sa(n, t);
|
|
2349
2365
|
}
|
|
2350
|
-
var
|
|
2351
|
-
function
|
|
2352
|
-
for (;
|
|
2353
|
-
return
|
|
2366
|
+
var U = [];
|
|
2367
|
+
function ca(e) {
|
|
2368
|
+
for (; U.length <= e;) U.push(/* @__PURE__ */ new Map());
|
|
2369
|
+
return U[e].clear(), U[e];
|
|
2354
2370
|
}
|
|
2355
|
-
function
|
|
2356
|
-
|
|
2371
|
+
function W(e, t, n) {
|
|
2372
|
+
la(e, t, n, 0);
|
|
2357
2373
|
}
|
|
2358
|
-
function
|
|
2374
|
+
function la(e, t, n, r) {
|
|
2359
2375
|
if (e === t) return;
|
|
2360
|
-
(e.type !== t.type || !
|
|
2376
|
+
(e.type !== t.type || !ua(e.props, t.props) || !da(e.styleIds, t.styleIds)) && n.add(t.id);
|
|
2361
2377
|
let i = e.children ?? [], a = t.children ?? [];
|
|
2362
2378
|
if (i !== a) {
|
|
2363
|
-
let e =
|
|
2379
|
+
let e = ca(r);
|
|
2364
2380
|
for (let t of i) e.set(t.id, t);
|
|
2365
2381
|
let o = !1;
|
|
2366
2382
|
for (let t = 0; t < a.length; t++) {
|
|
2367
2383
|
let s = a[t], c = e.get(s.id);
|
|
2368
|
-
c ? (
|
|
2384
|
+
c ? (la(c, s, n, r + 1), !o && t < i.length && i[t].id !== s.id && (o = !0)) : (H(s, n), o = !0);
|
|
2369
2385
|
}
|
|
2370
2386
|
(i.length !== a.length || o) && n.add(t.id);
|
|
2371
2387
|
}
|
|
2372
2388
|
}
|
|
2373
|
-
function
|
|
2374
|
-
return
|
|
2389
|
+
function ua(e, t) {
|
|
2390
|
+
return q(e, t);
|
|
2375
2391
|
}
|
|
2376
|
-
function
|
|
2377
|
-
return
|
|
2392
|
+
function da(e, t) {
|
|
2393
|
+
return q(e, t);
|
|
2378
2394
|
}
|
|
2379
|
-
function
|
|
2395
|
+
function fa(e, t) {
|
|
2380
2396
|
if (t.length === 0) return e;
|
|
2381
2397
|
let n = [...t].sort((e, t) => e.start - t.start), r = e, i = 0;
|
|
2382
2398
|
for (let e of n) {
|
|
2383
|
-
let t =
|
|
2399
|
+
let t = ha(e.start + i, 0, r.length);
|
|
2384
2400
|
if (e.end == null) {
|
|
2385
|
-
let n = r.slice(t), a =
|
|
2401
|
+
let n = r.slice(t), a = ga(n, e.insertedText);
|
|
2386
2402
|
r = r.slice(0, t) + e.insertedText + n.slice(a), i += e.insertedText.length - a;
|
|
2387
2403
|
continue;
|
|
2388
2404
|
}
|
|
2389
|
-
let n =
|
|
2405
|
+
let n = ha(e.end + i, t, r.length), a = n - t;
|
|
2390
2406
|
r = r.slice(0, t) + e.insertedText + r.slice(n), i += e.insertedText.length - a;
|
|
2391
2407
|
}
|
|
2392
2408
|
return r;
|
|
2393
2409
|
}
|
|
2394
|
-
function
|
|
2410
|
+
function pa(e, t, n) {
|
|
2395
2411
|
if (t.length === 0) return {
|
|
2396
2412
|
node: e,
|
|
2397
2413
|
changed: !1
|
|
@@ -2401,9 +2417,9 @@ function ua(e, t, n) {
|
|
|
2401
2417
|
let t = r.get(e.nodeId);
|
|
2402
2418
|
t ? t.push(e) : r.set(e.nodeId, [e]);
|
|
2403
2419
|
}
|
|
2404
|
-
return
|
|
2420
|
+
return ma(e, r, n);
|
|
2405
2421
|
}
|
|
2406
|
-
function
|
|
2422
|
+
function ma(e, t, n) {
|
|
2407
2423
|
let r = t.get(e.id) ?? [], i = !1, a = e.props;
|
|
2408
2424
|
if (r.length > 0) {
|
|
2409
2425
|
let e = /* @__PURE__ */ new Map();
|
|
@@ -2412,15 +2428,15 @@ function da(e, t, n) {
|
|
|
2412
2428
|
n ? n.push(t) : e.set(t.propertyName, [t]);
|
|
2413
2429
|
}
|
|
2414
2430
|
for (let [t, n] of e.entries()) {
|
|
2415
|
-
let e = a[t], r =
|
|
2416
|
-
i ||= (a =
|
|
2431
|
+
let e = a[t], r = fa(typeof e == "string" ? e : "", n);
|
|
2432
|
+
i ||= (a = G(a), !0), a[t] = r;
|
|
2417
2433
|
}
|
|
2418
2434
|
}
|
|
2419
2435
|
let o = !1, s = e.children ?? [], c = s;
|
|
2420
2436
|
if (s.length > 0) {
|
|
2421
2437
|
let e;
|
|
2422
2438
|
for (let r = 0; r < s.length; r++) {
|
|
2423
|
-
let i = s[r], a =
|
|
2439
|
+
let i = s[r], a = ma(i, t, n);
|
|
2424
2440
|
a.changed && (e ||= [...s], e[r] = a.node);
|
|
2425
2441
|
}
|
|
2426
2442
|
e && (c = e, o = !0);
|
|
@@ -2440,15 +2456,15 @@ function da(e, t, n) {
|
|
|
2440
2456
|
changed: !0
|
|
2441
2457
|
});
|
|
2442
2458
|
}
|
|
2443
|
-
function
|
|
2459
|
+
function ha(e, t, n) {
|
|
2444
2460
|
return Math.max(t, Math.min(n, e));
|
|
2445
2461
|
}
|
|
2446
|
-
function
|
|
2462
|
+
function ga(e, t) {
|
|
2447
2463
|
let n = Math.min(e.length, t.length), r = 0;
|
|
2448
2464
|
for (; r < n && e.charCodeAt(r) === t.charCodeAt(r);) r++;
|
|
2449
2465
|
return r;
|
|
2450
2466
|
}
|
|
2451
|
-
function
|
|
2467
|
+
function G(e) {
|
|
2452
2468
|
let t = {}, n = Object.keys(e);
|
|
2453
2469
|
for (let r = 0; r < n.length; r++) {
|
|
2454
2470
|
let i = n[r];
|
|
@@ -2456,27 +2472,27 @@ function W(e) {
|
|
|
2456
2472
|
}
|
|
2457
2473
|
return t;
|
|
2458
2474
|
}
|
|
2459
|
-
function
|
|
2475
|
+
function K(e) {
|
|
2460
2476
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
2461
2477
|
}
|
|
2462
|
-
function
|
|
2478
|
+
function q(e, t) {
|
|
2463
2479
|
if (Object.is(e, t)) return !0;
|
|
2464
2480
|
if (Array.isArray(e) && Array.isArray(t)) {
|
|
2465
2481
|
if (e.length !== t.length) return !1;
|
|
2466
|
-
for (let n = 0; n < e.length; n++) if (!
|
|
2482
|
+
for (let n = 0; n < e.length; n++) if (!q(e[n], t[n])) return !1;
|
|
2467
2483
|
return !0;
|
|
2468
2484
|
}
|
|
2469
|
-
if (
|
|
2485
|
+
if (K(e) && K(t)) {
|
|
2470
2486
|
let n = Object.keys(e), r = Object.keys(t);
|
|
2471
2487
|
if (n.length !== r.length) return !1;
|
|
2472
|
-
for (let r of n) if (!
|
|
2488
|
+
for (let r of n) if (!q(e[r], t[r])) return !1;
|
|
2473
2489
|
return !0;
|
|
2474
2490
|
}
|
|
2475
2491
|
return !1;
|
|
2476
2492
|
}
|
|
2477
2493
|
//#endregion
|
|
2478
2494
|
//#region src/boot-snapshot-route.ts
|
|
2479
|
-
function
|
|
2495
|
+
function J(e) {
|
|
2480
2496
|
let t = e;
|
|
2481
2497
|
try {
|
|
2482
2498
|
t = decodeURIComponent(t);
|
|
@@ -2484,7 +2500,7 @@ function q(e) {
|
|
|
2484
2500
|
for (t.startsWith("/") || (t = `/${t}`); t.length > 1 && t.endsWith("/");) t = t.slice(0, -1);
|
|
2485
2501
|
return t;
|
|
2486
2502
|
}
|
|
2487
|
-
function
|
|
2503
|
+
function _a(e, t) {
|
|
2488
2504
|
let n = e.split("/").filter((e) => e.length > 0), r = t.split("/").filter((e) => e.length > 0), i = n.length > 0 && n[n.length - 1] === "**", a = i ? n.length - 1 : n.length;
|
|
2489
2505
|
if (i ? r.length < a : r.length !== a) return !1;
|
|
2490
2506
|
for (let e = 0; e < a; e++) {
|
|
@@ -2493,9 +2509,9 @@ function ma(e, t) {
|
|
|
2493
2509
|
}
|
|
2494
2510
|
return !0;
|
|
2495
2511
|
}
|
|
2496
|
-
function
|
|
2497
|
-
let i =
|
|
2498
|
-
for (let e of c ?? []) if (
|
|
2512
|
+
function va(e, t, n, r) {
|
|
2513
|
+
let i = J(n), a = t?.file || void 0, o = (a && J(t?.route || "/") === i ? a : void 0) ?? e?.routes?.[i] ?? void 0, s, c = r === "signed-in" ? e?.signedInSeeds : e?.guestSeeds;
|
|
2514
|
+
for (let e of c ?? []) if (_a(e.match, i)) {
|
|
2499
2515
|
s = e.file || void 0;
|
|
2500
2516
|
break;
|
|
2501
2517
|
}
|
|
@@ -2503,20 +2519,20 @@ function ha(e, t, n, r) {
|
|
|
2503
2519
|
}
|
|
2504
2520
|
//#endregion
|
|
2505
2521
|
//#region src/ui-stream-category.ts
|
|
2506
|
-
var
|
|
2507
|
-
function
|
|
2522
|
+
var ya = "ikon-ui", ba = "ikon.platform";
|
|
2523
|
+
function xa(e) {
|
|
2508
2524
|
return e ?? "ikon-ui";
|
|
2509
2525
|
}
|
|
2510
|
-
function
|
|
2526
|
+
function Sa(e, t) {
|
|
2511
2527
|
let n = /* @__PURE__ */ new Set();
|
|
2512
2528
|
for (let r of e) r.category === void 0 || t(r.streamId) || r.rootViewId && r.views.has(r.rootViewId) && n.add(r.category);
|
|
2513
2529
|
return n;
|
|
2514
2530
|
}
|
|
2515
2531
|
//#endregion
|
|
2516
2532
|
//#region src/live-snapshot.ts
|
|
2517
|
-
var
|
|
2518
|
-
function
|
|
2519
|
-
return typeof location < "u" ?
|
|
2533
|
+
var Y = e("LiveSnapshot"), Ca = 3, X = "ikon-live-snapshot", wa = 3e5, Ta = 5e6, Ea = 1e3;
|
|
2534
|
+
function Da() {
|
|
2535
|
+
return typeof location < "u" ? J(location.pathname) : "/";
|
|
2520
2536
|
}
|
|
2521
2537
|
function Z() {
|
|
2522
2538
|
try {
|
|
@@ -2525,11 +2541,11 @@ function Z() {
|
|
|
2525
2541
|
return null;
|
|
2526
2542
|
}
|
|
2527
2543
|
}
|
|
2528
|
-
function
|
|
2544
|
+
function Oa(e) {
|
|
2529
2545
|
let t = typeof requestIdleCallback < "u" ? requestIdleCallback : null;
|
|
2530
2546
|
t ? t(() => e(), { timeout: 2e3 }) : setTimeout(e, 0);
|
|
2531
2547
|
}
|
|
2532
|
-
var
|
|
2548
|
+
var ka = class {
|
|
2533
2549
|
key;
|
|
2534
2550
|
appId;
|
|
2535
2551
|
userId;
|
|
@@ -2544,7 +2560,7 @@ var Ta = class {
|
|
|
2544
2560
|
static clearAll() {
|
|
2545
2561
|
let e = Z();
|
|
2546
2562
|
if (!e) return;
|
|
2547
|
-
let t = `${
|
|
2563
|
+
let t = `${X}:`, n = [];
|
|
2548
2564
|
try {
|
|
2549
2565
|
for (let r = 0; r < e.length; r++) {
|
|
2550
2566
|
let i = e.key(r);
|
|
@@ -2554,7 +2570,7 @@ var Ta = class {
|
|
|
2554
2570
|
} catch {}
|
|
2555
2571
|
}
|
|
2556
2572
|
constructor(e) {
|
|
2557
|
-
this.appId = e.appId, this.userId = e.userId, this.disabled = !this.userId, this.maxAgeMs = e.maxAgeMs ??
|
|
2573
|
+
this.appId = e.appId, this.userId = e.userId, this.disabled = !this.userId, this.maxAgeMs = e.maxAgeMs ?? wa, this.maxBytes = e.maxBytes ?? Ta, this.debounceMs = e.debounceMs ?? Ea, this.key = `${X}:${this.appId}:${this.userId}`, this.disabled || this.pruneOtherUsers();
|
|
2558
2574
|
}
|
|
2559
2575
|
load() {
|
|
2560
2576
|
if (this.disabled) return null;
|
|
@@ -2573,15 +2589,15 @@ var Ta = class {
|
|
|
2573
2589
|
} catch {
|
|
2574
2590
|
return this.remove(), null;
|
|
2575
2591
|
}
|
|
2576
|
-
if (n.schemaVersion !==
|
|
2577
|
-
if (n.path !==
|
|
2592
|
+
if (n.schemaVersion !== Ca || n.appId !== this.appId || n.userId !== this.userId || !Number.isFinite(n.savedAtMs) || Date.now() - n.savedAtMs > this.maxAgeMs) return this.remove(), null;
|
|
2593
|
+
if (n.path !== Da()) return null;
|
|
2578
2594
|
try {
|
|
2579
2595
|
return {
|
|
2580
|
-
streams: n.streams.map(
|
|
2596
|
+
streams: n.streams.map(Ma),
|
|
2581
2597
|
styles: n.styles ?? []
|
|
2582
2598
|
};
|
|
2583
2599
|
} catch (e) {
|
|
2584
|
-
return
|
|
2600
|
+
return Y.warn("Failed to deserialize stored live snapshot, dropping it", e), this.remove(), null;
|
|
2585
2601
|
}
|
|
2586
2602
|
}
|
|
2587
2603
|
setServerSessionId(e) {
|
|
@@ -2609,7 +2625,7 @@ var Ta = class {
|
|
|
2609
2625
|
streams: e,
|
|
2610
2626
|
styles: t
|
|
2611
2627
|
}, this.writeTimer === null && (this.writeTimer = setTimeout(() => {
|
|
2612
|
-
this.writeTimer = null,
|
|
2628
|
+
this.writeTimer = null, Oa(() => this.writePending());
|
|
2613
2629
|
}, this.debounceMs)));
|
|
2614
2630
|
}
|
|
2615
2631
|
flush() {
|
|
@@ -2626,14 +2642,14 @@ var Ta = class {
|
|
|
2626
2642
|
let n = Z();
|
|
2627
2643
|
if (!n) return;
|
|
2628
2644
|
let r = [];
|
|
2629
|
-
for (let t of e)
|
|
2645
|
+
for (let t of e) t.rootViewId && t.views.has(t.rootViewId) && Aa(t.category) && r.push(ja(t));
|
|
2630
2646
|
if (r.length === 0) return;
|
|
2631
2647
|
let i = {
|
|
2632
|
-
schemaVersion:
|
|
2648
|
+
schemaVersion: Ca,
|
|
2633
2649
|
savedAtMs: Date.now(),
|
|
2634
2650
|
appId: this.appId,
|
|
2635
2651
|
userId: this.userId,
|
|
2636
|
-
path:
|
|
2652
|
+
path: Da(),
|
|
2637
2653
|
serverSessionId: this.serverSessionId,
|
|
2638
2654
|
streams: r,
|
|
2639
2655
|
styles: [...t]
|
|
@@ -2641,11 +2657,11 @@ var Ta = class {
|
|
|
2641
2657
|
try {
|
|
2642
2658
|
a = JSON.stringify(i);
|
|
2643
2659
|
} catch (e) {
|
|
2644
|
-
|
|
2660
|
+
Y.warn("Failed to serialize live snapshot for storage", e);
|
|
2645
2661
|
return;
|
|
2646
2662
|
}
|
|
2647
2663
|
if (a.length > this.maxBytes) {
|
|
2648
|
-
|
|
2664
|
+
Y.debug(`Skipping live snapshot write: ${a.length} bytes exceeds ${this.maxBytes} byte budget`);
|
|
2649
2665
|
return;
|
|
2650
2666
|
}
|
|
2651
2667
|
try {
|
|
@@ -2661,7 +2677,7 @@ var Ta = class {
|
|
|
2661
2677
|
pruneOtherUsers() {
|
|
2662
2678
|
let e = Z();
|
|
2663
2679
|
if (!e) return;
|
|
2664
|
-
let t = `${
|
|
2680
|
+
let t = `${X}:${this.appId}:`, n = [];
|
|
2665
2681
|
try {
|
|
2666
2682
|
for (let r = 0; r < e.length; r++) {
|
|
2667
2683
|
let i = e.key(r);
|
|
@@ -2671,10 +2687,10 @@ var Ta = class {
|
|
|
2671
2687
|
} catch {}
|
|
2672
2688
|
}
|
|
2673
2689
|
};
|
|
2674
|
-
function
|
|
2690
|
+
function Aa(e) {
|
|
2675
2691
|
return e !== void 0 && e !== "ikon.platform";
|
|
2676
2692
|
}
|
|
2677
|
-
function
|
|
2693
|
+
function ja(e) {
|
|
2678
2694
|
return {
|
|
2679
2695
|
streamId: e.streamId,
|
|
2680
2696
|
category: e.category,
|
|
@@ -2683,7 +2699,7 @@ function Da(e) {
|
|
|
2683
2699
|
views: [...e.views.entries()]
|
|
2684
2700
|
};
|
|
2685
2701
|
}
|
|
2686
|
-
function
|
|
2702
|
+
function Ma(e) {
|
|
2687
2703
|
return {
|
|
2688
2704
|
streamId: e.streamId,
|
|
2689
2705
|
category: e.category,
|
|
@@ -2695,38 +2711,38 @@ function Oa(e) {
|
|
|
2695
2711
|
}
|
|
2696
2712
|
//#endregion
|
|
2697
2713
|
//#region src/ui-worker.ts?worker
|
|
2698
|
-
function
|
|
2699
|
-
return new Worker(new URL("assets/ui-worker-
|
|
2714
|
+
function Na(e) {
|
|
2715
|
+
return new Worker(new URL("assets/ui-worker-DFpR4Ylf.js", import.meta.url).href, {
|
|
2700
2716
|
type: "module",
|
|
2701
2717
|
name: e?.name
|
|
2702
2718
|
});
|
|
2703
2719
|
}
|
|
2704
2720
|
//#endregion
|
|
2705
2721
|
//#region src/ikon-ui-core.ts
|
|
2706
|
-
var Q = e("IkonUiCore"),
|
|
2707
|
-
function
|
|
2722
|
+
var Q = e("IkonUiCore"), Pa = 250;
|
|
2723
|
+
function Fa(e) {
|
|
2708
2724
|
if (typeof window > "u") return;
|
|
2709
2725
|
let t = window, n = e === "signed-in" ? "signed-in" : "guest";
|
|
2710
|
-
return
|
|
2726
|
+
return va(t.__IKON_BOOT_SNAPSHOT__, t.__IKON_BOOT_SNAPSHOT_PINNED__, window.location.pathname, n);
|
|
2711
2727
|
}
|
|
2712
|
-
function
|
|
2728
|
+
function Ia() {
|
|
2713
2729
|
return typeof document < "u" && document.getElementById("ikon-prerender") != null && !document.documentElement.hasAttribute("data-ikon-prerender-skip");
|
|
2714
2730
|
}
|
|
2715
2731
|
var $ = null;
|
|
2716
|
-
function
|
|
2732
|
+
function La(e) {
|
|
2717
2733
|
if ($) return;
|
|
2718
|
-
let t =
|
|
2734
|
+
let t = Fa(e);
|
|
2719
2735
|
t && ($ = {
|
|
2720
2736
|
file: t,
|
|
2721
2737
|
response: fetch(`/${t}`).then((e) => e, () => null)
|
|
2722
2738
|
});
|
|
2723
2739
|
}
|
|
2724
|
-
var
|
|
2740
|
+
var Ra = class {
|
|
2725
2741
|
unsubscribeProtocolMessages;
|
|
2726
2742
|
unsubscribeState;
|
|
2727
2743
|
client = null;
|
|
2728
2744
|
lastConnectedSessionId = void 0;
|
|
2729
|
-
uiStore = new
|
|
2745
|
+
uiStore = new V();
|
|
2730
2746
|
uiWorker = null;
|
|
2731
2747
|
uiStyles = /* @__PURE__ */ new Map();
|
|
2732
2748
|
styleResyncAttempts = /* @__PURE__ */ new Map();
|
|
@@ -2742,7 +2758,7 @@ var Pa = class {
|
|
|
2742
2758
|
resyncDebounceTimers = /* @__PURE__ */ new Map();
|
|
2743
2759
|
constructor(e) {
|
|
2744
2760
|
let t = e?.threading?.uiWorker ?? "auto";
|
|
2745
|
-
this.useUiWorker = t !== "disabled" && typeof Worker < "u", e?.liveSnapshot?.enabled && (this.liveSnapshot = new
|
|
2761
|
+
this.useUiWorker = t !== "disabled" && typeof Worker < "u", e?.liveSnapshot?.enabled && (this.liveSnapshot = new ka(e.liveSnapshot)), e?.client && this.initialize(e.client, e);
|
|
2746
2762
|
}
|
|
2747
2763
|
dispose() {
|
|
2748
2764
|
this.unsubscribeProtocolMessages?.(), this.unsubscribeState?.(), this.unsubscribeLiveSnapshotCapture?.(), this.liveSnapshot?.dispose(), this.liveSnapshot = null, this.uiWorker?.terminate(), this.uiWorker = null;
|
|
@@ -2785,7 +2801,7 @@ var Pa = class {
|
|
|
2785
2801
|
}
|
|
2786
2802
|
initialize(e, t) {
|
|
2787
2803
|
this.client = e, this.useUiWorker && this.startUiWorker(t);
|
|
2788
|
-
let n =
|
|
2804
|
+
let n = Ia(), r = !n && this.seedFromLiveSnapshot();
|
|
2789
2805
|
!n && !r && t?.bootSnapshot !== !1 && this.seedFromBootSnapshot(t?.bootSnapshot), this.subscribeLiveSnapshotCapture();
|
|
2790
2806
|
let i = { opcodeGroupsMask: j.GROUP_CORE | j.GROUP_UI | j.GROUP_ACTIONS };
|
|
2791
2807
|
this.unsubscribeProtocolMessages = e.subscribeToProtocolMessages((e) => {
|
|
@@ -2824,7 +2840,7 @@ var Pa = class {
|
|
|
2824
2840
|
return !0;
|
|
2825
2841
|
}
|
|
2826
2842
|
seedFromBootSnapshot(e) {
|
|
2827
|
-
let t =
|
|
2843
|
+
let t = Fa(e);
|
|
2828
2844
|
t && this.loadBootSnapshotAsync(t);
|
|
2829
2845
|
}
|
|
2830
2846
|
async loadBootSnapshotAsync(e) {
|
|
@@ -2869,7 +2885,7 @@ var Pa = class {
|
|
|
2869
2885
|
}
|
|
2870
2886
|
startUiWorker(e) {
|
|
2871
2887
|
try {
|
|
2872
|
-
this.uiWorker = new
|
|
2888
|
+
this.uiWorker = new Na();
|
|
2873
2889
|
} catch (e) {
|
|
2874
2890
|
Q.warn("Failed to create UI worker, falling back to main thread", e), this.uiWorker = null;
|
|
2875
2891
|
return;
|
|
@@ -3011,7 +3027,7 @@ var Pa = class {
|
|
|
3011
3027
|
}
|
|
3012
3028
|
}
|
|
3013
3029
|
handleGlobalState(e) {
|
|
3014
|
-
|
|
3030
|
+
mi(e).then((e) => {
|
|
3015
3031
|
let t = /* @__PURE__ */ new Set();
|
|
3016
3032
|
for (let n of Object.values(e.UIStreams ?? {})) t.add(n.StreamId), this.uiStore.setCategory(n.StreamId, n.Info?.Category);
|
|
3017
3033
|
for (let e of this.uiStore.getSnapshots()) this.seedStreamIds.has(e.streamId) || t.has(e.streamId) || (this.uiStore.remove(e.streamId), this.notifyUiStreamCleared(e.streamId));
|
|
@@ -3022,7 +3038,7 @@ var Pa = class {
|
|
|
3022
3038
|
}
|
|
3023
3039
|
handleUiStreamBegin(e) {
|
|
3024
3040
|
let t = n(e), r = `${t.senderId}_${t.trackId}`;
|
|
3025
|
-
|
|
3041
|
+
An(e).then((e) => {
|
|
3026
3042
|
this.uiStore.setCategory(r, e.Category), this.evictReplacedSeedStreams();
|
|
3027
3043
|
}).catch((e) => {
|
|
3028
3044
|
Q.warn(`Failed to read UI stream begin for stream ${r}, its category waits for GlobalState`, e);
|
|
@@ -3031,12 +3047,12 @@ var Pa = class {
|
|
|
3031
3047
|
evictReplacedSeedStreams() {
|
|
3032
3048
|
if (this.seedStreamIds.size === 0) return;
|
|
3033
3049
|
for (let e of this.seedStreamIds) this.seededStreamIds.has(e) || this.seedStreamIds.delete(e);
|
|
3034
|
-
let e =
|
|
3035
|
-
for (let t of this.seedStreamIds) e.has(
|
|
3050
|
+
let e = Sa(this.uiStore.getSnapshots(), (e) => this.seededStreamIds.has(e));
|
|
3051
|
+
for (let t of this.seedStreamIds) e.has(xa(this.uiStore.getSnapshot(t)?.category)) && (this.seedStreamIds.delete(t), this.seededStreamIds.delete(t), this.uiStore.remove(t), this.notifyUiStreamCleared(t));
|
|
3036
3052
|
}
|
|
3037
3053
|
handleUiUpdate(e) {
|
|
3038
3054
|
let t = n(e), r = `${t.senderId}_${t.trackId}`;
|
|
3039
|
-
|
|
3055
|
+
br(e).then((e) => {
|
|
3040
3056
|
let n = B(e);
|
|
3041
3057
|
this.notifyUiUpdate(r, n), this.uiStore.apply(r, n) && (this.seededStreamIds.delete(r) && this.captureLiveSnapshot(), this.evictReplacedSeedStreams()), this.uiStore.needsResync(r) && this.requestResync(t.trackId, t.senderId), this.sendUiUpdateAck(t.trackId, n.snapshot.version, t.senderId), this.verifyStylesPresent(r, t.trackId, t.senderId);
|
|
3042
3058
|
}).catch((e) => {
|
|
@@ -3044,7 +3060,7 @@ var Pa = class {
|
|
|
3044
3060
|
});
|
|
3045
3061
|
}
|
|
3046
3062
|
handleUiStyles(e) {
|
|
3047
|
-
|
|
3063
|
+
zn(e).then((e) => {
|
|
3048
3064
|
if (!e.StyleId) return;
|
|
3049
3065
|
let t = {
|
|
3050
3066
|
styleId: e.StyleId,
|
|
@@ -3057,7 +3073,7 @@ var Pa = class {
|
|
|
3057
3073
|
});
|
|
3058
3074
|
}
|
|
3059
3075
|
handleUiStylesBatch(e) {
|
|
3060
|
-
|
|
3076
|
+
Jn(e).then((e) => {
|
|
3061
3077
|
if (e.Styles) for (let t of e.Styles) {
|
|
3062
3078
|
if (!t.StyleId) continue;
|
|
3063
3079
|
let e = {
|
|
@@ -3072,8 +3088,8 @@ var Pa = class {
|
|
|
3072
3088
|
});
|
|
3073
3089
|
}
|
|
3074
3090
|
handleUiStylesDelete(e) {
|
|
3075
|
-
|
|
3076
|
-
if (
|
|
3091
|
+
ur(e).then((e) => {
|
|
3092
|
+
if (e.StyleIds && e.StyleIds.length !== 0) {
|
|
3077
3093
|
for (let t of e.StyleIds) this.uiStyles.delete(t);
|
|
3078
3094
|
this.notifyUiStyleDelete(e.StyleIds);
|
|
3079
3095
|
}
|
|
@@ -3098,7 +3114,7 @@ var Pa = class {
|
|
|
3098
3114
|
let r = n === void 0 ? { trackId: e } : {
|
|
3099
3115
|
trackId: e,
|
|
3100
3116
|
targetIds: [n]
|
|
3101
|
-
}, i =
|
|
3117
|
+
}, i = Er({ Version: t }, this.client.sessionId ?? 0, r);
|
|
3102
3118
|
this.client.sendProtocolMessage(i);
|
|
3103
3119
|
} catch (e) {
|
|
3104
3120
|
Q.warn("Failed to send UI update ack", e);
|
|
@@ -3109,7 +3125,7 @@ var Pa = class {
|
|
|
3109
3125
|
if (this.resyncDebounceTimers.has(n)) return;
|
|
3110
3126
|
let r = setTimeout(() => {
|
|
3111
3127
|
this.resyncDebounceTimers.delete(n), this.sendResyncRequest(e, t);
|
|
3112
|
-
},
|
|
3128
|
+
}, Pa);
|
|
3113
3129
|
this.resyncDebounceTimers.set(n, r);
|
|
3114
3130
|
}
|
|
3115
3131
|
requestFullResync() {
|
|
@@ -3129,7 +3145,7 @@ var Pa = class {
|
|
|
3129
3145
|
let n = t === void 0 ? { trackId: e } : {
|
|
3130
3146
|
trackId: e,
|
|
3131
3147
|
targetIds: [t]
|
|
3132
|
-
}, r =
|
|
3148
|
+
}, r = Sn({ TrackId: e }, this.client.sessionId ?? 0, n);
|
|
3133
3149
|
this.client.sendProtocolMessage(r);
|
|
3134
3150
|
} catch (e) {
|
|
3135
3151
|
Q.warn("Failed to send UI resync request", e);
|
|
@@ -3137,4 +3153,4 @@ var Pa = class {
|
|
|
3137
3153
|
}
|
|
3138
3154
|
};
|
|
3139
3155
|
//#endregion
|
|
3140
|
-
export {
|
|
3156
|
+
export { na as HandlerCache, ba as IKON_PLATFORM_STREAM_CATEGORY, ya as IKON_UI_STREAM_CATEGORY, Ra as IkonUiCore, ka as LiveSnapshotCache, V as UiStore, ia as UiStreamStore, z as UiUpdateParseError, Ia as isPrerenderVisible, B as parseUiUpdate, La as prefetchBootSnapshot, xa as seedStreamCategory };
|