@vitejs/plugin-rsc 0.4.34 → 0.5.1
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/dist/{browser-D8OPzpF5.js → browser-B4C0Zb4m.js} +1 -1
- package/dist/{browser-CQv7Z3J4.d.ts → browser-C8KlM-b7.d.ts} +2 -2
- package/dist/{browser-DwWQeoll.d.ts → browser-CDBRiZjk.d.ts} +1 -1
- package/dist/{browser-7NhxQxuk.js → browser-U86erGOy.js} +3 -3
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +23 -5
- package/dist/chunk-Cdb3zUqJ.js +30 -0
- package/dist/{cjs-BamOAUgw.js → cjs-zUv66MZg.js} +3 -3
- package/dist/core/browser.d.ts +1 -1
- package/dist/core/browser.js +3 -3
- package/dist/core/plugin.js +1 -1
- package/dist/core/rsc.d.ts +2 -2
- package/dist/core/rsc.js +3 -3
- package/dist/core/ssr.d.ts +2 -2
- package/dist/core/ssr.js +3 -3
- package/dist/{dist-DiJnRA1C.js → dist-CNbFy2EZ.js} +1 -1
- package/dist/{encryption-runtime-B8xcnJoN.d.ts → encryption-runtime-BDgc4dBr.d.ts} +1 -1
- package/dist/{encryption-runtime-DT6dtlC5.js → encryption-runtime-D5_PLt4C.js} +4 -4
- package/dist/{encryption-utils-BDwwcMVT.js → encryption-utils-DdqSKS_O.js} +1 -1
- package/dist/{index-CPkExgij.d.ts → index-BY8KUQhI.d.ts} +1 -1
- package/dist/{index-B04iFwO5.d.ts → index-DJ0AhQ9B.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/picocolors-BRKobevN.js +74 -0
- package/dist/{plugin-CZbI4rhS.js → plugin-4UFT-s0w.js} +1 -1
- package/dist/{plugin-BLedJFh7.js → plugin-DNwmUjn4.js} +32 -22
- package/dist/{plugin-DCLI7Wh8.d.ts → plugin-fbbM1muv.d.ts} +2 -6
- package/dist/plugin.d.ts +2 -2
- package/dist/plugin.js +8 -8
- package/dist/plugins/cjs.js +3 -3
- package/dist/react/browser.d.ts +3 -3
- package/dist/react/browser.js +4 -4
- package/dist/react/rsc.d.ts +3 -3
- package/dist/react/rsc.js +4 -4
- package/dist/react/ssr.d.ts +3 -3
- package/dist/react/ssr.js +4 -4
- package/dist/{rpc-CUvSZurk.js → rpc-nwJuNojy.js} +1 -1
- package/dist/{rsc-JJjz3Z0i.d.ts → rsc-03j1e3xp.d.ts} +4 -4
- package/dist/{rsc-BdCB3621.js → rsc-B_DQ_Sju.js} +2 -2
- package/dist/{rsc-3bkzqdsJ.d.ts → rsc-OCbFObYE.d.ts} +2 -2
- package/dist/{rsc-GFzFWyhT.js → rsc-bL1QvQCm.js} +3 -3
- package/dist/rsc.d.ts +4 -4
- package/dist/rsc.js +24 -7
- package/dist/{shared-CXg_u-4h.js → shared-C8PSRwR2.js} +1 -1
- package/dist/{shared-n-ykEs15.js → shared-DlspEItJ.js} +1 -1
- package/dist/{ssr-BrSGyrxe.d.ts → ssr-Dgbl_mOS.d.ts} +1 -1
- package/dist/{ssr-Cd4SbAaO.js → ssr-DzY6rnEv.js} +2 -2
- package/dist/{ssr-Cm2FP2zD.js → ssr-EH7rBPkK.js} +3 -3
- package/dist/{ssr-CMjeQ9AS.d.ts → ssr-fBV4xXen.d.ts} +2 -2
- package/dist/ssr.d.ts +3 -3
- package/dist/ssr.js +54 -6
- package/dist/transforms/index.d.ts +1 -1
- package/dist/transforms/index.js +2 -2
- package/dist/{transforms-CpF3zNE0.js → transforms-CSPqW3RX.js} +3 -2
- package/dist/utils/encryption-runtime.d.ts +1 -1
- package/dist/utils/encryption-runtime.js +6 -6
- package/dist/utils/rpc.js +1 -1
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.development.js +2964 -774
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.production.js +554 -312
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.edge.development.js +2721 -724
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.edge.production.js +541 -300
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.development.js +2955 -858
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.production.js +652 -332
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2956 -861
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.unbundled.production.js +652 -332
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-plugin.js +6 -2
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.development.js +1931 -713
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.production.js +544 -295
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.development.js +1926 -715
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.production.js +542 -299
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.development.js +2719 -743
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.production.js +725 -338
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.unbundled.development.js +2703 -727
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.unbundled.production.js +725 -338
- package/dist/vendor/react-server-dom/package.json +3 -3
- package/dist/vendor/react-server-dom/server.node.js +3 -1
- package/dist/vendor/react-server-dom/server.node.unbundled.js +3 -1
- package/dist/vendor/react-server-dom/static.browser.js +1 -3
- package/dist/vendor/react-server-dom/static.edge.js +1 -3
- package/dist/vendor/react-server-dom/static.node.js +2 -3
- package/dist/vendor/react-server-dom/static.node.unbundled.js +1 -3
- package/package.json +11 -10
- package/types/index.d.ts +0 -4
- package/dist/browser--ZREVnM9.js +0 -22
- package/dist/client-C7Eok9hc.js +0 -23
- package/dist/extra/browser.d.ts +0 -14
- package/dist/extra/browser.js +0 -88
- package/dist/extra/rsc.d.ts +0 -2
- package/dist/extra/rsc.js +0 -56
- package/dist/extra/ssr.d.ts +0 -14
- package/dist/extra/ssr.js +0 -37
- package/dist/rsc-CiAoLCx8.js +0 -21
- package/dist/rsc-c22DF1A7.d.ts +0 -16
- package/dist/rsc-html-stream/browser.d.ts +0 -5
- package/dist/rsc-html-stream/browser.js +0 -8
- package/dist/rsc-html-stream/ssr.d.ts +0 -7
- package/dist/rsc-html-stream/ssr.js +0 -8
- package/dist/server-DMhFuTz_.js +0 -72
- package/dist/ssr-BQwZitKq.js +0 -53
- package/types/virtual.d.ts +0 -5
|
@@ -11,27 +11,6 @@
|
|
|
11
11
|
"use strict";
|
|
12
12
|
"production" !== process.env.NODE_ENV &&
|
|
13
13
|
(function () {
|
|
14
|
-
function _defineProperty(obj, key, value) {
|
|
15
|
-
a: if ("object" == typeof key && key) {
|
|
16
|
-
var e = key[Symbol.toPrimitive];
|
|
17
|
-
if (void 0 !== e) {
|
|
18
|
-
key = e.call(key, "string");
|
|
19
|
-
if ("object" != typeof key) break a;
|
|
20
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
21
|
-
}
|
|
22
|
-
key = String(key);
|
|
23
|
-
}
|
|
24
|
-
key = "symbol" == typeof key ? key : key + "";
|
|
25
|
-
key in obj
|
|
26
|
-
? Object.defineProperty(obj, key, {
|
|
27
|
-
value: value,
|
|
28
|
-
enumerable: !0,
|
|
29
|
-
configurable: !0,
|
|
30
|
-
writable: !0
|
|
31
|
-
})
|
|
32
|
-
: (obj[key] = value);
|
|
33
|
-
return obj;
|
|
34
|
-
}
|
|
35
14
|
function resolveClientReference(bundlerConfig, metadata) {
|
|
36
15
|
var moduleExports = bundlerConfig[metadata[0]];
|
|
37
16
|
if ((bundlerConfig = moduleExports && moduleExports[metadata[2]]))
|
|
@@ -155,11 +134,8 @@
|
|
|
155
134
|
return !0;
|
|
156
135
|
}
|
|
157
136
|
function objectName(object) {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
.replace(/^\[object (.*)\]$/, function (m, p0) {
|
|
161
|
-
return p0;
|
|
162
|
-
});
|
|
137
|
+
object = Object.prototype.toString.call(object);
|
|
138
|
+
return object.slice(8, object.length - 1);
|
|
163
139
|
}
|
|
164
140
|
function describeKeyForErrorMessage(key) {
|
|
165
141
|
var encodedKey = JSON.stringify(key);
|
|
@@ -863,10 +839,10 @@
|
|
|
863
839
|
filename.startsWith("/") && (filename = "file://" + filename);
|
|
864
840
|
sourceMap
|
|
865
841
|
? ((col +=
|
|
866
|
-
"\n//# sourceURL=
|
|
842
|
+
"\n//# sourceURL=about://React/" +
|
|
867
843
|
encodeURIComponent(environmentName) +
|
|
868
844
|
"/" +
|
|
869
|
-
filename +
|
|
845
|
+
encodeURI(filename) +
|
|
870
846
|
"?s" +
|
|
871
847
|
fakeServerFunctionIdx++),
|
|
872
848
|
(col += "\n//# sourceMappingURL=" + sourceMap))
|
|
@@ -1074,7 +1050,7 @@
|
|
|
1074
1050
|
case REACT_PORTAL_TYPE:
|
|
1075
1051
|
return "Portal";
|
|
1076
1052
|
case REACT_CONTEXT_TYPE:
|
|
1077
|
-
return
|
|
1053
|
+
return type.displayName || "Context";
|
|
1078
1054
|
case REACT_CONSUMER_TYPE:
|
|
1079
1055
|
return (type._context.displayName || "Context") + ".Consumer";
|
|
1080
1056
|
case REACT_FORWARD_REF_TYPE:
|
|
@@ -1100,18 +1076,493 @@
|
|
|
1100
1076
|
}
|
|
1101
1077
|
return null;
|
|
1102
1078
|
}
|
|
1079
|
+
function getArrayKind(array) {
|
|
1080
|
+
for (var kind = 0, i = 0; i < array.length; i++) {
|
|
1081
|
+
var value = array[i];
|
|
1082
|
+
if ("object" === typeof value && null !== value)
|
|
1083
|
+
if (
|
|
1084
|
+
isArrayImpl(value) &&
|
|
1085
|
+
2 === value.length &&
|
|
1086
|
+
"string" === typeof value[0]
|
|
1087
|
+
) {
|
|
1088
|
+
if (0 !== kind && 3 !== kind) return 1;
|
|
1089
|
+
kind = 3;
|
|
1090
|
+
} else return 1;
|
|
1091
|
+
else {
|
|
1092
|
+
if (
|
|
1093
|
+
"function" === typeof value ||
|
|
1094
|
+
("string" === typeof value && 50 < value.length) ||
|
|
1095
|
+
(0 !== kind && 2 !== kind)
|
|
1096
|
+
)
|
|
1097
|
+
return 1;
|
|
1098
|
+
kind = 2;
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
return kind;
|
|
1102
|
+
}
|
|
1103
|
+
function addObjectToProperties(object, properties, indent, prefix) {
|
|
1104
|
+
for (var key in object)
|
|
1105
|
+
hasOwnProperty.call(object, key) &&
|
|
1106
|
+
"_" !== key[0] &&
|
|
1107
|
+
addValueToProperties(key, object[key], properties, indent, prefix);
|
|
1108
|
+
}
|
|
1109
|
+
function addValueToProperties(
|
|
1110
|
+
propertyName,
|
|
1111
|
+
value,
|
|
1112
|
+
properties,
|
|
1113
|
+
indent,
|
|
1114
|
+
prefix
|
|
1115
|
+
) {
|
|
1116
|
+
switch (typeof value) {
|
|
1117
|
+
case "object":
|
|
1118
|
+
if (null === value) {
|
|
1119
|
+
value = "null";
|
|
1120
|
+
break;
|
|
1121
|
+
} else {
|
|
1122
|
+
if (value.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1123
|
+
var typeName = getComponentNameFromType(value.type) || "\u2026",
|
|
1124
|
+
key = value.key;
|
|
1125
|
+
value = value.props;
|
|
1126
|
+
var propsKeys = Object.keys(value),
|
|
1127
|
+
propsLength = propsKeys.length;
|
|
1128
|
+
if (null == key && 0 === propsLength) {
|
|
1129
|
+
value = "<" + typeName + " />";
|
|
1130
|
+
break;
|
|
1131
|
+
}
|
|
1132
|
+
if (
|
|
1133
|
+
3 > indent ||
|
|
1134
|
+
(1 === propsLength &&
|
|
1135
|
+
"children" === propsKeys[0] &&
|
|
1136
|
+
null == key)
|
|
1137
|
+
) {
|
|
1138
|
+
value = "<" + typeName + " \u2026 />";
|
|
1139
|
+
break;
|
|
1140
|
+
}
|
|
1141
|
+
properties.push([
|
|
1142
|
+
prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
|
|
1143
|
+
"<" + typeName
|
|
1144
|
+
]);
|
|
1145
|
+
null !== key &&
|
|
1146
|
+
addValueToProperties(
|
|
1147
|
+
"key",
|
|
1148
|
+
key,
|
|
1149
|
+
properties,
|
|
1150
|
+
indent + 1,
|
|
1151
|
+
prefix
|
|
1152
|
+
);
|
|
1153
|
+
propertyName = !1;
|
|
1154
|
+
for (var propKey in value)
|
|
1155
|
+
"children" === propKey
|
|
1156
|
+
? null != value.children &&
|
|
1157
|
+
(!isArrayImpl(value.children) ||
|
|
1158
|
+
0 < value.children.length) &&
|
|
1159
|
+
(propertyName = !0)
|
|
1160
|
+
: hasOwnProperty.call(value, propKey) &&
|
|
1161
|
+
"_" !== propKey[0] &&
|
|
1162
|
+
addValueToProperties(
|
|
1163
|
+
propKey,
|
|
1164
|
+
value[propKey],
|
|
1165
|
+
properties,
|
|
1166
|
+
indent + 1,
|
|
1167
|
+
prefix
|
|
1168
|
+
);
|
|
1169
|
+
properties.push([
|
|
1170
|
+
"",
|
|
1171
|
+
propertyName ? ">\u2026</" + typeName + ">" : "/>"
|
|
1172
|
+
]);
|
|
1173
|
+
return;
|
|
1174
|
+
}
|
|
1175
|
+
typeName = Object.prototype.toString.call(value);
|
|
1176
|
+
typeName = typeName.slice(8, typeName.length - 1);
|
|
1177
|
+
if ("Array" === typeName)
|
|
1178
|
+
if (
|
|
1179
|
+
((propKey = getArrayKind(value)),
|
|
1180
|
+
2 === propKey || 0 === propKey)
|
|
1181
|
+
) {
|
|
1182
|
+
value = JSON.stringify(value);
|
|
1183
|
+
break;
|
|
1184
|
+
} else if (3 === propKey) {
|
|
1185
|
+
properties.push([
|
|
1186
|
+
prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
|
|
1187
|
+
""
|
|
1188
|
+
]);
|
|
1189
|
+
for (
|
|
1190
|
+
propertyName = 0;
|
|
1191
|
+
propertyName < value.length;
|
|
1192
|
+
propertyName++
|
|
1193
|
+
)
|
|
1194
|
+
(typeName = value[propertyName]),
|
|
1195
|
+
addValueToProperties(
|
|
1196
|
+
typeName[0],
|
|
1197
|
+
typeName[1],
|
|
1198
|
+
properties,
|
|
1199
|
+
indent + 1,
|
|
1200
|
+
prefix
|
|
1201
|
+
);
|
|
1202
|
+
return;
|
|
1203
|
+
}
|
|
1204
|
+
if ("Promise" === typeName) {
|
|
1205
|
+
if ("fulfilled" === value.status) {
|
|
1206
|
+
if (
|
|
1207
|
+
((typeName = properties.length),
|
|
1208
|
+
addValueToProperties(
|
|
1209
|
+
propertyName,
|
|
1210
|
+
value.value,
|
|
1211
|
+
properties,
|
|
1212
|
+
indent,
|
|
1213
|
+
prefix
|
|
1214
|
+
),
|
|
1215
|
+
properties.length > typeName)
|
|
1216
|
+
) {
|
|
1217
|
+
properties = properties[typeName];
|
|
1218
|
+
properties[1] =
|
|
1219
|
+
"Promise<" + (properties[1] || "Object") + ">";
|
|
1220
|
+
return;
|
|
1221
|
+
}
|
|
1222
|
+
} else if (
|
|
1223
|
+
"rejected" === value.status &&
|
|
1224
|
+
((typeName = properties.length),
|
|
1225
|
+
addValueToProperties(
|
|
1226
|
+
propertyName,
|
|
1227
|
+
value.reason,
|
|
1228
|
+
properties,
|
|
1229
|
+
indent,
|
|
1230
|
+
prefix
|
|
1231
|
+
),
|
|
1232
|
+
properties.length > typeName)
|
|
1233
|
+
) {
|
|
1234
|
+
properties = properties[typeName];
|
|
1235
|
+
properties[1] = "Rejected Promise<" + properties[1] + ">";
|
|
1236
|
+
return;
|
|
1237
|
+
}
|
|
1238
|
+
properties.push([
|
|
1239
|
+
"\u00a0\u00a0".repeat(indent) + propertyName,
|
|
1240
|
+
"Promise"
|
|
1241
|
+
]);
|
|
1242
|
+
return;
|
|
1243
|
+
}
|
|
1244
|
+
"Object" === typeName &&
|
|
1245
|
+
(propKey = Object.getPrototypeOf(value)) &&
|
|
1246
|
+
"function" === typeof propKey.constructor &&
|
|
1247
|
+
(typeName = propKey.constructor.name);
|
|
1248
|
+
properties.push([
|
|
1249
|
+
prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
|
|
1250
|
+
"Object" === typeName ? (3 > indent ? "" : "\u2026") : typeName
|
|
1251
|
+
]);
|
|
1252
|
+
3 > indent &&
|
|
1253
|
+
addObjectToProperties(value, properties, indent + 1, prefix);
|
|
1254
|
+
return;
|
|
1255
|
+
}
|
|
1256
|
+
case "function":
|
|
1257
|
+
value = "" === value.name ? "() => {}" : value.name + "() {}";
|
|
1258
|
+
break;
|
|
1259
|
+
case "string":
|
|
1260
|
+
value =
|
|
1261
|
+
"This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects." ===
|
|
1262
|
+
value
|
|
1263
|
+
? "\u2026"
|
|
1264
|
+
: JSON.stringify(value);
|
|
1265
|
+
break;
|
|
1266
|
+
case "undefined":
|
|
1267
|
+
value = "undefined";
|
|
1268
|
+
break;
|
|
1269
|
+
case "boolean":
|
|
1270
|
+
value = value ? "true" : "false";
|
|
1271
|
+
break;
|
|
1272
|
+
default:
|
|
1273
|
+
value = String(value);
|
|
1274
|
+
}
|
|
1275
|
+
properties.push([
|
|
1276
|
+
prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
|
|
1277
|
+
value
|
|
1278
|
+
]);
|
|
1279
|
+
}
|
|
1280
|
+
function getIODescription(value) {
|
|
1281
|
+
try {
|
|
1282
|
+
switch (typeof value) {
|
|
1283
|
+
case "object":
|
|
1284
|
+
if (null === value) return "";
|
|
1285
|
+
if (value instanceof Error) return String(value.message);
|
|
1286
|
+
if ("string" === typeof value.url) return value.url;
|
|
1287
|
+
if ("string" === typeof value.href) return value.href;
|
|
1288
|
+
if ("string" === typeof value.src) return value.src;
|
|
1289
|
+
if ("string" === typeof value.currentSrc) return value.currentSrc;
|
|
1290
|
+
if ("string" === typeof value.command) return value.command;
|
|
1291
|
+
if (
|
|
1292
|
+
"object" === typeof value.request &&
|
|
1293
|
+
null !== value.request &&
|
|
1294
|
+
"string" === typeof value.request.url
|
|
1295
|
+
)
|
|
1296
|
+
return value.request.url;
|
|
1297
|
+
if (
|
|
1298
|
+
"object" === typeof value.response &&
|
|
1299
|
+
null !== value.response &&
|
|
1300
|
+
"string" === typeof value.response.url
|
|
1301
|
+
)
|
|
1302
|
+
return value.response.url;
|
|
1303
|
+
if (
|
|
1304
|
+
"string" === typeof value.id ||
|
|
1305
|
+
"number" === typeof value.id ||
|
|
1306
|
+
"bigint" === typeof value.id
|
|
1307
|
+
)
|
|
1308
|
+
return String(value.id);
|
|
1309
|
+
if ("string" === typeof value.name) return value.name;
|
|
1310
|
+
var str = value.toString();
|
|
1311
|
+
return str.startsWith("[object ") ||
|
|
1312
|
+
5 > str.length ||
|
|
1313
|
+
500 < str.length
|
|
1314
|
+
? ""
|
|
1315
|
+
: str;
|
|
1316
|
+
case "string":
|
|
1317
|
+
return 5 > value.length || 500 < value.length ? "" : value;
|
|
1318
|
+
case "number":
|
|
1319
|
+
case "bigint":
|
|
1320
|
+
return String(value);
|
|
1321
|
+
default:
|
|
1322
|
+
return "";
|
|
1323
|
+
}
|
|
1324
|
+
} catch (x) {
|
|
1325
|
+
return "";
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
function markAllTracksInOrder() {
|
|
1329
|
+
supportsUserTiming &&
|
|
1330
|
+
(console.timeStamp(
|
|
1331
|
+
"Server Requests Track",
|
|
1332
|
+
0.001,
|
|
1333
|
+
0.001,
|
|
1334
|
+
"Server Requests \u269b",
|
|
1335
|
+
void 0,
|
|
1336
|
+
"primary-light"
|
|
1337
|
+
),
|
|
1338
|
+
console.timeStamp(
|
|
1339
|
+
"Server Components Track",
|
|
1340
|
+
0.001,
|
|
1341
|
+
0.001,
|
|
1342
|
+
"Primary",
|
|
1343
|
+
"Server Components \u269b",
|
|
1344
|
+
"primary-light"
|
|
1345
|
+
));
|
|
1346
|
+
}
|
|
1347
|
+
function getIOColor(functionName) {
|
|
1348
|
+
switch (functionName.charCodeAt(0) % 3) {
|
|
1349
|
+
case 0:
|
|
1350
|
+
return "tertiary-light";
|
|
1351
|
+
case 1:
|
|
1352
|
+
return "tertiary";
|
|
1353
|
+
default:
|
|
1354
|
+
return "tertiary-dark";
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
function getIOLongName(ioInfo, description, env, rootEnv) {
|
|
1358
|
+
ioInfo = ioInfo.name;
|
|
1359
|
+
description =
|
|
1360
|
+
"" === description ? ioInfo : ioInfo + " (" + description + ")";
|
|
1361
|
+
return env === rootEnv || void 0 === env
|
|
1362
|
+
? description
|
|
1363
|
+
: description + " [" + env + "]";
|
|
1364
|
+
}
|
|
1365
|
+
function getIOShortName(ioInfo, description, env, rootEnv) {
|
|
1366
|
+
ioInfo = ioInfo.name;
|
|
1367
|
+
env = env === rootEnv || void 0 === env ? "" : " [" + env + "]";
|
|
1368
|
+
var desc = "";
|
|
1369
|
+
rootEnv = 30 - ioInfo.length - env.length;
|
|
1370
|
+
if (1 < rootEnv) {
|
|
1371
|
+
var l = description.length;
|
|
1372
|
+
if (0 < l && l <= rootEnv) desc = " (" + description + ")";
|
|
1373
|
+
else if (
|
|
1374
|
+
description.startsWith("http://") ||
|
|
1375
|
+
description.startsWith("https://") ||
|
|
1376
|
+
description.startsWith("/")
|
|
1377
|
+
) {
|
|
1378
|
+
var queryIdx = description.indexOf("?");
|
|
1379
|
+
-1 === queryIdx && (queryIdx = description.length);
|
|
1380
|
+
47 === description.charCodeAt(queryIdx - 1) && queryIdx--;
|
|
1381
|
+
desc = description.lastIndexOf("/", queryIdx - 1);
|
|
1382
|
+
queryIdx - desc < rootEnv
|
|
1383
|
+
? (desc = " (\u2026" + description.slice(desc, queryIdx) + ")")
|
|
1384
|
+
: ((l = description.slice(desc, desc + rootEnv / 2)),
|
|
1385
|
+
(description = description.slice(
|
|
1386
|
+
queryIdx - rootEnv / 2,
|
|
1387
|
+
queryIdx
|
|
1388
|
+
)),
|
|
1389
|
+
(desc =
|
|
1390
|
+
" (" +
|
|
1391
|
+
(0 < desc ? "\u2026" : "") +
|
|
1392
|
+
l +
|
|
1393
|
+
"\u2026" +
|
|
1394
|
+
description +
|
|
1395
|
+
")"));
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
return ioInfo + desc + env;
|
|
1399
|
+
}
|
|
1400
|
+
function logComponentAwait(
|
|
1401
|
+
asyncInfo,
|
|
1402
|
+
trackIdx,
|
|
1403
|
+
startTime,
|
|
1404
|
+
endTime,
|
|
1405
|
+
rootEnv,
|
|
1406
|
+
value
|
|
1407
|
+
) {
|
|
1408
|
+
if (supportsUserTiming && 0 < endTime) {
|
|
1409
|
+
var description = getIODescription(value),
|
|
1410
|
+
name = getIOShortName(
|
|
1411
|
+
asyncInfo.awaited,
|
|
1412
|
+
description,
|
|
1413
|
+
asyncInfo.env,
|
|
1414
|
+
rootEnv
|
|
1415
|
+
),
|
|
1416
|
+
entryName = "await " + name;
|
|
1417
|
+
name = getIOColor(name);
|
|
1418
|
+
var debugTask = asyncInfo.debugTask || asyncInfo.awaited.debugTask;
|
|
1419
|
+
if (debugTask) {
|
|
1420
|
+
var properties = [];
|
|
1421
|
+
"object" === typeof value && null !== value
|
|
1422
|
+
? addObjectToProperties(value, properties, 0, "")
|
|
1423
|
+
: void 0 !== value &&
|
|
1424
|
+
addValueToProperties("awaited value", value, properties, 0, "");
|
|
1425
|
+
asyncInfo = getIOLongName(
|
|
1426
|
+
asyncInfo.awaited,
|
|
1427
|
+
description,
|
|
1428
|
+
asyncInfo.env,
|
|
1429
|
+
rootEnv
|
|
1430
|
+
);
|
|
1431
|
+
debugTask.run(
|
|
1432
|
+
performance.measure.bind(performance, entryName, {
|
|
1433
|
+
start: 0 > startTime ? 0 : startTime,
|
|
1434
|
+
end: endTime,
|
|
1435
|
+
detail: {
|
|
1436
|
+
devtools: {
|
|
1437
|
+
color: name,
|
|
1438
|
+
track: trackNames[trackIdx],
|
|
1439
|
+
trackGroup: "Server Components \u269b",
|
|
1440
|
+
properties: properties,
|
|
1441
|
+
tooltipText: asyncInfo
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
})
|
|
1445
|
+
);
|
|
1446
|
+
} else
|
|
1447
|
+
console.timeStamp(
|
|
1448
|
+
entryName,
|
|
1449
|
+
0 > startTime ? 0 : startTime,
|
|
1450
|
+
endTime,
|
|
1451
|
+
trackNames[trackIdx],
|
|
1452
|
+
"Server Components \u269b",
|
|
1453
|
+
name
|
|
1454
|
+
);
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
function logIOInfoErrored(ioInfo, rootEnv, error) {
|
|
1458
|
+
var startTime = ioInfo.start,
|
|
1459
|
+
endTime = ioInfo.end;
|
|
1460
|
+
if (supportsUserTiming && 0 <= endTime) {
|
|
1461
|
+
var description = getIODescription(error),
|
|
1462
|
+
entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv),
|
|
1463
|
+
debugTask = ioInfo.debugTask;
|
|
1464
|
+
debugTask
|
|
1465
|
+
? ((error = [
|
|
1466
|
+
[
|
|
1467
|
+
"rejected with",
|
|
1468
|
+
"object" === typeof error &&
|
|
1469
|
+
null !== error &&
|
|
1470
|
+
"string" === typeof error.message
|
|
1471
|
+
? String(error.message)
|
|
1472
|
+
: String(error)
|
|
1473
|
+
]
|
|
1474
|
+
]),
|
|
1475
|
+
(ioInfo =
|
|
1476
|
+
getIOLongName(ioInfo, description, ioInfo.env, rootEnv) +
|
|
1477
|
+
" Rejected"),
|
|
1478
|
+
debugTask.run(
|
|
1479
|
+
performance.measure.bind(performance, "\u200b" + entryName, {
|
|
1480
|
+
start: 0 > startTime ? 0 : startTime,
|
|
1481
|
+
end: endTime,
|
|
1482
|
+
detail: {
|
|
1483
|
+
devtools: {
|
|
1484
|
+
color: "error",
|
|
1485
|
+
track: "Server Requests \u269b",
|
|
1486
|
+
properties: error,
|
|
1487
|
+
tooltipText: ioInfo
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
})
|
|
1491
|
+
))
|
|
1492
|
+
: console.timeStamp(
|
|
1493
|
+
entryName,
|
|
1494
|
+
0 > startTime ? 0 : startTime,
|
|
1495
|
+
endTime,
|
|
1496
|
+
"Server Requests \u269b",
|
|
1497
|
+
void 0,
|
|
1498
|
+
"error"
|
|
1499
|
+
);
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
function logIOInfo(ioInfo, rootEnv, value) {
|
|
1503
|
+
var startTime = ioInfo.start,
|
|
1504
|
+
endTime = ioInfo.end;
|
|
1505
|
+
if (supportsUserTiming && 0 <= endTime) {
|
|
1506
|
+
var description = getIODescription(value),
|
|
1507
|
+
entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv),
|
|
1508
|
+
color = getIOColor(entryName),
|
|
1509
|
+
debugTask = ioInfo.debugTask;
|
|
1510
|
+
if (debugTask) {
|
|
1511
|
+
var properties = [];
|
|
1512
|
+
"object" === typeof value && null !== value
|
|
1513
|
+
? addObjectToProperties(value, properties, 0, "")
|
|
1514
|
+
: void 0 !== value &&
|
|
1515
|
+
addValueToProperties("Resolved", value, properties, 0, "");
|
|
1516
|
+
ioInfo = getIOLongName(ioInfo, description, ioInfo.env, rootEnv);
|
|
1517
|
+
debugTask.run(
|
|
1518
|
+
performance.measure.bind(performance, "\u200b" + entryName, {
|
|
1519
|
+
start: 0 > startTime ? 0 : startTime,
|
|
1520
|
+
end: endTime,
|
|
1521
|
+
detail: {
|
|
1522
|
+
devtools: {
|
|
1523
|
+
color: color,
|
|
1524
|
+
track: "Server Requests \u269b",
|
|
1525
|
+
properties: properties,
|
|
1526
|
+
tooltipText: ioInfo
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
})
|
|
1530
|
+
);
|
|
1531
|
+
} else
|
|
1532
|
+
console.timeStamp(
|
|
1533
|
+
entryName,
|
|
1534
|
+
0 > startTime ? 0 : startTime,
|
|
1535
|
+
endTime,
|
|
1536
|
+
"Server Requests \u269b",
|
|
1537
|
+
void 0,
|
|
1538
|
+
color
|
|
1539
|
+
);
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1103
1542
|
function prepareStackTrace(error, structuredStackTrace) {
|
|
1104
1543
|
error = (error.name || "Error") + ": " + (error.message || "");
|
|
1105
1544
|
for (var i = 0; i < structuredStackTrace.length; i++)
|
|
1106
1545
|
error += "\n at " + structuredStackTrace[i].toString();
|
|
1107
1546
|
return error;
|
|
1108
1547
|
}
|
|
1109
|
-
function ReactPromise(status, value, reason
|
|
1548
|
+
function ReactPromise(status, value, reason) {
|
|
1110
1549
|
this.status = status;
|
|
1111
1550
|
this.value = value;
|
|
1112
1551
|
this.reason = reason;
|
|
1113
|
-
this.
|
|
1114
|
-
this.
|
|
1552
|
+
this._children = [];
|
|
1553
|
+
this._debugChunk = null;
|
|
1554
|
+
this._debugInfo = [];
|
|
1555
|
+
}
|
|
1556
|
+
function unwrapWeakResponse(weakResponse) {
|
|
1557
|
+
weakResponse = weakResponse.weak.deref();
|
|
1558
|
+
if (void 0 === weakResponse)
|
|
1559
|
+
throw Error(
|
|
1560
|
+
"We did not expect to receive new data after GC:ing the response."
|
|
1561
|
+
);
|
|
1562
|
+
return weakResponse;
|
|
1563
|
+
}
|
|
1564
|
+
function closeDebugChannel(debugChannel) {
|
|
1565
|
+
debugChannel.callback && debugChannel.callback("");
|
|
1115
1566
|
}
|
|
1116
1567
|
function readChunk(chunk) {
|
|
1117
1568
|
switch (chunk.status) {
|
|
@@ -1126,26 +1577,111 @@
|
|
|
1126
1577
|
return chunk.value;
|
|
1127
1578
|
case "pending":
|
|
1128
1579
|
case "blocked":
|
|
1580
|
+
case "halted":
|
|
1129
1581
|
throw chunk;
|
|
1130
1582
|
default:
|
|
1131
1583
|
throw chunk.reason;
|
|
1132
1584
|
}
|
|
1133
1585
|
}
|
|
1586
|
+
function getRoot(weakResponse) {
|
|
1587
|
+
weakResponse = unwrapWeakResponse(weakResponse);
|
|
1588
|
+
return getChunk(weakResponse, 0);
|
|
1589
|
+
}
|
|
1134
1590
|
function createPendingChunk(response) {
|
|
1135
|
-
|
|
1591
|
+
0 === response._pendingChunks++ &&
|
|
1592
|
+
((response._weakResponse.response = response),
|
|
1593
|
+
null !== response._pendingInitialRender &&
|
|
1594
|
+
(clearTimeout(response._pendingInitialRender),
|
|
1595
|
+
(response._pendingInitialRender = null)));
|
|
1596
|
+
return new ReactPromise("pending", null, null);
|
|
1597
|
+
}
|
|
1598
|
+
function releasePendingChunk(response, chunk) {
|
|
1599
|
+
"pending" === chunk.status &&
|
|
1600
|
+
0 === --response._pendingChunks &&
|
|
1601
|
+
((response._weakResponse.response = null),
|
|
1602
|
+
(response._pendingInitialRender = setTimeout(
|
|
1603
|
+
flushInitialRenderPerformance.bind(null, response),
|
|
1604
|
+
100
|
|
1605
|
+
)));
|
|
1606
|
+
}
|
|
1607
|
+
function moveDebugInfoFromChunkToInnerValue(chunk, value) {
|
|
1608
|
+
value = resolveLazy(value);
|
|
1609
|
+
"object" !== typeof value ||
|
|
1610
|
+
null === value ||
|
|
1611
|
+
(!isArrayImpl(value) &&
|
|
1612
|
+
"function" !== typeof value[ASYNC_ITERATOR] &&
|
|
1613
|
+
value.$$typeof !== REACT_ELEMENT_TYPE &&
|
|
1614
|
+
value.$$typeof !== REACT_LAZY_TYPE) ||
|
|
1615
|
+
((chunk = chunk._debugInfo.splice(0)),
|
|
1616
|
+
isArrayImpl(value._debugInfo)
|
|
1617
|
+
? value._debugInfo.unshift.apply(value._debugInfo, chunk)
|
|
1618
|
+
: Object.defineProperty(value, "_debugInfo", {
|
|
1619
|
+
configurable: !1,
|
|
1620
|
+
enumerable: !1,
|
|
1621
|
+
writable: !0,
|
|
1622
|
+
value: chunk
|
|
1623
|
+
}));
|
|
1624
|
+
}
|
|
1625
|
+
function wakeChunk(listeners, value, chunk) {
|
|
1626
|
+
for (var i = 0; i < listeners.length; i++) {
|
|
1627
|
+
var listener = listeners[i];
|
|
1628
|
+
"function" === typeof listener
|
|
1629
|
+
? listener(value)
|
|
1630
|
+
: fulfillReference(listener, value, chunk);
|
|
1631
|
+
}
|
|
1632
|
+
moveDebugInfoFromChunkToInnerValue(chunk, value);
|
|
1633
|
+
}
|
|
1634
|
+
function rejectChunk(listeners, error) {
|
|
1635
|
+
for (var i = 0; i < listeners.length; i++) {
|
|
1636
|
+
var listener = listeners[i];
|
|
1637
|
+
"function" === typeof listener
|
|
1638
|
+
? listener(error)
|
|
1639
|
+
: rejectReference(listener, error);
|
|
1640
|
+
}
|
|
1136
1641
|
}
|
|
1137
|
-
function
|
|
1138
|
-
|
|
1642
|
+
function resolveBlockedCycle(resolvedChunk, reference) {
|
|
1643
|
+
var referencedChunk = reference.handler.chunk;
|
|
1644
|
+
if (null === referencedChunk) return null;
|
|
1645
|
+
if (referencedChunk === resolvedChunk) return reference.handler;
|
|
1646
|
+
reference = referencedChunk.value;
|
|
1647
|
+
if (null !== reference)
|
|
1648
|
+
for (
|
|
1649
|
+
referencedChunk = 0;
|
|
1650
|
+
referencedChunk < reference.length;
|
|
1651
|
+
referencedChunk++
|
|
1652
|
+
) {
|
|
1653
|
+
var listener = reference[referencedChunk];
|
|
1654
|
+
if (
|
|
1655
|
+
"function" !== typeof listener &&
|
|
1656
|
+
((listener = resolveBlockedCycle(resolvedChunk, listener)),
|
|
1657
|
+
null !== listener)
|
|
1658
|
+
)
|
|
1659
|
+
return listener;
|
|
1660
|
+
}
|
|
1661
|
+
return null;
|
|
1139
1662
|
}
|
|
1140
1663
|
function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) {
|
|
1141
1664
|
switch (chunk.status) {
|
|
1142
1665
|
case "fulfilled":
|
|
1143
|
-
wakeChunk(resolveListeners, chunk.value);
|
|
1666
|
+
wakeChunk(resolveListeners, chunk.value, chunk);
|
|
1144
1667
|
break;
|
|
1145
|
-
case "pending":
|
|
1146
1668
|
case "blocked":
|
|
1669
|
+
for (var i = 0; i < resolveListeners.length; i++) {
|
|
1670
|
+
var listener = resolveListeners[i];
|
|
1671
|
+
if ("function" !== typeof listener) {
|
|
1672
|
+
var cyclicHandler = resolveBlockedCycle(chunk, listener);
|
|
1673
|
+
null !== cyclicHandler &&
|
|
1674
|
+
(fulfillReference(listener, cyclicHandler.value, chunk),
|
|
1675
|
+
resolveListeners.splice(i, 1),
|
|
1676
|
+
i--,
|
|
1677
|
+
null !== rejectListeners &&
|
|
1678
|
+
((listener = rejectListeners.indexOf(listener)),
|
|
1679
|
+
-1 !== listener && rejectListeners.splice(listener, 1)));
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
case "pending":
|
|
1147
1683
|
if (chunk.value)
|
|
1148
|
-
for (
|
|
1684
|
+
for (i = 0; i < resolveListeners.length; i++)
|
|
1149
1685
|
chunk.value.push(resolveListeners[i]);
|
|
1150
1686
|
else chunk.value = resolveListeners;
|
|
1151
1687
|
if (chunk.reason) {
|
|
@@ -1159,76 +1695,168 @@
|
|
|
1159
1695
|
} else chunk.reason = rejectListeners;
|
|
1160
1696
|
break;
|
|
1161
1697
|
case "rejected":
|
|
1162
|
-
rejectListeners &&
|
|
1698
|
+
rejectListeners && rejectChunk(rejectListeners, chunk.reason);
|
|
1163
1699
|
}
|
|
1164
1700
|
}
|
|
1165
|
-
function triggerErrorOnChunk(chunk, error) {
|
|
1701
|
+
function triggerErrorOnChunk(response, chunk, error) {
|
|
1166
1702
|
if ("pending" !== chunk.status && "blocked" !== chunk.status)
|
|
1167
1703
|
chunk.reason.error(error);
|
|
1168
1704
|
else {
|
|
1705
|
+
releasePendingChunk(response, chunk);
|
|
1169
1706
|
var listeners = chunk.reason;
|
|
1707
|
+
if ("pending" === chunk.status && null != chunk._debugChunk) {
|
|
1708
|
+
var prevHandler = initializingHandler,
|
|
1709
|
+
prevChunk = initializingChunk;
|
|
1710
|
+
initializingHandler = null;
|
|
1711
|
+
chunk.status = "blocked";
|
|
1712
|
+
chunk.value = null;
|
|
1713
|
+
chunk.reason = null;
|
|
1714
|
+
initializingChunk = chunk;
|
|
1715
|
+
try {
|
|
1716
|
+
initializeDebugChunk(response, chunk);
|
|
1717
|
+
} finally {
|
|
1718
|
+
(initializingHandler = prevHandler),
|
|
1719
|
+
(initializingChunk = prevChunk);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1170
1722
|
chunk.status = "rejected";
|
|
1171
1723
|
chunk.reason = error;
|
|
1172
|
-
null !== listeners &&
|
|
1724
|
+
null !== listeners && rejectChunk(listeners, error);
|
|
1173
1725
|
}
|
|
1174
1726
|
}
|
|
1727
|
+
function createResolvedModelChunk(response, value) {
|
|
1728
|
+
return new ReactPromise("resolved_model", value, response);
|
|
1729
|
+
}
|
|
1175
1730
|
function createResolvedIteratorResultChunk(response, value, done) {
|
|
1176
1731
|
return new ReactPromise(
|
|
1177
1732
|
"resolved_model",
|
|
1178
1733
|
(done ? '{"done":true,"value":' : '{"done":false,"value":') +
|
|
1179
1734
|
value +
|
|
1180
1735
|
"}",
|
|
1181
|
-
null,
|
|
1182
1736
|
response
|
|
1183
1737
|
);
|
|
1184
1738
|
}
|
|
1185
|
-
function resolveIteratorResultChunk(chunk, value, done) {
|
|
1739
|
+
function resolveIteratorResultChunk(response, chunk, value, done) {
|
|
1186
1740
|
resolveModelChunk(
|
|
1741
|
+
response,
|
|
1187
1742
|
chunk,
|
|
1188
1743
|
(done ? '{"done":true,"value":' : '{"done":false,"value":') +
|
|
1189
1744
|
value +
|
|
1190
1745
|
"}"
|
|
1191
1746
|
);
|
|
1192
1747
|
}
|
|
1193
|
-
function resolveModelChunk(chunk, value) {
|
|
1748
|
+
function resolveModelChunk(response, chunk, value) {
|
|
1194
1749
|
if ("pending" !== chunk.status) chunk.reason.enqueueModel(value);
|
|
1195
1750
|
else {
|
|
1751
|
+
releasePendingChunk(response, chunk);
|
|
1196
1752
|
var resolveListeners = chunk.value,
|
|
1197
1753
|
rejectListeners = chunk.reason;
|
|
1198
1754
|
chunk.status = "resolved_model";
|
|
1199
1755
|
chunk.value = value;
|
|
1756
|
+
chunk.reason = response;
|
|
1200
1757
|
null !== resolveListeners &&
|
|
1201
1758
|
(initializeModelChunk(chunk),
|
|
1202
1759
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
1203
1760
|
}
|
|
1204
1761
|
}
|
|
1205
|
-
function resolveModuleChunk(chunk, value) {
|
|
1762
|
+
function resolveModuleChunk(response, chunk, value) {
|
|
1206
1763
|
if ("pending" === chunk.status || "blocked" === chunk.status) {
|
|
1207
|
-
|
|
1208
|
-
|
|
1764
|
+
releasePendingChunk(response, chunk);
|
|
1765
|
+
response = chunk.value;
|
|
1766
|
+
var rejectListeners = chunk.reason;
|
|
1209
1767
|
chunk.status = "resolved_module";
|
|
1210
1768
|
chunk.value = value;
|
|
1211
|
-
null !==
|
|
1769
|
+
null !== response &&
|
|
1212
1770
|
(initializeModuleChunk(chunk),
|
|
1213
|
-
wakeChunkIfInitialized(chunk,
|
|
1771
|
+
wakeChunkIfInitialized(chunk, response, rejectListeners));
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
function initializeDebugChunk(response, chunk) {
|
|
1775
|
+
var debugChunk = chunk._debugChunk;
|
|
1776
|
+
if (null !== debugChunk) {
|
|
1777
|
+
var debugInfo = chunk._debugInfo;
|
|
1778
|
+
try {
|
|
1779
|
+
if ("resolved_model" === debugChunk.status) {
|
|
1780
|
+
for (
|
|
1781
|
+
var idx = debugInfo.length, c = debugChunk._debugChunk;
|
|
1782
|
+
null !== c;
|
|
1783
|
+
|
|
1784
|
+
)
|
|
1785
|
+
"fulfilled" !== c.status && idx++, (c = c._debugChunk);
|
|
1786
|
+
initializeModelChunk(debugChunk);
|
|
1787
|
+
switch (debugChunk.status) {
|
|
1788
|
+
case "fulfilled":
|
|
1789
|
+
debugInfo[idx] = initializeDebugInfo(
|
|
1790
|
+
response,
|
|
1791
|
+
debugChunk.value
|
|
1792
|
+
);
|
|
1793
|
+
break;
|
|
1794
|
+
case "blocked":
|
|
1795
|
+
case "pending":
|
|
1796
|
+
waitForReference(
|
|
1797
|
+
debugChunk,
|
|
1798
|
+
debugInfo,
|
|
1799
|
+
"" + idx,
|
|
1800
|
+
response,
|
|
1801
|
+
initializeDebugInfo,
|
|
1802
|
+
[""],
|
|
1803
|
+
!0
|
|
1804
|
+
);
|
|
1805
|
+
break;
|
|
1806
|
+
default:
|
|
1807
|
+
throw debugChunk.reason;
|
|
1808
|
+
}
|
|
1809
|
+
} else
|
|
1810
|
+
switch (debugChunk.status) {
|
|
1811
|
+
case "fulfilled":
|
|
1812
|
+
break;
|
|
1813
|
+
case "blocked":
|
|
1814
|
+
case "pending":
|
|
1815
|
+
waitForReference(
|
|
1816
|
+
debugChunk,
|
|
1817
|
+
{},
|
|
1818
|
+
"debug",
|
|
1819
|
+
response,
|
|
1820
|
+
initializeDebugInfo,
|
|
1821
|
+
[""],
|
|
1822
|
+
!0
|
|
1823
|
+
);
|
|
1824
|
+
break;
|
|
1825
|
+
default:
|
|
1826
|
+
throw debugChunk.reason;
|
|
1827
|
+
}
|
|
1828
|
+
} catch (error) {
|
|
1829
|
+
triggerErrorOnChunk(response, chunk, error);
|
|
1830
|
+
}
|
|
1214
1831
|
}
|
|
1215
1832
|
}
|
|
1216
1833
|
function initializeModelChunk(chunk) {
|
|
1217
|
-
var prevHandler = initializingHandler
|
|
1834
|
+
var prevHandler = initializingHandler,
|
|
1835
|
+
prevChunk = initializingChunk;
|
|
1218
1836
|
initializingHandler = null;
|
|
1219
|
-
var resolvedModel = chunk.value
|
|
1837
|
+
var resolvedModel = chunk.value,
|
|
1838
|
+
response = chunk.reason;
|
|
1220
1839
|
chunk.status = "blocked";
|
|
1221
1840
|
chunk.value = null;
|
|
1222
1841
|
chunk.reason = null;
|
|
1842
|
+
initializingChunk = chunk;
|
|
1843
|
+
initializeDebugChunk(response, chunk);
|
|
1223
1844
|
try {
|
|
1224
|
-
var value = JSON.parse(resolvedModel,
|
|
1845
|
+
var value = JSON.parse(resolvedModel, response._fromJSON),
|
|
1225
1846
|
resolveListeners = chunk.value;
|
|
1226
|
-
null !== resolveListeners
|
|
1227
|
-
(
|
|
1228
|
-
|
|
1229
|
-
|
|
1847
|
+
if (null !== resolveListeners)
|
|
1848
|
+
for (
|
|
1849
|
+
chunk.value = null, chunk.reason = null, resolvedModel = 0;
|
|
1850
|
+
resolvedModel < resolveListeners.length;
|
|
1851
|
+
resolvedModel++
|
|
1852
|
+
) {
|
|
1853
|
+
var listener = resolveListeners[resolvedModel];
|
|
1854
|
+
"function" === typeof listener
|
|
1855
|
+
? listener(value)
|
|
1856
|
+
: fulfillReference(listener, value, chunk);
|
|
1857
|
+
}
|
|
1230
1858
|
if (null !== initializingHandler) {
|
|
1231
|
-
if (initializingHandler.errored) throw initializingHandler.
|
|
1859
|
+
if (initializingHandler.errored) throw initializingHandler.reason;
|
|
1232
1860
|
if (0 < initializingHandler.deps) {
|
|
1233
1861
|
initializingHandler.value = value;
|
|
1234
1862
|
initializingHandler.chunk = chunk;
|
|
@@ -1237,10 +1865,11 @@
|
|
|
1237
1865
|
}
|
|
1238
1866
|
chunk.status = "fulfilled";
|
|
1239
1867
|
chunk.value = value;
|
|
1868
|
+
moveDebugInfoFromChunkToInnerValue(chunk, value);
|
|
1240
1869
|
} catch (error) {
|
|
1241
1870
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1242
1871
|
} finally {
|
|
1243
|
-
initializingHandler = prevHandler;
|
|
1872
|
+
(initializingHandler = prevHandler), (initializingChunk = prevChunk);
|
|
1244
1873
|
}
|
|
1245
1874
|
}
|
|
1246
1875
|
function initializeModuleChunk(chunk) {
|
|
@@ -1252,12 +1881,22 @@
|
|
|
1252
1881
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1253
1882
|
}
|
|
1254
1883
|
}
|
|
1255
|
-
function reportGlobalError(
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1884
|
+
function reportGlobalError(weakResponse, error) {
|
|
1885
|
+
if (void 0 !== weakResponse.weak.deref()) {
|
|
1886
|
+
var response = unwrapWeakResponse(weakResponse);
|
|
1887
|
+
response._closed = !0;
|
|
1888
|
+
response._closedReason = error;
|
|
1889
|
+
response._chunks.forEach(function (chunk) {
|
|
1890
|
+
"pending" === chunk.status &&
|
|
1891
|
+
triggerErrorOnChunk(response, chunk, error);
|
|
1892
|
+
});
|
|
1893
|
+
weakResponse = response._debugChannel;
|
|
1894
|
+
void 0 !== weakResponse &&
|
|
1895
|
+
(closeDebugChannel(weakResponse),
|
|
1896
|
+
(response._debugChannel = void 0),
|
|
1897
|
+
null !== debugChannelRegistry &&
|
|
1898
|
+
debugChannelRegistry.unregister(response));
|
|
1899
|
+
}
|
|
1261
1900
|
}
|
|
1262
1901
|
function nullRefGetter() {
|
|
1263
1902
|
return null;
|
|
@@ -1278,14 +1917,69 @@
|
|
|
1278
1917
|
return "<...>";
|
|
1279
1918
|
}
|
|
1280
1919
|
}
|
|
1281
|
-
function
|
|
1920
|
+
function initializeElement(response, element, lazyNode) {
|
|
1921
|
+
var stack = element._debugStack,
|
|
1922
|
+
owner = element._owner;
|
|
1923
|
+
null === owner && (element._owner = response._debugRootOwner);
|
|
1924
|
+
var env = response._rootEnvironmentName;
|
|
1925
|
+
null !== owner && null != owner.env && (env = owner.env);
|
|
1926
|
+
var normalizedStackTrace = null;
|
|
1927
|
+
null === owner && null != response._debugRootStack
|
|
1928
|
+
? (normalizedStackTrace = response._debugRootStack)
|
|
1929
|
+
: null !== stack &&
|
|
1930
|
+
(normalizedStackTrace = createFakeJSXCallStackInDEV(
|
|
1931
|
+
response,
|
|
1932
|
+
stack,
|
|
1933
|
+
env
|
|
1934
|
+
));
|
|
1935
|
+
element._debugStack = normalizedStackTrace;
|
|
1936
|
+
normalizedStackTrace = null;
|
|
1937
|
+
supportsCreateTask &&
|
|
1938
|
+
null !== stack &&
|
|
1939
|
+
((normalizedStackTrace = console.createTask.bind(
|
|
1940
|
+
console,
|
|
1941
|
+
getTaskName(element.type)
|
|
1942
|
+
)),
|
|
1943
|
+
(stack = buildFakeCallStack(
|
|
1944
|
+
response,
|
|
1945
|
+
stack,
|
|
1946
|
+
env,
|
|
1947
|
+
!1,
|
|
1948
|
+
normalizedStackTrace
|
|
1949
|
+
)),
|
|
1950
|
+
(env = null === owner ? null : initializeFakeTask(response, owner)),
|
|
1951
|
+
null === env
|
|
1952
|
+
? ((env = response._debugRootTask),
|
|
1953
|
+
(normalizedStackTrace = null != env ? env.run(stack) : stack()))
|
|
1954
|
+
: (normalizedStackTrace = env.run(stack)));
|
|
1955
|
+
element._debugTask = normalizedStackTrace;
|
|
1956
|
+
null !== owner && initializeFakeStack(response, owner);
|
|
1957
|
+
null !== lazyNode &&
|
|
1958
|
+
(lazyNode._store &&
|
|
1959
|
+
lazyNode._store.validated &&
|
|
1960
|
+
!element._store.validated &&
|
|
1961
|
+
(element._store.validated = lazyNode._store.validated),
|
|
1962
|
+
"fulfilled" === lazyNode._payload.status &&
|
|
1963
|
+
lazyNode._debugInfo &&
|
|
1964
|
+
((response = lazyNode._debugInfo.splice(0)),
|
|
1965
|
+
element._debugInfo
|
|
1966
|
+
? element._debugInfo.unshift.apply(element._debugInfo, response)
|
|
1967
|
+
: Object.defineProperty(element, "_debugInfo", {
|
|
1968
|
+
configurable: !1,
|
|
1969
|
+
enumerable: !1,
|
|
1970
|
+
writable: !0,
|
|
1971
|
+
value: response
|
|
1972
|
+
})));
|
|
1973
|
+
Object.freeze(element.props);
|
|
1974
|
+
}
|
|
1975
|
+
function createLazyChunkWrapper(chunk, validated) {
|
|
1282
1976
|
var lazyType = {
|
|
1283
1977
|
$$typeof: REACT_LAZY_TYPE,
|
|
1284
1978
|
_payload: chunk,
|
|
1285
1979
|
_init: readChunk
|
|
1286
1980
|
};
|
|
1287
|
-
|
|
1288
|
-
lazyType.
|
|
1981
|
+
lazyType._debugInfo = chunk._debugInfo;
|
|
1982
|
+
lazyType._store = { validated: validated };
|
|
1289
1983
|
return lazyType;
|
|
1290
1984
|
}
|
|
1291
1985
|
function getChunk(response, id) {
|
|
@@ -1293,85 +1987,176 @@
|
|
|
1293
1987
|
chunk = chunks.get(id);
|
|
1294
1988
|
chunk ||
|
|
1295
1989
|
((chunk = response._closed
|
|
1296
|
-
? new ReactPromise("rejected", null, response._closedReason
|
|
1990
|
+
? new ReactPromise("rejected", null, response._closedReason)
|
|
1297
1991
|
: createPendingChunk(response)),
|
|
1298
1992
|
chunks.set(id, chunk));
|
|
1299
1993
|
return chunk;
|
|
1300
1994
|
}
|
|
1995
|
+
function fulfillReference(reference, value, fulfilledChunk) {
|
|
1996
|
+
for (
|
|
1997
|
+
var response = reference.response,
|
|
1998
|
+
handler = reference.handler,
|
|
1999
|
+
parentObject = reference.parentObject,
|
|
2000
|
+
key = reference.key,
|
|
2001
|
+
map = reference.map,
|
|
2002
|
+
path = reference.path,
|
|
2003
|
+
i = 1;
|
|
2004
|
+
i < path.length;
|
|
2005
|
+
i++
|
|
2006
|
+
) {
|
|
2007
|
+
for (
|
|
2008
|
+
;
|
|
2009
|
+
"object" === typeof value &&
|
|
2010
|
+
null !== value &&
|
|
2011
|
+
value.$$typeof === REACT_LAZY_TYPE;
|
|
2012
|
+
|
|
2013
|
+
)
|
|
2014
|
+
if (((value = value._payload), value === handler.chunk))
|
|
2015
|
+
value = handler.value;
|
|
2016
|
+
else {
|
|
2017
|
+
switch (value.status) {
|
|
2018
|
+
case "resolved_model":
|
|
2019
|
+
initializeModelChunk(value);
|
|
2020
|
+
break;
|
|
2021
|
+
case "resolved_module":
|
|
2022
|
+
initializeModuleChunk(value);
|
|
2023
|
+
}
|
|
2024
|
+
switch (value.status) {
|
|
2025
|
+
case "fulfilled":
|
|
2026
|
+
value = value.value;
|
|
2027
|
+
continue;
|
|
2028
|
+
case "blocked":
|
|
2029
|
+
var cyclicHandler = resolveBlockedCycle(value, reference);
|
|
2030
|
+
if (null !== cyclicHandler) {
|
|
2031
|
+
value = cyclicHandler.value;
|
|
2032
|
+
continue;
|
|
2033
|
+
}
|
|
2034
|
+
case "pending":
|
|
2035
|
+
path.splice(0, i - 1);
|
|
2036
|
+
null === value.value
|
|
2037
|
+
? (value.value = [reference])
|
|
2038
|
+
: value.value.push(reference);
|
|
2039
|
+
null === value.reason
|
|
2040
|
+
? (value.reason = [reference])
|
|
2041
|
+
: value.reason.push(reference);
|
|
2042
|
+
return;
|
|
2043
|
+
case "halted":
|
|
2044
|
+
return;
|
|
2045
|
+
default:
|
|
2046
|
+
rejectReference(reference, value.reason);
|
|
2047
|
+
return;
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
value = value[path[i]];
|
|
2051
|
+
}
|
|
2052
|
+
for (
|
|
2053
|
+
;
|
|
2054
|
+
"object" === typeof value &&
|
|
2055
|
+
null !== value &&
|
|
2056
|
+
value.$$typeof === REACT_LAZY_TYPE;
|
|
2057
|
+
|
|
2058
|
+
)
|
|
2059
|
+
if (((path = value._payload), path === handler.chunk))
|
|
2060
|
+
value = handler.value;
|
|
2061
|
+
else {
|
|
2062
|
+
switch (path.status) {
|
|
2063
|
+
case "resolved_model":
|
|
2064
|
+
initializeModelChunk(path);
|
|
2065
|
+
break;
|
|
2066
|
+
case "resolved_module":
|
|
2067
|
+
initializeModuleChunk(path);
|
|
2068
|
+
}
|
|
2069
|
+
switch (path.status) {
|
|
2070
|
+
case "fulfilled":
|
|
2071
|
+
value = path.value;
|
|
2072
|
+
continue;
|
|
2073
|
+
}
|
|
2074
|
+
break;
|
|
2075
|
+
}
|
|
2076
|
+
response = map(response, value, parentObject, key);
|
|
2077
|
+
parentObject[key] = response;
|
|
2078
|
+
"" === key && null === handler.value && (handler.value = response);
|
|
2079
|
+
if (
|
|
2080
|
+
parentObject[0] === REACT_ELEMENT_TYPE &&
|
|
2081
|
+
"object" === typeof handler.value &&
|
|
2082
|
+
null !== handler.value &&
|
|
2083
|
+
handler.value.$$typeof === REACT_ELEMENT_TYPE
|
|
2084
|
+
)
|
|
2085
|
+
switch (((reference = handler.value), key)) {
|
|
2086
|
+
case "3":
|
|
2087
|
+
transferReferencedDebugInfo(handler.chunk, fulfilledChunk);
|
|
2088
|
+
reference.props = response;
|
|
2089
|
+
break;
|
|
2090
|
+
case "4":
|
|
2091
|
+
reference._owner = response;
|
|
2092
|
+
break;
|
|
2093
|
+
case "5":
|
|
2094
|
+
reference._debugStack = response;
|
|
2095
|
+
break;
|
|
2096
|
+
default:
|
|
2097
|
+
transferReferencedDebugInfo(handler.chunk, fulfilledChunk);
|
|
2098
|
+
}
|
|
2099
|
+
else
|
|
2100
|
+
reference.isDebug ||
|
|
2101
|
+
transferReferencedDebugInfo(handler.chunk, fulfilledChunk);
|
|
2102
|
+
handler.deps--;
|
|
2103
|
+
0 === handler.deps &&
|
|
2104
|
+
((fulfilledChunk = handler.chunk),
|
|
2105
|
+
null !== fulfilledChunk &&
|
|
2106
|
+
"blocked" === fulfilledChunk.status &&
|
|
2107
|
+
((key = fulfilledChunk.value),
|
|
2108
|
+
(fulfilledChunk.status = "fulfilled"),
|
|
2109
|
+
(fulfilledChunk.value = handler.value),
|
|
2110
|
+
(fulfilledChunk.reason = handler.reason),
|
|
2111
|
+
null !== key && wakeChunk(key, handler.value, fulfilledChunk)));
|
|
2112
|
+
}
|
|
2113
|
+
function rejectReference(reference, error) {
|
|
2114
|
+
var handler = reference.handler;
|
|
2115
|
+
reference = reference.response;
|
|
2116
|
+
if (!handler.errored) {
|
|
2117
|
+
var blockedValue = handler.value;
|
|
2118
|
+
handler.errored = !0;
|
|
2119
|
+
handler.value = null;
|
|
2120
|
+
handler.reason = error;
|
|
2121
|
+
handler = handler.chunk;
|
|
2122
|
+
if (null !== handler && "blocked" === handler.status) {
|
|
2123
|
+
if (
|
|
2124
|
+
"object" === typeof blockedValue &&
|
|
2125
|
+
null !== blockedValue &&
|
|
2126
|
+
blockedValue.$$typeof === REACT_ELEMENT_TYPE
|
|
2127
|
+
) {
|
|
2128
|
+
var erroredComponent = {
|
|
2129
|
+
name: getComponentNameFromType(blockedValue.type) || "",
|
|
2130
|
+
owner: blockedValue._owner
|
|
2131
|
+
};
|
|
2132
|
+
erroredComponent.debugStack = blockedValue._debugStack;
|
|
2133
|
+
supportsCreateTask &&
|
|
2134
|
+
(erroredComponent.debugTask = blockedValue._debugTask);
|
|
2135
|
+
handler._debugInfo.push(erroredComponent);
|
|
2136
|
+
}
|
|
2137
|
+
triggerErrorOnChunk(reference, handler, error);
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
1301
2141
|
function waitForReference(
|
|
1302
2142
|
referencedChunk,
|
|
1303
2143
|
parentObject,
|
|
1304
2144
|
key,
|
|
1305
2145
|
response,
|
|
1306
2146
|
map,
|
|
1307
|
-
path
|
|
2147
|
+
path,
|
|
2148
|
+
isAwaitingDebugInfo
|
|
1308
2149
|
) {
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
path.splice(0, i - 1);
|
|
1317
|
-
value.then(fulfill, reject);
|
|
1318
|
-
return;
|
|
1319
|
-
}
|
|
1320
|
-
value = value[path[i]];
|
|
1321
|
-
}
|
|
1322
|
-
i = map(response, value, parentObject, key);
|
|
1323
|
-
parentObject[key] = i;
|
|
1324
|
-
"" === key && null === handler.value && (handler.value = i);
|
|
1325
|
-
if (
|
|
1326
|
-
parentObject[0] === REACT_ELEMENT_TYPE &&
|
|
1327
|
-
"object" === typeof handler.value &&
|
|
1328
|
-
null !== handler.value &&
|
|
1329
|
-
handler.value.$$typeof === REACT_ELEMENT_TYPE
|
|
2150
|
+
if (
|
|
2151
|
+
!(
|
|
2152
|
+
(void 0 !== response._debugChannel &&
|
|
2153
|
+
response._debugChannel.hasReadable) ||
|
|
2154
|
+
"pending" !== referencedChunk.status ||
|
|
2155
|
+
parentObject[0] !== REACT_ELEMENT_TYPE ||
|
|
2156
|
+
("4" !== key && "5" !== key)
|
|
1330
2157
|
)
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
value.props = i;
|
|
1334
|
-
break;
|
|
1335
|
-
case "4":
|
|
1336
|
-
value._owner = i;
|
|
1337
|
-
}
|
|
1338
|
-
handler.deps--;
|
|
1339
|
-
0 === handler.deps &&
|
|
1340
|
-
((i = handler.chunk),
|
|
1341
|
-
null !== i &&
|
|
1342
|
-
"blocked" === i.status &&
|
|
1343
|
-
((value = i.value),
|
|
1344
|
-
(i.status = "fulfilled"),
|
|
1345
|
-
(i.value = handler.value),
|
|
1346
|
-
null !== value && wakeChunk(value, handler.value)));
|
|
1347
|
-
}
|
|
1348
|
-
function reject(error) {
|
|
1349
|
-
if (!handler.errored) {
|
|
1350
|
-
var blockedValue = handler.value;
|
|
1351
|
-
handler.errored = !0;
|
|
1352
|
-
handler.value = error;
|
|
1353
|
-
var chunk = handler.chunk;
|
|
1354
|
-
if (null !== chunk && "blocked" === chunk.status) {
|
|
1355
|
-
if (
|
|
1356
|
-
"object" === typeof blockedValue &&
|
|
1357
|
-
null !== blockedValue &&
|
|
1358
|
-
blockedValue.$$typeof === REACT_ELEMENT_TYPE
|
|
1359
|
-
) {
|
|
1360
|
-
var erroredComponent = {
|
|
1361
|
-
name: getComponentNameFromType(blockedValue.type) || "",
|
|
1362
|
-
owner: blockedValue._owner
|
|
1363
|
-
};
|
|
1364
|
-
erroredComponent.debugStack = blockedValue._debugStack;
|
|
1365
|
-
supportsCreateTask &&
|
|
1366
|
-
(erroredComponent.debugTask = blockedValue._debugTask);
|
|
1367
|
-
(chunk._debugInfo || (chunk._debugInfo = [])).push(
|
|
1368
|
-
erroredComponent
|
|
1369
|
-
);
|
|
1370
|
-
}
|
|
1371
|
-
triggerErrorOnChunk(chunk, error);
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
2158
|
+
)
|
|
2159
|
+
return null;
|
|
1375
2160
|
if (initializingHandler) {
|
|
1376
2161
|
var handler = initializingHandler;
|
|
1377
2162
|
handler.deps++;
|
|
@@ -1380,10 +2165,25 @@
|
|
|
1380
2165
|
parent: null,
|
|
1381
2166
|
chunk: null,
|
|
1382
2167
|
value: null,
|
|
2168
|
+
reason: null,
|
|
1383
2169
|
deps: 1,
|
|
1384
2170
|
errored: !1
|
|
1385
2171
|
};
|
|
1386
|
-
|
|
2172
|
+
parentObject = {
|
|
2173
|
+
response: response,
|
|
2174
|
+
handler: handler,
|
|
2175
|
+
parentObject: parentObject,
|
|
2176
|
+
key: key,
|
|
2177
|
+
map: map,
|
|
2178
|
+
path: path
|
|
2179
|
+
};
|
|
2180
|
+
parentObject.isDebug = isAwaitingDebugInfo;
|
|
2181
|
+
null === referencedChunk.value
|
|
2182
|
+
? (referencedChunk.value = [parentObject])
|
|
2183
|
+
: referencedChunk.value.push(parentObject);
|
|
2184
|
+
null === referencedChunk.reason
|
|
2185
|
+
? (referencedChunk.reason = [parentObject])
|
|
2186
|
+
: referencedChunk.reason.push(parentObject);
|
|
1387
2187
|
return null;
|
|
1388
2188
|
}
|
|
1389
2189
|
function loadServerReference(response, metaData, parentObject, key) {
|
|
@@ -1421,6 +2221,7 @@
|
|
|
1421
2221
|
parent: null,
|
|
1422
2222
|
chunk: null,
|
|
1423
2223
|
value: null,
|
|
2224
|
+
reason: null,
|
|
1424
2225
|
deps: 1,
|
|
1425
2226
|
errored: !1
|
|
1426
2227
|
};
|
|
@@ -1463,13 +2264,15 @@
|
|
|
1463
2264
|
((boundArgs = resolvedValue.value),
|
|
1464
2265
|
(resolvedValue.status = "fulfilled"),
|
|
1465
2266
|
(resolvedValue.value = handler.value),
|
|
1466
|
-
null !== boundArgs &&
|
|
2267
|
+
null !== boundArgs &&
|
|
2268
|
+
wakeChunk(boundArgs, handler.value, resolvedValue)));
|
|
1467
2269
|
},
|
|
1468
2270
|
function (error) {
|
|
1469
2271
|
if (!handler.errored) {
|
|
1470
2272
|
var blockedValue = handler.value;
|
|
1471
2273
|
handler.errored = !0;
|
|
1472
|
-
handler.value =
|
|
2274
|
+
handler.value = null;
|
|
2275
|
+
handler.reason = error;
|
|
1473
2276
|
var chunk = handler.chunk;
|
|
1474
2277
|
if (null !== chunk && "blocked" === chunk.status) {
|
|
1475
2278
|
if (
|
|
@@ -1484,79 +2287,184 @@
|
|
|
1484
2287
|
erroredComponent.debugStack = blockedValue._debugStack;
|
|
1485
2288
|
supportsCreateTask &&
|
|
1486
2289
|
(erroredComponent.debugTask = blockedValue._debugTask);
|
|
1487
|
-
|
|
1488
|
-
erroredComponent
|
|
1489
|
-
);
|
|
2290
|
+
chunk._debugInfo.push(erroredComponent);
|
|
1490
2291
|
}
|
|
1491
|
-
triggerErrorOnChunk(chunk, error);
|
|
2292
|
+
triggerErrorOnChunk(response, chunk, error);
|
|
1492
2293
|
}
|
|
1493
2294
|
}
|
|
1494
2295
|
}
|
|
1495
2296
|
);
|
|
1496
2297
|
return null;
|
|
1497
2298
|
}
|
|
2299
|
+
function resolveLazy(value) {
|
|
2300
|
+
for (
|
|
2301
|
+
;
|
|
2302
|
+
"object" === typeof value &&
|
|
2303
|
+
null !== value &&
|
|
2304
|
+
value.$$typeof === REACT_LAZY_TYPE;
|
|
2305
|
+
|
|
2306
|
+
) {
|
|
2307
|
+
var payload = value._payload;
|
|
2308
|
+
if ("fulfilled" === payload.status) value = payload.value;
|
|
2309
|
+
else break;
|
|
2310
|
+
}
|
|
2311
|
+
return value;
|
|
2312
|
+
}
|
|
2313
|
+
function transferReferencedDebugInfo(parentChunk, referencedChunk) {
|
|
2314
|
+
if (null !== parentChunk) {
|
|
2315
|
+
referencedChunk = referencedChunk._debugInfo;
|
|
2316
|
+
parentChunk = parentChunk._debugInfo;
|
|
2317
|
+
for (var i = 0; i < referencedChunk.length; ++i) {
|
|
2318
|
+
var debugInfoEntry = referencedChunk[i];
|
|
2319
|
+
null == debugInfoEntry.name && parentChunk.push(debugInfoEntry);
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
1498
2323
|
function getOutlinedModel(response, reference, parentObject, key, map) {
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
2324
|
+
var path = reference.split(":");
|
|
2325
|
+
reference = parseInt(path[0], 16);
|
|
2326
|
+
reference = getChunk(response, reference);
|
|
2327
|
+
null !== initializingChunk &&
|
|
2328
|
+
isArrayImpl(initializingChunk._children) &&
|
|
2329
|
+
initializingChunk._children.push(reference);
|
|
2330
|
+
switch (reference.status) {
|
|
1503
2331
|
case "resolved_model":
|
|
1504
|
-
initializeModelChunk(
|
|
2332
|
+
initializeModelChunk(reference);
|
|
1505
2333
|
break;
|
|
1506
2334
|
case "resolved_module":
|
|
1507
|
-
initializeModuleChunk(
|
|
2335
|
+
initializeModuleChunk(reference);
|
|
1508
2336
|
}
|
|
1509
|
-
switch (
|
|
2337
|
+
switch (reference.status) {
|
|
1510
2338
|
case "fulfilled":
|
|
1511
|
-
for (var value =
|
|
1512
|
-
for (
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
"
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
2339
|
+
for (var value = reference.value, i = 1; i < path.length; i++) {
|
|
2340
|
+
for (
|
|
2341
|
+
;
|
|
2342
|
+
"object" === typeof value &&
|
|
2343
|
+
null !== value &&
|
|
2344
|
+
value.$$typeof === REACT_LAZY_TYPE;
|
|
2345
|
+
|
|
2346
|
+
) {
|
|
2347
|
+
value = value._payload;
|
|
2348
|
+
switch (value.status) {
|
|
2349
|
+
case "resolved_model":
|
|
2350
|
+
initializeModelChunk(value);
|
|
2351
|
+
break;
|
|
2352
|
+
case "resolved_module":
|
|
2353
|
+
initializeModuleChunk(value);
|
|
2354
|
+
}
|
|
2355
|
+
switch (value.status) {
|
|
2356
|
+
case "fulfilled":
|
|
2357
|
+
value = value.value;
|
|
2358
|
+
break;
|
|
2359
|
+
case "blocked":
|
|
2360
|
+
case "pending":
|
|
2361
|
+
return waitForReference(
|
|
2362
|
+
value,
|
|
2363
|
+
parentObject,
|
|
2364
|
+
key,
|
|
2365
|
+
response,
|
|
2366
|
+
map,
|
|
2367
|
+
path.slice(i - 1),
|
|
2368
|
+
!1
|
|
2369
|
+
);
|
|
2370
|
+
case "halted":
|
|
2371
|
+
return (
|
|
2372
|
+
initializingHandler
|
|
2373
|
+
? ((parentObject = initializingHandler),
|
|
2374
|
+
parentObject.deps++)
|
|
2375
|
+
: (initializingHandler = {
|
|
2376
|
+
parent: null,
|
|
2377
|
+
chunk: null,
|
|
2378
|
+
value: null,
|
|
2379
|
+
reason: null,
|
|
2380
|
+
deps: 1,
|
|
2381
|
+
errored: !1
|
|
2382
|
+
}),
|
|
2383
|
+
null
|
|
2384
|
+
);
|
|
2385
|
+
default:
|
|
2386
|
+
return (
|
|
2387
|
+
initializingHandler
|
|
2388
|
+
? ((initializingHandler.errored = !0),
|
|
2389
|
+
(initializingHandler.value = null),
|
|
2390
|
+
(initializingHandler.reason = value.reason))
|
|
2391
|
+
: (initializingHandler = {
|
|
2392
|
+
parent: null,
|
|
2393
|
+
chunk: null,
|
|
2394
|
+
value: null,
|
|
2395
|
+
reason: value.reason,
|
|
2396
|
+
deps: 0,
|
|
2397
|
+
errored: !0
|
|
2398
|
+
}),
|
|
2399
|
+
null
|
|
2400
|
+
);
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
value = value[path[i]];
|
|
2404
|
+
}
|
|
2405
|
+
for (
|
|
2406
|
+
;
|
|
2407
|
+
"object" === typeof value &&
|
|
2408
|
+
null !== value &&
|
|
2409
|
+
value.$$typeof === REACT_LAZY_TYPE;
|
|
2410
|
+
|
|
2411
|
+
) {
|
|
2412
|
+
path = value._payload;
|
|
2413
|
+
switch (path.status) {
|
|
2414
|
+
case "resolved_model":
|
|
2415
|
+
initializeModelChunk(path);
|
|
2416
|
+
break;
|
|
2417
|
+
case "resolved_module":
|
|
2418
|
+
initializeModuleChunk(path);
|
|
2419
|
+
}
|
|
2420
|
+
switch (path.status) {
|
|
2421
|
+
case "fulfilled":
|
|
2422
|
+
value = path.value;
|
|
2423
|
+
continue;
|
|
2424
|
+
}
|
|
2425
|
+
break;
|
|
2426
|
+
}
|
|
2427
|
+
response = map(response, value, parentObject, key);
|
|
2428
|
+
(parentObject[0] !== REACT_ELEMENT_TYPE ||
|
|
2429
|
+
("4" !== key && "5" !== key)) &&
|
|
2430
|
+
transferReferencedDebugInfo(initializingChunk, reference);
|
|
2431
|
+
return response;
|
|
2432
|
+
case "pending":
|
|
2433
|
+
case "blocked":
|
|
2434
|
+
return waitForReference(
|
|
2435
|
+
reference,
|
|
1545
2436
|
parentObject,
|
|
1546
2437
|
key,
|
|
1547
2438
|
response,
|
|
1548
2439
|
map,
|
|
1549
|
-
|
|
2440
|
+
path,
|
|
2441
|
+
!1
|
|
2442
|
+
);
|
|
2443
|
+
case "halted":
|
|
2444
|
+
return (
|
|
2445
|
+
initializingHandler
|
|
2446
|
+
? ((parentObject = initializingHandler), parentObject.deps++)
|
|
2447
|
+
: (initializingHandler = {
|
|
2448
|
+
parent: null,
|
|
2449
|
+
chunk: null,
|
|
2450
|
+
value: null,
|
|
2451
|
+
reason: null,
|
|
2452
|
+
deps: 1,
|
|
2453
|
+
errored: !1
|
|
2454
|
+
}),
|
|
2455
|
+
null
|
|
1550
2456
|
);
|
|
1551
2457
|
default:
|
|
1552
2458
|
return (
|
|
1553
2459
|
initializingHandler
|
|
1554
2460
|
? ((initializingHandler.errored = !0),
|
|
1555
|
-
(initializingHandler.value =
|
|
2461
|
+
(initializingHandler.value = null),
|
|
2462
|
+
(initializingHandler.reason = reference.reason))
|
|
1556
2463
|
: (initializingHandler = {
|
|
1557
2464
|
parent: null,
|
|
1558
2465
|
chunk: null,
|
|
1559
|
-
value:
|
|
2466
|
+
value: null,
|
|
2467
|
+
reason: reference.reason,
|
|
1560
2468
|
deps: 0,
|
|
1561
2469
|
errored: !0
|
|
1562
2470
|
}),
|
|
@@ -1579,12 +2487,63 @@
|
|
|
1579
2487
|
response.append(model[i][0], model[i][1]);
|
|
1580
2488
|
return response;
|
|
1581
2489
|
}
|
|
2490
|
+
function applyConstructor(response, model, parentObject) {
|
|
2491
|
+
Object.setPrototypeOf(parentObject, model.prototype);
|
|
2492
|
+
}
|
|
2493
|
+
function defineLazyGetter(response, chunk, parentObject, key) {
|
|
2494
|
+
Object.defineProperty(parentObject, key, {
|
|
2495
|
+
get: function () {
|
|
2496
|
+
"resolved_model" === chunk.status && initializeModelChunk(chunk);
|
|
2497
|
+
switch (chunk.status) {
|
|
2498
|
+
case "fulfilled":
|
|
2499
|
+
return chunk.value;
|
|
2500
|
+
case "rejected":
|
|
2501
|
+
throw chunk.reason;
|
|
2502
|
+
}
|
|
2503
|
+
return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.";
|
|
2504
|
+
},
|
|
2505
|
+
enumerable: !0,
|
|
2506
|
+
configurable: !1
|
|
2507
|
+
});
|
|
2508
|
+
return null;
|
|
2509
|
+
}
|
|
1582
2510
|
function extractIterator(response, model) {
|
|
1583
2511
|
return model[Symbol.iterator]();
|
|
1584
2512
|
}
|
|
1585
2513
|
function createModel(response, model) {
|
|
1586
2514
|
return model;
|
|
1587
2515
|
}
|
|
2516
|
+
function getInferredFunctionApproximate(code) {
|
|
2517
|
+
code = code.startsWith("Object.defineProperty(")
|
|
2518
|
+
? code.slice(22)
|
|
2519
|
+
: code.startsWith("(")
|
|
2520
|
+
? code.slice(1)
|
|
2521
|
+
: code;
|
|
2522
|
+
if (code.startsWith("async function")) {
|
|
2523
|
+
var idx = code.indexOf("(", 14);
|
|
2524
|
+
if (-1 !== idx)
|
|
2525
|
+
return (
|
|
2526
|
+
(code = code.slice(14, idx).trim()),
|
|
2527
|
+
(0, eval)("({" + JSON.stringify(code) + ":async function(){}})")[
|
|
2528
|
+
code
|
|
2529
|
+
]
|
|
2530
|
+
);
|
|
2531
|
+
} else if (code.startsWith("function")) {
|
|
2532
|
+
if (((idx = code.indexOf("(", 8)), -1 !== idx))
|
|
2533
|
+
return (
|
|
2534
|
+
(code = code.slice(8, idx).trim()),
|
|
2535
|
+
(0, eval)("({" + JSON.stringify(code) + ":function(){}})")[code]
|
|
2536
|
+
);
|
|
2537
|
+
} else if (
|
|
2538
|
+
code.startsWith("class") &&
|
|
2539
|
+
((idx = code.indexOf("{", 5)), -1 !== idx)
|
|
2540
|
+
)
|
|
2541
|
+
return (
|
|
2542
|
+
(code = code.slice(5, idx).trim()),
|
|
2543
|
+
(0, eval)("({" + JSON.stringify(code) + ":class{}})")[code]
|
|
2544
|
+
);
|
|
2545
|
+
return function () {};
|
|
2546
|
+
}
|
|
1588
2547
|
function parseModelString(response, parentObject, key, value) {
|
|
1589
2548
|
if ("$" === value[0]) {
|
|
1590
2549
|
if ("$" === value)
|
|
@@ -1595,6 +2554,7 @@
|
|
|
1595
2554
|
parent: initializingHandler,
|
|
1596
2555
|
chunk: null,
|
|
1597
2556
|
value: null,
|
|
2557
|
+
reason: null,
|
|
1598
2558
|
deps: 0,
|
|
1599
2559
|
errored: !1
|
|
1600
2560
|
}),
|
|
@@ -1607,24 +2567,30 @@
|
|
|
1607
2567
|
return (
|
|
1608
2568
|
(parentObject = parseInt(value.slice(2), 16)),
|
|
1609
2569
|
(response = getChunk(response, parentObject)),
|
|
1610
|
-
|
|
2570
|
+
null !== initializingChunk &&
|
|
2571
|
+
isArrayImpl(initializingChunk._children) &&
|
|
2572
|
+
initializingChunk._children.push(response),
|
|
2573
|
+
createLazyChunkWrapper(response, 0)
|
|
1611
2574
|
);
|
|
1612
2575
|
case "@":
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
2576
|
+
return (
|
|
2577
|
+
(parentObject = parseInt(value.slice(2), 16)),
|
|
2578
|
+
(response = getChunk(response, parentObject)),
|
|
2579
|
+
null !== initializingChunk &&
|
|
2580
|
+
isArrayImpl(initializingChunk._children) &&
|
|
2581
|
+
initializingChunk._children.push(response),
|
|
2582
|
+
response
|
|
2583
|
+
);
|
|
1616
2584
|
case "S":
|
|
1617
2585
|
return Symbol.for(value.slice(2));
|
|
1618
2586
|
case "F":
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
loadServerReference
|
|
1627
|
-
)
|
|
2587
|
+
var ref = value.slice(2);
|
|
2588
|
+
return getOutlinedModel(
|
|
2589
|
+
response,
|
|
2590
|
+
ref,
|
|
2591
|
+
parentObject,
|
|
2592
|
+
key,
|
|
2593
|
+
loadServerReference
|
|
1628
2594
|
);
|
|
1629
2595
|
case "T":
|
|
1630
2596
|
parentObject = "$" + value.slice(2);
|
|
@@ -1636,36 +2602,30 @@
|
|
|
1636
2602
|
return response.get(parentObject);
|
|
1637
2603
|
case "Q":
|
|
1638
2604
|
return (
|
|
1639
|
-
(
|
|
1640
|
-
getOutlinedModel(response,
|
|
2605
|
+
(ref = value.slice(2)),
|
|
2606
|
+
getOutlinedModel(response, ref, parentObject, key, createMap)
|
|
1641
2607
|
);
|
|
1642
2608
|
case "W":
|
|
1643
2609
|
return (
|
|
1644
|
-
(
|
|
1645
|
-
getOutlinedModel(response,
|
|
2610
|
+
(ref = value.slice(2)),
|
|
2611
|
+
getOutlinedModel(response, ref, parentObject, key, createSet)
|
|
1646
2612
|
);
|
|
1647
2613
|
case "B":
|
|
1648
2614
|
return (
|
|
1649
|
-
(
|
|
1650
|
-
getOutlinedModel(response,
|
|
2615
|
+
(ref = value.slice(2)),
|
|
2616
|
+
getOutlinedModel(response, ref, parentObject, key, createBlob)
|
|
1651
2617
|
);
|
|
1652
2618
|
case "K":
|
|
1653
2619
|
return (
|
|
1654
|
-
(
|
|
1655
|
-
getOutlinedModel(
|
|
1656
|
-
response,
|
|
1657
|
-
value,
|
|
1658
|
-
parentObject,
|
|
1659
|
-
key,
|
|
1660
|
-
createFormData
|
|
1661
|
-
)
|
|
2620
|
+
(ref = value.slice(2)),
|
|
2621
|
+
getOutlinedModel(response, ref, parentObject, key, createFormData)
|
|
1662
2622
|
);
|
|
1663
2623
|
case "Z":
|
|
1664
2624
|
return (
|
|
1665
|
-
(
|
|
2625
|
+
(ref = value.slice(2)),
|
|
1666
2626
|
getOutlinedModel(
|
|
1667
2627
|
response,
|
|
1668
|
-
|
|
2628
|
+
ref,
|
|
1669
2629
|
parentObject,
|
|
1670
2630
|
key,
|
|
1671
2631
|
resolveErrorDev
|
|
@@ -1673,10 +2633,10 @@
|
|
|
1673
2633
|
);
|
|
1674
2634
|
case "i":
|
|
1675
2635
|
return (
|
|
1676
|
-
(
|
|
2636
|
+
(ref = value.slice(2)),
|
|
1677
2637
|
getOutlinedModel(
|
|
1678
2638
|
response,
|
|
1679
|
-
|
|
2639
|
+
ref,
|
|
1680
2640
|
parentObject,
|
|
1681
2641
|
key,
|
|
1682
2642
|
extractIterator
|
|
@@ -1694,27 +2654,72 @@
|
|
|
1694
2654
|
return new Date(Date.parse(value.slice(2)));
|
|
1695
2655
|
case "n":
|
|
1696
2656
|
return BigInt(value.slice(2));
|
|
2657
|
+
case "P":
|
|
2658
|
+
return (
|
|
2659
|
+
(ref = value.slice(2)),
|
|
2660
|
+
getOutlinedModel(
|
|
2661
|
+
response,
|
|
2662
|
+
ref,
|
|
2663
|
+
parentObject,
|
|
2664
|
+
key,
|
|
2665
|
+
applyConstructor
|
|
2666
|
+
)
|
|
2667
|
+
);
|
|
1697
2668
|
case "E":
|
|
2669
|
+
response = value.slice(2);
|
|
1698
2670
|
try {
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
2671
|
+
if (!mightHaveStaticConstructor.test(response))
|
|
2672
|
+
return (0, eval)(response);
|
|
2673
|
+
} catch (x) {}
|
|
2674
|
+
try {
|
|
2675
|
+
if (
|
|
2676
|
+
((ref = getInferredFunctionApproximate(response)),
|
|
2677
|
+
response.startsWith("Object.defineProperty("))
|
|
2678
|
+
) {
|
|
2679
|
+
var idx = response.lastIndexOf(',"name",{value:"');
|
|
2680
|
+
if (-1 !== idx) {
|
|
2681
|
+
var name = JSON.parse(
|
|
2682
|
+
response.slice(idx + 16 - 1, response.length - 2)
|
|
2683
|
+
);
|
|
2684
|
+
Object.defineProperty(ref, "name", { value: name });
|
|
2685
|
+
}
|
|
2686
|
+
}
|
|
2687
|
+
} catch (_) {
|
|
2688
|
+
ref = function () {};
|
|
1702
2689
|
}
|
|
2690
|
+
return ref;
|
|
1703
2691
|
case "Y":
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
2692
|
+
if (
|
|
2693
|
+
2 < value.length &&
|
|
2694
|
+
(ref = response._debugChannel && response._debugChannel.callback)
|
|
2695
|
+
) {
|
|
2696
|
+
if ("@" === value[2])
|
|
2697
|
+
return (
|
|
2698
|
+
(parentObject = value.slice(3)),
|
|
2699
|
+
(key = parseInt(parentObject, 16)),
|
|
2700
|
+
response._chunks.has(key) || ref("P:" + parentObject),
|
|
2701
|
+
getChunk(response, key)
|
|
2702
|
+
);
|
|
2703
|
+
value = value.slice(2);
|
|
2704
|
+
idx = parseInt(value, 16);
|
|
2705
|
+
response._chunks.has(idx) || ref("Q:" + value);
|
|
2706
|
+
ref = getChunk(response, idx);
|
|
2707
|
+
return "fulfilled" === ref.status
|
|
2708
|
+
? ref.value
|
|
2709
|
+
: defineLazyGetter(response, ref, parentObject, key);
|
|
2710
|
+
}
|
|
2711
|
+
Object.defineProperty(parentObject, key, {
|
|
2712
|
+
get: function () {
|
|
2713
|
+
return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.";
|
|
2714
|
+
},
|
|
2715
|
+
enumerable: !0,
|
|
2716
|
+
configurable: !1
|
|
2717
|
+
});
|
|
2718
|
+
return null;
|
|
1714
2719
|
default:
|
|
1715
2720
|
return (
|
|
1716
|
-
(
|
|
1717
|
-
getOutlinedModel(response,
|
|
2721
|
+
(ref = value.slice(1)),
|
|
2722
|
+
getOutlinedModel(response, ref, parentObject, key, createModel)
|
|
1718
2723
|
);
|
|
1719
2724
|
}
|
|
1720
2725
|
}
|
|
@@ -1735,7 +2740,8 @@
|
|
|
1735
2740
|
temporaryReferences,
|
|
1736
2741
|
findSourceMapURL,
|
|
1737
2742
|
replayConsole,
|
|
1738
|
-
environmentName
|
|
2743
|
+
environmentName,
|
|
2744
|
+
debugChannel
|
|
1739
2745
|
) {
|
|
1740
2746
|
var chunks = new Map();
|
|
1741
2747
|
this._bundlerConfig = bundlerConfig;
|
|
@@ -1747,11 +2753,13 @@
|
|
|
1747
2753
|
this._chunks = chunks;
|
|
1748
2754
|
this._stringDecoder = new util.TextDecoder();
|
|
1749
2755
|
this._fromJSON = null;
|
|
1750
|
-
this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
|
|
1751
|
-
this._buffer = [];
|
|
1752
2756
|
this._closed = !1;
|
|
1753
2757
|
this._closedReason = null;
|
|
1754
2758
|
this._tempRefs = temporaryReferences;
|
|
2759
|
+
this._timeOrigin = 0;
|
|
2760
|
+
this._pendingInitialRender = null;
|
|
2761
|
+
this._pendingChunks = 0;
|
|
2762
|
+
this._weakResponse = { weak: new WeakRef(this), response: this };
|
|
1755
2763
|
this._debugRootOwner = bundlerConfig =
|
|
1756
2764
|
void 0 === ReactSharedInteralsServer ||
|
|
1757
2765
|
null === ReactSharedInteralsServer.A
|
|
@@ -1764,36 +2772,100 @@
|
|
|
1764
2772
|
(this._debugRootTask = console.createTask(
|
|
1765
2773
|
'"use ' + environmentName.toLowerCase() + '"'
|
|
1766
2774
|
));
|
|
2775
|
+
this._debugStartTime = performance.now();
|
|
1767
2776
|
this._debugFindSourceMapURL = findSourceMapURL;
|
|
2777
|
+
this._debugChannel = debugChannel;
|
|
2778
|
+
this._blockedConsole = null;
|
|
1768
2779
|
this._replayConsole = replayConsole;
|
|
1769
2780
|
this._rootEnvironmentName = environmentName;
|
|
2781
|
+
debugChannel &&
|
|
2782
|
+
(null === debugChannelRegistry
|
|
2783
|
+
? (closeDebugChannel(debugChannel), (this._debugChannel = void 0))
|
|
2784
|
+
: debugChannelRegistry.register(this, debugChannel, this));
|
|
2785
|
+
replayConsole && markAllTracksInOrder();
|
|
1770
2786
|
this._fromJSON = createFromJSONCallback(this);
|
|
1771
2787
|
}
|
|
1772
|
-
function
|
|
1773
|
-
var
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
:
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
2788
|
+
function createStreamState(weakResponse, streamDebugValue) {
|
|
2789
|
+
var streamState = {
|
|
2790
|
+
_rowState: 0,
|
|
2791
|
+
_rowID: 0,
|
|
2792
|
+
_rowTag: 0,
|
|
2793
|
+
_rowLength: 0,
|
|
2794
|
+
_buffer: []
|
|
2795
|
+
};
|
|
2796
|
+
weakResponse = unwrapWeakResponse(weakResponse);
|
|
2797
|
+
var debugValuePromise = Promise.resolve(streamDebugValue);
|
|
2798
|
+
debugValuePromise.status = "fulfilled";
|
|
2799
|
+
debugValuePromise.value = streamDebugValue;
|
|
2800
|
+
streamState._debugInfo = {
|
|
2801
|
+
name: "RSC stream",
|
|
2802
|
+
start: weakResponse._debugStartTime,
|
|
2803
|
+
end: weakResponse._debugStartTime,
|
|
2804
|
+
byteSize: 0,
|
|
2805
|
+
value: debugValuePromise,
|
|
2806
|
+
owner: weakResponse._debugRootOwner,
|
|
2807
|
+
debugStack: weakResponse._debugRootStack,
|
|
2808
|
+
debugTask: weakResponse._debugRootTask
|
|
2809
|
+
};
|
|
2810
|
+
streamState._debugTargetChunkSize = MIN_CHUNK_SIZE;
|
|
2811
|
+
return streamState;
|
|
1781
2812
|
}
|
|
1782
|
-
function
|
|
1783
|
-
var
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
2813
|
+
function incrementChunkDebugInfo(streamState, chunkLength) {
|
|
2814
|
+
var debugInfo = streamState._debugInfo,
|
|
2815
|
+
endTime = performance.now(),
|
|
2816
|
+
previousEndTime = debugInfo.end;
|
|
2817
|
+
chunkLength = debugInfo.byteSize + chunkLength;
|
|
2818
|
+
chunkLength > streamState._debugTargetChunkSize ||
|
|
2819
|
+
endTime > previousEndTime + 10
|
|
2820
|
+
? ((streamState._debugInfo = {
|
|
2821
|
+
name: debugInfo.name,
|
|
2822
|
+
start: debugInfo.start,
|
|
2823
|
+
end: endTime,
|
|
2824
|
+
byteSize: chunkLength,
|
|
2825
|
+
value: debugInfo.value,
|
|
2826
|
+
owner: debugInfo.owner,
|
|
2827
|
+
debugStack: debugInfo.debugStack,
|
|
2828
|
+
debugTask: debugInfo.debugTask
|
|
2829
|
+
}),
|
|
2830
|
+
(streamState._debugTargetChunkSize = chunkLength + MIN_CHUNK_SIZE))
|
|
2831
|
+
: ((debugInfo.end = endTime), (debugInfo.byteSize = chunkLength));
|
|
2832
|
+
}
|
|
2833
|
+
function addDebugInfo(chunk, debugInfo) {
|
|
2834
|
+
var value = resolveLazy(chunk.value);
|
|
2835
|
+
"object" !== typeof value ||
|
|
2836
|
+
null === value ||
|
|
2837
|
+
(!isArrayImpl(value) &&
|
|
2838
|
+
"function" !== typeof value[ASYNC_ITERATOR] &&
|
|
2839
|
+
value.$$typeof !== REACT_ELEMENT_TYPE &&
|
|
2840
|
+
value.$$typeof !== REACT_LAZY_TYPE)
|
|
2841
|
+
? chunk._debugInfo.push.apply(chunk._debugInfo, debugInfo)
|
|
2842
|
+
: isArrayImpl(value._debugInfo)
|
|
2843
|
+
? value._debugInfo.push.apply(value._debugInfo, debugInfo)
|
|
2844
|
+
: Object.defineProperty(value, "_debugInfo", {
|
|
2845
|
+
configurable: !1,
|
|
2846
|
+
enumerable: !1,
|
|
2847
|
+
writable: !0,
|
|
2848
|
+
value: debugInfo
|
|
2849
|
+
});
|
|
2850
|
+
}
|
|
2851
|
+
function resolveChunkDebugInfo(streamState, chunk) {
|
|
2852
|
+
streamState = [{ awaited: streamState._debugInfo }];
|
|
2853
|
+
"pending" === chunk.status || "blocked" === chunk.status
|
|
2854
|
+
? ((streamState = addDebugInfo.bind(null, chunk, streamState)),
|
|
2855
|
+
chunk.then(streamState, streamState))
|
|
2856
|
+
: addDebugInfo(chunk, streamState);
|
|
1788
2857
|
}
|
|
1789
|
-
function resolveBuffer(response, id, buffer) {
|
|
2858
|
+
function resolveBuffer(response, id, buffer, streamState) {
|
|
1790
2859
|
var chunks = response._chunks,
|
|
1791
2860
|
chunk = chunks.get(id);
|
|
1792
2861
|
chunk && "pending" !== chunk.status
|
|
1793
2862
|
? chunk.reason.enqueueValue(buffer)
|
|
1794
|
-
:
|
|
2863
|
+
: (chunk && releasePendingChunk(response, chunk),
|
|
2864
|
+
(response = new ReactPromise("fulfilled", buffer, null)),
|
|
2865
|
+
resolveChunkDebugInfo(streamState, response),
|
|
2866
|
+
chunks.set(id, response));
|
|
1795
2867
|
}
|
|
1796
|
-
function resolveModule(response, id, model) {
|
|
2868
|
+
function resolveModule(response, id, model, streamState) {
|
|
1797
2869
|
var chunks = response._chunks,
|
|
1798
2870
|
chunk = chunks.get(id);
|
|
1799
2871
|
model = JSON.parse(model, response._fromJSON);
|
|
@@ -1808,48 +2880,78 @@
|
|
|
1808
2880
|
);
|
|
1809
2881
|
if ((model = preloadModule(clientReference))) {
|
|
1810
2882
|
if (chunk) {
|
|
2883
|
+
releasePendingChunk(response, chunk);
|
|
1811
2884
|
var blockedChunk = chunk;
|
|
1812
2885
|
blockedChunk.status = "blocked";
|
|
1813
2886
|
} else
|
|
1814
|
-
(blockedChunk = new ReactPromise("blocked", null, null
|
|
2887
|
+
(blockedChunk = new ReactPromise("blocked", null, null)),
|
|
1815
2888
|
chunks.set(id, blockedChunk);
|
|
2889
|
+
resolveChunkDebugInfo(streamState, blockedChunk);
|
|
1816
2890
|
model.then(
|
|
1817
2891
|
function () {
|
|
1818
|
-
return resolveModuleChunk(blockedChunk, clientReference);
|
|
2892
|
+
return resolveModuleChunk(response, blockedChunk, clientReference);
|
|
1819
2893
|
},
|
|
1820
2894
|
function (error) {
|
|
1821
|
-
return triggerErrorOnChunk(blockedChunk, error);
|
|
2895
|
+
return triggerErrorOnChunk(response, blockedChunk, error);
|
|
1822
2896
|
}
|
|
1823
2897
|
);
|
|
1824
2898
|
} else
|
|
1825
2899
|
chunk
|
|
1826
|
-
?
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
);
|
|
2900
|
+
? (resolveChunkDebugInfo(streamState, chunk),
|
|
2901
|
+
resolveModuleChunk(response, chunk, clientReference))
|
|
2902
|
+
: ((chunk = new ReactPromise(
|
|
2903
|
+
"resolved_module",
|
|
2904
|
+
clientReference,
|
|
2905
|
+
null
|
|
2906
|
+
)),
|
|
2907
|
+
resolveChunkDebugInfo(streamState, chunk),
|
|
2908
|
+
chunks.set(id, chunk));
|
|
1836
2909
|
}
|
|
1837
|
-
function resolveStream(response, id, stream, controller) {
|
|
2910
|
+
function resolveStream(response, id, stream, controller, streamState) {
|
|
1838
2911
|
var chunks = response._chunks,
|
|
1839
2912
|
chunk = chunks.get(id);
|
|
1840
|
-
chunk
|
|
1841
|
-
|
|
1842
|
-
((
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
(chunk
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
2913
|
+
if (chunk) {
|
|
2914
|
+
if (
|
|
2915
|
+
(resolveChunkDebugInfo(streamState, chunk),
|
|
2916
|
+
"pending" === chunk.status)
|
|
2917
|
+
) {
|
|
2918
|
+
releasePendingChunk(response, chunk);
|
|
2919
|
+
id = chunk.value;
|
|
2920
|
+
if (null != chunk._debugChunk) {
|
|
2921
|
+
streamState = initializingHandler;
|
|
2922
|
+
chunks = initializingChunk;
|
|
2923
|
+
initializingHandler = null;
|
|
2924
|
+
chunk.status = "blocked";
|
|
2925
|
+
chunk.value = null;
|
|
2926
|
+
chunk.reason = null;
|
|
2927
|
+
initializingChunk = chunk;
|
|
2928
|
+
try {
|
|
2929
|
+
if (
|
|
2930
|
+
(initializeDebugChunk(response, chunk),
|
|
2931
|
+
null !== initializingHandler &&
|
|
2932
|
+
!initializingHandler.errored &&
|
|
2933
|
+
0 < initializingHandler.deps)
|
|
2934
|
+
) {
|
|
2935
|
+
initializingHandler.value = stream;
|
|
2936
|
+
initializingHandler.reason = controller;
|
|
2937
|
+
initializingHandler.chunk = chunk;
|
|
2938
|
+
return;
|
|
2939
|
+
}
|
|
2940
|
+
} finally {
|
|
2941
|
+
(initializingHandler = streamState), (initializingChunk = chunks);
|
|
2942
|
+
}
|
|
2943
|
+
}
|
|
2944
|
+
chunk.status = "fulfilled";
|
|
2945
|
+
chunk.value = stream;
|
|
2946
|
+
chunk.reason = controller;
|
|
2947
|
+
null !== id && wakeChunk(id, chunk.value, chunk);
|
|
2948
|
+
}
|
|
2949
|
+
} else
|
|
2950
|
+
(response = new ReactPromise("fulfilled", stream, controller)),
|
|
2951
|
+
resolveChunkDebugInfo(streamState, response),
|
|
2952
|
+
chunks.set(id, response);
|
|
1851
2953
|
}
|
|
1852
|
-
function startReadableStream(response, id, type) {
|
|
2954
|
+
function startReadableStream(response, id, type, streamState) {
|
|
1853
2955
|
var controller = null;
|
|
1854
2956
|
type = new ReadableStream({
|
|
1855
2957
|
type: type,
|
|
@@ -1858,73 +2960,75 @@
|
|
|
1858
2960
|
}
|
|
1859
2961
|
});
|
|
1860
2962
|
var previousBlockedChunk = null;
|
|
1861
|
-
resolveStream(
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
2963
|
+
resolveStream(
|
|
2964
|
+
response,
|
|
2965
|
+
id,
|
|
2966
|
+
type,
|
|
2967
|
+
{
|
|
2968
|
+
enqueueValue: function (value) {
|
|
2969
|
+
null === previousBlockedChunk
|
|
2970
|
+
? controller.enqueue(value)
|
|
2971
|
+
: previousBlockedChunk.then(function () {
|
|
2972
|
+
controller.enqueue(value);
|
|
2973
|
+
});
|
|
2974
|
+
},
|
|
2975
|
+
enqueueModel: function (json) {
|
|
2976
|
+
if (null === previousBlockedChunk) {
|
|
2977
|
+
var chunk = createResolvedModelChunk(response, json);
|
|
2978
|
+
initializeModelChunk(chunk);
|
|
2979
|
+
"fulfilled" === chunk.status
|
|
2980
|
+
? controller.enqueue(chunk.value)
|
|
2981
|
+
: (chunk.then(
|
|
2982
|
+
function (v) {
|
|
2983
|
+
return controller.enqueue(v);
|
|
2984
|
+
},
|
|
2985
|
+
function (e) {
|
|
2986
|
+
return controller.error(e);
|
|
2987
|
+
}
|
|
2988
|
+
),
|
|
2989
|
+
(previousBlockedChunk = chunk));
|
|
2990
|
+
} else {
|
|
2991
|
+
chunk = previousBlockedChunk;
|
|
2992
|
+
var _chunk3 = createPendingChunk(response);
|
|
2993
|
+
_chunk3.then(
|
|
2994
|
+
function (v) {
|
|
2995
|
+
return controller.enqueue(v);
|
|
2996
|
+
},
|
|
2997
|
+
function (e) {
|
|
2998
|
+
return controller.error(e);
|
|
2999
|
+
}
|
|
3000
|
+
);
|
|
3001
|
+
previousBlockedChunk = _chunk3;
|
|
3002
|
+
chunk.then(function () {
|
|
3003
|
+
previousBlockedChunk === _chunk3 &&
|
|
3004
|
+
(previousBlockedChunk = null);
|
|
3005
|
+
resolveModelChunk(response, _chunk3, json);
|
|
1867
3006
|
});
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
null
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
} else {
|
|
1890
|
-
chunk = previousBlockedChunk;
|
|
1891
|
-
var _chunk3 = createPendingChunk(response);
|
|
1892
|
-
_chunk3.then(
|
|
1893
|
-
function (v) {
|
|
1894
|
-
return controller.enqueue(v);
|
|
1895
|
-
},
|
|
1896
|
-
function (e) {
|
|
1897
|
-
return controller.error(e);
|
|
1898
|
-
}
|
|
1899
|
-
);
|
|
1900
|
-
previousBlockedChunk = _chunk3;
|
|
1901
|
-
chunk.then(function () {
|
|
1902
|
-
previousBlockedChunk === _chunk3 && (previousBlockedChunk = null);
|
|
1903
|
-
resolveModelChunk(_chunk3, json);
|
|
1904
|
-
});
|
|
1905
|
-
}
|
|
1906
|
-
},
|
|
1907
|
-
close: function () {
|
|
1908
|
-
if (null === previousBlockedChunk) controller.close();
|
|
1909
|
-
else {
|
|
1910
|
-
var blockedChunk = previousBlockedChunk;
|
|
1911
|
-
previousBlockedChunk = null;
|
|
1912
|
-
blockedChunk.then(function () {
|
|
1913
|
-
return controller.close();
|
|
1914
|
-
});
|
|
3007
|
+
}
|
|
3008
|
+
},
|
|
3009
|
+
close: function () {
|
|
3010
|
+
if (null === previousBlockedChunk) controller.close();
|
|
3011
|
+
else {
|
|
3012
|
+
var blockedChunk = previousBlockedChunk;
|
|
3013
|
+
previousBlockedChunk = null;
|
|
3014
|
+
blockedChunk.then(function () {
|
|
3015
|
+
return controller.close();
|
|
3016
|
+
});
|
|
3017
|
+
}
|
|
3018
|
+
},
|
|
3019
|
+
error: function (error) {
|
|
3020
|
+
if (null === previousBlockedChunk) controller.error(error);
|
|
3021
|
+
else {
|
|
3022
|
+
var blockedChunk = previousBlockedChunk;
|
|
3023
|
+
previousBlockedChunk = null;
|
|
3024
|
+
blockedChunk.then(function () {
|
|
3025
|
+
return controller.error(error);
|
|
3026
|
+
});
|
|
3027
|
+
}
|
|
1915
3028
|
}
|
|
1916
3029
|
},
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
else {
|
|
1920
|
-
var blockedChunk = previousBlockedChunk;
|
|
1921
|
-
previousBlockedChunk = null;
|
|
1922
|
-
blockedChunk.then(function () {
|
|
1923
|
-
return controller.error(error);
|
|
1924
|
-
});
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
});
|
|
3030
|
+
streamState
|
|
3031
|
+
);
|
|
1928
3032
|
}
|
|
1929
3033
|
function asyncIterator() {
|
|
1930
3034
|
return this;
|
|
@@ -1934,30 +3038,30 @@
|
|
|
1934
3038
|
next[ASYNC_ITERATOR] = asyncIterator;
|
|
1935
3039
|
return next;
|
|
1936
3040
|
}
|
|
1937
|
-
function startAsyncIterable(response, id, iterator) {
|
|
3041
|
+
function startAsyncIterable(response, id, iterator, streamState) {
|
|
1938
3042
|
var buffer = [],
|
|
1939
3043
|
closed = !1,
|
|
1940
3044
|
nextWriteIndex = 0,
|
|
1941
|
-
iterable =
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
3045
|
+
iterable = {};
|
|
3046
|
+
iterable[ASYNC_ITERATOR] = function () {
|
|
3047
|
+
var nextReadIndex = 0;
|
|
3048
|
+
return createIterator(function (arg) {
|
|
3049
|
+
if (void 0 !== arg)
|
|
3050
|
+
throw Error(
|
|
3051
|
+
"Values cannot be passed to next() of AsyncIterables passed to Client Components."
|
|
3052
|
+
);
|
|
3053
|
+
if (nextReadIndex === buffer.length) {
|
|
3054
|
+
if (closed)
|
|
3055
|
+
return new ReactPromise(
|
|
3056
|
+
"fulfilled",
|
|
3057
|
+
{ done: !0, value: void 0 },
|
|
3058
|
+
null
|
|
1947
3059
|
);
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
"fulfilled",
|
|
1952
|
-
{ done: !0, value: void 0 },
|
|
1953
|
-
null,
|
|
1954
|
-
response
|
|
1955
|
-
);
|
|
1956
|
-
buffer[nextReadIndex] = createPendingChunk(response);
|
|
1957
|
-
}
|
|
1958
|
-
return buffer[nextReadIndex++];
|
|
1959
|
-
});
|
|
3060
|
+
buffer[nextReadIndex] = createPendingChunk(response);
|
|
3061
|
+
}
|
|
3062
|
+
return buffer[nextReadIndex++];
|
|
1960
3063
|
});
|
|
3064
|
+
};
|
|
1961
3065
|
resolveStream(
|
|
1962
3066
|
response,
|
|
1963
3067
|
id,
|
|
@@ -1968,8 +3072,7 @@
|
|
|
1968
3072
|
buffer[nextWriteIndex] = new ReactPromise(
|
|
1969
3073
|
"fulfilled",
|
|
1970
3074
|
{ done: !1, value: value },
|
|
1971
|
-
null
|
|
1972
|
-
response
|
|
3075
|
+
null
|
|
1973
3076
|
);
|
|
1974
3077
|
else {
|
|
1975
3078
|
var chunk = buffer[nextWriteIndex],
|
|
@@ -1993,7 +3096,12 @@
|
|
|
1993
3096
|
value,
|
|
1994
3097
|
!1
|
|
1995
3098
|
))
|
|
1996
|
-
: resolveIteratorResultChunk(
|
|
3099
|
+
: resolveIteratorResultChunk(
|
|
3100
|
+
response,
|
|
3101
|
+
buffer[nextWriteIndex],
|
|
3102
|
+
value,
|
|
3103
|
+
!1
|
|
3104
|
+
);
|
|
1997
3105
|
nextWriteIndex++;
|
|
1998
3106
|
},
|
|
1999
3107
|
close: function (value) {
|
|
@@ -2004,9 +3112,15 @@
|
|
|
2004
3112
|
value,
|
|
2005
3113
|
!0
|
|
2006
3114
|
))
|
|
2007
|
-
: resolveIteratorResultChunk(
|
|
3115
|
+
: resolveIteratorResultChunk(
|
|
3116
|
+
response,
|
|
3117
|
+
buffer[nextWriteIndex],
|
|
3118
|
+
value,
|
|
3119
|
+
!0
|
|
3120
|
+
);
|
|
2008
3121
|
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
2009
3122
|
resolveIteratorResultChunk(
|
|
3123
|
+
response,
|
|
2010
3124
|
buffer[nextWriteIndex++],
|
|
2011
3125
|
'"$undefined"',
|
|
2012
3126
|
!0
|
|
@@ -2020,78 +3134,45 @@
|
|
|
2020
3134
|
nextWriteIndex < buffer.length;
|
|
2021
3135
|
|
|
2022
3136
|
)
|
|
2023
|
-
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
3137
|
+
triggerErrorOnChunk(response, buffer[nextWriteIndex++], error);
|
|
2024
3138
|
}
|
|
2025
|
-
}
|
|
3139
|
+
},
|
|
3140
|
+
streamState
|
|
2026
3141
|
);
|
|
2027
3142
|
}
|
|
2028
|
-
function stopStream(response, id, row) {
|
|
2029
|
-
(response = response._chunks.get(id)) &&
|
|
2030
|
-
"fulfilled" === response.status &&
|
|
2031
|
-
response.reason.close("" === row ? '"$undefined"' : row);
|
|
2032
|
-
}
|
|
2033
3143
|
function resolveErrorDev(response, errorInfo) {
|
|
2034
3144
|
var name = errorInfo.name,
|
|
2035
3145
|
env = errorInfo.env;
|
|
2036
|
-
|
|
3146
|
+
var error = buildFakeCallStack(
|
|
2037
3147
|
response,
|
|
2038
3148
|
errorInfo.stack,
|
|
2039
3149
|
env,
|
|
3150
|
+
!1,
|
|
2040
3151
|
Error.bind(
|
|
2041
3152
|
null,
|
|
2042
3153
|
errorInfo.message ||
|
|
2043
3154
|
"An error occurred in the Server Components render but no message was provided"
|
|
2044
3155
|
)
|
|
2045
3156
|
);
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
code = response[0];
|
|
2066
|
-
var as = response[1];
|
|
2067
|
-
3 === response.length
|
|
2068
|
-
? model.L(code, as, response[2])
|
|
2069
|
-
: model.L(code, as);
|
|
2070
|
-
break;
|
|
2071
|
-
case "m":
|
|
2072
|
-
"string" === typeof response
|
|
2073
|
-
? model.m(response)
|
|
2074
|
-
: model.m(response[0], response[1]);
|
|
2075
|
-
break;
|
|
2076
|
-
case "X":
|
|
2077
|
-
"string" === typeof response
|
|
2078
|
-
? model.X(response)
|
|
2079
|
-
: model.X(response[0], response[1]);
|
|
2080
|
-
break;
|
|
2081
|
-
case "S":
|
|
2082
|
-
"string" === typeof response
|
|
2083
|
-
? model.S(response)
|
|
2084
|
-
: model.S(
|
|
2085
|
-
response[0],
|
|
2086
|
-
0 === response[1] ? void 0 : response[1],
|
|
2087
|
-
3 === response.length ? response[2] : void 0
|
|
2088
|
-
);
|
|
2089
|
-
break;
|
|
2090
|
-
case "M":
|
|
2091
|
-
"string" === typeof response
|
|
2092
|
-
? model.M(response)
|
|
2093
|
-
: model.M(response[0], response[1]);
|
|
2094
|
-
}
|
|
3157
|
+
var ownerTask = null;
|
|
3158
|
+
null != errorInfo.owner &&
|
|
3159
|
+
((errorInfo = errorInfo.owner.slice(1)),
|
|
3160
|
+
(errorInfo = getOutlinedModel(
|
|
3161
|
+
response,
|
|
3162
|
+
errorInfo,
|
|
3163
|
+
{},
|
|
3164
|
+
"",
|
|
3165
|
+
createModel
|
|
3166
|
+
)),
|
|
3167
|
+
null !== errorInfo &&
|
|
3168
|
+
(ownerTask = initializeFakeTask(response, errorInfo)));
|
|
3169
|
+
null === ownerTask
|
|
3170
|
+
? ((response = getRootTask(response, env)),
|
|
3171
|
+
(error = null != response ? response.run(error) : error()))
|
|
3172
|
+
: (error = ownerTask.run(error));
|
|
3173
|
+
error.name = name;
|
|
3174
|
+
error.environmentName = env;
|
|
3175
|
+
return error;
|
|
2095
3176
|
}
|
|
2096
3177
|
function createFakeFunction(
|
|
2097
3178
|
name,
|
|
@@ -2099,41 +3180,90 @@
|
|
|
2099
3180
|
sourceMap,
|
|
2100
3181
|
line,
|
|
2101
3182
|
col,
|
|
3183
|
+
enclosingLine,
|
|
3184
|
+
enclosingCol,
|
|
2102
3185
|
environmentName
|
|
2103
3186
|
) {
|
|
2104
3187
|
name || (name = "<anonymous>");
|
|
2105
3188
|
var encodedName = JSON.stringify(name);
|
|
2106
|
-
1
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
3189
|
+
1 > enclosingLine ? (enclosingLine = 0) : enclosingLine--;
|
|
3190
|
+
1 > enclosingCol ? (enclosingCol = 0) : enclosingCol--;
|
|
3191
|
+
1 > line ? (line = 0) : line--;
|
|
3192
|
+
1 > col ? (col = 0) : col--;
|
|
3193
|
+
if (
|
|
3194
|
+
line < enclosingLine ||
|
|
3195
|
+
(line === enclosingLine && col < enclosingCol)
|
|
3196
|
+
)
|
|
3197
|
+
enclosingCol = enclosingLine = 0;
|
|
3198
|
+
1 > line
|
|
3199
|
+
? ((line = encodedName.length + 3),
|
|
3200
|
+
(enclosingCol -= line),
|
|
3201
|
+
0 > enclosingCol && (enclosingCol = 0),
|
|
3202
|
+
(col = col - enclosingCol - line - 3),
|
|
3203
|
+
0 > col && (col = 0),
|
|
3204
|
+
(encodedName =
|
|
2117
3205
|
"({" +
|
|
2118
3206
|
encodedName +
|
|
2119
|
-
":
|
|
2120
|
-
" ".repeat(
|
|
2121
|
-
"_
|
|
3207
|
+
":" +
|
|
3208
|
+
" ".repeat(enclosingCol) +
|
|
3209
|
+
"_=>" +
|
|
3210
|
+
" ".repeat(col) +
|
|
3211
|
+
"_()})"))
|
|
3212
|
+
: 1 > enclosingLine
|
|
3213
|
+
? ((enclosingCol -= encodedName.length + 3),
|
|
3214
|
+
0 > enclosingCol && (enclosingCol = 0),
|
|
3215
|
+
(encodedName =
|
|
3216
|
+
"({" +
|
|
3217
|
+
encodedName +
|
|
3218
|
+
":" +
|
|
3219
|
+
" ".repeat(enclosingCol) +
|
|
3220
|
+
"_=>" +
|
|
3221
|
+
"\n".repeat(line - enclosingLine) +
|
|
3222
|
+
" ".repeat(col) +
|
|
3223
|
+
"_()})"))
|
|
3224
|
+
: enclosingLine === line
|
|
3225
|
+
? ((col = col - enclosingCol - 3),
|
|
3226
|
+
0 > col && (col = 0),
|
|
3227
|
+
(encodedName =
|
|
3228
|
+
"\n".repeat(enclosingLine - 1) +
|
|
3229
|
+
"({" +
|
|
3230
|
+
encodedName +
|
|
3231
|
+
":\n" +
|
|
3232
|
+
" ".repeat(enclosingCol) +
|
|
3233
|
+
"_=>" +
|
|
3234
|
+
" ".repeat(col) +
|
|
3235
|
+
"_()})"))
|
|
3236
|
+
: (encodedName =
|
|
3237
|
+
"\n".repeat(enclosingLine - 1) +
|
|
3238
|
+
"({" +
|
|
3239
|
+
encodedName +
|
|
3240
|
+
":\n" +
|
|
3241
|
+
" ".repeat(enclosingCol) +
|
|
3242
|
+
"_=>" +
|
|
3243
|
+
"\n".repeat(line - enclosingLine) +
|
|
3244
|
+
" ".repeat(col) +
|
|
3245
|
+
"_()})");
|
|
3246
|
+
encodedName =
|
|
3247
|
+
1 > enclosingLine
|
|
3248
|
+
? encodedName +
|
|
3249
|
+
"\n/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */"
|
|
3250
|
+
: "/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" +
|
|
3251
|
+
encodedName;
|
|
2122
3252
|
filename.startsWith("/") && (filename = "file://" + filename);
|
|
2123
3253
|
sourceMap
|
|
2124
|
-
? ((
|
|
2125
|
-
"\n//# sourceURL=
|
|
3254
|
+
? ((encodedName +=
|
|
3255
|
+
"\n//# sourceURL=about://React/" +
|
|
2126
3256
|
encodeURIComponent(environmentName) +
|
|
2127
3257
|
"/" +
|
|
2128
3258
|
encodeURI(filename) +
|
|
2129
3259
|
"?" +
|
|
2130
3260
|
fakeFunctionIdx++),
|
|
2131
|
-
(
|
|
2132
|
-
: (
|
|
2133
|
-
?
|
|
2134
|
-
:
|
|
3261
|
+
(encodedName += "\n//# sourceMappingURL=" + sourceMap))
|
|
3262
|
+
: (encodedName = filename
|
|
3263
|
+
? encodedName + ("\n//# sourceURL=" + encodeURI(filename))
|
|
3264
|
+
: encodedName + "\n//# sourceURL=<anonymous>");
|
|
2135
3265
|
try {
|
|
2136
|
-
var fn = (0, eval)(
|
|
3266
|
+
var fn = (0, eval)(encodedName)[name];
|
|
2137
3267
|
} catch (x) {
|
|
2138
3268
|
fn = function (_) {
|
|
2139
3269
|
return _();
|
|
@@ -2141,16 +3271,28 @@
|
|
|
2141
3271
|
}
|
|
2142
3272
|
return fn;
|
|
2143
3273
|
}
|
|
2144
|
-
function buildFakeCallStack(
|
|
3274
|
+
function buildFakeCallStack(
|
|
3275
|
+
response,
|
|
3276
|
+
stack,
|
|
3277
|
+
environmentName,
|
|
3278
|
+
useEnclosingLine,
|
|
3279
|
+
innerCall
|
|
3280
|
+
) {
|
|
2145
3281
|
for (var i = 0; i < stack.length; i++) {
|
|
2146
3282
|
var frame = stack[i],
|
|
2147
|
-
frameKey =
|
|
3283
|
+
frameKey =
|
|
3284
|
+
frame.join("-") +
|
|
3285
|
+
"-" +
|
|
3286
|
+
environmentName +
|
|
3287
|
+
(useEnclosingLine ? "-e" : "-n"),
|
|
2148
3288
|
fn = fakeFunctionCache.get(frameKey);
|
|
2149
3289
|
if (void 0 === fn) {
|
|
2150
3290
|
fn = frame[0];
|
|
2151
3291
|
var filename = frame[1],
|
|
2152
|
-
line = frame[2]
|
|
2153
|
-
|
|
3292
|
+
line = frame[2],
|
|
3293
|
+
col = frame[3],
|
|
3294
|
+
enclosingLine = frame[4];
|
|
3295
|
+
frame = frame[5];
|
|
2154
3296
|
var findSourceMapURL = response._debugFindSourceMapURL;
|
|
2155
3297
|
findSourceMapURL = findSourceMapURL
|
|
2156
3298
|
? findSourceMapURL(filename, environmentName)
|
|
@@ -2160,7 +3302,9 @@
|
|
|
2160
3302
|
filename,
|
|
2161
3303
|
findSourceMapURL,
|
|
2162
3304
|
line,
|
|
2163
|
-
|
|
3305
|
+
col,
|
|
3306
|
+
useEnclosingLine ? line : enclosingLine,
|
|
3307
|
+
useEnclosingLine ? col : frame,
|
|
2164
3308
|
environmentName
|
|
2165
3309
|
);
|
|
2166
3310
|
fakeFunctionCache.set(frameKey, fn);
|
|
@@ -2181,75 +3325,79 @@
|
|
|
2181
3325
|
: rootTask
|
|
2182
3326
|
: null;
|
|
2183
3327
|
}
|
|
2184
|
-
function initializeFakeTask(response, debugInfo
|
|
3328
|
+
function initializeFakeTask(response, debugInfo) {
|
|
2185
3329
|
if (!supportsCreateTask || null == debugInfo.stack) return null;
|
|
2186
|
-
var
|
|
3330
|
+
var cachedEntry = debugInfo.debugTask;
|
|
3331
|
+
if (void 0 !== cachedEntry) return cachedEntry;
|
|
3332
|
+
var useEnclosingLine = void 0 === debugInfo.key,
|
|
3333
|
+
stack = debugInfo.stack,
|
|
2187
3334
|
env =
|
|
2188
3335
|
null == debugInfo.env ? response._rootEnvironmentName : debugInfo.env;
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
: initializeFakeTask(response, debugInfo.owner, env)),
|
|
2195
|
-
buildFakeTask(
|
|
2196
|
-
response,
|
|
2197
|
-
debugInfo,
|
|
2198
|
-
stack,
|
|
2199
|
-
'"use ' + childEnvironmentName.toLowerCase() + '"',
|
|
2200
|
-
env
|
|
2201
|
-
)
|
|
2202
|
-
);
|
|
2203
|
-
childEnvironmentName = debugInfo.debugTask;
|
|
2204
|
-
if (void 0 !== childEnvironmentName) return childEnvironmentName;
|
|
2205
|
-
childEnvironmentName =
|
|
3336
|
+
cachedEntry =
|
|
3337
|
+
null == debugInfo.owner || null == debugInfo.owner.env
|
|
3338
|
+
? response._rootEnvironmentName
|
|
3339
|
+
: debugInfo.owner.env;
|
|
3340
|
+
var ownerTask =
|
|
2206
3341
|
null == debugInfo.owner
|
|
2207
3342
|
? null
|
|
2208
|
-
: initializeFakeTask(response, debugInfo.owner
|
|
2209
|
-
|
|
3343
|
+
: initializeFakeTask(response, debugInfo.owner);
|
|
3344
|
+
env =
|
|
3345
|
+
env !== cachedEntry
|
|
3346
|
+
? '"use ' + env.toLowerCase() + '"'
|
|
3347
|
+
: void 0 !== debugInfo.key
|
|
3348
|
+
? "<" + (debugInfo.name || "...") + ">"
|
|
3349
|
+
: void 0 !== debugInfo.name
|
|
3350
|
+
? debugInfo.name || "unknown"
|
|
3351
|
+
: "await " + (debugInfo.awaited.name || "unknown");
|
|
3352
|
+
env = console.createTask.bind(console, env);
|
|
3353
|
+
useEnclosingLine = buildFakeCallStack(
|
|
2210
3354
|
response,
|
|
2211
|
-
childEnvironmentName,
|
|
2212
3355
|
stack,
|
|
2213
|
-
|
|
3356
|
+
cachedEntry,
|
|
3357
|
+
useEnclosingLine,
|
|
2214
3358
|
env
|
|
2215
|
-
)
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
3359
|
+
);
|
|
3360
|
+
null === ownerTask
|
|
3361
|
+
? ((response = getRootTask(response, cachedEntry)),
|
|
3362
|
+
(response =
|
|
3363
|
+
null != response
|
|
3364
|
+
? response.run(useEnclosingLine)
|
|
3365
|
+
: useEnclosingLine()))
|
|
3366
|
+
: (response = ownerTask.run(useEnclosingLine));
|
|
3367
|
+
return (debugInfo.debugTask = response);
|
|
2224
3368
|
}
|
|
2225
3369
|
function fakeJSXCallSite() {
|
|
2226
3370
|
return Error("react-stack-top-frame");
|
|
2227
3371
|
}
|
|
2228
3372
|
function initializeFakeStack(response, debugInfo) {
|
|
2229
|
-
void 0 === debugInfo.debugStack
|
|
2230
|
-
|
|
3373
|
+
if (void 0 === debugInfo.debugStack) {
|
|
3374
|
+
null != debugInfo.stack &&
|
|
2231
3375
|
(debugInfo.debugStack = createFakeJSXCallStackInDEV(
|
|
2232
3376
|
response,
|
|
2233
3377
|
debugInfo.stack,
|
|
2234
3378
|
null == debugInfo.env ? "" : debugInfo.env
|
|
2235
|
-
))
|
|
2236
|
-
|
|
2237
|
-
|
|
3379
|
+
));
|
|
3380
|
+
var owner = debugInfo.owner;
|
|
3381
|
+
null != owner &&
|
|
3382
|
+
(initializeFakeStack(response, owner),
|
|
3383
|
+
void 0 === owner.debugLocation &&
|
|
3384
|
+
null != debugInfo.debugStack &&
|
|
3385
|
+
(owner.debugLocation = debugInfo.debugStack));
|
|
3386
|
+
}
|
|
2238
3387
|
}
|
|
2239
|
-
function
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
(response._debugInfo || (response._debugInfo = [])).push(debugInfo);
|
|
3388
|
+
function initializeDebugInfo(response, debugInfo) {
|
|
3389
|
+
void 0 !== debugInfo.stack && initializeFakeTask(response, debugInfo);
|
|
3390
|
+
if (null == debugInfo.owner && null != response._debugRootOwner) {
|
|
3391
|
+
var _componentInfoOrAsyncInfo = debugInfo;
|
|
3392
|
+
_componentInfoOrAsyncInfo.owner = response._debugRootOwner;
|
|
3393
|
+
_componentInfoOrAsyncInfo.stack = null;
|
|
3394
|
+
_componentInfoOrAsyncInfo.debugStack = response._debugRootStack;
|
|
3395
|
+
_componentInfoOrAsyncInfo.debugTask = response._debugRootTask;
|
|
3396
|
+
} else
|
|
3397
|
+
void 0 !== debugInfo.stack && initializeFakeStack(response, debugInfo);
|
|
3398
|
+
"number" === typeof debugInfo.time &&
|
|
3399
|
+
(debugInfo = { time: debugInfo.time + response._timeOrigin });
|
|
3400
|
+
return debugInfo;
|
|
2253
3401
|
}
|
|
2254
3402
|
function getCurrentStackInDEV() {
|
|
2255
3403
|
var owner = currentOwnerInDEV;
|
|
@@ -2306,24 +3454,83 @@
|
|
|
2306
3454
|
}
|
|
2307
3455
|
return JSCompiler_inline_result$jscomp$0;
|
|
2308
3456
|
}
|
|
2309
|
-
function resolveConsoleEntry(response,
|
|
3457
|
+
function resolveConsoleEntry(response, json) {
|
|
2310
3458
|
if (response._replayConsole) {
|
|
2311
|
-
var
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
3459
|
+
var blockedChunk = response._blockedConsole;
|
|
3460
|
+
if (null == blockedChunk)
|
|
3461
|
+
(blockedChunk = createResolvedModelChunk(response, json)),
|
|
3462
|
+
initializeModelChunk(blockedChunk),
|
|
3463
|
+
"fulfilled" === blockedChunk.status
|
|
3464
|
+
? replayConsoleWithCallStackInDEV(response, blockedChunk.value)
|
|
3465
|
+
: (blockedChunk.then(
|
|
3466
|
+
function (v) {
|
|
3467
|
+
return replayConsoleWithCallStackInDEV(response, v);
|
|
3468
|
+
},
|
|
3469
|
+
function () {}
|
|
3470
|
+
),
|
|
3471
|
+
(response._blockedConsole = blockedChunk));
|
|
3472
|
+
else {
|
|
3473
|
+
var _chunk4 = createPendingChunk(response);
|
|
3474
|
+
_chunk4.then(
|
|
3475
|
+
function (v) {
|
|
3476
|
+
return replayConsoleWithCallStackInDEV(response, v);
|
|
3477
|
+
},
|
|
3478
|
+
function () {}
|
|
3479
|
+
);
|
|
3480
|
+
response._blockedConsole = _chunk4;
|
|
3481
|
+
var unblock = function () {
|
|
3482
|
+
response._blockedConsole === _chunk4 &&
|
|
3483
|
+
(response._blockedConsole = null);
|
|
3484
|
+
resolveModelChunk(response, _chunk4, json);
|
|
3485
|
+
};
|
|
3486
|
+
blockedChunk.then(unblock, unblock);
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3489
|
+
}
|
|
3490
|
+
function initializeIOInfo(response, ioInfo) {
|
|
3491
|
+
void 0 !== ioInfo.stack &&
|
|
3492
|
+
(initializeFakeTask(response, ioInfo),
|
|
3493
|
+
initializeFakeStack(response, ioInfo));
|
|
3494
|
+
ioInfo.start += response._timeOrigin;
|
|
3495
|
+
ioInfo.end += response._timeOrigin;
|
|
3496
|
+
if (response._replayConsole) {
|
|
3497
|
+
response = response._rootEnvironmentName;
|
|
3498
|
+
var promise = ioInfo.value;
|
|
3499
|
+
if (promise)
|
|
3500
|
+
switch (promise.status) {
|
|
3501
|
+
case "fulfilled":
|
|
3502
|
+
logIOInfo(ioInfo, response, promise.value);
|
|
3503
|
+
break;
|
|
3504
|
+
case "rejected":
|
|
3505
|
+
logIOInfoErrored(ioInfo, response, promise.reason);
|
|
3506
|
+
break;
|
|
3507
|
+
default:
|
|
3508
|
+
promise.then(
|
|
3509
|
+
logIOInfo.bind(null, ioInfo, response),
|
|
3510
|
+
logIOInfoErrored.bind(null, ioInfo, response)
|
|
3511
|
+
);
|
|
3512
|
+
}
|
|
3513
|
+
else logIOInfo(ioInfo, response, void 0);
|
|
2325
3514
|
}
|
|
2326
3515
|
}
|
|
3516
|
+
function resolveIOInfo(response, id, model) {
|
|
3517
|
+
var chunks = response._chunks,
|
|
3518
|
+
chunk = chunks.get(id);
|
|
3519
|
+
chunk
|
|
3520
|
+
? (resolveModelChunk(response, chunk, model),
|
|
3521
|
+
"resolved_model" === chunk.status && initializeModelChunk(chunk))
|
|
3522
|
+
: ((chunk = createResolvedModelChunk(response, model)),
|
|
3523
|
+
chunks.set(id, chunk),
|
|
3524
|
+
initializeModelChunk(chunk));
|
|
3525
|
+
"fulfilled" === chunk.status
|
|
3526
|
+
? initializeIOInfo(response, chunk.value)
|
|
3527
|
+
: chunk.then(
|
|
3528
|
+
function (v) {
|
|
3529
|
+
initializeIOInfo(response, v);
|
|
3530
|
+
},
|
|
3531
|
+
function () {}
|
|
3532
|
+
);
|
|
3533
|
+
}
|
|
2327
3534
|
function mergeBuffer(buffer, lastChunk) {
|
|
2328
3535
|
for (
|
|
2329
3536
|
var l = buffer.length, byteLength = lastChunk.length, i = 0;
|
|
@@ -2332,8 +3539,8 @@
|
|
|
2332
3539
|
)
|
|
2333
3540
|
byteLength += buffer[i].byteLength;
|
|
2334
3541
|
byteLength = new Uint8Array(byteLength);
|
|
2335
|
-
for (var
|
|
2336
|
-
var chunk = buffer[
|
|
3542
|
+
for (var _i3 = (i = 0); _i3 < l; _i3++) {
|
|
3543
|
+
var chunk = buffer[_i3];
|
|
2337
3544
|
byteLength.set(chunk, i);
|
|
2338
3545
|
i += chunk.byteLength;
|
|
2339
3546
|
}
|
|
@@ -2346,7 +3553,8 @@
|
|
|
2346
3553
|
buffer,
|
|
2347
3554
|
lastChunk,
|
|
2348
3555
|
constructor,
|
|
2349
|
-
bytesPerElement
|
|
3556
|
+
bytesPerElement,
|
|
3557
|
+
streamState
|
|
2350
3558
|
) {
|
|
2351
3559
|
buffer =
|
|
2352
3560
|
0 === buffer.length && 0 === lastChunk.byteOffset % bytesPerElement
|
|
@@ -2357,52 +3565,684 @@
|
|
|
2357
3565
|
buffer.byteOffset,
|
|
2358
3566
|
buffer.byteLength / bytesPerElement
|
|
2359
3567
|
);
|
|
2360
|
-
resolveBuffer(response, id, constructor);
|
|
3568
|
+
resolveBuffer(response, id, constructor, streamState);
|
|
2361
3569
|
}
|
|
2362
|
-
function
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
3570
|
+
function flushComponentPerformance(
|
|
3571
|
+
response$jscomp$0,
|
|
3572
|
+
root,
|
|
3573
|
+
trackIdx$jscomp$6,
|
|
3574
|
+
trackTime,
|
|
3575
|
+
parentEndTime
|
|
3576
|
+
) {
|
|
3577
|
+
if (!isArrayImpl(root._children)) {
|
|
3578
|
+
var previousResult = root._children,
|
|
3579
|
+
previousEndTime = previousResult.endTime;
|
|
3580
|
+
if (
|
|
3581
|
+
-Infinity < parentEndTime &&
|
|
3582
|
+
parentEndTime < previousEndTime &&
|
|
3583
|
+
null !== previousResult.component
|
|
3584
|
+
) {
|
|
3585
|
+
var componentInfo = previousResult.component,
|
|
3586
|
+
trackIdx = trackIdx$jscomp$6,
|
|
3587
|
+
startTime = parentEndTime;
|
|
3588
|
+
if (supportsUserTiming && 0 <= previousEndTime && 10 > trackIdx) {
|
|
3589
|
+
var color =
|
|
3590
|
+
componentInfo.env === response$jscomp$0._rootEnvironmentName
|
|
3591
|
+
? "primary-light"
|
|
3592
|
+
: "secondary-light",
|
|
3593
|
+
entryName = componentInfo.name + " [deduped]",
|
|
3594
|
+
debugTask = componentInfo.debugTask;
|
|
3595
|
+
debugTask
|
|
3596
|
+
? debugTask.run(
|
|
3597
|
+
console.timeStamp.bind(
|
|
3598
|
+
console,
|
|
3599
|
+
entryName,
|
|
3600
|
+
0 > startTime ? 0 : startTime,
|
|
3601
|
+
previousEndTime,
|
|
3602
|
+
trackNames[trackIdx],
|
|
3603
|
+
"Server Components \u269b",
|
|
3604
|
+
color
|
|
3605
|
+
)
|
|
3606
|
+
)
|
|
3607
|
+
: console.timeStamp(
|
|
3608
|
+
entryName,
|
|
3609
|
+
0 > startTime ? 0 : startTime,
|
|
3610
|
+
previousEndTime,
|
|
3611
|
+
trackNames[trackIdx],
|
|
3612
|
+
"Server Components \u269b",
|
|
3613
|
+
color
|
|
3614
|
+
);
|
|
3615
|
+
}
|
|
3616
|
+
}
|
|
3617
|
+
previousResult.track = trackIdx$jscomp$6;
|
|
3618
|
+
return previousResult;
|
|
3619
|
+
}
|
|
3620
|
+
var children = root._children,
|
|
3621
|
+
debugInfo = root._debugInfo;
|
|
3622
|
+
if (debugInfo) {
|
|
3623
|
+
for (var startTime$jscomp$0 = 0, i = 0; i < debugInfo.length; i++) {
|
|
3624
|
+
var info = debugInfo[i];
|
|
3625
|
+
"number" === typeof info.time && (startTime$jscomp$0 = info.time);
|
|
3626
|
+
if ("string" === typeof info.name) {
|
|
3627
|
+
startTime$jscomp$0 < trackTime && trackIdx$jscomp$6++;
|
|
3628
|
+
trackTime = startTime$jscomp$0;
|
|
3629
|
+
break;
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
for (var _i4 = debugInfo.length - 1; 0 <= _i4; _i4--) {
|
|
3633
|
+
var _info = debugInfo[_i4];
|
|
3634
|
+
if ("number" === typeof _info.time && _info.time > parentEndTime) {
|
|
3635
|
+
parentEndTime = _info.time;
|
|
3636
|
+
break;
|
|
3637
|
+
}
|
|
3638
|
+
}
|
|
3639
|
+
}
|
|
3640
|
+
var result = {
|
|
3641
|
+
track: trackIdx$jscomp$6,
|
|
3642
|
+
endTime: -Infinity,
|
|
3643
|
+
component: null
|
|
3644
|
+
};
|
|
3645
|
+
root._children = result;
|
|
3646
|
+
for (
|
|
3647
|
+
var childrenEndTime = -Infinity,
|
|
3648
|
+
childTrackIdx = trackIdx$jscomp$6,
|
|
3649
|
+
childTrackTime = trackTime,
|
|
3650
|
+
_i5 = 0;
|
|
3651
|
+
_i5 < children.length;
|
|
3652
|
+
_i5++
|
|
3653
|
+
) {
|
|
3654
|
+
var childResult = flushComponentPerformance(
|
|
3655
|
+
response$jscomp$0,
|
|
3656
|
+
children[_i5],
|
|
3657
|
+
childTrackIdx,
|
|
3658
|
+
childTrackTime,
|
|
3659
|
+
parentEndTime
|
|
3660
|
+
);
|
|
3661
|
+
null !== childResult.component &&
|
|
3662
|
+
(result.component = childResult.component);
|
|
3663
|
+
childTrackIdx = childResult.track;
|
|
3664
|
+
var childEndTime = childResult.endTime;
|
|
3665
|
+
childEndTime > childTrackTime && (childTrackTime = childEndTime);
|
|
3666
|
+
childEndTime > childrenEndTime && (childrenEndTime = childEndTime);
|
|
3667
|
+
}
|
|
3668
|
+
if (debugInfo)
|
|
3669
|
+
for (
|
|
3670
|
+
var componentEndTime = 0,
|
|
3671
|
+
isLastComponent = !0,
|
|
3672
|
+
endTime = -1,
|
|
3673
|
+
endTimeIdx = -1,
|
|
3674
|
+
_i6 = debugInfo.length - 1;
|
|
3675
|
+
0 <= _i6;
|
|
3676
|
+
_i6--
|
|
3677
|
+
) {
|
|
3678
|
+
var _info2 = debugInfo[_i6];
|
|
3679
|
+
if ("number" === typeof _info2.time) {
|
|
3680
|
+
0 === componentEndTime && (componentEndTime = _info2.time);
|
|
3681
|
+
var time = _info2.time;
|
|
3682
|
+
if (-1 < endTimeIdx)
|
|
3683
|
+
for (var j = endTimeIdx - 1; j > _i6; j--) {
|
|
3684
|
+
var candidateInfo = debugInfo[j];
|
|
3685
|
+
if ("string" === typeof candidateInfo.name) {
|
|
3686
|
+
componentEndTime > childrenEndTime &&
|
|
3687
|
+
(childrenEndTime = componentEndTime);
|
|
3688
|
+
var componentInfo$jscomp$0 = candidateInfo,
|
|
3689
|
+
response = response$jscomp$0,
|
|
3690
|
+
componentInfo$jscomp$1 = componentInfo$jscomp$0,
|
|
3691
|
+
trackIdx$jscomp$0 = trackIdx$jscomp$6,
|
|
3692
|
+
startTime$jscomp$1 = time,
|
|
3693
|
+
componentEndTime$jscomp$0 = componentEndTime,
|
|
3694
|
+
childrenEndTime$jscomp$0 = childrenEndTime;
|
|
3695
|
+
if (
|
|
3696
|
+
isLastComponent &&
|
|
3697
|
+
"rejected" === root.status &&
|
|
3698
|
+
root.reason !== response._closedReason
|
|
3699
|
+
) {
|
|
3700
|
+
var componentInfo$jscomp$2 = componentInfo$jscomp$1,
|
|
3701
|
+
trackIdx$jscomp$1 = trackIdx$jscomp$0,
|
|
3702
|
+
startTime$jscomp$2 = startTime$jscomp$1,
|
|
3703
|
+
childrenEndTime$jscomp$1 = childrenEndTime$jscomp$0,
|
|
3704
|
+
error = root.reason;
|
|
3705
|
+
if (supportsUserTiming) {
|
|
3706
|
+
var env = componentInfo$jscomp$2.env,
|
|
3707
|
+
name = componentInfo$jscomp$2.name,
|
|
3708
|
+
entryName$jscomp$0 =
|
|
3709
|
+
env === response._rootEnvironmentName ||
|
|
3710
|
+
void 0 === env
|
|
3711
|
+
? name
|
|
3712
|
+
: name + " [" + env + "]",
|
|
3713
|
+
properties = [
|
|
3714
|
+
[
|
|
3715
|
+
"Error",
|
|
3716
|
+
"object" === typeof error &&
|
|
3717
|
+
null !== error &&
|
|
3718
|
+
"string" === typeof error.message
|
|
3719
|
+
? String(error.message)
|
|
3720
|
+
: String(error)
|
|
3721
|
+
]
|
|
3722
|
+
];
|
|
3723
|
+
null != componentInfo$jscomp$2.key &&
|
|
3724
|
+
addValueToProperties(
|
|
3725
|
+
"key",
|
|
3726
|
+
componentInfo$jscomp$2.key,
|
|
3727
|
+
properties,
|
|
3728
|
+
0,
|
|
3729
|
+
""
|
|
3730
|
+
);
|
|
3731
|
+
null != componentInfo$jscomp$2.props &&
|
|
3732
|
+
addObjectToProperties(
|
|
3733
|
+
componentInfo$jscomp$2.props,
|
|
3734
|
+
properties,
|
|
3735
|
+
0,
|
|
3736
|
+
""
|
|
3737
|
+
);
|
|
3738
|
+
performance.measure("\u200b" + entryName$jscomp$0, {
|
|
3739
|
+
start: 0 > startTime$jscomp$2 ? 0 : startTime$jscomp$2,
|
|
3740
|
+
end: childrenEndTime$jscomp$1,
|
|
3741
|
+
detail: {
|
|
3742
|
+
devtools: {
|
|
3743
|
+
color: "error",
|
|
3744
|
+
track: trackNames[trackIdx$jscomp$1],
|
|
3745
|
+
trackGroup: "Server Components \u269b",
|
|
3746
|
+
tooltipText: entryName$jscomp$0 + " Errored",
|
|
3747
|
+
properties: properties
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
});
|
|
3751
|
+
}
|
|
3752
|
+
} else {
|
|
3753
|
+
var componentInfo$jscomp$3 = componentInfo$jscomp$1,
|
|
3754
|
+
trackIdx$jscomp$2 = trackIdx$jscomp$0,
|
|
3755
|
+
startTime$jscomp$3 = startTime$jscomp$1,
|
|
3756
|
+
childrenEndTime$jscomp$2 = childrenEndTime$jscomp$0;
|
|
3757
|
+
if (
|
|
3758
|
+
supportsUserTiming &&
|
|
3759
|
+
0 <= childrenEndTime$jscomp$2 &&
|
|
3760
|
+
10 > trackIdx$jscomp$2
|
|
3761
|
+
) {
|
|
3762
|
+
var env$jscomp$0 = componentInfo$jscomp$3.env,
|
|
3763
|
+
name$jscomp$0 = componentInfo$jscomp$3.name,
|
|
3764
|
+
isPrimaryEnv =
|
|
3765
|
+
env$jscomp$0 === response._rootEnvironmentName,
|
|
3766
|
+
selfTime =
|
|
3767
|
+
componentEndTime$jscomp$0 - startTime$jscomp$3,
|
|
3768
|
+
color$jscomp$0 =
|
|
3769
|
+
0.5 > selfTime
|
|
3770
|
+
? isPrimaryEnv
|
|
3771
|
+
? "primary-light"
|
|
3772
|
+
: "secondary-light"
|
|
3773
|
+
: 50 > selfTime
|
|
3774
|
+
? isPrimaryEnv
|
|
3775
|
+
? "primary"
|
|
3776
|
+
: "secondary"
|
|
3777
|
+
: 500 > selfTime
|
|
3778
|
+
? isPrimaryEnv
|
|
3779
|
+
? "primary-dark"
|
|
3780
|
+
: "secondary-dark"
|
|
3781
|
+
: "error",
|
|
3782
|
+
entryName$jscomp$1 =
|
|
3783
|
+
isPrimaryEnv || void 0 === env$jscomp$0
|
|
3784
|
+
? name$jscomp$0
|
|
3785
|
+
: name$jscomp$0 + " [" + env$jscomp$0 + "]",
|
|
3786
|
+
debugTask$jscomp$0 = componentInfo$jscomp$3.debugTask;
|
|
3787
|
+
if (debugTask$jscomp$0) {
|
|
3788
|
+
var properties$jscomp$0 = [];
|
|
3789
|
+
null != componentInfo$jscomp$3.key &&
|
|
3790
|
+
addValueToProperties(
|
|
3791
|
+
"key",
|
|
3792
|
+
componentInfo$jscomp$3.key,
|
|
3793
|
+
properties$jscomp$0,
|
|
3794
|
+
0,
|
|
3795
|
+
""
|
|
3796
|
+
);
|
|
3797
|
+
null != componentInfo$jscomp$3.props &&
|
|
3798
|
+
addObjectToProperties(
|
|
3799
|
+
componentInfo$jscomp$3.props,
|
|
3800
|
+
properties$jscomp$0,
|
|
3801
|
+
0,
|
|
3802
|
+
""
|
|
3803
|
+
);
|
|
3804
|
+
debugTask$jscomp$0.run(
|
|
3805
|
+
performance.measure.bind(
|
|
3806
|
+
performance,
|
|
3807
|
+
"\u200b" + entryName$jscomp$1,
|
|
3808
|
+
{
|
|
3809
|
+
start:
|
|
3810
|
+
0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3,
|
|
3811
|
+
end: childrenEndTime$jscomp$2,
|
|
3812
|
+
detail: {
|
|
3813
|
+
devtools: {
|
|
3814
|
+
color: color$jscomp$0,
|
|
3815
|
+
track: trackNames[trackIdx$jscomp$2],
|
|
3816
|
+
trackGroup: "Server Components \u269b",
|
|
3817
|
+
properties: properties$jscomp$0
|
|
3818
|
+
}
|
|
3819
|
+
}
|
|
3820
|
+
}
|
|
3821
|
+
)
|
|
3822
|
+
);
|
|
3823
|
+
} else
|
|
3824
|
+
console.timeStamp(
|
|
3825
|
+
"\u200b" + entryName$jscomp$1,
|
|
3826
|
+
0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3,
|
|
3827
|
+
childrenEndTime$jscomp$2,
|
|
3828
|
+
trackNames[trackIdx$jscomp$2],
|
|
3829
|
+
"Server Components \u269b",
|
|
3830
|
+
color$jscomp$0
|
|
3831
|
+
);
|
|
3832
|
+
}
|
|
3833
|
+
}
|
|
3834
|
+
componentEndTime = time;
|
|
3835
|
+
result.component = componentInfo$jscomp$0;
|
|
3836
|
+
isLastComponent = !1;
|
|
3837
|
+
} else if (
|
|
3838
|
+
candidateInfo.awaited &&
|
|
3839
|
+
null != candidateInfo.awaited.env
|
|
3840
|
+
) {
|
|
3841
|
+
endTime > childrenEndTime && (childrenEndTime = endTime);
|
|
3842
|
+
var asyncInfo = candidateInfo,
|
|
3843
|
+
env$jscomp$1 = response$jscomp$0._rootEnvironmentName,
|
|
3844
|
+
promise = asyncInfo.awaited.value;
|
|
3845
|
+
if (promise) {
|
|
3846
|
+
var thenable = promise;
|
|
3847
|
+
switch (thenable.status) {
|
|
3848
|
+
case "fulfilled":
|
|
3849
|
+
logComponentAwait(
|
|
3850
|
+
asyncInfo,
|
|
3851
|
+
trackIdx$jscomp$6,
|
|
3852
|
+
time,
|
|
3853
|
+
endTime,
|
|
3854
|
+
env$jscomp$1,
|
|
3855
|
+
thenable.value
|
|
3856
|
+
);
|
|
3857
|
+
break;
|
|
3858
|
+
case "rejected":
|
|
3859
|
+
var asyncInfo$jscomp$0 = asyncInfo,
|
|
3860
|
+
trackIdx$jscomp$3 = trackIdx$jscomp$6,
|
|
3861
|
+
startTime$jscomp$4 = time,
|
|
3862
|
+
endTime$jscomp$0 = endTime,
|
|
3863
|
+
rootEnv = env$jscomp$1,
|
|
3864
|
+
error$jscomp$0 = thenable.reason;
|
|
3865
|
+
if (supportsUserTiming && 0 < endTime$jscomp$0) {
|
|
3866
|
+
var description = getIODescription(error$jscomp$0),
|
|
3867
|
+
entryName$jscomp$2 =
|
|
3868
|
+
"await " +
|
|
3869
|
+
getIOShortName(
|
|
3870
|
+
asyncInfo$jscomp$0.awaited,
|
|
3871
|
+
description,
|
|
3872
|
+
asyncInfo$jscomp$0.env,
|
|
3873
|
+
rootEnv
|
|
3874
|
+
),
|
|
3875
|
+
debugTask$jscomp$1 =
|
|
3876
|
+
asyncInfo$jscomp$0.debugTask ||
|
|
3877
|
+
asyncInfo$jscomp$0.awaited.debugTask;
|
|
3878
|
+
if (debugTask$jscomp$1) {
|
|
3879
|
+
var properties$jscomp$1 = [
|
|
3880
|
+
[
|
|
3881
|
+
"Rejected",
|
|
3882
|
+
"object" === typeof error$jscomp$0 &&
|
|
3883
|
+
null !== error$jscomp$0 &&
|
|
3884
|
+
"string" === typeof error$jscomp$0.message
|
|
3885
|
+
? String(error$jscomp$0.message)
|
|
3886
|
+
: String(error$jscomp$0)
|
|
3887
|
+
]
|
|
3888
|
+
],
|
|
3889
|
+
tooltipText =
|
|
3890
|
+
getIOLongName(
|
|
3891
|
+
asyncInfo$jscomp$0.awaited,
|
|
3892
|
+
description,
|
|
3893
|
+
asyncInfo$jscomp$0.env,
|
|
3894
|
+
rootEnv
|
|
3895
|
+
) + " Rejected";
|
|
3896
|
+
debugTask$jscomp$1.run(
|
|
3897
|
+
performance.measure.bind(
|
|
3898
|
+
performance,
|
|
3899
|
+
entryName$jscomp$2,
|
|
3900
|
+
{
|
|
3901
|
+
start:
|
|
3902
|
+
0 > startTime$jscomp$4
|
|
3903
|
+
? 0
|
|
3904
|
+
: startTime$jscomp$4,
|
|
3905
|
+
end: endTime$jscomp$0,
|
|
3906
|
+
detail: {
|
|
3907
|
+
devtools: {
|
|
3908
|
+
color: "error",
|
|
3909
|
+
track: trackNames[trackIdx$jscomp$3],
|
|
3910
|
+
trackGroup: "Server Components \u269b",
|
|
3911
|
+
properties: properties$jscomp$1,
|
|
3912
|
+
tooltipText: tooltipText
|
|
3913
|
+
}
|
|
3914
|
+
}
|
|
3915
|
+
}
|
|
3916
|
+
)
|
|
3917
|
+
);
|
|
3918
|
+
} else
|
|
3919
|
+
console.timeStamp(
|
|
3920
|
+
entryName$jscomp$2,
|
|
3921
|
+
0 > startTime$jscomp$4 ? 0 : startTime$jscomp$4,
|
|
3922
|
+
endTime$jscomp$0,
|
|
3923
|
+
trackNames[trackIdx$jscomp$3],
|
|
3924
|
+
"Server Components \u269b",
|
|
3925
|
+
"error"
|
|
3926
|
+
);
|
|
3927
|
+
}
|
|
3928
|
+
break;
|
|
3929
|
+
default:
|
|
3930
|
+
logComponentAwait(
|
|
3931
|
+
asyncInfo,
|
|
3932
|
+
trackIdx$jscomp$6,
|
|
3933
|
+
time,
|
|
3934
|
+
endTime,
|
|
3935
|
+
env$jscomp$1,
|
|
3936
|
+
void 0
|
|
3937
|
+
);
|
|
3938
|
+
}
|
|
3939
|
+
} else
|
|
3940
|
+
logComponentAwait(
|
|
3941
|
+
asyncInfo,
|
|
3942
|
+
trackIdx$jscomp$6,
|
|
3943
|
+
time,
|
|
3944
|
+
endTime,
|
|
3945
|
+
env$jscomp$1,
|
|
3946
|
+
void 0
|
|
3947
|
+
);
|
|
3948
|
+
}
|
|
3949
|
+
}
|
|
3950
|
+
else {
|
|
3951
|
+
endTime = time;
|
|
3952
|
+
for (var _j = debugInfo.length - 1; _j > _i6; _j--) {
|
|
3953
|
+
var _candidateInfo = debugInfo[_j];
|
|
3954
|
+
if ("string" === typeof _candidateInfo.name) {
|
|
3955
|
+
componentEndTime > childrenEndTime &&
|
|
3956
|
+
(childrenEndTime = componentEndTime);
|
|
3957
|
+
var _componentInfo = _candidateInfo,
|
|
3958
|
+
_env = response$jscomp$0._rootEnvironmentName,
|
|
3959
|
+
componentInfo$jscomp$4 = _componentInfo,
|
|
3960
|
+
trackIdx$jscomp$4 = trackIdx$jscomp$6,
|
|
3961
|
+
startTime$jscomp$5 = time,
|
|
3962
|
+
childrenEndTime$jscomp$3 = childrenEndTime;
|
|
3963
|
+
if (supportsUserTiming) {
|
|
3964
|
+
var env$jscomp$2 = componentInfo$jscomp$4.env,
|
|
3965
|
+
name$jscomp$1 = componentInfo$jscomp$4.name,
|
|
3966
|
+
entryName$jscomp$3 =
|
|
3967
|
+
env$jscomp$2 === _env || void 0 === env$jscomp$2
|
|
3968
|
+
? name$jscomp$1
|
|
3969
|
+
: name$jscomp$1 + " [" + env$jscomp$2 + "]",
|
|
3970
|
+
properties$jscomp$2 = [
|
|
3971
|
+
[
|
|
3972
|
+
"Aborted",
|
|
3973
|
+
"The stream was aborted before this Component finished rendering."
|
|
3974
|
+
]
|
|
3975
|
+
];
|
|
3976
|
+
null != componentInfo$jscomp$4.key &&
|
|
3977
|
+
addValueToProperties(
|
|
3978
|
+
"key",
|
|
3979
|
+
componentInfo$jscomp$4.key,
|
|
3980
|
+
properties$jscomp$2,
|
|
3981
|
+
0,
|
|
3982
|
+
""
|
|
3983
|
+
);
|
|
3984
|
+
null != componentInfo$jscomp$4.props &&
|
|
3985
|
+
addObjectToProperties(
|
|
3986
|
+
componentInfo$jscomp$4.props,
|
|
3987
|
+
properties$jscomp$2,
|
|
3988
|
+
0,
|
|
3989
|
+
""
|
|
3990
|
+
);
|
|
3991
|
+
performance.measure("\u200b" + entryName$jscomp$3, {
|
|
3992
|
+
start: 0 > startTime$jscomp$5 ? 0 : startTime$jscomp$5,
|
|
3993
|
+
end: childrenEndTime$jscomp$3,
|
|
3994
|
+
detail: {
|
|
3995
|
+
devtools: {
|
|
3996
|
+
color: "warning",
|
|
3997
|
+
track: trackNames[trackIdx$jscomp$4],
|
|
3998
|
+
trackGroup: "Server Components \u269b",
|
|
3999
|
+
tooltipText: entryName$jscomp$3 + " Aborted",
|
|
4000
|
+
properties: properties$jscomp$2
|
|
4001
|
+
}
|
|
4002
|
+
}
|
|
4003
|
+
});
|
|
4004
|
+
}
|
|
4005
|
+
componentEndTime = time;
|
|
4006
|
+
result.component = _componentInfo;
|
|
4007
|
+
isLastComponent = !1;
|
|
4008
|
+
} else if (
|
|
4009
|
+
_candidateInfo.awaited &&
|
|
4010
|
+
null != _candidateInfo.awaited.env
|
|
4011
|
+
) {
|
|
4012
|
+
var _asyncInfo = _candidateInfo,
|
|
4013
|
+
_env2 = response$jscomp$0._rootEnvironmentName;
|
|
4014
|
+
_asyncInfo.awaited.end > endTime &&
|
|
4015
|
+
(endTime = _asyncInfo.awaited.end);
|
|
4016
|
+
endTime > childrenEndTime && (childrenEndTime = endTime);
|
|
4017
|
+
var asyncInfo$jscomp$1 = _asyncInfo,
|
|
4018
|
+
trackIdx$jscomp$5 = trackIdx$jscomp$6,
|
|
4019
|
+
startTime$jscomp$6 = time,
|
|
4020
|
+
endTime$jscomp$1 = endTime,
|
|
4021
|
+
rootEnv$jscomp$0 = _env2;
|
|
4022
|
+
if (supportsUserTiming && 0 < endTime$jscomp$1) {
|
|
4023
|
+
var entryName$jscomp$4 =
|
|
4024
|
+
"await " +
|
|
4025
|
+
getIOShortName(
|
|
4026
|
+
asyncInfo$jscomp$1.awaited,
|
|
4027
|
+
"",
|
|
4028
|
+
asyncInfo$jscomp$1.env,
|
|
4029
|
+
rootEnv$jscomp$0
|
|
4030
|
+
),
|
|
4031
|
+
debugTask$jscomp$2 =
|
|
4032
|
+
asyncInfo$jscomp$1.debugTask ||
|
|
4033
|
+
asyncInfo$jscomp$1.awaited.debugTask;
|
|
4034
|
+
if (debugTask$jscomp$2) {
|
|
4035
|
+
var tooltipText$jscomp$0 =
|
|
4036
|
+
getIOLongName(
|
|
4037
|
+
asyncInfo$jscomp$1.awaited,
|
|
4038
|
+
"",
|
|
4039
|
+
asyncInfo$jscomp$1.env,
|
|
4040
|
+
rootEnv$jscomp$0
|
|
4041
|
+
) + " Aborted";
|
|
4042
|
+
debugTask$jscomp$2.run(
|
|
4043
|
+
performance.measure.bind(
|
|
4044
|
+
performance,
|
|
4045
|
+
entryName$jscomp$4,
|
|
4046
|
+
{
|
|
4047
|
+
start:
|
|
4048
|
+
0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6,
|
|
4049
|
+
end: endTime$jscomp$1,
|
|
4050
|
+
detail: {
|
|
4051
|
+
devtools: {
|
|
4052
|
+
color: "warning",
|
|
4053
|
+
track: trackNames[trackIdx$jscomp$5],
|
|
4054
|
+
trackGroup: "Server Components \u269b",
|
|
4055
|
+
properties: [
|
|
4056
|
+
[
|
|
4057
|
+
"Aborted",
|
|
4058
|
+
"The stream was aborted before this Promise resolved."
|
|
4059
|
+
]
|
|
4060
|
+
],
|
|
4061
|
+
tooltipText: tooltipText$jscomp$0
|
|
4062
|
+
}
|
|
4063
|
+
}
|
|
4064
|
+
}
|
|
4065
|
+
)
|
|
4066
|
+
);
|
|
4067
|
+
} else
|
|
4068
|
+
console.timeStamp(
|
|
4069
|
+
entryName$jscomp$4,
|
|
4070
|
+
0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6,
|
|
4071
|
+
endTime$jscomp$1,
|
|
4072
|
+
trackNames[trackIdx$jscomp$5],
|
|
4073
|
+
"Server Components \u269b",
|
|
4074
|
+
"warning"
|
|
4075
|
+
);
|
|
4076
|
+
}
|
|
4077
|
+
}
|
|
4078
|
+
}
|
|
4079
|
+
}
|
|
4080
|
+
endTime = time;
|
|
4081
|
+
endTimeIdx = _i6;
|
|
4082
|
+
}
|
|
4083
|
+
}
|
|
4084
|
+
result.endTime = childrenEndTime;
|
|
4085
|
+
return result;
|
|
4086
|
+
}
|
|
4087
|
+
function flushInitialRenderPerformance(response) {
|
|
4088
|
+
if (response._replayConsole) {
|
|
4089
|
+
var rootChunk = getChunk(response, 0);
|
|
4090
|
+
isArrayImpl(rootChunk._children) &&
|
|
4091
|
+
(markAllTracksInOrder(),
|
|
4092
|
+
flushComponentPerformance(
|
|
4093
|
+
response,
|
|
4094
|
+
rootChunk,
|
|
4095
|
+
0,
|
|
4096
|
+
-Infinity,
|
|
4097
|
+
-Infinity
|
|
4098
|
+
));
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4101
|
+
function processFullBinaryRow(
|
|
4102
|
+
response,
|
|
4103
|
+
streamState,
|
|
4104
|
+
id,
|
|
4105
|
+
tag,
|
|
4106
|
+
buffer,
|
|
4107
|
+
chunk
|
|
4108
|
+
) {
|
|
4109
|
+
switch (tag) {
|
|
4110
|
+
case 65:
|
|
4111
|
+
resolveBuffer(
|
|
4112
|
+
response,
|
|
4113
|
+
id,
|
|
4114
|
+
mergeBuffer(buffer, chunk).buffer,
|
|
4115
|
+
streamState
|
|
4116
|
+
);
|
|
4117
|
+
return;
|
|
4118
|
+
case 79:
|
|
4119
|
+
resolveTypedArray(
|
|
4120
|
+
response,
|
|
4121
|
+
id,
|
|
4122
|
+
buffer,
|
|
4123
|
+
chunk,
|
|
4124
|
+
Int8Array,
|
|
4125
|
+
1,
|
|
4126
|
+
streamState
|
|
4127
|
+
);
|
|
4128
|
+
return;
|
|
2370
4129
|
case 111:
|
|
2371
4130
|
resolveBuffer(
|
|
2372
4131
|
response,
|
|
2373
4132
|
id,
|
|
2374
|
-
0 === buffer.length ? chunk : mergeBuffer(buffer, chunk)
|
|
4133
|
+
0 === buffer.length ? chunk : mergeBuffer(buffer, chunk),
|
|
4134
|
+
streamState
|
|
2375
4135
|
);
|
|
2376
4136
|
return;
|
|
2377
4137
|
case 85:
|
|
2378
|
-
resolveTypedArray(
|
|
4138
|
+
resolveTypedArray(
|
|
4139
|
+
response,
|
|
4140
|
+
id,
|
|
4141
|
+
buffer,
|
|
4142
|
+
chunk,
|
|
4143
|
+
Uint8ClampedArray,
|
|
4144
|
+
1,
|
|
4145
|
+
streamState
|
|
4146
|
+
);
|
|
2379
4147
|
return;
|
|
2380
4148
|
case 83:
|
|
2381
|
-
resolveTypedArray(
|
|
4149
|
+
resolveTypedArray(
|
|
4150
|
+
response,
|
|
4151
|
+
id,
|
|
4152
|
+
buffer,
|
|
4153
|
+
chunk,
|
|
4154
|
+
Int16Array,
|
|
4155
|
+
2,
|
|
4156
|
+
streamState
|
|
4157
|
+
);
|
|
2382
4158
|
return;
|
|
2383
4159
|
case 115:
|
|
2384
|
-
resolveTypedArray(
|
|
4160
|
+
resolveTypedArray(
|
|
4161
|
+
response,
|
|
4162
|
+
id,
|
|
4163
|
+
buffer,
|
|
4164
|
+
chunk,
|
|
4165
|
+
Uint16Array,
|
|
4166
|
+
2,
|
|
4167
|
+
streamState
|
|
4168
|
+
);
|
|
2385
4169
|
return;
|
|
2386
4170
|
case 76:
|
|
2387
|
-
resolveTypedArray(
|
|
4171
|
+
resolveTypedArray(
|
|
4172
|
+
response,
|
|
4173
|
+
id,
|
|
4174
|
+
buffer,
|
|
4175
|
+
chunk,
|
|
4176
|
+
Int32Array,
|
|
4177
|
+
4,
|
|
4178
|
+
streamState
|
|
4179
|
+
);
|
|
2388
4180
|
return;
|
|
2389
4181
|
case 108:
|
|
2390
|
-
resolveTypedArray(
|
|
4182
|
+
resolveTypedArray(
|
|
4183
|
+
response,
|
|
4184
|
+
id,
|
|
4185
|
+
buffer,
|
|
4186
|
+
chunk,
|
|
4187
|
+
Uint32Array,
|
|
4188
|
+
4,
|
|
4189
|
+
streamState
|
|
4190
|
+
);
|
|
2391
4191
|
return;
|
|
2392
4192
|
case 71:
|
|
2393
|
-
resolveTypedArray(
|
|
4193
|
+
resolveTypedArray(
|
|
4194
|
+
response,
|
|
4195
|
+
id,
|
|
4196
|
+
buffer,
|
|
4197
|
+
chunk,
|
|
4198
|
+
Float32Array,
|
|
4199
|
+
4,
|
|
4200
|
+
streamState
|
|
4201
|
+
);
|
|
2394
4202
|
return;
|
|
2395
4203
|
case 103:
|
|
2396
|
-
resolveTypedArray(
|
|
4204
|
+
resolveTypedArray(
|
|
4205
|
+
response,
|
|
4206
|
+
id,
|
|
4207
|
+
buffer,
|
|
4208
|
+
chunk,
|
|
4209
|
+
Float64Array,
|
|
4210
|
+
8,
|
|
4211
|
+
streamState
|
|
4212
|
+
);
|
|
2397
4213
|
return;
|
|
2398
4214
|
case 77:
|
|
2399
|
-
resolveTypedArray(
|
|
4215
|
+
resolveTypedArray(
|
|
4216
|
+
response,
|
|
4217
|
+
id,
|
|
4218
|
+
buffer,
|
|
4219
|
+
chunk,
|
|
4220
|
+
BigInt64Array,
|
|
4221
|
+
8,
|
|
4222
|
+
streamState
|
|
4223
|
+
);
|
|
2400
4224
|
return;
|
|
2401
4225
|
case 109:
|
|
2402
|
-
resolveTypedArray(
|
|
4226
|
+
resolveTypedArray(
|
|
4227
|
+
response,
|
|
4228
|
+
id,
|
|
4229
|
+
buffer,
|
|
4230
|
+
chunk,
|
|
4231
|
+
BigUint64Array,
|
|
4232
|
+
8,
|
|
4233
|
+
streamState
|
|
4234
|
+
);
|
|
2403
4235
|
return;
|
|
2404
4236
|
case 86:
|
|
2405
|
-
resolveTypedArray(
|
|
4237
|
+
resolveTypedArray(
|
|
4238
|
+
response,
|
|
4239
|
+
id,
|
|
4240
|
+
buffer,
|
|
4241
|
+
chunk,
|
|
4242
|
+
DataView,
|
|
4243
|
+
1,
|
|
4244
|
+
streamState
|
|
4245
|
+
);
|
|
2406
4246
|
return;
|
|
2407
4247
|
}
|
|
2408
4248
|
for (
|
|
@@ -2412,62 +4252,242 @@
|
|
|
2412
4252
|
)
|
|
2413
4253
|
row += stringDecoder.decode(buffer[i], decoderOptions);
|
|
2414
4254
|
row += stringDecoder.decode(chunk);
|
|
2415
|
-
processFullStringRow(response, id, tag, row);
|
|
4255
|
+
processFullStringRow(response, streamState, id, tag, row);
|
|
2416
4256
|
}
|
|
2417
|
-
function processFullStringRow(response, id, tag, row) {
|
|
4257
|
+
function processFullStringRow(response, streamState, id, tag, row) {
|
|
2418
4258
|
switch (tag) {
|
|
2419
4259
|
case 73:
|
|
2420
|
-
resolveModule(response, id, row);
|
|
4260
|
+
resolveModule(response, id, row, streamState);
|
|
2421
4261
|
break;
|
|
2422
4262
|
case 72:
|
|
2423
|
-
|
|
4263
|
+
id = row[0];
|
|
4264
|
+
streamState = row.slice(1);
|
|
4265
|
+
response = JSON.parse(streamState, response._fromJSON);
|
|
4266
|
+
streamState = ReactDOMSharedInternals.d;
|
|
4267
|
+
switch (id) {
|
|
4268
|
+
case "D":
|
|
4269
|
+
streamState.D(response);
|
|
4270
|
+
break;
|
|
4271
|
+
case "C":
|
|
4272
|
+
"string" === typeof response
|
|
4273
|
+
? streamState.C(response)
|
|
4274
|
+
: streamState.C(response[0], response[1]);
|
|
4275
|
+
break;
|
|
4276
|
+
case "L":
|
|
4277
|
+
id = response[0];
|
|
4278
|
+
row = response[1];
|
|
4279
|
+
3 === response.length
|
|
4280
|
+
? streamState.L(id, row, response[2])
|
|
4281
|
+
: streamState.L(id, row);
|
|
4282
|
+
break;
|
|
4283
|
+
case "m":
|
|
4284
|
+
"string" === typeof response
|
|
4285
|
+
? streamState.m(response)
|
|
4286
|
+
: streamState.m(response[0], response[1]);
|
|
4287
|
+
break;
|
|
4288
|
+
case "X":
|
|
4289
|
+
"string" === typeof response
|
|
4290
|
+
? streamState.X(response)
|
|
4291
|
+
: streamState.X(response[0], response[1]);
|
|
4292
|
+
break;
|
|
4293
|
+
case "S":
|
|
4294
|
+
"string" === typeof response
|
|
4295
|
+
? streamState.S(response)
|
|
4296
|
+
: streamState.S(
|
|
4297
|
+
response[0],
|
|
4298
|
+
0 === response[1] ? void 0 : response[1],
|
|
4299
|
+
3 === response.length ? response[2] : void 0
|
|
4300
|
+
);
|
|
4301
|
+
break;
|
|
4302
|
+
case "M":
|
|
4303
|
+
"string" === typeof response
|
|
4304
|
+
? streamState.M(response)
|
|
4305
|
+
: streamState.M(response[0], response[1]);
|
|
4306
|
+
}
|
|
2424
4307
|
break;
|
|
2425
4308
|
case 69:
|
|
4309
|
+
tag = response._chunks;
|
|
4310
|
+
var chunk = tag.get(id);
|
|
2426
4311
|
row = JSON.parse(row);
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
row = response._chunks;
|
|
2430
|
-
var chunk = row.get(id);
|
|
4312
|
+
var error = resolveErrorDev(response, row);
|
|
4313
|
+
error.digest = row.digest;
|
|
2431
4314
|
chunk
|
|
2432
|
-
?
|
|
2433
|
-
|
|
4315
|
+
? (resolveChunkDebugInfo(streamState, chunk),
|
|
4316
|
+
triggerErrorOnChunk(response, chunk, error))
|
|
4317
|
+
: ((response = new ReactPromise("rejected", null, error)),
|
|
4318
|
+
resolveChunkDebugInfo(streamState, response),
|
|
4319
|
+
tag.set(id, response));
|
|
2434
4320
|
break;
|
|
2435
4321
|
case 84:
|
|
2436
|
-
|
|
4322
|
+
tag = response._chunks;
|
|
4323
|
+
(chunk = tag.get(id)) && "pending" !== chunk.status
|
|
4324
|
+
? chunk.reason.enqueueValue(row)
|
|
4325
|
+
: (chunk && releasePendingChunk(response, chunk),
|
|
4326
|
+
(response = new ReactPromise("fulfilled", row, null)),
|
|
4327
|
+
resolveChunkDebugInfo(streamState, response),
|
|
4328
|
+
tag.set(id, response));
|
|
2437
4329
|
break;
|
|
2438
4330
|
case 78:
|
|
4331
|
+
response._timeOrigin = +row - performance.timeOrigin;
|
|
4332
|
+
break;
|
|
2439
4333
|
case 68:
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
4334
|
+
id = getChunk(response, id);
|
|
4335
|
+
"fulfilled" !== id.status &&
|
|
4336
|
+
"rejected" !== id.status &&
|
|
4337
|
+
"halted" !== id.status &&
|
|
4338
|
+
"blocked" !== id.status &&
|
|
4339
|
+
"resolved_module" !== id.status &&
|
|
4340
|
+
((streamState = id._debugChunk),
|
|
4341
|
+
(tag = createResolvedModelChunk(response, row)),
|
|
4342
|
+
(tag._debugChunk = streamState),
|
|
4343
|
+
(id._debugChunk = tag),
|
|
4344
|
+
initializeDebugChunk(response, id),
|
|
4345
|
+
"blocked" !== tag.status ||
|
|
4346
|
+
(void 0 !== response._debugChannel &&
|
|
4347
|
+
response._debugChannel.hasReadable) ||
|
|
4348
|
+
'"' !== row[0] ||
|
|
4349
|
+
"$" !== row[1] ||
|
|
4350
|
+
((streamState = row.slice(2, row.length - 1).split(":")),
|
|
4351
|
+
(streamState = parseInt(streamState[0], 16)),
|
|
4352
|
+
"pending" === getChunk(response, streamState).status &&
|
|
4353
|
+
(id._debugChunk = null)));
|
|
4354
|
+
break;
|
|
4355
|
+
case 74:
|
|
4356
|
+
resolveIOInfo(response, id, row);
|
|
2450
4357
|
break;
|
|
2451
4358
|
case 87:
|
|
2452
4359
|
resolveConsoleEntry(response, row);
|
|
2453
4360
|
break;
|
|
2454
4361
|
case 82:
|
|
2455
|
-
startReadableStream(response, id, void 0);
|
|
4362
|
+
startReadableStream(response, id, void 0, streamState);
|
|
2456
4363
|
break;
|
|
2457
4364
|
case 114:
|
|
2458
|
-
startReadableStream(response, id, "bytes");
|
|
4365
|
+
startReadableStream(response, id, "bytes", streamState);
|
|
2459
4366
|
break;
|
|
2460
4367
|
case 88:
|
|
2461
|
-
startAsyncIterable(response, id, !1);
|
|
4368
|
+
startAsyncIterable(response, id, !1, streamState);
|
|
2462
4369
|
break;
|
|
2463
4370
|
case 120:
|
|
2464
|
-
startAsyncIterable(response, id, !0);
|
|
4371
|
+
startAsyncIterable(response, id, !0, streamState);
|
|
2465
4372
|
break;
|
|
2466
4373
|
case 67:
|
|
2467
|
-
|
|
4374
|
+
(response = response._chunks.get(id)) &&
|
|
4375
|
+
"fulfilled" === response.status &&
|
|
4376
|
+
response.reason.close("" === row ? '"$undefined"' : row);
|
|
2468
4377
|
break;
|
|
2469
4378
|
default:
|
|
2470
|
-
|
|
4379
|
+
if ("" === row) {
|
|
4380
|
+
if (
|
|
4381
|
+
((streamState = response._chunks),
|
|
4382
|
+
(row = streamState.get(id)) ||
|
|
4383
|
+
streamState.set(id, (row = createPendingChunk(response))),
|
|
4384
|
+
"pending" === row.status || "blocked" === row.status)
|
|
4385
|
+
)
|
|
4386
|
+
releasePendingChunk(response, row),
|
|
4387
|
+
(response = row),
|
|
4388
|
+
(response.status = "halted"),
|
|
4389
|
+
(response.value = null),
|
|
4390
|
+
(response.reason = null);
|
|
4391
|
+
} else
|
|
4392
|
+
(tag = response._chunks),
|
|
4393
|
+
(chunk = tag.get(id))
|
|
4394
|
+
? (resolveChunkDebugInfo(streamState, chunk),
|
|
4395
|
+
resolveModelChunk(response, chunk, row))
|
|
4396
|
+
: ((response = createResolvedModelChunk(response, row)),
|
|
4397
|
+
resolveChunkDebugInfo(streamState, response),
|
|
4398
|
+
tag.set(id, response));
|
|
4399
|
+
}
|
|
4400
|
+
}
|
|
4401
|
+
function processBinaryChunk(weakResponse, streamState, chunk) {
|
|
4402
|
+
if (void 0 !== weakResponse.weak.deref()) {
|
|
4403
|
+
var response = unwrapWeakResponse(weakResponse),
|
|
4404
|
+
i = 0,
|
|
4405
|
+
rowState = streamState._rowState;
|
|
4406
|
+
weakResponse = streamState._rowID;
|
|
4407
|
+
var rowTag = streamState._rowTag,
|
|
4408
|
+
rowLength = streamState._rowLength,
|
|
4409
|
+
buffer = streamState._buffer,
|
|
4410
|
+
chunkLength = chunk.length;
|
|
4411
|
+
for (
|
|
4412
|
+
incrementChunkDebugInfo(streamState, chunkLength);
|
|
4413
|
+
i < chunkLength;
|
|
4414
|
+
|
|
4415
|
+
) {
|
|
4416
|
+
var lastIdx = -1;
|
|
4417
|
+
switch (rowState) {
|
|
4418
|
+
case 0:
|
|
4419
|
+
lastIdx = chunk[i++];
|
|
4420
|
+
58 === lastIdx
|
|
4421
|
+
? (rowState = 1)
|
|
4422
|
+
: (weakResponse =
|
|
4423
|
+
(weakResponse << 4) |
|
|
4424
|
+
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
|
4425
|
+
continue;
|
|
4426
|
+
case 1:
|
|
4427
|
+
rowState = chunk[i];
|
|
4428
|
+
84 === rowState ||
|
|
4429
|
+
65 === rowState ||
|
|
4430
|
+
79 === rowState ||
|
|
4431
|
+
111 === rowState ||
|
|
4432
|
+
85 === rowState ||
|
|
4433
|
+
83 === rowState ||
|
|
4434
|
+
115 === rowState ||
|
|
4435
|
+
76 === rowState ||
|
|
4436
|
+
108 === rowState ||
|
|
4437
|
+
71 === rowState ||
|
|
4438
|
+
103 === rowState ||
|
|
4439
|
+
77 === rowState ||
|
|
4440
|
+
109 === rowState ||
|
|
4441
|
+
86 === rowState
|
|
4442
|
+
? ((rowTag = rowState), (rowState = 2), i++)
|
|
4443
|
+
: (64 < rowState && 91 > rowState) ||
|
|
4444
|
+
35 === rowState ||
|
|
4445
|
+
114 === rowState ||
|
|
4446
|
+
120 === rowState
|
|
4447
|
+
? ((rowTag = rowState), (rowState = 3), i++)
|
|
4448
|
+
: ((rowTag = 0), (rowState = 3));
|
|
4449
|
+
continue;
|
|
4450
|
+
case 2:
|
|
4451
|
+
lastIdx = chunk[i++];
|
|
4452
|
+
44 === lastIdx
|
|
4453
|
+
? (rowState = 4)
|
|
4454
|
+
: (rowLength =
|
|
4455
|
+
(rowLength << 4) |
|
|
4456
|
+
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
|
4457
|
+
continue;
|
|
4458
|
+
case 3:
|
|
4459
|
+
lastIdx = chunk.indexOf(10, i);
|
|
4460
|
+
break;
|
|
4461
|
+
case 4:
|
|
4462
|
+
(lastIdx = i + rowLength),
|
|
4463
|
+
lastIdx > chunk.length && (lastIdx = -1);
|
|
4464
|
+
}
|
|
4465
|
+
var offset = chunk.byteOffset + i;
|
|
4466
|
+
if (-1 < lastIdx)
|
|
4467
|
+
(rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),
|
|
4468
|
+
processFullBinaryRow(
|
|
4469
|
+
response,
|
|
4470
|
+
streamState,
|
|
4471
|
+
weakResponse,
|
|
4472
|
+
rowTag,
|
|
4473
|
+
buffer,
|
|
4474
|
+
rowLength
|
|
4475
|
+
),
|
|
4476
|
+
(i = lastIdx),
|
|
4477
|
+
3 === rowState && i++,
|
|
4478
|
+
(rowLength = weakResponse = rowTag = rowState = 0),
|
|
4479
|
+
(buffer.length = 0);
|
|
4480
|
+
else {
|
|
4481
|
+
chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
|
|
4482
|
+
buffer.push(chunk);
|
|
4483
|
+
rowLength -= chunk.byteLength;
|
|
4484
|
+
break;
|
|
4485
|
+
}
|
|
4486
|
+
}
|
|
4487
|
+
streamState._rowState = rowState;
|
|
4488
|
+
streamState._rowID = weakResponse;
|
|
4489
|
+
streamState._rowTag = rowTag;
|
|
4490
|
+
streamState._rowLength = rowLength;
|
|
2471
4491
|
}
|
|
2472
4492
|
}
|
|
2473
4493
|
function createFromJSONCallback(response) {
|
|
@@ -2475,110 +4495,232 @@
|
|
|
2475
4495
|
if ("string" === typeof value)
|
|
2476
4496
|
return parseModelString(response, this, key, value);
|
|
2477
4497
|
if ("object" === typeof value && null !== value) {
|
|
2478
|
-
if (value[0] === REACT_ELEMENT_TYPE)
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
"rejected",
|
|
2551
|
-
null,
|
|
2552
|
-
stack.value,
|
|
2553
|
-
response
|
|
2554
|
-
)),
|
|
2555
|
-
(stack = {
|
|
2556
|
-
name: getComponentNameFromType(value.type) || "",
|
|
2557
|
-
owner: value._owner
|
|
2558
|
-
}),
|
|
2559
|
-
(stack.debugStack = value._debugStack),
|
|
2560
|
-
supportsCreateTask && (stack.debugTask = value._debugTask),
|
|
2561
|
-
(key._debugInfo = [stack]),
|
|
2562
|
-
(value = createLazyChunkWrapper(key)))
|
|
2563
|
-
: 0 < stack.deps &&
|
|
2564
|
-
((key = new ReactPromise("blocked", null, null, response)),
|
|
2565
|
-
(stack.value = value),
|
|
2566
|
-
(stack.chunk = key),
|
|
2567
|
-
(value = Object.freeze.bind(Object, value.props)),
|
|
2568
|
-
key.then(value, value),
|
|
2569
|
-
(value = createLazyChunkWrapper(key))))
|
|
2570
|
-
: Object.freeze(value.props);
|
|
2571
|
-
}
|
|
2572
|
-
return value;
|
|
4498
|
+
if (value[0] === REACT_ELEMENT_TYPE)
|
|
4499
|
+
b: {
|
|
4500
|
+
var owner = value[4],
|
|
4501
|
+
stack = value[5];
|
|
4502
|
+
key = value[6];
|
|
4503
|
+
value = {
|
|
4504
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
4505
|
+
type: value[1],
|
|
4506
|
+
key: value[2],
|
|
4507
|
+
props: value[3],
|
|
4508
|
+
_owner: void 0 === owner ? null : owner
|
|
4509
|
+
};
|
|
4510
|
+
Object.defineProperty(value, "ref", {
|
|
4511
|
+
enumerable: !1,
|
|
4512
|
+
get: nullRefGetter
|
|
4513
|
+
});
|
|
4514
|
+
value._store = {};
|
|
4515
|
+
Object.defineProperty(value._store, "validated", {
|
|
4516
|
+
configurable: !1,
|
|
4517
|
+
enumerable: !1,
|
|
4518
|
+
writable: !0,
|
|
4519
|
+
value: key
|
|
4520
|
+
});
|
|
4521
|
+
Object.defineProperty(value, "_debugInfo", {
|
|
4522
|
+
configurable: !1,
|
|
4523
|
+
enumerable: !1,
|
|
4524
|
+
writable: !0,
|
|
4525
|
+
value: null
|
|
4526
|
+
});
|
|
4527
|
+
Object.defineProperty(value, "_debugStack", {
|
|
4528
|
+
configurable: !1,
|
|
4529
|
+
enumerable: !1,
|
|
4530
|
+
writable: !0,
|
|
4531
|
+
value: void 0 === stack ? null : stack
|
|
4532
|
+
});
|
|
4533
|
+
Object.defineProperty(value, "_debugTask", {
|
|
4534
|
+
configurable: !1,
|
|
4535
|
+
enumerable: !1,
|
|
4536
|
+
writable: !0,
|
|
4537
|
+
value: null
|
|
4538
|
+
});
|
|
4539
|
+
if (null !== initializingHandler) {
|
|
4540
|
+
owner = initializingHandler;
|
|
4541
|
+
initializingHandler = owner.parent;
|
|
4542
|
+
if (owner.errored) {
|
|
4543
|
+
stack = new ReactPromise("rejected", null, owner.reason);
|
|
4544
|
+
initializeElement(response, value, null);
|
|
4545
|
+
owner = {
|
|
4546
|
+
name: getComponentNameFromType(value.type) || "",
|
|
4547
|
+
owner: value._owner
|
|
4548
|
+
};
|
|
4549
|
+
owner.debugStack = value._debugStack;
|
|
4550
|
+
supportsCreateTask && (owner.debugTask = value._debugTask);
|
|
4551
|
+
stack._debugInfo = [owner];
|
|
4552
|
+
key = createLazyChunkWrapper(stack, key);
|
|
4553
|
+
break b;
|
|
4554
|
+
}
|
|
4555
|
+
if (0 < owner.deps) {
|
|
4556
|
+
stack = new ReactPromise("blocked", null, null);
|
|
4557
|
+
owner.value = value;
|
|
4558
|
+
owner.chunk = stack;
|
|
4559
|
+
key = createLazyChunkWrapper(stack, key);
|
|
4560
|
+
value = initializeElement.bind(null, response, value, key);
|
|
4561
|
+
stack.then(value, value);
|
|
4562
|
+
break b;
|
|
4563
|
+
}
|
|
4564
|
+
}
|
|
4565
|
+
initializeElement(response, value, null);
|
|
4566
|
+
key = value;
|
|
4567
|
+
}
|
|
4568
|
+
else key = value;
|
|
4569
|
+
return key;
|
|
2573
4570
|
}
|
|
2574
4571
|
return value;
|
|
2575
4572
|
};
|
|
2576
4573
|
}
|
|
4574
|
+
function close(weakResponse) {
|
|
4575
|
+
reportGlobalError(weakResponse, Error("Connection closed."));
|
|
4576
|
+
}
|
|
4577
|
+
function noServerCall$1() {
|
|
4578
|
+
throw Error(
|
|
4579
|
+
"Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead."
|
|
4580
|
+
);
|
|
4581
|
+
}
|
|
4582
|
+
function createResponseFromOptions(options) {
|
|
4583
|
+
return new ResponseInstance(
|
|
4584
|
+
options.serverConsumerManifest.moduleMap,
|
|
4585
|
+
options.serverConsumerManifest.serverModuleMap,
|
|
4586
|
+
options.serverConsumerManifest.moduleLoading,
|
|
4587
|
+
noServerCall$1,
|
|
4588
|
+
options.encodeFormAction,
|
|
4589
|
+
"string" === typeof options.nonce ? options.nonce : void 0,
|
|
4590
|
+
options && options.temporaryReferences
|
|
4591
|
+
? options.temporaryReferences
|
|
4592
|
+
: void 0,
|
|
4593
|
+
options && options.findSourceMapURL ? options.findSourceMapURL : void 0,
|
|
4594
|
+
options ? !0 === options.replayConsoleLogs : !1,
|
|
4595
|
+
options && options.environmentName ? options.environmentName : void 0,
|
|
4596
|
+
options && void 0 !== options.debugChannel
|
|
4597
|
+
? {
|
|
4598
|
+
hasReadable: void 0 !== options.debugChannel.readable,
|
|
4599
|
+
callback: null
|
|
4600
|
+
}
|
|
4601
|
+
: void 0
|
|
4602
|
+
)._weakResponse;
|
|
4603
|
+
}
|
|
4604
|
+
function startReadingFromStream$1(response, stream, onDone, debugValue) {
|
|
4605
|
+
function progress(_ref) {
|
|
4606
|
+
var value = _ref.value;
|
|
4607
|
+
if (_ref.done) return onDone();
|
|
4608
|
+
processBinaryChunk(response, streamState, value);
|
|
4609
|
+
return reader.read().then(progress).catch(error);
|
|
4610
|
+
}
|
|
4611
|
+
function error(e) {
|
|
4612
|
+
reportGlobalError(response, e);
|
|
4613
|
+
}
|
|
4614
|
+
var streamState = createStreamState(response, debugValue),
|
|
4615
|
+
reader = stream.getReader();
|
|
4616
|
+
reader.read().then(progress).catch(error);
|
|
4617
|
+
}
|
|
2577
4618
|
function noServerCall() {
|
|
2578
4619
|
throw Error(
|
|
2579
4620
|
"Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead."
|
|
2580
4621
|
);
|
|
2581
4622
|
}
|
|
4623
|
+
function startReadingFromStream(response$jscomp$0, stream, onEnd) {
|
|
4624
|
+
var streamState = createStreamState(response$jscomp$0, stream);
|
|
4625
|
+
stream.on("data", function (chunk) {
|
|
4626
|
+
if ("string" === typeof chunk) {
|
|
4627
|
+
if (void 0 !== response$jscomp$0.weak.deref()) {
|
|
4628
|
+
var response = unwrapWeakResponse(response$jscomp$0),
|
|
4629
|
+
i = 0,
|
|
4630
|
+
rowState = streamState._rowState,
|
|
4631
|
+
rowID = streamState._rowID,
|
|
4632
|
+
rowTag = streamState._rowTag,
|
|
4633
|
+
rowLength = streamState._rowLength,
|
|
4634
|
+
buffer = streamState._buffer,
|
|
4635
|
+
chunkLength = chunk.length;
|
|
4636
|
+
for (
|
|
4637
|
+
incrementChunkDebugInfo(streamState, chunkLength);
|
|
4638
|
+
i < chunkLength;
|
|
4639
|
+
|
|
4640
|
+
) {
|
|
4641
|
+
var lastIdx = -1;
|
|
4642
|
+
switch (rowState) {
|
|
4643
|
+
case 0:
|
|
4644
|
+
lastIdx = chunk.charCodeAt(i++);
|
|
4645
|
+
58 === lastIdx
|
|
4646
|
+
? (rowState = 1)
|
|
4647
|
+
: (rowID =
|
|
4648
|
+
(rowID << 4) |
|
|
4649
|
+
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
|
4650
|
+
continue;
|
|
4651
|
+
case 1:
|
|
4652
|
+
rowState = chunk.charCodeAt(i);
|
|
4653
|
+
84 === rowState ||
|
|
4654
|
+
65 === rowState ||
|
|
4655
|
+
79 === rowState ||
|
|
4656
|
+
111 === rowState ||
|
|
4657
|
+
85 === rowState ||
|
|
4658
|
+
83 === rowState ||
|
|
4659
|
+
115 === rowState ||
|
|
4660
|
+
76 === rowState ||
|
|
4661
|
+
108 === rowState ||
|
|
4662
|
+
71 === rowState ||
|
|
4663
|
+
103 === rowState ||
|
|
4664
|
+
77 === rowState ||
|
|
4665
|
+
109 === rowState ||
|
|
4666
|
+
86 === rowState
|
|
4667
|
+
? ((rowTag = rowState), (rowState = 2), i++)
|
|
4668
|
+
: (64 < rowState && 91 > rowState) ||
|
|
4669
|
+
114 === rowState ||
|
|
4670
|
+
120 === rowState
|
|
4671
|
+
? ((rowTag = rowState), (rowState = 3), i++)
|
|
4672
|
+
: ((rowTag = 0), (rowState = 3));
|
|
4673
|
+
continue;
|
|
4674
|
+
case 2:
|
|
4675
|
+
lastIdx = chunk.charCodeAt(i++);
|
|
4676
|
+
44 === lastIdx
|
|
4677
|
+
? (rowState = 4)
|
|
4678
|
+
: (rowLength =
|
|
4679
|
+
(rowLength << 4) |
|
|
4680
|
+
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
|
4681
|
+
continue;
|
|
4682
|
+
case 3:
|
|
4683
|
+
lastIdx = chunk.indexOf("\n", i);
|
|
4684
|
+
break;
|
|
4685
|
+
case 4:
|
|
4686
|
+
if (84 !== rowTag)
|
|
4687
|
+
throw Error(
|
|
4688
|
+
"Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams."
|
|
4689
|
+
);
|
|
4690
|
+
if (rowLength < chunk.length || chunk.length > 3 * rowLength)
|
|
4691
|
+
throw Error(
|
|
4692
|
+
"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
|
|
4693
|
+
);
|
|
4694
|
+
lastIdx = chunk.length;
|
|
4695
|
+
}
|
|
4696
|
+
if (-1 < lastIdx) {
|
|
4697
|
+
if (0 < buffer.length)
|
|
4698
|
+
throw Error(
|
|
4699
|
+
"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
|
|
4700
|
+
);
|
|
4701
|
+
i = chunk.slice(i, lastIdx);
|
|
4702
|
+
processFullStringRow(response, streamState, rowID, rowTag, i);
|
|
4703
|
+
i = lastIdx;
|
|
4704
|
+
3 === rowState && i++;
|
|
4705
|
+
rowLength = rowID = rowTag = rowState = 0;
|
|
4706
|
+
buffer.length = 0;
|
|
4707
|
+
} else if (chunk.length !== i)
|
|
4708
|
+
throw Error(
|
|
4709
|
+
"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
|
|
4710
|
+
);
|
|
4711
|
+
}
|
|
4712
|
+
streamState._rowState = rowState;
|
|
4713
|
+
streamState._rowID = rowID;
|
|
4714
|
+
streamState._rowTag = rowTag;
|
|
4715
|
+
streamState._rowLength = rowLength;
|
|
4716
|
+
}
|
|
4717
|
+
} else processBinaryChunk(response$jscomp$0, streamState, chunk);
|
|
4718
|
+
});
|
|
4719
|
+
stream.on("error", function (error) {
|
|
4720
|
+
reportGlobalError(response$jscomp$0, error);
|
|
4721
|
+
});
|
|
4722
|
+
stream.on("end", onEnd);
|
|
4723
|
+
}
|
|
2582
4724
|
var util = require("util"),
|
|
2583
4725
|
ReactDOM = require("react-dom"),
|
|
2584
4726
|
React = require("react"),
|
|
@@ -2591,9 +4733,8 @@
|
|
|
2591
4733
|
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
2592
4734
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
2593
4735
|
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
2594
|
-
REACT_PROFILER_TYPE = Symbol.for("react.profiler")
|
|
2595
|
-
|
|
2596
|
-
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
4736
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
4737
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
2597
4738
|
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
2598
4739
|
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
2599
4740
|
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
@@ -2617,7 +4758,17 @@
|
|
|
2617
4758
|
v8FrameRegExp =
|
|
2618
4759
|
/^ {3} at (?:(.+) \((.+):(\d+):(\d+)\)|(?:async )?(.+):(\d+):(\d+))$/,
|
|
2619
4760
|
jscSpiderMonkeyFrameRegExp = /(?:(.*)@)?(.*):(\d+):(\d+)/,
|
|
4761
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
2620
4762
|
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
4763
|
+
supportsUserTiming =
|
|
4764
|
+
"undefined" !== typeof console &&
|
|
4765
|
+
"function" === typeof console.timeStamp &&
|
|
4766
|
+
"undefined" !== typeof performance &&
|
|
4767
|
+
"function" === typeof performance.measure,
|
|
4768
|
+
trackNames =
|
|
4769
|
+
"Primary Parallel Parallel\u200b Parallel\u200b\u200b Parallel\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b".split(
|
|
4770
|
+
" "
|
|
4771
|
+
),
|
|
2621
4772
|
prefix,
|
|
2622
4773
|
suffix;
|
|
2623
4774
|
new ("function" === typeof WeakMap ? WeakMap : Map)();
|
|
@@ -2628,6 +4779,7 @@
|
|
|
2628
4779
|
ReactSharedInteralsServer;
|
|
2629
4780
|
ReactPromise.prototype = Object.create(Promise.prototype);
|
|
2630
4781
|
ReactPromise.prototype.then = function (resolve, reject) {
|
|
4782
|
+
var _this = this;
|
|
2631
4783
|
switch (this.status) {
|
|
2632
4784
|
case "resolved_model":
|
|
2633
4785
|
initializeModelChunk(this);
|
|
@@ -2635,24 +4787,46 @@
|
|
|
2635
4787
|
case "resolved_module":
|
|
2636
4788
|
initializeModuleChunk(this);
|
|
2637
4789
|
}
|
|
4790
|
+
var resolveCallback = resolve,
|
|
4791
|
+
rejectCallback = reject,
|
|
4792
|
+
wrapperPromise = new Promise(function (res, rej) {
|
|
4793
|
+
resolve = function (value) {
|
|
4794
|
+
wrapperPromise._debugInfo = _this._debugInfo;
|
|
4795
|
+
res(value);
|
|
4796
|
+
};
|
|
4797
|
+
reject = function (reason) {
|
|
4798
|
+
wrapperPromise._debugInfo = _this._debugInfo;
|
|
4799
|
+
rej(reason);
|
|
4800
|
+
};
|
|
4801
|
+
});
|
|
4802
|
+
wrapperPromise.then(resolveCallback, rejectCallback);
|
|
2638
4803
|
switch (this.status) {
|
|
2639
4804
|
case "fulfilled":
|
|
2640
|
-
resolve(this.value);
|
|
4805
|
+
"function" === typeof resolve && resolve(this.value);
|
|
2641
4806
|
break;
|
|
2642
4807
|
case "pending":
|
|
2643
4808
|
case "blocked":
|
|
2644
|
-
resolve &&
|
|
4809
|
+
"function" === typeof resolve &&
|
|
2645
4810
|
(null === this.value && (this.value = []),
|
|
2646
4811
|
this.value.push(resolve));
|
|
2647
|
-
reject &&
|
|
4812
|
+
"function" === typeof reject &&
|
|
2648
4813
|
(null === this.reason && (this.reason = []),
|
|
2649
4814
|
this.reason.push(reject));
|
|
2650
4815
|
break;
|
|
4816
|
+
case "halted":
|
|
4817
|
+
break;
|
|
2651
4818
|
default:
|
|
2652
|
-
reject && reject(this.reason);
|
|
4819
|
+
"function" === typeof reject && reject(this.reason);
|
|
2653
4820
|
}
|
|
2654
4821
|
};
|
|
2655
|
-
var
|
|
4822
|
+
var debugChannelRegistry =
|
|
4823
|
+
"function" === typeof FinalizationRegistry
|
|
4824
|
+
? new FinalizationRegistry(closeDebugChannel)
|
|
4825
|
+
: null,
|
|
4826
|
+
initializingHandler = null,
|
|
4827
|
+
initializingChunk = null,
|
|
4828
|
+
mightHaveStaticConstructor = /\bclass\b.*\bstatic\b/,
|
|
4829
|
+
MIN_CHUNK_SIZE = 65536,
|
|
2656
4830
|
supportsCreateTask = !!console.createTask,
|
|
2657
4831
|
fakeFunctionCache = new Map(),
|
|
2658
4832
|
fakeFunctionIdx = 0,
|
|
@@ -2662,6 +4836,7 @@
|
|
|
2662
4836
|
response,
|
|
2663
4837
|
stack,
|
|
2664
4838
|
environmentName,
|
|
4839
|
+
!1,
|
|
2665
4840
|
fakeJSXCallSite
|
|
2666
4841
|
)();
|
|
2667
4842
|
}
|
|
@@ -2672,14 +4847,12 @@
|
|
|
2672
4847
|
),
|
|
2673
4848
|
currentOwnerInDEV = null,
|
|
2674
4849
|
replayConsoleWithCallStack = {
|
|
2675
|
-
react_stack_bottom_frame: function (
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
args
|
|
2682
|
-
) {
|
|
4850
|
+
react_stack_bottom_frame: function (response, payload) {
|
|
4851
|
+
var methodName = payload[0],
|
|
4852
|
+
stackTrace = payload[1],
|
|
4853
|
+
owner = payload[2],
|
|
4854
|
+
env = payload[3];
|
|
4855
|
+
payload = payload.slice(4);
|
|
2683
4856
|
var prevStack = ReactSharedInternals.getCurrentStack;
|
|
2684
4857
|
ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
|
|
2685
4858
|
currentOwnerInDEV = null === owner ? response._debugRootOwner : owner;
|
|
@@ -2693,13 +4866,13 @@
|
|
|
2693
4866
|
case "table":
|
|
2694
4867
|
var JSCompiler_inline_result = bind$1.apply(
|
|
2695
4868
|
console[methodName],
|
|
2696
|
-
[console].concat(
|
|
4869
|
+
[console].concat(payload)
|
|
2697
4870
|
);
|
|
2698
4871
|
break a;
|
|
2699
4872
|
case "assert":
|
|
2700
4873
|
offset = 1;
|
|
2701
4874
|
}
|
|
2702
|
-
var newArgs =
|
|
4875
|
+
var newArgs = payload.slice(0);
|
|
2703
4876
|
"string" === typeof newArgs[offset]
|
|
2704
4877
|
? newArgs.splice(
|
|
2705
4878
|
offset,
|
|
@@ -2712,7 +4885,7 @@
|
|
|
2712
4885
|
: newArgs.splice(
|
|
2713
4886
|
offset,
|
|
2714
4887
|
0,
|
|
2715
|
-
"\u001b[0m\u001b[7m%c%s\u001b[0m%c
|
|
4888
|
+
"\u001b[0m\u001b[7m%c%s\u001b[0m%c",
|
|
2716
4889
|
"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
|
|
2717
4890
|
" " + env + " ",
|
|
2718
4891
|
""
|
|
@@ -2727,10 +4900,11 @@
|
|
|
2727
4900
|
response,
|
|
2728
4901
|
stackTrace,
|
|
2729
4902
|
env,
|
|
4903
|
+
!1,
|
|
2730
4904
|
JSCompiler_inline_result
|
|
2731
4905
|
);
|
|
2732
4906
|
if (null != owner) {
|
|
2733
|
-
var task = initializeFakeTask(response, owner
|
|
4907
|
+
var task = initializeFakeTask(response, owner);
|
|
2734
4908
|
initializeFakeStack(response, owner);
|
|
2735
4909
|
if (null !== task) {
|
|
2736
4910
|
task.run(callStack);
|
|
@@ -2749,6 +4923,39 @@
|
|
|
2749
4923
|
replayConsoleWithCallStack.react_stack_bottom_frame.bind(
|
|
2750
4924
|
replayConsoleWithCallStack
|
|
2751
4925
|
);
|
|
4926
|
+
exports.createFromFetch = function (promiseForResponse, options) {
|
|
4927
|
+
var response = createResponseFromOptions(options);
|
|
4928
|
+
promiseForResponse.then(
|
|
4929
|
+
function (r) {
|
|
4930
|
+
if (
|
|
4931
|
+
options &&
|
|
4932
|
+
options.debugChannel &&
|
|
4933
|
+
options.debugChannel.readable
|
|
4934
|
+
) {
|
|
4935
|
+
var streamDoneCount = 0,
|
|
4936
|
+
handleDone = function () {
|
|
4937
|
+
2 === ++streamDoneCount && close(response);
|
|
4938
|
+
};
|
|
4939
|
+
startReadingFromStream$1(
|
|
4940
|
+
response,
|
|
4941
|
+
options.debugChannel.readable,
|
|
4942
|
+
handleDone
|
|
4943
|
+
);
|
|
4944
|
+
startReadingFromStream$1(response, r.body, handleDone, r);
|
|
4945
|
+
} else
|
|
4946
|
+
startReadingFromStream$1(
|
|
4947
|
+
response,
|
|
4948
|
+
r.body,
|
|
4949
|
+
close.bind(null, response),
|
|
4950
|
+
r
|
|
4951
|
+
);
|
|
4952
|
+
},
|
|
4953
|
+
function (e) {
|
|
4954
|
+
reportGlobalError(response, e);
|
|
4955
|
+
}
|
|
4956
|
+
);
|
|
4957
|
+
return getRoot(response);
|
|
4958
|
+
};
|
|
2752
4959
|
exports.createFromNodeStream = function (
|
|
2753
4960
|
stream,
|
|
2754
4961
|
serverConsumerManifest,
|
|
@@ -2764,192 +4971,80 @@
|
|
|
2764
4971
|
void 0,
|
|
2765
4972
|
options && options.findSourceMapURL ? options.findSourceMapURL : void 0,
|
|
2766
4973
|
options ? !0 === options.replayConsoleLogs : !1,
|
|
2767
|
-
options && options.environmentName ? options.environmentName : void 0
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
var i = 0,
|
|
2773
|
-
rowState = response._rowState,
|
|
2774
|
-
rowID = response._rowID,
|
|
2775
|
-
rowTag = response._rowTag,
|
|
2776
|
-
rowLength = response._rowLength,
|
|
2777
|
-
buffer = response._buffer,
|
|
2778
|
-
chunkLength = chunk.length;
|
|
2779
|
-
i < chunkLength;
|
|
2780
|
-
|
|
2781
|
-
) {
|
|
2782
|
-
var lastIdx = -1;
|
|
2783
|
-
switch (rowState) {
|
|
2784
|
-
case 0:
|
|
2785
|
-
lastIdx = chunk.charCodeAt(i++);
|
|
2786
|
-
58 === lastIdx
|
|
2787
|
-
? (rowState = 1)
|
|
2788
|
-
: (rowID =
|
|
2789
|
-
(rowID << 4) |
|
|
2790
|
-
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
|
2791
|
-
continue;
|
|
2792
|
-
case 1:
|
|
2793
|
-
rowState = chunk.charCodeAt(i);
|
|
2794
|
-
84 === rowState ||
|
|
2795
|
-
65 === rowState ||
|
|
2796
|
-
79 === rowState ||
|
|
2797
|
-
111 === rowState ||
|
|
2798
|
-
85 === rowState ||
|
|
2799
|
-
83 === rowState ||
|
|
2800
|
-
115 === rowState ||
|
|
2801
|
-
76 === rowState ||
|
|
2802
|
-
108 === rowState ||
|
|
2803
|
-
71 === rowState ||
|
|
2804
|
-
103 === rowState ||
|
|
2805
|
-
77 === rowState ||
|
|
2806
|
-
109 === rowState ||
|
|
2807
|
-
86 === rowState
|
|
2808
|
-
? ((rowTag = rowState), (rowState = 2), i++)
|
|
2809
|
-
: (64 < rowState && 91 > rowState) ||
|
|
2810
|
-
114 === rowState ||
|
|
2811
|
-
120 === rowState
|
|
2812
|
-
? ((rowTag = rowState), (rowState = 3), i++)
|
|
2813
|
-
: ((rowTag = 0), (rowState = 3));
|
|
2814
|
-
continue;
|
|
2815
|
-
case 2:
|
|
2816
|
-
lastIdx = chunk.charCodeAt(i++);
|
|
2817
|
-
44 === lastIdx
|
|
2818
|
-
? (rowState = 4)
|
|
2819
|
-
: (rowLength =
|
|
2820
|
-
(rowLength << 4) |
|
|
2821
|
-
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
|
2822
|
-
continue;
|
|
2823
|
-
case 3:
|
|
2824
|
-
lastIdx = chunk.indexOf("\n", i);
|
|
2825
|
-
break;
|
|
2826
|
-
case 4:
|
|
2827
|
-
if (84 !== rowTag)
|
|
2828
|
-
throw Error(
|
|
2829
|
-
"Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams."
|
|
2830
|
-
);
|
|
2831
|
-
if (rowLength < chunk.length || chunk.length > 3 * rowLength)
|
|
2832
|
-
throw Error(
|
|
2833
|
-
"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
|
|
2834
|
-
);
|
|
2835
|
-
lastIdx = chunk.length;
|
|
2836
|
-
}
|
|
2837
|
-
if (-1 < lastIdx) {
|
|
2838
|
-
if (0 < buffer.length)
|
|
2839
|
-
throw Error(
|
|
2840
|
-
"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
|
|
2841
|
-
);
|
|
2842
|
-
i = chunk.slice(i, lastIdx);
|
|
2843
|
-
processFullStringRow(response, rowID, rowTag, i);
|
|
2844
|
-
i = lastIdx;
|
|
2845
|
-
3 === rowState && i++;
|
|
2846
|
-
rowLength = rowID = rowTag = rowState = 0;
|
|
2847
|
-
buffer.length = 0;
|
|
2848
|
-
} else if (chunk.length !== i)
|
|
2849
|
-
throw Error(
|
|
2850
|
-
"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
|
|
2851
|
-
);
|
|
2852
|
-
}
|
|
2853
|
-
response._rowState = rowState;
|
|
2854
|
-
response._rowID = rowID;
|
|
2855
|
-
response._rowTag = rowTag;
|
|
2856
|
-
response._rowLength = rowLength;
|
|
2857
|
-
} else {
|
|
2858
|
-
rowLength = 0;
|
|
2859
|
-
chunkLength = response._rowState;
|
|
2860
|
-
rowID = response._rowID;
|
|
2861
|
-
i = response._rowTag;
|
|
2862
|
-
rowState = response._rowLength;
|
|
2863
|
-
buffer = response._buffer;
|
|
2864
|
-
for (rowTag = chunk.length; rowLength < rowTag; ) {
|
|
2865
|
-
lastIdx = -1;
|
|
2866
|
-
switch (chunkLength) {
|
|
2867
|
-
case 0:
|
|
2868
|
-
lastIdx = chunk[rowLength++];
|
|
2869
|
-
58 === lastIdx
|
|
2870
|
-
? (chunkLength = 1)
|
|
2871
|
-
: (rowID =
|
|
2872
|
-
(rowID << 4) |
|
|
2873
|
-
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
|
2874
|
-
continue;
|
|
2875
|
-
case 1:
|
|
2876
|
-
chunkLength = chunk[rowLength];
|
|
2877
|
-
84 === chunkLength ||
|
|
2878
|
-
65 === chunkLength ||
|
|
2879
|
-
79 === chunkLength ||
|
|
2880
|
-
111 === chunkLength ||
|
|
2881
|
-
85 === chunkLength ||
|
|
2882
|
-
83 === chunkLength ||
|
|
2883
|
-
115 === chunkLength ||
|
|
2884
|
-
76 === chunkLength ||
|
|
2885
|
-
108 === chunkLength ||
|
|
2886
|
-
71 === chunkLength ||
|
|
2887
|
-
103 === chunkLength ||
|
|
2888
|
-
77 === chunkLength ||
|
|
2889
|
-
109 === chunkLength ||
|
|
2890
|
-
86 === chunkLength
|
|
2891
|
-
? ((i = chunkLength), (chunkLength = 2), rowLength++)
|
|
2892
|
-
: (64 < chunkLength && 91 > chunkLength) ||
|
|
2893
|
-
35 === chunkLength ||
|
|
2894
|
-
114 === chunkLength ||
|
|
2895
|
-
120 === chunkLength
|
|
2896
|
-
? ((i = chunkLength), (chunkLength = 3), rowLength++)
|
|
2897
|
-
: ((i = 0), (chunkLength = 3));
|
|
2898
|
-
continue;
|
|
2899
|
-
case 2:
|
|
2900
|
-
lastIdx = chunk[rowLength++];
|
|
2901
|
-
44 === lastIdx
|
|
2902
|
-
? (chunkLength = 4)
|
|
2903
|
-
: (rowState =
|
|
2904
|
-
(rowState << 4) |
|
|
2905
|
-
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
|
2906
|
-
continue;
|
|
2907
|
-
case 3:
|
|
2908
|
-
lastIdx = chunk.indexOf(10, rowLength);
|
|
2909
|
-
break;
|
|
2910
|
-
case 4:
|
|
2911
|
-
(lastIdx = rowLength + rowState),
|
|
2912
|
-
lastIdx > chunk.length && (lastIdx = -1);
|
|
2913
|
-
}
|
|
2914
|
-
var offset = chunk.byteOffset + rowLength;
|
|
2915
|
-
if (-1 < lastIdx)
|
|
2916
|
-
(rowState = new Uint8Array(
|
|
2917
|
-
chunk.buffer,
|
|
2918
|
-
offset,
|
|
2919
|
-
lastIdx - rowLength
|
|
2920
|
-
)),
|
|
2921
|
-
processFullBinaryRow(response, rowID, i, buffer, rowState),
|
|
2922
|
-
(rowLength = lastIdx),
|
|
2923
|
-
3 === chunkLength && rowLength++,
|
|
2924
|
-
(rowState = rowID = i = chunkLength = 0),
|
|
2925
|
-
(buffer.length = 0);
|
|
2926
|
-
else {
|
|
2927
|
-
chunk = new Uint8Array(
|
|
2928
|
-
chunk.buffer,
|
|
2929
|
-
offset,
|
|
2930
|
-
chunk.byteLength - rowLength
|
|
2931
|
-
);
|
|
2932
|
-
buffer.push(chunk);
|
|
2933
|
-
rowState -= chunk.byteLength;
|
|
2934
|
-
break;
|
|
4974
|
+
options && options.environmentName ? options.environmentName : void 0,
|
|
4975
|
+
options && void 0 !== options.debugChannel
|
|
4976
|
+
? {
|
|
4977
|
+
hasReadable: void 0 !== options.debugChannel.readable,
|
|
4978
|
+
callback: null
|
|
2935
4979
|
}
|
|
4980
|
+
: void 0
|
|
4981
|
+
)._weakResponse;
|
|
4982
|
+
if (options && options.debugChannel) {
|
|
4983
|
+
var streamEndedCount = 0;
|
|
4984
|
+
serverConsumerManifest = function () {
|
|
4985
|
+
2 === ++streamEndedCount && close(response);
|
|
4986
|
+
};
|
|
4987
|
+
startReadingFromStream(
|
|
4988
|
+
response,
|
|
4989
|
+
options.debugChannel,
|
|
4990
|
+
serverConsumerManifest
|
|
4991
|
+
);
|
|
4992
|
+
startReadingFromStream(response, stream, serverConsumerManifest);
|
|
4993
|
+
} else
|
|
4994
|
+
startReadingFromStream(response, stream, close.bind(null, response));
|
|
4995
|
+
return getRoot(response);
|
|
4996
|
+
};
|
|
4997
|
+
exports.createFromReadableStream = function (stream, options) {
|
|
4998
|
+
var response = createResponseFromOptions(options);
|
|
4999
|
+
if (options && options.debugChannel && options.debugChannel.readable) {
|
|
5000
|
+
var streamDoneCount = 0,
|
|
5001
|
+
handleDone = function () {
|
|
5002
|
+
2 === ++streamDoneCount && close(response);
|
|
5003
|
+
};
|
|
5004
|
+
startReadingFromStream$1(
|
|
5005
|
+
response,
|
|
5006
|
+
options.debugChannel.readable,
|
|
5007
|
+
handleDone
|
|
5008
|
+
);
|
|
5009
|
+
startReadingFromStream$1(response, stream, handleDone, stream);
|
|
5010
|
+
} else
|
|
5011
|
+
startReadingFromStream$1(
|
|
5012
|
+
response,
|
|
5013
|
+
stream,
|
|
5014
|
+
close.bind(null, response),
|
|
5015
|
+
stream
|
|
5016
|
+
);
|
|
5017
|
+
return getRoot(response);
|
|
5018
|
+
};
|
|
5019
|
+
exports.createServerReference = function (id) {
|
|
5020
|
+
return createServerReference$1(id, noServerCall$1);
|
|
5021
|
+
};
|
|
5022
|
+
exports.createTemporaryReferenceSet = function () {
|
|
5023
|
+
return new Map();
|
|
5024
|
+
};
|
|
5025
|
+
exports.encodeReply = function (value, options) {
|
|
5026
|
+
return new Promise(function (resolve, reject) {
|
|
5027
|
+
var abort = processReply(
|
|
5028
|
+
value,
|
|
5029
|
+
"",
|
|
5030
|
+
options && options.temporaryReferences
|
|
5031
|
+
? options.temporaryReferences
|
|
5032
|
+
: void 0,
|
|
5033
|
+
resolve,
|
|
5034
|
+
reject
|
|
5035
|
+
);
|
|
5036
|
+
if (options && options.signal) {
|
|
5037
|
+
var signal = options.signal;
|
|
5038
|
+
if (signal.aborted) abort(signal.reason);
|
|
5039
|
+
else {
|
|
5040
|
+
var listener = function () {
|
|
5041
|
+
abort(signal.reason);
|
|
5042
|
+
signal.removeEventListener("abort", listener);
|
|
5043
|
+
};
|
|
5044
|
+
signal.addEventListener("abort", listener);
|
|
2936
5045
|
}
|
|
2937
|
-
response._rowState = chunkLength;
|
|
2938
|
-
response._rowID = rowID;
|
|
2939
|
-
response._rowTag = i;
|
|
2940
|
-
response._rowLength = rowState;
|
|
2941
5046
|
}
|
|
2942
5047
|
});
|
|
2943
|
-
stream.on("error", function (error) {
|
|
2944
|
-
reportGlobalError(response, error);
|
|
2945
|
-
});
|
|
2946
|
-
stream.on("end", function () {
|
|
2947
|
-
reportGlobalError(response, Error("Connection closed."));
|
|
2948
|
-
});
|
|
2949
|
-
return getChunk(response, 0);
|
|
2950
|
-
};
|
|
2951
|
-
exports.createServerReference = function (id) {
|
|
2952
|
-
return createServerReference$1(id, noServerCall);
|
|
2953
5048
|
};
|
|
2954
5049
|
exports.registerServerReference = function (
|
|
2955
5050
|
reference,
|