react-server-dom-webpack 18.3.0-next-0ba4698c7-20230201 → 18.3.0-next-855b77c9b-20230202
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/cjs/react-server-dom-webpack-client.development.js +19 -9
- package/cjs/react-server-dom-webpack-client.production.min.js +2 -2
- package/cjs/react-server-dom-webpack-node-register.js +4 -15
- package/cjs/react-server-dom-webpack-server.browser.development.js +117 -23
- package/cjs/react-server-dom-webpack-server.browser.production.min.js +33 -32
- package/cjs/react-server-dom-webpack-server.node.development.js +117 -23
- package/cjs/react-server-dom-webpack-server.node.production.min.js +35 -33
- package/package.json +3 -3
- package/umd/react-server-dom-webpack-client.development.js +19 -9
- package/umd/react-server-dom-webpack-client.production.min.js +8 -8
- package/umd/react-server-dom-webpack-server.browser.development.js +117 -23
- package/umd/react-server-dom-webpack-server.browser.production.min.js +36 -34
@@ -1288,6 +1288,81 @@ var POP = {}; // Used for DEV messages to keep track of which parent rendered so
|
|
1288
1288
|
var jsxPropsParents = new WeakMap();
|
1289
1289
|
var jsxChildrenParents = new WeakMap();
|
1290
1290
|
|
1291
|
+
function serializeThenable(request, thenable) {
|
1292
|
+
request.pendingChunks++;
|
1293
|
+
var newTask = createTask(request, null, getActiveContext(), request.abortableTasks);
|
1294
|
+
|
1295
|
+
switch (thenable.status) {
|
1296
|
+
case 'fulfilled':
|
1297
|
+
{
|
1298
|
+
// We have the resolved value, we can go ahead and schedule it for serialization.
|
1299
|
+
newTask.model = thenable.value;
|
1300
|
+
pingTask(request, newTask);
|
1301
|
+
return newTask.id;
|
1302
|
+
}
|
1303
|
+
|
1304
|
+
case 'rejected':
|
1305
|
+
{
|
1306
|
+
var x = thenable.reason;
|
1307
|
+
var digest = logRecoverableError(request, x);
|
1308
|
+
|
1309
|
+
{
|
1310
|
+
var _getErrorMessageAndSt = getErrorMessageAndStackDev(x),
|
1311
|
+
message = _getErrorMessageAndSt.message,
|
1312
|
+
stack = _getErrorMessageAndSt.stack;
|
1313
|
+
|
1314
|
+
emitErrorChunkDev(request, newTask.id, digest, message, stack);
|
1315
|
+
}
|
1316
|
+
|
1317
|
+
return newTask.id;
|
1318
|
+
}
|
1319
|
+
|
1320
|
+
default:
|
1321
|
+
{
|
1322
|
+
if (typeof thenable.status === 'string') {
|
1323
|
+
// Only instrument the thenable if the status if not defined. If
|
1324
|
+
// it's defined, but an unknown value, assume it's been instrumented by
|
1325
|
+
// some custom userspace implementation. We treat it as "pending".
|
1326
|
+
break;
|
1327
|
+
}
|
1328
|
+
|
1329
|
+
var pendingThenable = thenable;
|
1330
|
+
pendingThenable.status = 'pending';
|
1331
|
+
pendingThenable.then(function (fulfilledValue) {
|
1332
|
+
if (thenable.status === 'pending') {
|
1333
|
+
var fulfilledThenable = thenable;
|
1334
|
+
fulfilledThenable.status = 'fulfilled';
|
1335
|
+
fulfilledThenable.value = fulfilledValue;
|
1336
|
+
}
|
1337
|
+
}, function (error) {
|
1338
|
+
if (thenable.status === 'pending') {
|
1339
|
+
var rejectedThenable = thenable;
|
1340
|
+
rejectedThenable.status = 'rejected';
|
1341
|
+
rejectedThenable.reason = error;
|
1342
|
+
}
|
1343
|
+
});
|
1344
|
+
break;
|
1345
|
+
}
|
1346
|
+
}
|
1347
|
+
|
1348
|
+
thenable.then(function (value) {
|
1349
|
+
newTask.model = value;
|
1350
|
+
pingTask(request, newTask);
|
1351
|
+
}, function (reason) {
|
1352
|
+
// TODO: Is it safe to directly emit these without being inside a retry?
|
1353
|
+
var digest = logRecoverableError(request, reason);
|
1354
|
+
|
1355
|
+
{
|
1356
|
+
var _getErrorMessageAndSt2 = getErrorMessageAndStackDev(reason),
|
1357
|
+
_message = _getErrorMessageAndSt2.message,
|
1358
|
+
_stack = _getErrorMessageAndSt2.stack;
|
1359
|
+
|
1360
|
+
emitErrorChunkDev(request, newTask.id, digest, _message, _stack);
|
1361
|
+
}
|
1362
|
+
});
|
1363
|
+
return newTask.id;
|
1364
|
+
}
|
1365
|
+
|
1291
1366
|
function readThenable(thenable) {
|
1292
1367
|
if (thenable.status === 'fulfilled') {
|
1293
1368
|
return thenable.value;
|
@@ -1344,7 +1419,7 @@ function createLazyWrapperAroundWakeable(wakeable) {
|
|
1344
1419
|
return lazyType;
|
1345
1420
|
}
|
1346
1421
|
|
1347
|
-
function attemptResolveElement(type, key, ref, props, prevThenableState) {
|
1422
|
+
function attemptResolveElement(request, type, key, ref, props, prevThenableState) {
|
1348
1423
|
if (ref !== null && ref !== undefined) {
|
1349
1424
|
// When the ref moves to the regular props object this will implicitly
|
1350
1425
|
// throw for functions. We could probably relax it to a DEV warning for other
|
@@ -1371,6 +1446,16 @@ function attemptResolveElement(type, key, ref, props, prevThenableState) {
|
|
1371
1446
|
var result = type(props);
|
1372
1447
|
|
1373
1448
|
if (typeof result === 'object' && result !== null && typeof result.then === 'function') {
|
1449
|
+
// When the return value is in children position we can resolve it immediately,
|
1450
|
+
// to its value without a wrapper if it's synchronously available.
|
1451
|
+
var thenable = result;
|
1452
|
+
|
1453
|
+
if (thenable.status === 'fulfilled') {
|
1454
|
+
return thenable.value;
|
1455
|
+
} // TODO: Once we accept Promises as children on the client, we can just return
|
1456
|
+
// the thenable here.
|
1457
|
+
|
1458
|
+
|
1374
1459
|
return createLazyWrapperAroundWakeable(result);
|
1375
1460
|
}
|
1376
1461
|
|
@@ -1402,7 +1487,7 @@ function attemptResolveElement(type, key, ref, props, prevThenableState) {
|
|
1402
1487
|
var payload = type._payload;
|
1403
1488
|
var init = type._init;
|
1404
1489
|
var wrappedType = init(payload);
|
1405
|
-
return attemptResolveElement(wrappedType, key, ref, props, prevThenableState);
|
1490
|
+
return attemptResolveElement(request, wrappedType, key, ref, props, prevThenableState);
|
1406
1491
|
}
|
1407
1492
|
|
1408
1493
|
case REACT_FORWARD_REF_TYPE:
|
@@ -1414,7 +1499,7 @@ function attemptResolveElement(type, key, ref, props, prevThenableState) {
|
|
1414
1499
|
|
1415
1500
|
case REACT_MEMO_TYPE:
|
1416
1501
|
{
|
1417
|
-
return attemptResolveElement(type.type, key, ref, props, prevThenableState);
|
1502
|
+
return attemptResolveElement(request, type.type, key, ref, props, prevThenableState);
|
1418
1503
|
}
|
1419
1504
|
|
1420
1505
|
case REACT_PROVIDER_TYPE:
|
@@ -1479,10 +1564,14 @@ function serializeByValueID(id) {
|
|
1479
1564
|
return '$' + id.toString(16);
|
1480
1565
|
}
|
1481
1566
|
|
1482
|
-
function
|
1567
|
+
function serializeLazyID(id) {
|
1483
1568
|
return '$L' + id.toString(16);
|
1484
1569
|
}
|
1485
1570
|
|
1571
|
+
function serializePromiseID(id) {
|
1572
|
+
return '$@' + id.toString(16);
|
1573
|
+
}
|
1574
|
+
|
1486
1575
|
function serializeSymbolReference(name) {
|
1487
1576
|
return '$S' + name;
|
1488
1577
|
}
|
@@ -1503,7 +1592,7 @@ function serializeClientReference(request, parent, key, moduleReference) {
|
|
1503
1592
|
// knows how to deal with lazy values. This lets us suspend
|
1504
1593
|
// on this component rather than its parent until the code has
|
1505
1594
|
// loaded.
|
1506
|
-
return
|
1595
|
+
return serializeLazyID(existingId);
|
1507
1596
|
}
|
1508
1597
|
|
1509
1598
|
return serializeByValueID(existingId);
|
@@ -1522,7 +1611,7 @@ function serializeClientReference(request, parent, key, moduleReference) {
|
|
1522
1611
|
// knows how to deal with lazy values. This lets us suspend
|
1523
1612
|
// on this component rather than its parent until the code has
|
1524
1613
|
// loaded.
|
1525
|
-
return
|
1614
|
+
return serializeLazyID(moduleId);
|
1526
1615
|
}
|
1527
1616
|
|
1528
1617
|
return serializeByValueID(moduleId);
|
@@ -1532,9 +1621,9 @@ function serializeClientReference(request, parent, key, moduleReference) {
|
|
1532
1621
|
var digest = logRecoverableError(request, x);
|
1533
1622
|
|
1534
1623
|
{
|
1535
|
-
var
|
1536
|
-
message =
|
1537
|
-
stack =
|
1624
|
+
var _getErrorMessageAndSt3 = getErrorMessageAndStackDev(x),
|
1625
|
+
message = _getErrorMessageAndSt3.message,
|
1626
|
+
stack = _getErrorMessageAndSt3.stack;
|
1538
1627
|
|
1539
1628
|
emitErrorChunkDev(request, errorId, digest, message, stack);
|
1540
1629
|
}
|
@@ -1916,7 +2005,7 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
1916
2005
|
// TODO: Concatenate keys of parents onto children.
|
1917
2006
|
var element = value; // Attempt to render the Server Component.
|
1918
2007
|
|
1919
|
-
value = attemptResolveElement(element.type, element.key, element.ref, element.props, null);
|
2008
|
+
value = attemptResolveElement(request, element.type, element.key, element.ref, element.props, null);
|
1920
2009
|
break;
|
1921
2010
|
}
|
1922
2011
|
|
@@ -1943,7 +2032,7 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
1943
2032
|
var ping = newTask.ping;
|
1944
2033
|
x.then(ping, ping);
|
1945
2034
|
newTask.thenableState = getThenableStateAfterSuspending();
|
1946
|
-
return
|
2035
|
+
return serializeLazyID(newTask.id);
|
1947
2036
|
} else {
|
1948
2037
|
// Something errored. We'll still send everything we have up until this point.
|
1949
2038
|
// We'll replace this element with a lazy reference that throws on the client
|
@@ -1953,14 +2042,14 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
1953
2042
|
var digest = logRecoverableError(request, x);
|
1954
2043
|
|
1955
2044
|
{
|
1956
|
-
var
|
1957
|
-
message =
|
1958
|
-
stack =
|
2045
|
+
var _getErrorMessageAndSt4 = getErrorMessageAndStackDev(x),
|
2046
|
+
message = _getErrorMessageAndSt4.message,
|
2047
|
+
stack = _getErrorMessageAndSt4.stack;
|
1959
2048
|
|
1960
2049
|
emitErrorChunkDev(request, errorId, digest, message, stack);
|
1961
2050
|
}
|
1962
2051
|
|
1963
|
-
return
|
2052
|
+
return serializeLazyID(errorId);
|
1964
2053
|
}
|
1965
2054
|
}
|
1966
2055
|
}
|
@@ -1972,6 +2061,11 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
1972
2061
|
if (typeof value === 'object') {
|
1973
2062
|
if (isClientReference(value)) {
|
1974
2063
|
return serializeClientReference(request, parent, key, value);
|
2064
|
+
} else if (typeof value.then === 'function') {
|
2065
|
+
// We assume that any object with a .then property is a "Thenable" type,
|
2066
|
+
// or a Promise type. Either of which can be represented by a Promise.
|
2067
|
+
var promiseId = serializeThenable(request, value);
|
2068
|
+
return serializePromiseID(promiseId);
|
1975
2069
|
} else if (value.$$typeof === REACT_PROVIDER_TYPE) {
|
1976
2070
|
var providerKey = value._context._globalName;
|
1977
2071
|
var writtenProviders = request.writtenProviders;
|
@@ -2163,7 +2257,7 @@ function retryTask(request, task) {
|
|
2163
2257
|
// also suspends.
|
2164
2258
|
|
2165
2259
|
task.model = value;
|
2166
|
-
value = attemptResolveElement(element.type, element.key, element.ref, element.props, prevThenableState); // Successfully finished this component. We're going to keep rendering
|
2260
|
+
value = attemptResolveElement(request, element.type, element.key, element.ref, element.props, prevThenableState); // Successfully finished this component. We're going to keep rendering
|
2167
2261
|
// using the same task, but we reset its thenable state before continuing.
|
2168
2262
|
|
2169
2263
|
task.thenableState = null; // Keep rendering and reuse the same task. This inner loop is separate
|
@@ -2174,7 +2268,7 @@ function retryTask(request, task) {
|
|
2174
2268
|
// TODO: Concatenate keys of parents onto children.
|
2175
2269
|
var nextElement = value;
|
2176
2270
|
task.model = value;
|
2177
|
-
value = attemptResolveElement(nextElement.type, nextElement.key, nextElement.ref, nextElement.props, null);
|
2271
|
+
value = attemptResolveElement(request, nextElement.type, nextElement.key, nextElement.ref, nextElement.props, null);
|
2178
2272
|
}
|
2179
2273
|
}
|
2180
2274
|
|
@@ -2202,9 +2296,9 @@ function retryTask(request, task) {
|
|
2202
2296
|
var digest = logRecoverableError(request, x);
|
2203
2297
|
|
2204
2298
|
{
|
2205
|
-
var
|
2206
|
-
message =
|
2207
|
-
stack =
|
2299
|
+
var _getErrorMessageAndSt5 = getErrorMessageAndStackDev(x),
|
2300
|
+
message = _getErrorMessageAndSt5.message,
|
2301
|
+
stack = _getErrorMessageAndSt5.stack;
|
2208
2302
|
|
2209
2303
|
emitErrorChunkDev(request, task.id, digest, message, stack);
|
2210
2304
|
}
|
@@ -2368,9 +2462,9 @@ function abort(request, reason) {
|
|
2368
2462
|
var errorId = request.nextChunkId++;
|
2369
2463
|
|
2370
2464
|
if (true) {
|
2371
|
-
var
|
2372
|
-
message =
|
2373
|
-
stack =
|
2465
|
+
var _getErrorMessageAndSt6 = getErrorMessageAndStackDev(error),
|
2466
|
+
message = _getErrorMessageAndSt6.message,
|
2467
|
+
stack = _getErrorMessageAndSt6.stack;
|
2374
2468
|
|
2375
2469
|
emitErrorChunkDev(request, errorId, digest, message, stack);
|
2376
2470
|
} else {
|
@@ -7,11 +7,11 @@
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
9
9
|
*/
|
10
|
-
'use strict';var aa=require("util"),
|
11
|
-
function q(a,b){if("string"===typeof b){if(0!==b.length)if(2048<3*b.length)0<m&&(p(a,e.subarray(0,m)),e=new Uint8Array(2048),m=0),p(a,r.encode(b));else{var
|
12
|
-
e):(e.set(b.subarray(0,
|
10
|
+
'use strict';var aa=require("util"),ba=require("async_hooks"),ca=require("react");var ha=new ba.AsyncLocalStorage,e=null,m=0,n=!0;function p(a,b){a=a.write(b);n=n&&a}
|
11
|
+
function q(a,b){if("string"===typeof b){if(0!==b.length)if(2048<3*b.length)0<m&&(p(a,e.subarray(0,m)),e=new Uint8Array(2048),m=0),p(a,r.encode(b));else{var c=e;0<m&&(c=e.subarray(m));c=r.encodeInto(b,c);var d=c.read;m+=c.written;d<b.length&&(p(a,e),e=new Uint8Array(2048),m=r.encodeInto(b.slice(d),e).written);2048===m&&(p(a,e),e=new Uint8Array(2048),m=0)}}else 0!==b.byteLength&&(2048<b.byteLength?(0<m&&(p(a,e.subarray(0,m)),e=new Uint8Array(2048),m=0),p(a,b)):(c=e.length-m,c<b.byteLength&&(0===c?p(a,
|
12
|
+
e):(e.set(b.subarray(0,c),m),m+=c,p(a,e),b=b.subarray(c)),e=new Uint8Array(2048),m=0),e.set(b,m),m+=b.byteLength,2048===m&&(p(a,e),e=new Uint8Array(2048),m=0)));return n}var r=new aa.TextEncoder;function t(a){return r.encode(a)}var u=JSON.stringify;function v(a,b,c){a=u(c);return b.toString(16)+":"+a+"\n"}
|
13
13
|
var w=Symbol.for("react.client.reference"),x=Symbol.for("react.element"),ia=Symbol.for("react.fragment"),ja=Symbol.for("react.provider"),ka=Symbol.for("react.server_context"),la=Symbol.for("react.forward_ref"),ma=Symbol.for("react.suspense"),na=Symbol.for("react.suspense_list"),oa=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),pa=Symbol.for("react.default_value"),qa=Symbol.for("react.memo_cache_sentinel");
|
14
|
-
function A(a,b,d,
|
14
|
+
function A(a,b,c,d,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new A(a,0,!1,a,null,!1,!1)});
|
15
15
|
[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new A(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new A(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new A(a,2,!1,a,null,!1,!1)});
|
16
16
|
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new A(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new A(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new A(a,4,!1,a,null,!1,!1)});
|
17
17
|
["cols","rows","size","span"].forEach(function(a){new A(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new A(a,5,!1,a.toLowerCase(),null,!1,!1)});var B=/[\-:]([a-z])/g;function C(a){return a[1].toUpperCase()}
|
@@ -26,35 +26,37 @@ t('" data-pid="');t('$RC=function(b,c,e){c=document.getElementById(c);c.parentNo
|
|
26
26
|
t('$RC("');t('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("');
|
27
27
|
t('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("');
|
28
28
|
t('$RR("');t('","');t('",');t('"');t(")\x3c/script>");t('<template data-rci="" data-bid="');t('<template data-rri="" data-bid="');t('" data-sid="');t('" data-sty="');t('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');t('$RX("');t('"');t(",");t(")\x3c/script>");t('<template data-rxi="" data-bid="');t('" data-dgst="');t('" data-msg="');t('" data-stck="');t('<style data-precedence="');
|
29
|
-
t('"></style>');t("[");t(",[");t(",");t("]");var
|
29
|
+
t('"></style>');t("[");t(",[");t(",");t("]");var E=null;function H(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");H(a,c);b.context._currentValue=b.value}}}function ta(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&ta(a)}
|
30
30
|
function ua(a){var b=a.parent;null!==b&&ua(b);a.context._currentValue=a.value}function va(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?H(a,b):va(a,b)}
|
31
|
-
function wa(a,b){var
|
32
|
-
function ya(){}function za(a,b,
|
31
|
+
function wa(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?H(a,c):wa(a,c);b.context._currentValue=b.value}function I(a){var b=E;b!==a&&(null===b?ua(a):null===a?ta(b):b.depth===a.depth?H(b,a):b.depth>a.depth?va(b,a):wa(b,a),E=a)}function xa(a,b){var c=a._currentValue;a._currentValue=b;var d=E;return E=a={parent:d,depth:null===d?0:d.depth+1,context:a,parentValue:c,value:b}}var J=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`");
|
32
|
+
function ya(){}function za(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(ya,ya),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}K=b;throw J;}}var K=null;
|
33
33
|
function Aa(){if(null===K)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=K;K=null;return a}var L=null,M=0,N=null;function Ba(){var a=N;N=null;return a}function Ca(a){return a._currentValue}
|
34
|
-
var Ha={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:O,useTransition:O,readContext:Ca,useContext:Ca,useReducer:O,useRef:O,useState:O,useInsertionEffect:O,useLayoutEffect:O,useImperativeHandle:O,useEffect:O,useId:Da,useMutableSource:O,useSyncExternalStore:O,useCacheRefresh:function(){return
|
35
|
-
function O(){throw Error("This Hook is not supported in Server Components.");}function
|
34
|
+
var Ha={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:O,useTransition:O,readContext:Ca,useContext:Ca,useReducer:O,useRef:O,useState:O,useInsertionEffect:O,useLayoutEffect:O,useImperativeHandle:O,useEffect:O,useId:Da,useMutableSource:O,useSyncExternalStore:O,useCacheRefresh:function(){return Ea},useMemoCache:function(a){for(var b=Array(a),c=0;c<a;c++)b[c]=qa;return b},use:Ga};
|
35
|
+
function O(){throw Error("This Hook is not supported in Server Components.");}function Ea(){throw Error("Refreshing the cache is not supported in Server Components.");}function Da(){if(null===L)throw Error("useId can only be used while React is rendering");var a=L.identifierCount++;return":"+L.identifierPrefix+"S"+a.toString(32)+":"}
|
36
36
|
function Ga(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=M;M+=1;null===N&&(N=[]);return za(N,a,b)}if(a.$$typeof===ka)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function P(){return(new AbortController).signal}function Ia(){if(Q)return Q;var a=ha.getStore();return a?a:new Map}
|
37
|
-
var Ja={getCacheSignal:function(){var a=Ia(),b=a.get(P);void 0===b&&(b=P(),a.set(P,b));return b},getCacheForType:function(a){var b=Ia(),
|
38
|
-
function La(a,b,d,
|
39
|
-
|
40
|
-
function
|
41
|
-
function
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
function
|
46
|
-
|
47
|
-
|
48
|
-
function
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
function
|
57
|
-
|
58
|
-
function
|
59
|
-
function
|
60
|
-
|
37
|
+
var Ja={getCacheSignal:function(){var a=Ia(),b=a.get(P);void 0===b&&(b=P(),a.set(P,b));return b},getCacheForType:function(a){var b=Ia(),c=b.get(a);void 0===c&&(c=a(),b.set(a,c));return c}},Q=null,R=ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=R.ContextRegistry,T=R.ReactCurrentDispatcher,U=R.ReactCurrentCache;function Ka(a){console.error(a)}
|
38
|
+
function La(a,b,c,d,f){if(null!==U.current&&U.current!==Ja)throw Error("Currently React only supports one RSC renderer at a time.");U.current=Ja;var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,writtenProviders:new Map,identifierPrefix:f||"",identifierCount:1,onError:void 0===
|
39
|
+
c?Ka:c,toJSON:function(a,b){return Ma(k,this,a,b)}};k.pendingChunks++;b=Na(d);a=Oa(k,a,b,g);h.push(a);return k}var Pa={};
|
40
|
+
function Qa(a,b){a.pendingChunks++;var c=Oa(a,null,E,a.abortableTasks);switch(b.status){case "fulfilled":return c.model=b.value,Ra(a,c),c.id;case "rejected":var d=V(a,b.reason);W(a,c.id,d);return c.id;default:"string"!==typeof b.status&&(b.status="pending",b.then(function(a){"pending"===b.status&&(b.status="fulfilled",b.value=a)},function(a){"pending"===b.status&&(b.status="rejected",b.reason=a)}))}b.then(function(b){c.model=b;Ra(a,c)},function(b){b=V(a,b);W(a,c.id,b)});return c.id}
|
41
|
+
function Sa(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}function Ta(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:z,_payload:a,_init:Sa}}
|
42
|
+
function X(a,b,c,d,f,g){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof b){if(b.$$typeof===w)return[x,b,c,f];M=0;N=g;f=b(f);return"object"===typeof f&&null!==f&&"function"===typeof f.then?"fulfilled"===f.status?f.value:Ta(f):f}if("string"===typeof b)return[x,b,c,f];if("symbol"===typeof b)return b===ia?f.children:[x,b,c,f];if(null!=b&&"object"===typeof b){if(b.$$typeof===w)return[x,b,c,f];switch(b.$$typeof){case z:var h=
|
43
|
+
b._init;b=h(b._payload);return X(a,b,c,d,f,g);case la:return a=b.render,M=0,N=g,a(f,void 0);case oa:return X(a,b.type,c,d,f,g);case ja:return xa(b._context,f.value),[x,b,c,{value:f.value,children:f.children,__pop:Pa}]}}throw Error("Unsupported Server Component type: "+Ua(b));}function Ra(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&setImmediate(function(){return Va(a)})}
|
44
|
+
function Oa(a,b,c,d){var f={id:a.nextChunkId++,status:0,model:b,context:c,ping:function(){return Ra(a,f)},thenableState:null};d.add(f);return f}
|
45
|
+
function Wa(a,b,c,d){var f=d.filepath+"#"+d.name+(d.async?"#async":""),g=a.writtenModules,h=g.get(f);if(void 0!==h)return b[0]===x&&"1"===c?"$L"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig.clientManifest[d.filepath][d.name];var l=d.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var y=a.nextChunkId++,da=u(l);var ea=y.toString(16)+":I"+da+"\n";a.completedModuleChunks.push(ea);g.set(f,y);return b[0]===x&&"1"===c?"$L"+y.toString(16):"$"+y.toString(16)}catch(fa){return a.pendingChunks++,
|
46
|
+
b=a.nextChunkId++,c=V(a,fa),W(a,b,c),"$"+b.toString(16)}}function Xa(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,c){return c})}function Ua(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(sa(a))return"[...]";a=Xa(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}}
|
47
|
+
function Y(a){if("string"===typeof a)return a;switch(a){case ma:return"Suspense";case na:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case la:return Y(a.render);case oa:return Y(a.type);case z:var b=a._payload;a=a._init;try{return Y(a(b))}catch(c){}}return""}
|
48
|
+
function Z(a,b){var c=Xa(a);if("Object"!==c&&"Array"!==c)return c;c=-1;var d=0;if(sa(a)){var f="[";for(var g=0;g<a.length;g++){0<g&&(f+=", ");var h=a[g];h="object"===typeof h&&null!==h?Z(h):Ua(h);""+g===b?(c=f.length,d=h.length,f+=h):f=10>h.length&&40>f.length+h.length?f+h:f+"..."}f+="]"}else if(a.$$typeof===x)f="<"+Y(a.type)+"/>";else{f="{";g=Object.keys(a);for(h=0;h<g.length;h++){0<h&&(f+=", ");var k=g[h],l=JSON.stringify(k);f+=('"'+k+'"'===l?k:l)+": ";l=a[k];l="object"===typeof l&&null!==l?Z(l):
|
49
|
+
Ua(l);k===b?(c=f.length,d=l.length,f+=l):f=10>l.length&&40>f.length+l.length?f+l:f+"..."}f+="}"}return void 0===b?f:-1<c&&0<d?(a=" ".repeat(c)+"^".repeat(d),"\n "+f+"\n "+a):"\n "+f}
|
50
|
+
function Ma(a,b,c,d){switch(d){case x:return"$"}for(;"object"===typeof d&&null!==d&&(d.$$typeof===x||d.$$typeof===z);)try{switch(d.$$typeof){case x:var f=d;d=X(a,f.type,f.key,f.ref,f.props,null);break;case z:var g=d._init;d=g(d._payload)}}catch(h){c=h===J?Aa():h;if("object"===typeof c&&null!==c&&"function"===typeof c.then)return a.pendingChunks++,a=Oa(a,d,E,a.abortableTasks),d=a.ping,c.then(d,d),a.thenableState=Ba(),"$L"+a.id.toString(16);a.pendingChunks++;d=a.nextChunkId++;c=V(a,c);W(a,d,c);return"$L"+
|
51
|
+
d.toString(16)}if(null===d)return null;if("object"===typeof d){if(d.$$typeof===w)return Wa(a,b,c,d);if("function"===typeof d.then)return"$@"+Qa(a,d).toString(16);if(d.$$typeof===ja)return d=d._context._globalName,b=a.writtenProviders,c=b.get(c),void 0===c&&(a.pendingChunks++,c=a.nextChunkId++,b.set(d,c),d=v(a,c,"$P"+d),a.completedJSONChunks.push(d)),"$"+c.toString(16);if(d===Pa){a=E;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");d=a.parentValue;a.context._currentValue=
|
52
|
+
d===pa?a.context._defaultValue:d;E=a.parent;return}return d}if("string"===typeof d)return a="$"===d[0]?"$"+d:d,a;if("boolean"===typeof d||"number"===typeof d||"undefined"===typeof d)return d;if("function"===typeof d){if(d.$$typeof===w)return Wa(a,b,c,d);if(/^on[A-Z]/.test(c))throw Error("Event handlers cannot be passed to Client Component props."+Z(b,c)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error("Functions cannot be passed directly to Client Components because they're not serializable."+
|
53
|
+
Z(b,c));}if("symbol"===typeof d){f=a.writtenSymbols;g=f.get(d);if(void 0!==g)return"$"+g.toString(16);g=d.description;if(Symbol.for(g)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+(d.description+") cannot be found among global symbols.")+Z(b,c));a.pendingChunks++;c=a.nextChunkId++;b=v(a,c,"$S"+g);a.completedModuleChunks.push(b);f.set(d,c);return"$"+c.toString(16)}if("bigint"===typeof d)throw Error("BigInt ("+d+") is not yet supported in Client Component props."+
|
54
|
+
Z(b,c));throw Error("Type "+typeof d+" is not supported in Client Component props."+Z(b,c));}function V(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""}
|
55
|
+
function Ya(a,b){null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)}function W(a,b,c){c={digest:c};b=b.toString(16)+":E"+u(c)+"\n";a.completedErrorChunks.push(b)}
|
56
|
+
function Va(a){var b=T.current,c=Q;T.current=Ha;Q=a.cache;L=a;try{var d=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<d.length;f++){var g=d[f];var h=a;if(0===g.status){I(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===x){var l=k,y=g.thenableState;g.model=k;k=X(h,l.type,l.key,l.ref,l.props,y);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===x;)l=k,g.model=k,k=X(h,l.type,l.key,l.ref,l.props,null)}var da=g.id,ea=u(k,h.toJSON);var fa=da.toString(16)+":"+
|
57
|
+
ea+"\n";h.completedJSONChunks.push(fa);h.abortableTasks.delete(g);g.status=1}catch(F){var G=F===J?Aa():F;if("object"===typeof G&&null!==G&&"function"===typeof G.then){var Fa=g.ping;G.then(Fa,Fa);g.thenableState=Ba()}else{h.abortableTasks.delete(g);g.status=4;var ab=V(h,G);W(h,g.id,ab)}}}}null!==a.destination&&Za(a,a.destination)}catch(F){V(a,F),Ya(a,F)}finally{T.current=b,Q=c,L=null}}
|
58
|
+
function Za(a,b){e=new Uint8Array(2048);m=0;n=!0;try{for(var c=a.completedModuleChunks,d=0;d<c.length;d++)if(a.pendingChunks--,!q(b,c[d])){a.destination=null;d++;break}c.splice(0,d);var f=a.completedJSONChunks;for(d=0;d<f.length;d++)if(a.pendingChunks--,!q(b,f[d])){a.destination=null;d++;break}f.splice(0,d);var g=a.completedErrorChunks;for(d=0;d<g.length;d++)if(a.pendingChunks--,!q(b,g[d])){a.destination=null;d++;break}g.splice(0,d)}finally{e&&0<m&&b.write(e.subarray(0,m)),e=null,m=0,n=!0}"function"===
|
59
|
+
typeof b.flush&&b.flush();0===a.pendingChunks&&b.end()}function $a(a){setImmediate(function(){return ha.run(a.cache,Va,a)})}function bb(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{Za(a,b)}catch(c){V(a,c),Ya(a,c)}}}
|
60
|
+
function cb(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=V(a,void 0===b?Error("The render was aborted by the server without a reason."):b);a.pendingChunks++;var f=a.nextChunkId++;W(a,f,d);c.forEach(function(b){b.status=3;var c="$"+f.toString(16);b=v(a,b.id,c);a.completedErrorChunks.push(b)});c.clear()}null!==a.destination&&Za(a,a.destination)}catch(g){V(a,g),Ya(a,g)}}
|
61
|
+
function Na(a){if(a){var b=E;I(null);for(var c=0;c<a.length;c++){var d=a[c],f=d[0];d=d[1];S[f]||(S[f]=ca.createServerContext(f,pa));xa(S[f],d)}a=E;I(b);return a}return null}function db(a,b){return function(){return bb(b,a)}}
|
62
|
+
exports.renderToPipeableStream=function(a,b,c){var d=La(a,b,c?c.onError:void 0,c?c.context:void 0,c?c.identifierPrefix:void 0),f=!1;$a(d);return{pipe:function(a){if(f)throw Error("React currently only supports piping to one writable stream.");f=!0;bb(d,a);a.on("drain",db(a,d));return a},abort:function(a){cb(d,a)}}};
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-server-dom-webpack",
|
3
3
|
"description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.",
|
4
|
-
"version": "18.3.0-next-
|
4
|
+
"version": "18.3.0-next-855b77c9b-20230202",
|
5
5
|
"keywords": [
|
6
6
|
"react"
|
7
7
|
],
|
@@ -49,8 +49,8 @@
|
|
49
49
|
"node": ">=0.10.0"
|
50
50
|
},
|
51
51
|
"peerDependencies": {
|
52
|
-
"react": "18.3.0-next-
|
53
|
-
"react-dom": "18.3.0-next-
|
52
|
+
"react": "18.3.0-next-855b77c9b-20230202",
|
53
|
+
"react-dom": "18.3.0-next-855b77c9b-20230202",
|
54
54
|
"webpack": "^5.59.0"
|
55
55
|
},
|
56
56
|
"dependencies": {
|
@@ -561,6 +561,16 @@
|
|
561
561
|
return createLazyChunkWrapper(chunk);
|
562
562
|
}
|
563
563
|
|
564
|
+
case '@':
|
565
|
+
{
|
566
|
+
// Promise
|
567
|
+
var _id = parseInt(value.substring(2), 16);
|
568
|
+
|
569
|
+
var _chunk = getChunk(response, _id);
|
570
|
+
|
571
|
+
return _chunk;
|
572
|
+
}
|
573
|
+
|
564
574
|
case 'S':
|
565
575
|
{
|
566
576
|
return Symbol.for(value.substring(2));
|
@@ -574,35 +584,35 @@
|
|
574
584
|
default:
|
575
585
|
{
|
576
586
|
// We assume that anything else is a reference ID.
|
577
|
-
var
|
587
|
+
var _id2 = parseInt(value.substring(1), 16);
|
578
588
|
|
579
|
-
var
|
589
|
+
var _chunk2 = getChunk(response, _id2);
|
580
590
|
|
581
|
-
switch (
|
591
|
+
switch (_chunk2.status) {
|
582
592
|
case RESOLVED_MODEL:
|
583
|
-
initializeModelChunk(
|
593
|
+
initializeModelChunk(_chunk2);
|
584
594
|
break;
|
585
595
|
|
586
596
|
case RESOLVED_MODULE:
|
587
|
-
initializeModuleChunk(
|
597
|
+
initializeModuleChunk(_chunk2);
|
588
598
|
break;
|
589
599
|
} // The status might have changed after initialization.
|
590
600
|
|
591
601
|
|
592
|
-
switch (
|
602
|
+
switch (_chunk2.status) {
|
593
603
|
case INITIALIZED:
|
594
|
-
return
|
604
|
+
return _chunk2.value;
|
595
605
|
|
596
606
|
case PENDING:
|
597
607
|
case BLOCKED:
|
598
608
|
var parentChunk = initializingChunk;
|
599
609
|
|
600
|
-
|
610
|
+
_chunk2.then(createModelResolver(parentChunk, parentObject, key), createModelReject(parentChunk));
|
601
611
|
|
602
612
|
return null;
|
603
613
|
|
604
614
|
default:
|
605
|
-
throw
|
615
|
+
throw _chunk2.reason;
|
606
616
|
}
|
607
617
|
}
|
608
618
|
}
|
@@ -12,12 +12,12 @@ var h=q.set.bind(q,e,null);f.then(h,I);q.set(e,f)}else null!==f&&c.push(f)}if(a.
|
|
12
12
|
break;case "resolved_module":t(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":throw a;default:throw a.reason;}}function u(a,b){for(var c=0;c<a.length;c++)(0,a[c])(b)}function C(a,b,c){switch(a.status){case "fulfilled":u(b,a.value);break;case "pending":case "blocked":a.value=b;a.reason=c;break;case "rejected":c&&u(c,a.reason)}}function v(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&u(c,b)}}function D(a,
|
13
13
|
b){if("pending"===a.status||"blocked"===a.status){var c=a.value,d=a.reason;a.status="resolved_module";a.value=b;null!==c&&(t(a),C(a,c,d))}}function r(a){var b=w,c=g;w=a;g=null;try{var d=JSON.parse(a.value,a._response._fromJSON);null!==g&&0<g.deps?(g.value=d,a.status="blocked",a.value=null,a.reason=null):(a.status="fulfilled",a.value=d)}catch(e){a.status="rejected",a.reason=e}finally{w=b,g=c}}function t(a){try{var b=a.value;if(b.async){var c=y.get(b.id);if("fulfilled"===c.status)var d=c.value;else throw c.reason;
|
14
14
|
}else d=__webpack_require__(b.id);var e="*"===b.name?d:""===b.name?d.__esModule?d.default:d:d[b.name];a.status="fulfilled";a.value=e}catch(f){a.status="rejected",a.reason=f}}function x(a,b){a._chunks.forEach(function(a){"pending"===a.status&&v(a,b)})}function p(a,b){var c=a._chunks,d=c.get(b);d||(d=new m("pending",null,null,a),c.set(b,d));return d}function L(a,b,c){if(g){var d=g;d.deps++}else d=g={deps:1,value:null};return function(e){b[c]=e;d.deps--;0===d.deps&&"blocked"===a.status&&(e=a.value,a.status=
|
15
|
-
"fulfilled",a.value=d.value,null!==e&&u(e,d.value))}}function M(a){return function(b){return v(a,b)}}function N(a,b,c,d){if("$"===d[0]){if("$"===d)return z;switch(d[1]){case "$":return d.substring(1);case "L":return b=parseInt(d.substring(2),16),
|
16
|
-
break;case "resolved_module":t(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=w,a.then(L(d,b,c),M(d)),null;default:throw a.reason;}}}return d}function Q(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var f=H(a._bundlerConfig,c);if(c=J(f)){if(e){var h=e;h.status="blocked"}else h=new m("blocked",null,null,a),d.set(b,h);c.then(function(){return D(h,f)},function(a){return v(h,a)})}else e?
|
17
|
-
Error("Connection closed."))}function F(a,b){if(""!==b){var c=b.indexOf(":",0),d=parseInt(b.substring(0,c),16);switch(b[c+1]){case "I":Q(a,d,b.substring(c+2));break;case "E":c=JSON.parse(b.substring(c+2)).digest;b=Error("An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.");
|
18
|
-
b.message;b.digest=c;c=a._chunks;var e=c.get(d);e?v(e,b):c.set(d,new m("rejected",null,b,a));break;default:b=b.substring(c+1),e=a._chunks,(c=e.get(d))?"pending"===c.status&&(a=c.value,d=c.reason,c.status="resolved_model",c.value=b,null!==a&&(r(c),C(c,a,d))):e.set(d,new m("resolved_model",b,null,a))}}}function R(a){return function(b,c){return"string"===typeof c?N(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===z?{$$typeof:z,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:
|
19
|
-
new TextDecoder,c=new Map;a={_bundlerConfig:a,_chunks:c,_partialRow:"",_stringDecoder:b};a._fromJSON=R(a);return a}function G(a,b){function c(b){var h=b.value;if(b.done)E(a);else{b=h;h=a._stringDecoder;for(var k=b.indexOf(10);-1<k;){var f=a._partialRow;var g=b.subarray(0,k);g=h.decode(g);F(a,f+g);a._partialRow="";b=b.subarray(k+1);k=b.indexOf(10)}a._partialRow+=h.decode(b,S);return e.read().then(c).catch(d)}}function d(b){x(a,b)}var e=b.getReader();e.read().then(c).catch(d)}
|
20
|
-
y=new Map,z=Symbol.for("react.element"),O=Symbol.for("react.lazy"),P=Symbol.for("react.default_value"),A=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;m.prototype=Object.create(Promise.prototype);m.prototype.then=function(a,b){switch(this.status){case "resolved_model":r(this);break;case "resolved_module":t(this)}switch(this.status){case "fulfilled":a(this.value);break;case "pending":case "blocked":a&&(null===this.value&&(this.value=[]),this.value.push(a));
|
21
|
-
(this.reason=[]),this.reason.push(b));break;default:b(this.reason)}};var w=null,g=null;l.createFromFetch=function(a,b){var c=B(b&&b.moduleMap?b.moduleMap:null);a.then(function(a){G(c,a.body)},function(a){x(c,a)});return p(c,0)};l.createFromReadableStream=function(a,b){b=B(b&&b.moduleMap?b.moduleMap:null);G(b,a);return p(b,0)};l.createFromXHR=function(a,b){function c(b){b=a.responseText;for(var c=f,d=b.indexOf("\n",c);-1<d;)c=e._partialRow+b.substring(c,d),F(e,c),e._partialRow=
|
22
|
-
c);e._partialRow+=b.substring(c);f=b.length}function d(a){x(e,new TypeError("Network error"))}var e=B(b&&b.moduleMap?b.moduleMap:null),f=0;a.addEventListener("progress",c);a.addEventListener("load",function(a){c();E(e)});a.addEventListener("error",d);a.addEventListener("abort",d);a.addEventListener("timeout",d);return p(e,0)}});
|
15
|
+
"fulfilled",a.value=d.value,null!==e&&u(e,d.value))}}function M(a){return function(b){return v(a,b)}}function N(a,b,c,d){if("$"===d[0]){if("$"===d)return z;switch(d[1]){case "$":return d.substring(1);case "L":return b=parseInt(d.substring(2),16),a=p(a,b),{$$typeof:O,_payload:a,_init:K};case "@":return b=parseInt(d.substring(2),16),p(a,b);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),A[a]||(A[a]=n.createServerContext(a,P)),A[a].Provider;default:d=parseInt(d.substring(1),
|
16
|
+
16);a=p(a,d);switch(a.status){case "resolved_model":r(a);break;case "resolved_module":t(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=w,a.then(L(d,b,c),M(d)),null;default:throw a.reason;}}}return d}function Q(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var f=H(a._bundlerConfig,c);if(c=J(f)){if(e){var h=e;h.status="blocked"}else h=new m("blocked",null,null,a),d.set(b,h);c.then(function(){return D(h,f)},function(a){return v(h,a)})}else e?
|
17
|
+
D(e,f):d.set(b,new m("resolved_module",f,null,a))}function E(a){x(a,Error("Connection closed."))}function F(a,b){if(""!==b){var c=b.indexOf(":",0),d=parseInt(b.substring(0,c),16);switch(b[c+1]){case "I":Q(a,d,b.substring(c+2));break;case "E":c=JSON.parse(b.substring(c+2)).digest;b=Error("An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.");
|
18
|
+
b.stack="Error: "+b.message;b.digest=c;c=a._chunks;var e=c.get(d);e?v(e,b):c.set(d,new m("rejected",null,b,a));break;default:b=b.substring(c+1),e=a._chunks,(c=e.get(d))?"pending"===c.status&&(a=c.value,d=c.reason,c.status="resolved_model",c.value=b,null!==a&&(r(c),C(c,a,d))):e.set(d,new m("resolved_model",b,null,a))}}}function R(a){return function(b,c){return"string"===typeof c?N(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===z?{$$typeof:z,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:
|
19
|
+
c,b):c}}function B(a){var b=new TextDecoder,c=new Map;a={_bundlerConfig:a,_chunks:c,_partialRow:"",_stringDecoder:b};a._fromJSON=R(a);return a}function G(a,b){function c(b){var h=b.value;if(b.done)E(a);else{b=h;h=a._stringDecoder;for(var k=b.indexOf(10);-1<k;){var f=a._partialRow;var g=b.subarray(0,k);g=h.decode(g);F(a,f+g);a._partialRow="";b=b.subarray(k+1);k=b.indexOf(10)}a._partialRow+=h.decode(b,S);return e.read().then(c).catch(d)}}function d(b){x(a,b)}var e=b.getReader();e.read().then(c).catch(d)}
|
20
|
+
var S={stream:!0},q=new Map,y=new Map,z=Symbol.for("react.element"),O=Symbol.for("react.lazy"),P=Symbol.for("react.default_value"),A=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;m.prototype=Object.create(Promise.prototype);m.prototype.then=function(a,b){switch(this.status){case "resolved_model":r(this);break;case "resolved_module":t(this)}switch(this.status){case "fulfilled":a(this.value);break;case "pending":case "blocked":a&&(null===this.value&&(this.value=[]),this.value.push(a));
|
21
|
+
b&&(null===this.reason&&(this.reason=[]),this.reason.push(b));break;default:b(this.reason)}};var w=null,g=null;l.createFromFetch=function(a,b){var c=B(b&&b.moduleMap?b.moduleMap:null);a.then(function(a){G(c,a.body)},function(a){x(c,a)});return p(c,0)};l.createFromReadableStream=function(a,b){b=B(b&&b.moduleMap?b.moduleMap:null);G(b,a);return p(b,0)};l.createFromXHR=function(a,b){function c(b){b=a.responseText;for(var c=f,d=b.indexOf("\n",c);-1<d;)c=e._partialRow+b.substring(c,d),F(e,c),e._partialRow=
|
22
|
+
"",c=d+1,d=b.indexOf("\n",c);e._partialRow+=b.substring(c);f=b.length}function d(a){x(e,new TypeError("Network error"))}var e=B(b&&b.moduleMap?b.moduleMap:null),f=0;a.addEventListener("progress",c);a.addEventListener("load",function(a){c();E(e)});a.addEventListener("error",d);a.addEventListener("abort",d);a.addEventListener("timeout",d);return p(e,0)}});
|
23
23
|
})();
|