react-server-dom-webpack 19.0.0-canary-e3ebcd54b-20240405 → 19.0.0-canary-adb717393-20240411
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.browser.development.js +136 -97
- package/cjs/react-server-dom-webpack-client.browser.production.js +106 -65
- package/cjs/react-server-dom-webpack-client.browser.production.min.js +24 -23
- package/cjs/react-server-dom-webpack-client.browser.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-client.edge.development.js +144 -105
- package/cjs/react-server-dom-webpack-client.edge.production.js +114 -73
- package/cjs/react-server-dom-webpack-client.edge.production.min.js +24 -23
- package/cjs/react-server-dom-webpack-client.edge.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-client.node.development.js +144 -105
- package/cjs/react-server-dom-webpack-client.node.production.js +114 -73
- package/cjs/react-server-dom-webpack-client.node.production.min.js +26 -25
- package/cjs/react-server-dom-webpack-client.node.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +144 -105
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.js +114 -73
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +33 -32
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-node-register.js.map +1 -1
- package/cjs/react-server-dom-webpack-server.browser.development.js +349 -56
- package/cjs/react-server-dom-webpack-server.browser.production.js +93 -36
- package/cjs/react-server-dom-webpack-server.browser.production.min.js +68 -68
- package/cjs/react-server-dom-webpack-server.browser.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-server.edge.development.js +349 -56
- package/cjs/react-server-dom-webpack-server.edge.production.js +93 -36
- package/cjs/react-server-dom-webpack-server.edge.production.min.js +58 -58
- package/cjs/react-server-dom-webpack-server.edge.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-server.node.development.js +349 -56
- package/cjs/react-server-dom-webpack-server.node.production.js +93 -36
- package/cjs/react-server-dom-webpack-server.node.production.min.js +56 -56
- package/cjs/react-server-dom-webpack-server.node.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +349 -56
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +93 -36
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +53 -53
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js.map +1 -1
- package/package.json +3 -3
- package/umd/react-server-dom-webpack-client.browser.development.js +136 -97
- package/umd/react-server-dom-webpack-client.browser.production.min.js +25 -25
- package/umd/react-server-dom-webpack-server.browser.development.js +349 -56
- package/umd/react-server-dom-webpack-server.browser.production.min.js +54 -54
@@ -198,7 +198,7 @@ chunks, nonce) {
|
|
198
198
|
}
|
199
199
|
}
|
200
200
|
|
201
|
-
const ReactDOMSharedInternals = ReactDOM.
|
201
|
+
const ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
202
202
|
|
203
203
|
function getCrossOriginString(input) {
|
204
204
|
if (typeof input === 'string') {
|
@@ -209,16 +209,18 @@ function getCrossOriginString(input) {
|
|
209
209
|
}
|
210
210
|
|
211
211
|
// This client file is in the shared folder because it applies to both SSR and browser contexts.
|
212
|
-
const ReactDOMCurrentDispatcher = ReactDOMSharedInternals.ReactDOMCurrentDispatcher;
|
213
212
|
function dispatchHint(code, model) {
|
214
|
-
const dispatcher =
|
213
|
+
const dispatcher = ReactDOMSharedInternals.d;
|
214
|
+
/* ReactDOMCurrentDispatcher */
|
215
215
|
|
216
216
|
switch (code) {
|
217
217
|
case 'D':
|
218
218
|
{
|
219
219
|
const refined = refineModel(code, model);
|
220
220
|
const href = refined;
|
221
|
-
dispatcher.
|
221
|
+
dispatcher.D(
|
222
|
+
/* prefetchDNS */
|
223
|
+
href);
|
222
224
|
return;
|
223
225
|
}
|
224
226
|
|
@@ -228,11 +230,15 @@ function dispatchHint(code, model) {
|
|
228
230
|
|
229
231
|
if (typeof refined === 'string') {
|
230
232
|
const href = refined;
|
231
|
-
dispatcher.
|
233
|
+
dispatcher.C(
|
234
|
+
/* preconnect */
|
235
|
+
href);
|
232
236
|
} else {
|
233
237
|
const href = refined[0];
|
234
238
|
const crossOrigin = refined[1];
|
235
|
-
dispatcher.
|
239
|
+
dispatcher.C(
|
240
|
+
/* preconnect */
|
241
|
+
href, crossOrigin);
|
236
242
|
}
|
237
243
|
|
238
244
|
return;
|
@@ -246,9 +252,13 @@ function dispatchHint(code, model) {
|
|
246
252
|
|
247
253
|
if (refined.length === 3) {
|
248
254
|
const options = refined[2];
|
249
|
-
dispatcher.
|
255
|
+
dispatcher.L(
|
256
|
+
/* preload */
|
257
|
+
href, as, options);
|
250
258
|
} else {
|
251
|
-
dispatcher.
|
259
|
+
dispatcher.L(
|
260
|
+
/* preload */
|
261
|
+
href, as);
|
252
262
|
}
|
253
263
|
|
254
264
|
return;
|
@@ -260,44 +270,56 @@ function dispatchHint(code, model) {
|
|
260
270
|
|
261
271
|
if (typeof refined === 'string') {
|
262
272
|
const href = refined;
|
263
|
-
dispatcher.
|
273
|
+
dispatcher.m(
|
274
|
+
/* preloadModule */
|
275
|
+
href);
|
264
276
|
} else {
|
265
277
|
const href = refined[0];
|
266
278
|
const options = refined[1];
|
267
|
-
dispatcher.
|
279
|
+
dispatcher.m(
|
280
|
+
/* preloadModule */
|
281
|
+
href, options);
|
268
282
|
}
|
269
283
|
|
270
284
|
return;
|
271
285
|
}
|
272
286
|
|
273
|
-
case '
|
287
|
+
case 'X':
|
274
288
|
{
|
275
289
|
const refined = refineModel(code, model);
|
276
290
|
|
277
291
|
if (typeof refined === 'string') {
|
278
292
|
const href = refined;
|
279
|
-
dispatcher.
|
293
|
+
dispatcher.X(
|
294
|
+
/* preinitScript */
|
295
|
+
href);
|
280
296
|
} else {
|
281
297
|
const href = refined[0];
|
282
|
-
const
|
283
|
-
|
284
|
-
|
298
|
+
const options = refined[1];
|
299
|
+
dispatcher.X(
|
300
|
+
/* preinitScript */
|
301
|
+
href, options);
|
285
302
|
}
|
286
303
|
|
287
304
|
return;
|
288
305
|
}
|
289
306
|
|
290
|
-
case '
|
307
|
+
case 'S':
|
291
308
|
{
|
292
309
|
const refined = refineModel(code, model);
|
293
310
|
|
294
311
|
if (typeof refined === 'string') {
|
295
312
|
const href = refined;
|
296
|
-
dispatcher.
|
313
|
+
dispatcher.S(
|
314
|
+
/* preinitStyle */
|
315
|
+
href);
|
297
316
|
} else {
|
298
317
|
const href = refined[0];
|
299
|
-
const
|
300
|
-
|
318
|
+
const precedence = refined[1] === 0 ? undefined : refined[1];
|
319
|
+
const options = refined.length === 3 ? refined[2] : undefined;
|
320
|
+
dispatcher.S(
|
321
|
+
/* preinitStyle */
|
322
|
+
href, precedence, options);
|
301
323
|
}
|
302
324
|
|
303
325
|
return;
|
@@ -309,11 +331,15 @@ function dispatchHint(code, model) {
|
|
309
331
|
|
310
332
|
if (typeof refined === 'string') {
|
311
333
|
const href = refined;
|
312
|
-
dispatcher.
|
334
|
+
dispatcher.M(
|
335
|
+
/* preinitModuleScript */
|
336
|
+
href);
|
313
337
|
} else {
|
314
338
|
const href = refined[0];
|
315
339
|
const options = refined[1];
|
316
|
-
dispatcher.
|
340
|
+
dispatcher.M(
|
341
|
+
/* preinitModuleScript */
|
342
|
+
href, options);
|
317
343
|
}
|
318
344
|
|
319
345
|
return;
|
@@ -326,14 +352,14 @@ function refineModel(code, model) {
|
|
326
352
|
return model;
|
327
353
|
}
|
328
354
|
function preinitScriptForSSR(href, nonce, crossOrigin) {
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
}
|
355
|
+
ReactDOMSharedInternals.d
|
356
|
+
/* ReactDOMCurrentDispatcher */
|
357
|
+
.X(
|
358
|
+
/* preinitScript */
|
359
|
+
href, {
|
360
|
+
crossOrigin: getCrossOriginString(crossOrigin),
|
361
|
+
nonce
|
362
|
+
});
|
337
363
|
}
|
338
364
|
|
339
365
|
// ATTENTION
|
@@ -1269,7 +1295,8 @@ function reportGlobalError(response, error) {
|
|
1269
1295
|
});
|
1270
1296
|
}
|
1271
1297
|
|
1272
|
-
function createElement(type, key, props)
|
1298
|
+
function createElement(type, key, props, owner) // DEV-only
|
1299
|
+
{
|
1273
1300
|
let element;
|
1274
1301
|
|
1275
1302
|
{
|
@@ -1308,7 +1335,7 @@ function getChunk(response, id) {
|
|
1308
1335
|
return chunk;
|
1309
1336
|
}
|
1310
1337
|
|
1311
|
-
function createModelResolver(chunk, parentObject, key, cyclic) {
|
1338
|
+
function createModelResolver(chunk, parentObject, key, cyclic, response, map) {
|
1312
1339
|
let blocked;
|
1313
1340
|
|
1314
1341
|
if (initializingChunkBlockedModel) {
|
@@ -1325,11 +1352,11 @@ function createModelResolver(chunk, parentObject, key, cyclic) {
|
|
1325
1352
|
}
|
1326
1353
|
|
1327
1354
|
return value => {
|
1328
|
-
parentObject[key] = value; // If this is the root object for a model reference, where `blocked.value`
|
1355
|
+
parentObject[key] = map(response, value); // If this is the root object for a model reference, where `blocked.value`
|
1329
1356
|
// is a stale `null`, the resolved value can be used directly.
|
1330
1357
|
|
1331
1358
|
if (key === '' && blocked.value === null) {
|
1332
|
-
blocked.value =
|
1359
|
+
blocked.value = parentObject[key];
|
1333
1360
|
}
|
1334
1361
|
|
1335
1362
|
blocked.deps--;
|
@@ -1383,28 +1410,60 @@ function createServerReferenceProxy(response, metaData) {
|
|
1383
1410
|
return proxy;
|
1384
1411
|
}
|
1385
1412
|
|
1386
|
-
function getOutlinedModel(response, id) {
|
1413
|
+
function getOutlinedModel(response, id, parentObject, key, map) {
|
1387
1414
|
const chunk = getChunk(response, id);
|
1388
1415
|
|
1389
1416
|
switch (chunk.status) {
|
1390
1417
|
case RESOLVED_MODEL:
|
1391
1418
|
initializeModelChunk(chunk);
|
1392
1419
|
break;
|
1420
|
+
|
1421
|
+
case RESOLVED_MODULE:
|
1422
|
+
initializeModuleChunk(chunk);
|
1423
|
+
break;
|
1393
1424
|
} // The status might have changed after initialization.
|
1394
1425
|
|
1395
1426
|
|
1396
1427
|
switch (chunk.status) {
|
1397
1428
|
case INITIALIZED:
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1429
|
+
const chunkValue = map(response, chunk.value);
|
1430
|
+
|
1431
|
+
return chunkValue;
|
1432
|
+
|
1433
|
+
case PENDING:
|
1434
|
+
case BLOCKED:
|
1435
|
+
case CYCLIC:
|
1436
|
+
const parentChunk = initializingChunk;
|
1437
|
+
chunk.then(createModelResolver(parentChunk, parentObject, key, chunk.status === CYCLIC, response, map), createModelReject(parentChunk));
|
1438
|
+
return null;
|
1402
1439
|
|
1403
1440
|
default:
|
1404
1441
|
throw chunk.reason;
|
1405
1442
|
}
|
1406
1443
|
}
|
1407
1444
|
|
1445
|
+
function createMap(response, model) {
|
1446
|
+
return new Map(model);
|
1447
|
+
}
|
1448
|
+
|
1449
|
+
function createSet(response, model) {
|
1450
|
+
return new Set(model);
|
1451
|
+
}
|
1452
|
+
|
1453
|
+
function createFormData(response, model) {
|
1454
|
+
const formData = new FormData();
|
1455
|
+
|
1456
|
+
for (let i = 0; i < model.length; i++) {
|
1457
|
+
formData.append(model[i][0], model[i][1]);
|
1458
|
+
}
|
1459
|
+
|
1460
|
+
return formData;
|
1461
|
+
}
|
1462
|
+
|
1463
|
+
function createModel(response, model) {
|
1464
|
+
return model;
|
1465
|
+
}
|
1466
|
+
|
1408
1467
|
function parseModelString(response, parentObject, key, value) {
|
1409
1468
|
if (value[0] === '$') {
|
1410
1469
|
if (value === '$') {
|
@@ -1452,8 +1511,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
1452
1511
|
{
|
1453
1512
|
// Server Reference
|
1454
1513
|
const id = parseInt(value.slice(2), 16);
|
1455
|
-
|
1456
|
-
return createServerReferenceProxy(response, metadata);
|
1514
|
+
return getOutlinedModel(response, id, parentObject, key, createServerReferenceProxy);
|
1457
1515
|
}
|
1458
1516
|
|
1459
1517
|
case 'T':
|
@@ -1473,16 +1531,27 @@ function parseModelString(response, parentObject, key, value) {
|
|
1473
1531
|
{
|
1474
1532
|
// Map
|
1475
1533
|
const id = parseInt(value.slice(2), 16);
|
1476
|
-
|
1477
|
-
return new Map(data);
|
1534
|
+
return getOutlinedModel(response, id, parentObject, key, createMap);
|
1478
1535
|
}
|
1479
1536
|
|
1480
1537
|
case 'W':
|
1481
1538
|
{
|
1482
1539
|
// Set
|
1483
1540
|
const id = parseInt(value.slice(2), 16);
|
1484
|
-
|
1485
|
-
|
1541
|
+
return getOutlinedModel(response, id, parentObject, key, createSet);
|
1542
|
+
}
|
1543
|
+
|
1544
|
+
case 'B':
|
1545
|
+
{
|
1546
|
+
|
1547
|
+
return undefined;
|
1548
|
+
}
|
1549
|
+
|
1550
|
+
case 'K':
|
1551
|
+
{
|
1552
|
+
// FormData
|
1553
|
+
const id = parseInt(value.slice(2), 16);
|
1554
|
+
return getOutlinedModel(response, id, parentObject, key, createFormData);
|
1486
1555
|
}
|
1487
1556
|
|
1488
1557
|
case 'I':
|
@@ -1532,35 +1601,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
1532
1601
|
{
|
1533
1602
|
// We assume that anything else is a reference ID.
|
1534
1603
|
const id = parseInt(value.slice(1), 16);
|
1535
|
-
|
1536
|
-
|
1537
|
-
switch (chunk.status) {
|
1538
|
-
case RESOLVED_MODEL:
|
1539
|
-
initializeModelChunk(chunk);
|
1540
|
-
break;
|
1541
|
-
|
1542
|
-
case RESOLVED_MODULE:
|
1543
|
-
initializeModuleChunk(chunk);
|
1544
|
-
break;
|
1545
|
-
} // The status might have changed after initialization.
|
1546
|
-
|
1547
|
-
|
1548
|
-
switch (chunk.status) {
|
1549
|
-
case INITIALIZED:
|
1550
|
-
const chunkValue = chunk.value;
|
1551
|
-
|
1552
|
-
return chunkValue;
|
1553
|
-
|
1554
|
-
case PENDING:
|
1555
|
-
case BLOCKED:
|
1556
|
-
case CYCLIC:
|
1557
|
-
const parentChunk = initializingChunk;
|
1558
|
-
chunk.then(createModelResolver(parentChunk, parentObject, key, chunk.status === CYCLIC), createModelReject(parentChunk));
|
1559
|
-
return null;
|
1560
|
-
|
1561
|
-
default:
|
1562
|
-
throw chunk.reason;
|
1563
|
-
}
|
1604
|
+
return getOutlinedModel(response, id, parentObject, key, createModel);
|
1564
1605
|
}
|
1565
1606
|
}
|
1566
1607
|
}
|
@@ -9,36 +9,37 @@
|
|
9
9
|
*/
|
10
10
|
'use strict';var r=require("util"),t=require("react-dom"),aa={stream:!0};function ba(a,b){if(a){var c=a[b[0]];if(a=c[b[2]])c=a.name;else{a=c["*"];if(!a)throw Error('Could not find the module "'+b[0]+'" in the React SSR Manifest. This is probably a bug in the React Server Components bundler.');c=b[2]}return 4===b.length?[a.id,a.chunks,c,1]:[a.id,a.chunks,c]}return b}var u=new Map;
|
11
11
|
function x(a){var b=__webpack_require__(a);if("function"!==typeof b.then||"fulfilled"===b.status)return null;b.then(function(c){b.status="fulfilled";b.value=c},function(c){b.status="rejected";b.reason=c});return b}function ca(){}
|
12
|
-
function da(a){for(var b=a[1],c=[],d=0;d<b.length;){var f=b[d++];b[d++];var g=u.get(f);if(void 0===g){g=__webpack_chunk_load__(f);c.push(g);var
|
13
|
-
function ea(a,b,c){if(null!==a)for(var d=1;d<b.length;d+=2){var f=c,g=y.
|
14
|
-
function
|
15
|
-
function ka(a,b,c,d,f){function g(n,
|
16
|
-
null!==q&&"function"===typeof q.then){
|
17
|
-
var ma=e;
|
18
|
-
return"$T"+E(c,
|
19
|
-
return"$T"+E(c,
|
12
|
+
function da(a){for(var b=a[1],c=[],d=0;d<b.length;){var f=b[d++];b[d++];var g=u.get(f);if(void 0===g){g=__webpack_chunk_load__(f);c.push(g);var h=u.set.bind(u,f,null);g.then(h,ca);u.set(f,g)}else null!==g&&c.push(g)}return 4===a.length?0===c.length?x(a[0]):Promise.all(c).then(function(){return x(a[0])}):0<c.length?Promise.all(c):null}
|
13
|
+
function ea(a,b,c){if(null!==a)for(var d=1;d<b.length;d+=2){var f=c,g=y.d,h=g.X,l=a.prefix+b[d];var e=a.crossOrigin;e="string"===typeof e?"use-credentials"===e?e:"":void 0;h.call(g,l,{crossOrigin:e,nonce:f})}}var y=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Symbol.for("react.element"),A=Symbol.for("react.lazy"),B=Symbol.iterator;function fa(a){if(null===a||"object"!==typeof a)return null;a=B&&a[B]||a["@@iterator"];return"function"===typeof a?a:null}var ha=Array.isArray,D=Object.getPrototypeOf;
|
14
|
+
function E(a,b){var c=a.length;a.push(b);return c}var ia=Object.prototype,F=new WeakMap;function ja(a){return Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN"}
|
15
|
+
function ka(a,b,c,d,f){function g(n,k){if(null===k)return null;if("object"===typeof k){switch(k.$$typeof){case z:if(void 0===c)throw Error("React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options.");return"$T"+E(c,k).toString(16);case A:n=k._payload;var I=k._init;null===e&&(e=new FormData);l++;try{var m=I(n),p=h++,v=JSON.stringify(m,g);e.append(b+p,v);return"$"+p.toString(16)}catch(q){if("object"===typeof q&&
|
16
|
+
null!==q&&"function"===typeof q.then){l++;var O=h++;m=function(){try{var w=JSON.stringify(k,g),C=e;C.append(b+O,w);l--;0===l&&d(C)}catch(la){f(la)}};q.then(m,m);return"$"+O.toString(16)}f(q);return null}finally{l--}}if("function"===typeof k.then){null===e&&(e=new FormData);l++;var P=h++;k.then(function(q){try{var w=JSON.stringify(q,g);q=e;q.append(b+P,w);l--;0===l&&d(q)}catch(C){f(C)}},function(q){f(q)});return"$@"+P.toString(16)}if(ha(k))return k;if(k instanceof FormData){null===e&&(e=new FormData);
|
17
|
+
var ma=e;m=h++;var na=b+m+"_";k.forEach(function(q,w){ma.append(na+w,q)});return"$K"+m.toString(16)}if(k instanceof Map)return m=JSON.stringify(Array.from(k),g),null===e&&(e=new FormData),p=h++,e.append(b+p,m),"$Q"+p.toString(16);if(k instanceof Set)return m=JSON.stringify(Array.from(k),g),null===e&&(e=new FormData),p=h++,e.append(b+p,m),"$W"+p.toString(16);if(fa(k))return Array.from(k);m=D(k);if(m!==ia&&(null===m||null!==D(m))){if(void 0===c)throw Error("Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported.");
|
18
|
+
return"$T"+E(c,k).toString(16)}return k}if("string"===typeof k){if("Z"===k[k.length-1]&&this[n]instanceof Date)return"$D"+k;m="$"===k[0]?"$"+k:k;return m}if("boolean"===typeof k)return k;if("number"===typeof k)return ja(k);if("undefined"===typeof k)return"$undefined";if("function"===typeof k){m=F.get(k);if(void 0!==m)return m=JSON.stringify(m,g),null===e&&(e=new FormData),p=h++,e.set(b+p,m),"$F"+p.toString(16);if(void 0===c)throw Error("Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.");
|
19
|
+
return"$T"+E(c,k).toString(16)}if("symbol"===typeof k){if(void 0===c)throw Error("Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options.");return"$T"+E(c,k).toString(16)}if("bigint"===typeof k)return"$n"+k.toString(10);throw Error("Type "+typeof k+" is not supported as an argument to a Server Function.");}var h=1,l=0,e=null;a=JSON.stringify(a,g);null===e?d(a):(e.set(b+"0",a),0===l&&d(e))}var G=new WeakMap;
|
20
20
|
function oa(a){var b,c,d=new Promise(function(f,g){b=f;c=g});ka(a,"",void 0,function(f){if("string"===typeof f){var g=new FormData;g.append("0",f);f=g}d.status="fulfilled";d.value=f;b(f)},function(f){d.status="rejected";d.reason=f;c(f)});return d}
|
21
21
|
function pa(a){var b=F.get(this);if(!b)throw Error("Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.");var c=null;if(null!==b.bound){c=G.get(b);c||(c=oa(b),G.set(b,c));if("rejected"===c.status)throw c.reason;if("fulfilled"!==c.status)throw c;b=c.value;var d=new FormData;b.forEach(function(f,g){d.append("$ACTION_"+a+":"+g,f)});c=d;b="$ACTION_REF_"+a}else b="$ACTION_ID_"+b.id;return{name:b,method:"POST",encType:"multipart/form-data",data:c}}
|
22
|
-
function
|
23
|
-
function J(a,b,c){Object.defineProperties(a,{$$FORM_ACTION:{value:void 0===c?pa:function(){var d=F.get(this);if(!d)throw Error("Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.");var f=d.bound;null===f&&(f=Promise.resolve([]));return c(d.id,f)}},$$IS_SIGNATURE_EQUAL:{value:
|
24
|
-
function K(){var a=qa.apply(this,arguments),b=F.get(this);if(b){var c=ra.call(arguments,1),d=null;d=null!==b.bound?Promise.resolve(b.bound).then(function(f){return f.concat(c)}):Promise.resolve(c);Object.defineProperties(a,{$$FORM_ACTION:{value:this.$$FORM_ACTION},$$IS_SIGNATURE_EQUAL:{value:
|
22
|
+
function H(a,b){var c=F.get(this);if(!c)throw Error("Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.");if(c.id!==a)return!1;var d=c.bound;if(null===d)return 0===b;switch(d.status){case "fulfilled":return d.value.length===b;case "pending":throw d;case "rejected":throw d.reason;default:throw"string"!==typeof d.status&&(d.status="pending",d.then(function(f){d.status="fulfilled";d.value=f},function(f){d.status="rejected";d.reason=f})),d;}}
|
23
|
+
function J(a,b,c){Object.defineProperties(a,{$$FORM_ACTION:{value:void 0===c?pa:function(){var d=F.get(this);if(!d)throw Error("Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.");var f=d.bound;null===f&&(f=Promise.resolve([]));return c(d.id,f)}},$$IS_SIGNATURE_EQUAL:{value:H},bind:{value:K}});F.set(a,b)}var qa=Function.prototype.bind,ra=Array.prototype.slice;
|
24
|
+
function K(){var a=qa.apply(this,arguments),b=F.get(this);if(b){var c=ra.call(arguments,1),d=null;d=null!==b.bound?Promise.resolve(b.bound).then(function(f){return f.concat(c)}):Promise.resolve(c);Object.defineProperties(a,{$$FORM_ACTION:{value:this.$$FORM_ACTION},$$IS_SIGNATURE_EQUAL:{value:H},bind:{value:K}});F.set(a,{id:b.id,bound:d})}return a}function sa(a,b,c){function d(){var f=Array.prototype.slice.call(arguments);return b(a,f)}J(d,{id:a,bound:null},c);return d}
|
25
25
|
function L(a,b,c,d){this.status=a;this.value=b;this.reason=c;this._response=d}L.prototype=Object.create(Promise.prototype);L.prototype.then=function(a,b){switch(this.status){case "resolved_model":M(this);break;case "resolved_module":N(this)}switch(this.status){case "fulfilled":a(this.value);break;case "pending":case "blocked":case "cyclic":a&&(null===this.value&&(this.value=[]),this.value.push(a));b&&(null===this.reason&&(this.reason=[]),this.reason.push(b));break;default:b(this.reason)}};
|
26
26
|
function ta(a){switch(a.status){case "resolved_model":M(a);break;case "resolved_module":N(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":case "cyclic":throw a;default:throw a.reason;}}function Q(a,b){for(var c=0;c<a.length;c++)(0,a[c])(b)}function R(a,b,c){switch(a.status){case "fulfilled":Q(b,a.value);break;case "pending":case "blocked":case "cyclic":a.value=b;a.reason=c;break;case "rejected":c&&Q(c,a.reason)}}
|
27
27
|
function S(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&Q(c,b)}}function T(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.value,d=a.reason;a.status="resolved_module";a.value=b;null!==c&&(N(a),R(a,c,d))}}var U=null,V=null;
|
28
|
-
function M(a){var b=U,c=V;U=a;V=null;var d=a.value;a.status="cyclic";a.value=null;a.reason=null;try{var f=JSON.parse(d,a._response._fromJSON);if(null!==V&&0<V.deps)V.value=f,a.status="blocked",a.value=null,a.reason=null;else{var g=a.value;a.status="fulfilled";a.value=f;null!==g&&Q(g,f)}}catch(
|
28
|
+
function M(a){var b=U,c=V;U=a;V=null;var d=a.value;a.status="cyclic";a.value=null;a.reason=null;try{var f=JSON.parse(d,a._response._fromJSON);if(null!==V&&0<V.deps)V.value=f,a.status="blocked",a.value=null,a.reason=null;else{var g=a.value;a.status="fulfilled";a.value=f;null!==g&&Q(g,f)}}catch(h){a.status="rejected",a.reason=h}finally{U=b,V=c}}
|
29
29
|
function N(a){try{var b=a.value,c=__webpack_require__(b[0]);if(4===b.length&&"function"===typeof c.then)if("fulfilled"===c.status)c=c.value;else throw c.reason;var d="*"===b[2]?c:""===b[2]?c.__esModule?c.default:c:c[b[2]];a.status="fulfilled";a.value=d}catch(f){a.status="rejected",a.reason=f}}function W(a,b){a._chunks.forEach(function(c){"pending"===c.status&&S(c,b)})}function X(a,b){var c=a._chunks,d=c.get(b);d||(d=new L("pending",null,null,a),c.set(b,d));return d}
|
30
|
-
function ua(a,b,c,d){if(V){var
|
31
|
-
function wa(a,b){function c(){var f=Array.prototype.slice.call(arguments),g=b.bound;return g?"fulfilled"===g.status?d(b.id,g.value.concat(f)):Promise.resolve(g).then(function(
|
32
|
-
function
|
33
|
-
if(0
|
34
|
-
|
35
|
-
|
36
|
-
function
|
37
|
-
function
|
38
|
-
|
39
|
-
|
40
|
-
case
|
41
|
-
e
|
42
|
-
|
30
|
+
function ua(a,b,c,d,f,g){if(V){var h=V;d||h.deps++}else h=V={deps:d?0:1,value:null};return function(l){b[c]=g(f,l);""===c&&null===h.value&&(h.value=b[c]);h.deps--;0===h.deps&&"blocked"===a.status&&(l=a.value,a.status="fulfilled",a.value=h.value,null!==l&&Q(l,h.value))}}function va(a){return function(b){return S(a,b)}}
|
31
|
+
function wa(a,b){function c(){var f=Array.prototype.slice.call(arguments),g=b.bound;return g?"fulfilled"===g.status?d(b.id,g.value.concat(f)):Promise.resolve(g).then(function(h){return d(b.id,h.concat(f))}):d(b.id,f)}var d=a._callServer;J(c,b,a._encodeFormAction);return c}
|
32
|
+
function Y(a,b,c,d,f){b=X(a,b);switch(b.status){case "resolved_model":M(b);break;case "resolved_module":N(b)}switch(b.status){case "fulfilled":return f(a,b.value);case "pending":case "blocked":case "cyclic":var g=U;b.then(ua(g,c,d,"cyclic"===b.status,a,f),va(g));return null;default:throw b.reason;}}function xa(a,b){return new Map(b)}function ya(a,b){return new Set(b)}function za(a,b){a=new FormData;for(var c=0;c<b.length;c++)a.append(b[c][0],b[c][1]);return a}function Aa(a,b){return b}
|
33
|
+
function Ba(a,b,c,d){if("$"===d[0]){if("$"===d)return z;switch(d[1]){case "$":return d.slice(1);case "L":return b=parseInt(d.slice(2),16),a=X(a,b),{$$typeof:A,_payload:a,_init:ta};case "@":if(2===d.length)return new Promise(function(){});b=parseInt(d.slice(2),16);return X(a,b);case "S":return Symbol.for(d.slice(2));case "F":return d=parseInt(d.slice(2),16),Y(a,d,b,c,wa);case "T":b=parseInt(d.slice(2),16);a=a._tempRefs;if(null==a)throw Error("Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply.");
|
34
|
+
if(0>b||b>=a.length)throw Error("The RSC response contained a reference that doesn't exist in the temporary reference set. Always pass the matching set that was used to create the reply when parsing its response.");return a[b];case "Q":return d=parseInt(d.slice(2),16),Y(a,d,b,c,xa);case "W":return d=parseInt(d.slice(2),16),Y(a,d,b,c,ya);case "B":return;case "K":return d=parseInt(d.slice(2),16),Y(a,d,b,c,za);case "I":return Infinity;case "-":return"$-0"===d?-0:-Infinity;case "N":return NaN;case "u":return;
|
35
|
+
case "D":return new Date(Date.parse(d.slice(2)));case "n":return BigInt(d.slice(2));default:return d=parseInt(d.slice(1),16),Y(a,d,b,c,Aa)}}return d}function Ca(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}
|
36
|
+
function Da(a,b,c,d,f,g){var h=new Map;a={_bundlerConfig:a,_moduleLoading:b,_callServer:void 0!==c?c:Ca,_encodeFormAction:d,_nonce:f,_chunks:h,_stringDecoder:new r.TextDecoder,_fromJSON:null,_rowState:0,_rowID:0,_rowTag:0,_rowLength:0,_buffer:[],_tempRefs:g};a._fromJSON=Ea(a);return a}
|
37
|
+
function Fa(a,b,c){var d=a._chunks,f=d.get(b);c=JSON.parse(c,a._fromJSON);var g=ba(a._bundlerConfig,c);ea(a._moduleLoading,c[1],a._nonce);if(c=da(g)){if(f){var h=f;h.status="blocked"}else h=new L("blocked",null,null,a),d.set(b,h);c.then(function(){return T(h,g)},function(l){return S(h,l)})}else f?T(f,g):d.set(b,new L("resolved_module",g,null,a))}
|
38
|
+
function Ea(a){return function(b,c){return"string"===typeof c?Ba(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]}:c,b):c}}function Z(){throw Error("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.");}
|
39
|
+
exports.createFromNodeStream=function(a,b,c){var d=Da(b.moduleMap,b.moduleLoading,Z,c?c.encodeFormAction:void 0,c&&"string"===typeof c.nonce?c.nonce:void 0,void 0);a.on("data",function(f){for(var g=0,h=d._rowState,l=d._rowID,e=d._rowTag,n=d._rowLength,k=d._buffer,I=f.length;g<I;){var m=-1;switch(h){case 0:m=f[g++];58===m?h=1:l=l<<4|(96<m?m-87:m-48);continue;case 1:h=f[g];84===h?(e=h,h=2,g++):64<h&&91>h?(e=h,h=3,g++):(e=0,h=3);continue;case 2:m=f[g++];44===m?h=4:n=n<<4|(96<m?m-87:m-48);continue;case 3:m=
|
40
|
+
f.indexOf(10,g);break;case 4:m=g+n,m>f.length&&(m=-1)}var p=f.byteOffset+g;if(-1<m){n=new Uint8Array(f.buffer,p,m-g);g=e;p=d._stringDecoder;e="";for(var v=0;v<k.length;v++)e+=p.decode(k[v],aa);e+=p.decode(n);switch(g){case 73:Fa(d,l,e);break;case 72:l=e[0];e=e.slice(1);e=JSON.parse(e,d._fromJSON);n=y.d;switch(l){case "D":n.D(e);break;case "C":"string"===typeof e?n.C(e):n.C(e[0],e[1]);break;case "L":l=e[0];g=e[1];3===e.length?n.L(l,g,e[2]):n.L(l,g);break;case "m":"string"===typeof e?n.m(e):n.m(e[0],
|
41
|
+
e[1]);break;case "X":"string"===typeof e?n.X(e):n.X(e[0],e[1]);break;case "S":"string"===typeof e?n.S(e):n.S(e[0],0===e[1]?void 0:e[1],3===e.length?e[2]:void 0);break;case "M":"string"===typeof e?n.M(e):n.M(e[0],e[1])}break;case 69:e=JSON.parse(e);n=e.digest;e=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.");
|
42
|
+
e.stack="Error: "+e.message;e.digest=n;n=d._chunks;(g=n.get(l))?S(g,e):n.set(l,new L("rejected",null,e,d));break;case 84:d._chunks.set(l,new L("fulfilled",e,null,d));break;case 68:case 87:throw Error("Failed to read a RSC payload created by a development version of React on the server while using a production version on the client. Always use matching versions on the server and the client.");default:n=d._chunks,(g=n.get(l))?(l=g,"pending"===l.status&&(n=l.value,g=l.reason,l.status="resolved_model",
|
43
|
+
l.value=e,null!==n&&(M(l),R(l,n,g)))):n.set(l,new L("resolved_model",e,null,d))}g=m;3===h&&g++;n=l=e=h=0;k.length=0}else{f=new Uint8Array(f.buffer,p,f.byteLength-g);k.push(f);n-=f.byteLength;break}}d._rowState=h;d._rowID=l;d._rowTag=e;d._rowLength=n});a.on("error",function(f){W(d,f)});a.on("end",function(){W(d,Error("Connection closed."))});return X(d,0)};exports.createServerReference=function(a){return sa(a,Z)};
|
43
44
|
|
44
45
|
//# sourceMappingURL=react-server-dom-webpack-client.node.production.min.js.map
|